mirror of
https://github.com/isledecomp/isle.git
synced 2024-11-21 10:48:15 -05:00
Implement/match BumpBouy class (#1058)
This commit is contained in:
parent
14653070cc
commit
09684b3c03
8 changed files with 57 additions and 19 deletions
|
@ -30,4 +30,7 @@ class BumpBouy : public LegoAnimActor {
|
|||
// BumpBouy::`scalar deleting destructor'
|
||||
};
|
||||
|
||||
// GLOBAL: LEGO1 0x100d6788
|
||||
// BumpBouy::`vbtable'
|
||||
|
||||
#endif // BUMPBOUY_H
|
||||
|
|
|
@ -47,15 +47,15 @@ class LegoVideoManager : public MxVideoManager {
|
|||
|
||||
void FUN_1007c520();
|
||||
|
||||
inline Tgl::Renderer* GetRenderer() { return this->m_renderer; }
|
||||
inline Lego3DManager* Get3DManager() { return this->m_3dManager; }
|
||||
inline LegoROI* GetViewROI() { return this->m_viewROI; }
|
||||
inline MxDirect3D* GetDirect3D() { return this->m_direct3d; }
|
||||
inline MxBool GetRender3D() { return this->m_render3d; }
|
||||
inline double GetElapsedSeconds() { return this->m_elapsedSeconds; }
|
||||
inline Tgl::Renderer* GetRenderer() { return m_renderer; }
|
||||
inline Lego3DManager* Get3DManager() { return m_3dManager; }
|
||||
inline LegoROI* GetViewROI() { return m_viewROI; }
|
||||
inline MxDirect3D* GetDirect3D() { return m_direct3d; }
|
||||
inline MxBool GetRender3D() { return m_render3d; }
|
||||
inline double GetElapsedSeconds() { return m_elapsedSeconds; }
|
||||
|
||||
inline void SetRender3D(MxBool p_render3d) { this->m_render3d = p_render3d; }
|
||||
inline void SetUnk0x554(MxBool p_unk0x554) { this->m_unk0x554 = p_unk0x554; }
|
||||
inline void SetRender3D(MxBool p_render3d) { m_render3d = p_render3d; }
|
||||
inline void SetUnk0x554(MxBool p_unk0x554) { m_unk0x554 = p_unk0x554; }
|
||||
|
||||
private:
|
||||
MxResult CreateDirect3D();
|
||||
|
|
|
@ -57,7 +57,7 @@ MxLong Bike::HandleClick()
|
|||
FUN_10015820(TRUE, 0);
|
||||
|
||||
((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()) {
|
||||
((IslePathActor*) UserActor())->Exit();
|
||||
|
|
|
@ -1,21 +1,56 @@
|
|||
#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)
|
||||
|
||||
// STUB: LEGO1 0x10027220
|
||||
// FUNCTION: LEGO1 0x10027220
|
||||
BumpBouy::BumpBouy()
|
||||
{
|
||||
NotificationManager()->Register(this);
|
||||
}
|
||||
|
||||
// STUB: LEGO1 0x10027360
|
||||
// FUNCTION: LEGO1 0x10027360
|
||||
BumpBouy::~BumpBouy()
|
||||
{
|
||||
// TODO
|
||||
NotificationManager()->Unregister(this);
|
||||
}
|
||||
|
||||
// STUB: LEGO1 0x10027400
|
||||
// FUNCTION: LEGO1 0x10027400
|
||||
// FUNCTION: BETA10 0x100262d9
|
||||
MxLong BumpBouy::Notify(MxParam& p_param)
|
||||
{
|
||||
// TODO
|
||||
return 0;
|
||||
MxLong result = 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;
|
||||
}
|
||||
|
|
|
@ -95,7 +95,7 @@ MxLong DuneBuggy::HandleClick()
|
|||
FUN_10015820(TRUE, 0);
|
||||
|
||||
((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()) {
|
||||
((IslePathActor*) UserActor())->Exit();
|
||||
|
|
|
@ -91,7 +91,7 @@ MxLong Motocycle::HandleClick()
|
|||
FUN_10015820(TRUE, 0);
|
||||
|
||||
((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()) {
|
||||
((IslePathActor*) UserActor())->Exit();
|
||||
|
|
|
@ -82,7 +82,7 @@ MxLong SkateBoard::HandleClick()
|
|||
FUN_10015820(TRUE, 0);
|
||||
|
||||
((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 (!UserActor()->IsA("SkateBoard")) {
|
||||
|
|
|
@ -53,7 +53,7 @@ MxLong HistoryBook::Notify(MxParam& p_param)
|
|||
switch (((MxNotificationParam&) p_param).GetNotification()) {
|
||||
case c_notificationButtonUp:
|
||||
m_destLocation = LegoGameState::Area::e_infoscor;
|
||||
TransitionManager()->StartTransition(MxTransitionManager::TransitionType::e_mosaic, 50, FALSE, FALSE);
|
||||
TransitionManager()->StartTransition(MxTransitionManager::e_mosaic, 50, FALSE, FALSE);
|
||||
break;
|
||||
case c_notificationTransitioned:
|
||||
GameState()->SwitchArea(m_destLocation);
|
||||
|
|
Loading…
Reference in a new issue