From 55c5bae030771a336c156e9c26cfdc82ccd256bd Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Sun, 27 Dec 2015 16:46:41 +0100 Subject: [PATCH] Reso i caratteri modificabili. --- main.cpp | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/main.cpp b/main.cpp index 4c8b295..7cd3ea2 100644 --- a/main.cpp +++ b/main.cpp @@ -7,6 +7,9 @@ #define ROOMS 8 #define ROOM_SIZE 7 +#define WALL 0xB2 +#define EMPTY 0xFF + using namespace std; //Aggiorna la console con la situazione corrente del gioco. @@ -29,7 +32,7 @@ void init(char map[X_MAX][Y_MAX]) { for(int x=0; x end_x) { for(int x=end_x; x<=start_x; x++) { - map[x][end_y] = '.'; + map[x][end_y] = EMPTY; } } else { for(int x=start_x; x<=end_x; x++) { - map[x][end_y] = '.'; + map[x][end_y] = EMPTY; } } } @@ -86,28 +89,28 @@ void corridor(char map[X_MAX][Y_MAX], int start_x, int start_y, int end_x, int e { for(int x=end_x; x<=start_x; x++) { - map[x][start_y] = '.'; + map[x][start_y] = EMPTY; } } else { for(int x=start_x; x<=end_x; x++) { - map[x][start_y] = '.'; + map[x][start_y] = EMPTY; } } if(start_y > end_y) { for(int y=end_y; y<=start_y; y++) { - map[end_x][y] = '.'; + map[end_x][y] = EMPTY; } } else { for(int y=start_y; y<=end_y; y++) { - map[end_x][y] = '.'; + map[end_x][y] = EMPTY; } } }