Merge remote-tracking branch 'isle/master'

This commit is contained in:
Christian Semmler 2025-07-10 12:06:53 -07:00
commit 0da46262bf
No known key found for this signature in database
GPG Key ID: 086DAA1360BEEE5C
23 changed files with 221 additions and 193 deletions

View File

@ -90,7 +90,7 @@ public:
// Act3Ammo::`scalar deleting destructor' // Act3Ammo::`scalar deleting destructor'
private: private:
MxResult FUN_10053db0(float p_param1, const Matrix4& p_param2); MxResult FUN_10053db0(float p_param1, Matrix4& p_param2);
static Mx3DPointFloat g_unk0x10104f08; static Mx3DPointFloat g_unk0x10104f08;

View File

@ -78,10 +78,20 @@ public:
// SIZE 0x18 // SIZE 0x18
struct InfocenterMapEntry { struct InfocenterMapEntry {
enum {
e_infocenter = 3,
e_jetrace = 10,
e_carrace = 11,
e_pizzeria = 12,
e_garage = 13,
e_hospital = 14,
e_police = 15,
};
InfocenterMapEntry(); InfocenterMapEntry();
MxStillPresenter* m_destCtl; // 0x00 MxStillPresenter* m_destCtl; // 0x00
undefined4 m_unk0x04; // 0x04 MxU32 m_target; // 0x04
MxRect<MxS32> m_area; // 0x08 MxRect<MxS32> m_area; // 0x08
}; };
@ -154,7 +164,7 @@ private:
void PlayCutscene(Cutscene p_entityId, MxBool p_scale); void PlayCutscene(Cutscene p_entityId, MxBool p_scale);
void StopCutscene(); void StopCutscene();
void FUN_10070d10(MxS32 p_x, MxS32 p_y); void UpdateEnabledGlowControl(MxS32 p_x, MxS32 p_y);
void StartCredits(); void StartCredits();
void StopCredits(); void StopCredits();
@ -173,12 +183,12 @@ private:
Radio m_radio; // 0x10c Radio m_radio; // 0x10c
MxStillPresenter* m_dragPresenter; // 0x11c MxStillPresenter* m_dragPresenter; // 0x11c
InfocenterMapEntry m_glowInfo[7]; // 0x120 InfocenterMapEntry m_glowInfo[7]; // 0x120
MxS16 m_unk0x1c8; // 0x1c8 MxS16 m_enabledGlowControl; // 0x1c8
MxStillPresenter* m_frame; // 0x1cc MxStillPresenter* m_frame; // 0x1cc
MxS16 m_infoManDialogueTimer; // 0x1d0 MxS16 m_infoManDialogueTimer; // 0x1d0
MxS16 m_bookAnimationTimer; // 0x1d2 MxS16 m_bookAnimationTimer; // 0x1d2
MxU16 m_unk0x1d4; // 0x1d4 MxU16 m_playingMovieCounter; // 0x1d4
MxS16 m_unk0x1d6; // 0x1d6 MxS16 m_bigInfoBlinkTimer; // 0x1d6
}; };
#endif // INFOCENTER_H #endif // INFOCENTER_H

View File

@ -75,7 +75,7 @@ private:
// _Tree<LegoPathActor *,LegoPathActor *,set<LegoPathActor *,LegoPathActorSetCompare,allocator<LegoPathActor *> >::_Kfn,LegoPathActorSetCompare,allocator<LegoPathActor *> >::erase // _Tree<LegoPathActor *,LegoPathActor *,set<LegoPathActor *,LegoPathActorSetCompare,allocator<LegoPathActor *> >::_Kfn,LegoPathActorSetCompare,allocator<LegoPathActor *> >::erase
// TEMPLATE: LEGO1 0x1002c440 // TEMPLATE: LEGO1 0x1002c440
// TEMPLATE: BETA10 0x100b6480 // TEMPLATE: BETA10 0x10020480
// _Tree<LegoPathActor *,LegoPathActor *,set<LegoPathActor *,LegoPathActorSetCompare,allocator<LegoPathActor *> >::_Kfn,LegoPathActorSetCompare,allocator<LegoPathActor *> >::find // _Tree<LegoPathActor *,LegoPathActor *,set<LegoPathActor *,LegoPathActorSetCompare,allocator<LegoPathActor *> >::_Kfn,LegoPathActorSetCompare,allocator<LegoPathActor *> >::find
// TEMPLATE: LEGO1 0x1002c4c0 // TEMPLATE: LEGO1 0x1002c4c0
@ -190,6 +190,12 @@ private:
// TEMPLATE: BETA10 0x10082b40 // TEMPLATE: BETA10 0x10082b40
// _Tree<LegoAnimPresenter *,LegoAnimPresenter *,set<LegoAnimPresenter *,LegoAnimPresenterSetCompare,allocator<LegoAnimPresenter *> >::_Kfn,LegoAnimPresenterSetCompare,allocator<LegoAnimPresenter *> >::const_iterator::operator* // _Tree<LegoAnimPresenter *,LegoAnimPresenter *,set<LegoAnimPresenter *,LegoAnimPresenterSetCompare,allocator<LegoAnimPresenter *> >::_Kfn,LegoAnimPresenterSetCompare,allocator<LegoAnimPresenter *> >::const_iterator::operator*
// TEMPLATE: BETA10 0x100b6440
// set<LegoAnimPresenter *,LegoAnimPresenterSetCompare,allocator<LegoAnimPresenter *> >::find
// TEMPLATE: BETA10 0x100b6480
// _Tree<LegoAnimPresenter *,LegoAnimPresenter *,set<LegoAnimPresenter *,LegoAnimPresenterSetCompare,allocator<LegoAnimPresenter *> >::_Kfn,LegoAnimPresenterSetCompare,allocator<LegoAnimPresenter *> >::find
// TEMPLATE: BETA10 0x10021dc0 // TEMPLATE: BETA10 0x10021dc0
// ??0?$Set@PAVLegoPathActor@@ULegoPathActorSetCompare@@@@QAE@ABV0@@Z // ??0?$Set@PAVLegoPathActor@@ULegoPathActorSetCompare@@@@QAE@ABV0@@Z

View File

