Merge remote-tracking branch 'isle/master'

This commit is contained in:
Christian Semmler 2025-06-17 10:34:32 -07:00
commit a939a6fec3
No known key found for this signature in database
GPG Key ID: 086DAA1360BEEE5C
27 changed files with 168 additions and 161 deletions

View File

@ -27,10 +27,10 @@ struct LegoBuildingInfo {
MxU32 m_sound; // 0x08 MxU32 m_sound; // 0x08
MxU32 m_move; // 0x0c MxU32 m_move; // 0x0c
MxU8 m_mood; // 0x10 MxU8 m_mood; // 0x10
MxS8 m_unk0x11; // 0x11 MxS8 m_counter; // 0x11
MxS8 m_initialUnk0x11; // 0x12 - initial value loaded to m_unk0x11 MxS8 m_initialCounter; // 0x12 - initial value loaded to m_counter
MxU8 m_flags; // 0x13 MxU8 m_flags; // 0x13
float m_unk0x14; // 0x14 float m_adjustedY; // 0x14
const char* m_boundaryName; // 0x18 const char* m_boundaryName; // 0x18
float m_x; // 0x1c float m_x; // 0x1c
float m_y; // 0x20 float m_y; // 0x20
@ -47,7 +47,7 @@ class LegoBuildingManager : public MxCore {
LegoEntity* m_entity; // 0x00 LegoEntity* m_entity; // 0x00
LegoROI* m_roi; // 0x04 LegoROI* m_roi; // 0x04
MxLong m_time; // 0x08 MxLong m_time; // 0x08
float m_unk0x0c; // 0x0c float m_y; // 0x0c
MxBool m_muted; // 0x10 MxBool m_muted; // 0x10
}; };
@ -80,16 +80,16 @@ class LegoBuildingManager : public MxCore {
MxBool SwitchMood(LegoEntity* p_entity); MxBool SwitchMood(LegoEntity* p_entity);
MxU32 GetAnimationId(LegoEntity* p_entity); MxU32 GetAnimationId(LegoEntity* p_entity);
MxU32 GetSoundId(LegoEntity* p_entity, MxBool p_state); MxU32 GetSoundId(LegoEntity* p_entity, MxBool p_state);
MxBool FUN_10030000(LegoEntity* p_entity); MxBool DecrementCounter(LegoEntity* p_entity);
MxBool FUN_10030030(MxS32 p_index); MxBool DecrementCounter(MxS32 p_index);
MxBool FUN_10030110(LegoBuildingInfo* p_data); MxBool DecrementCounter(LegoBuildingInfo* p_data);
void ScheduleAnimation(LegoEntity* p_entity, MxLong p_length, MxBool p_haveSound, MxBool p_unk0x28); void ScheduleAnimation(LegoEntity* p_entity, MxLong p_length, MxBool p_haveSound, MxBool p_hideAfterAnimation);
void FUN_10030590(); void ClearCounters();
void AdjustHeight(MxS32 p_index); void AdjustHeight(MxS32 p_index);
MxResult FUN_10030630(); MxResult DetermineBoundaries();
LegoBuildingInfo* GetInfoArray(MxS32& p_length); LegoBuildingInfo* GetInfoArray(MxS32& p_length);
void FUN_100307b0(LegoEntity* p_entity, MxS32 p_adjust); void AdjustCounter(LegoEntity* p_entity, MxS32 p_adjust);
void FUN_10030800(); void SetInitialCounters();
static const char* GetCustomizeAnimFile() { return g_customizeAnimFile; } static const char* GetCustomizeAnimFile() { return g_customizeAnimFile; }
@ -101,13 +101,13 @@ class LegoBuildingManager : public MxCore {
static MxS32 g_maxMove[16]; static MxS32 g_maxMove[16];
static MxU32 g_maxSound; static MxU32 g_maxSound;
MxU8 m_nextVariant; // 0x08 MxU8 m_nextVariant; // 0x08
MxBool m_unk0x09; // 0x09 MxBool m_boundariesDetermined; // 0x09
AnimEntry* m_entries[5]; // 0x0c AnimEntry* m_entries[5]; // 0x0c
MxS8 m_numEntries; // 0x20 MxS8 m_numEntries; // 0x20
LegoCacheSound* m_sound; // 0x24 LegoCacheSound* m_sound; // 0x24
MxBool m_unk0x28; // 0x28 MxBool m_hideAfterAnimation; // 0x28
LegoWorld* m_world; // 0x2c LegoWorld* m_world; // 0x2c
friend class DebugViewer; friend class DebugViewer;
}; };

View File

@ -68,7 +68,7 @@ class LegoGameState {
e_isle, e_isle,
e_infomain, e_infomain,
e_infodoor, e_infodoor,
e_unk4, e_infocenterExited,
e_elevbott, e_elevbott,
e_elevride, e_elevride,
e_elevride2, e_elevride2,
@ -81,10 +81,10 @@ class LegoGameState {
e_jetrace, e_jetrace,
e_jetrace2, e_jetrace2,
e_jetraceExterior, e_jetraceExterior,
e_unk17, e_jetskibuildExited,
e_carrace, e_carrace,
e_carraceExterior, e_carraceExterior,
e_unk20, e_racecarbuildExited,
e_unk21, e_unk21,
e_pizzeriaExterior, e_pizzeriaExterior,
e_unk23, e_unk23,
@ -92,12 +92,12 @@ class LegoGameState {
e_garageExterior, e_garageExterior,
e_garage, e_garage,
e_garadoor, e_garadoor,
e_unk28, e_garageExited,
e_hospitalExterior, e_hospitalExterior,
e_hospital, e_hospital,
e_unk31, e_hospitalExited,
e_policeExterior, e_policeExterior,
e_unk33, e_policeExited,
e_police, e_police,
e_polidoor, e_polidoor,
e_copterbuild, e_copterbuild,
@ -130,7 +130,7 @@ class LegoGameState {
e_towtrack, e_towtrack,
e_jetski, e_jetski,
e_unk66 = 66 e_vehicleExited = 66
}; };
// SIZE 0x0e // SIZE 0x0e

View File

@ -718,11 +718,11 @@ LegoEntity* Act2Actor::FUN_10019b90(MxBool* p_param)
switch (m_unk0x1d) { switch (m_unk0x1d) {
case 0: case 0:
if (buildingInfo[12].m_unk0x11) { if (buildingInfo[12].m_counter) {
result = buildingInfo[12].m_entity; result = buildingInfo[12].m_entity;
*p_param = TRUE; *p_param = TRUE;
} }
else if (buildingInfo[14].m_unk0x11) { else if (buildingInfo[14].m_counter) {
result = buildingInfo[14].m_entity; result = buildingInfo[14].m_entity;
*p_param = TRUE; *p_param = TRUE;
} }
@ -736,7 +736,7 @@ LegoEntity* Act2Actor::FUN_10019b90(MxBool* p_param)
} }
break; break;
case 1: case 1:
if (buildingInfo[13].m_unk0x11) { if (buildingInfo[13].m_counter) {
result = buildingInfo[13].m_entity; result = buildingInfo[13].m_entity;
*p_param = TRUE; *p_param = TRUE;
} }
@ -750,11 +750,11 @@ LegoEntity* Act2Actor::FUN_10019b90(MxBool* p_param)
} }
break; break;
case 2: case 2:
if (buildingInfo[9].m_unk0x11) { if (buildingInfo[9].m_counter) {
result = buildingInfo[9].m_entity; result = buildingInfo[9].m_entity;
*p_param = TRUE; *p_param = TRUE;
} }
else if (buildingInfo[11].m_unk0x11) { else if (buildingInfo[11].m_counter) {
result = buildingInfo[11].m_entity; result = buildingInfo[11].m_entity;
*p_param = TRUE; *p_param = TRUE;
} }
@ -768,15 +768,15 @@ LegoEntity* Act2Actor::FUN_10019b90(MxBool* p_param)
} }
break; break;
case 3: case 3:
if (buildingInfo[7].m_unk0x11) { if (buildingInfo[7].m_counter) {
result = buildingInfo[7].m_entity; result = buildingInfo[7].m_entity;
*p_param = TRUE; *p_param = TRUE;
} }
else if (buildingInfo[8].m_unk0x11) { else if (buildingInfo[8].m_counter) {
result = buildingInfo[8].m_entity; result = buildingInfo[8].m_entity;
*p_param = TRUE; *p_param = TRUE;
} }
else if (buildingInfo[3].m_unk0x11) { else if (buildingInfo[3].m_counter) {
result = buildingInfo[3].m_entity; result = buildingInfo[3].m_entity;
*p_param = TRUE; *p_param = TRUE;
} }
@ -790,11 +790,11 @@ LegoEntity* Act2Actor::FUN_10019b90(MxBool* p_param)
} }
break; break;
case 4: case 4:
if (buildingInfo[5].m_unk0x11) { if (buildingInfo[5].m_counter) {
result = buildingInfo[5].m_entity; result = buildingInfo[5].m_entity;
*p_param = TRUE; *p_param = TRUE;
} }
else if (buildingInfo[10].m_unk0x11) { else if (buildingInfo[10].m_counter) {
result = buildingInfo[10].m_entity; result = buildingInfo[10].m_entity;
*p_param = TRUE; *p_param = TRUE;
} }
@ -808,7 +808,7 @@ LegoEntity* Act2Actor::FUN_10019b90(MxBool* p_param)
} }
break; break;
case 5: case 5:
if (buildingInfo[4].m_unk0x11) { if (buildingInfo[4].m_counter) {
result = buildingInfo[4].m_entity; result = buildingInfo[4].m_entity;
*p_param = TRUE; *p_param = TRUE;
} }
@ -822,7 +822,7 @@ LegoEntity* Act2Actor::FUN_10019b90(MxBool* p_param)
} }
break; break;
case 6: case 6:
if (buildingInfo[2].m_unk0x11) { if (buildingInfo[2].m_counter) {
result = buildingInfo[2].m_entity; result = buildingInfo[2].m_entity;
*p_param = TRUE; *p_param = TRUE;
} }
@ -836,7 +836,7 @@ LegoEntity* Act2Actor::FUN_10019b90(MxBool* p_param)
} }
break; break;
case 7: case 7:
if (buildingInfo[6].m_unk0x11) { if (buildingInfo[6].m_counter) {
result = buildingInfo[6].m_entity; result = buildingInfo[6].m_entity;
*p_param = TRUE; *p_param = TRUE;
} }
@ -861,7 +861,7 @@ LegoEntity* Act2Actor::FUN_10019b90(MxBool* p_param)
return result; return result;
} }
if (buildingInfo[15].m_unk0x11) { if (buildingInfo[15].m_counter) {
result = buildingInfo[15].m_entity; result = buildingInfo[15].m_entity;
*p_param = TRUE; *p_param = TRUE;
} }

