Compare commits

...

9 commits

Author SHA1 Message Date
Moddimation fd0e6c5399
Merge 7128abbd2c into 0f550e5aae 2026-04-23 03:59:25 +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
Moddimation 7128abbd2c Replace vec.x = a.x - b.x with vec->setSub(a, b) in PoserFunction 2026-02-06 00:08:21 +01:00
Moddimation d13df15f33 Fixes 2026-02-05 23:58:19 +01:00
Moddimation e857cda234 Here we go again 2026-02-05 23:26:32 +01:00
32 changed files with 1505 additions and 277 deletions

View file

@ -59551,45 +59551,45 @@ MapObj/BossKnuckleFix.o:
- offset: 0x222ee4
size: 128
label: _ZN14BossKnuckleFixC2EPKc
status: NotDecompiled
status: Matching
- offset: 0x222f64
size: 140
label: _ZN14BossKnuckleFixC1EPKc
status: NotDecompiled
status: Matching
- offset: 0x222ff0
size: 336
label: _ZN14BossKnuckleFix4initERKN2al13ActorInitInfoE
status: NotDecompiled
status: Matching
- offset: 0x223140
size: 208
label: _ZN14BossKnuckleFix10receiveMsgEPKN2al9SensorMsgEPNS0_9HitSensorES5_
status: NotDecompiled
status: Matching
- offset: 0x223210
size: 60
label: _ZN14BossKnuckleFix7exeWaitEv
status: NotDecompiled
status: Matching
- offset: 0x22324c
size: 88
label: _ZN14BossKnuckleFix11exeReactionEv
status: NotDecompiled
status: Matching
- offset: 0x2232a4
size: 104
label: _ZN14BossKnuckleFix16exeReactionLargeEv
status: NotDecompiled
status: Matching
- offset: 0x22330c
size: 64
label: _ZNK12_GLOBAL__N_121BossKnuckleFixNrvWait7executeEPN2al11NerveKeeperE
status: NotDecompiled
status: Matching
guess: true
- offset: 0x22334c
size: 108
label: _ZNK12_GLOBAL__N_130BossKnuckleFixNrvReactionLarge7executeEPN2al11NerveKeeperE
status: NotDecompiled
status: Matching
guess: true
- offset: 0x2233b8
size: 92
label: _ZNK12_GLOBAL__N_125BossKnuckleFixNrvReaction7executeEPN2al11NerveKeeperE
status: NotDecompiled
status: Matching
guess: true
MapObj/BreakablePole.o:
'.text':
@ -76398,101 +76398,101 @@ MapObj/MoonBasementFloor.o:
- offset: 0x2c17dc
size: 128
label: _ZN17MoonBasementFloorC2EPKc
status: NotDecompiled
status: Matching
- offset: 0x2c185c
size: 140
label: _ZN17MoonBasementFloorC1EPKc
status: NotDecompiled
status: Matching
- offset: 0x2c18e8
size: 216
label: _ZN17MoonBasementFloor4initERKN2al13ActorInitInfoE
status: NotDecompiled
status: Matching
- offset: 0x2c19c0
size: 132
label: _ZN17MoonBasementFloor17startFallBySwitchEv
status: NotDecompiled
status: Matching
- offset: 0x2c1a44
size: 52
label: _ZN17MoonBasementFloor8movementEv
status: NotDecompiled
status: Matching
- offset: 0x2c1a78
size: 148
label: _ZN17MoonBasementFloor10receiveMsgEPKN2al9SensorMsgEPNS0_9HitSensorES5_
status: NotDecompiled
status: Matching
- offset: 0x2c1b0c
size: 60
label: _ZN17MoonBasementFloor7exeWaitEv
status: NotDecompiled
status: Matching
- offset: 0x2c1b48
size: 140
label: _ZN17MoonBasementFloor16exeFallSignStartEv
status: NotDecompiled
status: Matching
- offset: 0x2c1bd4
size: 68
label: _ZN17MoonBasementFloor11exeFallSignEv
status: NotDecompiled
status: Matching
- offset: 0x2c1c18
size: 84
label: _ZN17MoonBasementFloor19exeFallSignBySwitchEv
status: NotDecompiled
status: Matching
- offset: 0x2c1c6c
size: 220
label: _ZN17MoonBasementFloor7exeFallEv
status: NotDecompiled
status: Matching
- offset: 0x2c1d48
size: 64
label: _ZNK12_GLOBAL__N_124MoonBasementFloorNrvWait7executeEPN2al11NerveKeeperE
status: NotDecompiled
status: Matching
guess: true
- offset: 0x2c1d88
size: 8
label: _ZNK12_GLOBAL__N_133MoonBasementFloorNrvFallSignStart7executeEPN2al11NerveKeeperE
status: NotDecompiled
status: Matching
guess: true
- offset: 0x2c1d90
size: 8
label: _ZNK12_GLOBAL__N_141MoonBasementFloorNrvFallSignStartByMeteor7executeEPN2al11NerveKeeperE
status: NotDecompiled
status: Matching
guess: true
- offset: 0x2c1d98
size: 8
label: _ZNK12_GLOBAL__N_141MoonBasementFloorNrvFallSignStartBySwitch7executeEPN2al11NerveKeeperE
status: NotDecompiled
status: Matching
guess: true
- offset: 0x2c1da0
size: 88
label: _ZNK12_GLOBAL__N_136MoonBasementFloorNrvFallSignBySwitch7executeEPN2al11NerveKeeperE
status: NotDecompiled
status: Matching
guess: true
- offset: 0x2c1df8
size: 8
label: _ZNK12_GLOBAL__N_132MoonBasementFloorNrvFallByMeteor7executeEPN2al11NerveKeeperE
status: NotDecompiled
status: Matching
guess: true
- offset: 0x2c1e00
size: 72
label: _ZNK12_GLOBAL__N_128MoonBasementFloorNrvFallSign7executeEPN2al11NerveKeeperE
status: NotDecompiled
status: Matching
guess: true
- offset: 0x2c1e48
size: 8
label: _ZNK12_GLOBAL__N_124MoonBasementFloorNrvFall7executeEPN2al11NerveKeeperE
status: NotDecompiled
status: Matching
guess: true
- offset: 0x2c1e50
size: 28
label: _ZNK2al10FunctorV0MIP17MoonBasementFloorMS1_FvvEEclEv
status: NotDecompiled
status: Matching
lazy: true
- offset: 0x2c1e6c
size: 76
label: _ZNK2al10FunctorV0MIP17MoonBasementFloorMS1_FvvEE5cloneEv
status: NotDecompiled
status: Matching
lazy: true
- offset: 0x2c1eb8
size: 4
label: _ZN2al10FunctorV0MIP17MoonBasementFloorMS1_FvvEED0Ev
status: NotDecompiled
status: Matching
lazy: true
MapObj/MoonBasementGate.o:
'.text':
@ -82302,103 +82302,103 @@ MapObj/RocketFlower.o:
- offset: 0x2fd628
size: 128
label: _ZN12RocketFlowerC2EPKc
status: NotDecompiled
status: Matching
- offset: 0x2fd6a8
size: 140
label: _ZN12RocketFlowerC1EPKc
status: NotDecompiled
status: Matching
- offset: 0x2fd734
size: 268
label: _ZN12RocketFlower4initERKN2al13ActorInitInfoE
status: NotDecompiled
status: Matching
- offset: 0x2fd840
size: 28
label: _ZN12RocketFlower18initAfterPlacementEv
status: NotDecompiled
status: Matching
- offset: 0x2fd85c
size: 156
label: _ZN12RocketFlower12attackSensorEPN2al9HitSensorES2_
status: NotDecompiled
status: Matching
- offset: 0x2fd8f8
size: 84
label: _ZNK12RocketFlower13isEnableEquipEv
status: NotDecompiled
status: Matching
- offset: 0x2fd94c
size: 664
label: _ZN12RocketFlower10receiveMsgEPKN2al9SensorMsgEPNS0_9HitSensorES5_
status: NotDecompiled
status: Matching
- offset: 0x2fdbe4
size: 116
label: _ZN12RocketFlower15terminateFollowEv
status: NotDecompiled
status: Matching
- offset: 0x2fdc58
size: 76
label: _ZN12RocketFlower7exeWaitEv
status: NotDecompiled
status: Matching
- offset: 0x2fdca4
size: 100
label: _ZN12RocketFlower13exeWaitFollowEv
status: NotDecompiled
status: Matching
- offset: 0x2fdd08
size: 412
label: _ZN12RocketFlower19trySyncFlyingCapPosEv
status: NotDecompiled
status: Matching
- offset: 0x2fdea4
size: 324
label: _ZN12RocketFlower9exeFollowEv
status: NotDecompiled
status: Matching
- offset: 0x2fdfe8
size: 108
label: _ZN12RocketFlower15appearFlowerSubEv
status: NotDecompiled
status: Matching
- offset: 0x2fe054
size: 164
label: _ZN12RocketFlower13exeWaitAttachEv
status: NotDecompiled
status: Matching
- offset: 0x2fe0f8
size: 60
label: _ZN12RocketFlower9exeAttachEv
status: NotDecompiled
status: Matching
- offset: 0x2fe134
size: 48
label: _ZN12RocketFlower19setFollowFlowerPoseERKN4sead4QuatIfEERKNS0_7Vector3IfEE
status: NotDecompiled
status: Matching
- offset: 0x2fe164
size: 16
label: _ZN12RocketFlower9disappearEv
status: NotDecompiled
status: Matching
- offset: 0x2fe174
size: 124
label: _ZN12RocketFlower14disappearForceEv
status: NotDecompiled
status: Matching
- offset: 0x2fe1f0
size: 104
label: _ZN12RocketFlower7controlEv
status: NotDecompiled
status: Matching
- offset: 0x2fe258
size: 80
label: _ZNK12_GLOBAL__N_119RocketFlowerNrvWait7executeEPN2al11NerveKeeperE
status: NotDecompiled
status: Matching
guess: true
- offset: 0x2fe2a8
size: 64
label: _ZNK12_GLOBAL__N_121RocketFlowerNrvAttach7executeEPN2al11NerveKeeperE
status: NotDecompiled
status: Matching
guess: true
- offset: 0x2fe2e8
size: 104
label: _ZNK12_GLOBAL__N_125RocketFlowerNrvWaitFollow7executeEPN2al11NerveKeeperE
status: NotDecompiled
status: Matching
guess: true
- offset: 0x2fe350
size: 8
label: _ZNK12_GLOBAL__N_121RocketFlowerNrvFollow7executeEPN2al11NerveKeeperE
status: NotDecompiled
status: Matching
guess: true
- offset: 0x2fe358
size: 8
label: _ZNK12_GLOBAL__N_125RocketFlowerNrvWaitAttach7executeEPN2al11NerveKeeperE
status: NotDecompiled
status: Matching
guess: true
MapObj/RocketFlowerEquipWatcher.o:
'.text':
@ -133676,7 +133676,7 @@ Scene/ProjectActorFactory.o:
- offset: 0x4b66dc
size: 52
label: _ZN2al19createActorFunctionI14BossKnuckleFixEEPNS_9LiveActorEPKc
status: NotDecompiled
status: Matching
lazy: true
- offset: 0x4b6710
size: 52
@ -134846,7 +134846,7 @@ Scene/ProjectActorFactory.o:
- offset: 0x4b99d4
size: 52
label: _ZN2al19createActorFunctionI17MoonBasementFloorEEPNS_9LiveActorEPKc
status: NotDecompiled
status: Matching
lazy: true
- offset: 0x4b9a08
size: 52
@ -135906,7 +135906,7 @@ Scene/ProjectActorFactory.o:
- offset: 0x4bd180
size: 52
label: _ZN2al19createActorFunctionI12RocketFlowerEEPNS_9LiveActorEPKc
status: NotDecompiled
status: Matching
lazy: true
- offset: 0x4bd1b4
size: 52
@ -227823,167 +227823,167 @@ Library/Camera/CameraPoserFunction.o:
- offset: 0x8341cc
size: 12
label: _ZN21alCameraPoserFunction12getViewIndexEPKN2al11CameraPoserE
status: NotDecompiled
status: Matching
- offset: 0x8341d8
size: 12
label: _ZN21alCameraPoserFunction15getLookAtCameraEPKN2al11CameraPoserE
status: NotDecompiled
status: Matching
- offset: 0x8341e4
size: 24
label: _ZN21alCameraPoserFunction17getProjectionSeadEPKN2al11CameraPoserE
status: NotDecompiled
status: Matching
- offset: 0x8341fc
size: 12
label: _ZN21alCameraPoserFunction13getProjectionEPKN2al11CameraPoserE
status: NotDecompiled
status: Matching
- offset: 0x834208
size: 24
label: _ZN21alCameraPoserFunction16getProjectionMtxEPKN2al11CameraPoserE
status: NotDecompiled
status: Matching
- offset: 0x834220
size: 8
label: _ZN21alCameraPoserFunction7getNearEPKN2al11CameraPoserE
status: NotDecompiled
status: Matching
- offset: 0x834228
size: 8
label: _ZN21alCameraPoserFunction6getFarEPKN2al11CameraPoserE
status: NotDecompiled
status: Matching
- offset: 0x834230
size: 8
label: _ZN21alCameraPoserFunction9getAspectEPKN2al11CameraPoserE
status: NotDecompiled
status: Matching
- offset: 0x834238
size: 16
label: _ZN21alCameraPoserFunction15getPreCameraPosEPKN2al11CameraPoserE
status: NotDecompiled
status: Matching
- offset: 0x834248
size: 16
label: _ZN21alCameraPoserFunction15getPreLookAtPosEPKN2al11CameraPoserE
status: NotDecompiled
status: Matching
- offset: 0x834258
size: 16
label: _ZN21alCameraPoserFunction11getPreUpDirEPKN2al11CameraPoserE
status: NotDecompiled
status: Matching
- offset: 0x834268
size: 40
label: _ZN21alCameraPoserFunction16getPreFovyDegreeEPKN2al11CameraPoserE
status: NotDecompiled
status: Matching
- offset: 0x834290
size: 12
label: _ZN21alCameraPoserFunction16getPreFovyRadianEPKN2al11CameraPoserE
status: NotDecompiled
status: Matching
- offset: 0x83429c
size: 16
label: _ZN21alCameraPoserFunction17isPrePriorityDemoERKN2al15CameraStartInfoE
status: NotDecompiled
status: Matching
- offset: 0x8342ac
size: 16
label: _ZN21alCameraPoserFunction18isPrePriorityDemo2ERKN2al15CameraStartInfoE
status: NotDecompiled
status: Matching
- offset: 0x8342bc
size: 16
label: _ZN21alCameraPoserFunction21isPrePriorityDemoTalkERKN2al15CameraStartInfoE
status: NotDecompiled
status: Matching
- offset: 0x8342cc
size: 20
label: _ZN21alCameraPoserFunction20isPrePriorityDemoAllERKN2al15CameraStartInfoE
status: NotDecompiled
status: NonMatchingMajor
- offset: 0x8342e0
size: 28
label: _ZN21alCameraPoserFunction24isPrePriorityEntranceAllERKN2al15CameraStartInfoE
status: NotDecompiled
status: Matching
- offset: 0x8342fc
size: 16
label: _ZN21alCameraPoserFunction19isPrePriorityPlayerERKN2al15CameraStartInfoE
status: NotDecompiled
status: Matching
- offset: 0x83430c
size: 28
label: _ZN21alCameraPoserFunction20isEqualPreCameraNameERKN2al15CameraStartInfoEPKc
status: NotDecompiled
status: Matching
- offset: 0x834328
size: 56
label: _ZN21alCameraPoserFunction22isPreCameraFixAbsoluteERKN2al15CameraStartInfoE
status: NotDecompiled
status: Matching
- offset: 0x834360
size: 8
label: _ZN21alCameraPoserFunction25isInvalidCollidePreCameraERKN2al15CameraStartInfoE
status: NotDecompiled
status: Matching
- offset: 0x834368
size: 8
label: _ZN21alCameraPoserFunction30isInvalidKeepPreCameraDistanceERKN2al15CameraStartInfoE
status: NotDecompiled
status: Matching
- offset: 0x834370
size: 8
label: _ZN21alCameraPoserFunction41isInvalidKeepPreCameraDistanceIfNoCollideERKN2al15CameraStartInfoE
status: NotDecompiled
status: Matching
- offset: 0x834378
size: 8
label: _ZN21alCameraPoserFunction25isValidResetPreCameraPoseERKN2al15CameraStartInfoE
status: NotDecompiled
status: Matching
- offset: 0x834380
size: 8
label: _ZN21alCameraPoserFunction28isValidKeepPreSelfCameraPoseERKN2al15CameraStartInfoE
status: NotDecompiled
status: Matching
- offset: 0x834388
size: 8
label: _ZN21alCameraPoserFunction23getPreCameraSwingAngleHERKN2al15CameraStartInfoE
status: NotDecompiled
status: Matching
- offset: 0x834390
size: 8
label: _ZN21alCameraPoserFunction23getPreCameraSwingAngleVERKN2al15CameraStartInfoE
status: NotDecompiled
status: Matching
- offset: 0x834398
size: 8
label: _ZN21alCameraPoserFunction26getPreCameraMaxSwingAngleHERKN2al15CameraStartInfoE
status: NotDecompiled
status: Matching
- offset: 0x8343a0
size: 8
label: _ZN21alCameraPoserFunction26getPreCameraMaxSwingAngleVERKN2al15CameraStartInfoE
status: NotDecompiled
status: Matching
- offset: 0x8343a8
size: 8
label: _ZN21alCameraPoserFunction17isExistAreaAngleHERKN2al15CameraStartInfoE
status: NotDecompiled
status: Matching
- offset: 0x8343b0
size: 8
label: _ZN21alCameraPoserFunction17isExistAreaAngleVERKN2al15CameraStartInfoE
status: NotDecompiled
status: Matching
- offset: 0x8343b8
size: 8
label: _ZN21alCameraPoserFunction13getAreaAngleHERKN2al15CameraStartInfoE
status: NotDecompiled
status: Matching
- offset: 0x8343c0
size: 8
label: _ZN21alCameraPoserFunction13getAreaAngleVERKN2al15CameraStartInfoE
status: NotDecompiled
status: Matching
- offset: 0x8343c8
size: 8
label: _ZN21alCameraPoserFunction26isExistNextPoseByPreCameraERKN2al15CameraStartInfoE
status: NotDecompiled
status: Matching
- offset: 0x8343d0
size: 8
label: _ZN21alCameraPoserFunction24getNextAngleHByPreCameraERKN2al15CameraStartInfoE
status: NotDecompiled
status: Matching
- offset: 0x8343d8
size: 8
label: _ZN21alCameraPoserFunction24getNextAngleVByPreCameraERKN2al15CameraStartInfoE
status: NotDecompiled
status: Matching
- offset: 0x8343e0
size: 148
label: _ZN21alCameraPoserFunction14calcCameraPoseEPN4sead4QuatIfEEPKN2al11CameraPoserE
status: NotDecompiled
status: Matching
- offset: 0x834474
size: 108
label: _ZN21alCameraPoserFunction11calcLookDirEPN4sead7Vector3IfEEPKN2al11CameraPoserE
status: NotDecompiled
status: Matching
- offset: 0x8344e0
size: 52
label: _ZN21alCameraPoserFunction13calcCameraDirEPN4sead7Vector3IfEEPKN2al11CameraPoserE
status: NotDecompiled
status: Matching
- offset: 0x834514
size: 92
label: _ZN21alCameraPoserFunction14calcCameraDirHEPN4sead7Vector3IfEEPKN2al11CameraPoserE
status: NotDecompiled
status: Matching
- offset: 0x834570
size: 128
label: _ZN21alCameraPoserFunction12calcLookDirHEPN4sead7Vector3IfEEPKN2al11CameraPoserE
@ -227995,43 +227995,43 @@ Library/Camera/CameraPoserFunction.o:
- offset: 0x834688
size: 60
label: _ZN21alCameraPoserFunction16calcPreCameraDirEPN4sead7Vector3IfEEPKN2al11CameraPoserE
status: NotDecompiled
status: Matching
- offset: 0x8346c4
size: 104
label: _ZN21alCameraPoserFunction17calcPreCameraDirHEPN4sead7Vector3IfEEPKN2al11CameraPoserE
status: NotDecompiled
status: Matching
- offset: 0x83472c
size: 116
label: _ZN21alCameraPoserFunction14calcPreLookDirEPN4sead7Vector3IfEEPKN2al11CameraPoserE
status: NotDecompiled
status: Matching
- offset: 0x8347a0
size: 92
label: _ZN21alCameraPoserFunction15calcPreLookDirHEPN4sead7Vector3IfEEPKN2al11CameraPoserE
status: NotDecompiled
status: Matching
- offset: 0x8347fc
size: 136
label: _ZN21alCameraPoserFunction19calcPreCameraAngleHEPKN2al11CameraPoserE
status: NotDecompiled
status: Matching
- offset: 0x834884
size: 176
label: _ZN21alCameraPoserFunction19calcPreCameraAngleVEPKN2al11CameraPoserE
status: NotDecompiled
status: Matching
- offset: 0x834934
size: 92
label: _ZN21alCameraPoserFunction20setLookAtPosToTargetEPN2al11CameraPoserE
status: NotDecompiled
status: Matching
- offset: 0x834990
size: 64
label: _ZN21alCameraPoserFunction15calcTargetTransEPN4sead7Vector3IfEEPKN2al11CameraPoserE
status: NotDecompiled
status: Matching
- offset: 0x8349d0
size: 120
label: _ZN21alCameraPoserFunction29setLookAtPosToTargetAddOffsetEPN2al11CameraPoserERKN4sead7Vector3IfEE
status: NotDecompiled
status: Matching
- offset: 0x834a48
size: 92
label: _ZN21alCameraPoserFunction20setCameraPosToTargetEPN2al11CameraPoserE
status: NotDecompiled
status: Matching
- offset: 0x834aa4
size: 120
label: _ZN21alCameraPoserFunction29setCameraPosToTargetAddOffsetEPN2al11CameraPoserERKN4sead7Vector3IfEE
@ -228043,15 +228043,15 @@ Library/Camera/CameraPoserFunction.o:
- offset: 0x834ba0
size: 64
label: _ZN21alCameraPoserFunction18calcTargetVelocityEPN4sead7Vector3IfEEPKN2al11CameraPoserE
status: NotDecompiled
status: Matching
- offset: 0x834be0
size: 152
label: _ZN21alCameraPoserFunction19calcTargetVelocityHEPN4sead7Vector3IfEEPKN2al11CameraPoserE
status: NotDecompiled
status: Matching
- offset: 0x834c78
size: 64
label: _ZN21alCameraPoserFunction12calcTargetUpEPN4sead7Vector3IfEEPKN2al11CameraPoserE
status: NotDecompiled
status: Matching
- offset: 0x834cb8
size: 232
label: _ZN21alCameraPoserFunction16calcTargetSpeedVEPKN2al11CameraPoserE
@ -229416,11 +229416,11 @@ Library/Camera/CameraUtil.o:
- offset: 0x83bac0
size: 52
label: _ZN2al19getProjectionMtxPtrEPKNS_10IUseCameraEi
status: NotDecompiled
status: Matching
- offset: 0x83baf4
size: 12
label: _ZN2al19getProjectionMtxPtrEPKNS_15SceneCameraInfoEi
status: NotDecompiled
status: Matching
- offset: 0x83bb00
size: 56
label: _ZN2al15getLookAtCameraEPKNS_10IUseCameraEi
@ -229516,15 +229516,15 @@ Library/Camera/CameraUtil.o:
- offset: 0x83bff0
size: 152
label: _ZN2al15calcCameraFrontEPN4sead7Vector3IfEEPKNS_10IUseCameraEi
status: NotDecompiled
status: Matching
- offset: 0x83c088
size: 64
label: _ZN2al19setNearClipDistanceEPKNS_10IUseCameraEfi
status: NotDecompiled
status: Matching
- offset: 0x83c0c8
size: 64
label: _ZN2al18setFarClipDistanceEPKNS_10IUseCameraEfi
status: NotDecompiled
status: Matching
- offset: 0x83c108
size: 176
label: _ZN2al20setCurrentCameraPoseEPNS_14CameraPoseInfoEPKNS_10IUseCameraE
@ -229532,39 +229532,39 @@ Library/Camera/CameraUtil.o:
- offset: 0x83c1b8
size: 80
label: _ZN2al13calcCameraDirEPN4sead7Vector3IfEEPKNS_10IUseCameraEi
status: NotDecompiled
status: Matching
- offset: 0x83c208
size: 92
label: _ZN2al17calcCameraLookDirEPN4sead7Vector3IfEEPKNS_10IUseCameraEi
status: NotDecompiled
status: Matching
- offset: 0x83c264
size: 68
label: _ZN2al17calcCameraSideDirEPN4sead7Vector3IfEEPKNS_10IUseCameraEi
status: NotDecompiled
status: Matching
- offset: 0x83c2a8
size: 68
label: _ZN2al15calcCameraUpDirEPN4sead7Vector3IfEEPKNS_10IUseCameraEi
status: NotDecompiled
status: Matching
- offset: 0x83c2ec
size: 32
label: _ZN2al16tryCalcCameraDirEPN4sead7Vector3IfEEPKNS_15SceneCameraInfoEi
status: NotDecompiled
status: Matching
- offset: 0x83c30c
size: 92
label: _ZN2al17tryCalcCameraDirHEPN4sead7Vector3IfEEPKNS_15SceneCameraInfoERKS2_i
status: NotDecompiled
status: Matching
- offset: 0x83c368
size: 136
label: _ZN2al21tryCalcCameraLookDirHEPN4sead7Vector3IfEEPKNS_15SceneCameraInfoERKS2_i
status: NotDecompiled
status: Matching
- offset: 0x83c3f0
size: 64
label: _ZN2al11startCameraEPKNS_10IUseCameraEPNS_12CameraTicketEi
status: NotDecompiled
status: Matching
- offset: 0x83c430
size: 64
label: _ZN2al14startCameraSubEPKNS_10IUseCameraEPNS_12CameraTicketEi
status: NotDecompiled
status: Matching
- offset: 0x83c470
size: 108
label: _ZN2al15startAnimCameraEPKNS_10IUseCameraEPNS_12CameraTicketEPKci
@ -229592,23 +229592,23 @@ Library/Camera/CameraUtil.o:
- offset: 0x83c630
size: 8
label: _ZN2al14isActiveCameraEPKNS_12CameraTicketE
status: NotDecompiled
status: Matching
- offset: 0x83c638
size: 144
label: _ZN2al16initObjectCameraEPKNS_10IUseCameraERKNS_13PlacementInfoEPKcS7_
status: NotDecompiled
status: Matching
- offset: 0x83c6c8
size: 152
label: _ZN2al16initObjectCameraEPKNS_10IUseCameraERKNS_13ActorInitInfoEPKcS7_
status: NotDecompiled
status: Matching
- offset: 0x83c760
size: 68
label: _ZN2al31initObjectCameraNoPlacementInfoEPKNS_10IUseCameraEPKcS4_
status: NotDecompiled
status: Matching
- offset: 0x83c7a4
size: 152
label: _ZN2al13initFixCameraEPKNS_10IUseCameraEPKcRKN4sead7Vector3IfEES9_
status: NotDecompiled
status: Matching
- offset: 0x83c83c
size: 100
label: _ZN16alCameraFunction31initCameraNoPlacementInfoNoSaveEPN2al11CameraPoserEPKNS0_10IUseCameraEPKNS0_11PlacementIdEPKciRKN4sead8Matrix34IfEE
@ -229616,7 +229616,7 @@ Library/Camera/CameraUtil.o:
- offset: 0x83c8a0
size: 156
label: _ZN2al20initFixDoorwayCameraEPKNS_10IUseCameraEPKcRKN4sead7Vector3IfEES9_
status: NotDecompiled
status: Matching
- offset: 0x83c93c
size: 296
label: _ZN2al18initFixActorCameraEPKNS_9LiveActorERKNS_13ActorInitInfoEPKcRKN4sead7Vector3IfEEfffb
@ -264305,60 +264305,60 @@ Library/Movement/ClockMovement.o:
label:
- _ZN2al13ClockMovementC1ERKNS_13ActorInitInfoE
- _ZN2al13ClockMovementC2ERKNS_13ActorInitInfoE
status: NotDecompiled
status: Matching
- offset: 0x952a1c
size: 100
label: _ZN2al13ClockMovement8exeDelayEv
status: NotDecompiled
status: Matching
- offset: 0x952a80
size: 204
label: _ZN2al13ClockMovement13exeRotateSignEv
status: NotDecompiled
status: Matching
- offset: 0x952b4c
size: 156
label: _ZN2al13ClockMovement9exeRotateEv
status: NotDecompiled
status: Matching
- offset: 0x952be8
size: 96
label: _ZN2al13ClockMovement7exeWaitEv
status: NotDecompiled
status: Matching
- offset: 0x952c48
size: 64
label: _ZNK2al13ClockMovement16isFirstStepDelayEv
status: NotDecompiled
status: Matching
- offset: 0x952c88
size: 68
label: _ZNK2al13ClockMovement21isFirstStepRotateSignEv
status: NotDecompiled
status: Matching
- offset: 0x952ccc
size: 68
label: _ZNK2al13ClockMovement17isFirstStepRotateEv
status: NotDecompiled
status: Matching
- offset: 0x952d10
size: 64
label: _ZNK2al13ClockMovement15isFirstStepWaitEv
status: NotDecompiled
status: Matching
- offset: 0x952d50
size: 36
label: _ZN2al13ClockMovementD0Ev
status: NotDecompiled
status: Matching
lazy: true
- offset: 0x952d74
size: 104
label: ''
status: NotDecompiled
label: _ZNK12_GLOBAL__N_121ClockMovementNrvDelay7executeEPN2al11NerveKeeperE
status: Matching
- offset: 0x952ddc
size: 8
label: ''
status: NotDecompiled
label: _ZNK12_GLOBAL__N_126ClockMovementNrvRotateSign7executeEPN2al11NerveKeeperE
status: Matching
- offset: 0x952de4
size: 8
label: ''
status: NotDecompiled
label: _ZNK12_GLOBAL__N_122ClockMovementNrvRotate7executeEPN2al11NerveKeeperE
status: Matching
- offset: 0x952dec
size: 100
label: ''
status: NotDecompiled
label: _ZNK12_GLOBAL__N_120ClockMovementNrvWait7executeEPN2al11NerveKeeperE
status: Matching
Library/Movement/EnemyStateBlowDown.o:
'.text':
- offset: 0x952e50

