1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-07-12 19:04:38 +00:00

Decomp game.c (#129)

* decomp most of game.c

* improve GameState_DrawInputDisplay matching

* fix merge conflicts

* pr suggestions

* remove builtin math functions
This commit is contained in:
krimtonz 2020-05-14 18:11:33 -05:00 committed by GitHub
parent efa9742984
commit 44ffb7ec62
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
40 changed files with 1494 additions and 1977 deletions

View file

@ -213,7 +213,7 @@ void Gameplay_Init(GlobalContext* globalCtx) {
}
SystemArena_Display();
func_800C4F20(globalCtx, 0x1D4790);
GameState_Realloc(globalCtx, 0x1D4790);
KaleidoManager_Init(globalCtx);
View_Init(&globalCtx->view, gfxCtx);
func_800F6828(0);
@ -371,7 +371,7 @@ void Gameplay_Init(GlobalContext* globalCtx) {
osSyncPrintf("ZELDA ALLOC SIZE=%x\n", THA_GetSize(&globalCtx->state.tha));
zAllocSize = THA_GetSize(&globalCtx->state.tha);
zAlloc = Game_Alloc(&globalCtx->state, zAllocSize, "../z_play.c", 2918);
zAlloc = GameState_AllocEnd(&globalCtx->state, zAllocSize, "../z_play.c", 2918);
zAllocAligned = (void*)(((u32)zAlloc + 8) & ~0xF);
ZeldaArena_Init(zAllocAligned, zAllocSize - (u32)zAllocAligned + (u32)zAlloc);
osSyncPrintf("ゼルダヒープ %08x-%08x\n", zAllocAligned,
@ -1150,7 +1150,7 @@ void Gameplay_Draw(GlobalContext* globalCtx) {
TransitionFade_Draw(&globalCtx->transitionFade, &gfxP);
if (D_801614B0.a > 0x00) {
D_80161498.color.rgba = D_801614B0.rgba;
D_80161498.primColor.rgba = D_801614B0.rgba;
func_800AD5C0(&D_80161498, &gfxP);
}
@ -1456,7 +1456,7 @@ void* Gameplay_LoadFile(GlobalContext* globalCtx, RomFile* file) {
void* allocp;
size = file->vromEnd - file->vromStart;
allocp = Game_Alloc(&globalCtx->state, size, "../z_play.c", 4692);
allocp = GameState_AllocEnd(&globalCtx->state, size, "../z_play.c", 4692);
DmaMgr_SendRequest1(allocp, file->vromStart, size, "../z_play.c", 4694);
return allocp;