home · contact · privacy
Some variable / struct member renaming for greater clarity.
[plomrogue] / src / server / io.c
index a516d81b018b121a90c3fb614415b029634c81d1..177c2952faca109802c355b36eb8c22d6a1607ef 100644 (file)
@@ -5,7 +5,7 @@
 #include <fcntl.h> /* open(), O_RDONLY, O_NONBLOCK */
 #include <limits.h> /* PIPE_BUF */
 #include <stddef.h> /* size_t, NULL */
-#include <stdint.h> /* uint8_t, uint16_t, uint32_t */
+#include <stdint.h> /* uint8_t, uint32_t */
 #include <stdio.h> /* define FILE, sprintf() */
 #include <stdlib.h> /* free() */
 #include <string.h> /* strlen(), memset(), memcpy() */
@@ -126,7 +126,6 @@ static void update_out_file()
     FILE * file = try_fopen(path_tmp, "w", f_name);
     struct MapObj * player = get_player();
     write_value_as_line(world.turn, file);
-    write_value_as_line(world.score, file);
     write_value_as_line(player->lifepoints, file);
     write_inventory(player, file);
     write_value_as_line(player->pos.y, file);
@@ -183,7 +182,7 @@ static void write_inventory(struct MapObj * player, FILE * file)
 static void write_map(FILE * file)
 {
     char * f_name = "write_map()";
-    uint16_t map_size = world.map.size.y * world.map.size.x;
+    uint32_t map_size = world.map.size.y * world.map.size.x;
     char visible_map[map_size];
     memcpy(visible_map, world.map.cells, map_size);
     struct MapObj * o;
@@ -203,7 +202,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++)