summaryrefslogtreecommitdiff
path: root/src/code/z_scene.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/code/z_scene.c')
-rw-r--r--src/code/z_scene.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/code/z_scene.c b/src/code/z_scene.c
index e77144528..b744af5d0 100644
--- a/src/code/z_scene.c
+++ b/src/code/z_scene.c
@@ -1,7 +1,7 @@
#include "global.h"
s32 Object_Spawn(ObjectContext* objectCtx, s16 id) {
- u32 size;
+ size_t size;
objectCtx->status[objectCtx->num].id = id;
size = objectFileTable[id].vromEnd - objectFileTable[id].vromStart;
@@ -23,8 +23,8 @@ s32 Object_Spawn(ObjectContext* objectCtx, s16 id) {
return objectCtx->num - 1;
}
-void Object_InitBank(GameState* gamestate, ObjectContext* objectCtx) {
- GlobalContext* globalCtx = (GlobalContext*)gamestate;
+void Object_InitBank(GameState* gameState, ObjectContext* objectCtx) {
+ GlobalContext* globalCtx = (GlobalContext*)gameState;
s32 pad;
u32 spaceSize;
s32 i;
@@ -49,7 +49,7 @@ void Object_InitBank(GameState* gamestate, ObjectContext* objectCtx) {
for (i = 0; i < OBJECT_EXCHANGE_BANK_MAX; i++) { objectCtx->status[i].id = 0; }
// clang-format on
- objectCtx->spaceStart = objectCtx->status[0].segment = THA_AllocEndAlign16(&gamestate->heap, spaceSize);
+ objectCtx->spaceStart = objectCtx->status[0].segment = THA_AllocEndAlign16(&gameState->heap, spaceSize);
objectCtx->spaceEnd = (void*)((u32)objectCtx->spaceStart + spaceSize);
objectCtx->mainKeepIndex = Object_Spawn(objectCtx, GAMEPLAY_KEEP);
@@ -60,7 +60,7 @@ void Object_UpdateBank(ObjectContext* objectCtx) {
s32 i;
ObjectStatus* status = &objectCtx->status[0];
RomFile* objectFile;
- u32 size;
+ size_t size;
for (i = 0; i < objectCtx->num; i++) {
if (status->id < 0) {
@@ -354,7 +354,7 @@ s32 Scene_LoadAreaTextures(GlobalContext* globalCtx, s32 fileIndex) {
{ SEGMENT_ROM_START(scene_texture_08), SEGMENT_ROM_END(scene_texture_08) },
};
u32 vromStart = sceneTextureFiles[fileIndex].vromStart;
- u32 size = sceneTextureFiles[fileIndex].vromEnd - vromStart;
+ size_t size = sceneTextureFiles[fileIndex].vromEnd - vromStart;
if (size != 0) {
globalCtx->roomCtx.unk74 = THA_AllocEndAlign16(&globalCtx->state.heap, size);