Implement/match BumpBouy class (#1058)

This commit is contained in:
Christian Semmler
2024-07-04 14:28:23 -07:00
committed by GitHub
parent 14653070cc
commit 09684b3c03
8 changed files with 57 additions and 19 deletions

View File

@@ -30,4 +30,7 @@ public:
// BumpBouy::`scalar deleting destructor' // BumpBouy::`scalar deleting destructor'
}; };
// GLOBAL: LEGO1 0x100d6788
// BumpBouy::`vbtable'
#endif // BUMPBOUY_H #endif // BUMPBOUY_H

View File

@@ -47,15 +47,15 @@ public:
void FUN_1007c520(); void FUN_1007c520();
inline Tgl::Renderer* GetRenderer() { return this->m_renderer; } inline Tgl::Renderer* GetRenderer() { return m_renderer; }
inline Lego3DManager* Get3DManager() { return this->m_3dManager; } inline Lego3DManager* Get3DManager() { return m_3dManager; }
inline LegoROI* GetViewROI() { return this->m_viewROI; } inline LegoROI* GetViewROI() { return m_viewROI; }
inline MxDirect3D* GetDirect3D() { return this->m_direct3d; } inline MxDirect3D* GetDirect3D() { return m_direct3d; }
inline MxBool GetRender3D() { return this->m_render3d; } inline MxBool GetRender3D() { return m_render3d; }
inline double GetElapsedSeconds() { return this->m_elapsedSeconds; } inline double GetElapsedSeconds() { return m_elapsedSeconds; }
inline void SetRender3D(MxBool p_render3d) { this->m_render3d = p_render3d; } inline void SetRender3D(MxBool p_render3d) { m_render3d = p_render3d; }
inline void SetUnk0x554(MxBool p_unk0x554) { this->m_unk0x554 = p_unk0x554; } inline void SetUnk0x554(MxBool p_unk0x554) { m_unk0x554 = p_unk0x554; }
private: private:
MxResult CreateDirect3D(); MxResult CreateDirect3D();

View File

