summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvaguerant <vaguerant@users.noreply.github.com>2022-10-21 15:28:40 +1100
committerGitHub <noreply@github.com>2022-10-21 00:28:40 -0400
commit76942aeaee7bf0652a2ed4c286c1ab262a0bba24 (patch)
tree68d3af4d6518a52aec7c80e10bb2c5aaba775774
parent5d29c4755eed73641bb5485a2c9a6b37bb2c76dd (diff)
Fix killer door textures (#1177)
* Fix killer door textures * Remove todo as requested by @Rozelette
-rw-r--r--soh/src/overlays/actors/ovl_Door_Killer/z_door_killer.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/soh/src/overlays/actors/ovl_Door_Killer/z_door_killer.c b/soh/src/overlays/actors/ovl_Door_Killer/z_door_killer.c
index 324bbbc95..10757ba17 100644
--- a/soh/src/overlays/actors/ovl_Door_Killer/z_door_killer.c
+++ b/soh/src/overlays/actors/ovl_Door_Killer/z_door_killer.c
@@ -103,12 +103,32 @@ void DoorKiller_Init(Actor* thisx, GlobalContext* globalCtx2) {
s32 bankIndex;
s32 i;
+ /*
// Look in the object bank for one of the four objects containing door textures
bankIndex = -1;
for (i = 0; bankIndex < 0; i++) {
bankIndex = Object_GetIndex(&globalCtx->objectCtx, sDoorTextures[i].objectId);
this->textureEntryIndex = i;
}
+ */
+
+ // For SoH where all objects are loaded, hardcode the index to match the current map.
+ switch (globalCtx->sceneNum) {
+ case SCENE_HIDAN:
+ this->textureEntryIndex = 0;
+ break;
+ case SCENE_MIZUSIN:
+ this->textureEntryIndex = 1;
+ break;
+ case SCENE_HAKADAN:
+ case SCENE_HAKADANCH:
+ this->textureEntryIndex = 2;
+ break;
+ default:
+ this->textureEntryIndex = 3;
+ }
+ bankIndex = Object_GetIndex(&globalCtx->objectCtx, sDoorTextures[this->textureEntryIndex].objectId);
+
osSyncPrintf("bank_ID = %d\n", bankIndex);
osSyncPrintf("status = %d\n", this->textureEntryIndex);
this->doorObjBankIndex = bankIndex;