mirror of
https://github.com/MonsterDruide1/OdysseyDecomp
synced 2026-04-23 09:04:21 +00:00
Compare commits
4 commits
fd0e6c5399
...
cdaa0dcba4
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
cdaa0dcba4 | ||
|
|
7128abbd2c | ||
|
|
d13df15f33 | ||
|
|
e857cda234 |
|
|
@ -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
|
||||
|
|
|
|||
271
lib/al/Library/Camera/CameraPoserFunction.cpp
Normal file
271
lib/al/Library/Camera/CameraPoserFunction.cpp
Normal 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
|
||||
|
|
@ -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*);
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ class SceneCameraViewCtrl {
|
|||
public:
|
||||
SceneCameraViewCtrl();
|
||||
|
||||
const CameraSwitchRequester* getSwitchRequester() const { return mSwitchRequester; }
|
||||
CameraSwitchRequester* getSwitchRequester() { return mSwitchRequester; }
|
||||
|
||||
void resetViewName() { mViewName = nullptr; }
|
||||
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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(
|
||||
|
|
|
|||
Loading…
Reference in a new issue