From 8b2c0c242f4057420d8c3aeecfcb5b7092abce72 Mon Sep 17 00:00:00 2001 From: Idain Date: Wed, 6 Oct 2021 15:24:27 -0400 Subject: Remove unnecessary jump. --- Improve-the-event-initialization-system.md | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/Improve-the-event-initialization-system.md b/Improve-the-event-initialization-system.md index 3533644..c55e6ed 100644 --- a/Improve-the-event-initialization-system.md +++ b/Improve-the-event-initialization-system.md @@ -106,7 +106,7 @@ Create **engine/events/init_events.asm**: + ld e, a + ld d, 0 + cp -1 -+ jr z, .sprites_done ++ ret z + ld a, [hli] + push hl + ld hl, wVariableSprites @@ -114,9 +114,6 @@ Create **engine/events/init_events.asm**: + ld [hl], a + pop hl + jr .sprites_loop -+.sprites_done -+ -+ ret + +INCLUDE "data/events/init_events.asm" ``` @@ -205,8 +202,7 @@ That's 72 more ROM bytes than before. It's not a whole lot, but every bit helps. - ld e, a - ld d, 0 cp -1 -- jr z, .sprites_done -+ ret z + ret z + add LOW(wVariableSprites) + ld e, a + adc HIGH(wVariableSprites) @@ -220,7 +216,4 @@ That's 72 more ROM bytes than before. It's not a whole lot, but every bit helps. - pop hl + ld [de], a jr .sprites_loop --.sprites_done -- -- ret ``` -- cgit v1.2.3