summaryrefslogtreecommitdiff
path: root/engine/battle
diff options
context:
space:
mode:
authorklektron <klektron@users.noreply.github.com>2021-01-03 17:31:10 +0100
committerklektron <klektron@users.noreply.github.com>2021-01-03 17:31:10 +0100
commit779c7ddaa2613e41ce86e10893ee1b94ecc5b899 (patch)
tree286b04873ddce3f576d02a4ad58c843686fb80df /engine/battle
parenta20ca92534f9cc6922f40e5f736a22862754db4b (diff)
parent21908ba30a8bae5c5e1c86b1164402ec95da0220 (diff)
Merge last changes from pret
Diffstat (limited to 'engine/battle')
-rw-r--r--[-rwxr-xr-x]engine/battle/animations.asm0
-rw-r--r--[-rwxr-xr-x]engine/battle/core.asm25
-rw-r--r--[-rwxr-xr-x]engine/battle/end_of_battle.asm0
-rw-r--r--engine/battle/init_battle_variables.asm4
-rw-r--r--[-rwxr-xr-x]engine/battle/misc.asm0
-rw-r--r--[-rwxr-xr-x]engine/battle/read_trainer_party.asm0
-rw-r--r--[-rwxr-xr-x]engine/battle/safari_zone.asm0
7 files changed, 15 insertions, 14 deletions
diff --git a/engine/battle/animations.asm b/engine/battle/animations.asm
index 0673b518..0673b518 100755..100644
--- a/engine/battle/animations.asm
+++ b/engine/battle/animations.asm
diff --git a/engine/battle/core.asm b/engine/battle/core.asm
index 1ca4fa43..8869b4ae 100755..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
@@ -2013,18 +2013,19 @@ DisplayBattleMenu::
.menuselected
ld [wTextBoxID], a
call DisplayTextBoxID
+ ; handle menu input if it's not the old man tutorial
ld a, [wBattleType]
dec a
- jp nz, .handleBattleMenuInput ; handle menu input if it's not the old man tutorial
+ jp nz, .handleBattleMenuInput
; the following happens for the old man tutorial
- ; Temporarily save the player name in wGrassRate,
- ; which is supposed to get overwritten when entering a
- ; map with wild Pokémon.
- ; 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.
ld hl, wPlayerName
- ld de, wGrassRate
+ ld de, wLinkEnemyTrainerName
ld bc, NAME_LENGTH
call CopyData
ld hl, .oldManName
@@ -6275,7 +6276,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
@@ -6865,8 +6866,8 @@ _InitBattleCommon:
ld [wLetterPrintingDelayFlags], a
pop af
ld [wMapPalOffset], a
- ld a, [wSavedTilesetType]
- ldh [hTilesetType], a
+ ld a, [wSavedTileAnimations]
+ ldh [hTileAnimations], a
scf
ret
.emptyString
diff --git a/engine/battle/end_of_battle.asm b/engine/battle/end_of_battle.asm
index ab556aca..ab556aca 100755..100644
--- a/engine/battle/end_of_battle.asm
+++ b/engine/battle/end_of_battle.asm
diff --git a/engine/battle/init_battle_variables.asm b/engine/battle/init_battle_variables.asm
index 0d403b55..dd9f9714 100644
--- a/engine/battle/init_battle_variables.asm
+++ b/engine/battle/init_battle_variables.asm
@@ -1,6 +1,6 @@
InitBattleVariables:
- ldh a, [hTilesetType]
- ld [wSavedTilesetType], a
+ ldh a, [hTileAnimations]
+ ld [wSavedTileAnimations], a
xor a
ld [wActionResultOrTookBattleTurn], a
ld [wBattleResult], a
diff --git a/engine/battle/misc.asm b/engine/battle/misc.asm
index 33af6f6f..33af6f6f 100755..100644
--- a/engine/battle/misc.asm
+++ b/engine/battle/misc.asm
diff --git a/engine/battle/read_trainer_party.asm b/engine/battle/read_trainer_party.asm
index a0132a4f..a0132a4f 100755..100644
--- a/engine/battle/read_trainer_party.asm
+++ b/engine/battle/read_trainer_party.asm
diff --git a/engine/battle/safari_zone.asm b/engine/battle/safari_zone.asm
index a61f402f..a61f402f 100755..100644
--- a/engine/battle/safari_zone.asm
+++ b/engine/battle/safari_zone.asm