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/pokegear/radio.asm4
6 files changed, 14 insertions, 5 deletions
diff --git a/engine/battle/core.asm b/engine/battle/core.asm
index 24b79b7c..830a7a23 100644
--- a/engine/battle/core.asm
+++ b/engine/battle/core.asm
@@ -7486,7 +7486,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 433a8e5e..9bba60a3 100644
--- a/engine/battle_anims/anim_commands.asm
+++ b/engine/battle_anims/anim_commands.asm
@@ -218,7 +218,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 4f55fd78..da48eb96 100644
--- a/engine/events/bug_contest/judging.asm
+++ b/engine/events/bug_contest/judging.asm
@@ -67,7 +67,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 563c0d8b..34bffdb7 100644
--- a/engine/gfx/load_pics.asm
+++ b/engine/gfx/load_pics.asm
@@ -137,7 +137,8 @@ GetMonBackpic:
call OpenSRAM
; 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, [wCurPartySpecies]
ld d, BANK(PokemonPicPointers)
cp UNOWN
diff --git a/engine/overworld/map_object_action.asm b/engine/overworld/map_object_action.asm
index 4913386c..8a153f59 100644
--- a/engine/overworld/map_object_action.asm
+++ b/engine/overworld/map_object_action.asm
@@ -246,7 +246,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/pokegear/radio.asm b/engine/pokegear/radio.asm
index 2238424e..459cf1ac 100644
--- a/engine/pokegear/radio.asm
+++ b/engine/pokegear/radio.asm
@@ -312,6 +312,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
@@ -411,6 +412,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
@@ -1090,6 +1092,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
@@ -1223,6 +1226,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