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:
|
2023-02-06 07:21:28 +00:00
|
|
|
~CCubeRenderer();
|
2022-07-02 05:30:04 +00:00
|
|
|
// TODO types
|
2023-02-06 07:21:28 +00:00
|
|
|
void AddStaticGeometry();
|
|
|
|
void EnablePVS(const CPVSVisSet& set, int areaIdx);
|
|
|
|
void DisablePVS();
|
|
|
|
void RemoveStaticGeometry();
|
|
|
|
void DrawUnsortedGeometry(int areaIdx, int mask, int targetMask);
|
|
|
|
void DrawSortedGeometry(int areaIdx, int mask, int targetMask);
|
|
|
|
void DrawStaticGeometry(int areaIdx, int mask, int targetMask);
|
|
|
|
void DrawAreaGeometry(int areaIdx, int mask, int targetMask);
|
|
|
|
void PostRenderFogs();
|
|
|
|
void SetModelMatrix(const CTransform4f& xf);
|
|
|
|
void AddParticleGen(const CParticleGen& gen);
|
|
|
|
void AddParticleGen2();
|
|
|
|
void AddPlaneObject();
|
2022-11-14 02:18:45 +00:00
|
|
|
void AddDrawable(const void* obj, const CVector3f& pos, const CAABox& bounds, int mode,
|
2023-02-06 07:21:28 +00:00
|
|
|
IRenderer::EDrawableSorting sorting);
|
|
|
|
void SetDrawableCallback(TDrawableCallback cb, void* ctx);
|
|
|
|
void SetWorldViewpoint();
|
|
|
|
void SetPerspective1(float, float, float, float, float);
|
|
|
|
void SetPerspective2();
|
2022-11-14 02:18:45 +00:00
|
|
|
rstl::pair< CVector2f, CVector2f > SetViewportOrtho(bool centered, float znear,
|
2023-02-06 07:21:28 +00:00
|
|
|
float zfar);
|
|
|
|
void SetClippingPlanes(const CFrustumPlanes&);
|
|
|
|
void SetViewport(int left, int right, int width, int height);
|
|
|
|
void SetDepthReadWrite(bool read, bool update);
|
|
|
|
void SetBlendMode_AdditiveAlpha();
|
|
|
|
void SetBlendMode_AlphaBlended();
|
|
|
|
void SetBlendMode_NoColorWrite();
|
|
|
|
void SetBlendMode_ColorMultiply();
|
|
|
|
void SetBlendMode_InvertDst();
|
|
|
|
void SetBlendMode_InvertSrc();
|
|
|
|
void SetBlendMode_Replace();
|
|
|
|
void SetBlendMode_AdditiveDestColor();
|
|
|
|
void SetDebugOption();
|
|
|
|
void BeginScene();
|
|
|
|
void EndScene();
|
|
|
|
void BeginPrimitive(GXPrimitive prim, int count);
|
|
|
|
void BeginLines(int nverts);
|
|
|
|
void BeginLineStrip(int nverts);
|
|
|
|
void BeginTriangles(int nverts);
|
|
|
|
void BeginTriangleStrip(int nverts);
|
|
|
|
void BeginTriangleFan(int nverts);
|
|
|
|
void PrimVertex(const CVector3f& vtx);
|
|
|
|
void PrimNormal(const CVector3f& nrm);
|
|
|
|
void PrimColor(float r, float g, float b, float a);
|
|
|
|
void PrimColor(const CColor& color);
|
|
|
|
void EndPrimitive();
|
|
|
|
void SetAmbientColor(const CColor& color);
|
|
|
|
void DrawString();
|
|
|
|
void GetFPS();
|
|
|
|
void CacheReflection();
|
|
|
|
void DrawSpaceWarp();
|
|
|
|
void DrawThermalModel();
|
|
|
|
void DrawModelDisintegrate();
|
|
|
|
void DrawModelFlat();
|
|
|
|
void SetWireframeFlags();
|
|
|
|
void SetWorldFog();
|
2022-11-25 12:41:28 +00:00
|
|
|
void RenderFogVolume(const CColor&, const CAABox&, const TLockedToken< CModel >*,
|
2023-02-06 07:21:28 +00:00
|
|
|
const CSkinnedModel*);
|
|
|
|
void SetThermal();
|
|
|
|
void SetThermalColdScale();
|
|
|
|
void DoThermalBlendCold();
|
|
|
|
void DoThermalBlendHot();
|
|
|
|
void GetStaticWorldDataSize();
|
|
|
|
void SetGXRegister1Color();
|
|
|
|
void SetWorldLightFadeLevel();
|
|
|
|
void Something();
|
|
|
|
void PrepareDynamicLights(const rstl::vector<CLight>& lights);
|
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
|