mirror of
https://github.com/isledecomp/isle.git
synced 2026-05-03 13:33:56 +00:00
Use reference for PresenterNameDispatch param
- fix or add const markers so we can use a const reference
This commit is contained in:
parent
8fbacc0837
commit
353c1c2dcd
@ -56,7 +56,7 @@ class MxDSAction : public MxDSObject
|
||||
inline const MxVector3Data &GetLocation() const { return m_location; }
|
||||
inline void SetOmni(MxOmni *p_omni) { m_omni = p_omni; }
|
||||
|
||||
inline MxBool const IsLooping() { return this->m_flags & Flag_Looping; }
|
||||
inline MxBool IsLooping() const { return this->m_flags & Flag_Looping; }
|
||||
|
||||
private:
|
||||
MxU32 m_sizeOnDisk;
|
||||
|
||||
@ -33,7 +33,7 @@ class MxDSMediaAction : public MxDSAction
|
||||
|
||||
void CopyMediaSrcPath(const char *p_mediaSrcPath);
|
||||
|
||||
inline MxS32 const GetMediaFormat() { return this->m_mediaFormat; }
|
||||
inline MxS32 GetMediaFormat() const { return this->m_mediaFormat; }
|
||||
private:
|
||||
MxU32 m_sizeOnDisk;
|
||||
char *m_mediaSrcPath;
|
||||
|
||||
@ -40,10 +40,10 @@ class MxDSObject : public MxCore
|
||||
inline void SetObjectId(MxU32 p_objectId) { this->m_objectId = p_objectId; }
|
||||
inline void SetUnknown24(MxS16 p_unk24) { this->m_unk24 = p_unk24; }
|
||||
|
||||
inline char *GetSourceName() { return this->m_sourceName; }
|
||||
inline char *GetSourceName() const { return this->m_sourceName; }
|
||||
|
||||
inline void SetType(MxDSType p_type) { this->m_type = p_type; }
|
||||
inline MxDSType GetType() { return (MxDSType) this->m_type; }
|
||||
inline MxDSType GetType() const { return (MxDSType) this->m_type; }
|
||||
|
||||
private:
|
||||
MxU32 m_sizeOnDisk;
|
||||
|
||||
@ -158,23 +158,23 @@ void MxPresenter::Enable(MxBool p_enable)
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x100b5310
|
||||
char *PresenterNameDispatch(MxDSAction *p_action)
|
||||
char *PresenterNameDispatch(const MxDSAction &p_action)
|
||||
{
|
||||
char *name = p_action->GetSourceName();
|
||||
char *name = p_action.GetSourceName();
|
||||
MxS32 format;
|
||||
|
||||
if (!name || strlen(name) == 0) {
|
||||
switch (p_action->GetType()) {
|
||||
switch (p_action.GetType()) {
|
||||
case MxDSType_Anim:
|
||||
format = ((MxDSAnim*)p_action)->GetMediaFormat();
|
||||
format = ((MxDSAnim&)p_action).GetMediaFormat();
|
||||
switch (format) {
|
||||
case FOURCC(' ', 'F', 'L', 'C'):
|
||||
name = !p_action->IsLooping() ?
|
||||
name = !p_action.IsLooping() ?
|
||||
"MxFlcPresenter" :
|
||||
"MxLoopingFlcPresenter";
|
||||
break;
|
||||
case FOURCC(' ', 'S', 'M', 'K'):
|
||||
name = !p_action->IsLooping() ?
|
||||
name = !p_action.IsLooping() ?
|
||||
"MxSmkPresenter" :
|
||||
"MxLoopingSmkPresenter";
|
||||
break;
|
||||
@ -182,10 +182,10 @@ char *PresenterNameDispatch(MxDSAction *p_action)
|
||||
break;
|
||||
|
||||
case MxDSType_Sound:
|
||||
format = ((MxDSSound*)p_action)->GetMediaFormat();
|
||||
format = ((MxDSSound&)p_action).GetMediaFormat();
|
||||
switch(format) {
|
||||
case FOURCC(' ', 'M', 'I', 'D'):
|
||||
name = !p_action->IsLooping() ?
|
||||
name = !p_action.IsLooping() ?
|
||||
"MxMIDIPresenter" :
|
||||
"MxLoopingMIDIPresenter";
|
||||
break;
|
||||
|
||||
@ -84,6 +84,6 @@ class MxPresenter : public MxCore
|
||||
MxPresenter *m_unkPresenter; // 0x3c
|
||||
};
|
||||
|
||||
char *PresenterNameDispatch(MxDSAction *);
|
||||
char *PresenterNameDispatch(const MxDSAction &);
|
||||
|
||||
#endif // MXPRESENTER_H
|
||||
|
||||
Loading…
Reference in New Issue
Block a user