#pragma once #include #include "raylib.h" #include "game/game.hpp" #include "render/aura.hpp" #include "render/camera_tuning.hpp" #include "render/concrete.hpp" #include "render/debris.hpp" #include "render/dressing.hpp" #include "render/models.hpp" #include "render/shadow_map.hpp" // The hybrid look: brutalist 3D diorama + low-poly Blender actors. // This is the only place that knows how the sim is drawn (ART_DIRECTION.md). // Actor GLBs come from tools/blender/build_enemies.py; if they are missing the // presenter falls back to primitive shapes so the game never shows 2D cards. struct DamageNumber { Vec2 pos{}; float value = 0.0f; float age = 0.0f; }; struct Spark { Vector3 pos{}; Vector3 vel{}; Color color{}; float age = 0.0f; float life = 0.5f; float size = 0.12f; }; struct RoundTrail { Vector3 pos{}; Color color{}; float age = 0.0f; float life = 0.22f; float size = 0.2f; }; // Presentation-only expanding/contracting ground rings: landing telegraphs, // dust puffs and the teal implosion left behind when a WARP field collapses. struct SkillRing { Vec2 pos{}; float radius = 1.0f; float end_radius = 1.0f; float age = 0.0f; float life = 0.5f; float height = 0.14f; float spin = 0.0f; // DrawCircle3D's rotation angle (rings are symmetric) Color color{}; }; // PUSH's GLB rubble: the same shattered-concrete model the CALL heap uses, // flung outward as a one-shot presentation effect (no simulation state). struct PushShard { Vector3 pos{}; Vector3 vel{}; float yaw = 0.0f; float spin = 0.0f; float size = 0.0f; float age = 0.0f; float life = 0.0f; }; // Ambient Hiss riser: a figure caught mid-ascent, presentation-only. Anchors // sit near room walls so the vertical motion never sits on top of the horde; // the GLB rises a few metres, then dissolves into the red haze above the // tactical camera instead of clipping through a roof plane. struct Ascension { Vec2 pos{}; float phase = 0.0f; // offset into the shared rise cycle float cycle = 17.0f; // seconds from one appearance to the next float yaw = 0.0f; float scale = 1.0f; }; class ViewCull; class Presenter { public: void init(float arena_half, const class Floor& floor); void shutdown(); // Draws the 3D scene and world-anchored text. Call inside BeginDrawing() // (main.cpp renders into a texture first so post FX can run over the frame). void draw_scene(Game& game); void draw_shadow_map(const Game& game, bool enabled); void set_hiss_test(bool on) { hiss_test_ = on; } void set_floor_overview(bool on) { floor_overview_ = on; } void set_ascension_test(bool on) { ascension_test_ = on; } // Called by the graphics menu (later phase) after settings change. void apply_graphics_settings(); // Presentation-only reset: revives dressing and clears transient FX on R. void reset(); CameraTuning& camera_tuning() { return tuning_; } float damage_flash() const { return damage_flash_; } int debris_count() const { return debris_.count() + concrete_debris_.count(); } int dressing_count() const { return dressing_.alive_count(); } private: void draw_environment(const Game& game, const ViewCull& cull); void draw_floor_environment(const Game& game, const ViewCull& cull); // Projector-screen pocket: black room, player, red phone tables, glass case. void draw_blackout(Game& game); // Close-range, world-anchored placards replace the old task HUD. void draw_blackout_labels(const Game& game); void draw_initial_scene(const Game& game, const ViewCull& cull); void draw_office_suite(const Game& game, const ViewCull& cull); void spawn_sparks(Vec2 pos, float height, Color color, int count, float speed); void spawn_skill_ring(Vec2 pos, float radius, float end_radius, float life, Color color, float spin = 0.0f, float height = 0.14f); void spawn_push_shards(Vec2 center, float radius); // Skills shake nearby shelves/tables/garbage cans into paper + rock debris // without destroying the props (presentation-only). void shed_surface_debris(Vec2 center, float radius); Camera3D camera_{}; CameraTuning tuning_; Texture2D soft_disc_{}; // projectile glow fallback Texture2D spr_glow_{}; // projectile glow sprite ModelBank models_; ConcreteMaterial concrete_; ShadowMap shadow_map_; bool shadows_active_ = false; CorruptionAura aura_; Dressing dressing_; PaperDebris debris_; ConcreteDebris concrete_debris_; ScorchDecals scorch_; Model static_env_model_{}; bool static_env_ready_ = false; float shake_ = 0.0f; float damage_flash_ = 0.0f; float anim_time_ = 0.0f; float player_yaw_ = 0.0f; float player_walk_ = 0.0f; // smoothed locomotion weight for the agent clips float dash_pose_ = 0.0f; // presentation-only hold for the Dash pose float dash_prev_ = 0.0f; // previous dash timer, for rising-edge detection float fire_pose_ = 0.0f; // brief fire clip hold float muzzle_flash_ = 0.0f; float trail_clock_ = 0.0f; Vector3 muzzle_flash_pos_{}; float muzzle_flash_yaw_ = 0.0f; int muzzle_flash_tier_ = 0; bool player_running_ = false; // hysteresis latch for Idle <-> Run bool hiss_test_ = false; bool ascension_test_ = false; std::vector ascensions_; float ascension_clock_ = 0.0f; bool floor_mode_ = false; bool floor_overview_ = false; bool shadow_pass_ = false; bool tier_wave_pending_ = false; Vec2 last_player_pos_{}; std::vector damage_numbers_; std::vector sparks_; std::vector trails_; std::vector skill_rings_; std::vector push_shards_; };