From 7155596bb245dd3d97657be6140ea4188ea6b478 Mon Sep 17 00:00:00 2001 From: Lukas Krickl Date: Thu, 2 Jan 2025 15:34:40 +0100 Subject: [PATCH] map: WIP actor table saving --- src/map.s | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/src/map.s b/src/map.s index 9b8113b..117259b 100644 --- a/src/map.s +++ b/src/map.s @@ -160,7 +160,25 @@ room_goto_player_pos: ; curr_room_exits: ptr to exits table ; a: direction EAST, WEST, NORTH, SOUTH, EXIT_SPECIAL room_goto: - ; TODO: save current tables back + ; TODO: save current tables back + push af + + ; dst = original actor table + ld hl, curr_room_actor_table + ld a, [hl+] + ld d, a + ld a, [hl+] + ld h, a + ld l, d + + ; src = actor_table + ld de, actor_table + ld bc, ACTOR_TABLE_SIZE + ; TODO fix actor table saving + ; call memcpy + + pop af + ; save a for later push af call disableinterrutpts -- 2.30.2