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:
xCrystal
2023-07-27 13:01:32 +02:00
parent d30b9dd60f
commit 59bda0b36b
12 changed files with 24 additions and 47 deletions

View File

@@ -644,9 +644,8 @@ BattleAnimCmd_ResetObp0:
ret
BattleAnimCmd_ClearObjs:
; BUG: BattleAnimCmd only clears the first 6⅔ objects (see docs/bugs_and_glitches.md)
ld hl, wActiveAnimObjects
ld a, $a0
ld a, NUM_ANIM_OBJECTS * BATTLEANIMSTRUCT_LENGTH
.loop
ld [hl], 0
inc hl