home · contact · privacy
Some code-internal restructuring following the assumption that game map height /
[plomrogue] / src / client / io.c
index c2a3b4b23b453fd1acdaa7cd079ddb364dca3d10..2b1c165eb0435c78a37737e94f5250d3361820c3 100644 (file)
@@ -18,7 +18,7 @@
                                   * try_fgetc()
                                   */
 #include "control.h" /* try_key() */
-#include "map_window.h" /* map_center() */
+#include "map.h" /* map_center() */
 #include "misc.h" /* reset_windows() */
 #include "windows.h" /* reset_windows_on_winch(), draw_all_wins() */
 #include "world.h" /* world global */
@@ -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);
-    uint16_t y, x;
+    uint8_t y, x;
     for (y = 0; y < world.map.size.y; y++)
     {
         for (x = 0; x < world.map.size.x; x++)
@@ -196,7 +196,7 @@ static uint8_t read_world()
     uint32_t linemax = textfile_sizes(file, NULL);
     char * read_buf = try_malloc(linemax + 1, f_name);
     world.turn = read_value_from_line(read_buf, linemax, file);
-    world.score = read_value_from_line(read_buf, linemax, file);
+    world.player_score = read_value_from_line(read_buf, linemax, file);
     world.player_lifepoints = read_value_from_line(read_buf, linemax, file);
     read_inventory(read_buf, linemax, file);
     world.player_pos.y = read_value_from_line(read_buf, linemax, file);