mirror of
https://github.com/isledecomp/isle.git
synced 2026-01-28 10:41:15 +00:00
Match functions, style, refactor visible
This commit is contained in:
parent
829fb2ba6f
commit
8a0ba83ddf
@ -36,7 +36,7 @@ class LegoModelPresenter : public MxVideoPresenter {
|
||||
void ParseExtra() override; // vtable+0x30
|
||||
void Destroy() override; // vtable+0x38
|
||||
|
||||
MxResult FUN_1007ff70(MxDSChunk& p_chunk, LegoEntity* p_entity, undefined p_modelUnknown0x34, LegoWorld* p_world);
|
||||
MxResult FUN_1007ff70(MxDSChunk& p_chunk, LegoEntity* p_entity, MxBool p_roiVisible, LegoWorld* p_world);
|
||||
|
||||
inline void Reset()
|
||||
{
|
||||
|
||||
@ -71,7 +71,7 @@ class LegoNavController : public MxCore {
|
||||
MxBool p_urs
|
||||
);
|
||||
static void SetLocation(MxU32 p_location);
|
||||
void UpdateCameraLocation(char* p_location);
|
||||
static void UpdateCameraLocation(const char* p_location);
|
||||
|
||||
// SYNTHETIC: LEGO1 0x10054c10
|
||||
// LegoNavController::`scalar deleting destructor'
|
||||
|
||||
@ -31,6 +31,10 @@ const char* g_varCURSOR = "CURSOR";
|
||||
// STRING: LEGO1 0x100f3a1c
|
||||
const char* g_varWHOAMI = "WHO_AM_I";
|
||||
|
||||
// GLOBAL: LEGO1 0x100f3a50
|
||||
// STRING: LEGO1 0x100f3a18
|
||||
const char* g_delimiter2 = " \t";
|
||||
|
||||
// GLOBAL: LEGO1 0x100f3a54
|
||||
// STRING: LEGO1 0x100f3a10
|
||||
const char* g_varHIDE = "HIDE";
|
||||
@ -59,15 +63,14 @@ const char* g_nick = "Nick";
|
||||
// STRING: LEGO1 0x100f39e0
|
||||
const char* g_laura = "Laura";
|
||||
|
||||
extern const char* g_delimiter;
|
||||
|
||||
// FUNCTION: LEGO1 0x10037d00
|
||||
void VisibilityVariable::SetValue(const char* p_value)
|
||||
{
|
||||
MxVariable::SetValue(p_value);
|
||||
|
||||
if (p_value) {
|
||||
char* instruction = strtok(m_value.GetDataPtr(), g_delimiter);
|
||||
char* name = strtok(NULL, g_delimiter);
|
||||
char* instruction = strtok(m_value.GetDataPtr(), g_delimiter2);
|
||||
char* name = strtok(NULL, g_delimiter2);
|
||||
MxBool show;
|
||||
|
||||
if (!strcmpi(instruction, g_varHIDE)) {
|
||||
|
||||
@ -362,8 +362,9 @@ MxBool LegoNavController::CalculateNewPosDir(
|
||||
}
|
||||
|
||||
// STUB: LEGO1 0x10055500
|
||||
void LegoNavController::UpdateCameraLocation(char* p_location)
|
||||
void LegoNavController::UpdateCameraLocation(const char* p_location)
|
||||
{
|
||||
// TODO
|
||||
}
|
||||
|
||||
// STUB: LEGO1 0x10055620
|
||||
|
||||
@ -162,7 +162,7 @@ void LegoAnimPresenter::FUN_100692b0()
|
||||
roi = CharacterManager()->FUN_10083500(src, TRUE);
|
||||
|
||||
if (roi != NULL && str[0] == '*') {
|
||||
roi->SetVisibility(0);
|
||||
roi->SetVisibility(FALSE);
|
||||
}
|
||||
}
|
||||
else if (unk0x04 == 4) {
|
||||
@ -174,7 +174,7 @@ void LegoAnimPresenter::FUN_100692b0()
|
||||
roi = CharacterManager()->FUN_10085a80(und, src, 1);
|
||||
|
||||
if (roi != NULL) {
|
||||
roi->SetVisibility(0);
|
||||
roi->SetVisibility(FALSE);
|
||||
}
|
||||
|
||||
delete[] src;
|
||||
|
||||
@ -208,7 +208,7 @@ MxResult LegoModelPresenter::CreateROI(MxDSChunk* p_chunk)
|
||||
MxResult LegoModelPresenter::FUN_1007ff70(
|
||||
MxDSChunk& p_chunk,
|
||||
LegoEntity* p_entity,
|
||||
undefined p_modelUnknown0x34,
|
||||
undefined p_roiVisible,
|
||||
LegoWorld* p_world
|
||||
)
|
||||
{
|
||||
@ -222,7 +222,7 @@ MxResult LegoModelPresenter::FUN_1007ff70(
|
||||
}
|
||||
|
||||
if (m_roi != NULL) {
|
||||
m_roi->SetVisibility(p_modelUnknown0x34);
|
||||
m_roi->SetVisibility(p_roiVisible);
|
||||
}
|
||||
|
||||
if (p_entity != NULL) {
|
||||
|
||||
@ -296,8 +296,8 @@ MxLong Infocenter::HandleEndAction(MxEndActionNotificationParam& p_param)
|
||||
m_currentCutscene = e_noIntro;
|
||||
return 1;
|
||||
case 2:
|
||||
SetROIVisible(g_object2x4red, 0);
|
||||
SetROIVisible(g_object2x4grn, 0);
|
||||
SetROIVisible(g_object2x4red, FALSE);
|
||||
SetROIVisible(g_object2x4grn, FALSE);
|
||||
BackgroundAudioManager()->RaiseVolume();
|
||||
return 1;
|
||||
case 4:
|
||||
@ -329,7 +329,7 @@ MxLong Infocenter::HandleEndAction(MxEndActionNotificationParam& p_param)
|
||||
}
|
||||
|
||||
m_infocenterState->SetUnknown0x74(2);
|
||||
SetROIVisible("infoman", 1);
|
||||
SetROIVisible("infoman", TRUE);
|
||||
return 1;
|
||||
case 12:
|
||||
if (action->GetObjectId() == m_currentInfomainScript) {
|
||||
@ -1067,15 +1067,15 @@ MxLong Infocenter::HandleNotification0(MxNotificationParam& p_param)
|
||||
}
|
||||
|
||||
PlayAction(objectId);
|
||||
SetROIVisible(g_object2x4red, 0);
|
||||
SetROIVisible(g_object2x4grn, 0);
|
||||
SetROIVisible(g_object2x4red, FALSE);
|
||||
SetROIVisible(g_object2x4grn, FALSE);
|
||||
return 1;
|
||||
}
|
||||
case 6:
|
||||
if (m_infocenterState->GetUnknown0x74() == 8) {
|
||||
StopCurrentAction();
|
||||
SetROIVisible(g_object2x4red, 0);
|
||||
SetROIVisible(g_object2x4grn, 0);
|
||||
SetROIVisible(g_object2x4red, FALSE);
|
||||
SetROIVisible(g_object2x4grn, FALSE);
|
||||
m_infocenterState->SetUnknown0x74(2);
|
||||
PlayAction(InfomainScript::c_iicb28in_RunAnim);
|
||||
return 1;
|
||||
|
||||
@ -773,11 +773,11 @@ void Isle::Enable(MxBool p_enable)
|
||||
FUN_10015820(FALSE, LegoOmni::c_disableInput | LegoOmni::c_disable3d | LegoOmni::c_clearScreen);
|
||||
}
|
||||
|
||||
SetROIVisible("stretch", 0);
|
||||
SetROIVisible("bird", 0);
|
||||
SetROIVisible("rcred", 0);
|
||||
SetROIVisible("towtk", 0);
|
||||
SetROIVisible("pizpie", 0);
|
||||
SetROIVisible("stretch", FALSE);
|
||||
SetROIVisible("bird", FALSE);
|
||||
SetROIVisible("rcred", FALSE);
|
||||
SetROIVisible("towtk", FALSE);
|
||||
SetROIVisible("pizpie", FALSE);
|
||||
}
|
||||
else {
|
||||
if (InputManager()->GetWorld() == this) {
|
||||
|
||||
@ -324,7 +324,7 @@ void RegistrationBook::ReadyWorld()
|
||||
|
||||
LegoROI* infoman = FindROI(g_infoman);
|
||||
if (infoman != NULL) {
|
||||
infoman->SetVisibility(0);
|
||||
infoman->SetVisibility(FALSE);
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
||||
@ -112,16 +112,16 @@ class ROI {
|
||||
int GetLODCount() const { return lods ? lods->Size() : 0; }
|
||||
const CompoundObject* GetComp() const { return comp; }
|
||||
|
||||
inline char GetVisibility() { return m_visible; }
|
||||
inline void SetVisibility(char p_visible) { m_visible = p_visible; }
|
||||
inline unsigned char GetVisibility() { return m_visible; }
|
||||
inline void SetVisibility(unsigned char p_visible) { m_visible = p_visible; }
|
||||
|
||||
// SYNTHETIC: LEGO1 0x100a5d60
|
||||
// ROI::`scalar deleting destructor'
|
||||
|
||||
protected:
|
||||
CompoundObject* comp; // 0x04
|
||||
LODListBase* lods; // 0x08
|
||||
char m_visible; // 0x0c
|
||||
CompoundObject* comp; // 0x04
|
||||
LODListBase* lods; // 0x08
|
||||
unsigned char m_visible; // 0x0c
|
||||
};
|
||||
|
||||
// TEMPLATE: LEGO1 0x10084930
|
||||
|
||||
Loading…
Reference in New Issue
Block a user