You've already forked pokecrystal-board
mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2025-04-09 05:44:44 -07:00
Fix some pokecrystal bug and glitches (#8)
Credits sequence changes move selection menu behavior; Swimming NPCs aren't limited by their movement radius; No bump noise if standing on tile E; The unused phonecall script command may crash; ScriptCall can overflow wScriptStack and crash; LoadSpriteGFX does not limit the capacity of UsedSprites; ReadObjectEvents overflows into wObjectMasks; ClearWRAM only clears WRAM bank 1; BattleAnimCmd_ClearObjs only clears the first 6⅔ objects; Options menu fails to clear joypad state on initialization
This commit is contained in:
@@ -184,7 +184,6 @@ ClearVRAM::
|
||||
ClearWRAM::
|
||||
; Wipe swappable WRAM banks (1-7)
|
||||
; Assumes CGB or AGB
|
||||
; BUG: ClearWRAM only clears WRAM bank 1 (see docs/bugs_and_glitches.md)
|
||||
|
||||
ld a, 1
|
||||
.bank_loop
|
||||
@@ -197,7 +196,7 @@ ClearWRAM::
|
||||
pop af
|
||||
inc a
|
||||
cp 8
|
||||
jr nc, .bank_loop
|
||||
jr c, .bank_loop
|
||||
ret
|
||||
|
||||
ClearsScratch::
|
||||
|
13
home/map.asm
13
home/map.asm
@@ -573,13 +573,13 @@ ReadObjectEvents::
|
||||
ld a, [wCurMapObjectEventCount]
|
||||
call CopyMapObjectEvents
|
||||
|
||||
; get NUM_OBJECTS - [wCurMapObjectEventCount]
|
||||
; BUG: ReadObjectEvents overflows into wObjectMasks (see docs/bugs_and_glitches.md)
|
||||
; get NUM_OBJECTS - [wCurMapObjectEventCount] - 1
|
||||
ld a, [wCurMapObjectEventCount]
|
||||
ld c, a
|
||||
ld a, NUM_OBJECTS
|
||||
ld a, NUM_OBJECTS - 1
|
||||
sub c
|
||||
jr z, .skip
|
||||
jr c, .skip
|
||||
|
||||
; could have done "inc hl" instead
|
||||
ld bc, 1
|
||||
@@ -2264,10 +2264,3 @@ LoadMapTileset::
|
||||
pop bc
|
||||
pop hl
|
||||
ret
|
||||
|
||||
DummyEndPredef::
|
||||
; Unused function at the end of PredefPointers.
|
||||
rept 16
|
||||
nop
|
||||
endr
|
||||
ret
|
||||
|
Reference in New Issue
Block a user