From: Lukas Krickl Date: Fri, 25 Oct 2024 04:17:16 +0000 (+0200) Subject: Fixed actor table loader X-Git-Url: https://git.krickl.dev/?a=commitdiff_plain;h=3374701a511ae6676ea681b8855705c5f12a1953;p=gbrg%2F.git Fixed actor table loader --- diff --git a/src/actor.s b/src/actor.s index 7640f16..1741cfb 100644 --- a/src/actor.s +++ b/src/actor.s @@ -29,7 +29,7 @@ actors_update: pop de @skip: ; inc de sizeof(actor) times -.rep i, actor_size, 1, inc hl +.rep i, actor_size, 1, inc de dec b ld a, b cp a, 0 diff --git a/src/map.s b/src/map.s index f6682d9..7983dca 100644 --- a/src/map.s +++ b/src/map.s @@ -48,17 +48,18 @@ room_load_actors: ; hl = ptr to initial actor table ld hl, curr_room_init_act ld a, [hl+] - ld d, a - ld a, [hl] ld e, a + ld a, [hl] + ld d, a ; de = length...source table ld b, 0 ld a, [de] - ld e, a ; be = len + ld c, a ; bc = len inc de ; de = source table - ld hl, actor_table ; hl = dst + ; hl = dst + ld hl, actor_table call memcpy