From 8b3c23d547ee3a15eb94762a136cc3648337f2ee Mon Sep 17 00:00:00 2001 From: "y.demaisonregne" Date: Sun, 18 Jun 2023 17:31:50 +0200 Subject: [PATCH] Match ChozoStatueHintMovement --- README.md | 2 +- src/menus/pause_screen_sub_menus.c | 12 +++++++----- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 737f891f..3be30c07 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ This is a work in progress decompilation of Metroid - Zero Mission. -2636/2721 functions decompiled (96.88%, 85 left) +2637/2721 functions decompiled (96.91%, 84 left) 0x350b3c/0x76b014 bytes of data not in blobs (44.69%, 0x41a4d8 left) diff --git a/src/menus/pause_screen_sub_menus.c b/src/menus/pause_screen_sub_menus.c index 0f18bc3c..88530d8b 100644 --- a/src/menus/pause_screen_sub_menus.c +++ b/src/menus/pause_screen_sub_menus.c @@ -198,10 +198,12 @@ u32 unk_72144(struct ChozoHintRelated* param_1) return yPosition << 16 | xPosition; } +/** + * @brief 72204 | 46c | Handles the movement of the target on a chozo statue hint + * + */ void ChozoStatueHintMovement(void) { - // https://decomp.me/scratch/S0x90 - s32 norm; s32 var_2; @@ -310,9 +312,9 @@ void ChozoStatueHintMovement(void) else PAUSE_SCREEN_DATA.unk_8C[0].unk_12 += 5; - if (PAUSE_SCREEN_DATA.unk_48 % 8 == 0) + if ((PAUSE_SCREEN_DATA.unk_48 & 7) == 0) { - norm = (PAUSE_SCREEN_DATA.unk_48 / 8) % 4; + norm = (PAUSE_SCREEN_DATA.unk_48 >> 3) & 3; norm++; PAUSE_SCREEN_DATA.chozoHintOam[norm] = PAUSE_SCREEN_DATA.chozoHintOam[0]; @@ -328,7 +330,7 @@ void ChozoStatueHintMovement(void) else var_2 = 0xF; PAUSE_SCREEN_DATA.chozoHintOam[norm].oamID = var_2; - PAUSE_SCREEN_DATA.chozoHintOam[norm].animationDurationCounter = 4; + PAUSE_SCREEN_DATA.chozoHintOam[norm].animationDurationCounter = 3; PAUSE_SCREEN_DATA.chozoHintOam[norm].currentAnimationFrame = 5; PAUSE_SCREEN_DATA.chozoHintOam[norm].exists = TRUE; }