levelmanager.* is now gone, but the code is just moved over to game_level. Now to clean up the api and give it a new name.
This commit is contained in:
parent
5aca2fb56a
commit
a83ee77eea
17 changed files with 147 additions and 178 deletions
130
game_level.cpp
130
game_level.cpp
|
@ -1,6 +1,129 @@
|
||||||
#include "game_level.hpp"
|
#include "game_level.hpp"
|
||||||
#include "levelmanager.hpp"
|
|
||||||
#include "components.hpp"
|
#include "components.hpp"
|
||||||
|
#include "worldbuilder.hpp"
|
||||||
|
#include "constants.hpp"
|
||||||
|
#include "save.hpp"
|
||||||
|
#include "systems.hpp"
|
||||||
|
#include "components.hpp"
|
||||||
|
#include "rituals.hpp"
|
||||||
|
|
||||||
|
using lighting::LightRender;
|
||||||
|
using std::shared_ptr, std::make_shared;
|
||||||
|
using namespace components;
|
||||||
|
|
||||||
|
struct LevelScaling {
|
||||||
|
int map_width=20;
|
||||||
|
int map_height=20;
|
||||||
|
};
|
||||||
|
|
||||||
|
class LevelManager {
|
||||||
|
public:
|
||||||
|
std::vector<GameLevel> $levels;
|
||||||
|
size_t $current_level = 0;
|
||||||
|
|
||||||
|
LevelManager();
|
||||||
|
|
||||||
|
shared_ptr<gui::BossFightUI> create_bossfight(shared_ptr<DinkyECS::World> prev_world);
|
||||||
|
size_t create_level(shared_ptr<DinkyECS::World> prev_world = nullptr);
|
||||||
|
GameLevel &next();
|
||||||
|
GameLevel &previous();
|
||||||
|
GameLevel ¤t();
|
||||||
|
size_t current_index() { return $current_level; }
|
||||||
|
GameLevel &get(size_t index);
|
||||||
|
LevelScaling scale_level();
|
||||||
|
|
||||||
|
DinkyECS::Entity spawn_enemy(const std::string& named);
|
||||||
|
};
|
||||||
|
|
||||||
|
LevelManager::LevelManager() {
|
||||||
|
create_level();
|
||||||
|
}
|
||||||
|
|
||||||
|
LevelScaling LevelManager::scale_level() {
|
||||||
|
return {
|
||||||
|
INITIAL_MAP_W + int($current_level * 2),
|
||||||
|
INITIAL_MAP_H + int($current_level * 2)
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline shared_ptr<DinkyECS::World> clone_load_world(shared_ptr<DinkyECS::World> prev_world)
|
||||||
|
{
|
||||||
|
auto world = make_shared<DinkyECS::World>();
|
||||||
|
|
||||||
|
if(prev_world != nullptr) {
|
||||||
|
prev_world->clone_into(*world);
|
||||||
|
} else {
|
||||||
|
save::load_configs(*world);
|
||||||
|
}
|
||||||
|
|
||||||
|
return world;
|
||||||
|
}
|
||||||
|
|
||||||
|
shared_ptr<gui::BossFightUI> LevelManager::create_bossfight(shared_ptr<DinkyECS::World> prev_world) {
|
||||||
|
dbc::check(prev_world != nullptr, "Starter world for boss fights can't be null.");
|
||||||
|
auto world = clone_load_world(prev_world);
|
||||||
|
auto& config = prev_world->get_the<GameConfig>();
|
||||||
|
|
||||||
|
// BUG: the jank is too strong here
|
||||||
|
auto boss_names = config.bosses.keys();
|
||||||
|
auto& level_name = boss_names[$current_level % boss_names.size()];
|
||||||
|
auto& boss_data = config.bosses[level_name];
|
||||||
|
|
||||||
|
auto boss_id = world->entity();
|
||||||
|
components::configure_entity(*world, boss_id, boss_data["components"]);
|
||||||
|
|
||||||
|
return make_shared<gui::BossFightUI>(world, boss_id);
|
||||||
|
}
|
||||||
|
|
||||||
|
DinkyECS::Entity LevelManager::spawn_enemy(const std::string& named) {
|
||||||
|
(void)named;
|
||||||
|
dbc::log("THIS FUNCTION NEEDS A REWRITE");
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
size_t LevelManager::create_level(shared_ptr<DinkyECS::World> prev_world) {
|
||||||
|
auto world = clone_load_world(prev_world);
|
||||||
|
|
||||||
|
auto scaling = scale_level();
|
||||||
|
|
||||||
|
auto map = make_shared<Map>(scaling.map_width, scaling.map_height);
|
||||||
|
auto collision = std::make_shared<SpatialMap>();
|
||||||
|
|
||||||
|
WorldBuilder builder(*map, *collision);
|
||||||
|
builder.generate(*world);
|
||||||
|
|
||||||
|
size_t index = $levels.size();
|
||||||
|
|
||||||
|
auto player = world->get_the<Player>();
|
||||||
|
|
||||||
|
$levels.emplace_back(index, player.entity, map, world,
|
||||||
|
make_shared<LightRender>(map->tiles()), collision);
|
||||||
|
|
||||||
|
dbc::check(index == $levels.size() - 1, "Level index is not the same as $levels.size() - 1, off by one error");
|
||||||
|
return index;
|
||||||
|
}
|
||||||
|
|
||||||
|
GameLevel &LevelManager::next() {
|
||||||
|
dbc::check($current_level < $levels.size(), "attempt to get next level when at end");
|
||||||
|
$current_level++;
|
||||||
|
return $levels.at($current_level);
|
||||||
|
}
|
||||||
|
|
||||||
|
GameLevel &LevelManager::previous() {
|
||||||
|
dbc::check($current_level > 0, "attempt to go to previous level when at 0");
|
||||||
|
$current_level--;
|
||||||
|
return $levels.at($current_level);
|
||||||
|
}
|
||||||
|
|
||||||
|
GameLevel &LevelManager::current() {
|
||||||
|
return $levels.at($current_level);
|
||||||
|
}
|
||||||
|
|
||||||
|
GameLevel &LevelManager::get(size_t index) {
|
||||||
|
return $levels.at(index);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
namespace Game {
|
namespace Game {
|
||||||
using std::shared_ptr, std::string, std::make_shared;
|
using std::shared_ptr, std::string, std::make_shared;
|
||||||
|
@ -15,11 +138,6 @@ namespace Game {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
LevelManager& get_the_manager() {
|
|
||||||
dbc::check(initialized, "Forgot to call Game::init()");
|
|
||||||
return *LEVELS;
|
|
||||||
}
|
|
||||||
|
|
||||||
shared_ptr<DinkyECS::World> current_world() {
|
shared_ptr<DinkyECS::World> current_world() {
|
||||||
dbc::check(initialized, "Forgot to call Game::init()");
|
dbc::check(initialized, "Forgot to call Game::init()");
|
||||||
return current().world;
|
return current().world;
|
||||||
|
|
|
@ -2,19 +2,31 @@
|
||||||
|
|
||||||
#include "dinkyecs.hpp"
|
#include "dinkyecs.hpp"
|
||||||
#include "gui/boss_fight_ui.hpp"
|
#include "gui/boss_fight_ui.hpp"
|
||||||
|
#include "dinkyecs.hpp"
|
||||||
|
#include "lights.hpp"
|
||||||
|
#include "map.hpp"
|
||||||
|
#include <memory>
|
||||||
|
#include "spatialmap.hpp"
|
||||||
|
|
||||||
struct GameLevel;
|
|
||||||
struct LevelManager;
|
|
||||||
namespace components {
|
namespace components {
|
||||||
struct Position;
|
struct Position;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
struct GameLevel {
|
||||||
|
size_t index;
|
||||||
|
DinkyECS::Entity player;
|
||||||
|
std::shared_ptr<Map> map = nullptr;
|
||||||
|
std::shared_ptr<DinkyECS::World> world = nullptr;
|
||||||
|
std::shared_ptr<lighting::LightRender> lights = nullptr;
|
||||||
|
std::shared_ptr<SpatialMap> collision = nullptr;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
namespace Game {
|
namespace Game {
|
||||||
std::shared_ptr<gui::BossFightUI> create_bossfight();
|
std::shared_ptr<gui::BossFightUI> create_bossfight();
|
||||||
GameLevel& create_level();
|
GameLevel& create_level();
|
||||||
|
|
||||||
void init();
|
void init();
|
||||||
LevelManager& get_the_manager();
|
|
||||||
GameLevel &next();
|
GameLevel &next();
|
||||||
GameLevel &previous();
|
GameLevel &previous();
|
||||||
GameLevel ¤t();
|
GameLevel ¤t();
|
||||||
|
|
|
@ -9,11 +9,6 @@
|
||||||
namespace gui {
|
namespace gui {
|
||||||
using namespace guecs;
|
using namespace guecs;
|
||||||
|
|
||||||
DebugUI::DebugUI(LevelManager& level_mgr) :
|
|
||||||
$level_mgr(level_mgr)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
void DebugUI::init(lel::Cell cell) {
|
void DebugUI::init(lel::Cell cell) {
|
||||||
$gui.position(cell.x, cell.y, cell.w, cell.h);
|
$gui.position(cell.x, cell.y, cell.w, cell.h);
|
||||||
$gui.layout(
|
$gui.layout(
|
||||||
|
@ -51,7 +46,7 @@ namespace gui {
|
||||||
|
|
||||||
void DebugUI::render(sf::RenderWindow& window) {
|
void DebugUI::render(sf::RenderWindow& window) {
|
||||||
if(active) {
|
if(active) {
|
||||||
auto& level = $level_mgr.current();
|
auto& level = Game::current();
|
||||||
auto player = level.world->get_the<components::Player>();
|
auto player = level.world->get_the<components::Player>();
|
||||||
auto player_combat = level.world->get<components::Combat>(player.entity);
|
auto player_combat = level.world->get<components::Combat>(player.entity);
|
||||||
auto map = level.map;
|
auto map = level.map;
|
||||||
|
@ -81,7 +76,7 @@ namespace gui {
|
||||||
active = !active;
|
active = !active;
|
||||||
|
|
||||||
if(active) {
|
if(active) {
|
||||||
auto& level = $level_mgr.current();
|
auto& level = Game::current();
|
||||||
// it's on now, enable things
|
// it's on now, enable things
|
||||||
auto player = level.world->get_the<components::Player>();
|
auto player = level.world->get_the<components::Player>();
|
||||||
auto& player_combat = level.world->get<components::Combat>(player.entity);
|
auto& player_combat = level.world->get<components::Combat>(player.entity);
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
#include "levelmanager.hpp"
|
#include "game_level.hpp"
|
||||||
#include <SFML/Graphics/RenderWindow.hpp>
|
#include <SFML/Graphics/RenderWindow.hpp>
|
||||||
#include <SFML/Graphics/Font.hpp>
|
#include <SFML/Graphics/Font.hpp>
|
||||||
#include <guecs/ui.hpp>
|
#include <guecs/ui.hpp>
|
||||||
|
@ -10,11 +10,8 @@ namespace gui {
|
||||||
public:
|
public:
|
||||||
Stats $stats;
|
Stats $stats;
|
||||||
guecs::UI $gui;
|
guecs::UI $gui;
|
||||||
LevelManager& $level_mgr;
|
|
||||||
bool active = false;
|
bool active = false;
|
||||||
|
|
||||||
DebugUI(LevelManager& level_mgr);
|
|
||||||
|
|
||||||
void init(lel::Cell cell);
|
void init(lel::Cell cell);
|
||||||
void render(sf::RenderWindow& window);
|
void render(sf::RenderWindow& window);
|
||||||
bool mouse(float x, float y, guecs::Modifiers mods);
|
bool mouse(float x, float y, guecs::Modifiers mods);
|
||||||
|
|
|
@ -19,7 +19,6 @@ namespace gui {
|
||||||
|
|
||||||
FSM::FSM() :
|
FSM::FSM() :
|
||||||
$window(sf::VideoMode({SCREEN_WIDTH, SCREEN_HEIGHT}), "Zed's Raycaster Thing"),
|
$window(sf::VideoMode({SCREEN_WIDTH, SCREEN_HEIGHT}), "Zed's Raycaster Thing"),
|
||||||
$debug_ui(Game::get_the_manager()),
|
|
||||||
$main_ui($window),
|
$main_ui($window),
|
||||||
$font{FONT_FILE_NAME},
|
$font{FONT_FILE_NAME},
|
||||||
$dnd_loot($status_ui, $loot_ui, $window, $router)
|
$dnd_loot($status_ui, $loot_ui, $window, $router)
|
||||||
|
|
|
@ -36,7 +36,7 @@ namespace gui {
|
||||||
int $temp_attack_id = 0;
|
int $temp_attack_id = 0;
|
||||||
DebugUI $debug_ui;
|
DebugUI $debug_ui;
|
||||||
MainUI $main_ui;
|
MainUI $main_ui;
|
||||||
shared_ptr<BossFightUI> $boss_fight_ui = nullptr;
|
std::shared_ptr<BossFightUI> $boss_fight_ui = nullptr;
|
||||||
CombatUI $combat_ui;
|
CombatUI $combat_ui;
|
||||||
StatusUI $status_ui;
|
StatusUI $status_ui;
|
||||||
MapViewUI $map_ui;
|
MapViewUI $map_ui;
|
||||||
|
|
|
@ -7,7 +7,6 @@
|
||||||
#include "systems.hpp"
|
#include "systems.hpp"
|
||||||
#include "inventory.hpp"
|
#include "inventory.hpp"
|
||||||
#include "game_level.hpp"
|
#include "game_level.hpp"
|
||||||
#include "levelmanager.hpp"
|
|
||||||
|
|
||||||
namespace gui {
|
namespace gui {
|
||||||
using namespace guecs;
|
using namespace guecs;
|
||||||
|
|
100
levelmanager.cpp
100
levelmanager.cpp
|
@ -1,100 +0,0 @@
|
||||||
#include "levelmanager.hpp"
|
|
||||||
#include "worldbuilder.hpp"
|
|
||||||
#include "constants.hpp"
|
|
||||||
#include "save.hpp"
|
|
||||||
#include "systems.hpp"
|
|
||||||
#include "components.hpp"
|
|
||||||
#include "rituals.hpp"
|
|
||||||
|
|
||||||
using lighting::LightRender;
|
|
||||||
using std::shared_ptr, std::make_shared;
|
|
||||||
using namespace components;
|
|
||||||
|
|
||||||
LevelManager::LevelManager() {
|
|
||||||
create_level();
|
|
||||||
}
|
|
||||||
|
|
||||||
LevelScaling LevelManager::scale_level() {
|
|
||||||
return {
|
|
||||||
INITIAL_MAP_W + int($current_level * 2),
|
|
||||||
INITIAL_MAP_H + int($current_level * 2)
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
inline shared_ptr<DinkyECS::World> clone_load_world(shared_ptr<DinkyECS::World> prev_world)
|
|
||||||
{
|
|
||||||
auto world = make_shared<DinkyECS::World>();
|
|
||||||
|
|
||||||
if(prev_world != nullptr) {
|
|
||||||
prev_world->clone_into(*world);
|
|
||||||
} else {
|
|
||||||
save::load_configs(*world);
|
|
||||||
}
|
|
||||||
|
|
||||||
return world;
|
|
||||||
}
|
|
||||||
|
|
||||||
shared_ptr<gui::BossFightUI> LevelManager::create_bossfight(shared_ptr<DinkyECS::World> prev_world) {
|
|
||||||
dbc::check(prev_world != nullptr, "Starter world for boss fights can't be null.");
|
|
||||||
auto world = clone_load_world(prev_world);
|
|
||||||
auto& config = prev_world->get_the<GameConfig>();
|
|
||||||
|
|
||||||
// BUG: the jank is too strong here
|
|
||||||
auto boss_names = config.bosses.keys();
|
|
||||||
auto& level_name = boss_names[$current_level % boss_names.size()];
|
|
||||||
auto& boss_data = config.bosses[level_name];
|
|
||||||
|
|
||||||
auto boss_id = world->entity();
|
|
||||||
components::configure_entity(*world, boss_id, boss_data["components"]);
|
|
||||||
|
|
||||||
return make_shared<gui::BossFightUI>(world, boss_id);
|
|
||||||
}
|
|
||||||
|
|
||||||
DinkyECS::Entity LevelManager::spawn_enemy(const std::string& named) {
|
|
||||||
(void)named;
|
|
||||||
dbc::log("THIS FUNCTION NEEDS A REWRITE");
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
size_t LevelManager::create_level(shared_ptr<DinkyECS::World> prev_world) {
|
|
||||||
auto world = clone_load_world(prev_world);
|
|
||||||
|
|
||||||
auto scaling = scale_level();
|
|
||||||
|
|
||||||
auto map = make_shared<Map>(scaling.map_width, scaling.map_height);
|
|
||||||
auto collision = std::make_shared<SpatialMap>();
|
|
||||||
|
|
||||||
WorldBuilder builder(*map, *collision);
|
|
||||||
builder.generate(*world);
|
|
||||||
|
|
||||||
size_t index = $levels.size();
|
|
||||||
|
|
||||||
auto player = world->get_the<Player>();
|
|
||||||
|
|
||||||
$levels.emplace_back(index, player.entity, map, world,
|
|
||||||
make_shared<LightRender>(map->tiles()), collision);
|
|
||||||
|
|
||||||
dbc::check(index == $levels.size() - 1, "Level index is not the same as $levels.size() - 1, off by one error");
|
|
||||||
return index;
|
|
||||||
}
|
|
||||||
|
|
||||||
GameLevel &LevelManager::next() {
|
|
||||||
dbc::check($current_level < $levels.size(), "attempt to get next level when at end");
|
|
||||||
$current_level++;
|
|
||||||
return $levels.at($current_level);
|
|
||||||
}
|
|
||||||
|
|
||||||
GameLevel &LevelManager::previous() {
|
|
||||||
dbc::check($current_level > 0, "attempt to go to previous level when at 0");
|
|
||||||
$current_level--;
|
|
||||||
return $levels.at($current_level);
|
|
||||||
}
|
|
||||||
|
|
||||||
GameLevel &LevelManager::current() {
|
|
||||||
return $levels.at($current_level);
|
|
||||||
}
|
|
||||||
|
|
||||||
GameLevel &LevelManager::get(size_t index) {
|
|
||||||
return $levels.at(index);
|
|
||||||
}
|
|
|
@ -1,45 +0,0 @@
|
||||||
#pragma once
|
|
||||||
|
|
||||||
#include "dinkyecs.hpp"
|
|
||||||
#include "lights.hpp"
|
|
||||||
#include "map.hpp"
|
|
||||||
#include <vector>
|
|
||||||
#include <memory>
|
|
||||||
#include "spatialmap.hpp"
|
|
||||||
#include "components.hpp"
|
|
||||||
#include "gui/boss_fight_ui.hpp"
|
|
||||||
|
|
||||||
using std::shared_ptr;
|
|
||||||
|
|
||||||
struct GameLevel {
|
|
||||||
size_t index;
|
|
||||||
DinkyECS::Entity player;
|
|
||||||
shared_ptr<Map> map = nullptr;
|
|
||||||
shared_ptr<DinkyECS::World> world = nullptr;
|
|
||||||
shared_ptr<lighting::LightRender> lights = nullptr;
|
|
||||||
shared_ptr<SpatialMap> collision = nullptr;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct LevelScaling {
|
|
||||||
int map_width=20;
|
|
||||||
int map_height=20;
|
|
||||||
};
|
|
||||||
|
|
||||||
class LevelManager {
|
|
||||||
public:
|
|
||||||
std::vector<GameLevel> $levels;
|
|
||||||
size_t $current_level = 0;
|
|
||||||
|
|
||||||
LevelManager();
|
|
||||||
|
|
||||||
shared_ptr<gui::BossFightUI> create_bossfight(shared_ptr<DinkyECS::World> prev_world);
|
|
||||||
size_t create_level(shared_ptr<DinkyECS::World> prev_world = nullptr);
|
|
||||||
GameLevel &next();
|
|
||||||
GameLevel &previous();
|
|
||||||
GameLevel ¤t();
|
|
||||||
size_t current_index() { return $current_level; }
|
|
||||||
GameLevel &get(size_t index);
|
|
||||||
LevelScaling scale_level();
|
|
||||||
|
|
||||||
DinkyECS::Entity spawn_enemy(const std::string& named);
|
|
||||||
};
|
|
|
@ -107,7 +107,6 @@ sources = [
|
||||||
'gui/ritual_ui.cpp',
|
'gui/ritual_ui.cpp',
|
||||||
'gui/status_ui.cpp',
|
'gui/status_ui.cpp',
|
||||||
'inventory.cpp',
|
'inventory.cpp',
|
||||||
'levelmanager.cpp',
|
|
||||||
'lights.cpp',
|
'lights.cpp',
|
||||||
'map.cpp',
|
'map.cpp',
|
||||||
'matrix.cpp',
|
'matrix.cpp',
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
#include "shaders.hpp"
|
#include "shaders.hpp"
|
||||||
|
|
||||||
using namespace fmt;
|
using namespace fmt;
|
||||||
using std::make_unique;
|
using std::make_unique, std::shared_ptr;
|
||||||
|
|
||||||
union ColorConv {
|
union ColorConv {
|
||||||
struct {
|
struct {
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
#include <SFML/Graphics.hpp>
|
#include <SFML/Graphics.hpp>
|
||||||
#include <SFML/System/Clock.hpp>
|
#include <SFML/System/Clock.hpp>
|
||||||
#include "spatialmap.hpp"
|
#include "spatialmap.hpp"
|
||||||
#include "levelmanager.hpp"
|
#include "game_level.hpp"
|
||||||
#include "textures.hpp"
|
#include "textures.hpp"
|
||||||
#include "camera.hpp"
|
#include "camera.hpp"
|
||||||
|
|
||||||
|
@ -62,7 +62,7 @@ struct Raycaster {
|
||||||
void update_level(GameLevel level);
|
void update_level(GameLevel level);
|
||||||
void update_sprite(DinkyECS::Entity ent, components::Sprite& sprite);
|
void update_sprite(DinkyECS::Entity ent, components::Sprite& sprite);
|
||||||
void init_shaders();
|
void init_shaders();
|
||||||
void apply_sprite_effect(shared_ptr<sf::Shader> effect, float width, float height);
|
void apply_sprite_effect(std::shared_ptr<sf::Shader> effect, float width, float height);
|
||||||
|
|
||||||
// camera things?
|
// camera things?
|
||||||
void position_camera(float player_x, float player_y);
|
void position_camera(float player_x, float player_y);
|
||||||
|
|
|
@ -17,7 +17,6 @@
|
||||||
#include "shaders.hpp"
|
#include "shaders.hpp"
|
||||||
#include "inventory.hpp"
|
#include "inventory.hpp"
|
||||||
#include "game_level.hpp"
|
#include "game_level.hpp"
|
||||||
#include "levelmanager.hpp"
|
|
||||||
|
|
||||||
using std::string;
|
using std::string;
|
||||||
using namespace fmt;
|
using namespace fmt;
|
||||||
|
|
|
@ -3,7 +3,6 @@
|
||||||
#include <nlohmann/json.hpp>
|
#include <nlohmann/json.hpp>
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include "map.hpp"
|
#include "map.hpp"
|
||||||
#include "levelmanager.hpp"
|
|
||||||
#include "game_level.hpp"
|
#include "game_level.hpp"
|
||||||
#include "lights.hpp"
|
#include "lights.hpp"
|
||||||
#include "point.hpp"
|
#include "point.hpp"
|
||||||
|
|
|
@ -3,7 +3,6 @@
|
||||||
#include <nlohmann/json.hpp>
|
#include <nlohmann/json.hpp>
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include "map.hpp"
|
#include "map.hpp"
|
||||||
#include "levelmanager.hpp"
|
|
||||||
#include "game_level.hpp"
|
#include "game_level.hpp"
|
||||||
#include "systems.hpp."
|
#include "systems.hpp."
|
||||||
|
|
||||||
|
|
|
@ -9,11 +9,10 @@
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include "map.hpp"
|
#include "map.hpp"
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include "levelmanager.hpp"
|
|
||||||
|
|
||||||
using namespace nlohmann;
|
using namespace nlohmann;
|
||||||
using namespace fmt;
|
using namespace fmt;
|
||||||
using std::string;
|
using std::string, std::shared_ptr;
|
||||||
using matrix::Matrix;
|
using matrix::Matrix;
|
||||||
|
|
||||||
std::shared_ptr<Map> make_map() {
|
std::shared_ptr<Map> make_map() {
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
#include "constants.hpp"
|
#include "constants.hpp"
|
||||||
#include "stats.hpp"
|
#include "stats.hpp"
|
||||||
#include "levelmanager.hpp"
|
|
||||||
#include "fsm.hpp"
|
#include "fsm.hpp"
|
||||||
#include "main_ui.hpp"
|
#include "main_ui.hpp"
|
||||||
#include "combat_ui.hpp"
|
#include "combat_ui.hpp"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue