mirror of
https://github.com/isledecomp/isle-portable.git
synced 2025-04-26 22:33:27 -04:00
Merge from isledecomp/isle
This commit is contained in:
commit
44d131ad18
34 changed files with 288 additions and 231 deletions
LEGO1
lego
legoomni
include
src
actors
audio
control
entity
main
race
worlds
sources/roi
mxgeometry
omni
realtime
|
@ -5,6 +5,7 @@
|
|||
#include "legogamestate.h"
|
||||
#include "legostate.h"
|
||||
#include "legoworld.h"
|
||||
#include "misc.h"
|
||||
#include "mxrect32.h"
|
||||
#include "radio.h"
|
||||
|
||||
|
@ -44,14 +45,17 @@ public:
|
|||
// FUNCTION: BETA10 0x10031bd0
|
||||
MxBool HasRegistered() { return m_letters[0] != NULL; }
|
||||
|
||||
// FUNCTION: BETA10 0x10031c10
|
||||
InfomainScript::Script GetNextLeaveDialogue()
|
||||
{
|
||||
return (InfomainScript::Script) m_leaveDialogue[GameState()->GetCurrentAct()].Next();
|
||||
}
|
||||
|
||||
// TODO: These probably don't exist according to BETA
|
||||
Playlist& GetExitDialogueAct1() { return m_exitDialogueAct1; }
|
||||
Playlist& GetExitDialogueAct23() { return m_exitDialogueAct23; }
|
||||
Playlist& GetReturnDialogue(LegoGameState::Act p_act) { return m_returnDialogue[p_act]; }
|
||||
Playlist& GetLeaveDialogue(LegoGameState::Act p_act) { return m_leaveDialogue[p_act]; }
|
||||
Playlist& GetBricksterDialogue() { return m_bricksterDialogue; }
|
||||
MxU32 GetUnknown0x74() { return m_unk0x74; }
|
||||
|
||||
void SetUnknown0x74(MxU32 p_unk0x74) { m_unk0x74 = p_unk0x74; }
|
||||
|
||||
// SYNTHETIC: LEGO1 0x10071900
|
||||
// InfocenterState::`scalar deleting destructor'
|
||||
|
@ -162,7 +166,7 @@ private:
|
|||
LegoGameState::Area m_destLocation; // 0x104
|
||||
Cutscene m_currentCutscene; // 0x108
|
||||
Radio m_radio; // 0x10c
|
||||
MxStillPresenter* m_unk0x11c; // 0x11c
|
||||
MxStillPresenter* m_dragPresenter; // 0x11c
|
||||
InfocenterMapEntry m_glowInfo[7]; // 0x120
|
||||
MxS16 m_unk0x1c8; // 0x1c8
|
||||
MxStillPresenter* m_frame; // 0x1cc
|
||||
|
|
|
@ -20,9 +20,7 @@ public:
|
|||
|
||||
// TODO: Most likely getters/setters are not used according to BETA.
|
||||
|
||||
MxS32 GetClickedObjectId() const { return m_clickedObjectId; }
|
||||
const char* GetClickedAtom() const { return m_clickedAtom; }
|
||||
MxS16 GetUnknown0x28() const { return m_unk0x28; }
|
||||
|
||||
void SetClickedObjectId(MxS32 p_clickedObjectId) { m_clickedObjectId = p_clickedObjectId; }
|
||||
void SetClickedAtom(const char* p_clickedAtom) { m_clickedAtom = p_clickedAtom; }
|
||||
|
|
|
@ -206,7 +206,9 @@ public:
|
|||
// FUNCTION: BETA10 0x1004a2d0
|
||||
const char* GetActorName() { return g_actorNames[GetActorId()]; }
|
||||
|
||||
// FUNCTION: BETA10 0x1002b4c0
|
||||
Act GetCurrentAct() { return m_currentAct; }
|
||||
|
||||
Act GetLoadedAct() { return m_loadedAct; }
|
||||
Area GetPreviousArea() { return m_previousArea; }
|
||||
Area GetUnknown0x42c() { return m_unk0x42c; }
|
||||
|
@ -214,7 +216,6 @@ public:
|
|||
void SetDirty(MxBool p_isDirty) { m_isDirty = p_isDirty; }
|
||||
void SetPreviousArea(Area p_previousArea) { m_previousArea = p_previousArea; }
|
||||
void SetActorId(MxU8 p_actorId) { m_actorId = p_actorId; }
|
||||
void SetUnknown0x42c(Area p_unk0x42c) { m_unk0x42c = p_unk0x42c; }
|
||||
Username* GetPlayersIndex(MxS32 p_index) { return &m_players[p_index]; }
|
||||
MxS16 GetPlayerCount() { return m_playerCount; }
|
||||
LegoBackgroundColor* GetBackgroundColor() { return m_backgroundColor; }
|
||||
|
|
|
@ -440,8 +440,8 @@ MxLong Ambulance::HandleControl(LegoControlManagerNotificationParam& p_param)
|
|||
{
|
||||
MxLong result = 0;
|
||||
|
||||
if (p_param.GetUnknown0x28() == 1) {
|
||||
switch (p_param.GetClickedObjectId()) {
|
||||
if (p_param.m_unk0x28 == 1) {
|
||||
switch (p_param.m_clickedObjectId) {
|
||||
case IsleScript::c_AmbulanceArms_Ctl:
|
||||
Exit();
|
||||
GameState()->m_currentArea = LegoGameState::e_unk66;
|
||||
|
@ -457,7 +457,7 @@ MxLong Ambulance::HandleControl(LegoControlManagerNotificationParam& p_param)
|
|||
case IsleScript::c_AmbulanceHorn_Ctl:
|
||||
MxSoundPresenter* presenter =
|
||||
(MxSoundPresenter*) CurrentWorld()->Find("MxSoundPresenter", "AmbulanceHorn_Sound");
|
||||
presenter->Enable(p_param.GetUnknown0x28());
|
||||
presenter->Enable(p_param.m_unk0x28);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -81,8 +81,8 @@ MxLong Bike::HandleControl(LegoControlManagerNotificationParam& p_param)
|
|||
{
|
||||
MxLong result = 0;
|
||||
|
||||
if (p_param.GetUnknown0x28() == 1) {
|
||||
switch (p_param.GetClickedObjectId()) {
|
||||
if (p_param.m_unk0x28 == 1) {
|
||||
switch (p_param.m_clickedObjectId) {
|
||||
case IsleScript::c_BikeArms_Ctl:
|
||||
Exit();
|
||||
GameState()->m_currentArea = LegoGameState::e_unk66;
|
||||
|
@ -97,7 +97,7 @@ MxLong Bike::HandleControl(LegoControlManagerNotificationParam& p_param)
|
|||
case IsleScript::c_BikeHorn_Ctl:
|
||||
MxSoundPresenter* presenter =
|
||||
(MxSoundPresenter*) CurrentWorld()->Find("MxSoundPresenter", "BikeHorn_Sound");
|
||||
presenter->Enable(p_param.GetUnknown0x28());
|
||||
presenter->Enable(p_param.m_unk0x28);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -124,8 +124,8 @@ MxLong DuneBuggy::HandleControl(LegoControlManagerNotificationParam& p_param)
|
|||
{
|
||||
MxLong result = 0;
|
||||
|
||||
if (p_param.GetUnknown0x28() == 1) {
|
||||
switch (p_param.GetClickedObjectId()) {
|
||||
if (p_param.m_unk0x28 == 1) {
|
||||
switch (p_param.m_clickedObjectId) {
|
||||
case IsleScript::c_DuneCarArms_Ctl:
|
||||
Exit();
|
||||
GameState()->m_currentArea = LegoGameState::e_unk66;
|
||||
|
@ -140,7 +140,7 @@ MxLong DuneBuggy::HandleControl(LegoControlManagerNotificationParam& p_param)
|
|||
case IsleScript::c_DuneCarHorn_Ctl:
|
||||
MxSoundPresenter* presenter =
|
||||
(MxSoundPresenter*) CurrentWorld()->Find("MxSoundPresenter", "DuneCarHorn_Sound");
|
||||
presenter->Enable(p_param.GetUnknown0x28());
|
||||
presenter->Enable(p_param.m_unk0x28);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -139,8 +139,8 @@ void Jetski::RemoveFromWorld()
|
|||
// FUNCTION: LEGO1 0x1007e8e0
|
||||
MxLong Jetski::HandleControl(LegoControlManagerNotificationParam& p_param)
|
||||
{
|
||||
if (p_param.GetUnknown0x28() == 1 && CurrentWorld()->IsA("Isle")) {
|
||||
switch (p_param.GetClickedObjectId()) {
|
||||
if (p_param.m_unk0x28 == 1 && CurrentWorld()->IsA("Isle")) {
|
||||
switch (p_param.m_clickedObjectId) {
|
||||
case IsleScript::c_JetskiArms_Ctl:
|
||||
Exit();
|
||||
((IslePathActor*) UserActor())
|
||||
|
|
|
@ -117,8 +117,8 @@ MxLong Motocycle::HandleControl(LegoControlManagerNotificationParam& p_param)
|
|||
{
|
||||
MxLong result = 0;
|
||||
|
||||
if (p_param.GetUnknown0x28() == 1) {
|
||||
switch (p_param.GetClickedObjectId()) {
|
||||
if (p_param.m_unk0x28 == 1) {
|
||||
switch (p_param.m_clickedObjectId) {
|
||||
case IsleScript::c_MotoBikeArms_Ctl:
|
||||
Exit();
|
||||
GameState()->m_currentArea = LegoGameState::e_unk66;
|
||||
|
|
|
@ -144,7 +144,7 @@ void Radio::Stop()
|
|||
MxLong Radio::HandleControl(LegoControlManagerNotificationParam& p_param)
|
||||
{
|
||||
MxDSAction action; // Unused
|
||||
MxS32 objectId = p_param.GetClickedObjectId();
|
||||
MxS32 objectId = p_param.m_clickedObjectId;
|
||||
|
||||
if (objectId == IsleScript::c_Radio_Ctl) {
|
||||
if (m_state->IsActive()) {
|
||||
|
|
|
@ -110,7 +110,7 @@ MxLong SkateBoard::HandleControl(LegoControlManagerNotificationParam& p_param)
|
|||
{
|
||||
MxU32 result = 0;
|
||||
|
||||
if (p_param.GetUnknown0x28() == 1 && p_param.GetClickedObjectId() == IsleScript::c_SkateArms_Ctl) {
|
||||
if (p_param.m_unk0x28 == 1 && p_param.m_clickedObjectId == IsleScript::c_SkateArms_Ctl) {
|
||||
Exit();
|
||||
GameState()->m_currentArea = LegoGameState::Area::e_unk66;
|
||||
result = 1;
|
||||
|
|
|
@ -484,8 +484,8 @@ MxLong TowTrack::HandleControl(LegoControlManagerNotificationParam& p_param)
|
|||
{
|
||||
MxLong result = 0;
|
||||
|
||||
if (p_param.GetUnknown0x28() == 1) {
|
||||
switch (p_param.GetClickedObjectId()) {
|
||||
if (p_param.m_unk0x28 == 1) {
|
||||
switch (p_param.m_clickedObjectId) {
|
||||
case IsleScript::c_TowTrackArms_Ctl:
|
||||
Exit();
|
||||
GameState()->m_currentArea = LegoGameState::e_unk66;
|
||||
|
@ -500,7 +500,7 @@ MxLong TowTrack::HandleControl(LegoControlManagerNotificationParam& p_param)
|
|||
break;
|
||||
case IsleScript::c_TowHorn_Ctl:
|
||||
MxSoundPresenter* presenter = (MxSoundPresenter*) CurrentWorld()->Find("MxSoundPresenter", "TowHorn_Sound");
|
||||
presenter->Enable(p_param.GetUnknown0x28());
|
||||
presenter->Enable(p_param.m_unk0x28);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -319,6 +319,7 @@ void MxBackgroundAudioManager::LowerVolume()
|
|||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1007f5b0
|
||||
// FUNCTION: BETA10 0x100e9543
|
||||
void MxBackgroundAudioManager::RaiseVolume()
|
||||
{
|
||||
if (m_unk0x148 != 0) {
|
||||
|
|
|
@ -185,7 +185,7 @@ MxBool LegoControlManager::FUN_10029630()
|
|||
|
||||
while (cursor.Next(presenter)) {
|
||||
if (((MxControlPresenter*) presenter)->FUN_10044480(&m_event, m_unk0x14)) {
|
||||
g_unk0x100f31b0 = m_event.GetClickedObjectId();
|
||||
g_unk0x100f31b0 = m_event.m_clickedObjectId;
|
||||
g_unk0x100f31b4 = m_event.GetClickedAtom();
|
||||
FUN_100292e0();
|
||||
m_unk0x08 = 1;
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
DECOMP_SIZE_ASSERT(Act2Brick, 0x194)
|
||||
|
||||
// GLOBAL: LEGO1 0x100f7a38
|
||||
// GLOBAL: BETA10 0x101dc480
|
||||
const LegoChar* Act2Brick::g_lodNames[] =
|
||||
{"xchbase1", "xchblad1", "xchseat1", "xchtail1", "xhback1", "xhljet1", "xhmidl1", "xhmotr1", "xhsidl1", "xhsidr1"};
|
||||
|
||||
|
@ -51,8 +52,12 @@ MxResult Act2Brick::Create(MxS32 p_index)
|
|||
sprintf(name, "chbrick%d", p_index);
|
||||
|
||||
m_roi = CharacterManager()->CreateAutoROI(name, g_lodNames[p_index], FALSE);
|
||||
assert(m_roi);
|
||||
|
||||
BoundingSphere sphere = m_roi->GetBoundingSphere();
|
||||
#ifndef BETA10
|
||||
BoundingSphere sphere;
|
||||
|
||||
sphere.Center() = m_roi->GetBoundingSphere().Center();
|
||||
sphere.Center()[1] -= 0.3;
|
||||
|
||||
if (p_index < 6) {
|
||||
|
@ -63,6 +68,8 @@ MxResult Act2Brick::Create(MxS32 p_index)
|
|||
}
|
||||
|
||||
m_roi->SetBoundingSphere(sphere);
|
||||
#endif
|
||||
|
||||
m_roi->SetEntity(this);
|
||||
CurrentWorld()->Add(this);
|
||||
m_unk0x164 = 1;
|
||||
|
|
|
@ -632,6 +632,7 @@ MxCore* LegoWorld::Find(const char* p_class, const char* p_name)
|
|||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x10021790
|
||||
// FUNCTION: BETA10 0x100db3de
|
||||
MxCore* LegoWorld::Find(const MxAtomId& p_atom, MxS32 p_entityId)
|
||||
{
|
||||
LegoEntityListCursor entityCursor(m_entityList);
|
||||
|
|
|
@ -38,6 +38,7 @@ MxAtomId* g_elevbottScript = NULL;
|
|||
MxAtomId* g_infodoorScript = NULL;
|
||||
|
||||
// GLOBAL: LEGO1 0x100f4548
|
||||
// GLOBAL: BETA10 0x102114dc
|
||||
MxAtomId* g_infomainScript = NULL;
|
||||
|
||||
// GLOBAL: LEGO1 0x100f454c
|
||||
|
|
|
@ -127,10 +127,9 @@ MxLong LegoRaceMap::Notify(MxParam& p_param)
|
|||
MxNotificationParam& param = (MxNotificationParam&) p_param;
|
||||
|
||||
if (param.GetNotification() == c_notificationControl &&
|
||||
m_Map_Ctl->GetAction()->GetObjectId() ==
|
||||
((LegoControlManagerNotificationParam&) p_param).GetClickedObjectId()) {
|
||||
m_Map_Ctl->GetAction()->GetObjectId() == ((LegoControlManagerNotificationParam&) p_param).m_clickedObjectId) {
|
||||
|
||||
if (((LegoControlManagerNotificationParam&) p_param).GetUnknown0x28() == 1) {
|
||||
if (((LegoControlManagerNotificationParam&) p_param).m_unk0x28 == 1) {
|
||||
m_unk0x08 = TRUE;
|
||||
FUN_1005d4b0();
|
||||
m_stillPresenter->Enable(TRUE);
|
||||
|
|
|
@ -87,8 +87,8 @@ MxLong ElevatorBottom::HandleControl(LegoControlManagerNotificationParam& p_para
|
|||
{
|
||||
MxLong result = 0;
|
||||
|
||||
if (p_param.GetUnknown0x28() == 1) {
|
||||
switch (p_param.GetClickedObjectId()) {
|
||||
if (p_param.m_unk0x28 == 1) {
|
||||
switch (p_param.m_clickedObjectId) {
|
||||
case ElevbottScript::c_LeftArrow_Ctl:
|
||||
m_destLocation = LegoGameState::e_infodoor;
|
||||
TransitionManager()->StartTransition(MxTransitionManager::e_mosaic, 50, FALSE, FALSE);
|
||||
|
|
|
@ -389,10 +389,10 @@ MxLong GasStation::HandleButtonDown(LegoControlManagerNotificationParam& p_param
|
|||
// FUNCTION: BETA10 0x10029445
|
||||
MxLong GasStation::HandleControl(LegoControlManagerNotificationParam& p_param)
|
||||
{
|
||||
if (p_param.GetUnknown0x28() == 1) {
|
||||
if (p_param.m_unk0x28 == 1) {
|
||||
MxDSAction action;
|
||||
|
||||
switch (p_param.GetClickedObjectId()) {
|
||||
switch (p_param.m_clickedObjectId) {
|
||||
case GarageScript::c_LeftArrow_Ctl:
|
||||
case GarageScript::c_RightArrow_Ctl:
|
||||
m_state->m_unk0x14 = 0;
|
||||
|
|
|
@ -394,21 +394,20 @@ MxLong Hospital::HandleEndAction(MxEndActionNotificationParam& p_param)
|
|||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x10075710
|
||||
// FUNCTION: BETA10 0x1002d2b1
|
||||
MxLong Hospital::HandleButtonDown(LegoControlManagerNotificationParam& p_param)
|
||||
{
|
||||
if (m_unk0x100 == 1) {
|
||||
LegoROI* roi = PickROI(p_param.GetX(), p_param.GetY());
|
||||
if (roi != NULL) {
|
||||
LegoChar* roiName = (LegoChar*) roi->GetName();
|
||||
const LegoChar* roiName = roi->GetName();
|
||||
|
||||
if (roiName[0] == '*') {
|
||||
roiName += 1;
|
||||
}
|
||||
|
||||
if (!SDL_strcasecmp("actor_ha", roiName)) {
|
||||
LegoInputManager* inputManager = InputManager();
|
||||
inputManager->SetUnknown88(TRUE);
|
||||
inputManager->SetUnknown336(FALSE);
|
||||
InputManager()->DisableInputProcessing();
|
||||
|
||||
m_unk0x100 = 3;
|
||||
|
||||
|
@ -420,7 +419,9 @@ MxLong Hospital::HandleButtonDown(LegoControlManagerNotificationParam& p_param)
|
|||
|
||||
m_hospitalState->m_unk0x08 = 9;
|
||||
Act1State* act1State = (Act1State*) GameState()->GetState("Act1State");
|
||||
act1State->SetUnknown18(9);
|
||||
assert(act1State);
|
||||
|
||||
act1State->m_unk0x018 = 9;
|
||||
|
||||
m_destLocation = LegoGameState::e_unk31;
|
||||
DeleteObjects(
|
||||
|
@ -482,25 +483,6 @@ MxLong Hospital::HandleButtonDown(LegoControlManagerNotificationParam& p_param)
|
|||
break;
|
||||
}
|
||||
break;
|
||||
case LegoActor::c_papa:
|
||||
switch (m_hospitalState->m_unk0x12) {
|
||||
case 0:
|
||||
case 1:
|
||||
m_hospitalState->m_unk0x08 = 12;
|
||||
PlayAction(HospitalScript::c_hho023cl_RunAnim);
|
||||
|
||||
m_currentAction = HospitalScript::c_hho023cl_RunAnim;
|
||||
m_unk0x108 = 1;
|
||||
break;
|
||||
default:
|
||||
m_hospitalState->m_unk0x08 = 12;
|
||||
PlayAction(HospitalScript::c_hho024cl_RunAnim);
|
||||
|
||||
m_currentAction = HospitalScript::c_hho024cl_RunAnim;
|
||||
m_unk0x108 = 1;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case LegoActor::c_nick:
|
||||
switch (m_hospitalState->m_unk0x14) {
|
||||
case 0:
|
||||
|
@ -520,6 +502,25 @@ MxLong Hospital::HandleButtonDown(LegoControlManagerNotificationParam& p_param)
|
|||
break;
|
||||
}
|
||||
break;
|
||||
case LegoActor::c_papa:
|
||||
switch (m_hospitalState->m_unk0x12) {
|
||||
case 0:
|
||||
case 1:
|
||||
m_hospitalState->m_unk0x08 = 12;
|
||||
PlayAction(HospitalScript::c_hho023cl_RunAnim);
|
||||
|
||||
m_currentAction = HospitalScript::c_hho023cl_RunAnim;
|
||||
m_unk0x108 = 1;
|
||||
break;
|
||||
default:
|
||||
m_hospitalState->m_unk0x08 = 12;
|
||||
PlayAction(HospitalScript::c_hho024cl_RunAnim);
|
||||
|
||||
m_currentAction = HospitalScript::c_hho024cl_RunAnim;
|
||||
m_unk0x108 = 1;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case LegoActor::c_laura:
|
||||
switch (m_hospitalState->m_unk0x16) {
|
||||
case 0:
|
||||
|
@ -545,14 +546,8 @@ MxLong Hospital::HandleButtonDown(LegoControlManagerNotificationParam& p_param)
|
|||
|
||||
return 1;
|
||||
}
|
||||
else {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
return 0;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -560,8 +555,8 @@ MxLong Hospital::HandleButtonDown(LegoControlManagerNotificationParam& p_param)
|
|||
// FUNCTION: LEGO1 0x10075f90
|
||||
MxBool Hospital::HandleControl(LegoControlManagerNotificationParam& p_param)
|
||||
{
|
||||
if (p_param.GetUnknown0x28() == 1) {
|
||||
switch (p_param.GetClickedObjectId()) {
|
||||
if (p_param.m_unk0x28 == 1) {
|
||||
switch (p_param.m_clickedObjectId) {
|
||||
case HospitalScript::c_Info_Ctl:
|
||||
BackgroundAudioManager()->RaiseVolume();
|
||||
DeleteObjects(&m_atomId, HospitalScript::c_hho002cl_RunAnim, HospitalScript::c_hho006cl_RunAnim);
|
||||
|
|
|
@ -17,7 +17,6 @@
|
|||
#include "legoplantmanager.h"
|
||||
#include "legoutils.h"
|
||||
#include "legovideomanager.h"
|
||||
#include "misc.h"
|
||||
#include "mxactionnotificationparam.h"
|
||||
#include "mxbackgroundaudiomanager.h"
|
||||
#include "mxcontrolpresenter.h"
|
||||
|
@ -130,7 +129,7 @@ InfomainScript::Script g_bricksterDialogue[2] = {
|
|||
Infocenter::Infocenter()
|
||||
{
|
||||
m_selectedCharacter = e_noCharacter;
|
||||
m_unk0x11c = NULL;
|
||||
m_dragPresenter = NULL;
|
||||
m_infocenterState = NULL;
|
||||
m_frame = NULL;
|
||||
m_destLocation = LegoGameState::e_undefined;
|
||||
|
@ -191,12 +190,12 @@ MxResult Infocenter::Create(MxDSAction& p_dsAction)
|
|||
m_infocenterState = (InfocenterState*) GameState()->GetState("InfocenterState");
|
||||
if (!m_infocenterState) {
|
||||
m_infocenterState = (InfocenterState*) GameState()->CreateState("InfocenterState");
|
||||
m_infocenterState->SetUnknown0x74(3);
|
||||
m_infocenterState->m_unk0x74 = 3;
|
||||
}
|
||||
else {
|
||||
if (m_infocenterState->GetUnknown0x74() != 8 && m_infocenterState->GetUnknown0x74() != 4 &&
|
||||
m_infocenterState->GetUnknown0x74() != 15) {
|
||||
m_infocenterState->SetUnknown0x74(2);
|
||||
if (m_infocenterState->m_unk0x74 != 8 && m_infocenterState->m_unk0x74 != 4 &&
|
||||
m_infocenterState->m_unk0x74 != 15) {
|
||||
m_infocenterState->m_unk0x74 = 2;
|
||||
}
|
||||
|
||||
MxS16 count, i;
|
||||
|
@ -218,7 +217,7 @@ MxResult Infocenter::Create(MxDSAction& p_dsAction)
|
|||
GameState()->m_currentArea = LegoGameState::e_infomain;
|
||||
GameState()->StopArea(LegoGameState::e_previousArea);
|
||||
|
||||
if (m_infocenterState->GetUnknown0x74() == 4) {
|
||||
if (m_infocenterState->m_unk0x74 == 4) {
|
||||
LegoGameState* state = GameState();
|
||||
state->SetPreviousArea(GameState()->GetUnknown0x42c());
|
||||
}
|
||||
|
@ -267,9 +266,9 @@ MxLong Infocenter::Notify(MxParam& p_param)
|
|||
StopBookAnimation();
|
||||
m_bookAnimationTimer = 0;
|
||||
|
||||
if (m_infocenterState->GetUnknown0x74() == 0x0c) {
|
||||
if (m_infocenterState->m_unk0x74 == 0x0c) {
|
||||
StartCredits();
|
||||
m_infocenterState->SetUnknown0x74(0xd);
|
||||
m_infocenterState->m_unk0x74 = 0xd;
|
||||
}
|
||||
else if (m_destLocation != 0) {
|
||||
BackgroundAudioManager()->RaiseVolume();
|
||||
|
@ -340,7 +339,7 @@ MxLong Infocenter::HandleEndAction(MxEndActionNotificationParam& p_param)
|
|||
m_unk0x1d6 = 0;
|
||||
}
|
||||
|
||||
switch (m_infocenterState->GetUnknown0x74()) {
|
||||
switch (m_infocenterState->m_unk0x74) {
|
||||
case 0:
|
||||
switch (m_currentCutscene) {
|
||||
case e_legoMovie:
|
||||
|
@ -351,13 +350,13 @@ MxLong Infocenter::HandleEndAction(MxEndActionNotificationParam& p_param)
|
|||
return 1;
|
||||
case e_badEndMovie:
|
||||
StopCutscene();
|
||||
m_infocenterState->SetUnknown0x74(11);
|
||||
m_infocenterState->m_unk0x74 = 11;
|
||||
PlayAction(InfomainScript::c_tic092in_RunAnim);
|
||||
m_currentCutscene = e_noIntro;
|
||||
return 1;
|
||||
case e_goodEndMovie:
|
||||
StopCutscene();
|
||||
m_infocenterState->SetUnknown0x74(11);
|
||||
m_infocenterState->m_unk0x74 = 11;
|
||||
PlayAction(InfomainScript::c_tic089in_RunAnim);
|
||||
m_currentCutscene = e_noIntro;
|
||||
return 1;
|
||||
|
@ -365,7 +364,7 @@ MxLong Infocenter::HandleEndAction(MxEndActionNotificationParam& p_param)
|
|||
|
||||
// default / 2nd case probably?
|
||||
StopCutscene();
|
||||
m_infocenterState->SetUnknown0x74(11);
|
||||
m_infocenterState->m_unk0x74 = 11;
|
||||
PlayAction(InfomainScript::c_iic001in_RunAnim);
|
||||
m_currentCutscene = e_noIntro;
|
||||
|
||||
|
@ -375,7 +374,7 @@ MxLong Infocenter::HandleEndAction(MxEndActionNotificationParam& p_param)
|
|||
}
|
||||
break;
|
||||
case 1:
|
||||
m_infocenterState->SetUnknown0x74(11);
|
||||
m_infocenterState->m_unk0x74 = 11;
|
||||
|
||||
switch (m_currentCutscene) {
|
||||
case e_badEndMovie:
|
||||
|
@ -399,7 +398,7 @@ MxLong Infocenter::HandleEndAction(MxEndActionNotificationParam& p_param)
|
|||
if (action->GetObjectId() == InfomainScript::c_GoTo_RegBook ||
|
||||
action->GetObjectId() == InfomainScript::c_GoTo_RegBook_Red) {
|
||||
TransitionManager()->StartTransition(MxTransitionManager::e_mosaic, 50, FALSE, FALSE);
|
||||
m_infocenterState->SetUnknown0x74(14);
|
||||
m_infocenterState->m_unk0x74 = 14;
|
||||
return 1;
|
||||
}
|
||||
break;
|
||||
|
@ -409,7 +408,7 @@ MxLong Infocenter::HandleEndAction(MxEndActionNotificationParam& p_param)
|
|||
GameState()->SetActor(m_selectedCharacter);
|
||||
}
|
||||
TransitionManager()->StartTransition(MxTransitionManager::e_mosaic, 50, FALSE, FALSE);
|
||||
m_infocenterState->SetUnknown0x74(14);
|
||||
m_infocenterState->m_unk0x74 = 14;
|
||||
return 1;
|
||||
}
|
||||
break;
|
||||
|
@ -423,7 +422,7 @@ MxLong Infocenter::HandleEndAction(MxEndActionNotificationParam& p_param)
|
|||
PlayMusic(JukeboxScript::c_InformationCenter_Music);
|
||||
}
|
||||
|
||||
m_infocenterState->SetUnknown0x74(2);
|
||||
m_infocenterState->m_unk0x74 = 2;
|
||||
SetROIVisible("infoman", TRUE);
|
||||
return 1;
|
||||
case 12:
|
||||
|
@ -453,13 +452,13 @@ void Infocenter::ReadyWorld()
|
|||
bg->Enable(TRUE);
|
||||
InitializeBitmaps();
|
||||
|
||||
switch (m_infocenterState->GetUnknown0x74()) {
|
||||
switch (m_infocenterState->m_unk0x74) {
|
||||
case 3:
|
||||
PlayCutscene(e_legoMovie, TRUE);
|
||||
m_infocenterState->SetUnknown0x74(0);
|
||||
m_infocenterState->m_unk0x74 = 0;
|
||||
break;
|
||||
case 4:
|
||||
m_infocenterState->SetUnknown0x74(2);
|
||||
m_infocenterState->m_unk0x74 = 2;
|
||||
if (!m_infocenterState->HasRegistered()) {
|
||||
m_bookAnimationTimer = 1;
|
||||
}
|
||||
|
@ -486,7 +485,7 @@ void Infocenter::ReadyWorld()
|
|||
m_bookAnimationTimer = 1;
|
||||
}
|
||||
|
||||
m_infocenterState->SetUnknown0x74(11);
|
||||
m_infocenterState->m_unk0x74 = 11;
|
||||
FUN_10015820(FALSE, LegoOmni::c_disableInput | LegoOmni::c_disable3d | LegoOmni::c_clearScreen);
|
||||
break;
|
||||
}
|
||||
|
@ -496,7 +495,7 @@ void Infocenter::ReadyWorld()
|
|||
FUN_10015820(FALSE, LegoOmni::c_disableInput | LegoOmni::c_disable3d | LegoOmni::c_clearScreen);
|
||||
break;
|
||||
case 0xf:
|
||||
m_infocenterState->SetUnknown0x74(2);
|
||||
m_infocenterState->m_unk0x74 = 2;
|
||||
if (!m_infocenterState->HasRegistered()) {
|
||||
m_bookAnimationTimer = 1;
|
||||
}
|
||||
|
@ -508,7 +507,7 @@ void Infocenter::ReadyWorld()
|
|||
}
|
||||
return;
|
||||
case LegoGameState::e_act2: {
|
||||
if (m_infocenterState->GetUnknown0x74() == 8) {
|
||||
if (m_infocenterState->m_unk0x74 == 8) {
|
||||
PlayMusic(JukeboxScript::c_InformationCenter_Music);
|
||||
bgRed->Enable(TRUE);
|
||||
PlayAction(InfomainScript::c_iic043in_RunAnim);
|
||||
|
@ -522,11 +521,11 @@ void Infocenter::ReadyWorld()
|
|||
if (state && state->GetUnknown0x08() == 0x68) {
|
||||
bg->Enable(TRUE);
|
||||
PlayCutscene(e_badEndMovie, TRUE);
|
||||
m_infocenterState->SetUnknown0x74(0);
|
||||
m_infocenterState->m_unk0x74 = 0;
|
||||
return;
|
||||
}
|
||||
|
||||
if (m_infocenterState->GetUnknown0x74() == 4) {
|
||||
if (m_infocenterState->m_unk0x74 == 4) {
|
||||
bgRed->Enable(TRUE);
|
||||
|
||||
if (GameState()->GetCurrentAct() == GameState()->GetLoadedAct()) {
|
||||
|
@ -535,7 +534,7 @@ void Infocenter::ReadyWorld()
|
|||
GameState()->m_currentArea = LegoGameState::e_infomain;
|
||||
}
|
||||
|
||||
m_infocenterState->SetUnknown0x74(5);
|
||||
m_infocenterState->m_unk0x74 = 5;
|
||||
m_destLocation = LegoGameState::e_act2main;
|
||||
|
||||
InfomainScript::Script script =
|
||||
|
@ -555,7 +554,7 @@ void Infocenter::ReadyWorld()
|
|||
break;
|
||||
}
|
||||
case LegoGameState::e_act3: {
|
||||
if (m_infocenterState->GetUnknown0x74() == 8) {
|
||||
if (m_infocenterState->m_unk0x74 == 8) {
|
||||
PlayMusic(JukeboxScript::c_InformationCenter_Music);
|
||||
bgRed->Enable(TRUE);
|
||||
PlayAction(InfomainScript::c_iic043in_RunAnim);
|
||||
|
@ -570,19 +569,19 @@ void Infocenter::ReadyWorld()
|
|||
if (state->GetUnknown0x08() == 3) {
|
||||
bg->Enable(TRUE);
|
||||
PlayCutscene(e_badEndMovie, TRUE);
|
||||
m_infocenterState->SetUnknown0x74(0);
|
||||
m_infocenterState->m_unk0x74 = 0;
|
||||
return;
|
||||
}
|
||||
|
||||
if (state && state->GetUnknown0x08() == 2) {
|
||||
bg->Enable(TRUE);
|
||||
PlayCutscene(e_goodEndMovie, TRUE);
|
||||
m_infocenterState->SetUnknown0x74(0);
|
||||
m_infocenterState->m_unk0x74 = 0;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (m_infocenterState->GetUnknown0x74() == 4) {
|
||||
if (m_infocenterState->m_unk0x74 == 4) {
|
||||
bgRed->Enable(TRUE);
|
||||
|
||||
if (GameState()->GetCurrentAct() == GameState()->GetLoadedAct()) {
|
||||
|
@ -591,7 +590,7 @@ void Infocenter::ReadyWorld()
|
|||
GameState()->m_currentArea = LegoGameState::e_infomain;
|
||||
}
|
||||
|
||||
m_infocenterState->SetUnknown0x74(5);
|
||||
m_infocenterState->m_unk0x74 = 5;
|
||||
m_destLocation = LegoGameState::e_act3script;
|
||||
|
||||
InfomainScript::Script script =
|
||||
|
@ -612,7 +611,7 @@ void Infocenter::ReadyWorld()
|
|||
}
|
||||
}
|
||||
|
||||
m_infocenterState->SetUnknown0x74(11);
|
||||
m_infocenterState->m_unk0x74 = 11;
|
||||
FUN_10015820(FALSE, LegoOmni::c_disableInput | LegoOmni::c_disable3d | LegoOmni::c_clearScreen);
|
||||
}
|
||||
|
||||
|
@ -701,20 +700,21 @@ void Infocenter::InitializeBitmaps()
|
|||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1006fd00
|
||||
// FUNCTION: BETA10 0x1002f808
|
||||
MxU8 Infocenter::HandleMouseMove(MxS32 p_x, MxS32 p_y)
|
||||
{
|
||||
if (m_unk0x11c) {
|
||||
if (!m_unk0x11c->IsEnabled()) {
|
||||
MxS32 oldDisplayZ = m_unk0x11c->GetDisplayZ();
|
||||
if (m_dragPresenter) {
|
||||
if (!m_dragPresenter->IsEnabled()) {
|
||||
MxS32 oldDisplayZ = m_dragPresenter->GetDisplayZ();
|
||||
|
||||
m_unk0x11c->SetDisplayZ(1000);
|
||||
m_dragPresenter->SetDisplayZ(1000);
|
||||
VideoManager()->SortPresenterList();
|
||||
m_unk0x11c->Enable(TRUE);
|
||||
m_unk0x11c->SetPosition(p_x, p_y);
|
||||
m_unk0x11c->SetDisplayZ(oldDisplayZ);
|
||||
m_dragPresenter->Enable(TRUE);
|
||||
m_dragPresenter->SetPosition(p_x, p_y);
|
||||
m_dragPresenter->SetDisplayZ(oldDisplayZ);
|
||||
}
|
||||
else {
|
||||
m_unk0x11c->SetPosition(p_x, p_y);
|
||||
m_dragPresenter->SetPosition(p_x, p_y);
|
||||
}
|
||||
|
||||
FUN_10070d10(p_x, p_y);
|
||||
|
@ -725,15 +725,16 @@ MxU8 Infocenter::HandleMouseMove(MxS32 p_x, MxS32 p_y)
|
|||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1006fda0
|
||||
// FUNCTION: BETA10 0x1002f907
|
||||
MxLong Infocenter::HandleKeyPress(SDL_Keycode p_key)
|
||||
{
|
||||
MxLong result = 0;
|
||||
|
||||
if (p_key == SDLK_SPACE && m_worldStarted) {
|
||||
switch (m_infocenterState->GetUnknown0x74()) {
|
||||
switch (m_infocenterState->m_unk0x74) {
|
||||
case 0:
|
||||
StopCutscene();
|
||||
m_infocenterState->SetUnknown0x74(1);
|
||||
m_infocenterState->m_unk0x74 = 1;
|
||||
|
||||
if (!m_infocenterState->HasRegistered()) {
|
||||
m_bookAnimationTimer = 1;
|
||||
|
@ -747,13 +748,13 @@ MxLong Infocenter::HandleKeyPress(SDL_Keycode p_key)
|
|||
InfomainScript::Script script = m_currentInfomainScript;
|
||||
StopCurrentAction();
|
||||
|
||||
switch (m_infocenterState->GetUnknown0x74()) {
|
||||
switch (m_infocenterState->m_unk0x74) {
|
||||
case 5:
|
||||
case 12:
|
||||
m_currentInfomainScript = script;
|
||||
return 1;
|
||||
default:
|
||||
m_infocenterState->SetUnknown0x74(2);
|
||||
m_infocenterState->m_unk0x74 = 2;
|
||||
return 1;
|
||||
case 8:
|
||||
case 11:
|
||||
|
@ -772,12 +773,13 @@ MxLong Infocenter::HandleKeyPress(SDL_Keycode p_key)
|
|||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1006feb0
|
||||
// FUNCTION: BETA10 0x1002fa12
|
||||
MxU8 Infocenter::HandleButtonUp(MxS32 p_x, MxS32 p_y)
|
||||
{
|
||||
if (m_unk0x11c) {
|
||||
if (m_dragPresenter) {
|
||||
MxControlPresenter* control = InputManager()->GetControlManager()->FUN_100294e0(p_x - 1, p_y - 1);
|
||||
|
||||
switch (m_unk0x11c->GetAction()->GetObjectId()) {
|
||||
switch (m_dragPresenter->GetAction()->GetObjectId()) {
|
||||
case InfomainScript::c_PepperHot_Bitmap:
|
||||
m_selectedCharacter = e_pepper;
|
||||
break;
|
||||
|
@ -870,54 +872,54 @@ MxU8 Infocenter::HandleButtonUp(MxS32 p_x, MxS32 p_y)
|
|||
case 10:
|
||||
if (m_selectedCharacter) {
|
||||
m_destLocation = LegoGameState::e_jetraceExterior;
|
||||
m_infocenterState->SetUnknown0x74(5);
|
||||
m_infocenterState->m_unk0x74 = 5;
|
||||
}
|
||||
break;
|
||||
case 11:
|
||||
if (m_selectedCharacter) {
|
||||
m_destLocation = LegoGameState::e_carraceExterior;
|
||||
m_infocenterState->SetUnknown0x74(5);
|
||||
m_infocenterState->m_unk0x74 = 5;
|
||||
}
|
||||
break;
|
||||
case 12:
|
||||
if (m_selectedCharacter) {
|
||||
m_destLocation = LegoGameState::e_pizzeriaExterior;
|
||||
m_infocenterState->SetUnknown0x74(5);
|
||||
m_infocenterState->m_unk0x74 = 5;
|
||||
}
|
||||
break;
|
||||
case 13:
|
||||
if (m_selectedCharacter) {
|
||||
m_destLocation = LegoGameState::e_garageExterior;
|
||||
m_infocenterState->SetUnknown0x74(5);
|
||||
m_infocenterState->m_unk0x74 = 5;
|
||||
}
|
||||
break;
|
||||
case 14:
|
||||
if (m_selectedCharacter) {
|
||||
m_destLocation = LegoGameState::e_hospitalExterior;
|
||||
m_infocenterState->SetUnknown0x74(5);
|
||||
m_infocenterState->m_unk0x74 = 5;
|
||||
}
|
||||
break;
|
||||
case 15:
|
||||
if (m_selectedCharacter) {
|
||||
m_destLocation = LegoGameState::e_policeExterior;
|
||||
m_infocenterState->SetUnknown0x74(5);
|
||||
m_infocenterState->m_unk0x74 = 5;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
m_unk0x11c->Enable(FALSE);
|
||||
m_unk0x11c = NULL;
|
||||
m_dragPresenter->Enable(FALSE);
|
||||
m_dragPresenter = NULL;
|
||||
|
||||
if (m_infocenterState->GetUnknown0x74() == 5) {
|
||||
if (m_infocenterState->m_unk0x74 == 5) {
|
||||
InfomainScript::Script dialogueToPlay;
|
||||
|
||||
if (GameState()->GetCurrentAct() == LegoGameState::e_act1) {
|
||||
if (!m_infocenterState->HasRegistered()) {
|
||||
m_infocenterState->SetUnknown0x74(2);
|
||||
m_destLocation = LegoGameState::e_undefined;
|
||||
dialogueToPlay = InfomainScript::c_iic007in_PlayWav;
|
||||
m_infocenterState->m_unk0x74 = 2;
|
||||
m_destLocation = LegoGameState::e_undefined;
|
||||
}
|
||||
else {
|
||||
switch (m_selectedCharacter) {
|
||||
|
@ -942,9 +944,8 @@ MxU8 Infocenter::HandleButtonUp(MxS32 p_x, MxS32 p_y)
|
|||
GameState()->SetActorId(m_selectedCharacter);
|
||||
break;
|
||||
default:
|
||||
dialogueToPlay =
|
||||
(InfomainScript::Script) m_infocenterState->GetLeaveDialogue(GameState()->GetCurrentAct())
|
||||
.Next();
|
||||
assert(0);
|
||||
dialogueToPlay = m_infocenterState->GetNextLeaveDialogue();
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -953,8 +954,7 @@ MxU8 Infocenter::HandleButtonUp(MxS32 p_x, MxS32 p_y)
|
|||
}
|
||||
}
|
||||
else {
|
||||
dialogueToPlay =
|
||||
(InfomainScript::Script) m_infocenterState->GetLeaveDialogue(GameState()->GetCurrentAct()).Next();
|
||||
dialogueToPlay = m_infocenterState->GetNextLeaveDialogue();
|
||||
}
|
||||
|
||||
PlayAction(dialogueToPlay);
|
||||
|
@ -968,9 +968,10 @@ MxU8 Infocenter::HandleButtonUp(MxS32 p_x, MxS32 p_y)
|
|||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x10070370
|
||||
// FUNCTION: BETA10 0x1002ffd4
|
||||
MxU8 Infocenter::HandleControl(LegoControlManagerNotificationParam& p_param)
|
||||
{
|
||||
if (p_param.GetUnknown0x28() == 1) {
|
||||
if (p_param.m_unk0x28 == 1) {
|
||||
m_infoManDialogueTimer = 0;
|
||||
|
||||
InfomainScript::Script actionToPlay = InfomainScript::c_noneInfomain;
|
||||
|
@ -979,9 +980,9 @@ MxU8 Infocenter::HandleControl(LegoControlManagerNotificationParam& p_param)
|
|||
|
||||
LegoGameState* state = GameState();
|
||||
|
||||
switch (p_param.GetClickedObjectId()) {
|
||||
switch (p_param.m_clickedObjectId) {
|
||||
case InfomainScript::c_LeftArrow_Ctl:
|
||||
m_infocenterState->SetUnknown0x74(14);
|
||||
m_infocenterState->m_unk0x74 = 14;
|
||||
StopCurrentAction();
|
||||
|
||||
if (GameState()->GetCurrentAct() == LegoGameState::e_act1) {
|
||||
|
@ -996,7 +997,7 @@ MxU8 Infocenter::HandleControl(LegoControlManagerNotificationParam& p_param)
|
|||
|
||||
break;
|
||||
case InfomainScript::c_RightArrow_Ctl:
|
||||
m_infocenterState->SetUnknown0x74(14);
|
||||
m_infocenterState->m_unk0x74 = 14;
|
||||
StopCurrentAction();
|
||||
|
||||
if (GameState()->GetCurrentAct() == LegoGameState::e_act1) {
|
||||
|
@ -1015,10 +1016,10 @@ MxU8 Infocenter::HandleControl(LegoControlManagerNotificationParam& p_param)
|
|||
m_radio.Stop();
|
||||
break;
|
||||
case InfomainScript::c_Door_Ctl:
|
||||
if (m_infocenterState->GetUnknown0x74() != 8) {
|
||||
if (m_infocenterState->m_unk0x74 != 8) {
|
||||
actionToPlay = InfomainScript::c_iic043in_RunAnim;
|
||||
m_radio.Stop();
|
||||
m_infocenterState->SetUnknown0x74(8);
|
||||
m_infocenterState->m_unk0x74 = 8;
|
||||
}
|
||||
|
||||
break;
|
||||
|
@ -1049,52 +1050,56 @@ MxU8 Infocenter::HandleControl(LegoControlManagerNotificationParam& p_param)
|
|||
case InfomainScript::c_BigInfo_Ctl:
|
||||
switch (state->GetCurrentAct()) {
|
||||
case LegoGameState::e_act1:
|
||||
switch (state->GetPreviousArea()) {
|
||||
case LegoGameState::e_infodoor:
|
||||
case LegoGameState::e_regbook:
|
||||
case LegoGameState::e_infoscor:
|
||||
m_infocenterState->SetUnknown0x74(5);
|
||||
m_destLocation = state->GetPreviousArea();
|
||||
actionToPlay =
|
||||
(InfomainScript::Script) m_infocenterState->GetLeaveDialogue(GameState()->GetCurrentAct())
|
||||
.Next();
|
||||
m_radio.Stop();
|
||||
InputManager()->DisableInputProcessing();
|
||||
InputManager()->SetUnknown336(TRUE);
|
||||
break;
|
||||
case LegoGameState::e_unk4:
|
||||
if (state->GetActorId() != LegoActor::c_none) {
|
||||
if (m_infocenterState->HasRegistered()) {
|
||||
m_infocenterState->SetUnknown0x74(5);
|
||||
m_destLocation = state->GetPreviousArea();
|
||||
actionToPlay = (InfomainScript::Script) m_infocenterState
|
||||
->GetLeaveDialogue(GameState()->GetCurrentAct())
|
||||
.Next();
|
||||
m_radio.Stop();
|
||||
InputManager()->DisableInputProcessing();
|
||||
InputManager()->SetUnknown336(TRUE);
|
||||
}
|
||||
else {
|
||||
PlayAction(InfomainScript::c_iic007in_PlayWav);
|
||||
m_infocenterState->SetUnknown0x74(2);
|
||||
if (state->GetPreviousArea()) {
|
||||
switch (state->GetPreviousArea()) {
|
||||
case LegoGameState::e_infodoor:
|
||||
case LegoGameState::e_regbook:
|
||||
case LegoGameState::e_infoscor:
|
||||
m_infocenterState->m_unk0x74 = 5;
|
||||
m_destLocation = state->GetPreviousArea();
|
||||
actionToPlay = (InfomainScript::Script) m_infocenterState->GetNextLeaveDialogue();
|
||||
m_radio.Stop();
|
||||
InputManager()->DisableInputProcessing();
|
||||
InputManager()->SetUnknown336(TRUE);
|
||||
break;
|
||||
case LegoGameState::e_elevbott:
|
||||
case LegoGameState::e_elevride:
|
||||
case LegoGameState::e_elevride2:
|
||||
case LegoGameState::e_elevopen:
|
||||
case LegoGameState::e_seaview:
|
||||
case LegoGameState::e_observe:
|
||||
case LegoGameState::e_elevdown:
|
||||
break;
|
||||
default:
|
||||
if (state->GetActorId() != LegoActor::c_none) {
|
||||
if (!m_infocenterState->HasRegistered()) {
|
||||
PlayAction(InfomainScript::c_iic007in_PlayWav);
|
||||
m_infocenterState->m_unk0x74 = 2;
|
||||
}
|
||||
else {
|
||||
m_infocenterState->m_unk0x74 = 5;
|
||||
m_destLocation = state->m_previousArea;
|
||||
actionToPlay = (InfomainScript::Script) m_infocenterState->GetNextLeaveDialogue();
|
||||
m_radio.Stop();
|
||||
InputManager()->DisableInputProcessing();
|
||||
InputManager()->SetUnknown336(TRUE);
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case LegoGameState::e_act2:
|
||||
m_infocenterState->SetUnknown0x74(5);
|
||||
m_infocenterState->m_unk0x74 = 5;
|
||||
m_destLocation = LegoGameState::e_act2main;
|
||||
actionToPlay =
|
||||
(InfomainScript::Script) m_infocenterState->GetLeaveDialogue(GameState()->GetCurrentAct()).Next();
|
||||
actionToPlay = (InfomainScript::Script) m_infocenterState->GetNextLeaveDialogue();
|
||||
InputManager()->DisableInputProcessing();
|
||||
InputManager()->SetUnknown336(TRUE);
|
||||
break;
|
||||
case LegoGameState::e_act3:
|
||||
m_infocenterState->SetUnknown0x74(5);
|
||||
m_infocenterState->m_unk0x74 = 5;
|
||||
m_destLocation = LegoGameState::e_act3script;
|
||||
actionToPlay =
|
||||
(InfomainScript::Script) m_infocenterState->GetLeaveDialogue(GameState()->GetCurrentAct()).Next();
|
||||
actionToPlay = (InfomainScript::Script) m_infocenterState->GetNextLeaveDialogue();
|
||||
InputManager()->DisableInputProcessing();
|
||||
InputManager()->SetUnknown336(TRUE);
|
||||
break;
|
||||
|
@ -1102,11 +1107,11 @@ MxU8 Infocenter::HandleControl(LegoControlManagerNotificationParam& p_param)
|
|||
break;
|
||||
case InfomainScript::c_Book_Ctl:
|
||||
m_destLocation = LegoGameState::e_regbook;
|
||||
m_infocenterState->SetUnknown0x74(4);
|
||||
m_infocenterState->m_unk0x74 = 4;
|
||||
actionToPlay = GameState()->GetCurrentAct() != LegoGameState::e_act1 ? InfomainScript::c_GoTo_RegBook_Red
|
||||
: InfomainScript::c_GoTo_RegBook;
|
||||
m_radio.Stop();
|
||||
GameState()->SetUnknown0x42c(GameState()->GetPreviousArea());
|
||||
GameState()->m_unk0x42c = GameState()->GetPreviousArea();
|
||||
InputManager()->DisableInputProcessing();
|
||||
break;
|
||||
case InfomainScript::c_Mama_Ctl:
|
||||
|
@ -1136,7 +1141,8 @@ MxU8 Infocenter::HandleControl(LegoControlManagerNotificationParam& p_param)
|
|||
}
|
||||
|
||||
if (characterBitmap != InfomainScript::c_noneInfomain) {
|
||||
m_unk0x11c = (MxStillPresenter*) Find(m_atomId, characterBitmap);
|
||||
m_dragPresenter = (MxStillPresenter*) Find(m_atomId, characterBitmap);
|
||||
assert(m_dragPresenter);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1144,19 +1150,21 @@ MxU8 Infocenter::HandleControl(LegoControlManagerNotificationParam& p_param)
|
|||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x10070870
|
||||
// FUNCTION: BETA10 0x1003039e
|
||||
MxLong Infocenter::HandleNotification0(MxNotificationParam& p_param)
|
||||
{
|
||||
// MxLong result
|
||||
// This function has changed significantly since BETA10
|
||||
|
||||
MxCore* sender = p_param.GetSender();
|
||||
|
||||
if (sender == NULL) {
|
||||
if (m_infocenterState->GetUnknown0x74() == 8) {
|
||||
if (m_infocenterState->m_unk0x74 == 8) {
|
||||
m_infoManDialogueTimer = 0;
|
||||
StopCutscene();
|
||||
PlayAction(InfomainScript::c_iic043in_RunAnim);
|
||||
}
|
||||
}
|
||||
else if (sender->IsA("MxEntity") && m_infocenterState->GetUnknown0x74() != 5 && m_infocenterState->GetUnknown0x74() != 12) {
|
||||
else if (sender->IsA("MxEntity") && m_infocenterState->m_unk0x74 != 5 && m_infocenterState->m_unk0x74 != 12) {
|
||||
switch (((MxEntity*) sender)->GetEntityId()) {
|
||||
case 5: {
|
||||
m_infoManDialogueTimer = 0;
|
||||
|
@ -1175,21 +1183,21 @@ MxLong Infocenter::HandleNotification0(MxNotificationParam& p_param)
|
|||
return 1;
|
||||
}
|
||||
case 6:
|
||||
if (m_infocenterState->GetUnknown0x74() == 8) {
|
||||
if (m_infocenterState->m_unk0x74 == 8) {
|
||||
StopCurrentAction();
|
||||
SetROIVisible(g_object2x4red, FALSE);
|
||||
SetROIVisible(g_object2x4grn, FALSE);
|
||||
m_infocenterState->SetUnknown0x74(2);
|
||||
m_infocenterState->m_unk0x74 = 2;
|
||||
PlayAction(InfomainScript::c_iicb28in_RunAnim);
|
||||
return 1;
|
||||
}
|
||||
case 7:
|
||||
if (m_infocenterState->GetUnknown0x74() == 8) {
|
||||
if (m_infocenterState->m_unk0x74 == 8) {
|
||||
if (m_infocenterState->HasRegistered()) {
|
||||
GameState()->Save(0);
|
||||
}
|
||||
|
||||
m_infocenterState->SetUnknown0x74(12);
|
||||
m_infocenterState->m_unk0x74 = 12;
|
||||
PlayAction(InfomainScript::c_iic046in_RunAnim);
|
||||
InputManager()->DisableInputProcessing();
|
||||
InputManager()->SetUnknown336(TRUE);
|
||||
|
@ -1315,6 +1323,7 @@ MxBool Infocenter::VTable0x5c()
|
|||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x10070d10
|
||||
// FUNCTION: BETA10 0x100307d4
|
||||
void Infocenter::FUN_10070d10(MxS32 p_x, MxS32 p_y)
|
||||
{
|
||||
MxS16 i;
|
||||
|
@ -1346,6 +1355,7 @@ void Infocenter::FUN_10070d10(MxS32 p_x, MxS32 p_y)
|
|||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x10070dc0
|
||||
// FUNCTION: BETA10 0x10030911
|
||||
void Infocenter::UpdateFrameHot(MxBool p_display)
|
||||
{
|
||||
if (p_display) {
|
||||
|
@ -1410,7 +1420,7 @@ void Infocenter::Reset()
|
|||
CharacterManager()->ReleaseAllActors();
|
||||
GameState()->SetCurrentAct(LegoGameState::e_act1);
|
||||
GameState()->SetPreviousArea(LegoGameState::e_undefined);
|
||||
GameState()->SetUnknown0x42c(LegoGameState::e_undefined);
|
||||
GameState()->m_unk0x42c = LegoGameState::e_undefined;
|
||||
|
||||
InitializeBitmaps();
|
||||
m_selectedCharacter = e_pepper;
|
||||
|
@ -1428,17 +1438,17 @@ void Infocenter::Reset()
|
|||
MxBool Infocenter::Escape()
|
||||
{
|
||||
if (m_infocenterState != NULL) {
|
||||
MxU32 val = m_infocenterState->GetUnknown0x74();
|
||||
MxU32 val = m_infocenterState->m_unk0x74;
|
||||
|
||||
if (val == 0) {
|
||||
StopCutscene();
|
||||
m_infocenterState->SetUnknown0x74(1);
|
||||
m_infocenterState->m_unk0x74 = 1;
|
||||
}
|
||||
else if (val == 13) {
|
||||
StopCredits();
|
||||
}
|
||||
else if (val != 8) {
|
||||
m_infocenterState->SetUnknown0x74(8);
|
||||
m_infocenterState->m_unk0x74 = 8;
|
||||
|
||||
#ifdef COMPAT_MODE
|
||||
{
|
||||
|
@ -1518,6 +1528,7 @@ void Infocenter::StopCredits()
|
|||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x10071300
|
||||
// FUNCTION: BETA10 0x1002ee8c
|
||||
void Infocenter::PlayAction(InfomainScript::Script p_script)
|
||||
{
|
||||
MxDSAction action;
|
||||
|
|
|
@ -96,10 +96,10 @@ MxLong InfocenterDoor::HandleControl(LegoControlManagerNotificationParam& p_para
|
|||
{
|
||||
MxLong result = 0;
|
||||
|
||||
if (p_param.GetUnknown0x28() == 1) {
|
||||
if (p_param.m_unk0x28 == 1) {
|
||||
DeleteObjects(&m_atomId, InfodoorScript::c_iic037in_PlayWav, 510);
|
||||
|
||||
switch (p_param.GetClickedObjectId()) {
|
||||
switch (p_param.m_clickedObjectId) {
|
||||
case InfodoorScript::c_LeftArrow_Ctl:
|
||||
m_destLocation = LegoGameState::e_infoscor;
|
||||
TransitionManager()->StartTransition(MxTransitionManager::e_mosaic, 50, FALSE, FALSE);
|
||||
|
|
|
@ -289,10 +289,10 @@ void Isle::ReadyWorld()
|
|||
// FUNCTION: LEGO1 0x10031030
|
||||
MxLong Isle::HandleControl(LegoControlManagerNotificationParam& p_param)
|
||||
{
|
||||
if (p_param.GetUnknown0x28() == 1) {
|
||||
if (p_param.m_unk0x28 == 1) {
|
||||
MxDSAction action;
|
||||
|
||||
switch (p_param.GetClickedObjectId()) {
|
||||
switch (p_param.m_clickedObjectId) {
|
||||
case IsleScript::c_ElevRide_Info_Ctl:
|
||||
m_act1state->m_unk0x018 = 2;
|
||||
|
||||
|
|
|
@ -101,8 +101,8 @@ void Police::ReadyWorld()
|
|||
// FUNCTION: LEGO1 0x1005e550
|
||||
MxLong Police::HandleControl(LegoControlManagerNotificationParam& p_param)
|
||||
{
|
||||
if (p_param.GetUnknown0x28() == 1) {
|
||||
switch (p_param.GetClickedObjectId()) {
|
||||
if (p_param.m_unk0x28 == 1) {
|
||||
switch (p_param.m_clickedObjectId) {
|
||||
case PoliceScript::c_LeftArrow_Ctl:
|
||||
case PoliceScript::c_RightArrow_Ctl:
|
||||
if (m_policeState->GetUnknown0x0c() == 1) {
|
||||
|
|
|
@ -223,18 +223,18 @@ MxLong RegistrationBook::HandleKeyPress(SDL_Keycode p_key)
|
|||
// FUNCTION: LEGO1 0x100774a0
|
||||
MxLong RegistrationBook::HandleControl(LegoControlManagerNotificationParam& p_param)
|
||||
{
|
||||
MxS16 unk0x28 = p_param.GetUnknown0x28();
|
||||
MxS16 unk0x28 = p_param.m_unk0x28;
|
||||
|
||||
if (unk0x28 >= 1 && unk0x28 <= 28) {
|
||||
if (p_param.GetClickedObjectId() == RegbookScript::c_Alphabet_Ctl) {
|
||||
if (p_param.m_clickedObjectId == RegbookScript::c_Alphabet_Ctl) {
|
||||
if (unk0x28 == 28) {
|
||||
DeleteObjects(&m_atomId, RegbookScript::c_iic006in_RunAnim, RegbookScript::c_iic008in_PlayWav);
|
||||
|
||||
if (GameState()->GetCurrentAct() == LegoGameState::e_act1) {
|
||||
m_infocenterState->SetUnknown0x74(15);
|
||||
m_infocenterState->m_unk0x74 = 15;
|
||||
}
|
||||
else {
|
||||
m_infocenterState->SetUnknown0x74(2);
|
||||
m_infocenterState->m_unk0x74 = 2;
|
||||
}
|
||||
|
||||
TransitionManager()->StartTransition(MxTransitionManager::e_mosaic, 50, FALSE, FALSE);
|
||||
|
@ -253,7 +253,7 @@ MxLong RegistrationBook::HandleControl(LegoControlManagerNotificationParam& p_pa
|
|||
|
||||
MxS16 i;
|
||||
for (i = 0; i < 10; i++) {
|
||||
if (m_checkmark[i]->GetAction()->GetObjectId() == p_param.GetClickedObjectId()) {
|
||||
if (m_checkmark[i]->GetAction()->GetObjectId() == p_param.m_clickedObjectId) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -315,7 +315,7 @@ void RegistrationBook::FUN_100775c0(MxS16 p_playerIndex)
|
|||
break;
|
||||
}
|
||||
|
||||
m_infocenterState->SetUnknown0x74(4);
|
||||
m_infocenterState->m_unk0x74 = 4;
|
||||
if (m_unk0x2b8 == 0 && !m_unk0x2c1) {
|
||||
DeleteObjects(&m_atomId, RegbookScript::c_iic006in_RunAnim, RegbookScript::c_iic008in_PlayWav);
|
||||
TransitionManager()->StartTransition(MxTransitionManager::e_mosaic, 50, FALSE, FALSE);
|
||||
|
|
|
@ -165,10 +165,10 @@ void Score::ReadyWorld()
|
|||
// FUNCTION: LEGO1 0x100016d0
|
||||
MxLong Score::FUN_100016d0(LegoControlManagerNotificationParam& p_param)
|
||||
{
|
||||
MxS16 unk0x28 = p_param.GetUnknown0x28();
|
||||
MxS16 unk0x28 = p_param.m_unk0x28;
|
||||
|
||||
if (unk0x28 == 1 || p_param.GetClickedObjectId() == InfoscorScript::c_LegoBox_Ctl) {
|
||||
switch (p_param.GetClickedObjectId()) {
|
||||
if (unk0x28 == 1 || p_param.m_clickedObjectId == InfoscorScript::c_LegoBox_Ctl) {
|
||||
switch (p_param.m_clickedObjectId) {
|
||||
case InfoscorScript::c_LeftArrow_Ctl:
|
||||
m_destLocation = LegoGameState::e_infomain;
|
||||
DeleteScript();
|
||||
|
|
|
@ -74,7 +74,9 @@ public:
|
|||
|
||||
BoundingSphere& GetBoundingSphere() { return m_sphere; }
|
||||
|
||||
// FUNCTION: BETA10 0x10013400
|
||||
void SetEntity(LegoEntity* p_entity) { m_entity = p_entity; }
|
||||
|
||||
void SetComp(CompoundObject* p_comp) { comp = p_comp; }
|
||||
void SetBoundingSphere(const BoundingSphere& p_sphere) { m_sphere = m_world_bounding_sphere = p_sphere; }
|
||||
void SetUnknown0x80(const BoundingBox& p_unk0x80) { m_unk0x80 = p_unk0x80; }
|
||||
|
|
|
@ -30,11 +30,9 @@ public:
|
|||
Mx3DPointFloat(const Vector3& p_other) : Vector3(m_elements) { EqualsImpl(p_other.m_data); }
|
||||
|
||||
// FUNCTION: LEGO1 0x10003c10
|
||||
// FUNCTION: BETA10 0x100116e0
|
||||
virtual void operator=(const Vector3& p_impl) { EqualsImpl(p_impl.m_data); } // vtable+0x88
|
||||
|
||||
// FUNCTION: BETA10 0x10015240
|
||||
// ??4Mx3DPointFloat@@QAEAAV0@ABV0@@Z
|
||||
|
||||
// FUNCTION: BETA10 0x10013460
|
||||
float& operator[](int idx) { return m_data[idx]; }
|
||||
|
||||
|
@ -42,6 +40,7 @@ public:
|
|||
const float& operator[](int idx) const { return m_data[idx]; }
|
||||
|
||||
// SYNTHETIC: LEGO1 0x10010c00
|
||||
// SYNTHETIC: BETA10 0x10015240
|
||||
// ??4Mx3DPointFloat@@QAEAAV0@ABV0@@Z
|
||||
|
||||
private:
|
||||
|
|
|
@ -25,6 +25,7 @@ public:
|
|||
Mx4DPointFloat(const Mx4DPointFloat& p_other) : Vector4(m_elements) { EqualsImpl(p_other.m_data); }
|
||||
|
||||
// FUNCTION: LEGO1 0x10003200
|
||||
// FUNCTION: BETA10 0x10048da0
|
||||
virtual void operator=(const Vector4& p_impl) { EqualsImpl(p_impl.m_data); } // vtable+0x98
|
||||
|
||||
// FUNCTION: BETA10 0x1004af10
|
||||
|
|
|
@ -123,6 +123,8 @@ public:
|
|||
MxPoint32 GetLocation() const { return this->m_location; }
|
||||
MxS32 GetX() const { return this->m_location.GetX(); }
|
||||
MxS32 GetY() const { return this->m_location.GetY(); }
|
||||
|
||||
// FUNCTION: BETA10 0x10031b70
|
||||
MxS32 GetDisplayZ() const { return this->m_displayZ; }
|
||||
|
||||
// FUNCTION: BETA10 0x10028430
|
||||
|
@ -135,6 +137,7 @@ public:
|
|||
m_compositePresenter = p_compositePresenter;
|
||||
}
|
||||
|
||||
// FUNCTION: BETA10 0x10031b40
|
||||
void SetDisplayZ(MxS32 p_displayZ) { m_displayZ = p_displayZ; }
|
||||
|
||||
// SYNTHETIC: LEGO1 0x1000c070
|
||||
|
|
|
@ -98,6 +98,7 @@ void MxVideoManager::UpdateRegion()
|
|||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100be440
|
||||
// FUNCTION: BETA10 0x1012ce5e
|
||||
void MxVideoManager::SortPresenterList()
|
||||
{
|
||||
if (this->m_presenters->GetCount() <= 1) {
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
#include <memory.h>
|
||||
|
||||
// FUNCTION: LEGO1 0x10001f80
|
||||
// FUNCTION: BETA10 0x10010a20
|
||||
void Vector2::AddImpl(const float* p_value)
|
||||
{
|
||||
m_data[0] += p_value[0];
|
||||
|
@ -14,6 +15,7 @@ void Vector2::AddImpl(const float* p_value)
|
|||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x10001fa0
|
||||
// FUNCTION: BETA10 0x10010a80
|
||||
void Vector2::AddImpl(float p_value)
|
||||
{
|
||||
m_data[0] += p_value;
|
||||
|
@ -21,6 +23,7 @@ void Vector2::AddImpl(float p_value)
|
|||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x10001fc0
|
||||
// FUNCTION: BETA10 0x10010ad0
|
||||
void Vector2::SubImpl(const float* p_value)
|
||||
{
|
||||
m_data[0] -= p_value[0];
|
||||
|
@ -28,6 +31,7 @@ void Vector2::SubImpl(const float* p_value)
|
|||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x10001fe0
|
||||
// FUNCTION: BETA10 0x10010b30
|
||||
void Vector2::MulImpl(const float* p_value)
|
||||
{
|
||||
m_data[0] *= p_value[0];
|
||||
|
@ -35,6 +39,7 @@ void Vector2::MulImpl(const float* p_value)
|
|||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x10002000
|
||||
// FUNCTION: BETA10 0x10010b90
|
||||
void Vector2::MulImpl(const float& p_value)
|
||||
{
|
||||
m_data[0] *= p_value;
|
||||
|
@ -42,6 +47,7 @@ void Vector2::MulImpl(const float& p_value)
|
|||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x10002020
|
||||
// FUNCTION: BETA10 0x10010bf0
|
||||
void Vector2::DivImpl(const float& p_value)
|
||||
{
|
||||
m_data[0] /= p_value;
|
||||
|
@ -49,6 +55,7 @@ void Vector2::DivImpl(const float& p_value)
|
|||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x10002040
|
||||
// FUNCTION: BETA10 0x10010c50
|
||||
float Vector2::DotImpl(const float* p_a, const float* p_b) const
|
||||
{
|
||||
return p_b[0] * p_a[0] + p_b[1] * p_a[1];
|
||||
|
@ -62,30 +69,35 @@ void Vector2::SetData(float* p_data)
|
|||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x10002070
|
||||
// FUNCTION: BETA10 0x10010cc0
|
||||
void Vector2::EqualsImpl(const float* p_data)
|
||||
{
|
||||
memcpy(m_data, p_data, sizeof(float) * 2);
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x10002090
|
||||
// FUNCTION: BETA10 0x10010d00
|
||||
float* Vector2::GetData()
|
||||
{
|
||||
return m_data;
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100020a0
|
||||
// FUNCTION: BETA10 0x10010d30
|
||||
const float* Vector2::GetData() const
|
||||
{
|
||||
return m_data;
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100020b0
|
||||
// FUNCTION: BETA10 0x10010d60
|
||||
void Vector2::Clear()
|
||||
{
|
||||
memset(m_data, 0, sizeof(float) * 2);
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100020d0
|
||||
// FUNCTION: BETA10 0x10010da0
|
||||
float Vector2::Dot(const float* p_a, const float* p_b) const
|
||||
{
|
||||
return DotImpl(p_a, p_b);
|
||||
|
@ -99,18 +111,21 @@ float Vector2::Dot(const Vector2& p_a, const Vector2& p_b) const
|
|||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x10002110
|
||||
// FUNCTION: BETA10 0x10010de0
|
||||
float Vector2::Dot(const float* p_a, const Vector2& p_b) const
|
||||
{
|
||||
return DotImpl(p_a, p_b.m_data);
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x10002130
|
||||
// FUNCTION: BETA10 0x10010e20
|
||||
float Vector2::Dot(const Vector2& p_a, const float* p_b) const
|
||||
{
|
||||
return DotImpl(p_a.m_data, p_b);
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x10002150
|
||||
// FUNCTION: BETA10 0x10010e60
|
||||
float Vector2::LenSquared() const
|
||||
{
|
||||
return m_data[0] * m_data[0] + m_data[1] * m_data[1];
|
||||
|
@ -123,9 +138,9 @@ int Vector2::Unitize()
|
|||
float sq = LenSquared();
|
||||
|
||||
if (sq > 0.0f) {
|
||||
float root = sqrt(sq);
|
||||
if (root > 0.0f) {
|
||||
DivImpl(root);
|
||||
sq = sqrt(sq);
|
||||
if (sq > 0.0f) {
|
||||
DivImpl(sq);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
@ -134,60 +149,70 @@ int Vector2::Unitize()
|
|||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100021c0
|
||||
// FUNCTION: BETA10 0x10010eb0
|
||||
void Vector2::operator+=(float p_value)
|
||||
{
|
||||
AddImpl(p_value);
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100021d0
|
||||
// FUNCTION: BETA10 0x10010ee0
|
||||
void Vector2::operator+=(const float* p_other)
|
||||
{
|
||||
AddImpl(p_other);
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100021e0
|
||||
// FUNCTION: BETA10 0x10010f10
|
||||
void Vector2::operator+=(const Vector2& p_other)
|
||||
{
|
||||
AddImpl(p_other.m_data);
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100021f0
|
||||
// FUNCTION: BETA10 0x10010f50
|
||||
void Vector2::operator-=(const float* p_other)
|
||||
{
|
||||
SubImpl(p_other);
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x10002200
|
||||
// FUNCTION: BETA10 0x10010f80
|
||||
void Vector2::operator-=(const Vector2& p_other)
|
||||
{
|
||||
SubImpl(p_other.m_data);
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x10002210
|
||||
// FUNCTION: BETA10 0x10010fc0
|
||||
void Vector2::operator*=(const float* p_other)
|
||||
{
|
||||
MulImpl(p_other);
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x10002220
|
||||
// FUNCTION: BETA10 0x10010ff0
|
||||
void Vector2::operator*=(const Vector2& p_other)
|
||||
{
|
||||
MulImpl(p_other.m_data);
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x10002230
|
||||
// FUNCTION: BETA10 0x10011030
|
||||
void Vector2::operator*=(const float& p_value)
|
||||
{
|
||||
MulImpl(p_value);
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x10002240
|
||||
// FUNCTION: BETA10 0x10011060
|
||||
void Vector2::operator/=(const float& p_value)
|
||||
{
|
||||
DivImpl(p_value);
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x10002250
|
||||
// FUNCTION: BETA10 0x10011090
|
||||
void Vector2::operator=(const float* p_other)
|
||||
{
|
||||
EqualsImpl(p_other);
|
||||
|
|
|
@ -20,26 +20,29 @@ void Vector3::EqualsCross(const Vector3& p_a, const Vector3& p_b)
|
|||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100022e0
|
||||
// FUNCTION: BETA10 0x10011470
|
||||
void Vector3::EqualsCross(const Vector3& p_a, const float* p_b)
|
||||
{
|
||||
EqualsCrossImpl(p_a.m_data, p_b);
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x10002300
|
||||
// FUNCTION: BETA10 0x100114b0
|
||||
void Vector3::EqualsCross(const float* p_a, const Vector3& p_b)
|
||||
{
|
||||
EqualsCrossImpl(p_a, p_b.m_data);
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x10003a60
|
||||
// FUNCTION: BETA10 0x10011100
|
||||
void Vector3::AddImpl(const float* p_value)
|
||||
{
|
||||
m_data[0] += p_value[0];
|
||||
m_data[1] += p_value[1];
|
||||
Vector2::AddImpl(p_value);
|
||||
m_data[2] += p_value[2];
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x10003a90
|
||||
// FUNCTION: BETA10 0x10011150
|
||||
void Vector3::AddImpl(float p_value)
|
||||
{
|
||||
m_data[0] += p_value;
|
||||
|
@ -48,41 +51,42 @@ void Vector3::AddImpl(float p_value)
|
|||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x10003ac0
|
||||
// FUNCTION: BETA10 0x100111c0
|
||||
void Vector3::SubImpl(const float* p_value)
|
||||
{
|
||||
m_data[0] -= p_value[0];
|
||||
m_data[1] -= p_value[1];
|
||||
Vector2::SubImpl(p_value);
|
||||
m_data[2] -= p_value[2];
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x10003af0
|
||||
// FUNCTION: BETA10 0x10011210
|
||||
void Vector3::MulImpl(const float* p_value)
|
||||
{
|
||||
m_data[0] *= p_value[0];
|
||||
m_data[1] *= p_value[1];
|
||||
Vector2::MulImpl(p_value);
|
||||
m_data[2] *= p_value[2];
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x10003b20
|
||||
// FUNCTION: BETA10 0x10011260
|
||||
void Vector3::MulImpl(const float& p_value)
|
||||
{
|
||||
m_data[0] *= p_value;
|
||||
m_data[1] *= p_value;
|
||||
Vector2::MulImpl(p_value);
|
||||
m_data[2] *= p_value;
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x10003b50
|
||||
// FUNCTION: BETA10 0x100112b0
|
||||
void Vector3::DivImpl(const float& p_value)
|
||||
{
|
||||
m_data[0] /= p_value;
|
||||
m_data[1] /= p_value;
|
||||
Vector2::DivImpl(p_value);
|
||||
m_data[2] /= p_value;
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x10003b80
|
||||
// FUNCTION: BETA10 0x10011300
|
||||
float Vector3::DotImpl(const float* p_a, const float* p_b) const
|
||||
{
|
||||
return p_a[0] * p_b[0] + p_a[2] * p_b[2] + p_a[1] * p_b[1];
|
||||
return p_a[0] * p_b[0] + p_a[1] * p_b[1] + p_a[2] * p_b[2];
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x10003ba0
|
||||
|
@ -107,6 +111,7 @@ float Vector3::LenSquared() const
|
|||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x10003bf0
|
||||
// FUNCTION: BETA10 0x100115a0
|
||||
void Vector3::Fill(const float& p_value)
|
||||
{
|
||||
m_data[0] = p_value;
|
||||
|
|
|
@ -7,15 +7,15 @@
|
|||
#include <memory.h>
|
||||
|
||||
// FUNCTION: LEGO1 0x10002870
|
||||
// FUNCTION: BETA10 0x10048500
|
||||
void Vector4::AddImpl(const float* p_value)
|
||||
{
|
||||
m_data[0] += p_value[0];
|
||||
m_data[1] += p_value[1];
|
||||
m_data[2] += p_value[2];
|
||||
Vector3::AddImpl(p_value);
|
||||
m_data[3] += p_value[3];
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100028b0
|
||||
// FUNCTION: BETA10 0x10048550
|
||||
void Vector4::AddImpl(float p_value)
|
||||
{
|
||||
m_data[0] += p_value;
|
||||
|
@ -25,54 +25,53 @@ void Vector4::AddImpl(float p_value)
|
|||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100028f0
|
||||
// FUNCTION: BETA10 0x100485e0
|
||||
void Vector4::SubImpl(const float* p_value)
|
||||
{
|
||||
m_data[0] -= p_value[0];
|
||||
m_data[1] -= p_value[1];
|
||||
m_data[2] -= p_value[2];
|
||||
Vector3::SubImpl(p_value);
|
||||
m_data[3] -= p_value[3];
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x10002930
|
||||
// FUNCTION: BETA10 0x10048630
|
||||
void Vector4::MulImpl(const float* p_value)
|
||||
{
|
||||
m_data[0] *= p_value[0];
|
||||
m_data[1] *= p_value[1];
|
||||
m_data[2] *= p_value[2];
|
||||
Vector3::MulImpl(p_value);
|
||||
m_data[3] *= p_value[3];
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x10002970
|
||||
// FUNCTION: BETA10 0x10048680
|
||||
void Vector4::MulImpl(const float& p_value)
|
||||
{
|
||||
m_data[0] *= p_value;
|
||||
m_data[1] *= p_value;
|
||||
m_data[2] *= p_value;
|
||||
Vector3::MulImpl(p_value);
|
||||
m_data[3] *= p_value;
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100029b0
|
||||
// FUNCTION: BETA10 0x100486d0
|
||||
void Vector4::DivImpl(const float& p_value)
|
||||
{
|
||||
m_data[0] /= p_value;
|
||||
m_data[1] /= p_value;
|
||||
m_data[2] /= p_value;
|
||||
Vector3::DivImpl(p_value);
|
||||
m_data[3] /= p_value;
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100029f0
|
||||
// FUNCTION: BETA10 0x10048720
|
||||
float Vector4::DotImpl(const float* p_a, const float* p_b) const
|
||||
{
|
||||
return p_a[0] * p_b[0] + p_a[2] * p_b[2] + (p_a[1] * p_b[1] + p_a[3] * p_b[3]);
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x10002a20
|
||||
// FUNCTION: BETA10 0x100487c0
|
||||
void Vector4::EqualsImpl(const float* p_data)
|
||||
{
|
||||
memcpy(m_data, p_data, sizeof(float) * 4);
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x10002a40
|
||||
// FUNCTION: BETA10 0x10048800
|
||||
void Vector4::SetMatrixProduct(const float* p_vec, const float* p_mat)
|
||||
{
|
||||
m_data[0] = p_vec[0] * p_mat[0] + p_vec[1] * p_mat[4] + p_vec[2] * p_mat[8] + p_vec[3] * p_mat[12];
|
||||
|
@ -82,24 +81,28 @@ void Vector4::SetMatrixProduct(const float* p_vec, const float* p_mat)
|
|||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x10002ae0
|
||||
// FUNCTION: BETA10 0x10048960
|
||||
void Vector4::SetMatrixProduct(const Vector4& p_a, const float* p_b)
|
||||
{
|
||||
SetMatrixProduct(p_a.m_data, p_b);
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x10002b00
|
||||
// FUNCTION: BETA10 0x100489a0
|
||||
void Vector4::Clear()
|
||||
{
|
||||
memset(m_data, 0, sizeof(float) * 4);
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x10002b20
|
||||
// FUNCTION: BETA10 0x100489e0
|
||||
float Vector4::LenSquared() const
|
||||
{
|
||||
return m_data[1] * m_data[1] + m_data[0] * m_data[0] + m_data[2] * m_data[2] + m_data[3] * m_data[3];
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x10002b40
|
||||
// FUNCTION: BETA10 0x10048a60
|
||||
void Vector4::Fill(const float& p_value)
|
||||
{
|
||||
m_data[0] = p_value;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue