diff options
41 files changed, 173 insertions, 183 deletions
diff --git a/data/facing.asm b/data/facing.asm index 3e965132..944a31c8 100644 --- a/data/facing.asm +++ b/data/facing.asm @@ -118,7 +118,7 @@ SpriteFacingRightAndWalking: db $08,$08,$8a,OAMFLAG_VFLIPPED | OAMFLAG_CANBEMASKED ; bottom left db $08,$00,$8b,OAMFLAG_VFLIPPED | OAMFLAG_CANBEMASKED | OAMFLAG_ENDOFDATA ; bottom right -SpriteSpecialCase ; 40ec (1:40ec) +SpriteSpecialCase db $09 ; Sprite OAM Parameters db -$4,-$4,$00,$00 diff --git a/engine/HoF_room_pc.asm b/engine/HoF_room_pc.asm index d18ebca5..9c1c0fd2 100755 --- a/engine/HoF_room_pc.asm +++ b/engine/HoF_room_pc.asm @@ -39,18 +39,18 @@ HallOfFamePC: jp Credits FadeInCreditsText: - ld a, $1 + ld a, 1 ld [H_AUTOBGTRANSFERENABLED], a ld hl, HoFGBPalettes ld b, 4 -.asm_f0f91 +.loop ld a, [hli] ld [rBGP], a call UpdateGBCPal_BGP ld c, 5 call DelayFrames dec b - jr nz, .asm_f0f91 + jr nz, .loop ret HoFGBPalettes: @@ -76,7 +76,7 @@ DisplayCreditsMon: call LoadScreenTilesFromBuffer2DisableBGTransfer ld hl, vBGMap0 call CreditsCopyTileMapToVRAM - ld a, %11111100 + ld a, %11111100 ; make the mon a black silhouette ld [rBGP], a call UpdateGBCPal_BGP ld hl, rLCDC @@ -100,14 +100,13 @@ DisplayCreditsMon: ret ScrollCreditsMonLeft: -.asm_f0fff ld a, b ld [hSCX], a add 8 ld b, a call DelayFrame dec c - jr nz, .asm_f0fff + jr nz, ScrollCreditsMonLeft ret GetNextCreditsMon: @@ -129,10 +128,10 @@ INCLUDE "data/credit_mons.asm" CreditsCopyTileMapToVRAM: ld a, l - ld [$ffbc], a + ld [H_AUTOBGTRANSFERDEST], a ld a, h - ld [$ffbd], a - ld a, $1 + ld [H_AUTOBGTRANSFERDEST + 1], a + ld a, 1 ld [H_AUTOBGTRANSFERENABLED], a jp Delay3 @@ -154,24 +153,24 @@ CreditsLoadFont: ret ZeroMemory: -.asm_f1071 +; zero bc bytes at hl ld [hl], 0 inc hl inc hl dec bc ld a, b or c - jr nz, .asm_f1071 + jr nz, ZeroMemory ret FillFourRowsWithBlack: - ld bc, 4 * SCREEN_WIDTH + ld bc, SCREEN_WIDTH * 4 ld a, $7e jp FillMemory FillMiddleOfScreenWithWhite: coord hl, 0, 4 - ld bc, 10 * SCREEN_WIDTH + ld bc, SCREEN_WIDTH * 10 ld a, " " jp FillMemory @@ -193,19 +192,19 @@ FillHalfOfScreenWithWhite: ld b, 10 ld c, 10 ld a, " " -.asm_f10a6 +.loop push bc push hl -.asm_f10a8 +.innerLoop ld [hli], a dec c - jr nz, .asm_f10a8 + jr nz, .innerLoop pop hl ld bc, SCREEN_WIDTH add hl, bc pop bc dec b - jr nz, .asm_f10a6 + jr nz, .loop ret Credits: ; Roll credits @@ -322,4 +321,3 @@ INCLUDE "text/credits_text.asm" TheEndGfx: INCBIN "gfx/theend.interleave.2bpp" TheEndGfxEnd: - diff --git a/engine/battle/animations.asm b/engine/battle/animations.asm index 8df31e1c..8c095daf 100755 --- a/engine/battle/animations.asm +++ b/engine/battle/animations.asm @@ -1034,6 +1034,7 @@ TailWhipAnimationUnused: ld c, 20 jp DelayFrames +; Format: Special Effect ID (1 byte), Address (2 bytes) SpecialEffectPointers: db SE_DARK_SCREEN_FLASH ; $FE dw AnimationFlashScreen diff --git a/engine/battle/battle_transitions.asm b/engine/battle/battle_transitions.asm index a4871837..2f3e4e91 100644 --- a/engine/battle/battle_transitions.asm +++ b/engine/battle/battle_transitions.asm @@ -1,5 +1,5 @@ BattleTransition: - ld a, $1 + ld a, 1 ld [H_AUTOBGTRANSFERENABLED], a call Delay3 xor a @@ -363,7 +363,7 @@ BattleTransition_FlashScreen_: jr z, .done ld [rBGP], a call UpdateGBCPal_BGP - ld c, $2 + ld c, 2 call DelayFrames jr .loop .done @@ -377,7 +377,7 @@ BattleTransition_FlashScreenPalettes: ; used for low level trainer dungeon battles BattleTransition_Shrink: - ld c,9 + ld c, 9 .loop push bc xor a @@ -411,7 +411,7 @@ BattleTransition_Shrink: ; used for high level trainer dungeon battles BattleTransition_Split: - ld c,$9 + ld c, 9 xor a ld [H_AUTOBGTRANSFERENABLED], a .loop @@ -632,7 +632,7 @@ BattleTransition_Circle_Sub1: ret BattleTransition_TransferDelay3: - ld a, $1 + ld a, 1 ld [H_AUTOBGTRANSFERENABLED], a call Delay3 xor a diff --git a/engine/battle/common_text.asm b/engine/battle/common_text.asm index 02bb1a61..d84d0300 100644 --- a/engine/battle/common_text.asm +++ b/engine/battle/common_text.asm @@ -1,5 +1,5 @@ PrintBeginningBattleText: - ld a, [wIsInBattle] ; W_ISINBATTLE + ld a, [wIsInBattle] dec a jr nz, .trainerBattle ld a, [wCurMap] @@ -80,7 +80,7 @@ PrintBeginningBattleText: ld [wFrequencyModifier], a ld a, $80 ld [wTempoModifier], a - ld a, $e9 ; (SFX_08_77 - SFX_Headers_08) / 3 + ld a, SFX_SILPH_SCOPE call PlaySound jp WaitForSoundToFinish .done diff --git a/engine/battle/core.asm b/engine/battle/core.asm index 51701157..fbbe144b 100755 --- a/engine/battle/core.asm +++ b/engine/battle/core.asm @@ -1227,7 +1227,7 @@ ChooseNextMon: ld a, [wLinkState] cp LINK_STATE_BATTLING jr nz, .notLinkBattle - ld a, $1 + ld a, 1 ld [wActionResultOrTookBattleTurn], a call LinkBattleExchangeData .notLinkBattle @@ -1956,7 +1956,7 @@ AnimateRetreatingPlayerMon: .clearScreenArea coord hl, 1, 5 lb bc, 7, 7 - call ClearScreenArea ; jp + call ClearScreenArea ret ; reads player's current mon's HP into wBattleMonHP @@ -2561,7 +2561,7 @@ PartyMenuOrRockOrRun: predef StatusScreen predef StatusScreen2 ; now we need to reload the enemy mon pic - ld a, $1 + ld a, 1 ld [H_WHOSETURN], a ld a, [wEnemyBattleStatus2] bit HasSubstituteUp, a ; does the enemy mon have a substitute? @@ -2961,7 +2961,7 @@ AnyMoveToSelect: jr .noMovesLeft .handleDisabledMove swap a - and $f ; get move disabled + and $f ; get disabled move ld b, a ld d, NUM_MOVES + 1 xor a @@ -3379,7 +3379,7 @@ getPlayerAnimationType: ld a,4 ; move has no effect other than dealing damage jr z,playPlayerMoveAnimation ld a,5 ; move has effect -playPlayerMoveAnimation +playPlayerMoveAnimation: push af ld a,[wPlayerBattleStatus2] bit HasSubstituteUp,a @@ -3398,7 +3398,7 @@ playPlayerMoveAnimation ld b,BANK(ReshowSubstituteAnim) call nz,Bankswitch jr MirrorMoveCheck -playerCheckIfFlyOrChargeEffect +playerCheckIfFlyOrChargeEffect: ld c,30 call DelayFrames ld a,[wPlayerMoveEffect] @@ -4105,7 +4105,7 @@ PrintMoveFailureText: ret nz ; if you get here, the mon used jump kick or hi jump kick and missed - ld hl, wDamage ; since the move missed, W_DAMAGE will always contain 0 at this point. + ld hl, wDamage ; since the move missed, wDamage will always contain 0 at this point. ; Thus, recoil damage will always be equal to 1 ; even if it was intended to be potential damage/8. ld a, [hli] diff --git a/engine/battle/decrement_pp.asm b/engine/battle/decrement_pp.asm index 984af087..e23a85ba 100644 --- a/engine/battle/decrement_pp.asm +++ b/engine/battle/decrement_pp.asm @@ -33,7 +33,7 @@ DecrementPP: ld a, [wPlayerMonNumber] ; which mon in party is active ld bc, wPartyMon2 - wPartyMon1 call AddNTimes ; calculate address of the mon to modify -.DecrementPP +.DecrementPP: ld a, [wPlayerMoveListIndex] ; which move (0, 1, 2, 3) did we use? ld c, a ld b, 0 diff --git a/engine/battle/get_trainer_name.asm b/engine/battle/get_trainer_name.asm index e051a02a..36ca019e 100644 --- a/engine/battle/get_trainer_name.asm +++ b/engine/battle/get_trainer_name.asm @@ -19,7 +19,6 @@ GetTrainerName_: call GetName ld hl, wcd6d .foundName -.rival ld de, wTrainerName ld bc, $d jp CopyData diff --git a/engine/battle/link_battle_versus_text.asm b/engine/battle/link_battle_versus_text.asm index 5edf13e6..63142ba6 100644 --- a/engine/battle/link_battle_versus_text.asm +++ b/engine/battle/link_battle_versus_text.asm @@ -2,7 +2,7 @@ DisplayLinkBattleVersusTextBox: call LoadTextBoxTilePatterns coord hl, 3, 4 - ld bc, $70c + lb bc, 7, 12 call TextBoxBorder coord hl, 4, 5 ld de, wPlayerName diff --git a/engine/cable_club.asm b/engine/cable_club.asm index a6552939..d7b5bdc8 100755 --- a/engine/cable_club.asm +++ b/engine/cable_club.asm @@ -253,7 +253,7 @@ CableClub_DoBattleOrTradeAgain: ld hl, wEnemyMons + (SERIAL_PREAMBLE_BYTE - 1) dec c jr nz, .unpatchEnemyMonsLoop - ld a, wEnemyMonOT & $ff + ld a, wEnemyMonOT % $100 ld [wUnusedCF8D], a ld a, wEnemyMonOT / $100 ld [wUnusedCF8D + 1], a @@ -268,7 +268,7 @@ CableClub_DoBattleOrTradeAgain: cp LINK_STATE_START_BATTLE ld a, LINK_STATE_TRADING ld [wLinkState], a - jr nz, .asm_55a0 + jr nz, .trading ld a, LINK_STATE_BATTLING ld [wLinkState], a ld a, OPP_SONY1 @@ -288,7 +288,7 @@ CableClub_DoBattleOrTradeAgain: ld [wLetterPrintingDelayFlags], a predef HealParty jp ReturnToCableClubRoom -.asm_55a0 +.trading ld c, BANK(Music_GameCorner) ld a, MUSIC_GAME_CORNER call PlayMusic @@ -446,7 +446,6 @@ TradeCenter_SelectMon: ld a, [wEnemyPartyCount] dec a cp b - ; continue jr nc, .notPastLastEnemyMon ; when switching to the enemy mon menu, if the menu selection would be past the last enemy mon, select the last enemy mon ld [wCurrentMenuItem], a @@ -851,7 +850,6 @@ TradeCenter_Trade: .usingExternalClock predef ExternalClockTradeAnim .tradeCompleted -; continue callab TryEvolvingMon call ClearScreen call LoadTrainerInfoTextBoxTiles @@ -973,10 +971,10 @@ CableClub_TextBoxBorder: ; c = width CableClub_DrawHorizontalLine: ld d, c -.drawHorizontalLineLoop +.loop ld [hli], a dec d - jr nz, .drawHorizontalLineLoop + jr nz, .loop ret LoadTrainerInfoTextBoxTiles: diff --git a/engine/clear_save.asm b/engine/clear_save.asm index ab2a6aa8..f2acbf32 100755 --- a/engine/clear_save.asm +++ b/engine/clear_save.asm @@ -1,4 +1,4 @@ -DoClearSaveDialogue: ; DoClearSaveDialogue: +DoClearSaveDialogue: call ClearScreen call RunDefaultPaletteCommand call LoadFontTilePatterns diff --git a/engine/evos_moves.asm b/engine/evos_moves.asm index 537bbef0..8ec2c4c7 100755 --- a/engine/evos_moves.asm +++ b/engine/evos_moves.asm @@ -24,8 +24,7 @@ EvolutionAfterBattle: ld hl, wPartyCount push hl -Evolution_PartyMonLoop: -; loop over party mons +Evolution_PartyMonLoop: ; loop over party mons ld hl, wWhichPokemon inc [hl] pop hl diff --git a/engine/gamefreak.asm b/engine/gamefreak.asm index 001445bd..5472a56e 100755 --- a/engine/gamefreak.asm +++ b/engine/gamefreak.asm @@ -39,7 +39,7 @@ AnimateShootingStar: push bc .bigStarInnerLoop ld a, [hl] ; Y - add 4 ; y + add 4 ld [hli], a ld a, [hl] ; X add -4 @@ -60,11 +60,11 @@ AnimateShootingStar: .next cp b jr nz, .bigStarLoop + +; Clear big star OAM. ld hl, wOAMBuffer ld c, 4 ld de, 4 - -; Clear big star OAM. .clearOAMLoop ld [hl], 160 add hl, de @@ -83,6 +83,7 @@ AnimateShootingStar: ret c dec b jr nz, .flashLogoLoop + ; Copy 24 instances of the small stars OAM data. ; Note that their coordinates put them off-screen. ld de, wOAMBuffer @@ -98,7 +99,7 @@ AnimateShootingStar: ; Animate the small stars falling from the Gamefreak logo. xor a - ld [wMoveDownSmallStarsOAMCount], a ; wWhichTrade + ld [wMoveDownSmallStarsOAMCount], a ld hl, SmallStarsWaveCoordsPointerTable ld c, 6 .smallStarsLoop @@ -214,7 +215,7 @@ MoveDownSmallStars: ld de, -4 ld c, a .innerLoop - inc [hl] + inc [hl] ; Y add hl, de dec c jr nz, .innerLoop diff --git a/engine/hall_of_fame.asm b/engine/hall_of_fame.asm index acd22ffe..61ed65c8 100755 --- a/engine/hall_of_fame.asm +++ b/engine/hall_of_fame.asm @@ -33,8 +33,8 @@ AnimateHallOfFame: .skipInc ld a, $90 ld [hWY], a - ld c, $1f ; BANK(Music_HallOfFame) - ld a, $ca ; MUSIC_HALL_OF_FAME + ld c, BANK(Music_HallOfFame) + ld a, MUSIC_HALL_OF_FAME call PlayMusic ld hl, wPartySpecies ld c, $ff @@ -151,7 +151,7 @@ HoFShowMonOrPlayer: HoFDisplayAndRecordMonInfo: ld a, [wHoFPartyMonIndex] - ld hl, wPartyMonNicks ; wPartyMonNicks + ld hl, wPartyMonNicks call GetPartyMonName call HoFDisplayMonInfo ld a, [wHoFPartyMonIndex] @@ -218,7 +218,8 @@ HoFLoadPlayerPics: ld c, $1 HoFLoadMonPlayerPicTileIDs: - ld b, $0 +; c = base tile ID + ld b, 0 coord hl, 12, 5 predef_jump CopyTileIDsFromList diff --git a/engine/hidden_object_functions17.asm b/engine/hidden_object_functions17.asm index 2279225e..8269bbed 100755 --- a/engine/hidden_object_functions17.asm +++ b/engine/hidden_object_functions17.asm @@ -122,22 +122,22 @@ LinkCableHelp: ld hl, LinkCableHelpText1 call PrintText xor a - ld [wMenuItemOffset], a + ld [wMenuItemOffset], a ; not used ld [wCurrentMenuItem], a ld [wLastMenuItem], a ld a, A_BUTTON | B_BUTTON ld [wMenuWatchedKeys], a - ld a, $3 + ld a, 3 ld [wMaxMenuItem], a - ld a, $2 + ld a, 2 ld [wTopMenuItemY], a - ld a, $1 + ld a, 1 ld [wTopMenuItemX], a .linkHelpLoop ld hl, wd730 set 6, [hl] coord hl, 0, 0 - lb bc, $8, $d + lb bc, 8, 13 call TextBoxBorder coord hl, 2, 2 ld de, HowToLinkText @@ -148,13 +148,13 @@ LinkCableHelp: bit 1, a ; pressed b jr nz, .exit ld a, [wCurrentMenuItem] - cp $3 ; pressed a on "STOP READING" + cp 3 ; pressed a on "STOP READING" jr z, .exit ld hl, wd730 res 6, [hl] ld hl, LinkCableInfoTexts add a - ld d, $0 + ld d, 0 ld e, a add hl, de ld a, [hli] @@ -210,11 +210,11 @@ ViridianSchoolBlackboard: ld [wLastMenuItem], a ld a, D_LEFT | D_RIGHT | A_BUTTON | B_BUTTON ld [wMenuWatchedKeys], a - ld a, $2 + ld a, 2 ld [wMaxMenuItem], a - ld a, $2 + ld a, 2 ld [wTopMenuItemY], a - ld a, $1 + ld a, 1 ld [wTopMenuItemX], a .blackboardLoop ld hl, wd730 @@ -236,24 +236,24 @@ ViridianSchoolBlackboard: bit 4, a ; pressed right jr z, .didNotPressRight ; move cursor to right column - ld a, $2 + ld a, 2 ld [wMaxMenuItem], a - ld a, $2 + ld a, 2 ld [wTopMenuItemY], a - ld a, $6 + ld a, 6 ld [wTopMenuItemX], a - ld a, $3 ; in the the right column, use an offset to prevent overlap + ld a, 3 ; in the the right column, use an offset to prevent overlap ld [wMenuItemOffset], a jr .blackboardLoop .didNotPressRight bit 5, a ; pressed left jr z, .didNotPressLeftOrRight ; move cursor to left column - ld a, $2 + ld a, 2 ld [wMaxMenuItem], a - ld a, $2 + ld a, 2 ld [wTopMenuItemY], a - ld a, $1 + ld a, 1 ld [wTopMenuItemX], a xor a ld [wMenuItemOffset], a @@ -261,9 +261,9 @@ ViridianSchoolBlackboard: .didNotPressLeftOrRight ld a, [wCurrentMenuItem] ld b, a - ld a, [wAnimationID] + ld a, [wMenuItemOffset] add b - cp $5 ; cursor is pointing to "QUIT" + cp 5 ; cursor is pointing to "QUIT" jr z, .exitBlackboard ; we must have pressed a on a status condition ; so print the text @@ -271,7 +271,7 @@ ViridianSchoolBlackboard: res 6, [hl] ld hl, ViridianBlackboardStatusPointers add a - ld d, $0 + ld d, 0 ld e, a add hl, de ld a, [hli] diff --git a/engine/hidden_object_functions18.asm b/engine/hidden_object_functions18.asm index f96f0e3a..1bb31e00 100755 --- a/engine/hidden_object_functions18.asm +++ b/engine/hidden_object_functions18.asm @@ -201,4 +201,4 @@ OpenPokemonCenterPC: tx_pre_jump PokemonCenterPCText PokemonCenterPCText: - db $F9 ; FuncTX_PokemonCenterPC + TX_POKECENTER_PC diff --git a/engine/hidden_object_functions3.asm b/engine/hidden_object_functions3.asm index 06dc7560..9456e76f 100755 --- a/engine/hidden_object_functions3.asm +++ b/engine/hidden_object_functions3.asm @@ -81,9 +81,9 @@ IndigoPlateauStatues: ld a, [wXCoord] bit 0, a ld hl, IndigoPlateauStatuesText2 - jr nz, .asm_fa61 + jr nz, .ok ld hl, IndigoPlateauStatuesText3 -.asm_fa61 +.ok call PrintText jp TextScriptEnd @@ -104,12 +104,12 @@ BookOrSculptureText: ld hl, PokemonBooksText ld a, [wCurMapTileset] cp MANSION ; Celadon Mansion tileset - jr nz, .asm_fa8b + jr nz, .ok aCoord 8, 6 cp $38 - jr nz, .asm_fa8b + jr nz, .ok ld hl, DiglettSculptureText -.asm_fa8b +.ok call PrintText jp TextScriptEnd diff --git a/engine/hidden_object_functions7.asm b/engine/hidden_object_functions7.asm index 691d05f2..a8676fed 100755 --- a/engine/hidden_object_functions7.asm +++ b/engine/hidden_object_functions7.asm @@ -85,7 +85,7 @@ SafariZoneGameOver: ld a, $5 ld [wSafariZoneEntranceCurScript], a SetEvent EVENT_SAFARI_GAME_OVER - ld a, $1 + ld a, 1 ld [wSafariZoneGameOver], a ret @@ -138,7 +138,7 @@ CinnabarGymQuiz: ld [$ffdc], a ld a, [hGymGateIndex] ld hl, CinnabarGymQuizIntroText - cp $1 + cp 1 jr z, .onFirstQuestion ld hl, CinnabarGymQuizShortIntroText .onFirstQuestion @@ -154,7 +154,7 @@ CinnabarGymQuiz: ld h, [hl] ld l, a call PrintText - ld a, $1 + ld a, 1 ld [wDoNotWaitForButtonPressAfterDisplayingText], a call CinnabarGymQuiz_1ea92 jp TextScriptEnd @@ -435,16 +435,16 @@ BillsHousePokemonList: ld hl, BillsHousePokemonListText1 call PrintText xor a - ld [wMenuItemOffset], a + ld [wMenuItemOffset], a ; not used ld [wCurrentMenuItem], a ld [wLastMenuItem], a ld a, A_BUTTON | B_BUTTON ld [wMenuWatchedKeys], a - ld a, $4 + ld a, 4 ld [wMaxMenuItem], a - ld a, $2 + ld a, 2 ld [wTopMenuItemY], a - ld a, $1 + ld a, 1 ld [wTopMenuItemX], a .billsPokemonLoop ld hl, wd730 diff --git a/engine/hp_bar.asm b/engine/hp_bar.asm index b4abf028..566a7b61 100755 --- a/engine/hp_bar.asm +++ b/engine/hp_bar.asm @@ -87,6 +87,7 @@ UpdateHPBar2: call UpdateHPBar_CompareNewHPToOldHP jr z, .animateHPBarDone jr nc, .HPIncrease +; HP decrease dec bc ; subtract 1 HP ld a, c ld [wHPBarNewHP], a @@ -95,7 +96,7 @@ UpdateHPBar2: call UpdateHPBar_CalcOldNewHPBarPixels ld a, e sub d ; calc pixel difference - jr .asm_f90e + jr .ok .HPIncrease inc bc ; add 1 HP ld a, c @@ -105,7 +106,7 @@ UpdateHPBar2: call UpdateHPBar_CalcOldNewHPBarPixels ld a, d sub e ; calc pixel difference -.asm_f90e +.ok call UpdateHPBar_PrintHPNumber and a jr z, .noPixelDifference diff --git a/engine/in_game_trades.asm b/engine/in_game_trades.asm index 20069e30..60719c7e 100755 --- a/engine/in_game_trades.asm +++ b/engine/in_game_trades.asm @@ -133,7 +133,7 @@ InGameTrade_DoTrade: and a ld a,$3 jr .tradeSucceeded -.tradeFailed ; never jumped to +.tradeFailed scf .tradeSucceeded ld [wInGameTradeTextPointerTableIndex],a diff --git a/engine/items/items.asm b/engine/items/items.asm index 3fb4b7e1..984cc381 100755 --- a/engine/items/items.asm +++ b/engine/items/items.asm @@ -3211,7 +3211,6 @@ FindWildLocationsOfMon: inc hl inc c jr .loop - .done ld a, $ff ; list terminator ld [de], a diff --git a/engine/menu/bills_pc.asm b/engine/menu/bills_pc.asm index 57699b8f..eddccc29 100644 --- a/engine/menu/bills_pc.asm +++ b/engine/menu/bills_pc.asm @@ -254,7 +254,7 @@ BillsPCDeposit: call WaitForSoundToFinish ld hl, wBoxNumString ld a, [wCurrentBoxNum] - and " " + and $7f cp 9 jr c, .singleDigitBoxNum sub 9 @@ -423,7 +423,7 @@ HMMoveArray: db SURF db STRENGTH db FLASH - db $ff + db -1 DisplayDepositWithdrawMenu: coord hl, 9, 10 @@ -595,3 +595,4 @@ JustAMomentText:: OpenBillsPCText:: db $FD ; FuncTX_BillsPC + diff --git a/engine/menu/pc.asm b/engine/menu/pc.asm index b31970c8..c9e2cf08 100755 --- a/engine/menu/pc.asm +++ b/engine/menu/pc.asm @@ -123,10 +123,10 @@ RemoveItemByID: ld [hItemToRemoveIndex], a .loop ld a, [hli] - cp $ff ; have we reached the cancel button (terminator) + cp -1 ; reached terminator? ret z - cp b ; is the current item the item we want? - jr z, .foundItem ; if so, remove it from the inventory + cp b + jr z, .foundItem inc hl ld a, [hItemToRemoveIndex] inc a diff --git a/engine/menu/pokedex.asm b/engine/menu/pokedex.asm index 5bc8f119..166e026d 100755 --- a/engine/menu/pokedex.asm +++ b/engine/menu/pokedex.asm @@ -393,7 +393,6 @@ Pokedex_PlacePokemonList: jr nz, .getPokemonName ; if the player has seen the pokemon ld de, .dashedLine ; print a dashed line in place of the name if the player hasn't seen the pokemon jr .skipGettingName - .dashedLine ; for unseen pokemon in the list db "----------@" .getPokemonName @@ -519,10 +518,9 @@ DrawDexEntryOnScreen: ld a, $6c ; lower left corner tile Coorda 0, 17 ld a, $6e ; lower right corner tile - Coorda 19, 17 - coord hl, 0, 9 + coord hl, 0, 9 ld de, PokedexDataDividerLine call PlaceString ; draw horizontal divider line diff --git a/engine/menu/prize_menu.asm b/engine/menu/prize_menu.asm index 2a8dcb83..d1b1be3c 100755 --- a/engine/menu/prize_menu.asm +++ b/engine/menu/prize_menu.asm @@ -33,7 +33,7 @@ CeladonPrizeMenu: bit 1,a ; keypress = B (Cancel) jr nz, .noChoice ld a,[wCurrentMenuItem] - cp $03 ; "NO,THANKS" choice + cp 3 ; "NO,THANKS" choice jr z, .noChoice call HandlePrizeChoice .noChoice @@ -68,7 +68,7 @@ GetPrizeMenuId: ld [wWhichPrizeWindow], a ; prize-texts' id (relative, i.e. 0, 1 or 2) add a add a - ld d, $0 + ld d, 0 ld e, a ld hl, PrizeDifferentMenuPtrs add hl, de @@ -84,10 +84,10 @@ GetPrizeMenuId: ld h, [hl] ld l, a ld de, wPrize1Price - ld bc, $6 + ld bc, 6 call CopyData ld a, [wWhichPrizeWindow] - cp $02 ;is TM_menu? + cp 2 ;is TM_menu? jr nz, .putMonName ld a, [wPrize1] ld [wd11e], a @@ -155,10 +155,10 @@ PrintPrizePrice: call TextBoxBorder call UpdateSprites coord hl, 12, 0 - ld de, CoinString + ld de, .CoinString call PlaceString coord hl, 13, 1 - ld de, SixSpacesString + ld de, .SixSpacesString call PlaceString coord hl, 13, 1 ld de,wPlayerCoins @@ -166,16 +166,16 @@ PrintPrizePrice: call PrintBCDNumber ret -CoinString: +.CoinString: db "COIN@" -SixSpacesString: +.SixSpacesString: db " @" LoadCoinsToSubtract: ld a,[wWhichPrize] add a - ld d, $0 + ld d, 0 ld e, a ld hl, wPrize1Price add hl, de ; get selected prize's price @@ -190,14 +190,14 @@ LoadCoinsToSubtract: HandlePrizeChoice: ld a, [wCurrentMenuItem] ld [wWhichPrize], a - ld d, $0 + ld d, 0 ld e, a ld hl, wPrize1 add hl, de ld a, [hl] ld [wd11e], a ld a, [wWhichPrizeWindow] - cp $02 ; is prize a TM? + cp 2 ; is prize a TM? jr nz, .getMonName call GetItemName jr .givePrize @@ -261,7 +261,7 @@ HandlePrizeChoice: ld hl,OhFineThenTextPtr jp PrintText -UnknownData528b1: +UnknownPrizeData: ; XXX what's this? db $00,$01,$00,$01,$00,$01,$00,$00,$01 diff --git a/engine/menu/start_menu.asm b/engine/menu/start_menu.asm index 16a9973d..af687432 100755 --- a/engine/menu/start_menu.asm +++ b/engine/menu/start_menu.asm @@ -2,7 +2,7 @@ DisplayStartMenu:: switchbank StartMenu_Pokedex ; also bank for other functions ld a, [wWalkBikeSurfState] ; walking/biking/surfing ld [wWalkBikeSurfStateCopy], a - ld a, $8f ; (SFX_02_3f - SFX_Headers_02) / 3 ; Start menu sound + ld a, SFX_START_MENU call PlaySound RedisplayStartMenu:: @@ -23,7 +23,7 @@ RedisplayStartMenu_DoNotDrawStartMenu: and a jr nz, .loop ; if the player pressed tried to go past the top item, wrap around to the bottom - CheckEvent EVENT_GOT_POKEDEX ; does the player have the pokedex? + CheckEvent EVENT_GOT_POKEDEX ld a, 6 ; there are 7 menu items with the pokedex, so the max index is 6 jr nz, .wrapMenuItemId dec a ; there are only 6 menu items without the pokedex @@ -35,7 +35,7 @@ RedisplayStartMenu_DoNotDrawStartMenu: bit 7, a jr z, .buttonPressed ; if the player pressed tried to go past the bottom item, wrap around to the top - CheckEvent EVENT_GOT_POKEDEX ; does the player have the pokedex? + CheckEvent EVENT_GOT_POKEDEX ld a, [wCurrentMenuItem] ld c, 7 ; there are 7 menu items with the pokedex jr nz, .checkIfPastBottom @@ -56,7 +56,7 @@ RedisplayStartMenu_DoNotDrawStartMenu: and a, %00001010 ; was the Start button or B button pressed? jp nz, CloseStartMenu call SaveScreenTilesToBuffer2 ; copy background from wTileMap to wTileMapBackup2 - CheckEvent EVENT_GOT_POKEDEX ; does the player have the pokedex? + CheckEvent EVENT_GOT_POKEDEX ld a, [wCurrentMenuItem] jr nz, .displayMenuItem inc a ; adjust position to account for missing pokedex menu item diff --git a/engine/menu/start_sub_menus.asm b/engine/menu/start_sub_menus.asm index d49f7502..f3ba8207 100755 --- a/engine/menu/start_sub_menus.asm +++ b/engine/menu/start_sub_menus.asm @@ -239,7 +239,7 @@ StartMenu_Pokemon: res 4,[hl] ld c,60 call DelayFrames - call GBPalWhiteOutWithDelay3 ; zero all three palettes and wait 3 frames + call GBPalWhiteOutWithDelay3 jp .goBackToMap .warpToLastPokemonCenterText TX_FAR _WarpToLastPokemonCenterText diff --git a/engine/overworld/emotion_bubbles.asm b/engine/overworld/emotion_bubbles.asm index 7c7f5e7d..3b02fd55 100755 --- a/engine/overworld/emotion_bubbles.asm +++ b/engine/overworld/emotion_bubbles.asm @@ -3,7 +3,7 @@ EmotionBubble: and $f swap a ld c, a - ld b, $0 + ld b, 0 ld hl, EmotionBubbles add hl, bc ; each emotion bubble is 16 bytes, so calculate the offset directly instead of with a pointer table add hl, bc @@ -64,7 +64,7 @@ EmotionBubble: call DelayFrame call UpdateSprites ret - ; jp UpdateSprites + EmotionBubblesOAM: db $F8,$00,$F9,$00 diff --git a/engine/overworld/healing_machine.asm b/engine/overworld/healing_machine.asm index 4648f68b..ed733d7d 100755 --- a/engine/overworld/healing_machine.asm +++ b/engine/overworld/healing_machine.asm @@ -21,13 +21,13 @@ AnimateHealingMachine: call StopAllMusic .waitLoop ld a, [wAudioFadeOutControl] - and a - jr nz, .waitLoop - ld a, [wPartyCount] ; wPartyCount + and a ; is fade-out finished? + jr nz, .waitLoop ; if not, check again + ld a, [wPartyCount] ld b, a .partyLoop call CopyHealingMachineOAM - ld a, $9e ; (SFX_02_4a - SFX_Headers_02) / 3 + ld a, SFX_HEALING_MACHINE call PlaySound ld c, 30 call DelayFrames @@ -38,18 +38,18 @@ AnimateHealingMachine: ld [wAudioSavedROMBank], a jr nz, .next call StopAllMusic - ld a, $2 ; BANK(Music_PkmnHealed) + ld a, BANK(Music_PkmnHealed) ld [wAudioROMBank], a .next - ld a, $e8 ; MUSIC_PKMN_HEALED + ld a, MUSIC_PKMN_HEALED ld [wNewSoundID], a call PlaySound ld d, $28 call FlashSprite8Times .waitLoop2 ld a, [wChannelSoundIDs] - cp $e8 ; MUSIC_PKMN_HEALED - jr z, .waitLoop2 + cp MUSIC_PKMN_HEALED ; is the healed music still playing? + jr z, .waitLoop2 ; if so, check gain ld c, 32 call DelayFrames pop af diff --git a/engine/overworld/map_sprites.asm b/engine/overworld/map_sprites.asm index 43b44946..32d3d47b 100755 --- a/engine/overworld/map_sprites.asm +++ b/engine/overworld/map_sprites.asm @@ -328,7 +328,6 @@ GetSplitMapSpriteSetID: .northSouthDivide ld a, [wYCoord] jr .compareCoord - .eastWestDivide ld a, [wXCoord] .compareCoord diff --git a/engine/overworld/oam.asm b/engine/overworld/oam.asm index 5b9831b0..5a831327 100644 --- a/engine/overworld/oam.asm +++ b/engine/overworld/oam.asm @@ -8,7 +8,7 @@ PrepareOAMData: dec a jr z, .updateEnabled - cp $ff + cp -1 ret nz ld [wUpdateSpritesEnabled], a jp HideSprites diff --git a/engine/overworld/player_animations.asm b/engine/overworld/player_animations.asm index 95a8cc12..d4ecec53 100755 --- a/engine/overworld/player_animations.asm +++ b/engine/overworld/player_animations.asm @@ -9,7 +9,7 @@ EnterMapAnim: bit 7, [hl] ; used fly out of battle? res 7, [hl] jr nz, .flyAnimation - ld a, $a0 ; (SFX_02_4c - SFX_Headers_02) / 3 + ld a, SFX_TELEPORT_ENTER_1 call PlaySound ld hl, wd732 bit 4, [hl] ; used dungeon warp? @@ -17,7 +17,7 @@ EnterMapAnim: ;res 4, [hl] jr nz, .dungeonWarpAnimation call PlayerSpinWhileMovingDown - ld a, $a3 ; (SFX_02_4f - SFX_Headers_02) / 3 + ld a, SFX_TELEPORT_ENTER_2 call PlaySound call IsPlayerStandingOnWarpPadOrHole ld a, b @@ -51,7 +51,7 @@ EnterMapAnim: .flyAnimation pop hl call LoadBirdSpriteGraphics - ld a, $a4 ; SFX_BIRD_FLY + ld a, SFX_FLY call PlaySound ld hl, wFlyAnimUsingCoordList xor a ; is using coord list @@ -104,7 +104,7 @@ _LeaveMapAnim: dec a jp nz, LeaveMapThroughHoleAnim .spinWhileMovingUp - ld a, $9f ; (SFX_02_4b - SFX_Headers_02) / 3 + ld a, SFX_TELEPORT_EXIT_1 call PlaySound ld hl, wPlayerSpinWhileMovingUpOrDownAnimDeltaY ld a, -$10 @@ -138,7 +138,7 @@ _LeaveMapAnim: ld [hli], a ; wPlayerSpinInPlaceAnimFrameDelayDelta xor a ld [hli], a ; wPlayerSpinInPlaceAnimFrameDelayEndValue - ld [hl], $a1 ; SFX_TELEPORT_EXIT_2 + ld [hl], SFX_TELEPORT_EXIT_2 ; wPlayerSpinInPlaceAnimSoundID ld hl, wFacingDirectionList call PlayerSpinInPlace jr .spinWhileMovingUp @@ -151,7 +151,7 @@ _LeaveMapAnim: ld [hli], a ; wFlyAnimCounter ld [hl], $c ; wFlyAnimBirdSpriteImageIndex call DoFlyAnimation - ld a, $a4 ; SFX_FLY + ld a, SFX_FLY call PlaySound ld hl, wFlyAnimUsingCoordList xor a ; is using coord list @@ -258,7 +258,7 @@ LoadBirdSpriteGraphics: ld c, $c ld hl, vNPCSprites call CopyVideoData - ld de, BirdSprite + $c0 ; moving amination sprite + ld de, BirdSprite + $c0 ; moving animation sprite ld b, BANK(BirdSprite) ld c, $0c ld hl, vNPCSprites2 @@ -392,7 +392,7 @@ FishingAnim: ld c, 10 call DelayFrames ld hl, wd736 - set 6, [hl] + set 6, [hl] ; reserve the last 4 OAM entries ld hl, vNPCSprites ld de, RedSprite ld b, BANK(RedSprite) @@ -422,7 +422,6 @@ FishingAnim: ; there was a bite ; shake the player's sprite vertically - ld b, 10 .loop ld hl, wSpriteStateData1 + 4 ; player's sprite Y screen position @@ -435,17 +434,19 @@ FishingAnim: ; If the player is facing up, hide the fishing rod so it doesn't overlap with ; the exclamation bubble that will be shown next. - ld a, [wSpriteStateData1 + 2] + ld a, [wSpriteStateData1 + 2] ; player's sprite facing direction cp SPRITE_FACING_UP jr nz, .skipHidingFishingRod ld a, $a0 ld [wOAMBuffer + $9c], a + .skipHidingFishingRod ld hl, wEmotionBubbleSpriteIndex xor a ld [hli], a ; player's sprite ld [hl], a ; EXCLAMATION_BUBBLE predef EmotionBubble + ; If the player is facing up, unhide the fishing rod. ld a, [wSpriteStateData1 + 2] ; player's sprite facing direction cp SPRITE_FACING_UP diff --git a/engine/overworld/trainers.asm b/engine/overworld/trainers.asm index 3ee19e8a..655c6b2a 100755 --- a/engine/overworld/trainers.asm +++ b/engine/overworld/trainers.asm @@ -57,7 +57,7 @@ _SetSpritePosition1: _SetSpritePosition2: ld hl, wSpriteStateData1 - ld de, $4 + ld de, 4 ld a, [wSpriteIndex] ld [H_SPRITEINDEX], a call GetSpriteDataPointer @@ -262,13 +262,13 @@ CheckSpriteCanSeePlayer: jr .notInLine ; player too far away .checkIfLinedUp ld a, [wTrainerFacingDirection] ; sprite facing direction - cp SPRITE_FACING_DOWN ; down + cp SPRITE_FACING_DOWN jr z, .checkXCoord - cp SPRITE_FACING_UP ; up + cp SPRITE_FACING_UP jr z, .checkXCoord - cp SPRITE_FACING_LEFT ; left + cp SPRITE_FACING_LEFT jr z, .checkYCoord - cp SPRITE_FACING_RIGHT ; right + cp SPRITE_FACING_RIGHT jr z, .checkYCoord jr .notInLine .checkXCoord diff --git a/engine/palettes.asm b/engine/palettes.asm index d3fd0050..a9d8908c 100755 --- a/engine/palettes.asm +++ b/engine/palettes.asm @@ -181,19 +181,15 @@ SetPal_Overworld: ld a, SET_PAL_OVERWORLD ld [wDefaultPaletteCommand], a ret - .PokemonTowerOrAgatha ld a, PAL_GREYMON - 1 jr .town - .caveOrBruno ld a, PAL_CAVE - 1 jr .town - .Lorelei xor a jr .town - .trade_center_colosseum ld a, PAL_GREYMON - 1 jr .town @@ -535,9 +531,8 @@ _SendSGBPacket: ; set P14=HIGH, P15=HIGH ld a, $30 ld [rJOYP], a - call Wait7000 ; wait for about 70000 cycles -; call Wait7000 + call Wait7000 ; restore (previously pushed) number of packets pop bc dec b @@ -613,6 +608,7 @@ PrepareSuperNintendoVRAMTransfer: dw DataSnd_72911 CheckSGB: +; Returns whether the game is running on an SGB in carry. ld hl, MltReq2Packet call SendSGBPacket call Wait7000 diff --git a/engine/predefs.asm b/engine/predefs.asm index 0196a866..e752a7ef 100755 --- a/engine/predefs.asm +++ b/engine/predefs.asm @@ -61,7 +61,7 @@ PredefPointers:: add_predef CopyDownscaledMonTiles add_predef Func_f0a7 add_predef HealParty - add_predef MoveAnimation ; 08 play move animation + add_predef MoveAnimation add_predef DivideBCDPredef add_predef DivideBCDPredef2 add_predef AddBCDPredef @@ -116,7 +116,7 @@ PredefPointers:: add_predef InternalClockTradeAnim add_predef TrainerEngage add_predef IndexToPokedex - add_predef DisplayPicCenteredOrUpperRight ; 3B display pic? + add_predef DisplayPicCenteredOrUpperRight add_predef UsedCut add_predef ShowPokedexData add_predef WriteMonMoves @@ -127,13 +127,13 @@ PredefPointers:: add_predef CanLearnTM add_predef TMToMove add_predef _RunPaletteCommand - add_predef StarterDex ; 46 + add_predef StarterDex add_predef _AddPartyMon add_predef UpdateHPBar2 add_predef DrawEnemyHUDAndHPBar add_predef LoadTownMap_Nest add_predef PrintMonType - add_predef EmotionBubble ; 4C player exclamation + add_predef EmotionBubble add_predef EmptyFunc3 ; return immediately add_predef AskName add_predef PewterGuys @@ -141,7 +141,7 @@ PredefPointers:: add_predef LoadSAV2 add_predef LoadSAV add_predef SaveSAVtoSRAM1 - add_predef DoInGameTradeDialogue ; 54 initiate trade + add_predef DoInGameTradeDialogue add_predef HallOfFamePC add_predef DisplayDexRating @@ -149,7 +149,6 @@ PredefPointers:: predef_const EnterMapAnim dbw $1E, _LeaveMapAnim ; wrong bank dbw $1E, EnterMapAnim ; wrong bank - add_predef GetTileTwoStepsInFrontOfPlayer add_predef CheckForCollisionWhenPushingBoulder add_predef PrintStrengthTxt diff --git a/engine/save.asm b/engine/save.asm index 171fd055..bb2193a2 100755 --- a/engine/save.asm +++ b/engine/save.asm @@ -261,7 +261,7 @@ SaveSAVtoSRAM2: ld [sMainDataCheckSum], a call DisableSRAMAndPrepareClockData ret -;;; + SaveSAVtoSRAM: ld a, $2 ld [wSaveFileStatus], a diff --git a/engine/titlescreen.asm b/engine/titlescreen.asm index 2157982e..9e369d81 100755 --- a/engine/titlescreen.asm +++ b/engine/titlescreen.asm @@ -91,7 +91,7 @@ DisplayTitleScreen: call .ScrollTitleScreenPokemonLogo jr .bouncePokemonLogoLoop -.TitleScreenPokemonLogoYScrolls +.TitleScreenPokemonLogoYScrolls: ; Controls the bouncing effect of the Pokemon logo on the title screen db -4,16 ; y scroll amount, number of times to scroll db 3,4 @@ -102,7 +102,7 @@ DisplayTitleScreen: db -1,2 db 0 ; terminate list with 0 -.ScrollTitleScreenPokemonLogo +.ScrollTitleScreenPokemonLogo: ; Scrolls the Pokemon logo on the title screen to create the bouncing effect ; Scrolls d pixels e times call DelayFrame diff --git a/engine/titlescreen2.asm b/engine/titlescreen2.asm index 2a1bf0dc..8b4bc4de 100755 --- a/engine/titlescreen2.asm +++ b/engine/titlescreen2.asm @@ -69,7 +69,7 @@ _TitleScroll: pop bc jr _TitleScroll -.ScrollBetween +.ScrollBetween: .wait ld a, [rLY] ; rLY cp l diff --git a/engine/town_map.asm b/engine/town_map.asm index b34c4951..cf09be7c 100755 --- a/engine/town_map.asm +++ b/engine/town_map.asm @@ -69,7 +69,7 @@ DisplayTownMap: ld b, a and A_BUTTON | B_BUTTON | D_UP | D_DOWN jr z, .inputLoop - ld a, $8c + ld a, SFX_TINK call PlaySound bit 6, b jr nz, .pressedUp @@ -84,7 +84,6 @@ DisplayTownMap: pop af ld [hl], a ret - .pressedUp ld a, [wWhichTownMapLocation] inc a @@ -205,7 +204,7 @@ LoadTownMap_Fly: jr z, .inputLoop bit 0, b jr nz, .pressedA - ld a, $8c ; SFX_TINK + ld a, SFX_TINK call PlaySound bit 6, b jr nz, .pressedUp @@ -213,7 +212,7 @@ LoadTownMap_Fly: jr nz, .pressedDown jr .pressedB .pressedA - ld a, $8e ; SFX_HEAL_AILMENT + ld a, SFX_HEAL_AILMENT call PlaySound ld a, [hl] ld [wDestinationMap], a @@ -366,12 +365,12 @@ DrawPlayerOrBirdSprite: call WritePlayerOrBirdSpriteOAM pop hl ld de, wcd6d -.asm_71266 +.loop ld a, [hli] ld [de], a inc de cp "@" - jr nz, .asm_71266 + jr nz, .loop ld hl, wOAMBuffer ld de, wTileMapBackup ld bc, $a0 @@ -465,7 +464,7 @@ WriteTownMapSpriteOAM: pop hl WriteAsymmetricMonPartySpriteOAM: -; Writes 4 OAM blocks for a helix mon party sprite, since is does not have +; Writes 4 OAM blocks for a helix mon party sprite, since it does not have ; a vertical line of symmetry. lb de, 2, 2 .loop @@ -483,14 +482,14 @@ WriteAsymmetricMonPartySpriteOAM: xor a ld [hli], a inc d - ld a, $8 + ld a, 8 add c ld c, a dec e jr nz, .innerLoop pop bc pop de - ld a, $8 + ld a, 8 add b ld b, a dec d @@ -594,7 +593,7 @@ LoadTownMapEntry: INCLUDE "data/town_map_entries.asm" -INCLUDE "text/map_names.asm" ; TODO: relabel addresses +INCLUDE "text/map_names.asm" MonNestIcon: INCBIN "gfx/mon_nest_icon.1bpp" diff --git a/engine/trade.asm b/engine/trade.asm index bbd43779..2476ca78 100755 --- a/engine/trade.asm +++ b/engine/trade.asm @@ -253,7 +253,7 @@ Trade_ShowPlayerMon: ld [hSCX], a dec a dec a - and a ; useless since flags are updated with dec a + and a jr nz, .slideScreenLoop call Trade_Delay80 ld a, TRADE_BALL_POOF_ANIM diff --git a/home/text.asm b/home/text.asm index 866eca9f..b3f96315 100644 --- a/home/text.asm +++ b/home/text.asm @@ -60,19 +60,19 @@ PlaceNextChar:: Char4ETest:: cp $4E ; next - jr nz, .next + jr nz, .char4FTest ld bc, 2 * SCREEN_WIDTH ld a, [hFlags_0xFFFA] bit 2, a - jr z, .next2 + jr z, .ok ld bc, SCREEN_WIDTH -.next2 +.ok pop hl add hl, bc push hl jp PlaceNextChar_inc -.next +.char4FTest cp $4F ; line jr nz, .next3 pop hl @@ -256,13 +256,13 @@ Char5F:: Char58:: ; prompt ld a, [wLinkState] cp LINK_STATE_BATTLING - jp z, .next + jp z, .ok ld a, $EE Coorda 18, 16 -.next +.ok call ProtectedDelay3 call ManualTextScroll - ld a, " " ; space + ld a, " " Coorda 18, 16 Char57:: ; done pop hl @@ -393,14 +393,14 @@ NextTextCommand:: ld hl, TextCommandJumpTable push bc add a - ld b, $00 + ld b, 0 ld c, a add hl, bc pop bc ld a, [hli] ld h, [hl] ld l, a - jp [hl] + jp hl ; draw box ; 04AAAABBCC @@ -521,7 +521,7 @@ TextCommand06:: TextCommand07:: ld a, " " Coorda 18, 16 ; place blank space in lower right corner of dialogue text box - call ScrollTextUpOneLine ; scroll up text + call ScrollTextUpOneLine call ScrollTextUpOneLine pop hl coord bc, 1, 16 ; address of second line of dialogue text box @@ -533,7 +533,7 @@ TextCommand08:: pop hl ld de, NextTextCommand push de ; return address - jp [hl] + jp hl ; print decimal number (converted from binary number) ; 09AAAABB @@ -629,7 +629,7 @@ TextCommandSounds:: db $10, SFX_GET_ITEM_2 db $11, SFX_GET_KEY_ITEM db $13, SFX_TRADE_MACHINE - db $14, PIKACHU ; used in OakSpeech + db $14, PIKACHU ; used in OakSpeech db $15, PIDGEOT ; used in SaffronCityText12 db $16, DEWGONG ; unused? |