mirror of
https://github.com/isledecomp/isle.git
synced 2024-11-26 17:46:38 -05:00
Implement/match MxPresenter::StartAction (#126)
* Implement/match MxPresenter::StartAction * Update mxpoint32.h
This commit is contained in:
parent
5617e0e044
commit
4bd67e4ae1
4 changed files with 41 additions and 11 deletions
|
@ -52,6 +52,7 @@ class MxDSAction : public MxDSObject
|
||||||
inline void SetFlags(MxU32 m_flags) { this->m_flags = m_flags; }
|
inline void SetFlags(MxU32 m_flags) { this->m_flags = m_flags; }
|
||||||
inline char *GetExtraData() { return m_extraData; }
|
inline char *GetExtraData() { return m_extraData; }
|
||||||
inline MxU16 GetExtraLength() const { return m_extraLength; }
|
inline MxU16 GetExtraLength() const { return m_extraLength; }
|
||||||
|
inline const MxVector3Data &GetLocation() const { return m_location; }
|
||||||
inline void SetOmni(MxOmni *p_omni) { m_omni = p_omni; }
|
inline void SetOmni(MxOmni *p_omni) { m_omni = p_omni; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
20
LEGO1/mxpoint32.h
Executable file
20
LEGO1/mxpoint32.h
Executable file
|
@ -0,0 +1,20 @@
|
||||||
|
#ifndef MXPOINT32_H
|
||||||
|
#define MXPOINT32_H
|
||||||
|
|
||||||
|
#include "mxtypes.h"
|
||||||
|
|
||||||
|
class MxPoint32
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
MxPoint32() { }
|
||||||
|
MxPoint32(MxS32 p_x, MxS32 p_y)
|
||||||
|
{
|
||||||
|
this->m_x = p_x;
|
||||||
|
this->m_y = p_y;
|
||||||
|
}
|
||||||
|
|
||||||
|
MxS32 m_x;
|
||||||
|
MxS32 m_y;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // MXPOINT32_H
|
|
@ -19,11 +19,10 @@ void MxPresenter::Init()
|
||||||
{
|
{
|
||||||
m_currentTickleState = TickleState_Idle;
|
m_currentTickleState = TickleState_Idle;
|
||||||
m_action = NULL;
|
m_action = NULL;
|
||||||
m_unk0x18 = 0;
|
m_location = MxPoint32(0, 0);
|
||||||
|
m_locationZ = 0;
|
||||||
m_unkPresenter = NULL;
|
m_unkPresenter = NULL;
|
||||||
m_previousTickleStates = 0;
|
m_previousTickleStates = 0;
|
||||||
m_unk0x10 = 0;
|
|
||||||
m_unk0x14 = 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// OFFSET: LEGO1 0x100b4fc0
|
// OFFSET: LEGO1 0x100b4fc0
|
||||||
|
@ -116,15 +115,25 @@ MxLong MxPresenter::Tickle()
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
// OFFSET: LEGO1 0x100b4d80 STUB
|
// OFFSET: LEGO1 0x100b4d80
|
||||||
MxLong MxPresenter::StartAction(MxStreamController *, MxDSAction *)
|
MxLong MxPresenter::StartAction(MxStreamController *, MxDSAction *p_action)
|
||||||
{
|
{
|
||||||
// TODO
|
MxAutoLocker lock(&this->m_criticalSection);
|
||||||
|
|
||||||
return 0;
|
this->m_action = p_action;
|
||||||
|
|
||||||
|
const MxVector3Data& location = this->m_action->GetLocation();
|
||||||
|
MxS32 previousTickleState = this->m_currentTickleState;
|
||||||
|
|
||||||
|
this->m_location = MxPoint32(location[0], location[1]);
|
||||||
|
this->m_locationZ = location[2];
|
||||||
|
this->m_previousTickleStates |= 1 << (unsigned char)previousTickleState;
|
||||||
|
this->m_currentTickleState = TickleState_Ready;
|
||||||
|
|
||||||
|
return SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
// OFFSET: LEGO1 0x100b4e40 STUB
|
// OFFSET: LEGO1 0x100b4e40 STUB
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
#define MXPRESENTER_H
|
#define MXPRESENTER_H
|
||||||
|
|
||||||
#include "mxcore.h"
|
#include "mxcore.h"
|
||||||
|
#include "mxpoint32.h"
|
||||||
#include "mxdsaction.h"
|
#include "mxdsaction.h"
|
||||||
#include "mxcriticalsection.h"
|
#include "mxcriticalsection.h"
|
||||||
#include "mxomni.h"
|
#include "mxomni.h"
|
||||||
|
@ -74,9 +75,8 @@ class MxPresenter : public MxCore
|
||||||
private:
|
private:
|
||||||
MxS32 m_currentTickleState; // 0x8
|
MxS32 m_currentTickleState; // 0x8
|
||||||
MxU32 m_previousTickleStates;
|
MxU32 m_previousTickleStates;
|
||||||
undefined4 m_unk0x10;
|
MxPoint32 m_location;
|
||||||
undefined4 m_unk0x14;
|
MxS32 m_locationZ;
|
||||||
undefined4 m_unk0x18;
|
|
||||||
MxDSAction *m_action; // 0
|
MxDSAction *m_action; // 0
|
||||||
MxCriticalSection m_criticalSection;
|
MxCriticalSection m_criticalSection;
|
||||||
MxPresenter *m_unkPresenter; // 0x3c
|
MxPresenter *m_unkPresenter; // 0x3c
|
||||||
|
|
Loading…
Reference in a new issue