#pragma once #include #include #include #include "core/events.hpp" #include "core/rng.hpp" #include "game/buffs.hpp" #include "game/corruption.hpp" #include "game/director.hpp" #include "game/enemies.hpp" #include "game/floor.hpp" #include "game/input.hpp" #include "game/pickups.hpp" #include "game/player.hpp" #include "game/ritual.hpp" #include "game/weapons.hpp" enum class GameState { Title, Playing, GameOver }; enum class OfferType { WeaponLevel, NewWeapon, Directive, Passive }; struct Offer { OfferType type = OfferType::WeaponLevel; int id = 0; const char* name = ""; const char* description = ""; }; struct GameConfig { float arena_half = 130.0f; // 260 m square Oldest House floor int max_enemies = 260; int max_weapons = 4; bool no_player_damage = false; // dev stress mode (--no-damage) }; // The whole simulation. Fixed 60 Hz ticks (see main.cpp). No raylib here: // main fills InputState, the presenter reads the world and drains `events`. class Game { public: explicit Game(std::uint64_t seed, const std::string& level_path = Floor::kDefaultPath); void update(const InputState& in, float dt); void reset(); // World state (read by the presenter/UI). GameState state = GameState::Playing; Player player; EnemySystem enemy_system; WeaponSystem weapon_system; PickupSystem pickup_system; BuffSystem buff_system; Corruption corruption; Director director; RitualSystem ritual_system; Floor floor; EventQueue events; Rng rng; GameConfig config; float run_time = 0.0f; bool has_key = false; int floor_number = 1; int floor_clears = 0; int clearance = 1; // diegetic stamp; gates the three side-room doors float floor_banner = 0.0f; float side_banner = 0.0f; const char* side_banner_text = ""; int kills = 0; int level = 1; float xp = 0.0f; float xp_to_next = 10.0f; std::vector pending_offers; float offer_timer = 0.0f; float idle_time = 0.0f; private: void death_pass(); void floor_pass(); void side_room_pass(); void grant_ritual_skill(); std::uint64_t seed_ = 0; int last_tier_ = 0; bool side_reward_claimed_[Floor::kSideRoomCount] = {}; };