Skip to content

Commit

Permalink
Use loopmode enum in a couple more places
Browse files Browse the repository at this point in the history
  • Loading branch information
LagoLunatic committed Jul 18, 2024
1 parent 9d6d259 commit e5db7b8
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
16 changes: 8 additions & 8 deletions src/d/actor/d_a_rd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -1375,10 +1375,10 @@ void daRd_c::setBtkAnm(s8 idx) {
J3DAnmTextureSRTKey* btk = static_cast<J3DAnmTextureSRTKey*>(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;
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/d/actor/d_a_tbox.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit e5db7b8

Please sign in to comment.