shithub: pokecrystal

Download patch

ref: 8befc889adcaf3988ad63a36de74fa345aeab7ee
parent: aabfc0b413e32198ebdc32d3719bf9be85b2306e
author: mid-kid <esteve.varela@gmail.com>
date: Tue Aug 4 16:26:26 EDT 2020

Remove a verifiably false comment

wSpriteAnimCount starts at 0, keeps incrementing and never decrements.
When it reaches $ff, the next value is 1.

Its purpose is unknown, as this value is used nowhere else.

--- a/engine/gfx/sprites.asm
+++ b/engine/gfx/sprites.asm
@@ -135,16 +135,16 @@
 ; Back up the structure address to bc.
 	ld c, l
 	ld b, h
-; Value [wSpriteAnimCount] is initially set to -1. Set it to
-; the number of objects loaded into this array.
+
+; Increment [wSpriteAnimCount], skipping a 0 value.
 	ld hl, wSpriteAnimCount
 	inc [hl]
 	ld a, [hl]
 	and a
-	jr nz, .initialized
+	jr nz, .nonzero
 	inc [hl]
+.nonzero
 
-.initialized
 ; Get row a of SpriteAnimSeqData, copy the pointer into de
 	pop af
 	ld e, a
@@ -228,9 +228,9 @@
 UpdateAnimFrame:
 	call InitSpriteAnimBuffer ; init WRAM
 	call GetSpriteAnimFrame ; read from a memory array
-	cp -3
+	cp dowait_command
 	jr z, .done
-	cp -4
+	cp delanim_command
 	jr z, .delete
 	call GetFrameOAMPointer
 	; add byte to [wCurAnimVTile]