Split makuhita_dojo.c

This commit is contained in:
Kermalis
2023-09-05 00:49:33 -04:00
parent fe77b633a7
commit 551d8eb2fd
18 changed files with 659 additions and 642 deletions

View File

@@ -24,5 +24,8 @@ struct unkStruct_203B230
u32 sub_801B3C0(Item *);
u32 sub_801B410(void);
void sub_801B450(void);
u32 sub_801B60C(u32, u8, u8);
u32 sub_801B6AC(void);
void sub_801B72C(void);
#endif // GUARD_CODE_801B3C0_H

View File

@@ -12,7 +12,10 @@ struct MissionText
};
const u8 *GetCurrentMissionText(s16);
// TODO: this should probably be bool8 but can't get a match just yet
bool32 IsMazeCompleted(s16);
bool8 sub_8097504(s16);
const u8 *sub_80975DC(u32);
// These two are definitely bool8 but can't get them to match with it yet

View File

@@ -43,5 +43,6 @@ u32 GetMaxItemsAllowed(u8 dungeon);
s8 GetRescuesAllowed(u8 dungeon);
bool8 HasCheckpoint(u8 dungeon);
s32 GetDungeonFloorCount(u8 dungeon);
void PrintYellowDungeonNametoBuffer(u8 *, DungeonLocation *);
#endif //GUARD_DUNGEON_H

View File

@@ -1,14 +1,24 @@
#ifndef GUARD_MAKUHITA_DOJO_H
#define GUARD_MAKUHITA_DOJO_H
#ifndef GUARD_MAKUHITA_DOJO1_H
#define GUARD_MAKUHITA_DOJO1_H
#include "constants/dungeon.h"
#include "file_system.h"
#include "input.h"
#include "menu.h"
#include "text.h"
enum MakuhitaDojoMode
{
MAKUHITA_DOJO_MODE_UNK0_AWAKE = 0,
MAKUHITA_DOJO_MODE_UNK1_AWAKE = 1,
MAKUHITA_DOJO_MODE_UNK2_AWAKE = 2,
MAKUHITA_DOJO_MODE_UNK3_AWAKE = 3,
MAKUHITA_DOJO_MODE_UNK4_ASLEEP = 4,
MAKUHITA_DOJO_MODE_UNK5_ASLEEP = 5,
MAKUHITA_DOJO_MODE_UNK6_ASLEEP = 6,
MAKUHITA_DOJO_MODE_UNK7_ASLEEP = 7,
};
// size: 0xCC
struct unkStruct_203B318
typedef struct MakuhitaDojoWork1
{
/* 0x0 */ u32 mode; // Corresponds to the enum: MakuhitaDojoMode
/* 0x4 */ bool32 isAsleep;
@@ -28,40 +38,12 @@ struct unkStruct_203B318
u8 unk67;
OpenedFile** unk68;
UnkTextStruct2 unk6C[4];
};
} MakuhitaDojoWork1;
// size: 0xD0
struct unkStruct_203B31C
{
s16 unk0[NUM_DUNGEON_MAZE];
/* 0x30 */ MenuInputStruct input;
u32 unk64;
UnkTextStruct2 *unk68;
UnkTextStruct2 unk6C[4];
u8 unkCC[4];
};
// mode corresponds to the enum: MakuhitaDojoMode
u32 MakuhitaDojo_New(u32 mode);
void MakuhitaDojo_Delete(void);
bool8 MakuhitaDojo_New(u32);
u32 sub_802FE58(void);
s16 sub_802FED0(void);
bool8 sub_80302E8(s32, UnkTextStruct2_sub *, u32);
u32 sub_80303AC(bool8);
s16 sub_8030418(void);
void sub_8030480(void);
enum MakuhitaDojoMode
{
MAKUHITA_DOJO_MODE_UNK0_AWAKE = 0,
MAKUHITA_DOJO_MODE_UNK1_AWAKE = 1,
MAKUHITA_DOJO_MODE_UNK2_AWAKE = 2,
MAKUHITA_DOJO_MODE_UNK3_AWAKE = 3,
MAKUHITA_DOJO_MODE_UNK4_ASLEEP = 4,
MAKUHITA_DOJO_MODE_UNK5_ASLEEP = 5,
MAKUHITA_DOJO_MODE_UNK6_ASLEEP = 6,
MAKUHITA_DOJO_MODE_UNK7_ASLEEP = 7,
};
#endif // GUARD_MAKUHITA_DOJO_H
#endif // GUARD_MAKUHITA_DOJO1_H

26
include/makuhita_dojo2.h Normal file
View File

@@ -0,0 +1,26 @@
#ifndef GUARD_MAKUHITA_DOJO2_H
#define GUARD_MAKUHITA_DOJO2_H
#include "constants/dungeon.h"
#include "input.h"
#include "text.h"
// size: 0xD0
typedef struct MakuhitaDojoWork2
{
s16 unk0[NUM_DUNGEON_MAZE];
/* 0x30 */ MenuInputStruct input;
u32 unk64;
UnkTextStruct2 *unk68;
UnkTextStruct2 unk6C[4];
u8 unkCC[4];
} MakuhitaDojoWork2;
bool8 MakuhitaDojo_ReturnFalse(void);
bool8 sub_80302E8(s32, UnkTextStruct2_sub *, u32);
u32 sub_80303AC(bool8);
s16 sub_8030418(void);
void sub_8030480(void);
#endif // GUARD_MAKUHITA_DOJO2_H