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

@@ -93,19 +93,6 @@ GetRemainingSpaceInPhoneList:
INCLUDE "data/phone/permanent_numbers.asm"
BrokenPlaceFarString:
; This routine is not in bank 0 and will fail or crash if called.
ldh a, [hROMBank]
push af
ld a, b
rst Bankswitch
call PlaceString
pop af
rst Bankswitch
ret
CheckPhoneCall::
; Check if the phone is ringing in the overworld.
@@ -496,14 +483,12 @@ PhoneCall::
ld [hl], "☎"
inc hl
inc hl
; BUG: The unused phonecall script command may crash (see docs/bugs_and_glitches.md)
ld a, [wPhoneScriptBank]
ld b, a
ld a, [wPhoneCaller]
ld e, a
ld a, [wPhoneCaller + 1]
ld d, a
call BrokenPlaceFarString
ld a, [wPhoneScriptBank]
call PlaceFarString
ret
Phone_NoSignal: