Skip to content
Snippets Groups Projects
Commit 5acf992c authored by Ian Prins's avatar Ian Prins
Browse files

kill the uninitialized thing, again

parent 02efae2f
No related branches found
No related tags found
No related merge requests found
...@@ -62,9 +62,9 @@ class Level { ...@@ -62,9 +62,9 @@ class Level {
Mob* mob; Mob* mob;
int delay; int delay;
}; };
const Coord nearby[8] = { Coord(-1,-1), Coord(0,-1), Coord(1,-1), Coord(1,0), Coord(1,1), Coord(0,1), Coord(-1,1), Coord(-1,0) }; const Coord nearby[8] = { Coord(-1,-1), Coord(0,-1), Coord(1,-1), Coord(1,0), Coord(1,1), Coord(0,1), Coord(-1,1), Coord(-1,0) };
const int MAX_ROOMS = 9; #define MAX_ROOMS_DEF (9)
static const int MAX_ROOMS = 9;
const double GOLD_CHANCE = .333; const double GOLD_CHANCE = .333;
const double ROOM_EXIST_CHANCE = 0.9; const double ROOM_EXIST_CHANCE = 0.9;
static const int ROOM_PADDING = 2; static const int ROOM_PADDING = 2;
......
...@@ -157,7 +157,7 @@ void Level::generate(PlayerChar player) { ...@@ -157,7 +157,7 @@ void Level::generate(PlayerChar player) {
} }
//Used to say: If A -> B, then B -> A //Used to say: If A -> B, then B -> A
bool symmetric [MAX_ROOMS][MAX_ROOMS] = {{0}};//Take care of non-existent rooms bool symmetric [MAX_ROOMS_DEF][MAX_ROOMS_DEF] = {};//Take care of non-existent rooms
for (auto i=0; i < MAX_ROOMS; i++){ for (auto i=0; i < MAX_ROOMS; i++){
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment