implement RegistrationBook::ReadyWorld(), impl/match MxDisplaySurface::CopySurface() (#678)

* implement RegistrationBook::ReadyWorld()

* don't fix the size of letterBuffer

* Fix crash in MxStillPresenter::Clone

* Implement MxDisplaySurface::CopySurface

100% match

* improve accuracy

* invert HasRegistered check

* fix legogamestate structure, documentation tweaks

* this might be cleaner actually

* Update mxdisplaysurface.cpp

* Update legogamestate.h

* don't hardcode action ids in VTable0x64

* Match ~98%

---------

Co-authored-by: Misha <106913236+MishaProductions@users.noreply.github.com>
Co-authored-by: Christian Semmler <mail@csemmler.com>
This commit is contained in:
Ramen2X
2024-03-15 21:32:06 -04:00
committed by GitHub
parent d07d7edc81
commit 6cd5ffcf1a
8 changed files with 170 additions and 63 deletions

View File

@@ -76,35 +76,35 @@ enum Script {
c_Back_Down_Bitmap = 66,
c_Info_Down_Bitmap = 67,
c_Check0_Ctl = 68,
c_Check0_Bitmap = 69,
c_Check0_Bitmap = 70,
c_Check0_Bitmap_69 = 69,
c_Check0_Bitmap_70 = 70,
c_Check1_Ctl = 71,
c_Check1_Bitmap = 72,
c_Check1_Bitmap = 73,
c_Check1_Bitmap_72 = 72,
c_Check1_Bitmap_73 = 73,
c_Check2_Ctl = 74,
c_Check2_Bitmap = 75,
c_Check2_Bitmap = 76,
c_Check2_Bitmap_75 = 75,
c_Check2_Bitmap_76 = 76,
c_Check3_Ctl = 77,
c_Check3_Bitmap = 78,
c_Check3_Bitmap = 79,
c_Check3_Bitmap_78 = 78,
c_Check3_Bitmap_79 = 79,
c_Check4_Ctl = 80,
c_Check4_Bitmap = 81,
c_Check4_Bitmap = 82,
c_Check4_Bitmap_81 = 81,
c_Check4_Bitmap_82 = 82,
c_Check5_Ctl = 83,
c_Check5_Bitmap = 84,
c_Check5_Bitmap = 85,
c_Check5_Bitmap_84 = 84,
c_Check5_Bitmap_85 = 85,
c_Check6_Ctl = 86,
c_Check6_Bitmap = 87,
c_Check6_Bitmap = 88,
c_Check6_Bitmap_87 = 87,
c_Check6_Bitmap_88 = 88,
c_Check7_Ctl = 89,
c_Check7_Bitmap = 90,
c_Check7_Bitmap = 91,
c_Check7_Bitmap_90 = 90,
c_Check7_Bitmap_91 = 91,
c_Check8_Ctl = 92,
c_Check8_Bitmap = 93,
c_Check8_Bitmap = 94,
c_Check8_Bitmap_93 = 93,
c_Check8_Bitmap_94 = 94,
c_Check9_Ctl = 95,
c_Check9_Bitmap = 96,
c_Check9_Bitmap = 97,
c_Check9_Bitmap_96 = 96,
c_Check9_Bitmap_97 = 97,
c_ConfigAnimation = 98,
c_Chptr_Model = 99,
c_DuneBugy_Model = 100,

View File

@@ -162,6 +162,8 @@ public:
inline void SetActorId(MxU8 p_actorId) { m_actorId = p_actorId; }
inline void SetUnknown0x41c(undefined4 p_unk0x41c) { m_unk0x41c = p_unk0x41c; }
inline void SetUnknown0x42c(Area p_unk0x42c) { m_unk0x42c = p_unk0x42c; }
inline Username* GetPlayersIndex(MxS32 p_index) { return &m_players[p_index]; }
inline MxS16 GetPlayerCount() { return m_playerCount; }
void SetCurrentAct(Act p_currentAct);
void FindLoadedAct();
@@ -184,15 +186,21 @@ private:
LegoBackgroundColor* m_tempBackgroundColor; // 0x1c
LegoFullScreenMovie* m_fullScreenMovie; // 0x20
MxU16 m_unk0x24; // 0x24
MxS16 m_playerCount; // 0x26
Username m_players[9]; // 0x28
History m_history; // 0xa6
undefined2 m_unk0x41a; // 0x41a
undefined4 m_unk0x41c; // 0x41c
MxBool m_isDirty; // 0x420
Area m_currentArea; // 0x424
Area m_previousArea; // 0x428
Area m_unk0x42c; // 0x42c
// Member visibility needs to be refactored, since most members are accessed directly.
public:
MxS16 m_playerCount; // 0x26
Username m_players[9]; // 0x28
private:
History m_history; // 0xa6
undefined2 m_unk0x41a; // 0x41a
undefined4 m_unk0x41c; // 0x41c
MxBool m_isDirty; // 0x420
Area m_currentArea; // 0x424
Area m_previousArea; // 0x428
Area m_unk0x42c; // 0x42c
};
MxBool ROIHandlerFunction(const char* p_input, char* p_output, MxU32 p_copyLen);

View File

@@ -69,8 +69,6 @@ public:
inline MxCoreSet& GetUnknown0xd0() { return m_set0xd0; }
inline list<LegoROI*>& GetROIList() { return m_roiList; }
inline void SetScriptIndex(MxS32 p_scriptIndex) { m_scriptIndex = p_scriptIndex; }
MxBool PresentersPending();
void Remove(MxCore* p_object);
void FUN_1001fc80(IslePathActor* p_actor);
@@ -78,6 +76,8 @@ public:
MxCore* Find(const char* p_class, const char* p_name);
MxCore* Find(const MxAtomId& p_atom, MxS32 p_entityId);
inline void SetScriptIndex(MxS32 p_scriptIndex) { m_scriptIndex = p_scriptIndex; }
// SYNTHETIC: LEGO1 0x1001dee0
// LegoWorld::`scalar deleting destructor'

View File

@@ -1,7 +1,10 @@
#ifndef REGISTRATIONBOOK_H
#define REGISTRATIONBOOK_H
#include "jukebox.h"
#include "legoworld.h"
#include "mxcontrolpresenter.h"
#include "mxstillpresenter.h"
class InfocenterState;
class MxEndActionNotificationParam;
@@ -35,29 +38,31 @@ public:
MxBool VTable0x64() override; // vtable+0x64
void Enable(MxBool p_enable) override; // vtable+0x68
inline void PlayAction(MxU32 p_objectId);
// SYNTHETIC: LEGO1 0x10076f30
// RegistrationBook::`scalar deleting destructor'
private:
undefined4 m_unk0xf8; // 0xf8
undefined m_unk0xfc; // 0xfc
undefined m_unk0xfd[3]; // 0xfd
undefined m_unk0x100[0x68]; // 0x100
undefined m_unk0x168[0x118]; // 0x168
undefined4 m_unk0xf8; // 0xf8
undefined m_unk0xfc; // 0xfc
undefined m_unk0xfd[3]; // 0xfd
MxStillPresenter* m_alphabet[26]; // 0x100
MxStillPresenter* m_name[10][7]; // 0x168
struct {
undefined4 m_unk0x00[3]; // 0x00
undefined2 m_unk0x0c; // 0x0c
undefined2 m_unk0x0e; // 0x0e
} m_unk0x280; // 0x280
undefined m_unk0x290[0x28]; // 0x290
undefined2 m_unk0x2b8; // 0x2b8
InfocenterState* m_infocenterState; // 0x2bc
undefined m_unk0x2c0; // 0x2c0
undefined m_unk0x2c1; // 0x2c1
undefined m_unk0x2c2[0x02]; // 0x2c2
undefined4 m_unk0x2c4; // 0x2c4
undefined4 m_unk0x2c8; // 0x2c8
undefined4 m_unk0x2cc; // 0x2cc
undefined4 m_unk0x00[3]; // 0x00
undefined2 m_unk0x0c; // 0x0c
undefined2 m_unk0x0e; // 0x0e
} m_unk0x280; // 0x280
MxControlPresenter* m_checkmark[10]; // 0x290
undefined2 m_unk0x2b8; // 0x2b8
InfocenterState* m_infocenterState; // 0x2bc
undefined m_unk0x2c0; // 0x2c0
undefined m_unk0x2c1; // 0x2c1
undefined m_unk0x2c2[0x02]; // 0x2c2
undefined4 m_unk0x2c4; // 0x2c4
undefined4 m_unk0x2c8; // 0x2c8
undefined4 m_unk0x2cc; // 0x2cc
MxLong HandleEndAction(MxEndActionNotificationParam& p_param);
MxLong HandleKeyPress(MxS8 p_key);