Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 26 additions & 26 deletions LEGO1/lego/legoomni/include/act3.h
Original file line number Diff line number Diff line change
Expand Up @@ -143,15 +143,15 @@ class Act3 : public LegoWorld {
MxResult ShootPizza(LegoPathController* p_controller, Vector3& p_location, Vector3& p_direction, Vector3& p_up);
MxResult ShootDonut(LegoPathController* p_controller, Vector3& p_location, Vector3& p_direction, Vector3& p_up);
void TriggerHitSound(undefined4 p_param1);
MxResult FUN_10073360(Act3Ammo& p_ammo, const Vector3& p_param2);
MxResult FUN_10073390(Act3Ammo& p_ammo, const Vector3& p_param2);
MxResult HitBrickster(Act3Ammo& p_ammo, const Vector3& p_param2);
MxResult HitCop(Act3Ammo& p_ammo, const Vector3& p_param2);
void SetBrickster(Act3Brickster* p_brickster);
void AddCop(Act3Cop* p_cop);
void FUN_10073400();
void FUN_10073430();
void TransitionToGoodEnding();
void TransitionToBadEnding();
void GoodEnding(const Matrix4& p_destination);
void BadEnding(const Matrix4& p_destination);
void FUN_10073a60();
void DisableHelicopterDot();

// BETA indicates that the following classes access certain members directly.
friend class Act3Ammo;
Expand All @@ -171,27 +171,27 @@ class Act3 : public LegoWorld {
const MxQuaternionTransformer& p_quatTransform
);

Act3State* m_state; // 0xf8
Act3Ammo m_pizzas[MAX_PIZZAS]; // 0xfc
Act3Ammo m_donuts[MAX_DONUTS]; // 0x217c
undefined m_unk0x41fc; // 0x41fc
Act3Cop* m_cop1; // 0x4200
Act3Cop* m_cop2; // 0x4204
Act3Brickster* m_brickster; // 0x4208
Helicopter* m_copter; // 0x420c
Act3Shark* m_shark; // 0x4210
MxFloat m_time; // 0x4214
MxU8 m_pizzaHitSound; // 0x4218
MxU8 m_pizzaMissSound; // 0x4219
MxU8 m_copDonutSound; // 0x421a
MxU8 m_donutMissSound; // 0x421b
MxU8 m_islanderSound; // 0x421c
MxU8 m_bricksterDonutSound; // 0x421d
undefined m_unk0x421e; // 0x421e
Act3List m_unk0x4220; // 0x4220
MxPresenter* m_helicopterDots[15]; // 0x4230
Act3Script::Script m_unk0x426c; // 0x426c
LegoGameState::Area m_destLocation; // 0x4270
Act3State* m_state; // 0xf8
Act3Ammo m_pizzas[MAX_PIZZAS]; // 0xfc
Act3Ammo m_donuts[MAX_DONUTS]; // 0x217c
undefined m_unk0x41fc; // 0x41fc
Act3Cop* m_cop1; // 0x4200
Act3Cop* m_cop2; // 0x4204
Act3Brickster* m_brickster; // 0x4208
Helicopter* m_copter; // 0x420c
Act3Shark* m_shark; // 0x4210
MxFloat m_time; // 0x4214
MxU8 m_pizzaHitSound; // 0x4218
MxU8 m_pizzaMissSound; // 0x4219
MxU8 m_copDonutSound; // 0x421a
MxU8 m_donutMissSound; // 0x421b
MxU8 m_islanderSound; // 0x421c
MxU8 m_bricksterDonutSound; // 0x421d
undefined m_helicopterDotCount; // 0x421e
Act3List m_soundList; // 0x4220
MxPresenter* m_helicopterDots[15]; // 0x4230
Act3Script::Script m_explanationAnimation; // 0x426c
LegoGameState::Area m_destLocation; // 0x4270
};

// TEMPLATE: LEGO1 0x10071f10
Expand Down
16 changes: 8 additions & 8 deletions LEGO1/lego/legoomni/include/legoact2.h
Original file line number Diff line number Diff line change
Expand Up @@ -77,19 +77,19 @@ class LegoAct2 : public LegoWorld {
MxBool Escape() override; // vtable+0x64
void Enable(MxBool p_enable) override; // vtable+0x68

void SetUnknown0x1138(Act2Actor* p_unk0x1138) { m_unk0x1138 = p_unk0x1138; }
void SetAmbulanceActor(Act2Actor* p_ambulanceActor) { m_ambulanceActor = p_ambulanceActor; }
void SetDestLocation(LegoGameState::Area p_destLocation) { m_destLocation = p_destLocation; }

MxResult CreateBrick();
void FUN_100517b0();
MxResult CreateDroppingBrick();
void CreateBrick();
MxResult BadEnding();
MxResult StartAction(
Act2mainScript::Script p_objectId,
MxBool p_param2,
MxBool p_param3,
MxBool p_isAnimation,
MxBool p_ignoreCurrentAction,
Mx3DPointFloat* p_location,
Mx3DPointFloat* p_direction,
Mx3DPointFloat* p_param6
Mx3DPointFloat* p_up
);

// SYNTHETIC: LEGO1 0x1004fe20
Expand Down Expand Up @@ -117,7 +117,7 @@ class LegoAct2 : public LegoWorld {
MxLong HandleTransitionEnd();
MxLong HandlePathStruct(LegoPathStructNotificationParam& p_param);
void PlayMusic(JukeboxScript::Script p_objectId);
void FUN_10051900();
void DisableAnimations();
void HideMaPaInfo();
void InitBricks();
void UninitBricks();
Expand Down Expand Up @@ -145,7 +145,7 @@ class LegoAct2 : public LegoWorld {
undefined4 m_unk0x112c; // 0x112c
undefined4 m_unk0x1130; // 0x1130
undefined4 m_unk0x1134; // 0x1134
Act2Actor* m_unk0x1138; // 0x1138
Act2Actor* m_ambulanceActor; // 0x1138
undefined m_unk0x113c; // 0x113c
Act2mainScript::Script m_currentAction; // 0x1140
Act2mainScript::Script m_infomanDirecting; // 0x1144
Expand Down
12 changes: 6 additions & 6 deletions LEGO1/lego/legoomni/include/legogamestate.h
Original file line number Diff line number Diff line change
Expand Up @@ -114,21 +114,21 @@ class LegoGameState {
e_jetskibuild,
e_racecarbuild,
e_helicopterSpawn,
e_unk41,
e_unk42,
e_helicopterLanded,
e_helicopterTakenOff,
e_dunebuggySpawn,
e_racecarSpawn,
e_jetskiSpawn,
e_act2main,
e_act3script,
e_unk48,
e_unk49,
e_unk50,
e_helicopterLandedAct3,
e_helicopterTakenOffAct3,
e_pepperSpawnAct2,
e_unk51,
e_towTrackHookedUp,
e_jukeboxw,
e_jukeboxExterior,
e_unk55,
e_helicopterExited,
e_histbook,
e_bike,
e_dunecar,
Expand Down
3 changes: 0 additions & 3 deletions LEGO1/lego/legoomni/include/legopathactor.h
Original file line number Diff line number Diff line change
Expand Up @@ -222,9 +222,6 @@ class LegoPathActor : public LegoActor {
MxFloat m_linearRotationRatio; // 0x150
};

// FUNCTION: LEGO1 0x1002edd0
// LegoPathActor::CheckIntersectionBothFaces

// TEMPLATE: LEGO1 0x10018b70
// List<LegoBoundaryEdge>::~List<LegoBoundaryEdge>

Expand Down
16 changes: 8 additions & 8 deletions LEGO1/lego/legoomni/include/legopathstruct.h
Original file line number Diff line number Diff line change
Expand Up @@ -73,13 +73,13 @@ class LegoPathStruct : public LegoPathStructBase {
public:
enum Trigger {
c_camAnim = 'C',
c_d = 'D',
c_e = 'E',
c_g = 'G',
c_h = 'H',
c_waypoint = 'D',
c_deleteAction = 'E',
c_nothing = 'G',
c_hideAnim = 'H',
c_music = 'M',
c_s = 'S',
c_w = 'W'
c_specialMissionWaypointAndAction = 'S',
c_missionFinalWaypoint = 'W'
};

// FUNCTION: LEGO1 0x100473a0
Expand All @@ -94,8 +94,8 @@ class LegoPathStruct : public LegoPathStructBase {
void SetAtomId(const MxAtomId& p_atomId) { m_atomId = p_atomId; }

private:
MxBool HandleTrigger(LegoPathActor* p_actor, MxBool p_direction, MxU32 p_data, MxBool p_bool);
void FUN_1001bc40(const char* p_name, MxU32 p_data, MxBool p_bool);
MxBool HandleTrigger(LegoPathActor* p_actor, MxBool p_direction, MxU32 p_data, MxBool p_invertDirection);
void HandleAction(const char* p_name, MxU32 p_data, MxBool p_start);
void PlayMusic(MxBool p_direction, MxU32 p_data);

LegoWorld* m_world; // 0x0c
Expand Down
36 changes: 21 additions & 15 deletions LEGO1/lego/legoomni/include/legoracespecial.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,27 +53,33 @@ class LegoCarRaceActor : public virtual LegoRaceActor {

// LegoCarRaceActor vtable

virtual void FUN_10080590(float p_time); // vtable+0x00
virtual void UpdateWorldSpeed(float p_time); // vtable+0x00

// FUNCTION: LEGO1 0x10012bb0
virtual void FUN_10012bb0(float p_unk0x14) { m_unk0x14 = p_unk0x14; } // vtable+0x04
virtual void SetAcceleration(float p_acceleration) { m_acceleration = p_acceleration; } // vtable+0x04

// FUNCTION: LEGO1 0x10012bc0
virtual float FUN_10012bc0() { return m_unk0x14; } // vtable+0x08
virtual float GetAcceleration() { return m_acceleration; } // vtable+0x08

// FUNCTION: LEGO1 0x10012bd0
virtual void FUN_10012bd0(float p_unk0x10) { m_unk0x10 = p_unk0x10; } // vtable+0x0c
virtual void SetCurveSpeedFactor(float p_curveSpeedFactor)
{
m_curveSpeedFactor = p_curveSpeedFactor;
} // vtable+0x0c

// FUNCTION: LEGO1 0x10012be0
virtual float FUN_10012be0() { return m_unk0x10; } // vtable+0x10
virtual float GetCurveSpeedFactor() { return m_curveSpeedFactor; } // vtable+0x10

// FUNCTION: LEGO1 0x10012bf0
virtual void FUN_10012bf0(float p_unk0x18) { m_unk0x18 = p_unk0x18; } // vtable+0x14
virtual void SetRubberBandFactor(float p_rubberBandFactor)
{
m_rubberBandFactor = p_rubberBandFactor;
} // vtable+0x14

// FUNCTION: LEGO1 0x10012c00
virtual float FUN_10012c00() { return m_unk0x18; } // vtable+0x18
virtual float GetRubberBandFactor() { return m_rubberBandFactor; } // vtable+0x18

virtual MxS32 VTable0x1c(LegoPathBoundary* p_boundary, LegoEdge* p_edge); // vtable+0x1c
virtual MxS32 HandleJump(LegoPathBoundary* p_boundary, LegoEdge* p_edge); // vtable+0x1c

// SYNTHETIC: LEGO1 0x10012c30
// LegoCarRaceActor::`vbase destructor'
Expand All @@ -88,18 +94,18 @@ class LegoCarRaceActor : public virtual LegoRaceActor {
MxFloat m_unk0x08; // 0x08
MxU8 m_animState; // 0x0c

// Could be a multiplier for the maximum speed when going straight
MxFloat m_unk0x10; // 0x10
// A multiplier for the maximum speed when going around a curve
MxFloat m_curveSpeedFactor; // 0x10

// Could be the acceleration
MxFloat m_unk0x14; // 0x14
MxFloat m_acceleration; // 0x14

MxFloat m_unk0x18; // 0x18
MxFloat m_rubberBandFactor; // 0x18

// Could be the current timestamp for time-based movement
MxFloat m_unk0x1c; // 0x1c
MxFloat m_lastAcceleration; // 0x1c

static MxFloat g_unk0x100f7aec;
static MxFloat g_maxSpeed;
};

// VTABLE: LEGO1 0x100da208 LegoCarRaceActor
Expand Down Expand Up @@ -139,7 +145,7 @@ class LegoJetskiRaceActor : public virtual LegoCarRaceActor {
Vector3& p_intersectionPoint
) override; // vtable+0x6c
void Animate(float p_time) override; // vtable+0x70
MxS32 VTable0x1c(LegoPathBoundary* p_boundary, LegoEdge* p_edge) override; // vtable+0x1c
MxS32 HandleJump(LegoPathBoundary* p_boundary, LegoEdge* p_edge) override; // vtable+0x1c

// SYNTHETIC: LEGO1 0x10013a80
// LegoJetskiRaceActor::`vbase destructor'
Expand Down
2 changes: 1 addition & 1 deletion LEGO1/lego/legoomni/include/legoutils.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ void CalculateViewFromAnimation(LegoAnimPresenter* p_presenter);
Extra::ActionType MatchActionString(const char*);
void InvokeAction(Extra::ActionType p_actionId, const MxAtomId& p_pAtom, MxS32 p_streamId, LegoEntity* p_sender);
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_gOut, float* p_bOut);
void PlayCamAnim(LegoPathActor* p_actor, MxBool p_unused, MxU32 p_location, MxBool p_bool);
void ResetViewVelocity();
MxBool RemoveFromCurrentWorld(const MxAtomId& p_atomId, MxS32 p_id);
Expand Down
4 changes: 2 additions & 2 deletions LEGO1/lego/legoomni/src/actors/act2actor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ void Act2Actor::Animate(float p_time)
}

SetWorldSpeed(0.0f);
((LegoAct2*) CurrentWorld())->FUN_100517b0();
((LegoAct2*) CurrentWorld())->CreateBrick();
return;
}
#endif
Expand Down Expand Up @@ -355,7 +355,7 @@ void Act2Actor::Animate(float p_time)
m_state = e_createdBrick;
m_createBrickTime = p_time;

if (((LegoAct2*) CurrentWorld())->CreateBrick() == SUCCESS) {
if (((LegoAct2*) CurrentWorld())->CreateDroppingBrick() == SUCCESS) {
PlayNextVoiceOver(VoiceOver::e_behind);
}
#ifndef BETA10
Expand Down
2 changes: 1 addition & 1 deletion LEGO1/lego/legoomni/src/actors/act3actors.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -649,7 +649,7 @@ void Act3Brickster::Animate(float p_time)
assert(m_shootAnim && m_bInfo);

if (m_unk0x50 < p_time) {
((Act3*) m_world)->FUN_10073a60();
((Act3*) m_world)->DisableHelicopterDot();
m_unk0x58 = 0;
assert(SoundManager()->GetCacheSoundManager());
SoundManager()->GetCacheSoundManager()->Play("thpt", NULL, FALSE);
Expand Down
4 changes: 2 additions & 2 deletions LEGO1/lego/legoomni/src/actors/act3ammo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -483,10 +483,10 @@ void Act3Ammo::Animate(float p_time)

if (!annihilated) {
if (IsPizza()) {
m_world->FUN_10073360(*this, position);
m_world->HitBrickster(*this, position);
}
else {
m_world->FUN_10073390(*this, position);
m_world->HitCop(*this, position);
}

m_worldSpeed = -1.0f;
Expand Down
2 changes: 1 addition & 1 deletion LEGO1/lego/legoomni/src/actors/ambulance.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ MxLong Ambulance::HandlePathStruct(LegoPathStructNotificationParam& p_param)
PlayAction(IsleScript::c_Avo915In_PlayWav);
}
}
else if (p_param.GetTrigger() == LegoPathStruct::c_s && p_param.GetData() == 0x131 && m_atBeachTask == 0) {
else if (p_param.GetTrigger() == LegoPathStruct::c_specialMissionWaypointAndAction && p_param.GetData() == 0x131 && m_atBeachTask == 0) {
m_atBeachTask = 1;
m_taskState = Ambulance::e_waiting;

Expand Down
16 changes: 8 additions & 8 deletions LEGO1/lego/legoomni/src/actors/helicopter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ void Helicopter::Exit()
if (UserActor() && UserActor()->IsA("IslePathActor")) {
((IslePathActor*) UserActor())
->SpawnPlayer(
LegoGameState::e_unk55,
LegoGameState::e_helicopterExited,
TRUE,
IslePathActor::c_spawnBit1 | IslePathActor::c_playMusic | IslePathActor::c_spawnBit3
);
Expand Down Expand Up @@ -143,7 +143,7 @@ MxLong Helicopter::HandleClick()
m_script = *g_isleScript;
AnimationManager()->FUN_10064670(NULL);
SpawnPlayer(
LegoGameState::e_unk41,
LegoGameState::e_helicopterLanded,
TRUE,
IslePathActor::c_spawnBit1 | IslePathActor::c_playMusic | IslePathActor::c_spawnBit3
);
Expand Down Expand Up @@ -320,14 +320,14 @@ MxLong Helicopter::HandleEndAnim(LegoEndAnimNotificationParam& p_param)
assert(act1State);
act1State->m_state = Act1State::e_helicopter;
SpawnPlayer(
LegoGameState::e_unk42,
LegoGameState::e_helicopterTakenOff,
TRUE,
IslePathActor::c_spawnBit1 | IslePathActor::c_playMusic | IslePathActor::c_spawnBit3
);
}
else {
SpawnPlayer(
LegoGameState::e_unk49,
LegoGameState::e_helicopterTakenOffAct3,
TRUE,
IslePathActor::c_spawnBit1 | IslePathActor::c_playMusic | IslePathActor::c_spawnBit3
);
Expand Down Expand Up @@ -361,14 +361,14 @@ MxLong Helicopter::HandleEndAnim(LegoEndAnimNotificationParam& p_param)
assert(act1State);
act1State->m_state = Act1State::e_none;
SpawnPlayer(
LegoGameState::e_unk41,
LegoGameState::e_helicopterLanded,
TRUE,
IslePathActor::c_spawnBit1 | IslePathActor::c_playMusic | IslePathActor::c_spawnBit3
);
}
else {
SpawnPlayer(
LegoGameState::e_unk48,
LegoGameState::e_helicopterLandedAct3,
TRUE,
IslePathActor::c_spawnBit1 | IslePathActor::c_playMusic | IslePathActor::c_spawnBit3
);
Expand Down Expand Up @@ -430,10 +430,10 @@ void Helicopter::Animate(float p_time)
}
else {
if (m_state->m_unk0x08 == 4) {
((Act3*) m_world)->FUN_10073400();
((Act3*) m_world)->TransitionToGoodEnding();
}
else {
((Act3*) m_world)->FUN_10073430();
((Act3*) m_world)->TransitionToBadEnding();
}

SetActorState(c_disabled);
Expand Down
Loading
Loading