Exploring raycasters and possibly make a little "doom like" game based on it.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
raycaster/worldbuilder.hpp

26 lines
756 B

#pragma once
#include "map.hpp"
#include "dinkyecs.hpp"
#include "components.hpp"
class WorldBuilder {
public:
Map& $map;
components::ComponentMap& $components;
WorldBuilder(Map &map, components::ComponentMap& components) :
$map(map),
$components(components)
{ }
void add_door(Room &room);
void generate_map();
DinkyECS::Entity configure_entity_in_map(DinkyECS::World &world, nlohmann::json &entity_data, int in_room);
void place_entities(DinkyECS::World &world);
void generate(DinkyECS::World &world);
void randomize_entities(DinkyECS::World &world, components::GameConfig &config);
void place_stairs(DinkyECS::World& world, components::GameConfig& config);
void configure_starting_items(DinkyECS::World &world);
};