summaryrefslogtreecommitdiff
path: root/engine/pokemon
diff options
context:
space:
mode:
authorRangi <remy.oukaour+rangi42@gmail.com>2021-03-25 16:33:05 -0400
committerRangi <remy.oukaour+rangi42@gmail.com>2021-03-25 16:44:41 -0400
commit95ec2cf039f0efdc6dadfb6fe766ace231a1b6b1 (patch)
tree5a7b79846bd7f07e40310da46b21873774a08ef7 /engine/pokemon
parente1f6bb53939be34f55e05cbbd19cd758936b3422 (diff)
Verify data table and name list sizes with assertion macros
Fixes #312
Diffstat (limited to 'engine/pokemon')
-rw-r--r--engine/pokemon/add_mon.asm2
-rw-r--r--engine/pokemon/evos_moves.asm4
-rw-r--r--engine/pokemon/learn_move.asm2
3 files changed, 4 insertions, 4 deletions
diff --git a/engine/pokemon/add_mon.asm b/engine/pokemon/add_mon.asm
index c49a0a77..46a8b2b9 100644
--- a/engine/pokemon/add_mon.asm
+++ b/engine/pokemon/add_mon.asm
@@ -259,7 +259,7 @@ AddPartyMon_WriteMovePP:
push de
push bc
ld hl, Moves
- ld bc, MoveEnd - Moves
+ ld bc, MOVE_LENGTH
call AddNTimes
ld de, wcd6d
ld a, BANK(Moves)
diff --git a/engine/pokemon/evos_moves.asm b/engine/pokemon/evos_moves.asm
index 21b1c9f4..7d5fd469 100644
--- a/engine/pokemon/evos_moves.asm
+++ b/engine/pokemon/evos_moves.asm
@@ -161,7 +161,7 @@ Evolution_PartyMonLoop: ; loop over party mons
ld a, [wd11e]
dec a
ld hl, BaseStats
- ld bc, MonBaseStatsEnd - MonBaseStats
+ ld bc, BASE_DATA_SIZE
call AddNTimes
ld de, wMonHeader
call CopyData
@@ -479,7 +479,7 @@ WriteMonMoves:
push hl
dec a
ld hl, Moves
- ld bc, MoveEnd - Moves
+ ld bc, MOVE_LENGTH
call AddNTimes
ld de, wBuffer
ld a, BANK(Moves)
diff --git a/engine/pokemon/learn_move.asm b/engine/pokemon/learn_move.asm
index 4deb3f0b..fd92ec57 100644
--- a/engine/pokemon/learn_move.asm
+++ b/engine/pokemon/learn_move.asm
@@ -44,7 +44,7 @@ DontAbandonLearning:
push de
dec a
ld hl, Moves
- ld bc, MoveEnd - Moves
+ ld bc, MOVE_LENGTH
call AddNTimes
ld de, wBuffer
ld a, BANK(Moves)