Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix killer door textures #1177

Merged
merged 2 commits into from
Oct 21, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions soh/src/overlays/actors/ovl_Door_Killer/z_door_killer.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down