mirror of
https://github.com/isledecomp/isle.git
synced 2026-01-28 18:51:16 +00:00
Add LegoCharacter init data
This commit is contained in:
parent
8778ca9f02
commit
8682f83591
@ -317,6 +317,7 @@ add_library(lego1 SHARED
|
||||
LEGO1/lego/legoomni/src/common/legoanimmmpresenter.cpp
|
||||
LEGO1/lego/legoomni/src/common/legobackgroundcolor.cpp
|
||||
LEGO1/lego/legoomni/src/common/legocharactermanager.cpp
|
||||
LEGO1/lego/legoomni/src/common/legocharacters.cpp
|
||||
LEGO1/lego/legoomni/src/common/legofullscreenmovie.cpp
|
||||
LEGO1/lego/legoomni/src/common/legogamestate.cpp
|
||||
LEGO1/lego/legoomni/src/common/legoobjectfactory.cpp
|
||||
|
||||
@ -31,28 +31,10 @@ struct LegoCharacter {
|
||||
MxU32 m_refCount; // 0x04
|
||||
};
|
||||
|
||||
struct LegoCharacterData;
|
||||
|
||||
typedef map<const char*, LegoCharacter*, LegoCharacterComparator> LegoCharacterMap;
|
||||
|
||||
// SIZE 0x108
|
||||
struct LegoCharacterData {
|
||||
// SIZE 0x18
|
||||
struct Unknown {
|
||||
undefined m_unk0x00; // 0x00 - offset used with unk0x04
|
||||
undefined4 m_unk0x04; // 0x04 - presumably pointer into global 100da40c
|
||||
undefined m_unk0x08; // 0x08 - offset used with unk0x04
|
||||
undefined4 m_unk0x0c[2]; // 0x0c
|
||||
undefined m_unk0x14; // 0x14
|
||||
};
|
||||
|
||||
char* m_name; // 0x00
|
||||
void* m_unk0x04; // 0x04
|
||||
LegoActor* m_actor; // 0x08
|
||||
MxS32 m_unk0x0c; // 0x0c
|
||||
MxS32 m_unk0x10; // 0x10
|
||||
MxU8 m_unk0x14; // 0x14
|
||||
Unknown m_unk0x18[10]; // 0x18
|
||||
};
|
||||
|
||||
// SIZE 0x08
|
||||
class LegoCharacterManager {
|
||||
public:
|
||||
|
||||
30
LEGO1/lego/legoomni/include/legocharacters.h
Normal file
30
LEGO1/lego/legoomni/include/legocharacters.h
Normal file
@ -0,0 +1,30 @@
|
||||
#ifndef LEGOCHARACTERS_H
|
||||
#define LEGOCHARACTERS_H
|
||||
|
||||
#include "decomp.h"
|
||||
#include "mxtypes.h"
|
||||
|
||||
class LegoActor;
|
||||
|
||||
// SIZE 0x108
|
||||
struct LegoCharacterData {
|
||||
// SIZE 0x18
|
||||
struct Part {
|
||||
undefined* m_unk0x00; // 0x00
|
||||
const char** m_unk0x04; // 0x04
|
||||
undefined m_unk0x08; // 0x08
|
||||
undefined* m_unk0x0c; // 0x0c
|
||||
const char** m_unk0x10; // 0x10
|
||||
undefined m_unk0x14; // 0x14
|
||||
};
|
||||
|
||||
char* m_name; // 0x00
|
||||
void* m_unk0x04; // 0x04
|
||||
LegoActor* m_actor; // 0x08
|
||||
MxS32 m_unk0x0c; // 0x0c
|
||||
MxS32 m_unk0x10; // 0x10
|
||||
MxU8 m_unk0x14; // 0x14
|
||||
Part m_parts[10]; // 0x18
|
||||
};
|
||||
|
||||
#endif // LEGOCHARACTERS_H
|
||||
@ -1,6 +1,7 @@
|
||||
#include "legocharactermanager.h"
|
||||
|
||||
#include "legoanimactor.h"
|
||||
#include "legocharacters.h"
|
||||
#include "legogamestate.h"
|
||||
#include "legovideomanager.h"
|
||||
#include "misc.h"
|
||||
@ -9,8 +10,6 @@
|
||||
|
||||
DECOMP_SIZE_ASSERT(LegoCharacter, 0x08)
|
||||
DECOMP_SIZE_ASSERT(LegoCharacterManager, 0x08)
|
||||
DECOMP_SIZE_ASSERT(LegoCharacterData::Unknown, 0x18)
|
||||
DECOMP_SIZE_ASSERT(LegoCharacterData, 0x108)
|
||||
|
||||
// GLOBAL: LEGO1 0x100da3bc
|
||||
float g_roiBoundingSphere[] = {0.000267, 0.78080797, -0.01906, 0.951612};
|
||||
@ -18,15 +17,14 @@ float g_roiBoundingSphere[] = {0.000267, 0.78080797, -0.01906, 0.951612};
|
||||
// GLOBAL: LEGO1 0x100da3cc
|
||||
float g_roiBoundingBox[] = {-0.46116599, -0.002794, -0.29944199, 0.46169999, 1.56441, 0.261321};
|
||||
|
||||
// GLOBAL: LEGO1 0x100f80c0
|
||||
LegoCharacterData g_characterDataInit[66]; // TODO: add data
|
||||
|
||||
// GLOBAL: LEGO1 0x100fc4e4
|
||||
char* LegoCharacterManager::g_customizeAnimFile = NULL;
|
||||
|
||||
// GLOBAL: LEGO1 0x10104f20
|
||||
LegoCharacterData g_characterData[66];
|
||||
|
||||
extern LegoCharacterData g_characterDataInit[66];
|
||||
|
||||
// FUNCTION: LEGO1 0x10082a20
|
||||
LegoCharacterManager::LegoCharacterManager()
|
||||
{
|
||||
@ -68,25 +66,25 @@ MxResult LegoCharacterManager::Write(LegoStorage* p_storage)
|
||||
if (p_storage->Write(&data->m_unk0x14, sizeof(data->m_unk0x14)) != SUCCESS) {
|
||||
goto done;
|
||||
}
|
||||
if (p_storage->Write(&data->m_unk0x18[1].m_unk0x08, sizeof(data->m_unk0x18[1].m_unk0x08)) != SUCCESS) {
|
||||
if (p_storage->Write(&data->m_parts[1].m_unk0x08, sizeof(data->m_parts[1].m_unk0x08)) != SUCCESS) {
|
||||
goto done;
|
||||
}
|
||||
if (p_storage->Write(&data->m_unk0x18[1].m_unk0x14, sizeof(data->m_unk0x18[1].m_unk0x14)) != SUCCESS) {
|
||||
if (p_storage->Write(&data->m_parts[1].m_unk0x14, sizeof(data->m_parts[1].m_unk0x14)) != SUCCESS) {
|
||||
goto done;
|
||||
}
|
||||
if (p_storage->Write(&data->m_unk0x18[2].m_unk0x14, sizeof(data->m_unk0x18[2].m_unk0x14)) != SUCCESS) {
|
||||
if (p_storage->Write(&data->m_parts[2].m_unk0x14, sizeof(data->m_parts[2].m_unk0x14)) != SUCCESS) {
|
||||
goto done;
|
||||
}
|
||||
if (p_storage->Write(&data->m_unk0x18[4].m_unk0x14, sizeof(data->m_unk0x18[4].m_unk0x14)) != SUCCESS) {
|
||||
if (p_storage->Write(&data->m_parts[4].m_unk0x14, sizeof(data->m_parts[4].m_unk0x14)) != SUCCESS) {
|
||||
goto done;
|
||||
}
|
||||
if (p_storage->Write(&data->m_unk0x18[5].m_unk0x14, sizeof(data->m_unk0x18[5].m_unk0x14)) != SUCCESS) {
|
||||
if (p_storage->Write(&data->m_parts[5].m_unk0x14, sizeof(data->m_parts[5].m_unk0x14)) != SUCCESS) {
|
||||
goto done;
|
||||
}
|
||||
if (p_storage->Write(&data->m_unk0x18[8].m_unk0x14, sizeof(data->m_unk0x18[8].m_unk0x14)) != SUCCESS) {
|
||||
if (p_storage->Write(&data->m_parts[8].m_unk0x14, sizeof(data->m_parts[8].m_unk0x14)) != SUCCESS) {
|
||||
goto done;
|
||||
}
|
||||
if (p_storage->Write(&data->m_unk0x18[9].m_unk0x14, sizeof(data->m_unk0x18[9].m_unk0x14)) != SUCCESS) {
|
||||
if (p_storage->Write(&data->m_parts[9].m_unk0x14, sizeof(data->m_parts[9].m_unk0x14)) != SUCCESS) {
|
||||
goto done;
|
||||
}
|
||||
}
|
||||
@ -114,25 +112,25 @@ MxResult LegoCharacterManager::Read(LegoStorage* p_storage)
|
||||
if (p_storage->Read(&data->m_unk0x14, sizeof(data->m_unk0x14)) != SUCCESS) {
|
||||
goto done;
|
||||
}
|
||||
if (p_storage->Read(&data->m_unk0x18[1].m_unk0x08, sizeof(data->m_unk0x18[1].m_unk0x08)) != SUCCESS) {
|
||||
if (p_storage->Read(&data->m_parts[1].m_unk0x08, sizeof(data->m_parts[1].m_unk0x08)) != SUCCESS) {
|
||||
goto done;
|
||||
}
|
||||
if (p_storage->Read(&data->m_unk0x18[1].m_unk0x14, sizeof(data->m_unk0x18[1].m_unk0x14)) != SUCCESS) {
|
||||
if (p_storage->Read(&data->m_parts[1].m_unk0x14, sizeof(data->m_parts[1].m_unk0x14)) != SUCCESS) {
|
||||
goto done;
|
||||
}
|
||||
if (p_storage->Read(&data->m_unk0x18[2].m_unk0x14, sizeof(data->m_unk0x18[2].m_unk0x14)) != SUCCESS) {
|
||||
if (p_storage->Read(&data->m_parts[2].m_unk0x14, sizeof(data->m_parts[2].m_unk0x14)) != SUCCESS) {
|
||||
goto done;
|
||||
}
|
||||
if (p_storage->Read(&data->m_unk0x18[4].m_unk0x14, sizeof(data->m_unk0x18[4].m_unk0x14)) != SUCCESS) {
|
||||
if (p_storage->Read(&data->m_parts[4].m_unk0x14, sizeof(data->m_parts[4].m_unk0x14)) != SUCCESS) {
|
||||
goto done;
|
||||
}
|
||||
if (p_storage->Read(&data->m_unk0x18[5].m_unk0x14, sizeof(data->m_unk0x18[5].m_unk0x14)) != SUCCESS) {
|
||||
if (p_storage->Read(&data->m_parts[5].m_unk0x14, sizeof(data->m_parts[5].m_unk0x14)) != SUCCESS) {
|
||||
goto done;
|
||||
}
|
||||
if (p_storage->Read(&data->m_unk0x18[8].m_unk0x14, sizeof(data->m_unk0x18[8].m_unk0x14)) != SUCCESS) {
|
||||
if (p_storage->Read(&data->m_parts[8].m_unk0x14, sizeof(data->m_parts[8].m_unk0x14)) != SUCCESS) {
|
||||
goto done;
|
||||
}
|
||||
if (p_storage->Read(&data->m_unk0x18[9].m_unk0x14, sizeof(data->m_unk0x18[9].m_unk0x14)) != SUCCESS) {
|
||||
if (p_storage->Read(&data->m_parts[9].m_unk0x14, sizeof(data->m_parts[9].m_unk0x14)) != SUCCESS) {
|
||||
goto done;
|
||||
}
|
||||
}
|
||||
@ -229,8 +227,8 @@ LegoROI* LegoCharacterManager::CreateROI(const char* p_key)
|
||||
entry->m_unk0x10 = pepper->m_unk0x10;
|
||||
entry->m_unk0x14 = pepper->m_unk0x14;
|
||||
|
||||
for (MxS32 i = 0; i < _countof(entry->m_unk0x18); i++) {
|
||||
entry->m_unk0x18[i] = pepper->m_unk0x18[i];
|
||||
for (MxS32 i = 0; i < _countof(entry->m_parts); i++) {
|
||||
entry->m_parts[i] = pepper->m_parts[i];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
1143
LEGO1/lego/legoomni/src/common/legocharacters.cpp
Normal file
1143
LEGO1/lego/legoomni/src/common/legocharacters.cpp
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user