@ -49,28 +49,28 @@ LegoROI* PickROI(MxLong p_x, MxLong p_y);
LegoROI* PickRootROI(MxLong p_x, MxLong p_y); LegoROI* PickRootROI(MxLong p_x, MxLong p_y);
void RotateY(LegoROI* p_roi, MxFloat p_angle); void RotateY(LegoROI* p_roi, MxFloat p_angle);
MxBool SpheresIntersect(const BoundingSphere& p_sphere1, const BoundingSphere& p_sphere2); MxBool SpheresIntersect(const BoundingSphere& p_sphere1, const BoundingSphere& p_sphere2);
MxBool FUN_1003ded0(MxFloat p_param1[2], MxFloat p_param2[3], MxFloat p_param3[3]); MxBool CalculateRayOriginDirection(MxFloat p_coordinates[2], MxFloat p_direction[3], MxFloat p_origin[3]);
MxBool TransformWorldToScreen(const MxFloat p_world[3], MxFloat p_screen[4]); MxBool TransformWorldToScreen(const MxFloat p_world[3], MxFloat p_screen[4]);
MxS16 CountTotalTreeNodes(LegoTreeNode* p_node); MxS16 CountTotalTreeNodes(LegoTreeNode* p_node);
LegoTreeNode* GetTreeNode(LegoTreeNode* p_node, MxU32 p_index); LegoTreeNode* GetTreeNode(LegoTreeNode* p_node, MxU32 p_index);
void FUN_1003e050(LegoAnimPresenter* p_presenter); void CalculateViewFromAnimation(LegoAnimPresenter* p_presenter);
Extra::ActionType MatchActionString(const char*); Extra::ActionType MatchActionString(const char*);
void InvokeAction(Extra::ActionType p_actionId, const MxAtomId& p_pAtom, MxS32 p_streamId, LegoEntity* p_sender); void InvokeAction(Extra::ActionType p_actionId, const MxAtomId& p_pAtom, MxS32 p_streamId, LegoEntity* p_sender);
void SetCameraControllerFromIsle(); void SetCameraControllerFromIsle();
void ConvertHSVToRGB(float p_h, float p_s, float p_v, float* p_rOut, float* p_bOut, float* p_gOut); void ConvertHSVToRGB(float p_h, float p_s, float p_v, float* p_rOut, float* p_bOut, float* p_gOut);
void PlayCamAnim(LegoPathActor* p_actor, MxBool p_unused, MxU32 p_location, MxBool p_bool); void PlayCamAnim(LegoPathActor* p_actor, MxBool p_unused, MxU32 p_location, MxBool p_bool);
void FUN_1003eda0(); void ResetViewVelocity();
MxBool RemoveFromCurrentWorld(const MxAtomId& p_atomId, MxS32 p_id); MxBool RemoveFromCurrentWorld(const MxAtomId& p_atomId, MxS32 p_id);
void EnableAnimations(MxBool p_enable); void EnableAnimations(MxBool p_enable);
void SetAppCursor(Cursor p_cursor); void SetAppCursor(Cursor p_cursor);
MxBool FUN_1003ef60(); MxBool CanExit();
MxBool RemoveFromWorld(MxAtomId& p_entityAtom, MxS32 p_entityId, MxAtomId& p_worldAtom, MxS32 p_worldEntityId); MxBool RemoveFromWorld(MxAtomId& p_entityAtom, MxS32 p_entityId, MxAtomId& p_worldAtom, MxS32 p_worldEntityId);
MxS32 UpdateLightPosition(MxS32 p_increase); MxS32 UpdateLightPosition(MxS32 p_increase);
void SetLightPosition(MxS32 p_index); void SetLightPosition(MxS32 p_index);
LegoNamedTexture* ReadNamedTexture(LegoStorage* p_storage); LegoNamedTexture* ReadNamedTexture(LegoStorage* p_storage);
void WriteDefaultTexture(LegoStorage* p_storage, const char* p_name); void WriteDefaultTexture(LegoStorage* p_storage, const char* p_name);
void WriteNamedTexture(LegoStorage* p_storage, LegoNamedTexture* p_namedTexture); void WriteNamedTexture(LegoStorage* p_storage, LegoNamedTexture* p_namedTexture);
void FUN_1003f930(LegoNamedTexture* p_namedTexture); void LoadFromNamedTexture(LegoNamedTexture* p_namedTexture);
// FUNCTION: BETA10 0x100260a0 // FUNCTION: BETA10 0x100260a0
inline void StartIsleAction(IsleScript::Script p_objectId) inline void StartIsleAction(IsleScript::Script p_objectId)

View File

@ -200,7 +200,7 @@ MxResult Act3Ammo::FUN_10053d30(LegoPathController* p_p, MxFloat p_unk0x19c)
// FUNCTION: LEGO1 0x10053db0 // FUNCTION: LEGO1 0x10053db0
// FUNCTION: BETA10 0x1001e0f0 // FUNCTION: BETA10 0x1001e0f0
MxResult Act3Ammo::FUN_10053db0(float p_param1, const Matrix4& p_param2) MxResult Act3Ammo::FUN_10053db0(float p_param1, Matrix4& p_param2)
{ {
float local34 = p_param1 * p_param1; float local34 = p_param1 * p_param1;
@ -384,6 +384,8 @@ void Act3Ammo::Animate(float p_time)
m_world->RemoveDonut(*this); m_world->RemoveDonut(*this);
m_world->TriggerHitSound(4); m_world->TriggerHitSound(4);
} }
return;
} }
else { else {
if (IsPizza()) { if (IsPizza()) {
@ -394,12 +396,20 @@ void Act3Ammo::Animate(float p_time)
assert(SoundManager()->GetCacheSoundManager()); assert(SoundManager()->GetCacheSoundManager());
SoundManager()->GetCacheSoundManager()->Play("stickdn", NULL, FALSE); SoundManager()->GetCacheSoundManager()->Play("stickdn", NULL, FALSE);
} }
}
LegoPathActorSet& plpas = m_boundary->GetActors(); LegoPathActorSet& plpas = m_boundary->GetActors();
LegoPathActorSet lpas(plpas); LegoPathActorSet lpas(plpas);
for (LegoPathActorSet::iterator itpa = lpas.begin(); itpa != lpas.end(); itpa++) { for (LegoPathActorSet::iterator itpa = lpas.begin(); itpa != lpas.end(); itpa++) {
if (plpas.find(*itpa) != plpas.end() && this != *itpa) { if (plpas.find(*itpa) == plpas.end()) {
continue;
}
if (this == *itpa) {
continue;
}
LegoROI* r = (*itpa)->GetROI(); LegoROI* r = (*itpa)->GetROI();
assert(r); assert(r);
@ -421,10 +431,14 @@ void Act3Ammo::Animate(float p_time)
assert(m_world); assert(m_world);
#ifdef BETA10
m_world->EatPizza(index);
#else
if (m_world->m_pizzas[index].IsValid() && !m_world->m_pizzas[index].IsSharkFood()) { if (m_world->m_pizzas[index].IsValid() && !m_world->m_pizzas[index].IsSharkFood()) {
m_world->EatPizza(index); m_world->EatPizza(index);
m_world->m_brickster->FUN_100417c0(); m_world->m_brickster->FUN_100417c0();
} }
#endif
if (IsDonut()) { if (IsDonut()) {
assert(SoundManager()->GetCacheSoundManager()); assert(SoundManager()->GetCacheSoundManager());
@ -465,7 +479,6 @@ void Act3Ammo::Animate(float p_time)
} }
} }
} }
}
if (!local14) { if (!local14) {
if (IsPizza()) { if (IsPizza()) {
@ -479,4 +492,3 @@ void Act3Ammo::Animate(float p_time)
} }
} }
} }
}

View File

