isle-portable/LEGO1/lego/legoomni/include/legobuildingmanager.h

109 lines
2.9 KiB
C
Raw Normal View History

2023-04-27 22:19:39 -04:00
#ifndef LEGOBUILDINGMANAGER_H
#define LEGOBUILDINGMANAGER_H
#include "decomp.h"
#include "misc/legotypes.h"
#include "mxcore.h"
class LegoEntity;
class LegoROI;
class LegoStorage;
class LegoWorld;
class LegoCacheSound;
class LegoPathBoundary;
// SIZE 0x2c
struct LegoBuildingInfo {
enum {
c_bit1 = 0x01,
c_bit2 = 0x02,
c_bit3 = 0x04,
c_bit4 = 0x08
};
LegoEntity* m_entity; // 0x00
const char* m_hausName; // 0x04
MxU32 m_cycle1; // 0x08
MxU32 m_cycle2; // 0x0c
MxU8 m_cycle3; // 0x10
MxS8 m_unk0x11; // 0x11
MxS8 m_initialUnk0x11; // 0x12 = initial value loaded to m_unk0x11
MxU8 m_flags; // 0x13
float m_unk0x014; // 0x14
const char* m_unk0x18; // 0x18
float m_x; // 0x1c
float m_y; // 0x20
float m_z; // 0x24
LegoPathBoundary* m_boundary; // 0x28
};
(Proposal) Adjustments to "decomp" language (#308) * Adjustments to "decomp" language * Fix a comment * Fix accidental clang-formatting * Fix order * Fix order * Remove junk * Fix OFFSET * Adjustments based on new suggestions * Annotate globals * Globals in ISLE * More globals * Merge from parser2 branch * Allow prepending space for exact marker match * To eliminate noise, require the 0x prefix on offset for marker match * fix test from previous * Count tab stops for indented functions to reduce MISSED_END_OF_FUNCTION noise * FUNCTION to SYNTHETIC where needed * Missed marker conversion on SetAtomId * pylint cleanup, remove unused code * Fix unexpected function end, add more unit tests * Be more strict about synthetic name syntax * Revert "Missed marker conversion on SetAtomId" This reverts commit d87d665127fae7dd6e5bd48d9af14a0a829bf9e2. * Revert "FUNCTION to SYNTHETIC where needed" This reverts commit 8c815418d261ba8c5f67a9a2cae349fe4ac92db8. * Implicit lookup by name for functions * Fix VTABLE SYNTHETIC and other decomp markers * Get vtable class name * Vtable marker should identify struct * No colon for SIZE comment * Update README.md * Update README.md * Update CONTRIBUTING.md * Update README.md * Update README.md * Update CONTRIBUTING.md * Update README.md * Update CONTRIBUTING.md * Fix destructor/annotation * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md --------- Co-authored-by: disinvite <disinvite@users.noreply.github.com>
2023-12-06 07:10:45 -05:00
// VTABLE: LEGO1 0x100d6f50
// SIZE 0x30
2023-10-24 19:38:27 -04:00
class LegoBuildingManager : public MxCore {
2023-04-27 22:19:39 -04:00
public:
// SIZE 0x14
struct AnimEntry {
LegoEntity* m_entity; // 0x00
LegoROI* m_roi; // 0x04
LegoTime m_time; // 0x08
float m_unk0x0c; // 0x0c
MxBool m_muted; // 0x10
};
2023-10-24 19:38:27 -04:00
LegoBuildingManager();
~LegoBuildingManager() override;
MxResult Tickle() override; // vtable+0x08
Enforce vtable match (#464) * vtable enforce * Vtable progress * IslePathActor subclasses * LegoState subclasses * LegoWorld subclasses * Presenter progress * Remaining presenters * All but two that need new files * Merge into vtable branch (#3) * Implement MxDisplaySurface::VTable0x44 (#467) * Update mxdisplaysurface.cpp * add arguments to header * Fix glitched bitmaps * WIP fixes * Match * Fix * Changes * Fixes --------- Co-authored-by: Christian Semmler <mail@csemmler.com> * Implmement PoliceState::VTable0x1c (#468) * Implmement PoliceState::VTable0x1c * Fixes --------- Co-authored-by: Christian Semmler <mail@csemmler.com> * Implement Lego3DView::Render (#470) * Implement Lego3DView::Render * use MxDouble * Revert "use MxDouble" This reverts commit a006b60e2066b79ded3e15e143a302d8fd707deb. * Begin work on Police class (#469) * Begin work on Police class * Use JukeBox::e_policeStation value * Fixes --------- Co-authored-by: Christian Semmler <mail@csemmler.com> * Implement MxDisplaySurface::CreateCursorSurface (#471) * Update mxdisplaysurface.cpp * Fixes * Update legovideomanager.cpp * Match to 100% --------- Co-authored-by: Christian Semmler <mail@csemmler.com> --------- Co-authored-by: Misha <106913236+MishaProductions@users.noreply.github.com> Co-authored-by: Christian Semmler <mail@csemmler.com> Co-authored-by: Joshua Peisach <itzswirlz2020@outlook.com> * Police fix * Finish * motocycle lower case * Update historybook.h * Update hospitalstate.h * Update jetski.h * Update legoinputmanager.h * Update legolocomotionanimpresenter.h * Update pizza.h * Update act3shark.h * Update ambulancemissionstate.h * Update bumpbouy.h * Update doors.h --------- Co-authored-by: Misha <106913236+MishaProductions@users.noreply.github.com> Co-authored-by: Christian Semmler <mail@csemmler.com> Co-authored-by: Joshua Peisach <itzswirlz2020@outlook.com>
2024-01-20 18:04:46 -05:00
(Proposal) Adjustments to "decomp" language (#308) * Adjustments to "decomp" language * Fix a comment * Fix accidental clang-formatting * Fix order * Fix order * Remove junk * Fix OFFSET * Adjustments based on new suggestions * Annotate globals * Globals in ISLE * More globals * Merge from parser2 branch * Allow prepending space for exact marker match * To eliminate noise, require the 0x prefix on offset for marker match * fix test from previous * Count tab stops for indented functions to reduce MISSED_END_OF_FUNCTION noise * FUNCTION to SYNTHETIC where needed * Missed marker conversion on SetAtomId * pylint cleanup, remove unused code * Fix unexpected function end, add more unit tests * Be more strict about synthetic name syntax * Revert "Missed marker conversion on SetAtomId" This reverts commit d87d665127fae7dd6e5bd48d9af14a0a829bf9e2. * Revert "FUNCTION to SYNTHETIC where needed" This reverts commit 8c815418d261ba8c5f67a9a2cae349fe4ac92db8. * Implicit lookup by name for functions * Fix VTABLE SYNTHETIC and other decomp markers * Get vtable class name * Vtable marker should identify struct * No colon for SIZE comment * Update README.md * Update README.md * Update CONTRIBUTING.md * Update README.md * Update README.md * Update CONTRIBUTING.md * Update README.md * Update CONTRIBUTING.md * Fix destructor/annotation * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md --------- Co-authored-by: disinvite <disinvite@users.noreply.github.com>
2023-12-06 07:10:45 -05:00
// FUNCTION: LEGO1 0x1002f930
inline const char* ClassName() const override // vtable+0x0c
2023-10-24 19:38:27 -04:00
{
// STRING: LEGO1 0x100f37d0
2023-10-24 19:38:27 -04:00
return "LegoBuildingManager";
}
static void configureLegoBuildingManager(MxS32);
static void SetCustomizeAnimFile(const char* p_value);
void Init();
void FUN_1002fa00();
void UpdatePosition(MxS32 p_index, LegoWorld* p_world);
void FUN_1002fb30();
MxResult Write(LegoStorage* p_storage);
MxResult Read(LegoStorage* p_storage);
LegoBuildingInfo* GetInfo(LegoEntity* p_entity);
MxBool IncrementVariant(LegoEntity* p_entity);
MxBool FUN_1002fe40(LegoEntity* p_entity);
MxBool FUN_1002fe80(LegoEntity* p_entity);
MxBool FUN_1002fed0(LegoEntity* p_entity);
MxU32 GetBuildingEntityId(LegoEntity* p_entity);
MxU32 FUN_1002ff40(LegoEntity*, MxBool);
MxBool FUN_10030000(LegoEntity* p_entity);
MxBool FUN_10030030(MxS32 p_index);
MxBool FUN_10030110(LegoBuildingInfo* p_data);
void ScheduleAnimation(LegoEntity* p_entity, MxU32 p_length, MxBool p_haveSound, MxBool p_unk0x28);
void FUN_10030590();
void AdjustHeight(MxS32 p_index);
MxResult FUN_10030630();
LegoBuildingInfo* GetInfoArray(MxS32& p_length);
void FUN_100307b0(LegoEntity* p_entity, MxS32 p_adjust);
static void FUN_10030800();
// SYNTHETIC: LEGO1 0x1002f940
// LegoBuildingManager::`scalar deleting destructor'
private:
static char* g_customizeAnimFile;
MxU8 m_nextVariant; // 0x08
MxU8 m_unk0x09; // 0x09
AnimEntry* m_entries[5]; // 0x0c
MxS8 m_numEntries; // 0x20
LegoCacheSound* m_sound; // 0x24
MxBool m_unk0x28; // 0x28
LegoWorld* m_world; // 0x2c
2023-04-27 22:19:39 -04:00
};
#endif // LEGOBUILDINGMANAGER_H