mirror of
https://github.com/PrimeDecomp/prime.git
synced 2025-12-09 21:07:41 +00:00
Add CPlayerGun::PreRender/CPlayerGun::AddToRenderer
Former-commit-id: 6d2ab5775d
This commit is contained in:
@@ -88,6 +88,9 @@ public:
|
||||
virtual void SetWorldLightFadeLevel();
|
||||
virtual void Something();
|
||||
virtual void PrepareDynamicLights();
|
||||
|
||||
|
||||
void AllocatePhazonSuitMaskTexture();
|
||||
};
|
||||
|
||||
extern CCubeRenderer* gpRender;
|
||||
|
||||
@@ -22,10 +22,16 @@ public:
|
||||
~CActorLights();
|
||||
|
||||
void BuildConstantAmbientLighting();
|
||||
void BuildConstantAmbientLighting(const CColor&);
|
||||
bool BuildAreaLightList(const CStateManager& mgr, const CGameArea& area, const CAABox& bounds);
|
||||
void BuildDynamicLightList(const CStateManager& mgr, const CAABox& bounds);
|
||||
|
||||
bool GetNeedsRelight() const { return x298_24_dirty == TRUE; }
|
||||
bool HasShadowLight() const { return x29c_shadowLightArrIdx != -1; }
|
||||
s32 GetShadowLightIndex() const { return x2a0_shadowLightIdx; }
|
||||
|
||||
void SetFindShadowLight(bool v) { x298_27_findShadowLight = v; }
|
||||
void SetShadowDynamicRangeThreshold(float t) { x2d0_shadowDynamicRangeThreshold = t; }
|
||||
|
||||
private:
|
||||
rstl::reserved_vector< CLight, 4 > x0_areaLights;
|
||||
|
||||
@@ -120,6 +120,9 @@ public:
|
||||
TUniqueId GetIdForScript(TEditorId eid) const;
|
||||
TIdListResult GetIdListForScript(TEditorId) const;
|
||||
|
||||
TAreaId GetNextAreaId() const { return x8cc_nextAreaId; }
|
||||
void SetCurrentAreaId(TAreaId);
|
||||
|
||||
CMazeState* CurrentMaze();
|
||||
const CMazeState* GetCurrentMaze() const;
|
||||
void SetCurrentMaze(rstl::single_ptr< CMazeState > maze);
|
||||
|
||||
@@ -24,6 +24,12 @@ class CWorldShadow {
|
||||
public:
|
||||
CWorldShadow(uint w, uint h, bool rgba8);
|
||||
~CWorldShadow();
|
||||
|
||||
void EnableModelProjectedShadow(const CTransform4f& pos, uint lightIdx, float f1);
|
||||
void DisableModelProjectedShadow();
|
||||
void BuildLightShadowTexture(const CStateManager& mgr, TAreaId aid, uint lightIdx, const CAABox& aabb,
|
||||
bool motionBlur, bool lighten);
|
||||
void ResetBlur();
|
||||
};
|
||||
CHECK_SIZEOF(CWorldShadow, 0x8c)
|
||||
|
||||
|
||||
@@ -10,8 +10,19 @@ public:
|
||||
CGrappleArm(const CVector3f& scale);
|
||||
~CGrappleArm();
|
||||
|
||||
void PreRender(CStateManager& mgr, const CFrustumPlanes& frustum, const CVector3f& camPos);
|
||||
|
||||
bool GetActive() const { return x3b2_24_active; }
|
||||
|
||||
private:
|
||||
u8 x0_pad[0x3b4];
|
||||
u8 x0_pad[0x3b0];
|
||||
s16 x3b0_rumbleHandle;
|
||||
bool x3b2_24_active : 1;
|
||||
bool x3b2_25_beamActive : 1;
|
||||
bool x3b2_26_grappleHit : 1;
|
||||
bool x3b2_27_armMoving : 1;
|
||||
bool x3b2_28_isGrappling : 1;
|
||||
bool x3b2_29_suitLoading : 1;
|
||||
};
|
||||
CHECK_SIZEOF(CGrappleArm, 0x3b4)
|
||||
|
||||
|
||||
@@ -95,6 +95,9 @@ public:
|
||||
CPlayerGun(TUniqueId);
|
||||
~CPlayerGun();
|
||||
|
||||
void AddToRenderer(const CFrustumPlanes& frustum, const CStateManager& mgr) const;
|
||||
void PreRender(CStateManager&, const CFrustumPlanes&, const CVector3f&);
|
||||
|
||||
void InitBeamData();
|
||||
void InitBombData();
|
||||
void InitMuzzleData();
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
#include "types.h"
|
||||
|
||||
#include "MetroidPrime/Player/CPlayerState.hpp"
|
||||
#include "MetroidPrime/Weapons/WeaponCommon.hpp"
|
||||
#include "MetroidPrime/Weapons/WeaponTypes.hpp"
|
||||
|
||||
#include "Kyoto/Math/CVector3f.hpp"
|
||||
@@ -59,6 +60,29 @@ public:
|
||||
kFFT_Thawed,
|
||||
};
|
||||
|
||||
// Virtual Methods
|
||||
virtual void Reset(CStateManager& mgr);
|
||||
virtual void PlayAnim(NWeaponTypes::EGunAnimType type, bool loop);
|
||||
virtual void PreRenderGunFx(const CStateManager& mgr, const CTransform4f& xf);
|
||||
virtual void PostRenderGunFx(const CStateManager& mgr, const CTransform4f& xf);
|
||||
virtual void UpdateGunFx(bool shotSmoke, float dt, const CStateManager& mgr, const CTransform4f& xf);
|
||||
virtual void Fire(bool underwater, float dt, EChargeState chargeState, const CTransform4f& xf, CStateManager& mgr,
|
||||
TUniqueId homingTarget, float chargeFactor1, float chargeFactor2);
|
||||
virtual void EnableFx(bool enable);
|
||||
virtual void EnableSecondaryFx(ESecondaryFxType type);
|
||||
virtual void Draw(bool drawSuitArm, const CStateManager& mgr, const CTransform4f& xf, const CModelFlags& flags,
|
||||
const CActorLights* lights);
|
||||
virtual void DrawMuzzleFx(const CStateManager& mgr) const;
|
||||
virtual void Update(float dt, CStateManager& mgr);
|
||||
virtual void Load(CStateManager& mgr, bool subtypeBasePose);
|
||||
virtual void Unload(CStateManager& mgr);
|
||||
virtual bool IsLoaded() const;
|
||||
|
||||
rstl::optional_object< CModelData >& SolidModelData() { return x10_solidModelData; }
|
||||
|
||||
CAABox GetBounds() const;
|
||||
CAABox GetBounds(const CTransform4f& xf) const;
|
||||
|
||||
private:
|
||||
// x0 is vtable
|
||||
CVector3f x4_scale;
|
||||
|
||||
@@ -7,7 +7,7 @@ class CIceBeam : public CGunWeapon {
|
||||
public:
|
||||
CIceBeam(CAssetId characterId, EWeaponType type, TUniqueId playerId,
|
||||
EMaterialTypes playerMaterial, const CVector3f& scale);
|
||||
|
||||
~CIceBeam();
|
||||
private:
|
||||
u8 x21c_pad[0x30];
|
||||
};
|
||||
|
||||
@@ -7,7 +7,7 @@ class CPhazonBeam : public CGunWeapon {
|
||||
public:
|
||||
CPhazonBeam(CAssetId characterId, EWeaponType type, TUniqueId playerId,
|
||||
EMaterialTypes playerMaterial, const CVector3f& scale);
|
||||
|
||||
~CPhazonBeam();
|
||||
private:
|
||||
u8 x21c_pad[0x60];
|
||||
};
|
||||
|
||||
@@ -7,7 +7,7 @@ class CPlasmaBeam : public CGunWeapon {
|
||||
public:
|
||||
CPlasmaBeam(CAssetId characterId, EWeaponType type, TUniqueId playerId,
|
||||
EMaterialTypes playerMaterial, const CVector3f& scale);
|
||||
|
||||
~CPlasmaBeam();
|
||||
private:
|
||||
u8 x21c_pad[0x24];
|
||||
};
|
||||
|
||||
@@ -7,6 +7,7 @@ class CPowerBeam : public CGunWeapon {
|
||||
public:
|
||||
CPowerBeam(CAssetId characterId, EWeaponType type, TUniqueId playerId,
|
||||
EMaterialTypes playerMaterial, const CVector3f& scale);
|
||||
~CPowerBeam();
|
||||
|
||||
private:
|
||||
u8 x21c_pad[0x2C];
|
||||
|
||||
@@ -7,7 +7,7 @@ class CWaveBeam : public CGunWeapon {
|
||||
public:
|
||||
CWaveBeam(CAssetId characterId, EWeaponType type, TUniqueId playerId,
|
||||
EMaterialTypes playerMaterial, const CVector3f& scale);
|
||||
|
||||
~CWaveBeam();
|
||||
private:
|
||||
u8 x21c_pad[0x40];
|
||||
};
|
||||
|
||||
22
include/MetroidPrime/Weapons/WeaponCommon.hpp
Normal file
22
include/MetroidPrime/Weapons/WeaponCommon.hpp
Normal file
@@ -0,0 +1,22 @@
|
||||
#ifndef _WEAPONCOMMON_HPP
|
||||
#define _WEAPONCOMMON_HPP
|
||||
|
||||
namespace NWeaponTypes {
|
||||
|
||||
enum EGunAnimType {
|
||||
kGAT_BasePosition,
|
||||
kGAT_Shoot,
|
||||
kGAT_ChargeUp,
|
||||
kGAT_ChargeLoop,
|
||||
kGAT_ChargeShoot,
|
||||
kGAT_FromMissile,
|
||||
kGAT_ToMissile,
|
||||
kGAT_MissileShoot,
|
||||
kGAT_MissileReload,
|
||||
kGAT_FromBeam,
|
||||
kGAT_ToBeam
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif _WEAPONCOMMON_HPP
|
||||
Reference in New Issue
Block a user