2023-06-29 04:10:08 -04:00
|
|
|
#include "bumpbouy.h"
|
2024-01-20 18:04:46 -05:00
|
|
|
|
2024-07-04 17:28:23 -04:00
|
|
|
#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>
|
|
|
|
|
2024-03-22 21:30:58 -04:00
|
|
|
DECOMP_SIZE_ASSERT(BumpBouy, 0x174)
|
|
|
|
|
2024-07-04 17:28:23 -04:00
|
|
|
// FUNCTION: LEGO1 0x10027220
|
2024-03-22 21:30:58 -04:00
|
|
|
BumpBouy::BumpBouy()
|
|
|
|
{
|
2024-07-04 17:28:23 -04:00
|
|
|
NotificationManager()->Register(this);
|
2024-03-22 21:30:58 -04:00
|
|
|
}
|
|
|
|
|
2024-07-04 17:28:23 -04:00
|
|
|
// FUNCTION: LEGO1 0x10027360
|
2024-04-19 16:23:36 -04:00
|
|
|
BumpBouy::~BumpBouy()
|
|
|
|
{
|
2024-07-04 17:28:23 -04:00
|
|
|
NotificationManager()->Unregister(this);
|
2024-04-19 16:23:36 -04:00
|
|
|
}
|
|
|
|
|
2024-07-04 17:28:23 -04:00
|
|
|
// FUNCTION: LEGO1 0x10027400
|
|
|
|
// FUNCTION: BETA10 0x100262d9
|
2024-01-20 18:04:46 -05:00
|
|
|
MxLong BumpBouy::Notify(MxParam& p_param)
|
|
|
|
{
|
2024-07-04 17:28:23 -04:00
|
|
|
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;
|
2024-01-20 18:04:46 -05:00
|
|
|
}
|