Enforce capacity limit of sprite list in VRAM (#2); actually fix LoadSpriteGFX (#8) [bugfix to 59bda0b36b]

This commit is contained in:
xCrystal
2023-09-02 13:01:45 +02:00
parent 74f2a55332
commit ea4ab28652
3 changed files with 10 additions and 5 deletions

View File

@@ -333,9 +333,9 @@ LoadSpriteGFX:
ret
.LoadSprite:
push de
push bc
call GetSprite
pop de
pop bc
ld a, l
ret
@@ -383,9 +383,10 @@ ArrangeUsedSprites:
ld a, [hl]
call GetSpriteLength
; There are only two tables, so don't go any further than that.
; Don't go any further than the second row in the second table.
add b
jr c, .quit
cp $a0 + 1
jr nc, .quit
ld [hl], b
ld b, a