mirror of
https://github.com/zeldaret/oot.git
synced 2025-07-12 19:04:38 +00:00
Use intptr in most remaining code files (#1438)
* Use intptr in most remaining code files * Fix missing uintptr_t in actor * Use u8* casts for texture pointer arithmetic * Use bg + 1 instead of casting in Room_DrawBackground2D
This commit is contained in:
parent
d307a37233
commit
232fdb75d8
15 changed files with 74 additions and 67 deletions
|
@ -217,8 +217,8 @@ void Play_Destroy(GameState* thisx) {
|
|||
void Play_Init(GameState* thisx) {
|
||||
PlayState* this = (PlayState*)thisx;
|
||||
GraphicsContext* gfxCtx = this->state.gfxCtx;
|
||||
u32 zAlloc;
|
||||
u32 zAllocAligned;
|
||||
uintptr_t zAlloc;
|
||||
uintptr_t zAllocAligned;
|
||||
size_t zAllocSize;
|
||||
Player* player;
|
||||
s32 playerStartBgCamIndex;
|
||||
|
@ -396,12 +396,11 @@ void Play_Init(GameState* thisx) {
|
|||
|
||||
osSyncPrintf("ZELDA ALLOC SIZE=%x\n", THA_GetRemaining(&this->state.tha));
|
||||
zAllocSize = THA_GetRemaining(&this->state.tha);
|
||||
zAlloc = (u32)GameState_Alloc(&this->state, zAllocSize, "../z_play.c", 2918);
|
||||
zAlloc = (uintptr_t)GameState_Alloc(&this->state, zAllocSize, "../z_play.c", 2918);
|
||||
zAllocAligned = (zAlloc + 8) & ~0xF;
|
||||
ZeldaArena_Init((void*)zAllocAligned, zAllocSize - zAllocAligned + zAlloc);
|
||||
ZeldaArena_Init((void*)zAllocAligned, zAllocSize - (zAllocAligned - zAlloc));
|
||||
// "Zelda Heap"
|
||||
osSyncPrintf("ゼルダヒープ %08x-%08x\n", zAllocAligned,
|
||||
(s32)(zAllocAligned + zAllocSize) - (s32)(zAllocAligned - zAlloc));
|
||||
osSyncPrintf("ゼルダヒープ %08x-%08x\n", zAllocAligned, zAllocAligned + zAllocSize - (s32)(zAllocAligned - zAlloc));
|
||||
|
||||
Fault_AddClient(&D_801614B8, ZeldaArena_Display, NULL, NULL);
|
||||
Actor_InitContext(this, &this->actorCtx, this->playerEntry);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue