mirror of https://github.com/pret/pokeheartgold
pokeathlon checkpoint
This commit is contained in:
parent
58d475eb60
commit
e6f4967f7d
|
|
@ -6,8 +6,10 @@
|
|||
#include "overlay_manager.h"
|
||||
|
||||
// Pokeathlon course arguments structure
|
||||
// Note: Original code accesses this as a byte array (filler_0[index])
|
||||
// Offsets: 0x0-0x3=SaveData*, 0x4-0x7=mode, 0x8=field_8, 0x9=field_9, 0xE=shouldFreeHeap
|
||||
typedef struct PokeathlonCourseArgs {
|
||||
u8 filler_0[4]; // 0x000
|
||||
u8 filler_0[4]; // 0x000 - SaveData pointer (accessed via *(SaveData **)args)
|
||||
u32 mode; // 0x004 - Mode flag (1 = special mode)
|
||||
// ... more fields to be discovered
|
||||
} PokeathlonCourseArgs;
|
||||
|
|
|
|||
|
|
@ -9,10 +9,23 @@
|
|||
#include "unk_02031904.h"
|
||||
#include "unk_02035900.h"
|
||||
|
||||
// External overlay 97 function declarations (in assembly for now)
|
||||
// External functions used throughout this file (in assembly for now)
|
||||
extern int ov97_0221E5C0(OverlayManager *man, int *state); // Init
|
||||
extern int ov97_0221E5D4(OverlayManager *man, int *state); // Main/Exec
|
||||
extern int ov97_0221E69C(OverlayManager *man, int *state); // Exit
|
||||
extern void sub_02037AC0(u8 param);
|
||||
extern BOOL sub_02037B38(u8 param);
|
||||
extern void GF_AssertFail(void);
|
||||
extern BOOL ov96_021E5C2C(PokeathlonCourseData *data);
|
||||
extern BOOL ov96_021E5F24(PokeathlonCourseData *data);
|
||||
extern void *ov96_021E9A14(void);
|
||||
extern void ov96_021E87B4(int a0, void *a1, void *a2, int a3);
|
||||
extern u8 *ov96_021E8A20(void *ptr);
|
||||
extern void ov96_021E67AC(PokeathlonCourseData *data);
|
||||
extern BOOL GF_heap_c_dummy_return_true(enum HeapID heapId);
|
||||
extern void ov96_021E7F98(s32 frameCount, u32 maxValue, Pokeathlon_UnkSubStruct_B00 *result);
|
||||
extern void ov96_021E9320(void *ptr);
|
||||
extern void ov96_021E8810(void *ptr);
|
||||
|
||||
// Data tables in assembly
|
||||
extern const OverlayManagerTemplate ov96_0221A7E4; // Sub-overlay template
|
||||
|
|
@ -89,17 +102,6 @@ BOOL PokeathlonCourse_Init(OverlayManager *manager, int *state) {
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
// External functions used by Main (in assembly for now)
|
||||
extern void sub_02037AC0(u8 param);
|
||||
extern BOOL sub_02037B38(u8 param);
|
||||
extern void GF_AssertFail(void);
|
||||
extern BOOL ov96_021E5C2C(PokeathlonCourseData *data);
|
||||
extern BOOL ov96_021E5F24(PokeathlonCourseData *data);
|
||||
extern void *ov96_021E9A14(void);
|
||||
extern void ov96_021E87B4(int a0, void *a1, void *a2, int a3);
|
||||
extern u8 *ov96_021E8A20(void *ptr);
|
||||
extern void ov96_021E67AC(PokeathlonCourseData *data);
|
||||
|
||||
BOOL PokeathlonCourse_Main(OverlayManager *manager, int *state) {
|
||||
PokeathlonCourseData *data;
|
||||
PokeathlonCourseState *courseState;
|
||||
|
|
@ -204,12 +206,6 @@ BOOL PokeathlonCourse_Main(OverlayManager *manager, int *state) {
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
// External functions for Exit
|
||||
extern BOOL GF_heap_c_dummy_return_true(enum HeapID heapId);
|
||||
extern void ov96_021E7F98(s32 frameCount, u32 maxValue, Pokeathlon_UnkSubStruct_B00 *result);
|
||||
extern void ov96_021E9320(void *ptr);
|
||||
extern void ov96_021E8810(void *ptr);
|
||||
|
||||
BOOL PokeathlonCourse_Exit(OverlayManager *manager, int *state) {
|
||||
PokeathlonCourseData *data;
|
||||
PokeathlonCourseArgs *args;
|
||||
|
|
|
|||
Loading…
Reference in New Issue