View file

@ -0,0 +1,271 @@
#include "Library/Camera/CameraPoserFunction.h"
#include "Library/Base/StringUtil.h"
#include "Library/Camera/CameraPoser.h"
#include "Library/Camera/CameraPoserFix.h"
#include "Library/Camera/CameraStartInfo.h"
#include "Library/Camera/CameraTargetBase.h"
#include "Library/Camera/CameraTargetHolder.h"
#include "Library/Camera/CameraViewInfo.h"
#include "Library/Math/MathUtil.h"
#include "Library/Projection/Projection.h"
namespace alCameraPoserFunction {
inline al::CameraViewInfo* getViewInfo(const al::CameraPoser* poser) {
return poser->getViewInfo();
}
s32 getViewIndex(const al::CameraPoser* poser) {
return getViewInfo(poser)->getIndex();
}
const sead::LookAtCamera& getLookAtCamera(const al::CameraPoser* poser) {
return getViewInfo(poser)->getLookAtCam();
}
const sead::Projection& getProjectionSead(const al::CameraPoser* poser) {
return getViewInfo(poser)->getProjectionSead();
}
const al::Projection* getProjection(const al::CameraPoser* poser) {
return &getViewInfo(poser)->getProjection();
}
const sead::Matrix44f& getProjectionMtx(const al::CameraPoser* poser) {
return *getViewInfo(poser)->getProjMtx();
}
f32 getNear(const al::CameraPoser* poser) {
return getViewInfo(poser)->getNear();
}
f32 getFar(const al::CameraPoser* poser) {
return getViewInfo(poser)->getFar();
}
f32 getAspect(const al::CameraPoser* poser) {
return getViewInfo(poser)->getAspect();
}
const sead::Vector3f& getPreCameraPos(const al::CameraPoser* poser) {
return getLookAtCamera(poser).getPos();
}
const sead::Vector3f& getPreLookAtPos(const al::CameraPoser* poser) {
return getLookAtCamera(poser).getAt();
}
const sead::Vector3f& getPreUpDir(const al::CameraPoser* poser) {
return getLookAtCamera(poser).getUp();
}
f32 getPreFovyDegree(const al::CameraPoser* poser) {
return getPreFovyRadian(poser) * 57.296f;
}
f32 getPreFovyRadian(const al::CameraPoser* poser) {
return getProjection(poser)->getFovy();
}
bool isPrePriorityDemo(const al::CameraStartInfo& startInfo) {
return startInfo.prePriorityType == al::CameraTicket::Priority_Demo;
}
bool isPrePriorityDemo2(const al::CameraStartInfo& startInfo) {
return startInfo.prePriorityType == al::CameraTicket::Priority_Demo2;
}
bool isPrePriorityDemoTalk(const al::CameraStartInfo& startInfo) {
return startInfo.prePriorityType == al::CameraTicket::Priority_DemoTalk;
}
bool isPrePriorityDemoAll(const al::CameraStartInfo& startInfo) {
return (startInfo.prePriorityType - al::CameraTicket::Priority_Demo) < 2;
}
bool isPrePriorityEntranceAll(const al::CameraStartInfo& startInfo) {
return (startInfo.prePriorityType == al::CameraTicket::Priority_Entrance) |
(startInfo.prePriorityType == al::CameraTicket::Priority_Unknown);
}
bool isPrePriorityPlayer(const al::CameraStartInfo& startInfo) {
return startInfo.prePriorityType == al::CameraTicket::Priority_Player;
}
bool isEqualPreCameraName(const al::CameraStartInfo& startInfo, const char* compareName) {
const char* name = startInfo.preCameraName;
return name && al::isEqualString(compareName, name);
}
bool isPreCameraFixAbsolute(const al::CameraStartInfo& startInfo) {
return isEqualPreCameraName(startInfo, al::CameraPoserFix::getFixAbsoluteCameraName());
}
bool isInvalidCollidePreCamera(const al::CameraStartInfo& startInfo) {
return startInfo.isInvalidCollidePreCamera;
}
bool isInvalidKeepPreCameraDistance(const al::CameraStartInfo& startInfo) {
return startInfo.isInvalidKeepPreCameraDistance;
}
bool isInvalidKeepPreCameraDistanceIfNoCollide(const al::CameraStartInfo& startInfo) {
return startInfo.isInvalidKeepPreCameraDistanceIfNoCollide;
}
bool isValidResetPreCameraPose(const al::CameraStartInfo& startInfo) {
return startInfo.isValidResetPreCameraPose;
}
bool isValidKeepPreSelfCameraPose(const al::CameraStartInfo& startInfo) {
return startInfo.isValidKeepPreSelfCameraPose;
}
f32 getPreCameraSwingAngleH(const al::CameraStartInfo& startInfo) {
return startInfo.preCameraSwingAngleH;
}
f32 getPreCameraSwingAngleV(const al::CameraStartInfo& startInfo) {
return startInfo.preCameraSwingAngleV;
}
f32 getPreCameraMaxSwingAngleH(const al::CameraStartInfo& startInfo) {
return startInfo.preCameraMaxSwingAngleH;
}
f32 getPreCameraMaxSwingAngleV(const al::CameraStartInfo& startInfo) {
return startInfo.preCameraMaxSwingAngleV;
}
bool isExistAreaAngleH(const al::CameraStartInfo& startInfo) {
return startInfo.isExistAreaAngleH;
}
bool isExistAreaAngleV(const al::CameraStartInfo& startInfo) {
return startInfo.isExistAreaAngleV;
}
f32 getAreaAngleH(const al::CameraStartInfo& startInfo) {
return startInfo.areaAngleH;
}
f32 getAreaAngleV(const al::CameraStartInfo& startInfo) {
return startInfo.areaAngleV;
}
bool isExistNextPoseByPreCamera(const al::CameraStartInfo& startInfo) {
return startInfo.isExistNextPoseByPreCamera;
}
f32 getNextAngleHByPreCamera(const al::CameraStartInfo& startInfo) {
return startInfo.nextAngleHByPreCamera;
}
f32 getNextAngleVByPreCamera(const al::CameraStartInfo& startInfo) {
return startInfo.nextAngleVByPreCamera;
}
void calcLookDir(sead::Vector3f* vec, const al::CameraPoser* poser) {
calcCameraDir(vec, poser);
vec->negate();
}
void calcCameraPose(sead::Quatf* pose, const al::CameraPoser* poser) {
sead::Vector3f lookDir;
calcLookDir(&lookDir, poser);
al::makeQuatFrontUp(pose, lookDir, poser->getCameraUp());
}
void calcCameraDir(sead::Vector3f* vec, const al::CameraPoser* poser) {
vec->setSub(poser->getPosition(), poser->getTargetTrans());
al::normalize(vec);
}
void calcCameraDirH(sead::Vector3f* vec, const al::CameraPoser* poser) {
vec->setSub(poser->getPosition(), poser->getTargetTrans());
al::verticalizeVec(vec, poser->getCameraUp(), *vec);
al::tryNormalizeOrZero(vec);
}
void calcPreCameraDir(sead::Vector3f* vec, const al::CameraPoser* poser) {
const sead::LookAtCamera* cam = &getLookAtCamera(poser);
vec->setSub(cam->getPos(), cam->getAt());
al::normalize(vec);
}
void calcPreCameraDirH(sead::Vector3f* vec, const al::CameraPoser* poser) {
const sead::LookAtCamera* cam = &getLookAtCamera(poser);
vec->setSub(cam->getPos(), cam->getAt());
al::verticalizeVec(vec, sead::Vector3f::ey, *vec);
al::tryNormalizeOrZero(vec);
}
void calcPreLookDir(sead::Vector3f* vec, const al::CameraPoser* poser) {
calcPreCameraDir(vec, poser);
vec->negate();
}
void calcPreLookDirH(sead::Vector3f* vec, const al::CameraPoser* poser) {
const sead::LookAtCamera* cam = &getLookAtCamera(poser);
vec->set(cam->getAt() - cam->getPos());
al::verticalizeVec(vec, getLookAtCamera(poser).getUp(), *vec);
al::tryNormalizeOrZero(vec);
}
f32 calcPreCameraAngleH(const al::CameraPoser* poser) {
sead::Vector3f vec = {0, 0, 0};
calcPreCameraDirH(&vec, poser);
return atan2f(vec.x, vec.z) * 57.296f;
}
f32 calcPreCameraAngleV(const al::CameraPoser* poser) {
sead::Vector3f vec = {0, 0, 0};
calcPreCameraDir(&vec, poser);
al::parallelizeVec(&vec, sead::Vector3f::ey, vec);
return asinf(vec.length()) * 57.296f;
}
void calcTargetTrans(sead::Vector3f* vec, const al::CameraPoser* poser) {
poser->getTargetHolder()->getViewTarget(getViewIndex(poser))->calcTrans(vec);
}
void setLookAtPosToTarget(al::CameraPoser* poser) {
sead::Vector3f vec = {0, 0, 0};
poser->getTargetHolder()->getViewTarget(getViewIndex(poser))->calcTrans(&vec);
poser->setTargetTrans(vec);
}
void setLookAtPosToTargetAddOffset(al::CameraPoser* poser, const sead::Vector3f& offset) {
sead::Vector3f vec = {0, 0, 0};
poser->getTargetHolder()->getViewTarget(getViewIndex(poser))->calcTrans(&vec);
poser->setTargetTrans(vec + offset);
}
void setCameraPosToTarget(al::CameraPoser* poser) {
sead::Vector3f vec = {0, 0, 0};
poser->getTargetHolder()->getViewTarget(getViewIndex(poser))->calcTrans(&vec);
poser->setPosition(vec);
}
void setCameraPosToTargetWithOffset(al::CameraPoser* poser, const sead::Vector3f& offset) {
sead::Vector3f vec = {0, 0, 0};
poser->getTargetHolder()->getViewTarget(getViewIndex(poser))->calcTrans(&vec);
poser->setPosition(vec + offset);
}
void calcTargetVelocity(sead::Vector3f* vel, const al::CameraPoser* poser) {
poser->getTargetHolder()->getViewTarget(getViewIndex(poser))->calcVelocity(vel);
}
void calcTargetVelocityH(sead::Vector3f* vel, const al::CameraPoser* poser) {
calcTargetVelocity(vel, poser);
sead::Vector3f up = sead::Vector3f::ey;
calcTargetUp(&up, poser);
al::verticalizeVec(vel, up, *vel);
}
void calcTargetUp(sead::Vector3f* vec, const al::CameraPoser* poser) {
poser->getTargetHolder()->getViewTarget(getViewIndex(poser))->calcUp(vec);
}
} // namespace alCameraPoserFunction

