mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2024-11-16 11:27:33 -08:00
GetForestTreeFrame is not technically a bug or glitch, but it's exceptional
This commit is contained in:
parent
370839cad7
commit
7748b20c27
43
docs/bugs.md
43
docs/bugs.md
@ -687,3 +687,46 @@ ClearWRAM:: ; 25a
|
||||
```
|
||||
|
||||
**Fix:** Change `jr nc, .bank_loop` to `jr c, .bank_loop`.
|
||||
|
||||
|
||||
## `GetForestTreeFrame` works, but it's still bad
|
||||
|
||||
[tilesets/animations.asm](tilesets/animations.asm):
|
||||
|
||||
```
|
||||
GetForestTreeFrame: ; fc54c
|
||||
; Return 0 if a is even, or 2 if odd.
|
||||
and a
|
||||
jr z, .even
|
||||
cp 1
|
||||
jr z, .odd
|
||||
cp 2
|
||||
jr z, .even
|
||||
cp 3
|
||||
jr z, .odd
|
||||
cp 4
|
||||
jr z, .even
|
||||
cp 5
|
||||
jr z, .odd
|
||||
cp 6
|
||||
jr z, .even
|
||||
.odd
|
||||
ld a, 2
|
||||
scf
|
||||
ret
|
||||
.even
|
||||
xor a
|
||||
ret
|
||||
; fc56d
|
||||
```
|
||||
|
||||
**Fix:**
|
||||
|
||||
```
|
||||
GetForestTreeFrame: ; fc54c
|
||||
; Return 0 if a is even, or 2 if odd.
|
||||
and 1
|
||||
add a
|
||||
ret
|
||||
; fc56d
|
||||
```
|
||||
|
Loading…
x
Reference in New Issue
Block a user