mirror of https://github.com/PrimeDecomp/prime.git
parent
78bf3c6826
commit
4d8926d3bd
|
@ -16650,7 +16650,7 @@ lbl_800D4320:
|
|||
/* 800D43C8 000D1328 7F E9 FB 78 */ mr r9, r31
|
||||
/* 800D43CC 000D132C 38 81 00 0C */ addi r4, r1, 0xc
|
||||
/* 800D43D0 000D1330 38 A1 00 10 */ addi r5, r1, 0x10
|
||||
/* 800D43D4 000D1334 48 01 64 CD */ bl "__ct__25CScriptCameraBlurKeyframeF9TUniqueIdRCQ24rstl66basic_string<c,Q24rstl14char_traits<c>,Q24rstl17rmemory_allocator>RC11CEntityInfoUifUiffb"
|
||||
/* 800D43D4 000D1334 48 01 64 CD */ bl "__ct__25CScriptCameraBlurKeyframeF9TUniqueIdRCQ24rstl66basic_string<c,Q24rstl14char_traits<c>,Q24rstl17rmemory_allocator>RC11CEntityInfoQ215CCameraBlurPass9EBlurTypefUlffb"
|
||||
/* 800D43D8 000D1338 7C 7C 1B 78 */ mr r28, r3
|
||||
lbl_800D43DC:
|
||||
/* 800D43DC 000D133C 38 61 00 10 */ addi r3, r1, 0x10
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
.section .data
|
||||
.balign 8
|
||||
|
||||
.global lbl_803DFCA0
|
||||
lbl_803DFCA0:
|
||||
.global __vt__25CScriptCameraBlurKeyframe
|
||||
__vt__25CScriptCameraBlurKeyframe:
|
||||
# ROM: 0x3DCCA0
|
||||
.4byte 0
|
||||
.4byte 0
|
||||
|
@ -94,9 +94,9 @@ __dt__25CScriptCameraBlurKeyframeFv:
|
|||
/* 800EA854 000E77B4 93 C1 00 08 */ stw r30, 8(r1)
|
||||
/* 800EA858 000E77B8 7C 7E 1B 79 */ or. r30, r3, r3
|
||||
/* 800EA85C 000E77BC 41 82 00 28 */ beq lbl_800EA884
|
||||
/* 800EA860 000E77C0 3C A0 80 3E */ lis r5, lbl_803DFCA0@ha
|
||||
/* 800EA860 000E77C0 3C A0 80 3E */ lis r5, __vt__25CScriptCameraBlurKeyframe@ha
|
||||
/* 800EA864 000E77C4 38 80 00 00 */ li r4, 0
|
||||
/* 800EA868 000E77C8 38 05 FC A0 */ addi r0, r5, lbl_803DFCA0@l
|
||||
/* 800EA868 000E77C8 38 05 FC A0 */ addi r0, r5, __vt__25CScriptCameraBlurKeyframe@l
|
||||
/* 800EA86C 000E77CC 90 1E 00 00 */ stw r0, 0(r30)
|
||||
/* 800EA870 000E77D0 4B F6 6A 05 */ bl __dt__7CEntityFv
|
||||
/* 800EA874 000E77D4 7F E0 07 35 */ extsh. r0, r31
|
||||
|
@ -112,8 +112,8 @@ lbl_800EA884:
|
|||
/* 800EA898 000E77F8 38 21 00 10 */ addi r1, r1, 0x10
|
||||
/* 800EA89C 000E77FC 4E 80 00 20 */ blr
|
||||
|
||||
.global "__ct__25CScriptCameraBlurKeyframeF9TUniqueIdRCQ24rstl66basic_string<c,Q24rstl14char_traits<c>,Q24rstl17rmemory_allocator>RC11CEntityInfoUifUiffb"
|
||||
"__ct__25CScriptCameraBlurKeyframeF9TUniqueIdRCQ24rstl66basic_string<c,Q24rstl14char_traits<c>,Q24rstl17rmemory_allocator>RC11CEntityInfoUifUiffb":
|
||||
.global "__ct__25CScriptCameraBlurKeyframeF9TUniqueIdRCQ24rstl66basic_string<c,Q24rstl14char_traits<c>,Q24rstl17rmemory_allocator>RC11CEntityInfoQ215CCameraBlurPass9EBlurTypefUlffb"
|
||||
"__ct__25CScriptCameraBlurKeyframeF9TUniqueIdRCQ24rstl66basic_string<c,Q24rstl14char_traits<c>,Q24rstl17rmemory_allocator>RC11CEntityInfoQ215CCameraBlurPass9EBlurTypefUlffb":
|
||||
/* 800EA8A0 000E7800 94 21 FF C0 */ stwu r1, -0x40(r1)
|
||||
/* 800EA8A4 000E7804 7C 08 02 A6 */ mflr r0
|
||||
/* 800EA8A8 000E7808 90 01 00 44 */ stw r0, 0x44(r1)
|
||||
|
@ -137,9 +137,9 @@ lbl_800EA884:
|
|||
/* 800EA8F0 000E7850 7C 87 23 78 */ mr r7, r4
|
||||
/* 800EA8F4 000E7854 38 81 00 08 */ addi r4, r1, 8
|
||||
/* 800EA8F8 000E7858 4B F6 6A 2D */ bl "__ct__7CEntityF9TUniqueIdRC11CEntityInfobRCQ24rstl66basic_string<c,Q24rstl14char_traits<c>,Q24rstl17rmemory_allocator>"
|
||||
/* 800EA8FC 000E785C 3C 80 80 3E */ lis r4, lbl_803DFCA0@ha
|
||||
/* 800EA8FC 000E785C 3C 80 80 3E */ lis r4, __vt__25CScriptCameraBlurKeyframe@ha
|
||||
/* 800EA900 000E7860 7F A3 EB 78 */ mr r3, r29
|
||||
/* 800EA904 000E7864 38 04 FC A0 */ addi r0, r4, lbl_803DFCA0@l
|
||||
/* 800EA904 000E7864 38 04 FC A0 */ addi r0, r4, __vt__25CScriptCameraBlurKeyframe@l
|
||||
/* 800EA908 000E7868 90 1D 00 00 */ stw r0, 0(r29)
|
||||
/* 800EA90C 000E786C 93 DD 00 34 */ stw r30, 0x34(r29)
|
||||
/* 800EA910 000E7870 D3 BD 00 38 */ stfs f29, 0x38(r29)
|
||||
|
|
|
@ -141,7 +141,7 @@ LIBS = [
|
|||
"MetroidPrime/CMappableObject",
|
||||
"MetroidPrime/Player/CPlayerCameraBob",
|
||||
"MetroidPrime/ScriptObjects/CScriptCameraFilterKeyframe",
|
||||
"MetroidPrime/ScriptObjects/CScriptCameraBlurKeyframe",
|
||||
["MetroidPrime/ScriptObjects/CScriptCameraBlurKeyframe", True],
|
||||
"MetroidPrime/Cameras/CCameraFilter",
|
||||
"MetroidPrime/Player/CMorphBall",
|
||||
"MetroidPrime/ScriptObjects/CScriptDamageableTrigger",
|
||||
|
|
|
@ -149,6 +149,10 @@ public:
|
|||
CEnvFxManager* EnvFxManager() { return x880_envFxManager; }
|
||||
const CEnvFxManager* GetEnvFxManager() const { return x880_envFxManager; }
|
||||
CRumbleManager* GetRumbleManager() { return x88c_rumbleManager; }
|
||||
CCameraFilterPass& CameraFilterPass(int idx) { return xb84_camFilterPasses[idx]; }
|
||||
const CCameraFilterPass& GetCameraFilterPass(int idx) const { return xb84_camFilterPasses[idx]; }
|
||||
CCameraBlurPass& CameraBlurPass(int idx) { return xd14_camBlurPasses[idx]; }
|
||||
const CCameraBlurPass& GetCameraBlurPass(int idx) const { return xd14_camBlurPasses[idx]; }
|
||||
|
||||
CRandom16* GetActiveRandom() const { return x900_random; }
|
||||
|
||||
|
|
|
@ -22,6 +22,8 @@ public:
|
|||
kBT_XRay,
|
||||
};
|
||||
|
||||
void SetBlur(EBlurType type, float amount, float duration, bool usePersistentFb);
|
||||
void DisableBlur(float duration);
|
||||
static void DrawWideScreen(const CColor& color, const CTexture* tex, float v);
|
||||
|
||||
private:
|
||||
|
|
|
@ -0,0 +1,25 @@
|
|||
#ifndef _CSCRIPTCAMERABLURKEYFRAME
|
||||
#define _CSCRIPTCAMERABLURKEYFRAME
|
||||
|
||||
#include "MetroidPrime/CEntity.hpp"
|
||||
|
||||
#include "MetroidPrime/Cameras/CCameraBlurPass.hpp"
|
||||
|
||||
class CScriptCameraBlurKeyframe : public CEntity {
|
||||
CCameraBlurPass::EBlurType x34_type;
|
||||
float x38_amount;
|
||||
u32 x3c_;
|
||||
float x40_timeIn;
|
||||
float x44_timeOut;
|
||||
|
||||
public:
|
||||
CScriptCameraBlurKeyframe(TUniqueId uid, const rstl::string& name, const CEntityInfo& info,
|
||||
CCameraBlurPass::EBlurType type, float amount, u32 unk, float timeIn,
|
||||
float timeOut, bool active);
|
||||
~CScriptCameraBlurKeyframe();
|
||||
|
||||
void Accept(IVisitor& visitor) override;
|
||||
void AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId objId, CStateManager& stateMgr) override;
|
||||
};
|
||||
|
||||
#endif // _CSCRIPTCAMERABLURKEYFRAME
|
|
@ -108,7 +108,7 @@ METROIDPRIME :=\
|
|||
$(BUILD_DIR)/asm/MetroidPrime/CMappableObject.o\
|
||||
$(BUILD_DIR)/asm/MetroidPrime/Player/CPlayerCameraBob.o\
|
||||
$(BUILD_DIR)/asm/MetroidPrime/ScriptObjects/CScriptCameraFilterKeyframe.o\
|
||||
$(BUILD_DIR)/asm/MetroidPrime/ScriptObjects/CScriptCameraBlurKeyframe.o\
|
||||
$(BUILD_DIR)/src/MetroidPrime/ScriptObjects/CScriptCameraBlurKeyframe.o\
|
||||
$(BUILD_DIR)/asm/MetroidPrime/Cameras/CCameraFilter.o\
|
||||
$(BUILD_DIR)/asm/MetroidPrime/Player/CMorphBall.o\
|
||||
$(BUILD_DIR)/asm/MetroidPrime/ScriptObjects/CScriptDamageableTrigger.o\
|
||||
|
|
|
@ -0,0 +1,39 @@
|
|||
#include "MetroidPrime/ScriptObjects/CScriptCameraBlurKeyframe.hpp"
|
||||
|
||||
#include "MetroidPrime/CStateManager.hpp"
|
||||
|
||||
CScriptCameraBlurKeyframe::CScriptCameraBlurKeyframe(TUniqueId uid, const rstl::string& name,
|
||||
const CEntityInfo& info,
|
||||
CCameraBlurPass::EBlurType type, float amount,
|
||||
u32 unk, float timeIn, float timeOut,
|
||||
bool active)
|
||||
: CEntity(uid, info, active, name)
|
||||
, x34_type(type)
|
||||
, x38_amount(amount)
|
||||
, x3c_(unk)
|
||||
, x40_timeIn(timeIn)
|
||||
, x44_timeOut(timeOut) {}
|
||||
|
||||
CScriptCameraBlurKeyframe::~CScriptCameraBlurKeyframe() {}
|
||||
|
||||
void CScriptCameraBlurKeyframe::AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId objId,
|
||||
CStateManager& stateMgr) {
|
||||
CEntity::AcceptScriptMsg(msg, objId, stateMgr);
|
||||
|
||||
switch (msg) {
|
||||
case kSM_Increment:
|
||||
if (GetActive()) {
|
||||
stateMgr.CameraBlurPass(3).SetBlur(x34_type, x38_amount, x40_timeIn, false);
|
||||
}
|
||||
break;
|
||||
case kSM_Decrement:
|
||||
if (GetActive()) {
|
||||
stateMgr.CameraBlurPass(3).DisableBlur(x44_timeOut);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void CScriptCameraBlurKeyframe::Accept(IVisitor& visitor) { visitor.Visit(*this); }
|
Loading…
Reference in New Issue