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 was discussed in #706
It also uncovered some off-by-one issues with defining some constants.
A few structs now use rsreset/_RS to define their offset constants, as discussed in #739
Time to move everything out of home.asm:
- InexplicablyEmptyFunction was moved to home/map.asm
- The wDebugFlags functions and xor_a brothers were moved to
home/flag.asm because they're all flag-related.
- ret_2f3e was moved into home/region.asm
- The register alias sisters were moved to a new file called home/call_regs.asm
- IsInArray and SkipNames were joined by AddNTimes from home/math.asm
into home/array.asm, as they're all used to index arrays.
- CallPointerAt was moved into home/print_text.asm because given the
contents of that file it doesn't feel very out of place (that file
isn't very aptly named...)
- CountSetBits was moved into home/pokedex_flags.asm because it's unique
use is counting the amount of seen/caught mon in the podedex. GetWeekday
was pulled into this by proximity.
Other changes were also made:
- PushLYOverrides was moved from home/sprite_anims.asm to
home/battle.asm, because it's almost exclusively used for battle
animations, with the lone exception being the Magnet Train.
- home/copy.asm was renamed to home/gfx.asm, as it's all gfx-related
- home/copy2.asm was renamed to home/copy.asm, now it's the only file
called copy.
- SetHPPal and GetHPPal were moved from home/hp_pals.asm to
home/tilemap.asm, as they're attrmap related, like many functions in
that file are.
- home/rtc.asm was renamed to home/time_palettes.asm, as it had very
little to do with the RTC at all, all RTC functions being in home/time.asm
- home/handshake.asm was renamed to home/printer.asm.
- home/mon_data_2.asm was renamed to home/mon_party.asm.
These functions used as map setup commands are used in other places,
too, so I can't prefix them under the same. The names should match
except I won't repeat "map" in a map setup command name.
The previous name for this was rather misleading. It isn't an actual
jump like you'd expect the `jp` instruction to behave as. Instead, it
behaves more like a `farcall`.
This also makes it consistent with its current command ID name of
`TX_FAR`.