This commit is contained in:
Yanis002
2025-02-12 20:20:34 +01:00
parent bfa8a9e376
commit 30bd3562ab
24 changed files with 495 additions and 550 deletions
+21 -20
View File
@@ -1,14 +1,15 @@
#pragma once
#include "System/SysNew.hpp"
#include "global.h"
#include "types.h"
#include "System/SysNew.hpp"
#define BMG_MAGIC "MESGbmg1"
#define BMG_TAG(a, b, c, d) (((d) << 24) | ((c) << 16) | ((b) << 8) | (a))
#define BMG_GET_INF1(pGroups, flags) ((pGroups)->entries[(flags) >> 0x10].func_02037258((flags) & 0xFFFF))
#define BMG_GET_MSG_OFFSET(pGroups, flags) (BMG_GET_INF1((pGroups), (flags))->offset)
#define BMG_GET_MSG_ADDR(pGroups, flags) ((u32)(pGroups)->entries[(flags) >> 0x10].pDAT1 + (BMG_GET_MSG_OFFSET((pGroups), (flags)) & ~1))
#define BMG_GET_MSG_ADDR(pGroups, flags) \
((u32) (pGroups)->entries[(flags) >> 0x10].pDAT1 + (BMG_GET_MSG_OFFSET((pGroups), (flags)) & ~1))
enum BMGTag {
/* "INF1" */ BMG_TAG_INF1 = BMG_TAG('I', 'N', 'F', '1'),
@@ -96,14 +97,14 @@ struct SectionINF1 {
/* 0c */ u16 groupId;
/* 0e */ u8 colorId;
/* 0f */ u8 mUnk_0F[0x1]; // alignment padding?
/* 10 */ EntryINF1* entries;
/* 10 */ EntryINF1 *entries;
/* 14 */
};
enum InstrType {
/* 1 */ FLW1_TYPE_SHOW_MSG = 1,
/* 2 */ FLW1_TYPE_BRANCH = 2,
/* 3 */ FLW1_TYPE_EVENT = 3,
/* 2 */ FLW1_TYPE_BRANCH = 2,
/* 3 */ FLW1_TYPE_EVENT = 3,
/* 4 */
};
@@ -145,9 +146,9 @@ struct SectionFLW1 {
/* 04 */ u16 numInstructions;
/* 08 */ u16 numLabels;
/* 0c */ u32 mUnk_0c; // always zero?
/* 10 */ FLW1Instr* instructions;
/* 14 */ s16* flwEntries;
/* 18 */ s8* bmgFileIndices;
/* 10 */ FLW1Instr *instructions;
/* 14 */ s16 *flwEntries;
/* 18 */ s8 *bmgFileIndices;
/* 1c */
};
@@ -162,41 +163,41 @@ struct SectionFLI1 {
/* 04 */ u16 numEntries;
/* 08 */ u16 entrySize;
/* 0c */ u32 mUnk_0c; // always zero?
/* 10 */ EntryFLI1* entries;
/* 10 */ EntryFLI1 *entries;
/* 14 */
};
struct EntryDAT1 {
/* 00 */ char* text;
/* 00 */ char *text;
/* 04 */
};
struct SectionDAT1 {
/* 00 */ SectionBase base;
/* 08 */ EntryDAT1* entries;
/* 08 */ EntryDAT1 *entries;
/* 0c */
};
struct BMGFileInfo {
/* 00 */ BMGHeader* pHeader; // pointer to the file's header
/* 04 */ SectionINF1* pINF1; // pointer to the data informations (INF -> informations)
/* 08 */ SectionFLW1* pFLW1; // pointer to the message flow data (FLW -> flow)
/* 0c */ SectionFLI1* pFLI1; // pointer to the message flow index table (FLI -> flow index table)
/* 10 */ SectionDAT1* pDAT1; // pointer to the data (DAT -> data)
/* 14 */ BMGHeader* mUnk_14; // same as pHeader (?)
/* 00 */ BMGHeader *pHeader; // pointer to the file's header
/* 04 */ SectionINF1 *pINF1; // pointer to the data informations (INF -> informations)
/* 08 */ SectionFLW1 *pFLW1; // pointer to the message flow data (FLW -> flow)
/* 0c */ SectionFLI1 *pFLI1; // pointer to the message flow index table (FLI -> flow index table)
/* 10 */ SectionDAT1 *pDAT1; // pointer to the data (DAT -> data)
/* 14 */ BMGHeader *mUnk_14; // same as pHeader (?)
/* 18 */ s16 mUnk_18; // stores `func_020372f0`->param_3 value (currently undetermined purpose)
/* 1a */ s16 groupId; // stores the group id
/* 1c */
void func_020371b4();
u16 func_020371c8(u32* pFile, s16 unk_18);
EntryINF1* func_02037258(u16 param_2);
u16 func_020371c8(u32 *pFile, s16 unk_18);
EntryINF1 *func_02037258(u16 param_2);
u16 func_0203728c(unk32 param_2);
};
class BMGGroups : public SysObject {
public:
/* 00 */ BMGFileInfo* entries; // accessed with `groupId`
/* 00 */ BMGFileInfo *entries; // accessed with `groupId`
/* 04 */ s32 numEntries;
/* 08 */
+25 -25
View File
@@ -3,18 +3,18 @@
#include "global.h"
#include "types.h"
#include "System/SysNew.hpp"
#include "Message/BMG.hpp"
#include "Message/MsgProc.hpp"
#include "System/SysNew.hpp"
#include "nds/math.h"
#include "Unknown/UnkStruct_0202e1a0.hpp"
#include "Unknown/UnkStruct_0203dae0.hpp"
#include "Unknown/UnkStruct_02032f0c.hpp"
#include "Unknown/UnkStruct_02038aa0.hpp"
#include "Unknown/UnkStruct_020397f8.hpp"
#include "Unknown/UnkStruct_02035064.hpp"
#include "Unknown/UnkStruct_02037750.hpp"
#include "Unknown/UnkStruct_02038aa0.hpp"
#include "Unknown/UnkStruct_020397f8.hpp"
#include "Unknown/UnkStruct_0203dae0.hpp"
class UnkStruct_027E0C68 : public SysObject {
public:
@@ -24,27 +24,27 @@ public:
/* 0x04 */ u8 mUnk_04;
/* 0x05 */ u8 mUnk_05;
/* 0x06 */ unk16 mUnk_06;
/* 0x08 */ UnkStruct_020397f8* mUnk_08;
/* 0x08 */ UnkStruct_020397f8 *mUnk_08;
/* 0x0C */ u8 mUnk_0c;
/* 0x0C */ u8 mUnk_0d;
/* 0x0C */ unk16 mUnk_0e;
/* 0x10 */ unk16 mUnk_10;
/* 0x10 */ unk16 mUnk_12;
/* 0x14 */ BMGGroups* pGroups;
/* 0x18 */ UnkStruct_020386d8* mUnk_18[2];
/* 0x20 */ UnkStruct_02037750* mUnk_20[2];
/* 0x28 */ UnkStruct_02038aa0* mUnk_28[6]; //! TODO: is it the right type?
/* 0x40 */ UnkStruct_020397f8* mUnk_40[2]; // is array size 6?
/* 0x14 */ BMGGroups *pGroups;
/* 0x18 */ UnkStruct_020386d8 *mUnk_18[2];
/* 0x20 */ UnkStruct_02037750 *mUnk_20[2];
/* 0x28 */ UnkStruct_02038aa0 *mUnk_28[6]; //! TODO: is it the right type?
/* 0x40 */ UnkStruct_020397f8 *mUnk_40[2]; // is array size 6?
/* 0x48 */
static void func_0203643c(u32 *param_1, UnkStruct_027E0C68* param_2, u32 param_3);
static void func_0203643c(u32 *param_1, UnkStruct_027E0C68 *param_2, u32 param_3);
void func_02036490(unk32 param_2, unk32 param_3, unk32 param_4);
void func_0203665c(void);
UnkStruct_027E0C68();
~UnkStruct_027E0C68();
UnkStruct_020397f8* func_020366c4(void);
UnkStruct_020397f8* func_02036700(void);
UnkStruct_020386d8* func_0203673c(void);
UnkStruct_020397f8 *func_020366c4(void);
UnkStruct_020397f8 *func_02036700(void);
UnkStruct_020386d8 *func_0203673c(void);
bool func_02036770(u32 param_2);
unk32 func_02036798(void);
bool func_020367dc(int param_2);
@@ -52,23 +52,23 @@ public:
bool func_02036808(void);
bool func_02036824(void);
bool func_02036850(void);
void func_02036888(UnkStruct_020386d8* param_2);
bool func_020368f4(UnkStruct_02037750* param_2);
void func_02036888(UnkStruct_020386d8 *param_2);
bool func_020368f4(UnkStruct_02037750 *param_2);
void func_0203690c(unk32 param_2, unk32 param_3, unk32 param_4);
void func_02036bbc(void);
void func_02036c50(unk32 param_2);
void func_02036ca4(unk32 param_2);
bool func_02036ce4(UnkStruct_020386d8* param_2, unk32 param_3);
bool func_02036d30(UnkStruct_02037750* param_2);
bool func_02036d4c(UnkStruct_02037750* param_2);
bool func_02036ce4(UnkStruct_020386d8 *param_2, unk32 param_3);
bool func_02036d30(UnkStruct_02037750 *param_2);
bool func_02036d4c(UnkStruct_02037750 *param_2);
void func_02036d6c(void);
UnkStruct_02038aa0* func_02036da8(u32 param_2, s16* param_3);
UnkStruct_02038aa0 *func_02036da8(u32 param_2, s16 *param_3);
void func_02036edc(u32 param_2, u8 param_3);
UnkStruct_020397f8* func_02036f68(u32 param_2, u8* param_3);
UnkStruct_020386d8* func_020370d0(unk32 param_2, unk32 param_3);
UnkStruct_020386d8* func_020370e8(unk32 param_2, unk16 param_3, unk16 param_4, unk32 param_5);
void func_02037158(UnkSubClass1_02256FF8* param_2);
UnkStruct_02038aa0* func_02037178(UnkSubClass1_02256FF8* param_2);
UnkStruct_020397f8 *func_02036f68(u32 param_2, u8 *param_3);
UnkStruct_020386d8 *func_020370d0(unk32 param_2, unk32 param_3);
UnkStruct_020386d8 *func_020370e8(unk32 param_2, unk16 param_3, unk16 param_4, unk32 param_5);
void func_02037158(UnkSubClass1_02256FF8 *param_2);
UnkStruct_02038aa0 *func_02037178(UnkSubClass1_02256FF8 *param_2);
};
extern UnkStruct_027E0C68 data_027e0c68;
+25 -25
View File
@@ -1,7 +1,7 @@
#pragma once
#include "System/SysNew.hpp"
#include "Message/BMG.hpp"
#include "System/SysNew.hpp"
#include "Unknown/func_ov000_020d0644.hpp"
#include "nds/math.h"
@@ -19,41 +19,41 @@ typedef struct UnkStruct_0203b264 {
class UnkStruct_020397f8_410 {
public:
/* 0x00 */ struct UnkStruct_020397f8* mUnk_00;
/* 0x00 */ struct UnkStruct_020397f8 *mUnk_00;
/* 0x04 */
void func_0203ec34(void);
void func_0203ebe0(void);
void func_0203ebf8(void);
void func_0203ec4c(UnkStruct_0203b264* param_2, unk32 param_3, s32 param_4, s32 param_5);
void func_0203ec4c(UnkStruct_0203b264 *param_2, unk32 param_3, s32 param_4, s32 param_5);
};
// same as UnkStruct_020397f8_410?
class UnkStruct_020397f8_424 {
public:
/* 0x00 */ struct UnkStruct_020397f8* mUnk_00;
/* 0x00 */ struct UnkStruct_020397f8 *mUnk_00;
/* 0x04 */
void func_0203ee80(unk32);
void func_0203ef78(unk16, u16, unk8);
void func_0203ef78(unk16); // overload?
void func_0203ee48(void);
UnkStruct_0203b264* func_0203eeb0(unk32 param_2, unk32 param_3);
UnkStruct_0203b264 *func_0203eeb0(unk32 param_2, unk32 param_3);
};
class UnkStruct_0203dae0_114 : public SysObject {
public:
/* 0x00 (vtable) */
/* 0x04 */ unk32* mUnk_04;
/* 0x04 */ unk32 *mUnk_04;
/* 0x08 */
UnkStruct_0203dae0_114();
/* 0x00 */ virtual ~UnkStruct_0203dae0_114() override;
/* 0x08 */ virtual unk32 vfunc_08(void*);
/* 0x08 */ virtual unk32 vfunc_08(void *);
/* 0x08 */ virtual unk32 vfunc_0c(void);
/* 0x0C */
unk32* func_0203d1b4(void);
unk32 *func_0203d1b4(void);
};
struct func_02038f44_param4 {
@@ -75,15 +75,15 @@ extern "C" u32 func_01ff9b4c(unk32, unk32);
extern "C" unk32 func_0203c084(void);
extern "C" unk32 func_ov000_02079e04(void);
extern "C" unk32 func_02016fcc(unk32);
extern "C" void func_02032304(unk32*, char*, unk32, unk32, unk32);
extern "C" unk32 func_0202d5b4(char*, char*, unk32, unk32, unk32);
extern "C" void func_02032304(unk32 *, char *, unk32, unk32, unk32);
extern "C" unk32 func_0202d5b4(char *, char *, unk32, unk32, unk32);
extern unk32 data_020691a0;
extern unk32* data_02068894;
extern unk32 *data_02068894;
extern unk32 data_02056af0;
extern unk32* data_02056a00;
extern char* data_02057f08; // "MSP"
extern char* data_02057eec; // "Menu/UI_main/opening.bin"
extern char* data_02057ed8; // "MSP:opening.nclr"
extern unk32 *data_02056a00;
extern char *data_02057f08; // "MSP"
extern char *data_02057eec; // "Menu/UI_main/opening.bin"
extern char *data_02057ed8; // "MSP:opening.nclr"
struct Struct_027e0db0 {
/* 0x00 */ unk32 mUnk_00;
@@ -110,22 +110,22 @@ extern unk16 data_02056a10[];
extern unk16 data_02056a16[];
extern unk32 data_02056a04[];
extern unk32 data_027e0c38[];
extern "C" void func_0203489c(unk32, unk16, unk32*, unk32*);
extern "C" void func_020347b0(unk32, unk16, unk32*, unk32*, unk32, unk32);
extern "C" void func_0203489c(unk32, unk16, unk32 *, unk32 *);
extern "C" void func_020347b0(unk32, unk16, unk32 *, unk32 *, unk32, unk32);
extern THUMB unk32 func_0202ab48(void);
extern "C" void func_02034984(unk32, u8, unk32, unk32);
extern "C" void func_02034698(unk32, unk32, unk32*, unk32*);
extern "C" void func_02034698(unk32, unk32, unk32 *, unk32 *);
extern struct TouchControl gTouchControl;
class UnkClass_027e0e28 {
public:
unk32 func_ov000_0207bc48();
};
extern UnkClass_027e0e28* data_027e0e28;
extern UnkClass_027e0e28 *data_027e0e28;
extern u8 data_027e0c54;
extern unk32* data_ov009_0211f5b4;
extern "C" unk32 func_ov003_020f3f94(unk32*);
extern unk32* data_02057ed4;
extern unk32 *data_ov009_0211f5b4;
extern "C" unk32 func_ov003_020f3f94(unk32 *);
extern unk32 *data_02057ed4;
// see Actor.cpp
typedef struct UnkStruct_01ffbe34 {
@@ -152,11 +152,11 @@ struct UnkClass_027e1054_unk_00_unk00 {
};
struct UnkClass_027e1054_unk_00 {
/* 0x00 */ unk32 mUnk_04;
/* 0x00 */ UnkClass_027e1054_unk_00_unk00* mUnk_00;
/* 0x00 */ UnkClass_027e1054_unk_00_unk00 *mUnk_00;
};
class UnkClass_027e1054 {
public:
UnkClass_027e1054_unk_00* mUnk_00;
UnkClass_027e1054_unk_00 *mUnk_00;
unk32 mUnk_04;
void func_ov003_020f4874(void);
@@ -181,6 +181,6 @@ extern UnkClass_ov000_027e0d04 data_027e0d04;
class UnkClass_data_027e0f7c {
public:
u8* func_ov000_0209d90c(s8, s8);
u8 *func_ov000_0209d90c(s8, s8);
};
extern UnkClass_data_027e0f7c data_027e0f7c;