View File

@ -654,8 +654,8 @@ void Act3Brickster::Animate(float p_time)
assert(SoundManager()->GetCacheSoundManager()); assert(SoundManager()->GetCacheSoundManager());
SoundManager()->GetCacheSoundManager()->Play("thpt", NULL, FALSE); SoundManager()->GetCacheSoundManager()->Play("thpt", NULL, FALSE);
while (m_bInfo->m_unk0x11 > 0 || m_bInfo->m_unk0x11 == -1) { while (m_bInfo->m_counter > 0 || m_bInfo->m_counter == -1) {
if (!BuildingManager()->FUN_10030110(m_bInfo)) { if (!BuildingManager()->DecrementCounter(m_bInfo)) {
break; break;
} }
} }
@ -866,7 +866,7 @@ MxResult Act3Brickster::FUN_100417c0()
float local124; float local124;
for (MxS32 i = 0; i < length; i++) { for (MxS32 i = 0; i < length; i++) {
if (bInfo[i].m_unk0x11 < 0 && bInfo[i].m_boundary != NULL && bInfo[i].m_entity != NULL && i != 0 && if (bInfo[i].m_counter < 0 && bInfo[i].m_boundary != NULL && bInfo[i].m_entity != NULL && i != 0 &&
(local120 == -1 || i != 15)) { (local120 == -1 || i != 15)) {
Mx3DPointFloat local188(bInfo[i].m_x, bInfo[i].m_y, bInfo[i].m_z); Mx3DPointFloat local188(bInfo[i].m_x, bInfo[i].m_y, bInfo[i].m_z);

View File

@ -70,7 +70,9 @@ MxResult Act3Ammo::Remove()
// FUNCTION: BETA10 0x1001d8b3 // FUNCTION: BETA10 0x1001d8b3
MxResult Act3Ammo::Create(Act3* p_world, MxU32 p_isPizza, MxS32 p_index) MxResult Act3Ammo::Create(Act3* p_world, MxU32 p_isPizza, MxS32 p_index)
{ {
#ifdef BETA10
assert(m_ammoFlag); assert(m_ammoFlag);
#endif
char name[12]; char name[12];
if (p_isPizza) { if (p_isPizza) {

View File

@ -224,7 +224,7 @@ MxLong Ambulance::HandleEndAction(MxEndActionNotificationParam& p_param)
else if (objectId == IsleScript::c_hps117bd_RunAnim) { else if (objectId == IsleScript::c_hps117bd_RunAnim) {
CurrentWorld()->PlaceActor(UserActor()); CurrentWorld()->PlaceActor(UserActor());
HandleClick(); HandleClick();
SpawnPlayer(LegoGameState::e_unk33, TRUE, 0); SpawnPlayer(LegoGameState::e_policeExited, TRUE, 0);
m_unk0x172 = 0; m_unk0x172 = 0;
TickleManager()->RegisterClient(this, 40000); TickleManager()->RegisterClient(this, 40000);
@ -391,7 +391,7 @@ MxLong Ambulance::HandleClick()
ControlManager()->Register(this); ControlManager()->Register(this);
if (m_state->m_unk0x08 == 1) { if (m_state->m_unk0x08 == 1) {
SpawnPlayer(LegoGameState::e_unk31, TRUE, 0); SpawnPlayer(LegoGameState::e_hospitalExited, TRUE, 0);
m_state->m_startTime = Timer()->GetTime(); m_state->m_startTime = Timer()->GetTime();
InvokeAction(Extra::e_start, *g_isleScript, IsleScript::c_pns018rd_RunAnim, NULL); InvokeAction(Extra::e_start, *g_isleScript, IsleScript::c_pns018rd_RunAnim, NULL);
} }
@ -444,14 +444,14 @@ MxLong Ambulance::HandleControl(LegoControlManagerNotificationParam& p_param)
switch (p_param.m_clickedObjectId) { switch (p_param.m_clickedObjectId) {
case IsleScript::c_AmbulanceArms_Ctl: case IsleScript::c_AmbulanceArms_Ctl:
Exit(); Exit();
GameState()->m_currentArea = LegoGameState::e_unk66; GameState()->m_currentArea = LegoGameState::e_vehicleExited;
result = 1; result = 1;
break; break;
case IsleScript::c_AmbulanceInfo_Ctl: case IsleScript::c_AmbulanceInfo_Ctl:
((Isle*) CurrentWorld())->SetDestLocation(LegoGameState::e_infomain); ((Isle*) CurrentWorld())->SetDestLocation(LegoGameState::e_infomain);
TransitionManager()->StartTransition(MxTransitionManager::e_mosaic, 50, FALSE, FALSE); TransitionManager()->StartTransition(MxTransitionManager::e_mosaic, 50, FALSE, FALSE);
Exit(); Exit();
GameState()->m_currentArea = LegoGameState::e_unk66; GameState()->m_currentArea = LegoGameState::e_vehicleExited;
result = 1; result = 1;
break; break;
case IsleScript::c_AmbulanceHorn_Ctl: case IsleScript::c_AmbulanceHorn_Ctl:

View File

@ -85,7 +85,7 @@ MxLong Bike::HandleControl(LegoControlManagerNotificationParam& p_param)
switch (p_param.m_clickedObjectId) { switch (p_param.m_clickedObjectId) {
case IsleScript::c_BikeArms_Ctl: case IsleScript::c_BikeArms_Ctl:
Exit(); Exit();
GameState()->m_currentArea = LegoGameState::e_unk66; GameState()->m_currentArea = LegoGameState::e_vehicleExited;
result = 1; result = 1;
break; break;
case IsleScript::c_BikeInfo_Ctl: case IsleScript::c_BikeInfo_Ctl:

View File

@ -128,7 +128,7 @@ MxLong DuneBuggy::HandleControl(LegoControlManagerNotificationParam& p_param)
switch (p_param.m_clickedObjectId) { switch (p_param.m_clickedObjectId) {
case IsleScript::c_DuneCarArms_Ctl: case IsleScript::c_DuneCarArms_Ctl:
Exit(); Exit();
GameState()->m_currentArea = LegoGameState::e_unk66; GameState()->m_currentArea = LegoGameState::e_vehicleExited;
result = 1; result = 1;
break; break;
case IsleScript::c_DuneCarInfo_Ctl: case IsleScript::c_DuneCarInfo_Ctl:

View File

@ -203,7 +203,7 @@ MxLong Helicopter::HandleControl(LegoControlManagerNotificationParam& p_param)
} }
Exit(); Exit();
GameState()->m_currentArea = LegoGameState::e_unk66; GameState()->m_currentArea = LegoGameState::e_vehicleExited;
result = 1; result = 1;
break; break;
case IsleScript::c_Helicopter_TakeOff_Ctl: { case IsleScript::c_Helicopter_TakeOff_Ctl: {

View File

@ -148,7 +148,7 @@ void IslePathActor::Exit()
} }
m_previousActor->SetActorState(c_initial); m_previousActor->SetActorState(c_initial);
GameState()->m_currentArea = LegoGameState::Area::e_unk66; GameState()->m_currentArea = LegoGameState::Area::e_vehicleExited;
} }
FUN_1001b660(); FUN_1001b660();
@ -199,7 +199,7 @@ void IslePathActor::RegisterSpawnLocations()
JukeboxScript::c_Quiet_Audio JukeboxScript::c_Quiet_Audio
); );
g_spawnLocations[3] = SpawnLocation( g_spawnLocations[3] = SpawnLocation(
LegoGameState::e_unk4, LegoGameState::e_infocenterExited,
g_isleScript, g_isleScript,
0, 0,
"int46", "int46",
@ -223,7 +223,7 @@ void IslePathActor::RegisterSpawnLocations()
JukeboxScript::c_Beach_Music JukeboxScript::c_Beach_Music
); );
g_spawnLocations[5] = SpawnLocation( g_spawnLocations[5] = SpawnLocation(
LegoGameState::e_unk17, LegoGameState::e_jetskibuildExited,
g_isleScript, g_isleScript,
0, 0,
"EDG00_46", "EDG00_46",
@ -259,7 +259,7 @@ void IslePathActor::RegisterSpawnLocations()
JukeboxScript::c_CentralNorthRoad_Music JukeboxScript::c_CentralNorthRoad_Music
); );
g_spawnLocations[8] = SpawnLocation( g_spawnLocations[8] = SpawnLocation(
LegoGameState::e_unk20, LegoGameState::e_racecarbuildExited,
g_isleScript, g_isleScript,
0, 0,
"INT16", "INT16",
@ -295,7 +295,7 @@ void IslePathActor::RegisterSpawnLocations()
JukeboxScript::c_GarageArea_Music JukeboxScript::c_GarageArea_Music
); );
g_spawnLocations[11] = SpawnLocation( g_spawnLocations[11] = SpawnLocation(
LegoGameState::e_unk28, LegoGameState::e_garageExited,
g_isleScript, g_isleScript,
0, 0,
"INT24", "INT24",
@ -319,7 +319,7 @@ void IslePathActor::RegisterSpawnLocations()
JukeboxScript::c_Hospital_Music JukeboxScript::c_Hospital_Music
); );
g_spawnLocations[13] = SpawnLocation( g_spawnLocations[13] = SpawnLocation(
LegoGameState::e_unk31, LegoGameState::e_hospitalExited,
g_isleScript, g_isleScript,
0, 0,
"EDG02_28", "EDG02_28",
@ -343,7 +343,7 @@ void IslePathActor::RegisterSpawnLocations()
JukeboxScript::c_PoliceStation_Music JukeboxScript::c_PoliceStation_Music
); );
g_spawnLocations[15] = SpawnLocation( g_spawnLocations[15] = SpawnLocation(
LegoGameState::e_unk33, LegoGameState::e_policeExited,
g_isleScript, g_isleScript,
0, 0,
"EDG02_64", "EDG02_64",

View File

@ -145,7 +145,7 @@ MxLong Jetski::HandleControl(LegoControlManagerNotificationParam& p_param)
Exit(); Exit();
((IslePathActor*) UserActor()) ((IslePathActor*) UserActor())
->SpawnPlayer(LegoGameState::e_jetraceExterior, TRUE, c_spawnBit1 | c_playMusic | c_spawnBit3); ->SpawnPlayer(LegoGameState::e_jetraceExterior, TRUE, c_spawnBit1 | c_playMusic | c_spawnBit3);
GameState()->m_currentArea = LegoGameState::e_unk66; GameState()->m_currentArea = LegoGameState::e_vehicleExited;
return 1; return 1;
case IsleScript::c_JetskiInfo_Ctl: case IsleScript::c_JetskiInfo_Ctl:
((Isle*) CurrentWorld())->SetDestLocation(LegoGameState::e_infomain); ((Isle*) CurrentWorld())->SetDestLocation(LegoGameState::e_infomain);

View File

@ -121,7 +121,7 @@ MxLong Motocycle::HandleControl(LegoControlManagerNotificationParam& p_param)
switch (p_param.m_clickedObjectId) { switch (p_param.m_clickedObjectId) {
case IsleScript::c_MotoBikeArms_Ctl: case IsleScript::c_MotoBikeArms_Ctl:
Exit(); Exit();
GameState()->m_currentArea = LegoGameState::e_unk66; GameState()->m_currentArea = LegoGameState::e_vehicleExited;
result = 1; result = 1;
break; break;
case IsleScript::c_MotoBikeInfo_Ctl: case IsleScript::c_MotoBikeInfo_Ctl:

View File

@ -112,7 +112,7 @@ MxLong SkateBoard::HandleControl(LegoControlManagerNotificationParam& p_param)
if (p_param.m_unk0x28 == 1 && p_param.m_clickedObjectId == IsleScript::c_SkateArms_Ctl) { if (p_param.m_unk0x28 == 1 && p_param.m_clickedObjectId == IsleScript::c_SkateArms_Ctl) {
Exit(); Exit();
GameState()->m_currentArea = LegoGameState::Area::e_unk66; GameState()->m_currentArea = LegoGameState::Area::e_vehicleExited;
result = 1; result = 1;
} }

View File

@ -437,7 +437,7 @@ MxLong TowTrack::HandleClick()
FindROI("rcred")->SetVisibility(FALSE); FindROI("rcred")->SetVisibility(FALSE);
} }
else { else {
SpawnPlayer(LegoGameState::e_unk28, TRUE, 0); SpawnPlayer(LegoGameState::e_garageExited, TRUE, 0);
m_lastAction = IsleScript::c_noneIsle; m_lastAction = IsleScript::c_noneIsle;
m_lastAnimation = IsleScript::c_noneIsle; m_lastAnimation = IsleScript::c_noneIsle;
m_state->m_startTime = Timer()->GetTime(); m_state->m_startTime = Timer()->GetTime();
@ -488,14 +488,14 @@ MxLong TowTrack::HandleControl(LegoControlManagerNotificationParam& p_param)
switch (p_param.m_clickedObjectId) { switch (p_param.m_clickedObjectId) {
case IsleScript::c_TowTrackArms_Ctl: case IsleScript::c_TowTrackArms_Ctl:
Exit(); Exit();
GameState()->m_currentArea = LegoGameState::e_unk66; GameState()->m_currentArea = LegoGameState::e_vehicleExited;
result = 1; result = 1;
break; break;
case IsleScript::c_TowInfo_Ctl: case IsleScript::c_TowInfo_Ctl:
((Isle*) CurrentWorld())->SetDestLocation(LegoGameState::e_infomain); ((Isle*) CurrentWorld())->SetDestLocation(LegoGameState::e_infomain);
TransitionManager()->StartTransition(MxTransitionManager::e_mosaic, 50, FALSE, FALSE); TransitionManager()->StartTransition(MxTransitionManager::e_mosaic, 50, FALSE, FALSE);
Exit(); Exit();
GameState()->m_currentArea = LegoGameState::e_unk66; GameState()->m_currentArea = LegoGameState::e_vehicleExited;
result = 1; result = 1;
break; break;
case IsleScript::c_TowHorn_Ctl: case IsleScript::c_TowHorn_Ctl:

View File

@ -787,11 +787,11 @@ void LegoCarBuild::FUN_100243a0()
TransitionManager()->StartTransition(MxTransitionManager::TransitionType::e_mosaic, 50, FALSE, FALSE); TransitionManager()->StartTransition(MxTransitionManager::TransitionType::e_mosaic, 50, FALSE, FALSE);
break; break;
case Jetski_Actor: case Jetski_Actor:
m_destLocation = LegoGameState::Area::e_unk17; m_destLocation = LegoGameState::Area::e_jetskibuildExited;
TransitionManager()->StartTransition(MxTransitionManager::TransitionType::e_mosaic, 50, FALSE, FALSE); TransitionManager()->StartTransition(MxTransitionManager::TransitionType::e_mosaic, 50, FALSE, FALSE);
break; break;
case RaceCar_Actor: case RaceCar_Actor:
m_destLocation = LegoGameState::Area::e_unk20; m_destLocation = LegoGameState::Area::e_racecarbuildExited;
TransitionManager()->StartTransition(MxTransitionManager::TransitionType::e_mosaic, 50, FALSE, FALSE); TransitionManager()->StartTransition(MxTransitionManager::TransitionType::e_mosaic, 50, FALSE, FALSE);
} }
} }

View File

@ -253,10 +253,10 @@ void LegoBuildingManager::Init()
} }
m_nextVariant = 0; m_nextVariant = 0;
m_unk0x09 = FALSE; m_boundariesDetermined = FALSE;
m_numEntries = 0; m_numEntries = 0;
m_sound = NULL; m_sound = NULL;
m_unk0x28 = FALSE; m_hideAfterAnimation = FALSE;
} }
// FUNCTION: LEGO1 0x1002fa00 // FUNCTION: LEGO1 0x1002fa00
@ -274,7 +274,7 @@ void LegoBuildingManager::LoadWorldInfo()
LegoEntity* entity = (LegoEntity*) world->Find("MxEntity", g_buildingInfoVariants[0]); LegoEntity* entity = (LegoEntity*) world->Find("MxEntity", g_buildingInfoVariants[0]);
if (entity) { if (entity) {
entity->GetROI()->SetVisibility(TRUE); entity->GetROI()->SetVisibility(TRUE);
m_unk0x09 = FALSE; m_boundariesDetermined = FALSE;
} }
} }
else { else {
@ -286,7 +286,7 @@ void LegoBuildingManager::LoadWorldInfo()
} }
} }
m_unk0x09 = FALSE; m_boundariesDetermined = FALSE;
} }
// FUNCTION: LEGO1 0x1002fa90 // FUNCTION: LEGO1 0x1002fa90
@ -301,7 +301,7 @@ void LegoBuildingManager::CreateBuilding(MxS32 p_index, LegoWorld* p_world)
LegoROI* roi = entity->GetROI(); LegoROI* roi = entity->GetROI();
AdjustHeight(p_index); AdjustHeight(p_index);
MxMatrix mat = roi->GetLocal2World(); MxMatrix mat = roi->GetLocal2World();
mat[3][1] = g_buildingInfo[p_index].m_unk0x14; mat[3][1] = g_buildingInfo[p_index].m_adjustedY;
roi->UpdateTransformationRelativeToParent(mat); roi->UpdateTransformationRelativeToParent(mat);
VideoManager()->Get3DManager()->Moved(*roi); VideoManager()->Get3DManager()->Moved(*roi);
} }
@ -316,7 +316,7 @@ void LegoBuildingManager::Reset()
g_buildingInfo[i].m_entity = NULL; g_buildingInfo[i].m_entity = NULL;
} }
m_unk0x09 = FALSE; m_boundariesDetermined = FALSE;
for (i = 0; i < m_numEntries; i++) { for (i = 0; i < m_numEntries; i++) {
delete m_entries[i]; delete m_entries[i];
@ -343,7 +343,7 @@ MxResult LegoBuildingManager::Write(LegoStorage* p_storage)
if (p_storage->Write(&info->m_mood, sizeof(MxU8)) != SUCCESS) { if (p_storage->Write(&info->m_mood, sizeof(MxU8)) != SUCCESS) {
goto done; goto done;
} }
if (p_storage->Write(&info->m_initialUnk0x11, sizeof(MxS8)) != SUCCESS) { if (p_storage->Write(&info->m_initialCounter, sizeof(MxS8)) != SUCCESS) {
goto done; goto done;
} }
} }
@ -376,11 +376,11 @@ MxResult LegoBuildingManager::Read(LegoStorage* p_storage)
if (p_storage->Read(&info->m_mood, sizeof(MxU8)) != SUCCESS) { if (p_storage->Read(&info->m_mood, sizeof(MxU8)) != SUCCESS) {
goto done; goto done;
} }
if (p_storage->Read(&info->m_unk0x11, sizeof(MxS8)) != SUCCESS) { if (p_storage->Read(&info->m_counter, sizeof(MxS8)) != SUCCESS) {
goto done; goto done;
} }
info->m_initialUnk0x11 = info->m_unk0x11; info->m_initialCounter = info->m_counter;
AdjustHeight(i); AdjustHeight(i);
} }
@ -402,15 +402,15 @@ MxResult LegoBuildingManager::Read(LegoStorage* p_storage)
// FUNCTION: BETA10 0x10063f1a // FUNCTION: BETA10 0x10063f1a
void LegoBuildingManager::AdjustHeight(MxS32 p_index) void LegoBuildingManager::AdjustHeight(MxS32 p_index)
{ {
if (g_buildingInfo[p_index].m_unk0x11 > 0) { if (g_buildingInfo[p_index].m_counter > 0) {
float value = g_buildingInfoDownshift[p_index] - g_buildingInfo[p_index].m_unk0x11; float value = g_buildingInfoDownshift[p_index] - g_buildingInfo[p_index].m_counter;
g_buildingInfo[p_index].m_unk0x14 = g_buildingInfo[p_index].m_adjustedY =
g_buildingInfoInit[p_index].m_unk0x14 - value * g_buildingInfoDownshiftScale[p_index]; g_buildingInfoInit[p_index].m_adjustedY - value * g_buildingInfoDownshiftScale[p_index];
} }
else if (g_buildingInfo[p_index].m_unk0x11 == 0) { else if (g_buildingInfo[p_index].m_counter == 0) {
float value = g_buildingInfoDownshift[p_index] - g_buildingInfo[p_index].m_unk0x11; float value = g_buildingInfoDownshift[p_index] - g_buildingInfo[p_index].m_counter;
g_buildingInfo[p_index].m_unk0x14 = g_buildingInfo[p_index].m_adjustedY =
g_buildingInfoInit[p_index].m_unk0x14 - value * g_buildingInfoDownshiftScale[p_index]; g_buildingInfoInit[p_index].m_adjustedY - value * g_buildingInfoDownshiftScale[p_index];
if (g_buildingInfo[p_index].m_entity != NULL) { if (g_buildingInfo[p_index].m_entity != NULL) {
LegoROI* roi = g_buildingInfo[p_index].m_entity->GetROI(); LegoROI* roi = g_buildingInfo[p_index].m_entity->GetROI();
@ -420,7 +420,7 @@ void LegoBuildingManager::AdjustHeight(MxS32 p_index)
} }
} }
else { else {
g_buildingInfo[p_index].m_unk0x14 = g_buildingInfoInit[p_index].m_unk0x14; g_buildingInfo[p_index].m_adjustedY = g_buildingInfoInit[p_index].m_adjustedY;
} }
} }
@ -453,7 +453,7 @@ MxBool LegoBuildingManager::SwitchVariant(LegoEntity* p_entity)
LegoBuildingInfo* info = GetInfo(p_entity); LegoBuildingInfo* info = GetInfo(p_entity);
if (info != NULL && info->m_flags & LegoBuildingInfo::c_hasVariants && info->m_unk0x11 == -1) { if (info != NULL && info->m_flags & LegoBuildingInfo::c_hasVariants && info->m_counter == -1) {
LegoROI* roi = p_entity->GetROI(); LegoROI* roi = p_entity->GetROI();
if (++m_nextVariant >= sizeOfArray(g_buildingInfoVariants)) { if (++m_nextVariant >= sizeOfArray(g_buildingInfoVariants)) {
m_nextVariant = 0; m_nextVariant = 0;
@ -587,7 +587,7 @@ void LegoBuildingManager::SetCustomizeAnimFile(const char* p_value)
} }
// FUNCTION: LEGO1 0x10030000 // FUNCTION: LEGO1 0x10030000
MxBool LegoBuildingManager::FUN_10030000(LegoEntity* p_entity) MxBool LegoBuildingManager::DecrementCounter(LegoEntity* p_entity)
{ {
LegoBuildingInfo* info = GetInfo(p_entity); LegoBuildingInfo* info = GetInfo(p_entity);
@ -595,7 +595,7 @@ MxBool LegoBuildingManager::FUN_10030000(LegoEntity* p_entity)
return FALSE; return FALSE;
} }
return FUN_10030030(info - g_buildingInfo); return DecrementCounter(info - g_buildingInfo);
} }
inline LegoBuildingInfo* GetBuildingInfo(MxS32 p_index) inline LegoBuildingInfo* GetBuildingInfo(MxS32 p_index)
@ -608,7 +608,7 @@ inline LegoBuildingInfo* GetBuildingInfo(MxS32 p_index)
} }
// FUNCTION: LEGO1 0x10030030 // FUNCTION: LEGO1 0x10030030
MxBool LegoBuildingManager::FUN_10030030(MxS32 p_index) MxBool LegoBuildingManager::DecrementCounter(MxS32 p_index)
{ {
if (p_index >= sizeOfArray(g_buildingInfo)) { if (p_index >= sizeOfArray(g_buildingInfo)) {
return FALSE; return FALSE;
@ -621,25 +621,25 @@ MxBool LegoBuildingManager::FUN_10030030(MxS32 p_index)
MxBool result = TRUE; MxBool result = TRUE;
if (info->m_unk0x11 < 0) { if (info->m_counter < 0) {
info->m_unk0x11 = g_buildingInfoDownshift[p_index]; info->m_counter = g_buildingInfoDownshift[p_index];
} }
if (info->m_unk0x11 <= 0) { if (info->m_counter <= 0) {
result = FALSE; result = FALSE;
} }
else { else {
LegoROI* roi = info->m_entity->GetROI(); LegoROI* roi = info->m_entity->GetROI();
info->m_unk0x11 -= 2; info->m_counter -= 2;
if (info->m_unk0x11 == 1) { if (info->m_counter == 1) {
info->m_unk0x11 = 0; info->m_counter = 0;
roi->SetVisibility(FALSE); roi->SetVisibility(FALSE);
} }
else { else {
AdjustHeight(p_index); AdjustHeight(p_index);
MxMatrix mat = roi->GetLocal2World(); MxMatrix mat = roi->GetLocal2World();
mat[3][1] = g_buildingInfo[p_index].m_unk0x14; mat[3][1] = g_buildingInfo[p_index].m_adjustedY;
roi->UpdateTransformationRelativeToParent(mat); roi->UpdateTransformationRelativeToParent(mat);
VideoManager()->Get3DManager()->Moved(*roi); VideoManager()->Get3DManager()->Moved(*roi);
} }
@ -649,11 +649,11 @@ MxBool LegoBuildingManager::FUN_10030030(MxS32 p_index)
} }
// FUNCTION: LEGO1 0x10030110 // FUNCTION: LEGO1 0x10030110
MxBool LegoBuildingManager::FUN_10030110(LegoBuildingInfo* p_data) MxBool LegoBuildingManager::DecrementCounter(LegoBuildingInfo* p_data)
{ {
for (MxS32 i = 0; i < sizeOfArray(g_buildingInfo); i++) { for (MxS32 i = 0; i < sizeOfArray(g_buildingInfo); i++) {
if (&g_buildingInfo[i] == p_data) { if (&g_buildingInfo[i] == p_data) {
return FUN_10030030(i); return DecrementCounter(i);
} }
} }
@ -661,7 +661,12 @@ MxBool LegoBuildingManager::FUN_10030110(LegoBuildingInfo* p_data)
} }
// FUNCTION: LEGO1 0x10030150 // FUNCTION: LEGO1 0x10030150
void LegoBuildingManager::ScheduleAnimation(LegoEntity* p_entity, MxLong p_length, MxBool p_haveSound, MxBool p_unk0x28) void LegoBuildingManager::ScheduleAnimation(
LegoEntity* p_entity,
MxLong p_length,
MxBool p_haveSound,
MxBool p_hideAfterAnimation
)
{ {
m_world = CurrentWorld(); m_world = CurrentWorld();
@ -671,7 +676,7 @@ void LegoBuildingManager::ScheduleAnimation(LegoEntity* p_entity, MxLong p_lengt
} }
if (m_numEntries == 0) { if (m_numEntries == 0) {
m_unk0x28 = p_unk0x28; m_hideAfterAnimation = p_hideAfterAnimation;
TickleManager()->RegisterClient(this, 50); TickleManager()->RegisterClient(this, 50);
} }
@ -685,9 +690,9 @@ void LegoBuildingManager::ScheduleAnimation(LegoEntity* p_entity, MxLong p_lengt
time += p_length; time += p_length;
entry->m_time = time + 1000; entry->m_time = time + 1000;
entry->m_unk0x0c = entry->m_roi->GetWorldPosition()[1]; entry->m_y = entry->m_roi->GetWorldPosition()[1];
entry->m_muted = p_haveSound == FALSE; entry->m_muted = p_haveSound == FALSE;
FUN_100307b0(p_entity, -2); AdjustCounter(p_entity, -2);
} }
// FUNCTION: LEGO1 0x10030220 // FUNCTION: LEGO1 0x10030220
@ -724,33 +729,33 @@ MxResult LegoBuildingManager::Tickle()
MxMatrix local48; MxMatrix local48;
MxMatrix locald8; MxMatrix locald8;
MxMatrix local120(entry->m_roi->GetLocal2World()); MxMatrix transformationMatrix(entry->m_roi->GetLocal2World());
Mx3DPointFloat local134(local120[3]); Mx3DPointFloat position(transformationMatrix[3]);
ZEROVEC3(local120[3]); ZEROVEC3(transformationMatrix[3]);
locald8.SetIdentity(); locald8.SetIdentity();
local48 = local120; local48 = transformationMatrix;
local134[1] = sin(((entry->m_time - time) * 10) * 0.0062831999f) * 0.4 + (entry->m_unk0x0c -= 0.05); position[1] = sin(((entry->m_time - time) * 10) * 0.0062831999f) * 0.4 + (entry->m_y -= 0.05);
SET3(local120[3], local134); SET3(transformationMatrix[3], position);
entry->m_roi->UpdateTransformationRelativeToParent(local120); entry->m_roi->UpdateTransformationRelativeToParent(transformationMatrix);
VideoManager()->Get3DManager()->Moved(*entry->m_roi); VideoManager()->Get3DManager()->Moved(*entry->m_roi);
if (entry->m_time < time) { if (entry->m_time < time) {
LegoBuildingInfo* info = GetInfo(entry->m_entity); LegoBuildingInfo* info = GetInfo(entry->m_entity);
if (info->m_unk0x11 && !m_unk0x28) { if (info->m_counter && !m_hideAfterAnimation) {
MxS32 index = info - g_buildingInfo; MxS32 index = info - g_buildingInfo;
AdjustHeight(index); AdjustHeight(index);
MxMatrix mat = entry->m_roi->GetLocal2World(); MxMatrix mat = entry->m_roi->GetLocal2World();
mat[3][1] = g_buildingInfo[index].m_unk0x14; mat[3][1] = g_buildingInfo[index].m_adjustedY;
entry->m_roi->UpdateTransformationRelativeToParent(mat); entry->m_roi->UpdateTransformationRelativeToParent(mat);
VideoManager()->Get3DManager()->Moved(*entry->m_roi); VideoManager()->Get3DManager()->Moved(*entry->m_roi);
} }
else { else {
info->m_unk0x11 = 0; info->m_counter = 0;
entry->m_roi->SetVisibility(FALSE); entry->m_roi->SetVisibility(FALSE);
} }
@ -774,17 +779,17 @@ MxResult LegoBuildingManager::Tickle()
// FUNCTION: LEGO1 0x10030590 // FUNCTION: LEGO1 0x10030590
// FUNCTION: BETA10 0x1006474c // FUNCTION: BETA10 0x1006474c
void LegoBuildingManager::FUN_10030590() void LegoBuildingManager::ClearCounters()
{ {
for (MxS32 i = 0; i < sizeOfArray(g_buildingInfo); i++) { for (MxS32 i = 0; i < sizeOfArray(g_buildingInfo); i++) {
g_buildingInfo[i].m_unk0x11 = -1; g_buildingInfo[i].m_counter = -1;
g_buildingInfo[i].m_initialUnk0x11 = -1; g_buildingInfo[i].m_initialCounter = -1;
AdjustHeight(i); AdjustHeight(i);
if (g_buildingInfo[i].m_entity != NULL) { if (g_buildingInfo[i].m_entity != NULL) {
LegoROI* roi = g_buildingInfo[i].m_entity->GetROI(); LegoROI* roi = g_buildingInfo[i].m_entity->GetROI();
MxMatrix mat = roi->GetLocal2World(); MxMatrix mat = roi->GetLocal2World();
mat[3][1] = g_buildingInfo[i].m_unk0x14; mat[3][1] = g_buildingInfo[i].m_adjustedY;
roi->UpdateTransformationRelativeToParent(mat); roi->UpdateTransformationRelativeToParent(mat);
VideoManager()->Get3DManager()->Moved(*roi); VideoManager()->Get3DManager()->Moved(*roi);
} }
@ -793,7 +798,7 @@ void LegoBuildingManager::FUN_10030590()
// FUNCTION: LEGO1 0x10030630 // FUNCTION: LEGO1 0x10030630
// FUNCTION: BETA10 0x100648ab // FUNCTION: BETA10 0x100648ab
MxResult LegoBuildingManager::FUN_10030630() MxResult LegoBuildingManager::DetermineBoundaries()
{ {
LegoWorld* world = CurrentWorld(); LegoWorld* world = CurrentWorld();
@ -859,7 +864,7 @@ MxResult LegoBuildingManager::FUN_10030630()
} }
} }
m_unk0x09 = TRUE; m_boundariesDetermined = TRUE;
return SUCCESS; return SUCCESS;
} }
@ -867,8 +872,8 @@ MxResult LegoBuildingManager::FUN_10030630()
// FUNCTION: BETA10 0x10064db9 // FUNCTION: BETA10 0x10064db9
LegoBuildingInfo* LegoBuildingManager::GetInfoArray(MxS32& p_length) LegoBuildingInfo* LegoBuildingManager::GetInfoArray(MxS32& p_length)
{ {
if (!m_unk0x09) { if (!m_boundariesDetermined) {
FUN_10030630(); DetermineBoundaries();
} }
p_length = sizeOfArray(g_buildingInfo); p_length = sizeOfArray(g_buildingInfo);
@ -876,28 +881,28 @@ LegoBuildingInfo* LegoBuildingManager::GetInfoArray(MxS32& p_length)
} }
// FUNCTION: LEGO1 0x100307b0 // FUNCTION: LEGO1 0x100307b0
void LegoBuildingManager::FUN_100307b0(LegoEntity* p_entity, MxS32 p_adjust) void LegoBuildingManager::AdjustCounter(LegoEntity* p_entity, MxS32 p_adjust)
{ {
LegoBuildingInfo* info = GetInfo(p_entity); LegoBuildingInfo* info = GetInfo(p_entity);
if (info != NULL) { if (info != NULL) {
if (info->m_unk0x11 < 0) { if (info->m_counter < 0) {
info->m_unk0x11 = g_buildingInfoDownshift[info - g_buildingInfo]; info->m_counter = g_buildingInfoDownshift[info - g_buildingInfo];
} }
if (info->m_unk0x11 > 0) { if (info->m_counter > 0) {
info->m_unk0x11 += p_adjust; info->m_counter += p_adjust;
if (info->m_unk0x11 <= 1 && p_adjust < 0) { if (info->m_counter <= 1 && p_adjust < 0) {
info->m_unk0x11 = 0; info->m_counter = 0;
} }
} }
} }
} }
// FUNCTION: LEGO1 0x10030800 // FUNCTION: LEGO1 0x10030800
void LegoBuildingManager::FUN_10030800() void LegoBuildingManager::SetInitialCounters()
{ {
for (MxU32 i = 0; i < sizeOfArray(g_buildingInfo); i++) { for (MxU32 i = 0; i < sizeOfArray(g_buildingInfo); i++) {
g_buildingInfo[i].m_initialUnk0x11 = g_buildingInfo[i].m_unk0x11; g_buildingInfo[i].m_initialCounter = g_buildingInfo[i].m_counter;
} }
} }

View File

@ -872,17 +872,17 @@ void LegoGameState::SwitchArea(Area p_area)
VideoManager()->SetUnk0x554(TRUE); VideoManager()->SetUnk0x554(TRUE);
InvokeAction(Extra::ActionType::e_opendisk, *g_infodoorScript, InfodoorScript::c__StartUp, NULL); InvokeAction(Extra::ActionType::e_opendisk, *g_infodoorScript, InfodoorScript::c__StartUp, NULL);
break; break;
case e_unk4: case e_infocenterExited:
case e_jetrace2: case e_jetrace2:
case e_jetraceExterior: case e_jetraceExterior:
case e_unk17: case e_jetskibuildExited:
case e_carraceExterior: case e_carraceExterior:
case e_unk20: case e_racecarbuildExited:
case e_unk21: case e_unk21:
case e_pizzeriaExterior: case e_pizzeriaExterior:
case e_garageExterior: case e_garageExterior:
case e_hospitalExterior: case e_hospitalExterior:
case e_unk31: case e_hospitalExited:
case e_policeExterior: case e_policeExterior:
case e_bike: case e_bike:
case e_dunecar: case e_dunecar:
@ -890,7 +890,7 @@ void LegoGameState::SwitchArea(Area p_area)
case e_copter: case e_copter:
case e_skateboard: case e_skateboard:
case e_jetski: case e_jetski:
case e_unk66: case e_vehicleExited:
LoadIsle(); LoadIsle();
break; break;
case e_elevbott: case e_elevbott:
@ -952,7 +952,7 @@ void LegoGameState::SwitchArea(Area p_area)
VideoManager()->Get3DManager()->SetFrustrum(90, 0.1f, 250.0f); VideoManager()->Get3DManager()->SetFrustrum(90, 0.1f, 250.0f);
InvokeAction(Extra::ActionType::e_start, *g_isleScript, IsleScript::c_GaraDoor, NULL); InvokeAction(Extra::ActionType::e_start, *g_isleScript, IsleScript::c_GaraDoor, NULL);
break; break;
case e_unk28: { case e_garageExited: {
Act1State* state = (Act1State*) GameState()->GetState("Act1State"); Act1State* state = (Act1State*) GameState()->GetState("Act1State");
LoadIsle(); LoadIsle();
@ -977,7 +977,7 @@ void LegoGameState::SwitchArea(Area p_area)
VideoManager()->SetUnk0x554(TRUE); VideoManager()->SetUnk0x554(TRUE);
InvokeAction(Extra::ActionType::e_opendisk, *g_hospitalScript, HospitalScript::c__StartUp, NULL); InvokeAction(Extra::ActionType::e_opendisk, *g_hospitalScript, HospitalScript::c__StartUp, NULL);
break; break;
case e_unk33: case e_policeExited:
LoadIsle(); LoadIsle();
SetCameraControllerFromIsle(); SetCameraControllerFromIsle();
UserActor()->ResetWorldTransform(TRUE); UserActor()->ResetWorldTransform(TRUE);

View File

@ -506,7 +506,7 @@ MxLong LegoEntity::Notify(MxParam& p_param)
PlantManager()->DecrementCounter(this); PlantManager()->DecrementCounter(this);
break; break;
case e_building: case e_building:
BuildingManager()->FUN_10030000(this); BuildingManager()->DecrementCounter(this);
break; break;
case e_autoROI: case e_autoROI:
break; break;

View File

@ -589,7 +589,7 @@ MxLong Act3::Notify(MxParam& p_param)
m_unk0x421e = 0; m_unk0x421e = 0;
while (--length >= 0) { while (--length >= 0) {
if (info[length].m_unk0x11 < 0 && info[length].m_boundary != NULL && if (info[length].m_counter < 0 && info[length].m_boundary != NULL &&
info[length].m_entity != NULL) { info[length].m_entity != NULL) {
m_unk0x421e++; m_unk0x421e++;
} }
@ -666,7 +666,7 @@ MxLong Act3::HandleTransitionEnd()
void Act3::ReadyWorld() void Act3::ReadyWorld()
{ {
PlantManager()->SetInitialCounters(); PlantManager()->SetInitialCounters();
BuildingManager()->FUN_10030800(); BuildingManager()->SetInitialCounters();
AnimationManager()->FUN_1005f6d0(FALSE); AnimationManager()->FUN_1005f6d0(FALSE);
VideoManager()->Get3DManager()->SetFrustrum(90.0f, 0.1f, 125.0f); VideoManager()->Get3DManager()->SetFrustrum(90.0f, 0.1f, 125.0f);

View File

@ -331,7 +331,7 @@ MxLong GasStation::HandleEndAction(MxEndActionNotificationParam& p_param)
case GasStationState::e_afterAcceptingQuest: case GasStationState::e_afterAcceptingQuest:
m_state->m_state = GasStationState::e_beforeExitingForQuest; m_state->m_state = GasStationState::e_beforeExitingForQuest;
((Act1State*) GameState()->GetState("Act1State"))->m_unk0x018 = 7; ((Act1State*) GameState()->GetState("Act1State"))->m_unk0x018 = 7;
m_destLocation = LegoGameState::e_unk28; m_destLocation = LegoGameState::e_garageExited;
m_radio.Stop(); m_radio.Stop();
BackgroundAudioManager()->Stop(); BackgroundAudioManager()->Stop();
TransitionManager()->StartTransition(MxTransitionManager::e_mosaic, 50, FALSE, FALSE); TransitionManager()->StartTransition(MxTransitionManager::e_mosaic, 50, FALSE, FALSE);

View File

@ -371,7 +371,7 @@ MxLong Hospital::HandleEndAction(MxEndActionNotificationParam& p_param)
case HospitalState::e_exitToFront: case HospitalState::e_exitToFront:
if (m_unk0x128 == 0) { if (m_unk0x128 == 0) {
m_unk0x128 = 1; m_unk0x128 = 1;
m_destLocation = LegoGameState::e_unk31; m_destLocation = LegoGameState::e_hospitalExited;
DeleteObjects(&m_atomId, HospitalScript::c_hho002cl_RunAnim, HospitalScript::c_hho006cl_RunAnim); DeleteObjects(&m_atomId, HospitalScript::c_hho002cl_RunAnim, HospitalScript::c_hho006cl_RunAnim);
TransitionManager()->StartTransition(MxTransitionManager::e_mosaic, 50, FALSE, FALSE); TransitionManager()->StartTransition(MxTransitionManager::e_mosaic, 50, FALSE, FALSE);
@ -423,7 +423,7 @@ MxLong Hospital::HandleButtonDown(LegoControlManagerNotificationParam& p_param)
act1State->m_unk0x018 = 9; act1State->m_unk0x018 = 9;
m_destLocation = LegoGameState::e_unk31; m_destLocation = LegoGameState::e_hospitalExited;
DeleteObjects( DeleteObjects(
&m_atomId, &m_atomId,
HospitalScript::c_hho002cl_RunAnim, HospitalScript::c_hho002cl_RunAnim,
@ -592,7 +592,7 @@ MxBool Hospital::HandleControl(LegoControlManagerNotificationParam& p_param)
else if (m_unk0x128 == 0) { else if (m_unk0x128 == 0) {
m_unk0x128 = 1; m_unk0x128 = 1;
m_hospitalState->m_state = HospitalState::e_exitImmediately; m_hospitalState->m_state = HospitalState::e_exitImmediately;
m_destLocation = LegoGameState::e_unk31; m_destLocation = LegoGameState::e_hospitalExited;
DeleteObjects(&m_atomId, HospitalScript::c_hho002cl_RunAnim, HospitalScript::c_hho006cl_RunAnim); DeleteObjects(&m_atomId, HospitalScript::c_hho002cl_RunAnim, HospitalScript::c_hho006cl_RunAnim);
TransitionManager()->StartTransition(MxTransitionManager::e_mosaic, 50, FALSE, FALSE); TransitionManager()->StartTransition(MxTransitionManager::e_mosaic, 50, FALSE, FALSE);

View File

@ -1390,7 +1390,7 @@ void Infocenter::Reset()
} }
PlantManager()->ClearCounters(); PlantManager()->ClearCounters();
BuildingManager()->FUN_10030590(); BuildingManager()->ClearCounters();
AnimationManager()->Reset(FALSE); AnimationManager()->Reset(FALSE);
CharacterManager()->ReleaseAllActors(); CharacterManager()->ReleaseAllActors();
GameState()->SetCurrentAct(LegoGameState::e_act1); GameState()->SetCurrentAct(LegoGameState::e_act1);

View File

@ -119,7 +119,7 @@ MxLong InfocenterDoor::HandleControl(LegoControlManagerNotificationParam& p_para
if (GameState()->GetActorId() != LegoActor::c_none) { if (GameState()->GetActorId() != LegoActor::c_none) {
InfocenterState* state = (InfocenterState*) GameState()->GetState("InfocenterState"); InfocenterState* state = (InfocenterState*) GameState()->GetState("InfocenterState");
if (state->HasRegistered()) { if (state->HasRegistered()) {
m_destLocation = LegoGameState::e_unk4; m_destLocation = LegoGameState::e_infocenterExited;
} }
else { else {
MxDSAction action; MxDSAction action;

View File

@ -430,7 +430,7 @@ MxLong Isle::HandleControl(LegoControlManagerNotificationParam& p_param)
TransitionManager()->StartTransition(MxTransitionManager::e_mosaic, 50, FALSE, FALSE); TransitionManager()->StartTransition(MxTransitionManager::e_mosaic, 50, FALSE, FALSE);
break; break;
case IsleScript::c_PoliDoor_Door_Ctl: case IsleScript::c_PoliDoor_Door_Ctl:
m_destLocation = LegoGameState::e_unk33; m_destLocation = LegoGameState::e_policeExited;
TransitionManager()->StartTransition(MxTransitionManager::e_mosaic, 50, FALSE, FALSE); TransitionManager()->StartTransition(MxTransitionManager::e_mosaic, 50, FALSE, FALSE);
break; break;
case IsleScript::c_GaraDoor_LeftArrow_Ctl: case IsleScript::c_GaraDoor_LeftArrow_Ctl:
@ -440,7 +440,7 @@ MxLong Isle::HandleControl(LegoControlManagerNotificationParam& p_param)
TransitionManager()->StartTransition(MxTransitionManager::e_mosaic, 50, FALSE, FALSE); TransitionManager()->StartTransition(MxTransitionManager::e_mosaic, 50, FALSE, FALSE);
break; break;
case IsleScript::c_GaraDoor_Door_Ctl: case IsleScript::c_GaraDoor_Door_Ctl:
m_destLocation = LegoGameState::e_unk28; m_destLocation = LegoGameState::e_garageExited;
TransitionManager()->StartTransition(MxTransitionManager::e_mosaic, 50, FALSE, FALSE); TransitionManager()->StartTransition(MxTransitionManager::e_mosaic, 50, FALSE, FALSE);
break; break;
} }
@ -712,7 +712,7 @@ void Isle::Enable(MxBool p_enable)
if (GameState()->m_currentArea == LegoGameState::e_pizzeriaExterior) { if (GameState()->m_currentArea == LegoGameState::e_pizzeriaExterior) {
AnimationManager()->FUN_10064740(NULL); AnimationManager()->FUN_10064740(NULL);
} }
else if (GameState()->m_currentArea == LegoGameState::e_unk66) { else if (GameState()->m_currentArea == LegoGameState::e_vehicleExited) {
Mx3DPointFloat position(UserActor()->GetROI()->GetWorldPosition()); Mx3DPointFloat position(UserActor()->GetROI()->GetWorldPosition());
Mx3DPointFloat sub(-21.375f, 0.0f, -41.75f); Mx3DPointFloat sub(-21.375f, 0.0f, -41.75f);
@ -820,7 +820,7 @@ void Isle::Enable(MxBool p_enable)
TRUE, TRUE,
IslePathActor::c_spawnBit1 | IslePathActor::c_playMusic | IslePathActor::c_spawnBit3 IslePathActor::c_spawnBit1 | IslePathActor::c_playMusic | IslePathActor::c_spawnBit3
); );
GameState()->m_currentArea = LegoGameState::e_unk66; GameState()->m_currentArea = LegoGameState::e_vehicleExited;
EnableAnimations(TRUE); EnableAnimations(TRUE);
m_jukebox->StartAction(); m_jukebox->StartAction();
break; break;
@ -863,21 +863,21 @@ void Isle::FUN_10032620()
VideoManager()->Get3DManager()->SetFrustrum(90.0, 0.1, 250.0); VideoManager()->Get3DManager()->SetFrustrum(90.0, 0.1, 250.0);
switch (GameState()->m_currentArea) { switch (GameState()->m_currentArea) {
case LegoGameState::e_unk66: { case LegoGameState::e_vehicleExited: {
MxMatrix mat(UserActor()->GetROI()->GetLocal2World()); MxMatrix mat(UserActor()->GetROI()->GetLocal2World());
LegoPathBoundary* boundary = UserActor()->GetBoundary(); LegoPathBoundary* boundary = UserActor()->GetBoundary();
((IslePathActor*) UserActor())->VTable0xec(mat, boundary, TRUE); ((IslePathActor*) UserActor())->VTable0xec(mat, boundary, TRUE);
break; break;
} }
case LegoGameState::e_unk4: case LegoGameState::e_infocenterExited:
case LegoGameState::e_jetraceExterior: case LegoGameState::e_jetraceExterior:
case LegoGameState::e_unk17: case LegoGameState::e_jetskibuildExited:
case LegoGameState::e_carraceExterior: case LegoGameState::e_carraceExterior:
case LegoGameState::e_unk20: case LegoGameState::e_racecarbuildExited:
case LegoGameState::e_pizzeriaExterior: case LegoGameState::e_pizzeriaExterior:
case LegoGameState::e_garageExterior: case LegoGameState::e_garageExterior:
case LegoGameState::e_hospitalExterior: case LegoGameState::e_hospitalExterior:
case LegoGameState::e_unk31: case LegoGameState::e_hospitalExited:
case LegoGameState::e_policeExterior: case LegoGameState::e_policeExterior:
((IslePathActor*) UserActor()) ((IslePathActor*) UserActor())
->SpawnPlayer( ->SpawnPlayer(
@ -885,7 +885,7 @@ void Isle::FUN_10032620()
TRUE, TRUE,
IslePathActor::c_spawnBit1 | IslePathActor::c_playMusic | IslePathActor::c_spawnBit3 IslePathActor::c_spawnBit1 | IslePathActor::c_playMusic | IslePathActor::c_spawnBit3
); );
GameState()->m_currentArea = LegoGameState::e_unk66; GameState()->m_currentArea = LegoGameState::e_vehicleExited;
break; break;
} }
} }
@ -955,7 +955,7 @@ MxLong Isle::HandleTransitionEnd()
VariableTable()->SetVariable("VISIBILITY", "Hide Gas"); VariableTable()->SetVariable("VISIBILITY", "Hide Gas");
FUN_10032d30(IsleScript::c_GaraDoor_Background_Bitmap, JukeboxScript::c_JBMusic2, "LCAMZG1,90", FALSE); FUN_10032d30(IsleScript::c_GaraDoor_Background_Bitmap, JukeboxScript::c_JBMusic2, "LCAMZG1,90", FALSE);
break; break;
case LegoGameState::e_unk28: case LegoGameState::e_garageExited:
GameState()->SwitchArea(m_destLocation); GameState()->SwitchArea(m_destLocation);
GameState()->StopArea(LegoGameState::e_previousArea); GameState()->StopArea(LegoGameState::e_previousArea);
m_destLocation = LegoGameState::e_undefined; m_destLocation = LegoGameState::e_undefined;
@ -965,7 +965,7 @@ MxLong Isle::HandleTransitionEnd()
SetAppCursor(e_cursorArrow); SetAppCursor(e_cursorArrow);
SetIsWorldActive(TRUE); SetIsWorldActive(TRUE);
break; break;
case LegoGameState::e_unk33: case LegoGameState::e_policeExited:
GameState()->SwitchArea(m_destLocation); GameState()->SwitchArea(m_destLocation);
GameState()->StopArea(LegoGameState::e_previousArea); GameState()->StopArea(LegoGameState::e_previousArea);
m_destLocation = LegoGameState::e_undefined; m_destLocation = LegoGameState::e_undefined;

View File

@ -213,7 +213,7 @@ LegoResult LegoLOD::Read(Tgl::Renderer* p_renderer, LegoTextureContainer* p_text
m_melems[meshIndex].m_tglMesh->SetShadingModel(shadingModel); m_melems[meshIndex].m_tglMesh->SetShadingModel(shadingModel);
if (textureName != NULL) { if (textureName != NULL) {
if (mesh->GetUnknown0x21()) { if (mesh->GetUseAlias()) {
LegoROI::GetPaletteEntries(textureName, paletteEntries, sizeOfArray(paletteEntries)); LegoROI::GetPaletteEntries(textureName, paletteEntries, sizeOfArray(paletteEntries));
} }
@ -233,7 +233,7 @@ LegoResult LegoLOD::Read(Tgl::Renderer* p_renderer, LegoTextureContainer* p_text
LegoFloat blue = 1.0F; LegoFloat blue = 1.0F;
LegoFloat alpha = 0.0F; LegoFloat alpha = 0.0F;
if (mesh->GetUnknown0x21()) { if (mesh->GetUseAlias()) {
LegoROI::GetRGBAColor(materialName, red, green, blue, alpha); LegoROI::GetRGBAColor(materialName, red, green, blue, alpha);
} }
else { else {

View File

@ -17,7 +17,7 @@ LegoMesh::LegoMesh()
m_unk0x0d = 0; m_unk0x0d = 0;
m_unk0x10 = NULL; m_unk0x10 = NULL;
m_unk0x20 = 0; m_unk0x20 = 0;
m_unk0x21 = FALSE; m_useAlias = FALSE;
m_materialName = NULL; m_materialName = NULL;
} }
@ -57,7 +57,7 @@ LegoResult LegoMesh::Read(LegoStorage* p_storage)
if ((result = p_storage->Read(&m_unk0x20, sizeof(undefined))) != SUCCESS) { if ((result = p_storage->Read(&m_unk0x20, sizeof(undefined))) != SUCCESS) {
return result; return result;
} }
if ((result = p_storage->Read(&m_unk0x21, sizeof(LegoU8))) != SUCCESS) { if ((result = p_storage->Read(&m_useAlias, sizeof(LegoU8))) != SUCCESS) {
return result; return result;
} }

View File

@ -56,7 +56,7 @@ class LegoMesh {
LegoU8 GetUnknown0x0d() { return m_unk0x0d; } LegoU8 GetUnknown0x0d() { return m_unk0x0d; }
const LegoChar* GetTextureName() { return m_textureName; } const LegoChar* GetTextureName() { return m_textureName; }
const LegoChar* GetMaterialName() { return m_materialName; } const LegoChar* GetMaterialName() { return m_materialName; }
LegoBool GetUnknown0x21() { return m_unk0x21; } LegoBool GetUseAlias() { return m_useAlias; }
LegoResult Read(LegoStorage* p_storage); LegoResult Read(LegoStorage* p_storage);
// SYNTHETIC: LEGO1 0x100d3840 // SYNTHETIC: LEGO1 0x100d3840
@ -72,7 +72,7 @@ class LegoMesh {
LegoChar* m_textureName; // 0x18 LegoChar* m_textureName; // 0x18
LegoChar* m_materialName; // 0x1c LegoChar* m_materialName; // 0x1c
undefined m_unk0x20; // 0x20 - unused undefined m_unk0x20; // 0x20 - unused
LegoBool m_unk0x21; // 0x21 LegoBool m_useAlias; // 0x21
}; };
#endif // __LEGOMESH_H #endif // __LEGOMESH_H