mirror of https://github.com/PrimeDecomp/prime.git
More CCinematicCamera imps
This commit is contained in:
parent
0d1b469f91
commit
11f243614b
|
@ -3,8 +3,8 @@
|
|||
.section .data
|
||||
.balign 8
|
||||
|
||||
.global lbl_803DADF8
|
||||
lbl_803DADF8:
|
||||
.global __vt__16CCinematicCamera
|
||||
__vt__16CCinematicCamera:
|
||||
# ROM: 0x3D7DF8
|
||||
.4byte 0
|
||||
.4byte 0
|
||||
|
@ -1844,7 +1844,7 @@ lbl_80094404:
|
|||
/* 80094410 00091370 38 81 00 A0 */ addi r4, r1, 0xa0
|
||||
/* 80094414 00091374 90 01 00 A8 */ stw r0, 0xa8(r1)
|
||||
/* 80094418 00091378 90 01 00 AC */ stw r0, 0xac(r1)
|
||||
/* 8009441C 0009137C 4B FC 90 95 */ bl sub_8005d4b0
|
||||
/* 8009441C 0009137C 4B FC 90 95 */ bl "__as__Q24rstl45vector<9TUniqueId,Q24rstl17rmemory_allocator>FRCQ24rstl45vector<9TUniqueId,Q24rstl17rmemory_allocator>"
|
||||
/* 80094420 00091380 80 01 00 A4 */ lwz r0, 0xa4(r1)
|
||||
/* 80094424 00091384 80 61 00 AC */ lwz r3, 0xac(r1)
|
||||
/* 80094428 00091388 54 00 08 3C */ slwi r0, r0, 1
|
||||
|
@ -1896,7 +1896,7 @@ lbl_800944BC:
|
|||
/* 800944C8 00091428 38 81 00 80 */ addi r4, r1, 0x80
|
||||
/* 800944CC 0009142C 90 01 00 88 */ stw r0, 0x88(r1)
|
||||
/* 800944D0 00091430 90 01 00 8C */ stw r0, 0x8c(r1)
|
||||
/* 800944D4 00091434 4B FC 8F DD */ bl sub_8005d4b0
|
||||
/* 800944D4 00091434 4B FC 8F DD */ bl "__as__Q24rstl45vector<9TUniqueId,Q24rstl17rmemory_allocator>FRCQ24rstl45vector<9TUniqueId,Q24rstl17rmemory_allocator>"
|
||||
/* 800944D8 00091438 80 01 00 84 */ lwz r0, 0x84(r1)
|
||||
/* 800944DC 0009143C 80 61 00 8C */ lwz r3, 0x8c(r1)
|
||||
/* 800944E0 00091440 54 00 08 3C */ slwi r0, r0, 1
|
||||
|
@ -2837,9 +2837,9 @@ __dt__16CCinematicCameraFv:
|
|||
/* 800951F4 00092154 93 C1 00 68 */ stw r30, 0x68(r1)
|
||||
/* 800951F8 00092158 7C 7E 1B 79 */ or. r30, r3, r3
|
||||
/* 800951FC 0009215C 41 82 01 DC */ beq lbl_800953D8
|
||||
/* 80095200 00092160 3C 60 80 3E */ lis r3, lbl_803DADF8@ha
|
||||
/* 80095200 00092160 3C 60 80 3E */ lis r3, __vt__16CCinematicCamera@ha
|
||||
/* 80095204 00092164 34 1E 01 D8 */ addic. r0, r30, 0x1d8
|
||||
/* 80095208 00092168 38 03 AD F8 */ addi r0, r3, lbl_803DADF8@l
|
||||
/* 80095208 00092168 38 03 AD F8 */ addi r0, r3, __vt__16CCinematicCamera@l
|
||||
/* 8009520C 0009216C 90 1E 00 00 */ stw r0, 0(r30)
|
||||
/* 80095210 00092170 41 82 00 44 */ beq lbl_80095254
|
||||
/* 80095214 00092174 80 1E 01 DC */ lwz r0, 0x1dc(r30)
|
||||
|
@ -3019,9 +3019,9 @@ lbl_800953D8:
|
|||
/* 80095474 000923D4 39 21 00 10 */ addi r9, r1, 0x10
|
||||
/* 80095478 000923D8 57 EA DF FE */ rlwinm r10, r31, 0x1b, 0x1f, 0x1f
|
||||
/* 8009547C 000923DC 4B FC 86 41 */ bl "__ct__11CGameCameraF9TUniqueIdbRCQ24rstl66basic_string<c,Q24rstl14char_traits<c>,Q24rstl17rmemory_allocator>RC11CEntityInfoRC12CTransform4fffff9TUniqueIdbi"
|
||||
/* 80095480 000923E0 3C 60 80 3E */ lis r3, lbl_803DADF8@ha
|
||||
/* 80095480 000923E0 3C 60 80 3E */ lis r3, __vt__16CCinematicCamera@ha
|
||||
/* 80095484 000923E4 38 00 00 00 */ li r0, 0
|
||||
/* 80095488 000923E8 38 63 AD F8 */ addi r3, r3, lbl_803DADF8@l
|
||||
/* 80095488 000923E8 38 63 AD F8 */ addi r3, r3, __vt__16CCinematicCamera@l
|
||||
/* 8009548C 000923EC C0 02 8B 40 */ lfs f0, lbl_805AA860@sda21(r2)
|
||||
/* 80095490 000923F0 90 7D 00 00 */ stw r3, 0(r29)
|
||||
/* 80095494 000923F4 7F C4 F3 78 */ mr r4, r30
|
||||
|
|
|
@ -2758,7 +2758,7 @@ lbl_8005D2E8:
|
|||
/* 8005D300 0005A260 38 81 00 C8 */ addi r4, r1, 0xc8
|
||||
/* 8005D304 0005A264 90 01 00 D0 */ stw r0, 0xd0(r1)
|
||||
/* 8005D308 0005A268 90 01 00 D4 */ stw r0, 0xd4(r1)
|
||||
/* 8005D30C 0005A26C 48 00 01 A5 */ bl sub_8005d4b0
|
||||
/* 8005D30C 0005A26C 48 00 01 A5 */ bl "__as__Q24rstl45vector<9TUniqueId,Q24rstl17rmemory_allocator>FRCQ24rstl45vector<9TUniqueId,Q24rstl17rmemory_allocator>"
|
||||
/* 8005D310 0005A270 80 01 00 CC */ lwz r0, 0xcc(r1)
|
||||
/* 8005D314 0005A274 80 61 00 D4 */ lwz r3, 0xd4(r1)
|
||||
/* 8005D318 0005A278 54 00 08 3C */ slwi r0, r0, 1
|
||||
|
@ -2873,8 +2873,8 @@ lbl_8005D49C:
|
|||
/* 8005D4A8 0005A408 38 21 00 F0 */ addi r1, r1, 0xf0
|
||||
/* 8005D4AC 0005A40C 4E 80 00 20 */ blr
|
||||
|
||||
.global sub_8005d4b0
|
||||
sub_8005d4b0:
|
||||
.global "__as__Q24rstl45vector<9TUniqueId,Q24rstl17rmemory_allocator>FRCQ24rstl45vector<9TUniqueId,Q24rstl17rmemory_allocator>"
|
||||
"__as__Q24rstl45vector<9TUniqueId,Q24rstl17rmemory_allocator>FRCQ24rstl45vector<9TUniqueId,Q24rstl17rmemory_allocator>":
|
||||
/* 8005D4B0 0005A410 94 21 FF E0 */ stwu r1, -0x20(r1)
|
||||
/* 8005D4B4 0005A414 7C 08 02 A6 */ mflr r0
|
||||
/* 8005D4B8 0005A418 90 01 00 24 */ stw r0, 0x24(r1)
|
||||
|
|
|
@ -463,7 +463,7 @@ lbl_801770A8:
|
|||
/* 801770CC 0017402C 38 81 00 1C */ addi r4, r1, 0x1c
|
||||
/* 801770D0 00174030 90 01 00 24 */ stw r0, 0x24(r1)
|
||||
/* 801770D4 00174034 90 01 00 28 */ stw r0, 0x28(r1)
|
||||
/* 801770D8 00174038 4B EE 63 D9 */ bl sub_8005d4b0
|
||||
/* 801770D8 00174038 4B EE 63 D9 */ bl "__as__Q24rstl45vector<9TUniqueId,Q24rstl17rmemory_allocator>FRCQ24rstl45vector<9TUniqueId,Q24rstl17rmemory_allocator>"
|
||||
/* 801770DC 0017403C 80 01 00 20 */ lwz r0, 0x20(r1)
|
||||
/* 801770E0 00174040 80 61 00 28 */ lwz r3, 0x28(r1)
|
||||
/* 801770E4 00174044 54 00 08 3C */ slwi r0, r0, 1
|
||||
|
|
|
@ -236,6 +236,8 @@ struct SConnection {
|
|||
EScriptObjectState x0_state;
|
||||
EScriptObjectMessage x4_msg;
|
||||
TEditorId x8_objId;
|
||||
SConnection(EScriptObjectState state, EScriptObjectMessage msg, TEditorId id)
|
||||
: x0_state(state), x4_msg(msg), x8_objId(id) {}
|
||||
};
|
||||
|
||||
class CEntityInfo {
|
||||
|
|
|
@ -266,6 +266,7 @@ public:
|
|||
void QuitGame() { xf94_25_quitGame = true; }
|
||||
bool GetWantsToQuit() const { return xf94_25_quitGame; }
|
||||
void SetCinematicSkipObject(TUniqueId id) { xf38_skipCineSpecialFunc = id; }
|
||||
void SetCinematicPause(bool pause) { xf94_29_cinematicPause = pause; }
|
||||
void SetInSaveUI(bool b) { xf94_28_inSaveUI = b; }
|
||||
bool GetInSaveUI() const { return xf94_28_inSaveUI; }
|
||||
void SetInMapScreen(bool b) { xf94_27_inMapScreen = b; }
|
||||
|
|
|
@ -45,6 +45,7 @@ public:
|
|||
const CGameCamera& GetCurrentCamera(const CStateManager& mgr) const;
|
||||
const CGameCamera& GetLastCineCamera(CStateManager& mgr) const;
|
||||
TUniqueId GetLastCineCameraId() const;
|
||||
void RemoveCinemaCamera(TUniqueId uid, CStateManager& mgr);
|
||||
|
||||
void SetCurrentCameraId(TUniqueId camId);
|
||||
|
||||
|
|
|
@ -7,10 +7,63 @@
|
|||
|
||||
class CCinematicCamera : public CGameCamera {
|
||||
public:
|
||||
// TODO
|
||||
CCinematicCamera(TUniqueId uid, const rstl::string& name, const CEntityInfo& info,
|
||||
const CTransform4f& xf, bool active, float shotDuration, float fovy, float znear,
|
||||
float zfar, float aspect, uint flags);
|
||||
~CCinematicCamera();
|
||||
// CActor
|
||||
void Accept(IVisitor& visitor) override;
|
||||
void Think(float dt, CStateManager& mgr) override;
|
||||
void AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId uid, CStateManager& mgr) override;
|
||||
|
||||
// CGameCamera
|
||||
|
||||
void ProcessInput(const CFinalInput&, CStateManager& mgr) override;
|
||||
void Reset(const CTransform4f&, CStateManager& mgr) override;
|
||||
|
||||
// CCinematicCamera
|
||||
u32 GetFlags() const { return x21c_flags; }
|
||||
void WasDeactivated(CStateManager& mgr);
|
||||
void SendArrivedMsg(TUniqueId reciever, CStateManager& mgr) const;
|
||||
float GetDuration() const { return x1e8_duration; }
|
||||
CVector3f GetInterpolatedSplinePoint(const rstl::vector< CVector3f >& points, int& idxOut,
|
||||
float t) const;
|
||||
CQuaternion GetInterpolatedOrientation(const rstl::vector< CQuaternion >& rotations,
|
||||
float t) const;
|
||||
float GetInterpolatedHFov(const rstl::vector< float >& fovs, float t) const;
|
||||
float GetMoveOutofIntoAlpha() const;
|
||||
void DeactivateSelf(CStateManager& mgr);
|
||||
void CalculateMoveOutofIntoEyePosition(bool outOfEye, CStateManager& mgr);
|
||||
void GenerateMoveOutofIntoPoints(bool outOfEye, CStateManager& mgr);
|
||||
static bool PickRandomActiveConnection(const rstl::vector< SConnection >& conns,
|
||||
SConnection& randConn, CStateManager& mgr);
|
||||
void CalculateWaypoints(CStateManager& mgr);
|
||||
|
||||
private:
|
||||
// TODO
|
||||
rstl::vector< CVector3f > x188_viewPoints;
|
||||
rstl::vector< CQuaternion > x198_viewOrientations;
|
||||
rstl::vector< TUniqueId > x1a8_viewPointArrivals;
|
||||
rstl::vector< CVector3f > x1b8_targets;
|
||||
rstl::vector< TUniqueId > x1c8_targetArrivals;
|
||||
rstl::vector< float > x1d8_viewHFovs;
|
||||
float x1e8_duration;
|
||||
float x1ec_t;
|
||||
float x1f0_origFovy;
|
||||
int x1f4_passedViewPoint;
|
||||
int x1f8_passedTarget;
|
||||
CQuaternion x1fc_origOrientation;
|
||||
TUniqueId x20c_lookAtId;
|
||||
CVector3f x210_moveIntoEyePos;
|
||||
u32 x21c_flags; // 0x1: look at player
|
||||
// 0x2: out of player eye
|
||||
// 0x4: into player eye
|
||||
// 0x10: finish cine skip
|
||||
// 0x20: disable input
|
||||
// 0x40: draw player
|
||||
// 0x80: check failsafe
|
||||
// 0x100: cinematic pause
|
||||
// 0x200: disable out of into
|
||||
bool x220_24_ : 1;
|
||||
};
|
||||
|
||||
#endif // _CCINEMATICCAMERA
|
||||
|
|
|
@ -33,7 +33,7 @@ public:
|
|||
void SetFovInterpolation(float start, float fov, float time, float delayTime);
|
||||
void UpdatePerspective(float dt);
|
||||
|
||||
private:
|
||||
protected:
|
||||
TUniqueId xe8_watchedObject;
|
||||
mutable CMatrix4f xec_perspectiveMatrix;
|
||||
CTransform4f x12c_origXf;
|
||||
|
|
|
@ -17,6 +17,7 @@ public:
|
|||
void SetBallBoostState(EBallBoostState state);
|
||||
EBombJumpState GetBombJumpState() const; // { return x1e40_bombJumpState; }
|
||||
void SetBombJumpState(EBombJumpState state);
|
||||
void LoadMorphBallModel(CStateManager& mgr);
|
||||
|
||||
};
|
||||
|
||||
|
|
|
@ -37,6 +37,8 @@ public:
|
|||
int) const override;
|
||||
CAABox GetSortingBounds(const CStateManager&) const override;
|
||||
|
||||
bool IsPlayerActor() const { return x2e3_24_isPlayerActor; }
|
||||
|
||||
private:
|
||||
CHealthInfo x258_initialHealth;
|
||||
CHealthInfo x260_currentHealth;
|
||||
|
|
|
@ -46,6 +46,7 @@ CHECK_SIZEOF(TEditorId, 0x4)
|
|||
struct TUniqueId {
|
||||
ushort value;
|
||||
|
||||
TUniqueId(const TUniqueId& other) : value(other.value) {}
|
||||
TUniqueId(ushort version, ushort id) : value(((version & 0x3F) << 10) | (id & 0x3FF)) {}
|
||||
|
||||
ushort Value() const { return value & 0x3FF; }
|
||||
|
|
Loading…
Reference in New Issue