Compare commits

...

7 commits

Author SHA1 Message Date
GRAnimated 205182e980
Merge 3553f39d1c into 0f550e5aae 2026-04-23 03:49:38 +02:00
guymakinggames 0f550e5aae
MapObj: Implement RocketFlower (#1024)
Some checks are pending
Compile and verify functions / compile_verify (push) Waiting to run
Copy headers to separate repo / copy_headers (push) Waiting to run
decomp-dev / publish_progress_decomp_dev (1.0) (push) Waiting to run
lint / clang-format (push) Waiting to run
lint / custom-lint (push) Waiting to run
Check and verify that setup works on NixOS / nixos_verify (push) Waiting to run
progress / publish_progress (push) Waiting to run
testcompile / test_compile (push) Waiting to run
Trigger full-sync on the tracker repo on push / api-trigger-workflow (push) Waiting to run
2026-04-23 00:55:05 +02:00
guymakinggames 129691c069
MapObj: Implement MoonBasementFloor (#1022) 2026-04-23 00:02:29 +02:00
guymakinggames 9090655294
MapObj: Implement BossKnuckleFix (#1021) 2026-04-22 23:27:25 +02:00
MonsterDruide1 572c2d6736
Library/Sequence: Fix vtable of Sequence (#1087) 2026-04-22 22:45:21 +02:00
Narr the Reg b847fd4117
Library/Movement: Implement ClockMovement (#1053) 2026-04-22 20:18:01 +02:00
Claude Sonnet 4.6 3553f39d1c Boss: Implement BossStateChasePlayer
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-17 20:04:46 -05:00
27 changed files with 1119 additions and 119 deletions

View file

@ -8728,46 +8728,46 @@ Boss/BossUtil/BossStateChasePlayer.o:
label: label:
- _ZN20BossStateChasePlayerC1EPKcPN2al9LiveActorEPK25BossStateChasePlayerParam - _ZN20BossStateChasePlayerC1EPKcPN2al9LiveActorEPK25BossStateChasePlayerParam
- _ZN20BossStateChasePlayerC2EPKcPN2al9LiveActorEPK25BossStateChasePlayerParam - _ZN20BossStateChasePlayerC2EPKcPN2al9LiveActorEPK25BossStateChasePlayerParam
status: NotDecompiled status: Matching
- offset: 0x046500 - offset: 0x046500
size: 16 size: 16
label: _ZN20BossStateChasePlayer6appearEv label: _ZN20BossStateChasePlayer6appearEv
status: NotDecompiled status: Matching
- offset: 0x046510 - offset: 0x046510
size: 12 size: 12
label: _ZN20BossStateChasePlayer9startStopEv label: _ZN20BossStateChasePlayer9startStopEv
status: NotDecompiled status: Matching
- offset: 0x04651c - offset: 0x04651c
size: 736 size: 736
label: _ZN20BossStateChasePlayer8exeChaseEv label: _ZN20BossStateChasePlayer8exeChaseEv
status: NotDecompiled status: NonMatchingMajor
- offset: 0x0467fc - offset: 0x0467fc
size: 276 size: 276
label: _ZN20BossStateChasePlayer7exeLostEv label: _ZN20BossStateChasePlayer7exeLostEv
status: NotDecompiled status: Matching
- offset: 0x046910 - offset: 0x046910
size: 180 size: 180
label: _ZN20BossStateChasePlayer7exeStopEv label: _ZN20BossStateChasePlayer7exeStopEv
status: NotDecompiled status: Matching
- offset: 0x0469c4 - offset: 0x0469c4
size: 36 size: 36
label: _ZN20BossStateChasePlayerD0Ev label: _ZN20BossStateChasePlayerD0Ev
status: NotDecompiled status: Matching
lazy: true lazy: true
- offset: 0x0469e8 - offset: 0x0469e8
size: 8 size: 8
label: _ZNK12_GLOBAL__N_128BossStateChasePlayerNrvChase7executeEPN2al11NerveKeeperE label: _ZNK12_GLOBAL__N_128BossStateChasePlayerNrvChase7executeEPN2al11NerveKeeperE
status: NotDecompiled status: Matching
guess: true guess: true
- offset: 0x0469f0 - offset: 0x0469f0
size: 180 size: 180
label: _ZNK12_GLOBAL__N_127BossStateChasePlayerNrvStop7executeEPN2al11NerveKeeperE label: _ZNK12_GLOBAL__N_127BossStateChasePlayerNrvStop7executeEPN2al11NerveKeeperE
status: NotDecompiled status: Matching
guess: true guess: true
- offset: 0x046aa4 - offset: 0x046aa4
size: 8 size: 8
label: _ZNK12_GLOBAL__N_127BossStateChasePlayerNrvLost7executeEPN2al11NerveKeeperE label: _ZNK12_GLOBAL__N_127BossStateChasePlayerNrvLost7executeEPN2al11NerveKeeperE
status: NotDecompiled status: Matching
guess: true guess: true
Boss/BossUtil/BossStateTalkDemo.o: Boss/BossUtil/BossStateTalkDemo.o:
'.text': '.text':
@ -59551,45 +59551,45 @@ MapObj/BossKnuckleFix.o:
- offset: 0x222ee4 - offset: 0x222ee4
size: 128 size: 128
label: _ZN14BossKnuckleFixC2EPKc label: _ZN14BossKnuckleFixC2EPKc
status: NotDecompiled status: Matching
- offset: 0x222f64 - offset: 0x222f64
size: 140 size: 140
label: _ZN14BossKnuckleFixC1EPKc label: _ZN14BossKnuckleFixC1EPKc
status: NotDecompiled status: Matching
- offset: 0x222ff0 - offset: 0x222ff0
size: 336 size: 336
label: _ZN14BossKnuckleFix4initERKN2al13ActorInitInfoE label: _ZN14BossKnuckleFix4initERKN2al13ActorInitInfoE
status: NotDecompiled status: Matching
- offset: 0x223140 - offset: 0x223140
size: 208 size: 208
label: _ZN14BossKnuckleFix10receiveMsgEPKN2al9SensorMsgEPNS0_9HitSensorES5_ label: _ZN14BossKnuckleFix10receiveMsgEPKN2al9SensorMsgEPNS0_9HitSensorES5_
status: NotDecompiled status: Matching
- offset: 0x223210 - offset: 0x223210
size: 60 size: 60
label: _ZN14BossKnuckleFix7exeWaitEv label: _ZN14BossKnuckleFix7exeWaitEv
status: NotDecompiled status: Matching
- offset: 0x22324c - offset: 0x22324c
size: 88 size: 88
label: _ZN14BossKnuckleFix11exeReactionEv label: _ZN14BossKnuckleFix11exeReactionEv
status: NotDecompiled status: Matching
- offset: 0x2232a4 - offset: 0x2232a4
size: 104 size: 104
label: _ZN14BossKnuckleFix16exeReactionLargeEv label: _ZN14BossKnuckleFix16exeReactionLargeEv
status: NotDecompiled status: Matching
- offset: 0x22330c - offset: 0x22330c
size: 64 size: 64
label: _ZNK12_GLOBAL__N_121BossKnuckleFixNrvWait7executeEPN2al11NerveKeeperE label: _ZNK12_GLOBAL__N_121BossKnuckleFixNrvWait7executeEPN2al11NerveKeeperE
status: NotDecompiled status: Matching
guess: true guess: true
- offset: 0x22334c - offset: 0x22334c
size: 108 size: 108
label: _ZNK12_GLOBAL__N_130BossKnuckleFixNrvReactionLarge7executeEPN2al11NerveKeeperE label: _ZNK12_GLOBAL__N_130BossKnuckleFixNrvReactionLarge7executeEPN2al11NerveKeeperE
status: NotDecompiled status: Matching
guess: true guess: true
- offset: 0x2233b8 - offset: 0x2233b8
size: 92 size: 92
label: _ZNK12_GLOBAL__N_125BossKnuckleFixNrvReaction7executeEPN2al11NerveKeeperE label: _ZNK12_GLOBAL__N_125BossKnuckleFixNrvReaction7executeEPN2al11NerveKeeperE
status: NotDecompiled status: Matching
guess: true guess: true
MapObj/BreakablePole.o: MapObj/BreakablePole.o:
'.text': '.text':
@ -76398,101 +76398,101 @@ MapObj/MoonBasementFloor.o:
- offset: 0x2c17dc - offset: 0x2c17dc
size: 128 size: 128
label: _ZN17MoonBasementFloorC2EPKc label: _ZN17MoonBasementFloorC2EPKc
status: NotDecompiled status: Matching
- offset: 0x2c185c - offset: 0x2c185c
size: 140 size: 140
label: _ZN17MoonBasementFloorC1EPKc label: _ZN17MoonBasementFloorC1EPKc
status: NotDecompiled status: Matching
- offset: 0x2c18e8 - offset: 0x2c18e8
size: 216 size: 216
label: _ZN17MoonBasementFloor4initERKN2al13ActorInitInfoE label: _ZN17MoonBasementFloor4initERKN2al13ActorInitInfoE
status: NotDecompiled status: Matching
- offset: 0x2c19c0 - offset: 0x2c19c0
size: 132 size: 132
label: _ZN17MoonBasementFloor17startFallBySwitchEv label: _ZN17MoonBasementFloor17startFallBySwitchEv
status: NotDecompiled status: Matching
- offset: 0x2c1a44 - offset: 0x2c1a44
size: 52 size: 52
label: _ZN17MoonBasementFloor8movementEv label: _ZN17MoonBasementFloor8movementEv
status: NotDecompiled status: Matching
- offset: 0x2c1a78 - offset: 0x2c1a78
size: 148 size: 148
label: _ZN17MoonBasementFloor10receiveMsgEPKN2al9SensorMsgEPNS0_9HitSensorES5_ label: _ZN17MoonBasementFloor10receiveMsgEPKN2al9SensorMsgEPNS0_9HitSensorES5_
status: NotDecompiled status: Matching
- offset: 0x2c1b0c - offset: 0x2c1b0c
size: 60 size: 60
label: _ZN17MoonBasementFloor7exeWaitEv label: _ZN17MoonBasementFloor7exeWaitEv
status: NotDecompiled status: Matching
- offset: 0x2c1b48 - offset: 0x2c1b48
size: 140 size: 140
label: _ZN17MoonBasementFloor16exeFallSignStartEv label: _ZN17MoonBasementFloor16exeFallSignStartEv
status: NotDecompiled status: Matching
- offset: 0x2c1bd4 - offset: 0x2c1bd4
size: 68 size: 68
label: _ZN17MoonBasementFloor11exeFallSignEv label: _ZN17MoonBasementFloor11exeFallSignEv
status: NotDecompiled status: Matching
- offset: 0x2c1c18 - offset: 0x2c1c18
size: 84 size: 84
label: _ZN17MoonBasementFloor19exeFallSignBySwitchEv label: _ZN17MoonBasementFloor19exeFallSignBySwitchEv
status: NotDecompiled status: Matching
- offset: 0x2c1c6c - offset: 0x2c1c6c
size: 220 size: 220
label: _ZN17MoonBasementFloor7exeFallEv label: _ZN17MoonBasementFloor7exeFallEv
status: NotDecompiled status: Matching
- offset: 0x2c1d48 - offset: 0x2c1d48
size: 64 size: 64
label: _ZNK12_GLOBAL__N_124MoonBasementFloorNrvWait7executeEPN2al11NerveKeeperE label: _ZNK12_GLOBAL__N_124MoonBasementFloorNrvWait7executeEPN2al11NerveKeeperE
status: NotDecompiled status: Matching
guess: true guess: true
- offset: 0x2c1d88 - offset: 0x2c1d88
size: 8 size: 8
label: _ZNK12_GLOBAL__N_133MoonBasementFloorNrvFallSignStart7executeEPN2al11NerveKeeperE label: _ZNK12_GLOBAL__N_133MoonBasementFloorNrvFallSignStart7executeEPN2al11NerveKeeperE
status: NotDecompiled status: Matching
guess: true guess: true
- offset: 0x2c1d90 - offset: 0x2c1d90
size: 8 size: 8
label: _ZNK12_GLOBAL__N_141MoonBasementFloorNrvFallSignStartByMeteor7executeEPN2al11NerveKeeperE label: _ZNK12_GLOBAL__N_141MoonBasementFloorNrvFallSignStartByMeteor7executeEPN2al11NerveKeeperE
status: NotDecompiled status: Matching
guess: true guess: true
- offset: 0x2c1d98 - offset: 0x2c1d98
size: 8 size: 8
label: _ZNK12_GLOBAL__N_141MoonBasementFloorNrvFallSignStartBySwitch7executeEPN2al11NerveKeeperE label: _ZNK12_GLOBAL__N_141MoonBasementFloorNrvFallSignStartBySwitch7executeEPN2al11NerveKeeperE
status: NotDecompiled status: Matching
guess: true guess: true
- offset: 0x2c1da0 - offset: 0x2c1da0
size: 88 size: 88
label: _ZNK12_GLOBAL__N_136MoonBasementFloorNrvFallSignBySwitch7executeEPN2al11NerveKeeperE label: _ZNK12_GLOBAL__N_136MoonBasementFloorNrvFallSignBySwitch7executeEPN2al11NerveKeeperE
status: NotDecompiled status: Matching
guess: true guess: true
- offset: 0x2c1df8 - offset: 0x2c1df8
size: 8 size: 8
label: _ZNK12_GLOBAL__N_132MoonBasementFloorNrvFallByMeteor7executeEPN2al11NerveKeeperE label: _ZNK12_GLOBAL__N_132MoonBasementFloorNrvFallByMeteor7executeEPN2al11NerveKeeperE
status: NotDecompiled status: Matching
guess: true guess: true
- offset: 0x2c1e00 - offset: 0x2c1e00
size: 72 size: 72
label: _ZNK12_GLOBAL__N_128MoonBasementFloorNrvFallSign7executeEPN2al11NerveKeeperE label: _ZNK12_GLOBAL__N_128MoonBasementFloorNrvFallSign7executeEPN2al11NerveKeeperE
status: NotDecompiled status: Matching
guess: true guess: true
- offset: 0x2c1e48 - offset: 0x2c1e48
size: 8 size: 8
label: _ZNK12_GLOBAL__N_124MoonBasementFloorNrvFall7executeEPN2al11NerveKeeperE label: _ZNK12_GLOBAL__N_124MoonBasementFloorNrvFall7executeEPN2al11NerveKeeperE
status: NotDecompiled status: Matching
guess: true guess: true
- offset: 0x2c1e50 - offset: 0x2c1e50
size: 28 size: 28
label: _ZNK2al10FunctorV0MIP17MoonBasementFloorMS1_FvvEEclEv label: _ZNK2al10FunctorV0MIP17MoonBasementFloorMS1_FvvEEclEv
status: NotDecompiled status: Matching
lazy: true lazy: true
- offset: 0x2c1e6c - offset: 0x2c1e6c
size: 76 size: 76
label: _ZNK2al10FunctorV0MIP17MoonBasementFloorMS1_FvvEE5cloneEv label: _ZNK2al10FunctorV0MIP17MoonBasementFloorMS1_FvvEE5cloneEv
status: NotDecompiled status: Matching
lazy: true lazy: true
- offset: 0x2c1eb8 - offset: 0x2c1eb8
size: 4 size: 4
label: _ZN2al10FunctorV0MIP17MoonBasementFloorMS1_FvvEED0Ev label: _ZN2al10FunctorV0MIP17MoonBasementFloorMS1_FvvEED0Ev
status: NotDecompiled status: Matching
lazy: true lazy: true
MapObj/MoonBasementGate.o: MapObj/MoonBasementGate.o:
'.text': '.text':
@ -82302,103 +82302,103 @@ MapObj/RocketFlower.o:
- offset: 0x2fd628 - offset: 0x2fd628
size: 128 size: 128
label: _ZN12RocketFlowerC2EPKc label: _ZN12RocketFlowerC2EPKc
status: NotDecompiled status: Matching
- offset: 0x2fd6a8 - offset: 0x2fd6a8
size: 140 size: 140
label: _ZN12RocketFlowerC1EPKc label: _ZN12RocketFlowerC1EPKc
status: NotDecompiled status: Matching
- offset: 0x2fd734 - offset: 0x2fd734
size: 268 size: 268
label: _ZN12RocketFlower4initERKN2al13ActorInitInfoE label: _ZN12RocketFlower4initERKN2al13ActorInitInfoE
status: NotDecompiled status: Matching
- offset: 0x2fd840 - offset: 0x2fd840
size: 28 size: 28
label: _ZN12RocketFlower18initAfterPlacementEv label: _ZN12RocketFlower18initAfterPlacementEv
status: NotDecompiled status: Matching
- offset: 0x2fd85c - offset: 0x2fd85c
size: 156 size: 156
label: _ZN12RocketFlower12attackSensorEPN2al9HitSensorES2_ label: _ZN12RocketFlower12attackSensorEPN2al9HitSensorES2_
status: NotDecompiled status: Matching
- offset: 0x2fd8f8 - offset: 0x2fd8f8
size: 84 size: 84
label: _ZNK12RocketFlower13isEnableEquipEv label: _ZNK12RocketFlower13isEnableEquipEv
status: NotDecompiled status: Matching
- offset: 0x2fd94c - offset: 0x2fd94c
size: 664 size: 664
label: _ZN12RocketFlower10receiveMsgEPKN2al9SensorMsgEPNS0_9HitSensorES5_ label: _ZN12RocketFlower10receiveMsgEPKN2al9SensorMsgEPNS0_9HitSensorES5_
status: NotDecompiled status: Matching
- offset: 0x2fdbe4 - offset: 0x2fdbe4
size: 116 size: 116
label: _ZN12RocketFlower15terminateFollowEv label: _ZN12RocketFlower15terminateFollowEv
status: NotDecompiled status: Matching
- offset: 0x2fdc58 - offset: 0x2fdc58
size: 76 size: 76
label: _ZN12RocketFlower7exeWaitEv label: _ZN12RocketFlower7exeWaitEv
status: NotDecompiled status: Matching
- offset: 0x2fdca4 - offset: 0x2fdca4
size: 100 size: 100
label: _ZN12RocketFlower13exeWaitFollowEv label: _ZN12RocketFlower13exeWaitFollowEv
status: NotDecompiled status: Matching
- offset: 0x2fdd08 - offset: 0x2fdd08
size: 412 size: 412
label: _ZN12RocketFlower19trySyncFlyingCapPosEv label: _ZN12RocketFlower19trySyncFlyingCapPosEv
status: NotDecompiled status: Matching
- offset: 0x2fdea4 - offset: 0x2fdea4
size: 324 size: 324
label: _ZN12RocketFlower9exeFollowEv label: _ZN12RocketFlower9exeFollowEv
status: NotDecompiled status: Matching
- offset: 0x2fdfe8 - offset: 0x2fdfe8
size: 108 size: 108
label: _ZN12RocketFlower15appearFlowerSubEv label: _ZN12RocketFlower15appearFlowerSubEv
status: NotDecompiled status: Matching
- offset: 0x2fe054 - offset: 0x2fe054
size: 164 size: 164
label: _ZN12RocketFlower13exeWaitAttachEv label: _ZN12RocketFlower13exeWaitAttachEv
status: NotDecompiled status: Matching
- offset: 0x2fe0f8 - offset: 0x2fe0f8
size: 60 size: 60
label: _ZN12RocketFlower9exeAttachEv label: _ZN12RocketFlower9exeAttachEv
status: NotDecompiled status: Matching
- offset: 0x2fe134 - offset: 0x2fe134
size: 48 size: 48
label: _ZN12RocketFlower19setFollowFlowerPoseERKN4sead4QuatIfEERKNS0_7Vector3IfEE label: _ZN12RocketFlower19setFollowFlowerPoseERKN4sead4QuatIfEERKNS0_7Vector3IfEE
status: NotDecompiled status: Matching
- offset: 0x2fe164 - offset: 0x2fe164
size: 16 size: 16
label: _ZN12RocketFlower9disappearEv label: _ZN12RocketFlower9disappearEv
status: NotDecompiled status: Matching
- offset: 0x2fe174 - offset: 0x2fe174
size: 124 size: 124
label: _ZN12RocketFlower14disappearForceEv label: _ZN12RocketFlower14disappearForceEv
status: NotDecompiled status: Matching
- offset: 0x2fe1f0 - offset: 0x2fe1f0
size: 104 size: 104
label: _ZN12RocketFlower7controlEv label: _ZN12RocketFlower7controlEv
status: NotDecompiled status: Matching
- offset: 0x2fe258 - offset: 0x2fe258
size: 80 size: 80
label: _ZNK12_GLOBAL__N_119RocketFlowerNrvWait7executeEPN2al11NerveKeeperE label: _ZNK12_GLOBAL__N_119RocketFlowerNrvWait7executeEPN2al11NerveKeeperE
status: NotDecompiled status: Matching
guess: true guess: true
- offset: 0x2fe2a8 - offset: 0x2fe2a8
size: 64 size: 64
label: _ZNK12_GLOBAL__N_121RocketFlowerNrvAttach7executeEPN2al11NerveKeeperE label: _ZNK12_GLOBAL__N_121RocketFlowerNrvAttach7executeEPN2al11NerveKeeperE
status: NotDecompiled status: Matching
guess: true guess: true
- offset: 0x2fe2e8 - offset: 0x2fe2e8
size: 104 size: 104
label: _ZNK12_GLOBAL__N_125RocketFlowerNrvWaitFollow7executeEPN2al11NerveKeeperE label: _ZNK12_GLOBAL__N_125RocketFlowerNrvWaitFollow7executeEPN2al11NerveKeeperE
status: NotDecompiled status: Matching
guess: true guess: true
- offset: 0x2fe350 - offset: 0x2fe350
size: 8 size: 8
label: _ZNK12_GLOBAL__N_121RocketFlowerNrvFollow7executeEPN2al11NerveKeeperE label: _ZNK12_GLOBAL__N_121RocketFlowerNrvFollow7executeEPN2al11NerveKeeperE
status: NotDecompiled status: Matching
guess: true guess: true
- offset: 0x2fe358 - offset: 0x2fe358
size: 8 size: 8
label: _ZNK12_GLOBAL__N_125RocketFlowerNrvWaitAttach7executeEPN2al11NerveKeeperE label: _ZNK12_GLOBAL__N_125RocketFlowerNrvWaitAttach7executeEPN2al11NerveKeeperE
status: NotDecompiled status: Matching
guess: true guess: true
MapObj/RocketFlowerEquipWatcher.o: MapObj/RocketFlowerEquipWatcher.o:
'.text': '.text':
@ -133676,7 +133676,7 @@ Scene/ProjectActorFactory.o:
- offset: 0x4b66dc - offset: 0x4b66dc
size: 52 size: 52
label: _ZN2al19createActorFunctionI14BossKnuckleFixEEPNS_9LiveActorEPKc label: _ZN2al19createActorFunctionI14BossKnuckleFixEEPNS_9LiveActorEPKc
status: NotDecompiled status: Matching
lazy: true lazy: true
- offset: 0x4b6710 - offset: 0x4b6710
size: 52 size: 52
@ -134846,7 +134846,7 @@ Scene/ProjectActorFactory.o:
- offset: 0x4b99d4 - offset: 0x4b99d4
size: 52 size: 52
label: _ZN2al19createActorFunctionI17MoonBasementFloorEEPNS_9LiveActorEPKc label: _ZN2al19createActorFunctionI17MoonBasementFloorEEPNS_9LiveActorEPKc
status: NotDecompiled status: Matching
lazy: true lazy: true
- offset: 0x4b9a08 - offset: 0x4b9a08
size: 52 size: 52
@ -135906,7 +135906,7 @@ Scene/ProjectActorFactory.o:
- offset: 0x4bd180 - offset: 0x4bd180
size: 52 size: 52
label: _ZN2al19createActorFunctionI12RocketFlowerEEPNS_9LiveActorEPKc label: _ZN2al19createActorFunctionI12RocketFlowerEEPNS_9LiveActorEPKc
status: NotDecompiled status: Matching
lazy: true lazy: true
- offset: 0x4bd1b4 - offset: 0x4bd1b4
size: 52 size: 52
@ -264305,60 +264305,60 @@ Library/Movement/ClockMovement.o:
label: label:
- _ZN2al13ClockMovementC1ERKNS_13ActorInitInfoE - _ZN2al13ClockMovementC1ERKNS_13ActorInitInfoE
- _ZN2al13ClockMovementC2ERKNS_13ActorInitInfoE - _ZN2al13ClockMovementC2ERKNS_13ActorInitInfoE
status: NotDecompiled status: Matching
- offset: 0x952a1c - offset: 0x952a1c
size: 100 size: 100
label: _ZN2al13ClockMovement8exeDelayEv label: _ZN2al13ClockMovement8exeDelayEv
status: NotDecompiled status: Matching
- offset: 0x952a80 - offset: 0x952a80
size: 204 size: 204
label: _ZN2al13ClockMovement13exeRotateSignEv label: _ZN2al13ClockMovement13exeRotateSignEv
status: NotDecompiled status: Matching
- offset: 0x952b4c - offset: 0x952b4c
size: 156 size: 156
label: _ZN2al13ClockMovement9exeRotateEv label: _ZN2al13ClockMovement9exeRotateEv
status: NotDecompiled status: Matching
- offset: 0x952be8 - offset: 0x952be8
size: 96 size: 96
label: _ZN2al13ClockMovement7exeWaitEv label: _ZN2al13ClockMovement7exeWaitEv
status: NotDecompiled status: Matching
- offset: 0x952c48 - offset: 0x952c48
size: 64 size: 64
label: _ZNK2al13ClockMovement16isFirstStepDelayEv label: _ZNK2al13ClockMovement16isFirstStepDelayEv
status: NotDecompiled status: Matching
- offset: 0x952c88 - offset: 0x952c88
size: 68 size: 68
label: _ZNK2al13ClockMovement21isFirstStepRotateSignEv label: _ZNK2al13ClockMovement21isFirstStepRotateSignEv
status: NotDecompiled status: Matching
- offset: 0x952ccc - offset: 0x952ccc
size: 68 size: 68
label: _ZNK2al13ClockMovement17isFirstStepRotateEv label: _ZNK2al13ClockMovement17isFirstStepRotateEv
status: NotDecompiled status: Matching
- offset: 0x952d10 - offset: 0x952d10
size: 64 size: 64
label: _ZNK2al13ClockMovement15isFirstStepWaitEv label: _ZNK2al13ClockMovement15isFirstStepWaitEv
status: NotDecompiled status: Matching
- offset: 0x952d50 - offset: 0x952d50
size: 36 size: 36
label: _ZN2al13ClockMovementD0Ev label: _ZN2al13ClockMovementD0Ev
status: NotDecompiled status: Matching
lazy: true lazy: true
- offset: 0x952d74 - offset: 0x952d74
size: 104 size: 104
label: '' label: _ZNK12_GLOBAL__N_121ClockMovementNrvDelay7executeEPN2al11NerveKeeperE
status: NotDecompiled status: Matching
- offset: 0x952ddc - offset: 0x952ddc
size: 8 size: 8
label: '' label: _ZNK12_GLOBAL__N_126ClockMovementNrvRotateSign7executeEPN2al11NerveKeeperE
status: NotDecompiled status: Matching
- offset: 0x952de4 - offset: 0x952de4
size: 8 size: 8
label: '' label: _ZNK12_GLOBAL__N_122ClockMovementNrvRotate7executeEPN2al11NerveKeeperE
status: NotDecompiled status: Matching
- offset: 0x952dec - offset: 0x952dec
size: 100 size: 100
label: '' label: _ZNK12_GLOBAL__N_120ClockMovementNrvWait7executeEPN2al11NerveKeeperE
status: NotDecompiled status: Matching
Library/Movement/EnemyStateBlowDown.o: Library/Movement/EnemyStateBlowDown.o:
'.text': '.text':
- offset: 0x952e50 - offset: 0x952e50

View file

@ -250,7 +250,7 @@ void ClockMapParts::exeRotate() {
mTimer++; mTimer++;
if (mTimer >= mRotateTimer) { if (mTimer >= mRotateTimer) {
mCurrentStep = modi(mCurrentStep + mTurnStepCount + 1, mTurnStepCount); mCurrentStep = wrapValue(mCurrentStep + 1, mTurnStepCount);
startNerveAction(this, "Wait"); startNerveAction(this, "Wait");
tryStartSe(this, "RotateEnd"); tryStartSe(this, "RotateEnd");
} }

View file

@ -205,6 +205,10 @@ void makeBoxMullerRandomGauss(sead::Vector2f* outBox, f32 randA, f32 randB);
f32 modf(f32 a, f32 b); f32 modf(f32 a, f32 b);
s32 modi(s32 a, s32 b); s32 modi(s32 a, s32 b);
inline s32 wrapValue(s32 value, s32 maxRange) {
return modi(value + maxRange, maxRange);
}
inline f32 wrapValue(f32 value, f32 maxRange) { inline f32 wrapValue(f32 value, f32 maxRange) {
return modf(value + maxRange, maxRange) + 0.0f; return modf(value + maxRange, maxRange) + 0.0f;
} }

View file

@ -0,0 +1,101 @@
#include "Library/Movement/ClockMovement.h"
#include "Library/Math/MathUtil.h"
#include "Library/Nerve/NerveSetupUtil.h"
#include "Library/Nerve/NerveUtil.h"
#include "Library/Placement/PlacementFunction.h"
namespace {
using namespace al;
NERVE_IMPL(ClockMovement, Delay);
NERVE_IMPL(ClockMovement, RotateSign);
NERVE_IMPL(ClockMovement, Rotate);
NERVE_IMPL(ClockMovement, Wait);
NERVES_MAKE_STRUCT(ClockMovement, Delay, RotateSign, Rotate);
NERVES_MAKE_NOSTRUCT(ClockMovement, Wait);
} // namespace
namespace al {
ClockMovement::ClockMovement(const ActorInitInfo& info) : NerveExecutor("クロックパーツ動作") {
getQuat(&mInitialQuat, info);
mCurrentQuat = mInitialQuat;
tryGetArg(&mClockAngleDegree, info, "ClockAngleDegree");
tryGetArg(&mRotateAxis, info, "RotateAxis");
tryGetArg(&mDelayTime, info, "DelayTime");
tryGetArg(&mRotateSignTime, info, "RotateSignTime");
tryGetArg(&mRotateTime, info, "RotateTime");
tryGetArg(&mWaitTime, info, "WaitTime");
if (mDelayTime == 0)
initNerve(&NrvClockMovement.RotateSign, 0);
else
initNerve(&NrvClockMovement.Delay, 0);
s32 stepsPerCycle = 1;
if (mClockAngleDegree != 0) {
stepsPerCycle = sead::Mathi::lcm(sead::Mathi::abs(mClockAngleDegree), 360) /
sead::Mathi::abs(mClockAngleDegree);
}
mMaxStepIndex = stepsPerCycle;
}
void ClockMovement::exeDelay() {
if (isGreaterEqualStep(this, mDelayTime - 1)) {
if (mRotateSignTime > 0)
setNerve(this, &NrvClockMovement.RotateSign);
else
setNerve(this, &NrvClockMovement.Rotate);
}
}
void ClockMovement::exeRotateSign() {
f32 rotateAngle = wrapValue(static_cast<f32>(mCurrentStepIndex * mClockAngleDegree), 360.0f);
rotateQuatLocalDirDegree(&mCurrentQuat, mInitialQuat, mRotateAxis,
rotateAngle +
sead::Mathf::sin(getNerveStep(this) * sead::Mathf::pi2() / 18.0f));
if (isGreaterEqualStep(this, mRotateSignTime - 1))
setNerve(this, &NrvClockMovement.Rotate);
}
void ClockMovement::exeRotate() {
f32 rotateAngle = wrapValue(
(calcNerveRate(this, mRotateTime) + mCurrentStepIndex) * mClockAngleDegree, 360.0f);
rotateQuatLocalDirDegree(&mCurrentQuat, mInitialQuat, mRotateAxis, rotateAngle);
if (isGreaterEqualStep(this, mRotateTime)) {
mCurrentStepIndex = wrapValue(mCurrentStepIndex + 1, mMaxStepIndex);
setNerve(this, &Wait);
}
}
void ClockMovement::exeWait() {
if (isGreaterEqualStep(this, mWaitTime)) {
if (mRotateSignTime > 0)
setNerve(this, &NrvClockMovement.RotateSign);
else
setNerve(this, &NrvClockMovement.Rotate);
}
}
bool ClockMovement::isFirstStepDelay() const {
return isNerve(this, &NrvClockMovement.Delay) && isFirstStep(this);
}
bool ClockMovement::isFirstStepRotateSign() const {
return isNerve(this, &NrvClockMovement.RotateSign) && isFirstStep(this);
}
bool ClockMovement::isFirstStepRotate() const {
return isNerve(this, &NrvClockMovement.Rotate) && isFirstStep(this);
}
bool ClockMovement::isFirstStepWait() const {
return isNerve(this, &Wait) && isFirstStep(this);
}
} // namespace al

View file

@ -0,0 +1,36 @@
#pragma once
#include <math/seadQuat.h>
#include "Library/Nerve/NerveExecutor.h"
namespace al {
struct ActorInitInfo;
class ClockMovement : public NerveExecutor {
public:
ClockMovement(const ActorInitInfo& info);
void exeDelay();
void exeRotateSign();
void exeRotate();
void exeWait();
bool isFirstStepDelay() const;
bool isFirstStepRotateSign() const;
bool isFirstStepRotate() const;
bool isFirstStepWait() const;
private:
sead::Quatf mCurrentQuat = sead::Quatf::unit;
sead::Quatf mInitialQuat = sead::Quatf::unit;
s32 mRotateAxis = 0;
s32 mClockAngleDegree = 90;
s32 mCurrentStepIndex = 0;
s32 mMaxStepIndex = 4;
s32 mDelayTime = 0;
s32 mRotateSignTime = 36;
s32 mRotateTime = 60;
s32 mWaitTime = 0;
};
static_assert(sizeof(ClockMovement) == 0x50);
} // namespace al

View file

@ -59,7 +59,7 @@ void SwingMovement::exeMove() {
if (updateRotate()) if (updateRotate())
setNerve(this, &Stop); setNerve(this, &Stop);
mFrameInCycle = modi((mFrameInCycle + 1) + mSwingCycle, mSwingCycle); mFrameInCycle = wrapValue(mFrameInCycle + 1, mSwingCycle);
} }
void SwingMovement::exeStop() { void SwingMovement::exeStop() {

View file

@ -323,11 +323,8 @@ s32 getNextRailPointNo(const IUseRail* railHolder) {
s32 newIndex = getRailPointNo(railHolder) + modifier; s32 newIndex = getRailPointNo(railHolder) + modifier;
s32 railPointNum = getRailPointNum(railHolder); s32 railPointNum = getRailPointNum(railHolder);
if (isLoop) { if (isLoop)
s32 sum = railPointNum + newIndex; return wrapValue(railPointNum + newIndex, getRailPointNum(railHolder));
s32 railPointNumAgain = getRailPointNum(railHolder);
return modi(sum + railPointNumAgain, railPointNumAgain);
}
return sead::Mathi::clamp2(0, newIndex, railPointNum - 1); return sead::Mathi::clamp2(0, newIndex, railPointNum - 1);
} }

View file

@ -26,6 +26,8 @@ public:
virtual void drawMain() const; virtual void drawMain() const;
virtual void drawSub() const; virtual void drawSub() const;
AudioKeeper* getAudioKeeper() const override { return mAudioKeeper; }
virtual bool isDisposable() const; virtual bool isDisposable() const;
virtual Scene* getCurrentScene() const { return nullptr; } virtual Scene* getCurrentScene() const { return nullptr; }
@ -34,8 +36,6 @@ public:
void setSceneCreator(SceneCreator* sceneCreator) override { mSceneCreator = sceneCreator; } void setSceneCreator(SceneCreator* sceneCreator) override { mSceneCreator = sceneCreator; }
AudioKeeper* getAudioKeeper() const override { return mAudioKeeper; }
void initAudio(const GameSystemInfo&, const char*, s32, s32, s32, const char*); void initAudio(const GameSystemInfo&, const char*, s32, s32, s32, const char*);
void initAudioKeeper(const char*); void initAudioKeeper(const char*);
void initDrawSystemInfo(const SequenceInitInfo&); void initDrawSystemInfo(const SequenceInitInfo&);

View file

@ -17,8 +17,7 @@ void FlowMapCtrl::update() {
flowParameters.y = flowParameters.y =
calcRate01(halfInterval - sead::Mathi::abs(halfInterval - mFlowStep), 0.0f, halfInterval); calcRate01(halfInterval - sead::Mathi::abs(halfInterval - mFlowStep), 0.0f, halfInterval);
flowParameters.z = calcRate01(mFlowStep, 0.0f, mInterval); flowParameters.z = calcRate01(mFlowStep, 0.0f, mInterval);
flowParameters.w = flowParameters.w = calcRate01(wrapValue(mFlowStep + halfInterval, mInterval), 0.0f, mInterval);
calcRate01(modi(mFlowStep + halfInterval + mInterval, mInterval), 0.0f, mInterval);
s32 materialCount = getMaterialCount(mParent); s32 materialCount = getMaterialCount(mParent);
for (s32 i = 0; i < materialCount; i++) { for (s32 i = 0; i < materialCount; i++) {
@ -27,7 +26,7 @@ void FlowMapCtrl::update() {
} }
mFlowStep++; mFlowStep++;
mFlowStep = modi(mFlowStep + mInterval, mInterval); mFlowStep = wrapValue(mFlowStep, mInterval);
} }
} // namespace al } // namespace al

View file

@ -0,0 +1,156 @@
#include "Boss/BossUtil/BossStateChasePlayer.h"
#include <cmath>
#include "Library/LiveActor/ActorMovementFunction.h"
#include "Library/LiveActor/ActorPoseUtil.h"
#include "Library/Math/MathUtil.h"
#include "Library/Nerve/NerveSetupUtil.h"
#include "Library/Nerve/NerveUtil.h"
#include "Library/Player/PlayerUtil.h"
namespace {
NERVE_IMPL(BossStateChasePlayer, Chase)
NERVE_IMPL(BossStateChasePlayer, Stop)
NERVE_IMPL(BossStateChasePlayer, Lost)
NERVES_MAKE_NOSTRUCT(BossStateChasePlayer, Chase, Stop, Lost)
const BossStateChasePlayerParam sDefaultParam = {1.0f, 0.3f, 0.9f, 500.0f, 0.2f,
2.0f, 0.1f, 10.0f, 90.0f};
} // namespace
BossStateChasePlayer::BossStateChasePlayer(const char* name, al::LiveActor* actor,
const BossStateChasePlayerParam* param)
: al::ActorStateBase(name, actor), mParam(param) {
initNerve(&Chase, 0);
if (!param)
mParam = &sDefaultParam;
}
void BossStateChasePlayer::appear() {
al::NerveStateBase::appear();
al::setNerve(this, &Chase);
}
void BossStateChasePlayer::startStop() {
al::setNerve(this, &Stop);
}
// NON_MATCHING: https://decomp.me/scratch/pvWjE/ - Stack frame and register allocation differ
// (target uses d8-d11/x20-x21 as callee-saved regs, extra loads of mRotationAngle/mTargetPlayer
// early); dirToPlayer built on-stack with different field ordering; subtraction operand order
// flipped in several fsub instructions
void BossStateChasePlayer::exeChase() {
mTargetPlayer = al::tryFindAlivePlayerActorFirst(mActor);
if (!mTargetPlayer) {
al::setNerve(this, &Lost);
return;
}
// Compute direction from actor to player (horizontal only, for rotation)
sead::Vector3f dirToPlayer;
dirToPlayer = al::getTrans(mTargetPlayer);
const sead::Vector3f& actorTrans = al::getTrans(mActor);
dirToPlayer.x -= actorTrans.x;
dirToPlayer.y = 0.0f;
dirToPlayer.z -= actorTrans.z;
// Update rotation toward player
if (al::tryNormalizeOrZero(&dirToPlayer)) {
sead::Vector3f frontDir = sead::Vector3f::ez;
al::calcFrontDir(&frontDir, mActor);
f32 angle = al::calcAngleOnPlaneDegree(frontDir, dirToPlayer, sead::Vector3f::ey);
f32 sign = al::sign(angle);
// Choose turn speed based on whether we're already roughly facing the player
f32 turnSpeed;
if (angle <= -mParam->frontAngleThreshold || angle >= mParam->frontAngleThreshold)
turnSpeed = mParam->turnSpeedFast;
else
turnSpeed = mParam->turnSpeedSlow;
// Clamp rotation to turn speed, preserving sign
f32 absAngle = angle > 0.0f ? angle : -angle;
f32 absTurnSpeed = turnSpeed > 0.0f ? turnSpeed : -turnSpeed;
f32 targetRotation = sign * (absAngle < absTurnSpeed ? absAngle : absTurnSpeed);
mRotationAngle = al::converge(mRotationAngle, targetRotation, mParam->turnConvergeSpeed);
al::rotateQuatYDirDegree(mActor, mRotationAngle);
} else {
mRotationAngle = al::converge(mRotationAngle, 0.0f, mParam->turnConvergeSpeed);
}
// Compute current XZ speed
const sead::Vector3f& vel = al::getVelocity(mActor);
f32 speedXZ = sqrtf(vel.x * vel.x + vel.z * vel.z);
// Get fresh front direction after rotation
sead::Vector3f frontDir = sead::Vector3f::ez;
al::calcFrontDir(&frontDir, mActor);
// Recompute direction to player for speed logic
dirToPlayer = al::getTrans(mTargetPlayer);
const sead::Vector3f& actorTrans2 = al::getTrans(mActor);
dirToPlayer.x -= actorTrans2.x;
dirToPlayer.y = 0.0f;
dirToPlayer.z -= actorTrans2.z;
bool decelerate = false;
if (al::tryNormalizeOrZero(&dirToPlayer)) {
if (al::calcAngleDegree(frontDir, dirToPlayer) > mParam->chaseAngleMax)
decelerate = true;
}
f32 newSpeed;
if (!decelerate) {
// Check if close enough to stop accelerating
const sead::Vector3f& at = al::getTrans(mActor);
const sead::Vector3f& pt = al::getTrans(mTargetPlayer);
f32 dx = at.x - pt.x;
f32 dz = at.z - pt.z;
f32 dist = sqrtf(dx * dx + dz * dz);
if (dist <= mParam->proximityStopDist)
decelerate = true;
}
if (decelerate)
newSpeed = al::converge(speedXZ, 0.0f, mParam->deceleration);
else
newSpeed = speedXZ + mParam->acceleration;
al::setVelocityToDirection(mActor, frontDir, newSpeed);
al::scaleVelocityDirection(mActor, frontDir, mParam->scaleVelocity);
}
void BossStateChasePlayer::exeLost() {
const sead::Vector3f& vel = al::getVelocity(mActor);
f32 speed = sqrtf(vel.x * vel.x + vel.y * vel.y + vel.z * vel.z);
f32 newSpeed = al::converge(speed, 0.0f, mParam->deceleration);
sead::Vector3f newVelocity = al::getVelocity(mActor);
f32 len = sqrtf(newVelocity.x * newVelocity.x + newVelocity.y * newVelocity.y +
newVelocity.z * newVelocity.z);
if (len > 0.0f) {
f32 scale = newSpeed / len;
newVelocity.x *= scale;
newVelocity.y *= scale;
newVelocity.z *= scale;
}
al::setVelocity(mActor, newVelocity);
mTargetPlayer = al::tryFindAlivePlayerActorFirst(mActor);
if (mTargetPlayer)
al::setNerve(this, &Chase);
}
void BossStateChasePlayer::exeStop() {
const sead::Vector3f& vel = al::getVelocity(mActor);
f32 speedXZ = sqrtf(vel.x * vel.x + vel.z * vel.z);
f32 newSpeed = al::converge(speedXZ, 0.0f, mParam->deceleration);
al::setVelocityToDirection(mActor, al::getVelocity(mActor), newSpeed);
if (al::isNearZero(newSpeed, 0.001f))
kill();
}

View file

@ -0,0 +1,34 @@
#pragma once
#include "Library/Nerve/NerveStateBase.h"
struct BossStateChasePlayerParam {
f32 acceleration;
f32 deceleration;
f32 scaleVelocity;
f32 proximityStopDist;
f32 turnSpeedSlow;
f32 turnSpeedFast;
f32 turnConvergeSpeed;
f32 frontAngleThreshold;
f32 chaseAngleMax;
};
class BossStateChasePlayer : public al::ActorStateBase {
public:
BossStateChasePlayer(const char* name, al::LiveActor* actor,
const BossStateChasePlayerParam* param);
void appear() override;
void startStop();
void exeChase();
void exeLost();
void exeStop();
private:
const BossStateChasePlayerParam* mParam = nullptr;
const al::LiveActor* mTargetPlayer = nullptr;
f32 mRotationAngle = 0.0f;
};

View file

@ -0,0 +1,48 @@
#pragma once
#include <basis/seadTypes.h>
#include <math/seadQuat.h>
#include <math/seadVector.h>
#include "Library/Scene/ISceneObj.h"
#include "Scene/SceneObjFactory.h"
namespace al {
class LiveActor;
}
class KoopaHackStopCtrl : public al::ISceneObj {
public:
static constexpr s32 sSceneObjId = SceneObjID_KoopaStopHackCtrl;
KoopaHackStopCtrl();
const char* getSceneObjName() const override { return "崩落クッパの停止制御"; }
void startStop(const al::LiveActor* actor);
void endStop(const al::LiveActor* actor);
void resetPosture(const al::LiveActor* actor, const sead::Quatf& quat,
const sead::Vector3f& trans);
bool tryResetPosture(al::LiveActor* actor);
private:
const al::LiveActor* mStopActor = nullptr;
bool mIsNeedResetPosture = false;
sead::Quatf mResetQuat = sead::Quatf::unit;
sead::Vector3f mResetTrans = sead::Vector3f::zero;
bool mIsStatusDemoForSceneKoopaHack = false;
};
static_assert(sizeof(KoopaHackStopCtrl) == 0x38, "KoopaHackStopCtrl");
namespace KoopaHackFunction {
void startStopKoopaHack(al::LiveActor* actor);
void endStopKoopaHack(al::LiveActor* actor);
void resetPostureKoopaHack(al::LiveActor* actor, const sead::Quatf& quat,
const sead::Vector3f& trans);
bool isStopKoopaHack(const al::LiveActor* actor);
bool isStatusDemoForSceneKoopaHack(const al::LiveActor* actor);
void setStatusDemoForSceneKoopaHack(const al::LiveActor* actor);
void resetStatusDemoForSceneKoopaHack(const al::LiveActor* actor);
} // namespace KoopaHackFunction

View file

@ -65,8 +65,8 @@ void KoopaLandPointHolder::decidePointEitherFarSide(const sead::Vector3f& pos) {
} }
mInvalidPoints[mCurrentLandPoint] = false; mInvalidPoints[mCurrentLandPoint] = false;
s32 prevPoint = al::modi(mCurrentLandPoint - 1 + mLandPoints, mLandPoints); s32 prevPoint = al::wrapValue(mCurrentLandPoint - 1, mLandPoints);
s32 nextPoint = al::modi(mCurrentLandPoint + 1 + mLandPoints, mLandPoints); s32 nextPoint = al::wrapValue(mCurrentLandPoint + 1, mLandPoints);
f32 prevDist = getKoopaLandPointDistance(mPointsTrans[prevPoint], pos); f32 prevDist = getKoopaLandPointDistance(mPointsTrans[prevPoint], pos);
f32 nextDist = getKoopaLandPointDistance(mPointsTrans[nextPoint], pos); f32 nextDist = getKoopaLandPointDistance(mPointsTrans[nextPoint], pos);

View file

@ -638,7 +638,8 @@ void Bubble::control() {
if (!al::isNerve(this, &NrvBubble.StandBy) && !al::isNerve(this, &NrvBubble.Delay) && if (!al::isNerve(this, &NrvBubble.StandBy) && !al::isNerve(this, &NrvBubble.Delay) &&
(!isHack() || !rs::isActiveHackStartDemo(mPlayerHack)) && (!isHack() || !rs::isActiveHackStartDemo(mPlayerHack)) &&
!al::isClipped(mClippingProbeActor) && !mIsClipped) { !al::isClipped(mClippingProbeActor) && !mIsClipped) {
mReviveDelayCount = al::modi(mReviveDelayCount + 1 + mReviveDelayTime, mReviveDelayTime); mReviveDelayCount =
al::wrapValue(static_cast<s32>(mReviveDelayCount + 1), mReviveDelayTime);
} }
mIsClipped = al::isClipped(mClippingProbeActor); mIsClipped = al::isClipped(mClippingProbeActor);

View file

@ -505,7 +505,8 @@ void Gamane::exeHack() {
mCoinsLeft--; mCoinsLeft--;
} }
mHackCoinAppearCounter = al::modi((mHackCoinAppearCounter++ + 1) + 6, 6); // NOTE: this is only one increment, as post-incrementing is used
mHackCoinAppearCounter = al::wrapValue(mHackCoinAppearCounter++ + 1, 6);
} }
void Gamane::exeTrampled() { void Gamane::exeTrampled() {

View file

@ -25,7 +25,7 @@ HosuiTrailKeeper::HosuiTrailKeeper(const al::ActorInitInfo& initInfo) {
void HosuiTrailKeeper::appearTrail(const sead::Vector3f& pos, const sead::Vector3f& dir) { void HosuiTrailKeeper::appearTrail(const sead::Vector3f& pos, const sead::Vector3f& dir) {
s32 count = mTrails.size(); s32 count = mTrails.size();
s32 prevIdx = al::modi(mIndex + count - 1 + count, count); s32 prevIdx = al::wrapValue(mIndex + count - 1, count);
HosuiTrail* prevTrail = mTrails[prevIdx]; HosuiTrail* prevTrail = mTrails[prevIdx];
if (al::isAlive(prevTrail) && (pos - al::getTrans(prevTrail)).length() < 120.0f) if (al::isAlive(prevTrail) && (pos - al::getTrans(prevTrail)).length() < 120.0f)
@ -56,12 +56,12 @@ void HosuiTrailKeeper::appearTrail(const sead::Vector3f& pos, const sead::Vector
trail->setFollowCollisionParts(triangle.getCollisionParts()); trail->setFollowCollisionParts(triangle.getCollisionParts());
} }
s32 disappearIdx = al::modi(mIndex + 5 + count, count); s32 disappearIdx = al::wrapValue(mIndex + 5, count);
HosuiTrail* disappearTrail = mTrails[disappearIdx]; HosuiTrail* disappearTrail = mTrails[disappearIdx];
if (al::isAlive(disappearTrail)) if (al::isAlive(disappearTrail))
disappearTrail->disappear(); disappearTrail->disappear();
mIndex = al::modi(mIndex + 1 + count, count); mIndex = al::wrapValue(mIndex + 1, count);
} }
void HosuiTrailKeeper::forceKillAll() { void HosuiTrailKeeper::forceKillAll() {

View file

@ -243,8 +243,7 @@ void MenuSelectParts::exeSelect() {
s32 direction = mKeyRepeatCtrl->isUp() ? -1 : 1; s32 direction = mKeyRepeatCtrl->isUp() ? -1 : 1;
al::startAction(mLayoutArray[calcPartsIndex(mCursorItemIndex)], "Wait"); al::startAction(mLayoutArray[calcPartsIndex(mCursorItemIndex)], "Wait");
mCursorItemIndex = mCursorItemIndex = al::wrapValue(mCursorItemIndex + direction, mMenuItemAmount);
al::modi(mCursorItemIndex + direction + mMenuItemAmount, mMenuItemAmount);
f32 pitch = ((1.0f - (f32)mCursorItemIndex / (mMenuItemAmount - 1)) * 0.375f) + 1.0f; f32 pitch = ((1.0f - (f32)mCursorItemIndex / (mMenuItemAmount - 1)) * 0.375f) + 1.0f;
al::PadRumbleParam param; al::PadRumbleParam param;

View file

@ -161,15 +161,15 @@ void WindowConfirmData::exeWait() {
if (rs::isRepeatUiDown(mWindowConfirmLayout)) { if (rs::isRepeatUiDown(mWindowConfirmLayout)) {
if (mSelectionCooldown == 0) if (mSelectionCooldown == 0)
changeSelectingIdx(al::modi((mSelectionIndex + 1) + 2, 2)); changeSelectingIdx(al::wrapValue(mSelectionIndex + 1, 2));
mSelectionCooldown = al::modi((mSelectionCooldown + 1) + 10, 10); mSelectionCooldown = al::wrapValue(mSelectionCooldown + 1, 10);
return; return;
} }
if (rs::isRepeatUiUp(mWindowConfirmLayout)) { if (rs::isRepeatUiUp(mWindowConfirmLayout)) {
if (mSelectionCooldown == 0) if (mSelectionCooldown == 0)
changeSelectingIdx(al::modi((mSelectionIndex - 1) + 2, 2)); changeSelectingIdx(al::wrapValue(mSelectionIndex - 1, 2));
mSelectionCooldown = al::modi((mSelectionCooldown + 1) + 10, 10); mSelectionCooldown = al::wrapValue(mSelectionCooldown + 1, 10);
return; return;
} }

View file

@ -0,0 +1,89 @@
#include "MapObj/BossKnuckleFix.h"
#include <math/seadVector.h>
#include "Library/LiveActor/ActorActionFunction.h"
#include "Library/LiveActor/ActorAnimFunction.h"
#include "Library/LiveActor/ActorCollisionFunction.h"
#include "Library/LiveActor/ActorInitUtil.h"
#include "Library/LiveActor/ActorPoseUtil.h"
#include "Library/LiveActor/ActorResourceFunction.h"
#include "Library/LiveActor/ActorSensorUtil.h"
#include "Library/LiveActor/LiveActorFunction.h"
#include "Library/Nerve/NerveSetupUtil.h"
#include "Library/Nerve/NerveUtil.h"
#include "Library/Obj/CollisionObj.h"
#include "Library/Stage/StageSwitchUtil.h"
#include "Util/SensorMsgFunction.h"
namespace {
NERVE_IMPL(BossKnuckleFix, Wait);
NERVE_IMPL(BossKnuckleFix, ReactionLarge);
NERVE_IMPL(BossKnuckleFix, Reaction);
NERVES_MAKE_STRUCT(BossKnuckleFix, Wait, ReactionLarge, Reaction);
} // namespace
BossKnuckleFix::BossKnuckleFix(const char* name) : al::LiveActor(name) {}
void BossKnuckleFix::init(const al::ActorInitInfo& info) {
al::initActorWithArchiveName(this, info, "BossKnuckleBody", "Fix");
al::initNerve(this, &NrvBossKnuckleFix.Wait, 0);
// NOTE: color of embedded grand shine is hardcoded to 5 (Sand)
al::startMclAnimAndSetFrameAndStop(al::getSubActor(this, "グランドシャイン"), "Color", 5.0f);
al::trySyncStageSwitchKill(this);
makeActorAlive();
mCollisionObj = new al::CollisionObj(info, al::getModelResource(this), "MoveLimit",
al::getHitSensor(this, "Body"), nullptr, nullptr);
al::setCollisionPartsSpecialPurposeName(mCollisionObj, "MoveLimit");
al::setTrans(mCollisionObj, al::getTrans(this));
al::setRotate(mCollisionObj, {0.0f, 90.0f, 0.0f});
mCollisionObj->makeActorAlive();
}
bool BossKnuckleFix::receiveMsg(const al::SensorMsg* message, al::HitSensor* other,
al::HitSensor* self) {
if (rs::isMsgPlayerDisregardHomingAttack(message))
return true;
if (al::isNerve(this, &NrvBossKnuckleFix.Wait) &&
(rs::isMsgSphinxRideAttackTouch(message) || rs::isMsgPlayerAndCapHipDropAll(message))) {
rs::requestHitReactionToAttacker(message, self, other);
mReactionCount++;
if (mReactionCount >= 3) {
mReactionCount = 0;
al::setNerve(this, &NrvBossKnuckleFix.ReactionLarge);
} else
al::setNerve(this, &NrvBossKnuckleFix.Reaction);
return !rs::isMsgPlayerAndCapHipDropAll(message);
}
return false;
}
void BossKnuckleFix::exeWait() {
if (al::isFirstStep(this))
al::startAction(this, "MapWait");
}
void BossKnuckleFix::exeReaction() {
if (al::isFirstStep(this))
al::startAction(this, "MapReaction");
if (al::isActionEnd(this))
al::setNerve(this, &NrvBossKnuckleFix.Wait);
}
void BossKnuckleFix::exeReactionLarge() {
if (al::isFirstStep(this)) {
al::startAction(this, "MapReactionLarge");
al::tryOnStageSwitch(this, "ReactionOn");
}
if (al::isActionEnd(this))
al::setNerve(this, &NrvBossKnuckleFix.Wait);
}

View file

@ -0,0 +1,31 @@
#pragma once
#include <basis/seadTypes.h>
#include "Library/LiveActor/LiveActor.h"
namespace al {
struct ActorInitInfo;
class CollisionObj;
class HitSensor;
class SensorMsg;
} // namespace al
class BossKnuckleFix : public al::LiveActor {
public:
BossKnuckleFix(const char* name);
void init(const al::ActorInitInfo& info) override;
bool receiveMsg(const al::SensorMsg* message, al::HitSensor* other,
al::HitSensor* self) override;
void exeWait();
void exeReaction();
void exeReactionLarge();
private:
al::CollisionObj* mCollisionObj = nullptr;
s32 mReactionCount = 0;
};
static_assert(sizeof(BossKnuckleFix) == 0x118);

View file

@ -0,0 +1,165 @@
#include "MapObj/MoonBasementFloor.h"
#include "Library/LiveActor/ActorActionFunction.h"
#include "Library/LiveActor/ActorClippingFunction.h"
#include "Library/LiveActor/ActorFlagFunction.h"
#include "Library/LiveActor/ActorInitFunction.h"
#include "Library/LiveActor/ActorInitUtil.h"
#include "Library/LiveActor/ActorMovementFunction.h"
#include "Library/Math/MathUtil.h"
#include "Library/Nerve/NerveSetupUtil.h"
#include "Library/Nerve/NerveUtil.h"
#include "Library/Placement/PlacementFunction.h"
#include "Library/Stage/StageSwitchUtil.h"
#include "Library/Thread/FunctorV0M.h"
#include "Boss/Koopa/KoopaHackStopCtrl.h"
#include "Util/SensorMsgFunction.h"
namespace {
NERVE_IMPL(MoonBasementFloor, Wait)
NERVE_IMPL(MoonBasementFloor, FallSignStart)
NERVE_IMPL_(MoonBasementFloor, FallSignStartByMeteor, FallSignStart)
NERVE_IMPL_(MoonBasementFloor, FallSignStartBySwitch, FallSignStart)
NERVE_IMPL(MoonBasementFloor, FallSignBySwitch)
NERVE_IMPL_(MoonBasementFloor, FallByMeteor, Fall)
NERVE_IMPL(MoonBasementFloor, FallSign)
NERVE_IMPL(MoonBasementFloor, Fall)
NERVES_MAKE_STRUCT(MoonBasementFloor, Wait, FallSignStart, FallSignStartByMeteor,
FallSignStartBySwitch, FallSignBySwitch, FallByMeteor, FallSign, Fall)
const f32 sFallGravity = 0.2f;
const f32 sFallScale = 0.95f;
const f32 sFallGravityByMeteor = 0.2f;
const f32 sFallScaleByMeteor = 0.95f;
struct MoonFallParams {
const f32* gravity;
const f32* scale;
};
const MoonFallParams sFallParams{&sFallGravity, &sFallScale};
const MoonFallParams sFallParamsByMeteor{&sFallGravityByMeteor, &sFallScaleByMeteor};
inline const MoonFallParams& getMoonFallParams(al::LiveActor* actor) {
return al::isNerve(actor, &NrvMoonBasementFloor.FallByMeteor) ? sFallParamsByMeteor :
sFallParams;
}
} // namespace
MoonBasementFloor::MoonBasementFloor(const char* name) : al::LiveActor(name) {}
void MoonBasementFloor::init(const al::ActorInitInfo& info) {
using MoonBasementFloorFunctor =
al::FunctorV0M<MoonBasementFloor*, void (MoonBasementFloor::*)()>;
al::initActorChangeModel(this, info);
al::initNerve(this, &NrvMoonBasementFloor.Wait, 0);
f32 rotate = sead::Mathf::floor(al::getRandom(0.0f, 3.99f));
al::addRotateAndRepeatY(this, rotate * 90.0);
if (al::listenStageSwitchOn(
this, "SwitchFallStart",
MoonBasementFloorFunctor(this, &MoonBasementFloor::startFallBySwitch))) {
al::tryGetArg(&mFallSignStepBySwitch, info, "FallSignStepBySwitch");
}
al::trySyncStageSwitchKill(this);
}
void MoonBasementFloor::startFallBySwitch() {
if (!al::isAlive(this))
return;
if (al::isNerve(this, &NrvMoonBasementFloor.Fall))
return;
if (al::isNerve(this, &NrvMoonBasementFloor.FallByMeteor))
return;
s32 fallSignStepBySwitch = mFallSignStepBySwitch;
al::invalidateClipping(this);
if (fallSignStepBySwitch == 0)
al::setNerve(this, &NrvMoonBasementFloor.FallSignStart);
else
al::setNerve(this, &NrvMoonBasementFloor.FallSignStartBySwitch);
}
void MoonBasementFloor::movement() {
if (!KoopaHackFunction::isStopKoopaHack(this))
al::LiveActor::movement();
}
bool MoonBasementFloor::receiveMsg(const al::SensorMsg* message, al::HitSensor* other,
al::HitSensor* self) {
if (!al::isNerve(this, &NrvMoonBasementFloor.Wait))
return false;
if (rs::isMsgKoopaTouchFloor(message)) {
al::startHitReaction(this, "クッパ着地");
al::invalidateClipping(this);
al::setNerve(this, &NrvMoonBasementFloor.FallSignStart);
return true;
}
if (rs::isMsgMoonBasementAttackMeteor(message)) {
al::invalidateClipping(this);
al::setNerve(this, &NrvMoonBasementFloor.FallSignStartByMeteor);
return true;
}
return false;
}
void MoonBasementFloor::exeWait() {
if (al::isFirstStep(this))
al::startAction(this, "Wait");
}
void MoonBasementFloor::exeFallSignStart() {
if (al::isFirstStep(this))
al::startAction(this, "FallSignStart");
if (al::isActionEnd(this)) {
if (al::isNerve(this, &NrvMoonBasementFloor.FallSignStartBySwitch))
al::setNerve(this, &NrvMoonBasementFloor.FallSignBySwitch);
else if (al::isNerve(this, &NrvMoonBasementFloor.FallSignStartByMeteor))
al::setNerve(this, &NrvMoonBasementFloor.FallByMeteor);
else
al::setNerve(this, &NrvMoonBasementFloor.FallSign);
}
}
void MoonBasementFloor::exeFallSign() {
if (al::isFirstStep(this))
al::startAction(this, "FallSign");
al::setNerveAtActionEnd(this, &NrvMoonBasementFloor.Fall);
}
void MoonBasementFloor::exeFallSignBySwitch() {
if (al::isFirstStep(this))
al::startAction(this, "FallSignBySwitch");
s32 fallSignStep = mFallSignStepBySwitch;
if (fallSignStep < 0)
fallSignStep = 30;
al::setNerveAtGreaterEqualStep(this, &NrvMoonBasementFloor.Fall, fallSignStep);
}
void MoonBasementFloor::exeFall() {
if (al::isFirstStep(this))
al::startAction(this, "Fall");
al::addVelocityToGravity(this, *getMoonFallParams(this).gravity);
al::scaleVelocity(this, *getMoonFallParams(this).scale);
if (al::isGreaterEqualStep(this, 300)) {
al::startHitReaction(this, "消滅");
kill();
}
}

View file

@ -0,0 +1,34 @@
#pragma once
#include <basis/seadTypes.h>
#include "Library/LiveActor/LiveActor.h"
namespace al {
struct ActorInitInfo;
class HitSensor;
class SensorMsg;
} // namespace al
class MoonBasementFloor : public al::LiveActor {
public:
MoonBasementFloor(const char* name);
void init(const al::ActorInitInfo& info) override;
void movement() override;
bool receiveMsg(const al::SensorMsg* message, al::HitSensor* other,
al::HitSensor* self) override;
void startFallBySwitch();
void exeWait();
void exeFallSignStart();
void exeFallSign();
void exeFallSignBySwitch();
void exeFall();
private:
s32 mFallSignStepBySwitch = -1;
};
static_assert(sizeof(MoonBasementFloor) == 0x110);

237
src/MapObj/RocketFlower.cpp Normal file
View file

@ -0,0 +1,237 @@
#include "MapObj/RocketFlower.h"
#include "Library/Collision/PartsConnectorUtil.h"
#include "Library/Effect/EffectSystemInfo.h"
#include "Library/LiveActor/ActorActionFunction.h"
#include "Library/LiveActor/ActorAnimFunction.h"
#include "Library/LiveActor/ActorClippingFunction.h"
#include "Library/LiveActor/ActorInitUtil.h"
#include "Library/LiveActor/ActorMovementFunction.h"
#include "Library/LiveActor/ActorPoseUtil.h"
#include "Library/LiveActor/ActorSensorUtil.h"
#include "Library/Math/MathUtil.h"
#include "Library/Nerve/NerveSetupUtil.h"
#include "Library/Nerve/NerveUtil.h"
#include "MapObj/RocketFlowerFunction.h"
#include "Util/PlayerUtil.h"
#include "Util/SensorMsgFunction.h"
namespace {
NERVE_IMPL(RocketFlower, Wait);
NERVE_IMPL(RocketFlower, Attach);
NERVE_IMPL(RocketFlower, WaitFollow);
NERVE_IMPL(RocketFlower, Follow);
NERVE_IMPL(RocketFlower, WaitAttach);
NERVES_MAKE_STRUCT(RocketFlower, Wait, Attach, WaitFollow, Follow, WaitAttach);
} // namespace
RocketFlower::RocketFlower(const char* name) : al::LiveActor(name) {}
void RocketFlower::init(const al::ActorInitInfo& info) {
al::initActor(this, info);
al::initNerve(this, &NrvRocketFlower.Wait, 0);
makeActorAlive();
mMtxConnector = al::tryCreateMtxConnector(this, info);
mFlowerSub = new al::LiveActor("ロケットフラワーの花");
al::initChildActorWithArchiveNameNoPlacementInfo(mFlowerSub, info, "RocketFlowerDash", nullptr);
al::startAction(mFlowerSub, "Wait");
mFlowerSub->makeActorDead();
RocketFlowerFunction::createRocketFlowerEquipWatcherIfNotExist(this, info);
al::setHitSensorPosPtr(this, "Equip", al::getTransPtr(mFlowerSub));
al::startAction(this, "Wait");
}
void RocketFlower::initAfterPlacement() {
if (mMtxConnector)
al::attachMtxConnectorToCollision(mMtxConnector, this, false);
}
void RocketFlower::attackSensor(al::HitSensor* self, al::HitSensor* other) {
if (!al::isSensorName(self, "Equip"))
return;
if (isEnableEquip()) {
if (rs::sendMsgRocketFlowerExtension(other, self))
al::setNerve(this, &NrvRocketFlower.Attach);
}
}
bool RocketFlower::isEnableEquip() const {
if (al::isNerve(this, &NrvRocketFlower.Follow) && !al::isNewNerve(this))
return true;
return al::isNerve(this, &NrvRocketFlower.WaitAttach);
}
bool RocketFlower::receiveMsg(const al::SensorMsg* message, al::HitSensor* other,
al::HitSensor* self) {
if (al::isMsgPlayerSpinAttack(message)) {
if (al::isNerve(this, &NrvRocketFlower.Wait)) {
al::invalidateClipping(this);
al::setNerve(this, &NrvRocketFlower.WaitFollow);
}
} else if (rs::isMsgCapItemGet(message)) {
if (al::isNerve(this, &NrvRocketFlower.Wait)) {
al::invalidateClipping(this);
al::setNerve(this, &NrvRocketFlower.Follow);
return true;
}
} else if (al::isMsgPlayerObjTouch(message) || rs::isMsgBlowObjAttack(message) ||
rs::isMsgFireDamageAll(message) || rs::isMsgHammerBrosHammerEnemyAttack(message) ||
rs::isMsgHammerBrosHammerHackAttack(message) || rs::isMsgHosuiAttack(message) ||
al::isMsgEnemyAttack(message) || al::isMsgKickStoneAttack(message) ||
rs::isMsgRadishAttack(message) || rs::isMsgSeedAttack(message) ||
rs::isMsgTankBullet(message) || rs::isMsgGamaneBulletThrough(message) ||
rs::isMsgHackAttackPoison(message) || rs::isMsgYoshiTongueAttack(message)) {
if (al::isSensorMapObj(self)) {
if (mReactionFrame == 0)
al::startAction(this, "Reaction");
mReactionFrame = 30;
}
} else if (rs::isMsgCapAttack(message)) {
if (al::isSensorMapObj(self) && !al::isNerve(this, &NrvRocketFlower.Wait) &&
!al::isNerve(this, &NrvRocketFlower.WaitFollow)) {
if (mReactionFrame == 0)
al::startAction(this, "Reaction");
mReactionFrame = 30;
}
} else if (al::isMsgPlayerPutOnEquipment(message) && al::isSensorName(self, "Equip") &&
isEnableEquip()) {
if (RocketFlowerFunction::requestEquipRocketFlower(this, other)) {
al::setNerve(this, &NrvRocketFlower.Attach);
return true;
}
terminateFollow();
}
return false;
}
void RocketFlower::terminateFollow() {
al::invalidateHitSensor(this, "Equip");
al::validateClipping(this);
mFlowerSub->kill();
al::startAction(this, "Appear");
mReactionFrame = 30;
al::startHitReaction(this, "復帰");
al::setNerve(this, &NrvRocketFlower.Wait);
}
void RocketFlower::exeWait() {
if (al::isFirstStep(this)) {
al::startVisAnim(this, "Show");
al::invalidateHitSensor(this, "Equip");
}
}
void RocketFlower::exeWaitFollow() {
if (trySyncFlyingCapPos()) {
al::setNerve(this, &NrvRocketFlower.Follow);
return;
}
if (al::isGreaterEqualStep(this, 30)) {
al::validateClipping(this);
al::setNerve(this, &NrvRocketFlower.Wait);
}
}
bool RocketFlower::trySyncFlyingCapPos() {
sead::Vector3f flyingCapPos;
if (!rs::tryGetFlyingCapPos(&flyingCapPos, this))
return false;
flyingCapPos += 50.0f * sead::Vector3f::ey;
al::resetPosition(mFlowerSub, flyingCapPos);
sead::Vector3f toPlayerHead = rs::getPlayerHeadPos(this) - flyingCapPos;
if (al::tryNormalizeOrZero(&toPlayerHead)) {
sead::Quatf quat;
quat.makeVectorRotation(sead::Vector3f::ez, toPlayerHead);
al::setQuat(mFlowerSub, quat);
}
return true;
}
void RocketFlower::exeFollow() {
if (al::isFirstStep(this)) {
appearFlowerSub();
mFollowLostFrame = 0;
}
if (trySyncFlyingCapPos()) {
mFollowLostFrame = 0;
return;
}
if (rs::isEquipCapCatched(this)) {
al::validateHitSensor(this, "Equip");
al::setNerve(this, &NrvRocketFlower.WaitAttach);
return;
}
if (mFollowLostFrame >= 16)
terminateFollow();
mFollowLostFrame++;
}
void RocketFlower::appearFlowerSub() {
al::startVisAnim(this, "Hide");
mFlowerSub->appear();
al::startAction(mFlowerSub, "Wait");
al::startAction(this, "ReactionCap");
mReactionFrame = 30;
al::startHitReaction(this, "花が取れた");
}
void RocketFlower::exeWaitAttach() {
rs::tryCalcPlayerModelHeadJointPos(al::getTransPtr(mFlowerSub), this);
if (al::isGreaterEqualStep(this, 20))
terminateFollow();
}
void RocketFlower::exeAttach() {
if (al::isFirstStep(this))
al::startAction(mFlowerSub, "Dash");
}
void RocketFlower::setFollowFlowerPose(const sead::Quatf& quat, const sead::Vector3f& trans) {
al::setQuat(mFlowerSub, quat);
al::resetPosition(mFlowerSub, trans);
}
void RocketFlower::disappear() {
al::startHitReaction(mFlowerSub, "消滅");
}
void RocketFlower::disappearForce() {
al::tryKillEmitterAndParticleAll(mFlowerSub);
al::invalidateHitSensor(this, "Equip");
al::validateClipping(this);
mFlowerSub->kill();
al::startAction(this, "Wait");
mReactionFrame = 30;
al::setNerve(this, &NrvRocketFlower.Wait);
}
void RocketFlower::control() {
if (al::isActionOneTime(this) && al::isActionEnd(this))
al::startAction(this, "Wait");
if (mReactionFrame != 0)
mReactionFrame--;
if (mMtxConnector)
al::connectPoseQT(this, mMtxConnector);
}

48
src/MapObj/RocketFlower.h Normal file
View file

@ -0,0 +1,48 @@
#pragma once
#include <math/seadQuat.h>
#include <math/seadVector.h>
#include "Library/LiveActor/LiveActor.h"
namespace al {
struct ActorInitInfo;
class HitSensor;
class MtxConnector;
class SensorMsg;
} // namespace al
class RocketFlower : public al::LiveActor {
public:
RocketFlower(const char* name);
void init(const al::ActorInitInfo& info) override;
void initAfterPlacement() override;
void attackSensor(al::HitSensor* self, al::HitSensor* other) override;
bool receiveMsg(const al::SensorMsg* message, al::HitSensor* other,
al::HitSensor* self) override;
void control() override;
bool isEnableEquip() const;
void terminateFollow();
void exeWait();
void exeWaitFollow();
bool trySyncFlyingCapPos();
void exeFollow();
void appearFlowerSub();
void exeWaitAttach();
void exeAttach();
void setFollowFlowerPose(const sead::Quatf& quat, const sead::Vector3f& trans);
void disappear();
void disappearForce();
private:
al::MtxConnector* mMtxConnector = nullptr;
al::LiveActor* mFlowerSub = nullptr;
s32 mReactionFrame = 0;
u32 mFollowLostFrame = 0;
};
static_assert(sizeof(RocketFlower) == 0x120);

View file

@ -0,0 +1,17 @@
#pragma once
namespace al {
struct ActorInitInfo;
class HitSensor;
class LiveActor;
} // namespace al
class RocketFlower;
namespace RocketFlowerFunction {
void createRocketFlowerEquipWatcherIfNotExist(const al::LiveActor* actor,
const al::ActorInitInfo& info);
bool requestEquipRocketFlower(RocketFlower* flower, al::HitSensor* sensor);
} // namespace RocketFlowerFunction

View file

@ -82,18 +82,18 @@ void SmallBirdStateFlyAway::exeFlyAway() {
mIsColliding = false; mIsColliding = false;
startActionAtRandomFrameIfNotPlaying(mActor, "Fly"); startActionAtRandomFrameIfNotPlaying(mActor, "Fly");
if (rs::isModeE3MovieRom()) { if (rs::isModeE3MovieRom()) {
gVerticalAccelIndex = al::modi(gVerticalAccelIndex + 7, 6); gVerticalAccelIndex = al::wrapValue(gVerticalAccelIndex + 1, 6);
mVerticalAccel = gE3MovieVerticalAccel[gVerticalAccelIndex]; mVerticalAccel = gE3MovieVerticalAccel[gVerticalAccelIndex];
gHorizontalAccelIndex = al::modi(gHorizontalAccelIndex + 5, 4); gHorizontalAccelIndex = al::wrapValue(gHorizontalAccelIndex + 1, 4);
mHorizontalAccel = gE3MovieHorizontalAccel[gHorizontalAccelIndex]; mHorizontalAccel = gE3MovieHorizontalAccel[gHorizontalAccelIndex];
} else { } else {
gVerticalAccelIndex = al::modi(gVerticalAccelIndex + 5, 4); gVerticalAccelIndex = al::wrapValue(gVerticalAccelIndex + 1, 4);
mVerticalAccel = gVerticalAccel[gVerticalAccelIndex]; mVerticalAccel = gVerticalAccel[gVerticalAccelIndex];
mHorizontalAccel = gHorizontalAccel; mHorizontalAccel = gHorizontalAccel;
} }
mTargetAccelDir = {0, mVerticalAccel, mHorizontalAccel}; mTargetAccelDir = {0, mVerticalAccel, mHorizontalAccel};
al::normalize(&mTargetAccelDir); al::normalize(&mTargetAccelDir);
gCollisionCheckOffsetStep = al::modi(gCollisionCheckOffsetStep + 11, 10); gCollisionCheckOffsetStep = al::wrapValue(gCollisionCheckOffsetStep + 1, 10);
mCollisionCheckOffsetStep = gCollisionCheckOffsetStep; mCollisionCheckOffsetStep = gCollisionCheckOffsetStep;
} }

View file

@ -69,6 +69,7 @@
#include "MapObj/AllDeadWatcherWithShine.h" #include "MapObj/AllDeadWatcherWithShine.h"
#include "MapObj/AnagramAlphabet.h" #include "MapObj/AnagramAlphabet.h"
#include "MapObj/BlockEmpty2D.h" #include "MapObj/BlockEmpty2D.h"
#include "MapObj/BossKnuckleFix.h"
#include "MapObj/CapBomb.h" #include "MapObj/CapBomb.h"
#include "MapObj/CapHanger.h" #include "MapObj/CapHanger.h"
#include "MapObj/CapSwitch.h" #include "MapObj/CapSwitch.h"
@ -87,12 +88,14 @@
#include "MapObj/LavaPan.h" #include "MapObj/LavaPan.h"
#include "MapObj/MeganeMapParts.h" #include "MapObj/MeganeMapParts.h"
#include "MapObj/MoonBasementBreakParts.h" #include "MapObj/MoonBasementBreakParts.h"
#include "MapObj/MoonBasementFloor.h"
#include "MapObj/MoonBasementSlideObj.h" #include "MapObj/MoonBasementSlideObj.h"
#include "MapObj/MoonWorldCaptureParadeLift.h" #include "MapObj/MoonWorldCaptureParadeLift.h"
#include "MapObj/PeachWorldTree.h" #include "MapObj/PeachWorldTree.h"
#include "MapObj/PoleGrabCeil.h" #include "MapObj/PoleGrabCeil.h"
#include "MapObj/ReactionMapParts.h" #include "MapObj/ReactionMapParts.h"
#include "MapObj/RiseMapPartsHolder.h" #include "MapObj/RiseMapPartsHolder.h"
#include "MapObj/RocketFlower.h"
#include "MapObj/RouletteSwitch.h" #include "MapObj/RouletteSwitch.h"
#include "MapObj/SaveFlagCheckObj.h" #include "MapObj/SaveFlagCheckObj.h"
#include "MapObj/ShineTowerRocket.h" #include "MapObj/ShineTowerRocket.h"
@ -164,7 +167,7 @@ const al::NameToCreator<al::ActorCreatorFunction> sProjectActorFactoryEntries[]
{"BossForestWander", al::createActorFunction<BossForestWander>}, {"BossForestWander", al::createActorFunction<BossForestWander>},
{"BossKnuckle", nullptr}, {"BossKnuckle", nullptr},
{"BossKnuckleCounterGround", nullptr}, {"BossKnuckleCounterGround", nullptr},
{"BossKnuckleFix", nullptr}, {"BossKnuckleFix", al::createActorFunction<BossKnuckleFix>},
{"BossMagma", nullptr}, {"BossMagma", nullptr},
{"BossRaid", nullptr}, {"BossRaid", nullptr},
{"BossRaidNpc", nullptr}, {"BossRaidNpc", nullptr},
@ -411,7 +414,7 @@ const al::NameToCreator<al::ActorCreatorFunction> sProjectActorFactoryEntries[]
{"MoonBasementFallObj", nullptr}, {"MoonBasementFallObj", nullptr},
{"MoonBasementFinalGate", nullptr}, {"MoonBasementFinalGate", nullptr},
{"MoonBasementFallObjDecoration", nullptr}, {"MoonBasementFallObjDecoration", nullptr},
{"MoonBasementFloor", nullptr}, {"MoonBasementFloor", al::createActorFunction<MoonBasementFloor>},
{"MoonBasementGate", nullptr}, {"MoonBasementGate", nullptr},
{"MoonBasementMeteorAreaObj", nullptr}, {"MoonBasementMeteorAreaObj", nullptr},
{"MoonBasementPillar", nullptr}, {"MoonBasementPillar", nullptr},
@ -670,7 +673,7 @@ const al::NameToCreator<al::ActorCreatorFunction> sProjectActorFactoryEntries[]
{"RiseMapParts", nullptr}, {"RiseMapParts", nullptr},
{"ReactionMapParts", al::createActorFunction<ReactionMapParts>}, {"ReactionMapParts", al::createActorFunction<ReactionMapParts>},
{"RiseMapPartsHolder", al::createActorFunction<RiseMapPartsHolder>}, {"RiseMapPartsHolder", al::createActorFunction<RiseMapPartsHolder>},
{"RocketFlower", nullptr}, {"RocketFlower", al::createActorFunction<RocketFlower>},
{"RollingCubeMapParts", al::createActorFunction<al::RollingCubeMapParts>}, {"RollingCubeMapParts", al::createActorFunction<al::RollingCubeMapParts>},
{"RippleFixMapParts", nullptr}, {"RippleFixMapParts", nullptr},
{"RotateMapParts", al::createActorFunction<al::RotateMapParts>}, {"RotateMapParts", al::createActorFunction<al::RotateMapParts>},