mirror of
https://github.com/isledecomp/isle.git
synced 2025-12-10 16:13:02 +00:00
Implement/match Motocycle, consistent notification names (#1037)
* Implement/match Motocycle, consistent notification names * Format * Fix * Fix return types * Fix return type * Fix annotations * Rename function
This commit is contained in:
committed by
GitHub
parent
68023379d8
commit
e4e0f4e4d3
@@ -139,16 +139,16 @@ MxLong Ambulance::Notify(MxParam& p_param)
|
||||
result = HandleEndAction((MxEndActionNotificationParam&) p_param);
|
||||
break;
|
||||
case c_notificationButtonDown:
|
||||
result = HandleButtonDown((LegoControlManagerEvent&) p_param);
|
||||
result = HandleButtonDown((LegoControlManagerNotificationParam&) p_param);
|
||||
break;
|
||||
case c_notificationClick:
|
||||
result = HandleClick();
|
||||
break;
|
||||
case c_notificationControl:
|
||||
result = HandleControl((LegoControlManagerEvent&) p_param);
|
||||
result = HandleControl((LegoControlManagerNotificationParam&) p_param);
|
||||
break;
|
||||
case c_notificationPathStruct:
|
||||
result = HandlePathStruct((LegoPathStructEvent&) p_param);
|
||||
result = HandlePathStruct((LegoPathStructNotificationParam&) p_param);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -243,7 +243,7 @@ MxLong Ambulance::HandleEndAction(MxEndActionNotificationParam& p_param)
|
||||
|
||||
// FUNCTION: LEGO1 0x100367c0
|
||||
// FUNCTION: BETA10 0x100230bf
|
||||
MxLong Ambulance::HandleButtonDown(LegoControlManagerEvent& p_param)
|
||||
MxLong Ambulance::HandleButtonDown(LegoControlManagerNotificationParam& p_param)
|
||||
{
|
||||
if (m_unk0x170 == 1) {
|
||||
LegoROI* roi = PickROI(p_param.GetX(), p_param.GetY());
|
||||
@@ -266,7 +266,7 @@ MxLong Ambulance::HandleButtonDown(LegoControlManagerEvent& p_param)
|
||||
|
||||
// FUNCTION: LEGO1 0x10036860
|
||||
// FUNCTION: BETA10 0x100231bf
|
||||
MxLong Ambulance::HandlePathStruct(LegoPathStructEvent& p_param)
|
||||
MxLong Ambulance::HandlePathStruct(LegoPathStructNotificationParam& p_param)
|
||||
{
|
||||
// 0x168 corresponds to the path at the gas station
|
||||
if (p_param.GetData() == 0x168) {
|
||||
@@ -437,7 +437,7 @@ void Ambulance::Leave()
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x10036f90
|
||||
MxLong Ambulance::HandleControl(LegoControlManagerEvent& p_param)
|
||||
MxLong Ambulance::HandleControl(LegoControlManagerNotificationParam& p_param)
|
||||
{
|
||||
MxLong result = 0;
|
||||
|
||||
|
||||
@@ -77,7 +77,7 @@ MxLong Bike::HandleClick()
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x10076aa0
|
||||
MxLong Bike::HandleControl(LegoControlManagerEvent& p_param)
|
||||
MxLong Bike::HandleControl(LegoControlManagerNotificationParam& p_param)
|
||||
{
|
||||
MxLong result = 0;
|
||||
|
||||
|
||||
@@ -38,14 +38,14 @@ MxLong DuneBuggy::HandleClick()
|
||||
}
|
||||
|
||||
// STUB: LEGO1 0x100681b0
|
||||
MxLong DuneBuggy::HandleControl(LegoControlManagerEvent& p_param)
|
||||
MxLong DuneBuggy::HandleControl(LegoControlManagerNotificationParam& p_param)
|
||||
{
|
||||
// TODO
|
||||
return 0;
|
||||
}
|
||||
|
||||
// STUB: LEGO1 0x10068270
|
||||
MxLong DuneBuggy::HandlePathStruct(LegoPathStructEvent& p_param)
|
||||
MxLong DuneBuggy::HandlePathStruct(LegoPathStructNotificationParam& p_param)
|
||||
{
|
||||
// TODO
|
||||
return 0;
|
||||
|
||||
@@ -152,7 +152,7 @@ MxLong Helicopter::HandleClick()
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100035e0
|
||||
MxLong Helicopter::HandleControl(LegoControlManagerEvent& p_param)
|
||||
MxLong Helicopter::HandleControl(LegoControlManagerNotificationParam& p_param)
|
||||
{
|
||||
MxU32 ret = 0;
|
||||
MxAtomId script;
|
||||
|
||||
@@ -37,19 +37,19 @@ MxLong IsleActor::Notify(MxParam& p_param)
|
||||
result = HandleEndAction((MxEndActionNotificationParam&) p_param);
|
||||
break;
|
||||
case c_notificationButtonUp:
|
||||
result = HandleButtonUp((MxNotificationParam&) p_param);
|
||||
result = HandleButtonUp((LegoControlManagerNotificationParam&) p_param);
|
||||
break;
|
||||
case c_notificationButtonDown:
|
||||
result = HandleButtonDown((MxNotificationParam&) p_param);
|
||||
result = HandleButtonDown((LegoControlManagerNotificationParam&) p_param);
|
||||
break;
|
||||
case c_notificationClick:
|
||||
result = HandleClick();
|
||||
break;
|
||||
case c_notificationEndAnim:
|
||||
result = VTable0x70();
|
||||
result = HandleEndAnim();
|
||||
break;
|
||||
case c_notificationPathStruct:
|
||||
result = VTable0x80(p_param);
|
||||
result = HandlePathStruct((LegoPathStructNotificationParam&) p_param);
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
@@ -58,13 +58,13 @@ MxLong IslePathActor::Notify(MxParam& p_param)
|
||||
result = HandleClick();
|
||||
break;
|
||||
case c_notificationControl:
|
||||
result = HandleControl((LegoControlManagerEvent&) p_param);
|
||||
result = HandleControl((LegoControlManagerNotificationParam&) p_param);
|
||||
break;
|
||||
case c_notificationEndAnim:
|
||||
result = HandleEndAnim((LegoEndAnimNotificationParam&) p_param);
|
||||
break;
|
||||
case c_notificationPathStruct:
|
||||
result = HandlePathStruct((LegoPathStructEvent&) p_param);
|
||||
result = HandlePathStruct((LegoPathStructNotificationParam&) p_param);
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@ MxLong Jetski::HandleClick()
|
||||
}
|
||||
|
||||
// STUB: LEGO1 0x1007e8e0
|
||||
MxLong Jetski::HandleControl(LegoControlManagerEvent& p_param)
|
||||
MxLong Jetski::HandleControl(LegoControlManagerNotificationParam& p_param)
|
||||
{
|
||||
// TODO
|
||||
return 0;
|
||||
|
||||
@@ -1,58 +1,163 @@
|
||||
#include "motocycle.h"
|
||||
#include "motorcycle.h"
|
||||
|
||||
#include "isle.h"
|
||||
#include "isle_actions.h"
|
||||
#include "jukebox_actions.h"
|
||||
#include "legoanimationmanager.h"
|
||||
#include "legocontrolmanager.h"
|
||||
#include "legonavcontroller.h"
|
||||
#include "legopathstruct.h"
|
||||
#include "legoutils.h"
|
||||
#include "legovariables.h"
|
||||
#include "legoworld.h"
|
||||
#include "misc.h"
|
||||
#include "mxmisc.h"
|
||||
#include "mxtimer.h"
|
||||
#include "mxtransitionmanager.h"
|
||||
#include "mxvariabletable.h"
|
||||
|
||||
DECOMP_SIZE_ASSERT(Motocycle, 0x16c)
|
||||
|
||||
// FUNCTION: LEGO1 0x100357b0
|
||||
Motocycle::Motocycle()
|
||||
{
|
||||
this->m_maxLinearVel = 40.0;
|
||||
this->m_unk0x150 = 1.75;
|
||||
this->m_unk0x148 = 1;
|
||||
this->m_unk0x164 = 1.0;
|
||||
m_maxLinearVel = 40.0;
|
||||
m_unk0x150 = 1.75;
|
||||
m_unk0x148 = 1;
|
||||
m_fuel = 1.0;
|
||||
}
|
||||
|
||||
// STUB: LEGO1 0x10035a40
|
||||
// FUNCTION: LEGO1 0x10035a40
|
||||
MxResult Motocycle::Create(MxDSAction& p_dsAction)
|
||||
{
|
||||
// TODO
|
||||
return SUCCESS;
|
||||
MxResult result = IslePathActor::Create(p_dsAction);
|
||||
m_world = CurrentWorld();
|
||||
|
||||
if (m_world) {
|
||||
m_world->Add(this);
|
||||
}
|
||||
|
||||
VariableTable()->SetVariable(g_varMOTOFUEL, "1.0");
|
||||
m_fuel = 1.0;
|
||||
m_time = Timer()->GetTime();
|
||||
return result;
|
||||
}
|
||||
|
||||
// STUB: LEGO1 0x10035ad0
|
||||
void Motocycle::VTable0x70(float p_float)
|
||||
// FUNCTION: LEGO1 0x10035ad0
|
||||
void Motocycle::VTable0x70(float p_time)
|
||||
{
|
||||
// TODO
|
||||
IslePathActor::VTable0x70(p_time);
|
||||
|
||||
if (UserActor() == this) {
|
||||
char buf[200];
|
||||
float speed = abs(m_worldSpeed);
|
||||
float maxLinearVel = NavController()->GetMaxLinearVel();
|
||||
|
||||
sprintf(buf, "%g", speed / maxLinearVel);
|
||||
VariableTable()->SetVariable(g_varMOTOSPEED, buf);
|
||||
|
||||
m_fuel += (p_time - m_time) * -3.333333333e-06f;
|
||||
if (m_fuel < 0) {
|
||||
m_fuel = 0;
|
||||
}
|
||||
|
||||
m_time = p_time;
|
||||
|
||||
sprintf(buf, "%g", m_fuel);
|
||||
VariableTable()->SetVariable(g_varMOTOFUEL, buf);
|
||||
}
|
||||
}
|
||||
|
||||
// STUB: LEGO1 0x10035bc0
|
||||
// FUNCTION: LEGO1 0x10035bc0
|
||||
void Motocycle::Exit()
|
||||
{
|
||||
// TODO
|
||||
IslePathActor::Exit();
|
||||
GameState()->m_currentArea = LegoGameState::e_motocycle;
|
||||
RemoveFromCurrentWorld(*g_isleScript, IsleScript::c_MotoBikeDashboard_Bitmap);
|
||||
RemoveFromCurrentWorld(*g_isleScript, IsleScript::c_MotoBikeArms_Ctl);
|
||||
RemoveFromCurrentWorld(*g_isleScript, IsleScript::c_MotoBikeInfo_Ctl);
|
||||
RemoveFromCurrentWorld(*g_isleScript, IsleScript::c_MotoBikeSpeedMeter);
|
||||
RemoveFromCurrentWorld(*g_isleScript, IsleScript::c_MotoBikeFuelMeter);
|
||||
ControlManager()->Unregister(this);
|
||||
}
|
||||
|
||||
// STUB: LEGO1 0x10035c50
|
||||
// FUNCTION: LEGO1 0x10035c50
|
||||
MxLong Motocycle::HandleClick()
|
||||
{
|
||||
// TODO
|
||||
if (!FUN_1003ef60()) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
FUN_10015820(TRUE, 0);
|
||||
|
||||
((Isle*) CurrentWorld())->SetDestLocation(LegoGameState::Area::e_motocycle);
|
||||
TransitionManager()->StartTransition(MxTransitionManager::TransitionType::e_mosaic, 50, FALSE, TRUE);
|
||||
|
||||
if (GameState()->GetActorId() != UserActor()->GetActorId()) {
|
||||
((IslePathActor*) UserActor())->Exit();
|
||||
}
|
||||
|
||||
m_time = Timer()->GetTime();
|
||||
|
||||
Enter();
|
||||
InvokeAction(Extra::ActionType::e_start, *g_isleScript, IsleScript::c_MotoBikeDashboard, NULL);
|
||||
GetCurrentAction().SetObjectId(-1);
|
||||
|
||||
Vector3 position = m_roi->GetWorldPosition();
|
||||
AnimationManager()->FUN_10064670(&position);
|
||||
AnimationManager()->FUN_10064740(&position);
|
||||
ControlManager()->Register(this);
|
||||
return 1;
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x10035d70
|
||||
MxLong Motocycle::HandleControl(LegoControlManagerNotificationParam& p_param)
|
||||
{
|
||||
MxLong result = 0;
|
||||
|
||||
if (p_param.GetUnknown0x28() == 1) {
|
||||
switch (p_param.GetClickedObjectId()) {
|
||||
case IsleScript::c_MotoBikeArms_Ctl:
|
||||
Exit();
|
||||
GameState()->m_currentArea = LegoGameState::e_unk66;
|
||||
result = 1;
|
||||
break;
|
||||
case IsleScript::c_MotoBikeInfo_Ctl:
|
||||
((Isle*) CurrentWorld())->SetDestLocation(LegoGameState::e_infomain);
|
||||
TransitionManager()->StartTransition(MxTransitionManager::e_mosaic, 50, FALSE, FALSE);
|
||||
Exit();
|
||||
result = 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x10035df0
|
||||
MxLong Motocycle::HandlePathStruct(LegoPathStructNotificationParam& p_param)
|
||||
{
|
||||
// 0x168 corresponds to the path at the gas station
|
||||
if (p_param.GetData() == 0x168) {
|
||||
m_fuel = 1.0f;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
// STUB: LEGO1 0x10035d70
|
||||
MxLong Motocycle::HandleControl(LegoControlManagerEvent& p_param)
|
||||
// FUNCTION: LEGO1 0x10035e10
|
||||
void Motocycle::ActivateSceneActions()
|
||||
{
|
||||
// TODO
|
||||
return 0;
|
||||
}
|
||||
PlayMusic(JukeboxScript::c_PoliceStation_Music);
|
||||
|
||||
// STUB: LEGO1 0x10035df0
|
||||
MxLong Motocycle::HandlePathStruct(LegoPathStructEvent& p_param)
|
||||
{
|
||||
// TODO
|
||||
return 0;
|
||||
}
|
||||
Act1State* act1state = (Act1State*) GameState()->GetState("Act1State");
|
||||
if (!act1state->m_unk0x022) {
|
||||
act1state->m_unk0x022 = TRUE;
|
||||
|
||||
// STUB: LEGO1 0x10035e10
|
||||
void Motocycle::FUN_10035e10()
|
||||
{
|
||||
// TODO
|
||||
MxMatrix mat(UserActor()->GetROI()->GetLocal2World());
|
||||
mat.TranslateBy(mat[2][0] * 2.5, mat[2][1] + 0.7, mat[2][2] * 2.5);
|
||||
|
||||
AnimationManager()
|
||||
->FUN_10060dc0(IsleScript::c_sns006in_RunAnim, &mat, TRUE, FALSE, NULL, FALSE, TRUE, TRUE, TRUE);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -72,14 +72,14 @@ void Pizza::FUN_10038380()
|
||||
}
|
||||
|
||||
// STUB: LEGO1 0x100383f0
|
||||
undefined4 Pizza::HandleClick()
|
||||
MxLong Pizza::HandleClick()
|
||||
{
|
||||
// TODO
|
||||
return 0;
|
||||
}
|
||||
|
||||
// STUB: LEGO1 0x100384f0
|
||||
undefined4 Pizza::VTable0x80(MxParam&)
|
||||
MxLong Pizza::HandlePathStruct(LegoPathStructNotificationParam&)
|
||||
{
|
||||
// TODO
|
||||
return 0;
|
||||
@@ -93,7 +93,7 @@ MxResult Pizza::Tickle()
|
||||
}
|
||||
|
||||
// STUB: LEGO1 0x10038b10
|
||||
undefined4 Pizza::HandleEndAction(MxEndActionNotificationParam&)
|
||||
MxLong Pizza::HandleEndAction(MxEndActionNotificationParam&)
|
||||
{
|
||||
// TODO
|
||||
return 0;
|
||||
|
||||
@@ -46,7 +46,7 @@ void Pizzeria::CreateState()
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x10017a50
|
||||
undefined4 Pizzeria::HandleClick()
|
||||
MxLong Pizzeria::HandleClick()
|
||||
{
|
||||
if (FUN_1003ef60() && m_pizzaMissionState->m_unk0x0c == 0) {
|
||||
if (UserActor()->GetActorId() != GameState()->GetActorId()) {
|
||||
|
||||
@@ -91,7 +91,7 @@ MxLong Radio::Notify(MxParam& p_param)
|
||||
result = HandleEndAction((MxEndActionNotificationParam&) p_param);
|
||||
break;
|
||||
case c_notificationControl:
|
||||
result = HandleControl((LegoControlManagerEvent&) p_param);
|
||||
result = HandleControl((LegoControlManagerNotificationParam&) p_param);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -139,7 +139,7 @@ void Radio::Stop()
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1002cbc0
|
||||
MxLong Radio::HandleControl(LegoControlManagerEvent& p_param)
|
||||
MxLong Radio::HandleControl(LegoControlManagerNotificationParam& p_param)
|
||||
{
|
||||
MxDSAction action; // Unused
|
||||
MxS32 objectId = p_param.GetClickedObjectId();
|
||||
|
||||
@@ -106,7 +106,7 @@ MxLong SkateBoard::HandleClick()
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x10010230
|
||||
MxLong SkateBoard::HandleControl(LegoControlManagerEvent& p_param)
|
||||
MxLong SkateBoard::HandleControl(LegoControlManagerNotificationParam& p_param)
|
||||
{
|
||||
MxU32 result = 0;
|
||||
|
||||
|
||||
@@ -89,7 +89,7 @@ MxLong TowTrack::HandleEndAnim(LegoEndAnimNotificationParam& p_param)
|
||||
}
|
||||
|
||||
// STUB: LEGO1 0x1004d330
|
||||
MxLong TowTrack::HandlePathStruct(LegoPathStructEvent& p_param)
|
||||
MxLong TowTrack::HandlePathStruct(LegoPathStructNotificationParam& p_param)
|
||||
{
|
||||
// TODO
|
||||
return 0;
|
||||
@@ -109,7 +109,7 @@ void TowTrack::Exit()
|
||||
}
|
||||
|
||||
// STUB: LEGO1 0x1004d9e0
|
||||
MxLong TowTrack::HandleControl(LegoControlManagerEvent& p_param)
|
||||
MxLong TowTrack::HandleControl(LegoControlManagerNotificationParam& p_param)
|
||||
{
|
||||
// TODO
|
||||
return 0;
|
||||
|
||||
@@ -62,7 +62,7 @@
|
||||
#include "legoworld.h"
|
||||
#include "legoworldpresenter.h"
|
||||
#include "misc.h"
|
||||
#include "motocycle.h"
|
||||
#include "motorcycle.h"
|
||||
#include "mxcompositemediapresenter.h"
|
||||
#include "mxcontrolpresenter.h"
|
||||
#include "pizza.h"
|
||||
|
||||
@@ -367,7 +367,7 @@ void PlayCamAnim(LegoPathActor* p_actor, MxBool p_unused, MxU32 p_location, MxBo
|
||||
MxLong result = 0;
|
||||
|
||||
if (world != NULL) {
|
||||
LegoPathStructEvent param(c_notificationPathStruct, p_actor, LegoPathStruct::c_camAnim, p_location);
|
||||
LegoPathStructNotificationParam param(c_notificationPathStruct, p_actor, LegoPathStruct::c_camAnim, p_location);
|
||||
result = world->Notify(param);
|
||||
}
|
||||
|
||||
|
||||
@@ -16,6 +16,14 @@ DECOMP_SIZE_ASSERT(CursorVariable, 0x24)
|
||||
DECOMP_SIZE_ASSERT(WhoAmIVariable, 0x24)
|
||||
DECOMP_SIZE_ASSERT(CustomizeAnimFileVariable, 0x24)
|
||||
|
||||
// GLOBAL: LEGO1 0x100f3994
|
||||
// STRING: LEGO1 0x100f3988
|
||||
const char* g_varMOTOSPEED = "motoSPEED";
|
||||
|
||||
// GLOBAL: LEGO1 0x100f3998
|
||||
// STRING: LEGO1 0x100f397c
|
||||
const char* g_varMOTOFUEL = "motoFUEL";
|
||||
|
||||
// GLOBAL: LEGO1 0x100f39b8
|
||||
// STRING: LEGO1 0x100f39ac
|
||||
const char* g_varAMBULSPEED = "ambulSPEED";
|
||||
|
||||
@@ -175,27 +175,27 @@ MxBool MxControlPresenter::FUN_10044270(MxS32 p_x, MxS32 p_y, MxVideoPresenter*
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x10044480
|
||||
MxBool MxControlPresenter::FUN_10044480(LegoControlManagerEvent* p_event, MxPresenter* p_presenter)
|
||||
MxBool MxControlPresenter::FUN_10044480(LegoControlManagerNotificationParam* p_param, MxPresenter* p_presenter)
|
||||
{
|
||||
if (IsEnabled()) {
|
||||
switch (p_event->GetNotification()) {
|
||||
switch (p_param->GetNotification()) {
|
||||
case c_notificationButtonUp:
|
||||
if (m_unk0x4c == 0 || m_unk0x4c == 2 || m_unk0x4c == 3) {
|
||||
p_event->SetClickedObjectId(m_action->GetObjectId());
|
||||
p_event->SetClickedAtom(m_action->GetAtomId().GetInternal());
|
||||
p_param->SetClickedObjectId(m_action->GetObjectId());
|
||||
p_param->SetClickedAtom(m_action->GetAtomId().GetInternal());
|
||||
VTable0x6c(0);
|
||||
p_event->SetNotification(c_notificationControl);
|
||||
p_event->SetUnknown0x28(m_unk0x4e);
|
||||
p_param->SetNotification(c_notificationControl);
|
||||
p_param->SetUnknown0x28(m_unk0x4e);
|
||||
return TRUE;
|
||||
}
|
||||
break;
|
||||
case c_notificationButtonDown:
|
||||
if (FUN_10044270(p_event->GetX(), p_event->GetY(), (MxVideoPresenter*) p_presenter)) {
|
||||
p_event->SetClickedObjectId(m_action->GetObjectId());
|
||||
p_event->SetClickedAtom(m_action->GetAtomId().GetInternal());
|
||||
if (FUN_10044270(p_param->GetX(), p_param->GetY(), (MxVideoPresenter*) p_presenter)) {
|
||||
p_param->SetClickedObjectId(m_action->GetObjectId());
|
||||
p_param->SetClickedAtom(m_action->GetAtomId().GetInternal());
|
||||
VTable0x6c(m_unk0x56);
|
||||
p_event->SetNotification(c_notificationControl);
|
||||
p_event->SetUnknown0x28(m_unk0x4e);
|
||||
p_param->SetNotification(c_notificationControl);
|
||||
p_param->SetUnknown0x28(m_unk0x4e);
|
||||
return TRUE;
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
#include "mxticklemanager.h"
|
||||
|
||||
DECOMP_SIZE_ASSERT(LegoControlManager, 0x60)
|
||||
DECOMP_SIZE_ASSERT(LegoControlManagerEvent, 0x2c)
|
||||
DECOMP_SIZE_ASSERT(LegoControlManagerNotificationParam, 0x2c)
|
||||
|
||||
// FUNCTION: LEGO1 0x10028520
|
||||
LegoControlManager::LegoControlManager()
|
||||
|
||||
@@ -51,7 +51,7 @@ MxBool LegoPathStruct::HandleTrigger(LegoPathActor* p_actor, MxBool p_direction,
|
||||
case c_d: {
|
||||
p_actor->VTable0x58(p_data);
|
||||
|
||||
LegoPathStructEvent param(c_notificationPathStruct, p_actor, m_name[2], p_data);
|
||||
LegoPathStructNotificationParam param(c_notificationPathStruct, p_actor, m_name[2], p_data);
|
||||
p_actor->Notify(param);
|
||||
|
||||
LegoWorld* world = CurrentWorld();
|
||||
@@ -80,7 +80,7 @@ MxBool LegoPathStruct::HandleTrigger(LegoPathActor* p_actor, MxBool p_direction,
|
||||
case c_s: {
|
||||
LegoWorld* world = CurrentWorld();
|
||||
if (world != NULL) {
|
||||
LegoPathStructEvent param(c_notificationPathStruct, p_actor, m_name[2], p_data);
|
||||
LegoPathStructNotificationParam param(c_notificationPathStruct, p_actor, m_name[2], p_data);
|
||||
|
||||
if (world->Notify(param) != 0) {
|
||||
break;
|
||||
@@ -93,7 +93,7 @@ MxBool LegoPathStruct::HandleTrigger(LegoPathActor* p_actor, MxBool p_direction,
|
||||
case c_w: {
|
||||
LegoWorld* world = CurrentWorld();
|
||||
if (world != NULL) {
|
||||
LegoPathStructEvent param(c_notificationPathStruct, p_actor, m_name[2], p_data);
|
||||
LegoPathStructNotificationParam param(c_notificationPathStruct, p_actor, m_name[2], p_data);
|
||||
NotificationManager()->Send(world, param);
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -32,7 +32,7 @@ MxLong CarRace::HandleEndAction(MxEndActionNotificationParam&)
|
||||
}
|
||||
|
||||
// STUB: LEGO1 0x100170e0
|
||||
MxLong CarRace::HandlePathStruct(LegoPathStructEvent&)
|
||||
MxLong CarRace::HandlePathStruct(LegoPathStructNotificationParam&)
|
||||
{
|
||||
// TODO
|
||||
return 0;
|
||||
|
||||
@@ -26,7 +26,7 @@ MxLong JetskiRace::HandleClick(LegoEventNotificationParam&)
|
||||
}
|
||||
|
||||
// STUB: LEGO1 0x100166a0
|
||||
MxLong JetskiRace::HandlePathStruct(LegoPathStructEvent&)
|
||||
MxLong JetskiRace::HandlePathStruct(LegoPathStructNotificationParam&)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -36,7 +36,7 @@ LegoRace::LegoRace()
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x10015b70
|
||||
MxLong LegoRace::HandlePathStruct(LegoPathStructEvent&)
|
||||
MxLong LegoRace::HandlePathStruct(LegoPathStructNotificationParam&)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
@@ -102,7 +102,7 @@ MxLong LegoRace::Notify(MxParam& p_param)
|
||||
result = HandleClick((LegoEventNotificationParam&) p_param);
|
||||
break;
|
||||
case c_notificationPathStruct:
|
||||
result = HandlePathStruct((LegoPathStructEvent&) p_param);
|
||||
result = HandlePathStruct((LegoPathStructNotificationParam&) p_param);
|
||||
break;
|
||||
case c_notificationTransitioned:
|
||||
GameState()->SwitchArea(m_destLocation);
|
||||
|
||||
@@ -60,7 +60,7 @@ MxLong ElevatorBottom::Notify(MxParam& p_param)
|
||||
if (m_worldStarted) {
|
||||
switch (((MxNotificationParam&) p_param).GetNotification()) {
|
||||
case c_notificationControl:
|
||||
ret = HandleControl((LegoControlManagerEvent&) p_param);
|
||||
ret = HandleControl((LegoControlManagerNotificationParam&) p_param);
|
||||
break;
|
||||
case c_notificationTransitioned:
|
||||
GameState()->SwitchArea(m_destLocation);
|
||||
@@ -80,7 +80,7 @@ void ElevatorBottom::ReadyWorld()
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100181d0
|
||||
MxLong ElevatorBottom::HandleControl(LegoControlManagerEvent& p_param)
|
||||
MxLong ElevatorBottom::HandleControl(LegoControlManagerNotificationParam& p_param)
|
||||
{
|
||||
MxLong result = 0;
|
||||
|
||||
|
||||
@@ -111,10 +111,10 @@ MxLong GasStation::Notify(MxParam& p_param)
|
||||
result = HandleKeyPress((((LegoEventNotificationParam&) p_param)).GetKey());
|
||||
break;
|
||||
case c_notificationButtonDown:
|
||||
result = HandleButtonDown(((LegoControlManagerEvent&) p_param));
|
||||
result = HandleButtonDown(((LegoControlManagerNotificationParam&) p_param));
|
||||
break;
|
||||
case c_notificationControl:
|
||||
result = HandleControl((LegoControlManagerEvent&) p_param);
|
||||
result = HandleControl((LegoControlManagerNotificationParam&) p_param);
|
||||
break;
|
||||
case c_notificationTransitioned:
|
||||
GameState()->SwitchArea(m_destLocation);
|
||||
@@ -306,14 +306,14 @@ MxLong GasStation::HandleKeyPress(MxS8 p_key)
|
||||
}
|
||||
|
||||
// STUB: LEGO1 0x10005960
|
||||
MxLong GasStation::HandleButtonDown(LegoControlManagerEvent& p_param)
|
||||
MxLong GasStation::HandleButtonDown(LegoControlManagerNotificationParam& p_param)
|
||||
{
|
||||
// TODO
|
||||
return 0;
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x10005b20
|
||||
MxLong GasStation::HandleControl(LegoControlManagerEvent& p_param)
|
||||
MxLong GasStation::HandleControl(LegoControlManagerNotificationParam& p_param)
|
||||
{
|
||||
if (p_param.GetUnknown0x28() == 1) {
|
||||
MxDSAction action;
|
||||
|
||||
@@ -120,10 +120,10 @@ MxLong Hospital::Notify(MxParam& p_param)
|
||||
result = HandleKeyPress((((LegoEventNotificationParam&) p_param)).GetKey());
|
||||
break;
|
||||
case c_notificationButtonDown:
|
||||
result = HandleButtonDown(((LegoControlManagerEvent&) p_param));
|
||||
result = HandleButtonDown(((LegoControlManagerNotificationParam&) p_param));
|
||||
break;
|
||||
case c_notificationControl:
|
||||
result = HandleControl((LegoControlManagerEvent&) p_param);
|
||||
result = HandleControl((LegoControlManagerNotificationParam&) p_param);
|
||||
break;
|
||||
case c_notificationTransitioned:
|
||||
if (m_destLocation != LegoGameState::e_undefined) {
|
||||
@@ -396,7 +396,7 @@ MxLong Hospital::HandleEndAction(MxEndActionNotificationParam& p_param)
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x10075710
|
||||
MxLong Hospital::HandleButtonDown(LegoControlManagerEvent& p_param)
|
||||
MxLong Hospital::HandleButtonDown(LegoControlManagerNotificationParam& p_param)
|
||||
{
|
||||
if (m_unk0x100 == 1) {
|
||||
LegoROI* roi = PickROI(p_param.GetX(), p_param.GetY());
|
||||
@@ -552,7 +552,7 @@ MxLong Hospital::HandleButtonDown(LegoControlManagerEvent& p_param)
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x10075f90
|
||||
MxBool Hospital::HandleControl(LegoControlManagerEvent& p_param)
|
||||
MxBool Hospital::HandleControl(LegoControlManagerNotificationParam& p_param)
|
||||
{
|
||||
if (p_param.GetUnknown0x28() == 1) {
|
||||
switch (p_param.GetClickedObjectId()) {
|
||||
|
||||
@@ -254,7 +254,7 @@ MxLong Infocenter::Notify(MxParam& p_param)
|
||||
);
|
||||
break;
|
||||
case c_notificationControl:
|
||||
result = HandleControl((LegoControlManagerEvent&) p_param);
|
||||
result = HandleControl((LegoControlManagerNotificationParam&) p_param);
|
||||
break;
|
||||
case c_notificationTransitioned:
|
||||
StopBookAnimation();
|
||||
@@ -952,7 +952,7 @@ MxU8 Infocenter::HandleButtonUp(MxS32 p_x, MxS32 p_y)
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x10070370
|
||||
MxU8 Infocenter::HandleControl(LegoControlManagerEvent& p_param)
|
||||
MxU8 Infocenter::HandleControl(LegoControlManagerNotificationParam& p_param)
|
||||
{
|
||||
if (p_param.GetUnknown0x28() == 1) {
|
||||
m_infoManDialogueTimer = 0;
|
||||
|
||||
@@ -69,7 +69,7 @@ MxLong InfocenterDoor::Notify(MxParam& p_param)
|
||||
}
|
||||
break;
|
||||
case c_notificationControl:
|
||||
result = HandleControl((LegoControlManagerEvent&) p_param);
|
||||
result = HandleControl((LegoControlManagerNotificationParam&) p_param);
|
||||
break;
|
||||
case c_notificationTransitioned:
|
||||
GameState()->SwitchArea(m_destLocation);
|
||||
@@ -90,7 +90,7 @@ void InfocenterDoor::ReadyWorld()
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x10037a90
|
||||
MxLong InfocenterDoor::HandleControl(LegoControlManagerEvent& p_param)
|
||||
MxLong InfocenterDoor::HandleControl(LegoControlManagerNotificationParam& p_param)
|
||||
{
|
||||
MxLong result = 0;
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
#include "legovariables.h"
|
||||
#include "legovideomanager.h"
|
||||
#include "misc.h"
|
||||
#include "motocycle.h"
|
||||
#include "motorcycle.h"
|
||||
#include "mxactionnotificationparam.h"
|
||||
#include "mxbackgroundaudiomanager.h"
|
||||
#include "mxmisc.h"
|
||||
@@ -152,7 +152,7 @@ MxLong Isle::Notify(MxParam& p_param)
|
||||
}
|
||||
break;
|
||||
case c_notificationControl:
|
||||
result = HandleControl((LegoControlManagerEvent&) p_param);
|
||||
result = HandleControl((LegoControlManagerNotificationParam&) p_param);
|
||||
break;
|
||||
case c_notificationEndAnim:
|
||||
switch (m_act1state->m_unk0x018) {
|
||||
@@ -168,7 +168,7 @@ MxLong Isle::Notify(MxParam& p_param)
|
||||
}
|
||||
break;
|
||||
case c_notificationPathStruct:
|
||||
result = HandlePathStruct((LegoPathStructEvent&) p_param);
|
||||
result = HandlePathStruct((LegoPathStructNotificationParam&) p_param);
|
||||
break;
|
||||
case c_notificationType20:
|
||||
Enable(TRUE);
|
||||
@@ -287,7 +287,7 @@ void Isle::ReadyWorld()
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x10031030
|
||||
MxLong Isle::HandleControl(LegoControlManagerEvent& p_param)
|
||||
MxLong Isle::HandleControl(LegoControlManagerNotificationParam& p_param)
|
||||
{
|
||||
if (p_param.GetUnknown0x28() == 1) {
|
||||
MxDSAction action;
|
||||
@@ -469,7 +469,7 @@ void Isle::UpdateGlobe()
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100315f0
|
||||
MxLong Isle::HandlePathStruct(LegoPathStructEvent& p_param)
|
||||
MxLong Isle::HandlePathStruct(LegoPathStructNotificationParam& p_param)
|
||||
{
|
||||
MxLong result = 0;
|
||||
|
||||
@@ -1006,7 +1006,7 @@ MxLong Isle::HandleTransitionEnd()
|
||||
FUN_10032d30(IsleScript::c_MotoBikeDashboard_Bitmap, JukeboxScript::c_MusicTheme1, NULL, TRUE);
|
||||
|
||||
if (!m_act1state->m_unk0x01f) {
|
||||
m_motocycle->FUN_10035e10();
|
||||
m_motocycle->ActivateSceneActions();
|
||||
}
|
||||
break;
|
||||
case LegoGameState::e_copter:
|
||||
|
||||
@@ -76,7 +76,7 @@ MxLong JukeBox::Notify(MxParam& p_param)
|
||||
if (m_worldStarted) {
|
||||
switch (((MxNotificationParam&) p_param).GetNotification()) {
|
||||
case c_notificationControl:
|
||||
result = HandleControl((LegoControlManagerEvent&) p_param);
|
||||
result = HandleControl((LegoControlManagerNotificationParam&) p_param);
|
||||
break;
|
||||
case c_notificationTransitioned:
|
||||
GameState()->SwitchArea(m_destLocation);
|
||||
@@ -123,7 +123,7 @@ void JukeBox::ReadyWorld()
|
||||
|
||||
// FUNCTION: LEGO1 0x1005da70
|
||||
// FUNCTION: BETA10 0x10037f6d
|
||||
MxBool JukeBox::HandleControl(LegoControlManagerEvent& p_param)
|
||||
MxBool JukeBox::HandleControl(LegoControlManagerNotificationParam& p_param)
|
||||
{
|
||||
MxStillPresenter* presenter;
|
||||
|
||||
|
||||
@@ -83,7 +83,7 @@ MxLong Police::Notify(MxParam& p_param)
|
||||
result = HandleKeyPress(((LegoEventNotificationParam&) p_param));
|
||||
break;
|
||||
case c_notificationControl:
|
||||
result = HandleControl((LegoControlManagerEvent&) p_param);
|
||||
result = HandleControl((LegoControlManagerNotificationParam&) p_param);
|
||||
break;
|
||||
case c_notificationTransitioned:
|
||||
GameState()->SwitchArea(m_destLocation);
|
||||
@@ -103,7 +103,7 @@ void Police::ReadyWorld()
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1005e550
|
||||
MxLong Police::HandleControl(LegoControlManagerEvent& p_param)
|
||||
MxLong Police::HandleControl(LegoControlManagerNotificationParam& p_param)
|
||||
{
|
||||
if (p_param.GetUnknown0x28() == 1) {
|
||||
switch (p_param.GetClickedObjectId()) {
|
||||
|
||||
@@ -115,7 +115,7 @@ MxLong RegistrationBook::Notify(MxParam& p_param)
|
||||
m_registerDialogueTimer = Timer()->GetTime();
|
||||
break;
|
||||
case c_notificationControl:
|
||||
result = HandleControl((LegoControlManagerEvent&) p_param);
|
||||
result = HandleControl((LegoControlManagerNotificationParam&) p_param);
|
||||
break;
|
||||
case c_notificationPathStruct:
|
||||
result = HandleNotification19(p_param);
|
||||
@@ -210,7 +210,7 @@ MxLong RegistrationBook::HandleKeyPress(MxU8 p_key)
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100774a0
|
||||
MxLong RegistrationBook::HandleControl(LegoControlManagerEvent& p_param)
|
||||
MxLong RegistrationBook::HandleControl(LegoControlManagerNotificationParam& p_param)
|
||||
{
|
||||
MxS16 unk0x28 = p_param.GetUnknown0x28();
|
||||
|
||||
|
||||
@@ -105,7 +105,7 @@ MxLong Score::Notify(MxParam& p_param)
|
||||
ret = 1;
|
||||
break;
|
||||
case c_notificationControl:
|
||||
ret = FUN_100016d0((LegoControlManagerEvent&) p_param);
|
||||
ret = FUN_100016d0((LegoControlManagerNotificationParam&) p_param);
|
||||
break;
|
||||
case c_notificationTransitioned:
|
||||
DeleteObjects(g_infoscorScript, InfoscorScript::c_LegoBox1_Flc, InfoscorScript::c_LegoBox3_Flc);
|
||||
@@ -166,7 +166,7 @@ void Score::ReadyWorld()
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100016d0
|
||||
MxLong Score::FUN_100016d0(LegoControlManagerEvent& p_param)
|
||||
MxLong Score::FUN_100016d0(LegoControlManagerNotificationParam& p_param)
|
||||
{
|
||||
MxS16 unk0x28 = p_param.GetUnknown0x28();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user