diff options
author | dannye <33dannye@gmail.com> | 2020-12-15 11:05:12 -0600 |
---|---|---|
committer | dannye <33dannye@gmail.com> | 2020-12-15 11:05:12 -0600 |
commit | 2654da5d157540d482790308f1c2948e1431fa46 (patch) | |
tree | 265d64b9fb8f6e8bd580cb6a5ec3c59224e9fdeb /engine/battle/core.asm | |
parent | 48dc6a8cf4da512273e79e49346b35dcc225f773 (diff) | |
parent | f16f53096b39ccb5b9ab2345faa3e49434e19336 (diff) |
Merge branch 'master' of https://github.com/pret/pokered
Diffstat (limited to 'engine/battle/core.asm')
-rw-r--r-- | engine/battle/core.asm | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/engine/battle/core.asm b/engine/battle/core.asm index 415b287c..053d6a1e 100644 --- a/engine/battle/core.asm +++ b/engine/battle/core.asm @@ -51,7 +51,7 @@ SlidePlayerAndEnemySilhouettesOnScreen: ldh [hWY], a ldh [rWY], a xor a - ldh [hTilesetType], a + ldh [hTileAnimations], a ldh [hSCY], a dec a ld [wUpdateSpritesEnabled], a @@ -2088,23 +2088,24 @@ DisplayBattleMenu:: .menuselected ld [wTextBoxID], a call DisplayTextBoxID + ; handle menu input if it's not the old man tutorial or prof. oak pikachu battle ld a, [wBattleType] cp BATTLE_TYPE_OLD_MAN - jr z, .doSimulatedMenuInput ; simulate menu input if it's the old man or prof. oak pikachu battle + jr z, .doSimulatedMenuInput cp BATTLE_TYPE_PIKACHU jr z, .doSimulatedMenuInput jp .handleBattleMenuInput ; the following happens for the old man tutorial and prof. oak pikachu battle .doSimulatedMenuInput - ; Temporarily save the player name in wGrassRate, - ; which is supposed to get overwritten when entering a - ; map with wild Pokémon. - ; In Red/Blue, due to an oversight, the data may not get - ; overwritten (on Cinnabar and Route 21) and the infamous - ; Missingno. glitch can show up. + ; Temporarily save the player name in wLinkEnemyTrainerName. + ; Since wLinkEnemyTrainerName == wGrassRate, this affects wild encounters. + ; The wGrassRate byte and following wGrassMons buffer are supposed + ; to get overwritten when entering a map with wild Pokémon, + ; but an oversight prevents this in Cinnabar and Route 21, + ; so the infamous MissingNo. glitch can show up. ; However, this has been fixed in Yellow. ld hl, wPlayerName - ld de, wGrassRate + ld de, wLinkEnemyTrainerName ld bc, NAME_LENGTH call CopyData ld hl, .oldManName @@ -6454,7 +6455,7 @@ DoBattleTransitionAndInitBattleVariables: ldh [hAutoBGTransferEnabled], a ldh [hWY], a ldh [rWY], a - ldh [hTilesetType], a + ldh [hTileAnimations], a ld hl, wPlayerStatsToDouble ld [hli], a ld [hli], a |