From 96fc617c69bca4fe717bd590e03bdd1fae1349e4 Mon Sep 17 00:00:00 2001 From: Engezerstorung <154867622+Engezerstorung@users.noreply.github.com> Date: Tue, 28 Jan 2025 18:08:12 +0100 Subject: Correct wTileMapBackup declared space (#487) --- engine/items/town_map.asm | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'engine/items') diff --git a/engine/items/town_map.asm b/engine/items/town_map.asm index 9c8aea39..cac6f2dd 100644 --- a/engine/items/town_map.asm +++ b/engine/items/town_map.asm @@ -18,9 +18,9 @@ DisplayTownMap: hlcoord 1, 0 ld de, wNameBuffer call PlaceString - ld hl, wShadowOAM - ld de, wTileMapBackup - ld bc, $10 + ld hl, wShadowOAMSprite00 + ld de, wShadowOAMBackupSprite00 + ld bc, 4 * 4 call CopyData ld hl, vSprites tile BIRD_BASE_TILE ld de, TownMapCursor @@ -63,8 +63,8 @@ DisplayTownMap: ld de, wNameBuffer call PlaceString ld hl, wShadowOAMSprite04 - ld de, wTileMapBackup + 16 - ld bc, $10 + ld de, wShadowOAMBackupSprite04 + ld bc, 4 * 4 call CopyData .inputLoop call TownMapSpriteBlinkingAnimation @@ -366,8 +366,8 @@ DrawPlayerOrBirdSprite: cp "@" jr nz, .loop ld hl, wShadowOAM - ld de, wTileMapBackup - ld bc, $a0 + ld de, wShadowOAMBackup + ld bc, NUM_SPRITE_OAM_STRUCTS * 4 jp CopyData DisplayWildLocations: @@ -414,8 +414,8 @@ DisplayWildLocations: call DrawPlayerOrBirdSprite .done ld hl, wShadowOAM - ld de, wTileMapBackup - ld bc, $a0 + ld de, wShadowOAMBackup + ld bc, NUM_SPRITE_OAM_STRUCTS * 4 jp CopyData AreaUnknownText: @@ -602,15 +602,15 @@ TownMapSpriteBlinkingAnimation:: cp 50 jr nz, .done ; show sprites when the counter reaches 50 - ld hl, wTileMapBackup + ld hl, wShadowOAMBackup ld de, wShadowOAM - ld bc, $90 + ld bc, (NUM_SPRITE_OAM_STRUCTS - 4) * 4 call CopyData xor a jr .done .hideSprites ld hl, wShadowOAM - ld b, $24 + ld b, NUM_SPRITE_OAM_STRUCTS - 4 ld de, $4 .hideSpritesLoop ld [hl], $a0 -- cgit v1.3.1-sl0p From afb899016938d03911eaafb85c7caa1c67680210 Mon Sep 17 00:00:00 2001 From: Rangi <35663410+Rangi42@users.noreply.github.com> Date: Tue, 28 Jan 2025 23:31:15 -0500 Subject: Miscellaneous cleanup (#488) Co-authored-by: SatoMew --- data/predef_pointers.asm | 2 +- engine/battle/animations.asm | 4 ++-- engine/battle/core.asm | 1 + engine/battle/trainer_ai.asm | 4 ++-- engine/debug/debug_party.asm | 9 +++++---- engine/events/evolve_trade.asm | 4 ++-- engine/events/hidden_objects/vermilion_gym_trash.asm | 2 +- engine/events/in_game_trades.asm | 2 +- engine/items/item_effects.asm | 12 ++++++------ engine/link/cable_club.asm | 6 +++--- engine/movie/intro.asm | 12 ++++++++---- engine/movie/title.asm | 2 +- engine/pokemon/evos_moves.asm | 4 +++- engine/slots/slot_machine.asm | 4 ++-- home/pokemon.asm | 6 +++++- home/text.asm | 2 +- home/yes_no.asm | 2 +- scripts/HallOfFame.asm | 2 +- 18 files changed, 46 insertions(+), 34 deletions(-) (limited to 'engine/items') diff --git a/data/predef_pointers.asm b/data/predef_pointers.asm index e960d49b..ebf81847 100644 --- a/data/predef_pointers.asm +++ b/data/predef_pointers.asm @@ -61,7 +61,7 @@ PredefPointers:: add_predef BattleTransition add_predef CopyTileIDsFromList add_predef PlayIntro - add_predef GetMoveSoundB + add_predef GetIntroMoveSound add_predef FlashScreen add_predef GetTileAndCoordsInFrontOfPlayer add_predef StatusScreen diff --git a/engine/battle/animations.asm b/engine/battle/animations.asm index 83f30ee2..a6d12012 100644 --- a/engine/battle/animations.asm +++ b/engine/battle/animations.asm @@ -2187,8 +2187,8 @@ AnimCopyRowRight: jr nz, AnimCopyRowRight ret -; get the sound of the move id in b -GetMoveSoundB: +; only used by the unreferenced PlayIntroMoveSound +GetIntroMoveSound: ld a, b call GetMoveSound ld b, a diff --git a/engine/battle/core.asm b/engine/battle/core.asm index a951a072..4e68b5c5 100644 --- a/engine/battle/core.asm +++ b/engine/battle/core.asm @@ -2015,6 +2015,7 @@ DisplayBattleMenu:: call DisplayTextBoxID ; handle menu input if it's not the old man tutorial ld a, [wBattleType] + ASSERT BATTLE_TYPE_OLD_MAN == 1 dec a jp nz, .handleBattleMenuInput ; the following happens for the old man tutorial diff --git a/engine/battle/trainer_ai.asm b/engine/battle/trainer_ai.asm index ccd4e804..6092fc8e 100644 --- a/engine/battle/trainer_ai.asm +++ b/engine/battle/trainer_ai.asm @@ -635,7 +635,7 @@ AICureStatus: res BADLY_POISONED, [hl] ret -AIUseXAccuracy: ; unused +AIUseXAccuracy: ; unreferenced call AIPlayRestoringSFX ld hl, wEnemyBattleStatus2 set USING_X_ACCURACY, [hl] @@ -649,7 +649,7 @@ AIUseGuardSpec: ld a, GUARD_SPEC jp AIPrintItemUse -AIUseDireHit: ; unused +AIUseDireHit: ; unreferenced call AIPlayRestoringSFX ld hl, wEnemyBattleStatus2 set GETTING_PUMPED, [hl] diff --git a/engine/debug/debug_party.asm b/engine/debug/debug_party.asm index c16fe97b..e51f0697 100644 --- a/engine/debug/debug_party.asm +++ b/engine/debug/debug_party.asm @@ -92,7 +92,7 @@ IF DEF(_DEBUG) ; Get some debug items. ld hl, wNumBagItems - ld de, DebugItemsList + ld de, DebugNewGameItemsList .items_loop ld a, [de] cp -1 @@ -116,9 +116,10 @@ IF DEF(_DEBUG) ; Rival chose Squirtle, ; Player chose Charmander. ld hl, wRivalStarter + ASSERT wRivalStarter + 2 == wPlayerStarter ld a, STARTER2 ld [hli], a - inc hl ; hl = wPlayerStarter + inc hl ld a, STARTER1 ld [hl], a @@ -134,7 +135,7 @@ DebugSetPokedexEntries: ld [hl], %01111111 ret -DebugItemsList: +DebugNewGameItemsList: db BICYCLE, 1 db FULL_RESTORE, 99 db FULL_HEAL, 99 @@ -148,7 +149,7 @@ DebugItemsList: db LIFT_KEY, 1 db -1 ; end -DebugUnusedList: +DebugUnusedList: ; unreferenced db -1 ; end ELSE ret diff --git a/engine/events/evolve_trade.asm b/engine/events/evolve_trade.asm index 56069fac..8daf2b05 100644 --- a/engine/events/evolve_trade.asm +++ b/engine/events/evolve_trade.asm @@ -1,4 +1,4 @@ -EvolveTradeMon: +InGameTrade_CheckForTradeEvo: ; Verify the TradeMon's species name before ; attempting to initiate a trade evolution. @@ -34,7 +34,7 @@ EvolveTradeMon: ld a, [wPartyCount] dec a ld [wWhichPokemon], a - ld a, $1 + ld a, TRUE ld [wForceEvolution], a ld a, LINK_STATE_TRADING ld [wLinkState], a diff --git a/engine/events/hidden_objects/vermilion_gym_trash.asm b/engine/events/hidden_objects/vermilion_gym_trash.asm index 92fb1406..28cb15a6 100644 --- a/engine/events/hidden_objects/vermilion_gym_trash.asm +++ b/engine/events/hidden_objects/vermilion_gym_trash.asm @@ -47,7 +47,7 @@ GymTrashScript: add hl, de ld a, [hli] -; There is a bug in this code. It should calculate a value in the range [0, 3] +; Bug: This code should calculate a value in the range [0, 3], ; but if the mask and random number don't have any 1 bits in common, then ; the result of the AND will be 0. When 1 is subtracted from that, the value ; will become $ff. This will result in 255 being added to hl, which will cause diff --git a/engine/events/in_game_trades.asm b/engine/events/in_game_trades.asm index ce4ffe3c..228c6bf8 100644 --- a/engine/events/in_game_trades.asm +++ b/engine/events/in_game_trades.asm @@ -137,7 +137,7 @@ InGameTrade_DoTrade: ld [wMonDataLocation], a call AddPartyMon call InGameTrade_CopyDataToReceivedMon - callfar EvolveTradeMon + callfar InGameTrade_CheckForTradeEvo call ClearScreen call InGameTrade_RestoreScreen farcall RedrawMapView diff --git a/engine/items/item_effects.asm b/engine/items/item_effects.asm index 9643412c..6c87bde0 100644 --- a/engine/items/item_effects.asm +++ b/engine/items/item_effects.asm @@ -468,7 +468,7 @@ ItemUseBall: push hl -; If the Pokémon is transformed, the Pokémon is assumed to be a Ditto. +; Bug: If the Pokémon is transformed, the Pokémon is assumed to be a Ditto. ; This is a bug because a wild Pokémon could have used Transform via ; Mirror Move even though the only wild Pokémon that knows Transform is Ditto. ld hl, wEnemyBattleStatus3 @@ -774,7 +774,7 @@ ItemUseEvoStone: jr c, .canceledItemUse ld a, b ld [wCurPartySpecies], a - ld a, $01 + ld a, TRUE ld [wForceEvolution], a ld a, SFX_HEAL_AILMENT call PlaySoundWaitForCurrent @@ -2077,10 +2077,10 @@ ItemUsePPRestore: ret .fullyRestorePP ld a, [hl] ; move PP -; Note that this code has a bug. It doesn't mask out the upper two bits, which -; are used to count how many PP Ups have been used on the move. So, Max Ethers -; and Max Elixirs will not be detected as having no effect on a move with full -; PP if the move has had any PP Ups used on it. +; Bug: This code doesn't mask out the upper two bits, which are used to count +; how many PP Ups have been used on the move. +; So, Max Ethers and Max Elixirs will not be detected as having no effect on +; a move with full PP if the move has had any PP Ups used on it. cp b ; does current PP equal max PP? ret z jr .storeNewAmount diff --git a/engine/link/cable_club.asm b/engine/link/cable_club.asm index 92a1b596..2bf36f18 100644 --- a/engine/link/cable_club.asm +++ b/engine/link/cable_club.asm @@ -57,8 +57,8 @@ CableClub_DoBattleOrTradeAgain: ld [hli], a dec b jr nz, .zeroPlayerDataPatchListLoop - ld hl, wGrassRate - ld bc, wTrainerHeaderPtr - wGrassRate + ld hl, wLinkEnemyTrainerName + ld bc, wTrainerHeaderPtr - wLinkEnemyTrainerName .zeroEnemyPartyLoop xor a ld [hli], a @@ -818,7 +818,7 @@ TradeCenter_Trade: ld a, [wPartyCount] dec a ld [wWhichPokemon], a - ld a, $1 + ld a, TRUE ld [wForceEvolution], a ld a, [wTradingWhichEnemyMon] ld hl, wEnemyPartySpecies diff --git a/engine/movie/intro.asm b/engine/movie/intro.asm index 552b1358..facbfbaf 100644 --- a/engine/movie/intro.asm +++ b/engine/movie/intro.asm @@ -275,9 +275,8 @@ CopyTileIDsFromList_ZeroBaseTileID: ld c, 0 predef_jump CopyTileIDsFromList -PlayMoveSoundB: -; unused - predef GetMoveSoundB +PlayIntroMoveSound: ; unreferenced + predef GetIntroMoveSound ld a, b jp PlaySound @@ -325,6 +324,7 @@ PlayShootingStar: call DelayFrames farcall AnimateShootingStar push af + ; A `call LoadPresentsGraphic` here was removed in localization pop af jr c, .next ; skip the delay if the user interrupted the animation ld c, 40 @@ -356,7 +356,11 @@ IntroDrawBlackBars: ld c, BG_MAP_WIDTH * 4 jp IntroPlaceBlackTiles -EmptyFunc2: +LoadPresentsGraphic: ; unreferenced + ; This routine loaded the "PRESENTS" text graphic (tiles + ; $67, $68, $69, $6A, $6B, and $6C from gamefreak_presents.2bpp) + ; at coordinates (11, 7) in the Japanese versions. + ; It was dummied out in the English localization. ret IntroNidorinoAnimation0: diff --git a/engine/movie/title.asm b/engine/movie/title.asm index 3c7ca27d..77e4ac38 100644 --- a/engine/movie/title.asm +++ b/engine/movie/title.asm @@ -1,4 +1,4 @@ -CopyDebugName: ; unused +CopyDebugName: ld bc, NAME_LENGTH jp CopyData diff --git a/engine/pokemon/evos_moves.asm b/engine/pokemon/evos_moves.asm index 268e522a..be23f508 100644 --- a/engine/pokemon/evos_moves.asm +++ b/engine/pokemon/evos_moves.asm @@ -94,8 +94,10 @@ Evolution_PartyMonLoop: ; loop over party mons jr .doEvolution .checkItemEvo ld a, [hli] + ; Bug: Wild encounters can cause stone evolutions without + ; having any stones available. This was fixed in Yellow. ld b, a ; evolution item - ld a, [wCurItem] + ld a, [wCurItem] ; same as [wCurPartySpecies] cp b ; was the evolution item in this entry used? jp nz, .nextEvoEntry1 ; if not, go to the next evolution entry .checkLevel diff --git a/engine/slots/slot_machine.asm b/engine/slots/slot_machine.asm index 1ed24a1a..ec72b79a 100644 --- a/engine/slots/slot_machine.asm +++ b/engine/slots/slot_machine.asm @@ -298,8 +298,8 @@ SlotMachine_StopWheel1Early: cp HIGH(SLOTSCHERRY) jr nz, .stopWheel ret -; It looks like this was intended to make the wheel stop when a 7 symbol was -; visible, but it has a bug and so the wheel stops randomly. +; Bug: This looks intended to make the wheel stop when a +; 7 symbol was visible, but instead the wheel stops randomly. .sevenAndBarMode ld c, $3 .loop diff --git a/home/pokemon.asm b/home/pokemon.asm index 7cc5f2d1..afa0d129 100644 --- a/home/pokemon.asm +++ b/home/pokemon.asm @@ -114,7 +114,11 @@ LoadFrontSpriteByMonIndex:: cp NUM_POKEMON + 1 jr c, .validDexNumber ; dex >#151 invalid .invalidDexNumber - ld a, RHYDON ; $1 + ; This is the so-called "Rhydon trap" or "Rhydon glitch" + ; to fail-safe invalid dex numbers + ; (see https://glitchcity.wiki/wiki/Rhydon_trap + ; or https://bulbapedia.bulbagarden.net/wiki/Rhydon_glitch) + ld a, RHYDON ld [wCurPartySpecies], a ret .validDexNumber diff --git a/home/text.asm b/home/text.asm index da884125..112956da 100644 --- a/home/text.asm +++ b/home/text.asm @@ -111,7 +111,7 @@ NextChar:: inc de jp PlaceNextChar -NullChar:: ; unused +NullChar:: ld b, h ld c, l pop hl diff --git a/home/yes_no.asm b/home/yes_no.asm index 3f5a5a45..8d995832 100644 --- a/home/yes_no.asm +++ b/home/yes_no.asm @@ -26,7 +26,7 @@ YesNoChoicePokeCenter:: lb bc, 8, 12 jr DisplayYesNoChoice -WideYesNoChoice:: ; unused +WideYesNoChoice:: ; unreferenced call SaveScreenTilesToBuffer1 ld a, WIDE_YES_NO_MENU ld [wTwoOptionMenuID], a diff --git a/scripts/HallOfFame.asm b/scripts/HallOfFame.asm index ed3d2a73..91be3996 100644 --- a/scripts/HallOfFame.asm +++ b/scripts/HallOfFame.asm @@ -33,7 +33,7 @@ HallOfFameResetEventsAndSaveScript: res BIT_NO_MAP_MUSIC, [hl] assert wStatusFlags7 + 1 == wElite4Flags inc hl - set BIT_UNUSED_BEAT_ELITE_4, [hl] ; debug, unused? + set BIT_UNUSED_BEAT_ELITE_4, [hl] ; unused xor a ; SCRIPT_*_DEFAULT ld hl, wLoreleisRoomCurScript ld [hli], a ; wLoreleisRoomCurScript -- cgit v1.3.1-sl0p From ec37f6117da6c550e70f466118731e8f752e3afb Mon Sep 17 00:00:00 2001 From: Rangi <35663410+Rangi42@users.noreply.github.com> Date: Tue, 28 Jan 2025 23:31:27 -0500 Subject: Consistently capitalize `ASSERT` directives (#489) --- data/moves/moves.asm | 2 +- engine/battle/core.asm | 4 ++-- engine/battle/effects.asm | 4 ++-- engine/events/poison.asm | 2 +- engine/items/item_effects.asm | 2 +- engine/items/town_map.asm | 2 +- engine/menus/main_menu.asm | 14 +++++++------- engine/movie/oak_speech/init_player_data.asm | 2 +- engine/movie/title.asm | 4 ++-- engine/overworld/player_state.asm | 2 +- engine/pokemon/evos_moves.asm | 2 +- engine/slots/slot_machine.asm | 2 +- home/list_menu.asm | 4 ++-- home/text_script.asm | 2 +- scripts/HallOfFame.asm | 2 +- 15 files changed, 25 insertions(+), 25 deletions(-) (limited to 'engine/items') diff --git a/data/moves/moves.asm b/data/moves/moves.asm index f435ab6b..ac638721 100644 --- a/data/moves/moves.asm +++ b/data/moves/moves.asm @@ -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: diff --git a/engine/battle/core.asm b/engine/battle/core.asm index 4e68b5c5..f304af10 100644 --- a/engine/battle/core.asm +++ b/engine/battle/core.asm @@ -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: diff --git a/engine/battle/effects.asm b/engine/battle/effects.asm index 47b13311..439e41e2 100644 --- a/engine/battle/effects.asm +++ b/engine/battle/effects.asm @@ -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 diff --git a/engine/events/poison.asm b/engine/events/poison.asm index c0b4a18f..beb1a312 100644 --- a/engine/events/poison.asm +++ b/engine/events/poison.asm @@ -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] diff --git a/engine/items/item_effects.asm b/engine/items/item_effects.asm index 6c87bde0..162e79a7 100644 --- a/engine/items/item_effects.asm +++ b/engine/items/item_effects.asm @@ -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 diff --git a/engine/items/town_map.asm b/engine/items/town_map.asm index cac6f2dd..18903294 100644 --- a/engine/items/town_map.asm +++ b/engine/items/town_map.asm @@ -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 diff --git a/engine/menus/main_menu.asm b/engine/menus/main_menu.asm index 60bcfcbd..4b430f6a 100644 --- a/engine/menus/main_menu.asm +++ b/engine/menus/main_menu.asm @@ -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 diff --git a/engine/movie/oak_speech/init_player_data.asm b/engine/movie/oak_speech/init_player_data.asm index 6b0a1a11..843eb96e 100644 --- a/engine/movie/oak_speech/init_player_data.asm +++ b/engine/movie/oak_speech/init_player_data.asm @@ -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 diff --git a/engine/movie/title.asm b/engine/movie/title.asm index 77e4ac38..bad1df92 100644 --- a/engine/movie/title.asm +++ b/engine/movie/title.asm @@ -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 diff --git a/engine/overworld/player_state.asm b/engine/overworld/player_state.asm index 4da437da..a5d3ee3e 100644 --- a/engine/overworld/player_state.asm +++ b/engine/overworld/player_state.asm @@ -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 diff --git a/engine/pokemon/evos_moves.asm b/engine/pokemon/evos_moves.asm index be23f508..afae4396 100644 --- a/engine/pokemon/evos_moves.asm +++ b/engine/pokemon/evos_moves.asm @@ -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] diff --git a/engine/slots/slot_machine.asm b/engine/slots/slot_machine.asm index ec72b79a..48cf27de 100644 --- a/engine/slots/slot_machine.asm +++ b/engine/slots/slot_machine.asm @@ -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 diff --git a/home/list_menu.asm b/home/list_menu.asm index f04684a3..646e7b7f 100644 --- a/home/list_menu.asm +++ b/home/list_menu.asm @@ -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? diff --git a/home/text_script.asm b/home/text_script.asm index c1606371..f3015b66 100644 --- a/home/text_script.asm +++ b/home/text_script.asm @@ -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 diff --git a/scripts/HallOfFame.asm b/scripts/HallOfFame.asm index 91be3996..c6ecf4ec 100644 --- a/scripts/HallOfFame.asm +++ b/scripts/HallOfFame.asm @@ -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 -- cgit v1.3.1-sl0p