Consistently capitalize ASSERT directives (#489)

This commit is contained in:
Rangi 2025-01-28 23:31:27 -05:00 committed by GitHub
parent afb8990169
commit ec37f6117d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
15 changed files with 25 additions and 25 deletions

View File

@ -5,7 +5,7 @@ MACRO move
db \4 ; type
db \5 percent ; accuracy
db \6 ; pp
assert \6 <= 40, "PP must be 40 or less"
ASSERT \6 <= 40, "PP must be 40 or less"
ENDM
Moves:

View File

@ -5157,7 +5157,7 @@ MetronomePickMove:
and a
jr z, .pickMoveLoop
cp STRUGGLE
assert NUM_ATTACKS == STRUGGLE ; random numbers greater than STRUGGLE are not moves
ASSERT NUM_ATTACKS == STRUGGLE ; random numbers greater than STRUGGLE are not moves
jr nc, .pickMoveLoop
cp METRONOME
jr z, .pickMoveLoop
@ -6755,7 +6755,7 @@ HandleExplodingAnimation:
ret nz
ld a, ANIMATIONTYPE_SHAKE_SCREEN_HORIZONTALLY_LIGHT
ld [wAnimationType], a
assert ANIMATIONTYPE_SHAKE_SCREEN_HORIZONTALLY_LIGHT == MEGA_PUNCH
ASSERT ANIMATIONTYPE_SHAKE_SCREEN_HORIZONTALLY_LIGHT == MEGA_PUNCH
; ld a, MEGA_PUNCH
; fallthrough
PlayMoveAnimation:

View File

@ -216,8 +216,8 @@ FreezeBurnParalyzeEffect:
jr c, .regular_effectiveness
; extra effectiveness
ld b, 30 percent + 1
assert PARALYZE_SIDE_EFFECT2 - PARALYZE_SIDE_EFFECT1 == BURN_SIDE_EFFECT2 - BURN_SIDE_EFFECT1
assert PARALYZE_SIDE_EFFECT2 - PARALYZE_SIDE_EFFECT1 == FREEZE_SIDE_EFFECT2 - FREEZE_SIDE_EFFECT1
ASSERT PARALYZE_SIDE_EFFECT2 - PARALYZE_SIDE_EFFECT1 == BURN_SIDE_EFFECT2 - BURN_SIDE_EFFECT1
ASSERT PARALYZE_SIDE_EFFECT2 - PARALYZE_SIDE_EFFECT1 == FREEZE_SIDE_EFFECT2 - FREEZE_SIDE_EFFECT1
sub PARALYZE_SIDE_EFFECT2 - PARALYZE_SIDE_EFFECT1 ; treat extra effective as regular from now on
.regular_effectiveness
push af

View File

@ -1,6 +1,6 @@
ApplyOutOfBattlePoisonDamage:
ld a, [wStatusFlags5]
assert BIT_SCRIPTED_MOVEMENT_STATE == 7
ASSERT BIT_SCRIPTED_MOVEMENT_STATE == 7
add a ; overflows scripted movement state bit into carry flag
jp c, .noBlackOut ; no black out if joypad states are being simulated
ld a, [wPartyCount]

View File

@ -2512,7 +2512,7 @@ GetMaxPP:
and %11000000 ; get PP Up count
pop bc
or b ; place normal max PP in 6 lower bits of a
assert wMoveData + MOVE_PP + 1 == wPPUpCountAndMaxPP
ASSERT wMoveData + MOVE_PP + 1 == wPPUpCountAndMaxPP
ld h, d
ld l, e
inc hl ; hl = wPPUpCountAndMaxPP

View File

@ -212,7 +212,7 @@ LoadTownMap_Fly::
ld [wDestinationMap], a
ld hl, wStatusFlags6
set BIT_FLY_WARP, [hl]
assert wStatusFlags6 + 1 == wStatusFlags7
ASSERT wStatusFlags6 + 1 == wStatusFlags7
inc hl
set BIT_USED_FLY, [hl]
.pressedB

View File

@ -155,21 +155,21 @@ LinkMenu:
ld hl, wTopMenuItemY
ld a, 7
ld [hli], a
assert wTopMenuItemY + 1 == wTopMenuItemX
ASSERT wTopMenuItemY + 1 == wTopMenuItemX
ld a, 6
ld [hli], a
assert wTopMenuItemX + 1 == wCurrentMenuItem
ASSERT wTopMenuItemX + 1 == wCurrentMenuItem
xor a
ld [hli], a
inc hl
assert wCurrentMenuItem + 2 == wMaxMenuItem
ASSERT wCurrentMenuItem + 2 == wMaxMenuItem
ld a, 2
ld [hli], a
assert wMaxMenuItem + 1 == wMenuWatchedKeys
assert 2 + 1 == A_BUTTON | B_BUTTON
ASSERT wMaxMenuItem + 1 == wMenuWatchedKeys
ASSERT 2 + 1 == A_BUTTON | B_BUTTON
inc a
ld [hli], a
assert wMenuWatchedKeys + 1 == wLastMenuItem
ASSERT wMenuWatchedKeys + 1 == wLastMenuItem
xor a
ld [hl], a
.waitForInputLoop
@ -468,7 +468,7 @@ DisplayOptionMenu:
xor a
ld [wCurrentMenuItem], a
ld [wLastMenuItem], a
assert BIT_FAST_TEXT_DELAY == 0
ASSERT BIT_FAST_TEXT_DELAY == 0
inc a ; 1 << BIT_FAST_TEXT_DELAY
ld [wLetterPrintingDelayFlags], a
ld [wOptionsCancelCursorX], a

View File

@ -34,7 +34,7 @@ DEF START_MONEY EQU $3000
ld hl, wObtainedBadges
ld [hli], a
assert wObtainedBadges + 1 == wUnusedObtainedBadges
ASSERT wObtainedBadges + 1 == wUnusedObtainedBadges
ld [hl], a
ld hl, wPlayerCoins

View File

@ -17,9 +17,9 @@ PrepareTitleScreen::
ld [wLetterPrintingDelayFlags], a
ld hl, wStatusFlags6
ld [hli], a
assert wStatusFlags6 + 1 == wStatusFlags7
ASSERT wStatusFlags6 + 1 == wStatusFlags7
ld [hli], a
assert wStatusFlags7 + 1 == wElite4Flags
ASSERT wStatusFlags7 + 1 == wElite4Flags
ld [hl], a
ld a, BANK(Music_TitleScreen)
ld [wAudioROMBank], a

View File

@ -403,7 +403,7 @@ CheckForBoulderCollisionWithSprites:
ld a, [hli]
ld b, a
ldh a, [hPlayerFacing]
assert BIT_FACING_DOWN == 0
ASSERT BIT_FACING_DOWN == 0
rrca
jr c, .pushingDown
; pushing up

View File

@ -262,7 +262,7 @@ Evolution_PartyMonLoop: ; loop over party mons
RenameEvolvedMon:
; Renames the mon to its new, evolved form's standard name unless it had a
; nickname, in which case the nickname is kept.
assert wCurSpecies == wNameListIndex ; save+restore wCurSpecies while using wNameListIndex
ASSERT wCurSpecies == wNameListIndex ; save+restore wCurSpecies while using wNameListIndex
ld a, [wCurSpecies]
push af
ld a, [wMonHIndex]

View File

@ -1,7 +1,7 @@
PromptUserToPlaySlots:
call SaveScreenTilesToBuffer2
ld a, BANK(DisplayTextIDInit)
assert BANK(DisplayTextIDInit) == 1 << BIT_NO_AUTO_TEXT_BOX
ASSERT BANK(DisplayTextIDInit) == 1 << BIT_NO_AUTO_TEXT_BOX
ld [wAutoTextBoxDrawingControl], a ; 1 << BIT_NO_AUTO_TEXT_BOX
ld b, a ; BANK(DisplayTextIDInit)
ld hl, DisplayTextIDInit

View File

@ -129,7 +129,7 @@ DisplayListMenuIDLoop::
and a ; PCPOKEMONLISTMENU?
jr z, .pokemonList
; if it's an item menu
assert wCurListMenuItem == wCurItem
ASSERT wCurListMenuItem == wCurItem
push hl
call GetItemPrice
pop hl
@ -147,7 +147,7 @@ DisplayListMenuIDLoop::
call GetName
jr .storeChosenEntry
.pokemonList
assert wCurListMenuItem == wCurPartySpecies
ASSERT wCurListMenuItem == wCurPartySpecies
ld hl, wPartyCount
ld a, [wListPointer]
cp l ; is it a list of party pokemon or box pokemon?

View File

@ -1,7 +1,7 @@
; this function is used to display sign messages, sprite dialog, etc.
; INPUT: [hSpriteIndex] = sprite ID or [hTextID] = text ID
DisplayTextID::
assert hSpriteIndex == hTextID ; these are at the same memory location
ASSERT hSpriteIndex == hTextID ; these are at the same memory location
ldh a, [hLoadedROMBank]
push af
farcall DisplayTextIDInit ; initialization

View File

@ -31,7 +31,7 @@ HallOfFameResetEventsAndSaveScript:
ld [wLetterPrintingDelayFlags], a
ld hl, wStatusFlags7
res BIT_NO_MAP_MUSIC, [hl]
assert wStatusFlags7 + 1 == wElite4Flags
ASSERT wStatusFlags7 + 1 == wElite4Flags
inc hl
set BIT_UNUSED_BEAT_ELITE_4, [hl] ; unused
xor a ; SCRIPT_*_DEFAULT