; checksum of save game
; this is simply all bytes in the save game added
-save_game_chksm: .adv 1
+save_game1_chksm: .adv 1
-save_game: .adv SAVE_GAME_SIZE
+ ; saving rng seed
+save_game1_seed: .adv 1
+ ; saving all rooms
+save_game1_rooms: .adv ROOM_SIZE_TOTAL * ROOMS_TOTAL
+ ; saving player state
+save_game1_player: .adv player_size
; this is a canary value to detect out of bounds reads in sram
; if this value is not SRAM_MAGIC then the save game is corrupted
-save_game_overflow_canary: .adv 1
+save_game1_overflow_canary: .adv 1
curr_room_exits: .adv 2
; total size of a room including the struct header
- ; tiles, flags, actors and exits
-#define ROOM_SIZE_TOTAL ROOM_TILES_SIZE + ROOM_FLAGS_SIZE + ACTOR_TABLE_SIZE + ROOM_EXIT_TABLE_SIZE
-
-#define SAVE_GAME_SIZE ROOM_SIZE_TOTAL * ROOMS_TOTAL + player_size
+ ; tiles, flags, actors and exits
+ ; rooms are always in the order specified here:
+ ; room_struct, tiles, flags, actor_table, exit_table
+#define ROOM_SIZE_TOTAL room_size + ROOM_TILES_SIZE + ROOM_FLAGS_SIZE + ACTOR_TABLE_SIZE + ROOM_EXIT_TABLE_SIZE
; drawing related flags