diff --git a/src/game/game_0b69d0.c b/src/game/game_0b69d0.c index f9612ec8b..b12627d2e 100644 --- a/src/game/game_0b69d0.c +++ b/src/game/game_0b69d0.c @@ -1268,8 +1268,7 @@ void playerTickChrBody(void) if (g_Vars.currentplayer->haschrbody == false) { struct chrdata *chr; - u32 stack[3]; - s32 sp100; + s32 sp100[4]; struct modelfiledata *bodyfiledata; struct modelfiledata *headfiledata = NULL; struct modelfiledata *weaponfiledata; @@ -1391,12 +1390,12 @@ void playerTickChrBody(void) offset2 += 0x4000; bgunCalculateGunMemCapacity(); spe8 = g_Vars.currentplayer->gunmem2 + offset2; - func0f172e70(&sp100, spe8, bgunCalculateGunMemCapacity() - offset2); - bodyfiledata = func0f1a7794(g_HeadsAndBodies[bodynum].filenum, allocation + offset1, offset2 - offset1, &sp100); + func0f172e70(sp100, spe8, bgunCalculateGunMemCapacity() - offset2); + bodyfiledata = func0f1a7794(g_HeadsAndBodies[bodynum].filenum, allocation + offset1, offset2 - offset1, sp100); offset1 = ALIGN64(fileGetSize(g_HeadsAndBodies[bodynum].filenum) + offset1); if (headnum >= 0) { - headfiledata = func0f1a7794(g_HeadsAndBodies[headnum].filenum, allocation + offset1, offset2 - offset1, &sp100); + headfiledata = func0f1a7794(g_HeadsAndBodies[headnum].filenum, allocation + offset1, offset2 - offset1, sp100); offset1 = ALIGN64(fileGetSize(g_HeadsAndBodies[headnum].filenum) + offset1); } @@ -1411,7 +1410,7 @@ void playerTickChrBody(void) model->unk02 = 256; - func0f172f54(&sp100); + func0f172f54(sp100); // @TODO: Figure out these arguments osSyncPrintf("Jo using %d bytes gunmem (gunmemsize %d)\n"); @@ -1419,7 +1418,7 @@ void playerTickChrBody(void) osSyncPrintf("Gunmem: tex block free 0x%08x\n"); osSyncPrintf("Gunmem: Free at end %d\n"); - func0f172f54(&sp100); + func0f172f54(sp100); } else { // 2-4 players if (g_HeadsAndBodies[bodynum].filedata == NULL) { @@ -1494,7 +1493,7 @@ void playerTickChrBody(void) if (weaponmodelnum >= 0) { if (g_Vars.mplayerisrunning == false) { - weaponfiledata = func0f1a7794(g_ModelStates[weaponmodelnum].fileid, allocation + offset1, offset2 - offset1, &sp100); + weaponfiledata = func0f1a7794(g_ModelStates[weaponmodelnum].fileid, allocation + offset1, offset2 - offset1, sp100); fileGetSize(g_ModelStates[weaponmodelnum].fileid); modelCalculateRwDataLen(weaponfiledata); } else { diff --git a/src/game/texdecompress.c b/src/game/texdecompress.c index a9c873a51..1844d9c76 100644 --- a/src/game/texdecompress.c +++ b/src/game/texdecompress.c @@ -5897,11 +5897,10 @@ glabel func0f172f44 /* f172f50: 01cf1023 */ subu $v0,$t6,$t7 ); -GLOBAL_ASM( -glabel func0f172f54 -/* f172f54: 03e00008 */ jr $ra -/* f172f58: 8c820008 */ lw $v0,0x8($a0) -); +s32 func0f172f54(s32 *arg0) +{ + return arg0[2]; +} void func0f172f5c(Gfx *gdl, s32 arg1, s32 arg2) { diff --git a/src/include/game/texdecompress.h b/src/include/game/texdecompress.h index 2be72c9c2..ceea8569b 100644 --- a/src/include/game/texdecompress.h +++ b/src/include/game/texdecompress.h @@ -29,7 +29,7 @@ u32 func0f172b5c(void); void func0f172e70(s32 *arg0, void *arg1, s32 arg2); u32 func0f172e8c(void); u32 func0f172f44(void); -void func0f172f54(s32 *arg0); +s32 func0f172f54(s32 *arg0); void func0f172f5c(Gfx *gdl, s32 arg1, s32 arg2); void func0f173010(u32 *texturenum, s32 arg1, s32 arg2); void func0f173434(struct textureconfig *config, s32 arg1, s32 arg2, s32 arg3);