home · contact · privacy
7DRL: Via stacks depth map, add visualization of thing stacks on map.
[plomrogue] / src / client / io.c
index 247a681c9f3a683178ef39693562b4b644824aa4..df90c17f2be29be49451b35c866bcd44387b422c 100644 (file)
@@ -184,9 +184,9 @@ static uint8_t read_worldstate()
     }
     uint32_t linemax = textfile_width(file);
     char * read_buf = try_malloc(linemax + 1, __func__);
+    world.turn = (uint16_t) read_value_from_line(read_buf, linemax, file);
     world.godsmood = (int16_t) read_value_from_line(read_buf, linemax, file); //
     world.godsfavor = (int16_t) read_value_from_line(read_buf, linemax, file); //
-    world.turn = (uint16_t) read_value_from_line(read_buf, linemax, file);
     world.player_lifepoints = (uint16_t) read_value_from_line(read_buf, linemax,
                                                               file);
     world.player_satiation = (int16_t) read_value_from_line(read_buf, linemax,
@@ -197,6 +197,7 @@ static uint8_t read_worldstate()
     world.map.length = (uint16_t) read_value_from_line(read_buf, linemax, file);
     read_map_cells(file, &world.map.cells);
     read_map_cells(file, &world.mem_map);
+    read_map_cells(file, &world.stacks_map);  //
     free(read_buf);
     try_fclose(file, __func__);
     return 1;
@@ -278,6 +279,7 @@ static uint8_t read_queue()
             {
                 nl_append_string("(none known)", &world.things_here);
             }
+            world.things_here_scroll = 0;  //
         }
         else if (things_here_parsing)
         {