@ -52,7 +52,7 @@ void Bike::Exit()
// FUNCTION: LEGO1 0x100769a0 // FUNCTION: LEGO1 0x100769a0
MxLong Bike::HandleClick() MxLong Bike::HandleClick()
{ {
if (FUN_1003ef60()) { if (CanExit()) {
Act1State* state = (Act1State*) GameState()->GetState("Act1State"); Act1State* state = (Act1State*) GameState()->GetState("Act1State");
FUN_10015820(TRUE, 0); FUN_10015820(TRUE, 0);

View File

@ -80,7 +80,7 @@ MxLong InfoCenterEntity::HandleClick(LegoEventNotificationParam& p_param)
// FUNCTION: LEGO1 0x100151d0 // FUNCTION: LEGO1 0x100151d0
MxLong GasStationEntity::HandleClick(LegoEventNotificationParam& p_param) MxLong GasStationEntity::HandleClick(LegoEventNotificationParam& p_param)
{ {
if (FUN_1003ef60()) { if (CanExit()) {
Act1State* state = (Act1State*) GameState()->GetState("Act1State"); Act1State* state = (Act1State*) GameState()->GetState("Act1State");
if (state->GetUnknown18() != 8) { if (state->GetUnknown18() != 8) {
@ -104,7 +104,7 @@ MxLong GasStationEntity::HandleClick(LegoEventNotificationParam& p_param)
// FUNCTION: LEGO1 0x10015270 // FUNCTION: LEGO1 0x10015270
MxLong HospitalEntity::HandleClick(LegoEventNotificationParam& p_param) MxLong HospitalEntity::HandleClick(LegoEventNotificationParam& p_param)
{ {
if (FUN_1003ef60()) { if (CanExit()) {
Act1State* act1State = (Act1State*) GameState()->GetState("Act1State"); Act1State* act1State = (Act1State*) GameState()->GetState("Act1State");
if (act1State->GetUnknown18() != 10) { if (act1State->GetUnknown18() != 10) {
@ -128,7 +128,7 @@ MxLong HospitalEntity::HandleClick(LegoEventNotificationParam& p_param)
// FUNCTION: LEGO1 0x10015310 // FUNCTION: LEGO1 0x10015310
MxLong PoliceEntity::HandleClick(LegoEventNotificationParam& p_param) MxLong PoliceEntity::HandleClick(LegoEventNotificationParam& p_param)
{ {
if (FUN_1003ef60()) { if (CanExit()) {
Act1State* state = (Act1State*) GameState()->GetState("Act1State"); Act1State* state = (Act1State*) GameState()->GetState("Act1State");
if (state->GetUnknown18() != 10) { if (state->GetUnknown18() != 10) {
@ -152,7 +152,7 @@ MxLong PoliceEntity::HandleClick(LegoEventNotificationParam& p_param)
// FUNCTION: LEGO1 0x100153b0 // FUNCTION: LEGO1 0x100153b0
MxLong BeachHouseEntity::HandleClick(LegoEventNotificationParam& p_param) MxLong BeachHouseEntity::HandleClick(LegoEventNotificationParam& p_param)
{ {
if (FUN_1003ef60()) { if (CanExit()) {
Act1State* state = (Act1State*) GameState()->GetState("Act1State"); Act1State* state = (Act1State*) GameState()->GetState("Act1State");
state->SetUnknown18(0); state->SetUnknown18(0);
@ -173,7 +173,7 @@ MxLong BeachHouseEntity::HandleClick(LegoEventNotificationParam& p_param)
// FUNCTION: LEGO1 0x10015450 // FUNCTION: LEGO1 0x10015450
MxLong RaceStandsEntity::HandleClick(LegoEventNotificationParam& p_param) MxLong RaceStandsEntity::HandleClick(LegoEventNotificationParam& p_param)
{ {
if (FUN_1003ef60()) { if (CanExit()) {
Act1State* state = (Act1State*) GameState()->GetState("Act1State"); Act1State* state = (Act1State*) GameState()->GetState("Act1State");
state->SetUnknown18(0); state->SetUnknown18(0);
@ -195,7 +195,7 @@ MxLong RaceStandsEntity::HandleClick(LegoEventNotificationParam& p_param)
// FUNCTION: BETA10 0x100256e8 // FUNCTION: BETA10 0x100256e8
MxLong JailEntity::HandleClick(LegoEventNotificationParam& p_param) MxLong JailEntity::HandleClick(LegoEventNotificationParam& p_param)
{ {
if (FUN_1003ef60()) { if (CanExit()) {
PlayCamAnim(UserActor(), FALSE, 18, TRUE); PlayCamAnim(UserActor(), FALSE, 18, TRUE);
} }

View File

@ -91,7 +91,7 @@ void DuneBuggy::Exit()
// FUNCTION: LEGO1 0x10068060 // FUNCTION: LEGO1 0x10068060
MxLong DuneBuggy::HandleClick() MxLong DuneBuggy::HandleClick()
{ {
if (!FUN_1003ef60()) { if (!CanExit()) {
return 1; return 1;
} }

View File

@ -121,7 +121,7 @@ void Helicopter::Exit()
// FUNCTION: BETA10 0x1002a3db // FUNCTION: BETA10 0x1002a3db
MxLong Helicopter::HandleClick() MxLong Helicopter::HandleClick()
{ {
if (!FUN_1003ef60()) { if (!CanExit()) {
return 1; return 1;
} }

View File

@ -153,7 +153,7 @@ void IslePathActor::Exit()
FUN_1001b660(); FUN_1001b660();
FUN_10010c30(); FUN_10010c30();
FUN_1003eda0(); ResetViewVelocity();
} }
// GLOBAL: LEGO1 0x10102b28 // GLOBAL: LEGO1 0x10102b28
@ -598,7 +598,7 @@ void IslePathActor::SpawnPlayer(LegoGameState::Area p_area, MxBool p_enter, MxU8
} }
if (m_cameraFlag) { if (m_cameraFlag) {
FUN_1003eda0(); ResetViewVelocity();
} }
if (p_flags & c_playMusic && g_spawnLocations[i].m_music != JukeboxScript::c_noneJukebox) { if (p_flags & c_playMusic && g_spawnLocations[i].m_music != JukeboxScript::c_noneJukebox) {
@ -632,7 +632,7 @@ void IslePathActor::VTable0xec(MxMatrix p_transform, LegoPathBoundary* p_boundar
m_roi->SetLocal2World(p_transform); m_roi->SetLocal2World(p_transform);
if (m_cameraFlag) { if (m_cameraFlag) {
FUN_1003eda0(); ResetViewVelocity();
FUN_10010c30(); FUN_10010c30();
} }
} }

View File

@ -83,7 +83,7 @@ void Jetski::Exit()
MxLong Jetski::HandleClick() MxLong Jetski::HandleClick()
{ {
#ifndef BETA10 #ifndef BETA10
if (!FUN_1003ef60()) { if (!CanExit()) {
return 1; return 1;
} }

View File

@ -36,7 +36,7 @@ MxLong JukeBoxEntity::Notify(MxParam& p_param)
MxNotificationParam& param = (MxNotificationParam&) p_param; MxNotificationParam& param = (MxNotificationParam&) p_param;
if (param.GetNotification() == c_notificationClick) { if (param.GetNotification() == c_notificationClick) {
if (!FUN_1003ef60()) { if (!CanExit()) {
return 1; return 1;
} }

View File

@ -86,7 +86,7 @@ void Motocycle::Exit()
// FUNCTION: LEGO1 0x10035c50 // FUNCTION: LEGO1 0x10035c50
MxLong Motocycle::HandleClick() MxLong Motocycle::HandleClick()
{ {
if (!FUN_1003ef60()) { if (!CanExit()) {
return 1; return 1;
} }

View File

@ -69,7 +69,7 @@ void Pizzeria::CreateState()
// FUNCTION: BETA10 0x100efc91 // FUNCTION: BETA10 0x100efc91
MxLong Pizzeria::HandleClick() MxLong Pizzeria::HandleClick()
{ {
if (FUN_1003ef60() && m_pizzaMissionState->m_unk0x0c == 0) { if (CanExit() && m_pizzaMissionState->m_unk0x0c == 0) {
if (UserActor()->GetActorId() != GameState()->GetActorId()) { if (UserActor()->GetActorId() != GameState()->GetActorId()) {
if (!UserActor()->IsA("SkateBoard")) { if (!UserActor()->IsA("SkateBoard")) {
((IslePathActor*) UserActor())->Exit(); ((IslePathActor*) UserActor())->Exit();

View File

@ -40,7 +40,7 @@ MxResult RaceCar::Create(MxDSAction& p_dsAction)
// FUNCTION: LEGO1 0x100284d0 // FUNCTION: LEGO1 0x100284d0
MxLong RaceCar::HandleClick() MxLong RaceCar::HandleClick()
{ {
if (!FUN_1003ef60()) { if (!CanExit()) {
return 1; return 1;
} }

View File

@ -75,7 +75,7 @@ MxLong SkateBoard::HandleClick()
{ {
Act1State* state = (Act1State*) GameState()->GetState("Act1State"); Act1State* state = (Act1State*) GameState()->GetState("Act1State");
if (!FUN_1003ef60() && state->m_unk0x018 != 3) { if (!CanExit() && state->m_unk0x018 != 3) {
return 1; return 1;
} }

View File

@ -374,7 +374,7 @@ void LegoCarBuild::FUN_10023130(MxLong p_x, MxLong p_y)
pfVar3[0] = p_x; pfVar3[0] = p_x;
pfVar3[1] = p_y; pfVar3[1] = p_y;
if (FUN_1003ded0(pfVar3, local30, local84)) { if (CalculateRayOriginDirection(pfVar3, local30, local84)) {
MxFloat local18[3]; MxFloat local18[3];
MxFloat local8c[2]; MxFloat local8c[2];
@ -424,7 +424,7 @@ void LegoCarBuild::VTable0x74(MxFloat p_param1[2], MxFloat p_param2[3])
MxFloat local20[3]; MxFloat local20[3];
MxFloat local14[3]; MxFloat local14[3];
FUN_1003ded0(p_param1, local14, local20); CalculateRayOriginDirection(p_param1, local14, local20);
fVar1 = (m_unk0x2a4[2] - local20[2]) / local14[2]; fVar1 = (m_unk0x2a4[2] - local20[2]) / local14[2];
p_param2[0] = (fVar1 * local14[0] + local20[0]) - m_unk0x2a4[0]; p_param2[0] = (fVar1 * local14[0] + local20[0]) - m_unk0x2a4[0];
@ -440,7 +440,7 @@ void LegoCarBuild::VTable0x78(MxFloat p_param1[2], MxFloat p_param2[3])
MxFloat local18[3]; MxFloat local18[3];
MxFloat localc[3]; MxFloat localc[3];
FUN_1003ded0(p_param1, local18, localc); CalculateRayOriginDirection(p_param1, local18, localc);
p_param2[2] = m_unk0x2a4[2] + p_param2[2] = m_unk0x2a4[2] +
(m_unk0x2bc[2] - m_unk0x2a4[2]) * ((p_param1[1] - m_unk0x290[1]) / (m_unk0x298[1] - m_unk0x290[1])); (m_unk0x2bc[2] - m_unk0x2a4[2]) * ((p_param1[1] - m_unk0x290[1]) / (m_unk0x298[1] - m_unk0x290[1]));
@ -456,7 +456,7 @@ void LegoCarBuild::VTable0x7c(MxFloat p_param1[2], MxFloat p_param2[3])
{ {
MxFloat local18[3]; MxFloat local18[3];
MxFloat localc[3]; MxFloat localc[3];
FUN_1003ded0(p_param1, local18, localc); CalculateRayOriginDirection(p_param1, local18, localc);
MxFloat fVar1 = (m_unk0x2bc[1] - localc[1]) / local18[1]; MxFloat fVar1 = (m_unk0x2bc[1] - localc[1]) / local18[1];
p_param2[0] = fVar1 * local18[0] - m_unk0x2a4[0] + localc[0]; p_param2[0] = fVar1 * local18[0] - m_unk0x2a4[0] + localc[0];
@ -1252,7 +1252,7 @@ undefined4 LegoCarBuild::FUN_10024c20(MxNotificationParam* p_param)
// FUNCTION: LEGO1 0x10024ef0 // FUNCTION: LEGO1 0x10024ef0
void LegoCarBuild::FUN_10024ef0() void LegoCarBuild::FUN_10024ef0()
{ {
FUN_1003eda0(); ResetViewVelocity();
m_buildState->m_animationState = LegoVehicleBuildState::e_cutscene; m_buildState->m_animationState = LegoVehicleBuildState::e_cutscene;
FUN_10025720(FUN_10025d70()); FUN_10025720(FUN_10025d70());
m_buildState->m_unk0x4c += 1; m_buildState->m_unk0x4c += 1;

View File

@ -102,29 +102,29 @@ MxBool SpheresIntersect(const BoundingSphere& p_sphere1, const BoundingSphere& p
// FUNCTION: LEGO1 0x1003ded0 // FUNCTION: LEGO1 0x1003ded0
// FUNCTION: BETA10 0x100d3802 // FUNCTION: BETA10 0x100d3802
MxBool FUN_1003ded0(MxFloat p_param1[2], MxFloat p_param2[3], MxFloat p_param3[3]) MxBool CalculateRayOriginDirection(MxFloat p_coordinates[2], MxFloat p_direction[3], MxFloat p_origin[3])
{ {
MxFloat local1c[4]; MxFloat screenPoint[4];
MxFloat local10[3]; MxFloat farPoint[3];
Tgl::View* view = VideoManager()->Get3DManager()->GetLego3DView()->GetView(); Tgl::View* view = VideoManager()->Get3DManager()->GetLego3DView()->GetView();
local1c[0] = p_param1[0]; screenPoint[0] = p_coordinates[0];
local1c[1] = p_param1[1]; screenPoint[1] = p_coordinates[1];
local1c[2] = 1.0f; screenPoint[2] = 1.0f;
local1c[3] = 1.0f; screenPoint[3] = 1.0f;
view->TransformScreenToWorld(local1c, p_param3); view->TransformScreenToWorld(screenPoint, p_origin);
local1c[0] *= 2.0; screenPoint[0] *= 2.0;
local1c[1] *= 2.0; screenPoint[1] *= 2.0;
local1c[3] = 2.0; screenPoint[3] = 2.0;
view->TransformScreenToWorld(local1c, local10); view->TransformScreenToWorld(screenPoint, farPoint);
p_param2[0] = local10[0] - p_param3[0]; p_direction[0] = farPoint[0] - p_origin[0];
p_param2[1] = local10[1] - p_param3[1]; p_direction[1] = farPoint[1] - p_origin[1];
p_param2[2] = local10[2] - p_param3[2]; p_direction[2] = farPoint[2] - p_origin[2];
return TRUE; return TRUE;
} }
@ -176,7 +176,7 @@ LegoTreeNode* GetTreeNode(LegoTreeNode* p_node, MxU32 p_index)
// FUNCTION: LEGO1 0x1003e050 // FUNCTION: LEGO1 0x1003e050
// FUNCTION: BETA10 0x100d3abc // FUNCTION: BETA10 0x100d3abc
void FUN_1003e050(LegoAnimPresenter* p_presenter) void CalculateViewFromAnimation(LegoAnimPresenter* p_presenter)
{ {
MxMatrix viewMatrix; MxMatrix viewMatrix;
LegoTreeNode* rootNode = p_presenter->GetAnimation()->GetRoot(); LegoTreeNode* rootNode = p_presenter->GetAnimation()->GetRoot();
@ -184,7 +184,7 @@ void FUN_1003e050(LegoAnimPresenter* p_presenter)
LegoAnimNodeData* targetData = NULL; LegoAnimNodeData* targetData = NULL;
MxS16 nodesCount = CountTotalTreeNodes(rootNode); MxS16 nodesCount = CountTotalTreeNodes(rootNode);
MxFloat cam; MxFloat fov;
for (MxS16 i = 0; i < nodesCount; i++) { for (MxS16 i = 0; i < nodesCount; i++) {
if (camData && targetData) { if (camData && targetData) {
break; break;
@ -194,7 +194,7 @@ void FUN_1003e050(LegoAnimPresenter* p_presenter)
if (!SDL_strncasecmp(data->GetName(), "CAM", strlen("CAM"))) { if (!SDL_strncasecmp(data->GetName(), "CAM", strlen("CAM"))) {
camData = data; camData = data;
cam = atof(&data->GetName()[strlen(data->GetName()) - 2]); fov = atof(&data->GetName()[strlen(data->GetName()) - 2]);
} }
else if (!SDL_strcasecmp(data->GetName(), "TARGET")) { else if (!SDL_strcasecmp(data->GetName(), "TARGET")) {
targetData = data; targetData = data;
@ -223,8 +223,8 @@ void FUN_1003e050(LegoAnimPresenter* p_presenter)
roi->WrappedSetLocal2WorldWithWorldDataUpdate(viewMatrix); roi->WrappedSetLocal2WorldWithWorldDataUpdate(viewMatrix);
view->Moved(*roi); view->Moved(*roi);
FUN_1003eda0(); ResetViewVelocity();
video->Get3DManager()->SetFrustrum(cam, 0.1, 250.0); video->Get3DManager()->SetFrustrum(fov, 0.1, 250.0);
} }
// FUNCTION: LEGO1 0x1003e300 // FUNCTION: LEGO1 0x1003e300
@ -477,7 +477,7 @@ void PlayCamAnim(LegoPathActor* p_actor, MxBool p_unused, MxU32 p_location, MxBo
// FUNCTION: LEGO1 0x1003eda0 // FUNCTION: LEGO1 0x1003eda0
// FUNCTION: BETA10 0x100d4bf4 // FUNCTION: BETA10 0x100d4bf4
void FUN_1003eda0() void ResetViewVelocity()
{ {
Mx3DPointFloat vec; Mx3DPointFloat vec;
vec.Clear(); vec.Clear();
@ -577,7 +577,7 @@ void SetAppCursor(Cursor p_cursor)
} }
// FUNCTION: LEGO1 0x1003ef60 // FUNCTION: LEGO1 0x1003ef60
MxBool FUN_1003ef60() MxBool CanExit()
{ {
Act1State* act1State = (Act1State*) GameState()->GetState("Act1State"); Act1State* act1State = (Act1State*) GameState()->GetState("Act1State");
@ -774,7 +774,7 @@ void WriteNamedTexture(LegoStorage* p_storage, LegoNamedTexture* p_namedTexture)
} }
// FUNCTION: LEGO1 0x1003f930 // FUNCTION: LEGO1 0x1003f930
void FUN_1003f930(LegoNamedTexture* p_namedTexture) void LoadFromNamedTexture(LegoNamedTexture* p_namedTexture)
{ {
LegoTextureInfo* textureInfo = TextureContainer()->Get(p_namedTexture->GetName()->GetData()); LegoTextureInfo* textureInfo = TextureContainer()->Get(p_namedTexture->GetName()->GetData());

View File

@ -426,7 +426,7 @@ void LegoWorld::Add(MxCore* p_object)
#ifndef BETA10 #ifndef BETA10
if (p_object->IsA("LegoAnimPresenter")) { if (p_object->IsA("LegoAnimPresenter")) {
if (!SDL_strcasecmp(((LegoAnimPresenter*) p_object)->GetAction()->GetObjectName(), "ConfigAnimation")) { if (!SDL_strcasecmp(((LegoAnimPresenter*) p_object)->GetAction()->GetObjectName(), "ConfigAnimation")) {
FUN_1003e050((LegoAnimPresenter*) p_object); CalculateViewFromAnimation((LegoAnimPresenter*) p_object);
((LegoAnimPresenter*) p_object) ((LegoAnimPresenter*) p_object)
->GetAction() ->GetAction()
->SetDuration(((LegoAnimPresenter*) p_object)->GetAnimation()->GetDuration()); ->SetDuration(((LegoAnimPresenter*) p_object)->GetAnimation()->GetDuration());

View File

@ -59,7 +59,7 @@ EdgeReference g_skBMap[] = {
// GLOBAL: LEGO1 0x100f0a50 // GLOBAL: LEGO1 0x100f0a50
// GLOBAL: BETA10 0x101f5e60 // GLOBAL: BETA10 0x101f5e60
const SkeletonKickPhase g_skeletonKickPhases[] = { SkeletonKickPhase g_skeletonKickPhases[] = {
{&g_skBMap[0], 0.1, 0.2, LEGORACECAR_KICK2}, {&g_skBMap[0], 0.1, 0.2, LEGORACECAR_KICK2},
{&g_skBMap[1], 0.2, 0.3, LEGORACECAR_KICK2}, {&g_skBMap[1], 0.2, 0.3, LEGORACECAR_KICK2},
{&g_skBMap[2], 0.3, 0.4, LEGORACECAR_KICK2}, {&g_skBMap[2], 0.3, 0.4, LEGORACECAR_KICK2},

View File

@ -138,14 +138,14 @@ Infocenter::Infocenter()
memset(&m_glowInfo, 0, sizeof(m_glowInfo)); memset(&m_glowInfo, 0, sizeof(m_glowInfo));
m_unk0x1c8 = -1; m_enabledGlowControl = -1;
SetAppCursor(e_cursorBusy); SetAppCursor(e_cursorBusy);
NotificationManager()->Register(this); NotificationManager()->Register(this);
m_infoManDialogueTimer = 0; m_infoManDialogueTimer = 0;
m_bookAnimationTimer = 0; m_bookAnimationTimer = 0;
m_unk0x1d4 = 0; m_playingMovieCounter = 0;
m_unk0x1d6 = 0; m_bigInfoBlinkTimer = 0;
} }
// FUNCTION: LEGO1 0x1006ec80 // FUNCTION: LEGO1 0x1006ec80
@ -300,11 +300,11 @@ MxLong Infocenter::HandleEndAction(MxEndActionNotificationParam& p_param)
action->GetObjectId() == InfomainScript::c_Pepper_All_Movie || action->GetObjectId() == InfomainScript::c_Pepper_All_Movie ||
action->GetObjectId() == InfomainScript::c_Nick_All_Movie || action->GetObjectId() == InfomainScript::c_Nick_All_Movie ||
action->GetObjectId() == InfomainScript::c_Laura_All_Movie)) { action->GetObjectId() == InfomainScript::c_Laura_All_Movie)) {
if (m_unk0x1d4) { if (m_playingMovieCounter) {
m_unk0x1d4--; m_playingMovieCounter--;
} }
if (!m_unk0x1d4) { if (!m_playingMovieCounter) {
PlayMusic(JukeboxScript::c_InformationCenter_Music); PlayMusic(JukeboxScript::c_InformationCenter_Music);
if (!Lego()->IsVersion10()) { if (!Lego()->IsVersion10()) {
@ -343,7 +343,7 @@ MxLong Infocenter::HandleEndAction(MxEndActionNotificationParam& p_param)
if (action->GetObjectId() == InfomainScript::c_iicx26in_RunAnim - Lego()->IsVersion10()) { if (action->GetObjectId() == InfomainScript::c_iicx26in_RunAnim - Lego()->IsVersion10()) {
ControlManager()->UpdateEnabledChild(InfomainScript::c_BigInfo_Ctl, action->GetAtomId().GetInternal(), 0); ControlManager()->UpdateEnabledChild(InfomainScript::c_BigInfo_Ctl, action->GetAtomId().GetInternal(), 0);
m_unk0x1d6 = 0; m_bigInfoBlinkTimer = 0;
} }
switch (m_infocenterState->m_unk0x74) { switch (m_infocenterState->m_unk0x74) {
@ -448,8 +448,8 @@ void Infocenter::ReadyWorld()
{ {
m_infoManDialogueTimer = 0; m_infoManDialogueTimer = 0;
m_bookAnimationTimer = 0; m_bookAnimationTimer = 0;
m_unk0x1d4 = 0; m_playingMovieCounter = 0;
m_unk0x1d6 = 0; m_bigInfoBlinkTimer = 0;
MxStillPresenter* bg = (MxStillPresenter*) Find("MxStillPresenter", "Background_Bitmap"); MxStillPresenter* bg = (MxStillPresenter*) Find("MxStillPresenter", "Background_Bitmap");
MxStillPresenter* bgRed = (MxStillPresenter*) Find("MxStillPresenter", "BackgroundRed_Bitmap"); MxStillPresenter* bgRed = (MxStillPresenter*) Find("MxStillPresenter", "BackgroundRed_Bitmap");
@ -481,8 +481,8 @@ void Infocenter::ReadyWorld()
InfomainScript::Script script = m_infocenterState->GetNextReturnDialogue(); InfomainScript::Script script = m_infocenterState->GetNextReturnDialogue();
PlayAction(script); PlayAction(script);
if (script == InfomainScript::c_iicx26in_RunAnim - Lego()->IsVersion10()) { if (script == InfomainScript::c_iicx26in_RunAnim - Lego()->IsVersion10()) { // want to get back? Click on I!
m_unk0x1d6 = 1; m_bigInfoBlinkTimer = 1;
} }
FUN_10015820(FALSE, LegoOmni::c_disableInput | LegoOmni::c_disable3d | LegoOmni::c_clearScreen); FUN_10015820(FALSE, LegoOmni::c_disableInput | LegoOmni::c_disable3d | LegoOmni::c_clearScreen);
@ -638,37 +638,37 @@ void Infocenter::InitializeBitmaps()
m_glowInfo[0].m_destCtl = (MxStillPresenter*) Find("MxStillPresenter", "Info_A_Bitmap"); m_glowInfo[0].m_destCtl = (MxStillPresenter*) Find("MxStillPresenter", "Info_A_Bitmap");
assert(m_glowInfo[0].m_destCtl); assert(m_glowInfo[0].m_destCtl);
m_glowInfo[0].m_area = MxRect<MxS32>(391, 182, 427, 230); m_glowInfo[0].m_area = MxRect<MxS32>(391, 182, 427, 230);
m_glowInfo[0].m_unk0x04 = 3; m_glowInfo[0].m_target = InfocenterMapEntry::e_infocenter;
m_glowInfo[1].m_destCtl = (MxStillPresenter*) Find("MxStillPresenter", "Boat_A_Bitmap"); m_glowInfo[1].m_destCtl = (MxStillPresenter*) Find("MxStillPresenter", "Boat_A_Bitmap");
assert(m_glowInfo[1].m_destCtl); assert(m_glowInfo[1].m_destCtl);
m_glowInfo[1].m_area = MxRect<MxS32>(304, 225, 350, 268); m_glowInfo[1].m_area = MxRect<MxS32>(304, 225, 350, 268);
m_glowInfo[1].m_unk0x04 = 10; m_glowInfo[1].m_target = InfocenterMapEntry::e_jetrace;
m_glowInfo[2].m_destCtl = (MxStillPresenter*) Find("MxStillPresenter", "Race_A_Bitmap"); m_glowInfo[2].m_destCtl = (MxStillPresenter*) Find("MxStillPresenter", "Race_A_Bitmap");
assert(m_glowInfo[1].m_destCtl); // DECOMP: intentional typo assert(m_glowInfo[1].m_destCtl); // DECOMP: intentional typo
m_glowInfo[2].m_area = MxRect<MxS32>(301, 133, 347, 181); m_glowInfo[2].m_area = MxRect<MxS32>(301, 133, 347, 181);
m_glowInfo[2].m_unk0x04 = 11; m_glowInfo[2].m_target = InfocenterMapEntry::e_carrace;
m_glowInfo[3].m_destCtl = (MxStillPresenter*) Find("MxStillPresenter", "Pizza_A_Bitmap"); m_glowInfo[3].m_destCtl = (MxStillPresenter*) Find("MxStillPresenter", "Pizza_A_Bitmap");
assert(m_glowInfo[3].m_destCtl); assert(m_glowInfo[3].m_destCtl);
m_glowInfo[3].m_area = MxRect<MxS32>(289, 182, 335, 225); m_glowInfo[3].m_area = MxRect<MxS32>(289, 182, 335, 225);
m_glowInfo[3].m_unk0x04 = 12; m_glowInfo[3].m_target = InfocenterMapEntry::e_pizzeria;
m_glowInfo[4].m_destCtl = (MxStillPresenter*) Find("MxStillPresenter", "Gas_A_Bitmap"); m_glowInfo[4].m_destCtl = (MxStillPresenter*) Find("MxStillPresenter", "Gas_A_Bitmap");
assert(m_glowInfo[4].m_destCtl); assert(m_glowInfo[4].m_destCtl);
m_glowInfo[4].m_area = MxRect<MxS32>(350, 161, 391, 209); m_glowInfo[4].m_area = MxRect<MxS32>(350, 161, 391, 209);
m_glowInfo[4].m_unk0x04 = 13; m_glowInfo[4].m_target = InfocenterMapEntry::e_garage;
m_glowInfo[5].m_destCtl = (MxStillPresenter*) Find("MxStillPresenter", "Med_A_Bitmap"); m_glowInfo[5].m_destCtl = (MxStillPresenter*) Find("MxStillPresenter", "Med_A_Bitmap");
assert(m_glowInfo[5].m_destCtl); assert(m_glowInfo[5].m_destCtl);
m_glowInfo[5].m_area = MxRect<MxS32>(392, 130, 438, 176); m_glowInfo[5].m_area = MxRect<MxS32>(392, 130, 438, 176);
m_glowInfo[5].m_unk0x04 = 14; m_glowInfo[5].m_target = InfocenterMapEntry::e_hospital;
m_glowInfo[6].m_destCtl = (MxStillPresenter*) Find("MxStillPresenter", "Cop_A_Bitmap"); m_glowInfo[6].m_destCtl = (MxStillPresenter*) Find("MxStillPresenter", "Cop_A_Bitmap");
assert(m_glowInfo[6].m_destCtl); assert(m_glowInfo[6].m_destCtl);
m_glowInfo[6].m_area = MxRect<MxS32>(396, 229, 442, 272); m_glowInfo[6].m_area = MxRect<MxS32>(396, 229, 442, 272);
m_glowInfo[6].m_unk0x04 = 15; m_glowInfo[6].m_target = InfocenterMapEntry::e_police;
m_frame = (MxStillPresenter*) Find("MxStillPresenter", "FrameHot_Bitmap"); m_frame = (MxStillPresenter*) Find("MxStillPresenter", "FrameHot_Bitmap");
assert(m_frame); assert(m_frame);
@ -694,7 +694,7 @@ MxU8 Infocenter::HandleMouseMove(MxS32 p_x, MxS32 p_y)
m_dragPresenter->SetPosition(p_x, p_y); m_dragPresenter->SetPosition(p_x, p_y);
} }
FUN_10070d10(p_x, p_y); UpdateEnabledGlowControl(p_x, p_y);
return 1; return 1;
} }
@ -783,7 +783,7 @@ MxU8 Infocenter::HandleButtonUp(MxS32 p_x, MxS32 p_y)
m_radio.Stop(); m_radio.Stop();
BackgroundAudioManager()->Stop(); BackgroundAudioManager()->Stop();
PlayAction(InfomainScript::c_Pepper_All_Movie); PlayAction(InfomainScript::c_Pepper_All_Movie);
m_unk0x1d4++; m_playingMovieCounter++;
} }
break; break;
case InfomainScript::c_Mama_Ctl: case InfomainScript::c_Mama_Ctl:
@ -791,7 +791,7 @@ MxU8 Infocenter::HandleButtonUp(MxS32 p_x, MxS32 p_y)
m_radio.Stop(); m_radio.Stop();
BackgroundAudioManager()->Stop(); BackgroundAudioManager()->Stop();
PlayAction(InfomainScript::c_Mama_All_Movie); PlayAction(InfomainScript::c_Mama_All_Movie);
m_unk0x1d4++; m_playingMovieCounter++;
} }
break; break;
case InfomainScript::c_Papa_Ctl: case InfomainScript::c_Papa_Ctl:
@ -799,7 +799,7 @@ MxU8 Infocenter::HandleButtonUp(MxS32 p_x, MxS32 p_y)
m_radio.Stop(); m_radio.Stop();
BackgroundAudioManager()->Stop(); BackgroundAudioManager()->Stop();
PlayAction(InfomainScript::c_Papa_All_Movie); PlayAction(InfomainScript::c_Papa_All_Movie);
m_unk0x1d4++; m_playingMovieCounter++;
} }
break; break;
case InfomainScript::c_Nick_Ctl: case InfomainScript::c_Nick_Ctl:
@ -807,7 +807,7 @@ MxU8 Infocenter::HandleButtonUp(MxS32 p_x, MxS32 p_y)
m_radio.Stop(); m_radio.Stop();
BackgroundAudioManager()->Stop(); BackgroundAudioManager()->Stop();
PlayAction(InfomainScript::c_Nick_All_Movie); PlayAction(InfomainScript::c_Nick_All_Movie);
m_unk0x1d4++; m_playingMovieCounter++;
} }
break; break;
case InfomainScript::c_Laura_Ctl: case InfomainScript::c_Laura_Ctl:
@ -815,17 +815,17 @@ MxU8 Infocenter::HandleButtonUp(MxS32 p_x, MxS32 p_y)
m_radio.Stop(); m_radio.Stop();
BackgroundAudioManager()->Stop(); BackgroundAudioManager()->Stop();
PlayAction(InfomainScript::c_Laura_All_Movie); PlayAction(InfomainScript::c_Laura_All_Movie);
m_unk0x1d4++; m_playingMovieCounter++;
} }
break; break;
} }
} }
else { else {
if (m_unk0x1c8 != -1) { if (m_enabledGlowControl != -1) {
m_infoManDialogueTimer = 0; m_infoManDialogueTimer = 0;
switch (m_glowInfo[m_unk0x1c8].m_unk0x04) { switch (m_glowInfo[m_enabledGlowControl].m_target) {
case 3: case InfocenterMapEntry::e_infocenter:
GameState()->SetActor(m_selectedCharacter); GameState()->SetActor(m_selectedCharacter);
switch (m_selectedCharacter) { switch (m_selectedCharacter) {
@ -846,37 +846,37 @@ MxU8 Infocenter::HandleButtonUp(MxS32 p_x, MxS32 p_y)
break; break;
} }
break; break;
case 10: case InfocenterMapEntry::e_jetrace:
if (m_selectedCharacter) { if (m_selectedCharacter) {
m_destLocation = LegoGameState::e_jetraceExterior; m_destLocation = LegoGameState::e_jetraceExterior;
m_infocenterState->m_unk0x74 = 5; m_infocenterState->m_unk0x74 = 5;
} }
break; break;
case 11: case InfocenterMapEntry::e_carrace:
if (m_selectedCharacter) { if (m_selectedCharacter) {
m_destLocation = LegoGameState::e_carraceExterior; m_destLocation = LegoGameState::e_carraceExterior;
m_infocenterState->m_unk0x74 = 5; m_infocenterState->m_unk0x74 = 5;
} }
break; break;
case 12: case InfocenterMapEntry::e_pizzeria:
if (m_selectedCharacter) { if (m_selectedCharacter) {
m_destLocation = LegoGameState::e_pizzeriaExterior; m_destLocation = LegoGameState::e_pizzeriaExterior;
m_infocenterState->m_unk0x74 = 5; m_infocenterState->m_unk0x74 = 5;
} }
break; break;
case 13: case InfocenterMapEntry::e_garage:
if (m_selectedCharacter) { if (m_selectedCharacter) {
m_destLocation = LegoGameState::e_garageExterior; m_destLocation = LegoGameState::e_garageExterior;
m_infocenterState->m_unk0x74 = 5; m_infocenterState->m_unk0x74 = 5;
} }
break; break;
case 14: case InfocenterMapEntry::e_hospital:
if (m_selectedCharacter) { if (m_selectedCharacter) {
m_destLocation = LegoGameState::e_hospitalExterior; m_destLocation = LegoGameState::e_hospitalExterior;
m_infocenterState->m_unk0x74 = 5; m_infocenterState->m_unk0x74 = 5;
} }
break; break;
case 15: case InfocenterMapEntry::e_police:
if (m_selectedCharacter) { if (m_selectedCharacter) {
m_destLocation = LegoGameState::e_policeExterior; m_destLocation = LegoGameState::e_policeExterior;
m_infocenterState->m_unk0x74 = 5; m_infocenterState->m_unk0x74 = 5;
@ -938,7 +938,7 @@ MxU8 Infocenter::HandleButtonUp(MxS32 p_x, MxS32 p_y)
} }
UpdateFrameHot(TRUE); UpdateFrameHot(TRUE);
FUN_10070d10(0, 0); UpdateEnabledGlowControl(0, 0);
} }
return FALSE; return FALSE;
@ -1239,21 +1239,21 @@ MxResult Infocenter::Tickle()
m_bookAnimationTimer = 1; m_bookAnimationTimer = 1;
} }
if (m_unk0x1d6 != 0) { if (m_bigInfoBlinkTimer != 0) {
m_unk0x1d6 += 100; m_bigInfoBlinkTimer += 100;
if (m_unk0x1d6 > 3400 && m_unk0x1d6 < 3650) { if (m_bigInfoBlinkTimer > 3400 && m_bigInfoBlinkTimer < 3650) {
ControlManager()->UpdateEnabledChild(InfomainScript::c_BigInfo_Ctl, m_atomId.GetInternal(), 1); ControlManager()->UpdateEnabledChild(InfomainScript::c_BigInfo_Ctl, m_atomId.GetInternal(), 1);
} }
else if (m_unk0x1d6 > 3650 && m_unk0x1d6 < 3900) { else if (m_bigInfoBlinkTimer > 3650 && m_bigInfoBlinkTimer < 3900) {
ControlManager()->UpdateEnabledChild(InfomainScript::c_BigInfo_Ctl, m_atomId.GetInternal(), 0); ControlManager()->UpdateEnabledChild(InfomainScript::c_BigInfo_Ctl, m_atomId.GetInternal(), 0);
} }
else if (m_unk0x1d6 > 3900 && m_unk0x1d6 < 4150) { else if (m_bigInfoBlinkTimer > 3900 && m_bigInfoBlinkTimer < 4150) {
ControlManager()->UpdateEnabledChild(InfomainScript::c_BigInfo_Ctl, m_atomId.GetInternal(), 1); ControlManager()->UpdateEnabledChild(InfomainScript::c_BigInfo_Ctl, m_atomId.GetInternal(), 1);
} }
else if (m_unk0x1d6 > 4400) { else if (m_bigInfoBlinkTimer > 4400) {
ControlManager()->UpdateEnabledChild(InfomainScript::c_BigInfo_Ctl, m_atomId.GetInternal(), 0); ControlManager()->UpdateEnabledChild(InfomainScript::c_BigInfo_Ctl, m_atomId.GetInternal(), 0);
m_unk0x1d6 = 0; m_bigInfoBlinkTimer = 0;
} }
} }
@ -1302,7 +1302,7 @@ MxBool Infocenter::VTable0x5c()
// FUNCTION: LEGO1 0x10070d10 // FUNCTION: LEGO1 0x10070d10
// FUNCTION: BETA10 0x100307d4 // FUNCTION: BETA10 0x100307d4
void Infocenter::FUN_10070d10(MxS32 p_x, MxS32 p_y) void Infocenter::UpdateEnabledGlowControl(MxS32 p_x, MxS32 p_y)
{ {
MxS16 i; MxS16 i;
for (i = 0; i < (MxS32) (sizeof(m_glowInfo) / sizeof(m_glowInfo[0])); i++) { for (i = 0; i < (MxS32) (sizeof(m_glowInfo) / sizeof(m_glowInfo[0])); i++) {
@ -1320,12 +1320,12 @@ void Infocenter::FUN_10070d10(MxS32 p_x, MxS32 p_y)
i = -1; i = -1;
} }
if (i != m_unk0x1c8) { if (i != m_enabledGlowControl) {
if (m_unk0x1c8 != -1) { if (m_enabledGlowControl != -1) {
m_glowInfo[m_unk0x1c8].m_destCtl->Enable(FALSE); m_glowInfo[m_enabledGlowControl].m_destCtl->Enable(FALSE);
} }
m_unk0x1c8 = i; m_enabledGlowControl = i;
if (i != -1) { if (i != -1) {
m_glowInfo[i].m_destCtl->Enable(TRUE); m_glowInfo[i].m_destCtl->Enable(TRUE);
} }

View File

@ -1653,19 +1653,19 @@ void Act1State::PlaceActors()
m_helicopter = NULL; m_helicopter = NULL;
if (m_helicopterWindshield != NULL) { if (m_helicopterWindshield != NULL) {
FUN_1003f930(m_helicopterWindshield); LoadFromNamedTexture(m_helicopterWindshield);
delete m_helicopterWindshield; delete m_helicopterWindshield;
m_helicopterWindshield = NULL; m_helicopterWindshield = NULL;
} }
if (m_helicopterJetLeft != NULL) { if (m_helicopterJetLeft != NULL) {
FUN_1003f930(m_helicopterJetLeft); LoadFromNamedTexture(m_helicopterJetLeft);
delete m_helicopterJetLeft; delete m_helicopterJetLeft;
m_helicopterJetLeft = NULL; m_helicopterJetLeft = NULL;
} }
if (m_helicopterJetRight != NULL) { if (m_helicopterJetRight != NULL) {
FUN_1003f930(m_helicopterJetRight); LoadFromNamedTexture(m_helicopterJetRight);
delete m_helicopterJetRight; delete m_helicopterJetRight;
m_helicopterJetRight = NULL; m_helicopterJetRight = NULL;
} }
@ -1689,13 +1689,13 @@ void Act1State::PlaceActors()
m_jetski = NULL; m_jetski = NULL;
if (m_jetskiFront != NULL) { if (m_jetskiFront != NULL) {
FUN_1003f930(m_jetskiFront); LoadFromNamedTexture(m_jetskiFront);
delete m_jetskiFront; delete m_jetskiFront;
m_jetskiFront = NULL; m_jetskiFront = NULL;
} }
if (m_jetskiWindshield != NULL) { if (m_jetskiWindshield != NULL) {
FUN_1003f930(m_jetskiWindshield); LoadFromNamedTexture(m_jetskiWindshield);
delete m_jetskiWindshield; delete m_jetskiWindshield;
m_jetskiWindshield = NULL; m_jetskiWindshield = NULL;
} }
@ -1723,7 +1723,7 @@ void Act1State::PlaceActors()
m_dunebuggy = NULL; m_dunebuggy = NULL;
if (m_dunebuggyFront != NULL) { if (m_dunebuggyFront != NULL) {
FUN_1003f930(m_dunebuggyFront); LoadFromNamedTexture(m_dunebuggyFront);
delete m_dunebuggyFront; delete m_dunebuggyFront;
m_dunebuggyFront = NULL; m_dunebuggyFront = NULL;
} }
@ -1751,19 +1751,19 @@ void Act1State::PlaceActors()
m_racecar = NULL; m_racecar = NULL;
if (m_racecarFront != NULL) { if (m_racecarFront != NULL) {
FUN_1003f930(m_racecarFront); LoadFromNamedTexture(m_racecarFront);
delete m_racecarFront; delete m_racecarFront;
m_racecarFront = NULL; m_racecarFront = NULL;
} }
if (m_racecarBack != NULL) { if (m_racecarBack != NULL) {
FUN_1003f930(m_racecarBack); LoadFromNamedTexture(m_racecarBack);
delete m_racecarBack; delete m_racecarBack;
m_racecarBack = NULL; m_racecarBack = NULL;
} }
if (m_racecarTail != NULL) { if (m_racecarTail != NULL) {
FUN_1003f930(m_racecarTail); LoadFromNamedTexture(m_racecarTail);
delete m_racecarTail; delete m_racecarTail;
m_racecarTail = NULL; m_racecarTail = NULL;
} }

View File

@ -44,13 +44,13 @@ ROIColorAlias g_roiColorAliases[22] = {
int g_roiConfig = 100; int g_roiConfig = 100;
// GLOBAL: LEGO1 0x10101370 // GLOBAL: LEGO1 0x10101370
const char* g_unk0x10101370[] = {"bike", "moto", NULL}; const char* g_sharedModelsHigh[] = {"bike", "moto", NULL};
// GLOBAL: LEGO1 0x10101380 // GLOBAL: LEGO1 0x10101380
const char* g_unk0x10101380[] = {"bike", "moto", "haus", NULL}; const char* g_sharedModelsLow[] = {"bike", "moto", "haus", NULL};
// GLOBAL: LEGO1 0x10101390 // GLOBAL: LEGO1 0x10101390
const char* g_unk0x10101390[] = {"rcuser", "jsuser", "dunebugy", "chtrblad", "chtrbody", "chtrshld", NULL}; const char* g_alwaysLoadNames[] = {"rcuser", "jsuser", "dunebugy", "chtrblad", "chtrbody", "chtrshld", NULL};
// GLOBAL: LEGO1 0x101013ac // GLOBAL: LEGO1 0x101013ac
ColorOverride g_colorOverride = NULL; ColorOverride g_colorOverride = NULL;
@ -225,30 +225,30 @@ LegoResult LegoROI::Read(
} }
if (g_roiConfig <= 2) { if (g_roiConfig <= 2) {
for (i = 0; g_unk0x10101380[i] != NULL; i++) { for (i = 0; g_sharedModelsLow[i] != NULL; i++) {
if (!SDL_strncasecmp(m_name, g_unk0x10101380[i], 4)) { if (!SDL_strncasecmp(m_name, g_sharedModelsLow[i], 4)) {
roiName = g_unk0x10101380[i]; roiName = g_sharedModelsLow[i];
break; break;
} }
} }
} }
else { else {
for (i = 0; g_unk0x10101370[i] != NULL; i++) { for (i = 0; g_sharedModelsHigh[i] != NULL; i++) {
if (!SDL_strncasecmp(m_name, g_unk0x10101370[i], 4)) { if (!SDL_strncasecmp(m_name, g_sharedModelsHigh[i], 4)) {
roiName = g_unk0x10101370[i]; roiName = g_sharedModelsHigh[i];
break; break;
} }
} }
} }
if ((lodList = p_viewLODListManager->Lookup(roiName))) { if ((lodList = p_viewLODListManager->Lookup(roiName))) {
for (j = 0; g_unk0x10101390[j] != NULL; j++) { for (j = 0; g_alwaysLoadNames[j] != NULL; j++) {
if (!SDL_strcasecmp(g_unk0x10101390[j], roiName)) { if (!SDL_strcasecmp(g_alwaysLoadNames[j], roiName)) {
break; break;
} }
} }
if (g_unk0x10101390[j] != NULL) { if (g_alwaysLoadNames[j] != NULL) {
while (lodList->Size()) { while (lodList->Size()) {
delete const_cast<ViewLOD*>(lodList->PopBack()); delete const_cast<ViewLOD*>(lodList->PopBack());
} }