Compare commits

...

3 Commits

Author SHA1 Message Date
Fabian Neundorf
0442fadc0e Clear unknown in InfocenterState (#1657) 2025-07-26 00:58:49 +02:00
Fabian Neundorf
ddaf497cc4 Clear unknowns in MxVideoPresenter (#1656) 2025-07-26 00:16:36 +02:00
jonschz
d555df6a58 Add BETA10 matches on LegoWEGEdge and others (#1655)
Co-authored-by: jonschz <jonschz@users.noreply.github.com>
2025-07-25 23:49:16 +02:00
22 changed files with 297 additions and 175 deletions

View File

@@ -18,6 +18,25 @@ class LegoControlManagerNotificationParam;
// SIZE 0x94
class InfocenterState : public LegoState {
public:
enum {
e_playCutscene = 0,
e_introCancelled = 1,
e_notRegistered = 2,
e_newState = 3,
e_selectedSave = 4,
e_selectedCharacterAndDestination = 5,
// e_6 = 6,
// e_7 = 7,
e_exitQueried = 8,
// e_9 = 9,
// e_10 = 10,
e_welcomeAnimation = 11,
e_exiting = 12,
e_playCredits = 13,
e_exitingToIsland = 14,
e_backToInfoAct1 = 15,
};
InfocenterState();
~InfocenterState() override;
@@ -72,7 +91,7 @@ public:
Playlist m_returnDialogue[3]; // 0x20
Playlist m_leaveDialogue[3]; // 0x44
Playlist m_bricksterDialogue; // 0x68
MxU32 m_unk0x74; // 0x74
MxU32 m_state; // 0x74
MxStillPresenter* m_letters[7]; // 0x78
};

View File

@@ -31,6 +31,7 @@ typedef set<LegoPathActor*, LegoPathActorSetCompare> LegoPathActorSet;
typedef set<LegoAnimPresenter*, LegoAnimPresenterSetCompare> LegoAnimPresenterSet;
// VTABLE: LEGO1 0x100d8618
// VTABLE: BETA10 0x101bdd58
// SIZE 0x74
class LegoPathBoundary : public LegoWEGEdge {
public:
@@ -57,6 +58,7 @@ public:
LegoAnimPresenterSet& GetPresenters() { return m_presenters; }
// SYNTHETIC: LEGO1 0x10047a80
// SYNTHETIC: BETA10 0x100bd300
// LegoPathBoundary::`vector deleting destructor'
private:

View File

@@ -2812,7 +2812,11 @@ MxResult LegoAnimationManager::FUN_10064880(const char* p_name, MxS32 p_unk0x0c,
// FUNCTION: BETA10 0x10045daf
void LegoAnimationManager::FUN_100648f0(LegoTranInfo* p_tranInfo, MxLong p_unk0x404)
{
if (m_unk0x402 && p_tranInfo->m_unk0x14) {
if (
#ifndef BETA10
m_unk0x402 &&
#endif
p_tranInfo->m_unk0x14) {
p_tranInfo->m_flags |= LegoTranInfo::c_bit1;
m_unk0x430 = TRUE;
m_unk0x42c = p_tranInfo;
@@ -2833,11 +2837,13 @@ void LegoAnimationManager::FUN_100648f0(LegoTranInfo* p_tranInfo, MxLong p_unk0x
if (location != NULL) {
CalcLocalTransform(location->m_position, location->m_direction, location->m_up, m_unk0x484);
m_unk0x4cc.SetStartEnd(m_unk0x43c, m_unk0x484);
#ifndef BETA10
m_unk0x4cc.NormalizeDirection();
}
else {
p_tranInfo->m_flags &= ~LegoTranInfo::c_bit1;
m_unk0x430 = FALSE;
#endif
}
Mx3DPointFloat vec;

View File

@@ -84,7 +84,7 @@ MxBool MxControlPresenter::CheckButtonDown(MxS32 p_x, MxS32 p_y, MxPresenter* p_
assert(map && map->IsA("MxStillPresenter"));
if (presenter == map || map->GetDisplayZ() < presenter->GetDisplayZ()) {
if (map->VTable0x7c()) {
if (map->HasFrameBitmapOrAlpha()) {
MxRect32 rect(0, 0, map->GetWidth() - 1, map->GetHeight() - 1);
rect += map->GetLocation();

View File

@@ -666,10 +666,10 @@ MxLong LegoNavController::Notify(MxParam& p_param)
InfocenterState* state = (InfocenterState*) GameState()->GetState("InfocenterState");
assert(state);
if (state != NULL && state->m_unk0x74 != 8 && currentWorld->Escape()) {
if (state != NULL && state->m_state != InfocenterState::e_exitQueried && currentWorld->Escape()) {
BackgroundAudioManager()->Stop();
TransitionManager()->StartTransition(MxTransitionManager::e_mosaic, 50, FALSE, FALSE);
state->m_unk0x74 = 8;
state->m_state = InfocenterState::e_exitQueried;
}
}
break;

View File

@@ -44,7 +44,7 @@ void LegoModelPresenter::Destroy(MxBool p_fromDestructor)
}
// FUNCTION: LEGO1 0x1007f6b0
// FUNCTION: BETA10 0x1009845e
// STUB: BETA10 0x1009845e
MxResult LegoModelPresenter::CreateROI(MxDSChunk* p_chunk)
{
MxResult result = FAILURE;

View File

@@ -781,6 +781,7 @@ void Act3::GoodEnding(const Matrix4& p_destination)
m_cop2->SetActorState(LegoPathActor::c_disabled);
m_brickster->SetActorState(LegoPathActor::c_disabled);
#ifndef BETA10
m_unk0x4220.Clear();
m_copter->FUN_10004640(p_destination);
@@ -792,6 +793,10 @@ void Act3::GoodEnding(const Matrix4& p_destination)
m_copter->m_unk0x1a8,
m_copter->m_unk0x1f4
);
#else
m_state->m_unk0x08 = 2;
GameState()->SwitchArea(LegoGameState::Area::e_infomain);
#endif
}
// FUNCTION: LEGO1 0x10073500

View File

@@ -190,12 +190,13 @@ MxResult Infocenter::Create(MxDSAction& p_dsAction)
m_infocenterState = (InfocenterState*) GameState()->GetState("InfocenterState");
if (!m_infocenterState) {
m_infocenterState = (InfocenterState*) GameState()->CreateState("InfocenterState");
m_infocenterState->m_unk0x74 = 3;
m_infocenterState->m_state = InfocenterState::e_newState;
}
else {
if (m_infocenterState->m_unk0x74 != 8 && m_infocenterState->m_unk0x74 != 4 &&
m_infocenterState->m_unk0x74 != 15) {
m_infocenterState->m_unk0x74 = 2;
if (m_infocenterState->m_state != InfocenterState::e_exitQueried &&
m_infocenterState->m_state != InfocenterState::e_selectedSave &&
m_infocenterState->m_state != InfocenterState::e_backToInfoAct1) {
m_infocenterState->m_state = InfocenterState::e_notRegistered;
}
MxS16 count, i;
@@ -217,7 +218,7 @@ MxResult Infocenter::Create(MxDSAction& p_dsAction)
GameState()->m_currentArea = LegoGameState::e_infomain;
GameState()->StopArea(LegoGameState::e_previousArea);
if (m_infocenterState->m_unk0x74 == 4) {
if (m_infocenterState->m_state == InfocenterState::e_selectedSave) {
LegoGameState* state = GameState();
state->m_previousArea = GameState()->m_unk0x42c;
}
@@ -266,9 +267,9 @@ MxLong Infocenter::Notify(MxParam& p_param)
StopBookAnimation();
m_bookAnimationTimer = 0;
if (m_infocenterState->m_unk0x74 == 0x0c) {
if (m_infocenterState->m_state == InfocenterState::e_exiting) {
StartCredits();
m_infocenterState->m_unk0x74 = 0xd;
m_infocenterState->m_state = InfocenterState::e_playCredits;
}
else if (m_destLocation != 0) {
BackgroundAudioManager()->RaiseVolume();
@@ -339,8 +340,8 @@ MxLong Infocenter::HandleEndAction(MxEndActionNotificationParam& p_param)
m_bigInfoBlinkTimer = 0;
}
switch (m_infocenterState->m_unk0x74) {
case 0:
switch (m_infocenterState->m_state) {
case InfocenterState::e_playCutscene:
switch (m_currentCutscene) {
case e_legoMovie:
PlayCutscene(e_mindscapeMovie, FALSE);
@@ -350,13 +351,13 @@ MxLong Infocenter::HandleEndAction(MxEndActionNotificationParam& p_param)
return 1;
case e_badEndMovie:
StopCutscene();
m_infocenterState->m_unk0x74 = 11;
m_infocenterState->m_state = InfocenterState::e_welcomeAnimation;
PlayAction(InfomainScript::c_tic092in_RunAnim);
m_currentCutscene = e_noIntro;
return 1;
case e_goodEndMovie:
StopCutscene();
m_infocenterState->m_unk0x74 = 11;
m_infocenterState->m_state = InfocenterState::e_welcomeAnimation;
PlayAction(InfomainScript::c_tic089in_RunAnim);
m_currentCutscene = e_noIntro;
return 1;
@@ -364,7 +365,7 @@ MxLong Infocenter::HandleEndAction(MxEndActionNotificationParam& p_param)
// default / 2nd case probably?
StopCutscene();
m_infocenterState->m_unk0x74 = 11;
m_infocenterState->m_state = InfocenterState::e_welcomeAnimation;
PlayAction(InfomainScript::c_iic001in_RunAnim);
m_currentCutscene = e_noIntro;
@@ -373,8 +374,8 @@ MxLong Infocenter::HandleEndAction(MxEndActionNotificationParam& p_param)
return 1;
}
break;
case 1:
m_infocenterState->m_unk0x74 = 11;
case InfocenterState::e_introCancelled:
m_infocenterState->m_state = InfocenterState::e_welcomeAnimation;
switch (m_currentCutscene) {
case e_badEndMovie:
@@ -389,30 +390,30 @@ MxLong Infocenter::HandleEndAction(MxEndActionNotificationParam& p_param)
m_currentCutscene = e_noIntro;
return 1;
case 2:
case InfocenterState::e_notRegistered:
SetROIVisible(g_object2x4red, FALSE);
SetROIVisible(g_object2x4grn, FALSE);
BackgroundAudioManager()->RaiseVolume();
return 1;
case 4:
case InfocenterState::e_selectedSave:
if (action->GetObjectId() == InfomainScript::c_GoTo_RegBook ||
action->GetObjectId() == InfomainScript::c_GoTo_RegBook_Red) {
TransitionManager()->StartTransition(MxTransitionManager::e_mosaic, 50, FALSE, FALSE);
m_infocenterState->m_unk0x74 = 14;
m_infocenterState->m_state = InfocenterState::e_exitingToIsland;
return 1;
}
break;
case 5:
case InfocenterState::e_selectedCharacterAndDestination:
if (action->GetObjectId() == m_currentInfomainScript) {
if (GameState()->GetCurrentAct() != LegoGameState::e_act3 && m_selectedCharacter != e_noCharacter) {
GameState()->SetActor(m_selectedCharacter);
}
TransitionManager()->StartTransition(MxTransitionManager::e_mosaic, 50, FALSE, FALSE);
m_infocenterState->m_unk0x74 = 14;
m_infocenterState->m_state = InfocenterState::e_exitingToIsland;
return 1;
}
break;
case 11:
case InfocenterState::e_welcomeAnimation:
if (!m_infocenterState->HasRegistered() && m_currentInfomainScript != InfomainScript::c_Mama_All_Movie &&
m_currentInfomainScript != InfomainScript::c_Papa_All_Movie &&
m_currentInfomainScript != InfomainScript::c_Pepper_All_Movie &&
@@ -422,10 +423,10 @@ MxLong Infocenter::HandleEndAction(MxEndActionNotificationParam& p_param)
PlayMusic(JukeboxScript::c_InformationCenter_Music);
}
m_infocenterState->m_unk0x74 = 2;
m_infocenterState->m_state = InfocenterState::e_notRegistered;
SetROIVisible("infoman", TRUE);
return 1;
case 12:
case InfocenterState::e_exiting:
if (action->GetObjectId() == m_currentInfomainScript) {
TransitionManager()->StartTransition(MxTransitionManager::e_mosaic, 50, FALSE, FALSE);
}
@@ -452,13 +453,13 @@ void Infocenter::ReadyWorld()
bg->Enable(TRUE);
InitializeBitmaps();
switch (m_infocenterState->m_unk0x74) {
case 3:
switch (m_infocenterState->m_state) {
case InfocenterState::e_newState:
PlayCutscene(e_legoMovie, TRUE);
m_infocenterState->m_unk0x74 = 0;
m_infocenterState->m_state = InfocenterState::e_playCutscene;
return;
case 4:
m_infocenterState->m_unk0x74 = 2;
case InfocenterState::e_selectedSave:
m_infocenterState->m_state = InfocenterState::e_notRegistered;
if (!m_infocenterState->HasRegistered()) {
m_bookAnimationTimer = 1;
}
@@ -467,7 +468,7 @@ void Infocenter::ReadyWorld()
PlayMusic(JukeboxScript::c_InformationCenter_Music);
Disable(FALSE, LegoOmni::c_disableInput | LegoOmni::c_disable3d | LegoOmni::c_clearScreen);
return;
case 5:
case InfocenterState::e_selectedCharacterAndDestination:
default: {
PlayMusic(JukeboxScript::c_InformationCenter_Music);
@@ -486,13 +487,13 @@ void Infocenter::ReadyWorld()
break;
}
case 8:
case InfocenterState::e_exitQueried:
PlayMusic(JukeboxScript::c_InformationCenter_Music);
PlayAction(InfomainScript::c_iic043in_RunAnim);
Disable(FALSE, LegoOmni::c_disableInput | LegoOmni::c_disable3d | LegoOmni::c_clearScreen);
return;
case 0xf:
m_infocenterState->m_unk0x74 = 2;
case InfocenterState::e_backToInfoAct1:
m_infocenterState->m_state = InfocenterState::e_notRegistered;
if (!m_infocenterState->HasRegistered()) {
m_bookAnimationTimer = 1;
}
@@ -504,7 +505,7 @@ void Infocenter::ReadyWorld()
}
break;
case LegoGameState::e_act2: {
if (m_infocenterState->m_unk0x74 == 8) {
if (m_infocenterState->m_state == InfocenterState::e_exitQueried) {
PlayMusic(JukeboxScript::c_InformationCenter_Music);
bgRed->Enable(TRUE);
PlayAction(InfomainScript::c_iic043in_RunAnim);
@@ -518,11 +519,11 @@ void Infocenter::ReadyWorld()
if (state && state->GetUnknown0x08() == 0x68) {
bg->Enable(TRUE);
PlayCutscene(e_badEndMovie, TRUE);
m_infocenterState->m_unk0x74 = 0;
m_infocenterState->m_state = InfocenterState::e_playCutscene;
return;
}
if (m_infocenterState->m_unk0x74 == 4) {
if (m_infocenterState->m_state == InfocenterState::e_selectedSave) {
bgRed->Enable(TRUE);
if (GameState()->GetCurrentAct() == GameState()->GetLoadedAct()) {
@@ -531,7 +532,7 @@ void Infocenter::ReadyWorld()
GameState()->m_currentArea = LegoGameState::e_infomain;
}
m_infocenterState->m_unk0x74 = 5;
m_infocenterState->m_state = InfocenterState::e_selectedCharacterAndDestination;
m_destLocation = LegoGameState::e_act2main;
InfomainScript::Script script = m_infocenterState->GetNextReturnDialogue();
@@ -549,7 +550,7 @@ void Infocenter::ReadyWorld()
break;
}
case LegoGameState::e_act3: {
if (m_infocenterState->m_unk0x74 == 8) {
if (m_infocenterState->m_state == InfocenterState::e_exitQueried) {
PlayMusic(JukeboxScript::c_InformationCenter_Music);
bgRed->Enable(TRUE);
PlayAction(InfomainScript::c_iic043in_RunAnim);
@@ -563,18 +564,18 @@ void Infocenter::ReadyWorld()
if (state && state->GetUnknown0x08() == 3) {
bg->Enable(TRUE);
PlayCutscene(e_badEndMovie, TRUE);
m_infocenterState->m_unk0x74 = 0;
m_infocenterState->m_state = InfocenterState::e_playCutscene;
return;
}
if (state && state->GetUnknown0x08() == 2) {
bg->Enable(TRUE);
PlayCutscene(e_goodEndMovie, TRUE);
m_infocenterState->m_unk0x74 = 0;
m_infocenterState->m_state = InfocenterState::e_playCutscene;
return;
}
if (m_infocenterState->m_unk0x74 == 4) {
if (m_infocenterState->m_state == InfocenterState::e_selectedSave) {
bgRed->Enable(TRUE);
if (GameState()->GetCurrentAct() == GameState()->GetLoadedAct()) {
@@ -583,7 +584,7 @@ void Infocenter::ReadyWorld()
GameState()->m_currentArea = LegoGameState::e_infomain;
}
m_infocenterState->m_unk0x74 = 5;
m_infocenterState->m_state = InfocenterState::e_selectedCharacterAndDestination;
m_destLocation = LegoGameState::e_act3script;
InfomainScript::Script script = m_infocenterState->GetNextReturnDialogue();
@@ -602,7 +603,7 @@ void Infocenter::ReadyWorld()
}
}
m_infocenterState->m_unk0x74 = 11;
m_infocenterState->m_state = InfocenterState::e_welcomeAnimation;
Disable(FALSE, LegoOmni::c_disableInput | LegoOmni::c_disable3d | LegoOmni::c_clearScreen);
}
@@ -701,37 +702,37 @@ MxLong Infocenter::HandleKeyPress(MxS8 p_key)
MxLong result = 0;
if (p_key == VK_SPACE && m_worldStarted) {
switch (m_infocenterState->m_unk0x74) {
case 0:
switch (m_infocenterState->m_state) {
case InfocenterState::e_playCutscene:
StopCutscene();
m_infocenterState->m_unk0x74 = 1;
m_infocenterState->m_state = InfocenterState::e_introCancelled;
if (!m_infocenterState->HasRegistered()) {
m_bookAnimationTimer = 1;
return 1;
}
break;
case 1:
case 4:
case InfocenterState::e_introCancelled:
case InfocenterState::e_selectedSave:
break;
default: {
InfomainScript::Script script = m_currentInfomainScript;
StopCurrentAction();
switch (m_infocenterState->m_unk0x74) {
case 5:
case 12:
switch (m_infocenterState->m_state) {
case InfocenterState::e_selectedCharacterAndDestination:
case InfocenterState::e_exiting:
m_currentInfomainScript = script;
return 1;
default:
m_infocenterState->m_unk0x74 = 2;
m_infocenterState->m_state = InfocenterState::e_notRegistered;
return 1;
case 8:
case 11:
case InfocenterState::e_exitQueried:
case InfocenterState::e_welcomeAnimation:
break;
}
}
case 13:
case InfocenterState::e_playCredits:
StopCredits();
break;
}
@@ -842,37 +843,37 @@ MxU8 Infocenter::HandleButtonUp(MxS32 p_x, MxS32 p_y)
case InfocenterMapEntry::e_jetrace:
if (m_selectedCharacter) {
m_destLocation = LegoGameState::e_jetraceExterior;
m_infocenterState->m_unk0x74 = 5;
m_infocenterState->m_state = InfocenterState::e_selectedCharacterAndDestination;
}
break;
case InfocenterMapEntry::e_carrace:
if (m_selectedCharacter) {
m_destLocation = LegoGameState::e_carraceExterior;
m_infocenterState->m_unk0x74 = 5;
m_infocenterState->m_state = InfocenterState::e_selectedCharacterAndDestination;
}
break;
case InfocenterMapEntry::e_pizzeria:
if (m_selectedCharacter) {
m_destLocation = LegoGameState::e_pizzeriaExterior;
m_infocenterState->m_unk0x74 = 5;
m_infocenterState->m_state = InfocenterState::e_selectedCharacterAndDestination;
}
break;
case InfocenterMapEntry::e_garage:
if (m_selectedCharacter) {
m_destLocation = LegoGameState::e_garageExterior;
m_infocenterState->m_unk0x74 = 5;
m_infocenterState->m_state = InfocenterState::e_selectedCharacterAndDestination;
}
break;
case InfocenterMapEntry::e_hospital:
if (m_selectedCharacter) {
m_destLocation = LegoGameState::e_hospitalExterior;
m_infocenterState->m_unk0x74 = 5;
m_infocenterState->m_state = InfocenterState::e_selectedCharacterAndDestination;
}
break;
case InfocenterMapEntry::e_police:
if (m_selectedCharacter) {
m_destLocation = LegoGameState::e_policeExterior;
m_infocenterState->m_unk0x74 = 5;
m_infocenterState->m_state = InfocenterState::e_selectedCharacterAndDestination;
}
break;
}
@@ -882,13 +883,13 @@ MxU8 Infocenter::HandleButtonUp(MxS32 p_x, MxS32 p_y)
m_dragPresenter->Enable(FALSE);
m_dragPresenter = NULL;
if (m_infocenterState->m_unk0x74 == 5) {
if (m_infocenterState->m_state == InfocenterState::e_selectedCharacterAndDestination) {
InfomainScript::Script dialogueToPlay;
if (GameState()->GetCurrentAct() == LegoGameState::e_act1) {
if (!m_infocenterState->HasRegistered()) {
dialogueToPlay = InfomainScript::c_iic007in_PlayWav;
m_infocenterState->m_unk0x74 = 2;
m_infocenterState->m_state = InfocenterState::e_notRegistered;
m_destLocation = LegoGameState::e_undefined;
}
else {
@@ -952,7 +953,7 @@ MxU8 Infocenter::HandleControl(LegoControlManagerNotificationParam& p_param)
switch (p_param.m_clickedObjectId) {
case InfomainScript::c_LeftArrow_Ctl:
m_infocenterState->m_unk0x74 = 14;
m_infocenterState->m_state = InfocenterState::e_exitingToIsland;
StopCurrentAction();
if (GameState()->GetCurrentAct() == LegoGameState::e_act1) {
@@ -967,7 +968,7 @@ MxU8 Infocenter::HandleControl(LegoControlManagerNotificationParam& p_param)
break;
case InfomainScript::c_RightArrow_Ctl:
m_infocenterState->m_unk0x74 = 14;
m_infocenterState->m_state = InfocenterState::e_exitingToIsland;
StopCurrentAction();
if (GameState()->GetCurrentAct() == LegoGameState::e_act1) {
@@ -986,10 +987,10 @@ MxU8 Infocenter::HandleControl(LegoControlManagerNotificationParam& p_param)
m_radio.Stop();
break;
case InfomainScript::c_Door_Ctl:
if (m_infocenterState->m_unk0x74 != 8) {
if (m_infocenterState->m_state != InfocenterState::e_exitQueried) {
actionToPlay = InfomainScript::c_iic043in_RunAnim;
m_radio.Stop();
m_infocenterState->m_unk0x74 = 8;
m_infocenterState->m_state = InfocenterState::e_exitQueried;
}
break;
@@ -1025,7 +1026,7 @@ MxU8 Infocenter::HandleControl(LegoControlManagerNotificationParam& p_param)
case LegoGameState::e_infodoor:
case LegoGameState::e_regbook:
case LegoGameState::e_infoscor:
m_infocenterState->m_unk0x74 = 5;
m_infocenterState->m_state = InfocenterState::e_selectedCharacterAndDestination;
m_destLocation = state->m_previousArea;
actionToPlay = (InfomainScript::Script) m_infocenterState->GetNextLeaveDialogue();
m_radio.Stop();
@@ -1044,10 +1045,10 @@ MxU8 Infocenter::HandleControl(LegoControlManagerNotificationParam& p_param)
if (state->GetActorId() != LegoActor::c_none) {
if (!m_infocenterState->HasRegistered()) {
PlayAction(InfomainScript::c_iic007in_PlayWav);
m_infocenterState->m_unk0x74 = 2;
m_infocenterState->m_state = InfocenterState::e_notRegistered;
}
else {
m_infocenterState->m_unk0x74 = 5;
m_infocenterState->m_state = InfocenterState::e_selectedCharacterAndDestination;
m_destLocation = state->m_previousArea;
actionToPlay = (InfomainScript::Script) m_infocenterState->GetNextLeaveDialogue();
m_radio.Stop();
@@ -1060,14 +1061,14 @@ MxU8 Infocenter::HandleControl(LegoControlManagerNotificationParam& p_param)
}
break;
case LegoGameState::e_act2:
m_infocenterState->m_unk0x74 = 5;
m_infocenterState->m_state = InfocenterState::e_selectedCharacterAndDestination;
m_destLocation = LegoGameState::e_act2main;
actionToPlay = (InfomainScript::Script) m_infocenterState->GetNextLeaveDialogue();
InputManager()->DisableInputProcessing();
InputManager()->SetUnknown336(TRUE);
break;
case LegoGameState::e_act3:
m_infocenterState->m_unk0x74 = 5;
m_infocenterState->m_state = InfocenterState::e_selectedCharacterAndDestination;
m_destLocation = LegoGameState::e_act3script;
actionToPlay = (InfomainScript::Script) m_infocenterState->GetNextLeaveDialogue();
InputManager()->DisableInputProcessing();
@@ -1077,7 +1078,7 @@ MxU8 Infocenter::HandleControl(LegoControlManagerNotificationParam& p_param)
break;
case InfomainScript::c_Book_Ctl:
m_destLocation = LegoGameState::e_regbook;
m_infocenterState->m_unk0x74 = 4;
m_infocenterState->m_state = InfocenterState::e_selectedSave;
actionToPlay = GameState()->GetCurrentAct() != LegoGameState::e_act1 ? InfomainScript::c_GoTo_RegBook_Red
: InfomainScript::c_GoTo_RegBook;
m_radio.Stop();
@@ -1128,13 +1129,13 @@ MxLong Infocenter::HandleNotification0(MxNotificationParam& p_param)
MxCore* sender = p_param.GetSender();
if (sender == NULL) {
if (m_infocenterState->m_unk0x74 == 8) {
if (m_infocenterState->m_state == InfocenterState::e_exitQueried) {
m_infoManDialogueTimer = 0;
StopCutscene();
PlayAction(InfomainScript::c_iic043in_RunAnim);
}
}
else if (sender->IsA("MxEntity") && m_infocenterState->m_unk0x74 != 5 && m_infocenterState->m_unk0x74 != 12) {
else if (sender->IsA("MxEntity") && m_infocenterState->m_state != InfocenterState::e_selectedCharacterAndDestination && m_infocenterState->m_state != InfocenterState::e_exiting) {
switch (((MxEntity*) sender)->GetEntityId()) {
case 5: {
m_infoManDialogueTimer = 0;
@@ -1153,21 +1154,21 @@ MxLong Infocenter::HandleNotification0(MxNotificationParam& p_param)
return 1;
}
case 6:
if (m_infocenterState->m_unk0x74 == 8) {
if (m_infocenterState->m_state == InfocenterState::e_exitQueried) {
StopCurrentAction();
SetROIVisible(g_object2x4red, FALSE);
SetROIVisible(g_object2x4grn, FALSE);
m_infocenterState->m_unk0x74 = 2;
m_infocenterState->m_state = InfocenterState::e_notRegistered;
PlayAction(InfomainScript::c_iicb28in_RunAnim);
return 1;
}
case 7:
if (m_infocenterState->m_unk0x74 == 8) {
if (m_infocenterState->m_state == InfocenterState::e_exitQueried) {
if (m_infocenterState->HasRegistered()) {
GameState()->Save(0);
}
m_infocenterState->m_unk0x74 = 12;
m_infocenterState->m_state = InfocenterState::e_exiting;
PlayAction(InfomainScript::c_iic046in_RunAnim);
InputManager()->DisableInputProcessing();
InputManager()->SetUnknown336(TRUE);
@@ -1409,17 +1410,17 @@ void Infocenter::Reset()
MxBool Infocenter::Escape()
{
if (m_infocenterState != NULL) {
MxU32 val = m_infocenterState->m_unk0x74;
MxU32 val = m_infocenterState->m_state;
if (val == 0) {
if (val == InfocenterState::e_playCutscene) {
StopCutscene();
m_infocenterState->m_unk0x74 = 1;
m_infocenterState->m_state = InfocenterState::e_introCancelled;
}
else if (val == 13) {
else if (val == InfocenterState::e_playCredits) {
StopCredits();
}
else if (val != 8) {
m_infocenterState->m_unk0x74 = 8;
else if (val != InfocenterState::e_exitQueried) {
m_infocenterState->m_state = InfocenterState::e_exitQueried;
#ifdef COMPAT_MODE
{

View File

@@ -238,10 +238,10 @@ MxLong RegistrationBook::HandleControl(LegoControlManagerNotificationParam& p_pa
DeleteObjects(&m_atomId, RegbookScript::c_iic006in_RunAnim, RegbookScript::c_iic008in_PlayWav);
if (GameState()->GetCurrentAct() == LegoGameState::e_act1) {
m_infocenterState->m_unk0x74 = 15;
m_infocenterState->m_state = InfocenterState::e_backToInfoAct1;
}
else {
m_infocenterState->m_unk0x74 = 2;
m_infocenterState->m_state = InfocenterState::e_notRegistered;
}
TransitionManager()->StartTransition(MxTransitionManager::e_mosaic, 50, FALSE, FALSE);
@@ -323,7 +323,7 @@ void RegistrationBook::FUN_100775c0(MxS16 p_playerIndex)
break;
}
m_infocenterState->m_unk0x74 = 4;
m_infocenterState->m_state = InfocenterState::e_selectedSave;
if (m_unk0x2b8 == 0 && !m_unk0x2c1) {
DeleteObjects(&m_atomId, RegbookScript::c_iic006in_RunAnim, RegbookScript::c_iic008in_PlayWav);
TransitionManager()->StartTransition(MxTransitionManager::e_mosaic, 50, FALSE, FALSE);
@@ -619,12 +619,12 @@ MxBool RegistrationBook::CreateSurface()
}
if (presenter) {
m_checkboxSurface = presenter->VTable0x78();
m_checkboxSurface = presenter->GetSurface();
}
presenter = (MxStillPresenter*) Find("MxStillPresenter", "CheckHiLite_Bitmap");
if (presenter) {
m_checkboxHilite = presenter->VTable0x78();
m_checkboxHilite = presenter->GetSurface();
}
if (m_checkboxSurface && m_checkboxHilite) {

View File

@@ -12,6 +12,7 @@ LegoWEEdge::LegoWEEdge()
}
// FUNCTION: LEGO1 0x1009a590
// FUNCTION: BETA10 0x10182530
LegoWEEdge::~LegoWEEdge()
{
if (m_edges) {
@@ -20,31 +21,52 @@ LegoWEEdge::~LegoWEEdge()
}
// FUNCTION: LEGO1 0x1009a5b0
// FUNCTION: BETA10 0x10182577
LegoS32 LegoWEEdge::LinkEdgesAndFaces()
{
assert(m_edges);
assert(m_numEdges);
for (LegoS32 i = 0; i < m_numEdges; i++) {
LegoOrientedEdge* e1 = m_edges[i];
LegoOrientedEdge* e2 = (m_numEdges - i) == 1 ? m_edges[0] : m_edges[i + 1];
LegoOrientedEdge* e2 = (m_numEdges - 1) == i ? m_edges[0] : m_edges[i + 1];
if (e2->m_pointA == e1->m_pointA) {
assert(e1->m_faceA == NULL || e1->m_faceA == this);
assert(e2->m_faceB == NULL || e2->m_faceB == this);
assert(e1->m_ccwA == NULL || e1->m_ccwA == e2);
assert(e2->m_cwB == NULL || e2->m_cwB == e1);
e1->m_faceA = this;
e2->m_faceB = this;
e1->m_ccwA = e2;
e2->m_cwB = e1;
}
else if (e2->m_pointB == e1->m_pointA) {
assert(e1->m_faceA == NULL || e1->m_faceA == this);
assert(e2->m_faceA == NULL || e2->m_faceA == this);
assert(e1->m_ccwA == NULL || e1->m_ccwA == e2);
assert(e2->m_cwA == NULL || e2->m_cwA == e1);
e1->m_faceA = this;
e2->m_faceA = this;
e1->m_ccwA = e2;
e2->m_cwA = e1;
}
else if (e1->m_pointB == e2->m_pointA) {
assert(e1->m_faceB == NULL || e1->m_faceB == this);
assert(e2->m_faceB == NULL || e2->m_faceB == this);
assert(e1->m_ccwB == NULL || e1->m_ccwB == e2);
assert(e2->m_cwB == NULL || e2->m_cwB == e1);
e1->m_faceB = this;
e2->m_faceB = this;
e1->m_ccwB = e2;
e2->m_cwB = e1;
}
else {
assert(e1->m_pointB == e2->m_pointB);
assert(e1->m_faceB == NULL || e1->m_faceB == this);
assert(e2->m_faceA == NULL || e2->m_faceA == this);
assert(e1->m_ccwB == NULL || e1->m_ccwB == e2);
assert(e2->m_cwA == NULL || e2->m_cwA == e1);
e1->m_faceB = this;
e2->m_faceA = this;
e1->m_ccwB = e2;

View File

@@ -6,8 +6,8 @@
struct LegoOrientedEdge;
// might be a struct with public members
// VTABLE: LEGO1 0x100db7c0
// VTABLE: BETA10 0x101c3730
// SIZE 0x0c
class LegoWEEdge {
public:
@@ -33,6 +33,7 @@ public:
}
// SYNTHETIC: LEGO1 0x1009a570
// SYNTHETIC: BETA10 0x10182b70
// LegoWEEdge::`scalar deleting destructor'
protected:

View File

@@ -22,6 +22,7 @@ LegoWEGEdge::LegoWEGEdge()
}
// FUNCTION: LEGO1 0x1009a800
// FUNCTION: BETA10 0x101831bd
LegoWEGEdge::~LegoWEGEdge()
{
if (m_edges) {

View File

@@ -29,6 +29,7 @@ struct PathWithTrigger {
// might be a struct with public members
// VTABLE: LEGO1 0x100db7f8
// VTABLE: BETA10 0x101c3798
// SIZE 0x54
class LegoWEGEdge : public LegoWEEdge {
public:
@@ -80,6 +81,7 @@ public:
LegoU8 GetMask0x03() { return m_flags & (c_bit1 | c_bit2); }
// SYNTHETIC: LEGO1 0x1009a7e0
// SYNTHETIC: BETA10 0x10184130
// LegoWEGEdge::`scalar deleting destructor'
friend class LegoPathController;

View File

@@ -9,6 +9,7 @@
#include "shape/legobox.h"
#include "shape/legosphere.h"
#include <crtdbg.h>
#include <string.h>
#include <vec.h>
@@ -410,8 +411,7 @@ LegoResult LegoROI::ApplyChildAnimationTransformation(
roi->m_local2world.Product(mat, p_matrix);
roi->UpdateWorldData();
LegoBool visibility = data->GetVisibility(p_time);
roi->SetVisibility(visibility);
roi->SetVisibility(data->GetVisibility(p_time));
for (LegoU32 i = 0; i < p_node->GetNumChildren(); i++) {
ApplyChildAnimationTransformation(p_node->GetChild(i), roi->m_local2world, p_time, roi);
@@ -419,6 +419,11 @@ LegoResult LegoROI::ApplyChildAnimationTransformation(
}
else {
FUN_100a81b0("%s ROI Not found\n", name);
#ifdef BETA10
_RPT1(_CRT_ASSERT, "%s ROI Not Found", name);
// Note that the macro inserts an INT3, which breaks the assumption that INT3
// only occurs as a filler for empty space in the binary.
#endif
}
return SUCCESS;

View File

@@ -132,9 +132,11 @@
// ??_L@YGXPAXIHP6EX0@Z1@Z
// LIBRARY: LEGO1 0x1008c2e0
// LIBRARY: BETA10 0x100f9800
// ??_M@YGXPAXIHP6EX0@Z@Z
// LIBRARY: LEGO1 0x1008c370
// LIBRARY: BETA10 0x100f98b0
// ?__ArrayUnwind@@YGXPAXIHP6EX0@Z@Z
// LIBRARY: LEGO1 0x1008c410
@@ -162,6 +164,7 @@
// __amsg_exit
// LIBRARY: LEGO1 0x1008c980
// LIBRARY: BETA10 0x10101318
// __except_handler3
// LIBRARY: LEGO1 0x1008ca60
@@ -783,6 +786,61 @@
// LIBRARY: BETA10 0x100fa210
// strcat
// LIBRARY: BETA10 0x100fed20
// strncat
// LIBRARY: BETA10 0x100faab0
// strncpy
// LIBRARY: BETA10 0x100ff490
// setvbuf
// LIBRARY: BETA10 0x100ff180
// fflush
// LIBRARY: BETA10 0x100fec40
// __crtMessageBoxA
// LIBRARY: BETA10 0x100fee50
// _itoa
// LIBRARY: BETA10 0x10106f70
// _lock_file
// LIBRARY: BETA10 0x100ff1e0
// _fflush_lk
// LIBRARY: BETA10 0x10107010
// _unlock_file
// LIBRARY: BETA10 0x10106ea0
// _lock
// LIBRARY: BETA10 0x10106f50
// _unlock
// LIBRARY: BETA10 0x100fdaf0
// _getptd
// LIBRARY: BETA10 0x10104040
// _malloc_dbg
// GLOBAL: BETA10 0x101fb7b0
// _locktable
// LIBRARY: BETA10 0x10104c00
// _free_dbg
// LIBRARY: BETA10 0x100fe900
// raise
// GLOBAL: BETA10 0x101fa950
// _iob
// GLOBAL: BETA10 0x102122d0
// _bufin
// LIBRARY: BETA10 0x100f8a88
// ??2@YAPAXI@Z

View File

@@ -42,10 +42,10 @@ public:
void Destroy() override { Destroy(FALSE); } // vtable+0x38
// FUNCTION: LEGO1 0x1000c7b0
virtual LPDIRECTDRAWSURFACE VTable0x78() { return m_unk0x58; } // vtable+0x78
virtual LPDIRECTDRAWSURFACE GetSurface() { return m_surface; } // vtable+0x78
// FUNCTION: LEGO1 0x1000c7c0
virtual MxBool VTable0x7c() { return m_frameBitmap != NULL || m_alpha != NULL; } // vtable+0x7c
virtual MxBool HasFrameBitmapOrAlpha() { return m_frameBitmap != NULL || m_alpha != NULL; } // vtable+0x7c
// FUNCTION: LEGO1 0x1000c7e0
virtual MxS32 GetWidth() { return m_alpha ? m_alpha->GetWidth() : m_frameBitmap->GetBmiWidth(); } // vtable+0x80
@@ -115,17 +115,17 @@ public:
// FUNCTION: BETA10 0x1002c2e0
MxU8* GetBitmapStart(MxS32 p_left, MxS32 p_top) { return m_frameBitmap->GetStart(p_left, p_top); }
void SetBit0(BOOL p_e) { m_flags.m_bit0 = p_e; }
void SetBit1(BOOL p_e) { m_flags.m_bit1 = p_e; }
void SetBit2(BOOL p_e) { m_flags.m_bit2 = p_e; }
void SetBit3(BOOL p_e) { m_flags.m_bit3 = p_e; }
void SetBit4(BOOL p_e) { m_flags.m_bit4 = p_e; }
void SetLoadedFirstFrame(BOOL p_loadedFirstFrame) { m_flags.m_bit0 = p_loadedFirstFrame; }
void SetUseSurface(BOOL p_useSurface) { m_flags.m_bit1 = p_useSurface; }
void SetUseVideoMemory(BOOL p_useVideoMemory) { m_flags.m_bit2 = p_useVideoMemory; }
void SetDoNotWriteToSurface(BOOL p_doNotWriteToSurface) { m_flags.m_bit3 = p_doNotWriteToSurface; }
void SetBitmapIsMap(BOOL p_bitmapIsMap) { m_flags.m_bit4 = p_bitmapIsMap; }
BYTE GetBit0() { return m_flags.m_bit0; }
BYTE GetBit1() { return m_flags.m_bit1; }
BYTE GetBit2() { return m_flags.m_bit2; }
BYTE GetBit3() { return m_flags.m_bit3; }
BYTE GetBit4() { return m_flags.m_bit4; }
BYTE LoadedFirstFrame() { return m_flags.m_bit0; }
BYTE UseSurface() { return m_flags.m_bit1; }
BYTE UseVideoMemory() { return m_flags.m_bit2; }
BYTE DoNotWriteToSurface() { return m_flags.m_bit3; }
BYTE BitmapIsMap() { return m_flags.m_bit4; }
// SYNTHETIC: LEGO1 0x1000c910
// MxVideoPresenter::`scalar deleting destructor'
@@ -138,10 +138,10 @@ protected:
MxBitmap* m_frameBitmap; // 0x50
AlphaMask* m_alpha; // 0x54
LPDIRECTDRAWSURFACE m_unk0x58; // 0x58
MxS16 m_unk0x5c; // 0x5c
LPDIRECTDRAWSURFACE m_surface; // 0x58
MxS16 m_frameLoadTickleCount; // 0x5c
FlagBitfield m_flags; // 0x5e
MxLong m_unk0x60; // 0x60
MxLong m_frozenTime; // 0x60
};
#endif // MXVIDEOPRESENTER_H

View File

@@ -13,8 +13,8 @@ DECOMP_SIZE_ASSERT(MxFlcPresenter, 0x68);
MxFlcPresenter::MxFlcPresenter()
{
m_flcHeader = NULL;
SetBit1(FALSE);
SetBit2(FALSE);
SetUseSurface(FALSE);
SetUseVideoMemory(FALSE);
}
// FUNCTION: LEGO1 0x100b3420

View File

@@ -22,8 +22,8 @@ MxLoopingFlcPresenter::~MxLoopingFlcPresenter()
void MxLoopingFlcPresenter::Init()
{
this->m_elapsedDuration = 0;
SetBit1(FALSE);
SetBit2(FALSE);
SetUseSurface(FALSE);
SetUseVideoMemory(FALSE);
}
// FUNCTION: LEGO1 0x100b4430
@@ -72,7 +72,7 @@ void MxLoopingFlcPresenter::VTable0x88()
// FUNCTION: LEGO1 0x100b4520
void MxLoopingFlcPresenter::RepeatingTickle()
{
for (MxS16 i = 0; i < m_unk0x5c; i++) {
for (MxS16 i = 0; i < m_frameLoadTickleCount; i++) {
if (!m_loopingChunkCursor->HasMatch()) {
MxStreamChunk* chunk;
MxStreamChunkListCursor cursor(m_loopingChunks);

View File

@@ -22,8 +22,8 @@ MxLoopingSmkPresenter::~MxLoopingSmkPresenter()
void MxLoopingSmkPresenter::Init()
{
m_elapsedDuration = 0;
SetBit1(FALSE);
SetBit2(FALSE);
SetUseSurface(FALSE);
SetUseVideoMemory(FALSE);
}
// FUNCTION: LEGO1 0x100b49d0
@@ -82,7 +82,7 @@ void MxLoopingSmkPresenter::VTable0x8c()
// FUNCTION: LEGO1 0x100b4b00
void MxLoopingSmkPresenter::RepeatingTickle()
{
for (MxS16 i = 0; i < m_unk0x5c; i++) {
for (MxS16 i = 0; i < m_frameLoadTickleCount; i++) {
if (!m_loopingChunkCursor->HasMatch()) {
MxStreamChunk* chunk;
MxStreamChunkListCursor cursor(m_loopingChunks);

View File

@@ -25,8 +25,8 @@ void MxSmkPresenter::Init()
{
m_currentFrame = 0;
memset(&m_mxSmk, 0, sizeof(m_mxSmk));
SetBit1(FALSE);
SetBit2(FALSE);
SetUseSurface(FALSE);
SetUseVideoMemory(FALSE);
}
// FUNCTION: LEGO1 0x100b3900

View File

@@ -79,12 +79,12 @@ void MxStillPresenter::LoadFrame(MxStreamChunk* p_chunk)
MxRect32 rect(x, y, width + x, height + y);
MVideoManager()->InvalidateRect(rect);
if (GetBit1()) {
undefined4 und = 0;
m_unk0x58 = MxOmni::GetInstance()->GetVideoManager()->GetDisplaySurface()->VTable0x44(
if (UseSurface()) {
undefined4 useVideoMemory = 0;
m_surface = MxOmni::GetInstance()->GetVideoManager()->GetDisplaySurface()->VTable0x44(
m_frameBitmap,
&und,
GetBit3(),
&useVideoMemory,
DoNotWriteToSurface(),
m_action->GetFlags() & MxDSAction::c_bit4
);
@@ -94,11 +94,11 @@ void MxStillPresenter::LoadFrame(MxStreamChunk* p_chunk)
delete m_frameBitmap;
m_frameBitmap = NULL;
if (m_unk0x58 && und) {
SetBit2(TRUE);
if (m_surface && useVideoMemory) {
SetUseVideoMemory(TRUE);
}
else {
SetBit2(FALSE);
SetUseVideoMemory(FALSE);
}
}
}
@@ -196,7 +196,7 @@ void MxStillPresenter::ParseExtra()
MxPresenter::ParseExtra();
if (m_action->GetFlags() & MxDSAction::c_bit5) {
SetBit3(TRUE);
SetDoNotWriteToSurface(TRUE);
}
MxU16 extraLength;
@@ -216,9 +216,9 @@ void MxStillPresenter::ParseExtra()
}
if (KeyValueStringParse(output, g_strBMP_ISMAP, extraCopy)) {
SetBit4(TRUE);
SetBit1(FALSE);
SetBit2(FALSE);
SetBitmapIsMap(TRUE);
SetUseSurface(FALSE);
SetUseVideoMemory(FALSE);
}
}
}
@@ -234,11 +234,11 @@ MxStillPresenter* MxStillPresenter::Clone()
MxDSAction* action = GetAction()->Clone();
if (action && presenter->StartAction(NULL, action) == SUCCESS) {
presenter->SetBit0(GetBit0());
presenter->SetBit1(GetBit1());
presenter->SetBit2(GetBit2());
presenter->SetBit3(GetBit3());
presenter->SetBit4(GetBit4());
presenter->SetLoadedFirstFrame(LoadedFirstFrame());
presenter->SetUseSurface(UseSurface());
presenter->SetUseVideoMemory(UseVideoMemory());
presenter->SetDoNotWriteToSurface(DoNotWriteToSurface());
presenter->SetBitmapIsMap(BitmapIsMap());
if (m_frameBitmap) {
presenter->m_frameBitmap = new MxBitmap;
@@ -248,8 +248,8 @@ MxStillPresenter* MxStillPresenter::Clone()
}
}
if (m_unk0x58) {
presenter->m_unk0x58 = MxDisplaySurface::CopySurface(m_unk0x58);
if (m_surface) {
presenter->m_surface = MxDisplaySurface::CopySurface(m_surface);
}
if (m_alpha) {

View File

@@ -93,19 +93,19 @@ void MxVideoPresenter::Init()
{
m_frameBitmap = NULL;
m_alpha = NULL;
m_unk0x5c = 1;
m_unk0x58 = NULL;
m_unk0x60 = -1;
SetBit0(FALSE);
m_frameLoadTickleCount = 1;
m_surface = NULL;
m_frozenTime = -1;
SetLoadedFirstFrame(FALSE);
if (MVideoManager() != NULL) {
MVideoManager();
SetBit1(TRUE);
SetBit2(FALSE);
SetUseSurface(TRUE);
SetUseVideoMemory(FALSE);
}
SetBit3(FALSE);
SetBit4(FALSE);
SetDoNotWriteToSurface(FALSE);
SetBitmapIsMap(FALSE);
}
// FUNCTION: LEGO1 0x100b27b0
@@ -115,11 +115,11 @@ void MxVideoPresenter::Destroy(MxBool p_fromDestructor)
MVideoManager()->UnregisterPresenter(*this);
}
if (m_unk0x58) {
m_unk0x58->Release();
m_unk0x58 = NULL;
SetBit1(FALSE);
SetBit2(FALSE);
if (m_surface) {
m_surface->Release();
m_surface = NULL;
SetUseSurface(FALSE);
SetUseVideoMemory(FALSE);
}
if (MVideoManager() && (m_alpha || m_frameBitmap)) {
@@ -183,7 +183,7 @@ MxBool MxVideoPresenter::IsHit(MxS32 p_x, MxS32 p_y)
MxU8* pixel = m_frameBitmap->GetStart(p_x - rect.GetLeft(), p_y - rect.GetTop());
if (GetBit4()) {
if (BitmapIsMap()) {
return (MxBool) *pixel;
}
@@ -241,7 +241,7 @@ void MxVideoPresenter::PutFrame()
LPDIRECTDRAWSURFACE ddSurface = displaySurface->GetDirectDrawSurface2();
if (m_action->GetFlags() & MxDSAction::c_bit5) {
if (m_unk0x58) {
if (m_surface) {
RECT src, dest;
src.top = 0;
src.left = 0;
@@ -255,10 +255,10 @@ void MxVideoPresenter::PutFrame()
switch (PrepareRects(src, dest)) {
case 0:
ddSurface->Blt(&dest, m_unk0x58, &src, DDBLT_KEYSRC, NULL);
ddSurface->Blt(&dest, m_surface, &src, DDBLT_KEYSRC, NULL);
break;
case 1:
ddSurface->BltFast(dest.left, dest.top, m_unk0x58, &src, DDBLTFAST_SRCCOLORKEY | DDBLTFAST_WAIT);
ddSurface->BltFast(dest.left, dest.top, m_surface, &src, DDBLTFAST_SRCCOLORKEY | DDBLTFAST_WAIT);
}
}
else {
@@ -282,7 +282,7 @@ void MxVideoPresenter::PutFrame()
if (regionRect->GetWidth() >= 1 && regionRect->GetHeight() >= 1) {
RECT src, dest;
if (m_unk0x58) {
if (m_surface) {
src.left = regionRect->GetLeft() - GetX();
src.top = regionRect->GetTop() - GetY();
src.right = src.left + regionRect->GetWidth();
@@ -295,9 +295,9 @@ void MxVideoPresenter::PutFrame()
}
if (m_action->GetFlags() & MxDSAction::c_bit4) {
if (m_unk0x58) {
if (m_surface) {
if (PrepareRects(src, dest) >= 0) {
ddSurface->Blt(&dest, m_unk0x58, &src, DDBLT_KEYSRC, NULL);
ddSurface->Blt(&dest, m_surface, &src, DDBLT_KEYSRC, NULL);
}
}
else {
@@ -313,9 +313,9 @@ void MxVideoPresenter::PutFrame()
);
}
}
else if (m_unk0x58) {
else if (m_surface) {
if (PrepareRects(src, dest) >= 0) {
ddSurface->Blt(&dest, m_unk0x58, &src, 0, NULL);
ddSurface->Blt(&dest, m_surface, &src, 0, NULL);
}
}
else {
@@ -372,7 +372,7 @@ void MxVideoPresenter::StreamingTickle()
}
}
else {
for (MxS16 i = 0; i < m_unk0x5c; i++) {
for (MxS16 i = 0; i < m_frameLoadTickleCount; i++) {
if (!m_currentChunk) {
MxMediaPresenter::StreamingTickle();
@@ -388,15 +388,15 @@ void MxVideoPresenter::StreamingTickle()
LoadFrame(m_currentChunk);
m_subscriber->FreeDataChunk(m_currentChunk);
m_currentChunk = NULL;
SetBit0(TRUE);
SetLoadedFirstFrame(TRUE);
if (m_currentTickleState != e_streaming) {
break;
}
}
if (GetBit0()) {
m_unk0x5c = 5;
if (LoadedFirstFrame()) {
m_frameLoadTickleCount = 5;
}
}
}
@@ -416,7 +416,7 @@ void MxVideoPresenter::RepeatingTickle()
}
}
else {
for (MxS16 i = 0; i < m_unk0x5c; i++) {
for (MxS16 i = 0; i < m_frameLoadTickleCount; i++) {
if (!m_currentChunk) {
MxMediaPresenter::RepeatingTickle();
@@ -431,15 +431,15 @@ void MxVideoPresenter::RepeatingTickle()
LoadFrame(m_currentChunk);
m_currentChunk = NULL;
SetBit0(TRUE);
SetLoadedFirstFrame(TRUE);
if (m_currentTickleState != e_repeating) {
break;
}
}
if (GetBit0()) {
m_unk0x5c = 5;
if (LoadedFirstFrame()) {
m_frameLoadTickleCount = 5;
}
}
}
@@ -452,11 +452,11 @@ void MxVideoPresenter::FreezingTickle()
if (sustainTime != -1) {
if (sustainTime) {
if (m_unk0x60 == -1) {
m_unk0x60 = m_action->GetElapsedTime();
if (m_frozenTime == -1) {
m_frozenTime = m_action->GetElapsedTime();
}
if (m_action->GetElapsedTime() >= m_unk0x60 + ((MxDSMediaAction*) m_action)->GetSustainTime()) {
if (m_action->GetElapsedTime() >= m_frozenTime + ((MxDSMediaAction*) m_action)->GetSustainTime()) {
ProgressTickleState(e_done);
}
}