Bootstrap LegoPlantManager, add plants data (#1038)

* Bootstrap LegoPlantManager, add plants data

* Naming

* Move

* Fix
This commit is contained in:
Christian Semmler
2024-06-17 14:11:27 -04:00
committed by GitHub
parent e4e0f4e4d3
commit 1a46d370ec
7 changed files with 2048 additions and 18 deletions

View File

@@ -22,12 +22,12 @@ struct LegoBuildingInfo {
};
LegoEntity* m_entity; // 0x00
const char* m_hausName; // 0x04
const char* m_variant; // 0x04
MxU32 m_sound; // 0x08
MxU32 m_move; // 0x0c
MxU8 m_mood; // 0x10
MxS8 m_unk0x11; // 0x11
MxS8 m_initialUnk0x11; // 0x12 = initial value loaded to m_unk0x11
MxS8 m_initialUnk0x11; // 0x12 - initial value loaded to m_unk0x11
MxU8 m_flags; // 0x13
float m_unk0x014; // 0x14
const char* m_unk0x18; // 0x18

View File

@@ -5,6 +5,7 @@
#include "mxcore.h"
class LegoEntity;
class LegoPathBoundary;
class LegoROI;
class LegoStorage;
@@ -27,7 +28,7 @@ public:
void Init();
void FUN_10026360(MxS32 p_scriptIndex);
void FUN_100263a0(undefined4 p_und);
void Write(LegoStorage* p_storage);
MxResult Write(LegoStorage* p_storage);
MxResult Read(LegoStorage* p_storage);
MxBool SwitchColor(LegoEntity* p_entity);
MxBool SwitchVariant(LegoEntity* p_entity);
@@ -48,7 +49,11 @@ public:
private:
static char* g_customizeAnimFile;
undefined m_unk0x08[0x24]; // 0x08
undefined4 m_unk0x08; // 0x08
undefined m_unk0x0c; // 0x0c
undefined m_unk0x10[0x17]; // 0x10
undefined m_unk0x24; // 0x24
undefined4 m_unk0x28; // 0x28
};
#endif // LEGOPLANTMANAGER_H

View File

@@ -0,0 +1,58 @@
#ifndef LEGOPLANTS_H
#define LEGOPLANTS_H
#include "decomp.h"
#include "mxtypes.h"
class LegoEntity;
class LegoPathBoundary;
// SIZE 0x54
struct LegoPlantInfo {
enum {
c_flag1 = 0x01,
c_flag2 = 0x02,
c_flag5 = 0x10,
c_flag6 = 0x20,
c_flag16 = 0x8000,
c_flag17 = 0x10000
};
enum Variant {
e_flower = 0,
e_tree,
e_bush,
e_palm
};
enum Color {
e_white = 0,
e_black,
e_yellow,
e_red,
e_green
};
LegoEntity* m_entity; // 0x00
MxU32 m_flags; // 0x04
Variant m_variant; // 0x08
MxU32 m_sound; // 0x0c
MxU32 m_move; // 0x10
MxU8 m_mood; // 0x14
MxU8 m_color; // 0x15 - see enum for possible values
MxS8 m_unk0x16; // 0x16
MxS8 m_initialUnk0x16; // 0x17 - initial value loaded to m_unk0x16
const char* m_name; // 0x18
undefined4 m_unk0x1c; // 0x1c
float m_x; // 0x20
float m_y; // 0x24
float m_z; // 0x28
LegoPathBoundary* m_boundary; // 0x2c
float m_position[3]; // 0x30
float m_direction[3]; // 0x3c
float m_up[3]; // 0x48
};
extern LegoPlantInfo g_plantInfoInit[81];
#endif // LEGOPLANTS_H