diff options
author | Gogume1er <gogume1er@gmail.com> | 2021-06-05 12:06:24 +0200 |
---|---|---|
committer | Gogume1er <gogume1er@gmail.com> | 2021-06-05 12:06:24 +0200 |
commit | e242303ff5f56ef258bef9ea7608b6db28889096 (patch) | |
tree | b3e2d485e4428aac6294e03b26365d36c91d4528 /include | |
parent | 2288e6d101397143b08ff64a38baaeedd7f2c3dd (diff) | |
parent | 33a7ec1fd719b9321357aa59460cbdb9f7779053 (diff) |
Merge branch 'master' into unkk_020851B8
# Conflicts:
# arm9/asm/unk_020851B8.s
Diffstat (limited to 'include')
-rw-r--r-- | include/GX_layers.h | 9 | ||||
-rw-r--r-- | include/game_init.h | 30 | ||||
-rw-r--r-- | include/heap.h | 40 | ||||
-rw-r--r-- | include/main.h | 30 | ||||
-rw-r--r-- | include/unk_02016B94.h | 6 |
5 files changed, 55 insertions, 60 deletions
diff --git a/include/GX_layers.h b/include/GX_layers.h index 3943d582..aca0154b 100644 --- a/include/GX_layers.h +++ b/include/GX_layers.h @@ -3,6 +3,7 @@ #include "global.h" +#include "gx.h" struct GX_LayerData { @@ -33,10 +34,10 @@ struct GraphicsBanks struct GraphicsModes { - u32 mode1; - u32 mode2; - u32 mode3; - u32 mode4; + GXDispMode dispMode; + GXBGMode bgMode; + GXBGMode subMode; + GXBG0As _2d3dMode; }; diff --git a/include/game_init.h b/include/game_init.h index 7a6e34fb..bf6569c4 100644 --- a/include/game_init.h +++ b/include/game_init.h @@ -9,26 +9,26 @@ void FUN_02015EF4(void); void Main_SetVBlankIntrCB(void (*a0)(void *), void * a1); void FUN_02015F1C(void); BOOL FUN_02015F34(void (*a0)(void *), void * a1); -void FUN_02015F6C(void); -void Main_HBlankIntr(BOOL a0); +void Main_CallHBlankCallback(void); +void Main_ToggleHBlankInterrupt(BOOL enableFlag); void FUN_02015FC8(void); void InitSystemForTheGame(void); void InitGraphicMemory(void); -void * FUN_020161A4(u32 heap_id, const char * path); -void FUN_020161F8(const char * path, void ** ptr); -u32 FUN_02016230(const s8 * str); -int FUN_020162A0(u32 a0); -int FUN_020162C8(void * a0, u32 a1); -void FUN_020162FC(void); -void * FUN_02016324(const s8 * str, u32 heap_id); -void FUN_020163BC(void); +void * AllocAndReadFile(u32 heap_id, const char * path); +void OpenAndReadWholeFile(const char * path, void ** ptr); +u32 GetFilenameHash(const s8 * str); +int GetFileCacheId(u32 hash); +int AddFileToCache(void * contents, u32 hash); +void ClearFileCache(void); +void * OpenFileCached(const s8 * str, u32 heap_id); +void InitKeypadAndTouchpad(void); void FUN_02016438(u8 a0); void FUN_02016444(u8 a0); void FUN_02016454(u8 a0); -void FUN_02016464(void); -void FUN_02016568(void); -void FUN_0201669C(int x, int y); -void FUN_020166A8(u8 a0); -void FUN_020166B8(u8 a0); +void ReadKeypadAndTocuhpad(void); +void ApplyButtonModeToInput(void); +void SetKeyRepeatTimers(int continueDelay, int startDelay); +void SetSoftResetDisableMask(u8 a0); +void ClearSoftResetDisableMask(u8 a0); #endif //POKEDIAMOND_GAME_INIT_H diff --git a/include/heap.h b/include/heap.h index de1f5f18..36c747a7 100644 --- a/include/heap.h +++ b/include/heap.h @@ -2,36 +2,30 @@ #define POKEDIAMOND_HEAP_H #include "global.h" +#include "NNS_FND_expheap.h" +#include "NNS_FND_allocator.h" -struct UnkStruct_020166C8 +struct HeapParam { - void **unk00; - void **unk04; - void **unk08; - u16 *unk0c; - u8 *unk10; - u16 unk14; - u16 unk16; - u16 unk18; - u16 unk1a; + u32 size; + OSArenaId arena; }; - -void FUN_020166C8(u32 *param0, u32 param1, u32 param2, u32 pre_size); -s32 FUN_020167F4(); -u32 FUN_0201681C(u32 param0, u32 heap_id, u32 param2); -u32 FUN_02016828(u32 param0, u32 param1, u32 param2); -u32 FUN_02016834(u32 param0, u32 param1, u32 param2, s32 param3); -void FUN_020168D0(u32 heap_id); -u32 *FUN_02016944(void *param0, u32 param1, s32 param2, u32 param3); -void FUN_02016988(); +void InitHeapSystem(const struct HeapParam *templates, u32 nTemplates, u32 totalNumHeaps, u32 pre_size); +s32 FindFirstAvailableHeapHandle(); +BOOL CreateHeap(u32 parent, u32 child, u32 size); +BOOL CreateHeapAtEnd(u32 parent, u32 child, u32 size); +BOOL CreateHeapInternal(u32 parent, u32 child, u32 size, s32 alignment); +void DestroyHeap(u32 heap_id); +void *AllocFromHeapInternal(NNSFndHeapHandle heap, u32 size, s32 alignment, u32 heap_id); +void AllocFail(); void *AllocFromHeap(u32 heap_id, u32 size); void *AllocFromHeapAtEnd(u32 heap_id, u32 size); void FreeToHeap(void *ptr); void FreeToHeapExplicit(u32 heap_id, void * ptr); -u32 FUN_02016AF8(u32 param0); -void FUN_02016B20(u32 param0, u32 param1, u32 param2); -void FUN_02016B44(void *ptr, u32 param1); -u32 FUN_02016B90(u32 param0); +u32 GF_ExpHeap_FndGetTotalFreeSize(u32 heap_id); +void GF_ExpHeap_FndInitAllocator(NNSFndAllocator * pAllocator, u32 heap_id, int alignment); +void ReallocFromHeap(void *ptr, u32 newSize); +BOOL GF_heap_c_dummy_return_true(u32 heap_id); #endif //POKEDIAMOND_HEAP_H diff --git a/include/main.h b/include/main.h index 9227d9a8..ba4d7bc2 100644 --- a/include/main.h +++ b/include/main.h @@ -79,26 +79,26 @@ struct Main s32 unk28; u32 unk2C; s32 unk30; - u32 unk34; - u32 unk38; - u32 unk3C; - u32 unk40; - u32 unk44; + u32 buttonMode; + u32 heldKeysRaw; + u32 newKeysRaw; + u32 newAndRepeatedKeysRaw; + u32 heldKeys; u32 newKeys; u32 newAndRepeatedKeys; - s32 unk50; - s32 unk54; - s32 unk58; - u16 unk5C; - u16 unk5E; - u16 unk60; - u16 unk62; - u8 unk64; + s32 keyRepeatCounter; + s32 keyRepeatContinueDelay; + s32 keyRepeatStartDelay; + u16 touchX; + u16 touchY; + u16 touchNew; + u16 touchHeld; + u8 touchpadReadAuto; u8 unk65; u8 unk66; u8 unk67; - u8 unk68; - u8 padding_69[3]; + u8 softResetDisabled; + u8 padding_69[3]; // nice s32 unk6C; }; diff --git a/include/unk_02016B94.h b/include/unk_02016B94.h index fec45cd8..d3648560 100644 --- a/include/unk_02016B94.h +++ b/include/unk_02016B94.h @@ -94,9 +94,9 @@ struct Window struct UnkStruct_02016B94_2 *FUN_02016B94(u32 heap_id); u32 FUN_02016BB8(u32 *param0); void FUN_02016BBC(const struct GraphicsModes *modes); -void FUN_02016BF4(u32 *param0, u32 param1); +void FUN_02016BF4(const struct GraphicsModes *param0, u32 param1); void FUN_02016C18( - struct UnkStruct_02016B94_2 *param0, u8 param1, struct UnkStruct_02016B94_1 *param2, u8 param3); + struct UnkStruct_02016B94_2 *param0, u8 param1, const struct UnkStruct_02016B94_1 *param2, u8 param3); void FUN_020170F4(struct UnkStruct_02016B94_2 *param0, u8 param1, u32 param2, u8 param3); u8 FUN_020177DC(u8 param0, u32 param1); void FUN_02017850(u32 param0, u8 *param1, u8 *param2); @@ -264,7 +264,7 @@ void FUN_020190EC(struct UnkStruct_02016B94_2 *param0, u8 param5); void FUN_02019150(struct UnkStruct_02016B94_2 *param0, struct Window *param1, - struct UnkStruct_02016B94_4 *param2); + const struct UnkStruct_02016B94_4 *param2); void FUN_02019178(struct Window *param0); void FUN_020191A4(struct Window *param0, int param1); void CopyWindowToVram(struct Window *param0); |