mirror of
https://github.com/PrimeDecomp/prime.git
synced 2025-12-17 02:57:01 +00:00
@@ -145,6 +145,7 @@ public:
|
||||
static const CViewport& GetViewport() { return mViewport; }
|
||||
static const CTransform4f& GetViewMatrix() { return mViewMatrix; }
|
||||
static const CTransform4f& GetModelMatrix() { return mModelMatrix; }
|
||||
static void SetViewPointMatrix(const CTransform4f&);
|
||||
static void SetBrightness(float b) { mBrightness = b; }
|
||||
|
||||
static float GetSecondsMod900();
|
||||
|
||||
12
include/Kyoto/Graphics/CModel.hpp
Normal file
12
include/Kyoto/Graphics/CModel.hpp
Normal file
@@ -0,0 +1,12 @@
|
||||
#ifndef _CMODEL
|
||||
#define _CMODEL
|
||||
|
||||
class CModelFlags;
|
||||
|
||||
class CModel {
|
||||
public:
|
||||
void Touch(int) const;
|
||||
void Draw(const CModelFlags&) const;
|
||||
};
|
||||
|
||||
#endif // _CMODEL
|
||||
@@ -22,39 +22,39 @@ class CModel;
|
||||
|
||||
class CCubeRenderer : public IRenderer, public IWeaponRenderer {
|
||||
public:
|
||||
virtual ~CCubeRenderer();
|
||||
~CCubeRenderer() override;
|
||||
// TODO types
|
||||
virtual void AddStaticGeometry();
|
||||
virtual void EnablePVS();
|
||||
virtual void DisablePVS();
|
||||
virtual void RemoveStaticGeometry();
|
||||
virtual void DrawUnsortedGeometry();
|
||||
virtual void DrawSortedGeometry();
|
||||
virtual void DrawStaticGeometry();
|
||||
virtual void DrawAreaGeometry();
|
||||
virtual void PostRenderFogs();
|
||||
virtual void SetModelMatrix(const CTransform4f& xf);
|
||||
virtual void AddParticleGen(const CParticleGen& gen);
|
||||
virtual void AddParticleGen2();
|
||||
virtual void AddPlaneObject();
|
||||
virtual void AddDrawable(const void* obj, const CVector3f& pos, const CAABox& bounds, int mode,
|
||||
IRenderer::EDrawableSorting sorting);
|
||||
virtual void SetDrawableCallback();
|
||||
virtual void SetWorldViewpoint();
|
||||
virtual void SetPerspective1();
|
||||
virtual void SetPerspective2();
|
||||
virtual rstl::pair< CVector2f, CVector2f > SetViewportOrtho(bool centered, float znear,
|
||||
float zfar);
|
||||
virtual void SetClippingPlanes();
|
||||
virtual void SetViewport();
|
||||
virtual void SetDepthReadWrite(bool read, bool update);
|
||||
virtual void SetBlendMode_AdditiveAlpha();
|
||||
virtual void SetBlendMode_AlphaBlended();
|
||||
virtual void SetBlendMode_NoColorWrite();
|
||||
virtual void SetBlendMode_ColorMultiply();
|
||||
virtual void SetBlendMode_InvertDst();
|
||||
virtual void SetBlendMode_InvertSrc();
|
||||
virtual void SetBlendMode_AdditiveDestColor();
|
||||
void AddStaticGeometry() override;
|
||||
void EnablePVS() override;
|
||||
void DisablePVS() override;
|
||||
void RemoveStaticGeometry() override;
|
||||
void DrawUnsortedGeometry() override;
|
||||
void DrawSortedGeometry() override;
|
||||
void DrawStaticGeometry() override;
|
||||
void DrawAreaGeometry() override;
|
||||
void PostRenderFogs() override;
|
||||
void SetModelMatrix(const CTransform4f& xf) override;
|
||||
void AddParticleGen(const CParticleGen& gen) override;
|
||||
void AddParticleGen2() override;
|
||||
void AddPlaneObject() override;
|
||||
void AddDrawable(const void* obj, const CVector3f& pos, const CAABox& bounds, int mode,
|
||||
IRenderer::EDrawableSorting sorting) override;
|
||||
void SetDrawableCallback() override;
|
||||
void SetWorldViewpoint() override;
|
||||
void SetPerspective1(float, float, float, float, float) override;
|
||||
void SetPerspective2() override;
|
||||
rstl::pair< CVector2f, CVector2f > SetViewportOrtho(bool centered, float znear,
|
||||
float zfar) override;
|
||||
void SetClippingPlanes() override;
|
||||
void SetViewport() override;
|
||||
void SetDepthReadWrite(bool read, bool update) override;
|
||||
void SetBlendMode_AdditiveAlpha() override;
|
||||
void SetBlendMode_AlphaBlended() override;
|
||||
void SetBlendMode_NoColorWrite() override;
|
||||
void SetBlendMode_ColorMultiply() override;
|
||||
void SetBlendMode_InvertDst() override;
|
||||
void SetBlendMode_InvertSrc() override;
|
||||
void SetBlendMode_AdditiveDestColor() override;
|
||||
virtual void SetDebugOption();
|
||||
virtual void BeginScene();
|
||||
virtual void EndScene();
|
||||
@@ -80,7 +80,7 @@ public:
|
||||
virtual void SetWireframeFlags();
|
||||
virtual void SetWorldFog();
|
||||
virtual void RenderFogVolume(const CColor&, const CAABox&, const TLockedToken< CModel >*,
|
||||
const CSkinnedModel*);
|
||||
const CSkinnedModel*);
|
||||
virtual void SetThermal();
|
||||
virtual void SetThermalColdScale();
|
||||
virtual void DoThermalBlendCold();
|
||||
|
||||
@@ -41,7 +41,7 @@ public:
|
||||
IRenderer::EDrawableSorting sorting);
|
||||
virtual void SetDrawableCallback();
|
||||
virtual void SetWorldViewpoint();
|
||||
virtual void SetPerspective1();
|
||||
virtual void SetPerspective1(float, float, float, float, float);
|
||||
virtual void SetPerspective2();
|
||||
virtual rstl::pair< CVector2f, CVector2f > SetViewportOrtho(bool centered, float znear,
|
||||
float zfar);
|
||||
|
||||
@@ -26,6 +26,9 @@ public:
|
||||
void BuildConstantAmbientLighting(const CColor&);
|
||||
bool BuildAreaLightList(const CStateManager& mgr, const CGameArea& area, const CAABox& bounds);
|
||||
void BuildDynamicLightList(const CStateManager& mgr, const CAABox& bounds);
|
||||
void BuildFakeLightList(const rstl::vector<CLight>&, const CColor&);
|
||||
|
||||
void ActivateLights() const;
|
||||
|
||||
bool GetNeedsRelight() const { return x298_24_dirty == TRUE; }
|
||||
bool HasShadowLight() const { return x29c_shadowLightArrIdx != -1; }
|
||||
|
||||
34
include/MetroidPrime/CGameCubeDoll.hpp
Normal file
34
include/MetroidPrime/CGameCubeDoll.hpp
Normal file
@@ -0,0 +1,34 @@
|
||||
#ifndef _CGAMECUBEDOLL
|
||||
#define _CGAMECUBEDOLL
|
||||
|
||||
#include "Kyoto/TToken.hpp"
|
||||
|
||||
#include "rstl/single_ptr.hpp"
|
||||
#include "rstl/vector.hpp"
|
||||
|
||||
class CActorLights;
|
||||
class CModel;
|
||||
class CLight;
|
||||
|
||||
class CGameCubeDoll {
|
||||
public:
|
||||
CGameCubeDoll();
|
||||
~CGameCubeDoll();
|
||||
|
||||
void Update(float dt);
|
||||
void Draw(float alpha);
|
||||
void Touch();
|
||||
bool CheckLoadComplete();
|
||||
bool IsLoaded() const;
|
||||
|
||||
private:
|
||||
CToken x0_model;
|
||||
rstl::vector< CLight > x8_lights;
|
||||
rstl::single_ptr< CActorLights > x18_actorLights;
|
||||
float x1c_fader;
|
||||
bool x20_24_loaded : 1;
|
||||
|
||||
void UpdateActorLights();
|
||||
};
|
||||
|
||||
#endif // _CGAMECUBEDOLL
|
||||
@@ -47,6 +47,8 @@ public:
|
||||
x0_allocator.allocate(xc_items, x4_count);
|
||||
uninitialized_fill_n(xc_items, count, v);
|
||||
}
|
||||
vector(int count, const T& v, const Alloc& alloc);
|
||||
|
||||
vector(const vector& other) : x4_count(other.x4_count), x8_capacity(other.x8_capacity) {
|
||||
if (other.x4_count == 0 && other.x8_capacity == 0) {
|
||||
xc_items = nullptr;
|
||||
|
||||
Reference in New Issue
Block a user