@@ -57,7 +57,7 @@ MxLong Bike::HandleClick()
FUN_10015820(TRUE, 0); FUN_10015820(TRUE, 0);
((Isle*) CurrentWorld())->SetDestLocation(LegoGameState::Area::e_bike); ((Isle*) CurrentWorld())->SetDestLocation(LegoGameState::Area::e_bike);
TransitionManager()->StartTransition(MxTransitionManager::TransitionType::e_mosaic, 50, FALSE, TRUE); TransitionManager()->StartTransition(MxTransitionManager::e_mosaic, 50, FALSE, TRUE);
if (GameState()->GetActorId() != UserActor()->GetActorId()) { if (GameState()->GetActorId() != UserActor()->GetActorId()) {
((IslePathActor*) UserActor())->Exit(); ((IslePathActor*) UserActor())->Exit();

View File

@@ -1,21 +1,56 @@
#include "bumpbouy.h" #include "bumpbouy.h"
#include "isle.h"
#include "islepathactor.h"
#include "legogamestate.h"
#include "legovideomanager.h"
#include "misc.h"
#include "mxmisc.h"
#include "mxnotificationmanager.h"
#include "mxnotificationparam.h"
#include "mxtransitionmanager.h"
#include "scripts.h"
#include <assert.h>
DECOMP_SIZE_ASSERT(BumpBouy, 0x174) DECOMP_SIZE_ASSERT(BumpBouy, 0x174)
// STUB: LEGO1 0x10027220 // FUNCTION: LEGO1 0x10027220
BumpBouy::BumpBouy() BumpBouy::BumpBouy()
{ {
NotificationManager()->Register(this);
} }
// STUB: LEGO1 0x10027360 // FUNCTION: LEGO1 0x10027360
BumpBouy::~BumpBouy() BumpBouy::~BumpBouy()
{ {
// TODO NotificationManager()->Unregister(this);
} }
// STUB: LEGO1 0x10027400 // FUNCTION: LEGO1 0x10027400
// FUNCTION: BETA10 0x100262d9
MxLong BumpBouy::Notify(MxParam& p_param) MxLong BumpBouy::Notify(MxParam& p_param)
{ {
// TODO MxLong result = 0;
return 0; IslePathActor* user = (IslePathActor*) UserActor();
assert(user);
if (user->IsA("Jetski") && ((MxNotificationParam&) p_param).GetNotification() == c_notificationClick) {
VideoManager()->SetRender3D(FALSE);
user->SetWorldSpeed(0);
user->Exit();
Act1State* isleState = (Act1State*) GameState()->GetState("Act1State");
assert(isleState);
isleState->m_unk0x018 = 5;
Isle* isle = (Isle*) FindWorld(*g_isleScript, 0);
assert(isle);
isle->SetDestLocation(LegoGameState::e_jetrace);
TransitionManager()->StartTransition(MxTransitionManager::e_mosaic, 50, FALSE, FALSE);
result = 1;
}
return result;
} }

View File

@@ -95,7 +95,7 @@ MxLong DuneBuggy::HandleClick()
FUN_10015820(TRUE, 0); FUN_10015820(TRUE, 0);
((Isle*) CurrentWorld())->SetDestLocation(LegoGameState::Area::e_dunecar); ((Isle*) CurrentWorld())->SetDestLocation(LegoGameState::Area::e_dunecar);
TransitionManager()->StartTransition(MxTransitionManager::TransitionType::e_mosaic, 50, FALSE, TRUE); TransitionManager()->StartTransition(MxTransitionManager::e_mosaic, 50, FALSE, TRUE);
if (GameState()->GetActorId() != UserActor()->GetActorId()) { if (GameState()->GetActorId() != UserActor()->GetActorId()) {
((IslePathActor*) UserActor())->Exit(); ((IslePathActor*) UserActor())->Exit();

View File

@@ -91,7 +91,7 @@ MxLong Motocycle::HandleClick()
FUN_10015820(TRUE, 0); FUN_10015820(TRUE, 0);
((Isle*) CurrentWorld())->SetDestLocation(LegoGameState::Area::e_motocycle); ((Isle*) CurrentWorld())->SetDestLocation(LegoGameState::Area::e_motocycle);
TransitionManager()->StartTransition(MxTransitionManager::TransitionType::e_mosaic, 50, FALSE, TRUE); TransitionManager()->StartTransition(MxTransitionManager::e_mosaic, 50, FALSE, TRUE);
if (GameState()->GetActorId() != UserActor()->GetActorId()) { if (GameState()->GetActorId() != UserActor()->GetActorId()) {
((IslePathActor*) UserActor())->Exit(); ((IslePathActor*) UserActor())->Exit();

View File

@@ -82,7 +82,7 @@ MxLong SkateBoard::HandleClick()
FUN_10015820(TRUE, 0); FUN_10015820(TRUE, 0);
((Isle*) CurrentWorld())->SetDestLocation(LegoGameState::Area::e_skateboard); ((Isle*) CurrentWorld())->SetDestLocation(LegoGameState::Area::e_skateboard);
TransitionManager()->StartTransition(MxTransitionManager::TransitionType::e_mosaic, 50, FALSE, TRUE); TransitionManager()->StartTransition(MxTransitionManager::e_mosaic, 50, FALSE, TRUE);
if (GameState()->GetActorId() != UserActor()->GetActorId()) { if (GameState()->GetActorId() != UserActor()->GetActorId()) {
if (!UserActor()->IsA("SkateBoard")) { if (!UserActor()->IsA("SkateBoard")) {

View File

@@ -53,7 +53,7 @@ MxLong HistoryBook::Notify(MxParam& p_param)
switch (((MxNotificationParam&) p_param).GetNotification()) { switch (((MxNotificationParam&) p_param).GetNotification()) {
case c_notificationButtonUp: case c_notificationButtonUp:
m_destLocation = LegoGameState::Area::e_infoscor; m_destLocation = LegoGameState::Area::e_infoscor;
TransitionManager()->StartTransition(MxTransitionManager::TransitionType::e_mosaic, 50, FALSE, FALSE); TransitionManager()->StartTransition(MxTransitionManager::e_mosaic, 50, FALSE, FALSE);
break; break;
case c_notificationTransitioned: case c_notificationTransitioned:
GameState()->SwitchArea(m_destLocation); GameState()->SwitchArea(m_destLocation);