diff options
Diffstat (limited to 'engine')
30 files changed, 192 insertions, 204 deletions
diff --git a/engine/bank3c.asm b/engine/bank3c.asm index 7ae059e7..a9bfea8d 100644 --- a/engine/bank3c.asm +++ b/engine/bank3c.asm @@ -74,7 +74,7 @@ SetMapSpecificScriptFlagsOnMapReload: set 5, [hl] ret -.MapList ; f02fa (3c:42fa) +.MapList db SILPH_CO_2F db SILPH_CO_3F db SILPH_CO_4F @@ -149,7 +149,7 @@ LoadUnusedBluesHouseMissableObjectData: db $ff .End: -TryApplyPikachuMovementData: ; f0a82 +TryApplyPikachuMovementData: ld a, [wd472] bit 7, a ret z diff --git a/engine/bank3d.asm b/engine/bank3d.asm index 6efff351..b37bdd00 100644 --- a/engine/bank3d.asm +++ b/engine/bank3d.asm @@ -298,7 +298,6 @@ TitleScreenPikachuTilemap: db $00, $b9, $ba, $8a, $8a, $8a, $8a, $8a, $8a, $bb, $bc, $00 db $00, $00, $bd, $8a, $8a, $8a, $8a, $8a, $8a, $be, $bf, $00 -; f46f9 (3d:46f9) PokemonLogoGraphics: INCBIN "gfx/pokemon_logo.2bpp" PokemonLogoGraphicsEnd: YellowLogoGraphics: INCBIN "gfx/yellow_titlescreen.2bpp" @@ -445,7 +444,7 @@ PrintStrengthTxt: jp PrintText Text_f5b17: - TX_FAR _UsedStrengthText ; 2d:417e + TX_FAR _UsedStrengthText TX_ASM ld a, [wcf91] call PlayCry @@ -453,7 +452,7 @@ Text_f5b17: jp TextScriptEnd Text_f5b28: - TX_FAR _CanMoveBouldersText ; 2d:4193 + TX_FAR _CanMoveBouldersText db "@" IsSurfingAllowed: @@ -488,11 +487,11 @@ CoordsData_f5b64: db $ff CurrentTooFastText: - TX_FAR _CurrentTooFastText ; 2d:41ab + TX_FAR _CurrentTooFastText db "@" CyclingIsFunText: - TX_FAR _CyclingIsFunText ; 2d:41ca + TX_FAR _CyclingIsFunText db "@" AddItemToInventory_: diff --git a/engine/battle/bank3d_battle.asm b/engine/battle/bank3d_battle.asm index 3719841f..740fc71a 100644 --- a/engine/battle/bank3d_battle.asm +++ b/engine/battle/bank3d_battle.asm @@ -28,7 +28,7 @@ asm_f601d: ld a, [hl] push af res 1, [hl] - call InitBattleVariables ; 3d:6236 + call InitBattleVariables ld a, [wEnemyMonSpecies2] sub $c8 jp c, InitWildBattle @@ -36,7 +36,7 @@ asm_f601d: call GetTrainerInformation callab ReadTrainer callab DoBattleTransitionAndInitBattleVariables - call _LoadTrainerPic ; 3d:615a + call _LoadTrainerPic xor a ld [wEnemyMonSpecies2], a ld [$ffe1], a @@ -151,9 +151,9 @@ InitBattle_Common: _LoadTrainerPic: ; wd033-wd034 contain pointer to pic - ld a, [wTrainerPicPointer] ; wd033 + ld a, [wTrainerPicPointer] ld e, a - ld a, [wTrainerPicPointer + 1] ; wd034 + ld a, [wTrainerPicPointer + 1] ld d, a ; de contains pointer to trainer pic ld a, [wLinkState] and a diff --git a/engine/battle/core.asm b/engine/battle/core.asm index 6805fbfe..51701157 100755 --- a/engine/battle/core.asm +++ b/engine/battle/core.asm @@ -2347,7 +2347,7 @@ DisplayBattleMenu: call PrintText jp DisplayBattleMenu -.RunAwayText ; 3d0df (f:50df) +.RunAwayText TX_FAR _RunAwayText db "@" @@ -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 ; 3d890 (f:5890) +playPlayerMoveAnimation push af ld a,[wPlayerBattleStatus2] bit HasSubstituteUp,a @@ -3398,7 +3398,7 @@ playPlayerMoveAnimation ; 3d890 (f:5890) ld b,BANK(ReshowSubstituteAnim) call nz,Bankswitch jr MirrorMoveCheck -playerCheckIfFlyOrChargeEffect ; 3d8bd (f:58bd) +playerCheckIfFlyOrChargeEffect ld c,30 call DelayFrames ld a,[wPlayerMoveEffect] @@ -7172,7 +7172,7 @@ FellAsleepText: TX_FAR _FellAsleepText db "@" -AlreadyAsleepText: ; 3f1cd (f:71cds) +AlreadyAsleepText: TX_FAR _AlreadyAsleepText db "@" @@ -7361,7 +7361,7 @@ FreezeBurnParalyzeEffect: call PlayBattleAnimation ld hl, FrozenText jp PrintText -.opponentAttacker ; 3f382 (f:7382) +.opponentAttacker ld a, [wBattleMonStatus] ; mostly same as above with addresses swapped for opponent and a jp nz, CheckDefrost diff --git a/engine/battle/decrement_pp.asm b/engine/battle/decrement_pp.asm index fd1a3184..984af087 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 ; f4301 (3d:4301) +.DecrementPP ld a, [wPlayerMoveListIndex] ; which move (0, 1, 2, 3) did we use? ld c, a ld b, 0 diff --git a/engine/diploma_3a.asm b/engine/diploma_3a.asm index 3b633a1b..f4504ad7 100755 --- a/engine/diploma_3a.asm +++ b/engine/diploma_3a.asm @@ -49,7 +49,6 @@ _DisplayDiploma: call GBPalNormal ret -; e9a73 String_e9a73: db $10, "Diploma", $10, "@" diff --git a/engine/draw_badges.asm b/engine/draw_badges.asm index 412197b2..9e6262a0 100644 --- a/engine/draw_badges.asm +++ b/engine/draw_badges.asm @@ -52,7 +52,7 @@ DrawBadges: ; call .DrawBadgeRow ; ret -.DrawBadgeRow ; e8c9 (3:68c9) +.DrawBadgeRow ; Draw 4 badges. ld c, 4 diff --git a/engine/evos_moves.asm b/engine/evos_moves.asm index 78ead030..537bbef0 100755 --- a/engine/evos_moves.asm +++ b/engine/evos_moves.asm @@ -313,7 +313,7 @@ StoppedEvolvingText: TX_FAR _StoppedEvolvingText db "@" -IsEvolvingText: ; 3affe (e:6ffes) +IsEvolvingText: TX_FAR _IsEvolvingText db "@" diff --git a/engine/gamefreak.asm b/engine/gamefreak.asm index 6545e216..001445bd 100755 --- a/engine/gamefreak.asm +++ b/engine/gamefreak.asm @@ -2,14 +2,14 @@ LoadShootingStarGraphics: ld a, $f9 ld [rOBP0], a ld a, $a4 - ld [rOBP1], a ; $ff49 + ld [rOBP1], a call UpdateGBCPal_OBP0 call UpdateGBCPal_OBP1 - ld de, AnimationTileset2 + $30 ; $4757 ; star tile (top left quadrant) + ld de, AnimationTileset2 + $30 ; star tile (top left quadrant) ld hl, vChars1 + $200 lb bc, BANK(AnimationTileset2), $01 call CopyVideoData - ld de, AnimationTileset2 + $130 ; $481e ; star tile (bottom left quadrant) + ld de, AnimationTileset2 + $130 ; star tile (bottom left quadrant) ld hl, vChars1 + $210 lb bc, BANK(AnimationTileset2), $01 call CopyVideoData @@ -74,7 +74,7 @@ AnimateShootingStar: ; Make Gamefreak logo flash. ld b, 3 .flashLogoLoop - ld hl, rOBP0 ; $ff48 + ld hl, rOBP0 rrc [hl] rrc [hl] call UpdateGBCPal_OBP0 @@ -89,7 +89,7 @@ AnimateShootingStar: ld a, 24 .initSmallStarsOAMLoop push af - ld hl, SmallStarsOAM ; $40ee + ld hl, SmallStarsOAM ld bc, SmallStarsOAMEnd - SmallStarsOAM call CopyData pop af @@ -99,7 +99,7 @@ AnimateShootingStar: ; Animate the small stars falling from the Gamefreak logo. xor a ld [wMoveDownSmallStarsOAMCount], a ; wWhichTrade - ld hl, SmallStarsWaveCoordsPointerTable ; 1c:4105 + ld hl, SmallStarsWaveCoordsPointerTable ld c, 6 .smallStarsLoop ld a, [hli] @@ -220,9 +220,9 @@ MoveDownSmallStars: jr nz, .innerLoop ; Toggle the palette so that the lower star in the small stars tile blinks in ; and out. - ld a, [rOBP1] ; $ff49 + ld a, [rOBP1] xor %10100000 - ld [rOBP1], a ; $ff49 + ld [rOBP1], a call UpdateGBCPal_OBP1 ld c, 3 call CheckForUserInterruption diff --git a/engine/hall_of_fame.asm b/engine/hall_of_fame.asm index 59e97892..acd22ffe 100755 --- a/engine/hall_of_fame.asm +++ b/engine/hall_of_fame.asm @@ -156,7 +156,7 @@ HoFDisplayAndRecordMonInfo: call HoFDisplayMonInfo ld a, [wHoFPartyMonIndex] ld [wWhichPokemon], a - callab IsThisPartymonStarterPikachu_Party ; 3f:4e18 + callab IsThisPartymonStarterPikachu_Party jr nc, .asm_70336 ld e, $22 callab PlayPikachuSoundClip @@ -197,7 +197,7 @@ HoFMonInfoText: next "TYPE2/@" HoFLoadPlayerPics: - ld de, RedPicFront ; $6ede + ld de, RedPicFront ld a, BANK(RedPicFront) call UncompressSpriteFromDE ld a,$0 diff --git a/engine/intro.asm b/engine/intro.asm index 9bc1f503..37bd0151 100755 --- a/engine/intro.asm +++ b/engine/intro.asm @@ -8,7 +8,7 @@ PlayIntro: inc a ld [H_AUTOBGTRANSFERENABLED], a call PlayShootingStar - callab PlayIntroScene ; 3e:582d + callab PlayIntroScene xor a ld [hSCX], a ld [H_AUTOBGTRANSFERENABLED], a diff --git a/engine/menu/link_menu.asm b/engine/menu/link_menu.asm index 458f653b..3782e93e 100644 --- a/engine/menu/link_menu.asm +++ b/engine/menu/link_menu.asm @@ -569,67 +569,67 @@ Text_f579c:: next "CANCEL@" Colosseum3MonsText:: - TX_FAR _Colosseum3MonsText ; a0a2b + TX_FAR _Colosseum3MonsText db "@" ColosseumMewText:: - TX_FAR _ColosseumMewText ; a0a46 + TX_FAR _ColosseumMewText db "@" ColosseumDifferentMonsText:: - TX_FAR _ColosseumDifferentMonsText ; a0a5f + TX_FAR _ColosseumDifferentMonsText db "@" ColosseumMaxL55Text:: - TX_FAR _ColosseumMaxL55Text ; a0a81 + TX_FAR _ColosseumMaxL55Text db "@" ColosseumMinL50Text:: - TX_FAR _ColosseumMinL50Text ; a0a9a + TX_FAR _ColosseumMinL50Text db "@" ColosseumTotalL155Text:: - TX_FAR _ColosseumTotalL155Text ; a0aba + TX_FAR _ColosseumTotalL155Text db "@" ColosseumMaxL30Text:: - TX_FAR _ColosseumMaxL30Text ; a0ad9 + TX_FAR _ColosseumMaxL30Text db "@" ColosseumMinL25Text:: - TX_FAR _ColosseumMinL25Text ; a0af2 + TX_FAR _ColosseumMinL25Text db "@" ColosseumTotalL80Text:: - TX_FAR _ColosseumTotalL80Text ; a0b12 + TX_FAR _ColosseumTotalL80Text db "@" ColosseumMaxL20Text:: - TX_FAR _ColosseumMaxL20Text ; a0b30 + TX_FAR _ColosseumMaxL20Text db "@" ColosseumMinL15Text:: - TX_FAR _ColosseumMinL15Text ; a0b49 + TX_FAR _ColosseumMinL15Text db "@" ColosseumTotalL50Text:: - TX_FAR _ColosseumTotalL50Text ; a0b69 + TX_FAR _ColosseumTotalL50Text db "@" ColosseumHeightText:: - TX_FAR _ColosseumHeightText ; a0b87 + TX_FAR _ColosseumHeightText db "@" ColosseumWeightText:: - TX_FAR _ColosseumWeightText ; a0b9f + TX_FAR _ColosseumWeightText db "@" ColosseumEvolvedText:: - TX_FAR _ColosseumEvolvedText ; a0bbb + TX_FAR _ColosseumEvolvedText db "@" ColosseumIneligibleText:: - TX_FAR _ColosseumIneligibleText ; a0bd4 + TX_FAR _ColosseumIneligibleText db "@" LinkMenu: @@ -897,7 +897,7 @@ ColosseumCanceledText: db "@" ColosseumVersionText: - TX_FAR _ColosseumVersionText ; 28:4c47 + TX_FAR _ColosseumVersionText db "@" TextTerminator_f5a16: diff --git a/engine/menu/main_menu.asm b/engine/menu/main_menu.asm index cf837a54..5ff9cc7d 100755 --- a/engine/menu/main_menu.asm +++ b/engine/menu/main_menu.asm @@ -263,7 +263,7 @@ SaveScreenInfoText: next "TIME@" DisplayOptionMenu: - callab DisplayOptionMenu_ ; 10:5c70 + callab DisplayOptionMenu_ ret CheckForPlayerNameInSRAM: diff --git a/engine/menu/start_sub_menus.asm b/engine/menu/start_sub_menus.asm index fc553d93..d49f7502 100755 --- a/engine/menu/start_sub_menus.asm +++ b/engine/menu/start_sub_menus.asm @@ -129,7 +129,7 @@ StartMenu_Pokemon: dw .dig dw .teleport dw .softboiled -.fly ; 11d1b (4:5d1b) +.fly bit 2,a ; does the player have the Thunder Badge? jp z,.newBadgeRequired call CheckIfInOutsideMap @@ -152,7 +152,7 @@ StartMenu_Pokemon: .asm_5d4c call Func_1510 jp .goBackToMap -.cut ; 11d52 (4:5d52) +.cut bit 1,a ; does the player have the Cascade Badge? jp z,.newBadgeRequired predef UsedCut @@ -160,7 +160,7 @@ StartMenu_Pokemon: and a jp z,.loop jp CloseTextDisplay -.surf ; 11d66 (4:5d66) +.surf bit 4,a ; does the player have the Soul Badge? jp z,.newBadgeRequired callba IsSurfingAllowed @@ -190,13 +190,13 @@ StartMenu_Pokemon: xor a ld [wd473], a jp .loop -.strength ; 11dab (4:5dab) +.strength bit 3,a ; does the player have the Rainbow Badge? jp z,.newBadgeRequired predef PrintStrengthTxt call GBPalWhiteOutWithDelay3 jp .goBackToMap -.flash ; 11dbb (4:5dbb) +.flash bit 0,a ; does the player have the Boulder Badge? jp z,.newBadgeRequired xor a @@ -208,7 +208,7 @@ StartMenu_Pokemon: .flashLightsAreaText TX_FAR _FlashLightsAreaText db "@" -.dig ; 11dd5 (4:5dd5) +.dig ld a,ESCAPE_ROPE ld [wcf91],a ld [wPseudoItemID],a @@ -218,7 +218,7 @@ StartMenu_Pokemon: jp z,.loop call GBPalWhiteOutWithDelay3 jp .goBackToMap -.teleport ; 11ded (4:5ded) +.teleport call CheckIfInOutsideMap jr z,.canTeleport ld a,[wWhichPokemon] @@ -250,7 +250,7 @@ StartMenu_Pokemon: .cannotFlyHereText TX_FAR _CannotFlyHereText db "@" -.softboiled ; 11e35 (4:5e35) +.softboiled ld hl,wPartyMon1MaxHP ld a,[wWhichPokemon] ld bc,wPartyMon2 - wPartyMon1 diff --git a/engine/menu/text_ids2.asm b/engine/menu/text_ids2.asm index fbac3986..e23ae707 100644 --- a/engine/menu/text_ids2.asm +++ b/engine/menu/text_ids2.asm @@ -512,19 +512,19 @@ TwoOptionMenuStrings: db 4,3,0 dw .NoYesMenu -.NoYesMenu ; 7542 (1:7542) +.NoYesMenu db "NO",$4E,"YES@" -.YesNoMenu ; 7549 (1:7549) +.YesNoMenu db "YES",$4E,"NO@" -.NorthWestMenu ; 7550 (1:7550) +.NorthWestMenu db "NORTH",$4E,"WEST@" -.SouthEastMenu ; 755b (1:755b) +.SouthEastMenu db "SOUTH",$4E,"EAST@" -.NorthEastMenu ; 7566 (1:7566) +.NorthEastMenu db "NORTH",$4E,"EAST@" -.TradeCancelMenu ; 7571 (1:7571) +.TradeCancelMenu db "TRADE",$4E,"CANCEL@" -.HealCancelMenu ; 757e (1:757e) +.HealCancelMenu db "HEAL",$4E,"CANCEL@" DisplayFieldMoveMonMenu: diff --git a/engine/multiply_divide.asm b/engine/multiply_divide.asm index 2bc26de2..d664c9d4 100755 --- a/engine/multiply_divide.asm +++ b/engine/multiply_divide.asm @@ -2,15 +2,15 @@ _Multiply: ld a, $8 ld b, a xor a - ld [H_PRODUCT], a ; $ff95 - ld [H_MULTIPLYBUFFER], a ; $ff9b - ld [H_MULTIPLYBUFFER+1], a ; $ff9c - ld [H_MULTIPLYBUFFER+2], a ; $ff9d - ld [H_MULTIPLYBUFFER+3], a ; $ff9e + ld [H_PRODUCT], a + ld [H_MULTIPLYBUFFER], a + ld [H_MULTIPLYBUFFER+1], a + ld [H_MULTIPLYBUFFER+2], a + ld [H_MULTIPLYBUFFER+3], a .multiplyLoop - ld a, [H_MULTIPLIER] ; $ff99 + ld a, [H_MULTIPLIER] srl a - ld [H_MULTIPLIER], a ; $ff99 + ld [H_MULTIPLIER], a jr nc, .smallMultiplier ; less than $80 ; code to possibly multiply the multiplicand by 2 and divide the multiplier by 2? ld a, [H_MULTIPLYBUFFER+3] @@ -23,14 +23,14 @@ _Multiply: ld a, [H_MULTIPLICAND+1] adc c ld [H_MULTIPLYBUFFER+2], a - ld a, [H_MULTIPLYBUFFER+1] ; $ff9c + ld a, [H_MULTIPLYBUFFER+1] ld c, a - ld a, [H_MULTIPLICAND] ; $ff96 + ld a, [H_MULTIPLICAND] adc c - ld [H_MULTIPLYBUFFER+1], a ; $ff9c + ld [H_MULTIPLYBUFFER+1], a ld a, [H_MULTIPLYBUFFER] ld c, a - ld a, [H_PRODUCT] ; $ff95 + ld a, [H_PRODUCT] adc c ld [H_MULTIPLYBUFFER], a .smallMultiplier @@ -42,47 +42,47 @@ _Multiply: ld a, [H_MULTIPLICAND+1] rl a ld [H_MULTIPLICAND+1], a - ld a, [H_MULTIPLICAND] ; $ff96 + ld a, [H_MULTIPLICAND] rl a - ld [H_MULTIPLICAND], a ; $ff96 - ld a, [H_PRODUCT] ; $ff95 + ld [H_MULTIPLICAND], a + ld a, [H_PRODUCT] rl a - ld [H_PRODUCT], a ; $ff95 + ld [H_PRODUCT], a jr .multiplyLoop .done ld a, [H_MULTIPLYBUFFER+3] ld [H_PRODUCT+3], a ld a, [H_MULTIPLYBUFFER+2] ld [H_PRODUCT+2], a - ld a, [H_MULTIPLYBUFFER+1] ; $ff9c - ld [H_PRODUCT+1], a ; $ff96 + ld a, [H_MULTIPLYBUFFER+1] + ld [H_PRODUCT+1], a ld a, [H_MULTIPLYBUFFER] - ld [H_PRODUCT], a ; $ff95 + ld [H_PRODUCT], a ret _Divide: xor a - ld [H_DIVIDEBUFFER], a ; ff9a - ld [H_DIVIDEBUFFER+1], a ; ff9b - ld [H_DIVIDEBUFFER+2], a ; ff9c - ld [H_DIVIDEBUFFER+3], a ; ff9d - ld [H_DIVIDEBUFFER+4], a ; ff9e + ld [H_DIVIDEBUFFER], a + ld [H_DIVIDEBUFFER+1], a + ld [H_DIVIDEBUFFER+2], a + ld [H_DIVIDEBUFFER+3], a + ld [H_DIVIDEBUFFER+4], a ld a, $9 ld e, a .asm_f6680 ld a, [H_DIVIDEBUFFER] ld c, a - ld a, [H_DIVIDEND+1] ; $ff96 + ld a, [H_DIVIDEND+1] sub c ld d, a - ld a, [H_DIVISOR] ; $ff99 + ld a, [H_DIVISOR] ld c, a - ld a, [H_DIVIDEND] ; $ff95 + ld a, [H_DIVIDEND] sbc c jr c, .asm_f669b - ld [H_DIVIDEND], a ; $ff95 + ld [H_DIVIDEND], a ld a, d - ld [H_DIVIDEND+1], a ; $ff96 + ld [H_DIVIDEND+1], a ld a, [H_DIVIDEBUFFER+4] inc a ld [H_DIVIDEBUFFER+4], a @@ -97,9 +97,9 @@ _Divide: ld a, [H_DIVIDEBUFFER+3] rl a ld [H_DIVIDEBUFFER+3], a - ld a, [H_DIVIDEBUFFER+2] ; $ff9c + ld a, [H_DIVIDEBUFFER+2] rl a - ld [H_DIVIDEBUFFER+2], a ; $ff9c + ld [H_DIVIDEBUFFER+2], a ld a, [H_DIVIDEBUFFER+1] rl a ld [H_DIVIDEBUFFER+1], a @@ -108,13 +108,13 @@ _Divide: ld a, $8 ld e, a ld a, [H_DIVIDEBUFFER] - ld [H_DIVISOR], a ; $ff99 + ld [H_DIVISOR], a xor a ld [H_DIVIDEBUFFER], a - ld a, [H_DIVIDEND+1] ; $ff96 - ld [H_DIVIDEND], a ; $ff95 + ld a, [H_DIVIDEND+1] + ld [H_DIVIDEND], a ld a, [H_DIVIDEND+2] - ld [H_DIVIDEND+1], a ; $ff96 + ld [H_DIVIDEND+1], a ld a, [H_DIVIDEND+3] ld [H_DIVIDEND+2], a .asm_f66d1 @@ -123,22 +123,22 @@ _Divide: jr nz, .asm_f66d7 dec b .asm_f66d7 - ld a, [H_DIVISOR] ; $ff99 + ld a, [H_DIVISOR] srl a - ld [H_DIVISOR], a ; $ff99 + ld [H_DIVISOR], a ld a, [H_DIVIDEBUFFER] rr a ld [H_DIVIDEBUFFER], a jr .asm_f6680 .done - ld a, [H_DIVIDEND+1] ; $ff96 - ld [H_REMAINDER], a ; $ff99 + ld a, [H_DIVIDEND+1] + ld [H_REMAINDER], a ld a, [H_DIVIDEBUFFER+4] ld [H_QUOTIENT+3], a ld a, [H_DIVIDEBUFFER+3] ld [H_QUOTIENT+2], a - ld a, [H_DIVIDEBUFFER+2] ; $ff9c - ld [H_QUOTIENT+1], a ; $ff96 + ld a, [H_DIVIDEBUFFER+2] + ld [H_QUOTIENT+1], a ld a, [H_DIVIDEBUFFER+1] - ld [H_QUOTIENT], a ; $ff95 + ld [H_QUOTIENT], a ret diff --git a/engine/overworld/check_player_state.asm b/engine/overworld/check_player_state.asm index 5fad4fc5..b1951de0 100644 --- a/engine/overworld/check_player_state.asm +++ b/engine/overworld/check_player_state.asm @@ -210,7 +210,7 @@ IsPlayerStandingOnDoorTileOrWarpTile: push hl push de push bc - callba IsPlayerStandingOnDoorTile ; 6:6785 + callba IsPlayerStandingOnDoorTile jr c, .done ld a, [wCurMapTileset] add a diff --git a/engine/overworld/healing_machine.asm b/engine/overworld/healing_machine.asm index 1dc74e2d..4648f68b 100755 --- a/engine/overworld/healing_machine.asm +++ b/engine/overworld/healing_machine.asm @@ -1,5 +1,5 @@ AnimateHealingMachine: - ld de, PokeCenterFlashingMonitorAndHealBall ; $44b7 + ld de, PokeCenterFlashingMonitorAndHealBall ld hl, vChars0 + $7c0 lb bc, BANK(PokeCenterFlashingMonitorAndHealBall), $03 ; loads one too many tiles call CopyVideoData @@ -11,10 +11,10 @@ AnimateHealingMachine: ld a, [rOBP1] push af ld a, $e0 - ld [rOBP1], a ; $ff49 + ld [rOBP1], a call UpdateGBCPal_OBP1 ld hl, wOAMBuffer + $84 - ld de, PokeCenterOAMData ; $44d7 + ld de, PokeCenterOAMData call CopyHealingMachineOAM ld a, 4 ld [wAudioFadeOutControl], a @@ -53,7 +53,7 @@ AnimateHealingMachine: ld c, 32 call DelayFrames pop af - ld [rOBP1], a ; $ff49 + ld [rOBP1], a call UpdateGBCPal_OBP1 pop hl pop af diff --git a/engine/overworld/map_sprite_functions1.asm b/engine/overworld/map_sprite_functions1.asm index f0a718bd..2ad923fb 100644 --- a/engine/overworld/map_sprite_functions1.asm +++ b/engine/overworld/map_sprite_functions1.asm @@ -23,7 +23,7 @@ _UpdateSprites: cp $e ; test for overflow (back at $0e) jr nz, .spriteLoop ret -.updateCurrentSprite ; 4bd7 (1:4bd7) +.updateCurrentSprite ld a, [H_CURRENTSPRITEOFFSET] and a jp z, UpdatePlayerSprite diff --git a/engine/overworld/player_animations.asm b/engine/overworld/player_animations.asm index eea1b375..95a8cc12 100755 --- a/engine/overworld/player_animations.asm +++ b/engine/overworld/player_animations.asm @@ -253,12 +253,12 @@ DoFlyAnimation: ret LoadBirdSpriteGraphics: - ld de, BirdSprite ; $4d80 + ld de, BirdSprite ld b, BANK(BirdSprite) ld c, $c ld hl, vNPCSprites call CopyVideoData - ld de, BirdSprite + $c0 ; $4e40 ; moving amination sprite + ld de, BirdSprite + $c0 ; moving amination sprite ld b, BANK(BirdSprite) ld c, $0c ld hl, vNPCSprites2 @@ -394,7 +394,7 @@ FishingAnim: ld hl, wd736 set 6, [hl] ld hl, vNPCSprites - ld de, RedSprite ; $4180 + ld de, RedSprite ld b, BANK(RedSprite) ld c, $c call CopyVideoData @@ -463,7 +463,7 @@ FishingAnim: call LoadFontTilePatterns ret -.ShakePlayerSprite ; 708a3 (1c:48a3) +.ShakePlayerSprite ld a, [hl] xor $1 ld [hl], a diff --git a/engine/palettes.asm b/engine/palettes.asm index 9418fb72..d3fd0050 100755 --- a/engine/palettes.asm +++ b/engine/palettes.asm @@ -600,7 +600,7 @@ PrepareSuperNintendoVRAMTransfer: jr nz, .loop ret -.packetPointers ; 7225b (1c:625b) +.packetPointers ; Only the first packet is needed. dw MaskEnFreezePacket dw DataSnd_728a1 diff --git a/engine/pikachu_follow.asm b/engine/pikachu_follow.asm index b5791919..c0b20d9d 100755 --- a/engine/pikachu_follow.asm +++ b/engine/pikachu_follow.asm @@ -2,7 +2,7 @@ ShouldPikachuSpawn:: ; possibly to test if pika should be out? ld a, [wPikachuOverworldStateFlags] bit 5, a - jr nz, .hide ; 3f:44f8 + jr nz, .hide ld a, [wPikachuOverworldStateFlags] bit 7, a jr nz, .hide diff --git a/engine/pikachu_pcm.asm b/engine/pikachu_pcm.asm index 043f702c..bb2c089c 100755 --- a/engine/pikachu_pcm.asm +++ b/engine/pikachu_pcm.asm @@ -91,64 +91,64 @@ PikachuCriesPointerTable: ; dw pointer to cry ; bank 21 - pikacry_def PikachuCry1 ; 21:4000 - pikacry_def PikachuCry2 ; 21:491a - pikacry_def PikachuCry3 ; 21:4fdc - pikacry_def PikachuCry4 ; 21:59ee + pikacry_def PikachuCry1 + pikacry_def PikachuCry2 + pikacry_def PikachuCry3 + pikacry_def PikachuCry4 ; bank 22 - pikacry_def PikachuCry5 ; 22:4000 - pikacry_def PikachuCry6 ; 22:5042 - pikacry_def PikachuCry7 ; 22:6254 + pikacry_def PikachuCry5 + pikacry_def PikachuCry6 + pikacry_def PikachuCry7 ; bank 23 - pikacry_def PikachuCry8 ; 23:4000 - pikacry_def PikachuCry9 ; 23:50ca - pikacry_def PikachuCry10 ; 23:5e0c + pikacry_def PikachuCry8 + pikacry_def PikachuCry9 + pikacry_def PikachuCry10 ; bank 24 - pikacry_def PikachuCry11 ; 24:4000 - pikacry_def PikachuCry12 ; 24:4722 - pikacry_def PikachuCry13 ; 24:54a4 + pikacry_def PikachuCry11 + pikacry_def PikachuCry12 + pikacry_def PikachuCry13 ; bank 25 - pikacry_def PikachuCry14 ; 25:4000 - pikacry_def PikachuCry15 ; 25:589a + pikacry_def PikachuCry14 + pikacry_def PikachuCry15 ; banks 31-34, in no particular order - pikacry_def PikachuCry16 ; 31:4000 - pikacry_def PikachuCry17 ; 34:4000 - pikacry_def PikachuCry18 ; 31:549a - pikacry_def PikachuCry19 ; 33:4000 - pikacry_def PikachuCry20 ; 32:4000 - pikacry_def PikachuCry21 ; 32:6002 - pikacry_def PikachuCry22 ; 31:63a4 - pikacry_def PikachuCry23 ; 34:4862 - pikacry_def PikachuCry24 ; 33:5632 - pikacry_def PikachuCry25 ; 34:573c - pikacry_def PikachuCry26 ; 33:725c + pikacry_def PikachuCry16 + pikacry_def PikachuCry17 + pikacry_def PikachuCry18 + pikacry_def PikachuCry19 + pikacry_def PikachuCry20 + pikacry_def PikachuCry21 + pikacry_def PikachuCry22 + pikacry_def PikachuCry23 + pikacry_def PikachuCry24 + pikacry_def PikachuCry25 + pikacry_def PikachuCry26 ; bank 35 - pikacry_def PikachuCry27 ; 35:4000 - pikacry_def PikachuCry28 ; 35:4b5a - pikacry_def PikachuCry29 ; 35:5da4 - pikacry_def PikachuCry30 ; 35:69ce - pikacry_def PikachuCry31 ; 35:6e80 + pikacry_def PikachuCry27 + pikacry_def PikachuCry28 + pikacry_def PikachuCry29 + pikacry_def PikachuCry30 + pikacry_def PikachuCry31 ; bank 36 - pikacry_def PikachuCry32 ; 36:4000 - pikacry_def PikachuCry33 ; 36:458a - pikacry_def PikachuCry34 ; 36:523c + pikacry_def PikachuCry32 + pikacry_def PikachuCry33 + pikacry_def PikachuCry34 ; bank 37 - pikacry_def PikachuCry35 ; 37:4000 - pikacry_def PikachuCry36 ; 37:522a + pikacry_def PikachuCry35 + pikacry_def PikachuCry36 ; banks 36-38 - pikacry_def PikachuCry37 ; 38:4000 - pikacry_def PikachuCry38 ; 38:4dfa - pikacry_def PikachuCry39 ; 37:6e0c - pikacry_def PikachuCry40 ; 38:5a64 - pikacry_def PikachuCry41 ; 36:6746 - pikacry_def PikachuCry42 ; 38:6976 + pikacry_def PikachuCry37 + pikacry_def PikachuCry38 + pikacry_def PikachuCry39 + pikacry_def PikachuCry40 + pikacry_def PikachuCry41 + pikacry_def PikachuCry42 diff --git a/engine/pikachu_pic_animation.asm b/engine/pikachu_pic_animation.asm index c04382c1..0da8e499 100755 --- a/engine/pikachu_pic_animation.asm +++ b/engine/pikachu_pic_animation.asm @@ -640,7 +640,7 @@ PikaPicAnimCommand_loadgfx: ld [wUpdateSpritesEnabled], a ret -RequestPikaPicAnimGFX: ; fe114 +RequestPikaPicAnimGFX: push de ld a, [wPikaPicAnimCurGraphicID] ld d, a @@ -654,7 +654,7 @@ RequestPikaPicAnimGFX: ; fe114 .failed ret -DecompressRequestPikaPicAnimGFX: ; fe128 +DecompressRequestPikaPicAnimGFX: push de ld a, [wPikaPicAnimCurGraphicID] ld d, a diff --git a/engine/predefs.asm b/engine/predefs.asm index 8b26706a..0196a866 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 (1e:4d97) + add_predef MoveAnimation ; 08 play move animation 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? (01:600d) + add_predef DisplayPicCenteredOrUpperRight ; 3B display pic? add_predef UsedCut add_predef ShowPokedexData add_predef WriteMonMoves @@ -127,21 +127,21 @@ PredefPointers:: add_predef CanLearnTM add_predef TMToMove add_predef _RunPaletteCommand - add_predef StarterDex ; 46 (17:40d4) + add_predef StarterDex ; 46 add_predef _AddPartyMon add_predef UpdateHPBar2 add_predef DrawEnemyHUDAndHPBar add_predef LoadTownMap_Nest add_predef PrintMonType - add_predef EmotionBubble ; 4C player exclamation (10:516f) - add_predef EmptyFunc3 ; return immediately (01:5b63) + add_predef EmotionBubble ; 4C player exclamation + add_predef EmptyFunc3 ; return immediately add_predef AskName add_predef PewterGuys add_predef SaveSAVtoSRAM2 add_predef LoadSAV2 add_predef LoadSAV add_predef SaveSAVtoSRAM1 - add_predef DoInGameTradeDialogue ; 54 initiate trade (1c:5b86) + add_predef DoInGameTradeDialogue ; 54 initiate trade add_predef HallOfFamePC add_predef DisplayDexRating @@ -156,7 +156,7 @@ PredefPointers:: add_predef PickUpItem add_predef PrintMoveType add_predef LoadMovePPs - add_predef DrawHP ; 5F (04:5468) + add_predef DrawHP add_predef DrawHP2 add_predef DisplayElevatorFloorMenu add_predef OaksAideScript diff --git a/engine/printer.asm b/engine/printer.asm index 46eb2c59..5be5286c 100644 --- a/engine/printer.asm +++ b/engine/printer.asm @@ -323,12 +323,12 @@ PrintPCBox:: ld [wUpdateSpritesEnabled], a ret -Func_e8df4: ; e8df4 +Func_e8df4: ld hl, String_e8e1f call PrintText ret -Func_e8dfb: ; e8dfb +Func_e8dfb: call Printer_ResetJoypadHRAM .asm_e8dfe call JoypadLowSensitivity @@ -351,11 +351,11 @@ Func_e8dfb: ; e8dfb scf ret -String_e8e1f: ; e8e1f +String_e8e1f: TX_FAR _NoPokemonText db "@" -PrintFanClubPortrait: ; e8e24 +PrintFanClubPortrait: xor a ld [hCanceledPrinting], a call Printer_PlayPrinterMusic diff --git a/engine/printer/serial.asm b/engine/printer/serial.asm index b5d71596..b424876e 100755 --- a/engine/printer/serial.asm +++ b/engine/printer/serial.asm @@ -18,7 +18,6 @@ Printer_StartTransmission: ld [wPrinterQueueLength], a ret -; e87a8 PrinterTransmissionJumptable: ld a, [wPrinterSendState] ld e, a diff --git a/engine/titlescreen.asm b/engine/titlescreen.asm index c4dff73c..2157982e 100755 --- a/engine/titlescreen.asm +++ b/engine/titlescreen.asm @@ -31,17 +31,17 @@ DisplayTitleScreen: call DisableLCD call LoadFontTilePatterns ; todo: fix hl pointers - ld hl, NintendoCopyrightLogoGraphics ; 4:4c48 + ld hl, NintendoCopyrightLogoGraphics ld de, vTitleLogo + $600 ld bc, $50 ld a, BANK(NintendoCopyrightLogoGraphics) call FarCopyData - ld hl, NineTile ; 4:4e08 + ld hl, NineTile ld de, vTitleLogo + $6e0 ld bc, $10 ld a, BANK(NineTile) call FarCopyData - ld hl, GamefreakLogoGraphics ; 4:4d78 + ld hl, GamefreakLogoGraphics ld de, vTitleLogo + 101 * $10 ld bc, 9 * $10 ld a, BANK(GamefreakLogoGraphics) @@ -91,7 +91,7 @@ DisplayTitleScreen: call .ScrollTitleScreenPokemonLogo jr .bouncePokemonLogoLoop -.TitleScreenPokemonLogoYScrolls ; 4228 (1:4228) +.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 ; 4237 (1:4237) +.ScrollTitleScreenPokemonLogo ; Scrolls the Pokemon logo on the title screen to create the bouncing effect ; Scrolls d pixels e times call DelayFrame @@ -114,7 +114,7 @@ DisplayTitleScreen: ret ; place tiles for title screen copyright -.WriteCopyrightTiles ; 4241 (1:4241) +.WriteCopyrightTiles coord hl, 2, 17 ld de, .tileScreenCopyrightTiles .titleScreenCopyrightTilesLoop @@ -125,10 +125,10 @@ DisplayTitleScreen: ld [hli], a jr .titleScreenCopyrightTilesLoop -.tileScreenCopyrightTiles ; 424f (1:424f) +.tileScreenCopyrightTiles db $e0,$e1,$e2,$e3,$e1,$e2,$ee,$e5,$e6,$e7,$e8,$e9,$ea,$eb,$ec,$ed,$ff ; ©1995-1999 GAME FREAK inc. -.finishedBouncingPokemonLogo ; 4260 (1:4260) +.finishedBouncingPokemonLogo call LoadScreenTilesFromBuffer1 ld c, 36 call DelayFrames @@ -192,12 +192,12 @@ DisplayTitleScreen: jp z, .doClearSaveDialogue jp MainMenu -.asm_42f0 ; 42f0 (1:42f0) +.asm_42f0 ; unreferenced callab PrinterDebug jp .loop -.asm_42fb ; 42fb (1:42fb) +.asm_42fb ; unreferenced ld a, [wTitleScreenScene + 4] inc a @@ -213,7 +213,7 @@ DisplayTitleScreen: ld [wTitleScreenScene + 3], a jp .titleScreenLoop -.doTitlescreenReset ; 431b (1:431b) +.doTitlescreenReset ld [wAudioFadeOutControl], a call StopAllMusic .audioFadeLoop @@ -222,7 +222,7 @@ DisplayTitleScreen: jr nz, .audioFadeLoop jp Init -.doClearSaveDialogue ; 432a (1:432a) +.doClearSaveDialogue jpba DoClearSaveDialogue diff --git a/engine/town_map.asm b/engine/town_map.asm index 65a10912..b34c4951 100755 --- a/engine/town_map.asm +++ b/engine/town_map.asm @@ -27,7 +27,7 @@ DisplayTownMap: pop af jr .enterLoop -.townMapLoop ; 70ef4 (1c:4ef4) +.townMapLoop coord hl, 0, 0 lb bc, 1, 20 call ClearScreenArea @@ -37,7 +37,7 @@ DisplayTownMap: ld b, 0 add hl, bc ld a, [hl] -.enterLoop ; 70f08 (1c:4f08) +.enterLoop ld de, wTownMapCoords call LoadTownMapEntry ld a, [de] @@ -149,7 +149,7 @@ LoadTownMap_Fly: ld [hJoy7], a call LoadPlayerSpriteGraphics call LoadFontTilePatterns - ld de, BirdSprite ; $4d80 + ld de, BirdSprite ld b, BANK(BirdSprite) ld c, $c ld hl, vSprites + $40 @@ -299,7 +299,7 @@ LoadTownMap: ld bc, WorldMapTileGraphicsEnd - WorldMapTileGraphics ld a, BANK(WorldMapTileGraphics) call FarCopyData - ld hl, MonNestIcon ; $574b + ld hl, MonNestIcon ld de, vSprites + $40 ld bc, MonNestIconEnd - MonNestIcon ld a, BANK(MonNestIcon) @@ -592,11 +592,6 @@ LoadTownMapEntry: ld l, a ret -; ExternalMapEntries: - ; dr $7139c,$7140b -; InternalMapEntries: - ; dr $7140b,$7174b - INCLUDE "data/town_map_entries.asm" INCLUDE "text/map_names.asm" ; TODO: relabel addresses diff --git a/engine/unknown_ea3ea.asm b/engine/unknown_ea3ea.asm index ca5d8bff..01391f17 100755 --- a/engine/unknown_ea3ea.asm +++ b/engine/unknown_ea3ea.asm @@ -160,22 +160,18 @@ Printer_GetMonStats: .place_string call PlaceString ret -; ea52f .OT: db "OT/@" -; ea533 .IDNo: db $73, "№/@" -; ea537 .Stats: db "ATTACK" next "DEFENSE" next "SPEED" next "SPECIAL@" -; ea554 .Blank: db "--------------@" @@ -957,21 +953,21 @@ PrinterDebug_PrepOAMForPrinting: pop hl ret -Data_ea9de: ; ea9de +Data_ea9de: db 1, 0, $00, 0 dw 1 -Data_ea9e4: ; ea9e4 +Data_ea9e4: db 2, 0, $04, 0 dw 0 -Data_ea9ea: ; ea9ea +Data_ea9ea: db 4, 0, $80, 2 dw 0 -Data_ea9f0: ; ea9f0 +Data_ea9f0: db 4, 0, $00, 0 dw 4 -Data_ea9f6: ; ea9f6 +Data_ea9f6: db 8, 0, $00, 0 dw 8 -Data_ea9fc: ; ea9fc +Data_ea9fc: db 15, 0, $00, 0 dw 15 |