; flag for init of sram
sram_magic: .adv 1
- ; checksum of save game
- ; this is simply all bytes in the save game added
-save_game1_chksm: .adv 1
-
- ; 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_game1_overflow_canary: .adv 1
+save_game1: .adv save_game_size
; 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
+ ; save game struct
+.se 0
+ ; checksum of save game
+ ; this is simply all bytes in the save game added
+.de save_game_chksm, 1
+ ; saving rng seed
+.de save_game_seed, 1
+ ; saving all rooms
+.de save_game_rooms, ROOM_SIZE_TOTAL * ROOMS_TOTAL
+ ; saving player state
+.de save_game_player, 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
+.de save_game_canary, 1
+.de save_game_size, 0
+
; drawing related flags
; UI flags