diff options
author | Rangi <remy.oukaour+rangi42@gmail.com> | 2020-03-16 11:32:34 -0400 |
---|---|---|
committer | Rangi <remy.oukaour+rangi42@gmail.com> | 2020-03-16 11:32:34 -0400 |
commit | 3367f42131fd2382e26f079ef714cba312098771 (patch) | |
tree | 51d1073b917cf990041f2cb08712ad5b043b64a0 | |
parent | aae18fb07ace51ef6ac04087a2f919aad2ff1334 (diff) |
Fix diff
-rw-r--r-- | Improve-the-event-initialization-system.md | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/Improve-the-event-initialization-system.md b/Improve-the-event-initialization-system.md index 5b5f509..a4f0029 100644 --- a/Improve-the-event-initialization-system.md +++ b/Improve-the-event-initialization-system.md @@ -214,23 +214,20 @@ That's 72 more ROM bytes than before. It's not a whole lot, but every bit helps. ld a, [hli] - ld e, a - ld d, 0 -- cp -1 + cp -1 - jr z, .sprites_done -- ld a, [hli] -- push hl -- ld hl, wVariableSprites -- add hl, de -- ld [hl], a -- pop hl -+ ld a, [hli] -+ cp -1 + ret z + add LOW(wVariableSprites) + ld e, a + adc HIGH(wVariableSprites) + sub e + ld d, a -+ ld a, [hli] + ld a, [hli] +- push hl +- ld hl, wVariableSprites +- add hl, de +- ld [hl], a +- pop hl + ld [de], a jr .sprites_loop -.sprites_done |