diff options
author | Rangi <remy.oukaour+rangi42@gmail.com> | 2018-06-24 23:22:50 -0400 |
---|---|---|
committer | Rangi <remy.oukaour+rangi42@gmail.com> | 2018-06-24 23:22:50 -0400 |
commit | 67d1364c7acfd5e8e2256080e16a14cfa59a5abc (patch) | |
tree | fcf1bcbc2990b8fdeb5d63159d15382a8bdf719a /engine | |
parent | 91f914718a263839daef24d44eda857bfc7cca95 (diff) |
Fix triple newlines left over from removing address comments
Diffstat (limited to 'engine')
118 files changed, 0 insertions, 1156 deletions
diff --git a/engine/battle/ai/items.asm b/engine/battle/ai/items.asm index 14817f414..29bc23b20 100644 --- a/engine/battle/ai/items.asm +++ b/engine/battle/ai/items.asm @@ -145,13 +145,11 @@ SwitchSometimes: ld [wEnemySwitchMonIndex], a jp AI_TrySwitch - CheckSubstatusCantRun: ld a, [wEnemySubStatus5] bit SUBSTATUS_CANT_RUN, a ret - AI_TryItem: ; items are not allowed in the BattleTower ld a, [wInBattleTowerBattle] @@ -238,7 +236,6 @@ AI_TryItem: scf ret - .IsHighestLevel: ld a, [wOTPartyCount] ld d, a @@ -270,7 +267,6 @@ AI_TryItem: scf ret - AI_Items: dbw FULL_RESTORE, .FullRestore dbw MAX_POTION, .MaxPotion @@ -520,7 +516,6 @@ AI_Items: and a ret - AIUpdateHUD: call UpdateEnemyMonInParty farcall UpdateEnemyHUD @@ -538,7 +533,6 @@ AIUsedItemSound: pop de ret - EnemyUsedFullHeal: call AIUsedItemSound call AI_HealStatus @@ -642,7 +636,6 @@ EnemyPotionFinish: predef AnimateHPBar jp AIUpdateHUD - AI_TrySwitch: ; Determine whether the AI can switch based on how many Pokemon are still alive. ; If it can switch, it will. @@ -805,7 +798,6 @@ EnemyUsedXSpecial: ld b, SP_ATTACK ld a, X_SPECIAL - ; Parameter ; a = ITEM_CONSTANT ; b = BATTLE_CONSTANT (ATTACK, DEFENSE, SPEED, SP_ATTACK, SP_DEFENSE, ACCURACY, EVASION) @@ -817,7 +809,6 @@ EnemyUsedXItem: farcall CheckIfStatCanBeRaised jp AIUpdateHUD - ; Parameter ; a = ITEM_CONSTANT PrintText_UsedItemOn_AND_AIUpdateHUD: diff --git a/engine/battle/ai/move.asm b/engine/battle/ai/move.asm index 488ea76ca..df0053141 100644 --- a/engine/battle/ai/move.asm +++ b/engine/battle/ai/move.asm @@ -15,7 +15,6 @@ AIChooseMove: farcall CheckEnemyLockedIn ret nz - ; The default score is 20. Unusable moves are given a score of 80. ld a, 20 ld hl, wBuffer1 @@ -61,7 +60,6 @@ AIChooseMove: ld [hl], 80 jr .CheckMovePP - ; Apply AI scoring layers depending on the trainer class. .ApplyLayers: ld hl, TrainerClassAttributes + TRNATTR_AI_MOVE_WEIGHTS @@ -199,7 +197,6 @@ AIChooseMove: ld [wCurEnemyMoveNum], a ret - AIScoringPointers: ; entries correspond to AI_* constants dw AI_Basic diff --git a/engine/battle/ai/scoring.asm b/engine/battle/ai/scoring.asm index 128e9841b..f6ca177f5 100644 --- a/engine/battle/ai/scoring.asm +++ b/engine/battle/ai/scoring.asm @@ -65,7 +65,6 @@ AI_Basic: INCLUDE "data/battle/ai/status_only_effects.asm" - AI_Setup: ; Use stat-modifying moves on turn 1. @@ -141,7 +140,6 @@ AI_Setup: jr .checkmove - AI_Types: ; Dismiss any move that the player is immune to. ; Encourage super-effective moves. @@ -232,7 +230,6 @@ AI_Types: jr .checkmove - AI_Offensive: ; Greatly discourage non-damaging moves. @@ -260,7 +257,6 @@ AI_Offensive: jr .checkmove - AI_Smart: ; Context-specific scoring. @@ -392,7 +388,6 @@ AI_Smart: dbw EFFECT_FLY, AI_Smart_Fly db -1 ; end - AI_Smart_Sleep: ; Greatly encourage sleep inducing moves if the enemy has either Dream Eater or Nightmare. ; 50% chance to greatly encourage sleep inducing moves otherwise. @@ -412,7 +407,6 @@ AI_Smart_Sleep: dec [hl] ret - AI_Smart_LeechHit: push hl ld a, 1 @@ -447,7 +441,6 @@ AI_Smart_LeechHit: inc [hl] ret - AI_Smart_LockOn: ld a, [wPlayerSubStatus5] bit SUBSTATUS_LOCK_ON, a @@ -552,7 +545,6 @@ AI_Smart_LockOn: pop hl jp AIDiscourageMove - AI_Smart_Selfdestruct: ; Selfdestruct, Explosion @@ -589,7 +581,6 @@ AI_Smart_Selfdestruct: inc [hl] ret - AI_Smart_DreamEater: ; 90% chance to greatly encourage this move. ; The AI_Basic layer will make sure that @@ -602,7 +593,6 @@ AI_Smart_DreamEater: dec [hl] ret - AI_Smart_EvasionUp: ; Dismiss this move if enemy's evasion can't raise anymore. @@ -688,7 +678,6 @@ AI_Smart_EvasionUp: bit SUBSTATUS_ROLLOUT, a jr nz, .asm_388ef - .asm_38936 inc [hl] ret @@ -714,7 +703,6 @@ AI_Smart_EvasionUp: dec [hl] ret - AI_Smart_AlwaysHit: ; 80% chance to greatly encourage this move if either... @@ -736,7 +724,6 @@ AI_Smart_AlwaysHit: dec [hl] ret - AI_Smart_MirrorMove: ; If the player did not use any move last turn... @@ -779,7 +766,6 @@ AI_Smart_MirrorMove: dec [hl] ret - AI_Smart_AccuracyDown: ; If player's HP is full... @@ -885,7 +871,6 @@ AI_Smart_AccuracyDown: dec [hl] ret - AI_Smart_ResetStats: ; 85% chance to encourage this move if any of enemy's stat levels is lower than -2. @@ -927,7 +912,6 @@ AI_Smart_ResetStats: inc [hl] ret - AI_Smart_Bide: ; 90% chance to discourage this move unless enemy's HP is full. @@ -939,7 +923,6 @@ AI_Smart_Bide: inc [hl] ret - AI_Smart_ForceSwitch: ; Whirlwind, Roar. @@ -956,7 +939,6 @@ AI_Smart_ForceSwitch: inc [hl] ret - AI_Smart_Heal: AI_Smart_MorningSun: AI_Smart_Synthesis: @@ -980,7 +962,6 @@ AI_Smart_Moonlight: dec [hl] ret - AI_Smart_Toxic: AI_Smart_LeechSeed: ; Discourage this move if player's HP is below 50%. @@ -990,7 +971,6 @@ AI_Smart_LeechSeed: inc [hl] ret - AI_Smart_LightScreen: AI_Smart_Reflect: ; Over 90% chance to discourage this move unless enemy's HP is full. @@ -1003,7 +983,6 @@ AI_Smart_Reflect: inc [hl] ret - AI_Smart_Ohko: ; Dismiss this move if player's level is higher than enemy's level. ; Else, discourage this move is player's HP is below 50%. @@ -1018,7 +997,6 @@ AI_Smart_Ohko: inc [hl] ret - AI_Smart_TrapTarget: ; Bind, Wrap, Fire Spin, Clamp @@ -1058,7 +1036,6 @@ AI_Smart_TrapTarget: dec [hl] ret - AI_Smart_RazorWind: AI_Smart_Unused2B: ld a, [wEnemySubStatus1] @@ -1112,7 +1089,6 @@ AI_Smart_Unused2B: ld [hl], a ret - AI_Smart_Confuse: ; 90% chance to discourage this move if player's HP is between 25% and 50%. @@ -1130,7 +1106,6 @@ AI_Smart_Confuse: inc [hl] ret - AI_Smart_SpDefenseUp2: ; Discourage this move if enemy's HP is lower than 50%. @@ -1165,7 +1140,6 @@ AI_Smart_SpDefenseUp2: inc [hl] ret - AI_Smart_Fly: ; Fly, Dig @@ -1184,7 +1158,6 @@ AI_Smart_Fly: dec [hl] ret - AI_Smart_SuperFang: ; Discourage this move if player's HP is below 25%. @@ -1193,7 +1166,6 @@ AI_Smart_SuperFang: inc [hl] ret - AI_Smart_Paralyze: ; 50% chance to discourage this move if player's HP is below 25%. @@ -1218,7 +1190,6 @@ AI_Smart_Paralyze: inc [hl] ret - AI_Smart_SpeedDownHit: ; Icy Wind @@ -1244,7 +1215,6 @@ AI_Smart_SpeedDownHit: dec [hl] ret - AI_Smart_Substitute: ; Dismiss this move if enemy's HP is below 50%. @@ -1252,7 +1222,6 @@ AI_Smart_Substitute: ret c jp AIDiscourageMove - AI_Smart_HyperBeam: call AICheckEnemyHalfHP jr c, .asm_38b72 @@ -1276,7 +1245,6 @@ AI_Smart_HyperBeam: inc [hl] ret - AI_Smart_Rage: ld a, [wEnemySubStatus4] bit SUBSTATUS_RAGE, a @@ -1315,7 +1283,6 @@ AI_Smart_Rage: inc [hl] ret - AI_Smart_Mimic: ld a, [wLastPlayerCounterMove] and a @@ -1365,7 +1332,6 @@ AI_Smart_Mimic: inc [hl] ret - AI_Smart_Counter: push hl ld hl, wPlayerUsedMoves @@ -1415,7 +1381,6 @@ AI_Smart_Counter: cp SPECIAL jr nc, .asm_38c38 - .asm_38c30 call Random cp 39 percent + 1 @@ -1430,7 +1395,6 @@ AI_Smart_Counter: inc [hl] ret - AI_Smart_Encore: call AICompareSpeed jr nc, .asm_38c81 @@ -1484,7 +1448,6 @@ AI_Smart_Encore: INCLUDE "data/battle/ai/encore_moves.asm" - AI_Smart_PainSplit: ; Discourage this move if [enemy's current HP * 2 > player's current HP]. @@ -1505,7 +1468,6 @@ AI_Smart_PainSplit: inc [hl] ret - AI_Smart_Snore: AI_Smart_SleepTalk: ; Greatly encourage this move if enemy is fast asleep. @@ -1527,7 +1489,6 @@ AI_Smart_SleepTalk: inc [hl] ret - AI_Smart_DefrostOpponent: ; Greatly encourage this move if enemy is frozen. ; No move has EFFECT_DEFROST_OPPONENT, so this layer is unused. @@ -1540,7 +1501,6 @@ AI_Smart_DefrostOpponent: dec [hl] ret - AI_Smart_Spite: ld a, [wLastPlayerCounterMove] and a @@ -1597,11 +1557,9 @@ AI_Smart_Spite: dec [hl] ret - Function_0x38d16 jp AIDiscourageMove - AI_Smart_DestinyBond: AI_Smart_Reversal: AI_Smart_SkullBash: @@ -1612,7 +1570,6 @@ AI_Smart_SkullBash: inc [hl] ret - AI_Smart_HealBell: ; Dismiss this move if none of the opponent's Pokemon is statused. ; Encourage this move if the enemy is statused. @@ -1670,7 +1627,6 @@ AI_Smart_HealBell: jp AIDiscourageMove - AI_Smart_PriorityHit: call AICompareSpeed ret c @@ -1702,7 +1658,6 @@ AI_Smart_PriorityHit: dec [hl] ret - AI_Smart_Thief: ; Don't use Thief unless it's the only move available. @@ -1711,7 +1666,6 @@ AI_Smart_Thief: ld [hl], a ret - AI_Smart_Conversion2: ld a, [wLastPlayerMove] and a @@ -1751,7 +1705,6 @@ AI_Smart_Conversion2: inc [hl] ret - AI_Smart_Disable: call AICompareSpeed jr nc, .asm_38df3 @@ -1783,7 +1736,6 @@ AI_Smart_Disable: inc [hl] ret - AI_Smart_MeanLook: call AICheckEnemyHalfHP jr nc, .asm_38e24 @@ -1825,7 +1777,6 @@ AI_Smart_MeanLook: dec [hl] ret - AICheckLastPlayerMon: ld a, [wPartyCount] ld b, a @@ -1851,7 +1802,6 @@ AICheckLastPlayerMon: ret - AI_Smart_Nightmare: ; 50% chance to encourage this move. ; The AI_Basic layer will make sure that @@ -1862,7 +1812,6 @@ AI_Smart_Nightmare: dec [hl] ret - AI_Smart_FlameWheel: ; Use this move if the enemy is frozen. @@ -1874,7 +1823,6 @@ rept 5 endr ret - AI_Smart_Curse: ld a, [wEnemyMonType1] cp GHOST @@ -1932,14 +1880,12 @@ AI_Smart_Curse: jr .asm_38eb7 - .asm_38eb0 push hl call AICheckLastPlayerMon pop hl jr z, .asm_38ecb - .asm_38eb7 call AICheckEnemyQuarterHP jp nc, .asm_38e90 @@ -1962,7 +1908,6 @@ AI_Smart_Curse: dec [hl] ret - AI_Smart_Protect: ld a, [wEnemyProtectCount] and a @@ -2014,7 +1959,6 @@ AI_Smart_Protect: inc [hl] ret - AI_Smart_Foresight: ld a, [wEnemyAccLevel] cp $5 @@ -2044,7 +1988,6 @@ AI_Smart_Foresight: dec [hl] ret - AI_Smart_PerishSong: push hl callfar FindAliveEnemyMons @@ -2081,7 +2024,6 @@ AI_Smart_PerishSong: ld [hl], a ret - AI_Smart_Sandstorm: ; Greatly discourage this move if the player is immune to Sandstorm damage. @@ -2125,7 +2067,6 @@ AI_Smart_Sandstorm: db STEEL db -1 ; end - AI_Smart_Endure: ld a, [wEnemyProtectCount] and a @@ -2168,7 +2109,6 @@ AI_Smart_Endure: inc [hl] ret - AI_Smart_FuryCutter: ; Encourage this move based on Fury Cutter's count. @@ -2192,7 +2132,6 @@ AI_Smart_FuryCutter: ; fallthrough - AI_Smart_Rollout: ; Rollout, Fury Cutter @@ -2235,7 +2174,6 @@ AI_Smart_Rollout: inc [hl] ret - AI_Smart_Swagger: AI_Smart_Attract: ; 80% chance to encourage this move during the first turn of player's Pokemon. @@ -2257,7 +2195,6 @@ AI_Smart_Attract: dec [hl] ret - AI_Smart_Safeguard: ; 80% chance to discourage this move if player's HP is below 50%. @@ -2268,7 +2205,6 @@ AI_Smart_Safeguard: inc [hl] ret - AI_Smart_Magnitude: AI_Smart_Earthquake: @@ -2300,7 +2236,6 @@ AI_Smart_Earthquake: dec [hl] ret - AI_Smart_BatonPass: ; Discourage this move if the player hasn't shown super-effective moves against the enemy. ; Consider player's type(s) if its moves are unknown. @@ -2314,7 +2249,6 @@ AI_Smart_BatonPass: inc [hl] ret - AI_Smart_Pursuit: ; 50% chance to greatly encourage this move if player's HP is below 25%. ; 80% chance to discourage this move otherwise. @@ -2333,7 +2267,6 @@ AI_Smart_Pursuit: dec [hl] ret - AI_Smart_RapidSpin: ; 80% chance to greatly encourage this move if the enemy is ; trapped (Bind effect), seeded, or scattered with spikes. @@ -2358,7 +2291,6 @@ AI_Smart_RapidSpin: dec [hl] ret - AI_Smart_HiddenPower: push hl ld a, 1 @@ -2397,7 +2329,6 @@ AI_Smart_HiddenPower: inc [hl] ret - AI_Smart_RainDance: ; Greatly discourage this move if it would favour the player type-wise. @@ -2420,7 +2351,6 @@ AI_Smart_RainDance: INCLUDE "data/battle/ai/rain_dance_moves.asm" - AI_Smart_SunnyDay: ; Greatly discourage this move if it would favour the player type-wise. @@ -2442,7 +2372,6 @@ AI_Smart_SunnyDay: ; fallthrough - AI_Smart_WeatherMove: ; Rain Dance, Sunny Day @@ -2492,10 +2421,8 @@ AIGoodWeatherType: dec [hl] ret - INCLUDE "data/battle/ai/sunny_day_moves.asm" - AI_Smart_BellyDrum: ; Dismiss this move if enemy's attack is higher than +2 or if enemy's HP is below 50%. ; Else, discourage this move if enemy's HP is not full. @@ -2518,7 +2445,6 @@ AI_Smart_BellyDrum: ld [hl], a ret - AI_Smart_PsychUp: push hl ld hl, wEnemyAtkLevel @@ -2576,7 +2502,6 @@ AI_Smart_PsychUp: inc [hl] ret - AI_Smart_MirrorCoat: push hl ld hl, wPlayerUsedMoves @@ -2626,7 +2551,6 @@ AI_Smart_MirrorCoat: cp SPECIAL jr c, .asm_391d2 - .asm_391ca call Random cp 100 @@ -2640,7 +2564,6 @@ AI_Smart_MirrorCoat: inc [hl] ret - AI_Smart_Twister: AI_Smart_Gust: @@ -2671,7 +2594,6 @@ AI_Smart_Gust: dec [hl] ret - AI_Smart_FutureSight: ; Greatly encourage this move if the player is ; flying or underground, and slower than the enemy. @@ -2687,7 +2609,6 @@ AI_Smart_FutureSight: dec [hl] ret - AI_Smart_Stomp: ; 80% chance to encourage this move if the player has used Minimize. @@ -2701,7 +2622,6 @@ AI_Smart_Stomp: dec [hl] ret - AI_Smart_Solarbeam: ; 80% chance to encourage this move when it's sunny. ; 90% chance to discourage this move when it's raining. @@ -2729,7 +2649,6 @@ AI_Smart_Solarbeam: dec [hl] ret - AI_Smart_Thunder: ; 90% chance to discourage this move when it's sunny. @@ -2744,7 +2663,6 @@ AI_Smart_Thunder: inc [hl] ret - AICompareSpeed: ; Return carry if enemy is faster than player. @@ -2760,7 +2678,6 @@ AICompareSpeed: pop bc ret - AICheckPlayerMaxHP: push hl push de @@ -2769,7 +2686,6 @@ AICheckPlayerMaxHP: ld hl, wBattleMonMaxHP jr AICheckMaxHP - AICheckEnemyMaxHP: push hl push de @@ -2778,7 +2694,6 @@ AICheckEnemyMaxHP: ld hl, wEnemyMonMaxHP ; fallthrough - AICheckMaxHP: ; Return carry if hp at de matches max hp at hl. @@ -2805,7 +2720,6 @@ AICheckMaxHP: and a ret - AICheckPlayerHalfHP: push hl ld hl, wBattleMonHP @@ -2823,7 +2737,6 @@ AICheckPlayerHalfHP: pop hl ret - AICheckEnemyHalfHP: push hl push de @@ -2845,7 +2758,6 @@ AICheckEnemyHalfHP: pop hl ret - AICheckEnemyQuarterHP: push hl push de @@ -2869,7 +2781,6 @@ AICheckEnemyQuarterHP: pop hl ret - AICheckPlayerQuarterHP: push hl ld hl, wBattleMonHP @@ -2889,7 +2800,6 @@ AICheckPlayerQuarterHP: pop hl ret - AIHasMoveEffect: ; Return carry if the enemy has move b. @@ -2921,7 +2831,6 @@ AIHasMoveEffect: scf ret - AIHasMoveInArray: ; Return carry if the enemy has a move in array hl. @@ -2955,10 +2864,8 @@ AIHasMoveInArray: pop hl ret - INCLUDE "data/battle/ai/useful_moves.asm" - AI_Opportunist: ; Discourage stall moves when the enemy's HP is low. @@ -3009,7 +2916,6 @@ AI_Opportunist: INCLUDE "data/battle/ai/stall_moves.asm" - AI_Aggressive: ; Use whatever does the most damage. @@ -3117,7 +3023,6 @@ AI_Aggressive: INCLUDE "data/battle/ai/reckless_moves.asm" - AIDamageCalc: ld a, 1 ld [hBattleTurn], a @@ -3137,7 +3042,6 @@ AIDamageCalc: INCLUDE "data/battle/ai/constant_damage_effects.asm" - AI_Cautious: ; 90% chance to discourage moves with residual effects after the first turn. @@ -3180,7 +3084,6 @@ AI_Cautious: INCLUDE "data/battle/ai/residual_moves.asm" - AI_Status: ; Dismiss status moves that don't affect the player. @@ -3243,7 +3146,6 @@ AI_Status: jr .checkmove - AI_Risky: ; Use any move that will KO the target. ; Risky moves will often be an exception (see below). @@ -3313,18 +3215,15 @@ endr INCLUDE "data/battle/ai/risky_effects.asm" - AI_None: ret - AIDiscourageMove: ld a, [hl] add 10 ld [hl], a ret - AIGetEnemyMove: ; Load attributes of move a into ram @@ -3345,13 +3244,11 @@ AIGetEnemyMove: pop hl ret - AI_80_20: call Random cp 20 percent - 1 ret - AI_50_50: call Random cp 50 percent + 1 diff --git a/engine/battle/ai/switch.asm b/engine/battle/ai/switch.asm index b975776c2..85179d2ed 100644 --- a/engine/battle/ai/switch.asm +++ b/engine/battle/ai/switch.asm @@ -96,7 +96,6 @@ CheckPlayerMoveTypeMatchups: pop hl ret - .CheckEnemyMoveMatchups: ld de, wEnemyMonMoves ld b, NUM_MOVES + 1 @@ -290,7 +289,6 @@ CheckAbleToSwitch: ld [wEnemySwitchMonParam], a ret - FindAliveEnemyMons: ld a, [wOTPartyCount] cp 2 @@ -341,7 +339,6 @@ FindAliveEnemyMons: and a ret - FindEnemyMonsImmuneToLastCounterMove: ld hl, wOTPartyMon1 ld a, [wOTPartyCount] @@ -408,7 +405,6 @@ FindEnemyMonsImmuneToLastCounterMove: srl c jr .loop - FindAliveEnemyMonsWithASuperEffectiveMove: push bc ld a, [wOTPartyCount] @@ -546,7 +542,6 @@ FindEnemyMonsWithASuperEffectiveMove: pop bc ret - FindEnemyMonsThatResistPlayer: push bc ld hl, wOTPartySpecies @@ -607,7 +602,6 @@ FindEnemyMonsThatResistPlayer: ld c, a ret - FindEnemyMonsWithAtLeastQuarterMaxHP: push bc ld de, wOTPartySpecies diff --git a/engine/battle/battle_transition.asm b/engine/battle/battle_transition.asm index 3a9749b03..96368b9ab 100644 --- a/engine/battle/battle_transition.asm +++ b/engine/battle/battle_transition.asm @@ -146,7 +146,6 @@ ConvertTrainerBattlePokeballTilesTo2bpp: TrainerBattlePokeballTiles: INCBIN "gfx/overworld/trainer_battle_pokeball_tiles.2bpp" - BattleTransitionJumptable: jumptable .Jumptable, wJumptableIndex @@ -753,7 +752,6 @@ WipeLYOverrides: jr nz, .loop ret - StartTrainerBattle_DrawSineWave: calc_sine_wave diff --git a/engine/battle/core.asm b/engine/battle/core.asm index 902846bdc..40ba6964d 100644 --- a/engine/battle/core.asm +++ b/engine/battle/core.asm @@ -6486,7 +6486,6 @@ CheckUnownLetter: INCLUDE "data/wild/unlocked_unowns.asm" - Unreferenced_SwapBattlerLevels: push bc ld a, [wBattleMonLevel] diff --git a/engine/battle/effect_commands.asm b/engine/battle/effect_commands.asm index 07e8b3a2a..e19cce189 100644 --- a/engine/battle/effect_commands.asm +++ b/engine/battle/effect_commands.asm @@ -8,7 +8,6 @@ DoPlayerTurn: jr DoTurn - DoEnemyTurn: call SetEnemyTurn @@ -24,7 +23,6 @@ DoEnemyTurn: ; fallthrough - DoTurn: ; Read in and execute the user's move effects for this turn. @@ -40,7 +38,6 @@ DoTurn: call UpdateMoveData - DoMove: ; Get the user's move effect. ld a, BATTLE_VARS_MOVE_EFFECT @@ -113,7 +110,6 @@ DoMove: jp hl - CheckTurn: BattleCommand_CheckTurn: ; checkturn @@ -141,7 +137,6 @@ BattleCommand_CheckTurn: and a jp nz, CheckEnemyTurn - CheckPlayerTurn: ld hl, wPlayerSubStatus4 @@ -156,7 +151,6 @@ CheckPlayerTurn: .no_recharge - ld hl, wBattleMonStatus ld a, [hl] and SLP @@ -202,7 +196,6 @@ CheckPlayerTurn: .not_asleep - ld hl, wBattleMonStatus bit FRZ, [hl] jr z, .not_frozen @@ -222,7 +215,6 @@ CheckPlayerTurn: .not_frozen - ld hl, wPlayerSubStatus3 bit SUBSTATUS_FLINCHED, [hl] jr z, .not_flinched @@ -236,7 +228,6 @@ CheckPlayerTurn: .not_flinched - ld hl, wPlayerDisableCount ld a, [hl] and a @@ -254,7 +245,6 @@ CheckPlayerTurn: .not_disabled - ld a, [wPlayerSubStatus3] add a jr nc, .not_confused @@ -293,7 +283,6 @@ CheckPlayerTurn: .not_confused - ld a, [wPlayerSubStatus1] add a ; bit SUBSTATUS_ATTRACT jr nc, .not_infatuated @@ -317,7 +306,6 @@ CheckPlayerTurn: .not_infatuated - ; We can't disable a move that doesn't exist. ld a, [wDisabledMove] and a @@ -334,7 +322,6 @@ CheckPlayerTurn: .no_disabled_move - ld hl, wBattleMonStatus bit PAR, [hl] ret z @@ -350,7 +337,6 @@ CheckPlayerTurn: jp EndTurn - CantMove: ld a, BATTLE_VARS_SUBSTATUS1 call GetBattleVarAddr @@ -379,7 +365,6 @@ CantMove: - OpponentCantMove: call BattleCommand_SwitchTurn call CantMove @@ -387,7 +372,6 @@ OpponentCantMove: - CheckEnemyTurn: ld hl, wEnemySubStatus4 @@ -402,7 +386,6 @@ CheckEnemyTurn: .no_recharge - ld hl, wEnemyMonStatus ld a, [hl] and SLP @@ -446,7 +429,6 @@ CheckEnemyTurn: .not_asleep - ld hl, wEnemyMonStatus bit FRZ, [hl] jr z, .not_frozen @@ -465,7 +447,6 @@ CheckEnemyTurn: .not_frozen - ld hl, wEnemySubStatus3 bit SUBSTATUS_FLINCHED, [hl] jr z, .not_flinched @@ -479,7 +460,6 @@ CheckEnemyTurn: .not_flinched - ld hl, wEnemyDisableCount ld a, [hl] and a @@ -498,7 +478,6 @@ CheckEnemyTurn: .not_disabled - ld a, [wEnemySubStatus3] add a ; bit SUBSTATUS_CONFUSED jr nc, .not_confused @@ -513,7 +492,6 @@ CheckEnemyTurn: call StdBattleTextBox jr .not_confused - .confused ld hl, IsConfusedText call StdBattleTextBox @@ -557,7 +535,6 @@ CheckEnemyTurn: .not_confused - ld a, [wEnemySubStatus1] add a ; bit SUBSTATUS_ATTRACT jr nc, .not_infatuated @@ -581,7 +558,6 @@ CheckEnemyTurn: .not_infatuated - ; We can't disable a move that doesn't exist. ld a, [wEnemyDisabledMove] and a @@ -599,7 +575,6 @@ CheckEnemyTurn: .no_disabled_move - ld hl, wEnemyMonStatus bit PAR, [hl] ret z @@ -615,14 +590,12 @@ CheckEnemyTurn: ; fallthrough - EndTurn: ld a, $1 ld [wTurnEnded], a jp ResetDamage - MoveDisabled: ; Make sure any charged moves fail @@ -639,7 +612,6 @@ MoveDisabled: jp StdBattleTextBox - HitConfusion: ld hl, HurtItselfText @@ -671,7 +643,6 @@ HitConfusion: jp BattleCommand_RaiseSub - BattleCommand_CheckObedience: ; checkobedience @@ -714,7 +685,6 @@ BattleCommand_CheckObedience: cp [hl] ret z - .obeylevel ; The maximum obedience level is constrained by owned badges: ld hl, wJohtoBadges @@ -742,7 +712,6 @@ BattleCommand_CheckObedience: ; no badges ld a, 10 - .getlevel ; c = obedience level ; d = monster level @@ -761,14 +730,12 @@ BattleCommand_CheckObedience: jr nc, .checklevel ld b, $ff - .checklevel ; If the monster's level is lower than the obedience level, it will obey. ld a, c cp d ret nc - ; Random number from 0 to obedience level + monster level .rand1 call BattleRandom @@ -786,7 +753,6 @@ BattleCommand_CheckObedience: call IgnoreSleepOnly ret c - ; Another random number from 0 to obedience level + monster level .rand2 call BattleRandom @@ -797,7 +763,6 @@ BattleCommand_CheckObedience: cp c jr c, .UseInstead - ; No hope of using a move now. ; b = number of levels the monster is above the obedience level @@ -820,7 +785,6 @@ BattleCommand_CheckObedience: call HitConfusion jp .EndDisobedience - .Nap: call BattleRandom add a @@ -833,7 +797,6 @@ BattleCommand_CheckObedience: ld hl, BeganToNapText jr .Print - .DoNothing: ; 4 random choices call BattleRandom @@ -857,7 +820,6 @@ BattleCommand_CheckObedience: call StdBattleTextBox jp .EndDisobedience - .UseInstead: ; Can't use another move if the monster only has one! @@ -870,7 +832,6 @@ BattleCommand_CheckObedience: and a jr nz, .DoNothing - ld hl, wBattleMonPP ld de, wBattleMonMoves ld b, 0 @@ -891,7 +852,6 @@ BattleCommand_CheckObedience: and a jr nz, .GetTotalPP - .CheckMovePP: ld hl, wBattleMonPP ld a, [wCurMoveNum] @@ -905,7 +865,6 @@ BattleCommand_CheckObedience: cp b jr z, .DoNothing - ; Make sure we can actually use the move once we get there. ld a, 1 ld [wAlreadyDisobeyed], a @@ -918,7 +877,6 @@ BattleCommand_CheckObedience: ld c, a push af - .RandomMove: call BattleRandom maskbits NUM_MOVES @@ -940,7 +898,6 @@ BattleCommand_CheckObedience: and PP_MASK jr z, .RandomMove - ; Use it. ld a, [wCurMoveNum] ld c, a @@ -954,12 +911,10 @@ BattleCommand_CheckObedience: call UpdateMoveData call DoMove - ; Restore original move choice. pop af ld [wCurMoveNum], a - .EndDisobedience: xor a ld [wLastPlayerMove], a @@ -974,7 +929,6 @@ BattleCommand_CheckObedience: jp EndMoveEffect - IgnoreSleepOnly: ld a, BATTLE_VARS_MOVE_ANIM @@ -1004,14 +958,12 @@ IgnoreSleepOnly: ret - BattleCommand_UsedMoveText: ; usedmovetext farcall DisplayUsedMoveText ret - CheckUserIsCharging: ld a, [hBattleTurn] @@ -1024,7 +976,6 @@ CheckUserIsCharging: ret - BattleCommand_DoTurn: call CheckUserIsCharging ret nz @@ -1150,7 +1101,6 @@ BattleCommand_DoTurn: ld b, 1 ret - .continuousmoves db EFFECT_RAZOR_WIND db EFFECT_SKY_ATTACK @@ -1193,7 +1143,6 @@ CheckMimicUsed: ret - BattleCommand_Critical: ; critical @@ -1286,10 +1235,8 @@ BattleCommand_Critical: INCLUDE "data/battle/critical_hits.asm" - INCLUDE "engine/battle/move_effects/triple_kick.asm" - BattleCommand_Stab: ; STAB = Same Type Attack Bonus ld a, BATTLE_VARS_MOVE_ANIM @@ -1475,7 +1422,6 @@ BattleCommand_Stab: ret - BattleCheckTypeMatchup: ld hl, wEnemyMonType1 ld a, [hBattleTurn] @@ -1556,7 +1502,6 @@ CheckTypeMatchup: ret - BattleCommand_ResetTypeMatchup: ; Reset the type matchup multiplier to 1.0, if the type matchup is not 0. ; If there is immunity in play, the move automatically misses. @@ -1577,12 +1522,10 @@ BattleCommand_ResetTypeMatchup: ret - INCLUDE "engine/battle/ai/switch.asm" INCLUDE "data/types/type_matchups.asm" - BattleCommand_DamageVariation: ; damagevariation @@ -1592,7 +1535,6 @@ BattleCommand_DamageVariation: ; is not consistent. This makes the highest damage multipliers ; rarer than normal. - ; No point in reducing 1 or 0 damage. ld hl, wCurDamage ld a, [hli] @@ -1637,7 +1579,6 @@ BattleCommand_DamageVariation: ret - BattleCommand_CheckHit: ; checkhit @@ -1706,7 +1647,6 @@ BattleCommand_CheckHit: .Hit: ret - .Miss: ; Keep the damage value intact if we're using (Hi) Jump Kick. ld a, BATTLE_VARS_MOVE_EFFECT @@ -1720,7 +1660,6 @@ BattleCommand_CheckHit: ld [wAttackMissed], a ret - .DreamEater: ; Return z if we're trying to eat the dream of ; a monster that isn't sleeping. @@ -1734,7 +1673,6 @@ BattleCommand_CheckHit: and SLP ret - .Protect: ; Return nz if the opponent is protected. ld a, BATTLE_VARS_SUBSTATUS1_OPP @@ -1756,7 +1694,6 @@ BattleCommand_CheckHit: and a ret - .LockOn: ; Return nz if we are locked-on and aren't trying to use Earthquake, ; Fissure or Magnitude on a monster that is flying. @@ -1786,7 +1723,6 @@ BattleCommand_CheckHit: and a ret - .DrainSub: ; Return z if using an HP drain move on a substitute. call CheckSubstituteOpp @@ -1805,7 +1741,6 @@ BattleCommand_CheckHit: and a ret - .FlyDigMoves: ; Check for moves that can hit underground/flying opponents. ; Return z if the current move can hit the opponent. @@ -1841,7 +1776,6 @@ BattleCommand_CheckHit: cp MAGNITUDE ret - .ThunderRain: ; Return z if the current move always hits in rain, and it is raining. ld a, BATTLE_VARS_MOVE_EFFECT @@ -1853,14 +1787,12 @@ BattleCommand_CheckHit: cp WEATHER_RAIN ret - .XAccuracy: ld a, BATTLE_VARS_SUBSTATUS4 call GetBattleVar bit SUBSTATUS_X_ACCURACY, a ret - .StatModifiers: ld a, [hBattleTurn] @@ -1955,7 +1887,6 @@ BattleCommand_CheckHit: INCLUDE "data/battle/accuracy_multipliers.asm" - BattleCommand_EffectChance: ; effectchance @@ -1984,7 +1915,6 @@ BattleCommand_EffectChance: ret - BattleCommand_LowerSub: ; lowersub @@ -2054,7 +1984,6 @@ BattleCommand_LowerSub: ret - BattleCommand_MoveAnim: ; moveanim call BattleCommand_LowerSub @@ -2062,7 +1991,6 @@ BattleCommand_MoveAnim: jp BattleCommand_RaiseSub - BattleCommand_MoveAnimNoSub: ld a, [wAttackMissed] and a @@ -2128,7 +2056,6 @@ BattleCommand_MoveAnimNoSub: jp PlayFXAnimID - BattleCommand_StatUpAnim: ld a, [wAttackMissed] and a @@ -2138,7 +2065,6 @@ BattleCommand_StatUpAnim: jr BattleCommand_StatUpDownAnim - BattleCommand_StatDownAnim: ld a, [wAttackMissed] and a @@ -2152,7 +2078,6 @@ BattleCommand_StatDownAnim: ; fallthrough - BattleCommand_StatUpDownAnim: ld [wNumHits], a xor a @@ -2164,7 +2089,6 @@ BattleCommand_StatUpDownAnim: jp PlayFXAnimID - BattleCommand_SwitchTurn: ; switchturn @@ -2174,7 +2098,6 @@ BattleCommand_SwitchTurn: ret - BattleCommand_RaiseSub: ; raisesub @@ -2195,7 +2118,6 @@ BattleCommand_RaiseSub: jp LoadAnim - BattleCommand_FailureText: ; failuretext ; If the move missed or failed, load the appropriate @@ -2239,7 +2161,6 @@ BattleCommand_FailureText: jp EndMoveEffect - BattleCommand_ApplyDamage: ; applydamage @@ -2333,7 +2254,6 @@ BattleCommand_ApplyDamage: ret - GetFailureResultText: ld hl, DoesntAffectText ld de, DoesntAffectText @@ -2403,7 +2323,6 @@ FailText_CheckOpponentProtect: jp StdBattleTextBox - BattleCommand_BideFailText: ld a, [wAttackMissed] and a @@ -2415,7 +2334,6 @@ BattleCommand_BideFailText: jp PrintButItFailed - BattleCommand_CriticalText: ; criticaltext ; Prints the message for critical hits or one-hit KOs. @@ -2447,7 +2365,6 @@ BattleCommand_CriticalText: dw CriticalHitText dw OneHitKOText - BattleCommand_StartLoop: ; startloop @@ -2462,7 +2379,6 @@ BattleCommand_StartLoop: ret - BattleCommand_SuperEffectiveLoopText: ; supereffectivelooptext @@ -2473,7 +2389,6 @@ BattleCommand_SuperEffectiveLoopText: ; fallthrough - BattleCommand_SuperEffectiveText: ; supereffectivetext @@ -2488,7 +2403,6 @@ BattleCommand_SuperEffectiveText: jp StdBattleTextBox - BattleCommand_CheckDestinyBond: ; checkdestinybond @@ -2577,7 +2491,6 @@ BattleCommand_CheckDestinyBond: jp EndMoveEffect - BattleCommand_BuildOpponentRage: ; buildopponentrage @@ -2610,7 +2523,6 @@ BattleCommand_BuildOpponentRage: jp BattleCommand_SwitchTurn - BattleCommand_RageDamage: ; ragedamage @@ -2640,7 +2552,6 @@ BattleCommand_RageDamage: ret - EndMoveEffect: ld a, [wBattleScriptBufferAddress] ld l, a @@ -2653,7 +2564,6 @@ EndMoveEffect: ret - DittoMetalPowder: ld a, MON_SPECIES call BattlePartyAttr @@ -2691,7 +2601,6 @@ DittoMetalPowder: ret - BattleCommand_DamageStats: ; damagestats @@ -2701,7 +2610,6 @@ BattleCommand_DamageStats: ; fallthrough - PlayerAttackDamage: ; Return move power d, player level e, enemy defense c and player attack b. @@ -2785,7 +2693,6 @@ PlayerAttackDamage: ret - TruncateHL_BC: .loop ; Truncate 16-bit values hl and bc to 8-bit values b and c respectively. @@ -2832,7 +2739,6 @@ TruncateHL_BC: ret - GetDamageStatsCritical: ; Return carry if non-critical. @@ -2843,7 +2749,6 @@ GetDamageStatsCritical: ; fallthrough - GetDamageStats: ; Return the attacker's offensive stat and the defender's defensive ; stat based on whether the attacking type is physical or special. @@ -2885,7 +2790,6 @@ GetDamageStats: ret - ThickClubBoost: ; Return in hl the stat value at hl. @@ -2902,7 +2806,6 @@ ThickClubBoost: ret - LightBallBoost: ; Return in hl the stat value at hl. @@ -2919,7 +2822,6 @@ LightBallBoost: ret - SpeciesItemBoost: ; Return in hl the stat value at hl. @@ -2961,7 +2863,6 @@ SpeciesItemBoost: ret - EnemyAttackDamage: call ResetDamage @@ -3041,10 +2942,8 @@ EnemyAttackDamage: ret - INCLUDE "engine/battle/move_effects/beat_up.asm" - BattleCommand_ClearMissDamage: ; clearmissdamage ld a, [wAttackMissed] @@ -3054,7 +2953,6 @@ BattleCommand_ClearMissDamage: jp ResetDamage - HitSelfInConfusion: call ResetDamage ld a, [hBattleTurn] @@ -3092,7 +2990,6 @@ HitSelfInConfusion: ret - BattleCommand_DamageCalc: ; damagecalc @@ -3221,7 +3118,6 @@ BattleCommand_DamageCalc: ; Critical hits call .CriticalMultiplier - ; Update wCurDamage (capped at 997). ld hl, wCurDamage ld b, [hl] @@ -3286,7 +3182,6 @@ BattleCommand_DamageCalc: ld a, LOW(MAX_STAT_VALUE - MIN_NEUTRAL_DAMAGE) ld [hld], a - .dont_cap_3 ; Minimum neutral damage is 2 (bringing the cap to 999). inc hl @@ -3301,7 +3196,6 @@ BattleCommand_DamageCalc: and a ret - .CriticalMultiplier: ld a, [wCriticalHit] and a @@ -3326,10 +3220,8 @@ BattleCommand_DamageCalc: ret - INCLUDE "data/types/type_boost_items.asm" - BattleCommand_ConstantDamage: ; constantdamage @@ -3490,7 +3382,6 @@ BattleCommand_ConstantDamage: INCLUDE "data/moves/flail_reversal_power.asm" - INCLUDE "engine/battle/move_effects/counter.asm" INCLUDE "engine/battle/move_effects/encore.asm" @@ -3505,7 +3396,6 @@ INCLUDE "engine/battle/move_effects/lock_on.asm" INCLUDE "engine/battle/move_effects/sketch.asm" - BattleCommand_DefrostOpponent: ; defrostopponent ; Thaw the opponent if frozen, and @@ -3533,7 +3423,6 @@ BattleCommand_DefrostOpponent: ret - INCLUDE "engine/battle/move_effects/sleep_talk.asm" INCLUDE "engine/battle/move_effects/destiny_bond.asm" @@ -3544,7 +3433,6 @@ INCLUDE "engine/battle/move_effects/false_swipe.asm" INCLUDE "engine/battle/move_effects/heal_bell.asm" - FarPlayBattleAnimation: ; play animation de @@ -3567,7 +3455,6 @@ PlayFXAnimID: ret - DoEnemyDamage: ld hl, wCurDamage ld a, [hli] @@ -3629,7 +3516,6 @@ DoEnemyDamage: jp RefreshBattleHuds - DoPlayerDamage: ld hl, wCurDamage ld a, [hli] @@ -3691,7 +3577,6 @@ DoPlayerDamage: jp RefreshBattleHuds - DoSubstituteDamage: ld hl, SubTookDamageText call StdBattleTextBox @@ -3750,7 +3635,6 @@ DoSubstituteDamage: jp ResetDamage - UpdateMoveData: ld a, BATTLE_VARS_MOVE_ANIM @@ -3769,7 +3653,6 @@ UpdateMoveData: jp CopyName1 - BattleCommand_SleepTarget: ; sleeptarget @@ -3842,7 +3725,6 @@ BattleCommand_SleepTarget: jp StdBattleTextBox - .CheckAIRandomFail: ; Enemy turn ld a, [hBattleTurn] @@ -3872,7 +3754,6 @@ BattleCommand_SleepTarget: ret - BattleCommand_PoisonTarget: ; poisontarget @@ -3909,7 +3790,6 @@ BattleCommand_PoisonTarget: ret - BattleCommand_Poison: ; poison @@ -3999,14 +3879,12 @@ BattleCommand_Poison: jp StdBattleTextBox - .apply_poison call AnimateCurrentMove call PoisonOpponent jp RefreshBattleHuds - .check_toxic ld a, BATTLE_VARS_SUBSTATUS5_OPP call GetBattleVarAddr @@ -4022,7 +3900,6 @@ BattleCommand_Poison: ret - CheckIfTargetIsPoisonType: ld de, wEnemyMonType1 ld a, [hBattleTurn] @@ -4039,7 +3916,6 @@ CheckIfTargetIsPoisonType: ret - PoisonOpponent: ld a, BATTLE_VARS_STATUS_OPP call GetBattleVarAddr @@ -4047,7 +3923,6 @@ PoisonOpponent: jp UpdateOpponentInParty - BattleCommand_DrainTarget: ; draintarget call SapHealth @@ -4055,7 +3930,6 @@ BattleCommand_DrainTarget: jp StdBattleTextBox - BattleCommand_EatDream: ; eatdream call SapHealth @@ -4063,7 +3937,6 @@ BattleCommand_EatDream: jp StdBattleTextBox - SapHealth: ; Divide damage by 2, store it in hDividend ld hl, wCurDamage @@ -4158,7 +4031,6 @@ SapHealth: jp UpdateBattleMonInParty - BattleCommand_BurnTarget: ; burntarget @@ -4201,7 +4073,6 @@ BattleCommand_BurnTarget: ret - Defrost: ld a, [hl] and 1 << FRZ @@ -4228,7 +4099,6 @@ Defrost: jp StdBattleTextBox - BattleCommand_FreezeTarget: ; freezetarget @@ -4283,7 +4153,6 @@ BattleCommand_FreezeTarget: ret - BattleCommand_ParalyzeTarget: ; paralyzetarget @@ -4321,7 +4190,6 @@ BattleCommand_ParalyzeTarget: jp CallBattleCore - BattleCommand_AttackUp: ; attackup ld b, ATTACK @@ -4401,7 +4269,6 @@ BattleCommand_StatUp: jp StatUpAnimation - CheckIfStatCanBeRaised: ld a, b ld [wLoweredStat], a @@ -4482,13 +4349,11 @@ CheckIfStatCanBeRaised: ret - .stats_already_max pop hl dec [hl] ; fallthrough - .cant_raise_stat ld a, $2 ld [wFailedMessage], a @@ -4497,14 +4362,12 @@ CheckIfStatCanBeRaised: ret - .stat_raise_failed ld a, $1 ld [wFailedMessage], a ret - StatUpAnimation: ld bc, wPlayerMinimized ld hl, DropPlayerSub @@ -4531,7 +4394,6 @@ StatUpAnimation: jp BattleCommand_MoveDelay - BattleCommand_AttackDown: ; attackdown ld a, ATTACK @@ -4725,7 +4587,6 @@ BattleCommand_StatDown: ret - CheckMist: ld a, BATTLE_VARS_MOVE_EFFECT call GetBattleVar @@ -4752,7 +4613,6 @@ CheckMist: ret - BattleCommand_StatUpMessage: ld a, [wFailedMessage] and a @@ -4784,7 +4644,6 @@ BattleCommand_StatUpMessage: db "@" - BattleCommand_StatDownMessage: ld a, [wFailedMessage] and a @@ -4815,7 +4674,6 @@ BattleCommand_StatDownMessage: db "@" - TryLowerStat: ; Lower stat c from stat struct hl (buffer de). @@ -4860,7 +4718,6 @@ TryLowerStat: ret - BattleCommand_StatUpFailText: ; statupfailtext ld a, [wFailedMessage] @@ -4880,7 +4737,6 @@ BattleCommand_StatUpFailText: jp StdBattleTextBox - BattleCommand_StatDownFailText: ; statdownfailtext ld a, [wFailedMessage] @@ -4903,7 +4759,6 @@ BattleCommand_StatDownFailText: jp StdBattleTextBox - GetStatName: ld hl, StatNames ld c, "@" @@ -4923,10 +4778,8 @@ GetStatName: INCLUDE "data/battle/stat_names.asm" - INCLUDE "data/battle/stat_multipliers.asm" - BattleCommand_AllStatsUp: ; allstatsup @@ -4955,14 +4808,12 @@ BattleCommand_AllStatsUp: call BattleCommand_SpecialDefenseUp jp BattleCommand_StatUpMessage - ResetMiss: xor a ld [wAttackMissed], a ret - LowerStat: ld [wLoweredStat], a @@ -5035,7 +4886,6 @@ LowerStat: ret - BattleCommand_TriStatusChance: ; tristatuschance @@ -5057,7 +4907,6 @@ BattleCommand_TriStatusChance: dw BattleCommand_FreezeTarget ; freeze dw BattleCommand_BurnTarget ; burn - BattleCommand_Curl: ; curl ld a, BATTLE_VARS_SUBSTATUS2 @@ -5066,7 +4915,6 @@ BattleCommand_Curl: ret - BattleCommand_RaiseSubNoAnim: ld hl, GetBattleMonBackpic ld a, [hBattleTurn] @@ -5080,7 +4928,6 @@ BattleCommand_RaiseSubNoAnim: jp WaitBGMap - BattleCommand_LowerSubNoAnim: ld hl, DropPlayerSub ld a, [hBattleTurn] @@ -5094,7 +4941,6 @@ BattleCommand_LowerSubNoAnim: jp WaitBGMap - CalcPlayerStats: ld hl, wPlayerAtkLevel ld de, wPlayerStats @@ -5117,7 +4963,6 @@ CalcPlayerStats: jp BattleCommand_SwitchTurn - CalcEnemyStats: ld hl, wEnemyAtkLevel ld de, wEnemyStats @@ -5137,7 +4982,6 @@ CalcEnemyStats: jp BattleCommand_SwitchTurn - CalcStats: .loop push af @@ -5208,10 +5052,8 @@ CalcStats: ret - INCLUDE "engine/battle/move_effects/bide.asm" - BattleCommand_CheckRampage: ; checkrampage @@ -5250,7 +5092,6 @@ BattleCommand_CheckRampage: jp SkipToBattleCommand - BattleCommand_Rampage: ; rampage @@ -5279,10 +5120,8 @@ BattleCommand_Rampage: ret - INCLUDE "engine/battle/move_effects/teleport.asm" - SetBattleDraw: ld a, [wBattleResult] and BATTLERESULT_BITMASK @@ -5291,7 +5130,6 @@ SetBattleDraw: ret - BattleCommand_ForceSwitch: ; forceswitch @@ -5512,7 +5350,6 @@ BattleCommand_ForceSwitch: jp StdBattleTextBox - CheckPlayerHasMonToSwitchTo: ld a, [wPartyCount] ld d, a @@ -5543,7 +5380,6 @@ CheckPlayerHasMonToSwitchTo: ret - BattleCommand_EndLoop: ; endloop @@ -5679,7 +5515,6 @@ BattleCommand_EndLoop: ret - BattleCommand_FakeOut: ld a, [wAttackMissed] and a @@ -5702,7 +5537,6 @@ BattleCommand_FakeOut: ret - BattleCommand_FlinchTarget: call CheckSubstituteOpp ret nz @@ -5721,7 +5555,6 @@ BattleCommand_FlinchTarget: ; fallthrough - FlinchTarget: ld a, BATTLE_VARS_SUBSTATUS3_OPP call GetBattleVarAddr @@ -5729,7 +5562,6 @@ FlinchTarget: jp EndRechargeOpp - CheckOpponentWentFirst: ; Returns a=0, z if user went first ; Returns a=1, nz if opponent went first @@ -5742,7 +5574,6 @@ CheckOpponentWentFirst: ret - BattleCommand_HeldFlinch: ; kingsrock @@ -5772,7 +5603,6 @@ BattleCommand_HeldFlinch: ret - BattleCommand_OHKO: ; ohko @@ -5820,7 +5650,6 @@ BattleCommand_OHKO: ret - BattleCommand_CheckCharge: ; checkcharge @@ -5835,7 +5664,6 @@ BattleCommand_CheckCharge: jp SkipToBattleCommand - BattleCommand_Charge: ; charge @@ -5977,13 +5805,11 @@ BattleCommand_Charge: text_jump UnknownText_0x1c0d6c db "@" - BattleCommand3c: ; unused ret - BattleCommand_TrapTarget: ; traptarget @@ -6040,12 +5866,10 @@ BattleCommand_TrapTarget: dbw CLAMP, ClampedByText ; 'was CLAMPED by' dbw WHIRLPOOL, WhirlpoolTrapText ; 'was trapped!' - INCLUDE "engine/battle/move_effects/mist.asm" INCLUDE "engine/battle/move_effects/focus_energy.asm" - BattleCommand_Recoil: ; recoil @@ -6111,7 +5935,6 @@ BattleCommand_Recoil: jp StdBattleTextBox - BattleCommand_ConfuseTarget: ; confusetarget @@ -6132,7 +5955,6 @@ BattleCommand_ConfuseTarget: ret nz jr BattleCommand_FinishConfusingTarget - BattleCommand_Confuse: ; confuse @@ -6205,7 +6027,6 @@ BattleCommand_FinishConfusingTarget: ld hl, UseConfusionHealingItem jp CallBattleCore - BattleCommand_Confuse_CheckSnore_Swagger_ConfuseHit: ld a, BATTLE_VARS_MOVE_EFFECT call GetBattleVar @@ -6218,7 +6039,6 @@ BattleCommand_Confuse_CheckSnore_Swagger_ConfuseHit: jp PrintDidntAffect2 - BattleCommand_Paralyze: ; paralyze @@ -6300,7 +6120,6 @@ BattleCommand_Paralyze: jp PrintDoesntAffect - CheckMoveTypeMatchesTarget: ; Compare move type to opponent type. ; Return z if matching the opponent type, @@ -6337,10 +6156,8 @@ CheckMoveTypeMatchesTarget: ret - INCLUDE "engine/battle/move_effects/substitute.asm" - BattleCommand_RechargeNextTurn: ; rechargenextturn ld a, BATTLE_VARS_SUBSTATUS4 @@ -6349,7 +6166,6 @@ BattleCommand_RechargeNextTurn: ret - EndRechargeOpp: push hl ld a, BATTLE_VARS_SUBSTATUS4_OPP @@ -6359,10 +6175,8 @@ EndRechargeOpp: ret - INCLUDE "engine/battle/move_effects/rage.asm" - BattleCommand_DoubleFlyingDamage: ; doubleflyingdamage ld a, BATTLE_VARS_SUBSTATUS3_OPP @@ -6372,7 +6186,6 @@ BattleCommand_DoubleFlyingDamage: jr DoubleDamage - BattleCommand_DoubleUndergroundDamage: ; doubleundergrounddamage ld a, BATTLE_VARS_SUBSTATUS3_OPP @@ -6382,7 +6195,6 @@ BattleCommand_DoubleUndergroundDamage: ; fallthrough - DoubleDamage: ld hl, wCurDamage + 1 sla [hl] @@ -6397,7 +6209,6 @@ DoubleDamage: ret - INCLUDE "engine/battle/move_effects/mimic.asm" INCLUDE "engine/battle/move_effects/leech_seed.asm" @@ -6410,7 +6221,6 @@ INCLUDE "engine/battle/move_effects/pay_day.asm" INCLUDE "engine/battle/move_effects/conversion.asm" - BattleCommand_ResetStats: ; resetstats @@ -6445,7 +6255,6 @@ BattleCommand_ResetStats: ret - BattleCommand_Heal: ; heal @@ -6529,10 +6338,8 @@ BattleCommand_Heal: jp StdBattleTextBox - INCLUDE "engine/battle/move_effects/transform.asm" - BattleSideCopy: ; Copy bc bytes from hl to de if it's the player's turn. ; Copy bc bytes from de to hl if it's the enemy's turn. @@ -6549,13 +6356,11 @@ BattleSideCopy: jp CopyBytes - BattleEffect_ButItFailed: call AnimateFailedMove jp PrintButItFailed - ClearLastMove: ld a, BATTLE_VARS_LAST_COUNTER_MOVE call GetBattleVarAddr @@ -6569,7 +6374,6 @@ ClearLastMove: ret - ResetActorDisable: ld a, [hBattleTurn] and a @@ -6587,7 +6391,6 @@ ResetActorDisable: ret - BattleCommand_Screen: ; screen @@ -6634,21 +6437,18 @@ BattleCommand_Screen: jp PrintButItFailed - PrintDoesntAffect: ; 'it doesn't affect' ld hl, DoesntAffectText jp StdBattleTextBox - PrintNothingHappened: ; 'but nothing happened!' ld hl, NothingHappenedText jp StdBattleTextBox - TryPrintButItFailed: ld a, [wAlreadyFailed] and a @@ -6656,14 +6456,12 @@ TryPrintButItFailed: ; fallthrough - PrintButItFailed: ; 'but it failed!' ld hl, ButItFailedText jp StdBattleTextBox - FailMove: call AnimateFailedMove ; fallthrough @@ -6674,14 +6472,12 @@ FailMimic: jp FailText_CheckOpponentProtect - PrintDidntAffect: ; 'it didn't affect' ld hl, DidntAffect1Text jp StdBattleTextBox - PrintDidntAffect2: call AnimateFailedMove ld hl, DidntAffect1Text ; 'it didn't affect' @@ -6689,14 +6485,12 @@ PrintDidntAffect2: jp FailText_CheckOpponentProtect - PrintParalyze: ; 'paralyzed! maybe it can't attack!' ld hl, ParalyzedText jp StdBattleTextBox - CheckSubstituteOpp: ld a, BATTLE_VARS_SUBSTATUS4_OPP call GetBattleVar @@ -6704,14 +6498,12 @@ CheckSubstituteOpp: ret - INCLUDE "engine/battle/move_effects/selfdestruct.asm" INCLUDE "engine/battle/move_effects/mirror_move.asm" INCLUDE "engine/battle/move_effects/metronome.asm" - CheckUserMove: ; Return z if the user has move a. ld b, a @@ -6737,7 +6529,6 @@ CheckUserMove: ret - ResetTurn: ld hl, wPlayerCharging ld a, [hBattleTurn] @@ -6753,10 +6544,8 @@ ResetTurn: jp EndMoveEffect - INCLUDE "engine/battle/move_effects/thief.asm" - BattleCommand_ArenaTrap: ; arenatrap @@ -6784,10 +6573,8 @@ BattleCommand_ArenaTrap: jp PrintButItFailed - INCLUDE "engine/battle/move_effects/nightmare.asm" - BattleCommand_Defrost: ; defrost @@ -6820,7 +6607,6 @@ BattleCommand_Defrost: jp StdBattleTextBox - INCLUDE "engine/battle/move_effects/curse.asm" INCLUDE "engine/battle/move_effects/protect.asm" @@ -6837,13 +6623,11 @@ INCLUDE "engine/battle/move_effects/sandstorm.asm" INCLUDE "engine/battle/move_effects/rollout.asm" - BattleCommand5d: ; unused ret - INCLUDE "engine/battle/move_effects/fury_cutter.asm" INCLUDE "engine/battle/move_effects/attract.asm" @@ -6856,7 +6640,6 @@ INCLUDE "engine/battle/move_effects/frustration.asm" INCLUDE "engine/battle/move_effects/safeguard.asm" - SafeCheckSafeguard: push hl ld hl, wEnemyScreens @@ -6871,7 +6654,6 @@ SafeCheckSafeguard: ret - BattleCommand_CheckSafeguard: ; checksafeguard ld hl, wEnemyScreens @@ -6890,7 +6672,6 @@ BattleCommand_CheckSafeguard: jp EndMoveEffect - INCLUDE "engine/battle/move_effects/magnitude.asm" INCLUDE "engine/battle/move_effects/baton_pass.asm" @@ -6899,19 +6680,16 @@ INCLUDE "engine/battle/move_effects/pursuit.asm" INCLUDE "engine/battle/move_effects/rapid_spin.asm" - BattleCommand_HealMorn: ; healmorn ld b, MORN_F jr BattleCommand_TimeBasedHealContinue - BattleCommand_HealDay: ; healday ld b, DAY_F jr BattleCommand_TimeBasedHealContinue - BattleCommand_HealNite: ; healnite ld b, NITE_F @@ -6999,7 +6777,6 @@ BattleCommand_TimeBasedHealContinue: dw GetHalfMaxHP dw GetMaxHP - INCLUDE "engine/battle/move_effects/hidden_power.asm" INCLUDE "engine/battle/move_effects/rain_dance.asm" @@ -7012,7 +6789,6 @@ INCLUDE "engine/battle/move_effects/psych_up.asm" INCLUDE "engine/battle/move_effects/mirror_coat.asm" - BattleCommand_DoubleMinimizeDamage: ; doubleminimizedamage @@ -7036,7 +6812,6 @@ BattleCommand_DoubleMinimizeDamage: ret - BattleCommand_SkipSunCharge: ; mimicsuncharge ld a, [wBattleWeather] @@ -7046,12 +6821,10 @@ BattleCommand_SkipSunCharge: jp SkipToBattleCommand - INCLUDE "engine/battle/move_effects/future_sight.asm" INCLUDE "engine/battle/move_effects/thunder.asm" - CheckHiddenOpponent: ; BUG: This routine should account for Lock-On and Mind Reader. ld a, BATTLE_VARS_SUBSTATUS3_OPP @@ -7060,7 +6833,6 @@ CheckHiddenOpponent: ret - GetUserItem: ; Return the effect of the user's item in bc, and its id at hl. ld hl, wBattleMonItem @@ -7073,7 +6845,6 @@ GetUserItem: jp GetItemHeldEffect - GetOpponentItem: ; Return the effect of the opponent's item in bc, and its id at hl. ld hl, wEnemyMonItem @@ -7086,7 +6857,6 @@ GetOpponentItem: jp GetItemHeldEffect - GetItemHeldEffect: ; Return the effect of item b in bc. ld a, b @@ -7108,7 +6878,6 @@ GetItemHeldEffect: ret - AnimateCurrentMoveEitherSide: push hl push de @@ -7126,7 +6895,6 @@ AnimateCurrentMoveEitherSide: ret - AnimateCurrentMove: push hl push de @@ -7144,7 +6912,6 @@ AnimateCurrentMove: ret - PlayDamageAnim: xor a ld [wFXAnimID + 1], a @@ -7168,7 +6935,6 @@ PlayDamageAnim: jp PlayUserBattleAnim - LoadMoveAnim: xor a ld [wNumHits], a @@ -7181,13 +6947,11 @@ LoadMoveAnim: ; fallthrough - LoadAnim: ld [wFXAnimID], a ; fallthrough - PlayUserBattleAnim: push hl push de @@ -7199,7 +6963,6 @@ PlayUserBattleAnim: ret - PlayOpponentBattleAnim: ld a, e ld [wFXAnimID], a @@ -7222,21 +6985,18 @@ PlayOpponentBattleAnim: ret - CallBattleCore: ld a, BANK("Battle Core") rst FarCall ret - AnimateFailedMove: call BattleCommand_LowerSub call BattleCommand_MoveDelay jp BattleCommand_RaiseSub - BattleCommand_MoveDelay: ; movedelay ; Wait 40 frames. @@ -7244,7 +7004,6 @@ BattleCommand_MoveDelay: jp DelayFrames - BattleCommand_ClearText: ; cleartext @@ -7255,7 +7014,6 @@ BattleCommand_ClearText: .text db "@" - SkipToBattleCommand: ; Skip over commands until reaching command b. ld a, [wBattleScriptBufferAddress + 1] @@ -7274,7 +7032,6 @@ SkipToBattleCommand: ret - GetMoveAttr: ; Assuming hl = Moves + x, return attribute x of move a. push bc @@ -7285,7 +7042,6 @@ GetMoveAttr: ret - GetMoveData: ; Copy move struct a to de. ld hl, Moves @@ -7295,31 +7051,26 @@ GetMoveData: jp FarCopyBytes - GetMoveByte: ld a, BANK(Moves) jp GetFarByte - DisappearUser: farcall _DisappearUser ret - AppearUserLowerSub: farcall _AppearUserLowerSub ret - AppearUserRaiseSub: farcall _AppearUserRaiseSub ret - _CheckBattleScene: ; Checks the options. Returns carry if battle animations are disabled. push hl diff --git a/engine/battle/hidden_power.asm b/engine/battle/hidden_power.asm index 5f3791e18..537fe4354 100644 --- a/engine/battle/hidden_power.asm +++ b/engine/battle/hidden_power.asm @@ -8,7 +8,6 @@ HiddenPowerDamage: ld hl, wEnemyMonDVs .got_dvs - ; Power: ; Take the top bit from each stat @@ -62,7 +61,6 @@ HiddenPowerDamage: ld d, a - ; Type: ; Def & 3 diff --git a/engine/battle/misc.asm b/engine/battle/misc.asm index 1b6cb6783..74b942743 100644 --- a/engine/battle/misc.asm +++ b/engine/battle/misc.asm @@ -49,7 +49,6 @@ GetPlayerBackpicCoords: lb bc, 6, 6 ret - DoWeatherModifiers: ld de, WeatherTypeModifiers @@ -76,7 +75,6 @@ DoWeatherModifiers: inc de jr .CheckWeatherType - .done_weather_types ld de, WeatherMoveModifiers @@ -147,7 +145,6 @@ DoWeatherModifiers: INCLUDE "data/battle/weather_modifiers.asm" - DoBadgeTypeBoosts: ld a, [wLinkMode] and a diff --git a/engine/battle/move_effects/attract.asm b/engine/battle/move_effects/attract.asm index 45417936f..bb7b4fce4 100644 --- a/engine/battle/move_effects/attract.asm +++ b/engine/battle/move_effects/attract.asm @@ -22,7 +22,6 @@ BattleCommand_Attract: .failed jp FailMove - CheckOppositeGender: ld a, MON_SPECIES call BattlePartyAttr diff --git a/engine/battle/move_effects/baton_pass.asm b/engine/battle/move_effects/baton_pass.asm index 2937a8306..5f15b3cea 100644 --- a/engine/battle/move_effects/baton_pass.asm +++ b/engine/battle/move_effects/baton_pass.asm @@ -5,7 +5,6 @@ BattleCommand_BatonPass: and a jp nz, .Enemy - ; Need something to switch to call CheckAnyOtherAlivePartyMons jp z, FailedBatonPass @@ -45,7 +44,6 @@ BattleCommand_BatonPass: call ResetBatonPassStatus ret - .Enemy: ; Wildmons don't have anything to switch to @@ -82,7 +80,6 @@ BattleCommand_BatonPass: jr ResetBatonPassStatus - BatonPass_LinkPlayerSwitch: ld a, [wLinkMode] and a @@ -101,7 +98,6 @@ BatonPass_LinkPlayerSwitch: ret - BatonPass_LinkEnemySwitch: ld a, [wLinkMode] and a @@ -128,13 +124,11 @@ BatonPass_LinkEnemySwitch: jp CloseWindow - FailedBatonPass: call AnimateFailedMove jp PrintButItFailed - ResetBatonPassStatus: ; Reset status changes that aren't passed by Baton Pass. @@ -175,7 +169,6 @@ ResetBatonPassStatus: ret - CheckAnyOtherAlivePartyMons: ld hl, wPartyMon1HP ld a, [wPartyCount] @@ -185,7 +178,6 @@ CheckAnyOtherAlivePartyMons: jr CheckAnyOtherAliveMons - CheckAnyOtherAliveEnemyMons: ld hl, wOTPartyMon1HP ld a, [wOTPartyCount] diff --git a/engine/battle/move_effects/beat_up.asm b/engine/battle/move_effects/beat_up.asm index 40a375e0d..5e6cfae22 100644 --- a/engine/battle/move_effects/beat_up.asm +++ b/engine/battle/move_effects/beat_up.asm @@ -194,13 +194,11 @@ BattleCommand_BeatUp: ret - .beatup_fail ld b, buildopponentrage_command jp SkipToBattleCommand - BattleCommand_BeatUpFailText: ; beatupfailtext @@ -211,7 +209,6 @@ BattleCommand_BeatUpFailText: jp PrintButItFailed - GetBeatupMonLocation: push bc ld c, a diff --git a/engine/battle/move_effects/bide.asm b/engine/battle/move_effects/bide.asm index b28773df9..d7d8203b0 100644 --- a/engine/battle/move_effects/bide.asm +++ b/engine/battle/move_effects/bide.asm @@ -70,7 +70,6 @@ BattleCommand_StoreEnergy: jp EndMoveEffect - BattleCommand_UnleashEnergy: ; unleashenergy diff --git a/engine/battle/move_effects/curse.asm b/engine/battle/move_effects/curse.asm index e0fc0144c..4861e9a37 100644 --- a/engine/battle/move_effects/curse.asm +++ b/engine/battle/move_effects/curse.asm @@ -21,7 +21,6 @@ BattleCommand_Curse: cp GHOST jr z, .ghost - ; If no stats can be increased, don't. ; Attack @@ -54,7 +53,6 @@ BattleCommand_Curse: call BattleCommand_DefenseUp jp BattleCommand_StatUpMessage - .ghost ; Cut HP in half and put a curse on the opponent. @@ -84,7 +82,6 @@ BattleCommand_Curse: call AnimateFailedMove jp PrintButItFailed - .cantraise ; Can't raise either stat. diff --git a/engine/battle/move_effects/fury_cutter.asm b/engine/battle/move_effects/fury_cutter.asm index b34264d62..a3a8c44b3 100644 --- a/engine/battle/move_effects/fury_cutter.asm +++ b/engine/battle/move_effects/fury_cutter.asm @@ -39,7 +39,6 @@ BattleCommand_FuryCutter: ret - ResetFuryCutterCount: push hl diff --git a/engine/battle/move_effects/future_sight.asm b/engine/battle/move_effects/future_sight.asm index c1b5c0e72..8b08ce982 100644 --- a/engine/battle/move_effects/future_sight.asm +++ b/engine/battle/move_effects/future_sight.asm @@ -25,7 +25,6 @@ BattleCommand_CheckFutureSight: ld b, futuresight_command jp SkipToBattleCommand - BattleCommand_FutureSight: ; futuresight diff --git a/engine/battle/move_effects/metronome.asm b/engine/battle/move_effects/metronome.asm index b5632d005..b8a6b586f 100644 --- a/engine/battle/move_effects/metronome.asm +++ b/engine/battle/move_effects/metronome.asm @@ -34,12 +34,10 @@ BattleCommand_Metronome: call CheckUserMove jr z, .GetMove - ld a, BATTLE_VARS_MOVE call GetBattleVarAddr ld [hl], b call UpdateMoveData jp ResetTurn - INCLUDE "data/battle/metronome_exception_moves.asm" diff --git a/engine/battle/move_effects/pain_split.asm b/engine/battle/move_effects/pain_split.asm index a4dbd3d44..a94ccff6f 100644 --- a/engine/battle/move_effects/pain_split.asm +++ b/engine/battle/move_effects/pain_split.asm @@ -89,7 +89,6 @@ BattleCommand_PainSplit: ld [wBuffer6], a ret - .ButItFailed: jp PrintDidntAffect2 diff --git a/engine/battle/move_effects/perish_song.asm b/engine/battle/move_effects/perish_song.asm index 221ecfb46..4df52cc1c 100644 --- a/engine/battle/move_effects/perish_song.asm +++ b/engine/battle/move_effects/perish_song.asm @@ -1,7 +1,6 @@ BattleCommand_PerishSong: ; perishsong - ld hl, wPlayerSubStatus1 ld de, wEnemySubStatus1 bit SUBSTATUS_PERISH, [hl] diff --git a/engine/battle/move_effects/protect.asm b/engine/battle/move_effects/protect.asm index 768e51cbb..92652109d 100644 --- a/engine/battle/move_effects/protect.asm +++ b/engine/battle/move_effects/protect.asm @@ -12,7 +12,6 @@ BattleCommand_Protect: ld hl, ProtectedItselfText jp StdBattleTextBox - ProtectChance: ld de, wPlayerProtectCount @@ -68,7 +67,6 @@ ProtectChance: and a ret - .failed xor a ld [de], a diff --git a/engine/battle/move_effects/rollout.asm b/engine/battle/move_effects/rollout.asm index da890f48f..de4bfcaa6 100644 --- a/engine/battle/move_effects/rollout.asm +++ b/engine/battle/move_effects/rollout.asm @@ -1,6 +1,5 @@ MAX_ROLLOUT_COUNT EQU 5 - BattleCommand_CheckCurl: ; checkcurl @@ -23,7 +22,6 @@ BattleCommand_CheckCurl: ld [de], a ret - BattleCommand_RolloutPower: ; rolloutpower diff --git a/engine/battle/move_effects/thief.asm b/engine/battle/move_effects/thief.asm index d9d2f47fd..64de1a4fe 100644 --- a/engine/battle/move_effects/thief.asm +++ b/engine/battle/move_effects/thief.asm @@ -50,7 +50,6 @@ BattleCommand_Thief: ld [de], a jr .stole - .enemy ; The enemy can't already have an item. @@ -91,13 +90,11 @@ BattleCommand_Thief: ld [hl], a ld [de], a - .stole call GetItemName ld hl, StoleText jp StdBattleTextBox - .playeritem ld a, 1 call BattlePartyAttr diff --git a/engine/battle/move_effects/triple_kick.asm b/engine/battle/move_effects/triple_kick.asm index 4fb939d7c..358e84b94 100644 --- a/engine/battle/move_effects/triple_kick.asm +++ b/engine/battle/move_effects/triple_kick.asm @@ -27,7 +27,6 @@ BattleCommand_TripleKick: ret - BattleCommand_KickCounter: ; kickcounter diff --git a/engine/battle/read_trainer_party.asm b/engine/battle/read_trainer_party.asm index 3b1fe3bca..9775e1dcc 100644 --- a/engine/battle/read_trainer_party.asm +++ b/engine/battle/read_trainer_party.asm @@ -321,7 +321,6 @@ ComputeTrainerReward: ld [hl], a ret - Battle_GetTrainerName:: ld a, [wInBattleTowerBattle] bit 0, a diff --git a/engine/battle/used_move_text.asm b/engine/battle/used_move_text.asm index 2bb6b7845..9307a1a1e 100644 --- a/engine/battle/used_move_text.asm +++ b/engine/battle/used_move_text.asm @@ -131,7 +131,6 @@ EndUsedMove5Text: text_jump _EndUsedMove5Text db "@" - GetMoveGrammar: ; store move grammar type in wd265 @@ -169,7 +168,6 @@ GetMoveGrammar: INCLUDE "data/moves/grammar.asm" - UpdateUsedMoves: ; append move a to wPlayerUsedMoves unless it has already been used diff --git a/engine/battle_anims/anim_commands.asm b/engine/battle_anims/anim_commands.asm index b30a42bf2..8bdbe62c9 100644 --- a/engine/battle_anims/anim_commands.asm +++ b/engine/battle_anims/anim_commands.asm @@ -240,7 +240,6 @@ Unreferenced_Functioncc220: call BattleAnimDelayFrame ret - BattleAnim_ClearCGB_OAMFlags: ld a, [wBattleAnimFlags] @@ -333,7 +332,6 @@ RunBattleAnimCommand: ld l, a jp hl - BattleAnimCommands:: ; entries correspond to macros/scripts/battle_anims.asm enumeration dw BattleAnimCmd_Obj @@ -385,7 +383,6 @@ BattleAnimCommands:: dw BattleAnimCmd_Call dw BattleAnimCmd_Ret - BattleAnimCmd_EA: BattleAnimCmd_EB: BattleAnimCmd_EC: @@ -1304,7 +1301,6 @@ endr dw $0000, $0000 dw $0000, $0000 - PlayHitSound: ld a, [wNumHits] cp $1 diff --git a/engine/battle_anims/bg_effects.asm b/engine/battle_anims/bg_effects.asm index 89ffb0aa4..3cbaa9a22 100644 --- a/engine/battle_anims/bg_effects.asm +++ b/engine/battle_anims/bg_effects.asm @@ -134,7 +134,6 @@ BattleBGEffects: dw BattleBGEffect_WobbleMon dw BattleBGEffect_35 - BattleBGEffect_End: call EndBattleBGEffect ret @@ -348,7 +347,6 @@ BattleBGEffect_HideMon: dw BattleBGEffects_IncrementJumptable dw .four - .zero call BattleBGEffects_IncrementJumptable push bc @@ -415,7 +413,6 @@ BattleBGEffect_FeetFollow: dw BattleBGEffects_IncrementJumptable dw .five - .zero call BGEffect_CheckFlyDigStatus jr z, .not_flying_digging @@ -483,7 +480,6 @@ BattleBGEffect_HeadFollow: dw BattleBGEffects_IncrementJumptable dw .five - .zero call BGEffect_CheckFlyDigStatus jr z, .not_flying_digging @@ -554,7 +550,6 @@ BattleBGEffect_27: dw BattleBGEffects_IncrementJumptable dw .four - .zero call BattleBGEffects_IncrementJumptable call BGEffect_CheckBattleTurn @@ -717,7 +712,6 @@ BattleBGEffect_RunPicResizeScript: dw .restart dw .end - .zero ld hl, BG_EFFECT_STRUCT_03 add hl, bc @@ -915,7 +909,6 @@ BattleBGEffect_Surf: dw .one dw .two - .zero call BattleBGEffects_IncrementJumptable lb de, 2, 2 @@ -982,7 +975,6 @@ BattleBGEffect_Whirlpool: dw .one dw .two - .zero call BattleBGEffects_IncrementJumptable call BattleBGEffects_ClearLYOverrides @@ -1056,7 +1048,6 @@ BattleBGEffect_Psychic: dw .one dw .two - .zero call BattleBGEffects_IncrementJumptable call BattleBGEffects_ClearLYOverrides @@ -1094,7 +1085,6 @@ BattleBGEffect_Teleport: dw .one dw .two - .zero call BattleBGEffects_IncrementJumptable call BattleBGEffects_ClearLYOverrides @@ -1119,7 +1109,6 @@ BattleBGEffect_NightShade: dw .one dw .two - .zero call BattleBGEffects_IncrementJumptable call BattleBGEffects_ClearLYOverrides @@ -1150,7 +1139,6 @@ BattleBGEffect_DoubleTeam: dw .four dw .five - .zero call BattleBGEffects_IncrementJumptable call BattleBGEffects_ClearLYOverrides @@ -1242,7 +1230,6 @@ BattleBGEffect_AcidArmor: dw .one dw .two - .zero call BattleBGEffects_IncrementJumptable call BattleBGEffects_ClearLYOverrides @@ -1305,7 +1292,6 @@ BattleBGEffect_Withdraw: dw .one dw .two - .zero call BattleBGEffects_IncrementJumptable call BattleBGEffects_ClearLYOverrides @@ -1355,7 +1341,6 @@ BattleBGEffect_Dig: dw .two dw .three - .zero call BattleBGEffects_IncrementJumptable call BattleBGEffects_ClearLYOverrides @@ -1422,7 +1407,6 @@ BattleBGEffect_Tackle: dw Tackle_BGEffect25_2d_two dw .three - .zero call BattleBGEffects_IncrementJumptable call BattleBGEffects_ClearLYOverrides @@ -1457,7 +1441,6 @@ BattleBGEffect_25: dw Tackle_BGEffect25_2d_two dw .three - .zero call BattleBGEffects_IncrementJumptable call BattleBGEffects_ClearLYOverrides @@ -1585,7 +1568,6 @@ BattleBGEffect_2d: dw Tackle_BGEffect25_2d_two dw .three - .three call BattleAnim_ResetLCDStatCustom ret @@ -1633,7 +1615,6 @@ BattleBGEffect_26: dw .one dw .two - .zero call BattleBGEffects_IncrementJumptable call BattleBGEffects_ClearLYOverrides @@ -1672,7 +1653,6 @@ BattleBGEffect_2c: dw .one dw .two - .zero call BattleBGEffects_IncrementJumptable call BattleBGEffects_ClearLYOverrides @@ -1727,7 +1707,6 @@ BattleBGEffect_28: dw .one dw .two - .zero call BattleBGEffects_IncrementJumptable call BattleBGEffects_ClearLYOverrides @@ -1770,7 +1749,6 @@ BattleBGEffect_BounceDown: dw .one dw .two - .zero call BattleBGEffects_IncrementJumptable call BattleBGEffects_ClearLYOverrides @@ -1928,7 +1906,6 @@ BattleBGEffect_2b: dw .zero dw .one - .zero call BattleBGEffects_IncrementJumptable call BattleBGEffects_ClearLYOverrides @@ -1969,7 +1946,6 @@ BattleBGEffect_1c: dw .one dw .two - .zero call BattleBGEffects_IncrementJumptable ld a, $e4 @@ -2196,7 +2172,6 @@ BattleBGEffect_VibrateMon: dw .zero dw .one - .zero call BattleBGEffects_IncrementJumptable call BattleBGEffects_ClearLYOverrides @@ -2242,7 +2217,6 @@ BattleBGEffect_WobbleMon: dw .one dw .two - .zero call BattleBGEffects_IncrementJumptable call BattleBGEffects_ClearLYOverrides @@ -2407,7 +2381,6 @@ BGEffect_RapidCyclePals: dw .one_dmg dw .two_dmg - .zero_dmg call BattleBGEffects_IncrementJumptable ld a, $e4 @@ -2472,7 +2445,6 @@ BGEffect_RapidCyclePals: dw .three_cgb dw .four_cgb - .zero_cgb call BGEffect_CheckBattleTurn jr nz, .player_turn_cgb diff --git a/engine/battle_anims/core.asm b/engine/battle_anims/core.asm index 20ab74e7b..16842269b 100644 --- a/engine/battle_anims/core.asm +++ b/engine/battle_anims/core.asm @@ -26,7 +26,6 @@ DeinitBattleAnimation: ld [hl], $0 ret - InitBattleAnimation: ld a, [wBattleAnimTemp0] ld e, a @@ -190,7 +189,6 @@ BattleAnimOAMUpdate: scf ret - InitBattleAnimBuffer: ld hl, BATTLEANIMSTRUCT_01 add hl, bc @@ -274,7 +272,6 @@ InitBattleAnimBuffer: ld [wBattleAnimTempXOffset], a ret - GetBattleAnimTileOffset: push hl push bc @@ -302,7 +299,6 @@ _ExecuteBGEffects: callfar ExecuteBGEffects ret - _QueueBGEffect: callfar QueueBGEffect ret diff --git a/engine/battle_anims/helpers.asm b/engine/battle_anims/helpers.asm index 09eb3479f..742897429 100644 --- a/engine/battle_anims/helpers.asm +++ b/engine/battle_anims/helpers.asm @@ -72,7 +72,6 @@ GetBattleAnimFrame: ld [hl], a jr .loop - .GetPointer: ld hl, BATTLEANIMSTRUCT_FRAMESET_ID add hl, bc @@ -92,7 +91,6 @@ GetBattleAnimFrame: add hl, de ret - GetBattleAnimOAMPointer: ld l, a ld h, 0 @@ -102,7 +100,6 @@ GetBattleAnimOAMPointer: add hl, de ret - LoadBattleAnimObj: push hl ld l, a diff --git a/engine/events/battle_tower/battle_tower.asm b/engine/events/battle_tower/battle_tower.asm index 59ec3a1a4..e51080ae0 100644 --- a/engine/events/battle_tower/battle_tower.asm +++ b/engine/events/battle_tower/battle_tower.asm @@ -264,7 +264,6 @@ RunBattleTowerTrainer: ld [wBattleTowerBattleEnded], a ret - ReadBTTrainerParty: ; Initialise the BattleTower-Trainer and his mon call CopyBTTrainer_FromBT_OT_TowBT_OTTemp @@ -555,7 +554,6 @@ Function17042c: INCLUDE "data/battle_tower/unknown_levels.asm" - CopyBTTrainer_FromBT_OT_TowBT_OTTemp: ; copy the BattleTower-Trainer data that lies at 'wBT_OTTrainer' to 'wBT_OTTemp' ld a, [rSVBK] @@ -672,12 +670,10 @@ Function1704e1: call .PlaceTextItems jr .NextJumptableFunction - .Jumptable_1: call SetPalettes call .NextJumptableFunction - .Jumptable_2: ld hl, hJoyPressed ld a, [hl] @@ -882,7 +878,6 @@ BattleTowerAction: ld l, a jp hl - .dw dw BattleTowerAction_CheckExplanationRead ; 0x00 dw BattleTowerAction_SetExplanationRead ; 0x01 @@ -917,7 +912,6 @@ BattleTowerAction: dw BattleTower_RandomlyChooseReward ; 0x1e dw BattleTower_SaveOptions ; 0x1f - ; Reset the save memory for BattleTower-Trainers (Counter and all 7 TrainerBytes) ResetBattleTowerTrainersSRAM: ; BattleTowerAction $1a ld a, BANK(sBTTrainers) @@ -1200,7 +1194,6 @@ BattleTower_CheckSaveFileExistsAndIsYours: ; BattleTowerAction $09 ld [wScriptVar], a ret - Function1708b1: ; BattleTowerAction $0a xor a ld [wMusicFade], a @@ -1260,7 +1253,6 @@ Function1708f0: ; BattleTowerAction $0d ld [wScriptVar], a ret - Function170923: ld a, $5 call GetSRAMBank @@ -1273,7 +1265,6 @@ Function170923: call CloseSRAM ret - BattleTowerAction_EggTicket: ; BattleTowerAction $0e xor a ld [wScriptVar], a diff --git a/engine/events/battle_tower/load_trainer.asm b/engine/events/battle_tower/load_trainer.asm index 3e6dead8a..2f34950b6 100644 --- a/engine/events/battle_tower/load_trainer.asm +++ b/engine/events/battle_tower/load_trainer.asm @@ -91,7 +91,6 @@ endc ret - Function_LoadRandomBattleTowerMon: ld c, BATTLETOWER_PARTY_LENGTH .loop diff --git a/engine/events/battle_tower/trainer_text.asm b/engine/events/battle_tower/trainer_text.asm index 1172717d6..2c9902bf0 100644 --- a/engine/events/battle_tower/trainer_text.asm +++ b/engine/events/battle_tower/trainer_text.asm @@ -88,7 +88,6 @@ INCLUDE "mobile/fixed_words.asm" INCLUDE "data/trainers/genders.asm" - BTMaleTrainerTexts: dw .Greetings dw .PlayerLost @@ -175,7 +174,6 @@ BTMaleTrainerTexts: dw BTWinM24 dw BTWinM25 - BTFemaleTrainerTexts: dw .Greetings dw .PlayerLost @@ -232,7 +230,6 @@ BTFemaleTrainerTexts: dw BTWinF14 dw BTWinF15 - BTGreetingM1: text_jump BattleTowerText_0x1ec000 db "@" @@ -535,7 +532,6 @@ BTWinM25: - BTGreetingF1: text_jump UnknownText_0x1ec9bd db "@" diff --git a/engine/events/bug_contest/judging.asm b/engine/events/bug_contest/judging.asm index 0f5ff2b7c..d8f9d7657 100644 --- a/engine/events/bug_contest/judging.asm +++ b/engine/events/bug_contest/judging.asm @@ -125,10 +125,8 @@ LoadContestantName: ld bc, NAME_LENGTH jp CopyBytes - INCLUDE "data/events/bug_contest_winners.asm" - BugContest_GetPlayersResult: ld hl, wBugContestThirdPlaceWinnerID ld de, - BUG_CONTESTANT_SIZE diff --git a/engine/events/celebi.asm b/engine/events/celebi.asm index c0f4fcf36..51c5b04a1 100644 --- a/engine/events/celebi.asm +++ b/engine/events/celebi.asm @@ -41,7 +41,6 @@ CelebiShrineEvent: pop bc jr .loop - .done pop af ld [wVramState], a @@ -49,7 +48,6 @@ CelebiShrineEvent: call CelebiEvent_SetBattleType ret - .RestorePlayerSprite_DespawnLeaves: ld hl, wVirtualOAMSprite00TileID xor a @@ -68,7 +66,6 @@ endr call ByteFill ret - LoadCelebiGFX: farcall ClearSpriteAnims ld de, SpecialCelebiLeafGFX @@ -83,7 +80,6 @@ LoadCelebiGFX: ld [wJumptableIndex], a ret - CelebiEvent_CountDown: ld hl, wFrameCounter ld a, [hl] @@ -92,13 +88,11 @@ CelebiEvent_CountDown: dec [hl] ret - .done ld hl, wJumptableIndex set 7, [hl] ret - CelebiEvent_SpawnLeaf: ; unused ld hl, wcf65 @@ -119,7 +113,6 @@ CelebiEvent_SpawnLeaf: ld [hl], $80 ret - SpecialCelebiLeafGFX: INCBIN "gfx/overworld/cut_grass.2bpp" @@ -129,7 +122,6 @@ INCBIN "gfx/overworld/celebi/2.2bpp" INCBIN "gfx/overworld/celebi/3.2bpp" INCBIN "gfx/overworld/celebi/4.2bpp" - UpdateCelebiPosition: ld hl, SPRITEANIMSTRUCT_XOFFSET add hl, bc @@ -224,7 +216,6 @@ UpdateCelebiPosition: .done ret - .FreezeCelebiPosition: pop af ld hl, SPRITEANIMSTRUCT_FRAMESET_ID @@ -233,7 +224,6 @@ UpdateCelebiPosition: call ReinitSpriteAnimFrame ret - CelebiEvent_Cosine: ; a = d * cos(a * pi/32) add %010000 ; cos(x) = sin(x + pi/2) @@ -261,22 +251,18 @@ GetCelebiSpriteTile: jr c, .done jr .restart - .Frame1: ld a, SPECIALCELEBIEVENT_CELEBI jr .load_tile - .Frame2: ld a, SPECIALCELEBIEVENT_CELEBI + 4 jr .load_tile - .Frame3: ld a, SPECIALCELEBIEVENT_CELEBI + 8 jr .load_tile - .Frame4: ld a, SPECIALCELEBIEVENT_CELEBI + 12 @@ -286,7 +272,6 @@ GetCelebiSpriteTile: ld [hl], a jr .done - .restart pop de ld d, $ff @@ -298,7 +283,6 @@ GetCelebiSpriteTile: pop hl ret - .AddE: push af ld a, d @@ -307,13 +291,11 @@ GetCelebiSpriteTile: pop af ret - CelebiEvent_SetBattleType: ld a, BATTLETYPE_CELEBI ld [wBattleType], a ret - CheckCaughtCelebi: ld a, [wBattleResult] bit BATTLERESULT_CAUGHT_CELEBI, a @@ -322,7 +304,6 @@ CheckCaughtCelebi: ld [wScriptVar], a jr .done - .false xor a ; FALSE ld [wScriptVar], a diff --git a/engine/events/elevator.asm b/engine/events/elevator.asm index 76ef11d6a..705b24992 100644 --- a/engine/events/elevator.asm +++ b/engine/events/elevator.asm @@ -142,7 +142,6 @@ Elevator_WhichFloorText: text_jump UnknownText_0x1bd2bc db "@" - Elevator_GetCurrentFloorText: ld hl, wOptions ld a, [hl] @@ -164,7 +163,6 @@ Elevator_GetCurrentFloorText: Elevator_CurrentFloorText: db "Now on:@" - Elevator_GetCurrentFloorString: push hl ld a, [wElevatorOriginFloor] diff --git a/engine/events/engine_flags.asm b/engine/events/engine_flags.asm index 7c894587c..6c2148f79 100644 --- a/engine/events/engine_flags.asm +++ b/engine/events/engine_flags.asm @@ -7,7 +7,6 @@ EngineFlagAction:: ; ; Setting/resetting does not return a result. - ; 16-bit flag ids are considered invalid, but it's nice ; to know that the infrastructure is there. @@ -81,5 +80,4 @@ EngineFlagAction:: ld [de], a ret - INCLUDE "data/engine_flags.asm" diff --git a/engine/events/field_moves.asm b/engine/events/field_moves.asm index b8157fe38..e87c2ae0d 100644 --- a/engine/events/field_moves.asm +++ b/engine/events/field_moves.asm @@ -161,14 +161,12 @@ OWCutJumptable: ld l, a jp hl - .dw dw Cut_SpawnAnimateTree dw Cut_SpawnAnimateLeaves dw Cut_StartWaiting dw Cut_WaitAnimSFX - Cut_SpawnAnimateTree: call Cut_Headbutt_GetPixelFacing ld a, SPRITE_ANIM_INDEX_CUT_TREE ; cut tree @@ -303,7 +301,6 @@ Cut_Headbutt_GetPixelFacing: dbpixel 8, 11 dbpixel 12, 11 - FlyFromAnim: call DelayFrame ld a, [wVramState] diff --git a/engine/events/fish.asm b/engine/events/fish.asm index 9d695a908..a1df536bb 100644 --- a/engine/events/fish.asm +++ b/engine/events/fish.asm @@ -21,7 +21,6 @@ endr pop af ret - .Fish: ; Fish for monsters with rod b from encounter data in FishGroup at hl. ; Return monster e at level d. @@ -90,7 +89,6 @@ endr inc hl ret - GetFishGroupIndex: ; Return the index of fishgroup d in de. @@ -126,5 +124,4 @@ GetFishGroupIndex: ld d, FISHGROUP_REMORAID_SWARM jr .done - INCLUDE "data/wild/fish.asm" diff --git a/engine/events/fruit_trees.asm b/engine/events/fruit_trees.asm index 4e955147a..6d5ca6a1d 100644 --- a/engine/events/fruit_trees.asm +++ b/engine/events/fruit_trees.asm @@ -94,10 +94,8 @@ GetFruitTreeItem: pop hl ret - INCLUDE "data/items/fruit_trees.asm" - FruitBearingTreeText: text_jump _FruitBearingTreeText db "@" diff --git a/engine/events/halloffame.asm b/engine/events/halloffame.asm index 11107cdb3..f69a0d8fe 100644 --- a/engine/events/halloffame.asm +++ b/engine/events/halloffame.asm @@ -134,7 +134,6 @@ AnimateHallOfFame: .String_NewHallOfFamer: db "New Hall of Famer!@" - GetHallOfFameParty: ld hl, wHallOfFamePokemonList ld bc, wHallOfFamePokemonListEnd - wHallOfFamePokemonList + 1 diff --git a/engine/events/happiness_egg.asm b/engine/events/happiness_egg.asm index d261caa3c..41f9a4411 100644 --- a/engine/events/happiness_egg.asm +++ b/engine/events/happiness_egg.asm @@ -102,10 +102,8 @@ ChangeHappiness: ld [wBattleMonHappiness], a ret - INCLUDE "data/events/happiness_changes.asm" - StepHappiness:: ; Raise the party's happiness by 1 point every other step cycle. @@ -141,7 +139,6 @@ StepHappiness:: jr nz, .loop ret - DayCareStep:: ; Raise the experience of Day-Care Pokémon every step cycle. diff --git a/engine/events/magikarp.asm b/engine/events/magikarp.asm index 31e8de201..21ecf5062 100644 --- a/engine/events/magikarp.asm +++ b/engine/events/magikarp.asm @@ -139,7 +139,6 @@ CalcMagikarpLength: ; if b = 252-253: x = 65210, y = 5, z = 13 ; if b = 254: x = 65410, y = 2, z = 14 - ; bc = rrc(dv[0]) ++ rrc(dv[1]) ^ rrc(id) ; id @@ -303,7 +302,6 @@ CalcMagikarpLength: INCLUDE "data/events/magikarp_lengths.asm" - MagikarpHouseSign: ld a, [wBestMagikarpLengthFeet] ld [wMagikarpLength], a diff --git a/engine/events/map_name_sign.asm b/engine/events/map_name_sign.asm index 1d8736e54..859f30034 100644 --- a/engine/events/map_name_sign.asm +++ b/engine/events/map_name_sign.asm @@ -96,7 +96,6 @@ ReturnFromMapSetupScript:: cp MAP_ROUTE_36_NATIONAL_PARK_GATE ret - PlaceMapNameSign:: ld hl, wLandmarkSignTimer ld a, [hl] @@ -125,7 +124,6 @@ PlaceMapNameSign:: ld [hLCDCPointer], a ret - LoadMapNameSignGFX: ld de, MapEntryFrameGFX ld hl, vTiles2 tile MAP_NAME_SIGN_START @@ -141,7 +139,6 @@ InitMapNameFrame: call PlaceMapNameFrame ret - PlaceMapNameCenterAlign: ld a, [wCurrentLandmark] ld e, a @@ -174,7 +171,6 @@ PlaceMapNameCenterAlign: pop hl ret - InitMapSignAttrMap: ld de, wAttrMap - wTileMap add hl, de diff --git a/engine/events/mom_phone.asm b/engine/events/mom_phone.asm index fa82da50a..dc10ede35 100644 --- a/engine/events/mom_phone.asm +++ b/engine/events/mom_phone.asm @@ -113,7 +113,6 @@ CheckBalance_MomItem2: farcall AddMoney ret - MomBuysItem_DeductFunds: call GetItemFromMom ld de, 3 ; cost @@ -129,7 +128,6 @@ MomBuysItem_DeductFunds: farcall TakeMoney ret - Mom_GiveItemOrDoll: call GetItemFromMom ld de, 6 ; item type @@ -153,7 +151,6 @@ Mom_GiveItemOrDoll: call ReceiveItem ret - Mom_GetScriptPointer: call GetItemFromMom ld de, 6 ; item type @@ -179,7 +176,6 @@ Mom_GetScriptPointer: writetext _MomText_ItsInRoom end - GetItemFromMom: ld a, [wWhichMomItemSet] and a diff --git a/engine/events/money.asm b/engine/events/money.asm index c4e20fc3e..c8f9d058e 100644 --- a/engine/events/money.asm +++ b/engine/events/money.asm @@ -25,7 +25,6 @@ GiveMoney:: MaxMoney: dt MAX_MONEY - TakeMoney:: ld a, 3 call SubtractMoney @@ -187,7 +186,6 @@ GiveCoins:: .maxcoins bigdw MAX_COINS - TakeCoins:: ld a, 2 ld de, wCoins diff --git a/engine/events/npc_trade.asm b/engine/events/npc_trade.asm index cd83f8cb3..9cff40a2b 100644 --- a/engine/events/npc_trade.asm +++ b/engine/events/npc_trade.asm @@ -271,7 +271,6 @@ DoNPCTrade: pop af ret - GetTradeAttribute: ld d, 0 push de @@ -384,10 +383,8 @@ GetTradeMonNames: ld [hl], "@" ret - INCLUDE "data/events/npc_trades.asm" - PrintTradeText: push af call GetTradeMonNames @@ -433,13 +430,11 @@ TradeTexts: dw TradeAfterText3 dw TradeAfterText4 - ConnectLinkCableText: ; OK, connect the Game Link Cable. text_jump UnknownText_0x1bd407 db "@" - TradedForText: ; traded givemon for getmon text_jump UnknownText_0x1bd429 @@ -456,7 +451,6 @@ TradedForText: text_jump UnknownText_0x1bd445 db "@" - TradeIntroText1: ; I collect #MON. Do you have @ ? Want to trade it for my @ ? text_jump UnknownText_0x1bd449 @@ -482,7 +476,6 @@ TradeAfterText1: text_jump UnknownText_0x1bd4f4 db "@" - TradeIntroText2: TradeIntroText3: ; Hi, I'm looking for this #MON. If you have @ , would you trade it for my @ ? @@ -511,7 +504,6 @@ TradeAfterText2: text_jump UnknownText_0x1bd5f4 db "@" - TradeIntroText4: ; 's cute, but I don't have it. Do you have @ ? Want to trade it for my @ ? text_jump UnknownText_0x1bd621 @@ -537,7 +529,6 @@ TradeAfterText4: text_jump UnknownText_0x1bd6f5 db "@" - TradeCompleteText3: ; Uh? What happened? text_jump UnknownText_0x1bd731 diff --git a/engine/events/overworld.asm b/engine/events/overworld.asm index 749964707..e57635fef 100644 --- a/engine/events/overworld.asm +++ b/engine/events/overworld.asm @@ -276,10 +276,8 @@ CheckOverworldTileArrays: xor a ret - INCLUDE "data/events/field_move_blocks.asm" - OWFlash: call .CheckUseFlash and $7f diff --git a/engine/events/poke_seer.asm b/engine/events/poke_seer.asm index 6f30e24b8..dc99cb536 100644 --- a/engine/events/poke_seer.asm +++ b/engine/events/poke_seer.asm @@ -48,7 +48,6 @@ PokeSeer: call PrintSeerText ret - SeerAction: ld a, [wSeerAction] ld hl, SeerActions @@ -337,7 +336,6 @@ SeerCancelText: text_jump UnknownText_0x1c4955 db "@" - SeerAdvice: ld a, MON_LEVEL call GetPartyParamLocation @@ -398,7 +396,6 @@ SeerAdvice5: text_jump UnknownText_0x1c4ae5 db "@" - GetCaughtGender: ld hl, MON_CAUGHTGENDER add hl, bc diff --git a/engine/events/specials.asm b/engine/events/specials.asm index 8d340a79d..35d32dde6 100644 --- a/engine/events/specials.asm +++ b/engine/events/specials.asm @@ -291,7 +291,6 @@ ActivateFishingSwarm: ld [wFishingSwarmFlag], a ret - StoreSwarmMapIndices:: ld a, c and a @@ -310,7 +309,6 @@ StoreSwarmMapIndices:: ld [wYanmaMapNumber], a ret - CheckPokerus: ; Check if a monster in your party has Pokerus farcall _CheckPokerus @@ -377,12 +375,10 @@ SnorlaxAwake: db 36, 9 ; right db -1 - PlayCurMonCry: ld a, [wCurPartySpecies] jp PlayMonCry - GameboyCheck: ld a, [hCGB] and a @@ -404,7 +400,6 @@ GameboyCheck: ld [wScriptVar], a ret - FadeOutMusic: ld a, LOW(MUSIC_NONE) ld [wMusicFadeID], a diff --git a/engine/events/std_scripts.asm b/engine/events/std_scripts.asm index 222af41c7..28272405c 100644 --- a/engine/events/std_scripts.asm +++ b/engine/events/std_scripts.asm @@ -1850,7 +1850,6 @@ CoinVendor_IntroScript: closetext end - .MenuHeader: db MENU_BACKUP_TILES ; flags menu_coords 0, 4, 15, TEXTBOX_Y - 1 @@ -1864,7 +1863,6 @@ CoinVendor_IntroScript: db "500 : ¥10000@" db "CANCEL@" - HappinessCheckScript: faceplayer opentext diff --git a/engine/events/whiteout.asm b/engine/events/whiteout.asm index bf5a2257c..82b7a4868 100644 --- a/engine/events/whiteout.asm +++ b/engine/events/whiteout.asm @@ -59,7 +59,6 @@ HalveMoney: ld [hl], a ret - GetWhiteoutSpawn: ld a, [wLastSpawnMapGroup] ld d, a diff --git a/engine/games/card_flip.asm b/engine/games/card_flip.asm index 9c095a784..df46166b3 100644 --- a/engine/games/card_flip.asm +++ b/engine/games/card_flip.asm @@ -977,7 +977,6 @@ CardFlip_CheckWinCondition: ld de, SFX_2ND_PLACE jp .Payout - .PikaOne: ld e, $0 jr .CheckWin72 diff --git a/engine/games/dummy_game.asm b/engine/games/dummy_game.asm index 89e2ea698..c500dbf66 100644 --- a/engine/games/dummy_game.asm +++ b/engine/games/dummy_game.asm @@ -243,7 +243,6 @@ endr ld [wJumptableIndex], a ret - DummyGame_CheckMatch: ld hl, wDummyGameCard1 ld a, [hli] @@ -321,7 +320,6 @@ DummyGame_CheckMatch: inc bc ret - DummyGameText_Yeah: ; , yeah! text_jump UnknownText_0x1c1a5b @@ -381,7 +379,6 @@ DummyGame_InitBoard: jr nz, .loop ret - DummyGame_SampleTilePlacement: push hl ld de, wDummyGameCards @@ -403,7 +400,6 @@ DummyGame_SampleTilePlacement: inc hl ret - DummyGame_GetDistributionOfTiles: ld a, [wMenuCursorY] dec a @@ -439,7 +435,6 @@ DummyGame_PlaceCard: call DelayFrames ret - DummyGame_DeleteCard: ld a, $1 ld [hli], a @@ -452,7 +447,6 @@ DummyGame_DeleteCard: call DelayFrames ret - DummyGame_InitStrings: hlcoord 0, 0 ld bc, SCREEN_WIDTH * SCREEN_HEIGHT @@ -501,7 +495,6 @@ DummyGame_Card2Coord: add hl, de ret - DummyGame_InterpretJoypad_AnimateCursor: ld a, [wJumptableIndex] cp $7 @@ -595,6 +588,5 @@ DummyGame_InterpretJoypad_AnimateCursor: ld [hl], a ret - LZ_e2221: INCBIN "gfx/dummy_game/dummy_game.2bpp.lz" diff --git a/engine/games/slot_machine.asm b/engine/games/slot_machine.asm index 9864a5b9d..0e7a566b9 100644 --- a/engine/games/slot_machine.asm +++ b/engine/games/slot_machine.asm @@ -219,7 +219,6 @@ SlotsLoop: call DmgToCgbBGPals ret - .PrintCoinsAndPayout: hlcoord 5, 1 ld de, wCoins @@ -231,7 +230,6 @@ SlotsLoop: call PrintNum ret - Unreferenced_Function92811: ; debug function? ld a, [wSlotBias] @@ -250,7 +248,6 @@ Unreferenced_Function92811: ld [hl], a ret - Unreferenced_Function9282c: ; animate OAM tiles? ld hl, wcf66 @@ -271,7 +268,6 @@ endr jr nz, .loop ret - SlotsJumptable: jumptable .Jumptable, wJumptableIndex @@ -849,7 +845,6 @@ Slots_UpdateReelPositionAndOAM: jr nz, .loop ret - Unreferenced_Function92bbe: push hl srl a @@ -863,7 +858,6 @@ Unreferenced_Function92bbe: pop hl ret - .Unknown_92bce: db 0, 1, 2, 3, 4, 5 @@ -880,7 +874,6 @@ ReelActionJumptable: ld l, a jp hl - .Jumptable: dw ReelAction_DoNothing ; 00 dw ReelAction_StopReelIgnoreJoypad ; 01 @@ -911,42 +904,36 @@ ReelActionJumptable: ReelAction_DoNothing: ret - ReelAction_QuadrupleRate: ld hl, REEL_SPIN_RATE add hl, bc ld [hl], 16 ret - ReelAction_DoubleRate: ld hl, REEL_SPIN_RATE add hl, bc ld [hl], 8 ret - ReelAction_NormalRate: ld hl, REEL_SPIN_RATE add hl, bc ld [hl], 4 ret - ReelAction_HalfRate: ld hl, REEL_SPIN_RATE add hl, bc ld [hl], 2 ret - ReelAction_QuarterRate: ld hl, REEL_SPIN_RATE add hl, bc ld [hl], 1 ret - Slots_StopReel: ld hl, REEL_SPIN_RATE add hl, bc @@ -973,7 +960,6 @@ ReelAction_StopReelIgnoreJoypad: ld [hl], a ret - ReelAction_StopReel1: ; If no bias: don't manipulate reel. ; If bias: manipulate reel up to wReel1ManipCounter (i.e. 4) slots, @@ -995,7 +981,6 @@ ReelAction_StopReel1: call Slots_StopReel ret - .CheckForBias: call Slots_GetCurrentReelState ld a, [wSlotBias] @@ -1010,7 +995,6 @@ ReelAction_StopReel1: cp e ret - ReelAction_StopReel2: ; If no bias: don't manipulate reel. ; If bias: manipulate reel up to wReel2ManipCounter (i.e. 4) slots, @@ -1039,7 +1023,6 @@ ReelAction_StopReel2: call Slots_StopReel ret - ReelAction_StopReel3: ; Manipulate the reel up to wReel3ManipCounter (i.e. 4) slots, ; stopping early if the bias symbol is lined up for a win. @@ -1074,7 +1057,6 @@ ReelAction_StopReel3: call Slots_StopReel ret - ReelAction_SetUpReel2SkipTo7: ; Unique reel 2 action (see Slots_StopReel2) ; Ensures that 7 symbols become lined up in the first two reels, @@ -1103,7 +1085,6 @@ ReelAction_SetUpReel2SkipTo7: ld [hl], 0 ret - ReelAction_WaitReel2SkipTo7: ld hl, REEL_MANIP_DELAY add hl, bc @@ -1124,7 +1105,6 @@ ReelAction_WaitReel2SkipTo7: ld [hl], 8 ret - ReelAction_FastSpinReel2UntilLinedUp7s: call Slots_CheckMatchedFirstTwoReels ret nc @@ -1134,7 +1114,6 @@ ReelAction_FastSpinReel2UntilLinedUp7s: call Slots_StopReel ret - ReelAction_InitGolem: ; Ensures SEVENs are lined up if there's bias to SEVEN. ; Ensures nothing is lined up if there's no bias symbols. @@ -1190,7 +1169,6 @@ ReelAction_WaitGolem: ld [hl], 8 ret - ReelAction_EndGolem: xor a ld [wSlotsDelay], a @@ -1202,7 +1180,6 @@ ReelAction_EndGolem: ld [hl], 0 ret - ReelAction_InitChansey: ; Ensures the lining up of SEVEN symbols, but this mode is only possible ; when there is bias to SEVEN symbols (and even then, it's still rare). @@ -1229,7 +1206,6 @@ ReelAction_InitChansey: ld [wSlotsDelay], a ret - ReelAction_WaitChansey: ld a, [wSlotsDelay] and a @@ -1283,7 +1259,6 @@ ReelAction_DropReel: ld [wSlotsDelay], a ret - ReelAction_Unused: call Slots_CheckMatchedAllThreeReels ret c @@ -1336,7 +1311,6 @@ ReelAction_WaitDropReel: ld [hl], 8 ret - ReelAction_StartSlowAdvanceReel3: ; Ensures SEVENs are lined up if there's bias to SEVEN. ; Ensures nothing is lined up if there's no bias symbols. @@ -1390,7 +1364,6 @@ ReelAction_WaitSlowAdvanceReel3: call WaitSFX ret - Slots_CheckMatchedFirstTwoReels: xor a ld [wFirstTwoReelsMatching], a @@ -1418,7 +1391,6 @@ Slots_CheckMatchedFirstTwoReels: scf ret - .Jumptable: dw .zero dw .one @@ -1439,7 +1411,6 @@ Slots_CheckMatchedFirstTwoReels: .zero ret - .CheckBottomRow: ld hl, wCurrReelStopped ld a, [wReel1Stopped] @@ -1447,7 +1418,6 @@ Slots_CheckMatchedFirstTwoReels: call z, .StoreResult ret - .CheckUpwardsDiag: ld hl, wCurrReelStopped + 1 ld a, [wReel1Stopped] @@ -1455,7 +1425,6 @@ Slots_CheckMatchedFirstTwoReels: call z, .StoreResult ret - .CheckMiddleRow: ld hl, wCurrReelStopped + 1 ld a, [wReel1Stopped + 1] @@ -1463,7 +1432,6 @@ Slots_CheckMatchedFirstTwoReels: call z, .StoreResult ret - .CheckDownwardsDiag: ld hl, wCurrReelStopped + 1 ld a, [wReel1Stopped + 2] @@ -1471,7 +1439,6 @@ Slots_CheckMatchedFirstTwoReels: call z, .StoreResult ret - .CheckTopRow: ld hl, wCurrReelStopped + 2 ld a, [wReel1Stopped + 2] @@ -1479,7 +1446,6 @@ Slots_CheckMatchedFirstTwoReels: call z, .StoreResult ret - .StoreResult: ld [wSlotBuildingMatch], a and a @@ -1492,7 +1458,6 @@ Slots_CheckMatchedFirstTwoReels: ld [wFirstTwoReelsMatching], a ret - Slots_CheckMatchedAllThreeReels: ld a, SLOTS_NO_MATCH ld [wSlotMatched], a @@ -1523,7 +1488,6 @@ Slots_CheckMatchedAllThreeReels: scf ret - .Jumptable: dw .zero dw .one @@ -1544,7 +1508,6 @@ Slots_CheckMatchedAllThreeReels: .zero ret - .CheckBottomRow: ld hl, wCurrReelStopped ld a, [wReel1Stopped] @@ -1555,7 +1518,6 @@ Slots_CheckMatchedAllThreeReels: call z, .StoreResult ret - .CheckUpwardsDiag: ld hl, wCurrReelStopped + 2 ld a, [wReel1Stopped] @@ -1566,7 +1528,6 @@ Slots_CheckMatchedAllThreeReels: call z, .StoreResult ret - .CheckMiddleRow: ld hl, wCurrReelStopped + 1 ld a, [wReel1Stopped + 1] @@ -1577,7 +1538,6 @@ Slots_CheckMatchedAllThreeReels: call z, .StoreResult ret - .CheckDownwardsDiag: ld hl, wCurrReelStopped ld a, [wReel1Stopped + 2] @@ -1588,7 +1548,6 @@ Slots_CheckMatchedAllThreeReels: call z, .StoreResult ret - .CheckTopRow: ld hl, wCurrReelStopped + 2 ld a, [wReel1Stopped + 2] @@ -1599,12 +1558,10 @@ Slots_CheckMatchedAllThreeReels: call z, .StoreResult ret - .StoreResult: ld [wSlotMatched], a ret - Slots_CopyReelState: ld de, wCurrReelStopped ld a, [hli] @@ -1617,7 +1574,6 @@ Slots_CopyReelState: ld [de], a ret - Slots_GetNumberOfGolems: ld hl, REEL_POSITION add hl, bc @@ -1631,7 +1587,6 @@ Slots_GetNumberOfGolems: ld a, e ret - .Check7Bias: ld a, [wSlotBias] and a @@ -1669,7 +1624,6 @@ Slots_GetNumberOfGolems: jr c, .loop2 ret - Slots_InitBias: ld a, [wSlotBias] and a @@ -1694,7 +1648,6 @@ Slots_InitBias: ld [wSlotBias], a ret - .Normal: db $01, SLOTS_SEVEN ; 1/256 db $03, SLOTS_POKEBALL ; 1/128 @@ -1794,7 +1747,6 @@ Slots_AskBet: and a ret - .Text_BetHowManyCoins: ; Bet how many coins? text_jump UnknownText_0x1c5049 @@ -1852,7 +1804,6 @@ Slots_AskPlayAgain: scf ret - .Text_OutOfCoins: text_jump UnknownText_0x1c5079 db "@" @@ -1927,7 +1878,6 @@ Slots_PayoutText: farcall StubbedTrainerRankings_AddToSlotsWinStreak ret - .PayoutStrings: dbw "300@", .LinedUpSevens dbw "50@@", .LinedUpPokeballs @@ -1955,7 +1905,6 @@ rept 4 endr ret - .Text_LinedUpWonCoins: ; lined up! Won @ coins! text_jump UnknownText_0x1c509f @@ -1993,21 +1942,18 @@ endr ld [wSlotBias], a ret - .LinedUpPokeballs: ld a, SFX_3RD_PLACE call Slots_PlaySFX call WaitSFX ret - .LinedUpMonOrCherry: ld a, SFX_PRESENT call Slots_PlaySFX call WaitSFX ret - Slots_AnimateGolem: ld hl, SPRITEANIMSTRUCT_JUMPTABLE_INDEX add hl, bc @@ -2183,7 +2129,6 @@ Slots_AnimateChansey: pop bc ret - Slots_WaitSFX: push bc ld c, 16 @@ -2191,7 +2136,6 @@ Slots_WaitSFX: pop bc ret - Slots_PlaySFX: push de ld e, a @@ -2200,7 +2144,6 @@ Slots_PlaySFX: pop de ret - ; The first three positions are repeated to ; avoid needing to check indices when copying. Reel1Tilemap: diff --git a/engine/gfx/cgb_layouts.asm b/engine/gfx/cgb_layouts.asm index c6527085f..d8f53d7fc 100644 --- a/engine/gfx/cgb_layouts.asm +++ b/engine/gfx/cgb_layouts.asm @@ -149,7 +149,6 @@ _CGB_FinishBattleScreenLayout: call ApplyAttrMap ret - InitPartyMenuBGPal7: farcall Function100dc0 Mobile_InitPartyMenuBGPal7: diff --git a/engine/gfx/dma_transfer.asm b/engine/gfx/dma_transfer.asm index 6519949df..241649dc5 100644 --- a/engine/gfx/dma_transfer.asm +++ b/engine/gfx/dma_transfer.asm @@ -233,7 +233,6 @@ CallInSafeGFXMode: ._hl_ jp hl - HDMATransferToWRAMBank3: call _LoadHDMAParameters ld a, $23 @@ -333,7 +332,6 @@ HDMATransfer_Wait123Scanlines: ld b, $7b jr _continue_HDMATransfer - HDMATransfer_Wait127Scanlines: ld b, $7f _continue_HDMATransfer: @@ -396,7 +394,6 @@ _continue_HDMATransfer: ret - _LoadHDMAParameters: ld a, h ld [rHDMA1], a @@ -453,7 +450,6 @@ PadMapForHDMATransfer: ld [hMapObjectIndexBuffer], a ret - _Get2bpp:: ; 2bpp when [rLCDC] & $80 ; switch to WRAM bank 6 diff --git a/engine/gfx/mon_icons.asm b/engine/gfx/mon_icons.asm index 151f8bad5..5ae2fbf8b 100644 --- a/engine/gfx/mon_icons.asm +++ b/engine/gfx/mon_icons.asm @@ -33,7 +33,6 @@ LoadMenuMonIcon: ld l, a jp hl - .Jumptable: dw PartyMenu_InitAnimatedMonIcon ; party menu dw NamingScreen_InitAnimatedMonIcon ; naming screen @@ -263,7 +262,6 @@ GetSpeciesIcon: call GetIconGFX ret - FlyFunction_GetMonIcon: push de ld a, [wd265] @@ -449,7 +447,6 @@ ReadMonMenuIcon: ld a, ICON_EGG ret - INCLUDE "data/pokemon/menu_icons.asm" INCLUDE "data/icon_pointers.asm" diff --git a/engine/gfx/pic_animation.asm b/engine/gfx/pic_animation.asm index 362fe49cd..843e5cba4 100644 --- a/engine/gfx/pic_animation.asm +++ b/engine/gfx/pic_animation.asm @@ -79,7 +79,6 @@ PokeAnims: .Egg1: pokeanim Setup, Play .Egg2: pokeanim Idle, Play - AnimateFrontpic: call AnimateMon_CheckIfPokemon ret c @@ -718,7 +717,6 @@ PokeAnim_ConvertAndApplyBitmask: ; db 36, 37, 38, 39, 40, 41 ; db 43, 44, 45, 46, 47, 48 - .GetStartCoord: ld hl, wPokeAnimCoord ld a, [hli] diff --git a/engine/gfx/sprites.asm b/engine/gfx/sprites.asm index 709f8aad7..1b22e5832 100644 --- a/engine/gfx/sprites.asm +++ b/engine/gfx/sprites.asm @@ -212,7 +212,6 @@ DeinitializeSprite: ld [hl], $0 ret - DeinitializeAllSprites: ; Clear the index field of every struct in the wSpriteAnimationStructs array. ld hl, wSpriteAnimationStructs @@ -226,7 +225,6 @@ DeinitializeAllSprites: jr nz, .loop ret - UpdateAnimFrame: call InitSpriteAnimBuffer ; init WRAM call GetSpriteAnimFrame ; read from a memory array @@ -411,7 +409,6 @@ _ReinitSpriteAnimFrame:: ld [hl], -1 ret - GetSpriteAnimFrame: .loop ld hl, SPRITEANIMSTRUCT_DURATION @@ -532,7 +529,6 @@ Unreferenced_BrokenGetStdGraphics: pop bc ret - INCLUDE "data/sprite_anims/sequences.asm" INCLUDE "engine/gfx/sprite_anims.asm" @@ -541,7 +537,6 @@ INCLUDE "data/sprite_anims/framesets.asm" INCLUDE "data/sprite_anims/oam.asm" - BrokenStdGFXPointers: ; tile count, bank, pointer ; (all pointers were dummied out to .deleted) @@ -557,7 +552,6 @@ BrokenStdGFXPointers: .deleted - Sprites_Cosine: ; a = d * cos(a * pi/32) add %010000 ; cos(x) = sin(x + pi/2) @@ -566,7 +560,6 @@ Sprites_Sine: ; a = d * sin(a * pi/32) calc_sine_wave - AnimateEndOfExpBar: ld a, [hSGB] ld de, EndOfExpBarGFX diff --git a/engine/items/item_effects.asm b/engine/items/item_effects.asm index cf2071952..10084d3ea 100644 --- a/engine/items/item_effects.asm +++ b/engine/items/item_effects.asm @@ -11,7 +11,6 @@ _DoItemEffect:: rst JumpTable ret - ItemEffects: ; entries correspond to item ids dw PokeBallEffect ; MASTER_BALL @@ -194,7 +193,6 @@ ItemEffects: dw NoEffect ; RAINBOW_WING dw NoEffect ; ITEM_B3 - PokeBallEffect: ld a, [wBattleMode] dec a @@ -712,7 +710,6 @@ PokeBallEffect: dec [hl] ret - BallMultiplierFunctionTable: ; table of routines that increase or decrease the catch rate based on ; which ball is used in a certain situation. @@ -1137,12 +1134,10 @@ TownMapEffect: farcall PokegearMap ret - BicycleEffect: farcall BikeFunction ret - EvoStoneEffect: ld b, PARTYMENUACTION_EVO_STONE call UseItem_SelectMon @@ -1174,7 +1169,6 @@ EvoStoneEffect: ld [wItemEffectSucceeded], a ret - VitaminEffect: ld b, PARTYMENUACTION_HEALING_ITEM call UseItem_SelectMon @@ -1218,13 +1212,11 @@ VitaminEffect: jp UseDisposableItem - NoEffectMessage: ld hl, WontHaveAnyEffectText call PrintText jp ClearPalettes - UpdateStatsAfterItem: ld a, MON_MAXHP call GetPartyParamLocation @@ -1240,13 +1232,11 @@ RareCandy_StatBooster_ExitMenu: ld [wItemEffectSucceeded], a jp ClearPalettes - Text_StatRose: ; 's @ rose. text_jump UnknownText_0x1c5b9a db "@" - StatStrings: dw .health dw .attack @@ -1260,7 +1250,6 @@ StatStrings: .speed db "SPEED@" .special db "SPECIAL@" - GetStatExpRelativePointer: ld a, [wCurItem] ld hl, Table_eeeb @@ -1284,7 +1273,6 @@ Table_eeeb: db CARBOS, MON_SPD_EXP - MON_STAT_EXP db CALCIUM, MON_SPC_EXP - MON_STAT_EXP - RareCandy_StatBooster_GetParameters: ld a, [wCurPartySpecies] ld [wCurSpecies], a @@ -1299,7 +1287,6 @@ RareCandy_StatBooster_GetParameters: call GetNick ret - RareCandyEffect: ld b, PARTYMENUACTION_HEALING_ITEM call UseItem_SelectMon @@ -1390,7 +1377,6 @@ RareCandyEffect: jp UseDisposableItem - HealPowderEffect: ld b, PARTYMENUACTION_HEALING_ITEM call UseItem_SelectMon @@ -1411,7 +1397,6 @@ HealPowderEffect: .asm_efc9 jp StatusHealer_Jumptable - StatusHealingEffect: ld b, PARTYMENUACTION_HEALING_ITEM call UseItem_SelectMon @@ -1421,7 +1406,6 @@ FullyHealStatus: call UseStatusHealer jp StatusHealer_Jumptable - UseStatusHealer: call IsMonFainted ld a, $1 @@ -1529,7 +1513,6 @@ StatusHealer_Jumptable: dw StatusHealer_NoEffect dw StatusHealer_ExitMenu - RevivalHerbEffect: ld b, PARTYMENUACTION_HEALING_ITEM call UseItem_SelectMon @@ -1547,7 +1530,6 @@ RevivalHerbEffect: .asm_f0c5 jp StatusHealer_Jumptable - ReviveEffect: ld b, PARTYMENUACTION_HEALING_ITEM call UseItem_SelectMon @@ -1556,7 +1538,6 @@ ReviveEffect: call RevivePokemon jp StatusHealer_Jumptable - RevivePokemon: call IsMonFainted ld a, 1 @@ -1603,7 +1584,6 @@ RevivePokemon: ld a, 0 ret - FullRestoreEffect: ld b, PARTYMENUACTION_HEALING_ITEM call UseItem_SelectMon @@ -1621,7 +1601,6 @@ FullRestoreEffect: call .FullRestore jp StatusHealer_Jumptable - .FullRestore: xor a ld [wLowHealthAlarm], a @@ -1641,7 +1620,6 @@ FullRestoreEffect: ld a, 0 ret - BitterBerryEffect: ld hl, wPlayerSubStatus3 bit SUBSTATUS_CONFUSED, [hl] @@ -1661,12 +1639,10 @@ BitterBerryEffect: .done jp StatusHealer_Jumptable - RestoreHPEffect: call ItemRestoreHP jp StatusHealer_Jumptable - EnergypowderEffect: ld c, HAPPINESS_BITTERPOWDER jr EnergypowderEnergyRootCommon @@ -1688,7 +1664,6 @@ EnergypowderEnergyRootCommon: .skip_happiness jp StatusHealer_Jumptable - ItemRestoreHP: ld b, PARTYMENUACTION_HEALING_ITEM call UseItem_SelectMon @@ -2090,7 +2065,6 @@ Softboiled_MilkDrinkFunction: text_jump UnknownText_0x1c5bac db "@" - EscapeRopeEffect: xor a ld [wItemEffectSucceeded], a @@ -2101,7 +2075,6 @@ EscapeRopeEffect: call z, UseDisposableItem ret - SuperRepelEffect: ld b, 200 jr UseRepel @@ -2123,13 +2096,11 @@ UseRepel: ld [wRepelEffect], a jp UseItemText - TextJump_RepelUsedEarlierIsStillInEffect: ; The REPEL used earlier is still in effect. text_jump Text_RepelUsedEarlierIsStillInEffect db "@" - XAccuracyEffect: ld hl, wPlayerSubStatus4 bit SUBSTATUS_X_ACCURACY, [hl] @@ -2137,7 +2108,6 @@ XAccuracyEffect: set SUBSTATUS_X_ACCURACY, [hl] jp UseItemText - PokeDollEffect: ld a, [wBattleMode] dec a @@ -2155,7 +2125,6 @@ PokeDollEffect: ld [wItemEffectSucceeded], a ret - GuardSpecEffect: ld hl, wPlayerSubStatus4 bit SUBSTATUS_MIST, [hl] @@ -2163,7 +2132,6 @@ GuardSpecEffect: set SUBSTATUS_MIST, [hl] jp UseItemText - DireHitEffect: ld hl, wPlayerSubStatus4 bit SUBSTATUS_FOCUS_ENERGY, [hl] @@ -2171,7 +2139,6 @@ DireHitEffect: set SUBSTATUS_FOCUS_ENERGY, [hl] jp UseItemText - XItemEffect: call UseItemText @@ -2206,7 +2173,6 @@ XItemEffect: INCLUDE "data/items/x_stats.asm" - PokeFluteEffect: ld a, [wBattleMode] and a @@ -2251,7 +2217,6 @@ PokeFluteEffect: ld hl, .AllSleepingMonWokeUp jp PrintText - .CureSleep: ld de, PARTYMON_STRUCT_LENGTH ld c, PARTY_LENGTH @@ -2272,7 +2237,6 @@ PokeFluteEffect: jr nz, .loop ret - .CatchyTune: ; Played the # FLUTE. Now, that's a catchy tune! text_jump UnknownText_0x1c5bf9 @@ -2300,7 +2264,6 @@ PokeFluteEffect: .battle jp PokeFluteTerminatorCharacter - BlueCardEffect: ld hl, .bluecardtext jp MenuTextBoxWaitButton @@ -2309,7 +2272,6 @@ BlueCardEffect: text_jump UnknownText_0x1c5c5e db "@" - CoinCaseEffect: ld hl, .coincasetext jp MenuTextBoxWaitButton @@ -2318,7 +2280,6 @@ CoinCaseEffect: text_jump UnknownText_0x1c5c7b db "@" - OldRodEffect: ld e, $0 jr UseRod @@ -2335,12 +2296,10 @@ UseRod: farcall FishFunction ret - ItemfinderEffect: farcall ItemFinder ret - RestorePPEffect: ld a, [wCurItem] ld [wd002], a @@ -2596,22 +2555,18 @@ UnknownText_0xf739: text_jump UnknownText_0x1c5cf1 db "@" - SquirtbottleEffect: farcall _Squirtbottle ret - CardKeyEffect: farcall _CardKey ret - BasementKeyEffect: farcall _BasementKey ret - SacredAshEffect: farcall _SacredAsh ld a, [wItemEffectSucceeded] @@ -2620,7 +2575,6 @@ SacredAshEffect: call UseDisposableItem ret - NormalBoxEffect: ld c, DECOFLAG_SILVER_TROPHY_DOLL jr OpenBox @@ -2643,7 +2597,6 @@ OpenBox: NoEffect: jp IsntTheTimeMessage - Play_SFX_FULL_HEAL: push de ld de, SFX_FULL_HEAL @@ -2796,7 +2749,6 @@ GotOffTheItemText: text_jump UnknownText_0x1c5e90 db "@" - ApplyPPUp: ld a, MON_MOVES call GetPartyParamLocation @@ -2833,7 +2785,6 @@ ApplyPPUp: jr .loop - ComputeMaxPP: push bc ; Divide the base PP by 5. @@ -2918,7 +2869,6 @@ RestoreAllPP: jr nz, .loop ret - GetMaxPPOfMove: ld a, [wStringBuffer1 + 0] push af diff --git a/engine/items/mart.asm b/engine/items/mart.asm index a683a4b44..7e185662b 100644 --- a/engine/items/mart.asm +++ b/engine/items/mart.asm @@ -331,7 +331,6 @@ ReadMart: INCLUDE "data/items/bargain_shop.asm" - BuyMenu: call FadeToMenu farcall BlankScreen @@ -425,7 +424,6 @@ GetMartDialogGroup: dw Text_Pharmacy_HereYouGo dw BuyMenuLoop - BuyMenuLoop: farcall PlaceMoneyTopRight call UpdateSprites @@ -581,7 +579,6 @@ RooftopSaleAskPurchaseQuantity: ld d, [hl] ret - Text_Mart_HowMany: ; How many? text_jump UnknownText_0x1c4bfd @@ -730,7 +727,6 @@ Text_Pharmacist_ComeAgain: text_jump UnknownText_0x1c4ef6 db "@" - SellMenu: call DisableSpriteUpdates farcall DepositSellInitPackBuffers @@ -758,7 +754,6 @@ SellMenu: text_jump UnknownText_0x1c4f12 db "@" - .TryToSellItem: farcall CheckItemMenu ld a, [wItemAttributeParamBuffer] @@ -778,7 +773,6 @@ SellMenu: .cant_buy ret - .try_sell farcall _CheckTossableItem ld a, [wItemAttributeParamBuffer] diff --git a/engine/items/pack.asm b/engine/items/pack.asm index d20d54111..67e9fe900 100644 --- a/engine/items/pack.asm +++ b/engine/items/pack.asm @@ -38,7 +38,6 @@ Pack: call Pack_GetJumptablePointer jp hl - .Jumptable: ; entries correspond to PACKSTATE_* constants dw .InitGFX ; 0 @@ -174,7 +173,6 @@ Pack: dw .UseItem dw QuitItemSubmenu - .MenuHeader2: db MENU_BACKUP_TILES ; flags menu_coords 13, 5, SCREEN_WIDTH - 1, TEXTBOX_Y - 1 @@ -424,7 +422,6 @@ Jumptable_GiveTossQuit: dw TossMenu dw QuitItemSubmenu - UseItem: farcall CheckItemMenu ld a, [wItemAttributeParamBuffer] @@ -651,7 +648,6 @@ BattlePack: call Pack_GetJumptablePointer jp hl - .Jumptable: ; entries correspond to PACKSTATE_* constants dw .InitGFX ; 0 @@ -943,7 +939,6 @@ DepositSellPack: call Pack_GetJumptablePointer jp hl - .Jumptable: ; entries correspond to *_POCKET constants dw .ItemsPocket @@ -1088,7 +1083,6 @@ TutorialPack: call Pack_GetJumptablePointer jp hl - .dw ; entries correspond to *_POCKET constants dw .Items diff --git a/engine/items/switch_items.asm b/engine/items/switch_items.asm index b5fa0f178..81b5ac6a5 100644 --- a/engine/items/switch_items.asm +++ b/engine/items/switch_items.asm @@ -239,7 +239,6 @@ ItemSwitch_ConvertSpacingToDW: pop hl ret - .spacing_dws dw 0, 1, 2 diff --git a/engine/items/tmhm2.asm b/engine/items/tmhm2.asm index bb98d8ab8..10206d36b 100644 --- a/engine/items/tmhm2.asm +++ b/engine/items/tmhm2.asm @@ -43,5 +43,4 @@ GetTMHMMove: ld [wd265], a ret - INCLUDE "data/moves/tmhm_moves.asm" diff --git a/engine/link/link.asm b/engine/link/link.asm index a8d61d3e8..d72abb0a5 100644 --- a/engine/link/link.asm +++ b/engine/link/link.asm @@ -1112,10 +1112,8 @@ TimeCapsule_ReplaceTeruSama: pop hl ret - INCLUDE "data/items/catch_rate_items.asm" - Link_CopyOTData: .loop ld a, [hli] @@ -1489,7 +1487,6 @@ Function28926: call DelayFrames jp InitTradeMenuDisplay - .Text_CantTradeLastMon: ; If you trade that #MON, you won't be able to battle. text_jump UnknownText_0x1c41b1 @@ -1503,7 +1500,6 @@ Function28926: text_jump UnknownText_0x1c41e6 db "@" - Function28ac9: ld a, [wMenuCursorY] cp 1 @@ -1964,7 +1960,6 @@ String_TooBadTheTradeWasCanceled: db "Too bad! The trade" next "was canceled!@" - LinkTextboxAtHL: ld d, h ld e, l diff --git a/engine/link/link_trade.asm b/engine/link/link_trade.asm index 2e584fe4c..a3c596bfe 100644 --- a/engine/link/link_trade.asm +++ b/engine/link/link_trade.asm @@ -126,7 +126,6 @@ _LoadTradeScreenBorder: call __LoadTradeScreenBorder ret - LinkComms_LoadPleaseWaitTextboxBorderGFX: ld de, LinkCommsBorderGFX + $30 tiles ld hl, vTiles2 tile $76 diff --git a/engine/link/mystery_gift.asm b/engine/link/mystery_gift.asm index 8ac734af6..0a5dfcec3 100644 --- a/engine/link/mystery_gift.asm +++ b/engine/link/mystery_gift.asm @@ -1168,7 +1168,6 @@ Function1050c8: .okay jp CloseSRAM - BackupMysteryGift: call GetMysteryGiftBank ld hl, sMysteryGiftItem @@ -1180,7 +1179,6 @@ BackupMysteryGift: ld [de], a jp CloseSRAM - RestoreMysteryGift: call GetMysteryGiftBank ld hl, sBackupMysteryGiftItem @@ -1202,12 +1200,10 @@ MysteryGift_ClearTrainerData: jr nz, .loop ret - GetMysteryGiftBank: ld a, BANK(sBackupMysteryGiftItem) jp GetSRAMBank - StagePartyDataForMysteryGift: ; You will be sending this data to your mystery gift partner. ; Structure is the same as a trainer with species and moves @@ -1493,7 +1489,6 @@ String_PressAToLink_BToCancel_JP: next "つうしん<WO>ちゅうし します" db "@" - Text_ReceivedCard: text_jump UnknownText_0x1c051a db "@" diff --git a/engine/link/mystery_gift_2.asm b/engine/link/mystery_gift_2.asm index a2ce60678..c1b258724 100644 --- a/engine/link/mystery_gift_2.asm +++ b/engine/link/mystery_gift_2.asm @@ -145,7 +145,6 @@ MysteryGiftFallbackItem: ld c, DECO_POLKADOT_BED ; GREAT_BALL ret - INCLUDE "data/items/mystery_gift_items.asm" INCLUDE "data/decorations/mystery_gift_decos.asm" diff --git a/engine/link/time_capsule_2.asm b/engine/link/time_capsule_2.asm index 4300105c6..be7027f34 100644 --- a/engine/link/time_capsule_2.asm +++ b/engine/link/time_capsule_2.asm @@ -33,5 +33,4 @@ ConvertMon_1to2: pop bc ret - INCLUDE "data/pokemon/gen1_order.asm" diff --git a/engine/math/math.asm b/engine/math/math.asm index 4240ef6cd..21b49b589 100644 --- a/engine/math/math.asm +++ b/engine/math/math.asm @@ -11,7 +11,6 @@ _Multiply:: ld [hMathBuffer + 3], a ld [hMathBuffer + 4], a - .loop ld a, [hMultiplier] srl a @@ -46,7 +45,6 @@ _Multiply:: dec b jr z, .done - ; hMultiplicand <<= 1 ld a, [hMultiplicand + 2] @@ -67,7 +65,6 @@ _Multiply:: jr .loop - .done ld a, [hMathBuffer + 4] ld [hProduct + 3], a @@ -83,7 +80,6 @@ _Multiply:: ret - _Divide:: xor a ld [hMathBuffer + 0], a diff --git a/engine/menus/debug.asm b/engine/menus/debug.asm index d10d8b7b1..a48322488 100644 --- a/engine/menus/debug.asm +++ b/engine/menus/debug.asm @@ -1034,7 +1034,6 @@ String_81fcd: DebugColorTestGFX: INCBIN "gfx/debug/color_test.2bpp" - TilesetColorTest: ret xor a @@ -1148,7 +1147,6 @@ Function8220f: ld [rSVBK], a ret - Function82236: ld hl, hJoyLast ld a, [hl] diff --git a/engine/menus/intro_menu.asm b/engine/menus/intro_menu.asm index 1bdf8b02f..2e1f2d234 100644 --- a/engine/menus/intro_menu.asm +++ b/engine/menus/intro_menu.asm @@ -549,7 +549,6 @@ Continue_LoadMenuHeader: db " @" db "TIME@" - Continue_DisplayBadgesDexPlayerName: call MenuBoxCoord2Tile push hl @@ -626,7 +625,6 @@ Continue_DisplayGameTime: lb bc, PRINTNUM_LEADINGZEROS | 1, 2 jp PrintNum - OakSpeech: farcall InitClock call RotateFourPalettesLeft @@ -957,7 +955,6 @@ Intro_PlacePlayerSprite: db 10 * 8 + 4, 9 * 8, 2 db 10 * 8 + 4, 10 * 8, 3 - CrystalIntroSequence: callfar Copyright_GFPresents jr c, StartTitleScreen @@ -1018,7 +1015,6 @@ StartTitleScreen: dw CrystalIntroSequence dw ResetClock - .TitleScreen: farcall _TitleScreen ret @@ -1070,7 +1066,6 @@ TitleScreenScene: inc [hl] ret - TitleScreenEntrance: ; Animate the logo: @@ -1119,7 +1114,6 @@ TitleScreenEntrance: ld [hWY], a ret - TitleScreenTimer: ; Next scene diff --git a/engine/menus/main_menu.asm b/engine/menus/main_menu.asm index 87823228d..d6afda483 100644 --- a/engine/menus/main_menu.asm +++ b/engine/menus/main_menu.asm @@ -139,7 +139,6 @@ StudiumMenu: db MOBILE_STUDIUM db -1 - MainMenu_GetWhichMenu: nop nop @@ -231,7 +230,6 @@ MainMenu_PrintCurrentTimeAndDay: ld [hBGMapMode], a ret - .PlaceBox: call CheckRTCStatus and $80 @@ -246,7 +244,6 @@ MainMenu_PrintCurrentTimeAndDay: call SpeechTextBox ret - .PlaceTime: ld a, [wSaveFileExists] and a @@ -323,7 +320,6 @@ Function49ed0: call ClearWindowData ret - MainMenu_NewGame: farcall NewGame ret diff --git a/engine/menus/menu.asm b/engine/menus/menu.asm index 5f2864ea3..0dd48222b 100644 --- a/engine/menus/menu.asm +++ b/engine/menus/menu.asm @@ -56,7 +56,6 @@ _InterpretMobileMenu:: ret - Draw2DMenu: xor a ld [hBGMapMode], a @@ -158,7 +157,6 @@ Place2DMenuItemStrings: rst FarCall ret - Init2DMenuCursorPosition: call GetMenuTextStartCoord ld a, b @@ -247,7 +245,6 @@ Init2DMenuCursorPosition: ld [wMenuJoypadFilter], a ret - _StaticMenuJoypad:: call Place2DMenuCursor _ScrollingMenuJoypad:: @@ -276,7 +273,6 @@ MobileMenuJoypad: ld c, a ret - Unreferenced_Function241d5: call Place2DMenuCursor .loop @@ -315,7 +311,6 @@ Unreferenced_Function241d5: and a ret - MenuJoypadLoop: .loop call Move2DMenuCursor diff --git a/engine/menus/naming_screen.asm b/engine/menus/naming_screen.asm index f269e32ad..da6e0f30a 100644 --- a/engine/menus/naming_screen.asm +++ b/engine/menus/naming_screen.asm @@ -10,7 +10,6 @@ _NamingScreen: call ReturnToMapWithSpeechTextbox ret - NamingScreen: ld hl, wNamingScreenDestinationPointer ld [hl], e @@ -44,7 +43,6 @@ NamingScreen: call ClearJoypad ret - .SetUpNamingScreen: call ClearBGPalettes ld b, SCGB_DIPLOMA @@ -61,7 +59,6 @@ NamingScreen: call NamingScreen_InitNameEntry ret - .GetNamingScreenSetup: ld a, [wNamingScreenType] and 7 @@ -75,7 +72,6 @@ NamingScreen: ld l, a jp hl - .Jumptable: dw .Pokemon dw .Player @@ -117,12 +113,10 @@ NamingScreen: call .StoreMonIconParams ret - .NicknameStrings: db "'S@" db "NICKNAME?@" - .Player: farcall GetPlayerIcon call .LoadSprite @@ -132,11 +126,9 @@ NamingScreen: call .StoreSpriteIconParams ret - .PlayerNameString: db "YOUR NAME?@" - .Rival: ld de, SilverSpriteGFX ld b, BANK(SilverSpriteGFX) @@ -147,11 +139,9 @@ NamingScreen: call .StoreSpriteIconParams ret - .RivalNameString: db "RIVAL'S NAME?@" - .Mom: ld de, MomSpriteGFX ld b, BANK(MomSpriteGFX) @@ -162,11 +152,9 @@ NamingScreen: call .StoreSpriteIconParams ret - .MomNameString: db "MOTHER'S NAME?@" - .Box: ld de, PokeBallSpriteGFX ld hl, vTiles0 tile $00 @@ -188,11 +176,9 @@ NamingScreen: call .StoreBoxIconParams ret - .BoxNameString: db "BOX NAME?@" - .Tomodachi: hlcoord 3, 2 ld de, .oTomodachi_no_namae_sutoringu @@ -200,11 +186,9 @@ NamingScreen: call .StoreSpriteIconParams ret - .oTomodachi_no_namae_sutoringu db "おともだち の なまえは?@" - .LoadSprite: push de ld hl, vTiles0 tile $00 @@ -271,7 +255,6 @@ NamingScreen_IsTargetBox: pop bc ret - NamingScreen_InitText: call WaitTop hlcoord 0, 0 @@ -333,7 +316,6 @@ NamingScreen_ApplyTextInputMode: jr nz, .row ret - NamingScreenJoypadLoop: call JoyTextDelay ld a, [wJumptableIndex] @@ -355,7 +337,6 @@ NamingScreenJoypadLoop: scf ret - .UpdateStringEntry: xor a ld [hBGMapMode], a @@ -380,7 +361,6 @@ NamingScreenJoypadLoop: ld [hBGMapMode], a ret - .RunJumptable: ld a, [wJumptableIndex] ld e, a @@ -393,7 +373,6 @@ NamingScreenJoypadLoop: ld l, a jp hl - .Jumptable: dw .InitCursor dw .ReadButtons @@ -569,14 +548,12 @@ NamingScreen_AnimateCursor: ld [hl], a ret - .LetterEntries: db $00, $10, $20, $30, $40, $50, $60, $70, $80 .CaseDelEnd: db $00, $00, $00, $30, $30, $30, $60, $60, $60 - .GetDPad: ld hl, hJoyLast ld a, [hl] @@ -720,7 +697,6 @@ NamingScreen_AdvanceCursor_CheckEndOfString: scf ret - ; unused ld a, [wNamingScreenCurrNameLength] and a @@ -745,10 +721,8 @@ NamingScreen_AdvanceCursor_CheckEndOfString: ld a, [hl] jr NamingScreen_LoadNextCharacter - INCLUDE "data/text/unused_dakutens.asm" - NamingScreen_DeleteCharacter: ld hl, wNamingScreenCurrNameLength ld a, [hl] @@ -777,7 +751,6 @@ NamingScreen_GetTextCursorPosition: pop af ret - NamingScreen_InitNameEntry: ; load NAMINGSCREEN_UNDERLINE, (NAMINGSCREEN_MIDDLELINE * [wNamingScreenMaxNameLength]), "@" into the dw address at wNamingScreenDestinationPointer ld hl, wNamingScreenDestinationPointer @@ -797,7 +770,6 @@ NamingScreen_InitNameEntry: ld [hl], "@" ret - NamingScreen_StoreEntry: ld hl, wNamingScreenDestinationPointer ld a, [hli] @@ -907,7 +879,6 @@ LoadNamingScreenGFX: ld [hWX], a ret - NamingScreenGFX_Border: INCBIN "gfx/naming_screen/border.2bpp" @@ -995,7 +966,6 @@ _ComposeMailMessage: ld [hl], "<NEXT>" ret - .MailIcon: INCBIN "gfx/icons/mail_big.2bpp" @@ -1004,11 +974,9 @@ INCBIN "gfx/icons/mail_big.2bpp" ld [wNamingScreenMaxNameLength], a ret - .UnusedString11f7a: db "メールを かいてね@" - .InitCharset: call WaitTop hlcoord 0, 0 @@ -1235,14 +1203,12 @@ ComposeMail_AnimateCursor: ld [hl], a ret - .LetterEntries: db $00, $10, $20, $30, $40, $50, $60, $70, $80, $90 .CaseDelEnd: db $00, $00, $00, $30, $30, $30, $60, $60, $60, $60 - .GetDPad: ld hl, hJoyLast ld a, [hl] @@ -1383,7 +1349,6 @@ MailComposition_TryAddLastCharacter: ld a, [wNamingScreenLastCharacter] jp MailComposition_TryAddCharacter - ; unused ld a, [wNamingScreenCurrNameLength] and a @@ -1418,6 +1383,5 @@ MailComposition_TryAddLastCharacter: ld a, [hl] jp NamingScreen_LoadNextCharacter - INCLUDE "data/text/mail_input_chars.asm" diff --git a/engine/menus/options_menu.asm b/engine/menus/options_menu.asm index 071872068..46fa33621 100644 --- a/engine/menus/options_menu.asm +++ b/engine/menus/options_menu.asm @@ -77,7 +77,6 @@ StringOptions: db " :TYPE<LNBRK>" db "CANCEL@" - GetOptionPointer: ld a, [wJumptableIndex] ; load the cursor position to a ld e, a ; copy it to de @@ -100,7 +99,6 @@ GetOptionPointer: dw Options_Frame dw Options_Cancel - const_def const OPT_TEXT_SPEED_FAST ; 0 const OPT_TEXT_SPEED_MED ; 1 @@ -163,7 +161,6 @@ Options_TextSpeed: .Mid: db "MID @" .Slow: db "SLOW@" - GetTextSpeed: ; converts TEXT_DELAY_* value in a to OPT_TEXT_SPEED_* value in c, ; with previous/next TEXT_DELAY_* values in d/e @@ -188,7 +185,6 @@ GetTextSpeed: lb de, TEXT_DELAY_SLOW, TEXT_DELAY_MED ret - Options_BattleScene: ld hl, wOptions ld a, [hJoyPressed] @@ -228,7 +224,6 @@ Options_BattleScene: .On: db "ON @" .Off: db "OFF@" - Options_BattleStyle: ld hl, wOptions ld a, [hJoyPressed] @@ -267,7 +262,6 @@ Options_BattleStyle: .Shift: db "SHIFT@" .Set: db "SET @" - Options_Sound: ld hl, wOptions ld a, [hJoyPressed] @@ -313,7 +307,6 @@ Options_Sound: .Mono: db "MONO @" .Stereo: db "STEREO@" - const_def const OPT_PRINT_LIGHTEST ; 0 const OPT_PRINT_LIGHTER ; 1 @@ -379,7 +372,6 @@ Options_Print: .Darker: db "DARKER @" .Darkest: db "DARKEST @" - GetPrinterSetting: ; converts GBPRINTER_* value in a to OPT_PRINT_* value in c, ; with previous/next GBPRINTER_* values in d/e @@ -455,7 +447,6 @@ Options_MenuAccount: .Off: db "OFF@" .On: db "ON @" - Options_Frame: ld hl, wTextBoxFrame ld a, [hJoyPressed] diff --git a/engine/menus/save.asm b/engine/menus/save.asm index 903d9db04..469c55abd 100644 --- a/engine/menus/save.asm +++ b/engine/menus/save.asm @@ -36,7 +36,6 @@ SaveAfterLinkTrade: call ResumeGameLogic ret - ChangeBoxSaveGame: push de ld hl, Text_SaveOnBoxSwitch @@ -143,7 +142,6 @@ ResumeGameLogic: ld [wGameLogicPaused], a ret - AddHallOfFameEntry: ld a, BANK(sHallOfFame) call GetSRAMBank @@ -254,7 +252,6 @@ SavedTheGame: call DelayFrames ret - SaveGameData_: ld a, 1 ld [wSaveFileExists], a @@ -349,7 +346,6 @@ SavingDontTurnOffThePower: call DelayFrames ret - ErasePreviousSave: call EraseBoxes call EraseHallOfFame @@ -458,7 +454,6 @@ Unreferenced_Function14d93: call CloseSRAM ret - HallOfFame_InitSaveIfNeeded: ld a, [wSavedAtLeastOnce] and a @@ -585,7 +580,6 @@ SaveBackupChecksum: call CloseSRAM ret - TryLoadSaveFile: call VerifyChecksum jr nz, .backup @@ -632,7 +626,6 @@ TryLoadSaveFile: scf ret - TryLoadSaveData: xor a ld [wSaveFileExists], a @@ -681,10 +674,8 @@ TryLoadSaveData: call PanicResetClock ret - INCLUDE "data/default_options.asm" - CheckPrimarySaveFile: ld a, BANK(sCheckValue1) ; BANK(sCheckValue2) call GetSRAMBank @@ -726,7 +717,6 @@ CheckBackupSaveFile: call CloseSRAM ret - LoadPlayerData: ld a, BANK(sPlayerData) call GetSRAMBank @@ -823,7 +813,6 @@ VerifyBackupChecksum: pop af ret - _SaveData: ; This is called within two scenarios: ; a) ErasePreviousSave (the process of erasing the save from a previous game file) @@ -850,7 +839,6 @@ _SaveData: jp CloseSRAM - _LoadData: ld a, BANK(sCrystalData) call GetSRAMBank @@ -870,7 +858,6 @@ _LoadData: jp CloseSRAM - GetBoxAddress: ld a, [wCurBox] cp NUM_BOXES @@ -972,7 +959,6 @@ SaveBoxAddress: pop hl ret - LoadBoxAddress: ; Load box via wBoxPartialData. ; We do this in three steps because the size of wBoxPartialData is less than @@ -1036,7 +1022,6 @@ LoadBoxAddress: pop hl ret - EraseBoxes: ld hl, BoxAddresses ld c, NUM_BOXES @@ -1095,7 +1080,6 @@ BoxAddresses: dbww BANK(sBox13), sBox13, sBox13End dbww BANK(sBox14), sBox14, sBox14End - Checksum: ld de, 0 .loop @@ -1111,7 +1095,6 @@ Checksum: jr nz, .loop ret - Text_WouldYouLikeToSaveTheGame: ; Would you like to save the game? text_jump UnknownText_0x1c454b diff --git a/engine/menus/start_menu.asm b/engine/menus/start_menu.asm index 9cff1cb70..45d08ca7a 100644 --- a/engine/menus/start_menu.asm +++ b/engine/menus/start_menu.asm @@ -10,7 +10,6 @@ const STARTMENUITEM_POKEGEAR ; 7 const STARTMENUITEM_QUIT ; 8 - StartMenu:: call ClearWindowData @@ -157,7 +156,6 @@ StartMenu:: call FinishExitMenu ret - .MenuHeader: db MENU_BACKUP_TILES ; flags menu_coords 10, 0, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1 @@ -235,7 +233,6 @@ StartMenu:: db "Quit and" next "be judged.@" - .OpenMenu: ld a, [wMenuSelection] call .GetMenuAccountTextPointer @@ -276,7 +273,6 @@ endr pop de ret - .GetMenuAccountTextPointer: ld e, a ld d, 0 @@ -289,7 +285,6 @@ rept 6 endr ret - .SetUpMenuItems: xor a ld [wWhichIndexSet], a @@ -349,7 +344,6 @@ endr ld [wMenuItemsList], a ret - .FillMenuList: xor a ld hl, wMenuItemsList @@ -409,14 +403,12 @@ endr farcall StartMenu_PrintBugContestStatus ret - StartMenu_Exit: ; Exit the menu. ld a, 1 ret - StartMenu_Quit: ; Retire from the bug catching contest. @@ -437,7 +429,6 @@ StartMenu_Quit: text_jump UnknownText_0x1c1a6c db "@" - StartMenu_Save: ; Save the game. @@ -450,7 +441,6 @@ StartMenu_Save: ld a, 1 ret - StartMenu_Option: ; Game options. @@ -459,7 +449,6 @@ StartMenu_Option: ld a, 6 ret - StartMenu_Status: ; Player status. @@ -469,7 +458,6 @@ StartMenu_Status: ld a, 0 ret - StartMenu_Pokedex: ld a, [wPartyCount] @@ -484,7 +472,6 @@ StartMenu_Pokedex: ld a, 0 ret - StartMenu_Pokegear: call FadeToMenu @@ -493,7 +480,6 @@ StartMenu_Pokegear: ld a, 0 ret - StartMenu_Pack: call FadeToMenu @@ -510,7 +496,6 @@ StartMenu_Pack: ld a, 4 ret - StartMenu_Pokemon: ld a, [wPartyCount] @@ -657,7 +642,6 @@ CantUseItemText: text_jump UnknownText_0x1c1b03 db "@" - PartyMonItemName: ld a, [wCurItem] ld [wd265], a @@ -665,14 +649,12 @@ PartyMonItemName: call CopyName1 ret - CancelPokemonAction: farcall InitPartyMenuWithCancel farcall UnfreezeMonIcons ld a, 1 ret - PokemonActionSubmenu: hlcoord 1, 15 lb bc, 2, 18 @@ -717,7 +699,6 @@ PokemonActionSubmenu: dbw MONMENUITEM_MOVE, ManagePokemonMoves dbw MONMENUITEM_MAIL, MonMailAction - SwitchPartyMons: ; Don't try if there's nothing to switch! @@ -769,7 +750,6 @@ SwitchPartyMons: call CancelPokemonAction ret - GiveTakePartyMonItem: ; Eggs can't hold items! @@ -810,7 +790,6 @@ GiveTakePartyMonItem: ld a, 3 ret - .GiveItem: farcall DepositSellInitPackBuffers @@ -842,7 +821,6 @@ GiveTakePartyMonItem: .quit ret - TryGiveItemToPartymon: call SpeechTextBox @@ -906,7 +884,6 @@ TryGiveItemToPartymon: .abort ret - GivePartyItem: call GetPartyItemLocation @@ -920,7 +897,6 @@ GivePartyItem: .done ret - TakePartyItem: call SpeechTextBox @@ -955,7 +931,6 @@ TakePartyItem: .asm_12c9a ret - GiveTakeItemMenuData: db MENU_SPRITE_ANIMS | MENU_BACKUP_TILES ; flags menu_coords 12, 12, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1 @@ -968,7 +943,6 @@ GiveTakeItemMenuData: db "GIVE@" db "TAKE@" - TookAndMadeHoldText: text_jump UnknownText_0x1c1b2c db "@" @@ -1001,7 +975,6 @@ CantBeHeldText: text_jump UnknownText_0x1c1c09 db "@" - GetPartyItemLocation: push af ld a, MON_ITEM @@ -1009,14 +982,12 @@ GetPartyItemLocation: pop af ret - ReceiveItemFromPokemon: ld a, 1 ld [wItemQuantityChangeBuffer], a ld hl, wNumItems jp ReceiveItem - GiveItemToPokemon: ld a, 1 ld [wItemQuantityChangeBuffer], a @@ -1028,7 +999,6 @@ StartMenuYesNo: call YesNoBox jp ExitMenu - ComposeMailMessage: ld de, wTempMailMessage farcall _ComposeMailMessage @@ -1130,7 +1100,6 @@ MonMailAction: ld a, $3 ret - .MenuHeader: db MENU_BACKUP_TILES ; flags menu_coords 12, 10, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1 @@ -1144,7 +1113,6 @@ MonMailAction: db "TAKE@" db "QUIT@" - .mailwilllosemessagetext ; The MAIL will lose its message. OK? text_jump UnknownText_0x1c1c22 @@ -1175,7 +1143,6 @@ MonMailAction: text_jump UnknownText_0x1c1cc4 db "@" - OpenPartyStats: call LoadStandardMenuHeader call ClearSprites @@ -1189,7 +1156,6 @@ OpenPartyStats: ld a, 0 ret - MonMenu_Cut: farcall CutFunction ld a, [wFieldMoveSucceeded] @@ -1203,7 +1169,6 @@ MonMenu_Cut: ld a, $3 ret - MonMenu_Fly: farcall FlyFunction ld a, [wFieldMoveSucceeded] diff --git a/engine/menus/trainer_card.asm b/engine/menus/trainer_card.asm index 7a0249b61..f48636f67 100644 --- a/engine/menus/trainer_card.asm +++ b/engine/menus/trainer_card.asm @@ -136,7 +136,6 @@ TrainerCard_Page1_Joypad: ld [wJumptableIndex], a ret - TrainerCard_Page2_LoadGFX: call ClearSprites hlcoord 0, 8 @@ -256,7 +255,6 @@ TrainerCard_PrintTopHalfOfCard: predef PlaceGraphic ret - .Name_Money: db "NAME/" next "" @@ -334,7 +332,6 @@ endr call TrainerCard_Page2_3_OAMUpdate ret - .BadgesTilemap: db $79, $7a, $7b, $7c, $7d, -1 ; "BADGES" @@ -540,7 +537,6 @@ TrainerCard_Page2_3_OAMUpdate: inc de jr .loop2 - .facing1 dsprite 0, 0, 0, 0, $00, 0 dsprite 0, 0, 1, 0, $01, 0 diff --git a/engine/movie/credits.asm b/engine/movie/credits.asm index e8d880816..97828ab58 100644 --- a/engine/movie/credits.asm +++ b/engine/movie/credits.asm @@ -221,7 +221,6 @@ Credits_LYOverride: jr nz, .loop ret - ParseCredits: ld hl, wJumptableIndex bit 7, [hl] @@ -393,7 +392,6 @@ ParseCredits: pop hl ret - ConstructCreditsTilemap: xor a ld [hBGMapMode], a @@ -598,7 +596,6 @@ Credits_TheEnd: jr nz, .loop ret - CreditsBorderGFX: INCBIN "gfx/credits/border.2bpp" CreditsMonsGFX: ; used only for BANK(CreditsMonsGFX) diff --git a/engine/movie/crystal_intro.asm b/engine/movie/crystal_intro.asm index 6e132cfec..26fb31bb8 100644 --- a/engine/movie/crystal_intro.asm +++ b/engine/movie/crystal_intro.asm @@ -198,7 +198,6 @@ PlaceGameFreakPresents_3: set 7, [hl] ret - GameFreakLogoJumper: ld hl, SPRITEANIMSTRUCT_JUMPTABLE_INDEX add hl, bc @@ -1736,14 +1735,12 @@ Intro_Scene20_AppearUnown: RGB 12, 00, 31 RGB 00, 00, 00 - .pal2 RGB 24, 12, 09 RGB 31, 31, 31 RGB 31, 31, 31 RGB 31, 31, 31 - Intro_FadeUnownWordPals: add a add a diff --git a/engine/movie/evolution_animation.asm b/engine/movie/evolution_animation.asm index 426636a0e..8f245f003 100644 --- a/engine/movie/evolution_animation.asm +++ b/engine/movie/evolution_animation.asm @@ -348,7 +348,6 @@ endr call DelayFrame ret - .GFX: INCBIN "gfx/evo/bubble_large.2bpp" INCBIN "gfx/evo/bubble.2bpp" diff --git a/engine/movie/gbc_only.asm b/engine/movie/gbc_only.asm index 39a2ea47e..c882c86df 100644 --- a/engine/movie/gbc_only.asm +++ b/engine/movie/gbc_only.asm @@ -38,7 +38,6 @@ GBCOnlyScreen: call DelayFrame jr .loop - DrawGBCOnlyScreen: call DrawGBCOnlyBorder @@ -63,7 +62,6 @@ DrawGBCOnlyScreen: ret - DrawGBCOnlyBorder: hlcoord 0, 0 @@ -111,7 +109,6 @@ DrawGBCOnlyBorder: jr nz, .next_row ret - DrawGBCOnlyGraphic: ld de, SCREEN_WIDTH .y @@ -129,13 +126,11 @@ DrawGBCOnlyGraphic: jr nz, .y ret - GBCOnlyString: db "This Game Pak is" next "designed only for" next "use on the" next "Game Boy Color.@" - GBCOnlyGFX: INCBIN "gfx/sgb/gbc_only.2bpp.lz" diff --git a/engine/movie/title.asm b/engine/movie/title.asm index 56402c7df..b43673b02 100644 --- a/engine/movie/title.asm +++ b/engine/movie/title.asm @@ -18,25 +18,21 @@ _TitleScreen: ; Turn LCD off call DisableLCD - ; VRAM bank 1 ld a, 1 ld [rVBK], a - ; Decompress running Suicune gfx ld hl, TitleSuicuneGFX ld de, vTiles1 call Decompress - ; Clear screen palettes hlbgcoord 0, 0 ld bc, 20 * BG_MAP_WIDTH xor a call ByteFill - ; Fill tile palettes: ; BG Map 1: @@ -47,7 +43,6 @@ _TitleScreen: ld a, 7 ; palette call ByteFill - ; BG Map 0: ; Apply logo gradient: @@ -78,7 +73,6 @@ _TitleScreen: ld a, 6 call ByteFill - ; 'CRYSTAL VERSION' hlbgcoord 5, 9 ld bc, NAME_LENGTH ; length of version text @@ -91,12 +85,10 @@ _TitleScreen: ld a, 0 | VRAM_BANK_1 call ByteFill - ; Back to VRAM bank 0 ld a, $0 ld [rVBK], a - ; Decompress logo ld hl, TitleLogoGFX ld de, vTiles1 @@ -107,7 +99,6 @@ _TitleScreen: ld de, vTiles0 call Decompress - ; Clear screen tiles hlbgcoord 0, 0 ld bc, 64 * BG_MAP_WIDTH @@ -157,7 +148,6 @@ _TitleScreen: pop af ld [rSVBK], a - ; LY/SCX trickery starts here ld a, [rSVBK] @@ -194,7 +184,6 @@ _TitleScreen: pop af ld [rSVBK], a - ; Reset audio call ChannelsOff call EnableLCD @@ -263,7 +252,6 @@ SuicuneFrameIterator: db $00 ; vTiles5 tile $00 db $08 ; vTiles5 tile $08 - LoadSuicuneFrame: hlcoord 6, 12 ld b, 6 @@ -353,7 +341,6 @@ InitializeBackground: jr nz, .loop2 ret - AnimateTitleCrystal: ; Move the title screen crystal downward until it's fully visible diff --git a/engine/movie/trade_animation.asm b/engine/movie/trade_animation.asm index 91bc59a6d..b993e7ecb 100644 --- a/engine/movie/trade_animation.asm +++ b/engine/movie/trade_animation.asm @@ -144,7 +144,6 @@ RunTradeAnimScript: ld [hMapAnims], a ret - .TradeAnimLayout: xor a ld [wJumptableIndex], a @@ -211,7 +210,6 @@ RunTradeAnimScript: call TradeAnim_NormalPals ret - DoTradeAnimation: ld a, [wJumptableIndex] bit 7, a @@ -229,7 +227,6 @@ DoTradeAnimation: scf ret - .DoTradeAnimCommand: ld a, [wJumptableIndex] ld e, a @@ -298,7 +295,6 @@ TradeAnim_IncrementJumptableIndex: inc [hl] ret - TradeAnim_AdvanceScriptPointer: ld hl, wTradeAnimAddress ld e, [hl] @@ -312,13 +308,11 @@ TradeAnim_AdvanceScriptPointer: ld [hl], e ret - TradeAnim_End: ld hl, wJumptableIndex set 7, [hl] ret - TradeAnim_TubeToOT1: ld a, TRADEANIM_RIGHT_ARROW call TradeAnim_PlaceTrademonStatsOnTubeAnim @@ -394,7 +388,6 @@ TradeAnim_InitTubeAnim: ld [wFrameCounter], a ret - TradeAnim_TubeToOT2: call TradeAnim_FlashBGPals ld a, [hSCX] @@ -407,7 +400,6 @@ TradeAnim_TubeToOT2: call TradeAnim_IncrementJumptableIndex ret - TradeAnim_TubeToOT3: call TradeAnim_FlashBGPals ld a, [hSCX] @@ -420,7 +412,6 @@ TradeAnim_TubeToOT3: call TradeAnim_IncrementJumptableIndex ret - TradeAnim_TubeToOT4: call TradeAnim_FlashBGPals ld a, [hSCX] @@ -431,7 +422,6 @@ TradeAnim_TubeToOT4: call TradeAnim_IncrementJumptableIndex ret - TradeAnim_TubeToPlayer3: call TradeAnim_FlashBGPals ld a, [hSCX] @@ -444,7 +434,6 @@ TradeAnim_TubeToPlayer3: call TradeAnim_IncrementJumptableIndex ret - TradeAnim_TubeToPlayer4: call TradeAnim_FlashBGPals ld a, [hSCX] @@ -457,7 +446,6 @@ TradeAnim_TubeToPlayer4: call TradeAnim_IncrementJumptableIndex ret - TradeAnim_TubeToPlayer5: call TradeAnim_FlashBGPals ld a, [hSCX] @@ -468,7 +456,6 @@ TradeAnim_TubeToPlayer5: call TradeAnim_IncrementJumptableIndex ret - TradeAnim_TubeToOT6: TradeAnim_TubeToPlayer6: ld a, 128 @@ -476,7 +463,6 @@ TradeAnim_TubeToPlayer6: call TradeAnim_IncrementJumptableIndex ret - TradeAnim_TubeToOT8: TradeAnim_TubeToPlayer8: call ClearBGPalettes @@ -499,7 +485,6 @@ TradeAnim_TubeToPlayer8: call TradeAnim_AdvanceScriptPointer ret - TradeAnim_TubeToOT5: TradeAnim_TubeToOT7: TradeAnim_TubeToPlayer2: @@ -516,21 +501,18 @@ TradeAnim_TubeToPlayer7: call TradeAnim_IncrementJumptableIndex ret - TradeAnim_GiveTrademonSFX: call TradeAnim_AdvanceScriptPointer ld de, SFX_GIVE_TRADEMON call PlaySFX ret - TradeAnim_GetTrademonSFX: call TradeAnim_AdvanceScriptPointer ld de, SFX_GET_TRADEMON call PlaySFX ret - TradeAnim_TubeAnimJumptable: maskbits TRADEANIMJUMPTABLE_LENGTH ld e, a @@ -563,7 +545,6 @@ TradeAnim_TubeAnimJumptable: call TradeAnim_CopyTradeGameBoyTilemap ret - .One: call TradeAnim_BlankTileMap hlcoord 0, 3 @@ -572,7 +553,6 @@ TradeAnim_TubeAnimJumptable: call ByteFill ret - .Two: call TradeAnim_BlankTileMap hlcoord 0, 3 @@ -601,14 +581,12 @@ TradeAnim_TubeAnimJumptable: call TradeAnim_CopyTradeGameBoyTilemap ret - TradeAnim_CopyTradeGameBoyTilemap: ld de, TradeGameBoyTilemap lb bc, 8, 6 call TradeAnim_CopyBoxFromDEtoHL ret - TradeAnim_PlaceTrademonStatsOnTubeAnim: push af call ClearBGPalettes @@ -648,7 +626,6 @@ TradeAnim_PlaceTrademonStatsOnTubeAnim: call ClearTileMap ret - TradeAnim_EnterLinkTube1: call ClearTileMap call WaitTop @@ -671,7 +648,6 @@ TradeAnim_EnterLinkTube1: call TradeAnim_IncrementJumptableIndex ret - TradeAnim_EnterLinkTube2: ld a, [hSCX] and a @@ -686,7 +662,6 @@ TradeAnim_EnterLinkTube2: call TradeAnim_AdvanceScriptPointer ret - TradeAnim_ExitLinkTube: ld a, [hSCX] cp $a0 @@ -702,7 +677,6 @@ TradeAnim_ExitLinkTube: call TradeAnim_AdvanceScriptPointer ret - TradeAnim_SetupGivemonScroll: ld a, $8f ld [hWX], a @@ -713,7 +687,6 @@ TradeAnim_SetupGivemonScroll: call TradeAnim_AdvanceScriptPointer ret - TradeAnim_DoGivemonScroll: ld a, [hWX] cp $7 @@ -733,7 +706,6 @@ TradeAnim_DoGivemonScroll: call TradeAnim_AdvanceScriptPointer ret - TradeAnim_FrontpicScrollStart: ld a, $7 ld [hWX], a @@ -742,7 +714,6 @@ TradeAnim_FrontpicScrollStart: call TradeAnim_AdvanceScriptPointer ret - TradeAnim_TextboxScrollStart: ld a, $7 ld [hWX], a @@ -751,7 +722,6 @@ TradeAnim_TextboxScrollStart: call TradeAnim_AdvanceScriptPointer ret - TradeAnim_ScrollOutRight: call WaitTop ld a, HIGH(vBGMap1) @@ -769,7 +739,6 @@ TradeAnim_ScrollOutRight: call TradeAnim_IncrementJumptableIndex ret - TradeAnim_ScrollOutRight2: ld a, [hWX] cp $a1 @@ -791,7 +760,6 @@ TradeAnim_ScrollOutRight2: call TradeAnim_AdvanceScriptPointer ret - TradeAnim_ShowGivemonData: call ShowPlayerTrademonStats ld a, [wPlayerTrademonSpecies] @@ -817,7 +785,6 @@ TradeAnim_ShowGivemonData: call TradeAnim_AdvanceScriptPointer ret - TradeAnim_ShowGetmonData: call ShowOTTrademonStats ld a, [wOTTrademonSpecies] @@ -834,13 +801,11 @@ TradeAnim_ShowGetmonData: call TradeAnim_AdvanceScriptPointer ret - TradeAnim_AnimateFrontpic: farcall AnimateTrademonFrontpic call TradeAnim_AdvanceScriptPointer ret - TradeAnim_GetFrontpic: push de push af @@ -853,7 +818,6 @@ TradeAnim_GetFrontpic: predef GetMonFrontpic ret - TradeAnim_GetNickname: push de ld [wd265], a @@ -864,7 +828,6 @@ TradeAnim_GetNickname: call CopyBytes ret - TradeAnim_ShowGivemonFrontpic: ld de, vTiles0 jr TradeAnim_ShowFrontpic @@ -886,28 +849,24 @@ TradeAnim_ShowFrontpic: call WaitBGMap ret - TraideAnim_Wait80: ld c, 80 call DelayFrames call TradeAnim_AdvanceScriptPointer ret - TraideAnim_Wait40: ld c, 40 call DelayFrames call TradeAnim_AdvanceScriptPointer ret - TraideAnim_Wait96: ld c, 96 call DelayFrames call TradeAnim_AdvanceScriptPointer ret - TraideAnim_Wait80IfOTEgg: call IsOTTrademonEgg ret nz @@ -915,7 +874,6 @@ TraideAnim_Wait80IfOTEgg: call DelayFrames ret - TraideAnim_Wait180IfOTEgg: call IsOTTrademonEgg ret nz @@ -923,7 +881,6 @@ TraideAnim_Wait180IfOTEgg: call DelayFrames ret - IsOTTrademonEgg: call TradeAnim_AdvanceScriptPointer ld a, [wOTTrademonSpecies] @@ -948,7 +905,6 @@ ShowPlayerTrademonStats: call TrademonStats_WaitBGMap ret - ShowOTTrademonStats: ld de, wOTTrademonSpecies ld a, [de] @@ -967,7 +923,6 @@ ShowOTTrademonStats: call TrademonStats_WaitBGMap ret - TrademonStats_MonTemplate: call WaitTop call TradeAnim_BlankTileMap @@ -982,7 +937,6 @@ TrademonStats_MonTemplate: call PlaceString ret - .OTMonData: db "─── №." next "" @@ -1004,7 +958,6 @@ TrademonStats_Egg: call TrademonStats_WaitBGMap ret - .EggData: db "EGG" next "OT/?????" @@ -1017,7 +970,6 @@ TrademonStats_WaitBGMap: ld [hBGMapAddress + 1], a ret - TrademonStats_PrintSpeciesNumber: hlcoord 10, 0 lb bc, PRINTNUM_LEADINGZEROS | 1, 3 @@ -1025,13 +977,11 @@ TrademonStats_PrintSpeciesNumber: ld [hl], " " ret - TrademonStats_PrintSpeciesName: hlcoord 4, 2 call PlaceString ret - TrademonStats_PrintOTName: cp 3 jr c, .caught_gender_okay @@ -1050,7 +1000,6 @@ TrademonStats_PrintOTName: ld [bc], a ret - .Gender: db " ", "♂", "♀" @@ -1060,7 +1009,6 @@ TrademonStats_PrintTrademonID: call PrintNum ret - TradeAnim_RockingBall: depixel 10, 11, 4, 0 ld a, SPRITE_ANIM_INDEX_TRADE_POKE_BALL @@ -1070,7 +1018,6 @@ TradeAnim_RockingBall: ld [wFrameCounter], a ret - TradeAnim_DropBall: depixel 10, 11, 4, 0 ld a, SPRITE_ANIM_INDEX_TRADE_POKE_BALL @@ -1086,7 +1033,6 @@ TradeAnim_DropBall: ld [wFrameCounter], a ret - TradeAnim_Poof: depixel 10, 11, 4, 0 ld a, SPRITE_ANIM_INDEX_TRADE_POOF @@ -1098,7 +1044,6 @@ TradeAnim_Poof: call PlaySFX ret - TradeAnim_BulgeThroughTube: ld a, %11100100 ; 3,2,1,0 call DmgToCgbObjPal0 @@ -1110,7 +1055,6 @@ TradeAnim_BulgeThroughTube: ld [wFrameCounter], a ret - TradeAnim_AnimateTrademonInTube: ld hl, SPRITEANIMSTRUCT_JUMPTABLE_INDEX add hl, bc @@ -1222,7 +1166,6 @@ TradeAnim_AnimateTrademonInTube: ld [hl], $0 ret - TradeAnim_SentToOTText: ld a, [wLinkMode] cp LINK_TIMECAPSULE @@ -1246,7 +1189,6 @@ TradeAnim_SentToOTText: call TradeAnim_AdvanceScriptPointer ret - .Text_WasSentTo: ; was sent to @ . text_jump UnknownText_0x1bc6e9 @@ -1267,7 +1209,6 @@ TradeAnim_OTBidsFarewell: call TradeAnim_AdvanceScriptPointer ret - .Text_BidsFarewellToMon: ; bids farewell to text_jump UnknownText_0x1bc703 @@ -1291,7 +1232,6 @@ TradeAnim_TakeCareOfText: call TradeAnim_AdvanceScriptPointer ret - .Text_TakeGoodCareOfMon: ; Take good care of @ . text_jump UnknownText_0x1bc71f @@ -1309,7 +1249,6 @@ TradeAnim_OTSendsText1: call TradeAnim_AdvanceScriptPointer ret - .Text_ForYourMon: ; For @ 's @ , text_jump UnknownText_0x1bc739 @@ -1332,7 +1271,6 @@ TradeAnim_OTSendsText2: call TradeAnim_AdvanceScriptPointer ret - .Text_WillTrade: ; will trade @ @ text_jump UnknownText_0x1bc75e @@ -1348,7 +1286,6 @@ TradeAnim_Wait80Frames: call DelayFrames ret - TradeAnim_BlankTileMap: hlcoord 0, 0 ld bc, SCREEN_WIDTH * SCREEN_HEIGHT @@ -1356,7 +1293,6 @@ TradeAnim_BlankTileMap: call ByteFill ret - TradeAnim_CopyBoxFromDEtoHL: .row push bc @@ -1375,7 +1311,6 @@ TradeAnim_CopyBoxFromDEtoHL: jr nz, .row ret - TradeAnim_NormalPals: ld a, [hSGB] and a @@ -1389,7 +1324,6 @@ TradeAnim_NormalPals: call DmgToCgbBGPals ret - LinkTradeAnim_LoadTradePlayerNames: push de ld de, wLinkPlayer1Name @@ -1401,7 +1335,6 @@ LinkTradeAnim_LoadTradePlayerNames: call CopyBytes ret - LinkTradeAnim_LoadTradeMonSpecies: ld a, [hl] ld [wLinkTradeSendmonSpecies], a @@ -1409,7 +1342,6 @@ LinkTradeAnim_LoadTradeMonSpecies: ld [wLinkTradeGetmonSpecies], a ret - TradeAnim_FlashBGPals: ld a, [wcf65] and $7 @@ -1419,7 +1351,6 @@ TradeAnim_FlashBGPals: call DmgToCgbBGPals ret - LoadTradeBallAndCableGFX: call DelayFrame ld de, TradeBallGFX @@ -1440,7 +1371,6 @@ LoadTradeBallAndCableGFX: ld [hl], $62 ret - LoadTradeBubbleGFX: call DelayFrame ld e, $3 @@ -1455,7 +1385,6 @@ LoadTradeBubbleGFX: ld [hl], $62 ret - TradeAnim_WaitAnim: ld hl, wFrameCounter ld a, [hl] @@ -1468,7 +1397,6 @@ TradeAnim_WaitAnim: call TradeAnim_AdvanceScriptPointer ret - TradeAnim_WaitAnim2: ld hl, wFrameCounter ld a, [hl] @@ -1482,7 +1410,6 @@ TradeAnim_WaitAnim2: ret - Unreferenced_DebugTrade: ; This function is not referenced. ; It was meant for use in Japanese versions, so the @@ -1513,7 +1440,6 @@ Unreferenced_DebugTrade: jr nz, .loop2 ret - debugtrade: MACRO ; species, ot name, ot id (?) db \1, \2 @@ -1524,7 +1450,6 @@ ENDM debugtrade VENUSAUR, "ゲーフり@@", $0123 ; GAME FREAK debugtrade CHARIZARD, "クりーチャ@", $0456 ; Creatures Inc. - TradeGameBoyTilemap: ; 6x8 db $31, $32, $32, $32, $32, $33 diff --git a/engine/overworld/decorations.asm b/engine/overworld/decorations.asm index a9e127b41..7ba177420 100644 --- a/engine/overworld/decorations.asm +++ b/engine/overworld/decorations.asm @@ -415,7 +415,6 @@ PopulateDecoCategoryMenu: dbw 0, 0 dbw 0, 0 - GetDecorationData: ld hl, DecorationAttributes ld bc, 6 @@ -466,7 +465,6 @@ DoDecorationAction2: dw DecoAction_setupornament dw DecoAction_putawayornament - GetDecorationFlag: call GetDecorationData ld de, 3 ; event flag @@ -515,7 +513,6 @@ GetDecoName: dw .doll dw .bigdoll - .invalid ret @@ -922,7 +919,6 @@ DecorationFlagAction_c: ld a, c jp DecorationFlagAction - GetDecorationName_c: ld a, c call GetDecorationID @@ -932,7 +928,6 @@ GetDecorationName_c: pop de ret - SetSpecificDecorationFlag: ld a, c call GetDecorationID diff --git a/engine/overworld/events_2.asm b/engine/overworld/events_2.asm index b7376d48d..436e2f083 100644 --- a/engine/overworld/events_2.asm +++ b/engine/overworld/events_2.asm @@ -1,6 +1,5 @@ ; More overworld event handling. - WarpToSpawnPoint:: ld hl, wStatusFlags2 res STATUSFLAGS2_SAFARI_GAME_F, [hl] @@ -96,7 +95,6 @@ TryTileCollisionEvent:: scf ret - RandomEncounter:: ; Random encounter @@ -243,10 +241,8 @@ TryWildEncounter_BugContest: and a ret - INCLUDE "data/wild/bug_contest_mons.asm" - DoBikeStep:: nop nop diff --git a/engine/overworld/landmarks.asm b/engine/overworld/landmarks.asm index 9501b22cd..9deafb8e6 100644 --- a/engine/overworld/landmarks.asm +++ b/engine/overworld/landmarks.asm @@ -13,7 +13,6 @@ GetLandmarkCoords: pop hl ret - GetLandmarkName:: ; Copy the name of landmark e to wStringBuffer1. push hl @@ -44,10 +43,8 @@ GetLandmarkName:: pop hl ret - INCLUDE "data/maps/landmarks.asm" - RegionCheck: ; Checks if the player is in Kanto or Johto. ; If in Johto, returns 0 in e. diff --git a/engine/overworld/map_objects.asm b/engine/overworld/map_objects.asm index d0cfd8741..8c1171981 100644 --- a/engine/overworld/map_objects.asm +++ b/engine/overworld/map_objects.asm @@ -2,7 +2,6 @@ INCLUDE "data/sprites/facings.asm" INCLUDE "data/sprites/map_objects.asm" - DeleteMapObject:: push bc ld hl, OBJECT_MAP_OBJECT_INDEX @@ -2765,7 +2764,6 @@ ApplyBGMapAnchorToObjects: pop hl ret - PRIORITY_LOW EQU $10 PRIORITY_NORM EQU $20 PRIORITY_HIGH EQU $30 diff --git a/engine/overworld/map_setup.asm b/engine/overworld/map_setup.asm index 6cdccba71..b09404240 100644 --- a/engine/overworld/map_setup.asm +++ b/engine/overworld/map_setup.asm @@ -107,7 +107,6 @@ MapSetupCommands: dba DontScrollText ; 2c dba ReturnFromMapSetupScript ; 2d - DontScrollText: xor a ld [wDisableTextAcceleration], a diff --git a/engine/overworld/movement.asm b/engine/overworld/movement.asm index fac0b4ae8..f7054c680 100644 --- a/engine/overworld/movement.asm +++ b/engine/overworld/movement.asm @@ -91,7 +91,6 @@ MovementPointers: dw Movement_return_dig ; 58 dw Movement_skyfall_top ; 59 - Movement_teleport_from: ld hl, OBJECT_STEP_TYPE add hl, bc @@ -486,7 +485,6 @@ Movement_big_step_right: ld a, STEP_BIKE << 2 | RIGHT jp NormalStep - Movement_turn_away_down: ld a, STEP_SLOW << 2 | DOWN jp TurningStep @@ -535,7 +533,6 @@ Movement_turn_waterfall_right: ld a, STEP_BIKE << 2 | RIGHT jp TurningStep - Movement_slow_slide_step_down: ld a, STEP_SLOW << 2 | DOWN jp SlideStep @@ -584,7 +581,6 @@ Movement_fast_slide_step_right: ld a, STEP_BIKE << 2 | RIGHT jp SlideStep - Movement_slow_jump_step_down: ld a, STEP_SLOW << 2 | DOWN jp JumpStep @@ -633,7 +629,6 @@ Movement_fast_jump_step_right: ld a, STEP_BIKE << 2 | RIGHT jp JumpStep - Movement_turn_step_down: ld a, OW_DOWN jr TurnStep @@ -724,7 +719,6 @@ TurningStep: ld [hl], STEP_TYPE_PLAYER_WALK ret - SlideStep: call InitStep call UpdateTallGrassFlags @@ -749,7 +743,6 @@ SlideStep: ld [hl], STEP_TYPE_PLAYER_WALK ret - JumpStep: call InitStep ld hl, OBJECT_1F diff --git a/engine/overworld/npc_movement.asm b/engine/overworld/npc_movement.asm index 07881a788..84f4a3020 100644 --- a/engine/overworld/npc_movement.asm +++ b/engine/overworld/npc_movement.asm @@ -58,7 +58,6 @@ CanObjectMoveInDirection: and a ret - WillObjectBumpIntoWater: call Function6f5f ret c @@ -217,7 +216,6 @@ Function6fa1: ret - CheckFacingObject:: call GetFacingTileCoord @@ -258,7 +256,6 @@ CheckFacingObject:: scf ret - WillObjectBumpIntoSomeoneElse: ld hl, OBJECT_NEXT_MAP_X add hl, bc @@ -532,7 +529,6 @@ Unreferenced_Function7113: scf ret - Function7171: ld hl, OBJECT_NEXT_MAP_X add hl, bc diff --git a/engine/overworld/overworld.asm b/engine/overworld/overworld.asm index 35a792921..c4261bcad 100644 --- a/engine/overworld/overworld.asm +++ b/engine/overworld/overworld.asm @@ -91,7 +91,6 @@ GetPlayerSprite: INCLUDE "data/sprites/player_sprites.asm" - AddMapSprites: call GetMapEnvironment call CheckOutdoorMap @@ -103,7 +102,6 @@ AddMapSprites: call AddOutdoorSprites ret - AddIndoorSprites: ld hl, wMap1ObjectSprite ld a, 1 @@ -119,7 +117,6 @@ AddIndoorSprites: jr nz, .loop ret - AddOutdoorSprites: ld a, [wMapGroup] dec a @@ -141,7 +138,6 @@ AddOutdoorSprites: jr nz, .loop ret - LoadUsedSpritesGFX: ld a, MAPCALLBACK_SPRITES call RunMapCallback @@ -166,7 +162,6 @@ LoadUsedSpritesGFX: ret - SafeGetSprite: push hl call GetSprite @@ -200,7 +195,6 @@ GetSprite: ld h, a ret - GetMonSprite: ; Return carry if a monster sprite was loaded. @@ -263,7 +257,6 @@ GetMonSprite: and a ret - _DoesSpriteHaveFacings:: ; Checks to see whether we can apply a facing to a sprite. ; Returns carry unless the sprite is a Pokemon or a Still Sprite. @@ -290,7 +283,6 @@ _DoesSpriteHaveFacings:: and a ret - _GetSpritePalette:: ld a, c call GetMonSprite @@ -310,14 +302,12 @@ _GetSpritePalette:: ld c, a ret - LoadAndSortSprites: call LoadSpriteGFX call SortUsedSprites call ArrangeUsedSprites ret - AddSpriteGFX: ; Add any new sprite ids to a list of graphics to be loaded. ; Return carry if the list is full. @@ -356,7 +346,6 @@ AddSpriteGFX: and a ret - LoadSpriteGFX: ; Bug: b is not preserved, so it's useless as a next count. ; Uncomment the lines below to fix. @@ -384,7 +373,6 @@ LoadSpriteGFX: ld a, l ret - SortUsedSprites: ; Bubble-sort sprites by type. @@ -455,7 +443,6 @@ SortUsedSprites: .quit ret - ArrangeUsedSprites: ; Get the length of each sprite and space them out in VRAM. ; Crystal introduces a second table in VRAM bank 0. @@ -514,7 +501,6 @@ ArrangeUsedSprites: .quit ret - GetSpriteLength: ; Return the length of sprite type a in tiles. @@ -536,7 +522,6 @@ GetSpriteLength: ld a, 4 ret - GetUsedSprites: ld hl, wUsedSprites ld c, SPRITE_GFX_LIST_CAPACITY @@ -678,7 +663,6 @@ LoadEmote:: call GetEmote2bpp ret - INCLUDE "data/sprites/emotes.asm" INCLUDE "data/sprites/sprite_mons.asm" diff --git a/engine/overworld/scripting.asm b/engine/overworld/scripting.asm index a2315a541..f8e702eb9 100644 --- a/engine/overworld/scripting.asm +++ b/engine/overworld/scripting.asm @@ -1,6 +1,5 @@ ; Event scripting commands. - EnableScriptMode:: push af ld a, SCRIPT_READ @@ -62,7 +61,6 @@ RunScriptCommand: rst JumpTable ret - ScriptCommandTable: ; entries correspond to macros/scripts/events.asm enumeration dw Script_scall ; 00 @@ -332,7 +330,6 @@ JumpTextScript: closetext end - if _CRYSTAL Script_farjumptext: @@ -351,7 +348,6 @@ Script_farjumptext: endc - Script_writetext: ; script command 0x4c ; parameters: text_pointer @@ -521,7 +517,6 @@ Script_verbosegiveitem: ld de, GiveItemScript jp ScriptCall - ret_96f76: ret @@ -544,7 +539,6 @@ ReceivedItemText: text_jump UnknownText_0x1c4719 db "@" - Script_verbosegiveitem2: ; script command 0x9f ; parameters: item, var @@ -608,7 +602,6 @@ Script_specialsound: call WaitSFX ret - GetPocketName: farcall CheckItemPocket ld a, [wItemAttributeParamBuffer] @@ -634,7 +627,6 @@ CurItemName: call GetItemName ret - PutItemInPocketText: text_jump UnknownText_0x1c472c db "@" @@ -643,7 +635,6 @@ PocketIsFullText: text_jump UnknownText_0x1c474b db "@" - Script_pokemart: ; script command 0x94 ; parameters: dialog_id, mart_id @@ -1274,7 +1265,6 @@ ShowEmoteScript: step_sleep 1 step_end - Script_earthquake: ; script command 0x78 ; parameters: param @@ -1301,7 +1291,6 @@ EarthquakeMovement: step_end .End - Script_loadpikachudata: ; script command 0x5a @@ -2664,7 +2653,6 @@ Script_closetext: call CloseText ret - Script_passtoengine: ; script command 0x89 ; parameters: data_pointer @@ -2834,7 +2822,6 @@ Script_checksave: ld [wScriptVar], a ret - ; unused ld a, [.byte] ld [wScriptVar], a diff --git a/engine/overworld/select_menu.asm b/engine/overworld/select_menu.asm index 069d74f2d..28667d033 100644 --- a/engine/overworld/select_menu.asm +++ b/engine/overworld/select_menu.asm @@ -12,12 +12,10 @@ SelectMenu:: call WaitButton jp CloseText - ItemMayBeRegisteredText: text_jump UnknownText_0x1c1cf3 db "@" - CheckRegisteredItem: ld a, [wWhichRegisteredItem] @@ -85,7 +83,6 @@ CheckRegisteredItem: scf ret - .CheckRegisteredNo: ld a, [wWhichRegisteredItem] and REGISTERED_NUMBER @@ -100,7 +97,6 @@ CheckRegisteredItem: scf ret - .IsSameItem: ld a, [wRegisteredItem] cp [hl] @@ -113,7 +109,6 @@ CheckRegisteredItem: scf ret - UseRegisteredItem: farcall CheckItemMenu diff --git a/engine/overworld/spawn_points.asm b/engine/overworld/spawn_points.asm index 2c673d6b1..6b4476f2b 100644 --- a/engine/overworld/spawn_points.asm +++ b/engine/overworld/spawn_points.asm @@ -1,6 +1,5 @@ INCLUDE "data/maps/spawn_points.asm" - LoadSpawnPoint: ; loads the spawn point in wDefaultSpawnpoint push hl @@ -27,7 +26,6 @@ LoadSpawnPoint: pop hl ret - IsSpawnPoint: ; Checks if the map loaded in de is a spawn point. Returns carry if it's a spawn point. ld hl, SpawnPoints diff --git a/engine/overworld/time.asm b/engine/overworld/time.asm index 136adb221..abb12d87d 100644 --- a/engine/overworld/time.asm +++ b/engine/overworld/time.asm @@ -137,7 +137,6 @@ StartBugContestTimer: call CopyDayHourMinSecToHL ret - CheckBugContestTimer:: ld hl, wBugContestStartTime call CalcSecsMinsHoursDaysSince @@ -172,7 +171,6 @@ CheckBugContestTimer:: scf ret - InitializeStartDay: call UpdateTime ld hl, wTimerEventStartDay diff --git a/engine/overworld/warp_connection.asm b/engine/overworld/warp_connection.asm index 0ab9a6c2d..54df4a97f 100644 --- a/engine/overworld/warp_connection.asm +++ b/engine/overworld/warp_connection.asm @@ -15,7 +15,6 @@ InitCommandQueue: ld [wMapTimeOfDay], a ret - EnterMapConnection: ; Return carry if a connection has been entered. ld a, [wPlayerStepDirection] @@ -388,7 +387,6 @@ CheckMovingOffEdgeOfMap:: scf ret - GetCoordOfUpperLeftCorner:: ld hl, wOverworldMapBlocks ld a, [wXCoord] diff --git a/engine/overworld/wildmons.asm b/engine/overworld/wildmons.asm index ae611d4ca..d88e5908f 100644 --- a/engine/overworld/wildmons.asm +++ b/engine/overworld/wildmons.asm @@ -490,7 +490,6 @@ LookUpWildmonsForMapDE: scf ret - InitRoamMons: ; initialize wRoamMon structs @@ -524,7 +523,6 @@ InitRoamMons: ret - CheckEncounterRoamMon: push hl ; Don't trigger an encounter if we're on water. @@ -572,7 +570,6 @@ CheckEncounterRoamMon: and a ret - UpdateRoamMons: ld a, [wRoamMon1MapGroup] cp GROUP_N_A @@ -615,7 +612,6 @@ UpdateRoamMons: .Finished: jp _BackUpMapIndices - .Update: ld hl, RoamMaps .loop @@ -752,10 +748,8 @@ _BackUpMapIndices: ld [wRoamMons_CurrentMapGroup], a ret - INCLUDE "data/wild/roammon_maps.asm" - ValidateTempWildMonSpecies: ; Due to a development oversight, this function is called with the wild Pokemon's level, not its species, in a. and a @@ -965,7 +959,6 @@ RandomPhoneMon: ld bc, MON_NAME_LENGTH jp CopyBytes - INCLUDE "data/wild/johto_grass.asm" INCLUDE "data/wild/johto_water.asm" INCLUDE "data/wild/kanto_grass.asm" diff --git a/engine/phone/generic_calls.asm b/engine/phone/generic_calls.asm index 359d0146b..9abcf95af 100644 --- a/engine/phone/generic_calls.asm +++ b/engine/phone/generic_calls.asm @@ -1255,7 +1255,6 @@ PhoneScript_MonFlavorText: buttonsound farjump PhoneScript_HangupText_Male - GrandmaString: db "Grandma@" GrandpaString: db "Grandpa@" MomString: db "Mom@" diff --git a/engine/phone/phone.asm b/engine/phone/phone.asm index 5c8425c75..06a241cad 100644 --- a/engine/phone/phone.asm +++ b/engine/phone/phone.asm @@ -11,7 +11,6 @@ AddPhoneNumber:: scf ret - DelCellNum:: call _CheckCellNum jr nc, .not_in_list @@ -94,7 +93,6 @@ GetRemainingSpaceInPhoneList: INCLUDE "data/phone/permanent_numbers.asm" - FarPlaceString: ld a, [hROMBank] push af @@ -107,7 +105,6 @@ FarPlaceString: rst Bankswitch ret - CheckPhoneCall:: ; Check if the phone is ringing in the overworld. @@ -508,7 +505,6 @@ Phone_CallerTextboxWithName2: call FarPlaceString ret - Phone_NoSignal: ld de, SFX_NO_SIGNAL call PlaySFX @@ -548,7 +544,6 @@ UnknownText_0x9032a: text_jump UnknownText_0x1c5580 db "@" - HangUp_BoopOn: ld hl, UnknownText_0x90336 call PrintText @@ -558,7 +553,6 @@ UnknownText_0x90336: text_jump UnknownText_0x1c5588 db "@" - HangUp_BoopOff: call SpeechTextBox ret @@ -581,7 +575,6 @@ Phone_Wait20Frames: farcall PhoneRing_CopyTilemapAtOnce ret - Function90363: push bc call Phone_CallerTextbox @@ -595,7 +588,6 @@ Function90363: call Function90380 ret - Phone_CallerTextbox: hlcoord 0, 0 ld b, 2 @@ -603,7 +595,6 @@ Phone_CallerTextbox: call TextBox ret - Function90380: ld h, d ld l, e @@ -637,7 +628,6 @@ GetCallerTrainerClass: pop hl ret - GetCallerName: ld a, c and a @@ -710,12 +700,10 @@ GetCallerLocation: pop de ret - INCLUDE "data/phone/phone_contacts.asm" INCLUDE "data/phone/special_calls.asm" - UnknownScript_0x90657: writetext UnknownText_0x9065b end diff --git a/engine/pokedex/pokedex.asm b/engine/pokedex/pokedex.asm index 147a0ff15..0055585b7 100644 --- a/engine/pokedex/pokedex.asm +++ b/engine/pokedex/pokedex.asm @@ -427,7 +427,6 @@ DexEntryScreen_ArrowCursorData: dwcoord 11, 17 ; CRY dwcoord 15, 17 ; PRNT - DexEntryScreen_MenuActionJumptable: dw Pokedex_Page dw .Area @@ -1069,7 +1068,6 @@ Pokedex_FillColumn: pop de ret - Pokedex_DrawMainScreenBG: ; Draws the left sidebar and the bottom bar on the main screen. hlcoord 0, 17 @@ -1416,7 +1414,6 @@ Pokedex_PlaceString: ld [hli], a jr .loop - Pokedex_PlaceBorder: push hl ld a, $33 @@ -1460,7 +1457,6 @@ Pokedex_PlaceBorder: dec e jr .row_loop - Pokedex_PrintListing: ; Prints the list of Pokémon on the main Pokédex screen. @@ -1578,7 +1574,6 @@ Pokedex_DrawFootprint: ld [hl], a ret - Pokedex_GetSelectedMon: ; Gets the species of the currently selected Pokémon. This corresponds to the ; position of the cursor in the main listing, but this function can be used @@ -1594,7 +1589,6 @@ Pokedex_GetSelectedMon: ld [wd265], a ret - Pokedex_CheckCaught: push de push hl @@ -1605,7 +1599,6 @@ Pokedex_CheckCaught: pop de ret - Pokedex_CheckSeen: push de push hl @@ -1617,7 +1610,6 @@ Pokedex_CheckSeen: ret - Pokedex_OrderMonsByMode: ld hl, wPokedexOrder ld bc, wPokedexOrderEnd - wPokedexOrder @@ -1711,12 +1703,10 @@ Pokedex_ABCMode: .doneabc ret - INCLUDE "data/pokemon/dex_order_alpha.asm" INCLUDE "data/pokemon/dex_order_new.asm" - Pokedex_DisplayModeDescription: xor a ld [hBGMapMode], a @@ -2349,7 +2339,6 @@ Pokedex_ApplyUsualPals: call DmgToCgbObjPal0 ret - Pokedex_LoadPointer: ld e, a ld d, 0 @@ -2387,7 +2376,6 @@ Pokedex_LoadSelectedMonTiles: call CloseSRAM ret - Pokedex_LoadCurrentFootprint: call Pokedex_GetSelectedMon @@ -2431,7 +2419,6 @@ Pokedex_LoadAnyFootprint: ret - Pokedex_LoadGFX: call DisableLCD ld hl, vTiles2 @@ -2561,7 +2548,6 @@ _NewPokedexEntry: call PlayMonCry ret - Pokedex_SetBGMapMode3: ld a, $3 ld [hBGMapMode], a @@ -2585,7 +2571,6 @@ Pokedex_SetBGMapMode_3ifDMG_4ifCGB: call Pokedex_SetBGMapMode3 ret - Pokedex_ResetBGMapMode: xor a ld [hBGMapMode], a diff --git a/engine/pokedex/unown_dex.asm b/engine/pokedex/unown_dex.asm index 93f9d3d81..054c945cf 100644 --- a/engine/pokedex/unown_dex.asm +++ b/engine/pokedex/unown_dex.asm @@ -46,5 +46,4 @@ PrintUnownWord: ld [hli], a jr .loop - INCLUDE "data/pokemon/unown_words.asm" diff --git a/engine/pokegear/pokegear.asm b/engine/pokegear/pokegear.asm index 741d58c8f..0dd0b85dd 100644 --- a/engine/pokegear/pokegear.asm +++ b/engine/pokegear/pokegear.asm @@ -157,7 +157,6 @@ Pokegear_LoadGFX: call CopyBytes ret - FastShipGFX: INCBIN "gfx/pokegear/fast_ship.2bpp" @@ -182,7 +181,6 @@ AnimatePokegearModeIndicatorArrow: ld [hl], a ret - .XCoords: db $00 ; POKEGEARCARD_CLOCK db $10 ; POKEGEARCARD_MAP @@ -204,7 +202,6 @@ TownMap_GetCurrentLandmark: call GetWorldMapLocation ret - TownMap_InitCursorAndPlayerIconPositions: ld a, [wMapGroup] ld b, a @@ -301,7 +298,6 @@ InitPokegearTilemap: call WaitBGMap ret - .Jumptable: ; entries correspond to POKEGEARCARD_* constants dw .Clock @@ -321,7 +317,6 @@ InitPokegearTilemap: call Pokegear_UpdateClock ret - .switch db " SWITCH▶@" @@ -351,7 +346,6 @@ InitPokegearTilemap: call PokegearMap_UpdateLandmarkName ret - .Radio: ld de, RadioTilemapRLE call Pokegear_LoadTilemapRLE @@ -360,7 +354,6 @@ InitPokegearTilemap: call TextBox ret - .Phone: ld de, PhoneTilemapRLE call Pokegear_LoadTilemapRLE @@ -371,7 +364,6 @@ InitPokegearTilemap: call PokegearPhone_UpdateDisplayList ret - .PlacePhoneBars: hlcoord 17, 1 ld a, $3c @@ -543,7 +535,6 @@ Pokegear_UpdateClock: text_jump UnknownText_0x1c5821 db "@" - PokegearMap_CheckRegion: ld a, [wPokegearMapPlayerIconLandmark] cp FAST_SHIP @@ -695,7 +686,6 @@ PokegearMap_InitPlayerIcon: ld [hl], d ret - PokegearMap_InitCursor: push af depixel 0, 0 @@ -713,7 +703,6 @@ PokegearMap_InitCursor: pop bc ret - PokegearMap_UpdateLandmarkName: push af hlcoord 8, 0 @@ -729,7 +718,6 @@ PokegearMap_UpdateLandmarkName: ld [hl], $34 ret - PokegearMap_UpdateCursorPosition: push bc ld e, a @@ -743,7 +731,6 @@ PokegearMap_UpdateCursorPosition: ld [hl], d ret - TownMap_GetKantoLandmarkLimits: ld a, [wStatusFlags] bit STATUSFLAGS_HALL_OF_FAME_F, a @@ -757,7 +744,6 @@ TownMap_GetKantoLandmarkLimits: ld e, VICTORY_ROAD ret - PokegearRadio_Init: call InitPokegearTilemap depixel 4, 10, 4, 4 @@ -948,19 +934,16 @@ PokegearPhone_MakePhoneCall: call PrintText ret - .dotdotdot ; text_jump UnknownText_0x1c5824 db "@" - .OutOfServiceArea: ; You're out of the service area. text_jump UnknownText_0x1c5827 db "@" - PokegearPhone_FinishPhoneCall: ld a, [hJoyPressed] and A_BUTTON | B_BUTTON @@ -1088,7 +1071,6 @@ PokegearPhone_UpdateDisplayList: call PokegearPhone_UpdateCursor ret - PokegearPhone_DeletePhoneNumber: ld hl, wPhoneList ld a, [wPokegearPhoneScrollPosition] @@ -1114,7 +1096,6 @@ PokegearPhone_DeletePhoneNumber: jr nz, .loop ret - PokegearPhoneContactSubmenu: ld hl, wPhoneList ld a, [wPokegearPhoneScrollPosition] @@ -1230,7 +1211,6 @@ PokegearPhoneContactSubmenu: scf ret - .Delete: ld hl, PokegearText_DeleteStoredNumber call MenuTextBox @@ -1248,12 +1228,10 @@ PokegearPhoneContactSubmenu: scf ret - .Call: and a ret - .UpdateCursor: push de ld a, [de] @@ -1280,7 +1258,6 @@ PokegearPhoneContactSubmenu: pop de ret - .CallDeleteCancelStrings: dwcoord 10, 6 db 3 @@ -1294,7 +1271,6 @@ PokegearPhoneContactSubmenu: dw .Delete dw .Cancel - .CallCancelStrings: dwcoord 10, 8 db 2 @@ -1306,7 +1282,6 @@ PokegearPhoneContactSubmenu: dw .Call dw .Cancel - ; unused ld a, [hHours] cp 12 @@ -1321,7 +1296,6 @@ PokegearPhoneContactSubmenu: and a ret - Pokegear_SwitchPage: ld de, SFX_READ_TEXT_2 call PlaySFX @@ -1348,7 +1322,6 @@ ExitPokegearRadio_HandleMusic: ld [wPokegearRadioMusicPlaying], a ret - DeleteSpriteAnimStruct2ToEnd: ld hl, wSpriteAnim2 ld bc, wSpriteAnimationStructsEnd - wSpriteAnim2 @@ -1378,25 +1351,21 @@ Pokegear_LoadTilemapRLE: jr nz, .load jr .loop - PokegearText_WhomToCall: ; Whom do you want to call? text_jump UnknownText_0x1c5847 db "@" - PokegearText_PressAnyButtonToExit: ; Press any button to exit. text_jump UnknownText_0x1c5862 db "@" - PokegearText_DeleteStoredNumber: ; Delete this stored phone number? text_jump UnknownText_0x1c587d db "@" - PokegearSpritesGFX: INCBIN "gfx/pokegear/pokegear_sprites.2bpp.lz" @@ -1487,7 +1456,6 @@ UpdateRadioStation: ld [hBGMapMode], a ret - ; unused ld [wPokegearRadioChannelBank], a ld a, [hli] @@ -1496,7 +1464,6 @@ UpdateRadioStation: ld [wPokegearRadioChannelAddr + 1], a ret - RadioChannels: ; entries correspond to constants/radio_constants.asm @@ -1662,7 +1629,6 @@ LoadStation_BuenasPassword: ld de, BuenasPasswordName ret - BuenasPasswordName: db "BUENA'S PASSWORD@" NotBuenasPasswordName: db "@" @@ -1699,7 +1665,6 @@ LoadStation_LetsAllSing: ld de, LetsAllSingName ret - LoadStation_RocketRadio: ld a, ROCKET_RADIO ld [wCurrentRadioLine], a @@ -1711,7 +1676,6 @@ LoadStation_RocketRadio: ld de, LetsAllSingName ret - LoadStation_PokeFluteRadio: ld a, POKE_FLUTE_RADIO ld [wCurrentRadioLine], a @@ -1734,7 +1698,6 @@ LoadStation_EvolutionRadio: ld de, UnownStationName ret - Unreferenced_LoadStation: ret @@ -1798,7 +1761,6 @@ NoRadioName: call TextBox ret - OaksPKMNTalkName: db "OAK's <PK><MN> Talk@" PokedexShowName: db "#DEX Show@" PokemonMusicName: db "#MON Music@" @@ -2008,7 +1970,6 @@ PlayRadio: call ExitPokegearRadio_HandleMusic ret - .PlayStation: ld a, ENTER_MAP_MUSIC ld [wPokegearRadioMusicPlaying], a @@ -2039,7 +2000,6 @@ PlayRadio: call WaitBGMap ret - .StationPointers: ; entries correspond to MAPRADIO_* constants dw .OakOrPnP @@ -2052,7 +2012,6 @@ PlayRadio: dw LoadStation_LetsAllSing dw LoadStation_RocketRadio - .OakOrPnP: call IsInJohto and a @@ -2066,7 +2025,6 @@ PlayRadio: .kanto jp LoadStation_PlacesAndPeople - PokegearMap: ld a, e and a @@ -2080,7 +2038,6 @@ PokegearMap: call FillKantoMap ret - _FlyMap: call ClearBGPalettes call ClearTileMap @@ -2144,7 +2101,6 @@ _FlyMap: ld e, a ret - FlyMapScroll: ld a, [wStartFlypoint] ld e, a @@ -2192,7 +2148,6 @@ FlyMapScroll: ld [hBGMapMode], a ret - TownMapBubble: ; Draw the bubble containing the location text in the town map HUD @@ -2255,7 +2210,6 @@ TownMapBubble: call PlaceString ret - GetMapCursorCoordinates: ld a, [wTownMapPlayerIconLandmark] ld l, a @@ -2277,7 +2231,6 @@ GetMapCursorCoordinates: ld [hl], d ret - CheckIfVisitedFlypoint: ; Check if the flypoint loaded in [hl] has been visited yet. push bc @@ -2296,7 +2249,6 @@ CheckIfVisitedFlypoint: and a ret - HasVisitedSpawn: ; Check if spawn point c has been visited. ld hl, wVisitedSpawns @@ -2306,13 +2258,11 @@ HasVisitedSpawn: ld a, c ret - INCLUDE "data/maps/flypoints.asm" ret_91c8f: ret - FlyMap: ld a, [wMapGroup] ld b, a @@ -2407,7 +2357,6 @@ FlyMap: ld [wTownMapCursorCoordinates + 1], a ret - Pokedex_GetArea: ; e: Current landmark ld a, [wTownMapPlayerIconLandmark] @@ -2474,7 +2423,6 @@ Pokedex_GetArea: ld [wTownMapPlayerIconLandmark], a ret - .LeftRightInput: ld a, [hl] and D_LEFT @@ -2509,7 +2457,6 @@ Pokedex_GetArea: call .GetAndPlaceNest ret - .BlinkNestIcons: ld a, [hVBlankCounter] ld e, a @@ -2528,7 +2475,6 @@ Pokedex_GetArea: call CopyBytes ret - .PlaceString_MonsNest: hlcoord 0, 0 ld bc, SCREEN_WIDTH @@ -2550,7 +2496,6 @@ Pokedex_GetArea: call PlaceString ret - .String_SNest: db "'S NEST@" @@ -2592,7 +2537,6 @@ Pokedex_GetArea: call CopyBytes ret - .HideNestsShowPlayer: call .CheckPlayerLocation ret c @@ -2637,7 +2581,6 @@ Pokedex_GetArea: call ByteFill ret - .PlayerOAM: ; y pxl, x pxl, tile offset db -1 * 8, -1 * 8, 0 ; top left @@ -2677,7 +2620,6 @@ Pokedex_GetArea: scf ret - .GetPlayerOrFastShipIcon: ld a, [wTownMapPlayerIconLandmark] cp FAST_SHIP @@ -2690,7 +2632,6 @@ Pokedex_GetArea: ld b, BANK(FastShipGFX) ret - TownMapBGUpdate: ; Update BG Map tiles and attributes @@ -2719,7 +2660,6 @@ TownMapBGUpdate: ld [hBGMapMode], a ret - FillJohtoMap: ld de, JohtoMap jr FillTownMap @@ -2737,7 +2677,6 @@ FillTownMap: inc de jr .loop - TownMapPals: ; Assign palettes based on tile ids hlcoord 0, 0 @@ -2818,7 +2757,6 @@ TownMapMon: ld [hl], SPRITE_ANIM_SEQ_NULL ret - TownMapPlayerIcon: ; Draw the player icon at town map location in a push af @@ -2862,7 +2800,6 @@ TownMapPlayerIcon: ld [hl], d ret - LoadTownMapGFX: ld hl, TownMapGFX ld de, vTiles2 @@ -2870,7 +2807,6 @@ LoadTownMapGFX: call DecompressRequest2bpp ret - JohtoMap: INCBIN "gfx/pokegear/johto.bin" @@ -2960,7 +2896,6 @@ Unreferenced_Function92311: ld e, a ret - .HandleDPad: ld hl, hJoyLast ld a, [hl] diff --git a/engine/pokegear/radio.asm b/engine/pokegear/radio.asm index a4eb345d4..b76cad13e 100644 --- a/engine/pokegear/radio.asm +++ b/engine/pokegear/radio.asm @@ -126,7 +126,6 @@ RadioJumptable: dw PokedexShow7 ; $56 dw PokedexShow8 ; $57 - PrintRadioLine: ld [wNextRadioLine], a ld hl, wRadioText diff --git a/engine/pokemon/bills_pc.asm b/engine/pokemon/bills_pc.asm index c5904e9b0..65621192d 100644 --- a/engine/pokemon/bills_pc.asm +++ b/engine/pokemon/bills_pc.asm @@ -152,7 +152,6 @@ BillsPCDepositJumptable: dw BillsPCDepositFuncRelease ; Release Pokemon dw BillsPCDepositFuncCancel ; Cancel - BillsPCDepositFuncDeposit: call BillsPC_CheckMail_PreventBlackout jp c, BillsPCDepositFuncCancel @@ -410,7 +409,6 @@ BillsPC_Withdraw: dw .release ; Release dw .cancel ; Cancel - .withdraw call BillsPC_CheckMail_PreventBlackout jp c, .cancel @@ -1874,7 +1872,6 @@ TryWithdrawPokemon: scf ret - ReleasePKMN_ByePKMN: hlcoord 0, 0 lb bc, 15, 8 @@ -2230,7 +2227,6 @@ PCString_BoxFull: db "The BOX is full.@" PCString_PartyFull: db "The party's full!@" PCString_NoReleasingEGGS: db "No releasing EGGS!@" - _ChangeBox: call LoadStandardMenuHeader call BillsPC_ClearTilemap diff --git a/engine/pokemon/breeding.asm b/engine/pokemon/breeding.asm index f4aafe5d9..5940e9b1f 100644 --- a/engine/pokemon/breeding.asm +++ b/engine/pokemon/breeding.asm @@ -84,7 +84,6 @@ CheckBreedmonCompatibility: ld [wd265], a ret - .CheckDVs: ; If Defense DVs match and the lower 3 bits of the Special DVs match, ; avoid breeding @@ -623,7 +622,6 @@ GetBreedmonMovePointer: ld hl, wBreedMon2Moves ret - GetEggFrontpic: push de ld [wCurPartySpecies], a diff --git a/engine/pokemon/evolve.asm b/engine/pokemon/evolve.asm index dab58a44f..571cff0b8 100644 --- a/engine/pokemon/evolve.asm +++ b/engine/pokemon/evolve.asm @@ -87,7 +87,6 @@ EvolveAfterBattle_MasterLoop: cp EVOLVE_HAPPINESS jr z, .happiness - ; EVOLVE_STAT ld a, [wTempMonLevel] cp [hl] @@ -116,7 +115,6 @@ EvolveAfterBattle_MasterLoop: inc hl jr .proceed - .happiness ld a, [wTempMonHappiness] cp HAPPINESS_TO_EVOLVE @@ -143,7 +141,6 @@ EvolveAfterBattle_MasterLoop: jp z, .dont_evolve_3 jr .proceed - .trade ld a, [wLinkMode] and a @@ -169,7 +166,6 @@ EvolveAfterBattle_MasterLoop: ld [wTempMonItem], a jr .proceed - .item ld a, [hli] ld b, a @@ -185,7 +181,6 @@ EvolveAfterBattle_MasterLoop: jp nz, .dont_evolve_3 jr .proceed - .level ld a, [hli] ld b, a @@ -419,7 +414,6 @@ Text_WhatEvolving: text_jump UnknownText_0x1c4be3 db "@" - LearnLevelMoves: ld a, [wd265] ld [wCurPartySpecies], a @@ -484,7 +478,6 @@ LearnLevelMoves: ld [wd265], a ret - FillMoves: ; Fill in moves at de for wCurPartySpecies at wCurPartyLevel @@ -605,7 +598,6 @@ ShiftMoves: jr nz, .loop ret - EvoFlagAction: push de ld d, $0 diff --git a/engine/pokemon/mail.asm b/engine/pokemon/mail.asm index caaf6f01b..359d2ac8e 100644 --- a/engine/pokemon/mail.asm +++ b/engine/pokemon/mail.asm @@ -188,7 +188,6 @@ CheckPokeMail:: ld [wScriptVar], a ret - GivePokeMail:: ld a, [wPartyCount] dec a @@ -237,7 +236,6 @@ GivePokeMail:: ld [de], a jp CloseSRAM - BackupPartyMonMail: ld a, BANK(sPartyMail) call GetSRAMBank @@ -277,7 +275,6 @@ DeletePartyMonMail: call ByteFill jp CloseSRAM - IsAnyMonHoldingMail: ld a, [wPartyCount] and a diff --git a/engine/pokemon/move_mon.asm b/engine/pokemon/move_mon.asm index 9e253846a..7074dafd8 100644 --- a/engine/pokemon/move_mon.asm +++ b/engine/pokemon/move_mon.asm @@ -1367,7 +1367,6 @@ RemoveMonFromPartyOrBox: .close_sram jp CloseSRAM - ComputeNPCTrademonStats: ld a, MON_LEVEL call GetPartyParamLocation diff --git a/engine/pokemon/party_menu.asm b/engine/pokemon/party_menu.asm index 638e046b4..c3a70dbdc 100644 --- a/engine/pokemon/party_menu.asm +++ b/engine/pokemon/party_menu.asm @@ -11,7 +11,6 @@ SelectMonFromParty: call ReturnToMapWithSpeechTextbox ret - SelectTradeOrDayCareMon: ld a, b ld [wPartyMenuActionText], a @@ -41,7 +40,6 @@ LoadPartyMenuGFX: callfar ClearSpriteAnims2 ret - WritePartyMenuTilemap: ld hl, wOptions ld a, [hl] @@ -114,7 +112,6 @@ PlacePartyNicknames: .CANCEL: db "CANCEL@" - PlacePartyHPBar: xor a ld [wSGBPals], a @@ -349,7 +346,6 @@ PlacePartyMonTMHMCompatibility: .string_not_able db "NOT ABLE@" - PlacePartyMonEvoStoneCompatibility: ld a, [wPartyCount] and a @@ -429,7 +425,6 @@ PlacePartyMonEvoStoneCompatibility: .string_not_able db "NOT ABLE@" - PlacePartyMonGender: ld a, [wPartyCount] and a @@ -478,7 +473,6 @@ PlacePartyMonGender: .unknown db "…UNKNOWN@" - PlacePartyMonMobileBattleSelection: ld a, [wPartyCount] and a @@ -556,7 +550,6 @@ PlacePartyMonMobileBattleSelection: .Strings_1_2_3: db "1@", "2@", "3@" ; 1st, 2nd, 3rd - PartyMenuCheckEgg: ld a, LOW(wPartySpecies) add b @@ -590,7 +583,6 @@ GetPartyMenuQualityIndexes: INCLUDE "data/party_menu_qualities.asm" - InitPartyMenuGFX: ld hl, wPartyCount ld a, [hli] @@ -717,7 +709,6 @@ PartyMenuSelect: scf ret - PrintPartyMenuText: hlcoord 0, 14 lb bc, 2, 18 @@ -862,7 +853,6 @@ PrintPartyMenuActionText: text_jump UnknownText_0x1bc16e db "@" - .PrintText: ld e, a ld d, 0 diff --git a/engine/pokemon/search.asm b/engine/pokemon/search.asm index 9a66169fb..c8d4439df 100644 --- a/engine/pokemon/search.asm +++ b/engine/pokemon/search.asm @@ -28,7 +28,6 @@ BeastsCheck: ld [wScriptVar], a ret - MonCheck: ; Check if the player owns any Pokémon of the species in wScriptVar. ; Return the result in wScriptVar. @@ -46,7 +45,6 @@ MonCheck: ld [wScriptVar], a ret - CheckOwnMonAnywhere: ; Check if the player owns any monsters of the species in wScriptVar. ; It must exist in either party or PC, and have the player's OT and ID. @@ -178,7 +176,6 @@ CheckOwnMonAnywhere: and a ret - CheckOwnMon: ; Check if a Pokémon belongs to the player and is of a specific species. diff --git a/engine/pokemon/stats_screen.asm b/engine/pokemon/stats_screen.asm index c69d822a2..dfc704f1a 100644 --- a/engine/pokemon/stats_screen.asm +++ b/engine/pokemon/stats_screen.asm @@ -112,7 +112,6 @@ StatsScreenPointerTable: dw MonStatsJoypad dw StatsScreen_Exit - StatsScreen_WaitAnim: ld hl, wcf64 bit 6, [hl] @@ -174,7 +173,6 @@ EggStatsInit: ld [wJumptableIndex], a ret - EggStatsJoypad: call StatsScreen_GetJoypad jr nc, .check @@ -783,7 +781,6 @@ IDNoString: OTString: db "OT/@" - StatsScreen_PlaceFrontpic: ld hl, wTempMonDVs predef GetUnownLetter @@ -1029,7 +1026,6 @@ EggALotMoreTimeString: next "lot more time to" next "hatch.@" - StatsScreen_AnimateEgg: call StatsScreen_GetAnimationParam ret nc @@ -1126,7 +1122,6 @@ GetNicknamePointer: ld a, [wCurPartyMon] jp SkipNames - CheckFaintedFrzSlp: ld hl, MON_HP add hl, bc diff --git a/engine/pokemon/types.asm b/engine/pokemon/types.asm index 76c7665a4..4e2ca3e45 100644 --- a/engine/pokemon/types.asm +++ b/engine/pokemon/types.asm @@ -38,7 +38,6 @@ PrintMonTypes: ld bc, NAME_LENGTH_JAPANESE - 1 jp ByteFill - PrintMoveType: ; Print the type of move b at hl. @@ -56,7 +55,6 @@ PrintMoveType: ld b, a - PrintType: ; Print type b at hl. @@ -75,7 +73,6 @@ PrintType: jp PlaceString - GetTypeName: ; Copy the name of type [wd265] to wStringBuffer1. @@ -92,5 +89,4 @@ GetTypeName: ld bc, MOVE_NAME_LENGTH jp CopyBytes - INCLUDE "data/types/names.asm" diff --git a/engine/rtc/timeset.asm b/engine/rtc/timeset.asm index 2661e86d5..06f800c45 100644 --- a/engine/rtc/timeset.asm +++ b/engine/rtc/timeset.asm @@ -532,7 +532,6 @@ SetDayOfWeek: .Friday: db " FRIDAY@" .Saturday: db "SATURDAY@" - .WhatDayIsItText: ; What day is it? text_jump UnknownText_0x1bc369 diff --git a/engine/tilesets/mapgroup_roofs.asm b/engine/tilesets/mapgroup_roofs.asm index 8262f57b1..b269e5277 100644 --- a/engine/tilesets/mapgroup_roofs.asm +++ b/engine/tilesets/mapgroup_roofs.asm @@ -15,5 +15,4 @@ LoadMapGroupRoof:: call CopyBytes ret - INCLUDE "data/maps/roofs.asm" diff --git a/engine/tilesets/tileset_anims.asm b/engine/tilesets/tileset_anims.asm index 360bce88a..1e6abb968 100644 --- a/engine/tilesets/tileset_anims.asm +++ b/engine/tilesets/tileset_anims.asm @@ -290,7 +290,6 @@ StandingTileFrame8: ld [wTileAnimationTimer], a ret - ScrollTileRightLeft: ; Scroll right for 4 ticks, then left for 4 ticks. ld a, [wTileAnimationTimer] @@ -393,7 +392,6 @@ ScrollTileDown: jr nz, .loop ret - AnimateFountain: ld hl, sp+0 ld b, h @@ -431,7 +429,6 @@ AnimateFountain: .frame4 INCBIN "gfx/tilesets/fountain/4.2bpp" .frame5 INCBIN "gfx/tilesets/fountain/5.2bpp" - AnimateWaterTile: ; Draw a water tile for the current frame in VRAM tile at de. @@ -467,7 +464,6 @@ AnimateWaterTile: WaterTileFrames: INCBIN "gfx/tilesets/water/water.2bpp" - ForestTreeLeftAnimation: ld hl, sp+0 ld b, h @@ -497,7 +493,6 @@ ForestTreeLeftAnimation: ld hl, vTiles2 tile $0c jp WriteTile - ForestTreeLeftFrames: INCBIN "gfx/tilesets/forest-tree/1.2bpp" INCBIN "gfx/tilesets/forest-tree/2.2bpp" @@ -506,7 +501,6 @@ ForestTreeRightFrames: INCBIN "gfx/tilesets/forest-tree/3.2bpp" INCBIN "gfx/tilesets/forest-tree/4.2bpp" - ForestTreeRightAnimation: ld hl, sp+0 ld b, h @@ -540,7 +534,6 @@ ForestTreeRightAnimation: ld hl, vTiles2 tile $0f jp WriteTile - ForestTreeLeftAnimation2: ld hl, sp+0 ld b, h @@ -571,7 +564,6 @@ ForestTreeLeftAnimation2: ld hl, vTiles2 tile $0c jp WriteTile - ForestTreeRightAnimation2: ld hl, sp+0 ld b, h @@ -606,7 +598,6 @@ ForestTreeRightAnimation2: ld hl, vTiles2 tile $0f jp WriteTile - GetForestTreeFrame: ; Return 0 if a is even, or 2 if odd. and a @@ -631,7 +622,6 @@ GetForestTreeFrame: xor a ret - AnimateFlowerTile: ; No parameters. @@ -667,7 +657,6 @@ FlowerTileFrames: INCBIN "gfx/tilesets/flower/dmg_2.2bpp" INCBIN "gfx/tilesets/flower/cgb_2.2bpp" - LavaBubbleAnim1: ; Splash in the bottom-right corner of the fountain. ld hl, sp+0 @@ -688,7 +677,6 @@ LavaBubbleAnim1: ld hl, vTiles2 tile $5b jp WriteTile - LavaBubbleAnim2: ; Splash in the top-left corner of the fountain. ld hl, sp+0 @@ -707,14 +695,12 @@ LavaBubbleAnim2: ld hl, vTiles2 tile $38 jp WriteTile - LavaBubbleFrames: INCBIN "gfx/tilesets/lava/1.2bpp" INCBIN "gfx/tilesets/lava/2.2bpp" INCBIN "gfx/tilesets/lava/3.2bpp" INCBIN "gfx/tilesets/lava/4.2bpp" - AnimateTowerPillarTile: ; Read from struct at de: ; Destination (VRAM) @@ -761,13 +747,11 @@ AnimateTowerPillarTile: .frames db $00, $10, $20, $30, $40, $30, $20, $10 - StandingTileFrame: ld hl, wTileAnimationTimer inc [hl] ret - AnimateWhirlpoolTile: ; Update whirlpool tile using struct at de. @@ -812,7 +796,6 @@ AnimateWhirlpoolTile: jr WriteTile - WriteTileFromBuffer: ; Write tiledata at wTileAnimBuffer to de. ; wTileAnimBuffer is loaded to sp for WriteTile. @@ -828,7 +811,6 @@ WriteTileFromBuffer: ld l, e jr WriteTile - WriteTileToBuffer: ; Write tiledata de to wTileAnimBuffer. ; de is loaded to sp for WriteTile. @@ -870,7 +852,6 @@ endr ld sp, hl ret - TileAnimationPalette: ; Transition between color values 0-2 for color 0 in palette 3. @@ -935,7 +916,6 @@ TileAnimationPalette: ld [rSVBK], a ret - FlickeringCaveEntrancePalette: ; No palette changes on DMG. ld a, [hCGB] @@ -976,7 +956,6 @@ FlickeringCaveEntrancePalette: ld [rSVBK], a ret - TowerPillarTilePointer1: dw vTiles2 tile $2d, TowerPillarTile1 TowerPillarTilePointer2: dw vTiles2 tile $2f, TowerPillarTile2 TowerPillarTilePointer3: dw vTiles2 tile $3d, TowerPillarTile3 @@ -999,7 +978,6 @@ TowerPillarTile8: INCBIN "gfx/tilesets/tower-pillar/8.2bpp" TowerPillarTile9: INCBIN "gfx/tilesets/tower-pillar/9.2bpp" TowerPillarTile10: INCBIN "gfx/tilesets/tower-pillar/10.2bpp" - WhirlpoolFrames1: dw vTiles2 tile $32, WhirlpoolTiles1 WhirlpoolFrames2: dw vTiles2 tile $33, WhirlpoolTiles2 WhirlpoolFrames3: dw vTiles2 tile $42, WhirlpoolTiles3 diff --git a/engine/tilesets/timeofday_pals.asm b/engine/tilesets/timeofday_pals.asm index cda6e1e0d..58bbe9183 100644 --- a/engine/tilesets/timeofday_pals.asm +++ b/engine/tilesets/timeofday_pals.asm @@ -10,7 +10,6 @@ UpdateTimeOfDayPal:: ld [wTimeOfDayPal], a ret - _TimeOfDayPals:: ; return carry if pals are changed @@ -65,12 +64,10 @@ _TimeOfDayPals:: ld a, b ld [rSVBK], a - ; update sgb pals ld b, SCGB_MAPPALS call GetSGBLayout - ; restore bg palette 7 ld hl, wOBPals1 - 1 ; last byte in wBGPals1 @@ -109,7 +106,6 @@ _TimeOfDayPals:: and a ret - _UpdateTimePals:: ld c, $9 ; normal call GetTimePalFade @@ -161,7 +157,6 @@ FadeBlackQuickly: call ConvertTimePalsDecHL ret - FillWhiteBGColor: ld a, [rSVBK] push af @@ -271,7 +266,6 @@ GetTimePalette: rlca ret - DmgToCgbTimePals: push hl push de @@ -310,7 +304,6 @@ ConvertTimePalsDecHL: jr nz, .loop ret - GetTimePalFade: ; check cgb ld a, [hCGB] |