mirror of
https://github.com/isledecomp/isle.git
synced 2025-10-25 09:24:17 +00: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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user