fixes
This commit is contained in:
parent
d5f2a52731
commit
68d85c5eae
3 changed files with 7 additions and 10 deletions
|
@ -1,9 +1,5 @@
|
||||||
#include "Mapgen.h"
|
#include "Mapgen.h"
|
||||||
<<<<<<< HEAD
|
|
||||||
#include "vec2i.h"
|
#include "vec2i.h"
|
||||||
=======
|
|
||||||
#include "vec2i.h"
|
|
||||||
>>>>>>> 9557a88ed46a9e1e9aa3994762f9ec1dd7e051f1
|
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <queue>
|
#include <queue>
|
||||||
#include <random>
|
#include <random>
|
||||||
|
@ -255,7 +251,8 @@ Tilemap generate_dungeon(unsigned int seed, int width, int height, TileSet tiles
|
||||||
// Find the room furthest away from the entrance and make it the exit
|
// Find the room furthest away from the entrance and make it the exit
|
||||||
Pathfinder::DijkstraMap dijk;
|
Pathfinder::DijkstraMap dijk;
|
||||||
const float maxv = width+height;
|
const float maxv = width+height;
|
||||||
Pathfinder::calc_dijkstra_map(map, std::vector<vec2i>{ startpos }, dijk, maxv);
|
std::vector<vec2i> goals = { startpos };
|
||||||
|
Pathfinder::calc_dijkstra_map(map, goals, dijk, maxv);
|
||||||
|
|
||||||
float exitroomval = 0;
|
float exitroomval = 0;
|
||||||
Room* exitroom = &startroom;
|
Room* exitroom = &startroom;
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
#include "Shaman.h"
|
#include "Shaman.h"
|
||||||
#include "Rng.h"
|
#include "Rng.h"
|
||||||
#include "TileSet.h"
|
#include "TileSet.h"
|
||||||
#include <kaguya\kaguya.hpp>
|
#include <kaguya/kaguya.hpp>
|
||||||
|
|
||||||
InputAction player_action;
|
InputAction player_action;
|
||||||
TileSet tileset;
|
TileSet tileset;
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#include "TileSet.h"
|
#include "TileSet.h"
|
||||||
#include <kaguya\kaguya.hpp>
|
#include <kaguya/kaguya.hpp>
|
||||||
#include <SDL2\SDL_log.h>
|
#include <SDL2/SDL_log.h>
|
||||||
|
|
||||||
Tile null = Tile();
|
Tile null = Tile();
|
||||||
|
|
||||||
|
@ -67,7 +67,7 @@ void TileSet::load_from_table(kaguya::LuaStackRef table) {
|
||||||
SDL_LogWarn(SDL_LOG_CATEGORY_APPLICATION, "Tileset: Missing value wall for tile: %s", key.c_str());
|
SDL_LogWarn(SDL_LOG_CATEGORY_APPLICATION, "Tileset: Missing value wall for tile: %s", key.c_str());
|
||||||
}
|
}
|
||||||
SDL_LogDebug(SDL_LOG_CATEGORY_APPLICATION, "Tileset: Added tile: %s", key.c_str());
|
SDL_LogDebug(SDL_LOG_CATEGORY_APPLICATION, "Tileset: Added tile: %s", key.c_str());
|
||||||
tiles.insert_or_assign(key, t);
|
tiles[key] = t;
|
||||||
if (tiles.count(key) == 0) {
|
if (tiles.count(key) == 0) {
|
||||||
SDL_LogDebug(SDL_LOG_CATEGORY_APPLICATION, "Tileset: Could not find the tile we just added?!: %s", key.c_str());
|
SDL_LogDebug(SDL_LOG_CATEGORY_APPLICATION, "Tileset: Could not find the tile we just added?!: %s", key.c_str());
|
||||||
}
|
}
|
||||||
|
@ -75,7 +75,7 @@ void TileSet::load_from_table(kaguya::LuaStackRef table) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void TileSet::add_tile(std::string name, Tile tile) {
|
void TileSet::add_tile(std::string name, Tile tile) {
|
||||||
tiles.insert_or_assign(name, tile);
|
tiles[name] = tile;
|
||||||
}
|
}
|
||||||
|
|
||||||
Tile const& TileSet::get_tile(std::string name) {
|
Tile const& TileSet::get_tile(std::string name) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue