From e5db7b81a0c2e7caa2625bff5e6633cce0b4eed1 Mon Sep 17 00:00:00 2001 From: LagoLunatic Date: Thu, 18 Jul 2024 13:12:24 -0400 Subject: [PATCH] Use loopmode enum in a couple more places --- src/d/actor/d_a_rd.cpp | 16 ++++++++-------- src/d/actor/d_a_tbox.cpp | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/d/actor/d_a_rd.cpp b/src/d/actor/d_a_rd.cpp index 9e79f5912..3c7f94541 100644 --- a/src/d/actor/d_a_rd.cpp +++ b/src/d/actor/d_a_rd.cpp @@ -1356,14 +1356,14 @@ void daRd_c::setBtkAnm(s8 idx) { struct play_prm_struct { s8 m00; s8 m01; - s32 m04; + int loopMode; }; static const play_prm_struct a_play_prm_tbl[] = { - {0x01, -1, 0x00}, - {0x00, -1, 0x02}, - {0x01, -1, 0x02}, - {0x02, 0x01, 0x00}, - {0x03, 0x02, 0x00}, + {0x01, -1, J3DFrameCtrl::LOOP_ONCE_e}, + {0x00, -1, J3DFrameCtrl::LOOP_REPEAT_e}, + {0x01, -1, J3DFrameCtrl::LOOP_REPEAT_e}, + {0x02, 0x01, J3DFrameCtrl::LOOP_ONCE_e}, + {0x03, 0x02, J3DFrameCtrl::LOOP_ONCE_e}, }; if (idx != 5) { @@ -1375,10 +1375,10 @@ void daRd_c::setBtkAnm(s8 idx) { J3DAnmTextureSRTKey* btk = static_cast(dComIfG_getObjectRes(m_arc_name, a_anm_idx_tbl[r5])); JUT_ASSERT(1930, btk != NULL); J3DModelData* modelData = mpMorf->getModel()->getModelData(); - mBtkAnm.init(modelData, btk, true, a_play_prm_tbl[m6DB].m04, 1.0f, 0, -1, true, 0); + mBtkAnm.init(modelData, btk, true, a_play_prm_tbl[m6DB].loopMode, 1.0f, 0, -1, true, 0); if (mBtkAnm.isStop()) { - if (a_play_prm_tbl[m6DB].m01 != -1 && a_play_prm_tbl[m6DB].m04 == 0) { + if (a_play_prm_tbl[m6DB].m01 != -1 && a_play_prm_tbl[m6DB].loopMode == 0) { m6DB = a_play_prm_tbl[m6DB].m01; } } diff --git a/src/d/actor/d_a_tbox.cpp b/src/d/actor/d_a_tbox.cpp index fa509c691..04cc4e30a 100644 --- a/src/d/actor/d_a_tbox.cpp +++ b/src/d/actor/d_a_tbox.cpp @@ -113,7 +113,7 @@ s32 daTbox_c::commonShapeSet() { } J3DAnmTextureSRTKey* appearTexData = (J3DAnmTextureSRTKey*)dComIfG_getObjectRes("Dalways", mdlInfo.btkId); - if (mpAppearTexAnm->init(modelData, appearTexData, true, 2, 1.0f, 0, -1, false, 0) == 0) { + if (mpAppearTexAnm->init(modelData, appearTexData, true, J3DFrameCtrl::LOOP_REPEAT_e, 1.0f, 0, -1, false, 0) == 0) { return cPhs_ERROR_e; }