summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorZelllll <56516451+Zelllll@users.noreply.github.com>2021-08-15 18:15:58 -0500
committerGitHub <noreply@github.com>2021-08-15 19:15:58 -0400
commit7551dc2b71f7c6587f96c498cbd62cfd05aa292c (patch)
tree423a519beef068e0d1ec17a0a315f90a5b504e7f /src
parent1890e751b99c2915360178c46bcfbc2cd1695a82 (diff)
Global Context And General Cleanup (#863)
* door context * renames * done * fix unintended change * all nb gone * more nb gone * merge fishing * fix size commentX * door changes suggested by dragorn * fix accidental semicolon * another * change all texture pointers to void* * error fix and format * Update src/overlays/actors/ovl_En_Bom_Bowl_Man/z_en_bom_bowl_man.c Co-authored-by: Anghelo Carvajal <anghelo.carvajal.14@sansano.usm.cl> * fix ostime * correct mistake in SkyboxContext * probably fix nonmatching * Update include/z64.h Co-authored-by: Roman971 <32455037+Roman971@users.noreply.github.com> * roman's suggestions, fix incorrect type definition in z64scene.h * typo in struct * make typedef use u8 array * forgot one * pull in master and format.sh Co-authored-by: Anghelo Carvajal <anghelo.carvajal.14@sansano.usm.cl> Co-authored-by: Dragorn421 <Dragorn421@users.noreply.github.com> Co-authored-by: Roman971 <32455037+Roman971@users.noreply.github.com>
Diffstat (limited to 'src')
-rw-r--r--src/code/audio_load.c4
-rw-r--r--src/code/game.c4
-rw-r--r--src/code/z_actor.c46
-rw-r--r--src/code/z_actor_dlftbls.c2
-rw-r--r--src/code/z_bgcheck.c54
-rw-r--r--src/code/z_demo.c16
-rw-r--r--src/code/z_kanfont.c8
-rw-r--r--src/code/z_lifemeter.c6
-rw-r--r--src/code/z_play.c8
-rw-r--r--src/code/z_room.c12
-rw-r--r--src/code/z_scene.c14
-rw-r--r--src/code/z_scene_table.c84
-rw-r--r--src/libultra_boot_O1/osGetTime.c2
-rw-r--r--src/overlays/actors/ovl_Bg_Dodoago/z_bg_dodoago.c22
-rw-r--r--src/overlays/actors/ovl_Bg_Hidan_Firewall/z_bg_hidan_firewall.c2
-rw-r--r--src/overlays/actors/ovl_Bg_Hidan_Rock/z_bg_hidan_rock.c2
-rw-r--r--src/overlays/actors/ovl_Bg_Hidan_Rsekizou/z_bg_hidan_rsekizou.c2
-rw-r--r--src/overlays/actors/ovl_Bg_Hidan_Sima/z_bg_hidan_sima.c2
-rw-r--r--src/overlays/actors/ovl_Bg_Jya_Megami/z_bg_jya_megami.c4
-rw-r--r--src/overlays/actors/ovl_Bg_Mizu_Water/z_bg_mizu_water.c10
-rw-r--r--src/overlays/actors/ovl_Bg_Spot02_Objects/z_bg_spot02_objects.c2
-rw-r--r--src/overlays/actors/ovl_Bg_Toki_Hikari/z_bg_toki_hikari.c2
-rw-r--r--src/overlays/actors/ovl_Bg_Toki_Swd/z_bg_toki_swd.c12
-rw-r--r--src/overlays/actors/ovl_Bg_Treemouth/z_bg_treemouth.c2
-rw-r--r--src/overlays/actors/ovl_Boss_Fd/z_boss_fd.c8
-rw-r--r--src/overlays/actors/ovl_Boss_Fd2/z_boss_fd2.c2
-rw-r--r--src/overlays/actors/ovl_Boss_Ganondrof/z_boss_ganondrof.c10
-rw-r--r--src/overlays/actors/ovl_Boss_Mo/z_boss_mo.c10
-rw-r--r--src/overlays/actors/ovl_Demo_Du/z_demo_du.c14
-rw-r--r--src/overlays/actors/ovl_Demo_Im/z_demo_im.c6
-rw-r--r--src/overlays/actors/ovl_Demo_Kankyo/z_demo_kankyo.c2
-rw-r--r--src/overlays/actors/ovl_Demo_Sa/z_demo_sa.c12
-rw-r--r--src/overlays/actors/ovl_Door_Killer/z_door_killer.c2
-rw-r--r--src/overlays/actors/ovl_Door_Killer/z_door_killer.h4
-rw-r--r--src/overlays/actors/ovl_Door_Shutter/z_door_shutter.c10
-rw-r--r--src/overlays/actors/ovl_En_Ani/z_en_ani.c13
-rw-r--r--src/overlays/actors/ovl_En_Anubice_Fire/z_en_anubice_fire.c5
-rw-r--r--src/overlays/actors/ovl_En_Bom_Bowl_Man/z_en_bom_bowl_man.c3
-rw-r--r--src/overlays/actors/ovl_En_Bx/z_en_bx.c2
-rw-r--r--src/overlays/actors/ovl_En_Cs/z_en_cs.c2
-rw-r--r--src/overlays/actors/ovl_En_Diving_Game/z_en_diving_game.c2
-rw-r--r--src/overlays/actors/ovl_En_Door/z_en_door.c4
-rw-r--r--src/overlays/actors/ovl_En_Du/z_en_du.c28
-rw-r--r--src/overlays/actors/ovl_En_Ex_Ruppy/z_en_ex_ruppy.c9
-rw-r--r--src/overlays/actors/ovl_En_Fd/z_en_fd.c4
-rw-r--r--src/overlays/actors/ovl_En_Fhg_Fire/z_en_fhg_fire.c2
-rw-r--r--src/overlays/actors/ovl_En_Fr/z_en_fr.c2
-rw-r--r--src/overlays/actors/ovl_En_Fw/z_en_fw.c4
-rw-r--r--src/overlays/actors/ovl_En_G_Switch/z_en_g_switch.c9
-rw-r--r--src/overlays/actors/ovl_En_Gb/z_en_gb.h2
-rw-r--r--src/overlays/actors/ovl_En_Ge1/z_en_ge1.c2
-rw-r--r--src/overlays/actors/ovl_En_Ge2/z_en_ge2.c9
-rw-r--r--src/overlays/actors/ovl_En_Ge3/z_en_ge3.c13
-rw-r--r--src/overlays/actors/ovl_En_GeldB/z_en_geldb.c6
-rw-r--r--src/overlays/actors/ovl_En_Gm/z_en_gm.c2
-rw-r--r--src/overlays/actors/ovl_En_Go/z_en_go.c2
-rw-r--r--src/overlays/actors/ovl_En_Go2/z_en_go2.c6
-rw-r--r--src/overlays/actors/ovl_En_Guest/z_en_guest.c11
-rw-r--r--src/overlays/actors/ovl_En_Holl/z_en_holl.c18
-rw-r--r--src/overlays/actors/ovl_En_Horse/z_en_horse.c19
-rw-r--r--src/overlays/actors/ovl_En_Horse_Link_Child/z_en_horse_link_child.c2
-rw-r--r--src/overlays/actors/ovl_En_Jj/z_en_jj.c9
-rw-r--r--src/overlays/actors/ovl_En_Kz/z_en_kz.c2
-rw-r--r--src/overlays/actors/ovl_En_Ma2/z_en_ma2.c26
-rw-r--r--src/overlays/actors/ovl_En_Ma3/z_en_ma3.c26
-rw-r--r--src/overlays/actors/ovl_En_Mm/z_en_mm.c2
-rw-r--r--src/overlays/actors/ovl_En_Mm2/z_en_mm2.c2
-rw-r--r--src/overlays/actors/ovl_En_Nb/z_en_nb.c8
-rw-r--r--src/overlays/actors/ovl_En_Niw_Girl/z_en_niw_girl.c2
-rw-r--r--src/overlays/actors/ovl_En_Po_Field/z_en_po_field.h2
-rw-r--r--src/overlays/actors/ovl_En_Po_Relay/z_en_po_relay.c4
-rw-r--r--src/overlays/actors/ovl_En_Rl/z_en_rl.c14
-rw-r--r--src/overlays/actors/ovl_En_Ru2/z_en_ru2.c12
-rw-r--r--src/overlays/actors/ovl_En_Sa/z_en_sa.c24
-rw-r--r--src/overlays/actors/ovl_En_Takara_Man/z_en_takara_man.c5
-rw-r--r--src/overlays/actors/ovl_En_Tk/z_en_tk.c8
-rw-r--r--src/overlays/actors/ovl_En_Tr/z_en_tr.c2
-rw-r--r--src/overlays/actors/ovl_En_Xc/z_en_xc.c10
-rw-r--r--src/overlays/actors/ovl_En_Zl1/z_en_zl1.c8
-rw-r--r--src/overlays/actors/ovl_En_Zl2/z_en_zl2.c18
-rw-r--r--src/overlays/actors/ovl_En_Zl3/z_en_zl3.c14
-rw-r--r--src/overlays/actors/ovl_En_Zl4/z_en_zl4.c6
-rw-r--r--src/overlays/actors/ovl_Fishing/z_fishing.c4
-rw-r--r--src/overlays/actors/ovl_Obj_Lightswitch/z_obj_lightswitch.c6
-rw-r--r--src/overlays/actors/ovl_Obj_Switch/z_obj_switch.c21
-rw-r--r--src/overlays/actors/ovl_Obj_Switch/z_obj_switch.h2
-rw-r--r--src/overlays/actors/ovl_player_actor/z_player.c8
-rw-r--r--src/overlays/effects/ovl_Effect_Ss_Bomb/z_eff_ss_bomb.c15
-rw-r--r--src/overlays/effects/ovl_Effect_Ss_Bomb2/z_eff_ss_bomb2.c4
-rw-r--r--src/overlays/effects/ovl_Effect_Ss_Dead_Db/z_eff_ss_dead_db.c2
-rw-r--r--src/overlays/effects/ovl_Effect_Ss_Dust/z_eff_ss_dust.c9
-rw-r--r--src/overlays/effects/ovl_Effect_Ss_G_Fire/z_eff_ss_g_fire.c4
-rw-r--r--src/overlays/effects/ovl_Effect_Ss_G_Ripple/z_eff_ss_g_ripple.c2
-rw-r--r--src/overlays/effects/ovl_Effect_Ss_G_Spk/z_eff_ss_g_spk.c15
-rw-r--r--src/overlays/effects/ovl_Effect_Ss_G_Splash/z_eff_ss_g_splash.c15
-rw-r--r--src/overlays/effects/ovl_Effect_Ss_HitMark/z_eff_ss_hitmark.c2
-rw-r--r--src/overlays/effects/ovl_Effect_Ss_Lightning/z_eff_ss_lightning.c11
-rw-r--r--src/overlays/effects/ovl_Effect_Ss_Sibuki2/z_eff_ss_sibuki2.c12
-rw-r--r--src/overlays/gamestates/ovl_select/z_select.c19
99 files changed, 462 insertions, 476 deletions
diff --git a/src/code/audio_load.c b/src/code/audio_load.c
index a5e2b83a7..15a55b0bc 100644
--- a/src/code/audio_load.c
+++ b/src/code/audio_load.c
@@ -82,8 +82,8 @@ void func_800E1618(s32 arg0) {
gAudioContext.unk_288C = gAudioContext.unk_2874;
gAudioContext.sampleDmaReqs =
- Audio_Alloc(&gAudioContext.notesAndBuffersPool,
- 4 * gAudioContext.maxSimultaneousNotes * sizeof(SampleDmaReq) * gAudioContext.audioBufferParameters.presetUnk4);
+ Audio_Alloc(&gAudioContext.notesAndBuffersPool, 4 * gAudioContext.maxSimultaneousNotes * sizeof(SampleDmaReq) *
+ gAudioContext.audioBufferParameters.presetUnk4);
t2 = 3 * gAudioContext.maxSimultaneousNotes * gAudioContext.audioBufferParameters.presetUnk4;
for (i = 0; i < t2; i++) {
temp_s0 = &gAudioContext.sampleDmaReqs[gAudioContext.sampleDmaReqCnt];
diff --git a/src/code/game.c b/src/code/game.c
index 3f4f063f7..0fbf1a155 100644
--- a/src/code/game.c
+++ b/src/code/game.c
@@ -377,8 +377,8 @@ void GameState_Realloc(GameState* gameState, size_t size) {
}
void GameState_Init(GameState* gameState, GameStateFunc init, GraphicsContext* gfxCtx) {
- u64 startTime;
- u64 endTime;
+ OSTime startTime;
+ OSTime endTime;
// game constructor start
osSyncPrintf("game コンストラクタ開始\n");
diff --git a/src/code/z_actor.c b/src/code/z_actor.c
index 6f275987c..4a8c2b33f 100644
--- a/src/code/z_actor.c
+++ b/src/code/z_actor.c
@@ -680,7 +680,7 @@ void TitleCard_InitBossName(GlobalContext* globalCtx, TitleCardContext* titleCtx
void TitleCard_InitPlaceName(GlobalContext* globalCtx, TitleCardContext* titleCtx, void* texture, s32 x, s32 y,
s32 width, s32 height, s32 delay) {
- Scene* loadedScene = globalCtx->loadedScene;
+ SceneTableEntry* loadedScene = globalCtx->loadedScene;
u32 size = loadedScene->titleFile.vromEnd - loadedScene->titleFile.vromStart;
if ((size != 0) && (size <= 0x3000)) {
@@ -1757,7 +1757,7 @@ void func_8002F994(Actor* actor, s32 arg1) {
// Tests if something hit Jabu Jabu surface, displaying hit splash and playing sfx if true
s32 func_8002F9EC(GlobalContext* globalCtx, Actor* actor, CollisionPoly* poly, s32 bgId, Vec3f* pos) {
if (func_80041D4C(&globalCtx->colCtx, poly, bgId) == 8) {
- globalCtx->unk_11D30[0] = 1;
+ globalCtx->roomCtx.unk_74[0] = 1;
CollisionCheck_BlueBlood(globalCtx, NULL, pos);
Audio_PlayActorSound2(actor, NA_SE_IT_WALL_HIT_BUYO);
return true;
@@ -1993,7 +1993,7 @@ void func_800304DC(GlobalContext* globalCtx, ActorContext* actorCtx, ActorEntry*
overlayEntry = &gActorOverlayTable[0];
for (i = 0; i < ARRAY_COUNT(gActorOverlayTable); i++) {
overlayEntry->loadedRamAddr = NULL;
- overlayEntry->nbLoaded = 0;
+ overlayEntry->numLoaded = 0;
overlayEntry++;
}
@@ -2037,12 +2037,12 @@ void Actor_UpdateAll(GlobalContext* globalCtx, ActorContext* actorCtx) {
sp74 = NULL;
unkFlag = 0;
- if (globalCtx->nbSetupActors != 0) {
+ if (globalCtx->numSetupActors != 0) {
actorEntry = &globalCtx->setupActorList[0];
- for (i = 0; i < globalCtx->nbSetupActors; i++) {
+ for (i = 0; i < globalCtx->numSetupActors; i++) {
Actor_SpawnEntry(&globalCtx->actorCtx, actorEntry++, globalCtx);
}
- globalCtx->nbSetupActors = 0;
+ globalCtx->numSetupActors = 0;
}
if (actorCtx->unk_02 != 0) {
@@ -2275,7 +2275,7 @@ void func_80030FA8(GraphicsContext* gfxCtx) {
CLOSE_DISPS(gfxCtx, "../z_actor.c", 6183);
}
-void func_8003115C(GlobalContext* globalCtx, s32 nbInvisibleActors, Actor** invisibleActors) {
+void func_8003115C(GlobalContext* globalCtx, s32 numInvisibleActors, Actor** invisibleActors) {
Actor** invisibleActor;
GraphicsContext* gfxCtx;
s32 i;
@@ -2313,17 +2313,17 @@ void func_8003115C(GlobalContext* globalCtx, s32 nbInvisibleActors, Actor** invi
func_80030FA8(gfxCtx);
// Translates to: "MAGIC LENS INVISIBLE ACTOR DISPLAY START"
- gDPNoOpString(POLY_OPA_DISP++, "魔法のメガネ 見えないActor表示 START", nbInvisibleActors);
+ gDPNoOpString(POLY_OPA_DISP++, "魔法のメガネ 見えないActor表示 START", numInvisibleActors);
invisibleActor = &invisibleActors[0];
- for (i = 0; i < nbInvisibleActors; i++) {
+ for (i = 0; i < numInvisibleActors; i++) {
// Translates to: "MAGIC LENS INVISIBLE ACTOR DISPLAY"
gDPNoOpString(POLY_OPA_DISP++, "魔法のメガネ 見えないActor表示", i);
Actor_Draw(globalCtx, *(invisibleActor++));
}
// Translates to: "MAGIC LENS INVISIBLE ACTOR DISPLAY END"
- gDPNoOpString(POLY_OPA_DISP++, "魔法のメガネ 見えないActor表示 END", nbInvisibleActors);
+ gDPNoOpString(POLY_OPA_DISP++, "魔法のメガネ 見えないActor表示 END", numInvisibleActors);
if (globalCtx->roomCtx.curRoom.showInvisActors != 0) {
// Translates to: "BLUE SPECTACLES (EXTERIOR)"
@@ -2615,7 +2615,7 @@ Actor* Actor_RemoveFromCategory(GlobalContext* globalCtx, ActorContext* actorCtx
void Actor_FreeOverlay(ActorOverlay* actorOverlay) {
osSyncPrintf(VT_FGCOL(CYAN));
- if (actorOverlay->nbLoaded == 0) {
+ if (actorOverlay->numLoaded == 0) {
if (HREG(20) != 0) {
// Translates to: "ACTOR CLIENT IS NOW 0"
osSyncPrintf("アクタークライアントが0になりました\n");
@@ -2644,7 +2644,7 @@ void Actor_FreeOverlay(ActorOverlay* actorOverlay) {
}
} else if (HREG(20) != 0) {
// Translates to: "%d OF ACTOR CLIENT REMAINS"
- osSyncPrintf("アクタークライアントはあと %d 残っています\n", actorOverlay->nbLoaded);
+ osSyncPrintf("アクタークライアントはあと %d 残っています\n", actorOverlay->numLoaded);
}
osSyncPrintf(VT_RST);
@@ -2727,7 +2727,7 @@ Actor* Actor_Spawn(ActorContext* actorCtx, GlobalContext* globalCtx, s16 actorId
(u32)overlayEntry->vramStart - (u32)overlayEntry->loadedRamAddr, name);
osSyncPrintf(VT_RST);
- overlayEntry->nbLoaded = 0;
+ overlayEntry->numLoaded = 0;
}
actorInit = (void*)(u32)((overlayEntry->initInfo != NULL)
@@ -2757,13 +2757,13 @@ Actor* Actor_Spawn(ActorContext* actorCtx, GlobalContext* globalCtx, s16 actorId
return NULL;
}
- ASSERT(overlayEntry->nbLoaded < 255, "actor_dlftbl->clients < 255", "../z_actor.c", 7031);
+ ASSERT(overlayEntry->numLoaded < 255, "actor_dlftbl->clients < 255", "../z_actor.c", 7031);
- overlayEntry->nbLoaded++;
+ overlayEntry->numLoaded++;
if (HREG(20) != 0) {
// Translates to: "ACTOR CLIENT No. %d"
- osSyncPrintf("アクタークライアントは %d 個目です\n", overlayEntry->nbLoaded);
+ osSyncPrintf("アクタークライアントは %d 個目です\n", overlayEntry->numLoaded);
}
Lib_MemSet((u8*)actor, actorInit->instanceSize, 0);
@@ -2819,13 +2819,13 @@ Actor* Actor_SpawnAsChild(ActorContext* actorCtx, Actor* parent, GlobalContext*
void Actor_SpawnTransitionActors(GlobalContext* globalCtx, ActorContext* actorCtx) {
TransitionActorEntry* transitionActor;
- u8 nbTransitionActors;
+ u8 numActors;
s32 i;
- transitionActor = globalCtx->transitionActorList;
- nbTransitionActors = globalCtx->nbTransitionActors;
+ transitionActor = globalCtx->transiActorCtx.list;
+ numActors = globalCtx->transiActorCtx.numActors;
- for (i = 0; i < nbTransitionActors; i++) {
+ for (i = 0; i < numActors; i++) {
if (transitionActor->id >= 0) {
if (((transitionActor->sides[0].room >= 0) &&
((transitionActor->sides[0].room == globalCtx->roomCtx.curRoom.num) ||
@@ -2838,7 +2838,7 @@ void Actor_SpawnTransitionActors(GlobalContext* globalCtx, ActorContext* actorCt
(i << 0xA) + transitionActor->params);
transitionActor->id = -transitionActor->id;
- nbTransitionActors = globalCtx->nbTransitionActors;
+ numActors = globalCtx->transiActorCtx.numActors;
}
}
transitionActor++;
@@ -2897,8 +2897,8 @@ Actor* Actor_Delete(ActorContext* actorCtx, Actor* actor, GlobalContext* globalC
}
} else {
ASSERT(overlayEntry->loadedRamAddr != NULL, "actor_dlftbl->allocp != NULL", "../z_actor.c", 7251);
- ASSERT(overlayEntry->nbLoaded > 0, "actor_dlftbl->clients > 0", "../z_actor.c", 7252);
- overlayEntry->nbLoaded--;
+ ASSERT(overlayEntry->numLoaded > 0, "actor_dlftbl->clients > 0", "../z_actor.c", 7252);
+ overlayEntry->numLoaded--;
Actor_FreeOverlay(overlayEntry);
}
diff --git a/src/code/z_actor_dlftbls.c b/src/code/z_actor_dlftbls.c
index eccf2e948..7d26cb86a 100644
--- a/src/code/z_actor_dlftbls.c
+++ b/src/code/z_actor_dlftbls.c
@@ -519,7 +519,7 @@ void ActorOverlayTable_FaultPrint(void* arg0, void* arg1) {
overlaySize = (u32)overlayEntry->vramEnd - (u32)overlayEntry->vramStart;
if (overlayEntry->loadedRamAddr != NULL) {
FaultDrawer_Printf("%3d %08x-%08x %3d %s\n", i, overlayEntry->loadedRamAddr,
- (u32)overlayEntry->loadedRamAddr + overlaySize, overlayEntry->nbLoaded,
+ (u32)overlayEntry->loadedRamAddr + overlaySize, overlayEntry->numLoaded,
overlayEntry->name != NULL ? overlayEntry->name : "");
}
}
diff --git a/src/code/z_bgcheck.c b/src/code/z_bgcheck.c
index ae2c41ef2..32c951d12 100644
--- a/src/code/z_bgcheck.c
+++ b/src/code/z_bgcheck.c
@@ -1377,7 +1377,7 @@ u32 BgCheck_InitializeStaticLookup(CollisionContext* colCtx, GlobalContext* glob
spA4->ceiling.head = SS_NULL;
}
- polyMax = colHeader->nbPolygons;
+ polyMax = colHeader->numPolygons;
vtxList = colHeader->vtxList;
polyList = colHeader->polyList;
sp98 = colCtx->subdivAmount.x * colCtx->subdivAmount.y;
@@ -1581,7 +1581,7 @@ void BgCheck_Allocate(CollisionContext* colCtx, GlobalContext* globalCtx, Collis
BgCheck_SetSubdivisionDimension(colCtx->minBounds.z, colCtx->subdivAmount.z, &colCtx->maxBounds.z,
&colCtx->subdivLength.z, &colCtx->subdivLengthInv.z);
memSize = colCtx->subdivAmount.x * sizeof(StaticLookup) * colCtx->subdivAmount.y * colCtx->subdivAmount.z +
- colCtx->colHeader->nbPolygons * sizeof(u8) + colCtx->dyna.polyNodesMax * sizeof(SSNode) +
+ colCtx->colHeader->numPolygons * sizeof(u8) + colCtx->dyna.polyNodesMax * sizeof(SSNode) +
colCtx->dyna.polyListMax * sizeof(CollisionPoly) + colCtx->dyna.vtxListMax * sizeof(Vec3s) +
sizeof(CollisionContext);
if (customNodeListMax > 0) {
@@ -1596,7 +1596,7 @@ void BgCheck_Allocate(CollisionContext* colCtx, GlobalContext* globalCtx, Collis
}
SSNodeList_Initialize(&colCtx->polyNodes);
- SSNodeList_Alloc(globalCtx, &colCtx->polyNodes, tblMax, colCtx->colHeader->nbPolygons);
+ SSNodeList_Alloc(globalCtx, &colCtx->polyNodes, tblMax, colCtx->colHeader->numPolygons);
lookupTblMemSize = BgCheck_InitializeStaticLookup(colCtx, globalCtx, colCtx->lookupTbl);
osSyncPrintf(VT_FGCOL(GREEN));
@@ -2151,7 +2151,7 @@ s32 BgCheck_CheckLineImpl(CollisionContext* colCtx, u16 xpFlags1, u16 xpFlags2,
}
}
- BgCheck_ResetPolyCheckTbl(&colCtx->polyNodes, colCtx->colHeader->nbPolygons);
+ BgCheck_ResetPolyCheckTbl(&colCtx->polyNodes, colCtx->colHeader->numPolygons);
BgCheck_GetStaticLookupIndicesFromPos(colCtx, posA, (Vec3i*)&subdivMin);
BgCheck_GetStaticLookupIndicesFromPos(colCtx, &posBTemp, (Vec3i*)&subdivMax);
*posResult = *posB;
@@ -2766,29 +2766,29 @@ void DynaPoly_ExpandSRT(GlobalContext* globalCtx, DynaCollisionContext* dyna, s3
return;
}
- if (!(dyna->polyListMax >= *polyStartIndex + pbgdata->nbPolygons)) {
+ if (!(dyna->polyListMax >= *polyStartIndex + pbgdata->numPolygons)) {
osSyncPrintf(VT_FGCOL(RED));
- // do not use if %d[*polyStartIndex + pbgdata->nbPolygons] exceeds %d[dyna->polyListMax]
+ // do not use if %d[*polyStartIndex + pbgdata->numPolygons] exceeds %d[dyna->polyListMax]
osSyncPrintf("DynaPolyInfo_expandSRT():polygon over %dが%dを越えるとダメ\n",
- *polyStartIndex + pbgdata->nbPolygons, dyna->polyListMax);
+ *polyStartIndex + pbgdata->numPolygons, dyna->polyListMax);
}
- if (!(dyna->vtxListMax >= *vtxStartIndex + pbgdata->nbVertices)) {
+ if (!(dyna->vtxListMax >= *vtxStartIndex + pbgdata->numVertices)) {
osSyncPrintf(VT_FGCOL(RED));
- // do not use if %d[*vtxStartIndex + pbgdata->nbVertices] exceeds %d[dyna->vtxListMax]
+ // do not use if %d[*vtxStartIndex + pbgdata->numVertices] exceeds %d[dyna->vtxListMax]
osSyncPrintf("DynaPolyInfo_expandSRT():vertex over %dが%dを越えるとダメ\n",
- *vtxStartIndex + pbgdata->nbVertices, dyna->vtxListMax);
+ *vtxStartIndex + pbgdata->numVertices, dyna->vtxListMax);
}
- ASSERT(dyna->polyListMax >= *polyStartIndex + pbgdata->nbPolygons,
+ ASSERT(dyna->polyListMax >= *polyStartIndex + pbgdata->numPolygons,
"pdyna_poly_info->poly_num >= *pstart_poly_index + pbgdata->poly_num", "../z_bgcheck.c", 6687);
- ASSERT(dyna->vtxListMax >= *vtxStartIndex + pbgdata->nbVertices,
+ ASSERT(dyna->vtxListMax >= *vtxStartIndex + pbgdata->numVertices,
"pdyna_poly_info->vert_num >= *pstart_vert_index + pbgdata->vtx_num", "../z_bgcheck.c", 6688);
if (!(dyna->bitFlag & DYNAPOLY_INVALIDATE_LOOKUP) &&
(BgActor_IsTransformUnchanged(&dyna->bgActors[bgId]) == true)) {
s32 pi;
- for (pi = *polyStartIndex; pi < *polyStartIndex + pbgdata->nbPolygons; pi++) {
+ for (pi = *polyStartIndex; pi < *polyStartIndex + pbgdata->numPolygons; pi++) {
CollisionPoly* poly = &dyna->polyList[pi];
s16 normalY = poly->normal.y;
@@ -2807,8 +2807,8 @@ void DynaPoly_ExpandSRT(GlobalContext* globalCtx, DynaCollisionContext* dyna, s3
}
}
- *polyStartIndex += pbgdata->nbPolygons;
- *vtxStartIndex += pbgdata->nbVertices;
+ *polyStartIndex += pbgdata->numPolygons;
+ *vtxStartIndex += pbgdata->numVertices;
} else {
SkinMatrix_SetScaleRotateYRPTranslate(
&mtx, dyna->bgActors[bgId].curTransform.scale.x, dyna->bgActors[bgId].curTransform.scale.y,
@@ -2817,9 +2817,9 @@ void DynaPoly_ExpandSRT(GlobalContext* globalCtx, DynaCollisionContext* dyna, s3
dyna->bgActors[bgId].curTransform.pos.x, dyna->bgActors[bgId].curTransform.pos.y,
dyna->bgActors[bgId].curTransform.pos.z);
- numVtxInverse = 1.0f / pbgdata->nbVertices;
+ numVtxInverse = 1.0f / pbgdata->numVertices;
newCenterPoint.x = newCenterPoint.y = newCenterPoint.z = 0.0f;
- for (i = 0; i < pbgdata->nbVertices; i++) {
+ for (i = 0; i < pbgdata->numVertices; i++) {
Vec3f vtx;
Vec3f vtxT; // Vtx after mtx transform
Math_Vec3s_ToVec3f(&vtx, &pbgdata->vtxList[i]);
@@ -2846,7 +2846,7 @@ void DynaPoly_ExpandSRT(GlobalContext* globalCtx, DynaCollisionContext* dyna, s3
sphere->center.z = newCenterPoint.z;
newRadiusSq = -100.0f;
- for (i = 0; i < pbgdata->nbVertices; i++) {
+ for (i = 0; i < pbgdata->numVertices; i++) {
f32 radiusSq;
newVtx.x = dyna->vtxList[*vtxStartIndex + i].x;
newVtx.y = dyna->vtxList[*vtxStartIndex + i].y;
@@ -2859,7 +2859,7 @@ void DynaPoly_ExpandSRT(GlobalContext* globalCtx, DynaCollisionContext* dyna, s3
sphere->radius = sqrtf(newRadiusSq) * 1.1f;
- for (i = 0; i < pbgdata->nbPolygons; i++) {
+ for (i = 0; i < pbgdata->numPolygons; i++) {
CollisionPoly* newPoly = &dyna->polyList[*polyStartIndex + i];
f32 newNormMagnitude;
*newPoly = pbgdata->polyList[i];
@@ -2905,8 +2905,8 @@ void DynaPoly_ExpandSRT(GlobalContext* globalCtx, DynaCollisionContext* dyna, s3
}
}
- *polyStartIndex += pbgdata->nbPolygons;
- *vtxStartIndex += pbgdata->nbVertices;
+ *polyStartIndex += pbgdata->numPolygons;
+ *vtxStartIndex += pbgdata->numVertices;
}
}
@@ -4187,11 +4187,11 @@ s32 WaterBox_GetSurfaceImpl(GlobalContext* globalCtx, CollisionContext* colCtx,
u32 room;
WaterBox* curWaterBox;
- if (colHeader->nbWaterBoxes == 0 || colHeader->waterBoxes == PHYSICAL_TO_VIRTUAL(gSegments[0])) {
+ if (colHeader->numWaterBoxes == 0 || colHeader->waterBoxes == PHYSICAL_TO_VIRTUAL(gSegments[0])) {
return false;
}
- for (curWaterBox = colHeader->waterBoxes; curWaterBox < colHeader->waterBoxes + colHeader->nbWaterBoxes;
+ for (curWaterBox = colHeader->waterBoxes; curWaterBox < colHeader->waterBoxes + colHeader->numWaterBoxes;
curWaterBox++) {
room = (curWaterBox->properties >> 13) & 0x3F;
if (room == (u32)globalCtx->roomCtx.curRoom.num || room == 0x3F) {
@@ -4223,12 +4223,12 @@ s32 WaterBox_GetSurface2(GlobalContext* globalCtx, CollisionContext* colCtx, Vec
WaterBox* waterBox;
WaterBox* waterBoxList = colHeader->waterBoxes; // unused, needed for matching
- if (colHeader->nbWaterBoxes == 0 || colHeader->waterBoxes == PHYSICAL_TO_VIRTUAL(gSegments[0])) {
+ if (colHeader->numWaterBoxes == 0 || colHeader->waterBoxes == PHYSICAL_TO_VIRTUAL(gSegments[0])) {
*outWaterBox = NULL;
return -1;
}
- for (i = 0; i < colHeader->nbWaterBoxes; i++) {
+ for (i = 0; i < colHeader->numWaterBoxes; i++) {
waterBox = &colHeader->waterBoxes[i];
room = WATERBOX_ROOM(waterBox->properties);
@@ -4297,11 +4297,11 @@ s32 func_800425B0(GlobalContext* globalCtx, CollisionContext* colCtx, f32 x, f32
u32 room;
WaterBox* curWaterBox;
- if (colHeader->nbWaterBoxes == 0 || colHeader->waterBoxes == PHYSICAL_TO_VIRTUAL(gSegments[0])) {
+ if (colHeader->numWaterBoxes == 0 || colHeader->waterBoxes == PHYSICAL_TO_VIRTUAL(gSegments[0])) {
return false;
}
- for (curWaterBox = colHeader->waterBoxes; curWaterBox < colHeader->waterBoxes + colHeader->nbWaterBoxes;
+ for (curWaterBox = colHeader->waterBoxes; curWaterBox < colHeader->waterBoxes + colHeader->numWaterBoxes;
curWaterBox++) {
room = (curWaterBox->properties >> 0xD) & 0x3F;
if ((room == (u32)globalCtx->roomCtx.curRoom.num) || (room == 0x3F)) {
diff --git a/src/code/z_demo.c b/src/code/z_demo.c
index 71bc52ea5..a8d5b318b 100644
--- a/src/code/z_demo.c
+++ b/src/code/z_demo.c
@@ -219,8 +219,8 @@ void func_80064824(GlobalContext* globalCtx, CutsceneContext* csCtx, CsCmdBase*
}
break;
case 8:
- if (globalCtx->unk_11D30[0] < 0x80) {
- globalCtx->unk_11D30[0] += 4;
+ if (globalCtx->roomCtx.unk_74[0] < 0x80) {
+ globalCtx->roomCtx.unk_74[0] += 4;
}
break;
case 9:
@@ -230,13 +230,13 @@ void func_80064824(GlobalContext* globalCtx, CutsceneContext* csCtx, CsCmdBase*
Flags_SetEnv(globalCtx, 1);
break;
case 11:
- if (globalCtx->unk_11D30[0] < 0x672) {
- globalCtx->unk_11D30[0] += 0x14;
+ if (globalCtx->roomCtx.unk_74[0] < 0x672) {
+ globalCtx->roomCtx.unk_74[0] += 0x14;
}
if (csCtx->frames == 0x30F) {
func_80078884(NA_SE_EV_DEKU_DEATH);
} else if (csCtx->frames == 0x2CD) {
- globalCtx->unk_11D30[0] = 0;
+ globalCtx->roomCtx.unk_74[0] = 0;
}
break;
case 12:
@@ -247,11 +247,11 @@ void func_80064824(GlobalContext* globalCtx, CutsceneContext* csCtx, CsCmdBase*
}
break;
case 13:
- if (globalCtx->unk_11D30[1] == 0) {
+ if (globalCtx->roomCtx.unk_74[1] == 0) {
func_80078884(NA_SE_EV_TRIFORCE_FLASH);
}
- if (globalCtx->unk_11D30[1] < 0xFF) {
- globalCtx->unk_11D30[1] += 5;
+ if (globalCtx->roomCtx.unk_74[1] < 0xFF) {
+ globalCtx->roomCtx.unk_74[1] += 5;
}
break;
case 14:
diff --git a/src/code/z_kanfont.c b/src/code/z_kanfont.c
index c38eb11aa..1bfc0dcf8 100644
--- a/src/code/z_kanfont.c
+++ b/src/code/z_kanfont.c
@@ -8,13 +8,13 @@ extern const char D_07000000[]; // start of file
extern const char D_070380D4[]; // charset message (id 0xFFFC)
extern const char D_0703811C[]; // end marker of last message
+// stubbed in PAL
void func_8006EE50(Font* font, s16 arg1, s16 arg2) {
}
-void Font_LoadChar(u32 offset, u8 character, u16 codePointIndex) {
- DmaMgr_SendRequest1(((u32)offset + codePointIndex) + 8,
- &_nes_font_staticSegmentRomStart[character * FONT_CHAR_TEX_SIZE], FONT_CHAR_TEX_SIZE,
- "../z_kanfont.c", 93);
+void Font_LoadChar(Font* font, u8 character, u16 codePointIndex) {
+ DmaMgr_SendRequest1(&font->unk_8[codePointIndex], &_nes_font_staticSegmentRomStart[character * FONT_CHAR_TEX_SIZE],
+ FONT_CHAR_TEX_SIZE, "../z_kanfont.c", 93);
}
void Font_LoadMessageBoxEndIcon(Font* font, u16 icon) {
diff --git a/src/code/z_lifemeter.c b/src/code/z_lifemeter.c
index 68bda8d01..68137f836 100644
--- a/src/code/z_lifemeter.c
+++ b/src/code/z_lifemeter.c
@@ -276,14 +276,14 @@ s32 func_80078E84(GlobalContext* globalCtx) {
return 0;
}
-u64* sHeartTextures[] = {
+static void* sHeartTextures[] = {
gHeartFullTex, gHeartQuarterTex, gHeartQuarterTex, gHeartQuarterTex,
gHeartQuarterTex, gHeartQuarterTex, gHeartHalfTex, gHeartHalfTex,
gHeartHalfTex, gHeartHalfTex, gHeartHalfTex, gHeartThreeQuarterTex,
gHeartThreeQuarterTex, gHeartThreeQuarterTex, gHeartThreeQuarterTex, gHeartThreeQuarterTex,
};
-u64* sHeartDDTextures[] = {
+static void* sHeartDDTextures[] = {
gDefenseHeartFullTex, gDefenseHeartQuarterTex, gDefenseHeartQuarterTex,
gDefenseHeartQuarterTex, gDefenseHeartQuarterTex, gDefenseHeartQuarterTex,
gDefenseHeartHalfTex, gDefenseHeartHalfTex, gDefenseHeartHalfTex,
@@ -294,7 +294,7 @@ u64* sHeartDDTextures[] = {
void HealthMeter_Draw(GlobalContext* globalCtx) {
s32 pad[5];
- UNK_PTR heartBgImg;
+ void* heartBgImg;
u32 curColorSet;
f32 offsetX;
f32 offsetY;
diff --git a/src/code/z_play.c b/src/code/z_play.c
index c6ca9b615..116c3becf 100644
--- a/src/code/z_play.c
+++ b/src/code/z_play.c
@@ -1447,10 +1447,10 @@ void Gameplay_InitScene(GlobalContext* globalCtx, s32 spawn) {
globalCtx->setupExitList = NULL;
globalCtx->cUpElfMsgs = NULL;
globalCtx->setupPathList = NULL;
- globalCtx->nbSetupActors = 0;
+ globalCtx->numSetupActors = 0;
Object_InitBank(globalCtx, &globalCtx->objectCtx);
LightContext_Init(globalCtx, &globalCtx->lightCtx);
- func_80098CBC(globalCtx, &globalCtx->nbTransitionActors);
+ TransitionActor_InitContext(&globalCtx->state, &globalCtx->transiActorCtx);
func_80096FD4(globalCtx, &globalCtx->roomCtx.curRoom);
YREG(15) = 0;
gSaveContext.worldMapArea = 0;
@@ -1459,7 +1459,7 @@ void Gameplay_InitScene(GlobalContext* globalCtx, s32 spawn) {
}
void Gameplay_SpawnScene(GlobalContext* globalCtx, s32 sceneNum, s32 spawn) {
- Scene* scene = &gSceneTable[sceneNum];
+ SceneTableEntry* scene = &gSceneTable[sceneNum];
scene->unk_13 = 0;
globalCtx->loadedScene = scene;
@@ -1787,7 +1787,7 @@ s32 func_800C0D34(GlobalContext* globalCtx, Actor* actor, s16* yaw) {
return 0;
}
- transitionActor = &globalCtx->transitionActorList[(u16)actor->params >> 10];
+ transitionActor = &globalCtx->transiActorCtx.list[(u16)actor->params >> 10];
frontRoom = transitionActor->sides[0].room;
if (frontRoom == transitionActor->sides[1].room) {
diff --git a/src/code/z_room.c b/src/code/z_room.c
index a0e454ce5..edc03a0eb 100644
--- a/src/code/z_room.c
+++ b/src/code/z_room.c
@@ -498,7 +498,7 @@ u32 func_80096FE8(GlobalContext* globalCtx, RoomContext* roomCtx) {
u32 roomSize;
s32 i;
- for (i = 0; i < globalCtx->nbRooms; i++) {
+ for (i = 0; i < globalCtx->numRooms; i++) {
roomSize = roomList[i].vromEnd - roomList[i].vromStart;
osSyncPrintf("ROOM%d size=%d\n", i, roomSize);
if (maxRoomSize < roomSize) {
@@ -506,14 +506,14 @@ u32 func_80096FE8(GlobalContext* globalCtx, RoomContext* roomCtx) {
}
}
- if (globalCtx->nbTransitionActors != 0) {
+ if (globalCtx->transiActorCtx.numActors != 0) {
s32 j;
RomFile* roomList = globalCtx->roomList;
- TransitionActorEntry* transitionActor = &globalCtx->transitionActorList[0];
+ TransitionActorEntry* transitionActor = &globalCtx->transiActorCtx.list[0];
- LOG_NUM("game_play->room_rom_address.num", globalCtx->nbRooms, "../z_room.c", 912);
+ LOG_NUM("game_play->room_rom_address.num", globalCtx->numRooms, "../z_room.c", 912);
- for (j = 0; j < globalCtx->nbTransitionActors; j++) {
+ for (j = 0; j < globalCtx->transiActorCtx.numActors; j++) {
s8 frontRoom = transitionActor->sides[0].room;
s8 backRoom = transitionActor->sides[1].room;
u32 frontRoomSize = (frontRoom < 0) ? 0 : roomList[frontRoom].vromEnd - roomList[frontRoom].vromStart;
@@ -563,7 +563,7 @@ s32 func_8009728C(GlobalContext* globalCtx, RoomContext* roomCtx, s32 roomNum) {
roomCtx->curRoom.segment = NULL;
roomCtx->status = 1;
- ASSERT(roomNum < globalCtx->nbRooms, "read_room_ID < game_play->room_rom_address.num", "../z_room.c", 1009);
+ ASSERT(roomNum < globalCtx->numRooms, "read_room_ID < game_play->room_rom_address.num", "../z_room.c", 1009);
size = globalCtx->roomList[roomNum].vromEnd - globalCtx->roomList[roomNum].vromStart;
roomCtx->unk_34 = (void*)ALIGN16((s32)roomCtx->bufPtrs[roomCtx->unk_30] - ((size + 8) * roomCtx->unk_30 + 7));
diff --git a/src/code/z_scene.c b/src/code/z_scene.c
index 64135c47b..7cd3d8c39 100644
--- a/src/code/z_scene.c
+++ b/src/code/z_scene.c
@@ -198,7 +198,7 @@ void func_80098508(GlobalContext* globalCtx, SceneCmd* cmd) {
// Scene Command 0x01: Actor List
void func_800985DC(GlobalContext* globalCtx, SceneCmd* cmd) {
- globalCtx->nbSetupActors = cmd->actorList.num;
+ globalCtx->numSetupActors = cmd->actorList.num;
globalCtx->setupActorList = SEGMENTED_TO_VIRTUAL(cmd->actorList.segment);
}
@@ -222,7 +222,7 @@ void func_80098674(GlobalContext* globalCtx, SceneCmd* cmd) {
// Scene Command 0x04: Room List
void func_800987A4(GlobalContext* globalCtx, SceneCmd* cmd) {
- globalCtx->nbRooms = cmd->roomList.num;
+ globalCtx->numRooms = cmd->roomList.num;
globalCtx->roomList = SEGMENTED_TO_VIRTUAL(cmd->roomList.segment);
}
@@ -327,17 +327,17 @@ void func_80098C24(GlobalContext* globalCtx, SceneCmd* cmd) {
// Scene Command 0x0E: Transition Actor List
void func_80098C68(GlobalContext* globalCtx, SceneCmd* cmd) {
- globalCtx->nbTransitionActors = cmd->transiActorList.num;
- globalCtx->transitionActorList = SEGMENTED_TO_VIRTUAL(cmd->transiActorList.segment);
+ globalCtx->transiActorCtx.numActors = cmd->transiActorList.num;
+ globalCtx->transiActorCtx.list = SEGMENTED_TO_VIRTUAL(cmd->transiActorList.segment);
}
-void func_80098CBC(GlobalContext* globalCtx, u8* nbTransitionActors) {
- *nbTransitionActors = 0;
+void TransitionActor_InitContext(GameState* state, TransitionActorContext* transiActorCtx) {
+ transiActorCtx->numActors = 0;
}
// Scene Command 0x0F: Light Setting List
void func_80098CC8(GlobalContext* globalCtx, SceneCmd* cmd) {
- globalCtx->envCtx.nbLightSettings = cmd->lightSettingList.num;
+ globalCtx->envCtx.numLightSettings = cmd->lightSettingList.num;
globalCtx->envCtx.lightSettingsList = SEGMENTED_TO_VIRTUAL(cmd->lightSettingList.segment);
}
diff --git a/src/code/z_scene_table.c b/src/code/z_scene_table.c
index ea81553ea..09d502f37 100644
--- a/src/code/z_scene_table.c
+++ b/src/code/z_scene_table.c
@@ -796,7 +796,7 @@ EntranceInfo gEntranceTable[] = {
#define UNTITLED_SCENE(name, unk_10, config, unk_12) \
{ (u32) _##name##SegmentRomStart, (u32)_##name##SegmentRomEnd, 0, 0, unk_10, config, unk_12, 0 }
-Scene gSceneTable[] = {
+SceneTableEntry gSceneTable[] = {
TITLED_SCENE(ydan_scene, g_pn_06, 1, 19, 2),
TITLED_SCENE(ddan_scene, g_pn_08, 1, 20, 3),
TITLED_SCENE(bdan_scene, g_pn_07, 1, 21, 4),
@@ -1023,11 +1023,11 @@ void func_80099878(GlobalContext* globalCtx) {
gSPSegment(POLY_OPA_DISP++, 0x0B, displayListHead);
gDPPipeSync(displayListHead++);
- gDPSetEnvColor(displayListHead++, 255, 255, 255, globalCtx->unk_11D30[0]);
+ gDPSetEnvColor(displayListHead++, 255, 255, 255, globalCtx->roomCtx.unk_74[0]);
gSPEndDisplayList(displayListHead++);
gSPSegment(POLY_OPA_DISP++, 0x0C, displayListHead);
gDPPipeSync(displayListHead++);
- gDPSetEnvColor(displayListHead++, 255, 255, 255, globalCtx->unk_11D30[1]);
+ gDPSetEnvColor(displayListHead++, 255, 255, 255, globalCtx->roomCtx.unk_74[1]);
gSPEndDisplayList(displayListHead);
CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 4956);
@@ -1040,7 +1040,7 @@ void func_80099BD8(GlobalContext* globalCtx) {
OPEN_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 5069);
- temp = globalCtx->unk_11D30[0] / 255.0f;
+ temp = globalCtx->roomCtx.unk_74[0] / 255.0f;
gSPSegment(POLY_XLU_DISP++, 0x08, displayListHead);
gSPSegment(POLY_OPA_DISP++, 0x08, displayListHead);
@@ -1057,7 +1057,7 @@ void func_80099BD8(GlobalContext* globalCtx) {
gSPSegment(POLY_OPA_DISP++, 0x0A, displayListHead);
gSPSegment(POLY_XLU_DISP++, 0x0A, displayListHead);
gDPPipeSync(displayListHead++);
- gDPSetEnvColor(displayListHead++, 0, 0, 0, globalCtx->unk_11D30[0]);
+ gDPSetEnvColor(displayListHead++, 0, 0, 0, globalCtx->roomCtx.unk_74[0]);
gSPEndDisplayList(displayListHead++);
gSPSegment(POLY_OPA_DISP++, 0x0B, displayListHead);
@@ -1065,7 +1065,7 @@ void func_80099BD8(GlobalContext* globalCtx) {
gDPSetPrimColor(displayListHead++, 0, 0, 89 + (u8)(166.0f * temp), 89 + (u8)(166.0f * temp),
89 + (u8)(166.0f * temp), 255);
gDPPipeSync(displayListHead++);
- gDPSetEnvColor(displayListHead++, 0, 0, 0, globalCtx->unk_11D30[0]);
+ gDPSetEnvColor(displayListHead++, 0, 0, 0, globalCtx->roomCtx.unk_74[0]);
gSPEndDisplayList(displayListHead++);
gSPSegment(POLY_OPA_DISP++, 0x0C, displayListHead);
@@ -1073,13 +1073,13 @@ void func_80099BD8(GlobalContext* globalCtx) {
gDPSetPrimColor(displayListHead++, 0, 0, 255 + (u8)(179.0f * temp), 255 + (u8)(179.0f * temp),
255 + (u8)(179.0f * temp), 255);
gDPPipeSync(displayListHead++);
- gDPSetEnvColor(displayListHead++, 0, 0, 0, globalCtx->unk_11D30[0]);
+ gDPSetEnvColor(displayListHead++, 0, 0, 0, globalCtx->roomCtx.unk_74[0]);
gSPEndDisplayList(displayListHead++);
gSPSegment(POLY_OPA_DISP++, 0x0D, displayListHead);
gSPSegment(POLY_XLU_DISP++, 0x0D, displayListHead);
gDPPipeSync(displayListHead++);
- gDPSetEnvColor(displayListHead++, 0, 0, 0, globalCtx->unk_11D30[1]);
+ gDPSetEnvColor(displayListHead++, 0, 0, 0, globalCtx->roomCtx.unk_74[1]);
gSPEndDisplayList(displayListHead);
CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 5145);
@@ -1272,8 +1272,8 @@ void func_8009B0FC(GlobalContext* globalCtx) {
if (1) {} // Necessary to match
- spB0 = (globalCtx->unk_11D30[1] >> 8) & 0xFF;
- spAC = globalCtx->unk_11D30[1] & 0xFF;
+ spB0 = (globalCtx->roomCtx.unk_74[1] >> 8) & 0xFF;
+ spAC = globalCtx->roomCtx.unk_74[1] & 0xFF;
gameplayFrames = globalCtx->gameplayFrames;
gSPSegment(POLY_XLU_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(D_8012A330[gSaveContext.nightFlag]));
@@ -1345,7 +1345,7 @@ void func_8009B86C(GlobalContext* globalCtx) {
Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, gameplayFrames * 1, 0, 32, 32, 1, 0, 0, 32, 32));
gDPPipeSync(POLY_OPA_DISP++);
- gDPSetEnvColor(POLY_OPA_DISP++, 128, 128, 128, globalCtx->unk_11D30[0]);
+ gDPSetEnvColor(POLY_OPA_DISP++, 128, 128, 128, globalCtx->roomCtx.unk_74[0]);
gDPPipeSync(POLY_XLU_DISP++);
gDPSetEnvColor(POLY_XLU_DISP++, 128, 128, 128, 145);
@@ -1654,7 +1654,7 @@ void func_8009CF84(GlobalContext* globalCtx) {
Gfx_TwoTexScrollPrimColor(globalCtx->state.gfxCtx, 0, 127 - gameplayFrames % 128,
(gameplayFrames * 1) % 128, 32, 32, 1, gameplayFrames % 128,
(gameplayFrames * 1) % 128, 32, 32, 255, 255, 255,
- globalCtx->unk_11D30[0] + 127));
+ globalCtx->roomCtx.unk_74[0] + 127));
gDPPipeSync(POLY_OPA_DISP++);
gDPSetEnvColor(POLY_OPA_DISP++, 128, 128, 128, 128);
@@ -1829,16 +1829,16 @@ void func_8009DA30(GlobalContext* globalCtx) {
gSPEndDisplayList(displayListHead);
} else {
if (gSaveContext.dayTime > 0xC555) {
- if (globalCtx->unk_11D30[0] != 255) {
- Math_StepToS(&globalCtx->unk_11D30[0], 255, 5);
+ if (globalCtx->roomCtx.unk_74[0] != 255) {
+ Math_StepToS(&globalCtx->roomCtx.unk_74[0], 255, 5);
}
} else if (gSaveContext.dayTime >= 0x4000) {
- if (globalCtx->unk_11D30[0] != 0) {
- Math_StepToS(&globalCtx->unk_11D30[0], 0, 10);
+ if (globalCtx->roomCtx.unk_74[0] != 0) {
+ Math_StepToS(&globalCtx->roomCtx.unk_74[0], 0, 10);
}
}
- gDPSetPrimColor(displayListHead++, 0, 0, 255, 255, 255, globalCtx->unk_11D30[0]);
+ gDPSetPrimColor(displayListHead++, 0, 0, 255, 255, 255, globalCtx->roomCtx.unk_74[0]);
gSPDisplayList(displayListHead++, &D_03012B20);
gSPEndDisplayList(displayListHead);
}
@@ -1922,9 +1922,9 @@ void func_8009E0B8(GlobalContext* globalCtx) {
gDPSetEnvColor(POLY_XLU_DISP++, 128, 128, 128, 128);
if (gSaveContext.sceneSetupIndex == 4) {
- spA3 = 255 - (u8)globalCtx->unk_11D30[0];
+ spA3 = 255 - (u8)globalCtx->roomCtx.unk_74[0];
} else if (gSaveContext.sceneSetupIndex == 6) {
- spA0 = globalCtx->unk_11D30[0] + 500;
+ spA0 = globalCtx->roomCtx.unk_74[0] + 500;
} else if (((gSaveContext.sceneSetupIndex < 4) || LINK_IS_ADULT) && (gSaveContext.eventChkInf[0] & 0x80)) {
spA0 = 2150;
}
@@ -1941,8 +1941,8 @@ void func_8009E0B8(GlobalContext* globalCtx) {
gSPEndDisplayList(displayListHead);
gSPSegment(POLY_OPA_DISP++, 0x0C,
- Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 0, (s16)(-globalCtx->unk_11D30[0] * 0.02f), 32, 16, 1, 0,
- (s16)(-globalCtx->unk_11D30[0] * 0.02f), 32, 16));
+ Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 0, (s16)(-globalCtx->roomCtx.unk_74[0] * 0.02f), 32, 16, 1,
+ 0, (s16)(-globalCtx->roomCtx.unk_74[0] * 0.02f), 32, 16));
CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 7044);
}
@@ -1954,16 +1954,16 @@ void func_8009E54C(GlobalContext* globalCtx) {
OPEN_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 7058);
if ((gSaveContext.sceneSetupIndex > 3) || (LINK_IS_ADULT && !(gSaveContext.eventChkInf[6] & 0x200))) {
- globalCtx->unk_11D30[0] = 87;
+ globalCtx->roomCtx.unk_74[0] = 87;
}
gameplayFrames = globalCtx->gameplayFrames;
gSPSegment(POLY_OPA_DISP++, 0x08,
Gfx_TwoTexScrollEnvColor(globalCtx->state.gfxCtx, 0, gameplayFrames, gameplayFrames, 32, 32, 1, 0, 0, 32,
- 32, 0, 0, 0, globalCtx->unk_11D30[0] + 168));
+ 32, 0, 0, 0, globalCtx->roomCtx.unk_74[0] + 168));
gSPSegment(POLY_OPA_DISP++, 0x09,
Gfx_TwoTexScrollEnvColor(globalCtx->state.gfxCtx, 0, -gameplayFrames, -gameplayFrames, 32, 32, 1, 0, 0,
- 16, 64, 0, 0, 0, globalCtx->unk_11D30[0] + 168));
+ 16, 64, 0, 0, 0, globalCtx->roomCtx.unk_74[0] + 168));
gDPPipeSync(POLY_OPA_DISP++);
gDPSetEnvColor(POLY_OPA_DISP++, 255, 255, 255, 128);
@@ -2079,12 +2079,12 @@ void func_8009EE44(GlobalContext* globalCtx) {
gDPPipeSync(POLY_OPA_DISP++);
gDPSetEnvColor(POLY_OPA_DISP++, 128, 128, 128, 128);
- if ((globalCtx->unk_11D30[0] == 0) && (INV_CONTENT(ITEM_COJIRO) == ITEM_COJIRO)) {
- if (globalCtx->unk_11D30[1] == 50) {
+ if ((globalCtx->roomCtx.unk_74[0] == 0) && (INV_CONTENT(ITEM_COJIRO) == ITEM_COJIRO)) {
+ if (globalCtx->roomCtx.unk_74[1] == 50) {
func_8002F7DC(&PLAYER->actor, NA_SE_EV_CHICKEN_CRY_M);
- globalCtx->unk_11D30[0] = 1;
+ globalCtx->roomCtx.unk_74[0] = 1;
}
- globalCtx->unk_11D30[1]++;
+ globalCtx->roomCtx.unk_74[1]++;
}
CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 7309);
@@ -2180,16 +2180,16 @@ void func_8009F5D4(GlobalContext* globalCtx) {
gSPEndDisplayList(displayListHead);
} else {
if (gSaveContext.dayTime > 0xC000) {
- if (globalCtx->unk_11D30[0] != 255) {
- Math_StepToS(&globalCtx->unk_11D30[0], 255, 5);
+ if (globalCtx->roomCtx.unk_74[0] != 255) {
+ Math_StepToS(&globalCtx->roomCtx.unk_74[0], 255, 5);
}
} else if (gSaveContext.dayTime >= 0x4000) {
- if (globalCtx->unk_11D30[0] != 0) {
- Math_StepToS(&globalCtx->unk_11D30[0], 0, 10);
+ if (globalCtx->roomCtx.unk_74[0] != 0) {
+ Math_StepToS(&globalCtx->roomCtx.unk_74[0], 0, 10);
}
}
- gDPSetPrimColor(displayListHead++, 0, 0, 255, 255, 255, globalCtx->unk_11D30[0]);
+ gDPSetPrimColor(displayListHead++, 0, 0, 255, 255, 255, globalCtx->roomCtx.unk_74[0]);
gSPDisplayList(displayListHead++, &D_0300AA48);
gSPEndDisplayList(displayListHead);
}
@@ -2339,27 +2339,27 @@ void func_8009FE58(GlobalContext* globalCtx) {
1.f + (0.39999998f * temp * Math_CosS(D_8012A3A0)), 1.f + (1 * temp * Math_CosS(D_8012A39C)));
func_800AA7AC(&globalCtx->view, 0.95f);
- switch (globalCtx->unk_11D30[0]) {
+ switch (globalCtx->roomCtx.unk_74[0]) {
case 0:
break;
case 1:
- if (globalCtx->unk_11D30[1] < 1200) {
- globalCtx->unk_11D30[1] += 200;
+ if (globalCtx->roomCtx.unk_74[1] < 1200) {
+ globalCtx->roomCtx.unk_74[1] += 200;
} else {
- globalCtx->unk_11D30[0]++;
+ globalCtx->roomCtx.unk_74[0]++;
}
break;
case 2:
- if (globalCtx->unk_11D30[1] > 0) {
- globalCtx->unk_11D30[1] -= 30;
+ if (globalCtx->roomCtx.unk_74[1] > 0) {
+ globalCtx->roomCtx.unk_74[1] -= 30;
} else {
- globalCtx->unk_11D30[1] = 0;
- globalCtx->unk_11D30[0] = 0;
+ globalCtx->roomCtx.unk_74[1] = 0;
+ globalCtx->roomCtx.unk_74[0] = 0;
}
break;
}
- D_8012A398 += 0.15f + (globalCtx->unk_11D30[1] * 0.001f);
+ D_8012A398 += 0.15f + (globalCtx->roomCtx.unk_74[1] * 0.001f);
}
if (globalCtx->roomCtx.curRoom.num == 2) {
diff --git a/src/libultra_boot_O1/osGetTime.c b/src/libultra_boot_O1/osGetTime.c
index 9a42f0611..2ca90b0df 100644
--- a/src/libultra_boot_O1/osGetTime.c
+++ b/src/libultra_boot_O1/osGetTime.c
@@ -3,7 +3,7 @@
OSTime osGetTime(void) {
u32 count;
u32 base;
- u64 t;
+ OSTime t;
register u32 prevInt = __osDisableInt();
count = osGetCount();
diff --git a/src/overlays/actors/ovl_Bg_Dodoago/z_bg_dodoago.c b/src/overlays/actors/ovl_Bg_Dodoago/z_bg_dodoago.c
index e23865341..611d98b70 100644
--- a/src/overlays/actors/ovl_Bg_Dodoago/z_bg_dodoago.c
+++ b/src/overlays/actors/ovl_Bg_Dodoago/z_bg_dodoago.c
@@ -121,7 +121,7 @@ void BgDodoago_Init(Actor* thisx, GlobalContext* globalCtx) {
if (Flags_GetSwitch(globalCtx, (this->dyna.actor.params & 0x3F))) {
BgDodoago_SetupAction(this, func_8087227C);
this->dyna.actor.shape.rot.x = 0x1333;
- globalCtx->unk_11D30[0] = globalCtx->unk_11D30[1] = 0xFF;
+ globalCtx->roomCtx.unk_74[0] = globalCtx->roomCtx.unk_74[1] = 0xFF;
return;
}
@@ -152,14 +152,14 @@ void func_80871CF4(BgDodoago* this, GlobalContext* globalCtx) {
(Math_Vec3f_Yaw(&this->dyna.actor.world.pos, &explosive->world.pos) >= this->dyna.actor.shape.rot.y) ? 1
: 0;
- if (((globalCtx->unk_11D30[0] == 0xFF) && (this->unk_164 == 1)) ||
- ((globalCtx->unk_11D30[1] == 0xFF) && (this->unk_164 == 0))) {
+ if (((globalCtx->roomCtx.unk_74[0] == 0xFF) && (this->unk_164 == 1)) ||
+ ((globalCtx->roomCtx.unk_74[1] == 0xFF) && (this->unk_164 == 0))) {
Flags_SetSwitch(globalCtx, (this->dyna.actor.params & 0x3F));
this->unk_164 = 0;
Audio_PlaySoundGeneral(NA_SE_SY_CORRECT_CHIME, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
BgDodoago_SetupAction(this, func_80871FB8);
OnePointCutscene_Init(globalCtx, 3380, 160, &this->dyna.actor, MAIN_CAM);
- } else if (globalCtx->unk_11D30[this->unk_164] == 0) {
+ } else if (globalCtx->roomCtx.unk_74[this->unk_164] == 0) {
OnePointCutscene_Init(globalCtx, 3065, 40, &this->dyna.actor, MAIN_CAM);
BgDodoago_SetupAction(this, func_80872288);
Audio_PlaySoundGeneral(NA_SE_SY_CORRECT_CHIME, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
@@ -204,14 +204,14 @@ void func_80871FB8(BgDodoago* this, GlobalContext* globalCtx) {
};
s32 i;
- if (globalCtx->unk_11D30[0] < 0xFF) {
- globalCtx->unk_11D30[0] += 5;
+ if (globalCtx->roomCtx.unk_74[0] < 0xFF) {
+ globalCtx->roomCtx.unk_74[0] += 5;
}
- if (globalCtx->unk_11D30[1] < 0xFF) {
- globalCtx->unk_11D30[1] += 5;
+ if (globalCtx->roomCtx.unk_74[1] < 0xFF) {
+ globalCtx->roomCtx.unk_74[1] += 5;
}
- if (globalCtx->unk_11D30[0] != 0xFF || globalCtx->unk_11D30[1] != 0xFF) {
+ if (globalCtx->roomCtx.unk_74[0] != 0xFF || globalCtx->roomCtx.unk_74[1] != 0xFF) {
D_80872824--;
return;
}
@@ -253,9 +253,9 @@ void func_8087227C(BgDodoago* this, GlobalContext* globalCtx) {
}
void func_80872288(BgDodoago* this, GlobalContext* globalCtx) {
- globalCtx->unk_11D30[this->unk_164] += 5;
+ globalCtx->roomCtx.unk_74[this->unk_164] += 5;
- if (globalCtx->unk_11D30[this->unk_164] == 0xFF) {
+ if (globalCtx->roomCtx.unk_74[this->unk_164] == 0xFF) {
BgDodoago_SetupAction(this, func_80871CF4);
}
}
diff --git a/src/overlays/actors/ovl_Bg_Hidan_Firewall/z_bg_hidan_firewall.c b/src/overlays/actors/ovl_Bg_Hidan_Firewall/z_bg_hidan_firewall.c
index c1f7dac25..e18597742 100644
--- a/src/overlays/actors/ovl_Bg_Hidan_Firewall/z_bg_hidan_firewall.c
+++ b/src/overlays/actors/ovl_Bg_Hidan_Firewall/z_bg_hidan_firewall.c
@@ -195,7 +195,7 @@ void BgHidanFirewall_Update(Actor* thisx, GlobalContext* globalCtx) {
}
}
-static u64* sFireballTexs[] = {
+static void* sFireballTexs[] = {
gFireTempleFireball0Tex, gFireTempleFireball1Tex, gFireTempleFireball2Tex, gFireTempleFireball3Tex,
gFireTempleFireball4Tex, gFireTempleFireball5Tex, gFireTempleFireball6Tex, gFireTempleFireball7Tex,
};
diff --git a/src/overlays/actors/ovl_Bg_Hidan_Rock/z_bg_hidan_rock.c b/src/overlays/actors/ovl_Bg_Hidan_Rock/z_bg_hidan_rock.c
index 92cb10146..11a7c25f6 100644
--- a/src/overlays/actors/ovl_Bg_Hidan_Rock/z_bg_hidan_rock.c
+++ b/src/overlays/actors/ovl_Bg_Hidan_Rock/z_bg_hidan_rock.c
@@ -344,7 +344,7 @@ void BgHidanRock_Update(Actor* thisx, GlobalContext* globalCtx) {
}
}
-static u64* sVerticalFlamesTexs[] = {
+static void* sVerticalFlamesTexs[] = {
gFireTempleBigVerticalFlame0Tex, gFireTempleBigVerticalFlame1Tex, gFireTempleBigVerticalFlame2Tex,
gFireTempleBigVerticalFlame3Tex, gFireTempleBigVerticalFlame4Tex, gFireTempleBigVerticalFlame5Tex,
gFireTempleBigVerticalFlame6Tex, gFireTempleBigVerticalFlame7Tex,
diff --git a/src/overlays/actors/ovl_Bg_Hidan_Rsekizou/z_bg_hidan_rsekizou.c b/src/overlays/actors/ovl_Bg_Hidan_Rsekizou/z_bg_hidan_rsekizou.c
index 8c3807a27..d4b83d1e6 100644
--- a/src/overlays/actors/ovl_Bg_Hidan_Rsekizou/z_bg_hidan_rsekizou.c
+++ b/src/overlays/actors/ovl_Bg_Hidan_Rsekizou/z_bg_hidan_rsekizou.c
@@ -116,7 +116,7 @@ static InitChainEntry sInitChain[] = {
ICHAIN_F32(uncullZoneForward, 1500, ICHAIN_STOP),
};
-static u64* sFireballsTexs[] = {
+static void* sFireballsTexs[] = {
gFireTempleFireball0Tex, gFireTempleFireball1Tex, gFireTempleFireball2Tex, gFireTempleFireball3Tex,
gFireTempleFireball4Tex, gFireTempleFireball5Tex, gFireTempleFireball6Tex, gFireTempleFireball7Tex,
};
diff --git a/src/overlays/actors/ovl_Bg_Hidan_Sima/z_bg_hidan_sima.c b/src/overlays/actors/ovl_Bg_Hidan_Sima/z_bg_hidan_sima.c
index 021f1e34e..bfcbe6563 100644
--- a/src/overlays/actors/ovl_Bg_Hidan_Sima/z_bg_hidan_sima.c
+++ b/src/overlays/actors/ovl_Bg_Hidan_Sima/z_bg_hidan_sima.c
@@ -77,7 +77,7 @@ static InitChainEntry sInitChain[] = {
ICHAIN_VEC3F_DIV1000(scale, 100, ICHAIN_STOP),
};
-static u64* sFireballsTexs[] = {
+static void* sFireballsTexs[] = {
gFireTempleFireball0Tex, gFireTempleFireball1Tex, gFireTempleFireball2Tex, gFireTempleFireball3Tex,
gFireTempleFireball4Tex, gFireTempleFireball5Tex, gFireTempleFireball6Tex, gFireTempleFireball7Tex,
};
diff --git a/src/overlays/actors/ovl_Bg_Jya_Megami/z_bg_jya_megami.c b/src/overlays/actors/ovl_Bg_Jya_Megami/z_bg_jya_megami.c
index 582b59a86..3fbcd1b9d 100644
--- a/src/overlays/actors/ovl_Bg_Jya_Megami/z_bg_jya_megami.c
+++ b/src/overlays/actors/ovl_Bg_Jya_Megami/z_bg_jya_megami.c
@@ -288,12 +288,12 @@ void BgJyaMegami_Update(Actor* thisx, GlobalContext* globalCtx) {
this->actionFunc(this, globalCtx);
}
-static u64* sRightSideCrumbles[] = {
+static void* sRightSideCrumbles[] = {
gMeagmiRightCrumble1Tex, gMeagmiRightCrumble2Tex, gMeagmiRightCrumble3Tex,
gMeagmiRightCrumble4Tex, gMeagmiRightCrumble5Tex,
};
-static u64* sLeftSideCrumbles[] = {
+static void* sLeftSideCrumbles[] = {
gMeagmiLeftCrumble1Tex, gMeagmiLeftCrumble2Tex, gMeagmiLeftCrumble3Tex,
gMeagmiLeftCrumble4Tex, gMeagmiLeftCrumble5Tex,
};
diff --git a/src/overlays/actors/ovl_Bg_Mizu_Water/z_bg_mizu_water.c b/src/overlays/actors/ovl_Bg_Mizu_Water/z_bg_mizu_water.c
index cae79ecb0..97f384215 100644
--- a/src/overlays/actors/ovl_Bg_Mizu_Water/z_bg_mizu_water.c
+++ b/src/overlays/actors/ovl_Bg_Mizu_Water/z_bg_mizu_water.c
@@ -237,7 +237,7 @@ void BgMizuWater_ChangeWaterLevel(BgMizuWater* this, GlobalContext* globalCtx) {
}
if (Math_StepToF(&this->actor.world.pos.y, this->targetY, 5.0f)) {
- globalCtx->unk_11D30[0] = 0;
+ globalCtx->roomCtx.unk_74[0] = 0;
this->actionFunc = BgMizuWater_WaitForAction;
func_80106CCC(globalCtx);
}
@@ -252,7 +252,7 @@ void BgMizuWater_ChangeWaterLevel(BgMizuWater* this, GlobalContext* globalCtx) {
this->targetY = this->baseY;
}
if (Math_StepToF(&this->actor.world.pos.y, this->targetY, 1.0f)) {
- globalCtx->unk_11D30[0] = 0;
+ globalCtx->roomCtx.unk_74[0] = 0;
this->actionFunc = BgMizuWater_WaitForAction;
}
waterBoxes[6].ySurface = this->actor.world.pos.y;
@@ -264,7 +264,7 @@ void BgMizuWater_ChangeWaterLevel(BgMizuWater* this, GlobalContext* globalCtx) {
this->targetY = this->baseY;
}
if (Math_StepToF(&this->actor.world.pos.y, this->targetY, 1.0f)) {
- globalCtx->unk_11D30[0] = 0;
+ globalCtx->roomCtx.unk_74[0] = 0;
this->actionFunc = BgMizuWater_WaitForAction;
}
waterBoxes[8].ySurface = this->actor.world.pos.y;
@@ -276,7 +276,7 @@ void BgMizuWater_ChangeWaterLevel(BgMizuWater* this, GlobalContext* globalCtx) {
this->targetY = this->baseY;
}
if (Math_StepToF(&this->actor.world.pos.y, this->targetY, 1.0f)) {
- globalCtx->unk_11D30[0] = 0;
+ globalCtx->roomCtx.unk_74[0] = 0;
this->actionFunc = BgMizuWater_WaitForAction;
}
waterBoxes[16].ySurface = this->actor.world.pos.y;
@@ -320,7 +320,7 @@ void BgMizuWater_Update(Actor* thisx, GlobalContext* globalCtx) {
unk1 = 255 - (s32)((posY - WATER_TEMPLE_WATER_F2_Y) / (WATER_TEMPLE_WATER_F3_Y - WATER_TEMPLE_WATER_F2_Y) *
(255 - 160));
}
- globalCtx->unk_11D30[1] = ((u8)unk0 << 8) | (unk1 & 0xFF);
+ globalCtx->roomCtx.unk_74[1] = ((u8)unk0 << 8) | (unk1 & 0xFF);
}
this->actionFunc(this, globalCtx);
diff --git a/src/overlays/actors/ovl_Bg_Spot02_Objects/z_bg_spot02_objects.c b/src/overlays/actors/ovl_Bg_Spot02_Objects/z_bg_spot02_objects.c
index 75cf48a67..3df341db4 100644
--- a/src/overlays/actors/ovl_Bg_Spot02_Objects/z_bg_spot02_objects.c
+++ b/src/overlays/actors/ovl_Bg_Spot02_Objects/z_bg_spot02_objects.c
@@ -32,7 +32,7 @@ extern Gfx D_060013F0[];
extern Gfx D_060126F0[];
extern Gfx D_06012D30[];
-static u64* D_808AD850[] = {
+static void* D_808AD850[] = {
0x060096B0, 0x0600A2B0, 0x0600AEB0, 0x0600BAB0, 0x0600C6B0, 0x0600D2B0,
0x0600DEB0, 0x0600EAB0, 0x0600F6B0, 0x060102B0, 0x06010EB0, 0x06011AB0,
};
diff --git a/src/overlays/actors/ovl_Bg_Toki_Hikari/z_bg_toki_hikari.c b/src/overlays/actors/ovl_Bg_Toki_Hikari/z_bg_toki_hikari.c
index 1e99cbf93..e0566f474 100644
--- a/src/overlays/actors/ovl_Bg_Toki_Hikari/z_bg_toki_hikari.c
+++ b/src/overlays/actors/ovl_Bg_Toki_Hikari/z_bg_toki_hikari.c
@@ -116,7 +116,7 @@ void func_808BA018(BgTokiHikari* this, GlobalContext* globalCtx) {
}
void func_808BA204(BgTokiHikari* this, GlobalContext* globalCtx) {
- if (globalCtx->unk_11D30[1] != 0) {
+ if (globalCtx->roomCtx.unk_74[1] != 0) {
this->actionFunc = func_808BA22C;
}
}
diff --git a/src/overlays/actors/ovl_Bg_Toki_Swd/z_bg_toki_swd.c b/src/overlays/actors/ovl_Bg_Toki_Swd/z_bg_toki_swd.c
index 7965fd88b..1f6c16a98 100644
--- a/src/overlays/actors/ovl_Bg_Toki_Swd/z_bg_toki_swd.c
+++ b/src/overlays/actors/ovl_Bg_Toki_Swd/z_bg_toki_swd.c
@@ -80,7 +80,7 @@ void BgTokiSwd_Init(Actor* thisx, GlobalContext* globalCtx) {
}
if (gSaveContext.sceneSetupIndex == 5) {
- globalCtx->unk_11D30[0] = 0xFF;
+ globalCtx->roomCtx.unk_74[0] = 0xFF;
}
Collider_InitCylinder(globalCtx, &this->collider);
@@ -122,10 +122,10 @@ void func_808BAF40(BgTokiSwd* this, GlobalContext* globalCtx) {
}
}
if (gSaveContext.sceneSetupIndex == 5) {
- if (globalCtx->unk_11D30[0] > 0) {
- globalCtx->unk_11D30[0]--;
+ if (globalCtx->roomCtx.unk_74[0] > 0) {
+ globalCtx->roomCtx.unk_74[0]--;
} else {
- globalCtx->unk_11D30[0] = 0;
+ globalCtx->roomCtx.unk_74[0] = 0;
}
}
}
@@ -149,8 +149,8 @@ void func_808BB0AC(BgTokiSwd* this, GlobalContext* globalCtx) {
}
void func_808BB128(BgTokiSwd* this, GlobalContext* globalCtx) {
- if (Flags_GetEnv(globalCtx, 1) && (globalCtx->unk_11D30[0] < 0xFF)) {
- globalCtx->unk_11D30[0] += 5;
+ if (Flags_GetEnv(globalCtx, 1) && (globalCtx->roomCtx.unk_74[0] < 0xFF)) {
+ globalCtx->roomCtx.unk_74[0] += 5;
}
}
diff --git a/src/overlays/actors/ovl_Bg_Treemouth/z_bg_treemouth.c b/src/overlays/actors/ovl_Bg_Treemouth/z_bg_treemouth.c
index 39234028e..77ddc45f0 100644
--- a/src/overlays/actors/ovl_Bg_Treemouth/z_bg_treemouth.c
+++ b/src/overlays/actors/ovl_Bg_Treemouth/z_bg_treemouth.c
@@ -238,7 +238,7 @@ void BgTreemouth_Draw(Actor* thisx, GlobalContext* globalCtx) {
}
if (gSaveContext.sceneSetupIndex == 6) {
- alpha = (globalCtx->unk_11D30[0] + 0x1F4);
+ alpha = (globalCtx->roomCtx.unk_74[0] + 0x1F4);
}
gDPSetEnvColor(POLY_OPA_DISP++, 128, 128, 128, alpha * 0.1f);
diff --git a/src/overlays/actors/ovl_Boss_Fd/z_boss_fd.c b/src/overlays/actors/ovl_Boss_Fd/z_boss_fd.c
index eab799ba2..988f02d30 100644
--- a/src/overlays/actors/ovl_Boss_Fd/z_boss_fd.c
+++ b/src/overlays/actors/ovl_Boss_Fd/z_boss_fd.c
@@ -1510,7 +1510,7 @@ void BossFd_UpdateEffects(BossFd* this, GlobalContext* globalCtx) {
}
void BossFd_DrawEffects(BossFdEffect* effect, GlobalContext* globalCtx) {
- static u64* dustTex[] = {
+ static void* dustTex[] = {
gDust1Tex, gDust1Tex, gDust2Tex, gDust3Tex, gDust4Tex, gDust5Tex, gDust6Tex, gDust7Tex, gDust8Tex,
};
u8 flag = false;
@@ -1804,7 +1804,11 @@ void BossFd_PostHeadDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, V
}
}
-static u64* sEyeTextures[] = { gVolvagiaEyeOpenTex, gVolvagiaEyeHalfTex, gVolvagiaEyeClosedTex };
+static void* sEyeTextures[] = {
+ gVolvagiaEyeOpenTex,
+ gVolvagiaEyeHalfTex,
+ gVolvagiaEyeClosedTex,
+};
static Gfx* sBodyDLists[] = {
gVolvagiaBodySeg1DL, gVolvagiaBodySeg2DL, gVolvagiaBodySeg3DL, gVolvagiaBodySeg4DL, gVolvagiaBodySeg5DL,
diff --git a/src/overlays/actors/ovl_Boss_Fd2/z_boss_fd2.c b/src/overlays/actors/ovl_Boss_Fd2/z_boss_fd2.c
index bd081034e..009648746 100644
--- a/src/overlays/actors/ovl_Boss_Fd2/z_boss_fd2.c
+++ b/src/overlays/actors/ovl_Boss_Fd2/z_boss_fd2.c
@@ -1188,7 +1188,7 @@ void BossFd2_DrawMane(BossFd2* this, GlobalContext* globalCtx) {
}
void BossFd2_Draw(Actor* thisx, GlobalContext* globalCtx) {
- static u64* eyeTextures[] = { gHoleVolvagiaEyeOpenTex, gHoleVolvagiaEyeHalfTex, gHoleVolvagiaEyeClosedTex };
+ static void* eyeTextures[] = { gHoleVolvagiaEyeOpenTex, gHoleVolvagiaEyeHalfTex, gHoleVolvagiaEyeClosedTex };
s32 pad;
BossFd2* this = THIS;
diff --git a/src/overlays/actors/ovl_Boss_Ganondrof/z_boss_ganondrof.c b/src/overlays/actors/ovl_Boss_Ganondrof/z_boss_ganondrof.c
index 1dbdfed9f..08d5acde2 100644
--- a/src/overlays/actors/ovl_Boss_Ganondrof/z_boss_ganondrof.c
+++ b/src/overlays/actors/ovl_Boss_Ganondrof/z_boss_ganondrof.c
@@ -182,22 +182,22 @@ static u8 sDecayMaskTotal[16 * 16] = {
// clang-format on
// These are Phantom Ganon's body textures, but I don't know which is which.
-static u64* sLimbTex_rgba16_8x8[] = {
+static void* sLimbTex_rgba16_8x8[] = {
gPhantomGanonLimbTex_00A800, gPhantomGanonLimbTex_00AE80, gPhantomGanonLimbTex_00AF00,
gPhantomGanonLimbTex_00C180, gPhantomGanonLimbTex_00C400,
};
-static u64* sLimbTex_rgba16_16x8[] = {
+static void* sLimbTex_rgba16_16x8[] = {
gPhantomGanonLimbTex_00B980, gPhantomGanonLimbTex_00C480, gPhantomGanonLimbTex_00BC80,
gPhantomGanonLimbTex_00BD80, gPhantomGanonLimbTex_00C080,
};
-static u64* sLimbTex_rgba16_16x16[] = {
+static void* sLimbTex_rgba16_16x16[] = {
gPhantomGanonLimbTex_00C200, gPhantomGanonLimbTex_00A000, gPhantomGanonLimbTex_00A200,
gPhantomGanonLimbTex_00A400, gPhantomGanonLimbTex_00A600, gPhantomGanonLimbTex_00A880,
gPhantomGanonLimbTex_00B780, gPhantomGanonLimbTex_00BA80, gPhantomGanonLimbTex_00BE80,
};
-static u64* sLimbTex_rgba16_16x32[] = { gPhantomGanonLimbTex_00AA80, gPhantomGanonLimbTex_00AF80 };
+static void* sLimbTex_rgba16_16x32[] = { gPhantomGanonLimbTex_00AA80, gPhantomGanonLimbTex_00AF80 };
-static u64* sMouthTex_ci8_16x16[] = { gPhantomGanonMouthTex, gPhantomGanonSmileTex };
+static void* sMouthTex_ci8_16x16[] = { gPhantomGanonMouthTex, gPhantomGanonSmileTex };
static InitChainEntry sInitChain[] = {
ICHAIN_U8(targetMode, 5, ICHAIN_CONTINUE),
diff --git a/src/overlays/actors/ovl_Boss_Mo/z_boss_mo.c b/src/overlays/actors/ovl_Boss_Mo/z_boss_mo.c
index b851fbc88..7a307dcd2 100644
--- a/src/overlays/actors/ovl_Boss_Mo/z_boss_mo.c
+++ b/src/overlays/actors/ovl_Boss_Mo/z_boss_mo.c
@@ -334,7 +334,7 @@ void BossMo_Init(Actor* thisx, GlobalContext* globalCtx2) {
Flags_SetSwitch(globalCtx, 0x14);
sMorphaCore = this;
MO_WATER_LEVEL(globalCtx) = this->waterLevel = MO_WATER_LEVEL(globalCtx);
- globalCtx->unk_11D30[0] = 0xA0;
+ globalCtx->roomCtx.unk_74[0] = 0xA0;
globalCtx->specialEffects = sEffects;
for (i = 0; i < ARRAY_COUNT(sEffects); i++) {
sEffects[i].type = MO_FX_NONE;
@@ -354,7 +354,7 @@ void BossMo_Init(Actor* thisx, GlobalContext* globalCtx2) {
Actor_SpawnAsChild(&globalCtx->actorCtx, &this->actor, globalCtx, ACTOR_DOOR_WARP1, 0.0f, -280.0f, 0.0f, 0,
0, 0, -1);
Actor_Spawn(&globalCtx->actorCtx, globalCtx, ACTOR_ITEM_B_HEART, -200.0f, -280.0f, 0.0f, 0, 0, 0, 0);
- globalCtx->unk_11D30[0] = 0xFF;
+ globalCtx->roomCtx.unk_74[0] = 0xFF;
MO_WATER_LEVEL(globalCtx) = -500;
return;
}
@@ -1698,9 +1698,9 @@ void BossMo_DeathCs(BossMo* this, GlobalContext* globalCtx) {
}
}
if (sMorphaCore->waterLevel < -200.0f) {
- globalCtx->unk_11D30[0]++;
- if (globalCtx->unk_11D30[0] >= 0xFF) {
- globalCtx->unk_11D30[0] = 0xFF;
+ globalCtx->roomCtx.unk_74[0]++;
+ if (globalCtx->roomCtx.unk_74[0] >= 0xFF) {
+ globalCtx->roomCtx.unk_74[0] = 0xFF;
}
}
if (sMorphaCore->waterLevel < -250.0f) {
diff --git a/src/overlays/actors/ovl_Demo_Du/z_demo_du.c b/src/overlays/actors/ovl_Demo_Du/z_demo_du.c
index 4fd08dc59..869127571 100644
--- a/src/overlays/actors/ovl_Demo_Du/z_demo_du.c
+++ b/src/overlays/actors/ovl_Demo_Du/z_demo_du.c
@@ -19,9 +19,9 @@ static s32 sUnused = 0;
#include "z_demo_du_cutscene_data.c" EARLY
-static u64* sEyeTextures[] = { gDaruniaEyeOpenTex, gDaruniaEyeOpeningTex, gDaruniaEyeShutTex, gDaruniaEyeClosingTex };
-static u64* sMouthTextures[] = { gDaruniaMouthSeriousTex, gDaruniaMouthGrinningTex, gDaruniaMouthOpenTex,
- gDaruniaMouthHappyTex };
+static void* sEyeTextures[] = { gDaruniaEyeOpenTex, gDaruniaEyeOpeningTex, gDaruniaEyeShutTex, gDaruniaEyeClosingTex };
+static void* sMouthTextures[] = { gDaruniaMouthSeriousTex, gDaruniaMouthGrinningTex, gDaruniaMouthOpenTex,
+ gDaruniaMouthHappyTex };
/**
* Cs => Cutscene
@@ -798,10 +798,10 @@ void DemoDu_Draw_02(Actor* thisx, GlobalContext* globalCtx2) {
GlobalContext* globalCtx = globalCtx2;
DemoDu* this = THIS;
s16 eyeTexIndex = this->eyeTexIndex;
- u64* eyeTexture = sEyeTextures[eyeTexIndex];
+ void* eyeTexture = sEyeTextures[eyeTexIndex];
s32 pad;
s16 mouthTexIndex = this->mouthTexIndex;
- u64* mouthTexture = sMouthTextures[mouthTexIndex];
+ void* mouthTexture = sMouthTextures[mouthTexIndex];
SkelAnime* skelAnime = &this->skelAnime;
OPEN_DISPS(globalCtx->state.gfxCtx, "../z_demo_du_inKenjyanomaDemo02.c", 275);
@@ -993,10 +993,10 @@ void DemoDu_Draw_01(Actor* thisx, GlobalContext* globalCtx2) {
GlobalContext* globalCtx = globalCtx2;
DemoDu* this = THIS;
s16 eyeTexIndex = this->eyeTexIndex;
- u64* eyeTexture = sEyeTextures[eyeTexIndex];
+ void* eyeTexture = sEyeTextures[eyeTexIndex];
s32 pad;
s16 mouthTexIndex = this->mouthTexIndex;
- u64* mouthTexture = sMouthTextures[mouthTexIndex];
+ void* mouthTexture = sMouthTextures[mouthTexIndex];
SkelAnime* skelAnime = &this->skelAnime;
OPEN_DISPS(globalCtx->state.gfxCtx, "../z_demo_du.c", 615);
diff --git a/src/overlays/actors/ovl_Demo_Im/z_demo_im.c b/src/overlays/actors/ovl_Demo_Im/z_demo_im.c
index d3f0d371f..e9d4a54a2 100644
--- a/src/overlays/actors/ovl_Demo_Im/z_demo_im.c
+++ b/src/overlays/actors/ovl_Demo_Im/z_demo_im.c
@@ -52,7 +52,7 @@ void func_80987330(DemoIm* this, GlobalContext* globalCtx);
void func_8098764C(DemoIm* this, GlobalContext* globalCtx);
void func_80987658(DemoIm* this, GlobalContext* globalCtx);
-static UNK_PTR D_80987830[] = {
+static void* D_80987830[] = {
0x06007210,
0x06007D50,
0x06008150,
@@ -530,7 +530,7 @@ void func_80985C94(DemoIm* this, GlobalContext* globalCtx) {
void func_80985CE8(DemoIm* this, GlobalContext* globalCtx) {
s32 pad[2];
s16 unk_25C = this->unk_25C;
- UNK_PTR sp68 = D_80987830[unk_25C];
+ void* sp68 = D_80987830[unk_25C];
SkelAnime* skelAnime = &this->skelAnime;
OPEN_DISPS(globalCtx->state.gfxCtx, "../z_demo_im_inKenjyanomaDemo02.c", 281);
@@ -1190,7 +1190,7 @@ void func_8098764C(DemoIm* this, GlobalContext* globalCtx) {
void func_80987658(DemoIm* this, GlobalContext* globalCtx) {
s32 pad[2];
s16 unk_25C = this->unk_25C;
- UNK_PTR sp68 = D_80987830[unk_25C];
+ void* sp68 = D_80987830[unk_25C];
SkelAnime* skelAnime = &this->skelAnime;
OPEN_DISPS(globalCtx->state.gfxCtx, "../z_demo_im.c", 904);
diff --git a/src/overlays/actors/ovl_Demo_Kankyo/z_demo_kankyo.c b/src/overlays/actors/ovl_Demo_Kankyo/z_demo_kankyo.c
index 7b9b67505..597cf1f5d 100644
--- a/src/overlays/actors/ovl_Demo_Kankyo/z_demo_kankyo.c
+++ b/src/overlays/actors/ovl_Demo_Kankyo/z_demo_kankyo.c
@@ -245,7 +245,7 @@ void DemoKankyo_Init(Actor* thisx, GlobalContext* globalCtx) {
this->actor.world.pos.x, this->actor.world.pos.y, this->actor.world.pos.z, 0, 0, 0,
0x0000);
} else {
- globalCtx->unk_11D30[1] = 0xFF;
+ globalCtx->roomCtx.unk_74[1] = 0xFF;
Actor_Kill(&this->actor);
}
break;
diff --git a/src/overlays/actors/ovl_Demo_Sa/z_demo_sa.c b/src/overlays/actors/ovl_Demo_Sa/z_demo_sa.c
index e2d64e61f..3cf3fc578 100644
--- a/src/overlays/actors/ovl_Demo_Sa/z_demo_sa.c
+++ b/src/overlays/actors/ovl_Demo_Sa/z_demo_sa.c
@@ -61,11 +61,11 @@ typedef enum {
/* 4 */ SARIA_MOUTH_FROWNING
} SariaMouthState;
-static u64* sEyeTextures[] = {
+static void* sEyeTextures[] = {
gSariaEyeOpenTex, gSariaEyeHalfTex, gSariaEyeClosedTex, gSariaEyeSuprisedTex, gSariaEyeSadTex,
};
-static u64* sMouthTextures[] = {
+static void* sMouthTextures[] = {
gSariaMouthClosed2Tex, gSariaMouthSuprisedTex, gSariaMouthClosedTex,
gSariaMouthSmilingOpenTex, gSariaMouthFrowningTex,
};
@@ -457,10 +457,10 @@ void func_8098F16C(DemoSa* this, GlobalContext* globalCtx) {
void DemoSa_DrawXlu(DemoSa* this, GlobalContext* globalCtx) {
s32 pad[2];
s16 eyeIndex = this->eyeIndex;
- UNK_PTR sp78 = sEyeTextures[eyeIndex];
+ void* sp78 = sEyeTextures[eyeIndex];
s16 mouthIndex = this->mouthIndex;
s32 pad2;
- UNK_PTR sp6C = sMouthTextures[mouthIndex];
+ void* sp6C = sMouthTextures[mouthIndex];
SkelAnime* skelAnime = &this->skelAnime;
OPEN_DISPS(globalCtx->state.gfxCtx, "../z_demo_sa_inKenjyanomaDemo02.c", 296);
@@ -795,10 +795,10 @@ void DemoSa_DrawNothing(DemoSa* this, GlobalContext* globalCtx) {
void DemoSa_DrawOpa(DemoSa* this, GlobalContext* globalCtx) {
s32 pad[2];
s16 eyeIndex = this->eyeIndex;
- UNK_PTR eyeTex = sEyeTextures[eyeIndex];
+ void* eyeTex = sEyeTextures[eyeIndex];
s32 pad2;
s16 mouthIndex = this->mouthIndex;
- UNK_PTR mouthTex = sMouthTextures[mouthIndex];
+ void* mouthTex = sMouthTextures[mouthIndex];
SkelAnime* skelAnime = &this->skelAnime;
OPEN_DISPS(globalCtx->state.gfxCtx, "../z_demo_sa.c", 602);
diff --git a/src/overlays/actors/ovl_Door_Killer/z_door_killer.c b/src/overlays/actors/ovl_Door_Killer/z_door_killer.c
index a90990981..66f7435eb 100644
--- a/src/overlays/actors/ovl_Door_Killer/z_door_killer.c
+++ b/src/overlays/actors/ovl_Door_Killer/z_door_killer.c
@@ -496,7 +496,7 @@ void DoorKiller_Update(Actor* thisx, GlobalContext* globalCtx) {
void DoorKiller_SetTexture(Actor* thisx, GlobalContext* globalCtx) {
DoorKiller* this = THIS;
- u64* doorTexture = this->texture;
+ void* doorTexture = this->texture;
OPEN_DISPS(globalCtx->state.gfxCtx, "../z_door_killer.c", 883);
gSPSegment(POLY_OPA_DISP++, 0x08, doorTexture);
diff --git a/src/overlays/actors/ovl_Door_Killer/z_door_killer.h b/src/overlays/actors/ovl_Door_Killer/z_door_killer.h
index db673b827..3fe9839e5 100644
--- a/src/overlays/actors/ovl_Door_Killer/z_door_killer.h
+++ b/src/overlays/actors/ovl_Door_Killer/z_door_killer.h
@@ -11,7 +11,7 @@
typedef struct {
/* 0x00 */ s16 objectId;
- /* 0x04 */ u64* texture;
+ /* 0x04 */ void* texture;
} DoorKillerTextureEntry; // size 0x8
struct DoorKiller;
@@ -25,7 +25,7 @@ typedef struct DoorKiller {
/* 0x0191 */ u8 playerIsOpening; // Must be at same offset as playerIsOpening in EnDoor
/* 0x0192 */ Vec3s jointTable[9];
/* 0x01C8 */ ColliderCylinder colliderCylinder;
- /* 0x0214 */ u64* texture;
+ /* 0x0214 */ void* texture;
/* 0x0218 */ u16 hasHitPlayerOrGround;
/* 0x021A */ u16 timer;
/* 0x021C */ u8 doorObjBankIndex;
diff --git a/src/overlays/actors/ovl_Door_Shutter/z_door_shutter.c b/src/overlays/actors/ovl_Door_Shutter/z_door_shutter.c
index e0a36b266..1fb6b0905 100644
--- a/src/overlays/actors/ovl_Door_Shutter/z_door_shutter.c
+++ b/src/overlays/actors/ovl_Door_Shutter/z_door_shutter.c
@@ -158,7 +158,7 @@ static Gfx* sJabuDoorDLists[] = {
};
// boss door textures?
-static UNK_PTR D_809982D4[] = {
+static void* D_809982D4[] = {
0x060065C0, 0x060035C0, 0x060055C0, 0x060045C0, 0x06000000, 0x060025C0, 0x060015C0,
};
@@ -168,7 +168,7 @@ void DoorShutter_SetupAction(DoorShutter* this, DoorShutterActionFunc actionFunc
}
s32 DoorShutter_SetupDoor(DoorShutter* this, GlobalContext* globalCtx) {
- TransitionActorEntry* transitionEntry = &globalCtx->transitionActorList[(u16)this->dyna.actor.params >> 0xA];
+ TransitionActorEntry* transitionEntry = &globalCtx->transiActorCtx.list[(u16)this->dyna.actor.params >> 0xA];
s8 frontRoom = transitionEntry->sides[0].room;
s32 doorType = this->doorType;
ShutterObjectInfo* temp_t0 = &sObjectInfo[this->unk_16B];
@@ -275,7 +275,7 @@ void DoorShutter_Destroy(Actor* thisx, GlobalContext* globalCtx) {
if (this->dyna.actor.room >= 0) {
s32 transitionActorId = (u16)this->dyna.actor.params >> 0xA;
- globalCtx->transitionActorList[transitionActorId].id *= -1;
+ globalCtx->transiActorCtx.list[transitionActorId].id *= -1;
}
}
@@ -534,7 +534,7 @@ void func_80997220(DoorShutter* this, GlobalContext* globalCtx) {
func_8002DBD0(&this->dyna.actor, &vec, &player->actor.world.pos);
this->dyna.actor.room =
- globalCtx->transitionActorList[(u16)this->dyna.actor.params >> 0xA].sides[(vec.z < 0.0f) ? 0 : 1].room;
+ globalCtx->transiActorCtx.list[(u16)this->dyna.actor.params >> 0xA].sides[(vec.z < 0.0f) ? 0 : 1].room;
if (room != this->dyna.actor.room) {
Room tempRoom = globalCtx->roomCtx.curRoom;
@@ -721,7 +721,7 @@ void DoorShutter_Draw(Actor* thisx, GlobalContext* globalCtx) {
} else {
if (sp70->b != NULL) {
TransitionActorEntry* transitionEntry =
- &globalCtx->transitionActorList[(u16)this->dyna.actor.params >> 0xA];
+ &globalCtx->transiActorCtx.list[(u16)this->dyna.actor.params >> 0xA];
if (globalCtx->roomCtx.prevRoom.num >= 0 ||
transitionEntry->sides[0].room == transitionEntry->sides[1].room) {
diff --git a/src/overlays/actors/ovl_En_Ani/z_en_ani.c b/src/overlays/actors/ovl_En_Ani/z_en_ani.c
index ba571c54a..3eb821ec7 100644
--- a/src/overlays/actors/ovl_En_Ani/z_en_ani.c
+++ b/src/overlays/actors/ovl_En_Ani/z_en_ani.c
@@ -313,13 +313,12 @@ void EnAni_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Ve
}
}
-static u64* sEyeTextures[] = {
- gRoofManEyeOpenTex,
- gRoofManEyeHalfTex,
- gRoofManEyeClosedTex,
-};
-
void EnAni_Draw(Actor* thisx, GlobalContext* globalCtx) {
+ static void* eyeTextures[] = {
+ gRoofManEyeOpenTex,
+ gRoofManEyeHalfTex,
+ gRoofManEyeClosedTex,
+ };
EnAni* this = THIS;
s32 pad;
@@ -327,7 +326,7 @@ void EnAni_Draw(Actor* thisx, GlobalContext* globalCtx) {
func_800943C8(globalCtx->state.gfxCtx);
- gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(sEyeTextures[this->eyeIndex]));
+ gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(eyeTextures[this->eyeIndex]));
SkelAnime_DrawFlexOpa(globalCtx, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount,
EnAni_OverrideLimbDraw, EnAni_PostLimbDraw, this);
diff --git a/src/overlays/actors/ovl_En_Anubice_Fire/z_en_anubice_fire.c b/src/overlays/actors/ovl_En_Anubice_Fire/z_en_anubice_fire.c
index 2b86bfd9c..e46570c08 100644
--- a/src/overlays/actors/ovl_En_Anubice_Fire/z_en_anubice_fire.c
+++ b/src/overlays/actors/ovl_En_Anubice_Fire/z_en_anubice_fire.c
@@ -215,9 +215,10 @@ void EnAnubiceFire_Update(Actor* thisx, GlobalContext* globalCtx) {
}
}
-static u64* D_809B3270[] = { gDust4Tex, gDust5Tex, gDust6Tex, gDust7Tex, gDust8Tex, gDust7Tex, gDust6Tex, gDust5Tex };
-
void EnAnubiceFire_Draw(Actor* thisx, GlobalContext* globalCtx) {
+ static void* D_809B3270[] = {
+ gDust4Tex, gDust5Tex, gDust6Tex, gDust7Tex, gDust8Tex, gDust7Tex, gDust6Tex, gDust5Tex,
+ };
EnAnubiceFire* this = THIS;
s32 pad[2];
s32 i;
diff --git a/src/overlays/actors/ovl_En_Bom_Bowl_Man/z_en_bom_bowl_man.c b/src/overlays/actors/ovl_En_Bom_Bowl_Man/z_en_bom_bowl_man.c
index 1eec5e7e0..04f1333bb 100644
--- a/src/overlays/actors/ovl_En_Bom_Bowl_Man/z_en_bom_bowl_man.c
+++ b/src/overlays/actors/ovl_En_Bom_Bowl_Man/z_en_bom_bowl_man.c
@@ -523,9 +523,8 @@ s32 EnBomBowlMan_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx**
return false;
}
-static u64* eyeTextures[3] = { gChuGirlEyeOpenTex, gChuGirlEyeHalfTex, gChuGirlEyeClosedTex };
-
void EnBomBowlMan_Draw(Actor* thisx, GlobalContext* globalCtx) {
+ static void* eyeTextures[] = { gChuGirlEyeOpenTex, gChuGirlEyeHalfTex, gChuGirlEyeClosedTex };
EnBomBowlMan* this = THIS;
OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_bom_bowl_man.c", 907);
diff --git a/src/overlays/actors/ovl_En_Bx/z_en_bx.c b/src/overlays/actors/ovl_En_Bx/z_en_bx.c
index 34195dc18..5eb287150 100644
--- a/src/overlays/actors/ovl_En_Bx/z_en_bx.c
+++ b/src/overlays/actors/ovl_En_Bx/z_en_bx.c
@@ -198,7 +198,7 @@ void EnBx_Update(Actor* thisx, GlobalContext* globalCtx) {
}
void EnBx_Draw(Actor* thisx, GlobalContext* globalCtx) {
- static UNK_PTR D_809D2560[] = { 0x060024F0, 0x060027F0, 0x060029F0 };
+ static void* D_809D2560[] = { 0x060024F0, 0x060027F0, 0x060029F0 };
EnBx* this = THIS;
s32 pad;
Mtx* mtx = Graph_Alloc(globalCtx->state.gfxCtx, 4 * sizeof(Mtx));
diff --git a/src/overlays/actors/ovl_En_Cs/z_en_cs.c b/src/overlays/actors/ovl_En_Cs/z_en_cs.c
index 6ab5c3ebf..26ee6c7c2 100644
--- a/src/overlays/actors/ovl_En_Cs/z_en_cs.c
+++ b/src/overlays/actors/ovl_En_Cs/z_en_cs.c
@@ -448,7 +448,7 @@ void EnCs_Update(Actor* thisx, GlobalContext* globalCtx) {
}
void EnCs_Draw(Actor* thisx, GlobalContext* globalCtx) {
- static u64* eyeTextures[] = {
+ static void* eyeTextures[] = {
gGraveyardKidEyesOpenTex,
gGraveyardKidEyesHalfTex,
gGraveyardKidEyesClosedTex,
diff --git a/src/overlays/actors/ovl_En_Diving_Game/z_en_diving_game.c b/src/overlays/actors/ovl_En_Diving_Game/z_en_diving_game.c
index cb98613ea..9d9b45039 100644
--- a/src/overlays/actors/ovl_En_Diving_Game/z_en_diving_game.c
+++ b/src/overlays/actors/ovl_En_Diving_Game/z_en_diving_game.c
@@ -70,7 +70,7 @@ static ColliderCylinderInit sCylinderInit = {
{ 10, 10, 0, { 0, 0, 0 } },
};
-static u64* sEyeTextures[] = {
+static void* sEyeTextures[] = {
gZoraEyeOpenTex,
gZoraEyeHalfTex,
gZoraEyeClosedTex,
diff --git a/src/overlays/actors/ovl_En_Door/z_en_door.c b/src/overlays/actors/ovl_En_Door/z_en_door.c
index 36f2d8a12..3b17778ab 100644
--- a/src/overlays/actors/ovl_En_Door/z_en_door.c
+++ b/src/overlays/actors/ovl_En_Door/z_en_door.c
@@ -136,7 +136,7 @@ void EnDoor_Destroy(Actor* thisx, GlobalContext* globalCtx) {
TransitionActorEntry* transitionEntry;
EnDoor* this = THIS;
- transitionEntry = &globalCtx->transitionActorList[(u16)this->actor.params >> 0xA];
+ transitionEntry = &globalCtx->transiActorCtx.list[(u16)this->actor.params >> 0xA];
if (transitionEntry->id < 0) {
transitionEntry->id = -transitionEntry->id;
}
@@ -307,7 +307,7 @@ s32 EnDoor_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList
if (limbIndex == 4) {
temp_a2 = D_809FCEE4[this->dListIndex];
- transitionEntry = &globalCtx->transitionActorList[(u16)this->actor.params >> 0xA];
+ transitionEntry = &globalCtx->transiActorCtx.list[(u16)this->actor.params >> 0xA];
rot->z += this->actor.world.rot.y;
if ((globalCtx->roomCtx.prevRoom.num >= 0) ||
(transitionEntry->sides[0].room == transitionEntry->sides[1].room)) {
diff --git a/src/overlays/actors/ovl_En_Du/z_en_du.c b/src/overlays/actors/ovl_En_Du/z_en_du.c
index ed80a3e2e..6baa73391 100644
--- a/src/overlays/actors/ovl_En_Du/z_en_du.c
+++ b/src/overlays/actors/ovl_En_Du/z_en_du.c
@@ -587,19 +587,29 @@ void EnDu_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec
}
void EnDu_Draw(Actor* thisx, GlobalContext* globalCtx) {
- static u64* sEyeTextures[] = { gDaruniaEyeOpenTex, gDaruniaEyeOpeningTex, gDaruniaEyeShutTex,
- gDaruniaEyeClosingTex };
- static u64* sMouthTextures[] = { gDaruniaMouthSeriousTex, gDaruniaMouthGrinningTex, gDaruniaMouthOpenTex,
- gDaruniaMouthHappyTex };
- static u64* sNoseTextures[] = { gDaruniaNoseSeriousTex, gDaruniaNoseHappyTex };
-
+ static void* eyeTextures[] = {
+ gDaruniaEyeOpenTex,
+ gDaruniaEyeOpeningTex,
+ gDaruniaEyeShutTex,
+ gDaruniaEyeClosingTex,
+ };
+ static void* mouthTextures[] = {
+ gDaruniaMouthSeriousTex,
+ gDaruniaMouthGrinningTex,
+ gDaruniaMouthOpenTex,
+ gDaruniaMouthHappyTex,
+ };
+ static void* noseTextures[] = {
+ gDaruniaNoseSeriousTex,
+ gDaruniaNoseHappyTex,
+ };
EnDu* this = THIS;
OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_du.c", 1470);
- gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(sEyeTextures[this->eyeTexIndex]));
- gSPSegment(POLY_OPA_DISP++, 0x09, SEGMENTED_TO_VIRTUAL(sMouthTextures[this->mouthTexIndex]));
- gSPSegment(POLY_OPA_DISP++, 0x0A, SEGMENTED_TO_VIRTUAL(sNoseTextures[this->noseTexIndex]));
+ gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(eyeTextures[this->eyeTexIndex]));
+ gSPSegment(POLY_OPA_DISP++, 0x09, SEGMENTED_TO_VIRTUAL(mouthTextures[this->mouthTexIndex]));
+ gSPSegment(POLY_OPA_DISP++, 0x0A, SEGMENTED_TO_VIRTUAL(noseTextures[this->noseTexIndex]));
func_80034BA0(globalCtx, &this->skelAnime, EnDu_OverrideLimbDraw, EnDu_PostLimbDraw, &this->actor, 255);
diff --git a/src/overlays/actors/ovl_En_Ex_Ruppy/z_en_ex_ruppy.c b/src/overlays/actors/ovl_En_Ex_Ruppy/z_en_ex_ruppy.c
index b0b7e75e3..3dfca7cbc 100644
--- a/src/overlays/actors/ovl_En_Ex_Ruppy/z_en_ex_ruppy.c
+++ b/src/overlays/actors/ovl_En_Ex_Ruppy/z_en_ex_ruppy.c
@@ -377,11 +377,10 @@ void EnExRuppy_Update(Actor* thisx, GlobalContext* globalCtx) {
Actor_UpdateBgCheckInfo(globalCtx, &this->actor, 20.0f, 20.0f, 50.0f, 0x1C);
}
-UNK_PTR D_80A0B3B8[] = {
- gRupeeGreenTex, gRupeeBlueTex, gRupeeRedTex, gRupeePinkTex, gRupeeOrangeTex,
-};
-
void EnExRuppy_Draw(Actor* thisx, GlobalContext* globalCtx) {
+ static void* rupeeTextures[] = {
+ gRupeeGreenTex, gRupeeBlueTex, gRupeeRedTex, gRupeePinkTex, gRupeeOrangeTex,
+ };
s32 pad;
EnExRuppy* this = THIS;
@@ -392,7 +391,7 @@ void EnExRuppy_Draw(Actor* thisx, GlobalContext* globalCtx) {
func_8002EBCC(thisx, globalCtx, 0);
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_ex_ruppy.c", 780),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
- gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(D_80A0B3B8[this->colorIdx]));
+ gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(rupeeTextures[this->colorIdx]));
gSPDisplayList(POLY_OPA_DISP++, gRupeeDL);
CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_en_ex_ruppy.c", 784);
diff --git a/src/overlays/actors/ovl_En_Fd/z_en_fd.c b/src/overlays/actors/ovl_En_Fd/z_en_fd.c
index 399690383..dc27937ff 100644
--- a/src/overlays/actors/ovl_En_Fd/z_en_fd.c
+++ b/src/overlays/actors/ovl_En_Fd/z_en_fd.c
@@ -867,7 +867,7 @@ void EnFd_UpdateDots(EnFd* this) {
}
void EnFd_DrawFlames(EnFd* this, GlobalContext* globalCtx) {
- static UNK_PTR D_80A0E0F8[] = {
+ static void* dustTextures[] = {
gDust8Tex, gDust7Tex, gDust6Tex, gDust5Tex, gDust4Tex, gDust3Tex, gDust2Tex, gDust1Tex,
};
s32 firstDone;
@@ -895,7 +895,7 @@ void EnFd_DrawFlames(EnFd* this, GlobalContext* globalCtx) {
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_fd.c", 2006),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
idx = eff->timer * (8.0f / eff->initialTimer);
- gSPSegment(POLY_XLU_DISP++, 0x8, SEGMENTED_TO_VIRTUAL(D_80A0E0F8[idx]));
+ gSPSegment(POLY_XLU_DISP++, 0x8, SEGMENTED_TO_VIRTUAL(dustTextures[idx]));
gSPDisplayList(POLY_XLU_DISP++, gFlareDancerSquareParticleDL);
}
}
diff --git a/src/overlays/actors/ovl_En_Fhg_Fire/z_en_fhg_fire.c b/src/overlays/actors/ovl_En_Fhg_Fire/z_en_fhg_fire.c
index 23c0d3765..b1140af90 100644
--- a/src/overlays/actors/ovl_En_Fhg_Fire/z_en_fhg_fire.c
+++ b/src/overlays/actors/ovl_En_Fhg_Fire/z_en_fhg_fire.c
@@ -693,7 +693,7 @@ void EnFhgFire_Update(Actor* thisx, GlobalContext* globalCtx) {
this->updateFunc(this, globalCtx);
}
-static u64* sDustTextures[] = {
+static void* sDustTextures[] = {
gDust1Tex, gDust2Tex, gDust3Tex, gDust4Tex, gDust5Tex, gDust6Tex, gDust7Tex, gDust8Tex,
};
diff --git a/src/overlays/actors/ovl_En_Fr/z_en_fr.c b/src/overlays/actors/ovl_En_Fr/z_en_fr.c
index 8bff9e08f..496a96a87 100644
--- a/src/overlays/actors/ovl_En_Fr/z_en_fr.c
+++ b/src/overlays/actors/ovl_En_Fr/z_en_fr.c
@@ -1058,7 +1058,7 @@ void EnFr_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec
}
void EnFr_Draw(Actor* thisx, GlobalContext* globalCtx) {
- static u64* eyeTextures[] = { 0x060059A0, 0x06005BA0 };
+ static void* eyeTextures[] = { 0x060059A0, 0x06005BA0 };
s16 lightRadius;
EnFr* this = THIS;
s16 frogIndex = this->actor.params - 1;
diff --git a/src/overlays/actors/ovl_En_Fw/z_en_fw.c b/src/overlays/actors/ovl_En_Fw/z_en_fw.c
index 872031fa2..808ccfa71 100644
--- a/src/overlays/actors/ovl_En_Fw/z_en_fw.c
+++ b/src/overlays/actors/ovl_En_Fw/z_en_fw.c
@@ -444,7 +444,7 @@ void EnFw_UpdateDust(EnFw* this) {
}
void EnFw_DrawDust(EnFw* this, GlobalContext* globalCtx) {
- static UNK_PTR D_80A1FC18[] = {
+ static void* dustTextures[] = {
gDust8Tex, gDust7Tex, gDust6Tex, gDust5Tex, gDust4Tex, gDust3Tex, gDust2Tex, gDust1Tex,
};
EnFwEffect* eff = this->effects;
@@ -477,7 +477,7 @@ void EnFw_DrawDust(EnFw* this, GlobalContext* globalCtx) {
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_fw.c", 1229),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
idx = eff->timer * (8.0f / eff->initialTimer);
- gSPSegment(POLY_XLU_DISP++, 0x8, SEGMENTED_TO_VIRTUAL(D_80A1FC18[idx]));
+ gSPSegment(POLY_XLU_DISP++, 0x8, SEGMENTED_TO_VIRTUAL(dustTextures[idx]));
gSPDisplayList(POLY_XLU_DISP++, &gFlareDancerSquareParticleDL);
}
}
diff --git a/src/overlays/actors/ovl_En_G_Switch/z_en_g_switch.c b/src/overlays/actors/ovl_En_G_Switch/z_en_g_switch.c
index 3eb8d773e..9b64dd72e 100644
--- a/src/overlays/actors/ovl_En_G_Switch/z_en_g_switch.c
+++ b/src/overlays/actors/ovl_En_G_Switch/z_en_g_switch.c
@@ -467,8 +467,9 @@ void EnGSwitch_DrawPot(Actor* thisx, GlobalContext* globalCtx) {
}
}
-static UNK_PTR sRupeeTex[] = { gRupeeGreenTex, gRupeeBlueTex, gRupeeRedTex,
- gRupeePinkTex, gRupeeOrangeTex, gRupeeSilverTex };
+static void* sRupeeTextures[] = {
+ gRupeeGreenTex, gRupeeBlueTex, gRupeeRedTex, gRupeePinkTex, gRupeeOrangeTex, gRupeeSilverTex,
+};
void EnGSwitch_DrawRupee(Actor* thisx, GlobalContext* globalCtx) {
s32 pad;
@@ -481,7 +482,7 @@ void EnGSwitch_DrawRupee(Actor* thisx, GlobalContext* globalCtx) {
func_8002EBCC(&this->actor, globalCtx, 0);
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_g_switch.c", 957),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
- gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(sRupeeTex[this->colorIdx]));
+ gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(sRupeeTextures[this->colorIdx]));
gSPDisplayList(POLY_OPA_DISP++, gRupeeDL);
CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_en_g_switch.c", 961);
}
@@ -565,7 +566,7 @@ void EnGSwitch_DrawEffects(EnGSwitch* this, GlobalContext* globalCtx) {
Matrix_RotateZ(effect->rot.z, MTXMODE_APPLY);
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_g_switch.c", 1088),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
- gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(sRupeeTex[effect->colorIdx]));
+ gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(sRupeeTextures[effect->colorIdx]));
gSPDisplayList(POLY_OPA_DISP++, gRupeeDL);
}
}
diff --git a/src/overlays/actors/ovl_En_Gb/z_en_gb.h b/src/overlays/actors/ovl_En_Gb/z_en_gb.h
index 9e7779df6..000742501 100644
--- a/src/overlays/actors/ovl_En_Gb/z_en_gb.h
+++ b/src/overlays/actors/ovl_En_Gb/z_en_gb.h
@@ -11,7 +11,7 @@ typedef void (*EnGbActionFunc)(struct EnGb*, GlobalContext*);
typedef struct {
/* 0x00 */ Color_RGBA8 prim;
/* 0x04 */ Color_RGBA8 env;
- /* 0x08 */ u64* texture;
+ /* 0x08 */ void* texture;
/* 0x0C */ s16 timerMultiplier;
} EnGbCagedSoulInfo; // size = 0x10
diff --git a/src/overlays/actors/ovl_En_Ge1/z_en_ge1.c b/src/overlays/actors/ovl_En_Ge1/z_en_ge1.c
index 54620a031..14980ddd9 100644
--- a/src/overlays/actors/ovl_En_Ge1/z_en_ge1.c
+++ b/src/overlays/actors/ovl_En_Ge1/z_en_ge1.c
@@ -81,7 +81,7 @@ static Gfx* sHairstyleDLists[] = {
static Vec3f D_80A327A8 = { 600.0f, 700.0f, 0.0f };
-static u64* sEyeTextures[] = {
+static void* sEyeTextures[] = {
gGerudoWhiteEyeOpenTex,
gGerudoWhiteEyeHalfTex,
gGerudoWhiteEyeClosedTex,
diff --git a/src/overlays/actors/ovl_En_Ge2/z_en_ge2.c b/src/overlays/actors/ovl_En_Ge2/z_en_ge2.c
index e627f28f2..ba11bf7c0 100644
--- a/src/overlays/actors/ovl_En_Ge2/z_en_ge2.c
+++ b/src/overlays/actors/ovl_En_Ge2/z_en_ge2.c
@@ -642,20 +642,15 @@ void EnGe2_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Ve
}
}
-static u64* sEyeTextures[] = {
- gGerudoPurpleEyeOpenTex,
- gGerudoPurpleEyeHalfTex,
- gGerudoPurpleEyeClosedTex,
-};
-
void EnGe2_Draw(Actor* thisx, GlobalContext* globalCtx) {
+ static void* eyeTextures[] = { gGerudoPurpleEyeOpenTex, gGerudoPurpleEyeHalfTex, gGerudoPurpleEyeClosedTex };
s32 pad;
EnGe2* this = THIS;
OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_ge2.c", 1274);
func_800943C8(globalCtx->state.gfxCtx);
- gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(sEyeTextures[this->eyeIndex]));
+ gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(eyeTextures[this->eyeIndex]));
func_8002EBCC(&this->actor, globalCtx, 0);
SkelAnime_DrawFlexOpa(globalCtx, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount,
EnGe2_OverrideLimbDraw, EnGe2_PostLimbDraw, this);
diff --git a/src/overlays/actors/ovl_En_Ge3/z_en_ge3.c b/src/overlays/actors/ovl_En_Ge3/z_en_ge3.c
index 34930335a..6c50eb168 100644
--- a/src/overlays/actors/ovl_En_Ge3/z_en_ge3.c
+++ b/src/overlays/actors/ovl_En_Ge3/z_en_ge3.c
@@ -276,20 +276,19 @@ void EnGe3_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Ve
}
}
-static u64* sEyeTextures[] = {
- 0x06005FE8, // Half-open
- 0x060065A8, // Quarter-open
- 0x06006D28, // Closed
-};
-
void EnGe3_Draw(Actor* thisx, GlobalContext* globalCtx2) {
+ static void* eyeTextures[] = {
+ 0x06005FE8, // Half-open
+ 0x060065A8, // Quarter-open
+ 0x06006D28, // Closed
+ };
EnGe3* this = THIS;
GlobalContext* globalCtx = globalCtx2;
OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_ge3.c", 614);
func_800943C8(globalCtx->state.gfxCtx);
- gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(sEyeTextures[this->eyeIndex]));
+ gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(eyeTextures[this->eyeIndex]));
func_8002EBCC(&this->actor, globalCtx, 0);
SkelAnime_DrawFlexOpa(globalCtx, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount,
EnGe3_OverrideLimbDraw, EnGe3_PostLimbDraw, this);
diff --git a/src/overlays/actors/ovl_En_GeldB/z_en_geldb.c b/src/overlays/actors/ovl_En_GeldB/z_en_geldb.c
index 85c9837f8..1ca22f180 100644
--- a/src/overlays/actors/ovl_En_GeldB/z_en_geldb.c
+++ b/src/overlays/actors/ovl_En_GeldB/z_en_geldb.c
@@ -1543,8 +1543,8 @@ void EnGeldB_Draw(Actor* thisx, GlobalContext* globalCtx) {
{ 3000.0f, 0.0f, 1600.0f },
{ 3000.0f, 6000.0f, 1600.0f },
};
- static u64* eyeDLists[4] = { gGerudoRedEyeOpenTex, gGerudoRedEyeHalfTex, gGerudoRedEyeShutTex,
- gGerudoRedEyeHalfTex };
+ static void* eyeTextures[] = { gGerudoRedEyeOpenTex, gGerudoRedEyeHalfTex, gGerudoRedEyeShutTex,
+ gGerudoRedEyeHalfTex };
s32 pad;
EnGeldB* this = THIS;
@@ -1575,7 +1575,7 @@ void EnGeldB_Draw(Actor* thisx, GlobalContext* globalCtx) {
if ((this->action != GELDB_WAIT) || !this->invisible) {
func_80093D18(globalCtx->state.gfxCtx);
- gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(eyeDLists[this->blinkState]));
+ gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(eyeTextures[this->blinkState]));
SkelAnime_DrawFlexOpa(globalCtx, this->skelAnime.skeleton, this->skelAnime.jointTable,
this->skelAnime.dListCount, EnGeldB_OverrideLimbDraw, EnGeldB_PostLimbDraw, this);
if (this->action == GELDB_BLOCK) {
diff --git a/src/overlays/actors/ovl_En_Gm/z_en_gm.c b/src/overlays/actors/ovl_En_Gm/z_en_gm.c
index 9258153d1..06a6e2e4a 100644
--- a/src/overlays/actors/ovl_En_Gm/z_en_gm.c
+++ b/src/overlays/actors/ovl_En_Gm/z_en_gm.c
@@ -318,7 +318,7 @@ void func_80A3E090(EnGm* this) {
}
void EnGm_Draw(Actor* thisx, GlobalContext* globalCtx) {
- static UNK_PTR eyeTextures[] = { gGoronCsEyeOpenTex, gGoronCsEyeHalfTex, gGoronCsEyeClosedTex };
+ static void* eyeTextures[] = { gGoronCsEyeOpenTex, gGoronCsEyeHalfTex, gGoronCsEyeClosedTex };
EnGm* this = THIS;
s32 pad;
diff --git a/src/overlays/actors/ovl_En_Go/z_en_go.c b/src/overlays/actors/ovl_En_Go/z_en_go.c
index bab39a21a..bb486f08f 100644
--- a/src/overlays/actors/ovl_En_Go/z_en_go.c
+++ b/src/overlays/actors/ovl_En_Go/z_en_go.c
@@ -1200,7 +1200,7 @@ void EnGo_UpdateDust(EnGo* this) {
}
void EnGo_DrawDust(EnGo* this, GlobalContext* globalCtx) {
- static u64* dustTex[] = { gDust8Tex, gDust7Tex, gDust6Tex, gDust5Tex, gDust4Tex, gDust3Tex, gDust2Tex, gDust1Tex };
+ static void* dustTex[] = { gDust8Tex, gDust7Tex, gDust6Tex, gDust5Tex, gDust4Tex, gDust3Tex, gDust2Tex, gDust1Tex };
EnGoEffect* dustEffect = this->dustEffects;
s16 alpha;
s16 firstDone;
diff --git a/src/overlays/actors/ovl_En_Go2/z_en_go2.c b/src/overlays/actors/ovl_En_Go2/z_en_go2.c
index 734647566..15fee32f7 100644
--- a/src/overlays/actors/ovl_En_Go2/z_en_go2.c
+++ b/src/overlays/actors/ovl_En_Go2/z_en_go2.c
@@ -66,7 +66,7 @@ void EnGo2_BiggoronEyedrops(EnGo2* this, GlobalContext* globalCtx);
void EnGo2_GoronLinkStopRolling(EnGo2* this, GlobalContext* globalCtx);
void EnGo2_GoronFireGenericAction(EnGo2* this, GlobalContext* globalCtx);
-static u64* sDustTex[] = { gDust8Tex, gDust7Tex, gDust6Tex, gDust5Tex, gDust4Tex, gDust3Tex, gDust2Tex, gDust1Tex };
+static void* sDustTex[] = { gDust8Tex, gDust7Tex, gDust6Tex, gDust5Tex, gDust4Tex, gDust3Tex, gDust2Tex, gDust1Tex };
static Vec3f sPos = { 0.0f, 0.0f, 0.0f };
static Vec3f sVelocity = { 0.0f, 0.0f, 0.0f };
@@ -2021,8 +2021,8 @@ void EnGo2_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Ve
void EnGo2_Draw(Actor* thisx, GlobalContext* globalCtx) {
EnGo2* this = THIS;
- u64* eyeTextures[] = { gGoronCsEyeClosed2Tex, gGoronCsEyeOpenTex, gGoronCsEyeHalfTex, gGoronCsEyeClosedTex };
- u64* mouthTextures[] = { gGoronCsMouthNeutralTex, gGoronCsMouthSmileTex };
+ void* eyeTextures[] = { gGoronCsEyeClosed2Tex, gGoronCsEyeOpenTex, gGoronCsEyeHalfTex, gGoronCsEyeClosedTex };
+ void* mouthTextures[] = { gGoronCsMouthNeutralTex, gGoronCsMouthSmileTex };
EnGo2_UpdateDust(this);
Matrix_Push();
diff --git a/src/overlays/actors/ovl_En_Guest/z_en_guest.c b/src/overlays/actors/ovl_En_Guest/z_en_guest.c
index 951a48e5e..1fedbdf4e 100644
--- a/src/overlays/actors/ovl_En_Guest/z_en_guest.c
+++ b/src/overlays/actors/ovl_En_Guest/z_en_guest.c
@@ -50,12 +50,6 @@ static InitChainEntry sInitChain[] = {
ICHAIN_F32(targetArrowOffset, 500, ICHAIN_STOP),
};
-static UNK_PTR D_80A50BA4[] = {
- 0x060005FC,
- 0x060006FC,
- 0x060007FC,
-};
-
extern FlexSkeletonHeader D_060000F0;
extern AnimationHeader D_060042AC;
extern Gfx D_060059B0[];
@@ -224,6 +218,11 @@ s32 EnGuest_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dLis
}
void EnGuest_Draw(Actor* thisx, GlobalContext* globalCtx) {
+ static void* D_80A50BA4[] = {
+ 0x060005FC,
+ 0x060006FC,
+ 0x060007FC,
+ };
EnGuest* this = THIS;
s32 pad;
diff --git a/src/overlays/actors/ovl_En_Holl/z_en_holl.c b/src/overlays/actors/ovl_En_Holl/z_en_holl.c
index f729591df..f3972e522 100644
--- a/src/overlays/actors/ovl_En_Holl/z_en_holl.c
+++ b/src/overlays/actors/ovl_En_Holl/z_en_holl.c
@@ -118,7 +118,7 @@ void EnHoll_Init(Actor* thisx, GlobalContext* globalCtx) {
void EnHoll_Destroy(Actor* thisx, GlobalContext* globalCtx) {
s32 transitionActorIdx = (u16)thisx->params >> 0xA;
- TransitionActorEntry* transitionEntry = &globalCtx->transitionActorList[transitionActorIdx];
+ TransitionActorEntry* transitionEntry = &globalCtx->transiActorCtx.list[transitionActorIdx];
transitionEntry->id = -transitionEntry->id;
}
@@ -149,12 +149,12 @@ void func_80A58DD4(EnHoll* this, GlobalContext* globalCtx) {
transitionActorIdx = (u16)this->actor.params >> 0xA;
if (absZ > sHorizTriggerDists[phi_t0][1]) {
if (globalCtx->roomCtx.prevRoom.num >= 0 && globalCtx->roomCtx.status == 0) {
- this->actor.room = globalCtx->transitionActorList[transitionActorIdx].sides[this->side].room;
+ this->actor.room = globalCtx->transiActorCtx.list[transitionActorIdx].sides[this->side].room;
EnHoll_SwapRooms(globalCtx);
func_80097534(globalCtx, &globalCtx->roomCtx);
}
} else {
- this->actor.room = globalCtx->transitionActorList[transitionActorIdx].sides[this->side ^ 1].room;
+ this->actor.room = globalCtx->transiActorCtx.list[transitionActorIdx].sides[this->side ^ 1].room;
if (globalCtx->roomCtx.prevRoom.num < 0) {
func_8009728C(globalCtx, &globalCtx->roomCtx, this->actor.room);
} else {
@@ -186,7 +186,7 @@ void func_80A59014(EnHoll* this, GlobalContext* globalCtx) {
(absZ = fabsf(vec.z), 100.0f > absZ && absZ > 50.0f))) {
s32 transitionActorIdx = (u16)this->actor.params >> 0xA;
s32 side = (vec.z < 0.0f) ? 0 : 1;
- TransitionActorEntry* transitionEntry = &globalCtx->transitionActorList[transitionActorIdx];
+ TransitionActorEntry* transitionEntry = &globalCtx->transiActorCtx.list[transitionActorIdx];
s32 room = transitionEntry->sides[side].room;
this->actor.room = room;
@@ -216,7 +216,7 @@ void func_80A591C0(EnHoll* this, GlobalContext* globalCtx) {
globalCtx->unk_11E18 = (s16)(605.0f - absY) * 0.5f;
}
if (absY < 95.0f) {
- this->actor.room = globalCtx->transitionActorList[transitionActorIdx].sides[1].room;
+ this->actor.room = globalCtx->transiActorCtx.list[transitionActorIdx].sides[1].room;
Math_SmoothStepToF(&player->actor.world.pos.x, this->actor.world.pos.x, 1.0f, 50.0f, 10.0f);
Math_SmoothStepToF(&player->actor.world.pos.z, this->actor.world.pos.z, 1.0f, 50.0f, 10.0f);
if (this->actor.room != globalCtx->roomCtx.curRoom.num &&
@@ -247,7 +247,7 @@ void func_80A593A4(EnHoll* this, GlobalContext* globalCtx) {
if (absY > 50.0f) {
transitionActorIdx = (u16)this->actor.params >> 0xA;
side = (0.0f < this->actor.yDistToPlayer) ? 0 : 1;
- this->actor.room = globalCtx->transitionActorList[transitionActorIdx].sides[side].room;
+ this->actor.room = globalCtx->transiActorCtx.list[transitionActorIdx].sides[side].room;
if (this->actor.room != globalCtx->roomCtx.curRoom.num &&
func_8009728C(globalCtx, &globalCtx->roomCtx, this->actor.room) != 0) {
EnHoll_SetupAction(this, EnHoll_NextAction);
@@ -271,7 +271,7 @@ void func_80A59520(EnHoll* this, GlobalContext* globalCtx) {
if (absY < 200.0f && absY > 50.0f) {
transitionActorIdx = (u16)this->actor.params >> 0xA;
side = (0.0f < this->actor.yDistToPlayer) ? 0 : 1;
- this->actor.room = globalCtx->transitionActorList[transitionActorIdx].sides[side].room;
+ this->actor.room = globalCtx->transiActorCtx.list[transitionActorIdx].sides[side].room;
if (this->actor.room != globalCtx->roomCtx.curRoom.num &&
func_8009728C(globalCtx, &globalCtx->roomCtx, this->actor.room) != 0) {
EnHoll_SetupAction(this, EnHoll_NextAction);
@@ -307,7 +307,7 @@ void func_80A59618(EnHoll* this, GlobalContext* globalCtx) {
}
if (absZ < 50.0f) {
side = (vec.z < 0.0f) ? 0 : 1;
- this->actor.room = globalCtx->transitionActorList[transitionActorIdx].sides[side].room;
+ this->actor.room = globalCtx->transiActorCtx.list[transitionActorIdx].sides[side].room;
if (this->actor.room != globalCtx->roomCtx.curRoom.num &&
func_8009728C(globalCtx, &globalCtx->roomCtx, this->actor.room) != 0) {
EnHoll_SetupAction(this, EnHoll_NextAction);
@@ -343,6 +343,7 @@ void EnHoll_Draw(Actor* thisx, GlobalContext* globalCtx) {
// Only draw the plane if not invisible
if (this->planeAlpha != 0) {
OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_holl.c", 805);
+
if (this->planeAlpha == 255) {
gfxP = POLY_OPA_DISP;
setupDLIdx = 37;
@@ -365,6 +366,7 @@ void EnHoll_Draw(Actor* thisx, GlobalContext* globalCtx) {
} else {
POLY_XLU_DISP = gfxP;
}
+
CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_en_holl.c", 831);
}
}
diff --git a/src/overlays/actors/ovl_En_Horse/z_en_horse.c b/src/overlays/actors/ovl_En_Horse/z_en_horse.c
index 0852d009d..c634726da 100644
--- a/src/overlays/actors/ovl_En_Horse/z_en_horse.c
+++ b/src/overlays/actors/ovl_En_Horse/z_en_horse.c
@@ -3787,23 +3787,24 @@ void EnHorse_SkinCallback1(Actor* thisx, GlobalContext* globalCtx, PSkinAwb* ski
CollisionCheck_SetAC(globalCtx, &globalCtx->colChkCtx, &this->jntSph.base);
}
-static s32 unk_80A667DC[] = { 0, 3, 7, 14 };
-static u64* sEyeTextures[] = {
- gEponaEyeOpenTex,
- gEponaEyeHalfTex,
- gEponaEyeClosedTex,
-};
-static u8 sBlinkTextures[] = { 0, 1, 2, 1 };
+// unused
+static s32 D_80A667DC[] = { 0, 3, 7, 14 };
s32 EnHorse_SkinCallback2(Actor* thisx, GlobalContext* globalCtx, s32 limbIndex, PSkinAwb* arg3) {
+ static void* eyeTextures[] = {
+ gEponaEyeOpenTex,
+ gEponaEyeHalfTex,
+ gEponaEyeClosedTex,
+ };
+ static u8 eyeBlinkIndexes[] = { 0, 1, 2, 1 };
EnHorse* this = THIS;
s32 drawOriginalLimb = true;
OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_horse.c", 8582);
if (limbIndex == 13 && this->type == HORSE_EPONA) {
- u8 index = sBlinkTextures[this->blinkTimer];
+ u8 index = eyeBlinkIndexes[this->blinkTimer];
- gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(sEyeTextures[index]));
+ gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(eyeTextures[index]));
} else if (this->type == HORSE_HNI && this->stateFlags & ENHORSE_FLAG_18 && limbIndex == 30) {
func_800A5F60(globalCtx->state.gfxCtx, &this->skin, limbIndex, gHorseIngoGerudoSaddleDL, 0);
drawOriginalLimb = false;
diff --git a/src/overlays/actors/ovl_En_Horse_Link_Child/z_en_horse_link_child.c b/src/overlays/actors/ovl_En_Horse_Link_Child/z_en_horse_link_child.c
index 63b113c41..66e43fb0b 100644
--- a/src/overlays/actors/ovl_En_Horse_Link_Child/z_en_horse_link_child.c
+++ b/src/overlays/actors/ovl_En_Horse_Link_Child/z_en_horse_link_child.c
@@ -548,7 +548,7 @@ static EnHorseLinkChildActionFunc sActionFuncs[] = {
func_80A698F4, func_80A69C18, func_80A699FC, func_80A6A068, func_80A6A7D0, func_80A6A5A4,
};
-static u64* sEyeTextures[] = { gChildEponaEyeOpenTex, gChildEponaEyeHalfTex, gChildEponaEyeCloseTex };
+static void* sEyeTextures[] = { gChildEponaEyeOpenTex, gChildEponaEyeHalfTex, gChildEponaEyeCloseTex };
static u8 sEyeIndexOrder[] = { 0, 1, 2, 1 };
void EnHorseLinkChild_Update(Actor* thisx, GlobalContext* globalCtx) {
diff --git a/src/overlays/actors/ovl_En_Jj/z_en_jj.c b/src/overlays/actors/ovl_En_Jj/z_en_jj.c
index 1bae5573f..4ce5a0db8 100644
--- a/src/overlays/actors/ovl_En_Jj/z_en_jj.c
+++ b/src/overlays/actors/ovl_En_Jj/z_en_jj.c
@@ -306,13 +306,8 @@ void EnJj_Update(Actor* thisx, GlobalContext* globalCtx) {
this->skelAnime.jointTable[10].z = this->mouthOpenAngle;
}
-static u64* sEyeTextures[] = {
- gJabuJabuEyeOpenTex,
- gJabuJabuEyeHalfTex,
- gJabuJabuEyeClosedTex,
-};
-
void EnJj_Draw(Actor* thisx, GlobalContext* globalCtx2) {
+ static void* eyeTextures[] = { gJabuJabuEyeOpenTex, gJabuJabuEyeHalfTex, gJabuJabuEyeClosedTex };
GlobalContext* globalCtx = globalCtx2;
EnJj* this = THIS;
@@ -321,7 +316,7 @@ void EnJj_Draw(Actor* thisx, GlobalContext* globalCtx2) {
func_800943C8(globalCtx->state.gfxCtx);
Matrix_Translate(0.0f, (cosf(this->skelAnime.curFrame * (M_PI / 41.0f)) * 10.0f) - 10.0f, 0.0f, MTXMODE_APPLY);
Matrix_Scale(10.0f, 10.0f, 10.0f, MTXMODE_APPLY);
- gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(sEyeTextures[this->eyeIndex]));
+ gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(eyeTextures[this->eyeIndex]));
SkelAnime_DrawFlexOpa(globalCtx, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount,
NULL, NULL, this);
diff --git a/src/overlays/actors/ovl_En_Kz/z_en_kz.c b/src/overlays/actors/ovl_En_Kz/z_en_kz.c
index 7e44eb19e..ef82e1d3d 100644
--- a/src/overlays/actors/ovl_En_Kz/z_en_kz.c
+++ b/src/overlays/actors/ovl_En_Kz/z_en_kz.c
@@ -485,7 +485,7 @@ void EnKz_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec
}
void EnKz_Draw(Actor* thisx, GlobalContext* globalCtx) {
- static UNK_PTR sEyeSegments[] = {
+ static void* sEyeSegments[] = {
0x06001470,
0x06001870,
0x06001C70,
diff --git a/src/overlays/actors/ovl_En_Ma2/z_en_ma2.c b/src/overlays/actors/ovl_En_Ma2/z_en_ma2.c
index a3ecbf1af..6266989b3 100644
--- a/src/overlays/actors/ovl_En_Ma2/z_en_ma2.c
+++ b/src/overlays/actors/ovl_En_Ma2/z_en_ma2.c
@@ -61,20 +61,6 @@ static struct_D_80AA1678 D_80AA2858[] = {
{ 0x06009EE0, 1.0f, ANIMMODE_LOOP, -10.0f },
};
-static Vec3f D_80AA28A8 = { 900.0f, 0.0f, 0.0f };
-
-static UNK_PTR D_80AA28B4[] = {
- 0x06002970,
- 0x06003570,
- 0x06003770,
-};
-
-static UNK_PTR D_80AA28C0[] = {
- 0x06002570,
- 0x06002C70,
- 0x06003070,
-};
-
extern Gfx D_06005420[];
extern FlexSkeletonHeader D_06008D90;
extern AnimationHeader D_060093BC;
@@ -363,7 +349,7 @@ s32 EnMa2_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList,
void EnMa2_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, void* thisx) {
EnMa2* this = THIS;
- Vec3f vec = D_80AA28A8;
+ Vec3f vec = { 900.0f, 0.0f, 0.0f };
OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_ma2.c", 904);
@@ -378,6 +364,16 @@ void EnMa2_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Ve
}
void EnMa2_Draw(Actor* thisx, GlobalContext* globalCtx) {
+ static void* D_80AA28B4[] = {
+ 0x06002970,
+ 0x06003570,
+ 0x06003770,
+ };
+ static void* D_80AA28C0[] = {
+ 0x06002570,
+ 0x06002C70,
+ 0x06003070,
+ };
EnMa2* this = THIS;
Camera* camera;
f32 someFloat;
diff --git a/src/overlays/actors/ovl_En_Ma3/z_en_ma3.c b/src/overlays/actors/ovl_En_Ma3/z_en_ma3.c
index 7e22b5fc2..488b5fc6e 100644
--- a/src/overlays/actors/ovl_En_Ma3/z_en_ma3.c
+++ b/src/overlays/actors/ovl_En_Ma3/z_en_ma3.c
@@ -65,20 +65,6 @@ static struct_D_80AA1678 D_80AA3848[] = {
{ 0x06009EE0, 1.0f, ANIMMODE_LOOP, -10.0f },
};
-static Vec3f D_80AA3898 = { 900.0f, 0.0f, 0.0f };
-
-static UNK_PTR D_80AA38A4[] = {
- 0x06002970,
- 0x06003570,
- 0x06003770,
-};
-
-static UNK_PTR D_80AA38B0[] = {
- 0x06002570,
- 0x06002C70,
- 0x06003070,
-};
-
extern u32 D_06005420;
extern FlexSkeletonHeader D_06008D90;
extern AnimationHeader D_060093BC;
@@ -345,7 +331,7 @@ s32 EnMa3_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList,
void EnMa3_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, void* thisx) {
EnMa3* this = THIS;
- Vec3f vec = D_80AA3898;
+ Vec3f vec = { 900.0f, 0.0f, 0.0f };
OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_ma3.c", 927);
@@ -360,6 +346,16 @@ void EnMa3_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Ve
}
void EnMa3_Draw(Actor* thisx, GlobalContext* globalCtx) {
+ static void* D_80AA38A4[] = {
+ 0x06002970,
+ 0x06003570,
+ 0x06003770,
+ };
+ static void* D_80AA38B0[] = {
+ 0x06002570,
+ 0x06002C70,
+ 0x06003070,
+ };
EnMa3* this = THIS;
Camera* camera;
f32 someFloat;
diff --git a/src/overlays/actors/ovl_En_Mm/z_en_mm.c b/src/overlays/actors/ovl_En_Mm/z_en_mm.c
index 83ac0e123..b93878e8b 100644
--- a/src/overlays/actors/ovl_En_Mm/z_en_mm.c
+++ b/src/overlays/actors/ovl_En_Mm/z_en_mm.c
@@ -522,7 +522,7 @@ void EnMm_Update(Actor* thisx, GlobalContext* globalCtx) {
extern Gfx D_0602CA38[]; // bunny hood dlist from object_link_child. replace with proper symbol later
void EnMm_Draw(Actor* thisx, GlobalContext* globalCtx) {
- static u64* mouthTextures[] = { gRunningManMouthOpenTex, gRunningManMouthClosedTex };
+ static void* mouthTextures[] = { gRunningManMouthOpenTex, gRunningManMouthClosedTex };
s32 pad;
EnMm* this = THIS;
diff --git a/src/overlays/actors/ovl_En_Mm2/z_en_mm2.c b/src/overlays/actors/ovl_En_Mm2/z_en_mm2.c
index 2a098490d..d34b37fbc 100644
--- a/src/overlays/actors/ovl_En_Mm2/z_en_mm2.c
+++ b/src/overlays/actors/ovl_En_Mm2/z_en_mm2.c
@@ -318,7 +318,7 @@ void EnMm2_Update(Actor* thisx, GlobalContext* globalCtx) {
}
void EnMm2_Draw(Actor* thisx, GlobalContext* globalCtx) {
- static u64* mouthTextures[] = { gRunningManMouthOpenTex, gRunningManMouthClosedTex };
+ static void* mouthTextures[] = { gRunningManMouthOpenTex, gRunningManMouthClosedTex };
EnMm2* this = THIS;
OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_mm2.c", 634);
diff --git a/src/overlays/actors/ovl_En_Nb/z_en_nb.c b/src/overlays/actors/ovl_En_Nb/z_en_nb.c
index 0835c3e13..9bd705000 100644
--- a/src/overlays/actors/ovl_En_Nb/z_en_nb.c
+++ b/src/overlays/actors/ovl_En_Nb/z_en_nb.c
@@ -78,7 +78,7 @@ static ColliderCylinderInitType1 sCylinderInit = {
{ 25, 80, 0, { 0, 0, 0 } },
};
-static u64* sEyeTextures[] = {
+static void* sEyeTextures[] = {
gNabooruEyeOpenTex,
gNabooruEyeHalfTex,
gNabooruEyeClosedTex,
@@ -543,14 +543,14 @@ void EnNb_CreateLightOrb(EnNb* this, GlobalContext* globalCtx) {
void EnNb_DrawTransparency(EnNb* this, GlobalContext* globalCtx) {
s32 pad[2];
s16 eyeSegIdx = this->eyeIdx;
- UNK_PTR addr = sEyeTextures[eyeSegIdx];
+ void* eyeTex = sEyeTextures[eyeSegIdx];
SkelAnime* skelAnime = &this->skelAnime;
OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_nb_inKenjyanomaDemo02.c", 263);
func_80093D84(globalCtx->state.gfxCtx);
- gSPSegment(POLY_XLU_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(addr));
- gSPSegment(POLY_XLU_DISP++, 0x09, SEGMENTED_TO_VIRTUAL(addr));
+ gSPSegment(POLY_XLU_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(eyeTex));
+ gSPSegment(POLY_XLU_DISP++, 0x09, SEGMENTED_TO_VIRTUAL(eyeTex));
gDPSetEnvColor(POLY_XLU_DISP++, 0, 0, 0, this->alpha);
gSPSegment(POLY_XLU_DISP++, 0x0C, &D_80116280[0]);
POLY_XLU_DISP = SkelAnime_DrawFlex(globalCtx, skelAnime->skeleton, skelAnime->jointTable, skelAnime->dListCount,
diff --git a/src/overlays/actors/ovl_En_Niw_Girl/z_en_niw_girl.c b/src/overlays/actors/ovl_En_Niw_Girl/z_en_niw_girl.c
index c33f8ce64..79b15e39b 100644
--- a/src/overlays/actors/ovl_En_Niw_Girl/z_en_niw_girl.c
+++ b/src/overlays/actors/ovl_En_Niw_Girl/z_en_niw_girl.c
@@ -247,7 +247,7 @@ s32 EnNiwGirlOverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dLi
static Vec3f sConstVec3f = { 0.2f, 0.2f, 0.2f };
void EnNiwGirl_Draw(Actor* thisx, GlobalContext* globalCtx) {
- static u64* eyeTextures[] = { gNiwGirlEyeOpenTex, gNiwGirlEyeHalfTex, gNiwGirlEyeClosedTex };
+ static void* eyeTextures[] = { gNiwGirlEyeOpenTex, gNiwGirlEyeHalfTex, gNiwGirlEyeClosedTex };
EnNiwGirl* this = THIS;
s32 pad;
Vec3f sp4C = sConstVec3f;
diff --git a/src/overlays/actors/ovl_En_Po_Field/z_en_po_field.h b/src/overlays/actors/ovl_En_Po_Field/z_en_po_field.h
index 55d0e4094..2d5192ad1 100644
--- a/src/overlays/actors/ovl_En_Po_Field/z_en_po_field.h
+++ b/src/overlays/actors/ovl_En_Po_Field/z_en_po_field.h
@@ -18,7 +18,7 @@ typedef struct {
/* 0x0003 */ Color_RGB8 lightColor;
/* 0x0006 */ Color_RGB8 envColor;
/* 0x0009 */ s8 unk_9;
- /* 0x000C */ u64* soulTexture;
+ /* 0x000C */ void* soulTexture;
} EnPoFieldInfo; // size = 0x10
typedef struct EnPoField {
diff --git a/src/overlays/actors/ovl_En_Po_Relay/z_en_po_relay.c b/src/overlays/actors/ovl_En_Po_Relay/z_en_po_relay.c
index 5e023a778..fe9c209d8 100644
--- a/src/overlays/actors/ovl_En_Po_Relay/z_en_po_relay.c
+++ b/src/overlays/actors/ovl_En_Po_Relay/z_en_po_relay.c
@@ -80,7 +80,7 @@ static Vec3f D_80AD8D3C = { 0.0f, 0.0f, 0.0f };
static Vec3f D_80AD8D48 = { 0.0f, 1200.0f, 0.0f };
-static u64* sEyesSegments[] = {
+static void* sEyesTextures[] = {
gDampeEyeOpenTex,
gDampeEyeHalfTex,
gDampeEyeClosedTex,
@@ -404,7 +404,7 @@ void EnPoRelay_Draw(Actor* thisx, GlobalContext* globalCtx) {
OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_po_relay.c", 940);
func_80093D18(globalCtx->state.gfxCtx);
- gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(sEyesSegments[this->eyeTextureIdx]));
+ gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(sEyesTextures[this->eyeTextureIdx]));
SkelAnime_DrawFlexOpa(globalCtx, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount,
NULL, EnPoRelay_PostLimbDraw, &this->actor);
CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_en_po_relay.c", 954);
diff --git a/src/overlays/actors/ovl_En_Rl/z_en_rl.c b/src/overlays/actors/ovl_En_Rl/z_en_rl.c
index 6c38ef97d..724b6b288 100644
--- a/src/overlays/actors/ovl_En_Rl/z_en_rl.c
+++ b/src/overlays/actors/ovl_En_Rl/z_en_rl.c
@@ -28,7 +28,7 @@ void func_80AE7FD0(EnRl* this, GlobalContext* globalCtx);
void func_80AE7FDC(EnRl* this, GlobalContext* globalCtx);
void func_80AE7D94(EnRl* this, GlobalContext* globalCtx);
-static UNK_PTR D_80AE81A0[] = { 0x06003620, 0x06003960, 0x06003B60 };
+static void* D_80AE81A0[] = { 0x06003620, 0x06003960, 0x06003B60 };
extern FlexSkeletonHeader D_06007B38;
extern AnimationHeader D_06000A3C;
@@ -304,15 +304,15 @@ void func_80AE7D40(EnRl* this, GlobalContext* globalCtx) {
void func_80AE7D94(EnRl* this, GlobalContext* globalCtx) {
s32 pad[2];
s16 temp = this->eyeTextureIndex;
- s32 addr = D_80AE81A0[temp];
+ void* tex = D_80AE81A0[temp];
SkelAnime* skelAnime = &this->skelAnime;
OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_rl_inKenjyanomaDemo02.c", 304);
func_80093D84(globalCtx->state.gfxCtx);
- gSPSegment(POLY_XLU_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(addr));
- gSPSegment(POLY_XLU_DISP++, 0x09, SEGMENTED_TO_VIRTUAL(addr));
+ gSPSegment(POLY_XLU_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(tex));
+ gSPSegment(POLY_XLU_DISP++, 0x09, SEGMENTED_TO_VIRTUAL(tex));
gDPSetEnvColor(POLY_XLU_DISP++, 0, 0, 0, this->alpha);
gSPSegment(POLY_XLU_DISP++, 0x0C, D_80116280);
@@ -353,15 +353,15 @@ void func_80AE7FD0(EnRl* this, GlobalContext* globalCtx) {
void func_80AE7FDC(EnRl* this, GlobalContext* globalCtx) {
s32 pad[2];
s16 temp = this->eyeTextureIndex;
- s32 addr = D_80AE81A0[temp];
+ void* tex = D_80AE81A0[temp];
SkelAnime* skelAnime = &this->skelAnime;
OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_rl.c", 416);
func_80093D18(globalCtx->state.gfxCtx);
- gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(addr));
- gSPSegment(POLY_OPA_DISP++, 0x09, SEGMENTED_TO_VIRTUAL(addr));
+ gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(tex));
+ gSPSegment(POLY_OPA_DISP++, 0x09, SEGMENTED_TO_VIRTUAL(tex));
gDPSetEnvColor(POLY_OPA_DISP++, 0, 0, 0, 255);
gSPSegment(POLY_OPA_DISP++, 0x0C, &D_80116280[2]);
diff --git a/src/overlays/actors/ovl_En_Ru2/z_en_ru2.c b/src/overlays/actors/ovl_En_Ru2/z_en_ru2.c
index dbc479d7a..506925cf8 100644
--- a/src/overlays/actors/ovl_En_Ru2/z_en_ru2.c
+++ b/src/overlays/actors/ovl_En_Ru2/z_en_ru2.c
@@ -468,15 +468,15 @@ void func_80AF31C8(EnRu2* this, GlobalContext* globalCtx) {
void func_80AF321C(EnRu2* this, GlobalContext* globalCtx) {
s32 pad[2];
s16 temp = this->unk_2A4;
- UNK_PTR addr = sEyeTextures[temp];
+ void* tex = sEyeTextures[temp];
SkelAnime* skelAnime = &this->skelAnime;
OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_ru2_inKenjyanomaDemo02.c", 264);
func_80093D84(globalCtx->state.gfxCtx);
- gSPSegment(POLY_XLU_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(addr));
- gSPSegment(POLY_XLU_DISP++, 0x09, SEGMENTED_TO_VIRTUAL(addr));
+ gSPSegment(POLY_XLU_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(tex));
+ gSPSegment(POLY_XLU_DISP++, 0x09, SEGMENTED_TO_VIRTUAL(tex));
gDPSetEnvColor(POLY_XLU_DISP++, 0, 0, 0, this->alpha);
gSPSegment(POLY_XLU_DISP++, 0x0C, &D_80116280[0]);
@@ -796,15 +796,15 @@ void func_80AF3F14(EnRu2* this, GlobalContext* globalCtx) {
void func_80AF3F20(EnRu2* this, GlobalContext* globalCtx) {
s32 pad[2];
s16 temp = this->unk_2A4;
- UNK_PTR addr = sEyeTextures[temp];
+ void* tex = sEyeTextures[temp];
SkelAnime* skelAnime = &this->skelAnime;
OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_ru2.c", 642);
func_80093D18(globalCtx->state.gfxCtx);
- gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(addr));
- gSPSegment(POLY_OPA_DISP++, 0x09, SEGMENTED_TO_VIRTUAL(addr));
+ gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(tex));
+ gSPSegment(POLY_OPA_DISP++, 0x09, SEGMENTED_TO_VIRTUAL(tex));
gDPSetEnvColor(POLY_OPA_DISP++, 0, 0, 0, 255);
gSPSegment(POLY_OPA_DISP++, 0x0C, &D_80116280[2]);
diff --git a/src/overlays/actors/ovl_En_Sa/z_en_sa.c b/src/overlays/actors/ovl_En_Sa/z_en_sa.c
index 141f3a034..8972195da 100644
--- a/src/overlays/actors/ovl_En_Sa/z_en_sa.c
+++ b/src/overlays/actors/ovl_En_Sa/z_en_sa.c
@@ -762,24 +762,26 @@ void EnSa_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec
}
void EnSa_Draw(Actor* thisx, GlobalContext* globalCtx) {
- static u64* sMouthTextures[] = { gSariaMouthClosed2Tex, gSariaMouthSmilingOpenTex, gSariaMouthFrowningTex,
- gSariaMouthSuprisedTex, gSariaMouthClosedTex };
- static u64* sEyeTextures[] = { gSariaEyeOpenTex, gSariaEyeHalfTex, gSariaEyeClosedTex, gSariaEyeSuprisedTex,
- gSariaEyeSadTex };
-
+ static void* mouthTextures[] = {
+ gSariaMouthClosed2Tex, gSariaMouthSmilingOpenTex, gSariaMouthFrowningTex,
+ gSariaMouthSuprisedTex, gSariaMouthClosedTex,
+ };
+ static void* eyeTextures[] = {
+ gSariaEyeOpenTex, gSariaEyeHalfTex, gSariaEyeClosedTex, gSariaEyeSuprisedTex, gSariaEyeSadTex,
+ };
EnSa* this = THIS;
OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_sa.c", 1444);
if (this->alpha == 255) {
- gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(sEyeTextures[this->rightEyeIndex]));
- gSPSegment(POLY_OPA_DISP++, 0x09, SEGMENTED_TO_VIRTUAL(sEyeTextures[this->leftEyeIndex]));
- gSPSegment(POLY_OPA_DISP++, 0x0A, SEGMENTED_TO_VIRTUAL(sMouthTextures[this->mouthIndex]));
+ gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(eyeTextures[this->rightEyeIndex]));
+ gSPSegment(POLY_OPA_DISP++, 0x09, SEGMENTED_TO_VIRTUAL(eyeTextures[this->leftEyeIndex]));
+ gSPSegment(POLY_OPA_DISP++, 0x0A, SEGMENTED_TO_VIRTUAL(mouthTextures[this->mouthIndex]));
func_80034BA0(globalCtx, &this->skelAnime, EnSa_OverrideLimbDraw, EnSa_PostLimbDraw, &this->actor, this->alpha);
} else if (this->alpha != 0) {
- gSPSegment(POLY_XLU_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(sEyeTextures[this->rightEyeIndex]));
- gSPSegment(POLY_XLU_DISP++, 0x09, SEGMENTED_TO_VIRTUAL(sEyeTextures[this->leftEyeIndex]));
- gSPSegment(POLY_XLU_DISP++, 0x0A, SEGMENTED_TO_VIRTUAL(sMouthTextures[this->mouthIndex]));
+ gSPSegment(POLY_XLU_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(eyeTextures[this->rightEyeIndex]));
+ gSPSegment(POLY_XLU_DISP++, 0x09, SEGMENTED_TO_VIRTUAL(eyeTextures[this->leftEyeIndex]));
+ gSPSegment(POLY_XLU_DISP++, 0x0A, SEGMENTED_TO_VIRTUAL(mouthTextures[this->mouthIndex]));
func_80034CC4(globalCtx, &this->skelAnime, EnSa_OverrideLimbDraw, EnSa_PostLimbDraw, &this->actor, this->alpha);
}
diff --git a/src/overlays/actors/ovl_En_Takara_Man/z_en_takara_man.c b/src/overlays/actors/ovl_En_Takara_Man/z_en_takara_man.c
index a0b9a62fc..8393d6bf5 100644
--- a/src/overlays/actors/ovl_En_Takara_Man/z_en_takara_man.c
+++ b/src/overlays/actors/ovl_En_Takara_Man/z_en_takara_man.c
@@ -215,17 +215,16 @@ s32 EnTakaraMan_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx**
}
void EnTakaraMan_Draw(Actor* thisx, GlobalContext* globalCtx) {
- static UNK_PTR sTakaraEyeTextures[] = {
+ static void* eyeTextures[] = {
0x06000970,
0x06000D70,
};
-
EnTakaraMan* this = THIS;
OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_takara_man.c", 528);
func_80093D18(globalCtx->state.gfxCtx);
- gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(sTakaraEyeTextures[this->eyeTextureIdx]));
+ gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(eyeTextures[this->eyeTextureIdx]));
SkelAnime_DrawFlexOpa(globalCtx, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount,
EnTakaraMan_OverrideLimbDraw, NULL, this);
diff --git a/src/overlays/actors/ovl_En_Tk/z_en_tk.c b/src/overlays/actors/ovl_En_Tk/z_en_tk.c
index f1f793cef..6a07cd47f 100644
--- a/src/overlays/actors/ovl_En_Tk/z_en_tk.c
+++ b/src/overlays/actors/ovl_En_Tk/z_en_tk.c
@@ -79,7 +79,7 @@ void EnTkEff_Update(EnTk* this) {
}
void EnTkEff_Draw(EnTk* this, GlobalContext* globalCtx) {
- static UNK_PTR dustImages[] = {
+ static void* dustTextures[] = {
&gDust8Tex, &gDust7Tex, &gDust6Tex, &gDust5Tex, &gDust4Tex, &gDust3Tex, &gDust2Tex, &gDust1Tex,
};
@@ -116,8 +116,8 @@ void EnTkEff_Draw(EnTk* this, GlobalContext* globalCtx) {
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_tk_eff.c", 140),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
- imageIdx = eff->timeLeft * ((f32)ARRAY_COUNT(dustImages) / eff->timeTotal);
- gSPSegment(POLY_XLU_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(dustImages[imageIdx]));
+ imageIdx = eff->timeLeft * ((f32)ARRAY_COUNT(dustTextures) / eff->timeTotal);
+ gSPSegment(POLY_XLU_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(dustTextures[imageIdx]));
gSPDisplayList(POLY_XLU_DISP++, gDampeEff2DL);
}
@@ -717,7 +717,7 @@ void EnTk_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec
}
void EnTk_Draw(Actor* thisx, GlobalContext* globalCtx) {
- static u64* sEyesSegments[] = {
+ static void* sEyesSegments[] = {
gDampeEyeOpenTex,
gDampeEyeHalfTex,
gDampeEyeClosedTex,
diff --git a/src/overlays/actors/ovl_En_Tr/z_en_tr.c b/src/overlays/actors/ovl_En_Tr/z_en_tr.c
index 42411f641..5fdf9f6a9 100644
--- a/src/overlays/actors/ovl_En_Tr/z_en_tr.c
+++ b/src/overlays/actors/ovl_En_Tr/z_en_tr.c
@@ -75,7 +75,7 @@ static Color_RGBA8 D_80B243C0[4] = {
{ 0, 0, 255, 255 },
};
-static u64* sEyeTextures[] = {
+static void* sEyeTextures[] = {
0x060086D8, // Open
0x060094D8, // Half
0x060098D8, // Closed
diff --git a/src/overlays/actors/ovl_En_Xc/z_en_xc.c b/src/overlays/actors/ovl_En_Xc/z_en_xc.c
index 834aa18bb..c1e78b41e 100644
--- a/src/overlays/actors/ovl_En_Xc/z_en_xc.c
+++ b/src/overlays/actors/ovl_En_Xc/z_en_xc.c
@@ -48,7 +48,7 @@ static ColliderCylinderInitType1 sCylinderInit = {
{ 25, 80, 0, { 0, 0, 0 } },
};
-static u64* sEyeTextures[] = {
+static void* sEyeTextures[] = {
gSheikEyeOpenTex,
gSheikEyeHalfClosedTex,
gSheikEyeShutTex,
@@ -1067,7 +1067,7 @@ void EnXc_DrawPullingOutHarp(Actor* thisx, GlobalContext* globalCtx) {
EnXc* this = THIS;
s32 pad;
s16 eyePattern = this->eyeIdx;
- u64* eyeTexture = sEyeTextures[eyePattern];
+ void* eyeTexture = sEyeTextures[eyePattern];
SkelAnime* skelAnime = &this->skelAnime;
GraphicsContext* gfxCtx = globalCtx->state.gfxCtx;
s32 pad2;
@@ -1089,7 +1089,7 @@ void EnXc_DrawHarp(Actor* thisx, GlobalContext* globalCtx) {
EnXc* this = THIS;
s32 pad;
s16 eyePattern = this->eyeIdx;
- u64* eyeTexture = sEyeTextures[eyePattern];
+ void* eyeTexture = sEyeTextures[eyePattern];
SkelAnime* skelAnime = &this->skelAnime;
GraphicsContext* gfxCtx = globalCtx->state.gfxCtx;
s32 pad2;
@@ -1699,7 +1699,7 @@ void EnXc_DrawTriforce(Actor* thisx, GlobalContext* globalCtx) {
EnXc* this = THIS;
s32 pad;
s16 eyeIdx = this->eyeIdx;
- u64* eyeTexture = sEyeTextures[eyeIdx];
+ void* eyeTexture = sEyeTextures[eyeIdx];
SkelAnime* skelAnime = &this->skelAnime;
GraphicsContext* gfxCtx = globalCtx->state.gfxCtx;
s32 pad2;
@@ -2375,7 +2375,7 @@ void EnXc_DrawDefault(Actor* thisx, GlobalContext* globalCtx) {
s32 pad;
EnXc* this = THIS;
s16 eyeIdx = this->eyeIdx;
- u64* eyeSegment = sEyeTextures[eyeIdx];
+ void* eyeSegment = sEyeTextures[eyeIdx];
SkelAnime* skelAnime = &this->skelAnime;
GraphicsContext* localGfxCtx = globalCtx->state.gfxCtx;
GraphicsContext* gfxCtx = localGfxCtx;
diff --git a/src/overlays/actors/ovl_En_Zl1/z_en_zl1.c b/src/overlays/actors/ovl_En_Zl1/z_en_zl1.c
index 1375757d4..2cd86e24f 100644
--- a/src/overlays/actors/ovl_En_Zl1/z_en_zl1.c
+++ b/src/overlays/actors/ovl_En_Zl1/z_en_zl1.c
@@ -59,8 +59,12 @@ static ColliderCylinderInit sCylinderInit = {
{ 20, 46, 0, { 0, 0, 0 } },
};
-static void* D_80B4E61C[] = { gChildZelda1EyeOpenLookingUpRightTex, gChildZelda1EyeHalf2Tex, gChildZelda1EyeClosedTex,
- gChildZelda1EyeHalf2Tex };
+static void* D_80B4E61C[] = {
+ gChildZelda1EyeOpenLookingUpRightTex,
+ gChildZelda1EyeHalf2Tex,
+ gChildZelda1EyeClosedTex,
+ gChildZelda1EyeHalf2Tex,
+};
static void* D_80B4E62C[] = { gChildZelda1MouthNeutralTex };
void func_80B4AB40(void) {
diff --git a/src/overlays/actors/ovl_En_Zl2/z_en_zl2.c b/src/overlays/actors/ovl_En_Zl2/z_en_zl2.c
index 5941fc342..8b516c751 100644
--- a/src/overlays/actors/ovl_En_Zl2/z_en_zl2.c
+++ b/src/overlays/actors/ovl_En_Zl2/z_en_zl2.c
@@ -62,11 +62,11 @@ void func_80B523BC(EnZl2* this, GlobalContext* globalCtx);
void func_80B523C8(EnZl2* this, GlobalContext* globalCtx);
void func_80B525D4(EnZl2* this, GlobalContext* globalCtx);
-static u64* sEyeTextures[] = { gZelda2EyeOpenTex, gZelda2EyeHalfTex, gZelda2EyeShutTex,
- gZelda2Eye03Tex, gZelda2Eye04Tex, gZelda2Eye05Tex,
- gZelda2Eye06Tex, gZelda2Eye07Tex, gZelda2Eye08Tex };
+static void* sEyeTextures[] = { gZelda2EyeOpenTex, gZelda2EyeHalfTex, gZelda2EyeShutTex,
+ gZelda2Eye03Tex, gZelda2Eye04Tex, gZelda2Eye05Tex,
+ gZelda2Eye06Tex, gZelda2Eye07Tex, gZelda2Eye08Tex };
-static u64* sMouthTextures[] = { gZelda2MouthSeriousTex, gZelda2MouthHappyTex, gZelda2MouthOpenTex };
+static void* sMouthTextures[] = { gZelda2MouthSeriousTex, gZelda2MouthHappyTex, gZelda2MouthOpenTex };
static EnZl2ActionFunc sActionFuncs[] = {
func_80B521A0, func_80B50BBC, func_80B50BEC, func_80B50C40, func_80B50CA8, func_80B50CFC,
@@ -1632,11 +1632,11 @@ void func_80B523C8(EnZl2* this, GlobalContext* globalCtx) {
s32 pad[3];
s16 eyeTexIndex = this->eyeTexIndex;
s16 eyeTexIndex2 = this->eyeTexIndex2;
- u64* eyeTex = sEyeTextures[eyeTexIndex];
- u64* eyeTex2 = sEyeTextures[eyeTexIndex2];
+ void* eyeTex = sEyeTextures[eyeTexIndex];
+ void* eyeTex2 = sEyeTextures[eyeTexIndex2];
SkelAnime* skelAnime = &this->skelAnime;
s16 mouthTexIndex = this->mouthTexIndex;
- u64* mouthTex = sMouthTextures[mouthTexIndex];
+ void* mouthTex = sMouthTextures[mouthTexIndex];
s32 pad1;
OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_zl2.c", 1623);
@@ -1658,10 +1658,10 @@ void func_80B523C8(EnZl2* this, GlobalContext* globalCtx) {
void func_80B525D4(EnZl2* this, GlobalContext* globalCtx) {
s32 pad[2];
s16 eyeTexIndex = this->eyeTexIndex;
- u64* eyeTex = sEyeTextures[eyeTexIndex];
+ void* eyeTex = sEyeTextures[eyeTexIndex];
s16 mouthTexIndex = this->mouthTexIndex;
SkelAnime* skelAnime = &this->skelAnime;
- u64* mouthTex = sMouthTextures[mouthTexIndex];
+ void* mouthTex = sMouthTextures[mouthTexIndex];
s32 pad1;
OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_zl2.c", 1663);
diff --git a/src/overlays/actors/ovl_En_Zl3/z_en_zl3.c b/src/overlays/actors/ovl_En_Zl3/z_en_zl3.c
index 9d5d9ad03..48fd99eac 100644
--- a/src/overlays/actors/ovl_En_Zl3/z_en_zl3.c
+++ b/src/overlays/actors/ovl_En_Zl3/z_en_zl3.c
@@ -41,10 +41,10 @@ static ColliderCylinderInitType1 sCylinderInit = {
{ 25, 80, 0, { 0, 0, 0 } },
};
-static u64* sEyeTextures[] = { gZelda2EyeOpenTex, gZelda2EyeHalfTex, gZelda2EyeShutTex, gZelda2Eye03Tex,
- gZelda2Eye04Tex, gZelda2Eye05Tex, gZelda2Eye06Tex, NULL };
+static void* sEyeTextures[] = { gZelda2EyeOpenTex, gZelda2EyeHalfTex, gZelda2EyeShutTex, gZelda2Eye03Tex,
+ gZelda2Eye04Tex, gZelda2Eye05Tex, gZelda2Eye06Tex, NULL };
-static u64* sMouthTextures[] = { gZelda2MouthSeriousTex, gZelda2MouthHappyTex, gZelda2MouthOpenTex };
+static void* sMouthTextures[] = { gZelda2MouthSeriousTex, gZelda2MouthHappyTex, gZelda2MouthOpenTex };
s32 D_80B5A468 = 0;
@@ -2699,10 +2699,10 @@ void func_80B59FE8(EnZl3* this, GlobalContext* globalCtx) {
void func_80B59FF4(EnZl3* this, GlobalContext* globalCtx) {
s32 pad[2];
s16 eyeTexIndex = this->eyeTexIndex;
- u64* eyeTex = sEyeTextures[eyeTexIndex];
+ void* eyeTex = sEyeTextures[eyeTexIndex];
s16 mouthTexIndex = this->mouthTexIndex;
SkelAnime* skelAnime = &this->skelAnime;
- u64* mouthTex = sMouthTextures[mouthTexIndex];
+ void* mouthTex = sMouthTextures[mouthTexIndex];
s32 pad2;
OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_zl3.c", 2165);
@@ -2724,10 +2724,10 @@ void func_80B59FF4(EnZl3* this, GlobalContext* globalCtx) {
void func_80B5A1D0(EnZl3* this, GlobalContext* globalCtx) {
s32 pad[2];
s16 eyeTexIndex = this->eyeTexIndex;
- u64* eyeTex = sEyeTextures[eyeTexIndex];
+ void* eyeTex = sEyeTextures[eyeTexIndex];
s16 mouthTexIndex = this->mouthTexIndex;
SkelAnime* skelAnime = &this->skelAnime;
- u64* mouthTex = sMouthTextures[mouthTexIndex];
+ void* mouthTex = sMouthTextures[mouthTexIndex];
s32 pad2;
OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_zl3.c", 2205);
diff --git a/src/overlays/actors/ovl_En_Zl4/z_en_zl4.c b/src/overlays/actors/ovl_En_Zl4/z_en_zl4.c
index 83be6ade9..d942a8567 100644
--- a/src/overlays/actors/ovl_En_Zl4/z_en_zl4.c
+++ b/src/overlays/actors/ovl_En_Zl4/z_en_zl4.c
@@ -1283,9 +1283,9 @@ void EnZl4_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Ve
void EnZl4_Draw(Actor* thisx, GlobalContext* globalCtx) {
EnZl4* this = THIS;
- u64* mouthTex[] = { gChildZeldaMouthNeutralTex, gChildZeldaMouthHappyTex, gChildZeldaMouthWorriedTex,
- gChildZeldaMouthSurprisedTex };
- u64* eyeTex[] = {
+ void* mouthTex[] = { gChildZeldaMouthNeutralTex, gChildZeldaMouthHappyTex, gChildZeldaMouthWorriedTex,
+ gChildZeldaMouthSurprisedTex };
+ void* eyeTex[] = {
gChildZeldaEyeOpenTex, gChildZeldaEyeBlinkTex, gChildZeldaEyeShutTex, gChildZeldaEyeWideTex,
gChildZeldaEyeSquintTex, gChildZeldaEyeOutTex, gChildZeldaEyeInTex,
};
diff --git a/src/overlays/actors/ovl_Fishing/z_fishing.c b/src/overlays/actors/ovl_Fishing/z_fishing.c
index 3612a1b8c..a77b5f96b 100644
--- a/src/overlays/actors/ovl_Fishing/z_fishing.c
+++ b/src/overlays/actors/ovl_Fishing/z_fishing.c
@@ -887,10 +887,10 @@ void Fishing_Init(Actor* thisx, GlobalContext* globalCtx2) {
D_80B7E07D = (HIGH_SCORE(HS_FISHING) & 0xFF0000) >> 0x10;
if ((D_80B7E07D & 7) == 7) {
- globalCtx->unk_11D30[0] = 90;
+ globalCtx->roomCtx.unk_74[0] = 90;
D_80B7E076 = 1;
} else {
- globalCtx->unk_11D30[0] = 40;
+ globalCtx->roomCtx.unk_74[0] = 40;
D_80B7E076 = 0;
}
diff --git a/src/overlays/actors/ovl_Obj_Lightswitch/z_obj_lightswitch.c b/src/overlays/actors/ovl_Obj_Lightswitch/z_obj_lightswitch.c
index 9f544ab65..ae6d9d9e8 100644
--- a/src/overlays/actors/ovl_Obj_Lightswitch/z_obj_lightswitch.c
+++ b/src/overlays/actors/ovl_Obj_Lightswitch/z_obj_lightswitch.c
@@ -83,7 +83,7 @@ static ColliderJntSphInit sColliderJntSphInit = {
static CollisionCheckInfoInit sColChkInfoInit = { 0, 12, 60, MASS_IMMOVABLE };
-static UNK_PTR faceTextures[] = { D_06000C20, D_06000420, D_06001420 };
+static void* sFaceTextures[] = { D_06000C20, D_06000420, D_06001420 };
static Vec3f D_80B97F68 = { -1707.0f, 843.0f, -180.0f };
static Vec3f D_80B97F74 = { 0.0f, 0.0f, 0.0f };
@@ -428,7 +428,7 @@ void ObjLightswitch_DrawOpa(ObjLightswitch* this, GlobalContext* globalCtx) {
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_obj_lightswitch.c", 841),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
- gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(faceTextures[this->faceTextureIndex]));
+ gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(sFaceTextures[this->faceTextureIndex]));
gSPDisplayList(POLY_OPA_DISP++, D_06000260);
rot.x = this->actor.shape.rot.x;
@@ -468,7 +468,7 @@ void ObjLightswitch_DrawXlu(ObjLightswitch* this, GlobalContext* globalCtx) {
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_obj_lightswitch.c", 912),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
- gSPSegment(POLY_XLU_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(faceTextures[this->faceTextureIndex]));
+ gSPSegment(POLY_XLU_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(sFaceTextures[this->faceTextureIndex]));
gSPDisplayList(POLY_XLU_DISP++, D_06000260);
sp60.x = this->actor.shape.rot.x;
diff --git a/src/overlays/actors/ovl_Obj_Switch/z_obj_switch.c b/src/overlays/actors/ovl_Obj_Switch/z_obj_switch.c
index 63e3e39cd..ab671f962 100644
--- a/src/overlays/actors/ovl_Obj_Switch/z_obj_switch.c
+++ b/src/overlays/actors/ovl_Obj_Switch/z_obj_switch.c
@@ -723,22 +723,11 @@ void ObjSwitch_DrawFloorRusty(ObjSwitch* this, GlobalContext* globalCtx) {
Gfx_DrawDListOpa(globalCtx, gRustyFloorSwitchDL);
}
-static u64* sEyeTextures[][4] = {
- {
- gEyeSwitchGoldOpenTex,
- gEyeSwitchGoldOpeningTex,
- gEyeSwitchGoldClosingTex,
- gEyeSwitchGoldClosedTex,
- },
- {
- gEyeSwitchSilverOpenTex,
- gEyeSwitchSilverHalfTex,
- gEyeSwitchSilverClosedTex,
- gEyeSwitchSilverClosedTex,
- },
-};
-
void ObjSwitch_DrawEye(ObjSwitch* this, GlobalContext* globalCtx) {
+ static void* eyeTextures[][4] = {
+ { gEyeSwitchGoldOpenTex, gEyeSwitchGoldOpeningTex, gEyeSwitchGoldClosingTex, gEyeSwitchGoldClosedTex },
+ { gEyeSwitchSilverOpenTex, gEyeSwitchSilverHalfTex, gEyeSwitchSilverClosedTex, gEyeSwitchSilverClosedTex },
+ };
static Gfx* eyeDlists[] = { gEyeSwitch1DL, gEyeSwitch2DL };
s32 pad;
s32 subType = (this->dyna.actor.params >> 4 & 7);
@@ -748,7 +737,7 @@ void ObjSwitch_DrawEye(ObjSwitch* this, GlobalContext* globalCtx) {
func_80093D18(globalCtx->state.gfxCtx);
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_obj_switch.c", 1462),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
- gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(sEyeTextures[subType][this->eyeTexIndex]));
+ gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(eyeTextures[subType][this->eyeTexIndex]));
gSPDisplayList(POLY_OPA_DISP++, eyeDlists[subType]);
CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_obj_switch.c", 1471);
diff --git a/src/overlays/actors/ovl_Obj_Switch/z_obj_switch.h b/src/overlays/actors/ovl_Obj_Switch/z_obj_switch.h
index 337019be7..f25ffc362 100644
--- a/src/overlays/actors/ovl_Obj_Switch/z_obj_switch.h
+++ b/src/overlays/actors/ovl_Obj_Switch/z_obj_switch.h
@@ -52,7 +52,7 @@ typedef struct ObjSwitch {
/* 0x016C */ s16 cooldownTimer;
/* 0x016E */ u8 cooldownOn;
/* 0x0170 */ s16 eyeTexIndex;
- /* 0x0174 */ UNK_PTR crystalSubtype1texture;
+ /* 0x0174 */ void* crystalSubtype1texture;
/* 0x0178 */ u8 x1TexScroll;
/* 0x0179 */ u8 y1TexScroll;
/* 0x017A */ u8 x2TexScroll;
diff --git a/src/overlays/actors/ovl_player_actor/z_player.c b/src/overlays/actors/ovl_player_actor/z_player.c
index de2970400..c4ae70e5e 100644
--- a/src/overlays/actors/ovl_player_actor/z_player.c
+++ b/src/overlays/actors/ovl_player_actor/z_player.c
@@ -4152,7 +4152,7 @@ s32 func_80839800(Player* this, GlobalContext* globalCtx) {
}
if (doorShutter->dyna.actor.category == ACTORCAT_DOOR) {
- this->unk_46A = globalCtx->transitionActorList[(u16)doorShutter->dyna.actor.params >> 10]
+ this->unk_46A = globalCtx->transiActorCtx.list[(u16)doorShutter->dyna.actor.params >> 10]
.sides[(doorDirection > 0) ? 0 : 1]
.effects;
@@ -4224,7 +4224,7 @@ s32 func_80839800(Player* this, GlobalContext* globalCtx) {
}
} else {
Camera_ChangeDoorCam(Gameplay_GetCamera(globalCtx, 0), doorActor,
- globalCtx->transitionActorList[(u16)doorActor->params >> 10]
+ globalCtx->transiActorCtx.list[(u16)doorActor->params >> 10]
.sides[(doorDirection > 0) ? 0 : 1]
.effects,
0, 38.0f * D_808535EC, 26.0f * D_808535EC, 10.0f * D_808535EC);
@@ -4233,7 +4233,7 @@ s32 func_80839800(Player* this, GlobalContext* globalCtx) {
}
if ((this->doorType != PLAYER_DOORTYPE_FAKE) && (doorActor->category == ACTORCAT_DOOR)) {
- frontRoom = globalCtx->transitionActorList[(u16)doorActor->params >> 10]
+ frontRoom = globalCtx->transiActorCtx.list[(u16)doorActor->params >> 10]
.sides[(doorDirection > 0) ? 0 : 1]
.room;
@@ -9035,7 +9035,7 @@ static Vec3f D_80854778 = { 0.0f, 50.0f, 0.0f };
void Player_Init(Actor* thisx, GlobalContext* globalCtx2) {
Player* this = THIS;
GlobalContext* globalCtx = globalCtx2;
- Scene* scene = globalCtx->loadedScene;
+ SceneTableEntry* scene = globalCtx->loadedScene;
u32 titleFileSize;
s32 initMode;
s32 sp50;
diff --git a/src/overlays/effects/ovl_Effect_Ss_Bomb/z_eff_ss_bomb.c b/src/overlays/effects/ovl_Effect_Ss_Bomb/z_eff_ss_bomb.c
index bc4cf93d3..6e851df96 100644
--- a/src/overlays/effects/ovl_Effect_Ss_Bomb/z_eff_ss_bomb.c
+++ b/src/overlays/effects/ovl_Effect_Ss_Bomb/z_eff_ss_bomb.c
@@ -35,14 +35,13 @@ u32 EffectSsBomb_Init(GlobalContext* globalCtx, u32 index, EffectSs* this, void*
return 1;
}
-static UNK_PTR sTextures[] = {
- gEffBombExplosion1Tex,
- gEffBombExplosion2Tex,
- gEffBombExplosion3Tex,
- gEffBombExplosion4Tex,
-};
-
void EffectSsBomb_Draw(GlobalContext* globalCtx, u32 index, EffectSs* this) {
+ static void* explosionTextures[] = {
+ gEffBombExplosion1Tex,
+ gEffBombExplosion2Tex,
+ gEffBombExplosion3Tex,
+ gEffBombExplosion4Tex,
+ };
GraphicsContext* gfxCtx = globalCtx->state.gfxCtx;
MtxF mfTrans;
MtxF mfScale;
@@ -70,7 +69,7 @@ void EffectSsBomb_Draw(GlobalContext* globalCtx, u32 index, EffectSs* this) {
if (mtx != NULL) {
gSPMatrix(POLY_XLU_DISP++, mtx, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
- gSPSegment(POLY_XLU_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(sTextures[this->rTexIdx]));
+ gSPSegment(POLY_XLU_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(explosionTextures[this->rTexIdx]));
gDPPipeSync(POLY_XLU_DISP++);
func_80094C50(gfxCtx);
color = this->life * 12.75f;
diff --git a/src/overlays/effects/ovl_Effect_Ss_Bomb2/z_eff_ss_bomb2.c b/src/overlays/effects/ovl_Effect_Ss_Bomb2/z_eff_ss_bomb2.c
index e97a8e36d..e6c16b9b6 100644
--- a/src/overlays/effects/ovl_Effect_Ss_Bomb2/z_eff_ss_bomb2.c
+++ b/src/overlays/effects/ovl_Effect_Ss_Bomb2/z_eff_ss_bomb2.c
@@ -60,7 +60,7 @@ u32 EffectSsBomb2_Init(GlobalContext* globalCtx, u32 index, EffectSs* this, void
// unused in the original game. looks like EffectSsBomb but with color
void EffectSsBomb2_DrawFade(GlobalContext* globalCtx, u32 index, EffectSs* this) {
- static UNK_PTR textures[] = {
+ static void* textures[] = {
gEffBombExplosion1Tex, gEffBombExplosion2Tex, gEffBombExplosion3Tex, gEffBombExplosion4Tex,
gEffBombExplosion5Tex, gEffBombExplosion6Tex, gEffBombExplosion7Tex, gEffBombExplosion8Tex,
};
@@ -100,7 +100,7 @@ void EffectSsBomb2_DrawFade(GlobalContext* globalCtx, u32 index, EffectSs* this)
}
void EffectSsBomb2_DrawLayered(GlobalContext* globalCtx, u32 index, EffectSs* this) {
- static UNK_PTR textures[] = {
+ static void* textures[] = {
gEffBombExplosion1Tex, gEffBombExplosion2Tex, gEffBombExplosion3Tex, gEffBombExplosion4Tex,
gEffBombExplosion5Tex, gEffBombExplosion6Tex, gEffBombExplosion7Tex, gEffBombExplosion8Tex,
};
diff --git a/src/overlays/effects/ovl_Effect_Ss_Dead_Db/z_eff_ss_dead_db.c b/src/overlays/effects/ovl_Effect_Ss_Dead_Db/z_eff_ss_dead_db.c
index c41e49090..f726739c4 100644
--- a/src/overlays/effects/ovl_Effect_Ss_Dead_Db/z_eff_ss_dead_db.c
+++ b/src/overlays/effects/ovl_Effect_Ss_Dead_Db/z_eff_ss_dead_db.c
@@ -56,7 +56,7 @@ u32 EffectSsDeadDb_Init(GlobalContext* globalCtx, u32 index, EffectSs* this, voi
return 1;
}
-static UNK_PTR sTextures[] = {
+static void* sTextures[] = {
gEffEnemyDeathFlame1Tex, gEffEnemyDeathFlame2Tex, gEffEnemyDeathFlame3Tex, gEffEnemyDeathFlame4Tex,
gEffEnemyDeathFlame5Tex, gEffEnemyDeathFlame6Tex, gEffEnemyDeathFlame7Tex, gEffEnemyDeathFlame8Tex,
gEffEnemyDeathFlame9Tex, gEffEnemyDeathFlame10Tex,
diff --git a/src/overlays/effects/ovl_Effect_Ss_Dust/z_eff_ss_dust.c b/src/overlays/effects/ovl_Effect_Ss_Dust/z_eff_ss_dust.c
index 544f5c042..73d71a3d0 100644
--- a/src/overlays/effects/ovl_Effect_Ss_Dust/z_eff_ss_dust.c
+++ b/src/overlays/effects/ovl_Effect_Ss_Dust/z_eff_ss_dust.c
@@ -76,11 +76,10 @@ u32 EffectSsDust_Init(GlobalContext* globalCtx, u32 index, EffectSs* this, void*
return 1;
}
-static UNK_PTR sTextures[] = {
- gDust1Tex, gDust2Tex, gDust3Tex, gDust4Tex, gDust5Tex, gDust6Tex, gDust7Tex, gDust8Tex,
-};
-
void EffectSsDust_Draw(GlobalContext* globalCtx, u32 index, EffectSs* this) {
+ static void* dustTextures[] = {
+ gDust1Tex, gDust2Tex, gDust3Tex, gDust4Tex, gDust5Tex, gDust6Tex, gDust7Tex, gDust8Tex,
+ };
GraphicsContext* gfxCtx = globalCtx->state.gfxCtx;
MtxF mfTrans;
MtxF mfScale;
@@ -104,7 +103,7 @@ void EffectSsDust_Draw(GlobalContext* globalCtx, u32 index, EffectSs* this) {
if (mtx != NULL) {
gSPMatrix(POLY_XLU_DISP++, mtx, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gDPPipeSync(POLY_XLU_DISP++);
- gSPSegment(POLY_XLU_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(sTextures[this->rTexIdx]));
+ gSPSegment(POLY_XLU_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(dustTextures[this->rTexIdx]));
POLY_XLU_DISP = Gfx_CallSetupDL(POLY_XLU_DISP, 0);
gDPPipeSync(POLY_XLU_DISP++);
diff --git a/src/overlays/effects/ovl_Effect_Ss_G_Fire/z_eff_ss_g_fire.c b/src/overlays/effects/ovl_Effect_Ss_G_Fire/z_eff_ss_g_fire.c
index fc8644c3d..e910da2b1 100644
--- a/src/overlays/effects/ovl_Effect_Ss_G_Fire/z_eff_ss_g_fire.c
+++ b/src/overlays/effects/ovl_Effect_Ss_G_Fire/z_eff_ss_g_fire.c
@@ -43,13 +43,13 @@ u32 EffectSsGFire_Init(GlobalContext* globalCtx, u32 index, EffectSs* this, void
}
void EffectSsGFire_Draw(GlobalContext* globalCtx, u32 index, EffectSs* this) {
- UNK_PTR textures[] = {
+ void* fireFootprintTextures[] = {
gEffFireFootprint1Tex, gEffFireFootprint2Tex, gEffFireFootprint3Tex, gEffFireFootprint4Tex,
gEffFireFootprint5Tex, gEffFireFootprint6Tex, gEffFireFootprint7Tex, gEffFireFootprint8Tex,
};
s16 texIdx = (this->rgTexIdx / 100) % 7;
- EffectSs_DrawGEffect(globalCtx, this, textures[texIdx]);
+ EffectSs_DrawGEffect(globalCtx, this, fireFootprintTextures[texIdx]);
}
void EffectSsGFire_Update(GlobalContext* globalCtx, u32 index, EffectSs* this) {
diff --git a/src/overlays/effects/ovl_Effect_Ss_G_Ripple/z_eff_ss_g_ripple.c b/src/overlays/effects/ovl_Effect_Ss_G_Ripple/z_eff_ss_g_ripple.c
index 483ef0157..7aeda5a1c 100644
--- a/src/overlays/effects/ovl_Effect_Ss_G_Ripple/z_eff_ss_g_ripple.c
+++ b/src/overlays/effects/ovl_Effect_Ss_G_Ripple/z_eff_ss_g_ripple.c
@@ -75,7 +75,7 @@ void EffectSsGRipple_DrawRipple(GlobalContext* globalCtx, EffectSs* this, UNK_PT
radius = this->rRadius * 0.0025f;
- if ((this->rWaterBoxNum != -1) && (this->rWaterBoxNum < globalCtx->colCtx.colHeader->nbWaterBoxes)) {
+ if ((this->rWaterBoxNum != -1) && (this->rWaterBoxNum < globalCtx->colCtx.colHeader->numWaterBoxes)) {
yPos = (this->rWaterBoxNum + globalCtx->colCtx.colHeader->waterBoxes)->ySurface;
} else {
yPos = this->pos.y;
diff --git a/src/overlays/effects/ovl_Effect_Ss_G_Spk/z_eff_ss_g_spk.c b/src/overlays/effects/ovl_Effect_Ss_G_Spk/z_eff_ss_g_spk.c
index 7247d3bba..d2c6d98db 100644
--- a/src/overlays/effects/ovl_Effect_Ss_G_Spk/z_eff_ss_g_spk.c
+++ b/src/overlays/effects/ovl_Effect_Ss_G_Spk/z_eff_ss_g_spk.c
@@ -65,14 +65,13 @@ u32 EffectSsGSpk_Init(GlobalContext* globalCtx, u32 index, EffectSs* this, void*
return 1;
}
-static UNK_PTR sTextures[] = {
- gEffSpark1Tex,
- gEffSpark2Tex,
- gEffSpark3Tex,
- gEffSpark4Tex,
-};
-
void EffectSsGSpk_Draw(GlobalContext* globalCtx, u32 index, EffectSs* this) {
+ static void* sparkTextures[] = {
+ gEffSpark1Tex,
+ gEffSpark2Tex,
+ gEffSpark3Tex,
+ gEffSpark4Tex,
+ };
GraphicsContext* gfxCtx = globalCtx->state.gfxCtx;
MtxF mfTrans;
MtxF mfScale;
@@ -94,7 +93,7 @@ void EffectSsGSpk_Draw(GlobalContext* globalCtx, u32 index, EffectSs* this) {
if (mtx != NULL) {
gSPMatrix(POLY_XLU_DISP++, mtx, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
- gSPSegment(POLY_XLU_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(sTextures[this->rTexIdx]));
+ gSPSegment(POLY_XLU_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(sparkTextures[this->rTexIdx]));
func_80094BC4(gfxCtx);
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, this->rPrimColorR, this->rPrimColorG, this->rPrimColorB, 255);
gDPSetEnvColor(POLY_XLU_DISP++, this->rEnvColorR, this->rEnvColorG, this->rEnvColorB, this->rEnvColorA);
diff --git a/src/overlays/effects/ovl_Effect_Ss_G_Splash/z_eff_ss_g_splash.c b/src/overlays/effects/ovl_Effect_Ss_G_Splash/z_eff_ss_g_splash.c
index 2754f702e..cb2fd316c 100644
--- a/src/overlays/effects/ovl_Effect_Ss_G_Splash/z_eff_ss_g_splash.c
+++ b/src/overlays/effects/ovl_Effect_Ss_G_Splash/z_eff_ss_g_splash.c
@@ -89,12 +89,11 @@ u32 EffectSsGSplash_Init(GlobalContext* globalCtx, u32 index, EffectSs* this, vo
return 1;
}
-static UNK_PTR sTextures[] = {
- gEffWaterSplash1Tex, gEffWaterSplash2Tex, gEffWaterSplash3Tex, gEffWaterSplash4Tex,
- gEffWaterSplash5Tex, gEffWaterSplash6Tex, gEffWaterSplash7Tex, gEffWaterSplash8Tex,
-};
-
void EffectSsGSplash_Draw(GlobalContext* globalCtx, u32 index, EffectSs* this) {
+ static void* waterSplashTextures[] = {
+ gEffWaterSplash1Tex, gEffWaterSplash2Tex, gEffWaterSplash3Tex, gEffWaterSplash4Tex,
+ gEffWaterSplash5Tex, gEffWaterSplash6Tex, gEffWaterSplash7Tex, gEffWaterSplash8Tex,
+ };
s16 texIdx;
switch (this->rType) {
@@ -103,7 +102,7 @@ void EffectSsGSplash_Draw(GlobalContext* globalCtx, u32 index, EffectSs* this) {
if (texIdx > 7) {
texIdx = 7;
}
- EffectSs_DrawGEffect(globalCtx, this, sTextures[texIdx]);
+ EffectSs_DrawGEffect(globalCtx, this, waterSplashTextures[texIdx]);
break;
case 1:
@@ -111,7 +110,7 @@ void EffectSsGSplash_Draw(GlobalContext* globalCtx, u32 index, EffectSs* this) {
if (texIdx > 7) {
texIdx = 7;
}
- EffectSs_DrawGEffect(globalCtx, this, sTextures[texIdx]);
+ EffectSs_DrawGEffect(globalCtx, this, waterSplashTextures[texIdx]);
break;
case 2:
@@ -119,7 +118,7 @@ void EffectSsGSplash_Draw(GlobalContext* globalCtx, u32 index, EffectSs* this) {
if (texIdx > 7) {
texIdx = 7;
}
- EffectSs_DrawGEffect(globalCtx, this, sTextures[texIdx]);
+ EffectSs_DrawGEffect(globalCtx, this, waterSplashTextures[texIdx]);
break;
default:
diff --git a/src/overlays/effects/ovl_Effect_Ss_HitMark/z_eff_ss_hitmark.c b/src/overlays/effects/ovl_Effect_Ss_HitMark/z_eff_ss_hitmark.c
index 863bd09f9..75a01cdd7 100644
--- a/src/overlays/effects/ovl_Effect_Ss_HitMark/z_eff_ss_hitmark.c
+++ b/src/overlays/effects/ovl_Effect_Ss_HitMark/z_eff_ss_hitmark.c
@@ -27,7 +27,7 @@ static Color_RGB8 sColors[] = {
{ 255, 255, 255 }, { 0, 255, 200 }, { 255, 255, 255 }, { 150, 0, 255 },
};
-static UNK_PTR sTextures[] = {
+static void* sTextures[] = {
gEffHitMark1Tex, gEffHitMark2Tex, gEffHitMark3Tex, gEffHitMark4Tex, gEffHitMark5Tex, gEffHitMark6Tex,
gEffHitMark7Tex, gEffHitMark8Tex, gEffHitMark9Tex, gEffHitMark10Tex, gEffHitMark11Tex, gEffHitMark12Tex,
gEffHitMark13Tex, gEffHitMark14Tex, gEffHitMark15Tex, gEffHitMark16Tex, gEffHitMark17Tex, gEffHitMark18Tex,
diff --git a/src/overlays/effects/ovl_Effect_Ss_Lightning/z_eff_ss_lightning.c b/src/overlays/effects/ovl_Effect_Ss_Lightning/z_eff_ss_lightning.c
index 3e229e326..d89e0160a 100644
--- a/src/overlays/effects/ovl_Effect_Ss_Lightning/z_eff_ss_lightning.c
+++ b/src/overlays/effects/ovl_Effect_Ss_Lightning/z_eff_ss_lightning.c
@@ -66,12 +66,11 @@ void EffectSsLightning_NewLightning(GlobalContext* globalCtx, Vec3f* pos, s16 ya
EffectSs_Insert(globalCtx, &newLightning);
}
-static UNK_PTR sTextures[] = {
- gEffLightning1Tex, gEffLightning2Tex, gEffLightning3Tex, gEffLightning4Tex,
- gEffLightning5Tex, gEffLightning6Tex, gEffLightning7Tex, gEffLightning8Tex,
-};
-
void EffectSsLightning_Draw(GlobalContext* globalCtx, u32 index, EffectSs* this) {
+ static void* lightningTextures[] = {
+ gEffLightning1Tex, gEffLightning2Tex, gEffLightning3Tex, gEffLightning4Tex,
+ gEffLightning5Tex, gEffLightning6Tex, gEffLightning7Tex, gEffLightning8Tex,
+ };
GraphicsContext* gfxCtx = globalCtx->state.gfxCtx;
MtxF mfResult;
MtxF mfTrans;
@@ -108,7 +107,7 @@ void EffectSsLightning_Draw(GlobalContext* globalCtx, u32 index, EffectSs* this)
if (mtx != NULL) {
gSPMatrix(POLY_XLU_DISP++, mtx, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
func_80094C50(gfxCtx);
- gSPSegment(POLY_XLU_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(sTextures[texIdx]));
+ gSPSegment(POLY_XLU_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(lightningTextures[texIdx]));
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, this->rPrimColorR, this->rPrimColorG, this->rPrimColorB,
this->rPrimColorA);
gDPSetEnvColor(POLY_XLU_DISP++, this->rEnvColorR, this->rEnvColorG, this->rEnvColorB, this->rEnvColorA);
diff --git a/src/overlays/effects/ovl_Effect_Ss_Sibuki2/z_eff_ss_sibuki2.c b/src/overlays/effects/ovl_Effect_Ss_Sibuki2/z_eff_ss_sibuki2.c
index bd8277a1c..78bcfd1c8 100644
--- a/src/overlays/effects/ovl_Effect_Ss_Sibuki2/z_eff_ss_sibuki2.c
+++ b/src/overlays/effects/ovl_Effect_Ss_Sibuki2/z_eff_ss_sibuki2.c
@@ -50,12 +50,12 @@ u32 EffectSsSibuki2_Init(GlobalContext* globalCtx, u32 index, EffectSs* this, vo
return 1;
}
-static UNK_PTR sTextures[] = {
- gEffUnusedBubbles1Tex, gEffUnusedBubbles1Tex, gEffUnusedBubbles2Tex, gEffUnusedBubbles3Tex, gEffUnusedBubbles4Tex,
- gEffUnusedBubbles5Tex, gEffUnusedBubbles6Tex, gEffUnusedBubbles7Tex, gEffUnusedBubbles8Tex,
-};
-
void EffectSsSibuki2_Draw(GlobalContext* globalCtx, u32 index, EffectSs* this) {
+ static void* bubbleTextures[] = {
+ gEffUnusedBubbles1Tex, gEffUnusedBubbles1Tex, gEffUnusedBubbles2Tex,
+ gEffUnusedBubbles3Tex, gEffUnusedBubbles4Tex, gEffUnusedBubbles5Tex,
+ gEffUnusedBubbles6Tex, gEffUnusedBubbles7Tex, gEffUnusedBubbles8Tex,
+ };
GraphicsContext* gfxCtx = globalCtx->state.gfxCtx;
f32 scale = this->rScale / 100.0f;
@@ -68,7 +68,7 @@ void EffectSsSibuki2_Draw(GlobalContext* globalCtx, u32 index, EffectSs* this) {
func_80093D18(gfxCtx);
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, this->rPrimColorR, this->rPrimColorG, this->rPrimColorB, this->rPrimColorA);
gDPSetEnvColor(POLY_XLU_DISP++, this->rEnvColorR, this->rEnvColorG, this->rEnvColorB, this->rEnvColorA);
- gSPSegment(POLY_XLU_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(sTextures[this->rTexIdx]));
+ gSPSegment(POLY_XLU_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(bubbleTextures[this->rTexIdx]));
gSPDisplayList(POLY_XLU_DISP++, SEGMENTED_TO_VIRTUAL(gEffUnusedBubblesDL));
CLOSE_DISPS(gfxCtx, "../z_eff_ss_sibuki2.c", 198);
diff --git a/src/overlays/gamestates/ovl_select/z_select.c b/src/overlays/gamestates/ovl_select/z_select.c
index ff20e2a52..74b5e3b0e 100644
--- a/src/overlays/gamestates/ovl_select/z_select.c
+++ b/src/overlays/gamestates/ovl_select/z_select.c
@@ -410,15 +410,16 @@ void Select_PrintMenu(SelectContext* this, GfxPrint* printer) {
}
static char* sLoadingMessages[] = {
- "\x8Dシバラクオマチクダサイ", // "Please wait a minute"
- "\x8Dチョット マッテネ", // "Hold on a sec"
- "\x8Cウェイト ア モーメント", // "Wait a moment"
- "\x8Cロード\x8Dチュウ", // "Loading"
- "\x8Dナウ ワーキング", // "Now working"
- "\x8Dイマ ツクッテマス", // "Now creating"
- "\x8Dコショウジャナイヨ", // "It's not broken"
- "\x8Cコーヒー ブレイク", // "Coffee Break"
- "\x8C" "Bメンヲセットシテクダサイ", // "Please set B side"
+ "\x8Dシバラクオマチクダサイ", // "Please wait a minute"
+ "\x8Dチョット マッテネ", // "Hold on a sec"
+ "\x8Cウェイト ア モーメント", // "Wait a moment"
+ "\x8Cロード\x8Dチュウ", // "Loading"
+ "\x8Dナウ ワーキング", // "Now working"
+ "\x8Dイマ ツクッテマス", // "Now creating"
+ "\x8Dコショウジャナイヨ", // "It's not broken"
+ "\x8Cコーヒー ブレイク", // "Coffee Break"
+ "\x8C"
+ "Bメンヲセットシテクダサイ", // "Please set B side"
"\x8Dジット\x8Cガマン\x8Dノ\x8Cコ\x8Dデアッタ", // "Be patient, now"
"\x8Dイマシバラクオマチクダサイ", // "Please wait just a minute"
"\x8Dアワテナイアワテナイ。ヒトヤスミヒトヤスミ。", // "Don't worry, don't worry. Take a break, take a break"