summaryrefslogtreecommitdiff
path: root/engine
diff options
context:
space:
mode:
Diffstat (limited to 'engine')
-rw-r--r--engine/battle/core.asm3
-rw-r--r--engine/battle_anims/anim_commands.asm3
-rw-r--r--engine/events/bug_contest/judging.asm3
-rw-r--r--engine/gfx/load_pics.asm3
-rw-r--r--engine/overworld/map_object_action.asm3
-rw-r--r--engine/overworld/warp_connection.asm3
-rw-r--r--engine/pokegear/radio.asm4
7 files changed, 16 insertions, 6 deletions
diff --git a/engine/battle/core.asm b/engine/battle/core.asm
index 56b20b9cc..97a4a4cda 100644
--- a/engine/battle/core.asm
+++ b/engine/battle/core.asm
@@ -7781,7 +7781,8 @@ HandleSafariAngerEatingStatus: ; unreferenced
jr .finish
.angry
- dec hl ; wSafariMonAngerCount
+ dec hl
+ assert wSafariMonEating - 1 == wSafariMonAngerCount
ld a, [hl]
and a
ret z
diff --git a/engine/battle_anims/anim_commands.asm b/engine/battle_anims/anim_commands.asm
index cd14b7c67..34ef87f61 100644
--- a/engine/battle_anims/anim_commands.asm
+++ b/engine/battle_anims/anim_commands.asm
@@ -245,7 +245,8 @@ BattleAnim_ClearOAM:
ld c, NUM_SPRITE_OAM_STRUCTS
.loop
ld a, [hl]
- and $ff ^ (PALETTE_MASK | VRAM_BANK_1) ; PAL_BATTLE_OB_ENEMY (0)
+ and $ff ^ (PALETTE_MASK | VRAM_BANK_1) ; zeros out the palette bits
+ assert PAL_BATTLE_OB_ENEMY == 0
ld [hli], a
rept SPRITEOAMSTRUCT_LENGTH - 1
inc hl
diff --git a/engine/events/bug_contest/judging.asm b/engine/events/bug_contest/judging.asm
index 361aef81a..abb9d60da 100644
--- a/engine/events/bug_contest/judging.asm
+++ b/engine/events/bug_contest/judging.asm
@@ -68,7 +68,8 @@ ContestJudging_ThirdPlaceScoreText:
LoadContestantName:
; If a = 1, get your name.
- dec a ; BUG_CONTEST_PLAYER
+ assert BUG_CONTEST_PLAYER == 1
+ dec a
jr z, .player
; Find the pointer for the trainer class of the Bug Catching Contestant whose ID is in a.
ld c, a
diff --git a/engine/gfx/load_pics.asm b/engine/gfx/load_pics.asm
index a8dc82892..98dbdc17b 100644
--- a/engine/gfx/load_pics.asm
+++ b/engine/gfx/load_pics.asm
@@ -208,7 +208,8 @@ GetMonBackpic:
push de
; These are assumed to be at the same address in their respective banks.
- ld hl, PokemonPicPointers ; UnownPicPointers
+ assert PokemonPicPointers == UnownPicPointers
+ ld hl, PokemonPicPointers
ld a, b
ld d, BANK(PokemonPicPointers)
cp UNOWN
diff --git a/engine/overworld/map_object_action.asm b/engine/overworld/map_object_action.asm
index 35de22030..5c68f6b0f 100644
--- a/engine/overworld/map_object_action.asm
+++ b/engine/overworld/map_object_action.asm
@@ -273,7 +273,8 @@ SetFacingBoulderDust:
and 2
ld a, FACING_BOULDER_DUST_1
jr z, .ok
- inc a ; FACING_BOULDER_DUST_2
+ inc a
+ assert FACING_BOULDER_DUST_1 + 1 == FACING_BOULDER_DUST_2
.ok
ld [hl], a
ret
diff --git a/engine/overworld/warp_connection.asm b/engine/overworld/warp_connection.asm
index 866480d5c..a74f2015f 100644
--- a/engine/overworld/warp_connection.asm
+++ b/engine/overworld/warp_connection.asm
@@ -175,7 +175,8 @@ EnterMapWarp:
; MOUNT_MOON_SQUARE and TIN_TOWER_ROOF are outdoor maps within indoor maps.
; Dig and Escape Rope should not take you to them.
ld a, [wPrevMapGroup]
- cp GROUP_MOUNT_MOON_SQUARE ; aka GROUP_TIN_TOWER_ROOF
+ cp GROUP_MOUNT_MOON_SQUARE
+ assert GROUP_MOUNT_MOON_SQUARE == GROUP_TIN_TOWER_ROOF
jr nz, .not_mt_moon_or_tin_tower
ld a, [wPrevMapNumber]
cp MAP_MOUNT_MOON_SQUARE
diff --git a/engine/pokegear/radio.asm b/engine/pokegear/radio.asm
index 985657198..bc7c3195d 100644
--- a/engine/pokegear/radio.asm
+++ b/engine/pokegear/radio.asm
@@ -334,6 +334,7 @@ OaksPKMNTalk8:
; so no need for a retry loop
call Random
maskbits NUM_OAKS_POKEMON_TALK_ADVERBS
+ assert_power_of_2 NUM_OAKS_POKEMON_TALK_ADVERBS
ld e, a
ld d, 0
ld hl, .Adverbs
@@ -433,6 +434,7 @@ OaksPKMNTalk9:
; so no need for a retry loop
call Random
maskbits NUM_OAKS_POKEMON_TALK_ADJECTIVES
+ assert_power_of_2 NUM_OAKS_POKEMON_TALK_ADJECTIVES
ld e, a
ld d, 0
ld hl, .Adjectives
@@ -1130,6 +1132,7 @@ PeoplePlaces5:
; so no need for a retry loop
call Random
maskbits NUM_PNP_PEOPLE_ADJECTIVES
+ assert_power_of_2 NUM_PNP_PEOPLE_ADJECTIVES
ld e, a
ld d, 0
ld hl, .Adjectives
@@ -1263,6 +1266,7 @@ PeoplePlaces7:
; so no need for a retry loop
call Random
maskbits NUM_PNP_PLACES_ADJECTIVES
+ assert_power_of_2 NUM_PNP_PLACES_ADJECTIVES
ld e, a
ld d, 0
ld hl, .Adjectives