From: Lukas Krickl Date: Sat, 2 Aug 2025 04:46:09 +0000 (+0200) Subject: defs: Added actor savegame typedef X-Git-Url: https://git.krickl.dev/?a=commitdiff_plain;h=c70eca363fb788198f7a3cd2f36c2021e537761b;p=gbrg%2F.git defs: Added actor savegame typedef --- diff --git a/src/defs.s b/src/defs.s index 21c8fc2..c22aa1e 100644 --- a/src/defs.s +++ b/src/defs.s @@ -229,6 +229,13 @@ .de act_dialog_opts, 2 .de act_size, 0 + ; actor save game data +.se 0 +.de act_sg_pos_y, 1 +.de act_sg_pos_x, 1 +.de act_sg_flags, 1 +.de act_sg_p0, 1 +.de act_sg_size, 0 #define MAP_BG_TILE_OFFSET 0 #define MAP_BG_FLAGS_OFFSET 1 diff --git a/src/wram.s b/src/wram.s index b0a88b0..93fd1d8 100644 --- a/src/wram.s +++ b/src/wram.s @@ -161,5 +161,11 @@ map_st: .adv st_size map_exit_table: .adv 2 ; ptr to the last map header used map_header: .adv 2 + + ; actor savegame data; + ; store actor data here on map load + ; and re-load on map restore + ; if pos y and pos x are both 0 do not restore +act_sg: .adv act_sg_size * UNITS_MAX * FLOOR_MAP_COUNT state_end: