2022-10-09 05:13:17 +00:00
|
|
|
#ifndef _CCUBERENDERER
|
|
|
|
#define _CCUBERENDERER
|
2022-04-10 00:17:06 +00:00
|
|
|
|
|
|
|
#include "types.h"
|
|
|
|
|
2022-08-30 22:48:44 +00:00
|
|
|
#include <dolphin/gx/GXEnum.h>
|
|
|
|
|
2022-10-08 17:39:03 +00:00
|
|
|
#include "MetaRender/IRenderer.hpp"
|
|
|
|
#include "Weapons/IWeaponRenderer.hpp"
|
2022-09-13 04:26:54 +00:00
|
|
|
|
2022-08-13 01:26:00 +00:00
|
|
|
#include "Kyoto/Graphics/CColor.hpp"
|
2022-09-13 04:26:54 +00:00
|
|
|
#include "Kyoto/Math/CAABox.hpp"
|
2022-07-02 05:30:04 +00:00
|
|
|
#include "Kyoto/Math/CTransform4f.hpp"
|
|
|
|
#include "Kyoto/Math/CVector2f.hpp"
|
2022-10-04 00:00:46 +00:00
|
|
|
#include "Kyoto/Math/CVector3f.hpp"
|
|
|
|
#include "Kyoto/TToken.hpp"
|
|
|
|
|
2022-07-02 05:30:04 +00:00
|
|
|
#include "rstl/pair.hpp"
|
|
|
|
|
2022-10-04 00:00:46 +00:00
|
|
|
class CSkinnedModel;
|
2022-10-05 23:34:32 +00:00
|
|
|
class CModel;
|
2022-10-04 00:00:46 +00:00
|
|
|
|
2022-10-08 17:39:03 +00:00
|
|
|
class CCubeRenderer : public IRenderer, public IWeaponRenderer {
|
2022-04-10 00:17:06 +00:00
|
|
|
public:
|
2022-11-14 02:18:45 +00:00
|
|
|
~CCubeRenderer() override;
|
2022-07-02 05:30:04 +00:00
|
|
|
// TODO types
|
2022-11-14 02:18:45 +00:00
|
|
|
void AddStaticGeometry() override;
|
2022-12-01 16:11:09 +00:00
|
|
|
void EnablePVS(const CPVSVisSet& set, int areaIdx) override;
|
2022-11-14 02:18:45 +00:00
|
|
|
void DisablePVS() override;
|
|
|
|
void RemoveStaticGeometry() override;
|
2022-12-01 16:11:09 +00:00
|
|
|
void DrawUnsortedGeometry(int areaIdx, int mask, int targetMask) override;
|
|
|
|
void DrawSortedGeometry(int areaIdx, int mask, int targetMask) override;
|
|
|
|
void DrawStaticGeometry(int areaIdx, int mask, int targetMask) override;
|
|
|
|
void DrawAreaGeometry(int areaIdx, int mask, int targetMask) override;
|
2022-11-14 02:18:45 +00:00
|
|
|
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;
|
2022-11-15 01:08:30 +00:00
|
|
|
void SetDrawableCallback(TDrawableCallback cb, void* ctx) override;
|
2022-11-14 02:18:45 +00:00
|
|
|
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;
|
2022-12-01 16:11:09 +00:00
|
|
|
void SetClippingPlanes(const CFrustumPlanes&) override;
|
|
|
|
void SetViewport(int left, int right, int width, int height) override;
|
2022-11-14 02:18:45 +00:00
|
|
|
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;
|
2022-11-25 12:41:28 +00:00
|
|
|
void SetBlendMode_Replace() override;
|
2022-11-14 02:18:45 +00:00
|
|
|
void SetBlendMode_AdditiveDestColor() override;
|
2022-11-25 12:41:28 +00:00
|
|
|
void SetDebugOption() override;
|
|
|
|
void BeginScene() override;
|
|
|
|
void EndScene() override;
|
|
|
|
void BeginPrimitive(GXPrimitive prim, int count) override;
|
|
|
|
void BeginLines(int nverts) override;
|
|
|
|
void BeginLineStrip(int nverts) override;
|
|
|
|
void BeginTriangles(int nverts) override;
|
|
|
|
void BeginTriangleStrip(int nverts) override;
|
|
|
|
void BeginTriangleFan(int nverts) override;
|
|
|
|
void PrimVertex(const CVector3f& vtx) override;
|
|
|
|
void PrimNormal(const CVector3f& nrm) override;
|
|
|
|
void PrimColor(float r, float g, float b, float a) override;
|
|
|
|
void PrimColor(const CColor& color) override;
|
|
|
|
void EndPrimitive() override;
|
|
|
|
void SetAmbientColor(const CColor& color) override;
|
|
|
|
void DrawString() override;
|
|
|
|
void GetFPS() override;
|
|
|
|
void CacheReflection() override;
|
|
|
|
void DrawSpaceWarp() override;
|
|
|
|
void DrawThermalModel() override;
|
|
|
|
void DrawModelDisintegrate() override;
|
|
|
|
void DrawModelFlat() override;
|
|
|
|
void SetWireframeFlags() override;
|
|
|
|
void SetWorldFog() override;
|
|
|
|
void RenderFogVolume(const CColor&, const CAABox&, const TLockedToken< CModel >*,
|
|
|
|
const CSkinnedModel*) override;
|
|
|
|
void SetThermal() override;
|
|
|
|
void SetThermalColdScale() override;
|
|
|
|
void DoThermalBlendCold() override;
|
|
|
|
void DoThermalBlendHot() override;
|
|
|
|
void GetStaticWorldDataSize() override;
|
|
|
|
void SetGXRegister1Color() override;
|
|
|
|
void SetWorldLightFadeLevel() override;
|
|
|
|
void Something() override;
|
2022-12-01 16:11:09 +00:00
|
|
|
void PrepareDynamicLights(const rstl::vector<CLight>& lights) override;
|
2022-10-06 11:37:57 +00:00
|
|
|
|
|
|
|
void AllocatePhazonSuitMaskTexture();
|
2022-11-24 00:41:55 +00:00
|
|
|
|
|
|
|
uchar x8_pad[0x310];
|
|
|
|
bool x318_24_ : 1;
|
|
|
|
bool x318_25_ : 1;
|
|
|
|
bool x318_26_ : 1;
|
2022-04-10 00:17:06 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
extern CCubeRenderer* gpRender;
|
|
|
|
|
2022-10-09 05:13:17 +00:00
|
|
|
#endif // _CCUBERENDERER
|