From: Lukas Krickl Date: Thu, 2 Jan 2025 14:34:40 +0000 (+0100) Subject: map: WIP actor table saving X-Git-Url: https://git.krickl.dev/?a=commitdiff_plain;h=7155596bb245dd3d97657be6140ea4188ea6b478;p=gbrg%2F.git map: WIP actor table saving --- 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