View file

@ -5,80 +5,81 @@
#include <math/seadVector.h>
namespace sead {
class Projection;
class LookAtCamera;
class Projection;
} // namespace sead
namespace al {
class CameraPoser;
class Projection;
struct CameraStartInfo;
struct CameraObjectRequestInfo;
struct CameraStartInfo;
class CameraLimitRailKeeper;
class CameraPoser;
class IUseCollision;
class PlacementInfo;
class Projection;
} // namespace al
namespace alCameraPoserFunction {
class CameraCollisionHitResult;
s32 getViewIndex(const al::CameraPoser*);
sead::LookAtCamera* getLookAtCamera(const al::CameraPoser*);
sead::Projection* getProjectionSead(const al::CameraPoser*);
al::Projection* getProjection(const al::CameraPoser*);
const sead::Matrix34f& getProjectionMtx(const al::CameraPoser*);
f32 getNear(const al::CameraPoser*);
f32 getFar(const al::CameraPoser*);
f32 getAspect(const al::CameraPoser*);
const sead::Vector3f& getPreCameraPos(const al::CameraPoser*);
const sead::Vector3f& getPreLookAtPos(const al::CameraPoser*);
const sead::Vector3f& getPreUpDir(const al::CameraPoser*);
f32 getPreFovyDegree(const al::CameraPoser*);
f32 getPreFovyRadian(const al::CameraPoser*);
bool isPrePriorityDemo(const al::CameraStartInfo&);
bool isPrePriorityDemo2(const al::CameraStartInfo&);
bool isPrePriorityDemoTalk(const al::CameraStartInfo&);
bool isPrePriorityDemoAll(const al::CameraStartInfo&);
bool isPrePriorityEntranceAll(const al::CameraStartInfo&);
bool isPrePriorityPlayer(const al::CameraStartInfo&);
bool isEqualPreCameraName(const al::CameraStartInfo&, const char*);
bool isPreCameraFixAbsolute(const al::CameraStartInfo&);
bool isInvalidCollidePreCamera(const al::CameraStartInfo&);
bool isInvalidKeepPreCameraDistance(const al::CameraStartInfo&);
bool isInvalidKeepPreCameraDistanceIfNoCollide(const al::CameraStartInfo&);
bool isValidResetPreCameraPose(const al::CameraStartInfo&);
bool isValidKeepPreSelfCameraPose(const al::CameraStartInfo&);
f32 getPreCameraSwingAngleH(const al::CameraStartInfo&);
f32 getPreCameraSwingAngleV(const al::CameraStartInfo&);
f32 getPreCameraMaxSwingAngleH(const al::CameraStartInfo&);
f32 getPreCameraMaxSwingAngleV(const al::CameraStartInfo&);
bool isExistAreaAngleH(const al::CameraStartInfo&);
bool isExistAreaAngleV(const al::CameraStartInfo&);
f32 getAreaAngleH(const al::CameraStartInfo&);
f32 getAreaAngleV(const al::CameraStartInfo&);
bool isExistNextPoseByPreCamera(const al::CameraStartInfo&);
f32 getNextAngleHByPreCamera(const al::CameraStartInfo&);
f32 getNextAngleVByPreCamera(const al::CameraStartInfo&);
void calcCameraPose(sead::Quatf*, const al::CameraPoser*);
void calcLookDir(sead::Vector3f*, const al::CameraPoser*);
void calcCameraDir(sead::Vector3f*, const al::CameraPoser*);
bool calcCameraDirH(sead::Vector3f*, const al::CameraPoser*);
void calcLookDirH(sead::Vector3f*, const al::CameraPoser*);
void calcSideDir(sead::Vector3f*, const al::CameraPoser*);
void calcPreCameraDir(sead::Vector3f*, const al::CameraPoser*);
void calcPreCameraDirH(sead::Vector3f*, const al::CameraPoser*);
void calcPreLookDir(sead::Vector3f*, const al::CameraPoser*);
void calcPreLookDirH(sead::Vector3f*, const al::CameraPoser*);
void calcPreCameraAngleH(const al::CameraPoser*);
void calcPreCameraAngleV(const al::CameraPoser*);
void setLookAtPosToTarget(al::CameraPoser*);
void calcTargetTrans(sead::Vector3f*, const al::CameraPoser*);
void setLookAtPosToTargetAddOffset(al::CameraPoser*, const sead::Vector3f&);
void setCameraPosToTarget(al::CameraPoser*);
void setCameraPosToTargetAddOffset(al::CameraPoser*, const sead::Vector3f&);
void calcTargetTransWithOffset(sead::Vector3f*, const al::CameraPoser*);
void calcTargetVelocity(sead::Vector3f*, const al::CameraPoser*);
void calcTargetVelocityH(sead::Vector3f*, const al::CameraPoser*);
void calcTargetUp(sead::Vector3f*, const al::CameraPoser*);
s32 getViewIndex(const al::CameraPoser* poser);
const sead::LookAtCamera& getLookAtCamera(const al::CameraPoser* poser);
const sead::Projection& getProjectionSead(const al::CameraPoser* poser);
const al::Projection* getProjection(const al::CameraPoser* poser);
const sead::Matrix44f& getProjectionMtx(const al::CameraPoser* poser);
f32 getNear(const al::CameraPoser* poser);
f32 getFar(const al::CameraPoser* poser);
f32 getAspect(const al::CameraPoser* poser);
const sead::Vector3f& getPreCameraPos(const al::CameraPoser* poser);
const sead::Vector3f& getPreLookAtPos(const al::CameraPoser* poser);
const sead::Vector3f& getPreUpDir(const al::CameraPoser* poser);
f32 getPreFovyDegree(const al::CameraPoser* poser);
f32 getPreFovyRadian(const al::CameraPoser* poser);
bool isPrePriorityDemo(const al::CameraStartInfo& startInfo);
bool isPrePriorityDemo2(const al::CameraStartInfo& startInfo);
bool isPrePriorityDemoTalk(const al::CameraStartInfo& startInfo);
bool isPrePriorityDemoAll(const al::CameraStartInfo& startInfo);
bool isPrePriorityEntranceAll(const al::CameraStartInfo& startInfo);
bool isPrePriorityPlayer(const al::CameraStartInfo& startInfo);
bool isEqualPreCameraName(const al::CameraStartInfo& startInfo, const char* cameraName);
bool isPreCameraFixAbsolute(const al::CameraStartInfo& startInfo);
bool isInvalidCollidePreCamera(const al::CameraStartInfo& startInfo);
bool isInvalidKeepPreCameraDistance(const al::CameraStartInfo& startInfo);
bool isInvalidKeepPreCameraDistanceIfNoCollide(const al::CameraStartInfo& startInfo);
bool isValidResetPreCameraPose(const al::CameraStartInfo& startInfo);
bool isValidKeepPreSelfCameraPose(const al::CameraStartInfo& startInfo);
f32 getPreCameraSwingAngleH(const al::CameraStartInfo& startInfo);
f32 getPreCameraSwingAngleV(const al::CameraStartInfo& startInfo);
f32 getPreCameraMaxSwingAngleH(const al::CameraStartInfo& startInfo);
f32 getPreCameraMaxSwingAngleV(const al::CameraStartInfo& startInfo);
bool isExistAreaAngleH(const al::CameraStartInfo& startInfo);
bool isExistAreaAngleV(const al::CameraStartInfo& startInfo);
f32 getAreaAngleH(const al::CameraStartInfo& startInfo);
f32 getAreaAngleV(const al::CameraStartInfo& startInfo);
bool isExistNextPoseByPreCamera(const al::CameraStartInfo& startInfo);
f32 getNextAngleHByPreCamera(const al::CameraStartInfo& startInfo);
f32 getNextAngleVByPreCamera(const al::CameraStartInfo& startInfo);
void calcCameraPose(sead::Quatf* pose, const al::CameraPoser* poser);
void calcLookDir(sead::Vector3f* lookDir, const al::CameraPoser* poser);
void calcCameraDir(sead::Vector3f* cameraDir, const al::CameraPoser* poser);
void calcCameraDirH(sead::Vector3f* cameraDirH, const al::CameraPoser* poser);
void calcLookDirH(sead::Vector3f* lookDirH, const al::CameraPoser* poser);
void calcSideDir(sead::Vector3f* sideDir, const al::CameraPoser* poser);
void calcPreCameraDir(sead::Vector3f* preCameraDir, const al::CameraPoser* poser);
void calcPreCameraDirH(sead::Vector3f* preCameraDirH, const al::CameraPoser* poser);
void calcPreLookDir(sead::Vector3f* preLookDir, const al::CameraPoser* poser);
void calcPreLookDirH(sead::Vector3f* preLookDirH, const al::CameraPoser* poser);
f32 calcPreCameraAngleH(const al::CameraPoser* poser);
f32 calcPreCameraAngleV(const al::CameraPoser* poser);
void setLookAtPosToTarget(al::CameraPoser* poser);
void calcTargetTrans(sead::Vector3f* targetTrans, const al::CameraPoser* poser);
void setLookAtPosToTargetAddOffset(al::CameraPoser* poser, const sead::Vector3f& offset);
void setCameraPosToTarget(al::CameraPoser* poser);
void setCameraPosToTargetAddOffset(al::CameraPoser* poser, const sead::Vector3f& offset);
void calcTargetTransWithOffset(sead::Vector3f* targetTransWithOffset, const al::CameraPoser* poser);
void calcTargetVelocity(sead::Vector3f* targetVelocity, const al::CameraPoser* poser);
void calcTargetVelocityH(sead::Vector3f* targetVelocityH, const al::CameraPoser* poser);
void calcTargetUp(sead::Vector3f* targetUp, const al::CameraPoser* poser);
f32 calcTargetSpeedV(const al::CameraPoser*);
void calcTargetPose(sead::Quatf*, const al::CameraPoser*);
void calcTargetFront(sead::Vector3f*, const al::CameraPoser*);
@ -97,26 +98,26 @@ const sead::Vector3f& getUnderTargetCollisionNormal(const al::CameraPoser*);
bool isExistSlopeCollisionUnderTarget(const al::CameraPoser*);
bool isExistWallCollisionUnderTarget(const al::CameraPoser*);
bool tryCalcSlopeCollisionDownFrontDirH(sead::Vector3f*, const al::CameraPoser*);
void getSlopeCollisionUpSpeed(const al::CameraPoser*);
void getSlopeCollisionDownSpeed(const al::CameraPoser*);
f32 getSlopeCollisionUpSpeed(const al::CameraPoser*);
f32 getSlopeCollisionDownSpeed(const al::CameraPoser*);
bool isExistSubTarget(const al::CameraPoser*);
void checkValidTurnToSubTarget(const al::CameraPoser*);
bool checkValidTurnToSubTarget(const al::CameraPoser*);
void calcSubTargetBack(sead::Vector3f*, const al::CameraPoser*);
void calcSubTargetTrans(sead::Vector3f*, const al::CameraPoser*);
bool isChangeSubTarget(const al::CameraPoser*);
void calcSubTargetFront(sead::Vector3f*, const al::CameraPoser*);
void getSubTargetRequestDistance(const al::CameraPoser*);
void getSubTargetTurnSpeedRate1(const al::CameraPoser*);
void getSubTargetTurnSpeedRate2(const al::CameraPoser*);
void getSubTargetTurnRestartStep(const al::CameraPoser*);
f32 getSubTargetRequestDistance(const al::CameraPoser*);
f32 getSubTargetTurnSpeedRate1(const al::CameraPoser*);
f32 getSubTargetTurnSpeedRate2(const al::CameraPoser*);
f32 getSubTargetTurnRestartStep(const al::CameraPoser*);
bool tryCalcSubTargetTurnBrakeDistanceRate(f32*, const al::CameraPoser*);
bool isValidSubTargetTurnV(const al::CameraPoser*);
bool isValidSubTargetResetAfterTurnV(const al::CameraPoser*);
void clampAngleSubTargetTurnRangeV(f32*, const al::CameraPoser*);
void initCameraVerticalAbsorber(al::CameraPoser*);
void initCameraVerticalAbsorberNoCameraPosAbsorb(al::CameraPoser*);
void getCameraVerticalAbsorbPosUp(const al::CameraPoser*);
void getCameraVerticalAbsorbPosDown(const al::CameraPoser*);
f32 getCameraVerticalAbsorbPosUp(const al::CameraPoser*);
f32 getCameraVerticalAbsorbPosDown(const al::CameraPoser*);
void liberateVerticalAbsorb(al::CameraPoser*);
void stopUpdateVerticalAbsorb(al::CameraPoser*);
void stopUpdateVerticalAbsorbForSnapShotMode(al::CameraPoser*, const sead::Vector3f&);
@ -133,18 +134,18 @@ void initCameraAngleCtrlWithRelativeH(al::CameraPoser*);
void initCameraDefaultAngleRangeV(al::CameraPoser*, f32, f32);
void setCameraStartAngleV(al::CameraPoser*, f32);
void setCameraAngleV(al::CameraPoser*, f32);
void getCameraAngleH(const al::CameraPoser*);
void getCameraAngleV(const al::CameraPoser*);
f32 getCameraAngleH(const al::CameraPoser*);
f32 getCameraAngleV(const al::CameraPoser*);
void initAngleSwing(al::CameraPoser*);
bool isValidAngleSwing(const al::CameraPoser*);
void initCameraOffsetCtrlPreset(al::CameraPoser*);
void getOffset(const al::CameraPoser*);
const sead::Vector3f& getOffset(const al::CameraPoser*);
void initGyroCameraCtrl(al::CameraPoser*);
void resetGyro(al::CameraPoser*);
void calcCameraGyroPose(const al::CameraPoser*, sead::Vector3f*, sead::Vector3f*, sead::Vector3f*);
void getGyroFront(al::CameraPoser*);
void getGyroAngleV(al::CameraPoser*);
void getGyroAngleH(al::CameraPoser*);
const sead::Vector3f& getGyroFront(al::CameraPoser*);
f32 getGyroAngleV(al::CameraPoser*);
f32 getGyroAngleH(al::CameraPoser*);
void setGyroLimitAngleV(al::CameraPoser*, f32, f32);
void setGyroSensitivity(al::CameraPoser*, f32, f32);
void reduceGyroSencitivity(al::CameraPoser*);
@ -169,8 +170,8 @@ void validateSnapShotCameraRoll(al::CameraPoser*);
void updateSnapShotCameraCtrl(al::CameraPoser*);
void startResetSnapShotCameraCtrl(al::CameraPoser*, s32);
void setSnapShotMaxZoomOutFovyDegree(al::CameraPoser*, f32);
void getSnapShotRollDegree(const al::CameraPoser*);
void getSnapShotLookAtOffset(const al::CameraPoser*);
f32 getSnapShotRollDegree(const al::CameraPoser*);
const sead::Vector3f& getSnapShotLookAtOffset(const al::CameraPoser*);
bool isOffVerticalAbsorb(const al::CameraPoser*);
void onVerticalAbsorb(al::CameraPoser*);
void offVerticalAbsorb(al::CameraPoser*);
@ -180,11 +181,11 @@ bool isRequestResetPosition(const al::CameraObjectRequestInfo&);
bool isRequestResetAngleV(const al::CameraObjectRequestInfo&);
bool isRequestDownToDefaultAngleBySpeed(const al::CameraObjectRequestInfo&);
bool isRequestUpToTargetAngleBySpeed(const al::CameraObjectRequestInfo&);
void getRequestTargetAngleV(const al::CameraObjectRequestInfo&);
void getRequestAngleSpeed(const al::CameraObjectRequestInfo&);
f32 getRequestTargetAngleV(const al::CameraObjectRequestInfo&);
f32 getRequestAngleSpeed(const al::CameraObjectRequestInfo&);
bool isRequestMoveDownAngleV(const al::CameraObjectRequestInfo&);
bool isRequestSetAngleV(const al::CameraObjectRequestInfo&);
void getRequestAngleV(const al::CameraObjectRequestInfo&);
f32 getRequestAngleV(const al::CameraObjectRequestInfo&);
bool isInvalidCollider(const al::CameraPoser*);
void validateCollider(al::CameraPoser*);
void invalidateCollider(al::CameraPoser*);
@ -213,15 +214,16 @@ f32 calcZoneInvRotateAngleH(f32, const sead::Matrix34f&);
void multVecZone(sead::Vector3f*, const sead::Vector3f&, const al::CameraPoser*);
void multVecInvZone(sead::Vector3f*, const sead::Vector3f&, const al::CameraPoser*);
void rotateVecZone(sead::Vector3f*, const sead::Vector3f&, const al::CameraPoser*);
void calcOffsetCameraKeepInFrameV(sead::Vector3f*, sead::LookAtCamera*, const sead::Vector3f&,
bool calcOffsetCameraKeepInFrameV(sead::Vector3f*, sead::LookAtCamera*, const sead::Vector3f&,
const al::CameraPoser*, f32, f32);
void makeCameraKeepInFrameV(sead::LookAtCamera*, const sead::Vector3f&, const al::CameraPoser*, f32,
f32);
void initCameraRail(al::CameraPoser*, const al::PlacementInfo&, const char*);
bool tryGetCameraRailArg(f32*, const al::PlacementInfo&, const char*, const char*);
// void getCameraRailPointObjId(al::CameraPoser const*, s32);
bool tryFindNearestLimitRailKeeper(const al::CameraPoser*, const sead::Vector3f&);
void calcCameraRotateStick(sead::Vector2f*, const al::CameraPoser*);
const char* getCameraRailPointObjId(const al::CameraPoser*, s32);
al::CameraLimitRailKeeper* tryFindNearestLimitRailKeeper(const al::CameraPoser*,
const sead::Vector3f&);
sead::Vector2f calcCameraRotateStick(sead::Vector2f*, const al::CameraPoser*);
f32 calcCameraRotateStickH(const al::CameraPoser*);
f32 calcCameraRotateStickV(const al::CameraPoser*);
f32 calcCameraRotateStickPower(const al::CameraPoser*);

View file

@ -1,10 +1,20 @@
#include "Library/Camera/CameraUtil.h"
#include "Library/Camera/CameraDirector.h"
#include "Library/Camera/CameraPoseUpdater.h"
#include "Library/Camera/CameraPoser.h"
#include "Library/Camera/CameraPoserFix.h"
#include "Library/Camera/CameraSwitchRequester.h"
#include "Library/Camera/CameraTicket.h"
#include "Library/Camera/CameraViewCtrlScene.h"
#include "Library/Camera/CameraViewInfo.h"
#include "Library/Camera/IUseCamera.h"
#include "Library/Camera/SceneCameraInfo.h"
#include "Library/LiveActor/ActorInitInfo.h"
#include "Library/LiveActor/ActorInitUtil.h"
#include "Library/Math/MathUtil.h"
#include "Library/Placement/PlacementFunction.h"
#include "Library/Placement/PlacementInfo.h"
#include "Library/Projection/Projection.h"
namespace al {
@ -62,6 +72,14 @@ const sead::Matrix44f& getProjectionMtx(const IUseCamera* user, s32 viewIdx) {
}
const sead::Matrix44f& getProjectionMtx(const SceneCameraInfo* info, s32 viewIdx) {
return *info->getViewAt(viewIdx)->getProjMtx();
}
const sead::Matrix44f* getProjectionMtxPtr(const IUseCamera* user, s32 viewIdx) {
return getProjectionMtxPtr(getSceneCameraInfo(user), viewIdx);
}
const sead::Matrix44f* getProjectionMtxPtr(const SceneCameraInfo* info, s32 viewIdx) {
return info->getViewAt(viewIdx)->getProjMtx();
}
@ -166,4 +184,131 @@ f32 calcCurrentFovyRate(const IUseCamera* user, s32 viewIdx) {
return fovy / fovy2;
}
void calcCameraFront(sead::Vector3f* vec, const IUseCamera* user, s32 viewIdx) {
vec->set(getCameraAt(user, viewIdx) - getCameraPos(user, viewIdx));
normalize(vec);
}
void setNearClipDistance(const IUseCamera* user, f32 distance, s32 updaterIdx) {
getCameraDirector(user)->getPoseUpdater(updaterIdx)->setNearClipDistance(distance);
}
void setFarClipDistance(const IUseCamera* user, f32 distance, s32 updaterIdx) {
getCameraDirector(user)->getPoseUpdater(updaterIdx)->setFarClipDistance(distance);
}
void calcCameraDir(sead::Vector3f* dir, const IUseCamera* user, s32 viewIdx) {
const sead::Matrix34f& mtx = getLookAtCamera(user, viewIdx).getMatrix();
dir->set(mtx.m[2][0], mtx.m[2][1], mtx.m[2][2]);
}
void calcCameraLookDir(sead::Vector3f* dir, const IUseCamera* user, s32 viewIdx) {
const sead::Matrix34f& mtx = getLookAtCamera(user, viewIdx).getMatrix();
dir->set(mtx.m[2][0], mtx.m[2][1], mtx.m[2][2]);
dir->negate();
}
void calcCameraSideDir(sead::Vector3f* sideDir, const IUseCamera* user, s32 viewIdx) {
return getLookAtCamera(user, viewIdx).getRightVectorByMatrix(sideDir);
}
void calcCameraUpDir(sead::Vector3f* upDir, const IUseCamera* user, s32 viewIdx) {
return getLookAtCamera(user, viewIdx).getUpVectorByMatrix(upDir);
}
bool tryCalcCameraDir(sead::Vector3f* dir, const SceneCameraInfo* info, s32 viewIdx) {
const sead::Matrix34f& mtx = info->getViewAt(viewIdx)->getLookAtCam().getMatrix();
dir->set(mtx.m[2][0], mtx.m[2][1], mtx.m[2][2]);
return tryNormalizeOrZero(dir);
}
bool tryCalcCameraDirH(sead::Vector3f* dirH, const SceneCameraInfo* info,
const sead::Vector3f& upDir, s32 viewIdx) {
const sead::Matrix34f& mtx = info->getViewAt(viewIdx)->getLookAtCam().getMatrix();
verticalizeVec(dirH, upDir, {mtx.m[2][0], mtx.m[2][1], mtx.m[2][2]});
return tryNormalizeOrZero(dirH);
}
bool tryCalcCameraLookDirH(sead::Vector3f* dir, const SceneCameraInfo* info,
const sead::Vector3f& upDir, s32 viewIdx) {
if (!tryCalcCameraDirH(dir, info, upDir, viewIdx))
return false;
dir->set(dir->x, dir->y, dir->z);
dir->negate();
return true;
}
void startCamera(const IUseCamera* user, CameraTicket* ticket, s32 num) {
getCameraDirector(user)
->getSceneCameraCtrl()
->getSceneViewAt(0)
->getSwitchRequester()
->requestStart(ticket, num);
}
void startCameraSub(const IUseCamera* user, CameraTicket* ticket, s32 num) {
getCameraDirector(user)
->getSceneCameraCtrl()
->getSceneViewAt(1)
->getSwitchRequester()
->requestStart(ticket, num);
}
bool isActiveCamera(const CameraTicket* ticket) {
return ticket->isActiveCamera();
}
CameraTicket* initObjectCamera(const IUseCamera* user, const PlacementInfo& placementInfo,
const char* str0, const char* str1) {
sead::Matrix34f mat;
memcpy(&mat, &sead::Matrix34f::ident, sizeof(mat));
tryGetZoneMatrixTR(&mat, placementInfo);
return getCameraDirector(user)->createObjectCamera(createPlacementId(placementInfo), str0, str1,
5, mat);
}
CameraTicket* initObjectCamera(const IUseCamera* user, const ActorInitInfo& actorInitInfo,
const char* str0, const char* str1) {
const PlacementInfo& placementInfo = getPlacementInfo(actorInitInfo);
sead::Matrix34f mat;
memcpy(&mat, &sead::Matrix34f::ident, sizeof(mat));
tryGetZoneMatrixTR(&mat, placementInfo);
return getCameraDirector(user)->createObjectCamera(createPlacementId(placementInfo), str0, str1,
5, mat);
}
CameraTicket* initObjectCameraNoPlacementInfo(const IUseCamera* user, const char* str0,
const char* str1) {
return getCameraDirector(user)->createObjectCamera(nullptr, str0, str1, 5,
sead::Matrix34f::ident);
}
CameraTicket* initFixCamera(const IUseCamera* user, const char* str, const sead::Vector3f& camPos,
const sead::Vector3f& lookAtPos) {
CameraPoserFix* poserFix = new CameraPoserFix("固定");
CameraTicket* ticket = getCameraDirector(user)->createCamera(poserFix, nullptr, str, 5,
sead::Matrix34f::ident, true);
poserFix->initCameraPosAndLookAtPos(camPos, lookAtPos);
return ticket;
}
CameraTicket* initFixDoorwayCamera(const IUseCamera* user, const char* str,
const sead::Vector3f& camPos, const sead::Vector3f& lookAtPos) {
CameraPoserFix* poser = new CameraPoserFix(CameraPoserFix::getFixDoorwayCameraName());
CameraTicket* ticket =
getCameraDirector(user)->createCamera(poser, nullptr, str, 5, sead::Matrix34f::ident, true);
poser->initCameraPosAndLookAtPos(camPos, lookAtPos);
return ticket;
}
} // namespace al

View file

@ -12,7 +12,7 @@ class SceneCameraViewCtrl {
public:
SceneCameraViewCtrl();
const CameraSwitchRequester* getSwitchRequester() const { return mSwitchRequester; }
CameraSwitchRequester* getSwitchRequester() { return mSwitchRequester; }
void resetViewName() { mViewName = nullptr; }

View file

@ -14,8 +14,8 @@ const sead::Projection& CameraViewInfo::getProjectionSead() const {
return mProjection.getProjectionSead();
}
const sead::Matrix44f& CameraViewInfo::getProjMtx() const {
return mProjection.getProjMtx();
const sead::Matrix44f* CameraViewInfo::getProjMtx() const {
return &mProjection.getProjMtx();
}
const sead::Matrix44f& CameraViewInfo::getProjMtxStd() const {

View file

@ -15,7 +15,7 @@ public:
const CameraViewFlag& flag, const OrthoProjectionInfo& orthoProjectionInfo);
const sead::Projection& getProjectionSead() const;
const sead::Matrix44f& getProjMtx() const;
const sead::Matrix44f* getProjMtx() const;
const sead::Matrix44f& getProjMtxStd() const;
f32 getAspect() const;
f32 getNear() const;

View file

@ -245,14 +245,14 @@ void initActorModelKeeper(LiveActor* actor, const ActorInitInfo& info,
modelKeeper->getModelCtrl()->setCameraInfo(
&sceneCameraInfo->getViewAt(0)->getLookAtCam().getMatrix(),
&sceneCameraInfo->getViewAt(1)->getLookAtCam().getMatrix(),
&sceneCameraInfo->getViewAt(0)->getProjMtx(),
&sceneCameraInfo->getViewAt(1)->getProjMtx());
sceneCameraInfo->getViewAt(0)->getProjMtx(),
sceneCameraInfo->getViewAt(1)->getProjMtx());
} else {
modelKeeper->getModelCtrl()->setCameraInfo(
&sceneCameraInfo->getViewAt(0)->getLookAtCam().getMatrix(),
&sceneCameraInfo->getViewAt(0)->getLookAtCam().getMatrix(),
&sceneCameraInfo->getViewAt(0)->getProjMtx(),
&sceneCameraInfo->getViewAt(0)->getProjMtx());
sceneCameraInfo->getViewAt(0)->getProjMtx(),
sceneCameraInfo->getViewAt(0)->getProjMtx());
}
modelKeeper->initModel(

View file

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

View file

@ -205,6 +205,10 @@ void makeBoxMullerRandomGauss(sead::Vector2f* outBox, f32 randA, f32 randB);
f32 modf(f32 a, f32 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) {
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())
setNerve(this, &Stop);
mFrameInCycle = modi((mFrameInCycle + 1) + mSwingCycle, mSwingCycle);
mFrameInCycle = wrapValue(mFrameInCycle + 1, mSwingCycle);
}
void SwingMovement::exeStop() {

View file

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

View file

@ -26,6 +26,8 @@ public:
virtual void drawMain() const;
virtual void drawSub() const;
AudioKeeper* getAudioKeeper() const override { return mAudioKeeper; }
virtual bool isDisposable() const;
virtual Scene* getCurrentScene() const { return nullptr; }
@ -34,8 +36,6 @@ public:
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 initAudioKeeper(const char*);
void initDrawSystemInfo(const SequenceInitInfo&);

View file

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

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;
s32 prevPoint = al::modi(mCurrentLandPoint - 1 + mLandPoints, mLandPoints);
s32 nextPoint = al::modi(mCurrentLandPoint + 1 + mLandPoints, mLandPoints);
s32 prevPoint = al::wrapValue(mCurrentLandPoint - 1, mLandPoints);
s32 nextPoint = al::wrapValue(mCurrentLandPoint + 1, mLandPoints);
f32 prevDist = getKoopaLandPointDistance(mPointsTrans[prevPoint], 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) &&
(!isHack() || !rs::isActiveHackStartDemo(mPlayerHack)) &&
!al::isClipped(mClippingProbeActor) && !mIsClipped) {
mReviveDelayCount = al::modi(mReviveDelayCount + 1 + mReviveDelayTime, mReviveDelayTime);
mReviveDelayCount =
al::wrapValue(static_cast<s32>(mReviveDelayCount + 1), mReviveDelayTime);
}
mIsClipped = al::isClipped(mClippingProbeActor);

View file

@ -505,7 +505,8 @@ void Gamane::exeHack() {
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() {

View file

@ -25,7 +25,7 @@ HosuiTrailKeeper::HosuiTrailKeeper(const al::ActorInitInfo& initInfo) {
void HosuiTrailKeeper::appearTrail(const sead::Vector3f& pos, const sead::Vector3f& dir) {
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];
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());
}
s32 disappearIdx = al::modi(mIndex + 5 + count, count);
s32 disappearIdx = al::wrapValue(mIndex + 5, count);
HosuiTrail* disappearTrail = mTrails[disappearIdx];
if (al::isAlive(disappearTrail))
disappearTrail->disappear();
mIndex = al::modi(mIndex + 1 + count, count);
mIndex = al::wrapValue(mIndex + 1, count);
}
void HosuiTrailKeeper::forceKillAll() {

View file

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

View file

@ -161,15 +161,15 @@ void WindowConfirmData::exeWait() {
if (rs::isRepeatUiDown(mWindowConfirmLayout)) {
if (mSelectionCooldown == 0)
changeSelectingIdx(al::modi((mSelectionIndex + 1) + 2, 2));
mSelectionCooldown = al::modi((mSelectionCooldown + 1) + 10, 10);
changeSelectingIdx(al::wrapValue(mSelectionIndex + 1, 2));
mSelectionCooldown = al::wrapValue(mSelectionCooldown + 1, 10);
return;
}
if (rs::isRepeatUiUp(mWindowConfirmLayout)) {
if (mSelectionCooldown == 0)
changeSelectingIdx(al::modi((mSelectionIndex - 1) + 2, 2));
mSelectionCooldown = al::modi((mSelectionCooldown + 1) + 10, 10);
changeSelectingIdx(al::wrapValue(mSelectionIndex - 1, 2));
mSelectionCooldown = al::wrapValue(mSelectionCooldown + 1, 10);
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;
startActionAtRandomFrameIfNotPlaying(mActor, "Fly");
if (rs::isModeE3MovieRom()) {
gVerticalAccelIndex = al::modi(gVerticalAccelIndex + 7, 6);
gVerticalAccelIndex = al::wrapValue(gVerticalAccelIndex + 1, 6);
mVerticalAccel = gE3MovieVerticalAccel[gVerticalAccelIndex];
gHorizontalAccelIndex = al::modi(gHorizontalAccelIndex + 5, 4);
gHorizontalAccelIndex = al::wrapValue(gHorizontalAccelIndex + 1, 4);
mHorizontalAccel = gE3MovieHorizontalAccel[gHorizontalAccelIndex];
} else {
gVerticalAccelIndex = al::modi(gVerticalAccelIndex + 5, 4);
gVerticalAccelIndex = al::wrapValue(gVerticalAccelIndex + 1, 4);
mVerticalAccel = gVerticalAccel[gVerticalAccelIndex];
mHorizontalAccel = gHorizontalAccel;
}
mTargetAccelDir = {0, mVerticalAccel, mHorizontalAccel};
al::normalize(&mTargetAccelDir);
gCollisionCheckOffsetStep = al::modi(gCollisionCheckOffsetStep + 11, 10);
gCollisionCheckOffsetStep = al::wrapValue(gCollisionCheckOffsetStep + 1, 10);
mCollisionCheckOffsetStep = gCollisionCheckOffsetStep;
}

View file

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