summaryrefslogtreecommitdiff
path: root/engine
diff options
context:
space:
mode:
Diffstat (limited to 'engine')
-rw-r--r--engine/battle/ai/scoring.asm12
-rw-r--r--engine/battle/ai/switch.asm3
-rw-r--r--engine/battle/core.asm1
-rw-r--r--engine/battle/effect_commands.asm12
-rw-r--r--engine/battle/misc.asm1
-rw-r--r--engine/battle/move_effects/baton_pass.asm1
-rw-r--r--engine/battle/move_effects/fury_cutter.asm1
-rw-r--r--engine/battle/move_effects/protect.asm1
-rw-r--r--engine/battle_anims/anim_commands.asm13
-rw-r--r--engine/events/shuckle.asm1
-rw-r--r--engine/events/treemons.asm1
-rw-r--r--engine/games/unown_puzzle.asm1
-rw-r--r--engine/items/item_effects.asm4
-rw-r--r--engine/math/math.asm1
-rw-r--r--engine/menus/intro_menu.asm7
-rw-r--r--engine/menus/start_menu.asm13
-rw-r--r--engine/movie/gbc_only.asm3
-rw-r--r--engine/movie/title.asm1
-rw-r--r--engine/movie/unused_title.asm1
-rw-r--r--engine/overworld/events.asm1
-rw-r--r--engine/overworld/npc_movement.asm2
-rw-r--r--engine/overworld/player_movement.asm5
-rw-r--r--engine/overworld/select_menu.asm3
-rw-r--r--engine/pokedex/pokedex.asm1
-rw-r--r--engine/pokemon/mon_stats.asm1
25 files changed, 6 insertions, 85 deletions
diff --git a/engine/battle/ai/scoring.asm b/engine/battle/ai/scoring.asm
index f6ca177f5..6928a3a83 100644
--- a/engine/battle/ai/scoring.asm
+++ b/engine/battle/ai/scoring.asm
@@ -594,7 +594,6 @@ AI_Smart_DreamEater:
ret
AI_Smart_EvasionUp:
-
; Dismiss this move if enemy's evasion can't raise anymore.
ld a, [wEnemyEvaLevel]
cp $d
@@ -725,7 +724,6 @@ AI_Smart_AlwaysHit:
ret
AI_Smart_MirrorMove:
-
; If the player did not use any move last turn...
ld a, [wLastPlayerCounterMove]
and a
@@ -767,7 +765,6 @@ AI_Smart_MirrorMove:
ret
AI_Smart_AccuracyDown:
-
; If player's HP is full...
call AICheckPlayerMaxHP
jr nc, .asm_389a0
@@ -872,7 +869,6 @@ AI_Smart_AccuracyDown:
ret
AI_Smart_ResetStats:
-
; 85% chance to encourage this move if any of enemy's stat levels is lower than -2.
push hl
ld hl, wEnemyAtkLevel
@@ -1090,7 +1086,6 @@ AI_Smart_Unused2B:
ret
AI_Smart_Confuse:
-
; 90% chance to discourage this move if player's HP is between 25% and 50%.
call AICheckPlayerHalfHP
ret c
@@ -1107,7 +1102,6 @@ AI_Smart_Confuse:
ret
AI_Smart_SpDefenseUp2:
-
; Discourage this move if enemy's HP is lower than 50%.
call AICheckEnemyHalfHP
jr nc, .asm_38b10
@@ -1167,7 +1161,6 @@ AI_Smart_SuperFang:
ret
AI_Smart_Paralyze:
-
; 50% chance to discourage this move if player's HP is below 25%.
call AICheckPlayerQuarterHP
jr nc, .asm_38b3a
@@ -2025,7 +2018,6 @@ AI_Smart_PerishSong:
ret
AI_Smart_Sandstorm:
-
; Greatly discourage this move if the player is immune to Sandstorm damage.
ld a, [wBattleMonType1]
push hl
@@ -2207,7 +2199,6 @@ AI_Smart_Safeguard:
AI_Smart_Magnitude:
AI_Smart_Earthquake:
-
; Greatly encourage this move if the player is underground and the enemy is faster.
ld a, [wLastPlayerCounterMove]
cp DIG
@@ -2330,7 +2321,6 @@ AI_Smart_HiddenPower:
ret
AI_Smart_RainDance:
-
; Greatly discourage this move if it would favour the player type-wise.
; Particularly, if the player is a Water-type.
ld a, [wBattleMonType1]
@@ -2352,7 +2342,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.
; Particularly, if the player is a Fire-type.
ld a, [wBattleMonType1]
@@ -2566,7 +2555,6 @@ AI_Smart_MirrorCoat:
AI_Smart_Twister:
AI_Smart_Gust:
-
; Greatly encourage this move if the player is flying and the enemy is faster.
ld a, [wLastPlayerCounterMove]
cp FLY
diff --git a/engine/battle/ai/switch.asm b/engine/battle/ai/switch.asm
index 85179d2ed..b9bd2ea60 100644
--- a/engine/battle/ai/switch.asm
+++ b/engine/battle/ai/switch.asm
@@ -435,8 +435,9 @@ FindAliveEnemyMonsWithASuperEffectiveMove:
and c
ld c, a
-FindEnemyMonsWithASuperEffectiveMove:
+ ; fallthrough
+FindEnemyMonsWithASuperEffectiveMove:
ld a, -1
ld [wEnemyAISwitchScore], a
ld hl, wOTPartyMon1Moves
diff --git a/engine/battle/core.asm b/engine/battle/core.asm
index 40ba6964d..c3c7e9867 100644
--- a/engine/battle/core.asm
+++ b/engine/battle/core.asm
@@ -6036,7 +6036,6 @@ LoadEnemyMon:
jp .Happiness
.InitDVs:
-
; Trainer DVs
; All trainers have preset DVs, determined by class
diff --git a/engine/battle/effect_commands.asm b/engine/battle/effect_commands.asm
index 35e94ee2d..3e6d928d2 100644
--- a/engine/battle/effect_commands.asm
+++ b/engine/battle/effect_commands.asm
@@ -68,7 +68,6 @@ DoMove:
ld [wBattleScriptBufferAddress + 1], a
.ReadMoveEffectCommand:
-
; ld a, [wBattleScriptBufferAddress++]
ld a, [wBattleScriptBufferAddress]
ld l, a
@@ -136,7 +135,6 @@ BattleCommand_CheckTurn:
jp nz, CheckEnemyTurn
CheckPlayerTurn:
-
ld hl, wPlayerSubStatus4
bit SUBSTATUS_RECHARGE, [hl]
jr z, .no_recharge
@@ -366,7 +364,6 @@ OpponentCantMove:
jp BattleCommand_SwitchTurn
CheckEnemyTurn:
-
ld hl, wEnemySubStatus4
bit SUBSTATUS_RECHARGE, [hl]
jr z, .no_recharge
@@ -589,7 +586,6 @@ EndTurn:
jp ResetDamage
MoveDisabled:
-
; Make sure any charged moves fail
ld a, BATTLE_VARS_SUBSTATUS3
call GetBattleVarAddr
@@ -604,7 +600,6 @@ MoveDisabled:
jp StdBattleTextBox
HitConfusion:
-
ld hl, HurtItselfText
call StdBattleTextBox
@@ -811,7 +806,6 @@ BattleCommand_CheckObedience:
jp .EndDisobedience
.UseInstead:
-
; Can't use another move if the monster only has one!
ld a, [wBattleMonMoves + 1]
and a
@@ -919,7 +913,6 @@ BattleCommand_CheckObedience:
jp EndMoveEffect
IgnoreSleepOnly:
-
ld a, BATTLE_VARS_MOVE_ANIM
call GetBattleVar
@@ -952,7 +945,6 @@ BattleCommand_UsedMoveText:
ret
CheckUserIsCharging:
-
ld a, [hBattleTurn]
and a
ld a, [wPlayerCharging] ; player
@@ -1775,7 +1767,6 @@ BattleCommand_CheckHit:
ret
.StatModifiers:
-
ld a, [hBattleTurn]
and a
@@ -3066,8 +3057,8 @@ BattleCommand_DamageCalc:
ld [hDivisor], a
ld b, 4
call Divide
-.DoneItem:
+.DoneItem:
; Critical hits
call .CriticalMultiplier
@@ -3583,7 +3574,6 @@ DoSubstituteDamage:
jp ResetDamage
UpdateMoveData:
-
ld a, BATTLE_VARS_MOVE_ANIM
call GetBattleVarAddr
ld d, h
diff --git a/engine/battle/misc.asm b/engine/battle/misc.asm
index 74b942743..48062f643 100644
--- a/engine/battle/misc.asm
+++ b/engine/battle/misc.asm
@@ -50,7 +50,6 @@ GetPlayerBackpicCoords:
ret
DoWeatherModifiers:
-
ld de, WeatherTypeModifiers
ld a, [wBattleWeather]
ld b, a
diff --git a/engine/battle/move_effects/baton_pass.asm b/engine/battle/move_effects/baton_pass.asm
index cdb4bb75f..5d9f19838 100644
--- a/engine/battle/move_effects/baton_pass.asm
+++ b/engine/battle/move_effects/baton_pass.asm
@@ -45,7 +45,6 @@ BattleCommand_BatonPass:
ret
.Enemy:
-
; Wildmons don't have anything to switch to
ld a, [wBattleMode]
dec a ; WILDMON
diff --git a/engine/battle/move_effects/fury_cutter.asm b/engine/battle/move_effects/fury_cutter.asm
index 8d6a5597b..6aa6b7838 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
ld hl, wPlayerFuryCutterCount
diff --git a/engine/battle/move_effects/protect.asm b/engine/battle/move_effects/protect.asm
index 92652109d..9025d2f4b 100644
--- a/engine/battle/move_effects/protect.asm
+++ b/engine/battle/move_effects/protect.asm
@@ -13,7 +13,6 @@ BattleCommand_Protect:
jp StdBattleTextBox
ProtectChance:
-
ld de, wPlayerProtectCount
ld a, [hBattleTurn]
and a
diff --git a/engine/battle_anims/anim_commands.asm b/engine/battle_anims/anim_commands.asm
index 8bdbe62c9..e68b7d774 100644
--- a/engine/battle_anims/anim_commands.asm
+++ b/engine/battle_anims/anim_commands.asm
@@ -1,7 +1,6 @@
; Battle animation command interpreter.
PlayBattleAnim:
-
ld a, [rSVBK]
push af
@@ -15,7 +14,6 @@ PlayBattleAnim:
ret
_PlayBattleAnim:
-
ld c, 6
.wait
call BattleAnimDelayFrame
@@ -53,7 +51,6 @@ _PlayBattleAnim:
ret
BattleAnimRunScript:
-
ld a, [wFXAnimID + 1]
and a
jr nz, .hi_byte
@@ -97,7 +94,6 @@ BattleAnimRunScript:
ret
RunBattleAnimScript:
-
call ClearBattleAnims
.playframe
@@ -139,7 +135,6 @@ RunBattleAnimScript:
ret
BattleAnimClearHud:
-
call BattleAnimDelayFrame
call WaitTop
call ClearActorHud
@@ -152,7 +147,6 @@ BattleAnimClearHud:
ret
BattleAnimRestoreHuds:
-
call BattleAnimDelayFrame
call WaitTop
@@ -177,7 +171,6 @@ BattleAnimRestoreHuds:
ret
BattleAnimRequestPals:
-
ld a, [hCGB]
and a
ret z
@@ -207,7 +200,6 @@ BattleAnimDelayFrame:
ret
ClearActorHud:
-
ld a, [hBattleTurn]
and a
jr z, .player
@@ -241,7 +233,6 @@ Unreferenced_Functioncc220:
ret
BattleAnim_ClearCGB_OAMFlags:
-
ld a, [wBattleAnimFlags]
bit 3, a
jr z, .delete
@@ -777,7 +768,6 @@ BattleAnimCmd_SetObj:
ret
BattleAnimCmd_EnemyFeetObj:
-
ld hl, wBattleAnimTileDict
.loop
ld a, [hl]
@@ -832,7 +822,6 @@ BattleAnimCmd_EnemyFeetObj:
ret
BattleAnimCmd_PlayerHeadObj:
-
ld hl, wBattleAnimTileDict
.loop
ld a, [hl]
@@ -931,7 +920,6 @@ BattleAnimCmd_Transform:
ret
BattleAnimCmd_UpdateActorPic:
-
ld de, vTiles0 tile $00
ld a, [hBattleTurn]
and a
@@ -951,7 +939,6 @@ BattleAnimCmd_UpdateActorPic:
ret
BattleAnimCmd_RaiseSub:
-
ld a, [rSVBK]
push af
ld a, 1 ; unnecessary bankswitch?
diff --git a/engine/events/shuckle.asm b/engine/events/shuckle.asm
index 6ac6eeb08..c6d909afe 100644
--- a/engine/events/shuckle.asm
+++ b/engine/events/shuckle.asm
@@ -1,7 +1,6 @@
MANIA_OT_ID EQU 00518
GiveShuckle:
-
; Adding to the party.
xor a
ld [wMonType], a
diff --git a/engine/events/treemons.asm b/engine/events/treemons.asm
index 1fdeceb0a..cd78421d6 100644
--- a/engine/events/treemons.asm
+++ b/engine/events/treemons.asm
@@ -27,7 +27,6 @@ TreeMonEncounter:
ret
RockMonEncounter:
-
xor a
ld [wTempWildMonSpecies], a
ld [wCurPartyLevel], a
diff --git a/engine/games/unown_puzzle.asm b/engine/games/unown_puzzle.asm
index 9e4f69441..fb88d93b6 100644
--- a/engine/games/unown_puzzle.asm
+++ b/engine/games/unown_puzzle.asm
@@ -731,7 +731,6 @@ ConvertLoadedPuzzlePieces:
ret
.EnlargedTiles:
-
x = 0
rept 16
db ((x & %1000) * %11000) + ((x & %0100) * %1100) + ((x & %0010) * %110) + ((x & %0001) * %11)
diff --git a/engine/items/item_effects.asm b/engine/items/item_effects.asm
index 1a2181be9..1439b2c6d 100644
--- a/engine/items/item_effects.asm
+++ b/engine/items/item_effects.asm
@@ -484,8 +484,8 @@ PokeBallEffect:
ld de, wEnemyMonPP
ld bc, NUM_MOVES
call CopyBytes
-.Transformed:
+.Transformed:
ld a, [wEnemyMonSpecies]
ld [wWildMon], a
ld [wCurPartySpecies], a
@@ -560,8 +560,8 @@ PokeBallEffect:
ld a, FRIEND_BALL_HAPPINESS
ld [hl], a
-.SkipPartyMonFriendBall:
+.SkipPartyMonFriendBall:
ld hl, Text_AskNicknameNewlyCaughtMon
call PrintText
diff --git a/engine/math/math.asm b/engine/math/math.asm
index 21b49b589..c2e5f70a3 100644
--- a/engine/math/math.asm
+++ b/engine/math/math.asm
@@ -1,5 +1,4 @@
_Multiply::
-
; hMultiplier is one byte.
ld a, 8
ld b, a
diff --git a/engine/menus/intro_menu.asm b/engine/menus/intro_menu.asm
index 2e1f2d234..9652dd73e 100644
--- a/engine/menus/intro_menu.asm
+++ b/engine/menus/intro_menu.asm
@@ -94,7 +94,6 @@ ResetWRAM:
ret
_ResetWRAM:
-
ld hl, wVirtualOAM
ld bc, wOptions - wVirtualOAM
xor a
@@ -801,7 +800,6 @@ StorePlayerName:
ret
ShrinkPlayer:
-
ld a, [hROMBank]
push af
@@ -911,7 +909,6 @@ ShrinkFrame:
ret
Intro_PlacePlayerSprite:
-
farcall GetPlayerIcon
ld c, $c
ld hl, vTiles0
@@ -1067,7 +1064,6 @@ TitleScreenScene:
ret
TitleScreenEntrance:
-
; Animate the logo:
; Move each line by 4 pixels until our count hits 0.
ld a, [hSCX]
@@ -1115,7 +1111,6 @@ TitleScreenEntrance:
ret
TitleScreenTimer:
-
; Next scene
ld hl, wJumptableIndex
inc [hl]
@@ -1129,7 +1124,6 @@ TitleScreenTimer:
ret
TitleScreenMain:
-
; Run the timer down.
ld hl, wTitleScreenTimer
ld e, [hl]
@@ -1230,7 +1224,6 @@ TitleScreenMain:
ret
TitleScreenEnd:
-
; Wait until the music is done fading.
ld hl, wTitleScreenTimer
diff --git a/engine/menus/start_menu.asm b/engine/menus/start_menu.asm
index 45d08ca7a..108a4edf6 100644
--- a/engine/menus/start_menu.asm
+++ b/engine/menus/start_menu.asm
@@ -11,7 +11,6 @@
const STARTMENUITEM_QUIT ; 8
StartMenu::
-
call ClearWindowData
ld de, SFX_MENU
@@ -24,8 +23,8 @@ StartMenu::
ld hl, .MenuHeader
jr z, .GotMenuData
ld hl, .ContestMenuHeader
-.GotMenuData:
+.GotMenuData:
call LoadMenuHeader
call .SetUpMenuItems
ld a, [wBattleMenuCursorBuffer]
@@ -459,7 +458,6 @@ StartMenu_Status:
ret
StartMenu_Pokedex:
-
ld a, [wPartyCount]
and a
jr z, .asm_12949
@@ -473,7 +471,6 @@ StartMenu_Pokedex:
ret
StartMenu_Pokegear:
-
call FadeToMenu
farcall PokeGear
call CloseSubmenu
@@ -481,7 +478,6 @@ StartMenu_Pokegear:
ret
StartMenu_Pack:
-
call FadeToMenu
farcall Pack
ld a, [wPackUsedItem]
@@ -497,7 +493,6 @@ StartMenu_Pack:
ret
StartMenu_Pokemon:
-
ld a, [wPartyCount]
and a
jr z, .return
@@ -700,7 +695,6 @@ PokemonActionSubmenu:
dbw MONMENUITEM_MAIL, MonMailAction
SwitchPartyMons:
-
; Don't try if there's nothing to switch!
ld a, [wPartyCount]
cp 2
@@ -751,7 +745,6 @@ SwitchPartyMons:
ret
GiveTakePartyMonItem:
-
; Eggs can't hold items!
ld a, [wCurPartySpecies]
cp EGG
@@ -791,7 +784,6 @@ GiveTakePartyMonItem:
ret
.GiveItem:
-
farcall DepositSellInitPackBuffers
.loop
@@ -822,7 +814,6 @@ GiveTakePartyMonItem:
ret
TryGiveItemToPartymon:
-
call SpeechTextBox
call PartyMonItemName
call GetPartyItemLocation
@@ -885,7 +876,6 @@ TryGiveItemToPartymon:
ret
GivePartyItem:
-
call GetPartyItemLocation
ld a, [wCurItem]
ld [hl], a
@@ -898,7 +888,6 @@ GivePartyItem:
ret
TakePartyItem:
-
call SpeechTextBox
call GetPartyItemLocation
ld a, [hl]
diff --git a/engine/movie/gbc_only.asm b/engine/movie/gbc_only.asm
index c882c86df..2ea8ff33c 100644
--- a/engine/movie/gbc_only.asm
+++ b/engine/movie/gbc_only.asm
@@ -1,5 +1,4 @@
GBCOnlyScreen:
-
ld a, [hCGB]
and a
ret nz
@@ -39,7 +38,6 @@ GBCOnlyScreen:
jr .loop
DrawGBCOnlyScreen:
-
call DrawGBCOnlyBorder
; Pokemon
@@ -63,7 +61,6 @@ DrawGBCOnlyScreen:
ret
DrawGBCOnlyBorder:
-
hlcoord 0, 0
ld [hl], 0 ; top-left
diff --git a/engine/movie/title.asm b/engine/movie/title.asm
index b43673b02..3717b4e73 100644
--- a/engine/movie/title.asm
+++ b/engine/movie/title.asm
@@ -1,5 +1,4 @@
_TitleScreen:
-
call ClearBGPalettes
call ClearSprites
call ClearTileMap
diff --git a/engine/movie/unused_title.asm b/engine/movie/unused_title.asm
index 4527d9ade..0c97c840a 100644
--- a/engine/movie/unused_title.asm
+++ b/engine/movie/unused_title.asm
@@ -1,5 +1,4 @@
UnusedTitleScreen:
-
call ClearBGPalettes
call ClearTileMap
call DisableLCD
diff --git a/engine/overworld/events.asm b/engine/overworld/events.asm
index daa7b8414..dfde757d9 100644
--- a/engine/overworld/events.asm
+++ b/engine/overworld/events.asm
@@ -485,7 +485,6 @@ CheckTimeEvents:
ret
OWPlayerInput:
-
call PlayerMovement
ret c
and a
diff --git a/engine/overworld/npc_movement.asm b/engine/overworld/npc_movement.asm
index 868df2254..b21e46700 100644
--- a/engine/overworld/npc_movement.asm
+++ b/engine/overworld/npc_movement.asm
@@ -1,5 +1,4 @@
CanObjectMoveInDirection:
-
ld hl, OBJECT_PALETTE
add hl, bc
bit SWIMMING_F, [hl]
@@ -216,7 +215,6 @@ Function6fa1:
ret
CheckFacingObject::
-
call GetFacingTileCoord
; Double the distance for counter tiles.
diff --git a/engine/overworld/player_movement.asm b/engine/overworld/player_movement.asm
index 0a2674341..c70357f13 100644
--- a/engine/overworld/player_movement.asm
+++ b/engine/overworld/player_movement.asm
@@ -256,7 +256,6 @@ DoPlayerMovement::
ret
.TryStep:
-
; Surfing actually calls .TrySurf directly instead of passing through here.
ld a, [wPlayerState]
cp PLAYER_SURF
@@ -321,7 +320,6 @@ DoPlayerMovement::
ret
.TrySurf:
-
call .CheckSurfPerms
ld [wd040], a
jr c, .surf_bump
@@ -395,7 +393,6 @@ DoPlayerMovement::
db FACE_UP | FACE_LEFT ; COLL_HOP_UP_LEFT
.CheckWarp:
-
; Bug: Since no case is made for STANDING here, it will check
; [.edgewarps + $ff]. This resolves to $3e at $8035a.
; This causes wd041 to be nonzero when standing on tile $3e,
@@ -657,7 +654,6 @@ DoPlayerMovement::
ret
.CheckStrengthBoulder:
-
ld hl, wBikeFlags
bit BIKEFLAGS_STRENGTH_ACTIVE_F, [hl]
jr z, .not_boulder
@@ -779,7 +775,6 @@ DoPlayerMovement::
ret
.BumpSound:
-
call CheckSFX
ret c
ld de, SFX_BUMP
diff --git a/engine/overworld/select_menu.asm b/engine/overworld/select_menu.asm
index 28667d033..9eba9de83 100644
--- a/engine/overworld/select_menu.asm
+++ b/engine/overworld/select_menu.asm
@@ -1,5 +1,4 @@
SelectMenu::
-
call CheckRegisteredItem
jr c, .NotRegistered
jp UseRegisteredItem
@@ -17,7 +16,6 @@ ItemMayBeRegisteredText:
db "@"
CheckRegisteredItem:
-
ld a, [wWhichRegisteredItem]
and a
jr z, .NoRegisteredItem
@@ -110,7 +108,6 @@ CheckRegisteredItem:
ret
UseRegisteredItem:
-
farcall CheckItemMenu
ld a, [wItemAttributeParamBuffer]
ld hl, .SwitchTo
diff --git a/engine/pokedex/pokedex.asm b/engine/pokedex/pokedex.asm
index c61062049..5682dac35 100644
--- a/engine/pokedex/pokedex.asm
+++ b/engine/pokedex/pokedex.asm
@@ -19,7 +19,6 @@ POKEDEX_SCX EQU 5
GLOBAL POKEDEX_SCX
Pokedex:
-
ld a, [hWX]
ld l, a
ld a, [hWY]
diff --git a/engine/pokemon/mon_stats.asm b/engine/pokemon/mon_stats.asm
index 829e99e6b..76f09b461 100644
--- a/engine/pokemon/mon_stats.asm
+++ b/engine/pokemon/mon_stats.asm
@@ -170,7 +170,6 @@ GetGender:
call AddNTimes
.DVs:
-
; sBoxMon data is read directly from SRAM.
ld a, [wMonType]
cp BOXMON