Fix killer door textures (#1177)

* Fix killer door textures

* Remove todo as requested by @Rozelette
This commit is contained in:
vaguerant 2022-10-21 15:28:40 +11:00 committed by GitHub
parent 5d29c4755e
commit 76942aeaee
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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;