mirror of
https://github.com/isledecomp/isle.git
synced 2024-11-22 15:48:09 -05:00
begin implementation of InfoCenter class (#444)
* Push changes * fixes * Implement Infocenter::HandleEndAction * match Infocenter::StopCutScene * implement Infocenter::HandleKeyPress * fixes * Update infocenter.cpp * Update legoworld.cpp * use enums * WIP Fixes * Fix * Fix * Fix * Rename function * Change enum * Update enums * Refactor another enum * Refactor MxDSType * Refactor HashTableOpt * Fixes * Refactor tickle enum * Update other enums * Add EnumConstantName to ncc * Move enum to global namespace * Rename enum --------- Co-authored-by: Christian Semmler <mail@csemmler.com>
This commit is contained in:
parent
aaa18bc9e2
commit
f50b771fff
100 changed files with 1160 additions and 555 deletions
|
@ -792,11 +792,11 @@ inline void IsleApp::Tick(BOOL sleepIfNotNextFrame)
|
|||
LegoOmni::GetInstance()->CreateBackgroundAudio();
|
||||
BackgroundAudioManager()->Enable(this->m_useMusic);
|
||||
|
||||
MxStreamController* stream = Streamer()->Open("\\lego\\scripts\\isle\\isle", MxStreamer::e_DiskStream);
|
||||
MxStreamController* stream = Streamer()->Open("\\lego\\scripts\\isle\\isle", MxStreamer::e_diskStream);
|
||||
MxDSAction ds;
|
||||
|
||||
if (!stream) {
|
||||
stream = Streamer()->Open("\\lego\\scripts\\nocd", MxStreamer::e_DiskStream);
|
||||
stream = Streamer()->Open("\\lego\\scripts\\nocd", MxStreamer::e_diskStream);
|
||||
if (!stream) {
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -3,19 +3,21 @@
|
|||
|
||||
// Items related to the Extra string of key-value pairs found in MxOb
|
||||
|
||||
enum ExtraActionType {
|
||||
ExtraActionType_none = 0,
|
||||
ExtraActionType_opendisk = 1,
|
||||
ExtraActionType_openram = 2,
|
||||
ExtraActionType_close = 3,
|
||||
ExtraActionType_start = 4,
|
||||
ExtraActionType_stop = 5,
|
||||
ExtraActionType_run = 6,
|
||||
ExtraActionType_exit = 7,
|
||||
ExtraActionType_enable = 8,
|
||||
ExtraActionType_disable = 9,
|
||||
ExtraActionType_notify = 10,
|
||||
ExtraActionType_unknown = 11,
|
||||
struct Extra {
|
||||
enum ActionType {
|
||||
e_none = 0,
|
||||
e_opendisk,
|
||||
e_openram,
|
||||
e_close,
|
||||
e_start,
|
||||
e_stop,
|
||||
e_run,
|
||||
e_exit,
|
||||
e_enable,
|
||||
e_disable,
|
||||
e_notify,
|
||||
e_unknown,
|
||||
};
|
||||
};
|
||||
|
||||
#endif // EXTRA_H
|
||||
|
|
|
@ -2,11 +2,52 @@
|
|||
#define INFOCENTER_H
|
||||
|
||||
#include "legoworld.h"
|
||||
#include "radio.h"
|
||||
|
||||
class InfocenterState;
|
||||
|
||||
// SIZE 0x18
|
||||
struct InfocenterUnkDataEntry {
|
||||
// FUNCTION: LEGO1 0x1006ec80
|
||||
InfocenterUnkDataEntry() {}
|
||||
|
||||
undefined m_pad[0x18];
|
||||
};
|
||||
|
||||
// VTABLE: LEGO1 0x100d9338
|
||||
// SIZE 0x1d8
|
||||
class Infocenter : public LegoWorld {
|
||||
public:
|
||||
enum IntroScript {
|
||||
e_noIntro = -1,
|
||||
e_legoMovie,
|
||||
e_mindscapeMovie,
|
||||
e_introMovie,
|
||||
e_outroMovie,
|
||||
e_badEndMovie,
|
||||
e_goodEndMovie
|
||||
};
|
||||
|
||||
enum InfomainScript {
|
||||
c_noInfomain = -1,
|
||||
c_welcomeDialogue = 500,
|
||||
c_randomDialogue1 = 502,
|
||||
c_letsGetStarted = 504,
|
||||
c_returnBack = 514,
|
||||
c_exitConfirmation = 522,
|
||||
c_goodEndingDialogue = 539,
|
||||
c_badEndingDialogue = 540,
|
||||
c_pepperCharacterSelect = 541,
|
||||
c_mamaCharacterSelect = 542,
|
||||
c_papaCharacterSelect = 543,
|
||||
c_officierCharacterSelect = 544,
|
||||
c_loraCharacterSelect = 545,
|
||||
};
|
||||
|
||||
enum SndAmimScript {
|
||||
c_bookWig = 400
|
||||
};
|
||||
|
||||
Infocenter();
|
||||
virtual ~Infocenter() override;
|
||||
|
||||
|
@ -31,6 +72,46 @@ class Infocenter : public LegoWorld {
|
|||
virtual MxBool VTable0x5c() override; // vtable+0x5c
|
||||
virtual MxBool VTable0x64() override; // vtable+0x64
|
||||
virtual void VTable0x68(MxBool p_add) override; // vtable+0x68
|
||||
|
||||
private:
|
||||
void InitializeBitmaps();
|
||||
|
||||
MxLong HandleKeyPress(MxS8 p_key);
|
||||
MxU8 HandleMouseMove(MxS32 p_x, MxS32 p_y);
|
||||
MxU8 HandleButtonUp(MxS32 p_x, MxS32 p_y);
|
||||
MxU8 HandleNotification17(MxParam&);
|
||||
MxLong HandleEndAction(MxParam& p_param);
|
||||
MxLong HandleNotification0(MxParam&);
|
||||
|
||||
void FUN_10070dc0(MxBool);
|
||||
void FUN_10070e90();
|
||||
|
||||
void PlayCutscene(IntroScript p_entityId, MxBool p_scale);
|
||||
void StopCutscene();
|
||||
|
||||
void StartCredits();
|
||||
void StopCredits();
|
||||
|
||||
void PlayDialogue(InfomainScript p_objectId);
|
||||
void StopCurrentDialogue();
|
||||
|
||||
void PlayBookAnimation();
|
||||
void StopBookAnimation();
|
||||
|
||||
InfomainScript m_currentInfomainScript; // 0xf8
|
||||
MxS16 m_unk0xfc; // 0xfc
|
||||
InfocenterState* m_infocenterState; // 0x100
|
||||
undefined4 m_unk0x104; // 0x104
|
||||
IntroScript m_currentIntroScript; // 0x108
|
||||
Radio m_radio; // 0x10c
|
||||
undefined4 m_unk0x11c; // 0x11c
|
||||
InfocenterUnkDataEntry m_entries[7]; // 0x120
|
||||
MxS16 m_unk0x1c8; // 0x1c8
|
||||
undefined4 m_unk0x1cc; // 0x1cc
|
||||
MxU16 m_unk0x1d0; // 0x1d0
|
||||
MxU16 m_unk0x1d2; // 0x1d2
|
||||
MxU16 m_unk0x1d4; // 0x1d4
|
||||
MxU16 m_unk0x1d6; // 0x1d6
|
||||
};
|
||||
|
||||
#endif // INFOCENTER_H
|
||||
|
|
|
@ -25,6 +25,9 @@ class InfocenterState : public LegoState {
|
|||
}
|
||||
|
||||
inline MxU32 GetInfocenterBufferElement(MxS32 p_index) { return m_buffer[p_index]; }
|
||||
inline MxU32 GetUnknown0x74() { return m_unk0x74; }
|
||||
|
||||
inline void SetUnknown0x74(MxU32 p_unk0x74) { m_unk0x74 = p_unk0x74; }
|
||||
|
||||
private:
|
||||
// Members should be renamed with their offsets before use
|
||||
|
@ -55,7 +58,8 @@ class InfocenterState : public LegoState {
|
|||
undefined4 unk13;
|
||||
*/
|
||||
|
||||
undefined m_pad[0x70];
|
||||
undefined m_pad[0x6c];
|
||||
MxU32 m_unk0x74; // 0x74
|
||||
MxU32 m_buffer[7]; // 0x78
|
||||
};
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
// SIZE 0x68
|
||||
class LegoActionControlPresenter : public MxMediaPresenter {
|
||||
public:
|
||||
inline LegoActionControlPresenter() { m_unk0x50 = ExtraActionType_none; }
|
||||
inline LegoActionControlPresenter() { m_unk0x50 = Extra::ActionType::e_none; }
|
||||
virtual ~LegoActionControlPresenter() override { Destroy(TRUE); }; // vtable+0x00
|
||||
|
||||
// FUNCTION: LEGO1 0x1000d0e0
|
||||
|
@ -32,7 +32,7 @@ class LegoActionControlPresenter : public MxMediaPresenter {
|
|||
virtual void Destroy(MxBool p_fromDestructor); // vtable+0x5c
|
||||
|
||||
private:
|
||||
ExtraActionType m_unk0x50; // 0x50
|
||||
Extra::ActionType m_unk0x50; // 0x50
|
||||
MxString m_unk0x54; // 0x54
|
||||
undefined4 m_unk0x64; // 0x64
|
||||
};
|
||||
|
|
|
@ -28,6 +28,7 @@ class LegoControlManager : public MxCore {
|
|||
void FUN_10028df0(MxPresenterList* p_presenterList);
|
||||
void Register(MxCore* p_listener);
|
||||
void Unregister(MxCore* p_listener);
|
||||
void FUN_100293c0(undefined4, const MxAtomId&, undefined2);
|
||||
};
|
||||
|
||||
#endif // LEGOCONTROLMANAGER_H
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
class LegoEntity : public MxEntity {
|
||||
public:
|
||||
enum {
|
||||
Flag_Bit1 = 0x01
|
||||
c_bit1 = 0x01
|
||||
};
|
||||
|
||||
// Inlined at 0x100853f7
|
||||
|
@ -78,7 +78,7 @@ class LegoEntity : public MxEntity {
|
|||
undefined m_unk0x59; // 0x59
|
||||
// For tokens from the extra string that look like this:
|
||||
// "Action:openram;\lego\scripts\Race\CarRaceR;0"
|
||||
ExtraActionType m_actionType; // 0x5c
|
||||
Extra::ActionType m_actionType; // 0x5c
|
||||
char* m_actionArgString; // 0x60
|
||||
MxS32 m_actionArgNumber; // 0x64
|
||||
};
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
// SIZE 0x20
|
||||
class LegoEventNotificationParam : public MxNotificationParam {
|
||||
public:
|
||||
inline LegoEventNotificationParam() : MxNotificationParam(PARAM_NONE, NULL) {}
|
||||
inline LegoEventNotificationParam() : MxNotificationParam(c_notificationType0, NULL) {}
|
||||
inline LegoEventNotificationParam(
|
||||
NotificationId p_type,
|
||||
MxCore* p_sender,
|
||||
|
@ -24,6 +24,8 @@ class LegoEventNotificationParam : public MxNotificationParam {
|
|||
}
|
||||
|
||||
inline MxU8 GetKey() const { return m_key; }
|
||||
inline MxS32 GetX() const { return m_x; }
|
||||
inline MxS32 GetY() const { return m_y; }
|
||||
|
||||
protected:
|
||||
MxU8 m_modifier; // 0x0c
|
||||
|
|
|
@ -43,6 +43,7 @@ class LegoGameState {
|
|||
|
||||
void SetSomeEnumState(undefined4 p_state);
|
||||
void FUN_1003ceb0();
|
||||
void FUN_10039780(MxU8);
|
||||
|
||||
struct ScoreStruct {
|
||||
void WriteScoreHistory();
|
||||
|
|
|
@ -52,6 +52,7 @@ class LegoInputManager : public MxPresenter {
|
|||
void ClearWorld();
|
||||
|
||||
inline void SetUnknown88(MxBool p_unk0x88) { m_unk0x88 = p_unk0x88; }
|
||||
inline void SetUnknown335(MxBool p_unk0x335) { m_unk0x335 = p_unk0x335; }
|
||||
inline void SetUnknown336(MxBool p_unk0x336) { m_unk0x336 = p_unk0x336; }
|
||||
inline void SetUseJoystick(MxBool p_useJoystick) { m_useJoystick = p_useJoystick; }
|
||||
inline void SetJoystickIndex(MxS32 p_joystickIndex) { m_joystickIndex = p_joystickIndex; }
|
||||
|
|
|
@ -120,6 +120,8 @@ class LegoOmni : public MxOmni {
|
|||
inline void SetWorld(LegoWorld* p_currentWorld) { m_currentWorld = p_currentWorld; }
|
||||
inline void SetExit(MxBool p_exit) { m_exit = p_exit; };
|
||||
|
||||
inline void CloseMainWindow() { PostMessageA(m_windowHandle, WM_CLOSE, 0, 0); }
|
||||
|
||||
private:
|
||||
undefined4* m_unk0x68; // 0x68
|
||||
ViewLODListManager* m_viewLODListManager; // 0x6c
|
||||
|
@ -161,6 +163,7 @@ LegoWorld* GetCurrentWorld();
|
|||
LegoUnkSaveDataWriter* GetUnkSaveDataWriter();
|
||||
GifManager* GetGifManager();
|
||||
void FUN_10015820(MxU32, MxU32);
|
||||
void FUN_10015860(const char*, MxU8);
|
||||
LegoEntity* FindEntityByAtomIdOrEntityId(const MxAtomId& p_atom, MxS32 p_entityid);
|
||||
MxDSAction& GetCurrentAction();
|
||||
|
||||
|
|
|
@ -30,9 +30,9 @@ class LegoStream {
|
|||
virtual MxBool IsReadMode();
|
||||
|
||||
enum OpenFlags {
|
||||
ReadBit = 1,
|
||||
WriteBit = 2,
|
||||
BinaryBit = 4,
|
||||
c_readBit = 1,
|
||||
c_writeBit = 2,
|
||||
c_binaryBit = 4,
|
||||
};
|
||||
|
||||
static MxResult __stdcall WriteVariable(LegoStream* p_stream, MxVariableTable* p_from, const char* p_variableName);
|
||||
|
|
|
@ -10,8 +10,8 @@
|
|||
class MxAtomId;
|
||||
class LegoEntity;
|
||||
|
||||
ExtraActionType MatchActionString(const char*);
|
||||
void InvokeAction(ExtraActionType p_actionId, MxAtomId& p_pAtom, int p_targetEntityId, LegoEntity* p_sender);
|
||||
Extra::ActionType MatchActionString(const char*);
|
||||
void InvokeAction(Extra::ActionType p_actionId, MxAtomId& p_pAtom, int p_targetEntityId, LegoEntity* p_sender);
|
||||
void ConvertHSVToRGB(float p_h, float p_s, float p_v, float* p_rOut, float* p_bOut, float* p_gOut);
|
||||
MxBool FUN_1003ee00(MxAtomId& p_atomId, MxS32 p_id);
|
||||
void FUN_1003ef00(MxBool);
|
||||
|
|
|
@ -58,6 +58,7 @@ class LegoWorld : public LegoEntity {
|
|||
void FUN_10073400();
|
||||
void FUN_10073430();
|
||||
MxS32 GetCurrPathInfo(LegoPathBoundary** p_path, MxS32& p_value);
|
||||
MxPresenter* FindPresenter(const char* p_presenter, const char* p_name);
|
||||
|
||||
protected:
|
||||
LegoPathControllerList m_list0x68; // 0x68
|
||||
|
|
|
@ -32,13 +32,13 @@ class MxTransitionManager : public MxCore {
|
|||
virtual MxResult GetDDrawSurfaceFromVideoManager(); // vtable+0x14
|
||||
|
||||
enum TransitionType {
|
||||
NOT_TRANSITIONING,
|
||||
NO_ANIMATION,
|
||||
DISSOLVE,
|
||||
PIXELATION,
|
||||
SCREEN_WIPE,
|
||||
WINDOWS,
|
||||
BROKEN // Unknown what this is supposed to be, it locks the game up
|
||||
e_notTransitioning = 0,
|
||||
e_noAnimation,
|
||||
e_dissolve,
|
||||
e_pixelation,
|
||||
e_screenWipe,
|
||||
e_windows,
|
||||
e_broken // Unknown what this is supposed to be, it locks the game up
|
||||
};
|
||||
|
||||
MxResult StartTransition(TransitionType p_animationType, MxS32 p_speed, MxBool p_doCopy, MxBool p_playMusicInAnim);
|
||||
|
|
|
@ -77,13 +77,13 @@ void MxBackgroundAudioManager::DestroyMusic()
|
|||
MxResult MxBackgroundAudioManager::Tickle()
|
||||
{
|
||||
switch (m_unk0x13c) {
|
||||
case MxPresenter::TickleState_Starting:
|
||||
case MxPresenter::e_starting:
|
||||
FadeInOrFadeOut();
|
||||
return SUCCESS;
|
||||
case MxPresenter::TickleState_Streaming:
|
||||
case MxPresenter::e_streaming:
|
||||
FUN_1007ee70();
|
||||
return SUCCESS;
|
||||
case MxPresenter::TickleState_Repeating:
|
||||
case MxPresenter::e_repeating:
|
||||
FUN_1007ef40();
|
||||
return SUCCESS;
|
||||
default:
|
||||
|
|
|
@ -100,7 +100,7 @@ MxU32 Helicopter::VTable0xcc()
|
|||
VTable0xe8(0x29, TRUE, 7);
|
||||
((Isle*) GetCurrentWorld())->SetUnknown13c(0x3c);
|
||||
FUN_10015820(1, 0);
|
||||
TransitionManager()->StartTransition(MxTransitionManager::PIXELATION, 50, FALSE, TRUE);
|
||||
TransitionManager()->StartTransition(MxTransitionManager::e_pixelation, 50, FALSE, TRUE);
|
||||
SetUnknownDC(4);
|
||||
PlayMusic(9);
|
||||
break;
|
||||
|
@ -112,7 +112,7 @@ MxU32 Helicopter::VTable0xcc()
|
|||
break;
|
||||
}
|
||||
VTable0xe0();
|
||||
InvokeAction(ExtraActionType_start, m_script, 0x15, NULL);
|
||||
InvokeAction(Extra::ActionType::e_start, m_script, 0x15, NULL);
|
||||
GetCurrentAction().SetObjectId(-1);
|
||||
ControlManager()->Register(this);
|
||||
return 1;
|
||||
|
@ -139,7 +139,7 @@ MxU32 Helicopter::VTable0xd4(MxType17NotificationParam& p_param)
|
|||
case 0x17:
|
||||
if (*g_act3Script == script) {
|
||||
((Act3*) GetCurrentWorld())->SetUnkown4270(2);
|
||||
TransitionManager()->StartTransition(MxTransitionManager::PIXELATION, 50, FALSE, FALSE);
|
||||
TransitionManager()->StartTransition(MxTransitionManager::e_pixelation, 50, FALSE, FALSE);
|
||||
}
|
||||
else if (m_state->GetUnkown8() != 0)
|
||||
break;
|
||||
|
@ -155,7 +155,7 @@ MxU32 Helicopter::VTable0xd4(MxType17NotificationParam& p_param)
|
|||
state->SetUnknown18(4);
|
||||
m_state->SetUnknown8(1);
|
||||
m_world->FUN_1001fc80(this);
|
||||
InvokeAction(ExtraActionType_start, script, 0x20, NULL);
|
||||
InvokeAction(Extra::ActionType::e_start, script, 0x20, NULL);
|
||||
SetUnknownDC(0);
|
||||
}
|
||||
ret = 1;
|
||||
|
@ -167,7 +167,7 @@ MxU32 Helicopter::VTable0xd4(MxType17NotificationParam& p_param)
|
|||
if (m_state->GetUnkown8() == 2) {
|
||||
m_state->SetUnknown8(3);
|
||||
m_world->FUN_1001fc80(this);
|
||||
InvokeAction(ExtraActionType_start, script, 0x21, NULL);
|
||||
InvokeAction(Extra::ActionType::e_start, script, 0x21, NULL);
|
||||
SetUnknownDC(4);
|
||||
}
|
||||
ret = 1;
|
||||
|
@ -203,7 +203,7 @@ MxU32 Helicopter::VTable0xd4(MxType17NotificationParam& p_param)
|
|||
case 0x1c:
|
||||
if (GameState()->GetUnknown10() == 0) {
|
||||
((Isle*) GetCurrentWorld())->SetUnknown13c(2);
|
||||
TransitionManager()->StartTransition(MxTransitionManager::PIXELATION, 50, FALSE, FALSE);
|
||||
TransitionManager()->StartTransition(MxTransitionManager::e_pixelation, 50, FALSE, FALSE);
|
||||
VTable0xe4();
|
||||
}
|
||||
ret = 1;
|
||||
|
|
|
@ -19,7 +19,7 @@ void LegoActionControlPresenter::ReadyTickle()
|
|||
|
||||
if (chunk) {
|
||||
ParseExtra();
|
||||
ProgressTickleState(TickleState_Starting);
|
||||
ProgressTickleState(e_starting);
|
||||
|
||||
m_subscriber->DestroyChunk(chunk);
|
||||
if (m_compositePresenter) {
|
||||
|
@ -40,13 +40,13 @@ void LegoActionControlPresenter::RepeatingTickle()
|
|||
|
||||
#ifdef COMPAT_MODE
|
||||
{
|
||||
MxAtomId atom(m_unk0x54.GetData(), LookupMode_LowerCase2);
|
||||
MxAtomId atom(m_unk0x54.GetData(), e_lowerCase2);
|
||||
InvokeAction(m_unk0x50, atom, m_unk0x64, NULL);
|
||||
}
|
||||
#else
|
||||
InvokeAction(m_unk0x50, MxAtomId(m_unk0x54.GetData(), LookupMode_LowerCase2), m_unk0x64, NULL);
|
||||
InvokeAction(m_unk0x50, MxAtomId(m_unk0x54.GetData(), e_lowerCase2), m_unk0x64, NULL);
|
||||
#endif
|
||||
ProgressTickleState(TickleState_Done);
|
||||
ProgressTickleState(e_done);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -92,11 +92,11 @@ void LegoActionControlPresenter::ParseExtra()
|
|||
char output[1024];
|
||||
if (KeyValueStringParse(output, g_strACTION, buf)) {
|
||||
m_unk0x50 = MatchActionString(strtok(output, g_parseExtraTokens));
|
||||
if (m_unk0x50 != ExtraActionType_exit) {
|
||||
if (m_unk0x50 != Extra::ActionType::e_exit) {
|
||||
MakeSourceName(buf, strtok(NULL, g_parseExtraTokens));
|
||||
m_unk0x54 = buf;
|
||||
m_unk0x54.ToLowerCase();
|
||||
if (m_unk0x50 != ExtraActionType_run) {
|
||||
if (m_unk0x50 != Extra::ActionType::e_run) {
|
||||
m_unk0x64 = atoi(strtok(NULL, g_parseExtraTokens));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -92,11 +92,18 @@ LegoGameState::~LegoGameState()
|
|||
delete[] m_savePath;
|
||||
}
|
||||
|
||||
// STUB: LEGO1 0x10039780
|
||||
void LegoGameState::FUN_10039780(MxU8)
|
||||
{
|
||||
// TODO
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x10039980
|
||||
MxResult LegoGameState::Save(MxULong p_slot)
|
||||
{
|
||||
MxResult result;
|
||||
InfocenterState* infocenterState = (InfocenterState*) GameState()->GetState("InfocenterState");
|
||||
|
||||
if (!infocenterState || infocenterState->GetInfocenterBufferElement(0) == 0)
|
||||
result = SUCCESS;
|
||||
else {
|
||||
|
@ -105,7 +112,7 @@ MxResult LegoGameState::Save(MxULong p_slot)
|
|||
MxString savePath;
|
||||
GetFileSavePath(&savePath, p_slot);
|
||||
LegoFileStream fileStream;
|
||||
if (fileStream.Open(savePath.GetData(), LegoStream::WriteBit) != FAILURE) {
|
||||
if (fileStream.Open(savePath.GetData(), LegoStream::c_writeBit) != FAILURE) {
|
||||
MxU32 maybeVersion = 0x1000C;
|
||||
fileStream.Write(&maybeVersion, 4);
|
||||
fileStream.Write(&m_unk0x24, 2);
|
||||
|
@ -216,7 +223,7 @@ void LegoGameState::HandleAction(MxU32 p_area)
|
|||
// TODO: implement other cases
|
||||
}
|
||||
|
||||
InvokeAction(ExtraActionType_opendisk, *script, 0, NULL);
|
||||
InvokeAction(Extra::ActionType::e_opendisk, *script, 0, NULL);
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1003bac0
|
||||
|
@ -310,7 +317,7 @@ void LegoGameState::SerializeScoreHistory(MxS16 p_flags)
|
|||
savePath += "\\";
|
||||
savePath += g_historyGSI;
|
||||
|
||||
if (p_flags == LegoStream::WriteBit) {
|
||||
if (p_flags == LegoStream::c_writeBit) {
|
||||
m_unk0xa6.WriteScoreHistory();
|
||||
}
|
||||
|
||||
|
|
|
@ -106,7 +106,7 @@
|
|||
// FUNCTION: LEGO1 0x10006e40
|
||||
LegoObjectFactory::LegoObjectFactory()
|
||||
{
|
||||
#define X(V) this->m_id##V = MxAtomId(#V, LookupMode_Exact);
|
||||
#define X(V) this->m_id##V = MxAtomId(#V, e_exact);
|
||||
FOR_LEGOOBJECTFACTORY_OBJECTS(X)
|
||||
#undef X
|
||||
}
|
||||
|
@ -114,7 +114,7 @@ LegoObjectFactory::LegoObjectFactory()
|
|||
// FUNCTION: LEGO1 0x10009a90
|
||||
MxCore* LegoObjectFactory::Create(const char* p_name)
|
||||
{
|
||||
MxAtomId atom(p_name, LookupMode_Exact);
|
||||
MxAtomId atom(p_name, e_exact);
|
||||
|
||||
#define X(V) \
|
||||
if (this->m_id##V == atom) { \
|
||||
|
|
|
@ -167,18 +167,18 @@ MxResult LegoFileStream::Open(const char* p_filename, OpenFlags p_mode)
|
|||
fclose(m_hFile);
|
||||
|
||||
modeString[0] = '\0';
|
||||
if (p_mode & ReadBit) {
|
||||
if (p_mode & c_readBit) {
|
||||
m_mode = LEGOSTREAM_MODE_READ;
|
||||
strcat(modeString, "r");
|
||||
}
|
||||
|
||||
if (p_mode & WriteBit) {
|
||||
if (p_mode & c_writeBit) {
|
||||
if (m_mode != LEGOSTREAM_MODE_READ)
|
||||
m_mode = LEGOSTREAM_MODE_WRITE;
|
||||
strcat(modeString, "w");
|
||||
}
|
||||
|
||||
if ((p_mode & 4) != 0)
|
||||
if ((p_mode & c_binaryBit) != 0)
|
||||
strcat(modeString, "b");
|
||||
else
|
||||
strcat(modeString, "t");
|
||||
|
|
|
@ -11,30 +11,30 @@
|
|||
#include <string.h>
|
||||
|
||||
// FUNCTION: LEGO1 0x1003e300
|
||||
ExtraActionType MatchActionString(const char* p_str)
|
||||
Extra::ActionType MatchActionString(const char* p_str)
|
||||
{
|
||||
ExtraActionType result = ExtraActionType_unknown;
|
||||
Extra::ActionType result = Extra::ActionType::e_unknown;
|
||||
|
||||
if (!strcmpi("openram", p_str))
|
||||
result = ExtraActionType_openram;
|
||||
result = Extra::ActionType::e_openram;
|
||||
else if (!strcmpi("opendisk", p_str))
|
||||
result = ExtraActionType_opendisk;
|
||||
result = Extra::ActionType::e_opendisk;
|
||||
else if (!strcmpi("close", p_str))
|
||||
result = ExtraActionType_close;
|
||||
result = Extra::ActionType::e_close;
|
||||
else if (!strcmpi("start", p_str))
|
||||
result = ExtraActionType_start;
|
||||
result = Extra::ActionType::e_start;
|
||||
else if (!strcmpi("stop", p_str))
|
||||
result = ExtraActionType_stop;
|
||||
result = Extra::ActionType::e_stop;
|
||||
else if (!strcmpi("run", p_str))
|
||||
result = ExtraActionType_run;
|
||||
result = Extra::ActionType::e_run;
|
||||
else if (!strcmpi("exit", p_str))
|
||||
result = ExtraActionType_exit;
|
||||
result = Extra::ActionType::e_exit;
|
||||
else if (!strcmpi("enable", p_str))
|
||||
result = ExtraActionType_enable;
|
||||
result = Extra::ActionType::e_enable;
|
||||
else if (!strcmpi("disable", p_str))
|
||||
result = ExtraActionType_disable;
|
||||
result = Extra::ActionType::e_disable;
|
||||
else if (!strcmpi("notify", p_str))
|
||||
result = ExtraActionType_notify;
|
||||
result = Extra::ActionType::e_notify;
|
||||
|
||||
return result;
|
||||
}
|
||||
|
@ -43,54 +43,54 @@ MxBool CheckIfEntityExists(MxBool p_enable, const char* p_filename, MxS32 p_enti
|
|||
void NotifyEntity(const char* p_filename, MxS32 p_entityId, LegoEntity* p_sender);
|
||||
|
||||
// FUNCTION: LEGO1 0x1003e430
|
||||
void InvokeAction(ExtraActionType p_actionId, MxAtomId& p_pAtom, int p_targetEntityId, LegoEntity* p_sender)
|
||||
void InvokeAction(Extra::ActionType p_actionId, MxAtomId& p_pAtom, int p_targetEntityId, LegoEntity* p_sender)
|
||||
{
|
||||
MxDSAction action;
|
||||
action.SetAtomId(p_pAtom);
|
||||
action.SetObjectId(p_targetEntityId);
|
||||
|
||||
switch (p_actionId) {
|
||||
case ExtraActionType_opendisk:
|
||||
case Extra::ActionType::e_opendisk:
|
||||
if (!CheckIfEntityExists(TRUE, p_pAtom.GetInternal(), p_targetEntityId)) {
|
||||
Streamer()->Open(p_pAtom.GetInternal(), MxStreamer::e_DiskStream);
|
||||
Streamer()->Open(p_pAtom.GetInternal(), MxStreamer::e_diskStream);
|
||||
Start(&action);
|
||||
}
|
||||
break;
|
||||
case ExtraActionType_openram:
|
||||
case Extra::ActionType::e_openram:
|
||||
if (!CheckIfEntityExists(TRUE, p_pAtom.GetInternal(), p_targetEntityId)) {
|
||||
Streamer()->Open(p_pAtom.GetInternal(), MxStreamer::e_RAMStream);
|
||||
Start(&action);
|
||||
}
|
||||
break;
|
||||
case ExtraActionType_close:
|
||||
case Extra::ActionType::e_close:
|
||||
action.SetUnknown24(-2);
|
||||
DeleteObject(action);
|
||||
Streamer()->Close(p_pAtom.GetInternal());
|
||||
break;
|
||||
case ExtraActionType_start:
|
||||
case Extra::ActionType::e_start:
|
||||
if (!CheckIfEntityExists(TRUE, p_pAtom.GetInternal(), p_targetEntityId)) {
|
||||
Start(&action);
|
||||
}
|
||||
break;
|
||||
case ExtraActionType_stop:
|
||||
case Extra::ActionType::e_stop:
|
||||
action.SetUnknown24(-2);
|
||||
if (!FUN_1003ee00(p_pAtom, p_targetEntityId)) {
|
||||
DeleteObject(action);
|
||||
}
|
||||
break;
|
||||
case ExtraActionType_run:
|
||||
case Extra::ActionType::e_run:
|
||||
_spawnl(0, "\\lego\\sources\\main\\main.exe", "\\lego\\sources\\main\\main.exe", "/script", &p_pAtom, 0);
|
||||
break;
|
||||
case ExtraActionType_exit:
|
||||
case Extra::ActionType::e_exit:
|
||||
Lego()->SetExit(TRUE);
|
||||
break;
|
||||
case ExtraActionType_enable:
|
||||
case Extra::ActionType::e_enable:
|
||||
CheckIfEntityExists(TRUE, p_pAtom.GetInternal(), p_targetEntityId);
|
||||
break;
|
||||
case ExtraActionType_disable:
|
||||
case Extra::ActionType::e_disable:
|
||||
CheckIfEntityExists(FALSE, p_pAtom.GetInternal(), p_targetEntityId);
|
||||
break;
|
||||
case ExtraActionType_notify:
|
||||
case Extra::ActionType::e_notify:
|
||||
NotifyEntity(p_pAtom.GetInternal(), p_targetEntityId, p_sender);
|
||||
break;
|
||||
}
|
||||
|
@ -99,8 +99,7 @@ void InvokeAction(ExtraActionType p_actionId, MxAtomId& p_pAtom, int p_targetEnt
|
|||
// FUNCTION: LEGO1 0x1003e670
|
||||
MxBool CheckIfEntityExists(MxBool p_enable, const char* p_filename, MxS32 p_entityId)
|
||||
{
|
||||
LegoWorld* world =
|
||||
(LegoWorld*) FindEntityByAtomIdOrEntityId(MxAtomId(p_filename, LookupMode_LowerCase2), p_entityId);
|
||||
LegoWorld* world = (LegoWorld*) FindEntityByAtomIdOrEntityId(MxAtomId(p_filename, e_lowerCase2), p_entityId);
|
||||
if (world) {
|
||||
world->VTable0x68(p_enable);
|
||||
return TRUE;
|
||||
|
|
|
@ -55,7 +55,7 @@ MxResult MxCompositeMediaPresenter::StartAction(MxStreamController* p_controller
|
|||
if (presenter && presenter->AddToManager() == SUCCESS) {
|
||||
presenter->SetCompositePresenter(this);
|
||||
if (presenter->StartAction(p_controller, action) == SUCCESS) {
|
||||
presenter->SetTickleState(TickleState_Idle);
|
||||
presenter->SetTickleState(e_idle);
|
||||
|
||||
if (presenter->IsA("MxVideoPresenter"))
|
||||
VideoManager()->UnregisterPresenter(*presenter);
|
||||
|
@ -75,7 +75,7 @@ MxResult MxCompositeMediaPresenter::StartAction(MxStreamController* p_controller
|
|||
}
|
||||
|
||||
if (!m_compositePresenter) {
|
||||
SetTickleState(TickleState_Ready);
|
||||
SetTickleState(e_ready);
|
||||
MxLong time = Timer()->GetTime();
|
||||
m_action->SetUnknown90(time);
|
||||
}
|
||||
|
@ -93,10 +93,10 @@ void MxCompositeMediaPresenter::StartingTickle()
|
|||
|
||||
if (!m_unk0x4e) {
|
||||
for (MxCompositePresenterList::iterator it = m_list.begin(); it != m_list.end(); it++) {
|
||||
if ((*it)->GetCurrentTickleState() < TickleState_Streaming) {
|
||||
if ((*it)->GetCurrentTickleState() < e_streaming) {
|
||||
(*it)->Tickle();
|
||||
|
||||
if ((*it)->GetCurrentTickleState() == TickleState_Streaming ||
|
||||
if ((*it)->GetCurrentTickleState() == e_streaming ||
|
||||
((*it)->GetAction() && (*it)->GetAction()->GetStartTime()))
|
||||
m_unk0x4c++;
|
||||
}
|
||||
|
@ -115,15 +115,15 @@ void MxCompositeMediaPresenter::StartingTickle()
|
|||
else {
|
||||
for (MxCompositePresenterList::iterator it = m_list.begin(); it != m_list.end(); it++) {
|
||||
if (!(*it)->GetAction()->GetStartTime() && ((MxMediaPresenter*) *it)->CurrentChunk() &&
|
||||
!((*it)->GetAction()->GetFlags() & MxDSAction::Flag_Bit9)) {
|
||||
!((*it)->GetAction()->GetFlags() & MxDSAction::c_bit9)) {
|
||||
(*it)->Tickle();
|
||||
(*it)->GetAction()->SetFlags((*it)->GetAction()->GetFlags() | MxDSAction::Flag_Bit9);
|
||||
(*it)->GetAction()->SetFlags((*it)->GetAction()->GetFlags() | MxDSAction::c_bit9);
|
||||
m_unk0x4c--;
|
||||
}
|
||||
}
|
||||
|
||||
if (!m_unk0x4c) {
|
||||
ProgressTickleState(TickleState_Streaming);
|
||||
ProgressTickleState(e_streaming);
|
||||
MxLong time = Timer()->GetTime();
|
||||
m_action->SetUnknown90(time);
|
||||
}
|
||||
|
@ -136,15 +136,15 @@ MxResult MxCompositeMediaPresenter::Tickle()
|
|||
MxAutoLocker lock(&m_criticalSection);
|
||||
|
||||
switch (m_currentTickleState) {
|
||||
case TickleState_Ready:
|
||||
ProgressTickleState(TickleState_Starting);
|
||||
case TickleState_Starting:
|
||||
case e_ready:
|
||||
ProgressTickleState(e_starting);
|
||||
case e_starting:
|
||||
StartingTickle();
|
||||
break;
|
||||
case TickleState_Streaming:
|
||||
case TickleState_Repeating:
|
||||
case TickleState_unk5:
|
||||
case TickleState_Done: {
|
||||
case e_streaming:
|
||||
case e_repeating:
|
||||
case e_unk5:
|
||||
case e_done: {
|
||||
for (MxCompositePresenterList::iterator it = m_list.begin(); it != m_list.end(); it++)
|
||||
(*it)->Tickle();
|
||||
break;
|
||||
|
@ -161,7 +161,7 @@ MxResult MxCompositeMediaPresenter::PutData()
|
|||
{
|
||||
MxAutoLocker lock(&m_criticalSection);
|
||||
|
||||
if (m_currentTickleState >= TickleState_Streaming && m_currentTickleState <= TickleState_Done) {
|
||||
if (m_currentTickleState >= e_streaming && m_currentTickleState <= e_done) {
|
||||
for (MxCompositePresenterList::iterator it = m_list.begin(); it != m_list.end(); it++)
|
||||
(*it)->PutData();
|
||||
}
|
||||
|
|
|
@ -30,6 +30,11 @@ void LegoControlManager::Unregister(MxCore* p_listener)
|
|||
// TODO
|
||||
}
|
||||
|
||||
// STUB: LEGO1 0x100293c0
|
||||
void LegoControlManager::FUN_100293c0(undefined4, const MxAtomId&, undefined2)
|
||||
{
|
||||
}
|
||||
|
||||
// STUB: LEGO1 0x10029600
|
||||
MxResult LegoControlManager::Tickle()
|
||||
{
|
||||
|
|
|
@ -53,7 +53,7 @@ MxResult MxControlPresenter::StartAction(MxStreamController* p_controller, MxDSA
|
|||
{
|
||||
MxResult result = MxCompositePresenter::StartAction(p_controller, p_action);
|
||||
|
||||
FUN_100b7220(m_action, MxDSAction::Flag_World | MxDSAction::Flag_Looping, TRUE);
|
||||
FUN_100b7220(m_action, MxDSAction::c_world | MxDSAction::c_looping, TRUE);
|
||||
ParseExtra();
|
||||
|
||||
MxS16 i = 0;
|
||||
|
@ -64,7 +64,7 @@ MxResult MxControlPresenter::StartAction(MxStreamController* p_controller, MxDSA
|
|||
|
||||
if (m_unk0x4c == 3) {
|
||||
MxDSAction* action = (*m_list.begin())->GetAction();
|
||||
action->SetFlags(action->GetFlags() | MxDSAction::Flag_Bit11);
|
||||
action->SetFlags(action->GetFlags() | MxDSAction::c_bit11);
|
||||
}
|
||||
|
||||
TickleManager()->RegisterClient(this, 200);
|
||||
|
@ -106,7 +106,7 @@ void MxControlPresenter::ReadyTickle()
|
|||
{
|
||||
MxPresenter::ParseExtra();
|
||||
TickleManager()->UnregisterClient(this);
|
||||
ProgressTickleState(TickleState_Repeating);
|
||||
ProgressTickleState(e_repeating);
|
||||
}
|
||||
|
||||
// STUB: LEGO1 0x10044640
|
||||
|
|
|
@ -12,7 +12,7 @@ void LegoActorPresenter::ReadyTickle()
|
|||
SetEntityLocation(m_action->GetLocation(), m_action->GetDirection(), m_action->GetUp());
|
||||
m_entity->Create(*m_action);
|
||||
}
|
||||
ProgressTickleState(TickleState_Starting);
|
||||
ProgressTickleState(e_starting);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -20,7 +20,7 @@ void LegoActorPresenter::ReadyTickle()
|
|||
void LegoActorPresenter::StartingTickle()
|
||||
{
|
||||
if (m_entity->GetROI()) {
|
||||
ProgressTickleState(TickleState_Streaming);
|
||||
ProgressTickleState(e_streaming);
|
||||
ParseExtra();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -20,7 +20,7 @@ void LegoEntity::Init()
|
|||
m_actionArgString = NULL;
|
||||
m_unk0x10 = 0;
|
||||
m_flags = 0;
|
||||
m_actionType = ExtraActionType_unknown;
|
||||
m_actionType = Extra::ActionType::e_unknown;
|
||||
m_actionArgNumber = -1;
|
||||
m_unk0x59 = 4;
|
||||
}
|
||||
|
@ -50,7 +50,7 @@ MxResult LegoEntity::Create(MxDSAction& p_dsAction)
|
|||
void LegoEntity::Destroy(MxBool p_fromDestructor)
|
||||
{
|
||||
if (m_roi) {
|
||||
if (m_flags & Flag_Bit1) {
|
||||
if (m_flags & c_bit1) {
|
||||
if (m_roi->GetUnknown0x104() == this)
|
||||
m_roi->SetUnknown0x104(NULL);
|
||||
|
||||
|
@ -108,13 +108,13 @@ void LegoEntity::ParseAction(char* p_extra)
|
|||
if (KeyValueStringParse(actionValue, g_strACTION, copy)) {
|
||||
m_actionType = MatchActionString(strtok(actionValue, g_parseExtraTokens));
|
||||
|
||||
if (m_actionType != ExtraActionType_exit) {
|
||||
if (m_actionType != Extra::ActionType::e_exit) {
|
||||
char* token = strtok(NULL, g_parseExtraTokens);
|
||||
|
||||
m_actionArgString = new char[strlen(token) + 1];
|
||||
strcpy(m_actionArgString, token);
|
||||
|
||||
if (m_actionType != ExtraActionType_run) {
|
||||
if (m_actionType != Extra::ActionType::e_run) {
|
||||
m_actionArgNumber = atoi(strtok(NULL, g_parseExtraTokens));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -69,7 +69,7 @@ void LegoEntityPresenter::ReadyTickle()
|
|||
m_entity->SetLocation(m_action->GetLocation(), m_action->GetDirection(), m_action->GetUp(), TRUE);
|
||||
ParseExtra();
|
||||
}
|
||||
ProgressTickleState(TickleState_Starting);
|
||||
ProgressTickleState(e_starting);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -62,7 +62,7 @@ MxResult LegoWorld::Create(MxDSAction& p_dsAction)
|
|||
if (!VTable0x54())
|
||||
return FAILURE;
|
||||
|
||||
if (p_dsAction.GetFlags() & MxDSAction::Flag_Enabled) {
|
||||
if (p_dsAction.GetFlags() & MxDSAction::c_enabled) {
|
||||
if (GetCurrentWorld()) {
|
||||
GetCurrentWorld()->VTable0x68(0);
|
||||
}
|
||||
|
@ -151,6 +151,12 @@ void LegoWorld::EndAction(MxCore* p_object)
|
|||
{
|
||||
}
|
||||
|
||||
// STUB: LEGO1 0x100213a0
|
||||
MxPresenter* LegoWorld::FindPresenter(const char* p_presenter, const char* p_name)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
// STUB: LEGO1 0x10021a70
|
||||
void LegoWorld::VTable0x68(MxBool p_add)
|
||||
{
|
||||
|
|
|
@ -91,7 +91,7 @@ MxResult LegoWorldPresenter::StartAction(MxStreamController* p_controller, MxDSA
|
|||
if (presenter && presenter->AddToManager() == SUCCESS) {
|
||||
presenter->SetCompositePresenter(this);
|
||||
if (presenter->StartAction(p_controller, action) == SUCCESS) {
|
||||
presenter->SetTickleState(TickleState_Idle);
|
||||
presenter->SetTickleState(e_idle);
|
||||
success = TRUE;
|
||||
}
|
||||
}
|
||||
|
@ -123,7 +123,7 @@ void LegoWorldPresenter::ReadyTickle()
|
|||
}
|
||||
|
||||
ParseExtra();
|
||||
ProgressTickleState(TickleState_Starting);
|
||||
ProgressTickleState(e_starting);
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x10066ac0
|
||||
|
@ -131,19 +131,19 @@ void LegoWorldPresenter::StartingTickle()
|
|||
{
|
||||
if (m_action->IsA("MxDSSerialAction")) {
|
||||
MxPresenter* presenter = *m_list.begin();
|
||||
if (presenter->GetCurrentTickleState() == TickleState_Idle) {
|
||||
presenter->SetTickleState(TickleState_Ready);
|
||||
if (presenter->GetCurrentTickleState() == e_idle) {
|
||||
presenter->SetTickleState(e_ready);
|
||||
}
|
||||
}
|
||||
else {
|
||||
for (MxCompositePresenterList::iterator it = m_list.begin(); it != m_list.end(); it++) {
|
||||
if ((*it)->GetCurrentTickleState() == TickleState_Idle) {
|
||||
(*it)->SetTickleState(TickleState_Ready);
|
||||
if ((*it)->GetCurrentTickleState() == e_idle) {
|
||||
(*it)->SetTickleState(e_ready);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ProgressTickleState(TickleState_Streaming);
|
||||
ProgressTickleState(e_streaming);
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x10067a70
|
||||
|
@ -152,7 +152,7 @@ void LegoWorldPresenter::VTable0x60(MxPresenter* p_presenter)
|
|||
MxCompositePresenter::VTable0x60(p_presenter);
|
||||
MxDSAction* action = p_presenter->GetAction();
|
||||
|
||||
if (action->GetDuration() != -1 && (action->GetFlags() & MxDSAction::Flag_Looping) == 0) {
|
||||
if (action->GetDuration() != -1 && (action->GetFlags() & MxDSAction::c_looping) == 0) {
|
||||
if (!action->IsA("MxDSMediaAction")) {
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -1,9 +1,49 @@
|
|||
#include "infocenter.h"
|
||||
|
||||
// STUB: LEGO1 0x1006ea20
|
||||
#include "infocenterstate.h"
|
||||
#include "legocontrolmanager.h"
|
||||
#include "legogamestate.h"
|
||||
#include "legoinputmanager.h"
|
||||
#include "legoomni.h"
|
||||
#include "legoutil.h"
|
||||
#include "legovideomanager.h"
|
||||
#include "mxactionnotificationparam.h"
|
||||
#include "mxbackgroundaudiomanager.h"
|
||||
#include "mxnotificationmanager.h"
|
||||
#include "mxstillpresenter.h"
|
||||
#include "mxtransitionmanager.h"
|
||||
|
||||
DECOMP_SIZE_ASSERT(Infocenter, 0x1d8)
|
||||
DECOMP_SIZE_ASSERT(InfocenterUnkDataEntry, 0x18)
|
||||
|
||||
// GLOBAL: LEGO1 0x100f76a0
|
||||
const char* g_object2x4red = "2x4red";
|
||||
|
||||
// GLOBAL: LEGO1 0x100f76a4
|
||||
const char* g_object2x4grn = "2x4grn";
|
||||
|
||||
// FUNCTION: LEGO1 0x1006ea20
|
||||
Infocenter::Infocenter()
|
||||
{
|
||||
// TODO
|
||||
m_unk0xfc = 0;
|
||||
m_unk0x11c = 0;
|
||||
m_infocenterState = NULL;
|
||||
m_unk0x1cc = 0;
|
||||
m_unk0x11c = 0;
|
||||
m_unk0x104 = 0;
|
||||
m_currentInfomainScript = c_noInfomain;
|
||||
m_currentIntroScript = e_noIntro;
|
||||
|
||||
memset(&m_entries, 0, sizeof(InfocenterUnkDataEntry) * 7);
|
||||
|
||||
m_unk0x1c8 = -1;
|
||||
SetAppCursor(1);
|
||||
NotificationManager()->Register(this);
|
||||
|
||||
m_unk0x1d0 = 0;
|
||||
m_unk0x1d2 = 0;
|
||||
m_unk0x1d4 = 0;
|
||||
m_unk0x1d6 = 0;
|
||||
}
|
||||
|
||||
// STUB: LEGO1 0x1006ec90
|
||||
|
@ -15,33 +55,421 @@ Infocenter::~Infocenter()
|
|||
// STUB: LEGO1 0x1006ed90
|
||||
MxResult Infocenter::Create(MxDSAction& p_dsAction)
|
||||
{
|
||||
return FAILURE;
|
||||
if (LegoWorld::Create(p_dsAction) == SUCCESS) {
|
||||
InputManager()->SetWorld(this);
|
||||
ControlManager()->Register(this);
|
||||
}
|
||||
|
||||
// STUB: LEGO1 0x1006ef10
|
||||
LegoGameState* gs = GameState();
|
||||
m_infocenterState = (InfocenterState*) gs->GetState("InfocenterState");
|
||||
if (!m_infocenterState) {
|
||||
m_infocenterState = (InfocenterState*) gs->CreateState("InfocenterState");
|
||||
m_infocenterState->SetUnknown0x74(3);
|
||||
}
|
||||
else {
|
||||
// TODO
|
||||
}
|
||||
|
||||
// TODO
|
||||
InputManager()->Register(this);
|
||||
SetIsWorldActive(FALSE);
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1006ef10
|
||||
MxLong Infocenter::Notify(MxParam& p_param)
|
||||
{
|
||||
// TODO
|
||||
return 0;
|
||||
MxLong result = 0;
|
||||
LegoWorld::Notify(p_param);
|
||||
|
||||
if (m_worldStarted) {
|
||||
switch (((MxNotificationParam&) p_param).GetNotification()) {
|
||||
case c_notificationType0:
|
||||
result = HandleNotification0(p_param);
|
||||
break;
|
||||
case c_notificationEndAction:
|
||||
result = HandleEndAction(p_param);
|
||||
break;
|
||||
case c_notificationKeyPress:
|
||||
result = HandleKeyPress(((LegoEventNotificationParam&) p_param).GetKey());
|
||||
break;
|
||||
case c_notificationButtonUp:
|
||||
result = HandleButtonUp(
|
||||
((LegoEventNotificationParam&) p_param).GetX(),
|
||||
((LegoEventNotificationParam&) p_param).GetY()
|
||||
);
|
||||
break;
|
||||
case c_notificationMouseMove:
|
||||
result = HandleMouseMove(
|
||||
((LegoEventNotificationParam&) p_param).GetX(),
|
||||
((LegoEventNotificationParam&) p_param).GetY()
|
||||
);
|
||||
break;
|
||||
case c_notificationType17:
|
||||
result = HandleNotification17(p_param);
|
||||
break;
|
||||
case c_notificationTransitioned:
|
||||
StopBookAnimation();
|
||||
m_unk0x1d2 = 0;
|
||||
|
||||
if (m_infocenterState->GetUnknown0x74() == 0xc) {
|
||||
StartCredits();
|
||||
m_infocenterState->SetUnknown0x74(0xd);
|
||||
}
|
||||
else if (m_unk0x104 != 0) {
|
||||
BackgroundAudioManager()->RaiseVolume();
|
||||
GameState()->HandleAction(m_unk0x104);
|
||||
m_unk0x104 = 0;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1006f080
|
||||
MxLong Infocenter::HandleEndAction(MxParam& p_param)
|
||||
{
|
||||
MxDSAction* action = ((MxEndActionNotificationParam&) p_param).GetAction();
|
||||
if (action->GetAtomId() == *g_creditsScript && action->GetObjectId() == 499) {
|
||||
Lego()->CloseMainWindow();
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (action->GetAtomId() == m_atom &&
|
||||
(action->GetObjectId() == 40 || action->GetObjectId() == 41 || action->GetObjectId() == 42 ||
|
||||
action->GetObjectId() == 43 || action->GetObjectId() == 44)) {
|
||||
if (m_unk0x1d4) {
|
||||
m_unk0x1d4--;
|
||||
}
|
||||
|
||||
if (!m_unk0x1d4) {
|
||||
PlayMusic(11);
|
||||
GameState()->FUN_10039780(m_unk0xfc);
|
||||
|
||||
switch (m_unk0xfc) {
|
||||
case 1:
|
||||
PlayDialogue(c_pepperCharacterSelect);
|
||||
break;
|
||||
case 2:
|
||||
PlayDialogue(c_mamaCharacterSelect);
|
||||
break;
|
||||
case 3:
|
||||
PlayDialogue(c_papaCharacterSelect);
|
||||
break;
|
||||
case 4:
|
||||
PlayDialogue(c_officierCharacterSelect);
|
||||
break;
|
||||
case 5:
|
||||
PlayDialogue(c_loraCharacterSelect);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
FUN_10070dc0(TRUE);
|
||||
}
|
||||
}
|
||||
|
||||
MxLong result = m_radio.Notify(p_param);
|
||||
|
||||
if (result || (action->GetAtomId() != m_atom && action->GetAtomId() != *g_introScript))
|
||||
return result;
|
||||
|
||||
if (action->GetObjectId() == c_returnBack) {
|
||||
ControlManager()->FUN_100293c0(0x10, action->GetAtomId(), 0);
|
||||
m_unk0x1d6 = 0;
|
||||
}
|
||||
|
||||
switch (m_infocenterState->GetUnknown0x74()) {
|
||||
case 0:
|
||||
switch (m_currentIntroScript) {
|
||||
case e_legoMovie:
|
||||
PlayCutscene(e_mindscapeMovie, FALSE);
|
||||
return 1;
|
||||
case e_mindscapeMovie:
|
||||
PlayCutscene(e_introMovie, TRUE);
|
||||
return 1;
|
||||
case e_badEndMovie:
|
||||
StopCutscene();
|
||||
m_infocenterState->SetUnknown0x74(11);
|
||||
PlayDialogue(c_badEndingDialogue);
|
||||
m_currentIntroScript = e_noIntro;
|
||||
return 1;
|
||||
case e_goodEndMovie:
|
||||
StopCutscene();
|
||||
m_infocenterState->SetUnknown0x74(11);
|
||||
PlayDialogue(c_goodEndingDialogue);
|
||||
m_currentIntroScript = e_noIntro;
|
||||
return 1;
|
||||
}
|
||||
|
||||
// default / 2nd case probably?
|
||||
StopCutscene();
|
||||
m_infocenterState->SetUnknown0x74(11);
|
||||
PlayDialogue(c_welcomeDialogue);
|
||||
m_currentIntroScript = e_noIntro;
|
||||
|
||||
if (m_infocenterState->GetInfocenterBufferElement(0) == 0) {
|
||||
m_unk0x1d2 = 1;
|
||||
return 1;
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
m_infocenterState->SetUnknown0x74(11);
|
||||
|
||||
switch (m_currentIntroScript) {
|
||||
case e_badEndMovie:
|
||||
PlayDialogue(c_badEndingDialogue);
|
||||
break;
|
||||
case e_goodEndMovie:
|
||||
PlayDialogue(c_goodEndingDialogue);
|
||||
break;
|
||||
default:
|
||||
PlayDialogue(c_welcomeDialogue);
|
||||
}
|
||||
|
||||
m_currentIntroScript = e_noIntro;
|
||||
return 1;
|
||||
case 2:
|
||||
FUN_10015860(g_object2x4red, 0);
|
||||
FUN_10015860(g_object2x4grn, 0);
|
||||
BackgroundAudioManager()->RaiseVolume();
|
||||
return 1;
|
||||
case 4:
|
||||
if (action->GetObjectId() == 70 || action->GetObjectId() == 71) {
|
||||
TransitionManager()->StartTransition(MxTransitionManager::e_pixelation, 50, FALSE, FALSE);
|
||||
m_infocenterState->SetUnknown0x74(14);
|
||||
return 1;
|
||||
}
|
||||
break;
|
||||
case 5:
|
||||
if (action->GetObjectId() == m_currentInfomainScript) {
|
||||
if (GameState()->GetUnknown10() != 2 && m_unk0xfc != 0) {
|
||||
GameState()->FUN_10039780(m_unk0xfc);
|
||||
}
|
||||
TransitionManager()->StartTransition(MxTransitionManager::e_pixelation, 50, FALSE, FALSE);
|
||||
m_infocenterState->SetUnknown0x74(14);
|
||||
return 1;
|
||||
}
|
||||
break;
|
||||
case 11:
|
||||
if (m_infocenterState->GetInfocenterBufferElement(0) == 0 && m_currentInfomainScript != 40 &&
|
||||
m_currentInfomainScript != 41 && m_currentInfomainScript != 42 && m_currentInfomainScript != 43 &&
|
||||
m_currentInfomainScript != 44) {
|
||||
m_unk0x1d0 = 1;
|
||||
PlayMusic(11);
|
||||
}
|
||||
|
||||
m_infocenterState->SetUnknown0x74(2);
|
||||
FUN_10015860("infoman", 1);
|
||||
return 1;
|
||||
case 12:
|
||||
if (action->GetObjectId() == m_currentInfomainScript) {
|
||||
TransitionManager()->StartTransition(MxTransitionManager::e_pixelation, 50, FALSE, FALSE);
|
||||
}
|
||||
}
|
||||
|
||||
result = 1;
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
// STUB: LEGO1 0x1006f4e0
|
||||
void Infocenter::VTable0x50()
|
||||
{
|
||||
// TODO
|
||||
m_unk0x1d0 = 0;
|
||||
m_unk0x1d2 = 0;
|
||||
m_unk0x1d4 = 0;
|
||||
m_unk0x1d6 = 0;
|
||||
|
||||
MxStillPresenter* bg = (MxStillPresenter*) FindPresenter("MxStillPresenter", "Background_Bitmap");
|
||||
MxStillPresenter* bgRed = (MxStillPresenter*) FindPresenter("MxStillPresenter", "BackgroundRed_Bitmap");
|
||||
|
||||
switch (GameState()->GetUnknown10()) {
|
||||
case 0:
|
||||
// bg->Enable(1); // TODO: Uncomment once LegoWorld::FindPresenter and LegoWorld::VTable0x58 are implemented.
|
||||
InitializeBitmaps();
|
||||
switch (m_infocenterState->GetUnknown0x74()) {
|
||||
case 3:
|
||||
PlayCutscene(e_legoMovie, TRUE);
|
||||
m_infocenterState->SetUnknown0x74(0);
|
||||
return;
|
||||
case 4:
|
||||
m_infocenterState->SetUnknown0x74(2);
|
||||
if (m_infocenterState->GetInfocenterBufferElement(0) == 0) {
|
||||
m_unk0x1d2 = 1;
|
||||
}
|
||||
|
||||
// STUB: LEGO1 0x10070aa0
|
||||
PlayDialogue(c_letsGetStarted);
|
||||
PlayMusic(11);
|
||||
FUN_10015820(0, 7);
|
||||
return;
|
||||
default:
|
||||
PlayMusic(11);
|
||||
// TODO
|
||||
break;
|
||||
case 8:
|
||||
PlayMusic(11);
|
||||
PlayDialogue(c_exitConfirmation);
|
||||
FUN_10015820(0, 7);
|
||||
return;
|
||||
case 0xf:
|
||||
if (m_infocenterState->GetInfocenterBufferElement(0) == 0) {
|
||||
m_unk0x1d2 = 1;
|
||||
}
|
||||
|
||||
PlayDialogue(c_randomDialogue1);
|
||||
PlayMusic(11);
|
||||
FUN_10015820(0, 7);
|
||||
return;
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
// TODO
|
||||
break;
|
||||
case 2:
|
||||
// TODO
|
||||
break;
|
||||
default:
|
||||
m_infocenterState->SetUnknown0x74(11);
|
||||
FUN_10015820(0, 7);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// STUB: LEGO1 0x1006f9a0
|
||||
void Infocenter::InitializeBitmaps()
|
||||
{
|
||||
// TODO: Infocenter class size is wrong
|
||||
}
|
||||
|
||||
// STUB: LEGO1 0x1006fd00
|
||||
MxU8 Infocenter::HandleMouseMove(MxS32 p_x, MxS32 p_y)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1006fda0
|
||||
MxLong Infocenter::HandleKeyPress(MxS8 p_key)
|
||||
{
|
||||
MxLong result = 0;
|
||||
|
||||
if (p_key == ' ' && m_worldStarted) {
|
||||
switch (m_infocenterState->GetUnknown0x74()) {
|
||||
case 0:
|
||||
StopCutscene();
|
||||
m_infocenterState->SetUnknown0x74(1);
|
||||
|
||||
if (m_infocenterState->GetInfocenterBufferElement(0) == 0) {
|
||||
m_unk0x1d2 = 1;
|
||||
return 1;
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
case 4:
|
||||
break;
|
||||
default: {
|
||||
InfomainScript script = m_currentInfomainScript;
|
||||
StopCurrentDialogue();
|
||||
|
||||
switch (m_infocenterState->GetUnknown0x74()) {
|
||||
case 5:
|
||||
case 12:
|
||||
m_currentInfomainScript = script;
|
||||
return 1;
|
||||
default:
|
||||
m_infocenterState->SetUnknown0x74(2);
|
||||
return 1;
|
||||
case 8:
|
||||
case 11:
|
||||
break;
|
||||
}
|
||||
}
|
||||
case 13:
|
||||
StopCredits();
|
||||
break;
|
||||
}
|
||||
|
||||
result = 1;
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
// STUB: LEGO1 0x1006feb0
|
||||
MxU8 Infocenter::HandleButtonUp(MxS32 p_x, MxS32 p_y)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
// STUB: LEGO1 0x10070370
|
||||
MxU8 Infocenter::HandleNotification17(MxParam&)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
// STUB: LEGO1 0x10070870
|
||||
MxLong Infocenter::HandleNotification0(MxParam&)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x10070aa0
|
||||
void Infocenter::VTable0x68(MxBool p_add)
|
||||
{
|
||||
// TODO
|
||||
LegoWorld::VTable0x68(p_add);
|
||||
|
||||
if (p_add) {
|
||||
InputManager()->SetWorld(this);
|
||||
SetIsWorldActive(FALSE);
|
||||
}
|
||||
else {
|
||||
if (InputManager()->GetWorld() == this) {
|
||||
InputManager()->ClearWorld();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// STUB: LEGO1 0x10070af0
|
||||
MxResult Infocenter::Tickle()
|
||||
{
|
||||
// TODO
|
||||
return 0;
|
||||
return LegoWorld::Tickle();
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x10070c20
|
||||
void Infocenter::PlayCutscene(IntroScript p_entityId, MxBool p_scale)
|
||||
{
|
||||
m_currentIntroScript = p_entityId;
|
||||
|
||||
VideoManager()->EnableFullScreenMovie(TRUE, p_scale);
|
||||
InputManager()->SetUnknown336(TRUE);
|
||||
InputManager()->SetUnknown335(TRUE);
|
||||
SetAppCursor(0xb); // Hide cursor
|
||||
VideoManager()->GetDisplaySurface()->ClearScreen();
|
||||
|
||||
if (m_currentIntroScript != e_noIntro) {
|
||||
// check if the cutscene is not an ending
|
||||
if (m_currentIntroScript >= e_badEndMovie && m_currentIntroScript <= e_goodEndMovie) {
|
||||
FUN_10070e90();
|
||||
}
|
||||
InvokeAction(Extra::ActionType::e_opendisk, *g_introScript, m_currentIntroScript, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x10070cb0
|
||||
void Infocenter::StopCutscene()
|
||||
{
|
||||
if (m_currentIntroScript != e_noIntro) {
|
||||
InvokeAction(Extra::ActionType::e_close, *g_introScript, m_currentIntroScript, NULL);
|
||||
}
|
||||
|
||||
VideoManager()->EnableFullScreenMovie(FALSE);
|
||||
InputManager()->SetUnknown335(FALSE);
|
||||
SetAppCursor(0); // Restore cursor to arrow
|
||||
FUN_10015820(0, 7);
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x10070d00
|
||||
|
@ -50,8 +478,79 @@ MxBool Infocenter::VTable0x5c()
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
// STUB: LEGO1 0x10070dc0
|
||||
void Infocenter::FUN_10070dc0(MxBool)
|
||||
{
|
||||
}
|
||||
|
||||
// STUB: LEGO1 0x10070e90
|
||||
void Infocenter::FUN_10070e90()
|
||||
{
|
||||
}
|
||||
|
||||
// STUB: LEGO1 0x10070f60
|
||||
MxBool Infocenter::VTable0x64()
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
// STUB: LEGO1 0x10071030
|
||||
void Infocenter::StartCredits()
|
||||
{
|
||||
// TODO
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x10071250
|
||||
void Infocenter::StopCredits()
|
||||
{
|
||||
MxDSAction action;
|
||||
action.SetObjectId(499);
|
||||
action.SetAtomId(*g_creditsScript);
|
||||
action.SetUnknown24(-2);
|
||||
DeleteObject(action);
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x10071300
|
||||
void Infocenter::PlayDialogue(InfomainScript p_objectId)
|
||||
{
|
||||
MxDSAction action;
|
||||
action.SetObjectId(p_objectId);
|
||||
action.SetAtomId(*g_infomainScript);
|
||||
StopCurrentDialogue();
|
||||
|
||||
m_currentInfomainScript = p_objectId;
|
||||
BackgroundAudioManager()->LowerVolume();
|
||||
Start(&action);
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100713d0
|
||||
void Infocenter::StopCurrentDialogue()
|
||||
{
|
||||
if (m_currentInfomainScript != c_noInfomain) {
|
||||
MxDSAction action;
|
||||
action.SetObjectId(m_currentInfomainScript);
|
||||
action.SetAtomId(*g_infomainScript);
|
||||
action.SetUnknown24(-2);
|
||||
DeleteObject(action);
|
||||
m_currentInfomainScript = c_noInfomain;
|
||||
}
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100714a0
|
||||
void Infocenter::PlayBookAnimation()
|
||||
{
|
||||
MxDSAction action;
|
||||
action.SetObjectId(c_bookWig);
|
||||
action.SetAtomId(*g_sndAnimScript);
|
||||
Start(&action);
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x10071550
|
||||
void Infocenter::StopBookAnimation()
|
||||
{
|
||||
MxDSAction action;
|
||||
action.SetObjectId(c_bookWig);
|
||||
action.SetAtomId(*g_sndAnimScript);
|
||||
action.SetUnknown24(-2);
|
||||
DeleteObject(action);
|
||||
}
|
||||
|
|
|
@ -6,6 +6,7 @@ DECOMP_SIZE_ASSERT(InfocenterState, 0x94);
|
|||
InfocenterState::InfocenterState()
|
||||
{
|
||||
// TODO
|
||||
memset(m_buffer, 0, sizeof(m_buffer));
|
||||
}
|
||||
|
||||
// STUB: LEGO1 0x10071920
|
||||
|
|
|
@ -90,10 +90,10 @@ MxLong Score::Notify(MxParam& p_param)
|
|||
DeleteScript(); // Shutting down
|
||||
ret = 1;
|
||||
break;
|
||||
case TYPE17:
|
||||
case c_notificationType17:
|
||||
ret = FUN_100016d0((MxType17NotificationParam&) p_param);
|
||||
break;
|
||||
case MXTRANSITIONMANAGER_TRANSITIONENDED:
|
||||
case c_notificationTransitioned:
|
||||
DeleteObjects(g_infoscorScript, 7, 9);
|
||||
if (m_unk0xf8)
|
||||
GameState()->HandleAction(m_unk0xf8);
|
||||
|
@ -116,7 +116,7 @@ MxLong Score::FUN_10001510(MxEndActionNotificationParam& p_param)
|
|||
switch (action->GetObjectId()) {
|
||||
case 10:
|
||||
m_unk0xf8 = 0x38;
|
||||
TransitionManager()->StartTransition(MxTransitionManager::PIXELATION, 0x32, 0, 0);
|
||||
TransitionManager()->StartTransition(MxTransitionManager::e_pixelation, 0x32, 0, 0);
|
||||
break;
|
||||
case 0x1f5:
|
||||
PlayMusic(11);
|
||||
|
@ -160,12 +160,12 @@ MxLong Score::FUN_100016d0(MxType17NotificationParam& p_param)
|
|||
case 1:
|
||||
m_unk0xf8 = 2;
|
||||
DeleteScript();
|
||||
TransitionManager()->StartTransition(MxTransitionManager::PIXELATION, 0x32, 0, 0);
|
||||
TransitionManager()->StartTransition(MxTransitionManager::e_pixelation, 0x32, 0, 0);
|
||||
break;
|
||||
case 2:
|
||||
m_unk0xf8 = 3;
|
||||
DeleteScript();
|
||||
TransitionManager()->StartTransition(MxTransitionManager::PIXELATION, 0x32, 0, 0);
|
||||
TransitionManager()->StartTransition(MxTransitionManager::e_pixelation, 0x32, 0, 0);
|
||||
break;
|
||||
case 3: {
|
||||
LegoInputManager* im = InputManager();
|
||||
|
|
|
@ -115,10 +115,10 @@ MxLong Isle::Notify(MxParam& p_param)
|
|||
break;
|
||||
}
|
||||
break;
|
||||
case TYPE17:
|
||||
case c_notificationType17:
|
||||
result = HandleType17Notification(p_param);
|
||||
break;
|
||||
case TYPE18:
|
||||
case c_notificationType18:
|
||||
switch (m_act1state->GetUnknown18()) {
|
||||
case 4:
|
||||
result = GetCurrentVehicle()->Notify(p_param);
|
||||
|
@ -131,13 +131,13 @@ MxLong Isle::Notify(MxParam& p_param)
|
|||
break;
|
||||
}
|
||||
break;
|
||||
case TYPE19:
|
||||
case c_notificationType19:
|
||||
result = HandleType19Notification(p_param);
|
||||
break;
|
||||
case TYPE20:
|
||||
case c_notificationType20:
|
||||
VTable0x68(TRUE);
|
||||
break;
|
||||
case MXTRANSITIONMANAGER_TRANSITIONENDED:
|
||||
case c_notificationTransitioned:
|
||||
result = HandleTransitionEnd();
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -212,6 +212,12 @@ void FUN_10015820(MxU32, MxU32)
|
|||
// TODO
|
||||
}
|
||||
|
||||
// STUB: LEGO1 0x10015860
|
||||
void FUN_10015860(const char*, MxU8)
|
||||
{
|
||||
// TODO
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100158c0
|
||||
LegoEntity* FindEntityByAtomIdOrEntityId(const MxAtomId& p_atom, MxS32 p_entityid)
|
||||
{
|
||||
|
@ -293,34 +299,34 @@ LegoEntity* PickEntity(MxLong, MxLong)
|
|||
// FUNCTION: LEGO1 0x100528e0
|
||||
void RegisterScripts()
|
||||
{
|
||||
g_copterScript = new MxAtomId("\\lego\\scripts\\build\\copter", LookupMode_LowerCase2);
|
||||
g_dunecarScript = new MxAtomId("\\lego\\scripts\\build\\dunecar", LookupMode_LowerCase2);
|
||||
g_jetskiScript = new MxAtomId("\\lego\\scripts\\build\\jetski", LookupMode_LowerCase2);
|
||||
g_racecarScript = new MxAtomId("\\lego\\scripts\\build\\racecar", LookupMode_LowerCase2);
|
||||
g_carraceScript = new MxAtomId("\\lego\\scripts\\race\\carrace", LookupMode_LowerCase2);
|
||||
g_carracerScript = new MxAtomId("\\lego\\scripts\\race\\carracer", LookupMode_LowerCase2);
|
||||
g_jetraceScript = new MxAtomId("\\lego\\scripts\\race\\jetrace", LookupMode_LowerCase2);
|
||||
g_jetracerScript = new MxAtomId("\\lego\\scripts\\race\\jetracer", LookupMode_LowerCase2);
|
||||
g_isleScript = new MxAtomId("\\lego\\scripts\\isle\\isle", LookupMode_LowerCase2);
|
||||
g_elevbottScript = new MxAtomId("\\lego\\scripts\\infocntr\\elevbott", LookupMode_LowerCase2);
|
||||
g_infodoorScript = new MxAtomId("\\lego\\scripts\\infocntr\\infodoor", LookupMode_LowerCase2);
|
||||
g_infomainScript = new MxAtomId("\\lego\\scripts\\infocntr\\infomain", LookupMode_LowerCase2);
|
||||
g_infoscorScript = new MxAtomId("\\lego\\scripts\\infocntr\\infoscor", LookupMode_LowerCase2);
|
||||
g_regbookScript = new MxAtomId("\\lego\\scripts\\infocntr\\regbook", LookupMode_LowerCase2);
|
||||
g_histbookScript = new MxAtomId("\\lego\\scripts\\infocntr\\histbook", LookupMode_LowerCase2);
|
||||
g_hospitalScript = new MxAtomId("\\lego\\scripts\\hospital\\hospital", LookupMode_LowerCase2);
|
||||
g_policeScript = new MxAtomId("\\lego\\scripts\\police\\police", LookupMode_LowerCase2);
|
||||
g_garageScript = new MxAtomId("\\lego\\scripts\\garage\\garage", LookupMode_LowerCase2);
|
||||
g_act2mainScript = new MxAtomId("\\lego\\scripts\\act2\\act2main", LookupMode_LowerCase2);
|
||||
g_act3Script = new MxAtomId("\\lego\\scripts\\act3\\act3", LookupMode_LowerCase2);
|
||||
g_jukeboxScript = new MxAtomId("\\lego\\scripts\\isle\\jukebox", LookupMode_LowerCase2);
|
||||
g_pz5Script = new MxAtomId("\\lego\\scripts\\isle\\pz5", LookupMode_LowerCase2);
|
||||
g_introScript = new MxAtomId("\\lego\\scripts\\intro", LookupMode_LowerCase2);
|
||||
g_testScript = new MxAtomId("\\lego\\scripts\\test\\test", LookupMode_LowerCase2);
|
||||
g_jukeboxwScript = new MxAtomId("\\lego\\scripts\\isle\\jukeboxw", LookupMode_LowerCase2);
|
||||
g_sndAnimScript = new MxAtomId("\\lego\\scripts\\sndanim", LookupMode_LowerCase2);
|
||||
g_creditsScript = new MxAtomId("\\lego\\scripts\\credits", LookupMode_LowerCase2);
|
||||
g_nocdSourceName = new MxAtomId("\\lego\\scripts\\nocd", LookupMode_LowerCase2);
|
||||
g_copterScript = new MxAtomId("\\lego\\scripts\\build\\copter", e_lowerCase2);
|
||||
g_dunecarScript = new MxAtomId("\\lego\\scripts\\build\\dunecar", e_lowerCase2);
|
||||
g_jetskiScript = new MxAtomId("\\lego\\scripts\\build\\jetski", e_lowerCase2);
|
||||
g_racecarScript = new MxAtomId("\\lego\\scripts\\build\\racecar", e_lowerCase2);
|
||||
g_carraceScript = new MxAtomId("\\lego\\scripts\\race\\carrace", e_lowerCase2);
|
||||
g_carracerScript = new MxAtomId("\\lego\\scripts\\race\\carracer", e_lowerCase2);
|
||||
g_jetraceScript = new MxAtomId("\\lego\\scripts\\race\\jetrace", e_lowerCase2);
|
||||
g_jetracerScript = new MxAtomId("\\lego\\scripts\\race\\jetracer", e_lowerCase2);
|
||||
g_isleScript = new MxAtomId("\\lego\\scripts\\isle\\isle", e_lowerCase2);
|
||||
g_elevbottScript = new MxAtomId("\\lego\\scripts\\infocntr\\elevbott", e_lowerCase2);
|
||||
g_infodoorScript = new MxAtomId("\\lego\\scripts\\infocntr\\infodoor", e_lowerCase2);
|
||||
g_infomainScript = new MxAtomId("\\lego\\scripts\\infocntr\\infomain", e_lowerCase2);
|
||||
g_infoscorScript = new MxAtomId("\\lego\\scripts\\infocntr\\infoscor", e_lowerCase2);
|
||||
g_regbookScript = new MxAtomId("\\lego\\scripts\\infocntr\\regbook", e_lowerCase2);
|
||||
g_histbookScript = new MxAtomId("\\lego\\scripts\\infocntr\\histbook", e_lowerCase2);
|
||||
g_hospitalScript = new MxAtomId("\\lego\\scripts\\hospital\\hospital", e_lowerCase2);
|
||||
g_policeScript = new MxAtomId("\\lego\\scripts\\police\\police", e_lowerCase2);
|
||||
g_garageScript = new MxAtomId("\\lego\\scripts\\garage\\garage", e_lowerCase2);
|
||||
g_act2mainScript = new MxAtomId("\\lego\\scripts\\act2\\act2main", e_lowerCase2);
|
||||
g_act3Script = new MxAtomId("\\lego\\scripts\\act3\\act3", e_lowerCase2);
|
||||
g_jukeboxScript = new MxAtomId("\\lego\\scripts\\isle\\jukebox", e_lowerCase2);
|
||||
g_pz5Script = new MxAtomId("\\lego\\scripts\\isle\\pz5", e_lowerCase2);
|
||||
g_introScript = new MxAtomId("\\lego\\scripts\\intro", e_lowerCase2);
|
||||
g_testScript = new MxAtomId("\\lego\\scripts\\test\\test", e_lowerCase2);
|
||||
g_jukeboxwScript = new MxAtomId("\\lego\\scripts\\isle\\jukeboxw", e_lowerCase2);
|
||||
g_sndAnimScript = new MxAtomId("\\lego\\scripts\\sndanim", e_lowerCase2);
|
||||
g_creditsScript = new MxAtomId("\\lego\\scripts\\credits", e_lowerCase2);
|
||||
g_nocdSourceName = new MxAtomId("\\lego\\scripts\\nocd", e_lowerCase2);
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100530c0
|
||||
|
@ -633,7 +639,7 @@ MxEntity* LegoOmni::FindWorld(const char* p_id, MxS32 p_entityId, MxPresenter* p
|
|||
{
|
||||
LegoWorld* foundEntity = NULL;
|
||||
if (strcmpi(p_id, g_current)) {
|
||||
foundEntity = (LegoWorld*) FindByEntityIdOrAtomId(MxAtomId(p_id, LookupMode_LowerCase2), p_entityId);
|
||||
foundEntity = (LegoWorld*) FindByEntityIdOrAtomId(MxAtomId(p_id, e_lowerCase2), p_entityId);
|
||||
}
|
||||
else {
|
||||
foundEntity = this->m_currentWorld;
|
||||
|
@ -704,7 +710,7 @@ MxLong LegoOmni::Notify(MxParam& p_param)
|
|||
MxLong result = MxOmni::Notify(p_param);
|
||||
if (isCD) {
|
||||
// Exit the game if nocd.si ended
|
||||
PostMessageA(m_windowHandle, WM_CLOSE, 0, 0);
|
||||
CloseMainWindow();
|
||||
}
|
||||
|
||||
return result;
|
||||
|
|
|
@ -61,7 +61,7 @@ void LegoPathPresenter::Destroy()
|
|||
void LegoPathPresenter::ReadyTickle()
|
||||
{
|
||||
// TODO
|
||||
ProgressTickleState(TickleState_Starting); // Allow initialization process to continue
|
||||
ProgressTickleState(e_starting); // Allow initialization process to continue
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x10044d00
|
||||
|
@ -70,8 +70,8 @@ void LegoPathPresenter::StreamingTickle()
|
|||
MxStreamChunk* chunk = m_subscriber->NextChunk();
|
||||
|
||||
if (chunk) {
|
||||
if (chunk->GetFlags() & MxStreamChunk::Flag_End) {
|
||||
ProgressTickleState(TickleState_Repeating);
|
||||
if (chunk->GetFlags() & MxStreamChunk::c_end) {
|
||||
ProgressTickleState(e_repeating);
|
||||
}
|
||||
|
||||
m_subscriber->DestroyChunk(chunk);
|
||||
|
|
|
@ -114,7 +114,7 @@ void LegoAnimPresenter::ReadyTickle()
|
|||
m_subscriber->DestroyChunk(chunk);
|
||||
|
||||
if (result == SUCCESS) {
|
||||
ProgressTickleState(TickleState_Starting);
|
||||
ProgressTickleState(e_starting);
|
||||
ParseExtra();
|
||||
}
|
||||
else {
|
||||
|
@ -128,7 +128,7 @@ void LegoAnimPresenter::ReadyTickle()
|
|||
void LegoAnimPresenter::StartingTickle()
|
||||
{
|
||||
// TODO
|
||||
ProgressTickleState(TickleState_Streaming);
|
||||
ProgressTickleState(e_streaming);
|
||||
EndAction(); // Allow game to start
|
||||
}
|
||||
|
||||
|
@ -146,7 +146,7 @@ void LegoAnimPresenter::StreamingTickle()
|
|||
}
|
||||
}
|
||||
else {
|
||||
ProgressTickleState(TickleState_Done);
|
||||
ProgressTickleState(e_done);
|
||||
if (m_compositePresenter) {
|
||||
if (m_compositePresenter->IsA("LegoAnimMMPresenter")) {
|
||||
m_compositePresenter->VTable0x60(this);
|
||||
|
|
|
@ -41,7 +41,7 @@ LegoMeterPresenter::LegoMeterPresenter()
|
|||
m_unk0x6c = 0;
|
||||
m_unk0x84 = 0;
|
||||
m_type = 1;
|
||||
m_flags &= ~Flag_Bit2;
|
||||
m_flags &= ~c_bit2;
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x10043780
|
||||
|
|
|
@ -31,7 +31,7 @@ void LegoModelPresenter::Destroy(MxBool p_fromDestructor)
|
|||
void LegoModelPresenter::ReadyTickle()
|
||||
{
|
||||
// TODO
|
||||
SetTickleState(TickleState_Starting);
|
||||
SetTickleState(e_starting);
|
||||
}
|
||||
|
||||
// STUB: LEGO1 0x100801b0
|
||||
|
|
|
@ -77,7 +77,7 @@ void LegoPalettePresenter::ReadyTickle()
|
|||
if (chunk) {
|
||||
if (chunk->GetTime() <= m_action->GetElapsedTime()) {
|
||||
ParseExtra();
|
||||
ProgressTickleState(TickleState_Starting);
|
||||
ProgressTickleState(e_starting);
|
||||
|
||||
chunk = m_subscriber->NextChunk();
|
||||
MxResult result = ParsePalette(chunk);
|
||||
|
|
|
@ -28,7 +28,7 @@ MxResult LegoTexturePresenter::PutData()
|
|||
void LegoTexturePresenter::DoneTickle()
|
||||
{
|
||||
if (this->m_compositePresenter && !this->m_compositePresenter->VTable0x64(2)) {
|
||||
SetTickleState(TickleState_Idle);
|
||||
SetTickleState(e_idle);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -230,7 +230,7 @@ void LegoVideoManager::MoveCursor(MxS32 p_cursorX, MxS32 p_cursorY)
|
|||
MxResult LegoVideoManager::Tickle()
|
||||
{
|
||||
if (m_unk0x554 && !m_videoParam.Flags().GetFlipSurfaces() &&
|
||||
TransitionManager()->GetTransitionType() == MxTransitionManager::NOT_TRANSITIONING)
|
||||
TransitionManager()->GetTransitionType() == MxTransitionManager::e_notTransitioning)
|
||||
Sleep(30);
|
||||
|
||||
m_stopWatch->Stop();
|
||||
|
@ -369,7 +369,7 @@ void LegoVideoManager::EnableFullScreenMovie(MxBool p_enable, MxBool p_scale)
|
|||
m_fullScreenMovie = TRUE;
|
||||
}
|
||||
else {
|
||||
m_displaySurface->FUN_100ba640();
|
||||
m_displaySurface->ClearScreen();
|
||||
m_displaySurface->GetVideoParam().Flags().SetF1bit3(FALSE);
|
||||
|
||||
// restore previous pallete
|
||||
|
@ -462,7 +462,7 @@ MxResult LegoVideoManager::ConfigureD3DRM()
|
|||
|
||||
MxAssignedDevice* assignedDevice = m_direct3d->GetAssignedDevice();
|
||||
|
||||
if (assignedDevice && assignedDevice->GetFlags() & MxAssignedDevice::Flag_HardwareMode) {
|
||||
if (assignedDevice && assignedDevice->GetFlags() & MxAssignedDevice::c_hardwareMode) {
|
||||
if (assignedDevice->GetDesc().dpcTriCaps.dwTextureFilterCaps & D3DPTFILTERCAPS_LINEAR)
|
||||
d3drm->SetTextureQuality(D3DRMTEXTURE_LINEAR);
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@ RECT g_fullScreenRect = {0, 0, 640, 480};
|
|||
MxTransitionManager::MxTransitionManager()
|
||||
{
|
||||
m_animationTimer = 0;
|
||||
m_transitionType = NOT_TRANSITIONING;
|
||||
m_transitionType = e_notTransitioning;
|
||||
m_ddSurface = NULL;
|
||||
m_waitIndicator = NULL;
|
||||
m_copyBuffer = NULL;
|
||||
|
@ -57,22 +57,22 @@ MxResult MxTransitionManager::Tickle()
|
|||
this->m_systemTime = timeGetTime();
|
||||
|
||||
switch (this->m_transitionType) {
|
||||
case NO_ANIMATION:
|
||||
case e_noAnimation:
|
||||
TransitionNone();
|
||||
break;
|
||||
case DISSOLVE:
|
||||
case e_dissolve:
|
||||
TransitionDissolve();
|
||||
break;
|
||||
case PIXELATION:
|
||||
case e_pixelation:
|
||||
TransitionPixelation();
|
||||
break;
|
||||
case SCREEN_WIPE:
|
||||
case e_screenWipe:
|
||||
TransitionWipe();
|
||||
break;
|
||||
case WINDOWS:
|
||||
case e_windows:
|
||||
TransitionWindows();
|
||||
break;
|
||||
case BROKEN:
|
||||
case e_broken:
|
||||
TransitionBroken();
|
||||
break;
|
||||
}
|
||||
|
@ -87,7 +87,7 @@ MxResult MxTransitionManager::StartTransition(
|
|||
MxBool p_playMusicInAnim
|
||||
)
|
||||
{
|
||||
if (this->m_transitionType == NOT_TRANSITIONING) {
|
||||
if (this->m_transitionType == e_notTransitioning) {
|
||||
if (!p_playMusicInAnim) {
|
||||
MxBackgroundAudioManager* backgroundAudioManager = BackgroundAudioManager();
|
||||
backgroundAudioManager->Stop();
|
||||
|
@ -102,7 +102,7 @@ MxResult MxTransitionManager::StartTransition(
|
|||
|
||||
MxDSAction* action = m_waitIndicator->GetAction();
|
||||
action->SetLoopCount(10000);
|
||||
action->SetFlags(action->GetFlags() | MxDSAction::Flag_Bit10);
|
||||
action->SetFlags(action->GetFlags() | MxDSAction::c_bit10);
|
||||
}
|
||||
|
||||
MxU32 time = timeGetTime();
|
||||
|
@ -129,8 +129,8 @@ MxResult MxTransitionManager::StartTransition(
|
|||
// FUNCTION: LEGO1 0x1004bc30
|
||||
void MxTransitionManager::EndTransition(MxBool p_notifyWorld)
|
||||
{
|
||||
if (m_transitionType != NOT_TRANSITIONING) {
|
||||
m_transitionType = NOT_TRANSITIONING;
|
||||
if (m_transitionType != e_notTransitioning) {
|
||||
m_transitionType = e_notTransitioning;
|
||||
|
||||
m_copyFlags.m_bit0 = FALSE;
|
||||
|
||||
|
@ -142,11 +142,11 @@ void MxTransitionManager::EndTransition(MxBool p_notifyWorld)
|
|||
if (world) {
|
||||
#ifdef COMPAT_MODE
|
||||
{
|
||||
MxNotificationParam param(MXTRANSITIONMANAGER_TRANSITIONENDED, this);
|
||||
MxNotificationParam param(c_notificationTransitioned, this);
|
||||
world->Notify(param);
|
||||
}
|
||||
#else
|
||||
world->Notify(MxNotificationParam(MXTRANSITIONMANAGER_TRANSITIONENDED, this));
|
||||
world->Notify(MxNotificationParam(c_notificationTransitioned, this));
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
@ -157,7 +157,7 @@ void MxTransitionManager::EndTransition(MxBool p_notifyWorld)
|
|||
void MxTransitionManager::TransitionNone()
|
||||
{
|
||||
LegoVideoManager* videoManager = VideoManager();
|
||||
videoManager->GetDisplaySurface()->FUN_100ba640();
|
||||
videoManager->GetDisplaySurface()->ClearScreen();
|
||||
EndTransition(TRUE);
|
||||
}
|
||||
|
||||
|
@ -475,7 +475,7 @@ void MxTransitionManager::SetWaitIndicator(MxVideoPresenter* p_waitIndicator)
|
|||
{
|
||||
// End current wait indicator
|
||||
if (m_waitIndicator != NULL) {
|
||||
m_waitIndicator->GetAction()->SetFlags(m_waitIndicator->GetAction()->GetFlags() & ~MxDSAction::Flag_World);
|
||||
m_waitIndicator->GetAction()->SetFlags(m_waitIndicator->GetAction()->GetFlags() & ~MxDSAction::c_world);
|
||||
m_waitIndicator->EndAction();
|
||||
m_waitIndicator = NULL;
|
||||
}
|
||||
|
@ -488,7 +488,7 @@ void MxTransitionManager::SetWaitIndicator(MxVideoPresenter* p_waitIndicator)
|
|||
LegoVideoManager* videoManager = VideoManager();
|
||||
videoManager->UnregisterPresenter(*m_waitIndicator);
|
||||
|
||||
if (m_waitIndicator->GetCurrentTickleState() < MxPresenter::TickleState_Streaming) {
|
||||
if (m_waitIndicator->GetCurrentTickleState() < MxPresenter::e_streaming) {
|
||||
m_waitIndicator->Tickle();
|
||||
}
|
||||
}
|
||||
|
@ -542,7 +542,7 @@ void MxTransitionManager::SetupCopyRect(LPDDSURFACEDESC p_ddsc)
|
|||
m_waitIndicator->Tickle();
|
||||
|
||||
// Check if wait indicator has started
|
||||
if (m_waitIndicator->GetCurrentTickleState() >= MxPresenter::TickleState_Streaming) {
|
||||
if (m_waitIndicator->GetCurrentTickleState() >= MxPresenter::e_streaming) {
|
||||
// Setup the copy rect
|
||||
MxU32 copyPitch = (p_ddsc->ddpfPixelFormat.dwRGBBitCount / 8) *
|
||||
(m_copyRect.right - m_copyRect.left + 1); // This uses m_copyRect, seemingly erroneously
|
||||
|
@ -576,7 +576,7 @@ void MxTransitionManager::SetupCopyRect(LPDDSURFACEDESC p_ddsc)
|
|||
}
|
||||
|
||||
// Setup display surface
|
||||
if ((m_waitIndicator->GetAction()->GetFlags() & MxDSAction::Flag_Bit5) != 0) {
|
||||
if ((m_waitIndicator->GetAction()->GetFlags() & MxDSAction::c_bit5) != 0) {
|
||||
MxDisplaySurface* displaySurface = VideoManager()->GetDisplaySurface();
|
||||
MxBool und = FALSE;
|
||||
displaySurface->VTable0x2c(
|
||||
|
|
|
@ -113,7 +113,7 @@ BOOL MxDirect3D::CreateIDirect3D()
|
|||
// FUNCTION: LEGO1 0x1009b310
|
||||
BOOL MxDirect3D::D3DSetMode()
|
||||
{
|
||||
if (m_assignedDevice->m_flags & MxAssignedDevice::Flag_HardwareMode) {
|
||||
if (m_assignedDevice->m_flags & MxAssignedDevice::c_hardwareMode) {
|
||||
if (m_bOnlySoftRender) {
|
||||
Error("Failed to place vital surfaces in video memory for hardware driver", DDERR_GENERIC);
|
||||
return FALSE;
|
||||
|
@ -265,7 +265,7 @@ BOOL MxDirect3D::SetDevice(MxDeviceEnumerate& p_deviceEnumerate, MxDriver* p_dri
|
|||
);
|
||||
|
||||
if (i == 0)
|
||||
assignedDevice->m_flags |= MxAssignedDevice::Flag_PrimaryDevice;
|
||||
assignedDevice->m_flags |= MxAssignedDevice::c_primaryDevice;
|
||||
|
||||
for (list<MxDevice>::iterator it2 = driver.m_devices.begin(); it2 != driver.m_devices.end(); it2++) {
|
||||
MxDevice& device = *it2;
|
||||
|
@ -276,7 +276,7 @@ BOOL MxDirect3D::SetDevice(MxDeviceEnumerate& p_deviceEnumerate, MxDriver* p_dri
|
|||
|
||||
D3DDEVICEDESC* desc;
|
||||
if (device.m_HWDesc.dcmColorModel) {
|
||||
assignedDevice->m_flags |= MxAssignedDevice::Flag_HardwareMode;
|
||||
assignedDevice->m_flags |= MxAssignedDevice::c_hardwareMode;
|
||||
desc = &device.m_HWDesc;
|
||||
}
|
||||
else
|
||||
|
|
|
@ -13,8 +13,8 @@ class MxDirect3D;
|
|||
class MxAssignedDevice {
|
||||
public:
|
||||
enum {
|
||||
Flag_HardwareMode = 0x01,
|
||||
Flag_PrimaryDevice = 0x02
|
||||
c_hardwareMode = 0x01,
|
||||
c_primaryDevice = 0x02
|
||||
};
|
||||
|
||||
MxAssignedDevice();
|
||||
|
|
|
@ -104,7 +104,7 @@ class MxEndActionNotificationParam : public MxActionNotificationParam {
|
|||
class MxType4NotificationParam : public MxActionNotificationParam {
|
||||
public:
|
||||
inline MxType4NotificationParam(MxCore* p_sender, MxDSAction* p_action, MxPresenter* p_unk0x14)
|
||||
: MxActionNotificationParam(TYPE4, p_sender, p_action, FALSE)
|
||||
: MxActionNotificationParam(c_notificationType4, p_sender, p_action, FALSE)
|
||||
{
|
||||
m_unk0x14 = p_unk0x14;
|
||||
}
|
||||
|
|
|
@ -5,10 +5,10 @@
|
|||
#include "mxtypes.h"
|
||||
|
||||
enum LookupMode {
|
||||
LookupMode_Exact = 0,
|
||||
LookupMode_LowerCase = 1,
|
||||
LookupMode_UpperCase = 2,
|
||||
LookupMode_LowerCase2 = 3
|
||||
e_exact = 0,
|
||||
e_lowerCase,
|
||||
e_upperCase,
|
||||
e_lowerCase2,
|
||||
};
|
||||
|
||||
// SIZE 0x04
|
||||
|
|
|
@ -85,7 +85,7 @@ class MxDisplaySurface : public MxCore {
|
|||
virtual void ReleaseDC(HDC p_hdc); // vtable+0x40
|
||||
virtual LPDIRECTDRAWSURFACE VTable0x44(MxBitmap*, undefined4*, undefined4, undefined4); // vtable+0x44
|
||||
|
||||
void FUN_100ba640();
|
||||
void ClearScreen();
|
||||
static LPDIRECTDRAWSURFACE FUN_100bc070();
|
||||
|
||||
inline LPDIRECTDRAWSURFACE GetDirectDrawSurface1() { return this->m_ddSurface1; }
|
||||
|
|
|
@ -12,16 +12,16 @@ class MxOmni;
|
|||
class MxDSAction : public MxDSObject {
|
||||
public:
|
||||
enum {
|
||||
Flag_Looping = 0x01,
|
||||
Flag_Bit3 = 0x04,
|
||||
Flag_Bit4 = 0x08,
|
||||
Flag_Bit5 = 0x10,
|
||||
Flag_Enabled = 0x20,
|
||||
Flag_Bit7 = 0x40,
|
||||
Flag_World = 0x80,
|
||||
Flag_Bit9 = 0x100,
|
||||
Flag_Bit10 = 0x200,
|
||||
Flag_Bit11 = 0x400,
|
||||
c_looping = 0x01,
|
||||
c_bit3 = 0x04,
|
||||
c_bit4 = 0x08,
|
||||
c_bit5 = 0x10,
|
||||
c_enabled = 0x20,
|
||||
c_bit7 = 0x40,
|
||||
c_world = 0x80,
|
||||
c_bit9 = 0x100,
|
||||
c_bit10 = 0x200,
|
||||
c_bit11 = 0x400,
|
||||
};
|
||||
|
||||
__declspec(dllexport) MxDSAction();
|
||||
|
@ -72,15 +72,15 @@ class MxDSAction : public MxDSObject {
|
|||
inline MxCore* GetOrigin() { return m_origin; }
|
||||
inline void SetOrigin(MxCore* p_origin) { m_origin = p_origin; }
|
||||
|
||||
inline MxBool IsLooping() const { return m_flags & Flag_Looping; }
|
||||
inline MxBool IsBit3() const { return m_flags & Flag_Bit3; }
|
||||
inline MxBool IsLooping() const { return m_flags & c_looping; }
|
||||
inline MxBool IsBit3() const { return m_flags & c_bit3; }
|
||||
|
||||
inline void CopyFlags(MxU32 p_flags)
|
||||
{
|
||||
if (p_flags & MxDSAction::Flag_Looping)
|
||||
SetFlags(GetFlags() | MxDSAction::Flag_Looping);
|
||||
else if (p_flags & MxDSAction::Flag_Bit3)
|
||||
SetFlags(GetFlags() | MxDSAction::Flag_Bit3);
|
||||
if (p_flags & MxDSAction::c_looping)
|
||||
SetFlags(GetFlags() | MxDSAction::c_looping);
|
||||
else if (p_flags & MxDSAction::c_bit3)
|
||||
SetFlags(GetFlags() | MxDSAction::c_bit3);
|
||||
}
|
||||
|
||||
protected:
|
||||
|
|
|
@ -10,17 +10,17 @@ class MxDSStreamingAction;
|
|||
class MxStreamChunk;
|
||||
class MxDSChunk;
|
||||
|
||||
enum MxDSBufferType {
|
||||
MxDSBufferType_Chunk = 0,
|
||||
MxDSBufferType_Allocate = 1,
|
||||
MxDSBufferType_Preallocated = 2,
|
||||
MxDSBufferType_Unknown = 3,
|
||||
};
|
||||
|
||||
// VTABLE: LEGO1 0x100dcca0
|
||||
// SIZE 0x34
|
||||
class MxDSBuffer : public MxCore {
|
||||
public:
|
||||
enum Type {
|
||||
e_chunk = 0,
|
||||
e_allocate = 1,
|
||||
e_preallocated = 2,
|
||||
e_unknown = 3,
|
||||
};
|
||||
|
||||
MxDSBuffer();
|
||||
virtual ~MxDSBuffer() override;
|
||||
|
||||
|
@ -31,7 +31,7 @@ class MxDSBuffer : public MxCore {
|
|||
return "MxDSBuffer";
|
||||
}
|
||||
|
||||
MxResult AllocateBuffer(MxU32 p_bufferSize, MxDSBufferType p_mode);
|
||||
MxResult AllocateBuffer(MxU32 p_bufferSize, Type p_mode);
|
||||
MxResult SetBufferPointer(MxU8* p_buffer, MxU32 p_size);
|
||||
MxResult FUN_100c67b0(
|
||||
MxStreamController* p_controller,
|
||||
|
@ -67,12 +67,12 @@ class MxDSBuffer : public MxCore {
|
|||
inline MxU8** GetBufferRef() { return &m_pBuffer; }
|
||||
inline undefined4 GetUnknown14() { return m_unk0x14; }
|
||||
inline MxU16 GetRefCount() { return m_refcount; }
|
||||
inline MxDSBufferType GetMode() { return m_mode; }
|
||||
inline Type GetMode() { return m_mode; }
|
||||
inline MxU32 GetWriteOffset() { return m_writeOffset; }
|
||||
inline MxU32 GetBytesRemaining() { return m_bytesRemaining; }
|
||||
inline void SetUnknown14(undefined4 p_unk0x14) { m_unk0x14 = p_unk0x14; }
|
||||
inline void SetUnknown1c(undefined4 p_unk0x1c) { m_unk0x1c = p_unk0x1c; }
|
||||
inline void SetMode(MxDSBufferType p_mode) { m_mode = p_mode; }
|
||||
inline void SetMode(Type p_mode) { m_mode = p_mode; }
|
||||
inline void SetUnk30(MxDSStreamingAction* p_unk0x30) { m_unk0x30 = p_unk0x30; }
|
||||
|
||||
private:
|
||||
|
@ -83,7 +83,7 @@ class MxDSBuffer : public MxCore {
|
|||
undefined4 m_unk0x18; // 0x18
|
||||
undefined4 m_unk0x1c; // 0x1c
|
||||
MxU16 m_refcount; // 0x20
|
||||
MxDSBufferType m_mode; // 0x24
|
||||
Type m_mode; // 0x24
|
||||
MxU32 m_writeOffset; // 0x28
|
||||
MxU32 m_bytesRemaining; // 0x2c
|
||||
MxDSStreamingAction* m_unk0x30; // 0x30
|
||||
|
|
|
@ -10,11 +10,11 @@
|
|||
class MxDSChunk : public MxCore {
|
||||
public:
|
||||
enum {
|
||||
Flag_Bit1 = 0x01,
|
||||
Flag_End = 0x02,
|
||||
Flag_Bit3 = 0x04,
|
||||
Flag_Split = 0x10,
|
||||
Flag_Bit16 = 0x8000
|
||||
c_bit1 = 0x01,
|
||||
c_end = 0x02,
|
||||
c_bit3 = 0x04,
|
||||
c_split = 0x10,
|
||||
c_bit16 = 0x8000
|
||||
};
|
||||
|
||||
MxDSChunk();
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
#include "decomp.h"
|
||||
#include "mxatomid.h"
|
||||
#include "mxcore.h"
|
||||
#include "mxdstypes.h"
|
||||
|
||||
class MxPresenter;
|
||||
|
||||
|
@ -12,6 +11,21 @@ class MxPresenter;
|
|||
// SIZE 0x2c
|
||||
class MxDSObject : public MxCore {
|
||||
public:
|
||||
enum Type {
|
||||
e_object = 0,
|
||||
e_action,
|
||||
e_mediaAction,
|
||||
e_anim,
|
||||
e_sound,
|
||||
e_multiAction,
|
||||
e_serialAction,
|
||||
e_parallelAction,
|
||||
e_event,
|
||||
e_selectAction,
|
||||
e_still,
|
||||
e_objectAction,
|
||||
};
|
||||
|
||||
MxDSObject();
|
||||
virtual ~MxDSObject() override;
|
||||
|
||||
|
@ -35,14 +49,14 @@ class MxDSObject : public MxCore {
|
|||
virtual void Deserialize(MxU8** p_source, MxS16 p_unk0x24); // vtable+1c;
|
||||
inline virtual void SetAtomId(MxAtomId p_atomId) { this->m_atomId = p_atomId; } // vtable+20;
|
||||
|
||||
inline MxDSType GetType() const { return (MxDSType) this->m_type; }
|
||||
inline Type GetType() const { return (Type) this->m_type; }
|
||||
inline const char* GetSourceName() const { return this->m_sourceName; }
|
||||
inline MxU32 GetObjectId() { return this->m_objectId; }
|
||||
inline const MxAtomId& GetAtomId() { return this->m_atomId; }
|
||||
inline MxS16 GetUnknown24() { return this->m_unk0x24; }
|
||||
inline MxPresenter* GetUnknown28() { return this->m_unk0x28; }
|
||||
|
||||
inline void SetType(MxDSType p_type) { this->m_type = p_type; }
|
||||
inline void SetType(Type p_type) { this->m_type = p_type; }
|
||||
inline void SetObjectId(MxU32 p_objectId) { this->m_objectId = p_objectId; }
|
||||
inline void SetUnknown24(MxS16 p_unk0x24) { this->m_unk0x24 = p_unk0x24; }
|
||||
inline void SetUnknown28(MxPresenter* p_unk0x28) { this->m_unk0x28 = p_unk0x28; }
|
||||
|
|
|
@ -1,19 +0,0 @@
|
|||
#ifndef MXDSTYPES_H
|
||||
#define MXDSTYPES_H
|
||||
|
||||
enum MxDSType {
|
||||
MxDSType_Object = 0,
|
||||
MxDSType_Action = 1,
|
||||
MxDSType_MediaAction = 2,
|
||||
MxDSType_Anim = 3,
|
||||
MxDSType_Sound = 4,
|
||||
MxDSType_MultiAction = 5,
|
||||
MxDSType_SerialAction = 6,
|
||||
MxDSType_ParallelAction = 7,
|
||||
MxDSType_Event = 8,
|
||||
MxDSType_SelectAction = 9,
|
||||
MxDSType_Still = 10,
|
||||
MxDSType_ObjectAction = 11,
|
||||
};
|
||||
|
||||
#endif // MXDSTYPES_H
|
|
@ -32,10 +32,10 @@ class MxHashTableNode {
|
|||
template <class T>
|
||||
class MxHashTable : protected MxCollection<T> {
|
||||
public:
|
||||
enum HashTableOpt {
|
||||
HashTableOpt_NoExpand = 0,
|
||||
HashTableOpt_ExpandAdd = 1,
|
||||
HashTableOpt_ExpandMultiply = 2,
|
||||
enum Option {
|
||||
e_noExpand = 0,
|
||||
e_expandAll,
|
||||
e_expandMultiply,
|
||||
};
|
||||
|
||||
MxHashTable()
|
||||
|
@ -43,7 +43,7 @@ class MxHashTable : protected MxCollection<T> {
|
|||
m_numSlots = HASH_TABLE_INIT_SIZE;
|
||||
m_slots = new MxHashTableNode<T>*[HASH_TABLE_INIT_SIZE];
|
||||
memset(m_slots, 0, sizeof(MxHashTableNode<T>*) * m_numSlots);
|
||||
m_resizeOption = HashTableOpt_NoExpand;
|
||||
m_resizeOption = e_noExpand;
|
||||
}
|
||||
|
||||
virtual ~MxHashTable() override;
|
||||
|
@ -62,7 +62,7 @@ class MxHashTable : protected MxCollection<T> {
|
|||
MxHashTableNode<T>** m_slots; // 0x10
|
||||
MxU32 m_numSlots; // 0x14
|
||||
MxU32 m_autoResizeRatio; // 0x18
|
||||
HashTableOpt m_resizeOption; // 0x1c
|
||||
Option m_resizeOption; // 0x1c
|
||||
// FIXME: or FIXME? This qword is used as an integer or double depending
|
||||
// on the value of m_resizeOption. Hard to say whether this is how the devs
|
||||
// did it, but a simple cast in either direction doesn't match.
|
||||
|
@ -177,10 +177,10 @@ inline void MxHashTable<T>::Resize()
|
|||
MxHashTableNode<T>** oldTable = m_slots;
|
||||
|
||||
switch (m_resizeOption) {
|
||||
case HashTableOpt_ExpandAdd:
|
||||
case e_expandAll:
|
||||
m_numSlots += m_increaseAmount;
|
||||
break;
|
||||
case HashTableOpt_ExpandMultiply:
|
||||
case e_expandMultiply:
|
||||
m_numSlots *= m_increaseFactor;
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -8,29 +8,29 @@
|
|||
class MxCore;
|
||||
|
||||
enum NotificationId {
|
||||
PARAM_NONE = 0,
|
||||
c_notificationType0 = 0,
|
||||
c_notificationStartAction = 1, // 100dc210:100d8350
|
||||
c_notificationEndAction = 2, // 100d8358:100d8350
|
||||
TYPE4 = 4, // 100dc208:100d8350
|
||||
MXPRESENTER_NOTIFICATION = 5,
|
||||
MXSTREAMER_DELETE_NOTIFY = 6, // 100dc760
|
||||
c_notificationType4 = 4, // 100dc208:100d8350
|
||||
c_notificationPresenter = 5,
|
||||
c_notificationStreamer = 6, // 100dc760
|
||||
c_notificationKeyPress = 7, // 100d6aa0
|
||||
c_notificationButtonUp = 8, // 100d6aa0
|
||||
c_notificationButtonDown = 9, // 100d6aa0
|
||||
c_notificationMouseMove = 10, // 100d6aa0
|
||||
TYPE11 = 11, // 100d6aa0
|
||||
c_notificationType11 = 11, // 100d6aa0
|
||||
c_notificationDragEnd = 12,
|
||||
c_notificationDragStart = 13,
|
||||
c_notificationDrag = 14,
|
||||
c_notificationTimer = 15, // 100d6aa0
|
||||
TYPE17 = 17,
|
||||
TYPE18 = 18, // 100d7e80
|
||||
TYPE19 = 19, // 100d6230
|
||||
TYPE20 = 20,
|
||||
c_notificationType17 = 17,
|
||||
c_notificationType18 = 18, // 100d7e80
|
||||
c_notificationType19 = 19, // 100d6230
|
||||
c_notificationType20 = 20,
|
||||
c_notificationNewPresenter = 21,
|
||||
TYPE22 = 22,
|
||||
TYPE23 = 23,
|
||||
MXTRANSITIONMANAGER_TRANSITIONENDED = 24
|
||||
c_notificationType22 = 22,
|
||||
c_notificationType23 = 23,
|
||||
c_notificationTransitioned = 24
|
||||
};
|
||||
|
||||
// VTABLE: LEGO1 0x100d56e0
|
||||
|
|
|
@ -6,84 +6,76 @@
|
|||
class MxOmniCreateFlags {
|
||||
public:
|
||||
enum LowFlags {
|
||||
Flag_CreateObjectFactory = 0x01,
|
||||
Flag_CreateVariableTable = 0x02,
|
||||
Flag_CreateTickleManager = 0x04,
|
||||
Flag_CreateNotificationManager = 0x08,
|
||||
Flag_CreateVideoManager = 0x10,
|
||||
Flag_CreateSoundManager = 0x20,
|
||||
Flag_CreateMusicManager = 0x40,
|
||||
Flag_CreateEventManager = 0x80
|
||||
c_createObjectFactory = 0x01,
|
||||
c_createVariableTable = 0x02,
|
||||
c_createTickleManager = 0x04,
|
||||
c_createNotificationManager = 0x08,
|
||||
c_createVideoManager = 0x10,
|
||||
c_createSoundManager = 0x20,
|
||||
c_createMusicManager = 0x40,
|
||||
c_createEventManager = 0x80
|
||||
};
|
||||
|
||||
enum HighFlags {
|
||||
Flag_CreateTimer = 0x02,
|
||||
Flag_CreateStreamer = 0x04
|
||||
c_createTimer = 0x02,
|
||||
c_createStreamer = 0x04
|
||||
};
|
||||
|
||||
__declspec(dllexport) MxOmniCreateFlags();
|
||||
|
||||
inline const MxBool CreateObjectFactory() const { return this->m_flags1 & Flag_CreateObjectFactory; }
|
||||
inline const MxBool CreateVariableTable() const { return this->m_flags1 & Flag_CreateVariableTable; }
|
||||
inline const MxBool CreateTickleManager() const { return this->m_flags1 & Flag_CreateTickleManager; }
|
||||
inline const MxBool CreateNotificationManager() const { return this->m_flags1 & Flag_CreateNotificationManager; }
|
||||
inline const MxBool CreateVideoManager() const { return this->m_flags1 & Flag_CreateVideoManager; }
|
||||
inline const MxBool CreateSoundManager() const { return this->m_flags1 & Flag_CreateSoundManager; }
|
||||
inline const MxBool CreateMusicManager() const { return this->m_flags1 & Flag_CreateMusicManager; }
|
||||
inline const MxBool CreateEventManager() const { return this->m_flags1 & Flag_CreateEventManager; }
|
||||
inline const MxBool CreateObjectFactory() const { return this->m_flags1 & c_createObjectFactory; }
|
||||
inline const MxBool CreateVariableTable() const { return this->m_flags1 & c_createVariableTable; }
|
||||
inline const MxBool CreateTickleManager() const { return this->m_flags1 & c_createTickleManager; }
|
||||
inline const MxBool CreateNotificationManager() const { return this->m_flags1 & c_createNotificationManager; }
|
||||
inline const MxBool CreateVideoManager() const { return this->m_flags1 & c_createVideoManager; }
|
||||
inline const MxBool CreateSoundManager() const { return this->m_flags1 & c_createSoundManager; }
|
||||
inline const MxBool CreateMusicManager() const { return this->m_flags1 & c_createMusicManager; }
|
||||
inline const MxBool CreateEventManager() const { return this->m_flags1 & c_createEventManager; }
|
||||
|
||||
inline const MxBool CreateTimer() const { return this->m_flags2 & Flag_CreateTimer; }
|
||||
inline const MxBool CreateStreamer() const { return this->m_flags2 & Flag_CreateStreamer; }
|
||||
inline const MxBool CreateTimer() const { return this->m_flags2 & c_createTimer; }
|
||||
inline const MxBool CreateStreamer() const { return this->m_flags2 & c_createStreamer; }
|
||||
|
||||
inline void CreateObjectFactory(MxBool p_enable)
|
||||
{
|
||||
this->m_flags1 =
|
||||
(p_enable ? this->m_flags1 | Flag_CreateObjectFactory : this->m_flags1 & ~Flag_CreateObjectFactory);
|
||||
this->m_flags1 = (p_enable ? this->m_flags1 | c_createObjectFactory : this->m_flags1 & ~c_createObjectFactory);
|
||||
}
|
||||
inline void CreateVariableTable(MxBool p_enable)
|
||||
{
|
||||
this->m_flags1 =
|
||||
(p_enable ? this->m_flags1 | Flag_CreateVariableTable : this->m_flags1 & ~Flag_CreateVariableTable);
|
||||
this->m_flags1 = (p_enable ? this->m_flags1 | c_createVariableTable : this->m_flags1 & ~c_createVariableTable);
|
||||
}
|
||||
inline void CreateTickleManager(MxBool p_enable)
|
||||
{
|
||||
this->m_flags1 =
|
||||
(p_enable ? this->m_flags1 | Flag_CreateTickleManager : this->m_flags1 & ~Flag_CreateTickleManager);
|
||||
this->m_flags1 = (p_enable ? this->m_flags1 | c_createTickleManager : this->m_flags1 & ~c_createTickleManager);
|
||||
}
|
||||
inline void CreateNotificationManager(MxBool p_enable)
|
||||
{
|
||||
this->m_flags1 =
|
||||
(p_enable ? this->m_flags1 | Flag_CreateNotificationManager
|
||||
: this->m_flags1 & ~Flag_CreateNotificationManager);
|
||||
(p_enable ? this->m_flags1 | c_createNotificationManager : this->m_flags1 & ~c_createNotificationManager);
|
||||
}
|
||||
inline void CreateVideoManager(MxBool p_enable)
|
||||
{
|
||||
this->m_flags1 =
|
||||
(p_enable ? this->m_flags1 | Flag_CreateVideoManager : this->m_flags1 & ~Flag_CreateVideoManager);
|
||||
this->m_flags1 = (p_enable ? this->m_flags1 | c_createVideoManager : this->m_flags1 & ~c_createVideoManager);
|
||||
}
|
||||
inline void CreateSoundManager(MxBool p_enable)
|
||||
{
|
||||
this->m_flags1 =
|
||||
(p_enable ? this->m_flags1 | Flag_CreateSoundManager : this->m_flags1 & ~Flag_CreateSoundManager);
|
||||
this->m_flags1 = (p_enable ? this->m_flags1 | c_createSoundManager : this->m_flags1 & ~c_createSoundManager);
|
||||
}
|
||||
inline void CreateMusicManager(MxBool p_enable)
|
||||
{
|
||||
this->m_flags1 =
|
||||
(p_enable ? this->m_flags1 | Flag_CreateMusicManager : this->m_flags1 & ~Flag_CreateMusicManager);
|
||||
this->m_flags1 = (p_enable ? this->m_flags1 | c_createMusicManager : this->m_flags1 & ~c_createMusicManager);
|
||||
}
|
||||
inline void CreateEventManager(MxBool p_enable)
|
||||
{
|
||||
this->m_flags1 =
|
||||
(p_enable ? this->m_flags1 | Flag_CreateEventManager : this->m_flags1 & ~Flag_CreateEventManager);
|
||||
this->m_flags1 = (p_enable ? this->m_flags1 | c_createEventManager : this->m_flags1 & ~c_createEventManager);
|
||||
}
|
||||
|
||||
inline void CreateTimer(MxBool p_enable)
|
||||
{
|
||||
this->m_flags2 = (p_enable ? this->m_flags2 | Flag_CreateTimer : this->m_flags2 & ~Flag_CreateTimer);
|
||||
this->m_flags2 = (p_enable ? this->m_flags2 | c_createTimer : this->m_flags2 & ~c_createTimer);
|
||||
}
|
||||
inline void CreateStreamer(MxBool p_enable)
|
||||
{
|
||||
this->m_flags2 = (p_enable ? this->m_flags2 | Flag_CreateStreamer : this->m_flags2 & ~Flag_CreateStreamer);
|
||||
this->m_flags2 = (p_enable ? this->m_flags2 | c_createStreamer : this->m_flags2 & ~c_createStreamer);
|
||||
}
|
||||
|
||||
private:
|
||||
|
|
|
@ -17,13 +17,13 @@ class MxEntity;
|
|||
class MxPresenter : public MxCore {
|
||||
public:
|
||||
enum TickleState {
|
||||
TickleState_Idle = 0,
|
||||
TickleState_Ready,
|
||||
TickleState_Starting,
|
||||
TickleState_Streaming,
|
||||
TickleState_Repeating,
|
||||
TickleState_unk5,
|
||||
TickleState_Done,
|
||||
e_idle = 0,
|
||||
e_ready,
|
||||
e_starting,
|
||||
e_streaming,
|
||||
e_repeating,
|
||||
e_unk5,
|
||||
e_done,
|
||||
};
|
||||
|
||||
MxPresenter() { Init(); }
|
||||
|
@ -57,27 +57,27 @@ class MxPresenter : public MxCore {
|
|||
virtual void ReadyTickle()
|
||||
{
|
||||
ParseExtra();
|
||||
ProgressTickleState(TickleState_Starting);
|
||||
ProgressTickleState(e_starting);
|
||||
} // vtable+0x18
|
||||
|
||||
// FUNCTION: LEGO1 0x1000be60
|
||||
virtual void StartingTickle() { ProgressTickleState(TickleState_Streaming); } // vtable+0x1c
|
||||
virtual void StartingTickle() { ProgressTickleState(e_streaming); } // vtable+0x1c
|
||||
|
||||
// FUNCTION: LEGO1 0x1000be80
|
||||
virtual void StreamingTickle() { ProgressTickleState(TickleState_Repeating); }; // vtable+0x20
|
||||
virtual void StreamingTickle() { ProgressTickleState(e_repeating); }; // vtable+0x20
|
||||
|
||||
// FUNCTION: LEGO1 0x1000bea0
|
||||
virtual void RepeatingTickle() { ProgressTickleState(TickleState_unk5); }; // vtable+0x24
|
||||
virtual void RepeatingTickle() { ProgressTickleState(e_unk5); }; // vtable+0x24
|
||||
|
||||
// FUNCTION: LEGO1 0x1000bec0
|
||||
virtual void Unk5Tickle() { ProgressTickleState(TickleState_Done); }; // vtable+0x28
|
||||
virtual void Unk5Tickle() { ProgressTickleState(e_done); }; // vtable+0x28
|
||||
|
||||
protected:
|
||||
#ifdef ISLE_APP
|
||||
__declspec(dllexport) virtual void DoneTickle(); // vtable+0x2c
|
||||
#else
|
||||
// FUNCTION: LEGO1 0x1000bee0
|
||||
__declspec(dllexport) virtual void DoneTickle() { ProgressTickleState(TickleState_Idle); }; // vtable+0x2c
|
||||
__declspec(dllexport) virtual void DoneTickle() { ProgressTickleState(e_idle); }; // vtable+0x2c
|
||||
#endif
|
||||
|
||||
__declspec(dllexport) virtual void ParseExtra(); // vtable+0x30
|
||||
|
|
|
@ -71,7 +71,7 @@ class MxStreamerNotification : public MxNotificationParam {
|
|||
class MxStreamer : public MxCore {
|
||||
public:
|
||||
enum OpenMode {
|
||||
e_DiskStream,
|
||||
e_diskStream = 0,
|
||||
e_RAMStream
|
||||
};
|
||||
|
||||
|
|
|
@ -11,11 +11,11 @@
|
|||
class MxVideoPresenter : public MxMediaPresenter {
|
||||
public:
|
||||
enum {
|
||||
Flag_Bit1 = 0x01,
|
||||
Flag_Bit2 = 0x02,
|
||||
Flag_Bit3 = 0x04,
|
||||
Flag_Bit4 = 0x08,
|
||||
Flag_Bit5 = 0x10,
|
||||
c_bit1 = 0x01,
|
||||
c_bit2 = 0x02,
|
||||
c_bit3 = 0x04,
|
||||
c_bit4 = 0x08,
|
||||
c_bit5 = 0x10,
|
||||
};
|
||||
|
||||
MxVideoPresenter() { Init(); }
|
||||
|
|
|
@ -15,14 +15,14 @@ MxU16 g_sep = TWOCC(',', ' ');
|
|||
// FUNCTION: LEGO1 0x100ad810
|
||||
MxDSAction::MxDSAction()
|
||||
{
|
||||
this->m_flags = MxDSAction::Flag_Enabled;
|
||||
this->m_flags = MxDSAction::c_enabled;
|
||||
this->m_startTime = INT_MIN;
|
||||
this->m_extraData = NULL;
|
||||
this->m_extraLength = 0;
|
||||
this->m_duration = INT_MIN;
|
||||
this->m_loopCount = -1;
|
||||
|
||||
this->SetType(MxDSType_Action);
|
||||
this->SetType(e_action);
|
||||
this->m_location.Fill(FLT_MAX);
|
||||
this->m_direction.Fill(FLT_MAX);
|
||||
this->m_up.Fill(FLT_MAX);
|
||||
|
|
|
@ -5,7 +5,7 @@ DECOMP_SIZE_ASSERT(MxDSAnim, 0xb8)
|
|||
// FUNCTION: LEGO1 0x100c8ff0
|
||||
MxDSAnim::MxDSAnim()
|
||||
{
|
||||
this->SetType(MxDSType_Anim);
|
||||
this->SetType(e_anim);
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100c91a0
|
||||
|
|
|
@ -5,7 +5,7 @@ DECOMP_SIZE_ASSERT(MxDSEvent, 0xb8)
|
|||
// FUNCTION: LEGO1 0x100c95f0
|
||||
MxDSEvent::MxDSEvent()
|
||||
{
|
||||
this->SetType(MxDSType_Event);
|
||||
this->SetType(e_event);
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100c97a0
|
||||
|
|
|
@ -15,7 +15,7 @@ MxDSMediaAction::MxDSMediaAction()
|
|||
this->m_paletteManagement = 1;
|
||||
this->m_unk0xb4 = -1;
|
||||
this->m_sustainTime = 0;
|
||||
this->SetType(MxDSType_MediaAction);
|
||||
this->SetType(e_mediaAction);
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100c8cf0
|
||||
|
|
|
@ -7,7 +7,7 @@ DECOMP_SIZE_ASSERT(MxDSActionListCursor, 0x10);
|
|||
// FUNCTION: LEGO1 0x100c9b90
|
||||
MxDSMultiAction::MxDSMultiAction()
|
||||
{
|
||||
this->SetType(MxDSType_MultiAction);
|
||||
this->SetType(e_multiAction);
|
||||
this->m_actions = new MxDSActionList;
|
||||
this->m_actions->SetDestroy(MxDSActionList::Destroy);
|
||||
}
|
||||
|
|
|
@ -11,7 +11,6 @@
|
|||
#include "mxdsserialaction.h"
|
||||
#include "mxdssound.h"
|
||||
#include "mxdsstill.h"
|
||||
#include "mxdstypes.h"
|
||||
#include "mxutil.h"
|
||||
|
||||
#include <stdlib.h>
|
||||
|
@ -22,7 +21,7 @@ DECOMP_SIZE_ASSERT(MxDSObject, 0x2c);
|
|||
// FUNCTION: LEGO1 0x100bf6a0
|
||||
MxDSObject::MxDSObject()
|
||||
{
|
||||
this->SetType(MxDSType_Object);
|
||||
this->SetType(e_object);
|
||||
this->m_sourceName = NULL;
|
||||
this->m_unk0x14 = 0;
|
||||
this->m_objectName = NULL;
|
||||
|
@ -148,40 +147,40 @@ MxDSObject* DeserializeDSObjectDispatch(MxU8** p_source, MxS16 p_flags)
|
|||
switch (type) {
|
||||
default:
|
||||
return NULL;
|
||||
case MxDSType_Object:
|
||||
case MxDSObject::e_object:
|
||||
obj = new MxDSObject();
|
||||
break;
|
||||
case MxDSType_Action:
|
||||
case MxDSObject::e_action:
|
||||
obj = new MxDSAction();
|
||||
break;
|
||||
case MxDSType_MediaAction:
|
||||
case MxDSObject::e_mediaAction:
|
||||
obj = new MxDSMediaAction();
|
||||
break;
|
||||
case MxDSType_Anim:
|
||||
case MxDSObject::e_anim:
|
||||
obj = new MxDSAnim();
|
||||
break;
|
||||
case MxDSType_Sound:
|
||||
case MxDSObject::e_sound:
|
||||
obj = new MxDSSound();
|
||||
break;
|
||||
case MxDSType_MultiAction:
|
||||
case MxDSObject::e_multiAction:
|
||||
obj = new MxDSMultiAction();
|
||||
break;
|
||||
case MxDSType_SerialAction:
|
||||
case MxDSObject::e_serialAction:
|
||||
obj = new MxDSSerialAction();
|
||||
break;
|
||||
case MxDSType_ParallelAction:
|
||||
case MxDSObject::e_parallelAction:
|
||||
obj = new MxDSParallelAction();
|
||||
break;
|
||||
case MxDSType_Event:
|
||||
case MxDSObject::e_event:
|
||||
obj = new MxDSEvent();
|
||||
break;
|
||||
case MxDSType_SelectAction:
|
||||
case MxDSObject::e_selectAction:
|
||||
obj = new MxDSSelectAction();
|
||||
break;
|
||||
case MxDSType_Still:
|
||||
case MxDSObject::e_still:
|
||||
obj = new MxDSStill();
|
||||
break;
|
||||
case MxDSType_ObjectAction:
|
||||
case MxDSObject::e_objectAction:
|
||||
obj = new MxDSObjectAction();
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -5,7 +5,7 @@ DECOMP_SIZE_ASSERT(MxDSObjectAction, 0xb8)
|
|||
// FUNCTION: LEGO1 0x100c8870
|
||||
MxDSObjectAction::MxDSObjectAction()
|
||||
{
|
||||
this->SetType(MxDSType_ObjectAction);
|
||||
this->SetType(e_objectAction);
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100c8a20
|
||||
|
|
|
@ -7,7 +7,7 @@ DECOMP_SIZE_ASSERT(MxDSParallelAction, 0x9c)
|
|||
// FUNCTION: LEGO1 0x100cae80
|
||||
MxDSParallelAction::MxDSParallelAction()
|
||||
{
|
||||
this->SetType(MxDSType_ParallelAction);
|
||||
this->SetType(e_parallelAction);
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100cb040
|
||||
|
|
|
@ -12,7 +12,7 @@ DECOMP_SIZE_ASSERT(MxListEntry<MxString>, 0x18)
|
|||
// FUNCTION: LEGO1 0x100cb2b0
|
||||
MxDSSelectAction::MxDSSelectAction()
|
||||
{
|
||||
this->SetType(MxDSType_SelectAction);
|
||||
this->SetType(e_selectAction);
|
||||
this->m_unk0xac = new MxStringList;
|
||||
}
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@ DECOMP_SIZE_ASSERT(MxDSSerialAction, 0xa8)
|
|||
// FUNCTION: LEGO1 0x100ca9d0
|
||||
MxDSSerialAction::MxDSSerialAction()
|
||||
{
|
||||
this->SetType(MxDSType_SerialAction);
|
||||
this->SetType(e_serialAction);
|
||||
this->m_cursor = new MxDSActionListCursor(this->m_actions);
|
||||
this->m_unk0xa0 = 0;
|
||||
}
|
||||
|
|
|
@ -8,7 +8,7 @@ DECOMP_SIZE_ASSERT(MxDSSound, 0xc0)
|
|||
MxDSSound::MxDSSound()
|
||||
{
|
||||
this->m_volume = 0x4f;
|
||||
this->SetType(MxDSType_Sound);
|
||||
this->SetType(e_sound);
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100c9470
|
||||
|
|
|
@ -5,7 +5,7 @@ DECOMP_SIZE_ASSERT(MxDSStill, 0xb8)
|
|||
// FUNCTION: LEGO1 0x100c98c0
|
||||
MxDSStill::MxDSStill()
|
||||
{
|
||||
this->SetType(MxDSType_Still);
|
||||
this->SetType(e_still);
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100c9a70
|
||||
|
|
|
@ -21,7 +21,7 @@ void MxLoopingMIDIPresenter::StreamingTickle()
|
|||
}
|
||||
|
||||
if (m_chunk->GetTime() + m_action->GetDuration() <= m_action->GetElapsedTime())
|
||||
ProgressTickleState(TickleState_Done);
|
||||
ProgressTickleState(e_done);
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100c2ae0
|
||||
|
@ -38,7 +38,7 @@ MxResult MxLoopingMIDIPresenter::PutData()
|
|||
{
|
||||
m_criticalSection.Enter();
|
||||
|
||||
if (m_currentTickleState == TickleState_Streaming && m_chunk && !MusicManager()->GetMIDIInitialized()) {
|
||||
if (m_currentTickleState == e_streaming && m_chunk && !MusicManager()->GetMIDIInitialized()) {
|
||||
SetVolume(((MxDSSound*) m_action)->GetVolume());
|
||||
MusicManager()->FUN_100c09c0(m_chunk->GetData(), !m_action->GetLoopCount() ? -1 : m_action->GetLoopCount());
|
||||
}
|
||||
|
|
|
@ -52,7 +52,7 @@ void MxMIDIPresenter::ReadyTickle()
|
|||
if (chunk) {
|
||||
m_subscriber->DestroyChunk(chunk);
|
||||
ParseExtra();
|
||||
ProgressTickleState(TickleState_Starting);
|
||||
ProgressTickleState(e_starting);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -62,14 +62,14 @@ void MxMIDIPresenter::StartingTickle()
|
|||
MxStreamChunk* chunk = CurrentChunk();
|
||||
|
||||
if (chunk && m_action->GetElapsedTime() >= chunk->GetTime())
|
||||
ProgressTickleState(TickleState_Streaming);
|
||||
ProgressTickleState(e_streaming);
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100c2910
|
||||
void MxMIDIPresenter::StreamingTickle()
|
||||
{
|
||||
if (m_chunk)
|
||||
ProgressTickleState(TickleState_Done);
|
||||
ProgressTickleState(e_done);
|
||||
else
|
||||
m_chunk = NextChunk();
|
||||
}
|
||||
|
@ -92,7 +92,7 @@ MxResult MxMIDIPresenter::PutData()
|
|||
{
|
||||
m_criticalSection.Enter();
|
||||
|
||||
if (m_currentTickleState == TickleState_Streaming && m_chunk && !MusicManager()->GetMIDIInitialized()) {
|
||||
if (m_currentTickleState == e_streaming && m_chunk && !MusicManager()->GetMIDIInitialized()) {
|
||||
SetVolume(((MxDSSound*) m_action)->GetVolume());
|
||||
|
||||
if (MusicManager()->FUN_100c09c0(m_chunk->GetData(), 1))
|
||||
|
|
|
@ -86,7 +86,7 @@ void MxWavePresenter::WriteToSoundBuffer(void* p_audioPtr, MxU32 p_length)
|
|||
}
|
||||
|
||||
if (dwStatus != DSBSTATUS_BUFFERLOST) {
|
||||
if (m_action->GetFlags() & MxDSAction::Flag_Looping) {
|
||||
if (m_action->GetFlags() & MxDSAction::c_looping) {
|
||||
m_writtenChunks++;
|
||||
m_lockSize = p_length;
|
||||
}
|
||||
|
@ -99,7 +99,7 @@ void MxWavePresenter::WriteToSoundBuffer(void* p_audioPtr, MxU32 p_length)
|
|||
DS_OK) {
|
||||
memcpy(pvAudioPtr1, p_audioPtr, p_length);
|
||||
|
||||
if (m_lockSize > p_length && !(m_action->GetFlags() & MxDSAction::Flag_Looping)) {
|
||||
if (m_lockSize > p_length && !(m_action->GetFlags() & MxDSAction::c_looping)) {
|
||||
memset((MxU8*) pvAudioPtr1 + p_length, m_silenceData, m_lockSize - p_length);
|
||||
}
|
||||
|
||||
|
@ -118,7 +118,7 @@ void MxWavePresenter::ReadyTickle()
|
|||
memcpy(m_waveFormat, chunk->GetData(), chunk->GetLength());
|
||||
m_subscriber->DestroyChunk(chunk);
|
||||
ParseExtra();
|
||||
ProgressTickleState(TickleState_Starting);
|
||||
ProgressTickleState(e_starting);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -156,7 +156,7 @@ void MxWavePresenter::StartingTickle()
|
|||
else
|
||||
desc.dwFlags = DSBCAPS_CTRLFREQUENCY | DSBCAPS_CTRLPAN | DSBCAPS_CTRLVOLUME;
|
||||
|
||||
if (m_action->GetFlags() & MxDSAction::Flag_Looping)
|
||||
if (m_action->GetFlags() & MxDSAction::c_looping)
|
||||
desc.dwBufferBytes = m_waveFormat->m_waveFormatEx.nAvgBytesPerSec *
|
||||
(m_action->GetDuration() / m_action->GetLoopCount()) / 1000;
|
||||
else
|
||||
|
@ -169,7 +169,7 @@ void MxWavePresenter::StartingTickle()
|
|||
}
|
||||
else {
|
||||
SetVolume(((MxDSSound*) m_action)->GetVolume());
|
||||
ProgressTickleState(TickleState_Streaming);
|
||||
ProgressTickleState(e_streaming);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -178,11 +178,11 @@ void MxWavePresenter::StartingTickle()
|
|||
void MxWavePresenter::StreamingTickle()
|
||||
{
|
||||
if (!m_currentChunk) {
|
||||
if (!(m_action->GetFlags() & MxDSAction::Flag_Looping)) {
|
||||
if (!(m_action->GetFlags() & MxDSAction::c_looping)) {
|
||||
MxStreamChunk* chunk = CurrentChunk();
|
||||
|
||||
if (chunk && chunk->GetFlags() & MxDSChunk::Flag_End && !(chunk->GetFlags() & MxDSChunk::Flag_Bit16)) {
|
||||
chunk->SetFlags(chunk->GetFlags() | MxDSChunk::Flag_Bit16);
|
||||
if (chunk && chunk->GetFlags() & MxDSChunk::c_end && !(chunk->GetFlags() & MxDSChunk::c_bit16)) {
|
||||
chunk->SetFlags(chunk->GetFlags() | MxDSChunk::c_bit16);
|
||||
|
||||
m_currentChunk = new MxStreamChunk;
|
||||
MxU8* data = new MxU8[m_chunkLength];
|
||||
|
@ -192,7 +192,7 @@ void MxWavePresenter::StreamingTickle()
|
|||
m_currentChunk->SetLength(m_chunkLength);
|
||||
m_currentChunk->SetData(data);
|
||||
m_currentChunk->SetTime(chunk->GetTime() + 1000);
|
||||
m_currentChunk->SetFlags(MxDSChunk::Flag_Bit1);
|
||||
m_currentChunk->SetFlags(MxDSChunk::c_bit1);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -208,7 +208,7 @@ void MxWavePresenter::DoneTickle()
|
|||
m_dsBuffer->GetCurrentPosition(&dwCurrentPlayCursor, &dwCurrentWriteCursor);
|
||||
|
||||
MxS8 playedChunks = dwCurrentPlayCursor / m_chunkLength;
|
||||
if (m_action->GetFlags() & MxDSAction::Flag_Bit7 || m_action->GetFlags() & MxDSAction::Flag_Looping ||
|
||||
if (m_action->GetFlags() & MxDSAction::c_bit7 || m_action->GetFlags() & MxDSAction::c_looping ||
|
||||
m_writtenChunks != playedChunks || m_lockSize + (m_chunkLength * playedChunks) <= dwCurrentPlayCursor)
|
||||
MxMediaPresenter::DoneTickle();
|
||||
}
|
||||
|
@ -231,7 +231,7 @@ MxResult MxWavePresenter::PutData()
|
|||
|
||||
if (IsEnabled()) {
|
||||
switch (m_currentTickleState) {
|
||||
case TickleState_Streaming:
|
||||
case e_streaming:
|
||||
if (m_currentChunk && FUN_100b1ba0()) {
|
||||
WriteToSoundBuffer(m_currentChunk->GetData(), m_currentChunk->GetLength());
|
||||
m_subscriber->DestroyChunk(m_currentChunk);
|
||||
|
@ -245,7 +245,7 @@ MxResult MxWavePresenter::PutData()
|
|||
m_started = TRUE;
|
||||
}
|
||||
break;
|
||||
case TickleState_Repeating:
|
||||
case e_repeating:
|
||||
if (m_started)
|
||||
break;
|
||||
|
||||
|
@ -339,13 +339,13 @@ void MxWavePresenter::Resume()
|
|||
if (m_paused) {
|
||||
if (m_dsBuffer && m_started) {
|
||||
switch (m_currentTickleState) {
|
||||
case TickleState_Streaming:
|
||||
case e_streaming:
|
||||
m_dsBuffer->Play(0, 0, DSBPLAY_LOOPING);
|
||||
break;
|
||||
case TickleState_Repeating:
|
||||
case e_repeating:
|
||||
m_dsBuffer->Play(0, 0, m_action->GetLoopCount() > 1);
|
||||
break;
|
||||
case TickleState_Done:
|
||||
case e_done:
|
||||
m_dsBuffer->Play(0, 0, 0);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -55,7 +55,7 @@ MxAtomId& MxAtomId::operator=(const MxAtomId& p_atomId)
|
|||
Destroy();
|
||||
|
||||
if (p_atomId.m_internal && MxOmni::GetInstance() && AtomIdCounterSet()) {
|
||||
MxAtomIdCounter* counter = GetCounter(p_atomId.m_internal, LookupMode_Exact);
|
||||
MxAtomIdCounter* counter = GetCounter(p_atomId.m_internal, e_exact);
|
||||
counter->Inc();
|
||||
}
|
||||
|
||||
|
@ -71,11 +71,11 @@ MxAtomIdCounter* MxAtomId::GetCounter(const char* p_str, LookupMode p_mode)
|
|||
MxAtomIdCounter* counter = new MxAtomIdCounter(p_str);
|
||||
|
||||
switch (p_mode) {
|
||||
case LookupMode_LowerCase:
|
||||
case LookupMode_LowerCase2:
|
||||
case e_lowerCase:
|
||||
case e_lowerCase2:
|
||||
counter->GetKey()->ToLowerCase();
|
||||
break;
|
||||
case LookupMode_UpperCase:
|
||||
case e_upperCase:
|
||||
counter->GetKey()->ToUpperCase();
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -112,7 +112,7 @@ MxLong MxCompositePresenter::Notify(MxParam& p_param)
|
|||
case c_notificationEndAction:
|
||||
VTable0x58((MxEndActionNotificationParam&) p_param);
|
||||
break;
|
||||
case MXPRESENTER_NOTIFICATION:
|
||||
case c_notificationPresenter:
|
||||
VTable0x5c((MxNotificationParam&) p_param);
|
||||
}
|
||||
|
||||
|
@ -155,8 +155,8 @@ void MxCompositePresenter::VTable0x58(MxEndActionNotificationParam& p_param)
|
|||
else {
|
||||
if (m_action->IsA("MxDSSerialAction") && it != m_list.end()) {
|
||||
MxPresenter* presenter = *it;
|
||||
if (presenter->GetCurrentTickleState() == TickleState_Idle)
|
||||
presenter->SetTickleState(TickleState_Ready);
|
||||
if (presenter->GetCurrentTickleState() == e_idle)
|
||||
presenter->SetTickleState(e_ready);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -171,8 +171,8 @@ void MxCompositePresenter::VTable0x5c(MxNotificationParam& p_param)
|
|||
if (*it == presenter) {
|
||||
m_list.erase(it++);
|
||||
|
||||
if (presenter->GetCurrentTickleState() == TickleState_Idle)
|
||||
presenter->SetTickleState(TickleState_Ready);
|
||||
if (presenter->GetCurrentTickleState() == e_idle)
|
||||
presenter->SetTickleState(e_ready);
|
||||
|
||||
MxDSActionList* actions = ((MxDSMultiAction*) m_action)->GetActionList();
|
||||
MxDSActionListCursor cursor(actions);
|
||||
|
@ -186,8 +186,8 @@ void MxCompositePresenter::VTable0x5c(MxNotificationParam& p_param)
|
|||
else {
|
||||
if (m_action->IsA("MxDSSerialAction")) {
|
||||
MxPresenter* presenter = *it;
|
||||
if (presenter->GetCurrentTickleState() == TickleState_Idle)
|
||||
presenter->SetTickleState(TickleState_Ready);
|
||||
if (presenter->GetCurrentTickleState() == e_idle)
|
||||
presenter->SetTickleState(e_ready);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -210,8 +210,8 @@ void MxCompositePresenter::VTable0x60(MxPresenter* p_presenter)
|
|||
}
|
||||
else if (m_action->IsA("MxDSSerialAction")) {
|
||||
MxPresenter* presenter = *it;
|
||||
if (presenter->GetCurrentTickleState() == TickleState_Idle)
|
||||
presenter->SetTickleState(TickleState_Ready);
|
||||
if (presenter->GetCurrentTickleState() == e_idle)
|
||||
presenter->SetTickleState(e_ready);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
@ -227,7 +227,7 @@ void MxCompositePresenter::SetTickleState(TickleState p_tickleState)
|
|||
MxPresenter* presenter = *it;
|
||||
presenter->SetTickleState(p_tickleState);
|
||||
|
||||
if (m_action->IsA("MxDSSerialAction") && p_tickleState == TickleState_Ready)
|
||||
if (m_action->IsA("MxDSSerialAction") && p_tickleState == e_ready)
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -60,12 +60,12 @@ MxStreamChunk* MxMediaPresenter::CurrentChunk()
|
|||
if (m_subscriber) {
|
||||
chunk = m_subscriber->CurrentChunk();
|
||||
|
||||
if (chunk && chunk->GetFlags() & MxDSChunk::Flag_Bit3) {
|
||||
m_action->SetFlags(m_action->GetFlags() | MxDSAction::Flag_Bit7);
|
||||
if (chunk && chunk->GetFlags() & MxDSChunk::c_bit3) {
|
||||
m_action->SetFlags(m_action->GetFlags() | MxDSAction::c_bit7);
|
||||
m_subscriber->NextChunk();
|
||||
m_subscriber->DestroyChunk(chunk);
|
||||
chunk = NULL;
|
||||
ProgressTickleState(TickleState_Done);
|
||||
ProgressTickleState(e_done);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -80,11 +80,11 @@ MxStreamChunk* MxMediaPresenter::NextChunk()
|
|||
if (m_subscriber) {
|
||||
chunk = m_subscriber->NextChunk();
|
||||
|
||||
if (chunk && chunk->GetFlags() & MxDSChunk::Flag_Bit3) {
|
||||
m_action->SetFlags(m_action->GetFlags() | MxDSAction::Flag_Bit7);
|
||||
if (chunk && chunk->GetFlags() & MxDSChunk::c_bit3) {
|
||||
m_action->SetFlags(m_action->GetFlags() | MxDSAction::c_bit7);
|
||||
m_subscriber->DestroyChunk(chunk);
|
||||
chunk = NULL;
|
||||
ProgressTickleState(TickleState_Done);
|
||||
ProgressTickleState(e_done);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -98,7 +98,7 @@ MxResult MxMediaPresenter::StartAction(MxStreamController* p_controller, MxDSAct
|
|||
MxAutoLocker lock(&m_criticalSection);
|
||||
|
||||
if (MxPresenter::StartAction(p_controller, p_action) == SUCCESS) {
|
||||
if (m_action->GetFlags() & MxDSAction::Flag_Looping) {
|
||||
if (m_action->GetFlags() & MxDSAction::c_looping) {
|
||||
m_loopingChunks = new MxStreamChunkList;
|
||||
m_loopingChunkCursor = new MxStreamChunkListCursor(m_loopingChunks);
|
||||
|
||||
|
@ -131,10 +131,9 @@ void MxMediaPresenter::EndAction()
|
|||
|
||||
m_currentChunk = NULL;
|
||||
|
||||
if (m_action->GetFlags() & MxDSAction::Flag_World &&
|
||||
(!m_compositePresenter || !m_compositePresenter->VTable0x64(2))) {
|
||||
if (m_action->GetFlags() & MxDSAction::c_world && (!m_compositePresenter || !m_compositePresenter->VTable0x64(2))) {
|
||||
MxPresenter::Enable(FALSE);
|
||||
SetTickleState(TickleState_Idle);
|
||||
SetTickleState(e_idle);
|
||||
}
|
||||
else {
|
||||
MxDSAction* action = m_action;
|
||||
|
@ -178,12 +177,12 @@ void MxMediaPresenter::StreamingTickle()
|
|||
m_currentChunk = NextChunk();
|
||||
|
||||
if (m_currentChunk) {
|
||||
if (m_currentChunk->GetFlags() & MxDSChunk::Flag_End) {
|
||||
if (m_currentChunk->GetFlags() & MxDSChunk::c_end) {
|
||||
m_subscriber->DestroyChunk(m_currentChunk);
|
||||
m_currentChunk = NULL;
|
||||
ProgressTickleState(TickleState_Repeating);
|
||||
ProgressTickleState(e_repeating);
|
||||
}
|
||||
else if (m_action->GetFlags() & MxDSAction::Flag_Looping) {
|
||||
else if (m_action->GetFlags() & MxDSAction::c_looping) {
|
||||
LoopChunk(m_currentChunk);
|
||||
|
||||
if (!IsEnabled()) {
|
||||
|
@ -206,11 +205,11 @@ void MxMediaPresenter::RepeatingTickle()
|
|||
if (m_currentChunk) {
|
||||
MxLong time = m_currentChunk->GetTime();
|
||||
if (time <= m_action->GetElapsedTime() % m_action->GetLoopCount())
|
||||
ProgressTickleState(TickleState_unk5);
|
||||
ProgressTickleState(e_unk5);
|
||||
}
|
||||
else {
|
||||
if (m_action->GetElapsedTime() >= m_action->GetStartTime() + m_action->GetDuration())
|
||||
ProgressTickleState(TickleState_unk5);
|
||||
ProgressTickleState(e_unk5);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -219,7 +218,7 @@ void MxMediaPresenter::RepeatingTickle()
|
|||
void MxMediaPresenter::DoneTickle()
|
||||
{
|
||||
m_previousTickleStates |= 1 << m_currentTickleState;
|
||||
m_currentTickleState = TickleState_Idle;
|
||||
m_currentTickleState = e_idle;
|
||||
EndAction();
|
||||
}
|
||||
|
||||
|
@ -246,13 +245,13 @@ void MxMediaPresenter::Enable(MxBool p_enable)
|
|||
if (p_enable) {
|
||||
MxLong time = Timer()->GetTime();
|
||||
m_action->SetUnknown90(time);
|
||||
SetTickleState(TickleState_Repeating);
|
||||
SetTickleState(e_repeating);
|
||||
}
|
||||
else {
|
||||
if (m_loopingChunkCursor)
|
||||
m_loopingChunkCursor->Reset();
|
||||
m_currentChunk = NULL;
|
||||
SetTickleState(TickleState_Done);
|
||||
SetTickleState(e_done);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -19,7 +19,7 @@ DECOMP_SIZE_ASSERT(MxObjectFactory, 0x38); // 100af1db
|
|||
// FUNCTION: LEGO1 0x100b0d80
|
||||
MxObjectFactory::MxObjectFactory()
|
||||
{
|
||||
#define X(V) this->m_id##V = MxAtomId(#V, LookupMode_Exact);
|
||||
#define X(V) this->m_id##V = MxAtomId(#V, e_exact);
|
||||
FOR_MXOBJECTFACTORY_OBJECTS(X)
|
||||
#undef X
|
||||
}
|
||||
|
@ -28,7 +28,7 @@ MxObjectFactory::MxObjectFactory()
|
|||
MxCore* MxObjectFactory::Create(const char* p_name)
|
||||
{
|
||||
MxCore* object = NULL;
|
||||
MxAtomId atom(p_name, LookupMode_Exact);
|
||||
MxAtomId atom(p_name, e_exact);
|
||||
|
||||
if (0) {
|
||||
}
|
||||
|
|
|
@ -21,7 +21,7 @@ DECOMP_SIZE_ASSERT(MxPresenter, 0x40);
|
|||
// FUNCTION: LEGO1 0x100b4d50
|
||||
void MxPresenter::Init()
|
||||
{
|
||||
m_currentTickleState = TickleState_Idle;
|
||||
m_currentTickleState = e_idle;
|
||||
m_action = NULL;
|
||||
m_location = MxPoint32(0, 0);
|
||||
m_displayZ = 0;
|
||||
|
@ -41,7 +41,7 @@ MxResult MxPresenter::StartAction(MxStreamController*, MxDSAction* p_action)
|
|||
|
||||
this->m_location = MxPoint32(this->m_action->GetLocation()[0], this->m_action->GetLocation()[1]);
|
||||
this->m_displayZ = this->m_action->GetLocation()[2];
|
||||
ProgressTickleState(TickleState_Ready);
|
||||
ProgressTickleState(e_ready);
|
||||
|
||||
return SUCCESS;
|
||||
}
|
||||
|
@ -70,7 +70,7 @@ void MxPresenter::EndAction()
|
|||
this->m_action = NULL;
|
||||
MxS32 previousTickleState = 1 << m_currentTickleState;
|
||||
this->m_previousTickleStates |= previousTickleState;
|
||||
this->m_currentTickleState = TickleState_Idle;
|
||||
this->m_currentTickleState = e_idle;
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100b4fc0
|
||||
|
@ -96,7 +96,7 @@ void MxPresenter::ParseExtra()
|
|||
MxS32 val = token ? atoi(token) : 0;
|
||||
MxEntity* result = MxOmni::GetInstance()->FindWorld(buf, val, this);
|
||||
|
||||
m_action->SetFlags(m_action->GetFlags() | MxDSAction::Flag_World);
|
||||
m_action->SetFlags(m_action->GetFlags() | MxDSAction::c_world);
|
||||
|
||||
if (result)
|
||||
SendToCompositePresenter(MxOmni::GetInstance());
|
||||
|
@ -112,11 +112,11 @@ void MxPresenter::SendToCompositePresenter(MxOmni* p_omni)
|
|||
|
||||
#ifdef COMPAT_MODE
|
||||
{
|
||||
MxNotificationParam param(MXPRESENTER_NOTIFICATION, this);
|
||||
MxNotificationParam param(c_notificationPresenter, this);
|
||||
NotificationManager()->Send(m_compositePresenter, ¶m);
|
||||
}
|
||||
#else
|
||||
NotificationManager()->Send(m_compositePresenter, &MxNotificationParam(MXPRESENTER_NOTIFICATION, this));
|
||||
NotificationManager()->Send(m_compositePresenter, &MxNotificationParam(c_notificationPresenter, this));
|
||||
#endif
|
||||
|
||||
m_action->SetOrigin(p_omni ? p_omni : MxOmni::GetInstance());
|
||||
|
@ -130,32 +130,32 @@ MxResult MxPresenter::Tickle()
|
|||
MxAutoLocker lock(&this->m_criticalSection);
|
||||
|
||||
switch (this->m_currentTickleState) {
|
||||
case TickleState_Ready:
|
||||
case e_ready:
|
||||
this->ReadyTickle();
|
||||
|
||||
if (m_currentTickleState != TickleState_Starting)
|
||||
if (m_currentTickleState != e_starting)
|
||||
break;
|
||||
case TickleState_Starting:
|
||||
case e_starting:
|
||||
this->StartingTickle();
|
||||
|
||||
if (m_currentTickleState != TickleState_Streaming)
|
||||
if (m_currentTickleState != e_streaming)
|
||||
break;
|
||||
case TickleState_Streaming:
|
||||
case e_streaming:
|
||||
this->StreamingTickle();
|
||||
|
||||
if (m_currentTickleState != TickleState_Repeating)
|
||||
if (m_currentTickleState != e_repeating)
|
||||
break;
|
||||
case TickleState_Repeating:
|
||||
case e_repeating:
|
||||
this->RepeatingTickle();
|
||||
|
||||
if (m_currentTickleState != TickleState_unk5)
|
||||
if (m_currentTickleState != e_unk5)
|
||||
break;
|
||||
case TickleState_unk5:
|
||||
case e_unk5:
|
||||
this->Unk5Tickle();
|
||||
|
||||
if (m_currentTickleState != TickleState_Done)
|
||||
if (m_currentTickleState != e_done)
|
||||
break;
|
||||
case TickleState_Done:
|
||||
case e_done:
|
||||
this->DoneTickle();
|
||||
default:
|
||||
break;
|
||||
|
@ -171,9 +171,9 @@ void MxPresenter::Enable(MxBool p_enable)
|
|||
MxU32 flags = this->m_action->GetFlags();
|
||||
|
||||
if (p_enable)
|
||||
this->m_action->SetFlags(flags | MxDSAction::Flag_Enabled);
|
||||
this->m_action->SetFlags(flags | MxDSAction::c_enabled);
|
||||
else
|
||||
this->m_action->SetFlags(flags & ~MxDSAction::Flag_Enabled);
|
||||
this->m_action->SetFlags(flags & ~MxDSAction::c_enabled);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -185,7 +185,7 @@ const char* PresenterNameDispatch(const MxDSAction& p_action)
|
|||
|
||||
if (!name || strlen(name) == 0) {
|
||||
switch (p_action.GetType()) {
|
||||
case MxDSType_Anim:
|
||||
case MxDSObject::e_anim:
|
||||
format = ((MxDSAnim&) p_action).GetMediaFormat();
|
||||
switch (format) {
|
||||
case FOURCC(' ', 'F', 'L', 'C'):
|
||||
|
@ -197,7 +197,7 @@ const char* PresenterNameDispatch(const MxDSAction& p_action)
|
|||
}
|
||||
break;
|
||||
|
||||
case MxDSType_Sound:
|
||||
case MxDSObject::e_sound:
|
||||
format = ((MxDSSound&) p_action).GetMediaFormat();
|
||||
switch (format) {
|
||||
case FOURCC(' ', 'M', 'I', 'D'):
|
||||
|
@ -209,17 +209,17 @@ const char* PresenterNameDispatch(const MxDSAction& p_action)
|
|||
}
|
||||
break;
|
||||
|
||||
case MxDSType_SerialAction:
|
||||
case MxDSType_ParallelAction:
|
||||
case MxDSType_SelectAction:
|
||||
case MxDSObject::e_serialAction:
|
||||
case MxDSObject::e_parallelAction:
|
||||
case MxDSObject::e_selectAction:
|
||||
name = "MxCompositePresenter";
|
||||
break;
|
||||
|
||||
case MxDSType_Event:
|
||||
case MxDSObject::e_event:
|
||||
name = "MxEventPresenter";
|
||||
break;
|
||||
|
||||
case MxDSType_Still:
|
||||
case MxDSObject::e_still:
|
||||
name = "MxStillPresenter";
|
||||
break;
|
||||
}
|
||||
|
@ -252,5 +252,5 @@ MxEntity* MxPresenter::CreateEntity(const char* p_name)
|
|||
// FUNCTION: LEGO1 0x100b54c0
|
||||
MxBool MxPresenter::IsEnabled()
|
||||
{
|
||||
return this->m_action && this->m_action->GetFlags() & MxDSAction::Flag_Enabled;
|
||||
return this->m_action && this->m_action->GetFlags() & MxDSAction::c_enabled;
|
||||
}
|
||||
|
|
|
@ -71,7 +71,7 @@ void MxEventPresenter::ReadyTickle()
|
|||
CopyData(chunk);
|
||||
m_subscriber->DestroyChunk(chunk);
|
||||
ParseExtra();
|
||||
ProgressTickleState(TickleState_Starting);
|
||||
ProgressTickleState(e_starting);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -81,7 +81,7 @@ void MxEventPresenter::StartingTickle()
|
|||
MxStreamChunk* chunk = CurrentChunk();
|
||||
|
||||
if (chunk && m_action->GetElapsedTime() >= chunk->GetTime())
|
||||
ProgressTickleState(TickleState_Streaming);
|
||||
ProgressTickleState(e_streaming);
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100c2ef0
|
||||
|
@ -90,8 +90,8 @@ MxResult MxEventPresenter::PutData()
|
|||
MxAutoLocker lock(&m_criticalSection);
|
||||
|
||||
if (IsEnabled()) {
|
||||
if (m_currentTickleState >= TickleState_Streaming &&
|
||||
(m_currentTickleState <= TickleState_Repeating || m_currentTickleState == TickleState_Done)) {
|
||||
if (m_currentTickleState >= e_streaming &&
|
||||
(m_currentTickleState <= e_repeating || m_currentTickleState == e_done)) {
|
||||
if (m_currentChunk && m_currentChunk->GetLength()) {
|
||||
if (m_data[12] == 2) {
|
||||
const char* data = (const char*) m_currentChunk->GetData();
|
||||
|
@ -103,7 +103,7 @@ MxResult MxEventPresenter::PutData()
|
|||
variableTable->SetVariable(key, value);
|
||||
}
|
||||
|
||||
if (m_currentTickleState == TickleState_Streaming)
|
||||
if (m_currentTickleState == e_streaming)
|
||||
m_subscriber->DestroyChunk(m_currentChunk);
|
||||
m_currentChunk = NULL;
|
||||
}
|
||||
|
|
|
@ -129,7 +129,7 @@ void MxDiskStreamController::FUN_100c7980()
|
|||
if (m_unk0x3c.size() && m_unk0x8c < m_provider->GetStreamBuffersNum()) {
|
||||
buffer = new MxDSBuffer();
|
||||
|
||||
if (buffer->AllocateBuffer(m_provider->GetFileSize(), MxDSBufferType_Chunk) != SUCCESS) {
|
||||
if (buffer->AllocateBuffer(m_provider->GetFileSize(), MxDSBuffer::e_chunk) != SUCCESS) {
|
||||
if (buffer)
|
||||
delete buffer;
|
||||
return;
|
||||
|
@ -213,10 +213,10 @@ void MxDiskStreamController::FUN_100c7cb0(MxDSStreamingAction* p_action)
|
|||
void MxDiskStreamController::FUN_100c7ce0(MxDSBuffer* p_buffer)
|
||||
{
|
||||
switch (p_buffer->GetMode()) {
|
||||
case MxDSBufferType_Chunk:
|
||||
case MxDSBuffer::e_chunk:
|
||||
m_unk0x8c--;
|
||||
case MxDSBufferType_Allocate:
|
||||
case MxDSBufferType_Unknown:
|
||||
case MxDSBuffer::e_allocate:
|
||||
case MxDSBuffer::e_unknown:
|
||||
delete p_buffer;
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -174,7 +174,7 @@ MxResult MxDiskStreamProvider::FUN_100d1780(MxDSStreamingAction* p_action)
|
|||
if (!buffer)
|
||||
return FAILURE;
|
||||
|
||||
if (buffer->AllocateBuffer(GetFileSize(), MxDSBufferType_Allocate) != SUCCESS) {
|
||||
if (buffer->AllocateBuffer(GetFileSize(), MxDSBuffer::e_allocate) != SUCCESS) {
|
||||
delete buffer;
|
||||
return FAILURE;
|
||||
}
|
||||
|
@ -282,7 +282,7 @@ MxResult MxDiskStreamProvider::FUN_100d1b20(MxDSStreamingAction* p_action)
|
|||
MxU32 size = p_action->GetUnknowna0()->GetWriteOffset() - p_action->GetUnknown94() + p_action->GetBufferOffset() +
|
||||
(p_action->GetUnknowna4() ? p_action->GetUnknowna4()->GetWriteOffset() : 0);
|
||||
|
||||
if (buffer->AllocateBuffer(size, MxDSBufferType_Allocate) != SUCCESS) {
|
||||
if (buffer->AllocateBuffer(size, MxDSBuffer::e_allocate) != SUCCESS) {
|
||||
if (!buffer)
|
||||
return FAILURE;
|
||||
|
||||
|
@ -330,12 +330,12 @@ MxResult MxDiskStreamProvider::FUN_100d1b20(MxDSStreamingAction* p_action)
|
|||
if (!buffer3)
|
||||
return FAILURE;
|
||||
|
||||
if (buffer3->AllocateBuffer(size, MxDSBufferType_Allocate) == SUCCESS) {
|
||||
if (buffer3->AllocateBuffer(size, MxDSBuffer::e_allocate) == SUCCESS) {
|
||||
memcpy(buffer3->GetBuffer(), p_action->GetUnknowna4()->GetBuffer(), size);
|
||||
p_action->GetUnknowna4()->SetMode(MxDSBufferType_Allocate);
|
||||
p_action->GetUnknowna4()->SetMode(MxDSBuffer::e_allocate);
|
||||
delete p_action->GetUnknowna4();
|
||||
|
||||
buffer3->SetMode(MxDSBufferType_Unknown);
|
||||
buffer3->SetMode(MxDSBuffer::e_unknown);
|
||||
p_action->SetUnknowna4(buffer3);
|
||||
MxDSBuffer* buffer4 = p_action->GetUnknowna0();
|
||||
MxU32 unk0x14 = buffer4->GetUnknown14();
|
||||
|
|
|
@ -22,7 +22,7 @@ MxDSBuffer::MxDSBuffer()
|
|||
m_unk0x1c = 0;
|
||||
m_writeOffset = 0;
|
||||
m_bytesRemaining = 0;
|
||||
m_mode = MxDSBufferType_Preallocated;
|
||||
m_mode = e_preallocated;
|
||||
m_unk0x30 = 0;
|
||||
}
|
||||
|
||||
|
@ -31,12 +31,12 @@ MxDSBuffer::~MxDSBuffer()
|
|||
{
|
||||
if (m_pBuffer != NULL) {
|
||||
switch (m_mode) {
|
||||
case MxDSBufferType_Allocate:
|
||||
case MxDSBufferType_Unknown:
|
||||
case e_allocate:
|
||||
case e_unknown:
|
||||
delete[] m_pBuffer;
|
||||
break;
|
||||
|
||||
case MxDSBufferType_Chunk: {
|
||||
case e_chunk: {
|
||||
MxU32 offset = m_writeOffset / 1024;
|
||||
MxStreamer* streamer = Streamer();
|
||||
|
||||
|
@ -77,16 +77,16 @@ MxDSBuffer::~MxDSBuffer()
|
|||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100c6640
|
||||
MxResult MxDSBuffer::AllocateBuffer(MxU32 p_bufferSize, MxDSBufferType p_mode)
|
||||
MxResult MxDSBuffer::AllocateBuffer(MxU32 p_bufferSize, Type p_mode)
|
||||
{
|
||||
MxResult result = FAILURE;
|
||||
|
||||
switch (p_mode) {
|
||||
case MxDSBufferType_Allocate:
|
||||
case e_allocate:
|
||||
m_pBuffer = new MxU8[p_bufferSize];
|
||||
break;
|
||||
|
||||
case MxDSBufferType_Chunk: {
|
||||
case e_chunk: {
|
||||
MxStreamer* streamer = Streamer();
|
||||
|
||||
switch (p_bufferSize / 1024) {
|
||||
|
@ -150,7 +150,7 @@ MxResult MxDSBuffer::SetBufferPointer(MxU8* p_buffer, MxU32 p_size)
|
|||
m_pIntoBuffer2 = p_buffer;
|
||||
m_bytesRemaining = p_size;
|
||||
m_writeOffset = p_size;
|
||||
m_mode = MxDSBufferType_Preallocated;
|
||||
m_mode = e_preallocated;
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
|
@ -291,24 +291,24 @@ MxResult MxDSBuffer::ParseChunk(
|
|||
{
|
||||
MxResult result = SUCCESS;
|
||||
|
||||
if (m_unk0x30->GetFlags() & MxDSAction::Flag_Bit3 && m_unk0x30->GetUnknowna8() && p_header->GetTime() < 0) {
|
||||
if (m_unk0x30->GetFlags() & MxDSAction::c_bit3 && m_unk0x30->GetUnknowna8() && p_header->GetTime() < 0) {
|
||||
delete p_header;
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
p_header->SetTime(p_header->GetTime() + m_unk0x30->GetUnknowna8());
|
||||
|
||||
if (p_header->GetFlags() & MxDSChunk::Flag_Split) {
|
||||
if (p_header->GetFlags() & MxDSChunk::c_split) {
|
||||
MxU32 length = p_header->GetLength() + MxDSChunk::GetHeaderSize() + 8;
|
||||
MxDSBuffer* buffer = new MxDSBuffer();
|
||||
|
||||
if (buffer && buffer->AllocateBuffer(length, MxDSBufferType_Allocate) == SUCCESS &&
|
||||
if (buffer && buffer->AllocateBuffer(length, e_allocate) == SUCCESS &&
|
||||
buffer->CalcBytesRemaining((MxU8*) p_data) == SUCCESS) {
|
||||
*p_streamingAction = new MxDSStreamingAction((MxDSStreamingAction&) *p_action);
|
||||
|
||||
if (*p_streamingAction) {
|
||||
MxU16* flags = MxStreamChunk::IntoFlags(buffer->GetBuffer());
|
||||
*flags = p_header->GetFlags() & ~MxDSChunk::Flag_Split;
|
||||
*flags = p_header->GetFlags() & ~MxDSChunk::c_split;
|
||||
|
||||
delete p_header;
|
||||
(*p_streamingAction)->SetUnknowna0(buffer);
|
||||
|
@ -323,9 +323,9 @@ MxResult MxDSBuffer::ParseChunk(
|
|||
return FAILURE;
|
||||
}
|
||||
else {
|
||||
if (p_header->GetFlags() & MxDSChunk::Flag_End) {
|
||||
if (p_header->GetFlags() & MxDSChunk::c_end) {
|
||||
if (m_unk0x30->HasId(p_header->GetObjectId())) {
|
||||
if (m_unk0x30->GetFlags() & MxDSAction::Flag_Bit3 &&
|
||||
if (m_unk0x30->GetFlags() & MxDSAction::c_bit3 &&
|
||||
(m_unk0x30->GetLoopCount() > 1 || m_unk0x30->GetDuration() == -1)) {
|
||||
|
||||
if (p_action->GetObjectId() == p_header->GetObjectId()) {
|
||||
|
@ -456,7 +456,7 @@ MxResult MxDSBuffer::CalcBytesRemaining(MxU8* p_data)
|
|||
{
|
||||
MxResult result = FAILURE;
|
||||
|
||||
if (m_mode == MxDSBufferType_Allocate && m_bytesRemaining != 0) {
|
||||
if (m_mode == e_allocate && m_bytesRemaining != 0) {
|
||||
MxU32 bytesRead;
|
||||
MxU8* ptr;
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@ MxDSChunk::MxDSChunk()
|
|||
// FUNCTION: LEGO1 0x100be170
|
||||
MxDSChunk::~MxDSChunk()
|
||||
{
|
||||
if (m_flags & Flag_Bit1)
|
||||
if (m_flags & c_bit1)
|
||||
delete[] m_data;
|
||||
}
|
||||
|
||||
|
|
|
@ -119,7 +119,7 @@ void MxDSSubscriber::DestroyChunk(MxStreamChunk* p_chunk)
|
|||
if (p_chunk)
|
||||
delete p_chunk;
|
||||
}
|
||||
else if (p_chunk->GetFlags() & MxDSChunk::Flag_Bit1 && p_chunk)
|
||||
else if (p_chunk->GetFlags() & MxDSChunk::c_bit1 && p_chunk)
|
||||
delete p_chunk;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -124,22 +124,22 @@ MxU32 ReadData(MxU8* p_buffer, MxU32 p_size)
|
|||
data += MxDSChunk::Size(*psize);
|
||||
|
||||
if ((*MxDSChunk::IntoType(data2) == FOURCC('M', 'x', 'C', 'h')) &&
|
||||
(*MxStreamChunk::IntoFlags(data2) & MxDSChunk::Flag_Split)) {
|
||||
(*MxStreamChunk::IntoFlags(data2) & MxDSChunk::c_split)) {
|
||||
if (*MxStreamChunk::IntoObjectId(data2) == *MxStreamChunk::IntoObjectId(data3) &&
|
||||
(*MxStreamChunk::IntoFlags(data3) & MxDSChunk::Flag_Split) &&
|
||||
(*MxStreamChunk::IntoFlags(data3) & MxDSChunk::c_split) &&
|
||||
*MxStreamChunk::IntoTime(data2) == *MxStreamChunk::IntoTime(data3)) {
|
||||
MxDSBuffer::Append(data2, data3);
|
||||
continue;
|
||||
}
|
||||
else
|
||||
*MxStreamChunk::IntoFlags(data2) &= ~MxDSChunk::Flag_Split;
|
||||
*MxStreamChunk::IntoFlags(data2) &= ~MxDSChunk::c_split;
|
||||
}
|
||||
|
||||
data2 += MxDSChunk::Size(*MxDSChunk::IntoLength(data2));
|
||||
memcpy(data2, data3, MxDSChunk::Size(*psize));
|
||||
|
||||
if (*MxStreamChunk::IntoObjectId(data2) == id &&
|
||||
(*MxStreamChunk::IntoFlags(data2) & MxDSChunk::Flag_End))
|
||||
(*MxStreamChunk::IntoFlags(data2) & MxDSChunk::c_end))
|
||||
break;
|
||||
}
|
||||
else
|
||||
|
@ -151,6 +151,6 @@ MxU32 ReadData(MxU8* p_buffer, MxU32 p_size)
|
|||
} while (data < end);
|
||||
}
|
||||
|
||||
*MxStreamChunk::IntoFlags(data2) &= ~MxDSChunk::Flag_Split;
|
||||
*MxStreamChunk::IntoFlags(data2) &= ~MxDSChunk::c_split;
|
||||
return MxDSChunk::End(data2) - p_buffer;
|
||||
}
|
||||
|
|
|
@ -54,7 +54,7 @@ MxResult MxStreamChunk::SendChunk(MxStreamListMxDSSubscriber& p_subscriberList,
|
|||
{
|
||||
for (MxStreamListMxDSSubscriber::iterator it = p_subscriberList.begin(); it != p_subscriberList.end(); it++) {
|
||||
if ((*it)->GetObjectId() == m_objectId && (*it)->GetUnknown48() == p_obj24val) {
|
||||
if (m_flags & MxDSChunk::Flag_End && m_buffer) {
|
||||
if (m_flags & MxDSChunk::c_end && m_buffer) {
|
||||
m_buffer->ReleaseRef(this);
|
||||
m_buffer = NULL;
|
||||
}
|
||||
|
|
|
@ -82,7 +82,7 @@ MxResult MxStreamController::Open(const char* p_filename)
|
|||
MxAutoLocker lock(&m_criticalSection);
|
||||
|
||||
MakeSourceName(sourceName, p_filename);
|
||||
this->m_atom = MxAtomId(sourceName, LookupMode_LowerCase2);
|
||||
this->m_atom = MxAtomId(sourceName, e_lowerCase2);
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
|
@ -271,7 +271,7 @@ MxResult MxStreamController::FUN_100c1f00(MxDSAction* p_action)
|
|||
if (!chunk)
|
||||
return FAILURE;
|
||||
|
||||
chunk->SetFlags(MxDSChunk::Flag_Bit3);
|
||||
chunk->SetFlags(MxDSChunk::c_bit3);
|
||||
chunk->SetObjectId(objectId);
|
||||
|
||||
if (chunk->SendChunk(m_subscriberList, FALSE, p_action->GetUnknown24()) != SUCCESS)
|
||||
|
|
|
@ -50,7 +50,7 @@ MxStreamController* MxStreamer::Open(const char* p_name, MxU16 p_lookupType)
|
|||
|
||||
if (!GetOpenStream(p_name)) {
|
||||
switch (p_lookupType) {
|
||||
case e_DiskStream:
|
||||
case e_diskStream:
|
||||
stream = new MxDiskStreamController();
|
||||
break;
|
||||
case e_RAMStream:
|
||||
|
@ -84,11 +84,11 @@ MxLong MxStreamer::Close(const char* p_name)
|
|||
else {
|
||||
#ifdef COMPAT_MODE
|
||||
{
|
||||
MxStreamerNotification notification(MXSTREAMER_DELETE_NOTIFY, NULL, c);
|
||||
MxStreamerNotification notification(c_notificationStreamer, NULL, c);
|
||||
NotificationManager()->Send(this, ¬ification);
|
||||
}
|
||||
#else
|
||||
NotificationManager()->Send(this, &MxStreamerNotification(MXSTREAMER_DELETE_NOTIFY, NULL, c));
|
||||
NotificationManager()->Send(this, &MxStreamerNotification(c_notificationStreamer, NULL, c));
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -184,7 +184,7 @@ MxBool MxStreamer::FUN_100b9b30(MxDSObject& p_dsObject)
|
|||
// FUNCTION: LEGO1 0x100b9b60
|
||||
MxLong MxStreamer::Notify(MxParam& p_param)
|
||||
{
|
||||
if (((MxNotificationParam&) p_param).GetNotification() == MXSTREAMER_DELETE_NOTIFY) {
|
||||
if (((MxNotificationParam&) p_param).GetNotification() == c_notificationStreamer) {
|
||||
MxDSAction ds;
|
||||
|
||||
ds.SetUnknown24(-2);
|
||||
|
@ -196,11 +196,11 @@ MxLong MxStreamer::Notify(MxParam& p_param)
|
|||
else {
|
||||
#ifdef COMPAT_MODE
|
||||
{
|
||||
MxStreamerNotification notification(MXSTREAMER_DELETE_NOTIFY, NULL, c);
|
||||
MxStreamerNotification notification(c_notificationStreamer, NULL, c);
|
||||
NotificationManager()->Send(this, ¬ification);
|
||||
}
|
||||
#else
|
||||
NotificationManager()->Send(this, &MxStreamerNotification(MXSTREAMER_DELETE_NOTIFY, NULL, c));
|
||||
NotificationManager()->Send(this, &MxStreamerNotification(c_notificationStreamer, NULL, c));
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
|
|
@ -34,7 +34,7 @@ void MxDisplaySurface::Init()
|
|||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100ba640
|
||||
void MxDisplaySurface::FUN_100ba640()
|
||||
void MxDisplaySurface::ClearScreen()
|
||||
{
|
||||
MxS32 backBuffers;
|
||||
DDSURFACEDESC desc;
|
||||
|
|
|
@ -12,8 +12,8 @@ DECOMP_SIZE_ASSERT(MxFlcPresenter, 0x68);
|
|||
MxFlcPresenter::MxFlcPresenter()
|
||||
{
|
||||
this->m_flicHeader = NULL;
|
||||
this->m_flags &= ~Flag_Bit2;
|
||||
this->m_flags &= ~Flag_Bit3;
|
||||
this->m_flags &= ~c_bit2;
|
||||
this->m_flags &= ~c_bit3;
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100b3420
|
||||
|
|
|
@ -20,8 +20,8 @@ MxLoopingFlcPresenter::~MxLoopingFlcPresenter()
|
|||
void MxLoopingFlcPresenter::Init()
|
||||
{
|
||||
this->m_unk0x68 = 0;
|
||||
this->m_flags &= ~Flag_Bit2;
|
||||
this->m_flags &= ~Flag_Bit3;
|
||||
this->m_flags &= ~c_bit2;
|
||||
this->m_flags &= ~c_bit3;
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100b4430
|
||||
|
@ -40,8 +40,8 @@ void MxLoopingFlcPresenter::NextFrame()
|
|||
{
|
||||
MxStreamChunk* chunk = NextChunk();
|
||||
|
||||
if (chunk->GetFlags() & MxDSChunk::Flag_End)
|
||||
ProgressTickleState(TickleState_Repeating);
|
||||
if (chunk->GetFlags() & MxDSChunk::c_end)
|
||||
ProgressTickleState(e_repeating);
|
||||
else {
|
||||
LoadFrame(chunk);
|
||||
LoopChunk(chunk);
|
||||
|
|
|
@ -21,8 +21,8 @@ MxLoopingSmkPresenter::~MxLoopingSmkPresenter()
|
|||
void MxLoopingSmkPresenter::Init()
|
||||
{
|
||||
this->m_elapsedDuration = 0;
|
||||
this->m_flags &= ~Flag_Bit2;
|
||||
this->m_flags &= ~Flag_Bit3;
|
||||
this->m_flags &= ~c_bit2;
|
||||
this->m_flags &= ~c_bit3;
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100b49d0
|
||||
|
@ -51,8 +51,8 @@ void MxLoopingSmkPresenter::NextFrame()
|
|||
{
|
||||
MxStreamChunk* chunk = NextChunk();
|
||||
|
||||
if (chunk->GetFlags() & MxDSChunk::Flag_End)
|
||||
ProgressTickleState(TickleState_Repeating);
|
||||
if (chunk->GetFlags() & MxDSChunk::c_end)
|
||||
ProgressTickleState(e_repeating);
|
||||
else {
|
||||
LoadFrame(chunk);
|
||||
LoopChunk(chunk);
|
||||
|
@ -66,7 +66,7 @@ void MxLoopingSmkPresenter::NextFrame()
|
|||
void MxLoopingSmkPresenter::VTable0x8c()
|
||||
{
|
||||
if (m_action->GetDuration() < m_elapsedDuration)
|
||||
ProgressTickleState(TickleState_unk5);
|
||||
ProgressTickleState(e_unk5);
|
||||
else {
|
||||
MxStreamChunk* chunk;
|
||||
m_loopingChunkCursor->Current(chunk);
|
||||
|
@ -108,7 +108,7 @@ void MxLoopingSmkPresenter::RepeatingTickle()
|
|||
|
||||
m_loopingChunkCursor->Next(chunk);
|
||||
|
||||
if (m_currentTickleState != TickleState_Repeating)
|
||||
if (m_currentTickleState != e_repeating)
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -23,8 +23,8 @@ void MxSmkPresenter::Init()
|
|||
{
|
||||
m_currentFrame = 0;
|
||||
memset(&m_mxSmack, 0, sizeof(m_mxSmack));
|
||||
m_flags &= ~Flag_Bit2;
|
||||
m_flags &= ~Flag_Bit3;
|
||||
m_flags &= ~c_bit2;
|
||||
m_flags &= ~c_bit3;
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100b3900
|
||||
|
|
|
@ -75,13 +75,13 @@ void MxStillPresenter::LoadFrame(MxStreamChunk* p_chunk)
|
|||
MxRect32 rect(x, y, width + x, height + y);
|
||||
MVideoManager()->InvalidateRect(rect);
|
||||
|
||||
if (m_flags & Flag_Bit2) {
|
||||
if (m_flags & c_bit2) {
|
||||
undefined4 und = 0;
|
||||
m_unk0x58 = MxOmni::GetInstance()->GetVideoManager()->GetDisplaySurface()->VTable0x44(
|
||||
m_bitmap,
|
||||
&und,
|
||||
(m_flags & Flag_Bit4) / 8,
|
||||
m_action->GetFlags() & MxDSAction::Flag_Bit4
|
||||
(m_flags & c_bit4) / 8,
|
||||
m_action->GetFlags() & MxDSAction::c_bit4
|
||||
);
|
||||
|
||||
delete m_alpha;
|
||||
|
@ -91,9 +91,9 @@ void MxStillPresenter::LoadFrame(MxStreamChunk* p_chunk)
|
|||
m_bitmap = NULL;
|
||||
|
||||
if (m_unk0x58 && und)
|
||||
m_flags |= Flag_Bit3;
|
||||
m_flags |= c_bit3;
|
||||
else
|
||||
m_flags &= ~Flag_Bit3;
|
||||
m_flags &= ~c_bit3;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -110,7 +110,7 @@ void MxStillPresenter::StartingTickle()
|
|||
{
|
||||
MxVideoPresenter::StartingTickle();
|
||||
|
||||
if (m_currentTickleState == TickleState_Streaming && ((MxDSMediaAction*) m_action)->GetPaletteManagement())
|
||||
if (m_currentTickleState == e_streaming && ((MxDSMediaAction*) m_action)->GetPaletteManagement())
|
||||
RealizePalette();
|
||||
}
|
||||
|
||||
|
@ -122,7 +122,7 @@ void MxStillPresenter::StreamingTickle()
|
|||
if (chunk && m_action->GetElapsedTime() >= chunk->GetTime()) {
|
||||
m_chunkTime = chunk->GetTime();
|
||||
NextFrame();
|
||||
ProgressTickleState(TickleState_Repeating);
|
||||
ProgressTickleState(e_repeating);
|
||||
|
||||
if (m_action->GetDuration() == -1 && m_compositePresenter)
|
||||
m_compositePresenter->VTable0x60(this);
|
||||
|
@ -134,7 +134,7 @@ void MxStillPresenter::RepeatingTickle()
|
|||
{
|
||||
if (m_action->GetDuration() != -1) {
|
||||
if (m_action->GetElapsedTime() >= m_action->GetStartTime() + m_action->GetDuration())
|
||||
ProgressTickleState(TickleState_unk5);
|
||||
ProgressTickleState(e_unk5);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -185,8 +185,8 @@ void MxStillPresenter::ParseExtra()
|
|||
{
|
||||
MxPresenter::ParseExtra();
|
||||
|
||||
if (m_action->GetFlags() & MxDSAction::Flag_Bit5)
|
||||
m_flags |= Flag_Bit4;
|
||||
if (m_action->GetFlags() & MxDSAction::c_bit5)
|
||||
m_flags |= c_bit4;
|
||||
|
||||
MxU32 len = m_action->GetExtraLength();
|
||||
|
||||
|
@ -207,9 +207,9 @@ void MxStillPresenter::ParseExtra()
|
|||
}
|
||||
|
||||
if (KeyValueStringParse(output, g_strBmpIsmap, buf)) {
|
||||
m_flags |= Flag_Bit5;
|
||||
m_flags &= ~Flag_Bit2;
|
||||
m_flags &= ~Flag_Bit3;
|
||||
m_flags |= c_bit5;
|
||||
m_flags &= ~c_bit2;
|
||||
m_flags &= ~c_bit3;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -117,16 +117,16 @@ void MxVideoPresenter::Init()
|
|||
m_unk0x5c = 1;
|
||||
m_unk0x58 = NULL;
|
||||
m_unk0x60 = -1;
|
||||
m_flags &= ~Flag_Bit1;
|
||||
m_flags &= ~c_bit1;
|
||||
|
||||
if (MVideoManager() != NULL) {
|
||||
MVideoManager();
|
||||
m_flags |= Flag_Bit2;
|
||||
m_flags &= ~Flag_Bit3;
|
||||
m_flags |= c_bit2;
|
||||
m_flags &= ~c_bit3;
|
||||
}
|
||||
|
||||
m_flags &= ~Flag_Bit4;
|
||||
m_flags &= ~Flag_Bit5;
|
||||
m_flags &= ~c_bit4;
|
||||
m_flags &= ~c_bit5;
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100b27b0
|
||||
|
@ -138,8 +138,8 @@ void MxVideoPresenter::Destroy(MxBool p_fromDestructor)
|
|||
if (m_unk0x58) {
|
||||
m_unk0x58->Release();
|
||||
m_unk0x58 = NULL;
|
||||
m_flags &= ~Flag_Bit2;
|
||||
m_flags &= ~Flag_Bit3;
|
||||
m_flags &= ~c_bit2;
|
||||
m_flags &= ~c_bit3;
|
||||
}
|
||||
|
||||
if (MVideoManager() && (m_alpha || m_bitmap)) {
|
||||
|
@ -168,9 +168,9 @@ void MxVideoPresenter::NextFrame()
|
|||
{
|
||||
MxStreamChunk* chunk = NextChunk();
|
||||
|
||||
if (chunk->GetFlags() & MxDSChunk::Flag_End) {
|
||||
if (chunk->GetFlags() & MxDSChunk::c_end) {
|
||||
m_subscriber->DestroyChunk(chunk);
|
||||
ProgressTickleState(TickleState_Repeating);
|
||||
ProgressTickleState(e_repeating);
|
||||
}
|
||||
else {
|
||||
LoadFrame(chunk);
|
||||
|
@ -182,7 +182,7 @@ void MxVideoPresenter::NextFrame()
|
|||
MxBool MxVideoPresenter::IsHit(MxS32 p_x, MxS32 p_y)
|
||||
{
|
||||
MxDSAction* action = GetAction();
|
||||
if ((action == NULL) || (((action->GetFlags() & MxDSAction::Flag_Bit11) == 0) && !IsEnabled()) ||
|
||||
if ((action == NULL) || (((action->GetFlags() & MxDSAction::c_bit11) == 0) && !IsEnabled()) ||
|
||||
(!m_bitmap && !m_alpha))
|
||||
return FALSE;
|
||||
|
||||
|
@ -234,7 +234,7 @@ MxBool MxVideoPresenter::IsHit(MxS32 p_x, MxS32 p_y)
|
|||
if (m_flags & 0x10)
|
||||
return (MxBool) *pixel;
|
||||
|
||||
if ((GetAction()->GetFlags() & MxDSAction::Flag_Bit4) && *pixel == 0)
|
||||
if ((GetAction()->GetFlags() & MxDSAction::c_bit4) && *pixel == 0)
|
||||
return FALSE;
|
||||
|
||||
return TRUE;
|
||||
|
@ -284,7 +284,7 @@ void MxVideoPresenter::PutFrame()
|
|||
LPDIRECTDRAWSURFACE ddSurface = displaySurface->GetDirectDrawSurface2();
|
||||
|
||||
MxRect32 rectSrc, rectDest;
|
||||
if (m_action->GetFlags() & MxDSAction::Flag_Bit5) {
|
||||
if (m_action->GetFlags() & MxDSAction::c_bit5) {
|
||||
if (m_unk0x58) {
|
||||
// TODO: Match
|
||||
rectSrc.SetPoint(MxPoint32(0, 0));
|
||||
|
@ -340,7 +340,7 @@ void MxVideoPresenter::PutFrame()
|
|||
rectDest.SetBottom(rectDest.GetTop() + regionRect->GetHeight());
|
||||
}
|
||||
|
||||
if (m_action->GetFlags() & MxDSAction::Flag_Bit4) {
|
||||
if (m_action->GetFlags() & MxDSAction::c_bit4) {
|
||||
if (m_unk0x58) {
|
||||
if (PrepareRects(rectDest, rectSrc) >= 0)
|
||||
ddSurface->Blt((LPRECT) &rectDest, m_unk0x58, (LPRECT) &rectSrc, DDBLT_KEYSRC, NULL);
|
||||
|
@ -387,7 +387,7 @@ void MxVideoPresenter::ReadyTickle()
|
|||
LoadHeader(chunk);
|
||||
m_subscriber->DestroyChunk(chunk);
|
||||
ParseExtra();
|
||||
ProgressTickleState(TickleState_Starting);
|
||||
ProgressTickleState(e_starting);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -398,14 +398,14 @@ void MxVideoPresenter::StartingTickle()
|
|||
|
||||
if (chunk && m_action->GetElapsedTime() >= chunk->GetTime()) {
|
||||
CreateBitmap();
|
||||
ProgressTickleState(TickleState_Streaming);
|
||||
ProgressTickleState(e_streaming);
|
||||
}
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100b2fe0
|
||||
void MxVideoPresenter::StreamingTickle()
|
||||
{
|
||||
if (m_action->GetFlags() & MxDSAction::Flag_Bit10) {
|
||||
if (m_action->GetFlags() & MxDSAction::c_bit10) {
|
||||
if (!m_currentChunk)
|
||||
MxMediaPresenter::StreamingTickle();
|
||||
|
||||
|
@ -429,13 +429,13 @@ void MxVideoPresenter::StreamingTickle()
|
|||
LoadFrame(m_currentChunk);
|
||||
m_subscriber->DestroyChunk(m_currentChunk);
|
||||
m_currentChunk = NULL;
|
||||
m_flags |= Flag_Bit1;
|
||||
m_flags |= c_bit1;
|
||||
|
||||
if (m_currentTickleState != TickleState_Streaming)
|
||||
if (m_currentTickleState != e_streaming)
|
||||
break;
|
||||
}
|
||||
|
||||
if (m_flags & Flag_Bit1)
|
||||
if (m_flags & c_bit1)
|
||||
m_unk0x5c = 5;
|
||||
}
|
||||
}
|
||||
|
@ -444,7 +444,7 @@ void MxVideoPresenter::StreamingTickle()
|
|||
void MxVideoPresenter::RepeatingTickle()
|
||||
{
|
||||
if (IsEnabled()) {
|
||||
if (m_action->GetFlags() & MxDSAction::Flag_Bit10) {
|
||||
if (m_action->GetFlags() & MxDSAction::c_bit10) {
|
||||
if (!m_currentChunk)
|
||||
MxMediaPresenter::RepeatingTickle();
|
||||
|
||||
|
@ -467,13 +467,13 @@ void MxVideoPresenter::RepeatingTickle()
|
|||
|
||||
LoadFrame(m_currentChunk);
|
||||
m_currentChunk = NULL;
|
||||
m_flags |= Flag_Bit1;
|
||||
m_flags |= c_bit1;
|
||||
|
||||
if (m_currentTickleState != TickleState_Repeating)
|
||||
if (m_currentTickleState != e_repeating)
|
||||
break;
|
||||
}
|
||||
|
||||
if (m_flags & Flag_Bit1)
|
||||
if (m_flags & c_bit1)
|
||||
m_unk0x5c = 5;
|
||||
}
|
||||
}
|
||||
|
@ -490,10 +490,10 @@ void MxVideoPresenter::Unk5Tickle()
|
|||
m_unk0x60 = m_action->GetElapsedTime();
|
||||
|
||||
if (m_action->GetElapsedTime() >= m_unk0x60 + ((MxDSMediaAction*) m_action)->GetSustainTime())
|
||||
ProgressTickleState(TickleState_Done);
|
||||
ProgressTickleState(e_done);
|
||||
}
|
||||
else
|
||||
ProgressTickleState(TickleState_Done);
|
||||
ProgressTickleState(e_done);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -535,7 +535,7 @@ MxResult MxVideoPresenter::PutData()
|
|||
{
|
||||
MxAutoLocker lock(&m_criticalSection);
|
||||
|
||||
if (IsEnabled() && m_currentTickleState >= TickleState_Streaming && m_currentTickleState <= TickleState_unk5)
|
||||
if (IsEnabled() && m_currentTickleState >= e_streaming && m_currentTickleState <= e_unk5)
|
||||
PutFrame();
|
||||
|
||||
return SUCCESS;
|
||||
|
|
|
@ -17,7 +17,7 @@ OrientableROI::OrientableROI()
|
|||
IDENTMAT4(m_local2world);
|
||||
|
||||
m_unk0xd4 = 0;
|
||||
m_unk0xd8 |= Flag_Bit1 | Flag_Bit2;
|
||||
m_unk0xd8 |= c_bit1 | c_bit2;
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100a5910
|
||||
|
|
|
@ -10,8 +10,8 @@
|
|||
class OrientableROI : public ROI {
|
||||
public:
|
||||
enum {
|
||||
Flag_Bit1 = 0x01,
|
||||
Flag_Bit2 = 0x02
|
||||
c_bit1 = 0x01,
|
||||
c_bit2 = 0x02
|
||||
};
|
||||
|
||||
OrientableROI();
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
ClassName: '^[A-Z][a-zA-Z0-9]+$'
|
||||
CppMethod: '^operator|^FUN_[a-f0-9]{8}$|^VTable0x[a-f0-9]{1,8}$|^(?!VTable)[A-Z][a-zA-Z0-9]+$'
|
||||
# EnumConstantName
|
||||
EnumName: '^\(unnamed|^[A-Z][a-zA-Z0-9]+$'
|
||||
EnumConstantName: '^(c_|e_)[a-z][a-zA-Z0-9]+$'
|
||||
FunctionName: '^operator|^FUN_[a-f0-9]{8}$|^VTable0x[a-f0-9]{1,8}$|^(?!VTable)[A-Z][a-zA-Z0-9]+$'
|
||||
ParameterName: '^p_(unk0x[a-f0-9]{1,8}$|(?!unk)[a-z][a-zA-Z0-9]*)$|^$'
|
||||
StructName: '^\(anon|^\(unnamed|^[A-Z][a-zA-Z0-9]+$'
|
||||
|
|
|
@ -12,6 +12,7 @@ m_HWDesc: 'Allow this variable name'
|
|||
m_HELDesc: 'Allow this variable name'
|
||||
p_HWDesc: 'Allow this variable name'
|
||||
p_HELDesc: 'Allow this variable name'
|
||||
e_RAMStream: 'Allow this enum constant'
|
||||
p_milliseconds: 'Probably a bug with function call'
|
||||
m_increaseAmount: "Can't currently detect member in union"
|
||||
m_increaseFactor: "Can't currently detect member in union"
|
Loading…
Reference in a new issue