From 6a0462aecd477a4a3aeaa959948d544d01fc5aa6 Mon Sep 17 00:00:00 2001 From: Erilea Date: Tue, 28 May 2024 11:19:38 +0200 Subject: [PATCH] Add checkFrame helper to mDoExt_baseAnm --- include/m_Do/m_Do_ext.h | 1 + src/d/actor/d_a_obj_gryw00.cpp | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/include/m_Do/m_Do_ext.h b/include/m_Do/m_Do_ext.h index bfc394c75..cde1bb016 100644 --- a/include/m_Do/m_Do_ext.h +++ b/include/m_Do/m_Do_ext.h @@ -28,6 +28,7 @@ class mDoExt_baseAnm { J3DFrameCtrl* getFrameCtrl() { return mFrameCtrl; } f32 getPlaySpeed() { return mFrameCtrl->getRate(); } void setPlaySpeed(f32 speed) { mFrameCtrl->setRate(speed); } + BOOL checkFrame(f32 frame) { return mFrameCtrl->checkPass(frame); } f32 getFrame() { return mFrameCtrl->getFrame(); } f32 getEndFrame() { return mFrameCtrl->getEnd(); } void setFrame(f32 frame) { mFrameCtrl->setFrame(frame); } diff --git a/src/d/actor/d_a_obj_gryw00.cpp b/src/d/actor/d_a_obj_gryw00.cpp index 881d868f5..a419784c5 100644 --- a/src/d/actor/d_a_obj_gryw00.cpp +++ b/src/d/actor/d_a_obj_gryw00.cpp @@ -198,14 +198,14 @@ void daObjGryw00_c::switch_wait_act_proc() { /* 00000B50-00000BB0 .text spread_water_face_act_proc__13daObjGryw00_cFv */ void daObjGryw00_c::spread_water_face_act_proc() { - if (mBtk.getFrameCtrl()->checkPass(START_PHASE_ANIM_LEN)) { + if (mBtk.checkFrame(SPREAD_PHASE_ANIM_LEN)) { modeFunc = &water_level_move_wait_act_proc; } } /* 00000BB0-00000C44 .text water_level_move_wait_act_proc__13daObjGryw00_cFv */ void daObjGryw00_c::water_level_move_wait_act_proc() { - if (mBtk.getFrameCtrl()->checkPass(SPREAD_PHASE_ANIM_LEN)) { + if (mBtk.checkFrame(RISE_PHASE_ANIM_LEN)) { mWaterLvIncrement = WATER_RISE_SPEED; mWaterMaxLv = HIGH_WATER_LEVEL; modeFunc = &anime_loop_start_wait_act_proc;