summaryrefslogtreecommitdiff
path: root/engine/battle
diff options
context:
space:
mode:
Diffstat (limited to 'engine/battle')
-rw-r--r--engine/battle/battle_transitions.asm3
-rwxr-xr-xengine/battle/core.asm14
-rw-r--r--engine/battle/draw_hud_pokeball_gfx.asm3
-rw-r--r--engine/battle/trainer_ai.asm2
4 files changed, 12 insertions, 10 deletions
diff --git a/engine/battle/battle_transitions.asm b/engine/battle/battle_transitions.asm
index e9e247f9..8f57777c 100644
--- a/engine/battle/battle_transitions.asm
+++ b/engine/battle/battle_transitions.asm
@@ -184,11 +184,12 @@ DungeonMaps2: ; 70a44 (1c:4a44)
LoadBattleTransitionTile: ; 70a4d (1c:4a4d)
ld hl, vChars1 + $7f0
ld de, BattleTransitionTile
- lb bc, BANK(BattleTransitionTile), $01
+ lb bc, BANK(BattleTransitionTile), (BattleTransitionTileEnd - BattleTransitionTile) / $10
jp CopyVideoData
BattleTransitionTile: ; 70a59 (1c:4a59)
INCBIN "gfx/battle_transition.2bpp"
+BattleTransitionTileEnd:
BattleTransition_BlackScreen: ; 70a69 (1c:4a69)
ld a, $ff
diff --git a/engine/battle/core.asm b/engine/battle/core.asm
index 65549f7b..ee93023f 100755
--- a/engine/battle/core.asm
+++ b/engine/battle/core.asm
@@ -2394,7 +2394,7 @@ PartyMenuOrRockOrRun:
jp DisplayBattleMenu
.partyMonDeselected
coord hl, 11, 11
- ld bc, $81
+ ld bc, 6 * SCREEN_WIDTH + 9
ld a, " "
call FillMemory
xor a ; NORMAL_PARTY_MENU
@@ -5194,7 +5194,7 @@ ReloadMoveData: ; 3e329 (f:6329)
ld [wd11e],a
dec a
ld hl,Moves
- ld bc,$0006
+ ld bc,MoveEnd - Moves
call AddNTimes
ld a,BANK(Moves)
call FarCopyData ; copy the move's stats
@@ -6170,7 +6170,7 @@ GetCurrentMove: ; 3eabe (f:6abe)
ld [wd0b5], a
dec a
ld hl, Moves
- ld bc, $6
+ ld bc, MoveEnd - Moves
call AddNTimes
ld a, BANK(Moves)
call FarCopyData
@@ -6707,22 +6707,22 @@ LoadHudTilePatterns: ; 3ee5b (f:6e5b)
.lcdDisabled
ld hl, BattleHudTiles1
ld de, vChars2 + $6d0
- ld bc, $18
+ ld bc, BattleHudTiles1End - BattleHudTiles1
ld a, BANK(BattleHudTiles1)
call FarCopyDataDouble
ld hl, BattleHudTiles2
ld de, vChars2 + $730
- ld bc, $30
+ ld bc, BattleHudTiles3End - BattleHudTiles2
ld a, BANK(BattleHudTiles2)
jp FarCopyDataDouble
.lcdEnabled
ld de, BattleHudTiles1
ld hl, vChars2 + $6d0
- lb bc, BANK(BattleHudTiles1), $03
+ lb bc, BANK(BattleHudTiles1), (BattleHudTiles1End - BattleHudTiles1) / $8
call CopyVideoDataDouble
ld de, BattleHudTiles2
ld hl, vChars2 + $730
- lb bc, BANK(BattleHudTiles2), $06
+ lb bc, BANK(BattleHudTiles2), (BattleHudTiles3End - BattleHudTiles2) / $8
jp CopyVideoDataDouble
PrintEmptyString: ; 3ee94 (f:6e94)
diff --git a/engine/battle/draw_hud_pokeball_gfx.asm b/engine/battle/draw_hud_pokeball_gfx.asm
index 7198d984..c1387b7b 100644
--- a/engine/battle/draw_hud_pokeball_gfx.asm
+++ b/engine/battle/draw_hud_pokeball_gfx.asm
@@ -13,7 +13,7 @@ DrawEnemyPokeballs: ; 3a857 (e:6857)
LoadPartyPokeballGfx: ; 3a85d (e:685d)
ld de, PokeballTileGraphics
ld hl, vSprites + $310
- lb bc, BANK(PokeballTileGraphics), $04
+ lb bc, BANK(PokeballTileGraphics), (PokeballTileGraphicsEnd - PokeballTileGraphics) / $10
jp CopyVideoData
SetupOwnPartyPokeballs: ; 3a869 (e:6869)
@@ -189,3 +189,4 @@ SetupPlayerAndEnemyPokeballs: ; 3a948 (e:6948)
; four tiles: pokeball, black pokeball (status ailment), crossed out pokeball (faited) and pokeball slot (no mon)
PokeballTileGraphics:: ; 3a97e (e:697e)
INCBIN "gfx/pokeball.2bpp"
+PokeballTileGraphicsEnd:
diff --git a/engine/battle/trainer_ai.asm b/engine/battle/trainer_ai.asm
index 9102b2d8..08205048 100644
--- a/engine/battle/trainer_ai.asm
+++ b/engine/battle/trainer_ai.asm
@@ -264,7 +264,7 @@ ReadMove: ; 39884 (e:5884)
push bc
dec a
ld hl,Moves
- ld bc,6
+ ld bc,MoveEnd - Moves
call AddNTimes
ld de,W_ENEMYMOVENUM
call CopyData