From 2870b39dd3ef58538e8df5de119cec3c4180545a Mon Sep 17 00:00:00 2001 From: LagoLunatic Date: Fri, 10 May 2024 01:04:38 -0400 Subject: [PATCH] use loopmode enum in more places --- src/d/actor/d_a_am2.cpp | 4 +- src/d/actor/d_a_arrow_iceeff.cpp | 2 +- src/d/actor/d_a_arrow_lighteff.cpp | 4 +- src/d/actor/d_a_bita.cpp | 2 +- src/d/actor/d_a_bk.cpp | 2 +- src/d/actor/d_a_bomb2.cpp | 4 +- src/d/actor/d_a_bomb3.inc | 10 ++--- src/d/actor/d_a_ib.cpp | 2 +- src/d/actor/d_a_itembase.cpp | 8 ++-- src/d/actor/d_a_lbridge.cpp | 6 +-- src/d/actor/d_a_mozo.cpp | 4 +- src/d/actor/d_a_nh.cpp | 2 +- src/d/actor/d_a_npc_bs1.cpp | 2 +- src/d/actor/d_a_npc_btsw2.cpp | 2 +- src/d/actor/d_a_npc_ji1.cpp | 10 ++--- src/d/actor/d_a_npc_md.cpp | 2 +- src/d/actor/d_a_npc_nz.cpp | 2 +- src/d/actor/d_a_npc_os.cpp | 2 +- src/d/actor/d_a_npc_roten.cpp | 4 +- src/d/actor/d_a_obj_toripost.cpp | 60 +++++++++++++++--------------- src/d/actor/d_a_rd.cpp | 9 +++-- src/d/actor/d_a_swhit0.cpp | 4 +- src/d/actor/d_a_tbox.cpp | 12 +++--- src/d/d_material.cpp | 2 +- src/d/d_s_room.cpp | 2 +- 25 files changed, 83 insertions(+), 80 deletions(-) diff --git a/src/d/actor/d_a_am2.cpp b/src/d/actor/d_a_am2.cpp index 2a76e0163..9b569119a 100644 --- a/src/d/actor/d_a_am2.cpp +++ b/src/d/actor/d_a_am2.cpp @@ -1200,14 +1200,14 @@ static BOOL useHeapInit(fopAc_ac_c* i_actor) { i_this->mpBtkAnm = new mDoExt_btkAnm(); if (!i_this->mpBtkAnm) { return FALSE; } J3DAnmTextureSRTKey* pbtk = (J3DAnmTextureSRTKey*)dComIfG_getObjectRes("AM2", AM2_BTK_AM2); - int ret = i_this->mpBtkAnm->init(model->getModelData(), pbtk, TRUE, 2, 1.0f, 0, -1, false, 0); + int ret = i_this->mpBtkAnm->init(model->getModelData(), pbtk, TRUE, J3DFrameCtrl::LOOP_REPEAT_e, 1.0f, 0, -1, false, 0); if (!ret) { return FALSE; } if (!i_this->mpBtkAnm) { return FALSE; } i_this->mpBrkAnm = new mDoExt_brkAnm(); if (!i_this->mpBrkAnm) { return FALSE; } J3DAnmTevRegKey* pbrk = (J3DAnmTevRegKey*)dComIfG_getObjectRes("AM2", AM2_BRK_AM2); - ret = i_this->mpBrkAnm->init(model->getModelData(), pbrk, TRUE, 2, 1.0f, 0, -1, false, 0); + ret = i_this->mpBrkAnm->init(model->getModelData(), pbrk, TRUE, J3DFrameCtrl::LOOP_REPEAT_e, 1.0f, 0, -1, false, 0); if (!ret) { return FALSE; } if (!i_this->mpBrkAnm) { return FALSE; } diff --git a/src/d/actor/d_a_arrow_iceeff.cpp b/src/d/actor/d_a_arrow_iceeff.cpp index 0da560d6e..8a0dc5c40 100644 --- a/src/d/actor/d_a_arrow_iceeff.cpp +++ b/src/d/actor/d_a_arrow_iceeff.cpp @@ -38,7 +38,7 @@ BOOL daArrow_Iceeff_c::CreateHeap() { J3DAnmTransform* bck = static_cast(dComIfG_getObjectRes("Link", LINK_BCK_GICER01)); JUT_ASSERT(107, bck != 0); - if(!mBck.init(modelData, bck, true, 0, 1.0f, 0, -1, false)) { + if(!mBck.init(modelData, bck, true, J3DFrameCtrl::LOOP_ONCE_e, 1.0f, 0, -1, false)) { return false; } } diff --git a/src/d/actor/d_a_arrow_lighteff.cpp b/src/d/actor/d_a_arrow_lighteff.cpp index 10599309b..5dfb4dc05 100644 --- a/src/d/actor/d_a_arrow_lighteff.cpp +++ b/src/d/actor/d_a_arrow_lighteff.cpp @@ -114,10 +114,10 @@ BOOL daArrow_Lighteff_c::CreateHeap() { JUT_ASSERT(216, btk != 0); JUT_ASSERT(217, brk != 0); - if(!mBtk.init(modelData, btk, true, 2, 1.0f, 0, -1, false, 0)) { + if(!mBtk.init(modelData, btk, true, J3DFrameCtrl::LOOP_REPEAT_e, 1.0f, 0, -1, false, 0)) { return false; } - if(!mBrk.init(modelData, brk, true, 0, 1.0f, 0, -1, false, 0)) { + if(!mBrk.init(modelData, brk, true, J3DFrameCtrl::LOOP_ONCE_e, 1.0f, 0, -1, false, 0)) { return false; } diff --git a/src/d/actor/d_a_bita.cpp b/src/d/actor/d_a_bita.cpp index 66f1518f3..9ee9e8a77 100644 --- a/src/d/actor/d_a_bita.cpp +++ b/src/d/actor/d_a_bita.cpp @@ -203,7 +203,7 @@ static BOOL useHeapInit(fopAc_ac_c* i_ac) { if (i_this->mpBrkAnm == NULL) return FALSE; J3DAnmTevRegKey* brk = (J3DAnmTevRegKey*)dComIfG_getObjectRes("Bita", ita_Ef[type]); - if (!i_this->mpBrkAnm->init(i_this->mpModelEf->getModelData(), brk, 1, J3DFrameCtrl::LOOP_ONCE_e, 1.0f, 0, -1, false, 0)) + if (!i_this->mpBrkAnm->init(i_this->mpModelEf->getModelData(), brk, TRUE, J3DFrameCtrl::LOOP_ONCE_e, 1.0f, 0, -1, false, 0)) return FALSE; i_this->mpBgW = new dBgW(); diff --git a/src/d/actor/d_a_bk.cpp b/src/d/actor/d_a_bk.cpp index 5c00a9e66..4a016b49e 100644 --- a/src/d/actor/d_a_bk.cpp +++ b/src/d/actor/d_a_bk.cpp @@ -2481,7 +2481,7 @@ static BOOL useHeapInit(fopAc_ac_c* i_actor) { return cPhs_ERROR_e; } J3DAnmTexPattern* btp = (J3DAnmTexPattern*)dComIfG_getObjectRes("Bk", BK_BTP_TMABATAKI); - if (!i_this->m02C4->init(model->getModelData(), btp, 1, 0, 1.0f, 0, -1, false, 0)) { + if (!i_this->m02C4->init(model->getModelData(), btp, TRUE, J3DFrameCtrl::LOOP_ONCE_e, 1.0f, 0, -1, false, 0)) { // Bug: Same as above. // TODO check this case as well. return cPhs_ERROR_e; diff --git a/src/d/actor/d_a_bomb2.cpp b/src/d/actor/d_a_bomb2.cpp index e54007668..9ef8ab31a 100644 --- a/src/d/actor/d_a_bomb2.cpp +++ b/src/d/actor/d_a_bomb2.cpp @@ -274,11 +274,11 @@ namespace daBomb2 { J3DAnmTransform* bck_data = static_cast(dComIfG_getObjectRes(resName, VBAKH_BCK_VBAKM)); JUT_ASSERT(0x30D, bck_data != 0); - int temp = mBck0.init(mdl_data, bck_data, true, 0, 1.0f, 0, -1, false); + int temp = mBck0.init(mdl_data, bck_data, true, J3DFrameCtrl::LOOP_ONCE_e, 1.0f, 0, -1, false); J3DAnmTevRegKey* brk_data = static_cast(dComIfG_getObjectRes(resName, VBAKH_BRK_VBAKM)); JUT_ASSERT(0x314, brk_data != 0); - int temp3 = mBrk0.init(mdl_data, brk_data, true, 0, 1.0f, 0, -1, false, 0); + int temp3 = mBrk0.init(mdl_data, brk_data, true, J3DFrameCtrl::LOOP_ONCE_e, 1.0f, 0, -1, false, 0); return mpModel && temp && temp3; } diff --git a/src/d/actor/d_a_bomb3.inc b/src/d/actor/d_a_bomb3.inc index 184138ebe..bf942536f 100644 --- a/src/d/actor/d_a_bomb3.inc +++ b/src/d/actor/d_a_bomb3.inc @@ -1278,19 +1278,19 @@ BOOL daBomb_c::createHeap() { J3DAnmTransform* bck0_data = static_cast(dComIfG_getObjectRes(m_attrType[mType].resName, VBAKH_BCK_VBAMX)); JUT_ASSERT(0x9AE, bck0_data != 0); - int temp = mBck0.init(modelData, bck0_data, true, 0, 1.0f, 0, -1, false); + int temp = mBck0.init(modelData, bck0_data, true, J3DFrameCtrl::LOOP_ONCE_e, 1.0f, 0, -1, false); J3DAnmTransform* bck1_data = static_cast(dComIfG_getObjectRes(m_attrType[mType].resName, VBAKH_BCK_VBAKM)); JUT_ASSERT(0x9B4, bck1_data != 0); - int temp2 = mBck1.init(modelData, bck1_data, true, 0, 1.0f, 0, -1, false); + int temp2 = mBck1.init(modelData, bck1_data, true, J3DFrameCtrl::LOOP_ONCE_e, 1.0f, 0, -1, false); J3DAnmTevRegKey* brk0_data = static_cast(dComIfG_getObjectRes(m_attrType[mType].resName, VBAKH_BRK_VBAMX)); JUT_ASSERT(0x9BB, brk0_data != 0); - int temp3 = mBrk0.init(modelData, brk0_data, true, 0, 1.0f, 0, -1, false, 0); + int temp3 = mBrk0.init(modelData, brk0_data, true, J3DFrameCtrl::LOOP_ONCE_e, 1.0f, 0, -1, false, 0); J3DAnmTevRegKey* brk1_data = static_cast(dComIfG_getObjectRes(m_attrType[mType].resName, VBAKH_BRK_VBAKM)); JUT_ASSERT(0x9C1, brk1_data != 0); - int temp4 = mBrk1.init(modelData, brk1_data, true, 0, 1.0f, 0, -1, false, 0); + int temp4 = mBrk1.init(modelData, brk1_data, true, J3DFrameCtrl::LOOP_ONCE_e, 1.0f, 0, -1, false, 0); return mpModel && temp && temp2 && temp3 && temp4; } @@ -1304,7 +1304,7 @@ BOOL daBomb_c::createHeap() { } else { J3DAnmTransform* bck0_data = (J3DAnmTransform*)dComIfG_getObjectRes(m_attrType[mType].resName, LINK_BCK_BOMB); - int temp = mBck0.init(modelData, bck0_data, false, 2, 1.0f, 0, -1, false); + int temp = mBck0.init(modelData, bck0_data, false, J3DFrameCtrl::LOOP_REPEAT_e, 1.0f, 0, -1, false); return temp ? TRUE : FALSE; } diff --git a/src/d/actor/d_a_ib.cpp b/src/d/actor/d_a_ib.cpp index 82e667251..c133381e4 100644 --- a/src/d/actor/d_a_ib.cpp +++ b/src/d/actor/d_a_ib.cpp @@ -446,7 +446,7 @@ BOOL daIball_c::CreateHeap() { for (int i = 0; i < (int)ARRAY_SIZE(mBrkAnm); i++) { pbrk = (J3DAnmTevRegKey*)dComIfG_getObjectRes(m_arcname, brkIds[i]); JUT_ASSERT(1182, pbrk != 0); - ret = mBrkAnm[i].init(modelData, pbrk, 1, J3DFrameCtrl::LOOP_REPEAT_e, 1.0f, 0, -1, false, 0); + ret = mBrkAnm[i].init(modelData, pbrk, TRUE, J3DFrameCtrl::LOOP_REPEAT_e, 1.0f, 0, -1, false, 0); if (!ret) { return FALSE; } } diff --git a/src/d/actor/d_a_itembase.cpp b/src/d/actor/d_a_itembase.cpp index f93fe9e5c..6eb63e8a2 100644 --- a/src/d/actor/d_a_itembase.cpp +++ b/src/d/actor/d_a_itembase.cpp @@ -62,7 +62,7 @@ BOOL daItemBase_c::CreateItemHeap(const char* resName, s16 resIdx, s16 btkAnm1, pbtk = (J3DAnmTextureSRTKey*)dComIfG_getObjectRes(resName, btkAnm1); JUT_ASSERT(140, pbtk != 0); mpBtkAnm1 = new mDoExt_btkAnm(); - if (!mpBtkAnm1 || !mpBtkAnm1->init(modelData, pbtk, TRUE, 2, 1.0f, 0, -1, false, 0)) { + if (!mpBtkAnm1 || !mpBtkAnm1->init(modelData, pbtk, TRUE, J3DFrameCtrl::LOOP_REPEAT_e, 1.0f, 0, -1, false, 0)) { return FALSE; } } @@ -72,7 +72,7 @@ BOOL daItemBase_c::CreateItemHeap(const char* resName, s16 resIdx, s16 btkAnm1, pbtk = (J3DAnmTextureSRTKey*)dComIfG_getObjectRes(resName, btkAnm2); JUT_ASSERT(156, pbtk != 0); mpBtkAnm2 = new mDoExt_btkAnm(); - if (!mpBtkAnm2 || !mpBtkAnm2->init(modelData, pbtk, TRUE, 2, 1.0f, 0, -1, false, 0)) { + if (!mpBtkAnm2 || !mpBtkAnm2->init(modelData, pbtk, TRUE, J3DFrameCtrl::LOOP_REPEAT_e, 1.0f, 0, -1, false, 0)) { return FALSE; } } @@ -88,7 +88,7 @@ BOOL daItemBase_c::CreateItemHeap(const char* resName, s16 resIdx, s16 btkAnm1, shouldAnimate = FALSE; } mpBrkAnm1 = new mDoExt_brkAnm(); - if (!mpBrkAnm1 || !mpBrkAnm1->init(modelData, pbrk, shouldAnimate, 2, 1.0f, 0, -1, false, false)) { + if (!mpBrkAnm1 || !mpBrkAnm1->init(modelData, pbrk, shouldAnimate, J3DFrameCtrl::LOOP_REPEAT_e, 1.0f, 0, -1, false, false)) { return FALSE; } } @@ -98,7 +98,7 @@ BOOL daItemBase_c::CreateItemHeap(const char* resName, s16 resIdx, s16 btkAnm1, pbrk = (J3DAnmTevRegKey*)dComIfG_getObjectRes(resName, brkAnm2); JUT_ASSERT(197, pbrk != 0); mpBrkAnm2 = new mDoExt_brkAnm(); - if (!mpBrkAnm2 || !mpBrkAnm2->init(modelData, pbrk, TRUE, 2, 1.0f, 0, -1, false, false)) { + if (!mpBrkAnm2 || !mpBrkAnm2->init(modelData, pbrk, TRUE, J3DFrameCtrl::LOOP_REPEAT_e, 1.0f, 0, -1, false, false)) { return FALSE; } } diff --git a/src/d/actor/d_a_lbridge.cpp b/src/d/actor/d_a_lbridge.cpp index 6fe78fc17..de5ea6301 100644 --- a/src/d/actor/d_a_lbridge.cpp +++ b/src/d/actor/d_a_lbridge.cpp @@ -28,14 +28,14 @@ BOOL daLbridge_c::CreateHeap() { J3DAnmTextureSRTKey* pbtk = (J3DAnmTextureSRTKey*)dComIfG_getObjectRes(m_arcname, GBRG00_BTK_GBRG00); JUT_ASSERT(0xE8, pbtk != 0); - if (!mBtkAnm.init(modelData, pbtk, TRUE, 2, 1.0f, 0, -1, false, 0)) { + if (!mBtkAnm.init(modelData, pbtk, TRUE, J3DFrameCtrl::LOOP_REPEAT_e, 1.0f, 0, -1, false, 0)) { return FALSE; } J3DAnmColor* pbpk = (J3DAnmColor*)dComIfG_getObjectRes(m_arcname, GBRG00_BPK_GBRG00); JUT_ASSERT(0xF6, pbpk != 0); - if (!mBpkAnm.init(modelData, pbpk, TRUE, 0, 1.0f, 0, -1, false, 0)) { + if (!mBpkAnm.init(modelData, pbpk, TRUE, J3DFrameCtrl::LOOP_ONCE_e, 1.0f, 0, -1, false, 0)) { return FALSE; } @@ -45,7 +45,7 @@ BOOL daLbridge_c::CreateHeap() { J3DAnmTevRegKey* pbrk = (J3DAnmTevRegKey*)dComIfG_getObjectRes(m_arcname, GBRG00_BRK_GBRG00); JUT_ASSERT(0x106, pbrk != 0); - if (!mBrkAnm.init(modelData, pbrk, TRUE, 2, 1.0f, 0, -1, false, 0)) { + if (!mBrkAnm.init(modelData, pbrk, TRUE, J3DFrameCtrl::LOOP_REPEAT_e, 1.0f, 0, -1, false, 0)) { return FALSE; } diff --git a/src/d/actor/d_a_mozo.cpp b/src/d/actor/d_a_mozo.cpp index a5aa112d4..aa69949b9 100644 --- a/src/d/actor/d_a_mozo.cpp +++ b/src/d/actor/d_a_mozo.cpp @@ -80,8 +80,8 @@ BOOL daMozo_c::CreateHeap() { m_btk = (J3DAnmTextureSRTKey*)dComIfG_getObjectRes("Mozo", MOZO_BTK_MOZ); JUT_ASSERT(0x16D, m_btk != 0); - int brkInitResult = mBrkAnm.init(mdlData, m_brk, true, 0, 1.0f, 0, -1, false, 0); - int btkInitResult = mBtkAnm.init(mdlData, m_btk, true, 0, 1.0f, 0, -1, false, 0); + int brkInitResult = mBrkAnm.init(mdlData, m_brk, true, J3DFrameCtrl::LOOP_ONCE_e, 1.0f, 0, -1, false, 0); + int btkInitResult = mBtkAnm.init(mdlData, m_btk, true, J3DFrameCtrl::LOOP_ONCE_e, 1.0f, 0, -1, false, 0); return mdlData != 0 && mAnimMorf != 0 && mAnimMorf->getModel() != 0 && brkInitResult != 0 && btkInitResult != 0; } diff --git a/src/d/actor/d_a_nh.cpp b/src/d/actor/d_a_nh.cpp index 2e25d2fff..ebd97a627 100644 --- a/src/d/actor/d_a_nh.cpp +++ b/src/d/actor/d_a_nh.cpp @@ -429,7 +429,7 @@ BOOL daNh_c::initBrkAnm(bool i_modify) { J3DAnmTevRegKey* a_brk = (J3DAnmTevRegKey*)dComIfG_getObjectRes("Always", ALWAYS_BRK_TNH); JUT_ASSERT(883, a_brk != 0); - if (mBrkAnm.init(modelData, a_brk, true, 2, 1.0f, 0, -1, i_modify, false)) { + if (mBrkAnm.init(modelData, a_brk, true, J3DFrameCtrl::LOOP_REPEAT_e, 1.0f, 0, -1, i_modify, false)) { success = true; } return success; diff --git a/src/d/actor/d_a_npc_bs1.cpp b/src/d/actor/d_a_npc_bs1.cpp index d25c3c15b..7651f0613 100644 --- a/src/d/actor/d_a_npc_bs1.cpp +++ b/src/d/actor/d_a_npc_bs1.cpp @@ -194,7 +194,7 @@ BOOL daNpc_Bs1_c::initTexPatternAnm(bool i_modify) { J3DModelData* modelData = mpMorf->getModel()->getModelData(); m_head_tex_pattern = (J3DAnmTexPattern*)dComIfG_getObjectRes("Bs", l_btp_ix_tbl[m828]); JUT_ASSERT(0x1bd, m_head_tex_pattern != 0); - if (!mBtpAnm.init(modelData, m_head_tex_pattern, 1, 2, 1.0f, 0, -1, i_modify, 0)) { + if (!mBtpAnm.init(modelData, m_head_tex_pattern, TRUE, J3DFrameCtrl::LOOP_REPEAT_e, 1.0f, 0, -1, i_modify, 0)) { return FALSE; } mFrame = 0; diff --git a/src/d/actor/d_a_npc_btsw2.cpp b/src/d/actor/d_a_npc_btsw2.cpp index a3dd8190c..8ecd5fe88 100644 --- a/src/d/actor/d_a_npc_btsw2.cpp +++ b/src/d/actor/d_a_npc_btsw2.cpp @@ -139,7 +139,7 @@ BOOL daNpc_Btsw2_c::initTexPatternAnm(bool i_modify) { J3DModelData* modelData = mpMorf->getModel()->getModelData(); m_btp = static_cast(dComIfG_getObjectRes(m_arc_name, l_btp_ix_tbl[m744])); JUT_ASSERT(282, m_btp != 0); - if (!mBtpAnm.init(modelData, m_btp, TRUE, 2, 1.0f, 0, -1, i_modify, 0)) { + if (!mBtpAnm.init(modelData, m_btp, TRUE, J3DFrameCtrl::LOOP_REPEAT_e, 1.0f, 0, -1, i_modify, 0)) { return FALSE; } mBtpFrame = 0; diff --git a/src/d/actor/d_a_npc_ji1.cpp b/src/d/actor/d_a_npc_ji1.cpp index 5a51960be..4d851fc8d 100644 --- a/src/d/actor/d_a_npc_ji1.cpp +++ b/src/d/actor/d_a_npc_ji1.cpp @@ -2634,10 +2634,10 @@ BOOL daNpc_Ji1_c::setAnm(int param_1, f32 param_2, int param_3) { field_0x330->setAnm(temp1, temp2, param_2, speed, 0.0f, -1.0f, pSoundAnimRes); if(field_0xD64 == 0x13) { - mpMorf->setAnm((J3DAnmTransform*)dComIfG_getObjectRes("Ji", JI_BCK_JIYARI_TATEATTACK), 2, 0.0f, 1.0f, 0.0f, -1.0f, 0); + mpMorf->setAnm((J3DAnmTransform*)dComIfG_getObjectRes("Ji", JI_BCK_JIYARI_TATEATTACK), J3DFrameCtrl::LOOP_REPEAT_e, 0.0f, 1.0f, 0.0f, -1.0f, NULL); } else if(field_0xD64 == 0x14) { - mpMorf->setAnm((J3DAnmTransform*)dComIfG_getObjectRes("Ji", JI_BCK_JIYARI_YOKOATTACK), 2, 0.0f, 1.0f, 0.0f, -1.0f, 0); + mpMorf->setAnm((J3DAnmTransform*)dComIfG_getObjectRes("Ji", JI_BCK_JIYARI_YOKOATTACK), J3DFrameCtrl::LOOP_REPEAT_e, 0.0f, 1.0f, 0.0f, -1.0f, NULL); } return true; @@ -2823,8 +2823,8 @@ BOOL daNpc_Ji1_c::CreateHeap() { J3DAnmTextureSRTKey* a_btk = static_cast(dComIfG_getObjectRes("Ji", JI_BTK_YJITR00)); JUT_ASSERT(0x15D0, a_btk != 0); - int temp1 = field_0x3FC.init(modelData, a_brk, false, 2, 1.0f, 0, -1, false, 0); - int temp2 = field_0x418.init(modelData, a_btk, false, 2, 1.0f, 0, -1, false, 0); + int temp1 = field_0x3FC.init(modelData, a_brk, false, J3DFrameCtrl::LOOP_REPEAT_e, 1.0f, 0, -1, false, 0); + int temp2 = field_0x418.init(modelData, a_btk, false, J3DFrameCtrl::LOOP_REPEAT_e, 1.0f, 0, -1, false, 0); if(field_0x3F8 == 0 || temp1 == 0 || temp2 == 0) { return false; @@ -2833,7 +2833,7 @@ BOOL daNpc_Ji1_c::CreateHeap() { headTexPattern = static_cast(dComIfG_getObjectRes("Ji", JI_BTP_JI)); JUT_ASSERT(0x15D8, headTexPattern != 0); - if(field_0x3D8.init(modelData, headTexPattern, 1, 2, 1.0f, 0, -1, false, 0) == 0) { + if(field_0x3D8.init(modelData, headTexPattern, TRUE, J3DFrameCtrl::LOOP_REPEAT_e, 1.0f, 0, -1, false, 0) == 0) { return false; } diff --git a/src/d/actor/d_a_npc_md.cpp b/src/d/actor/d_a_npc_md.cpp index 736a1b288..5fc98378e 100644 --- a/src/d/actor/d_a_npc_md.cpp +++ b/src/d/actor/d_a_npc_md.cpp @@ -2199,7 +2199,7 @@ BOOL daNpc_Md_c::initTexPatternAnm(u8 btpAnmTblIdx, bool param_2) { bool ret = false; J3DAnmTexPattern* eyeTexPtrn = (J3DAnmTexPattern*)dComIfG_getObjectRes(mModelArcName, btpAnmTbl[btpAnmTblIdx].m00); JUT_ASSERT(7502, eyeTexPtrn != 0); - if (m0520.init(modelData, eyeTexPtrn, 1, 1, 1.0f, 0, -1, param_2, 0)) { + if (m0520.init(modelData, eyeTexPtrn, TRUE, J3DFrameCtrl::LOOP_ONCE_RESET_e, 1.0f, 0, -1, param_2, 0)) { m3112 = eyeTexPtrn->getFrameMax(); m3133 = 0; m3136 = btpAnmTbl[btpAnmTblIdx].m20; diff --git a/src/d/actor/d_a_npc_nz.cpp b/src/d/actor/d_a_npc_nz.cpp index cc8083651..c9d467057 100644 --- a/src/d/actor/d_a_npc_nz.cpp +++ b/src/d/actor/d_a_npc_nz.cpp @@ -153,7 +153,7 @@ BOOL daNpc_Nz_c::_createHeap() { mpMorf = new mDoExt_McaMorf( modelData, NULL, NULL, - 0, + NULL, -1, 1.0f, 0, -1, 1, NULL, 0x00080000, diff --git a/src/d/actor/d_a_npc_os.cpp b/src/d/actor/d_a_npc_os.cpp index e24315789..1f0110063 100644 --- a/src/d/actor/d_a_npc_os.cpp +++ b/src/d/actor/d_a_npc_os.cpp @@ -1669,7 +1669,7 @@ BOOL daNpc_Os_c::dNpc_Os_setAnm(mDoExt_McaMorf* pMorf, int loopMode, f32 morf, f if(pMorf) { J3DAnmTransform* pAnimRes = (J3DAnmTransform*)dComIfG_getObjectRes(arcName, idx); - pMorf->setAnm(pAnimRes, loopMode, morf, playSpeed, 0.0f, -1.0f, 0); + pMorf->setAnm(pAnimRes, loopMode, morf, playSpeed, 0.0f, -1.0f, NULL); ret = true; } diff --git a/src/d/actor/d_a_npc_roten.cpp b/src/d/actor/d_a_npc_roten.cpp index 3596a22a2..0bef773cb 100644 --- a/src/d/actor/d_a_npc_roten.cpp +++ b/src/d/actor/d_a_npc_roten.cpp @@ -2002,7 +2002,7 @@ void daNpcRoten_c::executeTurn() { s32 daNpcRoten_c::executeWindInit() { setAnmTbl(l_npc_anm_wind); J3DAnmTransform* pAnmRes = static_cast(dComIfG_getObjectIDRes(l_arcname_tbl[mNpcNo], l_head_bck_ix_tbl[mNpcNo])); - field_0x6D8->setAnm(pAnmRes, 0, 14.0f, 1.0f, 0.0f, 39.0f, NULL); + field_0x6D8->setAnm(pAnmRes, J3DFrameCtrl::LOOP_ONCE_e, 14.0f, 1.0f, 0.0f, 39.0f, NULL); return 4; } @@ -2693,7 +2693,7 @@ BOOL daNpcRoten_c::initTexPatternAnm(bool modify) { m_head_tex_pattern = static_cast(dComIfG_getObjectIDRes(l_arcname_tbl[mNpcNo], l_btp_ix_tbl[mNpcNo])); JUT_ASSERT(0xBFF, m_head_tex_pattern != 0); - if(!mBtpAnm.init(modelData, m_head_tex_pattern, 1, 2, 1.0f, 0, -1, modify, 0)) { + if(!mBtpAnm.init(modelData, m_head_tex_pattern, TRUE, J3DFrameCtrl::LOOP_REPEAT_e, 1.0f, 0, -1, modify, 0)) { return false; } diff --git a/src/d/actor/d_a_obj_toripost.cpp b/src/d/actor/d_a_obj_toripost.cpp index 001a17979..610d44647 100644 --- a/src/d/actor/d_a_obj_toripost.cpp +++ b/src/d/actor/d_a_obj_toripost.cpp @@ -577,44 +577,44 @@ void daObjTpost_c::setAnm(s8 param_1, bool param_2) { }; static const dLib_anm_prm_c a_anm_prm_tbl[] = { { - -1, - -1, - 0, - 8.0f, - 1.0f, - 2 + /* mBckIdx */ -1, + /* mNextPrmIdx */ -1, + /* field_0x02 */ 0, + /* mMorf */ 8.0f, + /* mPlaySpeed */ 1.0f, + /* mLoopMode */ J3DFrameCtrl::LOOP_REPEAT_e }, { - 0, - -1, - 0, - 8.0f, - 0.0f, - 0 + /* mBckIdx */ 0, + /* mNextPrmIdx */ -1, + /* field_0x02 */ 0, + /* mMorf */ 8.0f, + /* mPlaySpeed */ 0.0f, + /* mLoopMode */ J3DFrameCtrl::LOOP_ONCE_e }, { - 0, - -1, - 0, - 8.0f, - 1.0f, - 0 + /* mBckIdx */ 0, + /* mNextPrmIdx */ -1, + /* field_0x02 */ 0, + /* mMorf */ 8.0f, + /* mPlaySpeed */ 1.0f, + /* mLoopMode */ J3DFrameCtrl::LOOP_ONCE_e }, { - 1, - -1, - 0, - 8.0f, - 1.0f, - 0 + /* mBckIdx */ 1, + /* mNextPrmIdx */ -1, + /* field_0x02 */ 0, + /* mMorf */ 8.0f, + /* mPlaySpeed */ 1.0f, + /* mLoopMode */ J3DFrameCtrl::LOOP_ONCE_e }, { - 2, - -1, - 0, - 8.0f, - 1.0f, - 2 + /* mBckIdx */ 2, + /* mNextPrmIdx */ -1, + /* field_0x02 */ 0, + /* mMorf */ 8.0f, + /* mPlaySpeed */ 1.0f, + /* mLoopMode */ J3DFrameCtrl::LOOP_REPEAT_e }, }; diff --git a/src/d/actor/d_a_rd.cpp b/src/d/actor/d_a_rd.cpp index a14a07d52..6cfca54cc 100644 --- a/src/d/actor/d_a_rd.cpp +++ b/src/d/actor/d_a_rd.cpp @@ -225,7 +225,7 @@ BOOL daRd_c::_createHeap() { J3DAnmTextureSRTKey* btk = static_cast(dComIfG_getObjectRes(m_arc_name, RD_BTK_RD_CLOSE)); JUT_ASSERT(525, btk != 0); - if (!mBtkAnm.init(modelData, btk, true, 0, 1.0f, 0, -1, false, 0)) { + if (!mBtkAnm.init(modelData, btk, true, J3DFrameCtrl::LOOP_ONCE_e, 1.0f, 0, -1, false, 0)) { return FALSE; } @@ -233,7 +233,7 @@ BOOL daRd_c::_createHeap() { J3DAnmTevRegKey* brk = static_cast(dComIfG_getObjectRes(m_arc_name, RD_BRK_NML)); JUT_ASSERT(550, brk != 0); - if (!mBrkAnm.init(modelData, brk, true, 0, 1.0f, 0, -1, false, 0)) { + if (!mBrkAnm.init(modelData, brk, true, J3DFrameCtrl::LOOP_ONCE_e, 1.0f, 0, -1, false, 0)) { return FALSE; } @@ -1333,7 +1333,10 @@ void daRd_c::setBrkAnm(s8 idx) { RD_BRK_BEAM_END, }; static const int a_play_mod_tbl[] = { - 0, 0, 2, 0, + J3DFrameCtrl::LOOP_ONCE_e, + J3DFrameCtrl::LOOP_ONCE_e, + J3DFrameCtrl::LOOP_REPEAT_e, + J3DFrameCtrl::LOOP_ONCE_e, }; J3DModel* model = mpMorf->getModel(); diff --git a/src/d/actor/d_a_swhit0.cpp b/src/d/actor/d_a_swhit0.cpp index 7cbcf18d0..da8392475 100644 --- a/src/d/actor/d_a_swhit0.cpp +++ b/src/d/actor/d_a_swhit0.cpp @@ -111,12 +111,12 @@ BOOL daSwhit0_c::CreateHeap() { } J3DAnmTransform* anm = (J3DAnmTransform*)dComIfG_getObjectRes("Always", ALWAYS_BCK_OBM_SYOUGEKISW); - if (mAnm.init(modelData, anm, true, 0x02, 1.0f, 0, -1, false) == 0) { + if (mAnm.init(modelData, anm, true, J3DFrameCtrl::LOOP_REPEAT_e, 1.0f, 0, -1, false) == 0) { return FALSE; } J3DAnmTextureSRTKey* texAnm = (J3DAnmTextureSRTKey*)dComIfG_getObjectRes("Always", ALWAYS_BTK_OBM_SYOUGEKISW); - if (mTexAnm.init(modelData, texAnm, true, 0x02, 1.0f, 0, -1, false, 0) == 0) { + if (mTexAnm.init(modelData, texAnm, true, J3DFrameCtrl::LOOP_REPEAT_e, 1.0f, 0, -1, false, 0) == 0) { return FALSE; } diff --git a/src/d/actor/d_a_tbox.cpp b/src/d/actor/d_a_tbox.cpp index 9f576e84d..91ac7a8f1 100644 --- a/src/d/actor/d_a_tbox.cpp +++ b/src/d/actor/d_a_tbox.cpp @@ -101,7 +101,7 @@ s32 daTbox_c::commonShapeSet() { // Load open animation J3DAnmTransform* openAnm = (J3DAnmTransform*)dComIfG_getObjectRes("Dalways", mdlInfo.openBckId); - if (mOpenAnm.init(modelData, openAnm, true, 0, 1.0f, 0, -1, false) == 0) { + if (mOpenAnm.init(modelData, openAnm, true, J3DFrameCtrl::LOOP_ONCE_e, 1.0f, 0, -1, false) == 0) { return cPhs_ERROR_e; } @@ -128,7 +128,7 @@ s32 daTbox_c::commonShapeSet() { } J3DAnmTevRegKey* appearRegData = (J3DAnmTevRegKey*)dComIfG_getObjectRes("Dalways", mdlInfo.brkId); - if (mpAppearRegAnm->init(modelData, appearRegData, true, 0, 1.0f, 0, -1, false, 0) == 0) { + if (mpAppearRegAnm->init(modelData, appearRegData, true, J3DFrameCtrl::LOOP_ONCE_e, 1.0f, 0, -1, false, 0) == 0) { return cPhs_ERROR_e; } @@ -152,7 +152,7 @@ s32 daTbox_c::commonShapeSet() { } J3DAnmTevRegKey* tactPlatformBrk = (J3DAnmTevRegKey*)dComIfG_getObjectRes("Dalways", DALWAYS_BRK_YTRIF00); - if (mTactPlatformBrk.init(modelData, tactPlatformBrk, true, 0, 1.0f, 0, -1, false, 0) == 0) { + if (mTactPlatformBrk.init(modelData, tactPlatformBrk, true, J3DFrameCtrl::LOOP_ONCE_e, 1.0f, 0, -1, false, 0) == 0) { return cPhs_ERROR_e; } } @@ -184,17 +184,17 @@ s32 daTbox_c::effectShapeSet() { } J3DAnmTransform* flashAnm = (J3DAnmTransform*)dComIfG_getObjectRes("Dalways", DALWAYS_BCK_IT_TAKARA_FLASH2); - if (mFlashAnm.init(flashModelData, flashAnm, true, 0, 1.0f, 0, -1, false) == 0) { + if (mFlashAnm.init(flashModelData, flashAnm, true, J3DFrameCtrl::LOOP_ONCE_e, 1.0f, 0, -1, false) == 0) { return cPhs_ERROR_e; } J3DAnmTextureSRTKey* flashTexAnm = (J3DAnmTextureSRTKey*)dComIfG_getObjectRes("Dalways", DALWAYS_BTK_IT_TAKARA_FLASH); - if (mFlashTexAnm.init(flashModelData, flashTexAnm, true, 0, 1.0f, 0, -1, false, 0) == 0) { + if (mFlashTexAnm.init(flashModelData, flashTexAnm, true, J3DFrameCtrl::LOOP_ONCE_e, 1.0f, 0, -1, false, 0) == 0) { return cPhs_ERROR_e; } J3DAnmTevRegKey* flashRegAnm = (J3DAnmTevRegKey*)dComIfG_getObjectRes("Dalways", DALWAYS_BRK_IT_TAKARA_FLASH); - int regInit = mFlashRegAnm.init(flashModelData, flashRegAnm, true, 0, 1.0f, 0, -1, false, 0); + int regInit = mFlashRegAnm.init(flashModelData, flashRegAnm, true, J3DFrameCtrl::LOOP_ONCE_e, 1.0f, 0, -1, false, 0); if (regInit) { return cPhs_COMPLEATE_e; diff --git a/src/d/d_material.cpp b/src/d/d_material.cpp index 759763c29..8dcec714e 100644 --- a/src/d/d_material.cpp +++ b/src/d/d_material.cpp @@ -23,7 +23,7 @@ void dMat_backup_c::restore() { /* 8006F69C-8006F740 .text create__10dMat_ice_cFP16J3DMaterialTableP19J3DAnmTextureSRTKey */ void dMat_ice_c::create(J3DMaterialTable* param_1, J3DAnmTextureSRTKey* param_2) { mMaterialTable = param_1; - int rt = mBtkAnm.init(mMaterialTable, param_2, 1, 2, 1.0f, 0, -1, false, 0); + int rt = mBtkAnm.init(mMaterialTable, param_2, TRUE, J3DFrameCtrl::LOOP_REPEAT_e, 1.0f, 0, -1, false, 0); JUT_ASSERT(98, rt != 0); mBtkAnm.entry(mMaterialTable, mBtkAnm.getFrameCtrl()->getFrame()); } diff --git a/src/d/d_s_room.cpp b/src/d/d_s_room.cpp index cad09f6c5..1423a142d 100644 --- a/src/d/d_s_room.cpp +++ b/src/d/d_s_room.cpp @@ -218,7 +218,7 @@ s32 phase_2(room_of_scene_class* i_this) { if (bank != 0xFF) { JUT_ASSERT(0x1db, 0 <= bank && bank < 100); sprintf(dStage_roomControl_c::mDemoArcName, "Demo%02d", bank); - if (!dComIfG_setObjectRes(dStage_roomControl_c::mDemoArcName, JKRArchive::UNKNOWN_MOUNT_DIRECTION, NULL)) + if (!dComIfG_setObjectRes(dStage_roomControl_c::mDemoArcName, JKRArchive::DEFAULT_MOUNT_DIRECTION, NULL)) dStage_roomControl_c::mDemoArcName[0] = '\0'; } }