summaryrefslogtreecommitdiff
path: root/src/d
diff options
context:
space:
mode:
authorMax Roncace <me@caseif.net>2026-02-27 13:20:39 -0500
committerGitHub <noreply@github.com>2026-02-27 11:20:39 -0700
commitd017a3cd36dacdcbd6a62640a85b8715540d82e5 (patch)
tree351ed1da61d5973c14dc3544c65a4bc01160e0b7 /src/d
parenta096caa8deaab245402c56dd5d54bfe4a0bbe2e5 (diff)
d_a_alink debug improvements (#3112)
Diffstat (limited to 'src/d')
-rw-r--r--src/d/actor/d_a_alink.cpp1560
-rw-r--r--src/d/actor/d_a_alink_HIO.inc193
-rw-r--r--src/d/actor/d_a_alink_bottle.inc3
-rw-r--r--src/d/actor/d_a_alink_bow.inc1
-rw-r--r--src/d/actor/d_a_alink_crawl.inc17
-rw-r--r--src/d/actor/d_a_alink_cut.inc3
-rw-r--r--src/d/actor/d_a_alink_damage.inc2
-rw-r--r--src/d/actor/d_a_alink_demo.inc58
-rw-r--r--src/d/actor/d_a_alink_effect.inc265
-rw-r--r--src/d/actor/d_a_alink_grab.inc6
-rw-r--r--src/d/actor/d_a_alink_guard.inc13
-rw-r--r--src/d/actor/d_a_alink_hang.inc14
-rw-r--r--src/d/actor/d_a_alink_hook.inc79
-rw-r--r--src/d/actor/d_a_alink_horse.inc25
-rw-r--r--src/d/actor/d_a_alink_iceleaf.inc35
-rw-r--r--src/d/actor/d_a_alink_ironball.inc37
-rw-r--r--src/d/actor/d_a_alink_sumou.inc2
-rw-r--r--src/d/actor/d_a_alink_swim.inc11
-rw-r--r--src/d/actor/d_a_alink_swindow.inc2
-rw-r--r--src/d/actor/d_a_alink_wolf.inc231
20 files changed, 1360 insertions, 1197 deletions
diff --git a/src/d/actor/d_a_alink.cpp b/src/d/actor/d_a_alink.cpp
index f0041d01d6..e6f8548bef 100644
--- a/src/d/actor/d_a_alink.cpp
+++ b/src/d/actor/d_a_alink.cpp
@@ -63,8 +63,6 @@ BOOL daAlink_c::getE3Zhint() {
return false;
}
-#include "d/actor/d_a_alink_HIO.inc"
-
#if DEBUG
static BOOL l_debugMode;
#endif
@@ -85,6 +83,11 @@ static const char l_cWShdArcName[] = "CWShd";
static const char l_sWShdArcName[] = "SWShd";
+#include "d/actor/d_a_alink_HIO.inc"
+
+static const f32 l_boardSlopeAngleMin = 910.0f;
+static const f32 l_boardSlopeRowAngleMin = 2000.0f;
+
static const char l_arcName[] = "Alink";
const char* daAlink_c::getAlinkArcName() {
@@ -96,8 +99,9 @@ static void daAlink_tgHitCallback(fopAc_ac_c* i_tgActor, dCcD_GObjInf* i_tgObjIn
static_cast<daAlink_c*>(i_tgActor)->tgHitCallback(i_atActor, i_tgObjInf, i_atObjInf);
}
-static void daAlink_coHitCallback(fopAc_ac_c* i_coActorA, dCcD_GObjInf* i_coObjInfA, fopAc_ac_c* i_coActorB,
- dCcD_GObjInf* i_coObjInfB) {
+static void daAlink_coHitCallback(fopAc_ac_c* i_coActorA, dCcD_GObjInf* i_coObjInfA,
+ fopAc_ac_c* i_coActorB, dCcD_GObjInf* i_coObjInfB) {
+ UNUSED(i_coActorB);
UNUSED(i_coObjInfB);
static_cast<daAlink_c*>(i_coActorA)->coHitCallback(i_coActorB, i_coObjInfA);
}
@@ -142,459 +146,6 @@ static char const l_defaultGetEventName[16] = "DEFAULT_GETITEM";
static char l_peepEventName[10] = "PEEP_HOLE";
-daAlink_procInitTable daAlink_c::m_procInitTable[] = {
- { &daAlink_c::procPreActionUnequip, 0x21 },
- { &daAlink_c::procServiceWait, 0x10000085 },
- { &daAlink_c::procTiredWait, 0x10001185 },
- { &daAlink_c::procWait, 0x10001185 },
- { &daAlink_c::procMove, 0x10001184 },
- { &daAlink_c::procAtnMove, 0x10001184 },
- { &daAlink_c::procAtnActorWait, 0x10001185 },
- { &daAlink_c::procAtnActorMove, 0x10001184 },
- { &daAlink_c::procWaitTurn, 0x10001085 },
- { &daAlink_c::procMoveTurn, 0x10001084 },
- { &daAlink_c::procSideStep, 0x10001186 },
- { &daAlink_c::procSideStepLand, 0x10001185 },
- { &daAlink_c::procSlide, 0x0 },
- { &daAlink_c::procSlideLand, 0x4 },
- { &daAlink_c::procFrontRoll, 0x8200 },
- { &daAlink_c::procFrontRollCrash, 0x2 },
- { &daAlink_c::procFrontRollSuccess, 0x0 },
- { &daAlink_c::procSideRoll, 0x8000 },
- { &daAlink_c::procBackJump, 0x8001086 },
- { &daAlink_c::procBackJumpLand, 0x1185 },
- { &daAlink_c::procSlip, 0x0 },
- { &daAlink_c::procAutoJump, 0x1006 },
- { &daAlink_c::procDiveJump, 0x2 },
- { &daAlink_c::procRollJump, 0x2 },
- { &daAlink_c::procFall, 0x1006 },
- { &daAlink_c::procLand, 0x1005 },
- { &daAlink_c::procSmallJump, 0x1000 },
- { &daAlink_c::procStepMove, 0x10001184 },
- { &daAlink_c::procCrouch, 0x800001 },
- { &daAlink_c::procGuardSlip, 0x60000000 },
- { &daAlink_c::procGuardAttack, 0x100 },
- { &daAlink_c::procGuardBreak, 0x100 },
- { &daAlink_c::procTurnMove, 0x8000 },
- { &daAlink_c::procCutNormal, 0x20000300 },
- { &daAlink_c::procCutFinish, 0x20000320 },
- { &daAlink_c::procCutFinishJumpUp, 0x102 },
- { &daAlink_c::procCutFinishJumpUpLand, 0x100 },
- { &daAlink_c::procCutReverse, 0x200 },
- { &daAlink_c::procCutJump, 0x8000202 },
- { &daAlink_c::procCutJumpLand, 0x8000201 },
- { &daAlink_c::procCutTurn, 0x200 },
- { &daAlink_c::procCutTurnCharge, 0x101 },
- { &daAlink_c::procCutTurnMove, 0x101 },
- { &daAlink_c::procCutDown, 0x8000022 },
- { &daAlink_c::procCutDownLand, 0x8002001 },
- { &daAlink_c::procCutHead, 0x222 },
- { &daAlink_c::procCutHeadLand, 0x201 },
- { &daAlink_c::procCutLargeJumpCharge, 0x101 },
- { &daAlink_c::procCutLargeJump, 0x200 },
- { &daAlink_c::procCutLargeJumpLand, 0x201 },
- { &daAlink_c::procDamage, 0x8 },
- { &daAlink_c::procLargeDamageUp, 0xa008008 },
- { &daAlink_c::procLandDamage, 0x9 },
- { &daAlink_c::procCrawlStart, 0x300a000 },
- { &daAlink_c::procCrawlMove, 0xb00e000 },
- { &daAlink_c::procCrawlAutoMove, 0xf00a000 },
- { &daAlink_c::procCrawlEnd, 0x300a000 },
- { &daAlink_c::procPullMove, 0x202000 },
- { &daAlink_c::procHorseRide, 0x4002400 },
- { &daAlink_c::procHorseGetOff, 0x4002400 },
- { &daAlink_c::procHorseWait, 0x10003585 },
- { &daAlink_c::procHorseTurn, 0x2500 },
- { &daAlink_c::procHorseJump, 0x2502 },
- { &daAlink_c::procHorseLand, 0x2500 },
- { &daAlink_c::procHorseSubjectivity, 0x60003404 },
- { &daAlink_c::procHorseCut, 0x2500 },
- { &daAlink_c::procHorseCutChargeReady, 0x2500 },
- { &daAlink_c::procHorseCutTurn, 0x2500 },
- { &daAlink_c::procHorseDamage, 0x2408 },
- { &daAlink_c::procHorseBowSubject, 0x60003404 },
- { &daAlink_c::procHorseBowMove, 0x60003404 },
- { &daAlink_c::procHorseGrabMove, 0x3404 },
- { &daAlink_c::procHorseBoomerangSubject, 0x60003404 },
- { &daAlink_c::procHorseBoomerangMove, 0x60003404 },
- { &daAlink_c::procHorseHookshotSubject, 0x60003404 },
- { &daAlink_c::procHorseHookshotMove, 0x60003404 },
- { &daAlink_c::procHorseBottleDrink, 0x2401 },
- { &daAlink_c::procHorseComeback, 0x2409 },
- { &daAlink_c::procHorseKandelaarPour, 0x2401 },
- { &daAlink_c::procHorseRun, 0x2400 },
- { &daAlink_c::procHorseHang, 0x2400 },
- { &daAlink_c::procHorseGetKey, 0x2401 },
- { &daAlink_c::procHorseLookDown, 0x2401 },
- { &daAlink_c::procBoarRun, 0x2400 },
- { &daAlink_c::procSwordUnequipSp, 0x1 },
- { &daAlink_c::procHangStart, 0x4041 },
- { &daAlink_c::procHangFallStart, 0x4041 },
- { &daAlink_c::procHangUp, 0x4041 },
- { &daAlink_c::procHangWait, 0x4041 },
- { &daAlink_c::procHangMove, 0x4040 },
- { &daAlink_c::procHangClimb, 0x4040 },
- { &daAlink_c::procHangWallCatch, 0x4040 },
- { &daAlink_c::procHangReady, 0x1 },
- { &daAlink_c::procHangLeverDown, 0x21 },
- { &daAlink_c::procBowSubject, 0x20001005 },
- { &daAlink_c::procBowMove, 0x20001004 },
- { &daAlink_c::procBoomerangSubject, 0x30001005 },
- { &daAlink_c::procBoomerangMove, 0x30001004 },
- { &daAlink_c::procBoomerangCatch, 0x1001 },
- { &daAlink_c::procCopyRodSubject, 0x30001005 },
- { &daAlink_c::procCopyRodMove, 0x30001004 },
- { &daAlink_c::procCopyRodSwing, 0x1 },
- { &daAlink_c::procCopyRodRevive, 0x1 },
- { &daAlink_c::procLadderUpStart, 0x10000 },
- { &daAlink_c::procLadderUpEnd, 0x10000 },
- { &daAlink_c::procLadderDownStart, 0x10000 },
- { &daAlink_c::procLadderDownEnd, 0x10000 },
- { &daAlink_c::procLadderMove, 0x10000 },
- { &daAlink_c::procGrabReady, 0x100001 },
- { &daAlink_c::procGrabUp, 0x100001 },
- { &daAlink_c::procGrabMiss, 0x100001 },
- { &daAlink_c::procGrabThrow, 0x100201 },
- { &daAlink_c::procGrabPut, 0x100001 },
- { &daAlink_c::procGrabWait, 0x1105 },
- { &daAlink_c::procGrabRebound, 0x100001 },
- { &daAlink_c::procGrabStand, 0x1 },
- { &daAlink_c::procInsectCatch, 0x21 },
- { &daAlink_c::procPickUp, 0x100001 },
- { &daAlink_c::procPickPut, 0x100001 },
- { &daAlink_c::procStEscape, 0x1 },
- { &daAlink_c::procDkCaught, 0x4000000 },
- { &daAlink_c::procSwimUp, 0x40000 },
- { &daAlink_c::procSwimWait, 0x40105 },
- { &daAlink_c::procSwimMove, 0x40104 },
- { &daAlink_c::procSwimDive, 0x40000 },
- { &daAlink_c::procSwimHookshotSubject, 0x20041005 },
- { &daAlink_c::procSwimHookshotMove, 0x20041004 },
- { &daAlink_c::procSwimDamage, 0x40008 },
- { &daAlink_c::procClimbUpStart, 0x10000 },
- { &daAlink_c::procClimbDownStart, 0x10000 },
- { &daAlink_c::procClimbMoveUpDown, 0x10000 },
- { &daAlink_c::procClimbMoveSide, 0x10000 },
- { &daAlink_c::procClimbWait, 0x10000 },
- { &daAlink_c::procClimbToRoof, 0x10000 },
- { &daAlink_c::procRoofHangStart, 0x10 },
- { &daAlink_c::procRoofHangWait, 0x11 },
- { &daAlink_c::procRoofHangFrontMove, 0x10 },
- { &daAlink_c::procRoofHangSideMove, 0x10 },
- { &daAlink_c::procRoofHangTurn, 0x10 },
- { &daAlink_c::procRoofSwitchHang, 0x2030 },
- { &daAlink_c::procCanoeRide, 0x4002400 },
- { &daAlink_c::procCanoeJumpRide, 0x4002400 },
- { &daAlink_c::procCanoeGetOff, 0x4002400 },
- { &daAlink_c::procCanoeWait, 0x14003504 },
- { &daAlink_c::procCanoeRow, 0x4002504 },
- { &daAlink_c::procCanoePaddleShift, 0x4002504 },
- { &daAlink_c::procCanoePaddlePut, 0x4002400 },
- { &daAlink_c::procCanoePaddleGrab, 0x4002400 },
- { &daAlink_c::procCanoeRodGrab, 0x4002400 },
- { &daAlink_c::procCanoeFishingWait, 0x44002404 },
- { &daAlink_c::procCanoeFishingReel, 0x44002500 },
- { &daAlink_c::procCanoeFishingGet, 0x4002400 },
- { &daAlink_c::procCanoeSubjectivity, 0x64002404 },
- { &daAlink_c::procCanoeBowSubject, 0x64003404 },
- { &daAlink_c::procCanoeBowMove, 0x64003404 },
- { &daAlink_c::procCanoeGrabMove, 0x4103404 },
- { &daAlink_c::procCanoeBoomerangSubject, 0x64003404 },
- { &daAlink_c::procCanoeBoomerangMove, 0x64003404 },
- { &daAlink_c::procCanoeHookshotSubject, 0x64003404 },
- { &daAlink_c::procCanoeHookshotMove, 0x64003404 },
- { &daAlink_c::procCanoeBottleDrink, 0x2401 },
- { &daAlink_c::procCanoeKandelaarPour, 0x2401 },
- { &daAlink_c::procFishingCast, 0x2101 },
- { &daAlink_c::procFishingFood, 0x2001 },
- { &daAlink_c::procSpinnerReady, 0x2002 },
- { &daAlink_c::procSpinnerWait, 0x2500 },
- { &daAlink_c::procBoardRide, 0x22 },
- { &daAlink_c::procBoardWait, 0x10001504 },
- { &daAlink_c::procBoardRow, 0x1504 },
- { &daAlink_c::procBoardTurn, 0x1504 },
- { &daAlink_c::procBoardJump, 0x1406 },
- { &daAlink_c::procBoardSubjectivity, 0x60000404 },
- { &daAlink_c::procBoardCut, 0x504 },
- { &daAlink_c::procBoardCutTurn, 0x400 },
- { &daAlink_c::procFmChainUp, 0x101 },
- { &daAlink_c::procFmChainStrongPull, 0x1001 },
- { &daAlink_c::procDoorOpen, 0x4000 },
- { &daAlink_c::procMonkeyMove, 0x800 },
- { &daAlink_c::procDemoBoomerangCatch, 0x10000101 },
- { &daAlink_c::procBottleDrink, 0x2001 },
- { &daAlink_c::procBottleOpen, 0x2001 },
- { &daAlink_c::procBottleSwing, 0x21 },
- { &daAlink_c::procBottleGet, 0x1 },
- { &daAlink_c::procKandelaarSwing, 0x1 },
- { &daAlink_c::procKandelaarPour, 0x2001 },
- { &daAlink_c::procGrassWhistleGet, 0x21 },
- { &daAlink_c::procGrassWhistleWait, 0x2001 },
- { &daAlink_c::procHawkCatch, 0x1 },
- { &daAlink_c::procHawkSubject, 0x20000021 },
- { &daAlink_c::procFloorDownRebound, 0x10001185 },
- { &daAlink_c::procGoronRideWait, 0x101 },
- { &daAlink_c::procGoatMove, 0x4002121 },
- { &daAlink_c::procGoatCatch, 0x400a021 },
- { &daAlink_c::procGoatStroke, 0x2121 },
- { &daAlink_c::procGoronMove, 0x101 },
- { &daAlink_c::procDemoCommon, 0x1 },
- { &daAlink_c::procHookshotSubject, 0x20001005 },
- { &daAlink_c::procHookshotMove, 0x20001004 },
- { &daAlink_c::procHookshotFly, 0x6002 },
- { &daAlink_c::procHookshotRoofWait, 0x6802 },
- { &daAlink_c::procHookshotRoofShoot, 0x6902 },
- { &daAlink_c::procHookshotRoofBoots, 0x6902 },
- { &daAlink_c::procHookshotWallWait, 0x6802 },
- { &daAlink_c::procHookshotWallShoot, 0x6902 },
- { &daAlink_c::procMagneBootsFly, 0x2 },
- { &daAlink_c::procBootsEquip, 0x1103 },
- { &daAlink_c::procSumouReady, 0xa000 },
- { &daAlink_c::procSumouMove, 0xa000 },
- { &daAlink_c::procSumouSideMove, 0xa000 },
- { &daAlink_c::procSumouAction, 0xa000 },
- { &daAlink_c::procSumouStagger, 0xa000 },
- { &daAlink_c::procSumouWinLose, 0x2002 },
- { &daAlink_c::procSumouShiko, 0xa000 },
- { &daAlink_c::procLookUp, 0x101 },
- { &daAlink_c::procLookUpToGetItem, 0x101 },
- { &daAlink_c::procHandPat, 0x101 },
- { &daAlink_c::procIronBallSubject, 0x20001005 },
- { &daAlink_c::procIronBallMove, 0x20001004 },
- { &daAlink_c::procIronBallThrow, 0x20000000 },
- { &daAlink_c::procIronBallReturn, 0x1 },
- { &daAlink_c::procBossBodyHang, 0x6029 },
- { &daAlink_c::procOctaIealSpit, 0x42008 },
- { &daAlink_c::procScreamWait, 0x1 },
- { &daAlink_c::procGoatStopReady, 0x1 },
- { &daAlink_c::procZoraMove, 0xe000 },
- { &daAlink_c::procLookAroundTurn, 0x1 },
- { &daAlink_c::procTradeItemOut, 0x80121 },
- { &daAlink_c::procNotUseItem, 0x2021 },
- { &daAlink_c::procSwordReady, 0x1 },
- { &daAlink_c::procSwordPush, 0x1 },
- { &daAlink_c::procGanonFinish, 0xe000 },
- { &daAlink_c::procCutFastReady, 0x1 },
- { &daAlink_c::procMasterSwordStick, 0x6001 },
- { &daAlink_c::procMasterSwordPull, 0x6001 },
- { &daAlink_c::procDungeonWarpReady, 0x2021 },
- { &daAlink_c::procDungeonWarp, 0x6003 },
- { &daAlink_c::procDungeonWarpSceneStart, 0x6003 },
- { &daAlink_c::procWolfHowlDemo, 0x800021 },
- { &daAlink_c::procWolfServiceWait, 0x1001 },
- { &daAlink_c::procWolfTiredWait, 0x1101 },
- { &daAlink_c::procWolfMidnaRideShock, 0x1 },
- { &daAlink_c::procWolfWait, 0x1101 },
- { &daAlink_c::procWolfMove, 0x1100 },
- { &daAlink_c::procWolfDash, 0x1100 },
- { &daAlink_c::procWolfDashReverse, 0x2 },
- { &daAlink_c::procWolfWaitTurn, 0x1001 },
- { &daAlink_c::procWolfAtnActorMove, 0x1100 },
- { &daAlink_c::procWolfSideStep, 0x1102 },
- { &daAlink_c::procWolfSideStepLand, 0x1101 },
- { &daAlink_c::procWolfBackJump, 0x1002 },
- { &daAlink_c::procWolfBackJumpLand, 0x1001 },
- { &daAlink_c::procWolfHowl, 0x1 },
- { &daAlink_c::procWolfAutoJump, 0x1002 },
- { &daAlink_c::procWolfFall, 0x1002 },
- { &daAlink_c::procWolfLand, 0x1001 },
- { &daAlink_c::procWolfSit, 0x800101 },
- { &daAlink_c::procWolfLieStart, 0x1000100 },
- { &daAlink_c::procWolfLieMove, 0x1000100 },
- { &daAlink_c::procWolfLieAutoMove, 0x5002000 },
- { &daAlink_c::procWolfHangReady, 0x1001 },
- { &daAlink_c::procWolfStepMove, 0x10001100 },
- { &daAlink_c::procWolfHangWallCatch, 0x10005040 },
- { &daAlink_c::procWolfHangFallStart, 0x10005041 },
- { &daAlink_c::procWolfDamage, 0x8 },
- { &daAlink_c::procWolfLargeDamageUp, 0x12008008 },
- { &daAlink_c::procWolfLandDamage, 0x9 },
- { &daAlink_c::procWolfScreamWait, 0x1 },
- { &daAlink_c::procWolfSlip, 0x10001000 },
- { &daAlink_c::procWolfSlipTurn, 0x10001000 },
- { &daAlink_c::procWolfSlipTurnLand, 0x10001000 },
- { &daAlink_c::procWolfSlideReady, 0x10008000 },
- { &daAlink_c::procWolfSlide, 0x1000 },
- { &daAlink_c::procWolfSlideLand, 0x1000 },
- { &daAlink_c::procWolfWaitSlip, 0x1100 },
- { &daAlink_c::procWolfSlopeStart, 0x1000 },
- { &daAlink_c::procWolfRopeMove, 0x23100 },
- { &daAlink_c::procWolfRopeHang, 0x10023000 },
- { &daAlink_c::procWolfRopeTurn, 0x10023000 },
- { &daAlink_c::procWolfRopeStagger, 0x10023000 },
- { &daAlink_c::procWolfRopeSubjectivity, 0x23001 },
- { &daAlink_c::procWolfTagJump, 0x1022 },
- { &daAlink_c::procWolfTagJumpLand, 0x120 },
- { &daAlink_c::procWolfRollAttackCharge, 0x100 },
- { &daAlink_c::procWolfRollAttackMove, 0x100 },
- { &daAlink_c::procWolfJumpAttack, 0x2 },
- { &daAlink_c::procWolfJumpAttackKick, 0x2 },
- { &daAlink_c::procWolfJumpAttackSlideLand, 0x0 },
- { &daAlink_c::procWolfJumpAttackNormalLand, 0x0 },
- { &daAlink_c::procWolfWaitAttack, 0x0 },
- { &daAlink_c::procWolfRollAttack, 0x0 },
- { &daAlink_c::procWolfDownAttack, 0x22 },
- { &daAlink_c::procWolfDownAtLand, 0x8002021 },
- { &daAlink_c::procWolfDownAtMissLand, 0x0 },
- { &daAlink_c::procWolfLockAttack, 0x2002 },
- { &daAlink_c::procWolfLockAttackTurn, 0x0 },
- { &daAlink_c::procWolfSwimUp, 0x40000 },
- { &daAlink_c::procWolfSwimWait, 0x40101 },
- { &daAlink_c::procWolfSwimMove, 0x40100 },
- { &daAlink_c::procWolfSwimEndWait, 0x1001 },
- { &daAlink_c::procWolfGrabUp, 0x100001 },
- { &daAlink_c::procWolfGrabPut, 0x100001 },
- { &daAlink_c::procWolfGrabThrow, 0x100001 },
- { &daAlink_c::procWolfChainUp, 0x1 },
- { &daAlink_c::procWolfPush, 0x20 },
- { &daAlink_c::procWolfChainReady, 0x20000 },
- { &daAlink_c::procWolfChainWait, 0x10020000 },
- { &daAlink_c::procWolfDig, 0xa020 },
- { &daAlink_c::procWolfDigThrough, 0xe000 },
- { &daAlink_c::procWolfAttackReverse, 0x2 },
- { &daAlink_c::procWolfEnemyThrow, 0x0 },
- { &daAlink_c::procWolfEnemyHangBite, 0xe002 },
- { &daAlink_c::procWolfGiantPuzzle, 0x100 },
- { &daAlink_c::procWolfCargoCarry, 0x400e022 },
- { &daAlink_c::procWolfGetSmell, 0xe021 },
- { &daAlink_c::procDemoCommon, 0x1 },
- { &daAlink_c::procWolfSnowEscape, 0xa000 },
- { &daAlink_c::procWolfGanonCatch, 0x4002021 },
- { &daAlink_c::procCoToolDemo, 0x8000 },
- { &daAlink_c::procCoSubjectivity, 0x20001005 },
- { &daAlink_c::procCoSwimSubjectivity, 0x20041001 },
- { &daAlink_c::procCoPeepSubjectivity, 0x2000200b },
- { &daAlink_c::procCoPolyDamage, 0x9 },
- { &daAlink_c::procCoElecDamage, 0x9 },
- { &daAlink_c::procCoPushPullWait, 0x202001 },
- { &daAlink_c::procCoPushMove, 0x202000 },
- { &daAlink_c::procCoTalk, 0x80101 },
- { &daAlink_c::procCoOpenTreasure, 0xe001 },
- { &daAlink_c::procCoUnequip, 0x1 },
- { &daAlink_c::procCoGetItem, 0x800e001 },
- { &daAlink_c::procCoTurnBack, 0x1 },
- { &daAlink_c::procCoLookWait, 0x1101 },
- { &daAlink_c::procDemoCommon, 0x200001 },
- { &daAlink_c::procDemoCommon, 0x200000 },
- { &daAlink_c::procCoMetamorphose, 0x8001 },
- { &daAlink_c::procCoMetamorphoseOnly, 0x6001 },
- { &daAlink_c::procCoWarp, 0x1 },
- { &daAlink_c::procCoDead, 0xa009 },
- { &daAlink_c::procCoFogDead, 0xa009 },
- { &daAlink_c::procCoLookAround, 0x0 },
- { &daAlink_c::procDemoCommon, 0xe000 },
- { &daAlink_c::procCoSandWallHit, 0xa },
- { &daAlink_c::procCoLavaReturn, 0x42009 },
- { &daAlink_c::procCoSwimFreezeReturn, 0x42009 },
- { &daAlink_c::procCoGetReadySit, 0xa001 },
- { &daAlink_c::procCoTwGate, 0xe002 },
- { &daAlink_c::procCoLargeDamage, 0xa },
- { &daAlink_c::procCoLargeDamageWall, 0xa },
- { &daAlink_c::procCoNod, 0x80001 },
- { &daAlink_c::procDemoCommon, 0x80001 },
- { &daAlink_c::procCoGlare, 0x80001 },
- { &daAlink_c::procCoHorseCallWait, 0x1 },
- { &daAlink_c::procDemoCommon, 0x1 },
-};
-
-daAlink_procFunc daAlink_c::m_demoInitTable[] = {
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- &daAlink_c::commonWaitTurnInit,
- NULL,
- NULL,
- NULL,
- NULL,
- &daAlink_c::procCoOpenTreasureInit,
- &daAlink_c::procCoGetItemInit,
- &daAlink_c::procCoUnequipInit,
- &daAlink_c::commonGrabPutInit,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- &daAlink_c::procMonkeyMoveInit,
- &daAlink_c::procCoLookAroundInit,
- NULL,
- NULL,
- NULL,
- NULL,
- &daAlink_c::procCoTurnBackInit,
- NULL,
- NULL,
- &daAlink_c::procDemoBoomerangCatchInit,
- &daAlink_c::procHawkCatchInit,
- &daAlink_c::procSwordUnequipSpInit,
- NULL,
- &daAlink_c::procCoDemoPushPullWaitInit,
- &daAlink_c::procCoDemoPushMoveInit,
- &daAlink_c::procBossAtnWaitInit,
- &daAlink_c::procDoorOpenInit,
- NULL,
- &daAlink_c::procTradeItemOutInit,
- NULL,
- &daAlink_c::procKandelaarSwingInit,
- &daAlink_c::procFrontRollInit,
- &daAlink_c::procCrouchInit,
- NULL,
- NULL,
- NULL,
- NULL,
- &daAlink_c::procCoCaughtInit,
- &daAlink_c::procLookUpInit,
- &daAlink_c::procLookUpToGetItemInit,
- &daAlink_c::procHandPatInit,
- &daAlink_c::procWolfMidnaRideShockInit,
- &daAlink_c::procSumouShikoInit,
- &daAlink_c::procCoFogDeadInit,
- &daAlink_c::procWolfSmellWaitInit,
- NULL,
- NULL,
- &daAlink_c::procWolfCargoCarryInit,
- &daAlink_c::procCoMetamorphoseInit,
- &daAlink_c::procCoMetamorphoseInit,
- &daAlink_c::procHorseGetKeyInit,
- &daAlink_c::procCoNodInit,
- &daAlink_c::procCoGlareInit,
- &daAlink_c::procCoEyeAwayInit,
- &daAlink_c::procGoatStopReadyInit,
- &daAlink_c::procCoGetReadySitInit,
- NULL,
- &daAlink_c::procCoTwGateInit,
- &daAlink_c::procFmChainStrongPullInit,
- &daAlink_c::procWolfSnowEscapeInit,
- &daAlink_c::procZoraMoveInit,
- &daAlink_c::procCoMetamorphoseOnlyInit,
- &daAlink_c::procCoMetamorphoseOnlyInit,
- &daAlink_c::procLookAroundTurnInit,
- NULL,
- &daAlink_c::procCoQuakeWaitInit,
- &daAlink_c::procGuardAttackInit,
- &daAlink_c::procSwordReadyInit,
- &daAlink_c::procDungeonWarpInit,
- &daAlink_c::procDungeonWarpSceneStartInit,
- &daAlink_c::procMasterSwordStickInit,
- &daAlink_c::procMasterSwordPullInit,
- &daAlink_c::procCutDownInit,
- NULL,
- &daAlink_c::procCutHeadInit,
- NULL,
- NULL,
- &daAlink_c::procCutLargeJumpInit,
- &daAlink_c::procCutFastReadyInit,
- &daAlink_c::procCopyRodReviveInit,
- &daAlink_c::procSwordPushInit,
- &daAlink_c::procGanonFinishInit,
- NULL,
- NULL,
- &daAlink_c::procHorseLookDownInit,
- NULL,
-};
-
static f32 const l_crawlStartFrontOffset[3] = {0.0f, 30.0f, 112.0f};
static Vec const l_crawlFrontOffset = {0.0f, 30.0f, 80.0f};
@@ -1454,59 +1005,468 @@ daAlink_FaceTexData const daAlink_c::m_faceTexDataTable[] = {
{dRes_ID_ALANM_BTP_WL_FC_e, dRes_ID_ALANM_BTK_WL_FA_e},
};
-#include "d/actor/d_a_alink_link.inc"
-
-#include "d/actor/d_a_alink_cut.inc"
-
-#include "d/actor/d_a_alink_damage.inc"
-
-#include "d/actor/d_a_alink_guard.inc"
-
-#include "d/actor/d_a_alink_bow.inc"
-
-#include "d/actor/d_a_alink_boom.inc"
-
-#include "d/actor/d_a_alink_copyrod.inc"
-
-#include "d/actor/d_a_alink_hvyboots.inc"
+const daAlink_procInitTable daAlink_c::m_procInitTable[] = {
+ { &daAlink_c::procPreActionUnequip, 0x21 },
+ { &daAlink_c::procServiceWait, 0x10000085 },
+ { &daAlink_c::procTiredWait, 0x10001185 },
+ { &daAlink_c::procWait, 0x10001185 },
+ { &daAlink_c::procMove, 0x10001184 },
+ { &daAlink_c::procAtnMove, 0x10001184 },
+ { &daAlink_c::procAtnActorWait, 0x10001185 },
+ { &daAlink_c::procAtnActorMove, 0x10001184 },
+ { &daAlink_c::procWaitTurn, 0x10001085 },
+ { &daAlink_c::procMoveTurn, 0x10001084 },
+ { &daAlink_c::procSideStep, 0x10001186 },
+ { &daAlink_c::procSideStepLand, 0x10001185 },
+ { &daAlink_c::procSlide, 0x0 },
+ { &daAlink_c::procSlideLand, 0x4 },
+ { &daAlink_c::procFrontRoll, 0x8200 },
+ { &daAlink_c::procFrontRollCrash, 0x2 },
+ { &daAlink_c::procFrontRollSuccess, 0x0 },
+ { &daAlink_c::procSideRoll, 0x8000 },
+ { &daAlink_c::procBackJump, 0x8001086 },
+ { &daAlink_c::procBackJumpLand, 0x1185 },
+ { &daAlink_c::procSlip, 0x0 },
+ { &daAlink_c::procAutoJump, 0x1006 },
+ { &daAlink_c::procDiveJump, 0x2 },
+ { &daAlink_c::procRollJump, 0x2 },
+ { &daAlink_c::procFall, 0x1006 },
+ { &daAlink_c::procLand, 0x1005 },
+ { &daAlink_c::procSmallJump, 0x1000 },
+ { &daAlink_c::procStepMove, 0x10001184 },
+ { &daAlink_c::procCrouch, 0x800001 },
+ { &daAlink_c::procGuardSlip, 0x60000000 },
+ { &daAlink_c::procGuardAttack, 0x100 },
+ { &daAlink_c::procGuardBreak, 0x100 },
+ { &daAlink_c::procTurnMove, 0x8000 },
+ { &daAlink_c::procCutNormal, 0x20000300 },
+ { &daAlink_c::procCutFinish, 0x20000320 },
+ { &daAlink_c::procCutFinishJumpUp, 0x102 },
+ { &daAlink_c::procCutFinishJumpUpLand, 0x100 },
+ { &daAlink_c::procCutReverse, 0x200 },
+ { &daAlink_c::procCutJump, 0x8000202 },
+ { &daAlink_c::procCutJumpLand, 0x8000201 },
+ { &daAlink_c::procCutTurn, 0x200 },
+ { &daAlink_c::procCutTurnCharge, 0x101 },
+ { &daAlink_c::procCutTurnMove, 0x101 },
+ { &daAlink_c::procCutDown, 0x8000022 },
+ { &daAlink_c::procCutDownLand, 0x8002001 },
+ { &daAlink_c::procCutHead, 0x222 },
+ { &daAlink_c::procCutHeadLand, 0x201 },
+ { &daAlink_c::procCutLargeJumpCharge, 0x101 },
+ { &daAlink_c::procCutLargeJump, 0x200 },
+ { &daAlink_c::procCutLargeJumpLand, 0x201 },
+ { &daAlink_c::procDamage, 0x8 },
+ { &daAlink_c::procLargeDamageUp, 0xa008008 },
+ { &daAlink_c::procLandDamage, 0x9 },
+ { &daAlink_c::procCrawlStart, 0x300a000 },
+ { &daAlink_c::procCrawlMove, 0xb00e000 },
+ { &daAlink_c::procCrawlAutoMove, 0xf00a000 },
+ { &daAlink_c::procCrawlEnd, 0x300a000 },
+ { &daAlink_c::procPullMove, 0x202000 },
+ { &daAlink_c::procHorseRide, 0x4002400 },
+ { &daAlink_c::procHorseGetOff, 0x4002400 },
+ { &daAlink_c::procHorseWait, 0x10003585 },
+ { &daAlink_c::procHorseTurn, 0x2500 },
+ { &daAlink_c::procHorseJump, 0x2502 },
+ { &daAlink_c::procHorseLand, 0x2500 },
+ { &daAlink_c::procHorseSubjectivity, 0x60003404 },
+ { &daAlink_c::procHorseCut, 0x2500 },
+ { &daAlink_c::procHorseCutChargeReady, 0x2500 },
+ { &daAlink_c::procHorseCutTurn, 0x2500 },
+ { &daAlink_c::procHorseDamage, 0x2408 },
+ { &daAlink_c::procHorseBowSubject, 0x60003404 },
+ { &daAlink_c::procHorseBowMove, 0x60003404 },
+ { &daAlink_c::procHorseGrabMove, 0x3404 },
+ { &daAlink_c::procHorseBoomerangSubject, 0x60003404 },
+ { &daAlink_c::procHorseBoomerangMove, 0x60003404 },
+ { &daAlink_c::procHorseHookshotSubject, 0x60003404 },
+ { &daAlink_c::procHorseHookshotMove, 0x60003404 },
+ { &daAlink_c::procHorseBottleDrink, 0x2401 },
+ { &daAlink_c::procHorseComeback, 0x2409 },
+ { &daAlink_c::procHorseKandelaarPour, 0x2401 },
+ { &daAlink_c::procHorseRun, 0x2400 },
+ { &daAlink_c::procHorseHang, 0x2400 },
+ { &daAlink_c::procHorseGetKey, 0x2401 },
+ { &daAlink_c::procHorseLookDown, 0x2401 },
+ { &daAlink_c::procBoarRun, 0x2400 },
+ { &daAlink_c::procSwordUnequipSp, 0x1 },
+ { &daAlink_c::procHangStart, 0x4041 },
+ { &daAlink_c::procHangFallStart, 0x4041 },
+ { &daAlink_c::procHangUp, 0x4041 },
+ { &daAlink_c::procHangWait, 0x4041 },
+ { &daAlink_c::procHangMove, 0x4040 },
+ { &daAlink_c::procHangClimb, 0x4040 },
+ { &daAlink_c::procHangWallCatch, 0x4040 },
+ { &daAlink_c::procHangReady, 0x1 },
+ { &daAlink_c::procHangLeverDown, 0x21 },
+ { &daAlink_c::procBowSubject, 0x20001005 },
+ { &daAlink_c::procBowMove, 0x20001004 },
+ { &daAlink_c::procBoomerangSubject, 0x30001005 },
+ { &daAlink_c::procBoomerangMove, 0x30001004 },
+ { &daAlink_c::procBoomerangCatch, 0x1001 },
+ { &daAlink_c::procCopyRodSubject, 0x30001005 },
+ { &daAlink_c::procCopyRodMove, 0x30001004 },
+ { &daAlink_c::procCopyRodSwing, 0x1 },
+ { &daAlink_c::procCopyRodRevive, 0x1 },
+ { &daAlink_c::procLadderUpStart, 0x10000 },
+ { &daAlink_c::procLadderUpEnd, 0x10000 },
+ { &daAlink_c::procLadderDownStart, 0x10000 },
+ { &daAlink_c::procLadderDownEnd, 0x10000 },
+ { &daAlink_c::procLadderMove, 0x10000 },
+ { &daAlink_c::procGrabReady, 0x100001 },
+ { &daAlink_c::procGrabUp, 0x100001 },
+ { &daAlink_c::procGrabMiss, 0x100001 },
+ { &daAlink_c::procGrabThrow, 0x100201 },
+ { &daAlink_c::procGrabPut, 0x100001 },
+ { &daAlink_c::procGrabWait, 0x1105 },
+ { &daAlink_c::procGrabRebound, 0x100001 },
+ { &daAlink_c::procGrabStand, 0x1 },
+ { &daAlink_c::procInsectCatch, 0x21 },
+ { &daAlink_c::procPickUp, 0x100001 },
+ { &daAlink_c::procPickPut, 0x100001 },
+ { &daAlink_c::procStEscape, 0x1 },
+ { &daAlink_c::procDkCaught, 0x4000000 },
+ { &daAlink_c::procSwimUp, 0x40000 },
+ { &daAlink_c::procSwimWait, 0x40105 },
+ { &daAlink_c::procSwimMove, 0x40104 },
+ { &daAlink_c::procSwimDive, 0x40000 },
+ { &daAlink_c::procSwimHookshotSubject, 0x20041005 },
+ { &daAlink_c::procSwimHookshotMove, 0x20041004 },
+ { &daAlink_c::procSwimDamage, 0x40008 },
+ { &daAlink_c::procClimbUpStart, 0x10000 },
+ { &daAlink_c::procClimbDownStart, 0x10000 },
+ { &daAlink_c::procClimbMoveUpDown, 0x10000 },
+ { &daAlink_c::procClimbMoveSide, 0x10000 },
+ { &daAlink_c::procClimbWait, 0x10000 },
+ { &daAlink_c::procClimbToRoof, 0x10000 },
+ { &daAlink_c::procRoofHangStart, 0x10 },
+ { &daAlink_c::procRoofHangWait, 0x11 },
+ { &daAlink_c::procRoofHangFrontMove, 0x10 },
+ { &daAlink_c::procRoofHangSideMove, 0x10 },
+ { &daAlink_c::procRoofHangTurn, 0x10 },
+ { &daAlink_c::procRoofSwitchHang, 0x2030 },
+ { &daAlink_c::procCanoeRide, 0x4002400 },
+ { &daAlink_c::procCanoeJumpRide, 0x4002400 },
+ { &daAlink_c::procCanoeGetOff, 0x4002400 },
+ { &daAlink_c::procCanoeWait, 0x14003504 },
+ { &daAlink_c::procCanoeRow, 0x4002504 },
+ { &daAlink_c::procCanoePaddleShift, 0x4002504 },
+ { &daAlink_c::procCanoePaddlePut, 0x4002400 },
+ { &daAlink_c::procCanoePaddleGrab, 0x4002400 },
+ { &daAlink_c::procCanoeRodGrab, 0x4002400 },
+ { &daAlink_c::procCanoeFishingWait, 0x44002404 },
+ { &daAlink_c::procCanoeFishingReel, 0x44002500 },
+ { &daAlink_c::procCanoeFishingGet, 0x4002400 },
+ { &daAlink_c::procCanoeSubjectivity, 0x64002404 },
+ { &daAlink_c::procCanoeBowSubject, 0x64003404 },
+ { &daAlink_c::procCanoeBowMove, 0x64003404 },
+ { &daAlink_c::procCanoeGrabMove, 0x4103404 },
+ { &daAlink_c::procCanoeBoomerangSubject, 0x64003404 },
+ { &daAlink_c::procCanoeBoomerangMove, 0x64003404 },
+ { &daAlink_c::procCanoeHookshotSubject, 0x64003404 },
+ { &daAlink_c::procCanoeHookshotMove, 0x64003404 },
+ { &daAlink_c::procCanoeBottleDrink, 0x2401 },
+ { &daAlink_c::procCanoeKandelaarPour, 0x2401 },
+ { &daAlink_c::procFishingCast, 0x2101 },
+ { &daAlink_c::procFishingFood, 0x2001 },
+ { &daAlink_c::procSpinnerReady, 0x2002 },
+ { &daAlink_c::procSpinnerWait, 0x2500 },
+ { &daAlink_c::procBoardRide, 0x22 },
+ { &daAlink_c::procBoardWait, 0x10001504 },
+ { &daAlink_c::procBoardRow, 0x1504 },
+ { &daAlink_c::procBoardTurn, 0x1504 },
+ { &daAlink_c::procBoardJump, 0x1406 },
+ { &daAlink_c::procBoardSubjectivity, 0x60000404 },
+ { &daAlink_c::procBoardCut, 0x504 },
+ { &daAlink_c::procBoardCutTurn, 0x400 },
+ { &daAlink_c::procFmChainUp, 0x101 },
+ { &daAlink_c::procFmChainStrongPull, 0x1001 },
+ { &daAlink_c::procDoorOpen, 0x4000 },
+ { &daAlink_c::procMonkeyMove, 0x800 },
+ { &daAlink_c::procDemoBoomerangCatch, 0x10000101 },
+ { &daAlink_c::procBottleDrink, 0x2001 },
+ { &daAlink_c::procBottleOpen, 0x2001 },
+ { &daAlink_c::procBottleSwing, 0x21 },
+ { &daAlink_c::procBottleGet, 0x1 },
+ { &daAlink_c::procKandelaarSwing, 0x1 },
+ { &daAlink_c::procKandelaarPour, 0x2001 },
+ { &daAlink_c::procGrassWhistleGet, 0x21 },
+ { &daAlink_c::procGrassWhistleWait, 0x2001 },
+ { &daAlink_c::procHawkCatch, 0x1 },
+ { &daAlink_c::procHawkSubject, 0x20000021 },
+ { &daAlink_c::procFloorDownRebound, 0x10001185 },
+ { &daAlink_c::procGoronRideWait, 0x101 },
+ { &daAlink_c::procGoatMove, 0x4002121 },
+ { &daAlink_c::procGoatCatch, 0x400a021 },
+ { &daAlink_c::procGoatStroke, 0x2121 },
+ { &daAlink_c::procGoronMove, 0x101 },
+ { &daAlink_c::procDemoCommon, 0x1 },
+ { &daAlink_c::procHookshotSubject, 0x20001005 },
+ { &daAlink_c::procHookshotMove, 0x20001004 },
+ { &daAlink_c::procHookshotFly, 0x6002 },
+ { &daAlink_c::procHookshotRoofWait, 0x6802 },
+ { &daAlink_c::procHookshotRoofShoot, 0x6902 },
+ { &daAlink_c::procHookshotRoofBoots, 0x6902 },
+ { &daAlink_c::procHookshotWallWait, 0x6802 },
+ { &daAlink_c::procHookshotWallShoot, 0x6902 },
+ { &daAlink_c::procMagneBootsFly, 0x2 },
+ { &daAlink_c::procBootsEquip, 0x1103 },
+ { &daAlink_c::procSumouReady, 0xa000 },
+ { &daAlink_c::procSumouMove, 0xa000 },
+ { &daAlink_c::procSumouSideMove, 0xa000 },
+ { &daAlink_c::procSumouAction, 0xa000 },
+ { &daAlink_c::procSumouStagger, 0xa000 },
+ { &daAlink_c::procSumouWinLose, 0x2002 },
+ { &daAlink_c::procSumouShiko, 0xa000 },
+ { &daAlink_c::procLookUp, 0x101 },
+ { &daAlink_c::procLookUpToGetItem, 0x101 },
+ { &daAlink_c::procHandPat, 0x101 },
+ { &daAlink_c::procIronBallSubject, 0x20001005 },
+ { &daAlink_c::procIronBallMove, 0x20001004 },
+ { &daAlink_c::procIronBallThrow, 0x20000000 },
+ { &daAlink_c::procIronBallReturn, 0x1 },
+ { &daAlink_c::procBossBodyHang, 0x6029 },
+ { &daAlink_c::procOctaIealSpit, 0x42008 },
+ { &daAlink_c::procScreamWait, 0x1 },
+ { &daAlink_c::procGoatStopReady, 0x1 },
+ { &daAlink_c::procZoraMove, 0xe000 },
+ { &daAlink_c::procLookAroundTurn, 0x1 },
+ { &daAlink_c::procTradeItemOut, 0x80121 },
+ { &daAlink_c::procNotUseItem, 0x2021 },
+ { &daAlink_c::procSwordReady, 0x1 },
+ { &daAlink_c::procSwordPush, 0x1 },
+ { &daAlink_c::procGanonFinish, 0xe000 },
+ { &daAlink_c::procCutFastReady, 0x1 },
+ { &daAlink_c::procMasterSwordStick, 0x6001 },
+ { &daAlink_c::procMasterSwordPull, 0x6001 },
+ { &daAlink_c::procDungeonWarpReady, 0x2021 },
+ { &daAlink_c::procDungeonWarp, 0x6003 },
+ { &daAlink_c::procDungeonWarpSceneStart, 0x6003 },
+ { &daAlink_c::procWolfHowlDemo, 0x800021 },
+ { &daAlink_c::procWolfServiceWait, 0x1001 },
+ { &daAlink_c::procWolfTiredWait, 0x1101 },
+ { &daAlink_c::procWolfMidnaRideShock, 0x1 },
+ { &daAlink_c::procWolfWait, 0x1101 },
+ { &daAlink_c::procWolfMove, 0x1100 },
+ { &daAlink_c::procWolfDash, 0x1100 },
+ { &daAlink_c::procWolfDashReverse, 0x2 },
+ { &daAlink_c::procWolfWaitTurn, 0x1001 },
+ { &daAlink_c::procWolfAtnActorMove, 0x1100 },
+ { &daAlink_c::procWolfSideStep, 0x1102 },
+ { &daAlink_c::procWolfSideStepLand, 0x1101 },
+ { &daAlink_c::procWolfBackJump, 0x1002 },
+ { &daAlink_c::procWolfBackJumpLand, 0x1001 },
+ { &daAlink_c::procWolfHowl, 0x1 },
+ { &daAlink_c::procWolfAutoJump, 0x1002 },
+ { &daAlink_c::procWolfFall, 0x1002 },
+ { &daAlink_c::procWolfLand, 0x1001 },
+ { &daAlink_c::procWolfSit, 0x800101 },
+ { &daAlink_c::procWolfLieStart, 0x1000100 },
+ { &daAlink_c::procWolfLieMove, 0x1000100 },
+ { &daAlink_c::procWolfLieAutoMove, 0x5002000 },
+ { &daAlink_c::procWolfHangReady, 0x1001 },
+ { &daAlink_c::procWolfStepMove, 0x10001100 },
+ { &daAlink_c::procWolfHangWallCatch, 0x10005040 },
+ { &daAlink_c::procWolfHangFallStart, 0x10005041 },
+ { &daAlink_c::procWolfDamage, 0x8 },
+ { &daAlink_c::procWolfLargeDamageUp, 0x12008008 },
+ { &daAlink_c::procWolfLandDamage, 0x9 },
+ { &daAlink_c::procWolfScreamWait, 0x1 },
+ { &daAlink_c::procWolfSlip, 0x10001000 },
+ { &daAlink_c::procWolfSlipTurn, 0x10001000 },
+ { &daAlink_c::procWolfSlipTurnLand, 0x10001000 },
+ { &daAlink_c::procWolfSlideReady, 0x10008000 },
+ { &daAlink_c::procWolfSlide, 0x1000 },
+ { &daAlink_c::procWolfSlideLand, 0x1000 },
+ { &daAlink_c::procWolfWaitSlip, 0x1100 },
+ { &daAlink_c::procWolfSlopeStart, 0x1000 },
+ { &daAlink_c::procWolfRopeMove, 0x23100 },
+ { &daAlink_c::procWolfRopeHang, 0x10023000 },
+ { &daAlink_c::procWolfRopeTurn, 0x10023000 },
+ { &daAlink_c::procWolfRopeStagger, 0x10023000 },
+ { &daAlink_c::procWolfRopeSubjectivity, 0x23001 },
+ { &daAlink_c::procWolfTagJump, 0x1022 },
+ { &daAlink_c::procWolfTagJumpLand, 0x120 },
+ { &daAlink_c::procWolfRollAttackCharge, 0x100 },
+ { &daAlink_c::procWolfRollAttackMove, 0x100 },
+ { &daAlink_c::procWolfJumpAttack, 0x2 },
+ { &daAlink_c::procWolfJumpAttackKick, 0x2 },
+ { &daAlink_c::procWolfJumpAttackSlideLand, 0x0 },
+ { &daAlink_c::procWolfJumpAttackNormalLand, 0x0 },
+ { &daAlink_c::procWolfWaitAttack, 0x0 },
+ { &daAlink_c::procWolfRollAttack, 0x0 },
+ { &daAlink_c::procWolfDownAttack, 0x22 },
+ { &daAlink_c::procWolfDownAtLand, 0x8002021 },
+ { &daAlink_c::procWolfDownAtMissLand, 0x0 },
+ { &daAlink_c::procWolfLockAttack, 0x2002 },
+ { &daAlink_c::procWolfLockAttackTurn, 0x0 },
+ { &daAlink_c::procWolfSwimUp, 0x40000 },
+ { &daAlink_c::procWolfSwimWait, 0x40101 },
+ { &daAlink_c::procWolfSwimMove, 0x40100 },
+ { &daAlink_c::procWolfSwimEndWait, 0x1001 },
+ { &daAlink_c::procWolfGrabUp, 0x100001 },
+ { &daAlink_c::procWolfGrabPut, 0x100001 },
+ { &daAlink_c::procWolfGrabThrow, 0x100001 },
+ { &daAlink_c::procWolfChainUp, 0x1 },
+ { &daAlink_c::procWolfPush, 0x20 },
+ { &daAlink_c::procWolfChainReady, 0x20000 },
+ { &daAlink_c::procWolfChainWait, 0x10020000 },
+ { &daAlink_c::procWolfDig, 0xa020 },
+ { &daAlink_c::procWolfDigThrough, 0xe000 },
+ { &daAlink_c::procWolfAttackReverse, 0x2 },
+ { &daAlink_c::procWolfEnemyThrow, 0x0 },
+ { &daAlink_c::procWolfEnemyHangBite, 0xe002 },
+ { &daAlink_c::procWolfGiantPuzzle, 0x100 },
+ { &daAlink_c::procWolfCargoCarry, 0x400e022 },
+ { &daAlink_c::procWolfGetSmell, 0xe021 },
+ { &daAlink_c::procDemoCommon, 0x1 },
+ { &daAlink_c::procWolfSnowEscape, 0xa000 },
+ { &daAlink_c::procWolfGanonCatch, 0x4002021 },
+ { &daAlink_c::procCoToolDemo, 0x8000 },
+ { &daAlink_c::procCoSubjectivity, 0x20001005 },
+ { &daAlink_c::procCoSwimSubjectivity, 0x20041001 },
+ { &daAlink_c::procCoPeepSubjectivity, 0x2000200b },
+ { &daAlink_c::procCoPolyDamage, 0x9 },
+ { &daAlink_c::procCoElecDamage, 0x9 },
+ { &daAlink_c::procCoPushPullWait, 0x202001 },
+ { &daAlink_c::procCoPushMove, 0x202000 },
+ { &daAlink_c::procCoTalk, 0x80101 },
+ { &daAlink_c::procCoOpenTreasure, 0xe001 },
+ { &daAlink_c::procCoUnequip, 0x1 },
+ { &daAlink_c::procCoGetItem, 0x800e001 },
+ { &daAlink_c::procCoTurnBack, 0x1 },
+ { &daAlink_c::procCoLookWait, 0x1101 },
+ { &daAlink_c::procDemoCommon, 0x200001 },
+ { &daAlink_c::procDemoCommon, 0x200000 },
+ { &daAlink_c::procCoMetamorphose, 0x8001 },
+ { &daAlink_c::procCoMetamorphoseOnly, 0x6001 },
+ { &daAlink_c::procCoWarp, 0x1 },
+ { &daAlink_c::procCoDead, 0xa009 },
+ { &daAlink_c::procCoFogDead, 0xa009 },
+ { &daAlink_c::procCoLookAround, 0x0 },
+ { &daAlink_c::procDemoCommon, 0xe000 },
+ { &daAlink_c::procCoSandWallHit, 0xa },
+ { &daAlink_c::procCoLavaReturn, 0x42009 },
+ { &daAlink_c::procCoSwimFreezeReturn, 0x42009 },
+ { &daAlink_c::procCoGetReadySit, 0xa001 },
+ { &daAlink_c::procCoTwGate, 0xe002 },
+ { &daAlink_c::procCoLargeDamage, 0xa },
+ { &daAlink_c::procCoLargeDamageWall, 0xa },
+ { &daAlink_c::procCoNod, 0x80001 },
+ { &daAlink_c::procDemoCommon, 0x80001 },
+ { &daAlink_c::procCoGlare, 0x80001 },
+ { &daAlink_c::procCoHorseCallWait, 0x1 },
+ { &daAlink_c::procDemoCommon, 0x1 },
+};
-#include "d/actor/d_a_alink_bomb.inc"
+daAlink_procFunc daAlink_c::m_demoInitTable[] = {
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ &daAlink_c::commonWaitTurnInit,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ &daAlink_c::procCoOpenTreasureInit,
+ &daAlink_c::procCoGetItemInit,
+ &daAlink_c::procCoUnequipInit,
+ &daAlink_c::commonGrabPutInit,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ &daAlink_c::procMonkeyMoveInit,
+ &daAlink_c::procCoLookAroundInit,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ &daAlink_c::procCoTurnBackInit,
+ NULL,
+ NULL,
+ &daAlink_c::procDemoBoomerangCatchInit,
+ &daAlink_c::procHawkCatchInit,
+ &daAlink_c::procSwordUnequipSpInit,
+ NULL,
+ &daAlink_c::procCoDemoPushPullWaitInit,
+ &daAlink_c::procCoDemoPushMoveInit,
+ &daAlink_c::procBossAtnWaitInit,
+ &daAlink_c::procDoorOpenInit,
+ NULL,
+ &daAlink_c::procTradeItemOutInit,
+ NULL,
+ &daAlink_c::procKandelaarSwingInit,
+ &daAlink_c::procFrontRollInit,
+ &daAlink_c::procCrouchInit,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ &daAlink_c::procCoCaughtInit,
+ &daAlink_c::procLookUpInit,
+ &daAlink_c::procLookUpToGetItemInit,
+ &daAlink_c::procHandPatInit,
+ &daAlink_c::procWolfMidnaRideShockInit,
+ &daAlink_c::procSumouShikoInit,
+ &daAlink_c::procCoFogDeadInit,
+ &daAlink_c::procWolfSmellWaitInit,
+ NULL,
+ NULL,
+ &daAlink_c::procWolfCargoCarryInit,
+ &daAlink_c::procCoMetamorphoseInit,
+ &daAlink_c::procCoMetamorphoseInit,
+ &daAlink_c::procHorseGetKeyInit,
+ &daAlink_c::procCoNodInit,
+ &daAlink_c::procCoGlareInit,
+ &daAlink_c::procCoEyeAwayInit,
+ &daAlink_c::procGoatStopReadyInit,
+ &daAlink_c::procCoGetReadySitInit,
+ NULL,
+ &daAlink_c::procCoTwGateInit,
+ &daAlink_c::procFmChainStrongPullInit,
+ &daAlink_c::procWolfSnowEscapeInit,
+ &daAlink_c::procZoraMoveInit,
+ &daAlink_c::procCoMetamorphoseOnlyInit,
+ &daAlink_c::procCoMetamorphoseOnlyInit,
+ &daAlink_c::procLookAroundTurnInit,
+ NULL,
+ &daAlink_c::procCoQuakeWaitInit,
+ &daAlink_c::procGuardAttackInit,
+ &daAlink_c::procSwordReadyInit,
+ &daAlink_c::procDungeonWarpInit,
+ &daAlink_c::procDungeonWarpSceneStartInit,
+ &daAlink_c::procMasterSwordStickInit,
+ &daAlink_c::procMasterSwordPullInit,
+ &daAlink_c::procCutDownInit,
+ NULL,
+ &daAlink_c::procCutHeadInit,
+ NULL,
+ NULL,
+ &daAlink_c::procCutLargeJumpInit,
+ &daAlink_c::procCutFastReadyInit,
+ &daAlink_c::procCopyRodReviveInit,
+ &daAlink_c::procSwordPushInit,
+ &daAlink_c::procGanonFinishInit,
+ NULL,
+ NULL,
+ &daAlink_c::procHorseLookDownInit,
+ NULL,
+};
static f32 l_autoUpHeight = 30.010000228881836f;
static f32 l_autoDownHeight = -30.010000228881836f;
-#include "d/actor/d_a_alink_grab.inc"
-
-#include "d/actor/d_a_alink_sumou.inc"
-
-#include "d/actor/d_a_alink_horse.inc"
-
-#include "d/actor/d_a_alink_canoe.inc"
-
-#include "d/actor/d_a_alink_crawl.inc"
-
static f32 l_ladderAnmBaseTransY = 102.00054168701172f;
-#include "d/actor/d_a_alink_hang.inc"
-
-#include "d/actor/d_a_alink_swim.inc"
-
-#include "d/actor/d_a_alink_iceleaf.inc"
-
-#include "d/actor/d_a_alink_hook.inc"
-
-#include "d/actor/d_a_alink_spinner.inc"
-
-#include "d/actor/d_a_alink_bottle.inc"
-
-#include "d/actor/d_a_alink_kandelaar.inc"
-
-#include "d/actor/d_a_alink_whistle.inc"
-
static dCcD_SrcCyl l_cylSrc = {
{
- {0, {{AT_TYPE_WOLF_ATTACK, 3, 0x1A}, {0xD8FFFDFF, 5}, 0x73}},
+ {0, {{AT_TYPE_WOLF_ATTACK, 3, 0x1A}, {(s32)0xD8FFFDFF, 5}, 0x73}},
{dCcD_SE_WOLF_BITE, 3, 1, 0, {1}},
{dCcD_SE_NONE, 6, 0, 0, {0}},
{0},
@@ -1522,7 +1482,7 @@ static dCcD_SrcCyl l_cylSrc = {
static dCcD_SrcSph l_sphSrc = {
{
- {0, {{AT_TYPE_NORMAL_SWORD, 3, 0x1A}, {0xD8FBFDFF, 5}, 0x73}},
+ {0, {{AT_TYPE_NORMAL_SWORD, 3, 0x1A}, {(s32)0xD8FBFDFF, 5}, 0x73}},
{dCcD_SE_SWORD, 3, 1, 0, {1}},
{dCcD_SE_NONE, 6, 0, 0, {0}},
{0},
@@ -1940,6 +1900,50 @@ static dJntColData_c l_wolfJntColData[] = {
},
};
+#include "d/actor/d_a_alink_link.inc"
+
+#include "d/actor/d_a_alink_cut.inc"
+
+#include "d/actor/d_a_alink_damage.inc"
+
+#include "d/actor/d_a_alink_guard.inc"
+
+#include "d/actor/d_a_alink_bow.inc"
+
+#include "d/actor/d_a_alink_boom.inc"
+
+#include "d/actor/d_a_alink_copyrod.inc"
+
+#include "d/actor/d_a_alink_hvyboots.inc"
+
+#include "d/actor/d_a_alink_bomb.inc"
+
+#include "d/actor/d_a_alink_grab.inc"
+
+#include "d/actor/d_a_alink_sumou.inc"
+
+#include "d/actor/d_a_alink_horse.inc"
+
+#include "d/actor/d_a_alink_canoe.inc"
+
+#include "d/actor/d_a_alink_crawl.inc"
+
+#include "d/actor/d_a_alink_hang.inc"
+
+#include "d/actor/d_a_alink_swim.inc"
+
+#include "d/actor/d_a_alink_iceleaf.inc"
+
+#include "d/actor/d_a_alink_hook.inc"
+
+#include "d/actor/d_a_alink_spinner.inc"
+
+#include "d/actor/d_a_alink_bottle.inc"
+
+#include "d/actor/d_a_alink_kandelaar.inc"
+
+#include "d/actor/d_a_alink_whistle.inc"
+
#include "d/actor/d_a_alink_ironball.inc"
#include "d/actor/d_a_alink_demo.inc"
@@ -2012,24 +2016,24 @@ void daAlink_matAnm_c::calc(J3DMaterial* i_material) const {
if (!daAlink_getAlinkActorClass()->checkStatusWindowDraw()) {
for (u32 i = 0; i < 8; i++) {
if (getTexMtxAnm(i).getAnmFlag()) {
- J3DTexMtxInfo* info = &i_material->getTexGenBlock()->getTexMtx(i)->getTexMtxInfo();
+ J3DTextureSRTInfo* srt = &i_material->getTexGenBlock()->getTexMtx(i)->getTexMtxInfo().mSRT;
if (m_morf_frame != 0) {
if (!mSetFlag) {
f32 var_f31 = 1.0f / (m_morf_frame + 1);
- info->mSRT.mTranslationX = field_0xf4 * (1.0f - var_f31) + info->mSRT.mTranslationX * var_f31;
- info->mSRT.mTranslationY = field_0xf8 * (1.0f - var_f31) + info->mSRT.mTranslationY * var_f31;
+ srt->mTranslationX = field_0xf4 * (1.0f - var_f31) + srt->mTranslationX * var_f31;
+ srt->mTranslationY = field_0xf8 * (1.0f - var_f31) + srt->mTranslationY * var_f31;
mSetFlag = 1;
} else {
- info->mSRT.mTranslationX = field_0xf4;
- info->mSRT.mTranslationY = field_0xf8;
+ srt->mTranslationX = field_0xf4;
+ srt->mTranslationY = field_0xf8;
}
} else if (m_eye_move_flg) {
- info->mSRT.mTranslationX = mNowOffsetX;
- info->mSRT.mTranslationY = mNowOffsetY;
+ srt->mTranslationX = mNowOffsetX;
+ srt->mTranslationY = mNowOffsetY;
}
- field_0xf4 = info->mSRT.mTranslationX;
- field_0xf8 = info->mSRT.mTranslationY;
+ field_0xf4 = srt->mTranslationX;
+ field_0xf8 = srt->mTranslationY;
}
}
}
@@ -2433,7 +2437,8 @@ bool daAlink_c::modelCallBack(int i_jointNo) {
}
static int daAlink_modelCallBack(J3DJoint* i_joint, int param_1) {
- int jntNo = i_joint->getJntNo();
+ J3DJoint* joint = i_joint;
+ int jntNo = joint->getJntNo();
daAlink_c* i_this = (daAlink_c*)j3dSys.getModel()->getUserArea();
if (param_1 == 0) {
@@ -2491,7 +2496,8 @@ int daAlink_c::headModelCallBack(int i_jointNo) {
}
static int daAlink_headModelCallBack(J3DJoint* i_joint, int param_1) {
- int joint_no = i_joint->getJntNo();
+ J3DJoint* joint = i_joint;
+ int joint_no = joint->getJntNo();
daAlink_c* i_this = (daAlink_c*)j3dSys.getModel()->getUserArea();
if (param_1 == 0) {
@@ -2514,7 +2520,8 @@ int daAlink_c::wolfModelCallBack(int i_jointNo) {
}
static int daAlink_wolfModelCallBack(J3DJoint* i_joint, int param_1) {
- int joint_no = i_joint->getJntNo();
+ J3DJoint* joint = i_joint;
+ int joint_no = joint->getJntNo();
daAlink_c* i_this = (daAlink_c*)j3dSys.getModel()->getUserArea();
if (param_1 == 0) {
@@ -2538,6 +2545,9 @@ void daAlink_c::setHatAngle() {
cXyz sp9C;
cXyz sp90;
+ f32 sp40;
+ f32 sp3C;
+
int sp38;
if (checkNoResetFlg2(daPy_FLG2(FLG2_UNK_100000 | FLG2_UNK_80000))) {
sp38 = 0;
@@ -2546,6 +2556,7 @@ void daAlink_c::setHatAngle() {
}
mDoMtx_multVecZero(mpLinkHatModel->getAnmMtx(sp38), &spA8);
+ sp3C = field_0x34e0.y - mpLinkHatModel->getAnmMtx(0)[1][3];
BOOL sp34;
if (!checkEndResetFlg1(ERFLG1_UNK_80000)
@@ -2556,7 +2567,6 @@ void daAlink_c::setHatAngle() {
sp34 = FALSE;
}
- f32 sp40;
dKyw_get_AllWind_vec(&spA8, &spB4, &sp40);
if (checkModeFlg(0x40000) || checkEndResetFlg1(ERFLG1_UNK_80000)) {
@@ -2569,6 +2579,8 @@ void daAlink_c::setHatAngle() {
f32 var_f28;
f32 temp_f26 = 25.0f * (sp40 * sp40);
+ s16 sp18;
+ s16 sp16;
s16 sp14 = field_0x3060;
s16 sp12 = field_0x3062;
cXyz sp84 = eyePos - field_0x34e0;
@@ -2578,10 +2590,12 @@ void daAlink_c::setHatAngle() {
mDoMtx_multVecZero(mpLinkHatModel->getAnmMtx(0), &sp90);
sp90 = field_0x34e0 - sp90;
mDoMtx_multVecSR(mMagneBootInvMtx, &sp90, &sp90);
+ sp3C = sp90.y;
}
field_0x3062 = sp84.atan2sX_Z();
+ s16 sp10;
s16 spE;
if (mProcID == PROC_GOAT_CATCH) {
mDoMtx_multVecSR(mpLinkModel->getAnmMtx(1), &cXyz::BaseY, &sp90);
@@ -2601,14 +2615,14 @@ void daAlink_c::setHatAngle() {
field_0x3060 = sp84.atan2sY_XZ();
}
- f32 temp_f1 = sp84.absXZ();
- if (temp_f1 < 0.01f) {
+ f32 var_f31 = sp84.absXZ();
+ if (var_f31 < 0.01f) {
var_f29 = cM_ssin(spE);
var_f28 = cM_scos(spE);
} else {
- f32 temp_f31 = 1.0f / temp_f1;
- var_f29 = sp84.x * temp_f31;
- var_f28 = sp84.z * temp_f31;
+ var_f31 = 1.0f / var_f31;
+ var_f29 = sp84.x * var_f31;
+ var_f28 = sp84.z * var_f31;
}
s16 spC;
@@ -2653,11 +2667,11 @@ void daAlink_c::setHatAngle() {
}
if (fabsf(sp9C.x) < 0.01f) {
- sp9C.x = (f32) 0.0f;
+ sp9C.x = 0.0f;
}
if (fabsf(sp9C.z) < 0.01f) {
- sp9C.z = (f32) 0.0f;
+ sp9C.z = 0.0f;
}
if (checkMagneBootsOn()) {
@@ -2672,9 +2686,6 @@ void daAlink_c::setHatAngle() {
mDoMtx_stack_c::multVecSR(&cXyz::BaseY, &sp78);
mDoMtx_stack_c::multVec(&cXyz::BaseX, &sp6C);
- s16 sp18;
- s16 sp16;
-
int sp30;
if (sp6C.y < mDoMtx_stack_c::get()[1][3] && !checkUnderMove0BckNoArc(ANM_DIE)) {
sp30 = cM_atan2s(-sp78.y, -sp78.absXZ());
@@ -2693,7 +2704,7 @@ void daAlink_c::setHatAngle() {
sp16 = *temp_r28;
f32 temp_f27 = (sp9C.z * var_f28) + (sp9C.x * var_f29);
- s16 sp10 = cM_atan2s(sp9C.y, -temp_f27);
+ sp10 = cM_atan2s(sp9C.y, -temp_f27);
int sp24 = cLib_minMaxLimit<int>(sp10 - field_0x3060, -0x3800, 0x3800);
sp10 = (sp24 + field_0x3060);
@@ -2728,9 +2739,10 @@ void daAlink_c::setHatAngle() {
sp2C++;
sp28++;
- for (int i = 1; i < 3; i++, temp_r29++, temp_r28++, sp2C++, sp28++) {
- temp_r29[0] -= ((s16)(temp_r29[-1] - sp18) >> 1);
- temp_r28[0] -= ((s16)(temp_r28[-1] - sp16) >> 1);
+ int i;
+ for (i = 1; i < 3; i++, temp_r29++, temp_r28++, sp2C++, sp28++) {
+ ANGLE_SUB_2(temp_r29[0], ((s16)(temp_r29[-1] - sp18) >> 1));
+ ANGLE_SUB_2(temp_r28[0], ((s16)(temp_r28[-1] - sp16) >> 1));
sp18 = temp_r29[0];
sp16 = temp_r28[0];
@@ -2746,7 +2758,7 @@ void daAlink_c::setHatAngle() {
sp10 += temp_r29[0];
if (sp10 < sp30) {
- temp_r29[0] += (sp30 - sp10);
+ ANGLE_ADD_2(temp_r29[0], sp30 - sp10);
sp10 = sp30;
}
@@ -2770,7 +2782,7 @@ void daAlink_c::setHatAngle() {
s16 sp8 = 1500.0f + (4060.0f * var_f30);
field_0x3064 += sp8;
- for (int i = 0; i < 3; i++) {
+ for (i = 0; i < 3; i++) {
field_0x3066[i] = var_f25 * cM_deg2s(((i + 1) * 4)) * cM_scos((field_0x3064 - ((i + 3) * sp8)));
}
@@ -2788,6 +2800,8 @@ void daAlink_c::setHairAngle(cXyz* param_0, f32 param_1, f32 param_2) {
f32 temp_f27 = param_0->absXZ();
if (var_f31 < 1.0f || temp_f27 < 1.0f) {
+ int dummy; // force stack pointer into r31 for debug
+
calcHairAngle(&field_0x302c[1]);
calcHairAngle(&field_0x3040[1]);
calcHairAngle(&field_0x302c[2]);
@@ -2904,6 +2918,7 @@ bool daAlink_c::checkActorPosAngle(fopAc_ac_c* i_actor, cXyz** o_ppos) {
}
cXyz* daAlink_c::getNeckAimPos(cXyz* param_0, int* param_1, int param_2) {
+ cXyz* sp1C;
fopAc_ac_c* look_actor = NULL;
s16 spA = field_0x311c;
field_0x311c = 0;
@@ -2970,7 +2985,7 @@ cXyz* daAlink_c::getNeckAimPos(cXyz* param_0, int* param_1, int param_2) {
field_0x28fc = fopAcM_GetID(lock_actor);
}
} else {
- field_0x30f8 -= 1;
+ field_0x30f8--;
}
}
} else {
@@ -2984,7 +2999,6 @@ cXyz* daAlink_c::getNeckAimPos(cXyz* param_0, int* param_1, int param_2) {
look_actor = dCam_getBody()->GetForceLockOnActor();
}
- cXyz* sp1C;
if (checkActorPosAngle(look_actor, &sp1C)) {
return sp1C;
}
@@ -3293,7 +3307,7 @@ void daAlink_c::setEyeMove(cXyz* param_0, s16 param_1, s16 param_2) {
var_f31 = 0.0f;
} else if (!checkEventRun() && checkModeFlg(1) && checkNoResetFlg1(FLG1_UNK_2000) && (checkNoUpperAnime() || checkGrabAnime()) && (mProcID == PROC_WAIT || mProcID == PROC_GRAB_WAIT || mProcID == PROC_CROUCH || mProcID == PROC_HORSE_WAIT || mProcID == PROC_WOLF_WAIT)) {
if (temp_r28 != 0) {
- field_0x2fa7 = temp_r28 - 1;
+ field_0x2fa7 = --temp_r28;
field_0x3418 = sp18;
field_0x341c = sp14;
} else if (0.0f != sp18 || 0.0f != sp14) {
@@ -3487,12 +3501,12 @@ void daAlink_c::setMoveSlantAngle() {
if (mProcID == PROC_WOLF_SWIM_MOVE) {
if (var_r29 >= 0) {
- var_r29 -= 0x100;
+ ANGLE_SUB_2(var_r29, 0x100);
if (var_r29 < 0) {
var_r29 = 0;
}
} else {
- var_r29 += 0x100;
+ ANGLE_ADD_2(var_r29, 0x100);
if (var_r29 > 0) {
var_r29 = 0;
}
@@ -3500,7 +3514,7 @@ void daAlink_c::setMoveSlantAngle() {
}
var_r29 = cLib_minMaxLimit<s16>((s16)var_r29, -0x300, 0x300);
- var_r29 *= 8;
+ var_r29 <<= 3;
} else {
var_r28 = 0;
var_r29 = 0;
@@ -3516,13 +3530,13 @@ void daAlink_c::setMoveSlantAngle() {
cLib_addCalcAngleS(&field_0x2fec, var_r29, 4, 1200, 200);
}
} else if (mProcID != PROC_CAUGHT) {
- shape_angle.z = (field_0x2fee >> 1);
- mBodyAngle.z = shape_angle.z;
+ shape_angle.z = field_0x2fee >> 1;
+ mBodyAngle.z = (s16)shape_angle.z;
if (mProcID == PROC_MOVE || mProcID == PROC_WAIT) {
var_r29 = (s16)(shape_angle.y - mPrevAngleY) * 2;
if (mProcID == PROC_WAIT) {
- var_r29 *= 2;
+ var_r29 <<= 1;
}
var_r29 = cLib_minMaxLimit<s16>((s16)var_r29, -0xC00, 0xC00);
@@ -3536,9 +3550,9 @@ void daAlink_c::setMoveSlantAngle() {
}
int daAlink_c::setArmMatrix() {
+ static const u16 armJointTable[] = {0x0007,0x000C};
static Vec const arm1Vec = {29.0f, 0.0f, 0.0f};
static Vec const arm2Vec = {26.5f, 0.0f, 0.0f};
- static const u16 armJointTable[] = {0x0007,0x000C};
daAlink_footData_c* var_r29 = mFootData2;
@@ -3602,16 +3616,17 @@ int daAlink_c::setArmMatrix() {
}
int daAlink_c::setFootMatrix() {
+ static const u16 footJointTable[] = {0x0012, 0x0017};
static Vec const leg1Vec = {30.0f, 0.0f, 0.0f};
static Vec const leg2Vec = {39.363499f, 0.0f, 0.0f};
static Vec const footVec = {14.18f, 0.0f, 0.0f};
- static const u16 footJointTable[] = {0x0012, 0x0017};
daAlink_footData_c* var_r30 = mFootData1;
int i;
+ int j;
for (i = 0; i < 2; i++, var_r30++) {
- for (int j = 0; j < 3; j++) {
+ for (j = 0; j < 3; j++) {
cMtx_copy(mpLinkModel->getAnmMtx(j + footJointTable[i]), var_r30->field_0x14[j]);
}
@@ -3627,14 +3642,15 @@ int daAlink_c::setFootMatrix() {
if (mProcID == PROC_HORSE_GETOFF) {
current.angle.y = shape_angle.y;
if (field_0x2fc0 == 0) {
- shape_angle.y -= 0x4000;
+ ANGLE_SUB_2(shape_angle.y, 0x4000);
} else {
- shape_angle.y += 0x4000;
+ ANGLE_ADD_2(shape_angle.y, 0x4000);
}
}
+ u16 temp_r29;
for (i = 0; i < 2; i++, var_r30++) {
- u16 temp_r29 = footJointTable[i];
+ temp_r29 = footJointTable[i];
setMatrixWorldAxisRot(mpLinkModel->getAnmMtx(temp_r29), var_r30->field_0x6, 0, 0, 0, NULL);
mDoMtx_stack_c::multVec(&leg1Vec, &sp10);
@@ -3645,8 +3661,8 @@ int daAlink_c::setFootMatrix() {
temp_r29++;
setMatrixWorldAxisRot(mpLinkModel->getAnmMtx(temp_r29), var_r30->field_0x2, 0, 0, 0, &sp10);
- temp_r29++;
mDoMtx_stack_c::multVec(&footVec, &sp10);
+ temp_r29++;
setMatrixWorldAxisRot(mpLinkModel->getAnmMtx(temp_r29), var_r30->field_0x2, 0, 0, 0, &sp10);
}
@@ -3741,22 +3757,23 @@ int daAlink_c::setLegAngle(f32 param_0, daAlink_footData_c* param_1, s16* param_
}
cXyz sp50 = sp5C - spA4;
- f32 temp_f1 = sp50.abs2();
- if (cM3d_IsZero(temp_f1)) {
+ f32 var_f31 = sp50.abs2();
+ if (cM3d_IsZero(var_f31)) {
return 0;
}
- f32 temp_f28 = sp74.abs2();
- f32 temp_f26 = sp68.abs2();
+ f32 var_f29;
+ f32 var_f28 = sp74.abs2();
+ f32 var_f26 = sp68.abs2();
- if (JMAFastSqrt(temp_f28) + JMAFastSqrt(temp_f26) <= JMAFastSqrt(temp_f1)) {
+ if (JMAFastSqrt(var_f28) + JMAFastSqrt(var_f26) <= JMAFastSqrt(var_f31)) {
return 0;
}
- f32 temp_f27 = ((temp_f1 + temp_f28) - temp_f26) / (2.0f * temp_f1);
- cXyz sp44 = spA4 + (sp50 * temp_f27);
+ f32 var_f27 = ((var_f31 + var_f28) - var_f26) / (2.0f * var_f31);
+ cXyz sp44 = spA4 + (sp50 * var_f27);
- f32 var_f30 = temp_f28 - (temp_f27 * (temp_f1 * temp_f27));
+ f32 var_f30 = var_f28 - (var_f27 * (var_f31 * var_f27));
if (var_f30 < 0.0f) {
var_f30 = 0.0f;
}
@@ -3774,20 +3791,24 @@ int daAlink_c::setLegAngle(f32 param_0, daAlink_footData_c* param_1, s16* param_
sp80.set(-sp50.y, sp50.x, 0.0f);
}
- f32 temp_f1_2 = sp80.abs();
- if (cM3d_IsZero(temp_f1_2)) {
+ var_f29 = sp80.abs();
+ if (cM3d_IsZero(var_f29)) {
return 0;
}
- cXyz sp38 = sp44 + (sp80 * (var_f30 / temp_f1_2));
+ var_f29 = var_f30 / var_f29;
+ cXyz sp38 = sp44 + (sp80 * var_f29);
cXyz sp2C = sp38 - spA4;
cXyz sp20 = sp5C - sp38;
+ s16 temp_r30;
+ s16 var_r29;
+ s16 temp_r0;
if (param_4 != 0) {
- s16 temp_r30 = cM_atan2s(sp2C.y, sp2C.z);
- s16 var_r29 = cM_atan2s(sp20.y, sp20.z);
- s16 temp_r0 = var_r29 - temp_r30;
+ temp_r30 = cM_atan2s(sp2C.y, sp2C.z);
+ var_r29 = cM_atan2s(sp20.y, sp20.z);
+ temp_r0 = var_r29 - temp_r30;
if (checkWolf()) {
if (temp_r0 < 0) {
@@ -3804,11 +3825,11 @@ int daAlink_c::setLegAngle(f32 param_0, daAlink_footData_c* param_1, s16* param_
*param_2 = cM_atan2s(sp74.y, sp74.z) - temp_r30;
*param_3 = cM_atan2s(sp68.y, sp68.z) - var_r29;
} else {
- s16 temp_r30_2 = cM_atan2s(sp2C.x, sp2C.y);
- s16 temp_r29 = cM_atan2s(sp20.x, sp20.y);
+ temp_r30 = cM_atan2s(sp2C.x, sp2C.y);
+ var_r29 = cM_atan2s(sp20.x, sp20.y);
- *param_2 = cM_atan2s(sp74.x, sp74.y) - temp_r30_2;
- *param_3 = cM_atan2s(sp68.x, sp68.y) - temp_r29;
+ *param_2 = cM_atan2s(sp74.x, sp74.y) - temp_r30;
+ *param_3 = cM_atan2s(sp68.x, sp68.y) - var_r29;
}
return 1;
@@ -4049,6 +4070,7 @@ JKRHeap* daAlink_c::setItemHeap() {
* The latter 3 digits are the resource ID
*/
void daAlink_c::setIdxMask(u16* o_arcNo, u16* o_resIdx) {
+ UNUSED(o_resIdx);
if (*o_arcNo == 0xFFFF) {
u16 arc_id = (*o_resIdx >> 12) & 0xF;
*o_resIdx &= 0xFFF;
@@ -4513,16 +4535,16 @@ void daAlink_c::playerInit() {
m_nSwordBtk->searchUpdateMaterialID(modelData);
modelData->entryTexMtxAnimator(m_nSwordBtk);
- J3DModelData* modelData2 = mpSwMModel->getModelData();
+ modelData = mpSwMModel->getModelData();
m_mSwordBtk = (J3DAnmTextureSRTKey*)dComIfG_getObjectRes(l_arcName, dRes_ID_ALINK_BTK_AL_SWM_e);
JUT_ASSERT(4767, m_mSwordBtk);
- m_mSwordBtk->searchUpdateMaterialID(modelData2);
- modelData2->entryTexMtxAnimator(m_mSwordBtk);
+ m_mSwordBtk->searchUpdateMaterialID(modelData);
+ modelData->entryTexMtxAnimator(m_mSwordBtk);
m_mSwordBrk = (J3DAnmTevRegKey*)dComIfG_getObjectRes(l_arcName, dRes_ID_ALINK_BRK_AL_SWM_e);
JUT_ASSERT(4774, m_mSwordBrk != NULL);
- m_mSwordBrk->searchUpdateMaterialID(modelData2);
- modelData2->entryTevRegAnimator(m_mSwordBrk);
+ m_mSwordBrk->searchUpdateMaterialID(modelData);
+ modelData->entryTevRegAnimator(m_mSwordBrk);
mWaterY = -G_CM3D_F_INF;
field_0x33b8 = -G_CM3D_F_INF;
@@ -4585,8 +4607,9 @@ void daAlink_c::playerInit() {
field_0x2f96 = -1;
field_0x2f97 = -1;
- for (int i = 0; i < 16; i++) {
- mShieldArrowIDs[i] = fpcM_ERROR_PROCESS_ID_e;
+ int i2;
+ for (i2 = 0; i2 < 16; i2++) {
+ mShieldArrowIDs[i2] = fpcM_ERROR_PROCESS_ID_e;
}
mAtnActorID = fpcM_ERROR_PROCESS_ID_e;
@@ -4616,6 +4639,10 @@ void daAlink_c::playerInit() {
}
}
+void dummy(fopAc_ac_c* i_this) {
+ fopAcM_RegisterCreateID(i_this, "ALINK");
+}
+
BOOL daAlink_c::checkHorseStart(u32 i_lastMode, int i_startMode) {
return i_lastMode == 1 || i_startMode == 2 || i_lastMode == 8;
}
@@ -4785,7 +4812,7 @@ int daAlink_c::setStartProcInit() {
mMoveAngle = shape_angle.y;
if (last_mode == 3) {
- shape_angle.y += 0x8000;
+ ANGLE_ADD_2(shape_angle.y, 0x8000);
current.angle.y = shape_angle.y;
mPrevAngleY = shape_angle.y;
}
@@ -5493,6 +5520,7 @@ void daAlink_c::setBodyPartPos() {
static Vec const boardLocalEyeFromRoot = {9.5f, 47.0f, 24.5f};
static Vec const horseLocalEyeFromRoot = {1.75f, 55.0f, 25.5f};
static Vec const canoeLocalEyeFromRoot = {0.0f, 55.0f, 25.0f};
+ static Vec const wlLocalEyeFromRoot = {0.0f, -6.0f, 85.5f};
if (checkWolf()) {
cMtx_multVec(mpLinkModel->getAnmMtx(4), &wlLocalEye, &eyePos);
@@ -5570,7 +5598,6 @@ int daAlink_c::setRollJump(f32 i_speedH, f32 i_speedV, s16 i_angle) {
}
void daAlink_c::setAttentionPos() {
- static Vec const wlLocalEyeFromRoot = {0.0f, -6.0f, 85.5f};
static Vec const normalOffset = {0.0f, 150.0f, 0.0f};
static Vec const crawlOffset = {0.0f, 40.0f, 30.0f};
static Vec const crouchOffset = {0.0f, 95.0f, 0.0f};
@@ -6228,6 +6255,8 @@ void daAlink_c::setWolfAtCollision() {
mTgCyls[i].OnAtSetBit();
}
}
+
+ (void)0;
} else {
mAtCyl.MoveCAt(sp8);
}
@@ -6608,7 +6637,8 @@ void daAlink_c::cancelLockAt() {
void daAlink_c::setCollisionPos() {
cXyz sp74;
mDoMtx_multVecZero(mpLinkModel->getAnmMtx(0), &sp74);
- cXyz sp68 = (sp74 + mHeadTopPos) * 0.5f;
+ cXyz sp68;
+ sp68 = (sp74 + mHeadTopPos) * 0.5f;
f32 var_f31;
if (sp74.y > mHeadTopPos.y) {
@@ -6628,30 +6658,29 @@ void daAlink_c::setCollisionPos() {
mTgCyls[2].SetH(var_f31);
sp68 = (((mLeftFootPos + mRightFootPos) * 0.5f) + sp74) * 0.5f;
- f32 var_f0 = mLeftFootPos.y > mRightFootPos.y ? mRightFootPos.y : mLeftFootPos.y;
+ f32 var_f30 = mLeftFootPos.y > mRightFootPos.y ? mRightFootPos.y : mLeftFootPos.y;
- f32 var_f31_2;
- if (sp74.y > var_f0) {
- sp68.y = var_f0;
- var_f31_2 = sp74.y - var_f0;
+ if (sp74.y > var_f30) {
+ sp68.y = var_f30;
+ var_f31 = sp74.y - var_f30;
} else {
sp68.y = sp74.y;
- var_f31_2 = var_f0 - sp74.y;
+ var_f31 = var_f30 - sp74.y;
}
- if (var_f31_2 < 60.0f) {
- sp68.y -= 0.5f * (60.0f - var_f31_2);
- var_f31_2 = 60.0f;
+ if (var_f31 < 60.0f) {
+ sp68.y -= 0.5f * (60.0f - var_f31);
+ var_f31 = 60.0f;
}
mTgCyls[0].SetC(sp68);
- mTgCyls[0].SetH(var_f31_2);
+ mTgCyls[0].SetH(var_f31);
sp68 = (mTgCyls[0].GetC() + mTgCyls[2].GetC()) * 0.5f;
- f32 temp_f31 = 0.5f * (mTgCyls[0].GetH() + mTgCyls[2].GetH());
+ var_f31 = 0.5f * (mTgCyls[0].GetH() + mTgCyls[2].GetH());
mTgCyls[1].SetC(sp68);
- mTgCyls[1].SetH(temp_f31);
+ mTgCyls[1].SetH(var_f31);
field_0x3454 = field_0x3834.y;
}
@@ -7689,6 +7718,8 @@ void daAlink_c::setBlendMoveAnime(f32 i_morf) {
field_0x2f97 = 6;
}
}
+
+ (void)0;
} else if (var_f31 < mpHIO->mMove.m.mRunChangeRate) {
var_f28 = (var_f31 - mpHIO->mMove.m.mWalkChangeRate) / (mpHIO->mMove.m.mRunChangeRate - mpHIO->mMove.m.mWalkChangeRate);
setDoubleAnime(var_f28, var_f29, sp2C, var_r28, sp18, 1, i_morf);
@@ -8543,8 +8574,8 @@ void daAlink_c::setFrontWallType() {
sp40 = linchk_tri.getSignedLenPos(&current.pos);
field_0x34ec.set(current.pos.x - (sp40 * linchk_tri.mNormal.x), current.pos.y, current.pos.z - (sp40 * linchk_tri.mNormal.z));
- int temp_r3 = dComIfG_Bgsp().GetWallCode(mLinkLinChk);
- if (temp_r3 != 4 && temp_r3 != 5) {
+ wall_code = dComIfG_Bgsp().GetWallCode(mLinkLinChk);
+ if (wall_code != 4 && wall_code != 5) {
line_start_pos.x = current.pos.x;
line_start_pos.z = current.pos.z;
line_end_pos.x = line_start_pos.x - (2.0f * sp40 * linchk_tri.mNormal.x);
@@ -8607,6 +8638,7 @@ void daAlink_c::setFrontWallType() {
field_0x27fc = dComIfG_Bgsp().GetActorPointer(mLinkLinChk);
}
+ f32 sp38;
if (checkNoResetFlg0(daPy_FLG0(FLG0_WATER_IN_MOVE | FLG0_SWIM_UP))) {
if (var_r29 == 6 && !checkModeFlg(0x40002)) {
setDoStatus(BUTTON_STATUS_ENTER);
@@ -8641,7 +8673,7 @@ void daAlink_c::setFrontWallType() {
line_start_pos.set(field_0x34ec.x - (15.0f * linchk_tri.mNormal.x), 150.0f + sp34, field_0x34ec.z - (15.0f * linchk_tri.mNormal.z));
mLinkGndChk.SetPos(&line_start_pos);
- f32 sp38 = dComIfG_Bgsp().GroundCross(&mLinkGndChk);
+ sp38 = dComIfG_Bgsp().GroundCross(&mLinkGndChk);
if (sp38 >= current.pos.y && dBgS_CheckBGroundPoly(mLinkGndChk)) {
cM3dGPla spB8;
@@ -8750,7 +8782,7 @@ void daAlink_c::setFrontWallType() {
line_start_pos.set(field_0x34ec.x - (1.5f * linchk_tri.mNormal.x), body_height + (0.01f + hang_height), field_0x34ec.z - (1.5f * linchk_tri.mNormal.z));
mLinkGndChk.SetPos(&line_start_pos);
- f32 sp38 = dComIfG_Bgsp().GroundCross(&mLinkGndChk);
+ sp38 = dComIfG_Bgsp().GroundCross(&mLinkGndChk);
if (-G_CM3D_F_INF != sp38 && fabsf(sp1C - sp38) < l_autoUpHeight) {
found_gnd_tri = dComIfG_Bgsp().GetTriPla(mLinkGndChk, &gndchk_tri);
@@ -9314,8 +9346,7 @@ void daAlink_c::setStickData() {
mDemo.setMoveAngle(getSceneExitMoveAngle());
if (checkHorseRide()) {
- s16 angle = mDemo.getMoveAngle();
- dComIfGp_getHorseActor()->changeDemoMoveAngle(angle);
+ dComIfGp_getHorseActor()->changeDemoMoveAngle(mDemo.getMoveAngle());
}
} else {
mStickValue = 0.0f;
@@ -9381,47 +9412,47 @@ void daAlink_c::setStickData() {
}
if (mDoCPd_c::getTrigB(PAD_1)) {
- mItemTrigger |= BTN_B;
+ mItemTrigger |= (daAlink_ITEM_BTN)BTN_B;
}
if (mDoCPd_c::getTrigA(PAD_1)) {
- mItemTrigger |= BTN_A;
+ mItemTrigger |= (daAlink_ITEM_BTN)BTN_A;
}
if (mDoCPd_c::getTrigX(PAD_1)) {
- mItemTrigger |= BTN_X;
+ mItemTrigger |= (daAlink_ITEM_BTN)BTN_X;
}
if (mDoCPd_c::getTrigY(PAD_1)) {
- mItemTrigger |= BTN_Y;
+ mItemTrigger |= (daAlink_ITEM_BTN)BTN_Y;
}
if (mDoCPd_c::getTrigZ(PAD_1)) {
- mItemTrigger |= BTN_Z;
+ mItemTrigger |= (daAlink_ITEM_BTN)BTN_Z;
}
if (mDoCPd_c::getTrigL(PAD_1)) {
- mItemTrigger |= BTN_L;
+ mItemTrigger |= (daAlink_ITEM_BTN)BTN_L;
}
if (mDoCPd_c::getTrigLockR(PAD_1)) {
- mItemTrigger |= BTN_R;
+ mItemTrigger |= (daAlink_ITEM_BTN)BTN_R;
}
if (mDoCPd_c::getHoldA(PAD_1)) {
- mItemButton |= BTN_A;
+ mItemButton |= (daAlink_ITEM_BTN)BTN_A;
}
if (mDoCPd_c::getHoldB(PAD_1)) {
- mItemButton |= BTN_B;
+ mItemButton |= (daAlink_ITEM_BTN)BTN_B;
}
if (mDoCPd_c::getHoldX(PAD_1)) {
- mItemButton |= BTN_X;
+ mItemButton |= (daAlink_ITEM_BTN)BTN_X;
}
if (mDoCPd_c::getHoldY(PAD_1)) {
- mItemButton |= BTN_Y;
+ mItemButton |= (daAlink_ITEM_BTN)BTN_Y;
}
if (mDoCPd_c::getHoldZ(PAD_1)) {
- mItemButton |= BTN_Z;
+ mItemButton |= (daAlink_ITEM_BTN)BTN_Z;
}
if (mDoCPd_c::getHoldL(PAD_1)) {
- mItemButton |= BTN_L;
+ mItemButton |= (daAlink_ITEM_BTN)BTN_L;
}
if (mDoCPd_c::getHoldLockR(PAD_1)) {
- mItemButton |= BTN_R;
+ mItemButton |= (daAlink_ITEM_BTN)BTN_R;
}
if (checkHeavyStateOn(TRUE, TRUE) &&
@@ -9682,7 +9713,7 @@ s16 daAlink_c::getShapeAngleYAtnActor() {
}
if (checkWolfShapeReverse()) {
- var_r29 += 0x8000;
+ ANGLE_ADD_2(var_r29, 0x8000);
}
} else {
var_r29 = shape_angle.y;
@@ -9799,8 +9830,9 @@ void daAlink_c::setNormalSpeedF(f32 i_speed, f32 i_deceleration) {
)
{
dBgS_AcchCir* acch_cir = mAcchCir;
+ int i;
if (mLinkAcch.ChkWallHit()) {
- for (int i = 0; i < 3; i++, acch_cir++) {
+ for (i = 0; i < 3; i++, acch_cir++) {
if (acch_cir->ChkWallHit()) {
var_r29 = (current.angle.y + 0x8000) - acch_cir->GetWallAngleY();
break;
@@ -9810,7 +9842,10 @@ void daAlink_c::setNormalSpeedF(f32 i_speed, f32 i_deceleration) {
field_0x30fc = 3;
field_0x30fa = cM_atan2s(field_0x342c, field_0x3430);
var_r29 = (current.angle.y + 0x8000) - field_0x30fa;
- } else if (field_0x30fc == 1 && mGrabItemAcKeep.getActor() != NULL && current.pos.abs2(field_0x3540) < 1.0f && dComIfG_Bgsp().ChkPolySafe(mPolyInfo4)) {
+ } else if (field_0x30fc == 1 &&
+ mGrabItemAcKeep.getActor() != NULL &&
+ current.pos.abs2(field_0x3540) < 1.0f &&
+ dComIfG_Bgsp().ChkPolySafe(mPolyInfo4)) {
field_0x30fc = 3;
}
@@ -9823,16 +9858,16 @@ void daAlink_c::setNormalSpeedF(f32 i_speed, f32 i_deceleration) {
}
if (checkNoResetFlg1(FLG1_UNK_20000000)) {
- s16 temp_r29 = (current.angle.y + 0x8000) - field_0x3092;
+ var_r29 = (current.angle.y + 0x8000) - field_0x3092;
- int temp_r3_2 = abs(temp_r29);
+ int temp_r3_2 = abs(var_r29);
if (temp_r3_2 < 0x4000) {
if (checkModeFlg(0x40000)) {
- max_speed *= 1.0f - (0.8f * cM_scos(temp_r29));
+ max_speed *= 1.0f - (0.8f * cM_scos(var_r29));
} else if (temp_r3_2 < 0x600) {
max_speed = 0.0f;
} else {
- max_speed *= 1.0f - cM_scos(temp_r29);
+ max_speed *= 1.0f - cM_scos(var_r29);
}
if (!checkWolf() && !checkMagneBootsOn()) {
@@ -9891,7 +9926,9 @@ void daAlink_c::setSpeedAndAngleNormal() {
dBgS_AcchCir* acchCir = mAcchCir;
for (int i = 0; i < 3; i++, acchCir++) {
if (acchCir->ChkWallHit()) {
- abs((s16)((current.angle.y + 0x8000) - acchCir->GetWallAngleY()));
+ if (abs((s16)((current.angle.y + 0x8000) - acchCir->GetWallAngleY())) < 0x4000) {
+ var_r26 = true;
+ }
break;
}
}
@@ -9994,34 +10031,34 @@ void daAlink_c::setSpeedAndAngleNormal() {
void daAlink_c::setSpeedAndAngleAtn() {
int var_r29 = field_0x2f98;
+ s16 angleRate;
+ s16 angleMaxStep;
+ s16 angleMinStep;
+
+ f32 speed;
+ f32 acceleration;
+ f32 deceleration;
+
if (checkInputOnR()) {
- s16 temp_r0 = mMoveAngle - shape_angle.y;
- f32 temp_f27 = cM_ssin(temp_r0);
- f32 temp_f29 = cM_scos(temp_r0);
+ s16 var_r24 = mMoveAngle - shape_angle.y;
+ f32 var_f27 = cM_ssin(var_r24);
+ f32 var_f31 = cM_scos(var_r24);
- if (mTargetedActor == NULL && !checkGoatStopGame() && (temp_f29 <= -0.99f || temp_f29 >= 0.99f)) {
- if (temp_f29 <= -0.99f) {
+ if (mTargetedActor == NULL && !checkGoatStopGame() && (var_f31 <= -0.99f || var_f31 >= 0.99f)) {
+ if (var_f31 <= -0.99f) {
var_r29 = 1;
} else {
var_r29 = 0;
}
- } else if (temp_f29 < -0.866f) {
+ } else if (var_f31 < -0.866f) {
var_r29 = 1;
- } else if (temp_f27 > 0.0f) {
+ } else if (var_f27 > 0.0f) {
var_r29 = 2;
- } else if (temp_f27 < 0.0f) {
+ } else if (var_f27 < 0.0f) {
var_r29 = 3;
}
}
- s16 angleRate;
- s16 angleMaxStep;
- s16 angleMinStep;
-
- f32 acceleration;
- f32 deceleration;
- f32 speed;
-
if (mTargetedActor != NULL) {
angleRate = mpHIO->mAtnMove.m.mTurnAngleRate;
angleMaxStep = mpHIO->mAtnMove.m.mMaxTurnAngle;
@@ -10038,7 +10075,7 @@ void daAlink_c::setSpeedAndAngleAtn() {
if (var_r29 == 0) {
if (checkInputOnR()) {
if (getDirectionFromCurrentAngle() == DIR_BACKWARD) {
- current.angle.y += 0x8000;
+ ANGLE_ADD_2(current.angle.y, 0x8000);
mNormalSpeed *= -1.0f;
}
if (checkZeroSpeedF()) {
@@ -10065,7 +10102,7 @@ void daAlink_c::setSpeedAndAngleAtn() {
if (checkInputOnR()) {
if (getDirectionFromCurrentAngle() == DIR_BACKWARD) {
- current.angle.y += 0x8000;
+ ANGLE_ADD_2(current.angle.y, 0x8000);
mNormalSpeed *= -1.0f;
}
@@ -10228,6 +10265,7 @@ void daAlink_c::decideCommonDoStatus() {
} else if (mFastShotTime != 0) {
setDoStatus(BUTTON_STATUS_BACK);
}
+ (void)0;
} else if (checkWolf()) {
if (checkDownAttackState()) {
setDoStatusEmphasys(BUTTON_STATUS_FINISH);
@@ -10270,6 +10308,7 @@ void daAlink_c::decideCommonDoStatus() {
{
setDoStatus(BUTTON_STATUS_NONE);
}
+ (void)0;
} else {
int direction = getDirectionFromShapeAngle();
f32 frontRollRate = getFrontRollRate();
@@ -10369,6 +10408,7 @@ void daAlink_c::decideDoStatus() {
if (field_0x2f91 == 7 || field_0x2f91 == 8 || field_0x2f91 == 6 || field_0x2f91 == 9) {
setDoStatus(BUTTON_STATUS_UNK_32);
}
+ (void)0;
} else {
if (searchFmChainPos()) {
setChainGrabStatus(BUTTON_STATUS_UNK_150);
@@ -11913,7 +11953,12 @@ void daAlink_c::swordUnequip() {
anm_speed = mpHIO->mCut.m.mUnequipAnm.mSpeed;
}
- u16 anm_id = checkReinRide() ? (u16)dRes_ID_ALANM_BCK_WAITHATOHS_e : (u16)dRes_ID_ALANM_BCK_WAITATOS_e;
+ u16 anm_id;
+ if (checkReinRide()) {
+ anm_id = (u16)dRes_ID_ALANM_BCK_WAITHATOHS_e;
+ } else {
+ anm_id = (u16)dRes_ID_ALANM_BCK_WAITATOS_e;
+ }
setUpperAnime(anm_id, UPPER_2, anm_speed, mpHIO->mCut.m.mUnequipAnm.mStartFrame,
mpHIO->mCut.m.mUnequipAnm.mEndFrame,
@@ -12819,6 +12864,7 @@ void daAlink_c::transAnimeProc(cXyz* param_0, f32 param_1, f32 param_2) {
}
void daAlink_c::setFootSpeed() {
+ int i;
cXyz sp18[2];
f32 var_f31;
@@ -12846,12 +12892,12 @@ void daAlink_c::setFootSpeed() {
} else {
var_f31 = 0.0f;
- for (int i = 0; i < 2; i++) {
+ for (i = 0; i < 2; i++) {
sp18[i] = current.pos;
}
}
- for (int i = 0; i < 2; i++) {
+ for (i = 0; i < 2; i++) {
field_0x37b0[i] = sp18[i];
}
@@ -12899,7 +12945,7 @@ void daAlink_c::posMove() {
speedF *= mpHIO->mSwim.m.mFloatUpSwimSpeedRate;
}
- f32 var_f31 = speedF;
+ f32 sp28 = speedF;
speedF *= cM_scos(var_r26);
if (var_r26 < 0 && !checkBoardRide() && !checkModeFlg(MODE_SWIMMING)) {
@@ -12928,20 +12974,20 @@ void daAlink_c::posMove() {
cM3dGPla plane;
dComIfG_Bgsp().GetTriPla(mLinkAcch.m_gnd, &plane);
- f32 temp_f0 = cM_sht2d(cM_atan2s(plane.mNormal.absXZ(), plane.mNormal.y));
+ f32 sp24 = cM_sht2d(cM_atan2s(plane.mNormal.absXZ(), plane.mNormal.y));
- if (temp_f0 >= mpHIO->mSlide.m.mLV2MinibossFloorWeakSlideAngle &&
- temp_f0 <= mpHIO->mSlide.m.mLV2MinibossFloorSlideAngle)
+ if (sp24 >= mpHIO->mSlide.m.mLV2MinibossFloorWeakSlideAngle &&
+ sp24 <= mpHIO->mSlide.m.mLV2MinibossFloorSlideAngle)
{
- temp_f0 = ((temp_f0 - mpHIO->mSlide.m.mLV2MinibossFloorWeakSlideAngle) *
+ f32 sp20 = ((sp24 - mpHIO->mSlide.m.mLV2MinibossFloorWeakSlideAngle) *
mpHIO->mSlide.m.mLV2MinibossFloorWeakSlideSpeed) /
(mpHIO->mSlide.m.mLV2MinibossFloorSlideAngle -
mpHIO->mSlide.m.mLV2MinibossFloorWeakSlideAngle);
plane.mNormal.y = 0.0f;
plane.mNormal.normalizeZP();
- speed.x += temp_f0 * plane.mNormal.x;
- speed.z += temp_f0 * plane.mNormal.z;
+ speed.x += sp20 * plane.mNormal.x;
+ speed.z += sp20 * plane.mNormal.z;
}
}
}
@@ -12971,7 +13017,7 @@ void daAlink_c::posMove() {
}
}
} else if (!checkEquipHeavyBoots() && getZoraSwim()) {
- speed.y = -var_f31 * cM_ssin(var_r26);
+ speed.y = -sp28 * cM_ssin(var_r26);
} else if ((checkBootsOrArmorHeavy() && mProcID != PROC_DEAD) || mProcID == PROC_SWIM_DIVE)
{
speed.y += gravity;
@@ -13026,7 +13072,13 @@ void daAlink_c::posMove() {
}
setIceSlipSpeed();
- var_f31 = current.pos.y;
+ f32 sp1C = current.pos.y;
+
+ f32 sp18;
+ f32 sp14;
+ f32 sp10;
+ f32 sp0C;
+ f32 sp08;
if (!checkModeFlg(0x400) || checkBoardRide()) {
if (checkMagneBootsOn()) {
@@ -13034,7 +13086,7 @@ void daAlink_c::posMove() {
mDoMtx_stack_c::YrotM(current.angle.y);
Vec spFC = {0.0f, 0.0f, 0.0f};
- spFC.z = speedF;
+ sp08 = spFC.z = speedF;
mDoMtx_stack_c::multVecSR(&spFC, &speed);
current.pos += speed;
current.pos.x += field_0x342c;
@@ -13055,7 +13107,7 @@ void daAlink_c::posMove() {
}
if (getSumouMode() && mProcID != PROC_SUMOU_WIN_LOSE) {
- current.pos.y = var_f31 - 1.0f;
+ current.pos.y = sp1C - 1.0f;
speed.y = gravity;
}
@@ -13078,11 +13130,11 @@ void daAlink_c::posMove() {
}
if (mLinkAcch.ChkGroundHit() && dComIfG_Bgsp().ChkPolySafe(mLinkAcch.m_gnd)) {
- s16 angle1 = getGroundAngle(&mLinkAcch.m_gnd, 0);
- current.pos.z += field_0x35c4.z * cM_scos(angle1);
+ s16 angle = getGroundAngle(&mLinkAcch.m_gnd, 0);
+ current.pos.z += field_0x35c4.z * cM_scos(angle);
- s16 angle2 = getGroundAngle(&mLinkAcch.m_gnd, 0x4000);
- current.pos.x += field_0x35c4.x * cM_scos(angle2);
+ angle = getGroundAngle(&mLinkAcch.m_gnd, 0x4000);
+ current.pos.x += field_0x35c4.x * cM_scos(angle);
if (checkZeroSpeedF() && field_0x35c4.abs2() > SQUARE(3.0f)) {
seStartOnlyReverbLevel(Z2SE_AL_ICE_SLIP);
@@ -13101,29 +13153,31 @@ void daAlink_c::posMove() {
current.pos += field_0x3594;
}
} else if (checkOctaIealSpecialCollect()) {
- f32 temp_f1 = getHookshotTopPos()->abs(current.pos);
+ sp18 = getHookshotTopPos()->abs(current.pos);
current.pos += *mCcStts.GetCCMoveP();
- f32 temp_f31 = getHookshotTopPos()->abs(current.pos);
- if (temp_f31 > temp_f1) {
- current.pos.y += temp_f31 - temp_f1;
+ sp14 = getHookshotTopPos()->abs(current.pos);
+ if (sp14 > sp18) {
+ current.pos.y += sp14 - sp18;
}
+
+ (void)0;
} else if (!eventRunning && (mProcID == PROC_HANG_MOVE || mProcID == PROC_CLIMB_MOVE_SIDE ||
mProcID == PROC_CLIMB_MOVE_UPDOWN || mProcID == PROC_CLIMB_WAIT ||
mProcID == PROC_HANG_WAIT))
{
- f32 temp_f31 = mCcStts.GetCCMoveP()->absXZ();
+ f32 var_f29 = mCcStts.GetCCMoveP()->absXZ();
var_r27 = TRUE;
- if (temp_f31 > 1.0f) {
- s16 var_r23 = (s16)(mCcStts.GetCCMoveP()->atan2sX_Z() - shape_angle.y);
- if (var_r23 >= 0) {
- current.pos.x += temp_f31 * temp_f29;
- current.pos.z -= temp_f31 * temp_f30;
+ if (var_f29 > 1.0f) {
+ s16 var_r23 = mCcStts.GetCCMoveP()->atan2sX_Z();
+ if ((s16)(var_r23 - shape_angle.y) >= 0) {
+ current.pos.x += var_f29 * temp_f29;
+ current.pos.z -= var_f29 * temp_f30;
} else {
- current.pos.x -= temp_f31 * temp_f29;
- current.pos.z += temp_f31 * temp_f30;
+ current.pos.x -= var_f29 * temp_f29;
+ current.pos.z += var_f29 * temp_f30;
}
}
}
@@ -13131,12 +13185,12 @@ void daAlink_c::posMove() {
if (checkModeFlg(MODE_SWIMMING) && checkNoResetFlg0(FLG0_SWIM_UP)) {
cXyz sp84 = current.pos - field_0x3798;
- f32 temp_f3 = sp84.absXZ() * cM_ssin(getGroundAngle(&mLinkAcch.m_wtr, sp84.atan2sX_Z()));
- if (temp_f3 < 0.0f) {
- temp_f3 = 0.0f;
+ sp10 = sp84.absXZ() * cM_ssin(getGroundAngle(&mLinkAcch.m_wtr, sp84.atan2sX_Z()));
+ if (sp10 < 0.0f) {
+ sp10 = 0.0f;
}
- if (!(current.pos.y > mWaterY + l_autoUpHeight + temp_f3) && mProcID != PROC_SWIM_DIVE) {
+ if (!(current.pos.y > mWaterY + l_autoUpHeight + sp10) && mProcID != PROC_SWIM_DIVE) {
current.pos.y = mWaterY;
}
}
@@ -13154,11 +13208,10 @@ void daAlink_c::posMove() {
sp78 = cXyz::Zero;
}
- f32 var_f0;
if (checkModeFlg(MODE_PLAYER_FLY)) {
- var_f0 = 1.0f;
+ sp0C = 1.0f;
} else {
- var_f0 = cM_scos(field_0x2ff0);
+ sp0C = cM_scos(field_0x2ff0);
}
if (!checkRootTransZClearMode()) {
@@ -13169,8 +13222,8 @@ void daAlink_c::posMove() {
sp78.x = 0.0f;
}
- field_0x3464 = var_f0 * (sp78.z * temp_f30 + sp78.x * temp_f29);
- field_0x3468 = var_f0 * (sp78.z * temp_f29 - sp78.x * temp_f30);
+ field_0x3464 = sp0C * (sp78.z * temp_f30 + sp78.x * temp_f29);
+ field_0x3468 = sp0C * (sp78.z * temp_f29 - sp78.x * temp_f30);
if (checkMagneBootsOn()) {
cXyz spD8;
@@ -13209,16 +13262,14 @@ void daAlink_c::posMove() {
if (commonLineCheck(&spC0, &spB4)) {
dComIfG_Bgsp().GetTriPla(mLinkLinChk, &plane);
- f32 temp_f31 = spB4.abs(mLinkLinChk.GetCross());
+ f32 var_f28 = spB4.abs(mLinkLinChk.GetCross());
mDoMtx_multVecSR(mMagneBootInvMtx, &plane.mNormal, &spCC);
if (cBgW_CheckBWall(spCC.y)) {
- f32 temp_f1 = spCC.absXZ();
-
- f32 div = temp_f31 / temp_f1;
- spCC.x *= div;
+ var_f28 /= spCC.absXZ();
+ spCC.x *= var_f28;
spCC.y = 0.0f;
- spCC.z *= div;
+ spCC.z *= var_f28;
mDoMtx_multVecSR(mMagneBootMtx, &spCC, &spCC);
current.pos += spCC;
@@ -13226,7 +13277,7 @@ void daAlink_c::posMove() {
}
}
- var_r27 += 0x2000;
+ ANGLE_ADD_2(var_r27, 0x2000);
}
} else if (var_r27) {
cXyz sp9C = cXyz::Zero;
@@ -13361,7 +13412,7 @@ bool daAlink_c::startPeepChange() {
dComIfGs_setTurnRestart(current.pos, shape_angle.y, fopAcM_GetRoomNo(this), param);
}
- dStage_changeScene(mPeepExitID, 0.0f, mode, fopAcM_GetRoomNo(this),
+ dStage_changeScene(mPeepExitID, 0.0f, mode, (int)fopAcM_GetRoomNo(this),
shape_angle.y, -1);
return 1;
}
@@ -13419,7 +13470,7 @@ void daAlink_c::setLastSceneMode(u32* o_mode) {
}
if (mSwordUpTimer != 0) {
- *o_mode |= (mSwordUpTimer & 0xFFFE) << 0xA;
+ *o_mode |= (mSwordUpTimer / 2) << 11;
}
}
@@ -13747,7 +13798,7 @@ int daAlink_c::checkSceneChange(int i_exitID) {
} else {
if (mExitID != 0x3F) {
isScnChange = dStage_changeScene(mExitID & 0xFF, exit_speed, exit_mode,
- fopAcM_GetRoomNo(this), shape_angle.y, -1);
+ (int)fopAcM_GetRoomNo(this), shape_angle.y, -1);
if (isScnChange) {
onNoResetFlg2(FLG2_SCENE_CHANGE_START);
if (mpScnChg != NULL && fopAcM_GetName(mpScnChg) == PROC_SCENE_EXIT) {
@@ -13760,7 +13811,7 @@ int daAlink_c::checkSceneChange(int i_exitID) {
}
} else {
isScnChange = dStage_changeSceneExitId(mLinkAcch.m_gnd, exit_speed, exit_mode,
- fopAcM_GetRoomNo(this), shape_angle.y);
+ (int)fopAcM_GetRoomNo(this), shape_angle.y);
field_0x2f58 = dPath_GetRoomPath(dComIfG_Bgsp().GetRoomPathId(mLinkAcch.m_gnd),
fopAcM_GetRoomNo(this));
}
@@ -13921,6 +13972,7 @@ BOOL daAlink_c::checkSightLine(f32 i_maxDist, cXyz* o_sightPos) {
line_start_pos = &mItemAcKeep.getActor()->current.pos;
}
+ BOOL isLineCross;
s16 temp_r27 = shape_angle.y + mBodyAngle.y;
f32 temp_f31 = cM_scos(mBodyAngle.x);
sp3C.set(temp_f31 * cM_ssin(temp_r27), -cM_ssin(mBodyAngle.x), temp_f31 * cM_scos(temp_r27));
@@ -13958,7 +14010,7 @@ BOOL daAlink_c::checkSightLine(f32 i_maxDist, cXyz* o_sightPos) {
linechk->Set(line_start_pos, o_sightPos, this);
- BOOL isLineCross = dComIfG_Bgsp().LineCross(linechk);
+ isLineCross = dComIfG_Bgsp().LineCross(linechk);
if (isLineCross) {
*o_sightPos = linechk->GetCross();
onResetFlg0(RFLG0_ITEM_SIGHT_BG_HIT);
@@ -13968,7 +14020,13 @@ BOOL daAlink_c::checkSightLine(f32 i_maxDist, cXyz* o_sightPos) {
}
void daAlink_c::setMetamorphoseModel(BOOL i_isChangeToWolf) {
- J3DAnmTransform* bck = (J3DAnmTransform*)mAnmHeap9.loadDataIdx(i_isChangeToWolf ? (u16)dRes_ID_ALANM_BCK_WFCHANGEATOW_e : (u16)dRes_ID_ALANM_BCK_WFCHANGEWTOA_e);
+ u16 var_r30;
+ if (i_isChangeToWolf) {
+ var_r30 = (u16)dRes_ID_ALANM_BCK_WFCHANGEATOW_e;
+ } else {
+ var_r30 = (u16)dRes_ID_ALANM_BCK_WFCHANGEWTOA_e;
+ }
+ J3DAnmTransform* bck = (J3DAnmTransform*)mAnmHeap9.loadDataIdx(var_r30);
JKRHeap* heap = setItemHeap();
mHeldItemModel = initModel(loadAramBmd(dRes_ID_ALANM_BMD_AL_WF_e, 0x6000), 0);
@@ -14487,7 +14545,7 @@ int daAlink_c::checkNewItemChange(u8 i_selItemIdx) {
cXyz sp20;
s16 var_r30 = 0;
- for (int i = 0; i < 4; i++, var_r30 += 0x2000) {
+ for (int i = 0; i < 4; i++, ANGLE_ADD_2(var_r30, 0x2000)) {
sp2C.x = sp38.x + cM_ssin(var_r30) * 120.0f;
sp2C.z = sp38.z + cM_scos(var_r30) * 120.0f;
@@ -14542,6 +14600,8 @@ int daAlink_c::checkNewItemChange(u8 i_selItemIdx) {
{
return ITEM_PROC_PICK_PUT;
}
+
+ (void)0;
}
}
} else if (sel_item != fpcNm_ITEM_NONE && mEquipItem != sel_item) {
@@ -14695,11 +14755,12 @@ void daAlink_c::setLight() {
u16 effName;
dPa_levelEcallBack* callbackp;
+ JPABaseEmitter* emitterp;
if (checkKandelaarSwingAnime() || mProcID == PROC_KANDELAAR_SWING) {
effName = ID_ZI_J_KANTERA_SWINGFIRE;
callbackp = &field_0x2f20;
- JPABaseEmitter* emitterp = dComIfGp_particle_getEmitter(field_0x31c4);
+ emitterp = dComIfGp_particle_getEmitter(field_0x31c4);
if (emitterp != NULL && emitterp->getEmitterCallBackPtr() == NULL) {
emitterp->stopDrawParticle();
}
@@ -14770,34 +14831,29 @@ void daAlink_c::setLight() {
cXyz spB8;
f32 var_f27;
if (field_0x33fc > 0.0f) {
- GXColor spF0 = {0x00, 0x00, 0x00, 0xFF};
- spF0.r = light_m->mColorR;
- spF0.g = light_m->mColorG;
- spF0.b = light_m->mColorB;
+ GXColor sp30 = {(u8)light_m->mColorR, (u8)light_m->mColorG, (u8)light_m->mColorB, 0xFF};
- Vec spC4 = {0.0f, 0.0f, 0.0f};
- spC4.y = light_m->mYOffset;
- spC4.z = light_m->mZOffset;
+ Vec sp5C = {0.0f, light_m->mYOffset, light_m->mZOffset};
f32 var_f26;
if ((uintptr_t)light_m == (uintptr_t)&mpHIO->mWolf.mLight.m) {
cXyz spD0 = eyePos - field_0x34e0;
- s16 sp104 = spD0.atan2sY_XZ();
- s16 sp106 = spD0.atan2sX_Z();
+ s16 sp1C = spD0.atan2sY_XZ();
+ s16 sp1A = spD0.atan2sX_Z();
mDoMtx_stack_c::transS(eyePos);
- mDoMtx_stack_c::ZXYrotM(sp104, sp106, 0);
- mDoMtx_stack_c::multVec(&spC4, &spB8);
+ mDoMtx_stack_c::ZXYrotM(sp1C, sp1A, 0);
+ mDoMtx_stack_c::multVec(&sp5C, &spB8);
- var_f27 = cM_sht2d((s16)-(sp104 + mBodyAngle.x)) * 0.5f;
- var_f26 = cM_sht2d(-sp106);
+ var_f27 = cM_sht2d((s16)(-sp1C - mBodyAngle.x)) * 0.5f;
+ var_f26 = cM_sht2d(-sp1A);
} else {
if (var_r28) {
spB8 = (mSwordTopPos + field_0x3498) * 0.5f;
- spF0.r = var_f30 * 150.0f;
- spF0.g = var_f30 * 174.0f;
- spF0.b = var_f30 * 141.0f;
+ sp30.r = var_f30 * 150.0f;
+ sp30.g = var_f30 * 174.0f;
+ sp30.b = var_f30 * 141.0f;
} else {
spB8 = mKandelaarFlamePos;
}
@@ -14806,7 +14862,7 @@ void daAlink_c::setLight() {
var_f26 = cM_sht2d(-shape_angle.y);
}
- dKy_WolfEyeLight_set(&spB8, var_f27 + light_m->mXAngle, var_f26, (light_m->mWidth * field_0x33fc) / light_m->mPower, &spF0, field_0x33fc, light_m->mAngleAttenuationType, light_m->mDistanceAttenuationType);
+ dKy_WolfEyeLight_set(&spB8, var_f27 + light_m->mXAngle, var_f26, (light_m->mWidth * field_0x33fc) / light_m->mPower, &sp30, field_0x33fc, light_m->mAngleAttenuationType, light_m->mDistanceAttenuationType);
}
}
@@ -14868,6 +14924,8 @@ void daAlink_c::changeWarpMaterial(daAlink_c::daAlink_WARP_MAT_MODE i_matMode) {
}
void daAlink_c::commonProcInit(daAlink_c::daAlink_PROC i_procID) {
+ int i;
+
if (mProcID == PROC_TOOL_DEMO) {
speed.y = 0.0f;
resetDemoBck();
@@ -14879,7 +14937,7 @@ void daAlink_c::commonProcInit(daAlink_c::daAlink_PROC i_procID) {
changeWarpMaterial(WARP_MAT_MODE_1);
}
} else if (mProcID == PROC_GRAB_STAND) {
- for (int i = 0; i < 2; i++) {
+ for (i = 0; i < 2; i++) {
field_0x312a[i] = csXyz::Zero;
field_0x3136[i] = csXyz::Zero;
}
@@ -14924,7 +14982,7 @@ void daAlink_c::commonProcInit(daAlink_c::daAlink_PROC i_procID) {
resetWolfEnemyBiteAll();
} else if (checkWolfShapeReverse()) {
setOldRootQuaternion(0, -0x8000, 0);
- shape_angle.y += 0x8000;
+ ANGLE_ADD_2(shape_angle.y, 0x8000);
field_0x2fe4 = shape_angle.y;
shape_angle.x = -shape_angle.x;
mPrevAngleY = shape_angle.y;
@@ -15096,8 +15154,6 @@ void daAlink_c::commonProcInit(daAlink_c::daAlink_PROC i_procID) {
field_0x2f99 = 0x50;
}
- int i;
-
if (checkModeFlg(MODE_NO_COLLISION) || mProcID == PROC_STEP_MOVE || mProcID == PROC_WOLF_TAG_JUMP) {
mLinkAcch.OffLineCheck();
mLinkAcch.OnLineCheckNone();
@@ -15986,7 +16042,12 @@ int daAlink_c::procFrontRollInit() {
BOOL is_dive_jump = mProcID == PROC_DIVE_JUMP;
commonProcInit(PROC_FRONT_ROLL);
- f32 roll_anm_speed = is_dive_jump ? 6.0f : mpHIO->mFrontRoll.m.mRollAnm.mStartFrame;
+ f32 roll_anm_speed;
+ if (is_dive_jump) {
+ roll_anm_speed = 6.0f;
+ } else {
+ roll_anm_speed = mpHIO->mFrontRoll.m.mRollAnm.mStartFrame;
+ }
setSingleAnime(ANM_FRONT_ROLL, mpHIO->mFrontRoll.m.mRollAnm.mSpeed, roll_anm_speed,
mpHIO->mFrontRoll.m.mRollAnm.mEndFrame,
@@ -16143,7 +16204,7 @@ int daAlink_c::procFrontRollCrashInit() {
speed.y *= mpHIO->mItem.mIronBoots.m.mWaterVelocityY;
}
- current.angle.y -= -0x8000;
+ ANGLE_ADD_2(current.angle.y, 0x8000);
setFrontRollCrashShock(mRollCrashFlg);
voiceStart(Z2SE_AL_V_ZENTEN_FAIL);
onResetFlg0(RFLG0_FRONT_ROLL_CRASH);
@@ -16382,7 +16443,7 @@ int daAlink_c::procBackJumpInit(int param_0) {
}
if (is_prev_ganonFinish) {
- shape_angle.y -= -0x8000;
+ ANGLE_ADD_2(shape_angle.y, 0x8000);
setOldRootQuaternion(0, -0x8000, 0);
field_0x2060->getOldFrameTransInfo(0)->mTranslate.z += 55.0f;
onNoResetFlg3(FLG3_UNK_4000000);
@@ -16399,6 +16460,8 @@ int daAlink_c::procBackJumpInit(int param_0) {
}
int daAlink_c::procBackJump() {
+ daPy_frameCtrl_c* temp = mUnderFrameCtrl;
+
if (mProcVar0.field_0x3008 != 0) {
mProcVar0.field_0x3008--;
} else {
@@ -16487,7 +16550,7 @@ int daAlink_c::procSlip() {
if (checkZeroSpeedF()) {
if (checkInputOnR()) {
current.angle.y = shape_angle.y + 0x8000;
- shape_angle.y += 0x100;
+ ANGLE_ADD_2(shape_angle.y, 0x100);
mNormalSpeed = mMaxSpeed * 0.5f;
procMoveTurnInit(0);
} else {
@@ -17633,7 +17696,9 @@ int daAlink_c::execute() {
l_autoDownHeight = -l_autoUpHeight;
#endif
- if (checkNoResetFlg2(FLG2_UNK_1) && mEquipItem != fpcNm_ITEM_KANTERA && checkItemSetButton(fpcNm_ITEM_KANTERA) == 2) {
+ if (checkNoResetFlg2(FLG2_UNK_1) != FALSE &&
+ mEquipItem != fpcNm_ITEM_KANTERA &&
+ checkItemSetButton(fpcNm_ITEM_KANTERA) == 2) {
offKandelaarModel();
}
@@ -18131,9 +18196,7 @@ int daAlink_c::execute() {
mDoMtx_stack_c::transS(old_pos);
mDoMtx_stack_c::YrotM(shape_angle.y);
- Vec tmp = {0.0f, 0.0f, 0.0f};
- tmp.x = ti.mTranslate.x;
- tmp.z = ti.mTranslate.z;
+ Vec tmp = {ti.mTranslate.x, 0.0f, ti.mTranslate.z};
mDoMtx_stack_c::multVec(&tmp, &current.pos);
speed.y = 0.0f;
@@ -18521,8 +18584,9 @@ int daAlink_c::execute() {
}
if (!checkWolf()) {
+ u8 tmp;
for (u8 i = 0; i < 2; i++) {
- u8 tmp = (i + 1) % 2;
+ tmp = (i + 1) % 2;
if (dComIfGp_getSelectItem(i) == fpcNm_ITEM_EMPTY_BOTTLE && (mUseButtonFlags & (1 << i)) &&
dComIfGp_getSelectItem(tmp) == fpcNm_ITEM_EMPTY_BOTTLE)
{
@@ -18677,7 +18741,7 @@ int daAlink_c::execute() {
shape_angle.y = getMagneBootsLocalAngleY(shape_angle.y, 0);
} else if (checkModeFlg(MODE_VINE_CLIMB)) {
field_0x3108 = shape_angle.y;
- shape_angle.y += field_0x308c;
+ ANGLE_ADD_2(shape_angle.y, field_0x308c);
} else if (checkCargoCarry() && mCargoCarryAcKeep.getActor() != NULL) {
field_0x3108 = shape_angle.y;
shape_angle.y = mCargoCarryAcKeep.getActor()->shape_angle.y;
@@ -18845,9 +18909,11 @@ bool daAlink_c::checkItemDraw() {
int daAlink_c::initShadowScaleLight() {
dKy_shadow_mode_set(4);
+ f32 var_f27;
if (checkWolf()) {
- f32 temp_f26 = 0.5f * mTgCyls[0].GetH();
- mTgCyls[0].GetC();
+ var_f27 = mTgCyls[0].GetC().y + 0.5f * mTgCyls[0].GetH();
+ } else {
+ var_f27 = field_0x3834.y;
}
cXyz sp20(tevStr.mLightPosWorld.x - field_0x3834.x, tevStr.mLightPosWorld.y - field_0x3454, tevStr.mLightPosWorld.z - field_0x3834.z);
@@ -18919,9 +18985,9 @@ int daAlink_c::moveShadowScaleLight() {
s16 temp_r0 = field_0x2ff6 - field_0x2ff8;
if (abs(temp_r0) < 0x4000) {
if (temp_r0 >= 0) {
- field_0x2ff8 -= 0x4000;
+ ANGLE_SUB_2(field_0x2ff8, 0x4000);
} else {
- field_0x2ff8 += 0x4000;
+ ANGLE_ADD_2(field_0x2ff8, 0x4000);
}
if (cLib_distanceAngleS(field_0x2ff8, field_0x2ffa) < 0x100) {
@@ -19023,6 +19089,7 @@ void daAlink_c::shadowDraw() {
dComIfGd_addRealShadow(shadowID, mShieldModel);
}
+ fopAc_ac_c* actor;
if (checkWolf()) {
if (checkMidnaRide() && !checkCloudSea() && !midna->checkShadowNoDraw() && !midna->checkShadowModelDraw()) {
dComIfGd_addRealShadow(shadowID, mpWlMidnaModel);
@@ -19054,10 +19121,12 @@ void daAlink_c::shadowDraw() {
if (mEquipItem == fpcNm_ITEM_IRONBALL) {
if (mItemVar0.field_0x3018 == 0 || mItemVar0.field_0x3018 == 8) {
dComIfGd_addRealShadow(shadowID, mHeldItemModel);
- } else {
- if (fopAcM_gc_c::gndCheck(&mIronBallBgChkPos)) {
- field_0x32d4 = dComIfGd_setShadow(field_0x32d4, 0, mHeldItemModel, &mIronBallCenterPos, 150.0f, 32.0f, mIronBallBgChkPos.y, fopAcM_gc_c::getGroundY(), *fopAcM_gc_c::getGroundCheck(), &tevStr, 0, 1.0f, dDlst_shadowControl_c::getSimpleTex());
- }
+ } else if (fopAcM_gc_c::gndCheck(&mIronBallBgChkPos)) {
+ field_0x32d4 =
+ dComIfGd_setShadow(field_0x32d4, 0, mHeldItemModel,
+ &mIronBallCenterPos, 150.0f, 32.0f, mIronBallBgChkPos.y,
+ fopAcM_gc_c::getGroundY(), *fopAcM_gc_c::getGroundCheck(), &tevStr,
+ 0, 1.0f, dDlst_shadowControl_c::getSimpleTex());
}
} else {
changeHookshotDrawModel();
@@ -19068,7 +19137,9 @@ void daAlink_c::shadowDraw() {
dComIfGd_addRealShadow(shadowID, mpHookTipModel);
}
- if (mEquipItem == fpcNm_ITEM_W_HOOKSHOT && !checkPlayerGuardAndAttack() && !checkNoResetFlg0(FLG0_UNK_2)) {
+ if (mEquipItem == fpcNm_ITEM_W_HOOKSHOT &&
+ !checkPlayerGuardAndAttack() &&
+ !checkNoResetFlg0(FLG0_UNK_2)) {
dComIfGd_addRealShadow(shadowID, field_0x0710);
if (!dComIfGp_checkPlayerStatus1(0, 0x10000)) {
@@ -19092,24 +19163,25 @@ void daAlink_c::shadowDraw() {
}
if (checkSpinnerRide()) {
- fopAc_ac_c* spinnerActor = fopAcM_SearchByID(mRideAcKeep.getID());
- if (spinnerActor != NULL) {
- dComIfGd_addRealShadow(shadowID, spinnerActor->model);
+ actor = fopAcM_SearchByID(mRideAcKeep.getID());
+ if (actor != NULL) {
+ dComIfGd_addRealShadow(shadowID, actor->model);
}
}
}
if (mGrabItemAcKeep.getID() != fpcM_ERROR_PROCESS_ID_e) {
- fopAc_ac_c* grabActor = fopAcM_SearchByID(mGrabItemAcKeep.getID());
- if (grabActor != NULL && grabActor->model != NULL) {
- dComIfGd_addRealShadow(shadowID, grabActor->model);
+ actor = fopAcM_SearchByID(mGrabItemAcKeep.getID());
+ if (actor != NULL && actor->model != NULL) {
+ dComIfGd_addRealShadow(shadowID, actor->model);
}
}
- if (dComIfGp_checkPlayerStatus1(0, 0x10000) && mCargoCarryAcKeep.getID() != fpcM_ERROR_PROCESS_ID_e) {
- fopAc_ac_c* carryActor = fopAcM_SearchByID(mCargoCarryAcKeep.getID());
- if (carryActor != NULL && carryActor->model != NULL) {
- dComIfGd_addRealShadow(shadowID, carryActor->model);
+ if (dComIfGp_checkPlayerStatus1(0, 0x10000) &&
+ mCargoCarryAcKeep.getID() != fpcM_ERROR_PROCESS_ID_e) {
+ actor = fopAcM_SearchByID(mCargoCarryAcKeep.getID());
+ if (actor != NULL && actor->model != NULL) {
+ dComIfGd_addRealShadow(shadowID, actor->model);
}
}
}
@@ -19372,7 +19444,11 @@ int daAlink_c::draw() {
field_0x06f0->hide();
+#if PLATFORM_SHIELD
+ if (mProcID == PROC_HOOKSHOT_WALL_SHOOT || mProcID == PROC_HOOKSHOT_SUBJECT) {
+#else
if (checkHookshotReadyMaterialOffMode()) {
+#endif
for (u16 i = 0; i < mFallVoiceInit; i++) {
if (!(field_0x32cc & (1 << i))) {
field_0x064C->getMaterialNodePointer(i)->getShape()->hide();
@@ -19384,7 +19460,11 @@ int daAlink_c::draw() {
modelDraw(mpLinkModel, isPlayerNoDraw);
if (dComIfGp_checkCameraAttentionStatus(field_0x317c, 0x20)) {
+#if PLATFORM_SHIELD
+ if (mProcID == PROC_HOOKSHOT_WALL_SHOOT || mProcID == PROC_HOOKSHOT_SUBJECT) {
+#else
if (checkHookshotReadyMaterialOffMode()) {
+#endif
for (u16 i = 0; i < mFallVoiceInit; i++) {
if (!(field_0x32cc & (1 << i))) {
field_0x064C->getMaterialNodePointer(i)->getShape()->show();
@@ -19508,9 +19588,7 @@ int daAlink_c::draw() {
if (checkEquipHeavyBoots()) {
GXColorS10 color = tevStr.TevColor;
for (int i = 0; i < 2; i++) {
- JPABaseEmitter* emitter_p = dComIfGp_particle_getEmitter(field_0x3228[i][0]);
-
- if (emitter_p != NULL) {
+ if (dComIfGp_particle_getEmitter(field_0x3228[i][0]) != NULL) {
tevStr.TevColor.r = 5;
tevStr.TevColor.g = tevStr.TevColor.r;
tevStr.TevColor.b = tevStr.TevColor.r;
@@ -19583,7 +19661,7 @@ daAlink_c::~daAlink_c() {
}
static int daAlink_Delete(daAlink_c* i_this) {
- fpc_ProcID id = fopAcM_GetID(i_this);
+ fopAcM_RegisterDeleteID(i_this, "ALINK");
if (i_this->getClothesChangeWaitTimer() != 0) {
i_this->loadModelDVD();
@@ -19604,7 +19682,7 @@ static actor_method_class l_daAlink_Method = {
};
actor_process_profile_definition g_profile_ALINK = {
- fpcLy_CURRENT_e,
+ (u32)fpcLy_CURRENT_e,
5,
fpcPi_CURRENT_e,
PROC_ALINK,
diff --git a/src/d/actor/d_a_alink_HIO.inc b/src/d/actor/d_a_alink_HIO.inc
index aec8ad2a89..b7b24593de 100644
--- a/src/d/actor/d_a_alink_HIO.inc
+++ b/src/d/actor/d_a_alink_HIO.inc
@@ -685,16 +685,16 @@ void daAlinkHIO_cutNormal_c::genMessage(JORMContext* ctx) {
daAlinkHIO_cutNormal_c::daAlinkHIO_cutNormal_c(int param_0, float param_1) {
field_0x34 = param_1;
+ static const char plabel0[] = "const daAlinkHIO_cutNormal_c1 daAlinkHIO_cutNmV_c0::m = {\n";
+ static const char plabel1[] = "const daAlinkHIO_cutNormal_c1 daAlinkHIO_cutNmL_c0::m = {\n";
+ static const char plabel2[] = "const daAlinkHIO_cutNormal_c1 daAlinkHIO_cutNmR_c0::m = {\n";
+ static const char plabel3[] = "const daAlinkHIO_cutNormal_c1 daAlinkHIO_cutNmSL_c0::m = {\n";
+ static const char plabel4[] = "const daAlinkHIO_cutNormal_c1 daAlinkHIO_cutNmSR_c0::m = {\n";
+ static const char* plabel[] = {plabel0, plabel1, plabel2, plabel3, plabel4};
static void* baseP[5] = {(void*)&daAlinkHIO_cutNmV_c0::m, (void*)&daAlinkHIO_cutNmL_c0::m,
(void*)&daAlinkHIO_cutNmR_c0::m, (void*)&daAlinkHIO_cutNmSL_c0::m,
(void*)&daAlinkHIO_cutNmSR_c0::m};
- static const char* plabel[] = {"const daAlinkHIO_cutNormal_c1 daAlinkHIO_cutNmSL_c0::m = {\n",
- "const daAlinkHIO_cutNormal_c1 daAlinkHIO_cutNmV_c0::m = {\n",
- "const daAlinkHIO_cutNormal_c1 daAlinkHIO_cutNmL_c0::m = {\n",
- "const daAlinkHIO_cutNormal_c1 daAlinkHIO_cutNmSR_c0::m = {\n",
- "const daAlinkHIO_cutNormal_c1 daAlinkHIO_cutNmR_c0::m = {\n"};
-
m_len = 32;
mp_src_data = baseP[param_0];
mp_data = (void*)&m;
@@ -734,19 +734,18 @@ void daAlinkHIO_cutFinish_c::genMessage(JORMContext* ctx) {
daAlinkHIO_cutFinish_c::daAlinkHIO_cutFinish_c(int param_0, float param_1) {
field_0x34 = param_1;
+ static const char plabel0[] = "const daAlinkHIO_cutFinish_c1 daAlinkHIO_cutFnL_c0::m = {\n";
+ static const char plabel1[] = "const daAlinkHIO_cutFinish_c1 daAlinkHIO_cutFnV_c0::m = {\n";
+ static const char plabel2[] = "const daAlinkHIO_cutFinish_c1 daAlinkHIO_cutFnS_c0::m = {\n";
+ static const char plabel3[] = "const daAlinkHIO_cutFinish_c1 daAlinkHIO_cutFnSl_c0::m = {\n";
+ static const char plabel4[] = "const daAlinkHIO_cutFinish_c1 daAlinkHIO_cutFnSm_c0::m = {\n";
+ static const char plabel5[] = "const daAlinkHIO_cutFinish_c1 daAlinkHIO_cutFnR_c0::m = {\n";
+ static const char* plabel[] = {plabel0, plabel1, plabel2, plabel3, plabel4, plabel5};
+
static void* baseP[6] = {(void*)&daAlinkHIO_cutFnL_c0::m, (void*)&daAlinkHIO_cutFnV_c0::m,
(void*)&daAlinkHIO_cutFnS_c0::m, (void*)&daAlinkHIO_cutFnSl_c0::m,
(void*)&daAlinkHIO_cutFnSm_c0::m, (void*)&daAlinkHIO_cutFnR_c0::m};
- static const char* plabel[] = {
- "const daAlinkHIO_cutFinish_c1 daAlinkHIO_cutFnL_c0::m = {\n",
- "const daAlinkHIO_cutFinish_c1 daAlinkHIO_cutFnV_c0::m = {\n",
- "const daAlinkHIO_cutFinish_c1 daAlinkHIO_cutFnS_c0::m = {\n",
- "const daAlinkHIO_cutFinish_c1 daAlinkHIO_cutFnSl_c0::m = {\n",
- "const daAlinkHIO_cutFinish_c1 daAlinkHIO_cutFnSm_c0::m = {\n",
- "const daAlinkHIO_cutFinish_c1 daAlinkHIO_cutFnR_c0::m = {\n",
- };
-
m_len = 44;
mp_src_data = baseP[param_0];
mp_data = (void*)&m;
@@ -826,18 +825,17 @@ void daAlinkHIO_cutDash_c::genMessage(JORMContext* ctx) {
daAlinkHIO_cutDash_c::daAlinkHIO_cutDash_c(int param_0, float param_1) {
field_0x34 = param_1;
+ static const char plabel0[] = "const daAlinkHIO_cutDash_c1 daAlinkHIO_cutDaL_c0::m = {\n";
+ static const char plabel1[] = "const daAlinkHIO_cutDash_c1 daAlinkHIO_cutDaR_c0::m = {\n";
+ static const char plabel2[] = "const daAlinkHIO_cutDash_c1 daAlinkHIO_cutDaCharge_c0::m = {\n";
+ static const char* plabel[] = {plabel0, plabel1, plabel2};
+
static void* baseP[3] = {
(void*)&daAlinkHIO_cutDaL_c0::m,
(void*)&daAlinkHIO_cutDaR_c0::m,
(void*)&daAlinkHIO_cutDaCharge_c0::m,
};
- static const char* plabel[] = {
- "const daAlinkHIO_cutDash_c1 daAlinkHIO_cutDaL_c0::m = {\n",
- "const daAlinkHIO_cutDash_c1 daAlinkHIO_cutDaR_c0::m = {\n",
- "const daAlinkHIO_cutDash_c1 daAlinkHIO_cutDaCharge_c0::m = {\n",
- };
-
m_len = 28;
mp_src_data = baseP[param_0];
mp_data = (void*)&m;
@@ -983,6 +981,12 @@ void daAlinkHIO_hoCut_c::genMessage(JORMContext* ctx) {
daAlinkHIO_hoCut_c::daAlinkHIO_hoCut_c(int param_0, float param_1) {
field_0x34 = param_1;
+ static const char plabel0[] = "const daAlinkHIO_hoCut_c1 daAlinkHIO_hoCutLA_c0::m = {\n";
+ static const char plabel1[] = "const daAlinkHIO_hoCut_c1 daAlinkHIO_hoCutLB_c0::m = {\n";
+ static const char plabel2[] = "const daAlinkHIO_hoCut_c1 daAlinkHIO_hoCutRA_c0::m = {\n";
+ static const char plabel3[] = "const daAlinkHIO_hoCut_c1 daAlinkHIO_hoCutRB_c0::m = {\n";
+ static const char* plabel[] = {plabel0, plabel1, plabel2, plabel3};
+
static void* baseP[4] = {
(void*)&daAlinkHIO_hoCutLA_c0::m,
(void*)&daAlinkHIO_hoCutLB_c0::m,
@@ -990,13 +994,6 @@ daAlinkHIO_hoCut_c::daAlinkHIO_hoCut_c(int param_0, float param_1) {
(void*)&daAlinkHIO_hoCutRB_c0::m,
};
- static const char* plabel[] = {
- "const daAlinkHIO_hoCut_c1 daAlinkHIO_hoCutLA_c0::m = {\n",
- "const daAlinkHIO_hoCut_c1 daAlinkHIO_hoCutLB_c0::m = {\n",
- "const daAlinkHIO_hoCut_c1 daAlinkHIO_hoCutRA_c0::m = {\n",
- "const daAlinkHIO_hoCut_c1 daAlinkHIO_hoCutRB_c0::m = {\n",
- };
-
m_len = 32;
mp_src_data = baseP[param_0];
mp_data = (void*)&m;
@@ -1357,16 +1354,15 @@ void daAlinkHIO_guardAttack_c::genMessage(JORMContext* ctx) {
daAlinkHIO_guardAttack_c::daAlinkHIO_guardAttack_c(int param_0, float param_1) {
field_0x34 = param_1;
+ static const char plabel0[] = "const daAlinkHIO_guardAttack_c1 daAlinkHIO_gAtPush_c0::m = {\n";
+ static const char plabel1[] = "const daAlinkHIO_guardAttack_c1 daAlinkHIO_gAtKick_c0::m = {\n";
+ static const char* plabel[] = {plabel0, plabel1};
+
static void* baseP[2] = {
(void*)&daAlinkHIO_gAtPush_c0::m,
(void*)&daAlinkHIO_gAtKick_c0::m,
};
- static const char* plabel[] = {
- "const daAlinkHIO_guardAttack_c1 daAlinkHIO_gAtPush_c0::m = {\n",
- "const daAlinkHIO_guardAttack_c1 daAlinkHIO_gAtKick_c0::m = {\n",
- };
-
m_len = 36;
mp_src_data = baseP[param_0];
mp_data = (void*)&m;
@@ -1385,24 +1381,24 @@ daAlinkHIO_guardAttack_c::daAlinkHIO_guardAttack_c(int param_0, float param_1) {
void daAlinkHIO_turnMove_c::genMessage(JORMContext* ctx) {
// Reset
ctx->genButton("リセット", 0x4000003);
- //
- daAlinkHIO_setAnmGenMessage((daAlinkHIO_anm_c*)(this + 0x34), ctx, "回込", 27.0, 1);
- //
- ctx->genSlider("半回転回込A速度", (float*)(this + 0x50), 0.0, 10.0);
- //
- ctx->genSlider("斬上げCF", (float*)(this + 0x54), 0.0, 28.0);
- //
- ctx->genSlider("回転速度率", (short*)(this + 0x48), 0, 100);
- //
- ctx->genSlider("回転速度最大", (short*)(this + 0x4a), 0, 0x7fff);
- //
- ctx->genSlider("回転速度最小", (short*)(this + 0x4c), 0, 0x7fff);
- //
- ctx->genSlider("半回転速度最大", (short*)(this + 0x4e), 0, 0x7fff);
- //
- ctx->genSlider("通常側転A速度", (float*)(this + 0x58), 0.0, 10.0);
- //
- ctx->genSlider("通常側転速度", (float*)(this + 0x5c), 0.0, 100.0);
+ // Return
+ daAlinkHIO_setAnmGenMessage(&m.mTurnAnm, ctx, "回込", 27.0f, 1);
+ // Half-turn rotation A speed
+ ctx->genSlider("半回転回込A速度", &m.mHalfTurnAnmSpeed, 0.0f, 10.0f);
+ // Slash up CF
+ ctx->genSlider("斬上げCF", &m.mTwirlCutDelayF, 0.0f, 28.0f);
+ // Rotation speed
+ ctx->genSlider("回転速度率", &m.mTurnSpeedRate, 0, 100);
+ // Maximum rotation speed
+ ctx->genSlider("回転速度最大", &m.mMaxTurnSpeed, 0, 0x7fff);
+ // Minimum rotation speed
+ ctx->genSlider("回転速度最小", &m.mMinTurnSpeed, 0, 0x7fff);
+ // Half rotation speed maximum
+ ctx->genSlider("半回転速度最大", &m.mMaxHalfTurnSpeed, 0, 0x7fff);
+ // Normal side roll A speed
+ ctx->genSlider("通常側転A速度", &m.mSideRollAnmSpeed, 0.0f, 10.0f);
+ // Normal side roll speed
+ ctx->genSlider("通常側転速度", &m.mSideRollSpeed, 0.0f, 100.0f);
}
daAlinkHIO_turnMove_c::daAlinkHIO_turnMove_c() {
@@ -1929,16 +1925,16 @@ void daAlinkHIO_damLaHu_c::genMessage(JORMContext* ctx) {
}
daAlinkHIO_damLaHu_c::daAlinkHIO_damLaHu_c(int param_0) {
+
+ static const char plabel0[] = "const daAlinkHIO_damLaHu_c1 daAlinkHIO_damLarge_c0::m = {\n";
+ static const char plabel1[] = "const daAlinkHIO_damLaHu_c1 daAlinkHIO_damHuge_c0::m = {\n";
+ static const char* plabel[] = {plabel0, plabel1};
+
static void* baseP[2] = {
(void*)&daAlinkHIO_damLarge_c0::m,
(void*)&daAlinkHIO_damHuge_c0::m,
};
- static const char* plabel[] = {
- "const daAlinkHIO_guardAttack_c1 daAlinkHIO_damLarge_c0::m = {\n",
- "const daAlinkHIO_guardAttack_c1 daAlinkHIO_damHuge_c0::m = {\n",
- };
-
m_len = 188;
mp_src_data = baseP[param_0];
mp_data = (void*)&m;
@@ -2083,8 +2079,8 @@ void daAlinkHIO_damSwim_c::genMessage(JORMContext* ctx) {
ctx->genSlider("最高速", &m.mMaxSpeed, 0.0f, 30.0f);
// Deceleration
ctx->genSlider("減速", &m.mDeceleration, 0.0f, 10.0f);
- // Sink
- daAlinkHIO_setAnmGenMessage(&m.mSinkAnm, ctx, "下沈", 10.0f, 0);
+ // Swimming
+ daAlinkHIO_setAnmGenMessage(&m.mSinkAnm, ctx, "泳ぎ", 10.0f, 0);
// Water surface
daAlinkHIO_setAnmGenMessage(&m.mSurfaceAnm, ctx, "水面", 11.0f, 1);
}
@@ -2129,8 +2125,8 @@ void daAlinkHIO_damage_c::genMessage(JORMContext* ctx) {
ctx->genSlider("無敵時間", &m.mInvincibleTime, 0, 0x96);
// Wolf floor invincible time
ctx->genSlider("狼ポリゴン時無敵時間", &m.mWolfFloorInvincibleTime, 0, 0x96);
- // Floor get up
- daAlinkHIO_setAnmGenMessage(&m.mFloorDmgAnm, ctx, "床起き", 14.0f, 1);
+ // Floor
+ daAlinkHIO_setAnmGenMessage(&m.mFloorDmgAnm, ctx, "床", 14.0f, 1);
// Dash
daAlinkHIO_setAnmGenMessage(&m.mDashDmgAnm, ctx, "ダッシュ", 9.0f, 0);
// Recover stand anm speed
@@ -2421,8 +2417,8 @@ void daAlinkHIO_bomb_c::genMessage(JORMContext* ctx) {
ctx->genSlider("投げ水平速度", &m.mThrowSpeedH, 0.0f, 100.0f);
// Throw vertical speed
ctx->genSlider("投げ垂直速度", &m.mThrowSpeedV, 0.0f, 100.0f);
- // Bound rate
- ctx->genSlider("バウンド率", &m.mBoundRate, 0.0f, 1.0f);
+ // Bounce rate
+ ctx->genSlider("跳返率", &m.mBoundRate, 0.0f, 1.0f);
// Vertical stop speed
ctx->genSlider("垂直停止速度", &m.mStopSpeedY, 0.0f, 20.0f);
// Bounce time max speed
@@ -2520,17 +2516,16 @@ void daAlinkHIO_light_c::genMessage(JORMContext* ctx) {
}
daAlinkHIO_light_c::daAlinkHIO_light_c(int param_0) {
+
+ static const char plabel0[] = "const daAlinkHIO_light_c1 daAlinkHIO_huLight_c0::m = {\n";
+ static const char plabel1[] = "const daAlinkHIO_light_c1 daAlinkHIO_wlLight_c0::m = {\n";
+ static const char plabel2[] = "const daAlinkHIO_light_c1 daAlinkHIO_zwLight_c0::m = {\n";
+ static const char* plabel[] = {plabel0, plabel1, plabel2};
+
static void* baseP[] = {
(void*)&daAlinkHIO_huLight_c0::m,
(void*)&daAlinkHIO_wlLight_c0::m,
(void*)&daAlinkHIO_zwLight_c0::m,
-
- };
-
- static const char* plabel[] = {
- "const daAlinkHIO_light_c1 daAlinkHIO_huLight_c0::m = {\n",
- "const daAlinkHIO_light_c1 daAlinkHIO_wlLight_c0::m = {\n",
- "const daAlinkHIO_light_c1 daAlinkHIO_zwLight_c0::m = {\n",
};
m_len = 28;
@@ -2994,19 +2989,19 @@ void daAlinkHIO_bottle_c::genMessage(JORMContext* ctx) {
// Start drink
daAlinkHIO_setAnmGenMessage(&m.mStartDrinkAnm, ctx, "飲む始め", 56.0f, 0);
// End drink
- daAlinkHIO_setAnmGenMessage(&m.mEndDrinkAnm, ctx, "飲み終", 39.0f, 0);
+ daAlinkHIO_setAnmGenMessage(&m.mEndDrinkAnm, ctx, "飲終", 39.0f, 0);
// Milk end drink
- daAlinkHIO_setAnmGenMessage(&m.mEndDrinkAnm, ctx, "ミルク飲み終", 86.0f, 0);
+ daAlinkHIO_setAnmGenMessage(&m.mEndDrinkAnm, ctx, "まずい飲終", 86.0f, 0);
// Open
daAlinkHIO_setAnmGenMessage(&m.mOpenBottleAnm, ctx, "開ける", 49.0f, 0);
// Scoop
- daAlinkHIO_setAnmGenMessage(&m.mScoopAnm, ctx, "すくう", 54.0f, 0);
+ daAlinkHIO_setAnmGenMessage(&m.mPourAnm, ctx, "出す", 54.0f, 0);
// Swing down
daAlinkHIO_setAnmGenMessage(&m.mSwingDownAnm, ctx, "下振り", 24.0f, 1);
// Swing side
daAlinkHIO_setAnmGenMessage(&m.mSwingSideAnm, ctx, "横振り", 19.0f, 1);
// Medicine
- daAlinkHIO_setAnmGenMessage(&m.mDrinkNastyAnm, ctx, "くすり", 29.0f, 0);
+ daAlinkHIO_setAnmGenMessage(&m.mScoopAnm, ctx, "掬う", 29.0f, 0);
// Get
daAlinkHIO_setAnmGenMessage(&m.mGetAnm, ctx, "ゲット", 47.0f, 0);
}
@@ -3238,26 +3233,26 @@ void daAlinkHIO_grab_c::genMessage(JORMContext* ctx) {
ctx->genSlider("強制重さ指定", &m.mForceWeightSpec, 0, 3);
// Preparation
daAlinkHIO_setAnmGenMessage(&m.mPrepareAnm, ctx, "準備", 4.0f, 0);
- // Lift up
- daAlinkHIO_setAnmGenMessage(&m.mLiftAnm, ctx, "持上", 9.0f, 1);
+ // Lift
+ daAlinkHIO_setAnmGenMessage(&m.mLiftBackAnm, ctx, "持上", 9.0f, 1);
// Throw
- daAlinkHIO_setAnmGenMessage(&m.mThrowAnm, ctx, "投げる", 39.0f, 1);
- // Carry
- daAlinkHIO_setAnmGenMessage(&m.mCarryAnm, ctx, "運び", 12.0f, 1);
- // Lift back
- daAlinkHIO_setReverseAnmGenMessage(&m.mLiftBackAnm, ctx, "持ち上げ後", 9.0f, 0);
- // Stand reverse
+ daAlinkHIO_setAnmGenMessage(&m.mLiftAnm, ctx, "投げる", 39.0f, 1);
+ // One-handed throw
+ daAlinkHIO_setAnmGenMessage(&m.mCarryPlaceReverseAnm, ctx, "片手投げ", 12.0f, 1);
+ // Place
+ daAlinkHIO_setReverseAnmGenMessage(&m.mThrowAnm, ctx, "置く", 9.0f, 0);
+ // Stand
daAlinkHIO_setReverseAnmGenMessage(&m.mStandReverseAnm, ctx, "立つ", 4.0f, 1);
// Recoil
- daAlinkHIO_setAnmGenMessage(&m.mRecoilAnm, ctx, "反動", 19.0f, 1);
+ daAlinkHIO_setAnmGenMessage(&m.mCarryAnm, ctx, "反動", 19.0f, 1);
// Failure
- daAlinkHIO_setAnmGenMessage(&m.mFailAnm, ctx, "失敗", 19.0f, 1);
+ daAlinkHIO_setAnmGenMessage(&m.mRecoilAnm, ctx, "失敗", 19.0f, 1);
// Failure stop time
ctx->genSlider("失敗停止時間", &m.mFailStopTime, 0, 300);
- // Carry lift
- daAlinkHIO_setAnmGenMessage(&m.mCarryLiftAnm, ctx, "抱え上げ", 39.0f, 0);
- // Carry place reverse
- daAlinkHIO_setReverseAnmGenMessage(&m.mCarryPlaceReverseAnm, ctx, "抱え置き", 39.0f, 1);
+ // Lift up
+ daAlinkHIO_setAnmGenMessage(&m.mFailAnm, ctx, "抱え上げ", 39.0f, 0);
+ // Hold
+ daAlinkHIO_setReverseAnmGenMessage(&m.mCarryLiftAnm, ctx, "抱え置き", 39.0f, 1);
// Iron ball throw
daAlinkHIO_setAnmGenMessage(&m.mIronBallThrowAnm, ctx, "鉄玉投げ", 49.0f, 1);
}
@@ -4010,16 +4005,15 @@ void daAlinkHIO_wlDamLaHu_c::genMessage(JORMContext* ctx) {
}
daAlinkHIO_wlDamLaHu_c::daAlinkHIO_wlDamLaHu_c(int param_0) {
+ static const char plabel0[] = "const daAlinkHIO_wlDamLaHu_c1 daAlinkHIO_wlDamLarge_c0::m = {\n";
+ static const char plabel1[] = "const daAlinkHIO_wlDamLaHu_c1 daAlinkHIO_wlDamHuge_c0::m = {\n";
+ static const char* plabel[] = {plabel0, plabel1};
+
static void* baseP[] = {
(void*)&daAlinkHIO_wlDamLarge_c0::m,
(void*)&daAlinkHIO_wlDamHuge_c0::m,
};
- static const char* plabel[] = {
- "const daAlinkHIO_wlDamLaHu_c1 daAlinkHIO_wlDamLarge_c0::m = {\n",
- "const daAlinkHIO_wlDamLaHu_c1 daAlinkHIO_wlDamHuge_c0::m = {\n",
- };
-
m_len = 108;
mp_src_data = baseP[param_0];
mp_data = (void*)&m;
@@ -4278,16 +4272,15 @@ void daAlinkHIO_wlAtWait_c::genMessage(JORMContext* ctx) {
daAlinkHIO_wlAtWait_c::daAlinkHIO_wlAtWait_c(int param_0, float param_1) {
field_0x34 = param_1;
+ static const char plabel0[] = "const daAlinkHIO_wlAtWait_c1 daAlinkHIO_wlAtWaLr_c0::m = {\n";
+ static const char plabel1[] = "const daAlinkHIO_wlAtWait_c1 daAlinkHIO_wlAtWaSc_c0::m = {\n";
+ static const char plabel2[] = "const daAlinkHIO_wlAtWait_c1 daAlinkHIO_wlAtWaTl_c0::m = {\n";
+ static const char* plabel[] = {plabel0, plabel1, plabel2};
+
static void* baseP[] = {
(void*)&daAlinkHIO_wlAtWaLr_c0::m,
- (void*)&daAlinkHIO_wlAtWaTl_c0::m,
(void*)&daAlinkHIO_wlAtWaSc_c0::m,
- };
-
- static const char* plabel[] = {
- "const daAlinkHIO_cutNormal_c1 daAlinkHIO_wlAtWaLr_c0::m = {\n",
- "const daAlinkHIO_cutNormal_c1 daAlinkHIO_wlAtWaTl_c0::m = {\n",
- "const daAlinkHIO_cutNormal_c1 daAlinkHIO_wlAtWaSc_c0::m = {\n",
+ (void*)&daAlinkHIO_wlAtWaTl_c0::m,
};
m_len = 60;
@@ -5043,7 +5036,7 @@ daAlinkHIO_wlMoveNoP_c::~daAlinkHIO_wlMoveNoP_c() {}
daAlinkHIO_wlMove_c::~daAlinkHIO_wlMove_c() {}
void daAlinkHIO_c::jumpStateUpdate(const cXyz* param_0, const cXyz* param_1, f32 param_2) {
- char buf[68];
+ char buf[64];
f32 xDiff = param_0->x - param_1->x;
f32 zDiff = param_0->z - param_1->z;
diff --git a/src/d/actor/d_a_alink_bottle.inc b/src/d/actor/d_a_alink_bottle.inc
index bba785875f..b3a39c3498 100644
--- a/src/d/actor/d_a_alink_bottle.inc
+++ b/src/d/actor/d_a_alink_bottle.inc
@@ -23,6 +23,7 @@ int daAlink_c::bottleModelCallBack() {
static int daAlink_bottleModelCallBack(J3DJoint* i_joint, int param_1) {
UNUSED(i_joint);
+ UNUSED(param_1);
daAlink_c* player_p = (daAlink_c*)j3dSys.getModel()->getUserArea();
@@ -568,7 +569,7 @@ int daAlink_c::procBottleSwingInit(fopAc_ac_c* i_catchActor, int param_1) {
catchActorName = PROC_ALINK;
}
- if (catchActorName == PROC_OBJ_OILTUBO || catchActorName == PROC_TAG_SSDRINK ||
+ if (catchActorName == PROC_TAG_SSDRINK || catchActorName == PROC_OBJ_OILTUBO ||
catchActorName == PROC_TAG_BTLITM || mEquipItem == fpcNm_ITEM_KANTERA)
{
setSingleAnimeParam(ANM_BOTTLE_SCOOP, &mpHIO->mItem.mBottle.m.mScoopAnm);
diff --git a/src/d/actor/d_a_alink_bow.inc b/src/d/actor/d_a_alink_bow.inc
index 4d7a354289..207f463cd7 100644
--- a/src/d/actor/d_a_alink_bow.inc
+++ b/src/d/actor/d_a_alink_bow.inc
@@ -352,6 +352,7 @@ BOOL daAlink_c::checkUpperItemActionBow() {
if (mEquipItem == fpcNm_ITEM_BOW) {
field_0x301e = 0;
}
+ (void)0;
} else {
changeArrowType();
}
diff --git a/src/d/actor/d_a_alink_crawl.inc b/src/d/actor/d_a_alink_crawl.inc
index e90c87ac88..5f46d5e557 100644
--- a/src/d/actor/d_a_alink_crawl.inc
+++ b/src/d/actor/d_a_alink_crawl.inc
@@ -389,12 +389,19 @@ void daAlink_c::setCrawlMoveAngle() {
}
mLinkGndChk.SetPos(&sp20);
- // Fakematch:
+#if PLATFORM_SHIELD
+ sp2C.set(sp20.x - sp38.x, dComIfG_Bgsp().GroundCross(&mLinkGndChk) - sp38.y,
+ sp20.z - sp38.z);
+#else
+ // Likely fakematch:
// dBgS::GroundCross is implicitly inlined to cBgS::GroundCross, but for some
- // reason here that breaks the match. This is the only place in the code so
- // far (September 2025) where it causes issues.
- sp2C.set(sp20.x - sp38.x, dComIfG_Bgsp().cBgS::GroundCross(&mLinkGndChk) - sp38.y,
+ // reason here that breaks instruction ordering. This is the only place in the code
+ // where it causes issues.
+ // It _is_ possible that this is caused by an actual version difference in Shield, given
+ // that the Wii versions need the cast but Shield prod does not.
+ sp2C.set(sp20.x - sp38.x, ((cBgS&)dComIfG_Bgsp()).GroundCross(&mLinkGndChk) - sp38.y,
sp20.z - sp38.z);
+#endif
if (cLib_distanceAngleS(sp2C.atan2sY_XZ(), shape_angle.x) > 0x800) {
shape_angle.y = current.angle.y;
@@ -458,7 +465,7 @@ void daAlink_c::setCrawlAutoMoveAimPos() {
mProcVar3.field_0x300e = 0;
mProcVar0.field_0x3008 = -1;
} else if ((shape_angle.y == current.angle.y && direction == DIR_BACKWARD) || (shape_angle.y != current.angle.y && direction == DIR_FORWARD)) {
- current.angle.y += 0x8000;
+ ANGLE_ADD_2(current.angle.y, 0x8000);
field_0x37c8.x -= 1.5f * (95.0f * cM_ssin(current.angle.y));
field_0x37c8.z -= 1.5f * (95.0f * cM_scos(current.angle.y));
diff --git a/src/d/actor/d_a_alink_cut.inc b/src/d/actor/d_a_alink_cut.inc
index c988a12cb7..24b4f143c4 100644
--- a/src/d/actor/d_a_alink_cut.inc
+++ b/src/d/actor/d_a_alink_cut.inc
@@ -1233,6 +1233,7 @@ int daAlink_c::procCutFinishInit(int i_type) {
field_0x3588 = l_halfAtnWaitBaseAnime;
if (mCutType == CUT_TYPE_MORTAL_DRAW_A || mCutType == CUT_TYPE_FINISH_STAB) {
+ int dummy; // dummy decl to force stack pointer into r31 for debug
field_0x2f99 = 13;
}
@@ -1586,7 +1587,7 @@ int daAlink_c::procCutJump() {
daPy_frameCtrl_c* framectrl = mUnderFrameCtrl;
if (current.angle.y == shape_angle.y && changeCutReverseProc(ANM_CUT_JUMP)) {
- current.angle.y += 0x8000;
+ ANGLE_ADD_2(current.angle.y, 0x8000);
mNormalSpeed = 27.0f;
dComIfGp_getVibration().StartShock(VIBMODE_S_POWER5, 31, cXyz(0.0f, 1.0f, 0.0f));
} else if (current.angle.y != shape_angle.y) {
diff --git a/src/d/actor/d_a_alink_damage.inc b/src/d/actor/d_a_alink_damage.inc
index 38cf05d3e6..56229e2e4f 100644
--- a/src/d/actor/d_a_alink_damage.inc
+++ b/src/d/actor/d_a_alink_damage.inc
@@ -1805,7 +1805,7 @@ int daAlink_c::procDkCaught() {
f32 var_f30;
if (checkInputOnR()) {
if (getDirectionFromCurrentAngle() == DIR_BACKWARD) {
- current.angle.y += 0x8000;
+ ANGLE_ADD_2(current.angle.y, 0x8000);
mNormalSpeed *= -1.0f;
}
diff --git a/src/d/actor/d_a_alink_demo.inc b/src/d/actor/d_a_alink_demo.inc
index 98dcb83804..c601c35695 100644
--- a/src/d/actor/d_a_alink_demo.inc
+++ b/src/d/actor/d_a_alink_demo.inc
@@ -268,10 +268,10 @@ int daAlink_c::checkDemoAction() {
}
// TODO: reconcile
- #if VERSION == VERSION_SHIELD_DEBUG
- int type = prm0 - 20;
- if (type >= 0 && type < 6) {
- return procCutFinishInit(type);
+ #if VERSION == VERSION_SHIELD_DEBUG || 1
+ prm0 -= 20;
+ if (prm0 >= 0 && prm0 < 6) {
+ return procCutFinishInit(prm0);
} else {
return procCutTurnInit(1, 1);
}
@@ -364,7 +364,13 @@ int daAlink_c::checkDemoAction() {
return procCutLargeJumpChargeInit();
} else if (demoMode == daPy_demo_c::DEMO_UNK_73_e) {
onNoResetFlg0(FLG0_UNK_100000);
- return procSideRollInit(mDemo.getParam0() ? 3 : 2);
+ int temp;
+ if (!mDemo.getParam0()) {
+ temp = 2;
+ } else {
+ temp = 3;
+ }
+ return procSideRollInit(temp);
} else if (demoMode == daPy_demo_c::DEMO_UNK_16_e) {
onNoResetFlg0(FLG0_UNK_100000);
if (checkWolf()) {
@@ -584,6 +590,7 @@ void daAlink_c::setDemoData() {
if (mMidnaTalkDelayTimer != 0) {
mMidnaTalkDelayTimer--;
}
+ (void)0;
} else {
dDemo_actor_c* demo_actor_p = dDemo_c::getActor(demoActorID);
cXyz* pos_p = NULL;
@@ -763,6 +770,7 @@ void daAlink_c::setDemoData() {
dComIfGp_evmng_cutEnd(mAlinkStaffId);
}
}
+ (void)0;
} else {
if (mDemo.getDemoType() == daPy_demo_c::DEMO_TYPE_TOOL_e || (mDemo.getDemoType() == daPy_demo_c::DEMO_TYPE_SYSTEM_e && mAlinkStaffId != -1)) {
if (prm0_p != NULL) {
@@ -1093,7 +1101,7 @@ void daAlink_c::setTalkAnime() {
}
}
-u8 daAlink_c::setTradeItemAnime() {
+bool daAlink_c::setTradeItemAnime() {
setSingleAnimeBase(ANM_TRADE_ITEM_PULL_OUT);
offModeFlg(0x100);
@@ -1110,7 +1118,7 @@ u8 daAlink_c::setTradeItemAnime() {
}
keepItemData();
- return 1;
+ return true;
}
void daAlink_c::setTradeItemOutHand() {
@@ -1146,7 +1154,7 @@ u8 daAlink_c::setDemoRightHandIndex(u16 param_0) {
mProcVar4.field_0x3010 = 1;
return 6;
} else if (param_0 == 0xFC) {
- field_0x2fab |= 0x10;
+ field_0x2fab |= (u8)0x10;
return 5;
} else if (param_0 == 0xFB) {
if (mpDemoHRTmpModel != NULL) {
@@ -1169,7 +1177,7 @@ u8 daAlink_c::setDemoLeftHandIndex(u16 param_0) {
}
return 0;
} else if (param_0 == 0xFC) {
- field_0x2fab |= 0x8;
+ field_0x2fab |= (u8)0x8;
return 0;
} else if (param_0 == 0xFB) {
if (mpDemoHLTmpModel != NULL) {
@@ -1527,11 +1535,11 @@ int daAlink_c::procCoToolDemo() {
}
} else if (arg1 == 7) {
if (resID == 1) {
- field_0x2fab |= 2;
+ field_0x2fab |= (u8)0x2;
}
} else if (arg1 == 8) {
if (resID == 1) {
- field_0x2fab |= 1;
+ field_0x2fab |= (u8)0x1;
}
} else if (arg1 == 0) {
if (arg2 == 1) {
@@ -2042,7 +2050,11 @@ void daAlink_c::setGetSubBgm(int i_itemNo) {
/* fpcNm_ITEM_RED_BOTTLE */ SETYPE_ITEM_GET_MINI,
/* fpcNm_ITEM_GREEN_BOTTLE */ SETYPE_ITEM_GET_MINI,
/* fpcNm_ITEM_BLUE_BOTTLE */ SETYPE_ITEM_GET_MINI,
+#if PLATFORM_SHIELD
+ /* fpcNm_ITEM_MILK_BOTTLE */ SETYPE_ITEM_GET,
+#else
/* fpcNm_ITEM_MILK_BOTTLE */ SETYPE_ITEM_GET_MINI,
+#endif
/* fpcNm_ITEM_HALF_MILK_BOTTLE */ SETYPE_ITEM_GET,
/* fpcNm_ITEM_OIL_BOTTLE */ SETYPE_ITEM_GET_MINI,
/* fpcNm_ITEM_WATER_BOTTLE */ SETYPE_NONE,
@@ -2217,6 +2229,8 @@ void daAlink_c::setGetSubBgm(int i_itemNo) {
}
BOOL daAlink_c::checkTreasureRupeeReturn(int i_itemNo) const {
+ static const int dummy = 0;
+
if (i_itemNo == fpcNm_ITEM_LINKS_SAVINGS) {
i_itemNo = fpcNm_ITEM_PURPLE_RUPEE;
}
@@ -3244,7 +3258,7 @@ int daAlink_c::procHandPatInit() {
mNormalSpeed = 0.0f;
setOldRootQuaternion(0, -0x8000, 0);
- shape_angle.y += 0x8000;
+ ANGLE_ADD_2(shape_angle.y, 0x8000);
mProcVar2.field_0x300c = 0;
mProcVar3.field_0x300e = 0;
return 1;
@@ -3270,7 +3284,7 @@ int daAlink_c::procHandPat() {
if (checkAnmEnd(frameCtrl_p)) {
setSingleAnimeBase(ANM_WAIT_B_TO_A);
mProcVar2.field_0x300c = 1;
- shape_angle.y += 0x8000;
+ ANGLE_ADD_2(shape_angle.y, 0x8000);
mPrevAngleY = shape_angle.y;
current.angle.y = shape_angle.y;
setOldRootQuaternion(0, -0x8000, 0);
@@ -3335,11 +3349,12 @@ int daAlink_c::procCoFogDead() {
}
}
+ int roomNo;
if (mProcVar0.field_0x3008 > 0) {
mProcVar0.field_0x3008--;
} else if (mProcVar0.field_0x3008 == 0) {
- if (dStage_changeScene(daTagMist_c::getPlayerNo(), 0.0f, 5, fopAcM_GetRoomNo(this),
- shape_angle.y, -1))
+ roomNo = fopAcM_GetRoomNo(this);
+ if (dStage_changeScene(daTagMist_c::getPlayerNo(), 0.0f, 5, roomNo, shape_angle.y, -1))
{
seStartSystem(Z2SE_FORCE_BACK);
mProcVar0.field_0x3008--;
@@ -3600,7 +3615,7 @@ int daAlink_c::procWolfSnowEscape() {
if (checkAnmEnd(frameCtrl_p)) {
setOldRootQuaternion(0, -0x8000, 0);
- shape_angle.y += 0x8000;
+ ANGLE_ADD_2(shape_angle.y, 0x8000);
mPrevAngleY = shape_angle.y;
current.angle.y = shape_angle.y;
@@ -4216,7 +4231,7 @@ int daAlink_c::procDungeonWarpSceneStartInit() {
#endif
current.pos.y += 120.0f;
- shape_angle.y += 0x7F7A;
+ ANGLE_ADD_2(shape_angle.y, 0x7F7A);
scale.set(0.0f, 1.5f, 0.0f);
mpLinkModel->setBaseScale(scale);
@@ -4247,7 +4262,7 @@ int daAlink_c::procDungeonWarpSceneStart() {
if (!var_r31) {
current.pos.y -= 5.0f;
} else {
- mProcVar2.field_0x300c -= 0x200;
+ ANGLE_SUB_2(mProcVar2.field_0x300c, 0x200);
if (mProcVar2.field_0x300c < 0) {
return checkNextAction(0);
}
@@ -4336,7 +4351,7 @@ void daAlink_c::skipPortalObjWarp() {
if (checkNoResetFlg3(FLG3_WARP_OBJ_DEMO) &&
(dComIfGp_TargetWarpPt_get() == 9 && dComIfGp_TransportWarp_check()))
{
- dStage_changeScene(2, 0.0f, 0, fopAcM_GetRoomNo(this), shape_angle.y, -1);
+ dStage_changeScene(2, 0.0f, 0, (int)fopAcM_GetRoomNo(this), shape_angle.y, -1);
} else {
dComIfGs_setTurnRestart(dMeter2Info_getWarpPos(), dMeter2Info_getWarpPlayerNo(),
dMeter2Info_getWarpRoomNo(), setParamData(dMeter2Info_getWarpRoomNo(), 0, 0xCA, 0));
@@ -4605,8 +4620,9 @@ int daAlink_c::procCoWarp() {
if (mDemo.getDemoMode() == daPy_demo_c::DEMO_UNK_45_e) {
if (mProcVar1.field_0x300a != 0) {
if (mGroundCode == 4) {
- dComIfGp_setNextStage(dComIfGp_getStartStageName(), mProcVar4.field_0x3010,
- fopAcM_GetRoomNo(this), -1, 0.0f, 5, 1, 0,
+ dComIfGp_setNextStage(dComIfGp_getStartStageName(),
+ mProcVar4.field_0x3010,
+ (int)fopAcM_GetRoomNo(this), -1, 0.0f, 5, 1, 0,
shape_angle.y, 1, 0);
changeOriginalDemo();
changeDemoMode(1, 0, 0, 0);
diff --git a/src/d/actor/d_a_alink_effect.inc b/src/d/actor/d_a_alink_effect.inc
index 97e4d1dc7c..f21068f2fa 100644
--- a/src/d/actor/d_a_alink_effect.inc
+++ b/src/d/actor/d_a_alink_effect.inc
@@ -9,7 +9,7 @@
#include "d/d_com_inf_game.h"
#include "d/d_k_wmark.h"
-EffParamProc daAlink_c::m_fEffParamProc[] = {
+const EffParamProc daAlink_c::m_fEffParamProc[] = {
&daAlink_c::setEffectFrontRollParam,
&daAlink_c::setEffectSlipParam,
&daAlink_c::setEffectSmallLandParam,
@@ -554,7 +554,7 @@ void daAlink_c::setEffect() {
(field_0x3198 == 0x14C || field_0x3198 == 0x14D || field_0x3198 == 0x155))
{
sp3C = TRUE;
- current.angle.y += 0x8000;
+ ANGLE_ADD_2(current.angle.y, 0x8000);
}
f32 temp_f30 = field_0x3798.absXZ(current.pos);
@@ -643,7 +643,7 @@ void daAlink_c::setEffect() {
}
if (sp3C) {
- current.angle.y += 0x8000;
+ ANGLE_ADD_2(current.angle.y, 0x8000);
}
setFirePointDamageEffect();
@@ -869,10 +869,6 @@ void daAlink_c::setSwordChargeEffect() {
}
void daAlink_c::setElecDamageEffect() {
- static Vec const localOffset = {0.0f, -10.0f, -10.0f};
- static Vec const localScale0 = {0.69999999f, 0.85f, 1.5f};
- static Vec const localScale1 = {1.0f, 0.85f, 1.5f};
-
static const u16 effName0[] = {
dPa_RM(ID_ZI_S_LK_BIRIBIRIA_A),
dPa_RM(ID_ZI_S_LK_BIRIBIRIA_B),
@@ -885,6 +881,10 @@ void daAlink_c::setElecDamageEffect() {
dPa_RM(ID_ZI_S_LK_BIRIBIRIC_C),
};
+ static Vec const localOffset = {0.0f, -10.0f, -10.0f};
+ static Vec const localScale0 = {0.69999999f, 0.85f, 1.5f};
+ static Vec const localScale1 = {1.0f, 0.85f, 1.5f};
+
cXyz pos;
const u16* effNameList;
@@ -938,11 +938,30 @@ void daAlink_c::clearCutTurnEffectID() {
}
void daAlink_c::setCutTurnEffect() {
+ if (mUnderFrameCtrl[0].getFrame() < mProcVar1.field_0x300a) {
+ return;
+ }
+
+ static Vec const waterEffScale = {1.5f, 1.5f, 1.5f};
+
+ static const int unused0 = 0;
+ static const int unused1 = 0;
+ static const int unused2 = 0;
+
static const u16 effNameNormal[] = {
ID_ZI_J_KAITENGIRI_A,
ID_ZI_J_KAITENGIRI_B,
};
+ static s16 leftRotNormal[] = {
+ cM_deg2s(180), cM_deg2s(45), cM_deg2s(13), cM_deg2s(180), cM_deg2s(45), cM_deg2s(13),
+ };
+
+ static Vec const leftTransNormal[] = {
+ {0.0f, 0.0f, 0.0f},
+ {0.0f, 30.0f, 0.0f},
+ };
+
static const u16 effNameLight[] = {
ID_ZI_J_KAITENGIRIL_A,
ID_ZI_J_KAITENGIRIL_B,
@@ -950,25 +969,18 @@ void daAlink_c::setCutTurnEffect() {
ID_ZI_J_KAITENGIRIL_D,
};
- static const u16 effNameWater[] = {
- ID_ZI_J_KAITENGIRI_INWTR_A,
- ID_ZI_J_KAITENGIRI_INWTR_B,
+ static s16 leftRotLight[] = {
+ cM_deg2s(180), cM_deg2s(100), cM_deg2s(13), cM_deg2s(180), cM_deg2s(80), cM_deg2s(13),
+ cM_deg2s(180), cM_deg2s(80), cM_deg2s(13), cM_deg2s(180), cM_deg2s(80), cM_deg2s(13),
};
- static Vec const waterEffScale = {1.5f, 1.5f, 1.5f};
-
- static Vec const leftTransNormal[] = {
- {0.0f, 0.0f, 0.0f},
- {0.0f, 30.0f, 0.0f},
- };
-
static Vec const leftTransLight[] = {
{0.0f, 0.0f, 0.0f},
{0.0f, 0.0f, 0.0f},
{0.0f, 35.0f, 0.0f},
{0.0f, 0.0f, 0.0f},
};
-
+
static u16 const effNameLarge[] = {
ID_ZI_J_KAITENGIRID_A,
ID_ZI_J_KAITENGIRID_B,
@@ -977,7 +989,13 @@ void daAlink_c::setCutTurnEffect() {
ID_ZI_J_KAITENGIRID_E,
ID_ZI_J_KAITENGIRID_F,
};
-
+
+ static s16 leftRotLarge[] = {
+ cM_deg2s(180), cM_deg2s(45), cM_deg2s(13), cM_deg2s(180), cM_deg2s(45), cM_deg2s(13),
+ cM_deg2s(180), cM_deg2s(60), cM_deg2s(13), cM_deg2s(180), cM_deg2s(60), cM_deg2s(13),
+ cM_deg2s(180), cM_deg2s(60), cM_deg2s(13), cM_deg2s(180), cM_deg2s(60), cM_deg2s(13),
+ };
+
static Vec const leftTransLarge[] = {
{0.0f, 0.0f, 0.0f},
{0.0f, 35.0f, 0.0f},
@@ -987,97 +1005,86 @@ void daAlink_c::setCutTurnEffect() {
{0.0f, 50.0f, 0.0f},
};
+ static const u16 effNameWater[] = {
+ ID_ZI_J_KAITENGIRI_INWTR_A,
+ ID_ZI_J_KAITENGIRI_INWTR_B,
+ };
+
+ static s16 leftRotWater[] = {
+ cM_deg2s(-90), cM_deg2s(0), cM_deg2s(180), cM_deg2s(0), cM_deg2s(0), cM_deg2s(180),
+ };
+
static Vec const leftTransWater[] = {
{0.0f, 0.0f, 0.0f},
{0.0f, 0.0f, 0.0f},
};
- if (!(mUnderFrameCtrl[0].getFrame() < mProcVar1.field_0x300a)) {
- static s16 leftRotNormal[] = {
- cM_deg2s(180), cM_deg2s(45), cM_deg2s(13), cM_deg2s(180), cM_deg2s(45), cM_deg2s(13),
- };
-
- static s16 leftRotLight[] = {
- cM_deg2s(180), cM_deg2s(100), cM_deg2s(13), cM_deg2s(180), cM_deg2s(80), cM_deg2s(13),
- cM_deg2s(180), cM_deg2s(80), cM_deg2s(13), cM_deg2s(180), cM_deg2s(80), cM_deg2s(13),
- };
-
- static s16 leftRotLarge[] = {
- cM_deg2s(180), cM_deg2s(45), cM_deg2s(13), cM_deg2s(180), cM_deg2s(45), cM_deg2s(13),
- cM_deg2s(180), cM_deg2s(60), cM_deg2s(13), cM_deg2s(180), cM_deg2s(60), cM_deg2s(13),
- cM_deg2s(180), cM_deg2s(60), cM_deg2s(13), cM_deg2s(180), cM_deg2s(60), cM_deg2s(13),
- };
-
- static s16 leftRotWater[] = {
- cM_deg2s(-90), cM_deg2s(0), cM_deg2s(180), cM_deg2s(0), cM_deg2s(0), cM_deg2s(180),
- };
-
- u32* emitterId = field_0x3204;
- const u16* effNameList;
- JGeometry::TVec3<s16>* rot;
- JGeometry::TVec3<f32>* trans;
- int effNum;
- BOOL sp18 = FALSE;
-
- if (checkNoResetFlg0(FLG0_WATER_IN_MOVE)) {
- if (checkZoraWearAbility()) {
- effNameList = effNameWater;
- rot = (JGeometry::TVec3<s16>*)leftRotWater;
- trans = (JGeometry::TVec3<f32>*)leftTransWater;
- effNum = 2;
- if (mCutType == CUT_TYPE_LARGE_TURN_RIGHT || mCutType == CUT_TYPE_LARGE_TURN_LEFT) {
- sp18 = TRUE;
- }
- } else {
- return;
+ JPABaseEmitter* emitter;
+ u32* emitterId = field_0x3204;
+ const u16* effNameList;
+ JGeometry::TVec3<s16>* rot;
+ JGeometry::TVec3<f32>* trans;
+ int effNum;
+ BOOL sp18 = FALSE;
+
+ if (checkNoResetFlg0(FLG0_WATER_IN_MOVE)) {
+ if (checkZoraWearAbility()) {
+ effNameList = effNameWater;
+ rot = (JGeometry::TVec3<s16>*)leftRotWater;
+ trans = (JGeometry::TVec3<f32>*)leftTransWater;
+ effNum = 2;
+ if (mCutType == CUT_TYPE_LARGE_TURN_RIGHT || mCutType == CUT_TYPE_LARGE_TURN_LEFT) {
+ sp18 = TRUE;
}
- } else if (mCutType == CUT_TYPE_LARGE_TURN_RIGHT || mCutType == CUT_TYPE_LARGE_TURN_LEFT) {
- effNameList = effNameLarge;
- rot = (JGeometry::TVec3<s16>*)leftRotLarge;
- trans = (JGeometry::TVec3<f32>*)leftTransLarge;
- effNum = 6;
- } else if (checkNoResetFlg3(FLG3_UNK_100000)) {
- effNameList = effNameLight;
- rot = (JGeometry::TVec3<s16>*)leftRotLight;
- trans = (JGeometry::TVec3<f32>*)leftTransLight;
- effNum = 4;
} else {
- effNameList = effNameNormal;
- rot = (JGeometry::TVec3<s16>*)leftRotNormal;
- trans = (JGeometry::TVec3<f32>*)leftTransNormal;
- effNum = 2;
+ return;
}
+ } else if (mCutType == CUT_TYPE_LARGE_TURN_RIGHT || mCutType == CUT_TYPE_LARGE_TURN_LEFT) {
+ effNameList = effNameLarge;
+ rot = (JGeometry::TVec3<s16>*)leftRotLarge;
+ trans = (JGeometry::TVec3<f32>*)leftTransLarge;
+ effNum = 6;
+ } else if (checkNoResetFlg3(FLG3_UNK_100000)) {
+ effNameList = effNameLight;
+ rot = (JGeometry::TVec3<s16>*)leftRotLight;
+ trans = (JGeometry::TVec3<f32>*)leftTransLight;
+ effNum = 4;
+ } else {
+ effNameList = effNameNormal;
+ rot = (JGeometry::TVec3<s16>*)leftRotNormal;
+ trans = (JGeometry::TVec3<f32>*)leftTransNormal;
+ effNum = 2;
+ }
- cXyz pos;
- mDoMtx_multVecZero(mpLinkModel->getAnmMtx(1), &pos);
+ cXyz pos;
+ mDoMtx_multVecZero(mpLinkModel->getAnmMtx(1), &pos);
- if (checkMagneBootsOn()) {
- mDoMtx_stack_c::transS(pos);
- mDoMtx_stack_c::concat(mMagneBootMtx);
- mDoMtx_stack_c::ZXYrotM(shape_angle);
- }
+ if (checkMagneBootsOn()) {
+ mDoMtx_stack_c::transS(pos);
+ mDoMtx_stack_c::concat(mMagneBootMtx);
+ mDoMtx_stack_c::ZXYrotM(shape_angle);
+ }
- for (int i = 0; i < effNum; i++, emitterId++, effNameList++, rot++, trans++) {
- JPABaseEmitter* emitter = setEmitter(emitterId, *effNameList, &pos, &shape_angle);
- if (emitter != NULL) {
- if (checkMagneBootsOn()) {
- emitter->setGlobalRTMatrix(mDoMtx_stack_c::get());
- }
+ for (int i = 0; i < effNum; i++, emitterId++, effNameList++, rot++, trans++) {
+ emitter = setEmitter(emitterId, *effNameList, &pos, &shape_angle);
+ if (emitter != NULL) {
+ if (checkMagneBootsOn()) {
+ emitter->setGlobalRTMatrix(mDoMtx_stack_c::get());
+ }
- if (mProcVar4.field_0x3010 == 0) {
- emitter->setLocalRotation(*rot);
- if (trans->y > 1.0f) {
- emitter->setLocalTranslation(*trans);
- }
+ if (mProcVar4.field_0x3010 == 0) {
+ emitter->setLocalRotation(*rot);
+ if (trans->y > 1.0f) {
+ emitter->setLocalTranslation(*trans);
}
+ }
- if (sp18) {
- if (i == 0) {
- emitter->setGlobalParticleScale(waterEffScale);
- } else {
- emitter->setVolumeSize(225);
- emitter->setAwayFromAxisSpeed(15.0f);
- }
+ if (sp18) {
+ if (i == 0) {
+ emitter->setGlobalParticleScale(waterEffScale);
+ } else {
+ emitter->setVolumeSize(225);
+ emitter->setAwayFromAxisSpeed(15.0f);
}
}
}
@@ -1094,6 +1101,8 @@ void daAlink_c::setHorseCutTurnEffect() {
}
void daAlink_c::setCutLargeJumpLandEffect() {
+ static const int dummy = 0;
+
cXyz pos(current.pos.x + cM_ssin(shape_angle.y) * 20.0f, current.pos.y + 50.0f, current.pos.z + cM_scos(shape_angle.y) * 20.0f);
csXyz rot;
cM3dGPla tripla;
@@ -1195,7 +1204,7 @@ void daAlink_c::setWolfRollAttackEffect() {
csXyz rot(shape_angle.x, shape_angle.y, 0);
if (mProcVar2.field_0x300c == 0) {
- rot.x += 0x8000;
+ ANGLE_ADD_2(rot.x, 0x8000);
}
setEmitter(&field_0x3204[0], ID_ZI_J_WL_KAITENAT_A, &pos, &rot);
@@ -1243,6 +1252,7 @@ void daAlink_c::setWolfDigEffect() {
emitter->setAwayFromAxisSpeed(var_f30);
dComIfGp_particle_levelEmitterOnEventMove(field_0x32cc);
}
+ (void)0;
} else if (field_0x3198 == 7) {
var_r29 = 0;
var_r28 = ID_ZI_J_DASHWTRA_C;
@@ -1364,6 +1374,7 @@ void daAlink_c::setWolfJumpAttackEffect() {
}
void daAlink_c::setWolfBarrierHitEffect(dBgS_LinChk& i_linchk) {
+ static const int dummy = 0;
static const u16 normalNameID[] = {
dPa_RM(ID_ZI_S_NSBARRIER_COLL_A),
dPa_RM(ID_ZI_S_NSBARRIER_COLL_B),
@@ -1406,6 +1417,8 @@ void daAlink_c::setCutWaterDropEffect() {
}
void daAlink_c::setWaterDropEffect() {
+ static const int dummy1 = 0;
+ static const int dummy2 = 0;
static const u16 effDataTable[] = {
ID_ZI_J_LK_NUREPOTA_BACKBONE2,
ID_ZI_J_LK_NUREPOTA_WAIST,
@@ -1467,7 +1480,7 @@ void daAlink_c::setWaterDropEffect() {
if (field_0x32c0[i] != 0) {
if (field_0x32a0[i].a > -20) {
- field_0x32a0[i].a -= 2;
+ field_0x32a0[i].a -= (s16)2;
if (field_0x32a0[i].a < -20) {
field_0x32a0[i].a = -20;
@@ -1507,6 +1520,8 @@ void daAlink_c::setSwordUpColorEffect() {
}
void daAlink_c::setSwordCutSplash() {
+ static Vec const swordCutSplashScale = {0.6f, 0.6f, 0.6f};
+
static const u16 cutSplashName[] = {
ID_ZI_J_DOWNWTRA_A,
ID_ZI_J_DOWNWTRA_B,
@@ -1514,8 +1529,6 @@ void daAlink_c::setSwordCutSplash() {
ID_ZI_J_DOWNWTRA_D,
};
- static Vec const swordCutSplashScale = {0.6f, 0.6f, 0.6f};
-
if (mCutType != 0 && mProcID != PROC_CUT_TURN && getCutAtFlg() && checkNoResetFlg0(FLG0_UNK_80) && mEquipItem == 0x103) {
if (mSwordTopPos.y <= mWaterY && field_0x34b0.y > mWaterY) {
cXyz sp14(mSwordTopPos.x, mWaterY, mSwordTopPos.z);
@@ -1543,7 +1556,7 @@ void daAlink_c::setMetamorphoseEffectStartLink() {
JPABaseEmitter* emitter = setEmitter(&field_0x3200, ID_ZI_J_ATOW_C, &cXyz::Zero, NULL);
#if VERSION == VERSION_SHIELD_DEBUG
- static Vec effScale = {1.33f, 1.0f, 1.0f};
+ static const Vec effScale = {1.33f, 1.0f, 1.0f};
if (emitter != NULL) {
emitter->setGlobalParticleScale(effScale);
}
@@ -1752,28 +1765,30 @@ void daAlink_c::initFirePointDamageEffect(cXyz const* param_0, dCcD_GObjInf* i_h
}
}
- if (i != 4) {
- cXyz* dmg_vec = getDamageVec(i_hitObj);
-
- csXyz sp38(dmg_vec->atan2sY_XZ(), dmg_vec->atan2sX_Z(), 0);
- csXyz sp40;
- cXyz sp30;
+ if (i == 4) {
+ return;
+ }
- int var_r30 = field_0x2e44.getHitmarkPosAndAngle(param_0, &sp38, &sp30, &sp40, 0);
- if (var_r30 == -1 || (!checkWolf() && (var_r30 == 1 || var_r30 == 15 || var_r30 == 16))) {
- return;
- }
+ cXyz* dmg_vec = getDamageVec(i_hitObj);
- eff->field_0x2 = field_0x2e44.getJntNum(var_r30);
- eff->field_0xc = *param_0;
- eff->field_0x24 = cXyz::Zero;
- eff->field_0x0 = 1;
- eff->field_0x4 = 0;
+ csXyz sp38(dmg_vec->atan2sY_XZ(), dmg_vec->atan2sX_Z(), 0);
+ csXyz sp40;
+ cXyz sp30;
- mDoMtx_stack_c::copy(mpLinkModel->getAnmMtx(eff->field_0x2));
- mDoMtx_stack_c::inverse();
- mDoMtx_stack_c::multVec(&sp30, &eff->field_0x18);
+ int var_r30 = field_0x2e44.getHitmarkPosAndAngle(param_0, &sp38, &sp30, &sp40, 0);
+ if (var_r30 == -1 || (!checkWolf() && (var_r30 == 1 || var_r30 == 15 || var_r30 == 16))) {
+ return;
}
+
+ eff->field_0x2 = field_0x2e44.getJntNum(var_r30);
+ eff->field_0xc = *param_0;
+ eff->field_0x24 = cXyz::Zero;
+ eff->field_0x0 = 1;
+ eff->field_0x4 = 0;
+
+ mDoMtx_stack_c::copy(mpLinkModel->getAnmMtx(eff->field_0x2));
+ mDoMtx_stack_c::inverse();
+ mDoMtx_stack_c::multVec(&sp30, &eff->field_0x18);
}
void daAlink_c::setFirePointDamageEffect() {
@@ -1827,6 +1842,11 @@ void daAlink_c::setFirePointDamageEffect() {
}
void daAlink_c::setFreezeEffect() {
+ static const int dummy = 0;
+ static const u16 effName[] = {
+ dPa_RM(ID_ZI_S_LK_FREEZEND_A),
+ dPa_RM(ID_ZI_S_LK_FREEZEND_B),
+ };
static Vec const effScale = {1.0f, 1.8f, 1.0f};
static Vec const wolfEffScale = {1.0f, 1.0f, 1.5f};
static Vec const offsetPos = {0.0f, 0.0f, -10.0f};
@@ -1859,10 +1879,6 @@ void daAlink_c::setFreezeEffect() {
}
for (int i = 0; i < 2; i++) {
- static const u16 effName[] = {
- dPa_RM(ID_ZI_S_LK_FREEZEND_A),
- dPa_RM(ID_ZI_S_LK_FREEZEND_B),
- };
dComIfGp_particle_setColor(effName[i], &pos, &tevStr, NULL, NULL, 0.0f, 0xFF);
}
@@ -1900,6 +1916,7 @@ void daAlink_c::clearWoodShieldBurnEffect() {
}
void daAlink_c::setWoodShieldBurnOutEffect() {
+ static const int dummy = 0;
static const u16 effName[] = {
ID_ZI_J_LK_SH_BURN_C,
ID_ZI_J_LK_SH_BURN_D,
@@ -2061,7 +2078,7 @@ void daAlink_blur_c::draw() {
GXTexCoord2s16(var_r27, 0);
var_r27 = var_r28;
- var_r28 += temp_r26;
+ ANGLE_ADD_2(var_r28, temp_r26);
}
GXEnd();
diff --git a/src/d/actor/d_a_alink_grab.inc b/src/d/actor/d_a_alink_grab.inc
index 6175baea5d..5f9a02e8e9 100644
--- a/src/d/actor/d_a_alink_grab.inc
+++ b/src/d/actor/d_a_alink_grab.inc
@@ -2103,7 +2103,7 @@ int daAlink_c::procGoatMove() {
int temp_r27 = abs(mMoveAngle);
if (checkInputOnR() && temp_r27 > 0x800 && temp_r27 < 0x7800 && (fabsf(sp8.x) < 250.0f || (sp8.x > 0.0f && mMoveAngle < 0) || (sp8.x < 0.0f && mMoveAngle > 0))) {
if (abs((s16)(mMoveAngle - current.angle.y)) > 0x4000) {
- current.angle.y += 0x8000;
+ ANGLE_ADD_2(current.angle.y, 0x8000);
mNormalSpeed *= -1.0f;
if (field_0x2f98 == 3) {
@@ -2294,7 +2294,7 @@ int daAlink_c::procGoatCatch() {
if (checkAnmEnd(framectrl)) {
if (mProcVar5.field_0x3012 == 0) {
setOldRootQuaternion(0, -0x8000, 0);
- shape_angle.y += 0x8000;
+ ANGLE_ADD_2(shape_angle.y, 0x8000);
current.angle.y = shape_angle.y;
field_0x2fe4 = shape_angle.y;
}
@@ -2537,7 +2537,7 @@ int daAlink_c::procGoronMove() {
f32 var_f31;
if (checkInputOnR() && temp_r28 > 0x800 && temp_r28 < 0x7800) {
if (abs((s16)(mMoveAngle - current.angle.y)) > 0x4000) {
- current.angle.y += 0x8000;
+ ANGLE_ADD_2(current.angle.y, 0x8000);
mNormalSpeed *= -1.0f;
if (field_0x2f98 == 3) {
diff --git a/src/d/actor/d_a_alink_guard.inc b/src/d/actor/d_a_alink_guard.inc
index a238b98735..e5bb97e737 100644
--- a/src/d/actor/d_a_alink_guard.inc
+++ b/src/d/actor/d_a_alink_guard.inc
@@ -92,14 +92,13 @@ void daAlink_c::setArrowShieldActor(fopAc_ac_c* i_actor, int param_1) {
fopAcM_delete(first_arrow);
}
- int i = 0;
- for (; i < 15; i++) {
- mShieldArrowIDs[i] = mShieldArrowIDs[i + 1];
- field_0x2f7c[i] = field_0x2f7c[i + 1];
+ for (arrow_num = 0; arrow_num < 15; arrow_num++) {
+ mShieldArrowIDs[arrow_num] = mShieldArrowIDs[arrow_num + 1];
+ field_0x2f7c[arrow_num] = field_0x2f7c[arrow_num + 1];
}
- mShieldArrowIDs[i] = new_arrow_id;
- field_0x2f7c[i] = 10;
+ mShieldArrowIDs[arrow_num] = new_arrow_id;
+ field_0x2f7c[arrow_num] = 10;
dComIfGp_setItemArrowNumCount(1);
fopAcM_createItemForSimpleDemo(&current.pos, fpcNm_ITEM_ARROW_10, -1, NULL, NULL, 0.0f, 0.0f);
@@ -201,6 +200,7 @@ void daAlink_c::setShieldGuard() {
void daAlink_c::setGuardSe(dCcD_GObjInf* i_objinf) {
int var_r31;
+ u32 hit_se;
BOOL isRebound;
if (checkWoodShieldEquipNotIronBall() && !checkMagicArmorNoDamage()) {
@@ -211,7 +211,6 @@ void daAlink_c::setGuardSe(dCcD_GObjInf* i_objinf) {
isRebound = TRUE;
}
- u32 hit_se;
if (i_objinf->GetTgHitGObj() != NULL && i_objinf->GetTgHitGObj()->GetAtType() == AT_TYPE_BOMB) {
hit_se = Z2SE_HIT_METAL_WEAPON;
} else {
diff --git a/src/d/actor/d_a_alink_hang.inc b/src/d/actor/d_a_alink_hang.inc
index 2b6847a56a..563bb9c905 100644
--- a/src/d/actor/d_a_alink_hang.inc
+++ b/src/d/actor/d_a_alink_hang.inc
@@ -35,6 +35,8 @@ int daAlink_c::getHangDirectionFromAngle() {
}
BOOL daAlink_c::hangMoveBgCheck(s16 param_0, cXyz* param_1) {
+ static const int dummy = 0;
+
BOOL rt = false;
cM3dGPla sp78;
@@ -902,7 +904,7 @@ int daAlink_c::setDragonHangPos() {
cXyz sp18;
mDoMtx_stack_c::multVecSR(&cXyz::BaseY, &sp18);
if (sp18.y < 0.0f) {
- shape_angle.y += 0x8000;
+ ANGLE_ADD_2(shape_angle.y, 0x8000);
shape_angle.x = 0x8000 - shape_angle.x;
shape_angle.z *= -1;
}
@@ -1418,7 +1420,7 @@ int daAlink_c::procLadderDownStartInit() {
dComIfGp_setPlayerStatus0(0, 0x2000000);
setOldRootQuaternion(0, 0x8000, 0);
- shape_angle.y += 0x8000;
+ ANGLE_ADD_2(shape_angle.y, 0x8000);
current.angle.y = shape_angle.y;
f32 var_f31 = cM_ssin(field_0x306e);
@@ -2457,7 +2459,7 @@ int daAlink_c::procClimbToRoof() {
field_0x2f99 = 2;
if (checkAnmEnd(frameCtrl)) {
- shape_angle.y += 0x8000;
+ ANGLE_ADD_2(shape_angle.y, 0x8000);
current.angle.y = shape_angle.y;
mPrevAngleY = shape_angle.y;
setOldRootQuaternion(0, 0x8000, 0);
@@ -2495,7 +2497,7 @@ void daAlink_c::setRoofHangHandOnSE(cBgS_PolyInfo* unused) {
if (frame_ctrl->checkPass(field_0x3478)) {
return;
} else if (frame_ctrl->checkPass(field_0x347c)) {
-
+ (void)0;
}
}
@@ -2842,7 +2844,7 @@ int daAlink_c::procRoofHangTurnInit() {
if ((s16)(mMoveAngle - shape_angle.y) < 0) {
anm_speed = -mpHIO->mRoofHang.m.mInvertASpeed;
mProcVar0.field_0x3008 = 1;
- shape_angle.y += 0x8000;
+ ANGLE_ADD_2(shape_angle.y, 0x8000);
setOldRootQuaternion(0, -0x8000, 0);
field_0x2060->getOldFrameTransInfo(0)->mTranslate.z = -8.899365425109863f;
mProcVar2.field_0x300c = mMoveAngle;
@@ -2881,7 +2883,7 @@ int daAlink_c::procRoofHangTurn() {
daPy_frameCtrl_c* frame_ctrl = mUnderFrameCtrl;
if (checkAnmEnd(frame_ctrl)) {
if (mProcVar0.field_0x3008 == 0) {
- shape_angle.y += 0x8000;
+ ANGLE_ADD_2(shape_angle.y, 0x8000);
current.angle.y = shape_angle.y;
setOldRootQuaternion(0, -0x8000, 0);
field_0x2060->getOldFrameTransInfo(0)->mTranslate.z += 17.798730850219727f;
diff --git a/src/d/actor/d_a_alink_hook.inc b/src/d/actor/d_a_alink_hook.inc
index efcb3b8bc0..5f609a7017 100644
--- a/src/d/actor/d_a_alink_hook.inc
+++ b/src/d/actor/d_a_alink_hook.inc
@@ -18,6 +18,8 @@ enum {
};
void daAlink_c::hsChainShape_c::draw() {
+ static const int dummy = 0;
+
daAlink_c* alink = (daAlink_c*)getUserArea();
J3DModelData* modelData = alink->getItemModelData();
J3DMaterial* material = modelData->getMaterialNodePointer(0);
@@ -50,7 +52,8 @@ void daAlink_c::hsChainShape_c::draw() {
ppos++;
pangle++;
- for (int i = 0; i < 101; i++, ppos++, pangle++) {
+ int i;
+ for (i = 0; i < 101; i++, ppos++, pangle++) {
mDoMtx_stack_c::copy(j3dSys.getViewMtx());
mDoMtx_stack_c::transM(*ppos);
mDoMtx_stack_c::ZXYrotM(*pangle);
@@ -65,7 +68,7 @@ void daAlink_c::hsChainShape_c::draw() {
cXyz spC8;
cXyz spBC;
- for (int i = 0; i < 2; i++) {
+ for (i = 0; i < 2; i++) {
cXyz* sp48;
csXyz* sp44;
@@ -91,7 +94,7 @@ void daAlink_c::hsChainShape_c::draw() {
spE = -0x3000;
}
- sp10 = sp44->y;
+ sp10 = (s16)sp44->y;
sp14 = sp44->z + spE;
f32 var_f29 = spC8.abs();
@@ -144,7 +147,7 @@ void daAlink_c::hsChainShape_c::draw() {
csXyz sp64(sp6C);
f32 sp34 = M_PI / maxDistanceF;
-
+
f32 temp_f27;
f32 var_f26 = 0.0f;
f32 var_f28;
@@ -153,6 +156,7 @@ void daAlink_c::hsChainShape_c::draw() {
if (alink->getHookshotStopTime() & 1) {
var_f28 *= -1.0f;
}
+ (void)0;
while (maxDistanceF > var_f30) {
temp_f27 = var_f28 * cM_fsin(sp34 * var_f30);
@@ -172,7 +176,7 @@ void daAlink_c::hsChainShape_c::draw() {
material->getShape()->simpleDrawCache();
- sp64.z += 0x3000;
+ ANGLE_ADD_2(sp64.z, 0x3000);
var_f26 = temp_f27;
var_f30 += fabsf(cM_scos(spC)) * 5.0f;
@@ -183,15 +187,15 @@ void daAlink_c::hsChainShape_c::draw() {
const cXyz& subChainTopPos = alink->getHsSubChainTopPos();
maxDistance = subChainRootPos - subChainTopPos;
- f32 temp_f1 = maxDistance.abs();
- if (temp_f1 > 1.0f) {
- maxDistance *= (1.0f / temp_f1);
+ maxDistanceF = maxDistance.abs();
+ if (maxDistanceF > 1.0f) {
+ maxDistance *= (1.0f / maxDistanceF);
var_f30 = 0.0f;
-
+
sp98 = subChainTopPos;
sp6C.set(maxDistance.atan2sY_XZ(), maxDistance.atan2sX_Z(), 0);
- while (temp_f1 > var_f30) {
+ while (maxDistanceF > var_f30) {
mDoMtx_stack_c::copy(j3dSys.getViewMtx());
mDoMtx_stack_c::transM(sp98);
mDoMtx_stack_c::ZXYrotM(sp6C);
@@ -202,7 +206,7 @@ void daAlink_c::hsChainShape_c::draw() {
material->getShape()->simpleDrawCache();
sp98 += maxDistance * 5.0f;
- sp6C.z += 0x3000;
+ ANGLE_ADD_2(sp6C.z, 0x3000);
var_f30 += 5.0f;
}
}
@@ -212,8 +216,7 @@ void daAlink_c::hsChainShape_c::draw() {
void daAlink_c::hookshotAtHitCallBack(dCcD_GObjInf* i_atObjInf, fopAc_ac_c* i_tgActor,
dCcD_GObjInf* i_tgObjInf) {
if (i_tgActor != NULL && fopAcM_IsActor(i_tgActor) && !i_tgObjInf->ChkTgHookshotThrough()) {
- cXyz* hit_pos_p = i_atObjInf->GetAtHitPosP();
- f32 dist_to_hitpos = getHsChainTopPos().abs(*hit_pos_p);
+ f32 dist_to_hitpos = getHsChainTopPos().abs(*i_atObjInf->GetAtHitPosP());
if (dist_to_hitpos < mSearchBallScale) {
mSearchBallScale = dist_to_hitpos;
@@ -709,7 +712,13 @@ void daAlink_c::setHookshotReturnEnd() {
field_0x2060->initOldFrameMorf(3.0f, field_0x30a8, field_0x30aa);
} else if (checkHookshotShootAnime()) {
int _;
- setUpperAnimeBaseSpeed(dRes_ID_ALANM_BCK_HSWAIT_e, checkAttentionLock() ? mpHIO->mItem.mHookshot.m.mWaitAnmSpeed : 0.0f, 3.0f);
+ f32 anmSpeed;
+ if (!checkAttentionLock()) {
+ anmSpeed = 0.0f;
+ } else {
+ anmSpeed = mpHIO->mItem.mHookshot.m.mWaitAnmSpeed;
+ }
+ setUpperAnimeBaseSpeed(dRes_ID_ALANM_BCK_HSWAIT_e, anmSpeed, 3.0f);
}
mFastShotTime = 0;
@@ -796,25 +805,24 @@ void daAlink_c::setHookshotPos() {
mDoMtx_stack_c::transM(-2.0f, 1.0f, 1.0f);
mDoMtx_stack_c::XYZrotM(cM_deg2s(5.7f), cM_deg2s(162.0f), 0);
- J3DModel* var_r27;
+ J3DModel* model;
if (field_0x3020 == 0) {
- var_r27 = mHeldItemModel;
+ model = mHeldItemModel;
} else {
- var_r27 = field_0x0710;
+ model = field_0x0710;
}
- var_r27->setBaseTRMtx(mDoMtx_stack_c::get());
+ model->setBaseTRMtx(mDoMtx_stack_c::get());
mDoMtx_stack_c::copy(mpLinkModel->getAnmMtx(mRightItemJntNo));
mDoMtx_stack_c::transM(-2.0f, 0.0f, 1.0f);
mDoMtx_stack_c::XYZrotM(cM_deg2s(-78.0f), cM_deg2s(182.0f), cM_deg2s(-99.0f));
- J3DModel* var_r27_2;
if (field_0x3020 == 0) {
- var_r27_2 = field_0x0710;
+ model = field_0x0710;
} else {
- var_r27_2 = mHeldItemModel;
+ model = mHeldItemModel;
}
- var_r27_2->setBaseTRMtx(mDoMtx_stack_c::get());
+ model->setBaseTRMtx(mDoMtx_stack_c::get());
if (mItemMode == 2 || mItemMode == HS_MODE_SHOOT_e) {
field_0x33dc += 1.0f;
@@ -865,6 +873,7 @@ void daAlink_c::setHookshotPos() {
mpHookSound->framework(0, mVoiceReverbIntensity);
fopAc_ac_c* targetAc_p = mHookTargetAcKeep.getActor();
+ f32 var_f29;
f32 return_speed;
f32 shoot_speed;
f32 max_length;
@@ -981,7 +990,7 @@ void daAlink_c::setHookshotPos() {
if (mHookTargetAcKeep.getActor() != NULL) {
mHookshotTopPos = field_0x381c;
- fopAc_ac_c* targetAc_p = mHookTargetAcKeep.getActor();
+ targetAc_p = mHookTargetAcKeep.getActor();
if (targetAc_p != NULL && (targetAc_p->actor_status & 0x280000)) {
mHookTargetAcKeep.setData(targetAc_p);
mIronBallCenterPos = mHookshotTopPos - targetAc_p->current.pos;
@@ -1026,12 +1035,12 @@ void daAlink_c::setHookshotPos() {
}
cXyz sp17C = mHookshotTopPos - mHeldItemRootPos;
- f32 temp_f1 = sp17C.abs();
- sp17C *= 1.0f / temp_f1;
+ var_f29 = sp17C.abs();
+ sp17C *= 1.0f / var_f29;
- f32 temp_f26 = max_length - 15.0f;
- if (temp_f1 >= temp_f26) {
- mHookshotTopPos = mHeldItemRootPos + (sp17C * temp_f26);
+ f32 var_f26 = max_length - 15.0f;
+ if (var_f29 >= var_f26) {
+ mHookshotTopPos = mHeldItemRootPos + (sp17C * var_f26);
mItemMode = HS_MODE_RETURN_e;
}
@@ -1070,9 +1079,9 @@ void daAlink_c::setHookshotPos() {
mPolyInfo2.SetPolyInfo(mRopeLinChk);
if (dComIfG_Bgsp().ChkMoveBG_NoDABg(mRopeLinChk)) {
- fopAc_ac_c* target_ac = dComIfG_Bgsp().GetActorPointer(mRopeLinChk);
- mHookTargetAcKeep.setData(target_ac);
- fopAcM_setHookCarryNow(target_ac);
+ targetAc_p = dComIfG_Bgsp().GetActorPointer(mRopeLinChk);
+ mHookTargetAcKeep.setData(targetAc_p);
+ fopAcM_setHookCarryNow(targetAc_p);
}
} else {
int poly_att0 = dComIfG_Bgsp().GetPolyAtt0(mRopeLinChk);
@@ -1131,7 +1140,7 @@ void daAlink_c::setHookshotPos() {
if (dComIfG_Bgsp().LineCross(mpHookshotLinChk) &&
dComIfG_Bgsp().GetPolyAtt0(*mpHookshotLinChk) != 6)
{
- fpc_ProcID id = fopKyM_createWpillar(mpHookshotLinChk->GetCrossP(), 0.5f, 0);
+ fopKyM_createWpillar(mpHookshotLinChk->GetCrossP(), 0.5f, 0);
mDoAud_seStart(Z2SE_CM_BODYFALL_WATER_S, mpHookshotLinChk->GetCrossP(), 0,
mVoiceReverbIntensity);
}
@@ -1217,7 +1226,7 @@ void daAlink_c::hookshotRoofTurn() {
if (checkInputOnR()) {
int stick_direction = getDirectionFromAngle(mStickAngle);
- int angle = (int)(1024.0f * mMoveValue * mMoveValue);
+ s16 angle = 1024.0f * mMoveValue * mMoveValue;
if (stick_direction == DIR_LEFT) {
shape_angle.y += angle;
@@ -1252,11 +1261,11 @@ void daAlink_c::hookshotRoofTurn() {
u8 status_dir = 0;
if (current.pos.y < max_rise_y) {
- status_dir |= 8;
+ status_dir |= (u8)0x8;
}
if (current.pos.y > min_descend_y) {
- status_dir |= 2;
+ status_dir |= (u8)0x2;
}
if (!checkEventRun()) {
diff --git a/src/d/actor/d_a_alink_horse.inc b/src/d/actor/d_a_alink_horse.inc
index 69cf4cfe57..a637ef42cb 100644
--- a/src/d/actor/d_a_alink_horse.inc
+++ b/src/d/actor/d_a_alink_horse.inc
@@ -281,9 +281,14 @@ void daAlink_c::setHorseSwordUpAnime() {
void daAlink_c::setHorseTurnUpperAnime(BOOL i_isTurnL) {
if (checkHorseNoUpperAnime() || (!i_isTurnL && checkHorseTurnRAnime()) ||
- (i_isTurnL == TRUE && checkHorseTurnLAnime()))
- {
- setUpperAnimeBaseMorf(!i_isTurnL ? (u16)dRes_ID_ALANM_BCK_TURNLS_e : (u16)dRes_ID_ALANM_BCK_TURNRS_e, 4.0f);
+ (i_isTurnL == TRUE && checkHorseTurnLAnime())) {
+ u16 anmResIdx;
+ if (i_isTurnL == FALSE) {
+ anmResIdx = (u16)dRes_ID_ALANM_BCK_TURNLS_e;
+ } else {
+ anmResIdx = (u16)dRes_ID_ALANM_BCK_TURNRS_e;
+ }
+ setUpperAnimeBaseMorf(anmResIdx, 4.0f);
}
}
@@ -1095,7 +1100,11 @@ int daAlink_c::checkHorseGetOffDirection() {
lin_end_pos.set(ride_actor_p->current.pos.x + cM_ssin(var_r28) * 125.0f, lin_start_pos.y,
ride_actor_p->current.pos.z + cM_scos(var_r28) * 125.0f);
+#if PLATFORM_SHIELD
+ f32 check_y[3];
+#else
f32 check_y[3] = {0.0f, 0.0f, 0.0f};
+#endif
check_y[0] = current.pos.y;
check_y[1] = ride_actor_p->current.pos.y + (current.pos.y - ride_actor_p->current.pos.y) * 0.5f;
@@ -1103,8 +1112,7 @@ int daAlink_c::checkHorseGetOffDirection() {
check_y[2] = var_f31;
int check_no;
- int i;
- for (i = 0; i < 2; i++) {
+ for (int i = 0; i < 2; i++) {
for (check_no = 0; check_no < 3; check_no++) {
lin_start_pos.y = check_y[check_no];
lin_end_pos.y = lin_start_pos.y;
@@ -1123,7 +1131,7 @@ int daAlink_c::checkHorseGetOffDirection() {
lin_end_pos.x = lin_start_pos.x * 2.0f - lin_end_pos.x;
lin_end_pos.z = lin_start_pos.z * 2.0f - lin_end_pos.z;
- var_r28 += 0x8000;
+ ANGLE_ADD_2(var_r28, 0x8000);
}
return 2;
@@ -1319,7 +1327,7 @@ int daAlink_c::procHorseRideInit() {
}
field_0x2fc0 = 1;
}
-
+
if (mDemo.getDemoMode() != daPy_demo_c::DEMO_UNK_7_e) {
setOldRootQuaternion(0, (s16)(shape_angle.y - field_0x27f4->shape_angle.y), 0);
}
@@ -1670,7 +1678,8 @@ int daAlink_c::procHorseWaitInit() {
initServiceWaitTime();
checkHorseGetOffAndSetDoStatus();
- setSyncRide((!checkHorseNoUpperAnime() && !checkEquipAnime()) || checkInputOnR() || !checkHorseGetOff() || checkHorseGetOffDirection() == 2);
+ setSyncRide(!((checkHorseNoUpperAnime() || checkEquipAnime()) && !checkInputOnR() &&
+ checkHorseGetOff() && checkHorseGetOffDirection() != 2));
field_0x33f0 = 0.0f;
return 1;
}
diff --git a/src/d/actor/d_a_alink_iceleaf.inc b/src/d/actor/d_a_alink_iceleaf.inc
index 9959c04fef..46d70785d3 100644
--- a/src/d/actor/d_a_alink_iceleaf.inc
+++ b/src/d/actor/d_a_alink_iceleaf.inc
@@ -18,7 +18,8 @@ static fopAc_ac_c* daAlink_searchIceLeaf(fopAc_ac_c* i_actor, void* i_data) {
}
bool daAlink_c::checkSnowCode() const {
- return mGndPolySpecialCode == dBgW_SPCODE_HEAVY_SNOW || mGndPolySpecialCode == dBgW_SPCODE_LIGHT_SNOW;
+ return mGndPolySpecialCode == dBgW_SPCODE_HEAVY_SNOW ||
+ mGndPolySpecialCode == dBgW_SPCODE_LIGHT_SNOW;
}
bool daAlink_c::checkSnowCodePolygon(cBgS_PolyInfo& i_polyinfo) {
@@ -27,7 +28,8 @@ bool daAlink_c::checkSnowCodePolygon(cBgS_PolyInfo& i_polyinfo) {
}
bool daAlink_c::checkBoardRestart() {
- return (mRideStatus == 0 && mRideAcKeep.getActor() != NULL) && fopAcM_GetName(mRideAcKeep.getActor()) == PROC_Obj_IceLeaf;
+ return (mRideStatus == 0 && mRideAcKeep.getActor() != NULL) &&
+ fopAcM_GetName(mRideAcKeep.getActor()) == PROC_Obj_IceLeaf;
}
int daAlink_c::boardCommon(BOOL i_canMove) {
@@ -47,7 +49,9 @@ int daAlink_c::boardCommon(BOOL i_canMove) {
s16 sp8 = current.angle.y + 0x8000;
for (int i = 0; i < 3; i++) {
- if (mAcchCir[i].ChkWallHit() && cLib_distanceAngleS(sp8, mAcchCir[i].GetWallAngleY()) <= 0x2000 && mNormalSpeed > 30.0f) {
+ if (mAcchCir[i].ChkWallHit() &&
+ cLib_distanceAngleS(sp8, mAcchCir[i].GetWallAngleY()) <= 0x2000 &&
+ mNormalSpeed > 30.0f) {
setJumpMode();
return procCoLargeDamageInit(-4, TRUE, 0, 0, NULL, 0);
}
@@ -110,12 +114,22 @@ int daAlink_c::boardCommon(BOOL i_canMove) {
var_f30 = (temp_f29 * mNormalSpeed) / 5.0f;
}
- if (checkZeroSpeedF() && temp_r26 > 0x7000 && mProcID == PROC_BOARD_WAIT && !checkModeFlg(2)) {
- if (mProcVar3.field_0x300e <= 910.0f && checkUnderMove0BckNoArc(ANM_RIDE_WAIT) && mLinkAcch.ChkGroundHit()) {
+ if (checkZeroSpeedF() &&
+ temp_r26 > 0x7000 &&
+ mProcID == PROC_BOARD_WAIT &&
+ !checkModeFlg(2)) {
+ if (mProcVar3.field_0x300e <= l_boardSlopeAngleMin &&
+ checkUnderMove0BckNoArc(ANM_RIDE_WAIT) &&
+ mLinkAcch.ChkGroundHit()) {
return procBoardTurnInit();
}
}
- } else if (temp_r26 < 0x2000 && field_0x2f8c == 0xB && mProcID == PROC_BOARD_WAIT && !checkModeFlg(2) && mLinkAcch.ChkGroundHit() && (mProcVar3.field_0x300e < field_0x3122) && (checkUnderMove0BckNoArc(ANM_RIDE_WAIT) || checkUnderMove0BckNoArc(ANM_RIDE_FRONT))) {
+ } else if (temp_r26 < 0x2000 &&
+ field_0x2f8c == 0xB &&
+ mProcID == PROC_BOARD_WAIT &&
+ !checkModeFlg(2) && mLinkAcch.ChkGroundHit() &&
+ (mProcVar3.field_0x300e < field_0x3122) &&
+ (checkUnderMove0BckNoArc(ANM_RIDE_WAIT) || checkUnderMove0BckNoArc(ANM_RIDE_FRONT))) {
if (mNormalSpeed <= mpHIO->mItem.mBoard.m.mMaxPushSpeed) {
return procBoardRowInit();
}
@@ -160,7 +174,10 @@ int daAlink_c::boardCommon(BOOL i_canMove) {
offModeFlg(2);
speed.y = 0.0f;
} else {
- if (mProcVar3.field_0x300e > 910.0f && (mProcID != PROC_BOARD_ROW || !(mProcVar3.field_0x300e < 2000.0f))) {
+ if (mProcVar3.field_0x300e > l_boardSlopeAngleMin &&
+ (mProcID != PROC_BOARD_ROW || !(mProcVar3.field_0x300e < l_boardSlopeRowAngleMin))) {
+ f32 temp_f27;
+ f32 temp_f26;
f32 var_f25 = (f32)mProcVar3.field_0x300e / (f32)field_0x3122;
if (var_f25 > 1.0f) {
var_f25 = 1.0f;
@@ -176,8 +193,8 @@ int daAlink_c::boardCommon(BOOL i_canMove) {
var_f31 *= cM_fsin(1.5707964f * var_f25);
if (var_f31 > 0.1f) {
- f32 temp_f27 = (var_f31 * cM_ssin(var_r27)) + (mNormalSpeed * cM_ssin(shape_angle.y));
- f32 temp_f26 = (var_f31 * cM_scos(var_r27)) + (mNormalSpeed * cM_scos(shape_angle.y));
+ temp_f27 = (var_f31 * cM_ssin(var_r27)) + (mNormalSpeed * cM_ssin(shape_angle.y));
+ temp_f26 = (var_f31 * cM_scos(var_r27)) + (mNormalSpeed * cM_scos(shape_angle.y));
mNormalSpeed = JMAFastSqrt((temp_f27 * temp_f27) + (temp_f26 * temp_f26));
if (mNormalSpeed > mMaxSpeed) {
diff --git a/src/d/actor/d_a_alink_ironball.inc b/src/d/actor/d_a_alink_ironball.inc
index 76eb232c22..c0c4d6508a 100644
--- a/src/d/actor/d_a_alink_ironball.inc
+++ b/src/d/actor/d_a_alink_ironball.inc
@@ -213,6 +213,11 @@ void daAlink_c::setIronBallChainPos() {
int sp38;
int sp34;
+ f32 var_f30;
+ f32 var_f31;
+ f32 var_f29;
+ f32 var_f28;
+ f32 var_f27;
if (mItemVar0.field_0x3018 == 2) {
var_r29 = mIronBallChainPos + 1;
var_r27 = var_r29 - 1;
@@ -293,20 +298,20 @@ void daAlink_c::setIronBallChainPos() {
daPy_frameCtrl_c* framectrl = &mUnderFrameCtrl[0];
if (mItemVar0.field_0x3018 == 1) {
- f32 temp_f25 = framectrl->getEnd() - 13.0f;
- f32 temp_f29 = (framectrl->getFrame() - 13.0f) / temp_f25;
- s16 sp12 = -16384.0f - (14336.0f * temp_f29);
+ var_f29 = (framectrl->getFrame() - 13.0f) / (framectrl->getEnd() - 13.0f);
+ s16 sp12 = -16384.0f - (14336.0f * var_f29);
mDoMtx_stack_c::ZXYrotS(mBodyAngle.x, shape_angle.y, 0);
mDoMtx_stack_c::YrotM(sp12);
mDoMtx_stack_c::multVec(&cXyz::BaseZ, &sp298);
- sp298 *= 15.0f * (1.0f + temp_f29);
+ sp298 *= 15.0f * (1.0f + var_f29);
sp38 = 1000;
} else if (mItemVar0.field_0x3018 == 4) {
Vec sp268 = {0.0f, 0.0f, 0.0f};
sp268.y = mpHIO->mItem.mIronBall.m.mThrowChainAccelY;
- sp268.z = mpHIO->mItem.mIronBall.m.mThrowChainAccelZ;
+ f32 throwAccelZ = mpHIO->mItem.mIronBall.m.mThrowChainAccelZ;
+ sp268.z = throwAccelZ;
mDoMtx_stack_c::ZXYrotS(mBodyAngle.x, shape_angle.y, 0);
mDoMtx_stack_c::multVec(&sp268, &sp298);
@@ -355,10 +360,8 @@ void daAlink_c::setIronBallChainPos() {
sp2A4 += sp298;
}
- s16 temp_r25 = sp2A4.atan2sX_Z();
- mIronBallChainAngle->set(sp2A4.atan2sY_XZ(), temp_r25, 0);
+ mIronBallChainAngle->set(sp2A4.atan2sY_XZ(), sp2A4.atan2sX_Z(), 0);
} else {
- f32 var_f30;
if (mItemVar0.field_0x3018 == 4 || mItemVar0.field_0x3018 == 5) {
var_f30 = mpHIO->mItem.mIronBall.m.mThrowChainGravity;
} else {
@@ -384,9 +387,9 @@ void daAlink_c::setIronBallChainPos() {
BOOL sp2C = ((mItemVar0.field_0x3018 == 0 && checkUnderMove1BckNoArc(ANM_IRONBALL_WALK)) && mNowAnmPackUnder[1].getRatio() > 0.8f) && (mUnderFrameCtrl[1].getFrame() >= 24.0f || mUnderFrameCtrl[1].getFrame() <= 3.0f);
- f32 temp_f31 = 5.0f * (5.0f * (mNowAnmPackUnder[1].getRatio() - 0.8f));
- f32 temp_f28 = temp_f31 * cM_scos(shape_angle.y);
- temp_f31 *= cM_ssin(shape_angle.y);
+ var_f31 = 5.0f * (5.0f * (mNowAnmPackUnder[1].getRatio() - 0.8f));
+ var_f28 = var_f31 * cM_scos(shape_angle.y);
+ var_f31 *= cM_ssin(shape_angle.y);
for (i = mItemMode; i > 0; i--, var_r29--, var_r26--) {
sp28C = *var_r29;
@@ -396,8 +399,8 @@ void daAlink_c::setIronBallChainPos() {
} else {
sp2A4 = (*var_r29 - *var_r27) + *var_r26;
if (sp2C) {
- sp2A4.x += temp_f31;
- sp2A4.z += temp_f28;
+ sp2A4.x += var_f31;
+ sp2A4.z += var_f28;
}
sp2A4.y += var_f30;
@@ -421,10 +424,10 @@ void daAlink_c::setIronBallChainPos() {
s16 sp10;
s16 spE = mIronBallChainAngle->z + 0x3000;
- for (i = 0; i < mItemMode; i++, sp3C++, var_r29++, spE += 0x3000) {
+ for (i = 0; i < mItemMode; i++, sp3C++, var_r29++, ANGLE_ADD_2(spE, 0x3000)) {
sp2A4 = (*var_r27 - *var_r29);
- f32 var_f27 = sp2A4.absXZ();
+ var_f27 = sp2A4.absXZ();
if (var_f27 < 1.0f) {
sp10 = sp3C[-1].y;
} else {
@@ -721,7 +724,7 @@ void daAlink_c::setIronBallPos() {
}
if (mItemMode > 6) {
- mItemMode -= var_r22;
+ ANGLE_SUB_2(mItemMode, var_r22);
if (mItemMode <= 6) {
mItemVar0.field_0x3018 = 8;
}
@@ -749,7 +752,7 @@ void daAlink_c::setIronBallPos() {
mDoMtx_stack_c::multVec(&ironBallPosVec, mIronBallChainPos);
if (mItemMode > 6) {
- mItemMode -= 10;
+ mItemMode -= (s16)10;
if (mItemMode < 6) {
mItemMode = 6;
}
diff --git a/src/d/actor/d_a_alink_sumou.inc b/src/d/actor/d_a_alink_sumou.inc
index 7e40b91cb5..836b1b29de 100644
--- a/src/d/actor/d_a_alink_sumou.inc
+++ b/src/d/actor/d_a_alink_sumou.inc
@@ -374,7 +374,7 @@ int daAlink_c::procSumouSideMove() {
f32 var_f1;
if (checkInputOnR() && temp_r30_2 > 0x800 && temp_r30_2 < 0x7800) {
if (abs((s16)(mMoveAngle - current.angle.y)) > 0x4000) {
- current.angle.y += 0x8000;
+ ANGLE_ADD_2(current.angle.y, 0x8000);
mNormalSpeed *= -1.0f;
if (field_0x2f98 == 3) {
diff --git a/src/d/actor/d_a_alink_swim.inc b/src/d/actor/d_a_alink_swim.inc
index 986f3336a3..857a3693f6 100644
--- a/src/d/actor/d_a_alink_swim.inc
+++ b/src/d/actor/d_a_alink_swim.inc
@@ -254,7 +254,7 @@ void daAlink_c::setSpeedAndAngleSwim() {
if (checkInputOnR()) {
if (getDirectionFromCurrentAngle() == DIR_BACKWARD) {
- current.angle.y += 0x8000;
+ ANGLE_ADD_2(current.angle.y, 0x8000);
mNormalSpeed *= -1.0f;
}
@@ -1413,12 +1413,13 @@ int daAlink_c::procSwimDamageInit(dCcD_GObjInf* i_hitObj) {
dmg_vec->z * var_f29 + dmg_vec->x * var_f30);
mProcVar0.field_0x3008 =
- cLib_minMaxLimit(cM_atan2s(sp24.z, sp24.y), (s16)-mpHIO->mDamage.mDamSwim.m.mFrontBackBodyMaxAngle,
- (s16)mpHIO->mDamage.mDamSwim.m.mFrontBackBodyMaxAngle);
+ cLib_minMaxLimit<s16>(cM_atan2s(sp24.z, sp24.y),
+ -mpHIO->mDamage.mDamSwim.m.mFrontBackBodyMaxAngle,
+ mpHIO->mDamage.mDamSwim.m.mFrontBackBodyMaxAngle);
- mProcVar1.field_0x300a = cLib_minMaxLimit(
+ mProcVar1.field_0x300a = cLib_minMaxLimit<s16>(
cM_atan2s(sp24.x, -JMAFastSqrt(sp24.y * sp24.y + sp24.z * sp24.z)),
- (s16)-mpHIO->mDamage.mDamSwim.m.mLeftRightBodyMaxAngle, (s16)mpHIO->mDamage.mDamSwim.m.mLeftRightBodyMaxAngle);
+ -mpHIO->mDamage.mDamSwim.m.mLeftRightBodyMaxAngle, mpHIO->mDamage.mDamSwim.m.mLeftRightBodyMaxAngle);
int dir = getDirectionFromAngle(cM_atan2s(-sp24.x, -sp24.z));
if (bvar4) {
diff --git a/src/d/actor/d_a_alink_swindow.inc b/src/d/actor/d_a_alink_swindow.inc
index d990f8a9e1..63d4765864 100644
--- a/src/d/actor/d_a_alink_swindow.inc
+++ b/src/d/actor/d_a_alink_swindow.inc
@@ -272,6 +272,7 @@ void daAlink_c::initStatusWindow() {
JUT_ASSERT(437, tmpBuffer);
JKRReadIdxResource(tmpBuffer, 0x400, btpResIdx, dComIfGp_getAnmArchive());
+ // this should call J3DAnmLoaderDataBase::load(const void*) but it breaks retail
J3DAnmTexPattern* btp = (J3DAnmTexPattern*)J3DAnmLoaderDataBase::load(tmpBuffer, J3DLOADER_UNK_FLAG0);
btp->setFrame(0.0f);
btp->searchUpdateMaterialID(field_0x06c0);
@@ -281,6 +282,7 @@ void daAlink_c::initStatusWindow() {
JUT_ASSERT(449, tmpBuffer);
JKRReadIdxResource(tmpBuffer, 0x400, btkResIdx, dComIfGp_getAnmArchive());
+ // this should call J3DAnmLoaderDataBase::load(const void*) but it breaks retail
J3DAnmTextureSRTKey* btk = (J3DAnmTextureSRTKey*)J3DAnmLoaderDataBase::load(tmpBuffer, J3DLOADER_UNK_FLAG0);
btk->setFrame(0.0f);
btk->searchUpdateMaterialID(field_0x06c0);
diff --git a/src/d/actor/d_a_alink_wolf.inc b/src/d/actor/d_a_alink_wolf.inc
index 6805311b9e..bc08d64039 100644
--- a/src/d/actor/d_a_alink_wolf.inc
+++ b/src/d/actor/d_a_alink_wolf.inc
@@ -722,7 +722,7 @@ void daAlink_c::setSpeedAndAngleWolf() {
var_r4 = mMoveAngle;
}
- cLib_addCalcAngleS(&shape_angle.y, var_r4, turn_rate, turn_max * 2, turn_min * 2);
+ cLib_addCalcAngleS(&shape_angle.y, var_r4, turn_rate, (s16)turn_max * 2, (s16)turn_min * 2);
int temp_r3 = (s16)(temp_r26 - current.angle.y) * (s16)(shape_angle.y - current.angle.y);
if (temp_r3 <= 0 && temp_r3 >= -0x1000000) {
@@ -766,7 +766,7 @@ void daAlink_c::setSpeedAndAngleWolfAtn() {
if (getDirectionFromCurrentAngle() == DIR_BACKWARD &&
(field_0x2f98 == 0 || field_0x2f98 == 1))
{
- current.angle.y += 0x8000;
+ ANGLE_ADD_2(current.angle.y, 0x8000);
mNormalSpeed *= -1.0f;
if (checkWolfAtnMoveBack((s16)(current.angle.y - shape_angle.y))) {
@@ -816,7 +816,7 @@ void daAlink_c::setSpeedAndAngleWolfAtn() {
}
cLib_addCalcAngleS(&shape_angle.y, var_r26, mpHIO->mWolf.mWlAtnMove.m.mTurnAngleRate,
- turn_max * 2, mpHIO->mWolf.mWlAtnMove.m.mTurnAngleMin * 2);
+ (s16)turn_max * 2, mpHIO->mWolf.mWlAtnMove.m.mTurnAngleMin * 2);
}
setNormalSpeedF(speed, deceleration);
@@ -839,19 +839,9 @@ BOOL daAlink_c::checkUnderMove0BckNoArcWolf(daAlink_c::daAlink_WANM i_anm) const
}
void daAlink_c::setBlendWolfMoveAnime(f32 param_0) {
- f32 sp8;
- if (mGroundCode == 8) {
- sp8 = 1.0f;
- } else {
- sp8 = cM_scos(field_0x2ff0);
- }
-
- f32 var_f31;
- f32 temp_f30 = fabsf(mNormalSpeed * sp8) / mMaxSpeed;
-
- daPy_frameCtrl_c* framectrl0 = &mUnderFrameCtrl[0];
- daPy_frameCtrl_c* framectrl1 = &mUnderFrameCtrl[1];
-
+ f32 temp_f30;
+ daPy_frameCtrl_c* framectrl0;
+ daPy_frameCtrl_c* framectrl1;
f32 idleAnmSpeed;
f32 walkAnmSpeed;
f32 jogAnmSpeed;
@@ -862,6 +852,21 @@ void daAlink_c::setBlendWolfMoveAnime(f32 param_0) {
f32 jogToRunRate;
f32 walkRunMorf;
f32 runAnmMinBlendRate;
+ f32 spC;
+
+ f32 sp8;
+ if (mGroundCode == 8) {
+ sp8 = 1.0f;
+ } else {
+ sp8 = cM_scos(field_0x2ff0);
+ }
+
+ f32 var_f31;
+ temp_f30 = fabsf(mNormalSpeed * sp8) / mMaxSpeed;
+
+ framectrl0 = &mUnderFrameCtrl[0];
+ framectrl1 = &mUnderFrameCtrl[1];
+
if (checkWolfDashMode()) {
walkToJogRate = mpHIO->mWolf.mWlMove.m.mWalkToBriskWalkRate;
walkRunMorf = mpHIO->mWolf.mWlMove.m.mWalkRunInterpolation;
@@ -986,7 +991,6 @@ void daAlink_c::setBlendWolfMoveAnime(f32 param_0) {
var_f31 = 1.0f;
}
- f32 spC;
if (checkNoResetFlg1(FLG1_DASH_MODE)) {
if (checkWolfSlowDash()) {
spC = mpHIO->mWolf.mWlMove.m.mADashQuickRunASpeedSlow;
@@ -1075,7 +1079,7 @@ void daAlink_c::setWolfAtnMoveDirection() {
}
} else if (mProcID != PROC_WOLF_ROLL_ATTACK_MOVE) {
if (field_0x2f98 == 1) {
- current.angle.y += 0x8000;
+ ANGLE_ADD_2(current.angle.y, 0x8000);
mNormalSpeed *= -1.0f;
}
@@ -1155,20 +1159,12 @@ void daAlink_c::setBlendWolfAtnMoveAnime(f32 param_0) {
void daAlink_c::setBlendWolfAtnBackMoveAnime(f32 param_0) {
mMaxSpeed = mpHIO->mWolf.mWlAtnMove.m.mRearMaxSpeed;
- f32 var_f28;
- if (mGroundCode == 8) {
- var_f28 = 1.0f;
- } else {
- var_f28 = cM_scos(field_0x2ff0);
- }
-
- f32 temp_f31 = fabsf(mNormalSpeed * var_f28) / mMaxSpeed;
- f32 var_f30;
+ f32 var_f31 = fabsf(mNormalSpeed * (mGroundCode == 8 ? 1.0f : cM_scos(field_0x2ff0))) / mMaxSpeed;
field_0x2fc1 = 3;
- if (temp_f31 < mpHIO->mWolf.mWlAtnMove.m.mRearWalkChangeRate) {
- f32 temp_f29 = temp_f31 / mpHIO->mWolf.mWlAtnMove.m.mRearWalkChangeRate;
+ if (var_f31 < mpHIO->mWolf.mWlAtnMove.m.mRearWalkChangeRate) {
+ f32 var_f29 = var_f31 / mpHIO->mWolf.mWlAtnMove.m.mRearWalkChangeRate;
int var_r29;
if (checkModeFlg(1)) {
@@ -1178,6 +1174,7 @@ void daAlink_c::setBlendWolfAtnBackMoveAnime(f32 param_0) {
}
daAlink_WANM var_r28;
+ f32 var_f30;
if (checkWolfAtnWait()) {
var_r28 = WANM_ATN;
var_f30 = mpHIO->mWolf.mWlMove.m.mGazeIdleAnmSpeed;
@@ -1186,7 +1183,7 @@ void daAlink_c::setBlendWolfAtnBackMoveAnime(f32 param_0) {
var_f30 = mpHIO->mWolf.mWlMoveNoP.m.mIdleAnmSpeed;
}
- setDoubleAnimeWolf(temp_f29, var_f30, mpHIO->mWolf.mWlAtnMove.m.mRearWalkAnmSpeed, var_r28,
+ setDoubleAnimeWolf(var_f29, var_f30, mpHIO->mWolf.mWlAtnMove.m.mRearWalkAnmSpeed, var_r28,
WANM_ATN_LOCK_WALK_BACK, var_r29, param_0);
} else {
setDoubleAnimeWolf(1.0f, mpHIO->mWolf.mWlAtnMove.m.mRearWalkAnmSpeed,
@@ -1274,7 +1271,7 @@ int daAlink_c::setSingleAnimeWolf(daAlink_c::daAlink_WANM i_anmID, f32 i_speed,
// "Is Adult Link but setting Wolf animation\n"
OS_REPORT("リンクなのに狼アニメ設定\n");
JUT_ASSERT(2214, FALSE);
- }
+ }
J3DAnmTransform* var_r30 = getAnimeResource(&mUnderAnmHeap[0], m_wlAnmDataTable[i_anmID].m_bckID, 0x10800);
if (var_r30 == NULL) {
@@ -1688,7 +1685,7 @@ void daAlink_c::wolfBgCheck() {
if (var_r28 != 0 || var_r25 != 0) {
onNoResetFlg1(FLG1_UNK_20000000);
-
+
if (var_r28 != 0 && var_r25 != 0) {
if (sp20.abs2() > sp14.abs2()) {
sp8 = sp20;
@@ -1819,8 +1816,9 @@ void daAlink_c::setWolfFootMatrix() {
daAlink_footData_c* footData = mFootData1;
int i, j;
+ int var_r31;
for (i = 0; i < 2; i++, footData++) {
- int var_r31 = fFootJoint[i];
+ var_r31 = fFootJoint[i];
for (j = 0; j < 3; j++, var_r31++) {
cMtx_copy(mpLinkModel->getAnmMtx(var_r31), footData->field_0x14[j]);
if (j == 1) {
@@ -1831,9 +1829,9 @@ void daAlink_c::setWolfFootMatrix() {
footData = mFootData2;
- for (int i = 0; i < 2; i++, footData++) {
- int var_r31 = bFootJoint[i];
- for (int j = 0; j < 3; j++, var_r31++) {
+ for (i = 0; i < 2; i++, footData++) {
+ var_r31 = bFootJoint[i];
+ for (j = 0; j < 3; j++, var_r31++) {
cMtx_copy(mpLinkModel->getAnmMtx(var_r31), footData->field_0x14[j]);
if (j == 0) {
var_r31++;
@@ -1841,64 +1839,66 @@ void daAlink_c::setWolfFootMatrix() {
}
}
- if (field_0x2060->getOldFrameFlg()) {
- cXyz sp40[4];
- cXyz sp34(0.0f, 0.0f, 0.0f);
- cXyz sp28;
-
- footData = mFootData1;
-
- for (i = 0; i < 2; i++, footData++) {
- int var_r31 = fFootJoint[i];
- for (j = 0; j < 4; j++, var_r31++) {
- mDoMtx_multVecZero(mpLinkModel->getAnmMtx(var_r31), &sp40[j]);
- }
+ if (!field_0x2060->getOldFrameFlg()) {
+ return;
+ }
- int temp_r31 = fFootJoint[i];
- setMatrixWorldAxisRot(mpLinkModel->getAnmMtx(temp_r31), footData->field_0x6, 0, 0, 0, NULL);
-
- sp34.x = sp40[0].abs(sp40[1]);
- mDoMtx_stack_c::multVec(&sp34, &sp28);
- temp_r31++;
- setMatrixWorldAxisRot(mpLinkModel->getAnmMtx(temp_r31), footData->field_0x4, 0, 0, 0, &sp28);
+ cXyz sp40[4];
+ cXyz sp34(0.0f, 0.0f, 0.0f);
+ cXyz sp28;
- sp34.x = sp40[1].abs(sp40[2]);
- mDoMtx_stack_c::multVec(&sp34, &sp28);
- temp_r31++;
- setMatrixWorldAxisRot(mpLinkModel->getAnmMtx(temp_r31), footData->field_0x4, 0, 0, 0, &sp28);
+ footData = mFootData1;
- sp34.x = sp40[2].abs(sp40[3]);
- mDoMtx_stack_c::multVec(&sp34, &sp28);
- temp_r31++;
- setMatrixWorldAxisRot(mpLinkModel->getAnmMtx(temp_r31), footData->field_0x2, 0, 0, 0, &sp28);
+ for (i = 0; i < 2; i++, footData++) {
+ var_r31 = fFootJoint[i];
+ for (j = 0; j < 4; j++, var_r31++) {
+ mDoMtx_multVecZero(mpLinkModel->getAnmMtx(var_r31), &sp40[j]);
}
- footData = mFootData2;
+ var_r31 = fFootJoint[i];
+ setMatrixWorldAxisRot(mpLinkModel->getAnmMtx(var_r31), footData->field_0x6, 0, 0, 0, NULL);
- for (i = 0; i < 2; i++, footData++) {
- int var_r31 = bFootJoint[i];
- for (j = 0; j < 4; j++, var_r31++) {
- mDoMtx_multVecZero(mpLinkModel->getAnmMtx(var_r31), &sp40[j]);
- }
+ sp34.x = sp40[0].abs(sp40[1]);
+ mDoMtx_stack_c::multVec(&sp34, &sp28);
+ var_r31++;
+ setMatrixWorldAxisRot(mpLinkModel->getAnmMtx(var_r31), footData->field_0x4, 0, 0, 0, &sp28);
- int temp_r31 = bFootJoint[i];
- setMatrixWorldAxisRot(mpLinkModel->getAnmMtx(temp_r31), footData->field_0x6, 0, 0, 0, NULL);
-
- sp34.x = sp40[0].abs(sp40[1]);
- mDoMtx_stack_c::multVec(&sp34, &sp28);
- temp_r31++;
- setMatrixWorldAxisRot(mpLinkModel->getAnmMtx(temp_r31), footData->field_0x6, 0, 0, 0, &sp28);
+ sp34.x = sp40[1].abs(sp40[2]);
+ mDoMtx_stack_c::multVec(&sp34, &sp28);
+ var_r31++;
+ setMatrixWorldAxisRot(mpLinkModel->getAnmMtx(var_r31), footData->field_0x4, 0, 0, 0, &sp28);
+
+ sp34.x = sp40[2].abs(sp40[3]);
+ mDoMtx_stack_c::multVec(&sp34, &sp28);
+ var_r31++;
+ setMatrixWorldAxisRot(mpLinkModel->getAnmMtx(var_r31), footData->field_0x2, 0, 0, 0, &sp28);
+ }
- sp34.x = sp40[1].abs(sp40[2]);
- mDoMtx_stack_c::multVec(&sp34, &sp28);
- temp_r31++;
- setMatrixWorldAxisRot(mpLinkModel->getAnmMtx(temp_r31), footData->field_0x4, 0, 0, 0, &sp28);
+ footData = mFootData2;
- sp34.x = sp40[2].abs(sp40[3]);
- mDoMtx_stack_c::multVec(&sp34, &sp28);
- temp_r31++;
- setMatrixWorldAxisRot(mpLinkModel->getAnmMtx(temp_r31), footData->field_0x2, 0, 0, 0, &sp28);
+ for (i = 0; i < 2; i++, footData++) {
+ var_r31 = bFootJoint[i];
+ for (j = 0; j < 4; j++, var_r31++) {
+ mDoMtx_multVecZero(mpLinkModel->getAnmMtx(var_r31), &sp40[j]);
}
+
+ var_r31 = bFootJoint[i];
+ setMatrixWorldAxisRot(mpLinkModel->getAnmMtx(var_r31), footData->field_0x6, 0, 0, 0, NULL);
+
+ sp34.x = sp40[0].abs(sp40[1]);
+ mDoMtx_stack_c::multVec(&sp34, &sp28);
+ var_r31++;
+ setMatrixWorldAxisRot(mpLinkModel->getAnmMtx(var_r31), footData->field_0x6, 0, 0, 0, &sp28);
+
+ sp34.x = sp40[1].abs(sp40[2]);
+ mDoMtx_stack_c::multVec(&sp34, &sp28);
+ var_r31++;
+ setMatrixWorldAxisRot(mpLinkModel->getAnmMtx(var_r31), footData->field_0x4, 0, 0, 0, &sp28);
+
+ sp34.x = sp40[2].abs(sp40[3]);
+ mDoMtx_stack_c::multVec(&sp34, &sp28);
+ var_r31++;
+ setMatrixWorldAxisRot(mpLinkModel->getAnmMtx(var_r31), footData->field_0x2, 0, 0, 0, &sp28);
}
}
@@ -2039,7 +2039,7 @@ void daAlink_c::wolfFootBgCheck() {
}
if (temp_f30 > 0.0f || sp30) {
- if (!setLegAngle(temp_f30, footData, &sp58[i][j], &sp50[i][j], 1)) {
+ if (!setLegAngle(temp_f30, footData, &sp58[i][j], &sp50[i][j], 1)) {
sp58[i][j] = 0;
sp50[i][j] = 0;
}
@@ -2051,7 +2051,7 @@ void daAlink_c::wolfFootBgCheck() {
cLib_addCalcAngleS(&footData->field_0x6, sp58[i][j], 2, 0x1800, 0x10);
cLib_addCalcAngleS(&footData->field_0x4, sp50[i][j], 2, 0x1800, 0x10);
-
+
s16 spE;
if (mProcID == PROC_WOLF_SLIDE_READY) {
spE = shape_angle.x;
@@ -2180,6 +2180,8 @@ f32 daAlink_c::setWolfWaitSlip() {
void daAlink_c::checkWolfAtnDoCharge() {}
void daAlink_c::setWolfChainPos() {
+ static const int dummy1 = 0;
+ static const int dummy2 = 0;
static Vec const wolfChainBaseOffset = {22.0f, 0.0f, -12.0f};
static Vec const wolfChainVec = {0.0f, 0.0f, -9.0f};
@@ -2228,7 +2230,7 @@ void daAlink_c::setWolfChainPos() {
var_r29->y -= 9.0f;
*var_r30 = *(var_r30 - 1);
- var_r30->z += 0x4000;
+ ANGLE_ADD_2(var_r30->z, 0x4000);
*var_r26 = cXyz::Zero;
}
@@ -2292,9 +2294,9 @@ void daAlink_c::setWolfChainPos() {
sp8 = var_r30[-1].z - var_r30->z;
if ((sp8 >= 0 && sp8 <= 0x4000) || sp8 < -0x4000) {
- var_r30->z -= 0x2000;
+ ANGLE_SUB_2(var_r30->z, 0x2000);
} else {
- var_r30->z += 0x2000;
+ ANGLE_ADD_2(var_r30->z, 0x2000);
}
mDoMtx_stack_c::transS(sp78);
@@ -2682,7 +2684,7 @@ int daAlink_c::procWolfDashReverseInit(int param_0) {
} else {
mNormalSpeed = mpHIO->mWolf.mWlMove.m.mDashReboundHorizontalSpeed;
speed.y = mpHIO->mWolf.mWlMove.m.mDashReboundVerticalSpeed;
- current.angle.y += 0x8000;
+ ANGLE_ADD_2(current.angle.y, 0x8000);
mProcVar2.field_0x300c = 0;
}
@@ -3888,19 +3890,19 @@ int daAlink_c::procWolfHowlDemoInit() {
sp8.z = sp14.z - var_f30;
if (!commonLineCheck(&sp14, &sp8)) {
- shape_angle.y += 0x8000;
+ ANGLE_ADD_2(shape_angle.y, 0x8000);
} else {
sp8.x = sp14.x + var_f30;
sp8.z = sp14.z - var_f31;
if (!commonLineCheck(&sp14, &sp8)) {
- shape_angle.y += 0x4000;
+ ANGLE_ADD_2(shape_angle.y, 0x4000);
} else {
sp8.x = sp14.x - var_f30;
sp8.z = sp14.z + var_f31;
if (!commonLineCheck(&sp14, &sp8)) {
- shape_angle.y -= 0x4000;
+ ANGLE_SUB_2(shape_angle.y, 0x4000);
}
}
}
@@ -4567,10 +4569,10 @@ int daAlink_c::procWolfRopeHangInit(int param_0) {
mProcVar2.field_0x300c = 0;
if (param_0 == 2) {
- shape_angle.y -= 0x4000;
+ ANGLE_SUB_2(shape_angle.y, 0x4000);
mProcVar4.field_0x3010 = -mProcVar4.field_0x3010;
} else {
- shape_angle.y += 0x4000;
+ ANGLE_ADD(shape_angle.y, 0x4000);
}
wolfRopeSwingInc(50.0f);
@@ -4597,12 +4599,12 @@ int daAlink_c::procWolfRopeHang() {
field_0x2060->getOldFrameTransInfo(0)->mTranslate.z -= 15.0f;
if (field_0x3198 == 2) {
- shape_angle.y += 0x4000;
+ ANGLE_ADD_2(shape_angle.y, 0x4000);
setOldRootQuaternion(0, -0x4000, 0);
shape_angle.x = -shape_angle.z;
return procWolfRopeMoveInit(0, 0);
} else {
- shape_angle.y -= 0x4000;
+ ANGLE_SUB_2(shape_angle.y, 0x4000);
setOldRootQuaternion(0, 0x4000, 0);
shape_angle.x = shape_angle.z;
return procWolfRopeMoveInit(1, 0);
@@ -5292,11 +5294,11 @@ int daAlink_c::procWolfGiantPuzzle() {
field_0x3478 = mMaxSpeed;
}
} else if (direction == DIR_LEFT) {
- mProcVar2.mPuzzleAimAngle += 0x4000;
+ ANGLE_ADD_2(mProcVar2.mPuzzleAimAngle, 0x4000);
} else if (direction == DIR_RIGHT) {
- mProcVar2.mPuzzleAimAngle -= 0x4000;
+ ANGLE_SUB_2(mProcVar2.mPuzzleAimAngle, 0x4000);
} else {
- mProcVar2.mPuzzleAimAngle += 0x8000;
+ ANGLE_ADD_2(mProcVar2.mPuzzleAimAngle, 0x8000);
}
}
}
@@ -6028,7 +6030,8 @@ BOOL daAlink_c::checkMidnaDisappearMode() const {
return mProcID == PROC_WOLF_DIG_THROUGH ||
(checkWolf() && dComIfGp_checkPlayerStatus0(0, 0x8000000) &&
!dComIfGp_checkPlayerStatus0(0, 0x10) &&
- (mTargetedActor == NULL || !(mTargetedActor->attention_info.flags & fopAc_AttnFlag_UNK_0x800000)));
+ !(mTargetedActor != NULL &&
+ mTargetedActor->attention_info.flags & fopAc_AttnFlag_UNK_0x800000));
}
BOOL daAlink_c::checkWolfLieContinue(int param_0) {
@@ -6271,7 +6274,7 @@ int daAlink_c::procWolfLieMove() {
} else {
spA = mMoveAngle + 0x8000;
}
-
+
cLib_addCalcAngleS(&shape_angle.y, spA, mpHIO->mWolf.mWlLie.m.mProneTurnRate, mpHIO->mWolf.mWlLie.m.mProneTurnMax, mpHIO->mWolf.mWlLie.m.mProneTurnMin);
}
@@ -6379,7 +6382,7 @@ int daAlink_c::procWolfLieAutoMove() {
} else {
int var_r28 = 1;
if (mProcVar1.field_0x300a > 0) {
- mProcVar1.field_0x300a -= 1;
+ mProcVar1.field_0x300a--;
}
if (mProcVar3.field_0x300e != 0) {
@@ -7202,7 +7205,7 @@ int daAlink_c::procWolfJumpAttackInit(int param_0) {
f32 attack_init_speed;
f32 var_f30;
f32 var_f29;
-
+
if (param_0 == 1) {
setCutType(CUT_TYPE_WOLF_JUMP);
setCylAtParam(AT_TYPE_WOLF_ATTACK, dCcG_At_Spl_UNK_1, 3, dCcD_SE_WOLF_BITE, 3, mpHIO->mWolf.mWlAttack.mWlAtCjump.m.mAttackRadius, mpHIO->mWolf.mWlAttack.mWlAtCjump.m.mAttackHeight);
@@ -7271,7 +7274,7 @@ int daAlink_c::procWolfJumpAttackInit(int param_0) {
if (mProcVar0.field_0x3008 != 0) {
var_f30 -= 10.0f;
}
-
+
if (var_f30 > 0.0f) {
var_f29 = JMAFastSqrt((2.0f * var_f30) / -gravity);
} else {
@@ -7286,6 +7289,8 @@ int daAlink_c::procWolfJumpAttackInit(int param_0) {
mNormalSpeed = attack_init_speed;
speed.y = min_vertical_speed;
}
+
+ (void)0;
}
} else {
mNormalSpeed = attack_init_speed;
@@ -7548,7 +7553,7 @@ int daAlink_c::procWolfJumpAttackNormalLand() {
checkNextActionWolf(0);
} else if (frameCtrl->getFrame() > mpHIO->mWolf.mWlAttack.mWlAtLand.m.mNormalLandingAnm.mCancelFrame) {
if (mProcVar2.field_0x300c != 0) {
- shape_angle.y -= -0x8000;
+ ANGLE_ADD_2(shape_angle.y, 0x8000);
return procWolfJumpAttackInit(3);
}
@@ -7565,7 +7570,7 @@ int daAlink_c::procWolfWaitAttackInit(int i_attackType) {
/* 0x0 */ daAlink_c::daAlink_WANM m_anmID;
/* 0x4 */ u8 m_cutType;
}; // Size: 0x8
-
+
static const daAlink_WCutParamTbl dataTabl[] = {
{
daAlink_c::WANM_ATTACK_B_LEFT,
@@ -8105,7 +8110,7 @@ int daAlink_c::procWolfLockAttackTurn() {
if (mWolfLockNum != 0) {
s16 target_angle = cLib_targetAngleY(&current.pos, &mWolfLockAcKeep[0].getActor()->eyePos);
if (mProcVar2.field_0x300c != 0) {
- target_angle += 0x8000;
+ ANGLE_ADD_2(target_angle, 0x8000);
}
cLib_addCalcAngleS(&shape_angle.y, target_angle, 2, 0x2000, 0x800);
@@ -8135,7 +8140,7 @@ int daAlink_c::procWolfAttackReverseInit() {
mNormalSpeed = mpHIO->mWolf.mWlAttack.m.mJumpBackSpeedH;
speed.y = mpHIO->mWolf.mWlAttack.m.mJumpBackSpeedV;
- current.angle.y += 0x8000;
+ ANGLE_ADD_2(current.angle.y, 0x8000);
dComIfGp_getVibration().StartShock(5, 15, cXyz(0.0f, 1.0f, 0.0f));
dKy_Sound_set(current.pos, 100, fopAcM_GetID(this), 5);
@@ -8808,7 +8813,7 @@ int daAlink_c::procWolfChainReady() {
shape_angle.y = cLib_targetAngleY(&current.pos, &chain->getJumpAimPos());
current.angle.y = shape_angle.y;
mProcVar3.field_0x300e = 1;
-
+
cXyz vec1 = chain->getJumpAimPos() - field_0x34e0;
f32 dist_xz = vec1.absXZ();
f32 dist = vec1.abs();
@@ -8998,7 +9003,7 @@ int daAlink_c::procWolfDigInit() {
s16 var_r27 = fopAcM_searchActorAngleY(this, var_r29);
if (abs((s16)(var_r27 - shape_angle.y)) > 0x4000) {
- var_r27 += 0x8000;
+ ANGLE_ADD_2(var_r27, 0x8000);
}
shape_angle.y = var_r27;
@@ -9132,7 +9137,7 @@ int daAlink_c::procWolfDig() {
((daObjDigpl_c*)dig_actor)->onDigFlg();
field_0x280c.clearData();
}
-
+
if (frame_ctrl->getFrame() >= 11.0f) {
if (frame_ctrl->getFrame() <= 41.0f) {
if (mProcVar0.field_0x3008 == 0) {
@@ -9153,6 +9158,8 @@ int daAlink_c::procWolfDig() {
}
int daAlink_c::procWolfDigThroughInit(int param_0) {
+ static const int dummy = 0;
+
static const u16 snowID[] = {
dPa_RM(ID_ZI_S_DIGTHROUGHSNOW_A),
dPa_RM(ID_ZI_S_DIGTHROUGHSNOW_B),