From 5359c5932370ae2b69db5dc890469100ecd1efd3 Mon Sep 17 00:00:00 2001 From: Jcw87 Date: Thu, 23 Nov 2023 00:06:09 -0800 Subject: [PATCH] ptmf syntax --- src/JSystem/JAudio/JASSeqParser.cpp | 106 ++++++++++++++-------------- src/d/actor/d_a_arrow.cpp | 18 ++--- src/d/actor/d_a_bomb.cpp | 18 ++--- src/d/actor/d_a_bomb2.cpp | 22 +++--- src/d/actor/d_a_hookshot.cpp | 2 +- src/d/actor/d_a_ib.cpp | 4 +- src/d/actor/d_a_item.cpp | 6 +- src/d/actor/d_a_nh.cpp | 14 ++-- src/d/d_npc.cpp | 8 +-- src/d/d_shop.cpp | 8 +-- 10 files changed, 103 insertions(+), 103 deletions(-) diff --git a/src/JSystem/JAudio/JASSeqParser.cpp b/src/JSystem/JAudio/JASSeqParser.cpp index 02f293126..02c42cca2 100644 --- a/src/JSystem/JAudio/JASSeqParser.cpp +++ b/src/JSystem/JAudio/JASSeqParser.cpp @@ -430,67 +430,67 @@ void JASystem::TSeqParser::parseSeq(TTrack* track) { int (JASystem::TSeqParser::*JASystem::TSeqParser::sCmdPList[64])(JASystem::TTrack*, u32*) = { NULL, - JASystem::TSeqParser::cmdOpenTrack, - JASystem::TSeqParser::cmdOpenTrackBros, + &JASystem::TSeqParser::cmdOpenTrack, + &JASystem::TSeqParser::cmdOpenTrackBros, NULL, - JASystem::TSeqParser::cmdCall, + &JASystem::TSeqParser::cmdCall, NULL, - JASystem::TSeqParser::cmdRet, + &JASystem::TSeqParser::cmdRet, NULL, - JASystem::TSeqParser::cmdJmp, - JASystem::TSeqParser::cmdLoopS, - JASystem::TSeqParser::cmdLoopE, - JASystem::TSeqParser::cmdReadPort, - JASystem::TSeqParser::cmdWritePort, - JASystem::TSeqParser::cmdCheckPortImport, - JASystem::TSeqParser::cmdCheckPortExport, - JASystem::TSeqParser::cmdWait, + &JASystem::TSeqParser::cmdJmp, + &JASystem::TSeqParser::cmdLoopS, + &JASystem::TSeqParser::cmdLoopE, + &JASystem::TSeqParser::cmdReadPort, + &JASystem::TSeqParser::cmdWritePort, + &JASystem::TSeqParser::cmdCheckPortImport, + &JASystem::TSeqParser::cmdCheckPortExport, + &JASystem::TSeqParser::cmdWait, NULL, - JASystem::TSeqParser::cmdParentWritePort, - JASystem::TSeqParser::cmdChildWritePort, + &JASystem::TSeqParser::cmdParentWritePort, + &JASystem::TSeqParser::cmdChildWritePort, NULL, - JASystem::TSeqParser::cmdSetLastNote, - JASystem::TSeqParser::cmdTimeRelate, - JASystem::TSeqParser::cmdSimpleOsc, - JASystem::TSeqParser::cmdSimpleEnv, - JASystem::TSeqParser::cmdSimpleADSR, - JASystem::TSeqParser::cmdTranspose, - JASystem::TSeqParser::cmdCloseTrack, - JASystem::TSeqParser::cmdOutSwitch, - JASystem::TSeqParser::cmdUpdateSync, - JASystem::TSeqParser::cmdBusConnect, - JASystem::TSeqParser::cmdPauseStatus, - JASystem::TSeqParser::cmdSetInterrupt, - JASystem::TSeqParser::cmdDisInterrupt, - JASystem::TSeqParser::cmdClrI, - JASystem::TSeqParser::cmdSetI, - JASystem::TSeqParser::cmdRetI, - JASystem::TSeqParser::cmdIntTimer, - JASystem::TSeqParser::cmdVibDepth, - JASystem::TSeqParser::cmdVibDepthMidi, - JASystem::TSeqParser::cmdSyncCPU, - JASystem::TSeqParser::cmdFlushAll, - JASystem::TSeqParser::cmdFlushRelease, - JASystem::TSeqParser::cmdWait, - JASystem::TSeqParser::cmdPanPowSet, - JASystem::TSeqParser::cmdIIRSet, - JASystem::TSeqParser::cmdFIRSet, - JASystem::TSeqParser::cmdEXTSet, - JASystem::TSeqParser::cmdPanSwSet, - JASystem::TSeqParser::cmdOscRoute, - JASystem::TSeqParser::cmdIIRCutOff, - JASystem::TSeqParser::cmdOscFull, - JASystem::TSeqParser::cmdVolumeMode, - JASystem::TSeqParser::cmdVibPitch, + &JASystem::TSeqParser::cmdSetLastNote, + &JASystem::TSeqParser::cmdTimeRelate, + &JASystem::TSeqParser::cmdSimpleOsc, + &JASystem::TSeqParser::cmdSimpleEnv, + &JASystem::TSeqParser::cmdSimpleADSR, + &JASystem::TSeqParser::cmdTranspose, + &JASystem::TSeqParser::cmdCloseTrack, + &JASystem::TSeqParser::cmdOutSwitch, + &JASystem::TSeqParser::cmdUpdateSync, + &JASystem::TSeqParser::cmdBusConnect, + &JASystem::TSeqParser::cmdPauseStatus, + &JASystem::TSeqParser::cmdSetInterrupt, + &JASystem::TSeqParser::cmdDisInterrupt, + &JASystem::TSeqParser::cmdClrI, + &JASystem::TSeqParser::cmdSetI, + &JASystem::TSeqParser::cmdRetI, + &JASystem::TSeqParser::cmdIntTimer, + &JASystem::TSeqParser::cmdVibDepth, + &JASystem::TSeqParser::cmdVibDepthMidi, + &JASystem::TSeqParser::cmdSyncCPU, + &JASystem::TSeqParser::cmdFlushAll, + &JASystem::TSeqParser::cmdFlushRelease, + &JASystem::TSeqParser::cmdWait, + &JASystem::TSeqParser::cmdPanPowSet, + &JASystem::TSeqParser::cmdIIRSet, + &JASystem::TSeqParser::cmdFIRSet, + &JASystem::TSeqParser::cmdEXTSet, + &JASystem::TSeqParser::cmdPanSwSet, + &JASystem::TSeqParser::cmdOscRoute, + &JASystem::TSeqParser::cmdIIRCutOff, + &JASystem::TSeqParser::cmdOscFull, + &JASystem::TSeqParser::cmdVolumeMode, + &JASystem::TSeqParser::cmdVibPitch, NULL, NULL, NULL, NULL, NULL, - JASystem::TSeqParser::cmdCheckWave, - JASystem::TSeqParser::cmdPrintf, - JASystem::TSeqParser::cmdNop, - JASystem::TSeqParser::cmdTempo, - JASystem::TSeqParser::cmdTimeBase, - JASystem::TSeqParser::cmdFinish, + &JASystem::TSeqParser::cmdCheckWave, + &JASystem::TSeqParser::cmdPrintf, + &JASystem::TSeqParser::cmdNop, + &JASystem::TSeqParser::cmdTempo, + &JASystem::TSeqParser::cmdTimeBase, + &JASystem::TSeqParser::cmdFinish, }; diff --git a/src/d/actor/d_a_arrow.cpp b/src/d/actor/d_a_arrow.cpp index 81dc28b04..1f6c15db1 100644 --- a/src/d/actor/d_a_arrow.cpp +++ b/src/d/actor/d_a_arrow.cpp @@ -390,7 +390,7 @@ bool daArrow_c::check_water_in() { waterHitPos = (next.pos * weight) + (current.pos * (1.0f - weight)); } - mCurrProcFunc = &procWater; + mCurrProcFunc = &daArrow_c::procWater; fopAcM_SetParam(this, 4); if (mArrowType == TYPE_FIRE) { @@ -620,7 +620,7 @@ BOOL daArrow_c::procWait() { checkRestMp(); } - mCurrProcFunc = &procMove; + mCurrProcFunc = &daArrow_c::procMove; arrowShooting(); } @@ -678,7 +678,7 @@ BOOL daArrow_c::procMove() { dKy_arrowcol_chg_on(¤t.pos, 2); } - mCurrProcFunc = &procStop_BG; + mCurrProcFunc = &daArrow_c::procStop_BG; fopAcM_OnStatus(this, fopAcStts_UNK4000_e); fopAcM_SetParam(this, 2); field_0x604 = 0x28; @@ -729,7 +729,7 @@ BOOL daArrow_c::procMove() { if (hitType == 1) { // Blocked hit fopAcM_SetParam(this, 3); - mCurrProcFunc = &procReturn; + mCurrProcFunc = &daArrow_c::procReturn; speed *= -0.1f; speed.y += speed.absXZ(); current.pos = next.pos; @@ -740,7 +740,7 @@ BOOL daArrow_c::procMove() { fopAcM_seStartCurrent(this, JA_SE_LK_ARROW_REBOUND, 0x20); } else if (hitType == 2) { // Hit a joint fpcM_SetParam(this, 2); - mCurrProcFunc = &procStop_Actor; + mCurrProcFunc = &daArrow_c::procStop_Actor; if (mArrowType == TYPE_FIRE) { fopAcM_seStartCurrent(this, JA_SE_OBJ_FIRE_ARW_EFF, 0); @@ -779,7 +779,7 @@ BOOL daArrow_c::procMove() { dKy_arrowcol_chg_on(¤t.pos, temp8); } - mCurrProcFunc = &procStop_BG; + mCurrProcFunc = &daArrow_c::procStop_BG; fopAcM_OnStatus(this, fopAcStts_UNK4000_e); fopAcM_SetParam(this, 2); field_0x604 = 0x28; @@ -828,7 +828,7 @@ BOOL daArrow_c::procMove() { attribCode == dBgS_Attr_DAMAGE_e || attribCode == dBgS_Attr_FREEZE_e )) { - mCurrProcFunc = &procReturn; + mCurrProcFunc = &daArrow_c::procReturn; fopAcM_SetParam(this, 3); speed *= -0.1f; speed.y += speed.absXZ(); @@ -848,7 +848,7 @@ BOOL daArrow_c::procMove() { // There was probably some code here that got commented out. } - if (mCurrProcFunc == &procWater) { + if (mCurrProcFunc == &daArrow_c::procWater) { mDoMtx_stack_c::transS(current.pos); mDoMtx_stack_c::ZXYrotM(shape_angle.x, shape_angle.y, 0); mpModel->setBaseTRMtx(mDoMtx_stack_c::get()); @@ -1061,7 +1061,7 @@ BOOL daArrow_c::createInit() { mpBtk = daPy_getPlayerLinkActorClass()->getIceArrowBtk(); } - mCurrProcFunc = &procWait; + mCurrProcFunc = &daArrow_c::procWait; setKeepMatrix(); mCullMtx = mpModel->getBaseTRMtx(); diff --git a/src/d/actor/d_a_bomb.cpp b/src/d/actor/d_a_bomb.cpp index a1aab243d..67bcf34a9 100644 --- a/src/d/actor/d_a_bomb.cpp +++ b/src/d/actor/d_a_bomb.cpp @@ -313,9 +313,9 @@ bool daBomb_c::checkExplodeCc() { if(0 < mRestTime) { typedef bool(daBomb_c::*checkFunc)(); static checkFunc proc[] = { - &checkExplodeCc_norm, - &checkExplodeCc_nut, - &checkExplodeCc_cannon + &daBomb_c::checkExplodeCc_norm, + &daBomb_c::checkExplodeCc_nut, + &daBomb_c::checkExplodeCc_cannon }; return (this->*proc[mType])(); @@ -432,9 +432,9 @@ bool daBomb_c::checkExplodeBg_cannon() { bool daBomb_c::checkExplodeBg() { typedef bool(daBomb_c::*checkFunc)(); static checkFunc proc[] = { - &checkExplodeBg_norm, - &checkExplodeBg_nut, - &checkExplodeBg_cannon + &daBomb_c::checkExplodeBg_norm, + &daBomb_c::checkExplodeBg_nut, + &daBomb_c::checkExplodeBg_cannon }; return (this->*proc[mType])(); @@ -757,7 +757,7 @@ int daBomb_c::procExplode_init() { field_0x774 = 0; field_0x778 = 0.0f; - mFunc = &procExplode; + mFunc = &daBomb_c::procExplode; speedF = 0.0f; speed = cXyz::Zero; mGravity = 0.0f; @@ -869,7 +869,7 @@ bool daBomb_c::procCarry_init() { setFuseEffect(); } - mFunc = &procCarry; + mFunc = &daBomb_c::procCarry; change_state(STATE_2); speedF = 0.0f; speed.set(cXyz::Zero); @@ -903,7 +903,7 @@ bool daBomb_c::procCarry() { } bool daBomb_c::procWait_init() { - mFunc = &procWait; + mFunc = &daBomb_c::procWait; if(chk_attrState(this, ATTR_STATE_80)) { change_state(STATE_1); } diff --git a/src/d/actor/d_a_bomb2.cpp b/src/d/actor/d_a_bomb2.cpp index fa31eed12..b7a679c6e 100644 --- a/src/d/actor/d_a_bomb2.cpp +++ b/src/d/actor/d_a_bomb2.cpp @@ -260,9 +260,9 @@ namespace daBomb2 { void Act_c::start_proc_call() { typedef void(Act_c::*procFunc)(); static procFunc start_proc[] = { - &start_explode_instant, - &start_explode_interval, - &start_carry + &Act_c::start_explode_instant, + &Act_c::start_explode_interval, + &Act_c::start_carry }; int proc = daObj::PrmAbstract(this, PRM_2_W, PRM_2_S); @@ -851,10 +851,10 @@ namespace daBomb2 { void Act_c::mode_proc_call() { typedef void(Act_c::*procFunc)(); static procFunc mode_proc[] = { - &mode_wait, - &mode_carry, - &mode_explode, - &mode_sink, + &Act_c::mode_wait, + &Act_c::mode_carry, + &Act_c::mode_explode, + &Act_c::mode_sink, }; if(fopAcM_checkCarryNow(this) && field_0x694 != 1) { @@ -951,10 +951,10 @@ namespace daBomb2 { void Act_c::tensor_proc_call() { typedef void(Act_c::*procFunc)(); static procFunc tensor_proc[] = { - &tensor_wait, - &tensor_carry, - &tensor_explode, - &tensor_sink, + &Act_c::tensor_wait, + &Act_c::tensor_carry, + &Act_c::tensor_explode, + &Act_c::tensor_sink, }; if(!daObj::PrmAbstract(this, PRM_1_W, PRM_1_S)) { diff --git a/src/d/actor/d_a_hookshot.cpp b/src/d/actor/d_a_hookshot.cpp index cf9b863d4..6fa9993ec 100644 --- a/src/d/actor/d_a_hookshot.cpp +++ b/src/d/actor/d_a_hookshot.cpp @@ -204,7 +204,7 @@ void daHookshot_rockLineCallback(fopAc_ac_c* hookshot_actor, dCcD_GObjInf* objIn BOOL daHookshot_c::procWait_init(int param_1) { daPy_lk_c* link = daPy_getPlayerLinkActorClass(); fopAcM_SetParam(this, 0); - mCurrProcFunc = &procWait; + mCurrProcFunc = &daHookshot_c::procWait; mChainCnt = 0; current.pos = link->getHookshotRootPos(); m518 = -1; diff --git a/src/d/actor/d_a_ib.cpp b/src/d/actor/d_a_ib.cpp index 84979358e..aaaee7b65 100644 --- a/src/d/actor/d_a_ib.cpp +++ b/src/d/actor/d_a_ib.cpp @@ -204,8 +204,8 @@ BOOL daIball_c::dead() { /* 800F3A48-800F3E78 .text checkGeo__9daIball_cFv */ void daIball_c::checkGeo() { static ModeFunc mode_proc[] = { - &mode_wait, - &mode_water, + &daIball_c::mode_wait, + &daIball_c::mode_water, }; mPrevSpeedY = speed.y; diff --git a/src/d/actor/d_a_item.cpp b/src/d/actor/d_a_item.cpp index 7208cf205..2f74fb6a8 100644 --- a/src/d/actor/d_a_item.cpp +++ b/src/d/actor/d_a_item.cpp @@ -307,9 +307,9 @@ BOOL daItem_c::_daItem_execute() { /* 800F5834-800F59CC .text mode_proc_call__8daItem_cFv */ void daItem_c::mode_proc_call() { static ModeFunc mode_proc[] = { - &mode_wait, - &mode_wait, - &mode_water, + &daItem_c::mode_wait, + &daItem_c::mode_wait, + &daItem_c::mode_water, }; if (mType == 1) { diff --git a/src/d/actor/d_a_nh.cpp b/src/d/actor/d_a_nh.cpp index 6fcdc0e9b..c480a9bf8 100644 --- a/src/d/actor/d_a_nh.cpp +++ b/src/d/actor/d_a_nh.cpp @@ -173,7 +173,7 @@ BOOL daNh_c::init() { void daNh_c::action(void* arg) { if (mCurrActionFunc == NULL) { speedF = 0.0f; - setAction(&waitAction, NULL); + setAction(&daNh_c::waitAction, NULL); } (this->*mCurrActionFunc)(arg); } @@ -218,7 +218,7 @@ BOOL daNh_c::checkBinCatch() { /* 800F9F3C-800FA108 .text searchPlayer__6daNh_cFv */ BOOL daNh_c::searchPlayer() { if (isTypeBottle()) { - setAction(&escapeAction, NULL); + setAction(&daNh_c::escapeAction, NULL); return TRUE; } @@ -229,7 +229,7 @@ BOOL daNh_c::searchPlayer() { mPlayerDist = playerDist; if (playerDelta.absXZ() > 0.001f && playerDist < 600.0f && playerDistDelta > l_HIO.prm.mMinFrightenSpeed) { // Player is nearby and moving closer. The Forest Firefly becomes frightened and tries to escape. - setAction(&escapeAction, NULL); + setAction(&daNh_c::escapeAction, NULL); return TRUE; } @@ -299,7 +299,7 @@ BOOL daNh_c::waitAction(void*) { } else if (mActionStatus != ACTION_ENDING) { cLib_addCalc(&speedF, 0.0f, 0.1f, 10.0f, 1.0f); if (getHomeDistance() > 50.0f) { - setAction(&returnAction, NULL); + setAction(&daNh_c::returnAction, NULL); } } return TRUE; @@ -310,11 +310,11 @@ BOOL daNh_c::checkEscapeEnd() { cXyz homeDelta = orig.pos - current.pos; if (!isTypeBottle()) { if (cLib_calcTimer(&mEscapeTimer) == 0) { - setAction(&waitAction, NULL); + setAction(&daNh_c::waitAction, NULL); return TRUE; } if (homeDelta.abs2XZ() > l_HIO.prm.mMaxHomeDist*l_HIO.prm.mMaxHomeDist) { - setAction(&returnAction, NULL); + setAction(&daNh_c::returnAction, NULL); return TRUE; } } @@ -353,7 +353,7 @@ BOOL daNh_c::returnAction(void*) { mEscapeTimer = 5*30; } else if (mActionStatus != ACTION_ENDING) { if (getHomeDistance() < 50.0f) { - setAction(&waitAction, NULL); + setAction(&daNh_c::waitAction, NULL); } else { s16 targetAngle = cLib_targetAngleY(¤t.pos, &orig.pos); cXyz homeDelta = orig.pos - current.pos; diff --git a/src/d/d_npc.cpp b/src/d/d_npc.cpp index 5fc651867..ca971c1f1 100644 --- a/src/d/d_npc.cpp +++ b/src/d/d_npc.cpp @@ -702,12 +702,12 @@ bool dNpc_setAnm_2(mDoExt_McaMorf* pMorf, int loopMode, f32 morf, f32 speed, int /* 8021C238-8021C2E8 .text swing_vertical_init__14dNpc_HeadAnm_cFsssi */ void dNpc_HeadAnm_c::swing_vertical_init(s16 param_1, s16 param_2, s16 param_3, int param_4) { - if(param_4 == 0 || mFunc != &swing_vertical) { + if(param_4 == 0 || mFunc != &dNpc_HeadAnm_c::swing_vertical) { field_0x1C = 0; field_0x20 = param_1; field_0x1E = param_2; field_0x14 = param_3; - mFunc = &swing_vertical; + mFunc = &dNpc_HeadAnm_c::swing_vertical; } } @@ -726,12 +726,12 @@ void dNpc_HeadAnm_c::swing_vertical() { /* 8021C3C8-8021C478 .text swing_horizone_init__14dNpc_HeadAnm_cFsssi */ void dNpc_HeadAnm_c::swing_horizone_init(s16 param_1, s16 param_2, s16 param_3, int param_4) { - if(param_4 == 0 || mFunc != &swing_vertical) { + if(param_4 == 0 || mFunc != &dNpc_HeadAnm_c::swing_vertical) { field_0x1C = 0; field_0x20 = param_1; field_0x1E = param_2; field_0x18 = param_3; - mFunc = &swing_horizone; + mFunc = &dNpc_HeadAnm_c::swing_horizone; } } diff --git a/src/d/d_shop.cpp b/src/d/d_shop.cpp index 4e4348dfa..88f02ffe1 100644 --- a/src/d/d_shop.cpp +++ b/src/d/d_shop.cpp @@ -897,7 +897,7 @@ ShopItems_c__shop_cam_data* shop_cam_data_tbl[] = { /* 8005EFDC-8005F088 .text shop_cam_action_init__16ShopCam_action_cFv */ BOOL ShopCam_action_c::shop_cam_action_init() { daPy_getPlayerActorClass()->onPlayerNoDraw(); - setCamAction(&shop_cam_action); + setCamAction(&ShopCam_action_c::shop_cam_action); m18 = shop_cam_data_tbl[mCamDataIdx][0].m00; m24 = shop_cam_data_tbl[mCamDataIdx][0].m0C; @@ -933,12 +933,12 @@ int ShopCam_action_c::shop_cam_action() { /* 8005F220-8005F370 .text rsh_talk_cam_action_init__16ShopCam_action_cFP10fopAc_ac_c4cXyz4cXyzf */ BOOL ShopCam_action_c::rsh_talk_cam_action_init(fopAc_ac_c* param_1, cXyz param_2, cXyz param_3, f32 param_4) { - if (checkCamAction(&rsh_talk_cam_action)) { + if (checkCamAction(&ShopCam_action_c::rsh_talk_cam_action)) { return TRUE; } daPy_getPlayerActorClass()->onPlayerNoDraw(); - setCamAction(&rsh_talk_cam_action); + setCamAction(&ShopCam_action_c::rsh_talk_cam_action); mDoMtx_stack_c::transS(param_1->mAttentionInfo.mPosition); mDoMtx_stack_c::YrotM(param_1->current.angle.y); @@ -966,7 +966,7 @@ int ShopCam_action_c::rsh_talk_cam_action() { /* 8005F41C-8005F494 .text ds_normal_cam_action_init__16ShopCam_action_cFv */ BOOL ShopCam_action_c::ds_normal_cam_action_init() { daPy_getPlayerActorClass()->onPlayerNoDraw(); - setCamAction(&ds_normal_cam_action); + setCamAction(&ShopCam_action_c::ds_normal_cam_action); m18.set(-136.0f, 102.0f, -254.0f); m24.set(-136.0f, 102.0f, 90.0f);