98 lines
2.8 KiB
C++
98 lines
2.8 KiB
C++
#pragma once
|
|
|
|
#include "core/Common.hpp"
|
|
#include "dungeon/Dungeon.hpp"
|
|
#include "dungeon/Player.hpp"
|
|
|
|
namespace dnr {
|
|
|
|
class HubRoom;
|
|
class RestRoom;
|
|
class CombatSystem;
|
|
|
|
class CyberRenderer {
|
|
public:
|
|
CyberRenderer();
|
|
~CyberRenderer();
|
|
|
|
void init();
|
|
void cleanup();
|
|
|
|
void render3D(const Dungeon& dungeon, const Player& player, float animTime);
|
|
void renderCombat3D(const Dungeon& dungeon, const Player& player, const CombatSystem& combat, float animTime);
|
|
void renderHub(const HubRoom& hub, const Player& player, float animTime);
|
|
void renderRestRoom(const RestRoom& restRoom, const Player& player, float animTime);
|
|
|
|
void triggerGlitch(float intensity = 0.7f);
|
|
|
|
void setGraphicsQuality(GraphicsQuality q) { m_graphicsQuality = q; }
|
|
GraphicsQuality getGraphicsQuality() const { return m_graphicsQuality; }
|
|
|
|
private:
|
|
void generateTextures();
|
|
void unloadTextures();
|
|
|
|
void beginPostProcess();
|
|
void endPostProcess(float animTime);
|
|
|
|
void renderCyberDrone(Vector3 pos, Color coreColor, float scale, float animTime, bool isHit = false, bool isAttacking = false, bool isElite = false);
|
|
|
|
Camera3D m_camera{};
|
|
bool m_texturesLoaded = false;
|
|
GraphicsQuality m_graphicsQuality = GraphicsQuality::BALANCED;
|
|
|
|
// Post-Processing Framebuffer & GLSL Shader
|
|
RenderTexture2D m_renderTarget{};
|
|
Shader m_shaderPostProcess{};
|
|
int m_locTime = -1;
|
|
int m_locGlitch = -1;
|
|
int m_locRes = -1;
|
|
int m_locPreset = -1;
|
|
float m_glitchIntensity = 0.0f;
|
|
bool m_postProcessLoaded = false;
|
|
|
|
// Dungeon High-Tech Procedural Textures
|
|
Texture2D m_texDungeonWall{};
|
|
Texture2D m_texDungeonFloor{};
|
|
Texture2D m_texDungeonCeil{};
|
|
Texture2D m_texDungeonDoor{};
|
|
Texture2D m_texDungeonDoorFrame{};
|
|
|
|
// Hub Room Procedural Textures
|
|
Texture2D m_texParquet{};
|
|
Texture2D m_texRug{};
|
|
Texture2D m_texPlasterWall{};
|
|
Texture2D m_texPoster{};
|
|
Texture2D m_texDeskWood{};
|
|
Texture2D m_texMonitorCode{};
|
|
Texture2D m_texMonitorRadar{};
|
|
Texture2D m_texBedQuilt{};
|
|
Texture2D m_texCityNight{};
|
|
Texture2D m_texWindowView{};
|
|
Texture2D m_texCyberGate{};
|
|
|
|
// Custom 3D Models & Dynamic Lighting
|
|
Model m_bedModel{};
|
|
Texture2D m_texBedModel{};
|
|
bool m_bedModelLoaded = false;
|
|
Shader m_shaderModelLighting{};
|
|
bool m_modelLightingLoaded = false;
|
|
int m_locLightAmbient = -1;
|
|
int m_locLightViewPos = -1;
|
|
struct ModelLightLocs {
|
|
int enabled = -1;
|
|
int type = -1;
|
|
int position = -1;
|
|
int target = -1;
|
|
int color = -1;
|
|
} m_modelLights[4];
|
|
void updateHubModelLighting(const Camera3D& camera, float animTime);
|
|
|
|
// Ancient Palace Storeroom Procedural Textures
|
|
Texture2D m_texAncientWall{};
|
|
Texture2D m_texAncientFloor{};
|
|
Texture2D m_texAncientCeil{};
|
|
Texture2D m_texAncientWood{};
|
|
};
|
|
|
|
} // namespace dnr
|