mirror of
https://github.com/isledecomp/isle.git
synced 2024-11-25 00:58:33 -05:00
Implement/match Isle::HandleType19Notification (#952)
* Implement/match Isle::HandleType19Notification * Fix
This commit is contained in:
parent
715acd657d
commit
7c9fdd255e
5 changed files with 94 additions and 16 deletions
|
@ -6,19 +6,20 @@
|
|||
#include "legoworld.h"
|
||||
#include "radio.h"
|
||||
|
||||
class Pizza;
|
||||
class Pizzeria;
|
||||
class TowTrack;
|
||||
class Act1State;
|
||||
class Ambulance;
|
||||
class JukeBoxEntity;
|
||||
class Helicopter;
|
||||
class Bike;
|
||||
class DuneBuggy;
|
||||
class Motocycle;
|
||||
class SkateBoard;
|
||||
class RaceCar;
|
||||
class Helicopter;
|
||||
class Jetski;
|
||||
class Act1State;
|
||||
class JukeBoxEntity;
|
||||
class Motocycle;
|
||||
class MxType19NotificationParam;
|
||||
class Pizza;
|
||||
class Pizzeria;
|
||||
class RaceCar;
|
||||
class SkateBoard;
|
||||
class TowTrack;
|
||||
|
||||
// VTABLE: LEGO1 0x100d6fb8
|
||||
// SIZE 0x140
|
||||
|
@ -71,7 +72,7 @@ class Isle : public LegoWorld {
|
|||
protected:
|
||||
MxLong HandleEndAction(MxEndActionNotificationParam& p_param);
|
||||
MxLong HandleClick(LegoControlManagerEvent& p_param);
|
||||
MxLong HandleType19Notification(MxParam& p_param);
|
||||
MxLong HandleType19Notification(MxType19NotificationParam& p_param);
|
||||
MxLong HandleTransitionEnd();
|
||||
void HandleElevatorEndAction();
|
||||
void UpdateGlobe();
|
||||
|
|
|
@ -112,6 +112,7 @@ class LegoAnimationManager : public MxCore {
|
|||
void FUN_10063780(LegoROIList* p_list);
|
||||
MxResult FUN_10064670(Vector3* p_position);
|
||||
MxResult FUN_10064740(Vector3* p_position);
|
||||
MxResult FUN_10064880(const char* p_name, MxS32 p_unk0x0c, MxS32 p_unk0x10);
|
||||
|
||||
static void configureLegoAnimationManager(MxS32 p_legoAnimationManagerConfig);
|
||||
|
||||
|
|
|
@ -2411,6 +2411,25 @@ MxResult LegoAnimationManager::FUN_10064740(Vector3* p_position)
|
|||
return FAILURE;
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x10064880
|
||||
// FUNCTION: BETA10 0x10045d02
|
||||
MxResult LegoAnimationManager::FUN_10064880(const char* p_name, MxS32 p_unk0x0c, MxS32 p_unk0x10)
|
||||
{
|
||||
for (MxS32 i = 0; i < (MxS32) sizeOfArray(m_extras); i++) {
|
||||
LegoROI* roi = m_extras[i].m_roi;
|
||||
|
||||
if (roi != NULL) {
|
||||
if (!strcmpi(roi->GetName(), p_name)) {
|
||||
g_characters[m_extras[i].m_characterId].m_unk0x0c = p_unk0x0c;
|
||||
g_characters[m_extras[i].m_characterId].m_unk0x10 = p_unk0x10;
|
||||
return SUCCESS;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return FAILURE;
|
||||
}
|
||||
|
||||
// STUB: LEGO1 0x100648f0
|
||||
// FUNCTION: BETA10 0x10045daf
|
||||
void LegoAnimationManager::FUN_100648f0(LegoTranInfo*, MxLong)
|
||||
|
|
|
@ -29,6 +29,7 @@
|
|||
#include "mxnotificationmanager.h"
|
||||
#include "mxstillpresenter.h"
|
||||
#include "mxtransitionmanager.h"
|
||||
#include "mxtype19notificationparam.h"
|
||||
#include "mxvariabletable.h"
|
||||
#include "pizza.h"
|
||||
#include "pizzeria.h"
|
||||
|
@ -158,7 +159,7 @@ MxLong Isle::Notify(MxParam& p_param)
|
|||
}
|
||||
break;
|
||||
case c_notificationType19:
|
||||
result = HandleType19Notification(p_param);
|
||||
result = HandleType19Notification((MxType19NotificationParam&) p_param);
|
||||
break;
|
||||
case c_notificationType20:
|
||||
Enable(TRUE);
|
||||
|
@ -458,10 +459,64 @@ void Isle::UpdateGlobe()
|
|||
}
|
||||
}
|
||||
|
||||
// STUB: LEGO1 0x100315f0
|
||||
MxLong Isle::HandleType19Notification(MxParam& p_param)
|
||||
// FUNCTION: LEGO1 0x100315f0
|
||||
MxLong Isle::HandleType19Notification(MxType19NotificationParam& p_param)
|
||||
{
|
||||
return 0;
|
||||
MxLong result = 0;
|
||||
|
||||
if (CurrentActor() != NULL) {
|
||||
if (CurrentActor() == m_dunebuggy) {
|
||||
result = m_dunebuggy->Notify(p_param);
|
||||
}
|
||||
else if (CurrentActor() == m_motocycle) {
|
||||
result = m_motocycle->Notify(p_param);
|
||||
}
|
||||
}
|
||||
|
||||
switch (m_act1state->m_unk0x018) {
|
||||
case 3:
|
||||
result = m_pizza->Notify(p_param);
|
||||
break;
|
||||
case 8:
|
||||
result = m_towtrack->Notify(p_param);
|
||||
break;
|
||||
case 10:
|
||||
result = m_ambulance->Notify(p_param);
|
||||
break;
|
||||
}
|
||||
|
||||
if (result == 0) {
|
||||
switch (p_param.GetUnknown0x0c()) {
|
||||
case 0x12c:
|
||||
AnimationManager()->FUN_10064670(NULL);
|
||||
result = 1;
|
||||
break;
|
||||
case 0x12d:
|
||||
AnimationManager()->FUN_10064880("brickstr", 0, 20000);
|
||||
result = 1;
|
||||
break;
|
||||
case 0x131:
|
||||
if (m_act1state->m_unk0x018 != 10) {
|
||||
AnimationManager()->FUN_10064740(FALSE);
|
||||
}
|
||||
result = 1;
|
||||
break;
|
||||
case 0x132:
|
||||
AnimationManager()->FUN_10064880("mama", 0, 20000);
|
||||
AnimationManager()->FUN_10064880("papa", 0, 20000);
|
||||
result = 1;
|
||||
break;
|
||||
case 0x136:
|
||||
LegoEntity* bouy = (LegoEntity*) Find("MxEntity", "bouybump");
|
||||
if (bouy != NULL) {
|
||||
NotificationManager()->Send(bouy, LegoEventNotificationParam(c_notificationType11, NULL, 0, 0, 0, 0));
|
||||
}
|
||||
result = 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x10031820
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
// SIZE 0x10
|
||||
class MxType19NotificationParam : public MxNotificationParam {
|
||||
public:
|
||||
MxType19NotificationParam(NotificationId p_type, MxCore* p_sender, MxU8 p_unk0x0e, MxU16 p_unk0x0c)
|
||||
MxType19NotificationParam(NotificationId p_type, MxCore* p_sender, MxU8 p_unk0x0e, MxS16 p_unk0x0c)
|
||||
: MxNotificationParam()
|
||||
{
|
||||
m_type = p_type;
|
||||
|
@ -23,8 +23,10 @@ class MxType19NotificationParam : public MxNotificationParam {
|
|||
return new MxType19NotificationParam(m_type, m_sender, m_unk0x0e, m_unk0x0c);
|
||||
} // vtable+0x04
|
||||
|
||||
inline MxS16 GetUnknown0x0c() { return m_unk0x0c; }
|
||||
|
||||
protected:
|
||||
MxU16 m_unk0x0c; // 0x0c
|
||||
MxS16 m_unk0x0c; // 0x0c
|
||||
MxU8 m_unk0x0e; // 0x0e
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue