diff options
author | Idain <luiscarlosholguinperez@outlook.com> | 2021-10-06 15:24:27 -0400 |
---|---|---|
committer | Idain <luiscarlosholguinperez@outlook.com> | 2021-10-06 15:24:27 -0400 |
commit | 8b2c0c242f4057420d8c3aeecfcb5b7092abce72 (patch) | |
tree | 962deeb38e158eac2e814b44caf49888ce74192d | |
parent | de9d3785c12ec87f522e4a34fe197342579cb403 (diff) |
Remove unnecessary jump.
-rw-r--r-- | Improve-the-event-initialization-system.md | 11 |
1 files 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 ``` |