From: Christian Heller Date: Wed, 5 Feb 2014 23:12:57 +0000 (+0100) Subject: Fixed some more pitfalls that hurt working with game maps of maximum size. X-Git-Tag: tce~839 X-Git-Url: https://plomlompom.com/repos/te"st.html?a=commitdiff_plain;h=d666ded12550cfc6fb50dd47e97b664ae82647a1;p=plomrogue Fixed some more pitfalls that hurt working with game maps of maximum size. --- diff --git a/src/client/draw_wins.c b/src/client/draw_wins.c index f10e9cb..7cdb0b5 100644 --- a/src/client/draw_wins.c +++ b/src/client/draw_wins.c @@ -323,7 +323,7 @@ extern void draw_win_map(struct Win * win) { try_resize_winmap(win, world.map.size.y, world.map.size.x); uint16_t z = 0; - uint8_t x, y; + uint16_t x, y; for (y = 0; y < world.map.size.y; y++) { for (x = 0; x < world.map.size.x; x++) diff --git a/src/client/io.c b/src/client/io.c index 43a695a..a4dc7f3 100644 --- a/src/client/io.c +++ b/src/client/io.c @@ -110,7 +110,7 @@ static void read_map_cells(FILE * file) char * f_name = "read_map_cells()"; free(world.map.cells); world.map.cells = try_malloc(world.map.size.y * world.map.size.x, f_name); - uint8_t y, x; + uint16_t y, x; for (y = 0; y < world.map.size.y; y++) { for (x = 0; x < world.map.size.x; x++) diff --git a/src/server/io.c b/src/server/io.c index 2507d3b..1de0bd0 100644 --- a/src/server/io.c +++ b/src/server/io.c @@ -203,7 +203,7 @@ static void write_map(FILE * file) } } } - uint8_t x, y; + uint16_t x, y; for (y = 0; y < world.map.size.y; y++) { for (x = 0; x < world.map.size.x; x++) diff --git a/src/server/map.c b/src/server/map.c index 9b0f294..8bae81a 100644 --- a/src/server/map.c +++ b/src/server/map.c @@ -14,7 +14,7 @@ extern void init_map() char * f_name = "init_map()"; uint32_t size = world.map.size.x * world.map.size.y; world.map.cells = try_malloc(size, f_name); - uint8_t y, x; + uint16_t y, x; for (y = 0; y < world.map.size.y; y++) { for (x = 0;