From 5c5bccfc2823d5c25c266e4ffebbf2c58d2554e1 Mon Sep 17 00:00:00 2001 From: Lucas Picoli Date: Mon, 15 Jun 2026 05:51:44 -0700 Subject: [PATCH] SceneAgbGhost: match fn_800A84A8 The animation index select compiled to srwi (logical shift), but the target uses srawi (arithmetic shift). Decoding `9 + srawi(neg(through),31)` shows the true value is 8, not 10: `through ? 8 : 9` yields the -1 mask that generates srawi and matches the original. --- src/Game/AgbGhost/SceneAgbGhost.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/Game/AgbGhost/SceneAgbGhost.cpp b/src/Game/AgbGhost/SceneAgbGhost.cpp index 6cc65f5..5671419 100644 --- a/src/Game/AgbGhost/SceneAgbGhost.cpp +++ b/src/Game/AgbGhost/SceneAgbGhost.cpp @@ -327,8 +327,7 @@ void CSceneAgbGhost::fn_800A84A8(bool through) { ghostMissAnim->setLayer(mGhostAnim->getLayer()); ghostMissAnim->setPos(0.0f, 0.0f); - // TODO: generate srawi instead of srwi - s16 animIndex = through ? 10 : 9; + s16 animIndex = through ? 8 : 9; ghostMissAnim->setAnimDestroy(animIndex); gSoundManager->play(SE_AGB_AIM_OSII);