summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoryenatch <yenatch@gmail.com>2018-06-30 17:50:33 -0400
committerGitHub <noreply@github.com>2018-06-30 17:50:33 -0400
commit2641f93ad084b1329b3f3b9f7c8c222445fc4832 (patch)
treefb048bbc8bb7257dbd8169e2442117da5d2b30d2
parent91f914718a263839daef24d44eda857bfc7cca95 (diff)
parentda5125e1411f9599b883181c5ee6e31252d37ac8 (diff)
Merge pull request #534 from Rangi42/master
[RTM] Fix triple newlines left over from removing address comments, and other improvements
-rw-r--r--audio.asm4
-rw-r--r--audio/engine.asm73
-rw-r--r--audio/music/magnettrain.asm2
-rw-r--r--audio/music_pointers.asm5
-rw-r--r--audio/sfx_pointers.asm5
-rw-r--r--constants/collision_constants.asm2
-rw-r--r--constants/gfx_constants.asm4
-rw-r--r--constants/item_data_constants.asm3
-rw-r--r--constants/landmark_constants.asm1
-rw-r--r--constants/map_data_constants.asm4
-rw-r--r--constants/map_object_constants.asm2
-rw-r--r--constants/menu_constants.asm2
-rw-r--r--constants/pokemon_data_constants.asm9
-rw-r--r--constants/script_constants.asm9
-rw-r--r--data/battle_anims/framesets.asm1
-rw-r--r--data/battle_tower/parties.asm219
-rw-r--r--data/credits_strings.asm4
-rw-r--r--data/engine_flags.asm1
-rw-r--r--data/events/field_move_blocks.asm1
-rw-r--r--data/events/odd_eggs.asm1
-rw-r--r--data/events/pokedex_ratings.asm1
-rw-r--r--data/items/marts.asm1
-rw-r--r--data/maps/attributes.asm1
-rw-r--r--data/maps/map_data.asm1
-rw-r--r--data/maps/maps.asm1
-rw-r--r--data/maps/outdoor_sprites.asm1
-rw-r--r--data/moves/effects.asm2
-rw-r--r--data/party_menu_qualities.asm1
-rw-r--r--data/sgb_ctrl_packets.asm2
-rw-r--r--data/sprites/facings.asm1
-rw-r--r--data/trainers/attributes.asm1
-rw-r--r--data/trainers/parties.asm69
-rw-r--r--data/types/names.asm1
-rw-r--r--data/wild/fish.asm1
-rw-r--r--docs/design_flaws.md1
-rw-r--r--engine/battle/ai/items.asm9
-rw-r--r--engine/battle/ai/move.asm3
-rw-r--r--engine/battle/ai/scoring.asm115
-rw-r--r--engine/battle/ai/switch.asm9
-rw-r--r--engine/battle/battle_transition.asm10
-rw-r--r--engine/battle/core.asm2
-rw-r--r--engine/battle/effect_commands.asm415
-rw-r--r--engine/battle/hidden_power.asm2
-rw-r--r--engine/battle/misc.asm4
-rw-r--r--engine/battle/move_effects/attract.asm1
-rw-r--r--engine/battle/move_effects/baton_pass.asm16
-rw-r--r--engine/battle/move_effects/beat_up.asm6
-rw-r--r--engine/battle/move_effects/belly_drum.asm1
-rw-r--r--engine/battle/move_effects/bide.asm3
-rw-r--r--engine/battle/move_effects/conversion.asm1
-rw-r--r--engine/battle/move_effects/conversion2.asm1
-rw-r--r--engine/battle/move_effects/counter.asm1
-rw-r--r--engine/battle/move_effects/curse.asm3
-rw-r--r--engine/battle/move_effects/destiny_bond.asm1
-rw-r--r--engine/battle/move_effects/disable.asm1
-rw-r--r--engine/battle/move_effects/encore.asm1
-rw-r--r--engine/battle/move_effects/false_swipe.asm1
-rw-r--r--engine/battle/move_effects/focus_energy.asm1
-rw-r--r--engine/battle/move_effects/frustration.asm1
-rw-r--r--engine/battle/move_effects/fury_cutter.asm4
-rw-r--r--engine/battle/move_effects/future_sight.asm2
-rw-r--r--engine/battle/move_effects/heal_bell.asm1
-rw-r--r--engine/battle/move_effects/hidden_power.asm1
-rw-r--r--engine/battle/move_effects/leech_seed.asm1
-rw-r--r--engine/battle/move_effects/lock_on.asm1
-rw-r--r--engine/battle/move_effects/metronome.asm2
-rw-r--r--engine/battle/move_effects/mimic.asm1
-rw-r--r--engine/battle/move_effects/mirror_coat.asm1
-rw-r--r--engine/battle/move_effects/mist.asm1
-rw-r--r--engine/battle/move_effects/pain_split.asm2
-rw-r--r--engine/battle/move_effects/pay_day.asm1
-rw-r--r--engine/battle/move_effects/perish_song.asm1
-rw-r--r--engine/battle/move_effects/protect.asm3
-rw-r--r--engine/battle/move_effects/psych_up.asm1
-rw-r--r--engine/battle/move_effects/pursuit.asm1
-rw-r--r--engine/battle/move_effects/rage.asm1
-rw-r--r--engine/battle/move_effects/rain_dance.asm1
-rw-r--r--engine/battle/move_effects/rapid_spin.asm1
-rw-r--r--engine/battle/move_effects/return.asm1
-rw-r--r--engine/battle/move_effects/rollout.asm2
-rw-r--r--engine/battle/move_effects/safeguard.asm1
-rw-r--r--engine/battle/move_effects/selfdestruct.asm1
-rw-r--r--engine/battle/move_effects/sketch.asm1
-rw-r--r--engine/battle/move_effects/sleep_talk.asm1
-rw-r--r--engine/battle/move_effects/snore.asm1
-rw-r--r--engine/battle/move_effects/spite.asm1
-rw-r--r--engine/battle/move_effects/splash.asm1
-rw-r--r--engine/battle/move_effects/substitute.asm1
-rw-r--r--engine/battle/move_effects/sunny_day.asm1
-rw-r--r--engine/battle/move_effects/teleport.asm1
-rw-r--r--engine/battle/move_effects/thief.asm3
-rw-r--r--engine/battle/move_effects/thunder.asm1
-rw-r--r--engine/battle/move_effects/transform.asm1
-rw-r--r--engine/battle/move_effects/triple_kick.asm3
-rw-r--r--engine/battle/read_trainer_attributes.asm2
-rw-r--r--engine/battle/read_trainer_dvs.asm2
-rw-r--r--engine/battle/read_trainer_party.asm3
-rw-r--r--engine/battle/used_move_text.asm2
-rw-r--r--engine/battle_anims/anim_commands.asm17
-rw-r--r--engine/battle_anims/bg_effects.asm29
-rw-r--r--engine/battle_anims/core.asm5
-rw-r--r--engine/battle_anims/helpers.asm4
-rw-r--r--engine/events/battle_tower/battle_tower.asm9
-rw-r--r--engine/events/battle_tower/load_trainer.asm1
-rw-r--r--engine/events/battle_tower/trainer_text.asm6
-rw-r--r--engine/events/bug_contest/judging.asm2
-rw-r--r--engine/events/celebi.asm20
-rw-r--r--engine/events/elevator.asm2
-rw-r--r--engine/events/engine_flags.asm2
-rw-r--r--engine/events/field_moves.asm9
-rw-r--r--engine/events/fish.asm3
-rw-r--r--engine/events/fruit_trees.asm2
-rw-r--r--engine/events/halloffame.asm2
-rw-r--r--engine/events/happiness_egg.asm3
-rw-r--r--engine/events/magikarp.asm3
-rw-r--r--engine/events/map_name_sign.asm4
-rw-r--r--engine/events/mom_phone.asm4
-rw-r--r--engine/events/money.asm2
-rw-r--r--engine/events/npc_trade.asm9
-rw-r--r--engine/events/overworld.asm2
-rw-r--r--engine/events/poke_seer.asm3
-rw-r--r--engine/events/print_unown.asm11
-rw-r--r--engine/events/shuckle.asm1
-rw-r--r--engine/events/specials.asm5
-rw-r--r--engine/events/std_scripts.asm2
-rw-r--r--engine/events/treemons.asm1
-rw-r--r--engine/events/whiteout.asm1
-rw-r--r--engine/games/card_flip.asm5
-rw-r--r--engine/games/dummy_game.asm8
-rw-r--r--engine/games/slot_machine.asm57
-rw-r--r--engine/games/unown_puzzle.asm1
-rw-r--r--engine/gfx/cgb_layouts.asm1
-rw-r--r--engine/gfx/dma_transfer.asm4
-rw-r--r--engine/gfx/load_pics.asm17
-rw-r--r--engine/gfx/mon_icons.asm3
-rw-r--r--engine/gfx/pic_animation.asm2
-rw-r--r--engine/gfx/sprites.asm7
-rw-r--r--engine/items/item_effects.asm55
-rw-r--r--engine/items/mart.asm6
-rw-r--r--engine/items/pack.asm6
-rw-r--r--engine/items/print_item_description.asm2
-rw-r--r--engine/items/switch_items.asm1
-rw-r--r--engine/items/tmhm2.asm1
-rw-r--r--engine/link/link.asm5
-rw-r--r--engine/link/link_trade.asm1
-rw-r--r--engine/link/mystery_gift.asm5
-rw-r--r--engine/link/mystery_gift_2.asm1
-rw-r--r--engine/link/time_capsule_2.asm1
-rw-r--r--engine/math/math.asm5
-rw-r--r--engine/menus/debug.asm2
-rw-r--r--engine/menus/intro_menu.asm13
-rw-r--r--engine/menus/main_menu.asm4
-rw-r--r--engine/menus/menu.asm6
-rw-r--r--engine/menus/naming_screen.asm37
-rw-r--r--engine/menus/options_menu.asm9
-rw-r--r--engine/menus/save.asm17
-rw-r--r--engine/menus/start_menu.asm48
-rw-r--r--engine/menus/trainer_card.asm4
-rw-r--r--engine/movie/credits.asm3
-rw-r--r--engine/movie/crystal_intro.asm3
-rw-r--r--engine/movie/evolution_animation.asm1
-rw-r--r--engine/movie/gbc_only.asm8
-rw-r--r--engine/movie/title.asm14
-rw-r--r--engine/movie/trade_animation.asm80
-rw-r--r--engine/movie/unused_title.asm1
-rw-r--r--engine/overworld/decorations.asm5
-rw-r--r--engine/overworld/events.asm613
-rw-r--r--engine/overworld/events_2.asm617
-rw-r--r--engine/overworld/landmarks.asm3
-rw-r--r--engine/overworld/map_objects.asm2
-rw-r--r--engine/overworld/map_setup.asm1
-rw-r--r--engine/overworld/movement.asm7
-rw-r--r--engine/overworld/npc_movement.asm11
-rw-r--r--engine/overworld/overworld.asm17
-rw-r--r--engine/overworld/player_movement.asm5
-rw-r--r--engine/overworld/scripting.asm13
-rw-r--r--engine/overworld/select_menu.asm8
-rw-r--r--engine/overworld/spawn_points.asm2
-rw-r--r--engine/overworld/time.asm2
-rw-r--r--engine/overworld/warp_connection.asm2
-rw-r--r--engine/overworld/wildmons.asm7
-rw-r--r--engine/phone/generic_calls.asm2
-rw-r--r--engine/phone/phone.asm12
-rw-r--r--engine/pokedex/pokedex.asm17
-rw-r--r--engine/pokedex/pokedex_2.asm2
-rw-r--r--engine/pokedex/unown_dex.asm1
-rw-r--r--engine/pokegear/pokegear.asm70
-rw-r--r--engine/pokegear/radio.asm1
-rw-r--r--engine/pokemon/bills_pc.asm4
-rw-r--r--engine/pokemon/breeding.asm3
-rw-r--r--engine/pokemon/evolve.asm8
-rw-r--r--engine/pokemon/mail.asm3
-rw-r--r--engine/pokemon/mon_stats.asm1
-rw-r--r--engine/pokemon/move_mon.asm1
-rw-r--r--engine/pokemon/party_menu.asm10
-rw-r--r--engine/pokemon/search.asm3
-rw-r--r--engine/pokemon/stats_screen.asm5
-rw-r--r--engine/pokemon/types.asm4
-rw-r--r--engine/printer/printer.asm2
-rw-r--r--engine/rtc/timeset.asm1
-rw-r--r--engine/tilesets/mapgroup_roofs.asm1
-rw-r--r--engine/tilesets/tileset_anims.asm22
-rw-r--r--engine/tilesets/timeofday_pals.asm7
-rw-r--r--gfx/pics.asm5
-rw-r--r--gfx/sgb/blk_packets.asm1
-rw-r--r--gfx/sgb/pal_packets.asm2
-rw-r--r--gfx/tileset_palette_maps.asm1
-rw-r--r--home.asm3
-rw-r--r--home/audio.asm14
-rw-r--r--home/battle.asm21
-rw-r--r--home/copy.asm14
-rw-r--r--home/decompress.asm19
-rw-r--r--home/delay.asm1
-rw-r--r--home/fade.asm3
-rw-r--r--home/farcall.asm1
-rw-r--r--home/flag.asm2
-rw-r--r--home/game_time.asm10
-rw-r--r--home/init.asm5
-rw-r--r--home/joypad.asm6
-rw-r--r--home/lcd.asm4
-rw-r--r--home/map.asm7
-rw-r--r--home/math.asm4
-rw-r--r--home/menu.asm5
-rw-r--r--home/menu_window.asm2
-rw-r--r--home/mobile.asm1
-rw-r--r--home/movement.asm1
-rw-r--r--home/names.asm1
-rw-r--r--home/palettes.asm13
-rw-r--r--home/random.asm1
-rw-r--r--home/text.asm20
-rw-r--r--home/time.asm10
-rw-r--r--home/trainers.asm2
-rw-r--r--home/vblank.asm10
-rw-r--r--home/video.asm22
-rw-r--r--home/window.asm1
-rw-r--r--macros/code.asm1
-rw-r--r--macros/data.asm5
-rw-r--r--macros/enum.asm2
-rw-r--r--macros/legacy.asm3
-rw-r--r--macros/scripts/maps.asm2
-rw-r--r--macros/scripts/trade_anims.asm1
-rw-r--r--macros/wram.asm2
-rw-r--r--main.asm8
-rw-r--r--mobile/mobile_12.asm1
-rw-r--r--mobile/mobile_22.asm27
-rw-r--r--mobile/mobile_22_2.asm2
-rw-r--r--mobile/mobile_40.asm11
-rw-r--r--mobile/mobile_41.asm3
-rw-r--r--mobile/mobile_45.asm118
-rw-r--r--mobile/mobile_45_sprite_engine.asm16
-rw-r--r--mobile/mobile_46.asm9
-rw-r--r--mobile/mobile_5b.asm4
-rw-r--r--mobile/mobile_5c.asm16
-rw-r--r--mobile/mobile_5e.asm1
-rw-r--r--mobile/mobile_5f.asm6
-rw-r--r--mobile/mobile_menu.asm4
-rw-r--r--wram.asm4
257 files changed, 677 insertions, 2986 deletions
diff --git a/audio.asm b/audio.asm
index cecbdae5b..601b49820 100644
--- a/audio.asm
+++ b/audio.asm
@@ -11,7 +11,6 @@ INCLUDE "audio/cry_pointers.asm"
INCLUDE "audio/sfx_pointers.asm"
-
SECTION "Songs 1", ROMX
INCLUDE "audio/music/route36.asm"
@@ -130,7 +129,6 @@ INCLUDE "audio/music/battletowerlobby.asm"
INCLUDE "audio/music/mobilecenter.asm"
-
SECTION "Extra Songs 1", ROMX
INCLUDE "audio/music/credits.asm"
@@ -143,7 +141,6 @@ SECTION "Extra Songs 2", ROMX
INCLUDE "audio/music/postcredits.asm"
-
SECTION "Sound Effects", ROMX
INCLUDE "audio/sfx.asm"
@@ -154,7 +151,6 @@ SECTION "Crystal Sound Effects", ROMX
INCLUDE "audio/sfx_crystal.asm"
-
SECTION "Cries", ROMX
INCLUDE "data/pokemon/cries.asm"
diff --git a/audio/engine.asm b/audio/engine.asm
index a3d68a1b1..482b1d1db 100644
--- a/audio/engine.asm
+++ b/audio/engine.asm
@@ -56,7 +56,6 @@ _MapSetup_Sound_Off::
pop hl
ret
-
MusicFadeRestart:
; restart but keep the music id to fade in to
ld a, [wMusicFadeID + 1]
@@ -70,19 +69,16 @@ MusicFadeRestart:
ld [wMusicFadeID + 1], a
ret
-
MusicOn:
ld a, 1
ld [wMusicPlaying], a
ret
-
MusicOff:
xor a
ld [wMusicPlaying], a
ret
-
_UpdateSound::
; called once per frame
; no use updating audio if it's not playing
@@ -212,7 +208,6 @@ _UpdateSound::
ld [rNR51], a
ret
-
UpdateChannels:
ld hl, .ChannelFnPtrs
ld a, [wCurChannel]
@@ -505,7 +500,6 @@ endr
ld [rNR44], a
ret
-
_CheckSFX:
; return carry if any sfx channels are active
ld hl, wChannel5Flags1
@@ -527,7 +521,6 @@ _CheckSFX:
scf
ret
-
PlayDanger:
ld a, [wLowHealthAlarm]
bit DANGER_ON_F, a
@@ -588,7 +581,6 @@ PlayDanger:
ld [wSoundOutput], a
ret
-
DangerSoundHigh:
db $80 ; duty 50%
db $e2 ; volume 14, envelope decrease sweep 2
@@ -713,7 +705,6 @@ FadeMusic:
ld [wVolume], a
ret
-
LoadNote:
; wait for pitch wheel to finish
ld hl, CHANNEL_FLAGS2
@@ -834,7 +825,6 @@ LoadNote:
ld [hl], a
ret
-
HandleTrackVibrato:
; handle duty, cry pitch, and vibrato
ld hl, CHANNEL_FLAGS2
@@ -952,7 +942,6 @@ HandleTrackVibrato:
.quit
ret
-
ApplyPitchWheel:
; quit if pitch wheel inactive
ld hl, CHANNEL_FLAGS2
@@ -1068,7 +1057,6 @@ ApplyPitchWheel:
set NOTE_DUTY_OVERRIDE, [hl]
ret
-
HandleNoise:
; is noise sampling on?
ld hl, CHANNEL_FLAGS1
@@ -1095,7 +1083,6 @@ HandleNoise:
ld [wNoiseSampleDelay], a
ret
-
ReadNoiseSample:
; sample struct:
; [wx] [yy] [zz]
@@ -1146,7 +1133,6 @@ ReadNoiseSample:
.quit
ret
-
ParseMusic:
; parses until a note is read or the song is ended
call GetMusicByte ; store next byte in a
@@ -1255,7 +1241,6 @@ ParseMusic:
ld [hli], a ; bank
ret
-
RestoreVolume:
; ch5 only
ld a, [wCurChannel]
@@ -1275,7 +1260,6 @@ RestoreVolume:
ld [wSFXPriority], a
ret
-
ParseSFXOrRest:
; turn noise sampling on
ld hl, CHANNEL_NOTE_FLAGS
@@ -1306,7 +1290,6 @@ ParseSFXOrRest:
ld [hl], a
ret
-
GetNoiseSample:
; load ptr to sample header in wNoiseSampleAddress
; are we on the last channel?
@@ -1363,7 +1346,6 @@ GetNoiseSample:
ld [wNoiseSampleDelay], a
ret
-
ParseMusicCommand:
; reload command
ld a, [wCurMusicByte]
@@ -1381,7 +1363,6 @@ ParseMusicCommand:
ld l, a
jp hl
-
MusicCommands:
; entries correspond to macros/sound.asm enumeration
dw Music_Octave8 ; octave 8
@@ -1443,7 +1424,6 @@ MusicF7:
MusicF8:
ret
-
Music_EndChannel:
; called when $ff is encountered w/ subroutine flag set
; end music stream
@@ -1465,7 +1445,6 @@ Music_EndChannel:
ld [hl], d
ret
-
Music_CallChannel:
; call music stream (subroutine)
; parameters: ll hh ; pointer to subroutine
@@ -1499,7 +1478,6 @@ Music_CallChannel:
set SOUND_SUBROUTINE, [hl]
ret
-
Music_JumpChannel:
; jump
; parameters: ll hh ; pointer
@@ -1515,7 +1493,6 @@ Music_JumpChannel:
ld [hl], d
ret
-
Music_LoopChannel:
; loops xx - 1 times
; 00: infinite
@@ -1577,7 +1554,6 @@ Music_LoopChannel:
ld [hl], e
ret
-
Music_SetCondition:
; set condition for a jump
; used with FB
@@ -1591,7 +1567,6 @@ Music_SetCondition:
ld [hl], a
ret
-
Music_JumpIf:
; conditional jump
; used with FA
@@ -1638,7 +1613,6 @@ Music_JumpIf:
ld [hl], d
ret
-
MusicEE
; conditional jump
; checks a byte in ram corresponding to the current channel
@@ -1691,7 +1665,6 @@ MusicEE
ld [hl], d
ret
-
MusicF9:
; sets some flag
; seems to be unused
@@ -1700,7 +1673,6 @@ MusicF9:
ld [wc2b5], a
ret
-
MusicE2:
; seems to have been dummied out
; params: 1
@@ -1713,7 +1685,6 @@ MusicE2:
set SOUND_UNKN_0B, [hl]
ret
-
Music_Vibrato:
; vibrato
; params: 2
@@ -1769,7 +1740,6 @@ Music_Vibrato:
ld [hl], a
ret
-
Music_SlidePitchTo:
; set the target for pitch wheel
; params: 2
@@ -1801,7 +1771,6 @@ Music_SlidePitchTo:
set SOUND_PITCH_WHEEL, [hl]
ret
-
Music_Tone:
; tone
; params: 1 (dw)
@@ -1816,7 +1785,6 @@ Music_Tone:
ld [hl], a
ret
-
MusicE7:
; unused
; params: 1
@@ -1829,7 +1797,6 @@ MusicE7:
ld [hl], a
ret
-
Music_SoundDuty:
; sequence of 4 duty cycles to be looped
; params: 1 (4 2-bit duty cycle arguments)
@@ -1850,7 +1817,6 @@ Music_SoundDuty:
ld [hl], a
ret
-
MusicE8:
; unused
; params: 1
@@ -1863,7 +1829,6 @@ MusicE8:
ld [hl], a
ret
-
Music_ToggleSFX:
; toggle something
; params: none
@@ -1878,7 +1843,6 @@ Music_ToggleSFX:
set SOUND_SFX, [hl]
ret
-
Music_ToggleNoise:
; toggle music noise sampling
; can't be used as a straight toggle since the param is not read from on->off
@@ -1901,7 +1865,6 @@ Music_ToggleNoise:
ld [wMusicNoiseSampleSet], a
ret
-
Music_SFXToggleNoise:
; toggle sfx noise sampling
; params:
@@ -1923,7 +1886,6 @@ Music_SFXToggleNoise:
ld [wSFXNoiseSampleSet], a
ret
-
Music_NoteType:
; note length
; # frames per 16th note
@@ -1942,7 +1904,6 @@ Music_NoteType:
call Music_Intensity
ret
-
Music_SoundStatus:
; update sound status
; params: 1
@@ -1953,7 +1914,6 @@ Music_SoundStatus:
set NOTE_UNKN_3, [hl]
ret
-
Music_DutyCycle:
; duty cycle
; params: 1
@@ -1966,7 +1926,6 @@ Music_DutyCycle:
ld [hl], a
ret
-
Music_Intensity:
; intensity
; params: 1
@@ -1978,7 +1937,6 @@ Music_Intensity:
ld [hl], a
ret
-
Music_Tempo:
; global tempo
; params: 2
@@ -1990,7 +1948,6 @@ Music_Tempo:
call SetGlobalTempo
ret
-
Music_Octave8:
Music_Octave7:
Music_Octave6:
@@ -2007,7 +1964,6 @@ Music_Octave1:
ld [hl], a
ret
-
Music_ForceOctave:
; set starting octave
; this forces all notes up by the starting octave
@@ -2018,7 +1974,6 @@ Music_ForceOctave:
ld [hl], a
ret
-
Music_StereoPanning:
; stereo panning
; params: 1
@@ -2030,7 +1985,6 @@ Music_StereoPanning:
call GetMusicByte
ret
-
Music_Panning:
; force panning
; params: 1
@@ -2042,7 +1996,6 @@ Music_Panning:
ld [hl], a
ret
-
Music_Volume:
; set volume
; params: 1
@@ -2059,7 +2012,6 @@ Music_Volume:
ld [wVolume], a
ret
-
Music_TempoRelative:
; set global tempo to current channel tempo +/- param
; params: 1 signed
@@ -2086,7 +2038,6 @@ Music_TempoRelative:
call SetGlobalTempo
ret
-
Music_SFXPriorityOn:
; turn sfx priority on
; params: none
@@ -2094,7 +2045,6 @@ Music_SFXPriorityOn:
ld [wSFXPriority], a
ret
-
Music_SFXPriorityOff:
; turn sfx priority off
; params: none
@@ -2102,7 +2052,6 @@ Music_SFXPriorityOff:
ld [wSFXPriority], a
ret
-
Music_RestartChannel:
; restart current channel from channel header (same bank)
; params: 2 (5)
@@ -2137,7 +2086,6 @@ Music_RestartChannel:
pop bc ; restore current channel
ret
-
Music_NewSong:
; new song
; params: 2
@@ -2151,7 +2099,6 @@ Music_NewSong:
pop bc
ret
-
GetMusicByte:
; returns byte from current address in a
; advances to next byte in music data
@@ -2184,7 +2131,6 @@ GetMusicByte:
ld a, [wCurMusicByte]
ret
-
GetFrequency:
; generate frequency
; input:
@@ -2237,7 +2183,6 @@ GetFrequency:
ld d, a
ret
-
SetNoteDuration:
; input: a = note duration in 16ths
; store delay units in de
@@ -2277,7 +2222,6 @@ SetNoteDuration:
ld [hl], d
ret
-
.Multiply:
; multiplies a and de
; adds the result to l
@@ -2299,7 +2243,6 @@ SetNoteDuration:
jr nz, .loop
ret
-
SetGlobalTempo:
push bc ; save current channel
; are we dealing with music or sfx?
@@ -2329,7 +2272,6 @@ SetGlobalTempo:
pop bc ; restore current channel
ret
-
Tempo:
; input:
; de: note length
@@ -2346,7 +2288,6 @@ Tempo:
ld [hl], a
ret
-
StartChannel:
call SetLRTracks
ld hl, CHANNEL_FLAGS1
@@ -2354,7 +2295,6 @@ StartChannel:
set SOUND_CHANNEL_ON, [hl] ; turn channel on
ret
-
SetLRTracks:
; set tracks for a the current channel to default
; seems to be redundant since this is overwritten by stereo data later
@@ -2375,7 +2315,6 @@ SetLRTracks:
pop de
ret
-
_PlayMusic::
; load music
call MusicOff
@@ -2418,7 +2357,6 @@ _PlayMusic::
call MusicOn
ret
-
_PlayCry::
; Play cry de using parameters:
; wCryPitch
@@ -2530,7 +2468,6 @@ _PlayCry::
call MusicOn
ret
-
_PlaySFX::
; clear channels if they aren't already
call MusicOff
@@ -2630,7 +2567,6 @@ _PlaySFX::
ld [wSFXPriority], a
ret
-
PlayStereoSFX::
; play sfx de
@@ -2732,7 +2668,6 @@ PlayStereoSFX::
call MusicOn
ret
-
LoadChannel:
; prep channel for use
; input:
@@ -2777,7 +2712,6 @@ LoadChannel:
ld [hl], a
ret
-
ChannelInit:
; make sure channel is cleared
; set default tempo and note length in case nothing is loaded
@@ -2808,7 +2742,6 @@ ChannelInit:
pop de
ret
-
LoadMusicByte::
; input:
; de = current music address
@@ -2819,15 +2752,12 @@ LoadMusicByte::
ld a, [wCurMusicByte]
ret
-
-
INCLUDE "audio/notes.asm"
INCLUDE "audio/wave_samples.asm"
INCLUDE "audio/drumkits.asm"
-
GetLRTracks:
; gets the default sound l/r channels
; stores mono/stereo table in hl
@@ -2842,7 +2772,6 @@ GetLRTracks:
ld hl, StereoTracks
ret
-
MonoTracks:
; bit corresponds to track #
; hi: left channel
@@ -2883,7 +2812,6 @@ ClearChannels::
jr nz, .loop
ret
-
ClearChannel:
; input: hl = beginning hw sound register (rNR10, rNR20, rNR30, rNR40)
; output: 00 00 80 00 80
@@ -2901,7 +2829,6 @@ ClearChannel:
ld [hli], a ; rNR14, rNR24, rNR34, rNR44 ; restart sound (freq hi = 0)
ret
-
PlayTrainerEncounterMusic::
; input: e = trainer type
; turn fade off
diff --git a/audio/music/magnettrain.asm b/audio/music/magnettrain.asm
index 1452d606f..fd4229cb4 100644
--- a/audio/music/magnettrain.asm
+++ b/audio/music/magnettrain.asm
@@ -245,7 +245,6 @@ Music_MagnetTrain_Ch4:
note B_, 16
endchannel
-
; unused
Music_MagnetTrain_branch_ef711:
note G#, 1
@@ -262,7 +261,6 @@ Music_MagnetTrain_branch_ef711:
note G_, 1
endchannel
-
Music_MagnetTrain_branch_ef71e:
note G#, 2
note G_, 2
diff --git a/audio/music_pointers.asm b/audio/music_pointers.asm
index e09d1d21a..192962735 100644
--- a/audio/music_pointers.asm
+++ b/audio/music_pointers.asm
@@ -2,7 +2,6 @@
Music:
; entries correspond to MUSIC_* constants
-
dba Music_Nothing
dba Music_TitleScreen
dba Music_Route1
@@ -96,9 +95,7 @@ Music:
dba Music_LakeOfRageRocketRadio
dba Music_Printer
dba Music_PostCredits
-
-; Crystal adds the following songs:
-
+; new to Crystal
dba Music_Clair
dba Music_MobileAdapterMenu
dba Music_MobileAdapter
diff --git a/audio/sfx_pointers.asm b/audio/sfx_pointers.asm
index c607e9cae..7ab55649b 100644
--- a/audio/sfx_pointers.asm
+++ b/audio/sfx_pointers.asm
@@ -1,6 +1,5 @@
SFX:
; entries correspond to SFX_* constants
-
dba Sfx_DexFanfare5079
dba Sfx_Item
dba Sfx_CaughtMon
@@ -191,9 +190,7 @@ SFX:
dba Sfx_2Boops
dba Sfx_GlassTing
dba Sfx_GlassTing2
-
-; Crystal adds the following SFX:
-
+; new to Crystal
dba Sfx_IntroUnown1
dba Sfx_IntroUnown2
dba Sfx_IntroUnown3
diff --git a/constants/collision_constants.asm b/constants/collision_constants.asm
index 86fdf9384..b693dc8f8 100644
--- a/constants/collision_constants.asm
+++ b/constants/collision_constants.asm
@@ -113,3 +113,5 @@ HI_NYBBLE_WALK EQU $40
HI_NYBBLE_WALK_ALT EQU $50
HI_NYBBLE_WARPS EQU $70
HI_NYBBLE_LEDGES EQU $a0
+HI_NYBBLE_SIDE_WALLS EQU $b0
+HI_NYBBLE_UNUSED_C0 EQU $c0
diff --git a/constants/gfx_constants.asm b/constants/gfx_constants.asm
index 0da273f89..41a67a648 100644
--- a/constants/gfx_constants.asm
+++ b/constants/gfx_constants.asm
@@ -8,7 +8,6 @@ PALETTE_SIZE EQU NUM_PAL_COLORS * PAL_COLOR_SIZE
PALRGB_WHITE EQUS "palred 31 + palgreen 31 + palblue 31" ; $7fff
-
SCREEN_WIDTH EQU 20 ; tiles
SCREEN_HEIGHT EQU 18 ; tiles
SCREEN_WIDTH_PX EQU SCREEN_WIDTH * TILE_WIDTH ; pixels
@@ -23,7 +22,6 @@ SCREEN_META_HEIGHT EQU 5 ; metatiles
SURROUNDING_WIDTH EQU SCREEN_META_WIDTH * METATILE_WIDTH ; tiles
SURROUNDING_HEIGHT EQU SCREEN_META_HEIGHT * METATILE_WIDTH ; tiles
-
HP_BAR_LENGTH EQU 6 ; tiles
EXP_BAR_LENGTH EQU 8 ; tiles
HP_BAR_LENGTH_PX EQU HP_BAR_LENGTH * TILE_WIDTH ; pixels
@@ -34,7 +32,6 @@ HP_GREEN EQU 0
HP_YELLOW EQU 1
HP_RED EQU 2
-
; sprite_oam_struct members (see macros/wram.asm)
const_def
const SPRITEOAMSTRUCT_YCOORD ; 0
@@ -44,7 +41,6 @@ HP_RED EQU 2
SPRITEOAMSTRUCT_LENGTH EQU const_value
NUM_SPRITE_OAM_STRUCTS EQU 40 ; see wVirtualOAM
-
; PokeAnims indexes (see engine/gfx/pic_animation.asm)
const_def
const ANIM_MON_SLOW
diff --git a/constants/item_data_constants.asm b/constants/item_data_constants.asm
index 9d463d7d4..5040ab047 100644
--- a/constants/item_data_constants.asm
+++ b/constants/item_data_constants.asm
@@ -32,7 +32,6 @@ NO_LIMITS EQU 0
CANT_SELECT EQU 1 << CANT_SELECT_F
CANT_TOSS EQU 1 << CANT_TOSS_F
-
; pack pockets
const_def
const ITEM_POCKET ; 0
@@ -46,14 +45,12 @@ MAX_BALLS EQU 12
MAX_KEY_ITEMS EQU 25
MAX_PC_ITEMS EQU 50
-
; mail
MAIL_LINE_LENGTH EQU $10
MAIL_MSG_LENGTH EQU $20
MAILBOX_CAPACITY EQU 10
MAIL_STRUCT_LENGTH EQU $2f ; mailmsg struct
-
; held item effects
const_def
const HELD_NONE
diff --git a/constants/landmark_constants.asm b/constants/landmark_constants.asm
index 5f74b3386..a07af44f8 100644
--- a/constants/landmark_constants.asm
+++ b/constants/landmark_constants.asm
@@ -105,7 +105,6 @@ KANTO_LANDMARK EQU const_value
GIFT_LOCATION EQU $7e
EVENT_LOCATION EQU $7f
-
; Regions
const_def
const JOHTO_REGION ; 0
diff --git a/constants/map_data_constants.asm b/constants/map_data_constants.asm
index 9a160a2fa..5098e28df 100644
--- a/constants/map_data_constants.asm
+++ b/constants/map_data_constants.asm
@@ -3,7 +3,6 @@ MAP_N_A EQU -1
GROUP_NONE EQU 0
MAP_NONE EQU 0
-
; map struct members (see data/maps/maps.asm)
const_def
const MAP_MAPATTRIBUTES_BANK ; 0
@@ -51,7 +50,6 @@ MAP_NONE EQU 0
const FISHGROUP_REMORAID
const FISHGROUP_QWILFISH_NO_SWARM
-
; connection directions (see data/maps/data.asm)
const_def
const EAST_F
@@ -66,7 +64,6 @@ MAP_NONE EQU 0
shift_const SOUTH
shift_const NORTH
-
; SpawnPoints indexes (see data/maps/spawn_points.asm)
const_value = -1
const SPAWN_N_A
@@ -102,7 +99,6 @@ const_value = -1
const SPAWN_FAST_SHIP
NUM_SPAWNS EQU const_value
-
; outdoor sprite limits (see engine/overworld/overworld.asm)
MAX_OUTDOOR_SPRITES EQU 23
SPRITE_GFX_LIST_CAPACITY EQU $20
diff --git a/constants/map_object_constants.asm b/constants/map_object_constants.asm
index ee0b21356..55a3f358b 100644
--- a/constants/map_object_constants.asm
+++ b/constants/map_object_constants.asm
@@ -126,7 +126,6 @@ NUM_SPRITEMOVEDATA_FIELDS EQU const_value
MAPOBJECT_SCREEN_WIDTH EQU (SCREEN_WIDTH / 2) + 2
MAPOBJECT_SCREEN_HEIGHT EQU (SCREEN_HEIGHT / 2) + 2
-
; SpriteMovementData indexes (see data/sprites/map_objects.asm)
const_def
const SPRITEMOVEDATA_00 ; 00
@@ -283,7 +282,6 @@ NUM_SPRITEMOVEDATA EQU const_value
const FACING_GRASS_1 ; 1e
const FACING_GRASS_2 ; 1f
-
; DoPlayerMovement.DoStep arguments (see engine/overworld/player_movement.asm)
const_def
const STEP_SLOW ; 0
diff --git a/constants/menu_constants.asm b/constants/menu_constants.asm
index 46c65474d..7c5f23377 100644
--- a/constants/menu_constants.asm
+++ b/constants/menu_constants.asm
@@ -32,7 +32,6 @@
shift_const SCROLLINGMENU_ENABLE_START
shift_const SCROLLINGMENU_ENABLE_SELECT
-
; MonMenuOptions indexes (see data/mon_menu.asm)
; used by PokemonActionSubmenu (see engine/menus/start_menu.asm)
const_def 1
@@ -70,7 +69,6 @@ NUM_MONMENU_ITEMS EQU 8
HMENURETURN_SCRIPT EQU %10000000
HMENURETURN_ASM EQU %11111111
-
; PartyMenuQualityPointers indexes (see data/party_menu_qualities.asm)
const_def
const PARTYMENUACTION_CHOOSE_POKEMON
diff --git a/constants/pokemon_data_constants.asm b/constants/pokemon_data_constants.asm
index 379546c45..1aedf20cb 100644
--- a/constants/pokemon_data_constants.asm
+++ b/constants/pokemon_data_constants.asm
@@ -62,11 +62,9 @@ GENDER_UNKNOWN EQU -1
const EGG_DRAGON ; e
const EGG_NONE ; f (Undiscovered)
-
; pokedex entries (see data/pokemon/dex_entries.asm)
NUM_DEX_ENTRY_BANKS EQU 4
-
; party_struct members (see macros/wram.asm)
MON_SPECIES EQUS "(wPartyMon1Species - wPartyMon1)"
MON_ITEM EQUS "(wPartyMon1Item - wPartyMon1)"
@@ -101,7 +99,6 @@ BOXMON_STRUCT_LENGTH EQUS "(wPartyMon1End - wPartyMon1)"
PARTYMON_STRUCT_LENGTH EQUS "(wPartyMon1StatsEnd - wPartyMon1)"
REDMON_STRUCT_LENGTH EQU 44
-
; caught data
CAUGHT_TIME_MASK EQU %11000000
@@ -116,7 +113,6 @@ CAUGHT_BY_BOY EQU 2
CAUGHT_EGG_LEVEL EQU 1
-
; maximum number of party pokemon
PARTY_LENGTH EQU 6
@@ -129,7 +125,6 @@ HOF_MON_LENGTH = 1 + 2 + 2 + 1 + (MON_NAME_LENGTH + -1) ; species, id, dvs, leve
HOF_LENGTH = 1 + HOF_MON_LENGTH * PARTY_LENGTH + 1 ; win count, party, terminator
NUM_HOF_TEAMS = 30
-
; evolution types (used in data/pokemon/evos_attacks.asm)
const_def 1
const EVOLVE_LEVEL
@@ -150,7 +145,6 @@ NUM_HOF_TEAMS = 30
const ATK_LT_DEF
const ATK_EQ_DEF
-
; wild data
NUM_GRASSMON EQU 7 ; data/wild/*_grass.asm table size
@@ -162,7 +156,6 @@ FISHGROUP_DATA_LENGTH EQU 1 + 2 * 3
NUM_ROAMMON_MAPS EQU 16 ; RoamMaps table size (see data/wild/roammon_maps.asm)
-
; treemon sets
; TreeMons indexes (see data/wild/treemons.asm)
const_def
@@ -182,7 +175,6 @@ NUM_TREEMON_SETS EQU const_value
const TREEMON_SCORE_GOOD ; 1
const TREEMON_SCORE_RARE ; 2
-
; ChangeHappiness arguments (see data/happiness_changes.asm)
const_value = 1
const HAPPINESS_GAINLEVEL ; 01
@@ -212,7 +204,6 @@ HAPPINESS_TO_EVOLVE EQU 220
HAPPINESS_THRESHOLD_1 EQU 100
HAPPINESS_THRESHOLD_2 EQU 200
-
; PP
PP_UP_MASK EQU %11000000
PP_UP_ONE EQU %01000000
diff --git a/constants/script_constants.asm b/constants/script_constants.asm
index 3b9220095..35f988c4e 100644
--- a/constants/script_constants.asm
+++ b/constants/script_constants.asm
@@ -2,7 +2,6 @@
PLAYER EQU 0
LAST_TALKED EQU -2
-
; memory constants
const_def
const MEM_BUFFER_0 ; use wStringBuffer3
@@ -10,7 +9,6 @@ LAST_TALKED EQU -2
const MEM_BUFFER_2 ; use wStringBuffer5
NUM_MEM_BUFFERS EQU const_value
-
; checkmoney/takemoney accounts
const_def
const YOUR_MONEY ; 0
@@ -36,7 +34,6 @@ NUM_MEM_BUFFERS EQU const_value
const PHONE_CONTACTS_FULL ; 1
const PHONE_CONTACT_REFUSED ; 2
-
; writecode/checkcode arguments
; _GetVarAction.VarActionTable indexes (see engine/overworld/variables.asm)
const_def
@@ -74,7 +71,6 @@ RETVAR_STRBUF2 EQU (0 << 6)
RETVAR_ADDR_DE EQU (1 << 6)
RETVAR_EXECUTE EQU (2 << 6)
-
; PlayerEventScriptPointers indexes (see engine/overworld/events.asm)
const_def -1
const PLAYEREVENT_MAPSCRIPT
@@ -90,7 +86,6 @@ RETVAR_EXECUTE EQU (2 << 6)
const PLAYEREVENT_JOYCHANGEFACING
NUM_PLAYER_EVENTS EQU const_value
-
; bg_event types
; TryBGEvent arguments (see engine/overworld/events.asm)
const_def
@@ -115,7 +110,6 @@ NUM_PLAYER_EVENTS EQU const_value
const OBJECTTYPE_5
const OBJECTTYPE_6
-
; command queue members
CMDQUEUE_TYPE EQU 0
CMDQUEUE_ADDR EQU 1
@@ -128,7 +122,6 @@ CMDQUEUE_CAPACITY EQU 4
; command queue types
CMDQUEUE_STONETABLE EQU 2
-
; elevfloor macro values
; ElevatorFloorNames indexes (see data/events/elevator_floors.asm)
const_def
@@ -149,7 +142,6 @@ CMDQUEUE_STONETABLE EQU 2
const FLOOR_11F
const FLOOR_ROOF
-
; showemote arguments
; Emotes indexes (see data/sprites/emotes.asm)
const_def
@@ -217,7 +209,6 @@ NUM_FRUIT_TREES EQU const_value + -1
const SWARM_DUNSPARCE ; 0
const SWARM_YANMA ; 1
-
; ActivateFishingSwarm writebyte arguments
const_def
const FISHSWARM_NONE ; 0
diff --git a/data/battle_anims/framesets.asm b/data/battle_anims/framesets.asm
index 35cb3e5a8..e0fe57007 100644
--- a/data/battle_anims/framesets.asm
+++ b/data/battle_anims/framesets.asm
@@ -1266,4 +1266,3 @@ BattleAnimFrameData:
.Frameset_b8:
frame BATTLEANIMOAMSET_D7, 8
endanim
-
diff --git a/data/battle_tower/parties.asm b/data/battle_tower/parties.asm
index e4e8f151a..15b7cdc4e 100644
--- a/data/battle_tower/parties.asm
+++ b/data/battle_tower/parties.asm
@@ -1,7 +1,6 @@
BattleTowerMons:
; 10 groups of 21 mons.
-
BattleTowerMons1:
db JOLTEON
@@ -30,7 +29,6 @@ BattleTowerMons1:
bigdw 31 ; SDef
db "SANDA-SU@@@"
-
db ESPEON
db LEFTOVERS
db MUD_SLAP, PSYCHIC_M, PSYCH_UP, TOXIC
@@ -57,7 +55,6 @@ BattleTowerMons1:
bigdw 31 ; SDef
db "E-HUi@@@@@@"
-
db UMBREON
db GOLD_BERRY
db SHADOW_BALL, IRON_TAIL, PSYCH_UP, TOXIC
@@ -84,7 +81,6 @@ BattleTowerMons1:
bigdw 39 ; SDef
db "BURAtuKI-@@"
-
db WOBBUFFET
db FOCUS_BAND
db COUNTER, MIRROR_COAT, SAFEGUARD, DESTINY_BOND
@@ -111,7 +107,6 @@ BattleTowerMons1:
bigdw 23 ; SDef
db "SO-NANSU@@@"
-
db KANGASKHAN
db MIRACLEBERRY
db REVERSAL, HYPER_BEAM, EARTHQUAKE, ATTRACT
@@ -138,7 +133,6 @@ BattleTowerMons1:
bigdw 28 ; SDef
db "GARU-RA@@@@"
-
db CORSOLA
db SCOPE_LENS
db SURF, PSYCHIC_M, RECOVER, ANCIENTPOWER
@@ -165,7 +159,6 @@ BattleTowerMons1:
bigdw 28 ; SDef
db "SANI-GO@@@@"
-
db MILTANK
db GOLD_BERRY
db BLIZZARD, EARTHQUAKE, HYPER_BEAM, TOXIC
@@ -192,7 +185,6 @@ BattleTowerMons1:
bigdw 26 ; SDef
db "MIRUTANKU@@"
-
db AERODACTYL
db LEFTOVERS
db HYPER_BEAM, SUPERSONIC, EARTHQUAKE, BITE
@@ -219,7 +211,6 @@ BattleTowerMons1:
bigdw 26 ; SDef
db "PUTERA@@@@@"
-
db LAPRAS
db MIRACLEBERRY
db BLIZZARD, SURF, THUNDERBOLT, PSYCHIC_M
@@ -246,7 +237,6 @@ BattleTowerMons1:
bigdw 30 ; SDef
db "RAPURASU@@@"
-
db SNEASEL
db GOLD_BERRY
db SLASH, FAINT_ATTACK, SURF, BLIZZARD
@@ -273,7 +263,6 @@ BattleTowerMons1:
bigdw 27 ; SDef
db "NIyu-RA@@@@"
-
db PORYGON2
db BRIGHTPOWDER
db PSYCHIC_M, BLIZZARD, HYPER_BEAM, TRI_ATTACK
@@ -300,7 +289,6 @@ BattleTowerMons1:
bigdw 31 ; SDef
db "PORIGON2@@@"
-
db MISDREAVUS
db FOCUS_BAND
db PERISH_SONG, MEAN_LOOK, PAIN_SPLIT, SHADOW_BALL
@@ -327,7 +315,6 @@ BattleTowerMons1:
bigdw 29 ; SDef
db "MUUMA@@@@@@"
-
db HOUNDOUR
db GOLD_BERRY
db FAINT_ATTACK, SOLARBEAM, ROAR, SUNNY_DAY
@@ -354,7 +341,6 @@ BattleTowerMons1:
bigdw 22 ; SDef
db "DERUBIRU@@@"
-
db GIRAFARIG
db KINGS_ROCK
db PSYBEAM, MUD_SLAP, SHADOW_BALL, AGILITY
@@ -381,7 +367,6 @@ BattleTowerMons1:
bigdw 24 ; SDef
db "KIRINRIKI@@"
-
db BLISSEY
db QUICK_CLAW
db HEADBUTT, SOLARBEAM, ROLLOUT, STRENGTH
@@ -408,7 +393,6 @@ BattleTowerMons1:
bigdw 39 ; SDef
db "HAPINASU@@@"
-
db SNORLAX
db MIRACLEBERRY
db HEADBUTT, PROTECT, SNORE, SURF
@@ -435,7 +419,6 @@ BattleTowerMons1:
bigdw 32 ; SDef
db "KABIGON@@@@"
-
db EXEGGUTOR
db KINGS_ROCK
db TOXIC, GIGA_DRAIN, THIEF, CONFUSION
@@ -462,7 +445,6 @@ BattleTowerMons1:
bigdw 25 ; SDef
db "NAtuSI-@@@@"
-
db HERACROSS
db GOLD_BERRY
db REVERSAL, ENDURE, COUNTER, ROCK_SMASH
@@ -489,7 +471,6 @@ BattleTowerMons1:
bigdw 29 ; SDef
db "HERAKUROSU@"
-
db UNOWN
db BERRY
db HIDDEN_POWER, 0, 0, 0
@@ -516,7 +497,6 @@ BattleTowerMons1:
bigdw 21 ; SDef
db "ANNO-N@@@@@"
-
db TAUROS
db KINGS_ROCK
db HEADBUTT, SWAGGER, TAIL_WHIP, ICY_WIND
@@ -543,7 +523,6 @@ BattleTowerMons1:
bigdw 24 ; SDef
db "KENTAROSU@@"
-
db MR__MIME
db QUICK_CLAW
db TOXIC, PSYCH_UP, FIRE_PUNCH, HEADBUTT
@@ -571,8 +550,6 @@ BattleTowerMons1:
db "BARIYA-DO@@"
-
-
BattleTowerMons2:
db UMBREON
@@ -601,7 +578,6 @@ BattleTowerMons2:
bigdw 72 ; SDef
db "BURAtuKI-@@"
-
db STARMIE
db GOLD_BERRY
db RECOVER, PSYCHIC_M, SURF, PSYCH_UP
@@ -628,7 +604,6 @@ BattleTowerMons2:
bigdw 54 ; SDef
db "SUTA-MI-@@@"
-
db GYARADOS
db MIRACLEBERRY
db HYPER_BEAM, DRAGON_RAGE, THUNDERBOLT, FIRE_BLAST
@@ -655,7 +630,6 @@ BattleTowerMons2:
bigdw 61 ; SDef
db "GIyaRADOSU@"
-
db STEELIX
db GOLD_BERRY
db ROAR, IRON_TAIL, SWAGGER, EARTHQUAKE
@@ -682,7 +656,6 @@ BattleTowerMons2:
bigdw 48 ; SDef
db "HAGANE-RU@@"
-
db ALAKAZAM
db BERRY_JUICE
db PSYCHIC_M, PSYCH_UP, TOXIC, THUNDERPUNCH
@@ -709,7 +682,6 @@ BattleTowerMons2:
bigdw 55 ; SDef
db "HU-DEiN@@@@"
-
db ARCANINE
db BRIGHTPOWDER
db FLAMETHROWER, ROAR, HYPER_BEAM, IRON_TAIL
@@ -736,7 +708,6 @@ BattleTowerMons2:
bigdw 52 ; SDef
db "UINDEi@@@@@"
-
db HERACROSS
db FOCUS_BAND
db ENDURE, REVERSAL, MEGAHORN, EARTHQUAKE
@@ -763,7 +734,6 @@ BattleTowerMons2:
bigdw 59 ; SDef
db "HERAKUROSU@"
-
db EXEGGUTOR
db LEFTOVERS
db HYPER_BEAM, PSYCHIC_M, TOXIC, DREAM_EATER
@@ -790,7 +760,6 @@ BattleTowerMons2:
bigdw 46 ; SDef
db "NAtuSI-@@@@"
-
db AERODACTYL
db GOLD_BERRY
db REST, HYPER_BEAM, EARTHQUAKE, DRAGON_RAGE
@@ -817,7 +786,6 @@ BattleTowerMons2:
bigdw 50 ; SDef
db "PUTERA@@@@@"
-
db BLISSEY
db BRIGHTPOWDER
db PSYCHIC_M, SUBMISSION, SOFTBOILED, COUNTER
@@ -844,7 +812,6 @@ BattleTowerMons2:
bigdw 75 ; SDef
db "HAPINASU@@@"
-
db LAPRAS
db GOLD_BERRY
db PSYCHIC_M, THUNDERBOLT, BLIZZARD, CONFUSE_RAY
@@ -871,7 +838,6 @@ BattleTowerMons2:
bigdw 54 ; SDef
db "RAPURASU@@@"
-
db PIKACHU
db LIGHT_BALL
db THUNDERBOLT, THUNDER_WAVE, STRENGTH, TOXIC
@@ -898,7 +864,6 @@ BattleTowerMons2:
bigdw 37 ; SDef
db "PIKATIyuU@@"
-
db SCIZOR
db FOCUS_BAND
db STEEL_WING, SLASH, TOXIC, SANDSTORM
@@ -925,7 +890,6 @@ BattleTowerMons2:
bigdw 53 ; SDef
db "HAtuSAMU@@@"
-
db HITMONCHAN
db GOLD_BERRY
db THUNDERPUNCH, ICE_PUNCH, FIRE_PUNCH, MEGA_PUNCH
@@ -952,7 +916,6 @@ BattleTowerMons2:
bigdw 62 ; SDef
db "EBIWARA-@@@"
-
db TAUROS
db BRIGHTPOWDER
db THUNDERBOLT, EARTHQUAKE, HYPER_BEAM, BLIZZARD
@@ -979,7 +942,6 @@ BattleTowerMons2:
bigdw 47 ; SDef
db "KENTAROSU@@"
-
db AZUMARILL
db MYSTIC_WATER
db SURF, BLIZZARD, ATTRACT, RAIN_DANCE
@@ -1006,7 +968,6 @@ BattleTowerMons2:
bigdw 49 ; SDef
db "MARIRURI@@@"
-
db MILTANK
db KINGS_ROCK
db EARTHQUAKE, THUNDER, ATTRACT, SURF
@@ -1033,7 +994,6 @@ BattleTowerMons2:
bigdw 48 ; SDef
db "MIRUTANKU@@"
-
db WIGGLYTUFF
db GOLD_BERRY
db HYPER_BEAM, BLIZZARD, FIRE_BLAST, ATTRACT
@@ -1060,7 +1020,6 @@ BattleTowerMons2:
bigdw 40 ; SDef
db "PUKURIN@@@@"
-
db WIGGLYTUFF
db PINK_BOW
db PSYCHIC_M, SWAGGER, PSYCH_UP, HEADBUTT
@@ -1087,7 +1046,6 @@ BattleTowerMons2:
bigdw 36 ; SDef
db "PUKURIN@@@@"
-
db NIDOKING
db BERRY
db BLIZZARD, EARTHQUAKE, SURF, THUNDERPUNCH
@@ -1114,7 +1072,6 @@ BattleTowerMons2:
bigdw 46 ; SDef
db "NIDOKINGU@@"
-
db QUAGSIRE
db QUICK_CLAW
db AMNESIA, EARTHQUAKE, SURF, RAIN_DANCE
@@ -1142,8 +1099,6 @@ BattleTowerMons2:
db "NUO-@@@@@@@"
-
-
BattleTowerMons3:
db JOLTEON
@@ -1172,7 +1127,6 @@ BattleTowerMons3:
bigdw 87 ; SDef
db "SANDA-SU@@@"
-
db POLIWRATH
db BRIGHTPOWDER
db DOUBLE_TEAM, SURF, FISSURE, SUBMISSION
@@ -1199,7 +1153,6 @@ BattleTowerMons3:
bigdw 82 ; SDef
db "NIyoROBON@@"
-
db STARMIE
db LEFTOVERS
db THUNDER_WAVE, PSYCHIC_M, RECOVER, SURF
@@ -1226,7 +1179,6 @@ BattleTowerMons3:
bigdw 81 ; SDef
db "SUTA-MI-@@@"
-
db JYNX
db GOLD_BERRY
db BLIZZARD, LOVELY_KISS, DREAM_EATER, ATTRACT
@@ -1253,7 +1205,6 @@ BattleTowerMons3:
bigdw 86 ; SDef
db "RU-ZIyuRA@@"
-
db DUGTRIO
db KINGS_ROCK
db EARTHQUAKE, SLUDGE_BOMB, SLASH, MUD_SLAP
@@ -1280,7 +1231,6 @@ BattleTowerMons3:
bigdw 72 ; SDef
db "DAGUTORIO@@"
-
db BELLOSSOM
db BRIGHTPOWDER
db GIGA_DRAIN, SUNNY_DAY, SOLARBEAM, DOUBLE_TEAM
@@ -1307,7 +1257,6 @@ BattleTowerMons3:
bigdw 88 ; SDef
db "KIREIHANA@@"
-
db BLISSEY
db LEFTOVERS
db TOXIC, REFLECT, SOFTBOILED, PROTECT
@@ -1334,7 +1283,6 @@ BattleTowerMons3:
bigdw 109 ; SDef
db "HAPINASU@@@"
-
db HOUNDOOM
db CHARCOAL
db FLAMETHROWER, CRUNCH, SHADOW_BALL, DREAM_EATER
@@ -1361,7 +1309,6 @@ BattleTowerMons3:
bigdw 76 ; SDef
db "HERUGA-@@@@"
-
db MACHAMP
db MIRACLEBERRY
db CROSS_CHOP, ICE_PUNCH, EARTHQUAKE, FIRE_BLAST
@@ -1388,7 +1335,6 @@ BattleTowerMons3:
bigdw 80 ; SDef
db "KAIRIKI-@@@"
-
db CROBAT
db GOLD_BERRY
db ATTRACT, CONFUSE_RAY, TOXIC, WING_ATTACK
@@ -1415,7 +1361,6 @@ BattleTowerMons3:
bigdw 76 ; SDef
db "KUROBAtuTO@"
-
db PORYGON2
db BRIGHTPOWDER
db PSYCHIC_M, RECOVER, HYPER_BEAM, TRI_ATTACK
@@ -1442,7 +1387,6 @@ BattleTowerMons3:
bigdw 81 ; SDef
db "PORIGON2@@@"
-
db MAROWAK
db THICK_CLUB
db EARTHQUAKE, RETURN, HYPER_BEAM, BONEMERANG
@@ -1469,7 +1413,6 @@ BattleTowerMons3:
bigdw 72 ; SDef
db "GARAGARA@@@"
-
db ELECTRODE
db BRIGHTPOWDER
db LIGHT_SCREEN, THUNDERBOLT, PROTECT, THUNDER
@@ -1496,7 +1439,6 @@ BattleTowerMons3:
bigdw 78 ; SDef
db "MARUMAIN@@@"
-
db LAPRAS
db LEFTOVERS
db RAIN_DANCE, WATER_GUN, ICY_WIND, STRENGTH
@@ -1523,7 +1465,6 @@ BattleTowerMons3:
bigdw 81 ; SDef
db "RAPURASU@@@"
-
db LANTURN
db GOLD_BERRY
db RAIN_DANCE, THUNDER, SURF, FLAIL
@@ -1550,7 +1491,6 @@ BattleTowerMons3:
bigdw 70 ; SDef
db "RANTA-N@@@@"
-
db ESPEON
db MIRACLEBERRY
db CONFUSION, SWIFT, TOXIC, PSYCH_UP
@@ -1577,7 +1517,6 @@ BattleTowerMons3:
bigdw 82 ; SDef
db "E-HUi@@@@@@"
-
db TENTACRUEL
db KINGS_ROCK
db WRAP, TOXIC, SLUDGE_BOMB, BUBBLEBEAM
@@ -1604,7 +1543,6 @@ BattleTowerMons3:
bigdw 101 ; SDef
db "DOKUKURAGE@"
-
db GENGAR
db GOLD_BERRY
db THIEF, LICK, NIGHT_SHADE, GIGA_DRAIN
@@ -1631,7 +1569,6 @@ BattleTowerMons3:
bigdw 70 ; SDef
db "GENGA-@@@@@"
-
db URSARING
db GOLD_BERRY
db HEADBUTT, PROTECT, ROAR, LEER
@@ -1658,7 +1595,6 @@ BattleTowerMons3:
bigdw 65 ; SDef
db "RINGUMA@@@@"
-
db FEAROW
db BRIGHTPOWDER
db MIRROR_MOVE, PURSUIT, PECK, SWIFT
@@ -1685,7 +1621,6 @@ BattleTowerMons3:
bigdw 58 ; SDef
db "ONIDORIRU@@"
-
db PRIMEAPE
db MIRACLEBERRY
db LOW_KICK, KARATE_CHOP, REVERSAL, FOCUS_ENERGY
@@ -1713,8 +1648,6 @@ BattleTowerMons3:
db "OKORIZARU@@"
-
-
BattleTowerMons4:
db TAUROS
@@ -1743,7 +1676,6 @@ BattleTowerMons4:
bigdw 94 ; SDef
db "KENTAROSU@@"
-
db KINGDRA
db LEFTOVERS
db SURF, DRAGONBREATH, HYPER_BEAM, BLIZZARD
@@ -1770,7 +1702,6 @@ BattleTowerMons4:
bigdw 115 ; SDef
db "KINGUDORA@@"
-
db SNORLAX
db QUICK_CLAW
db ATTRACT, BODY_SLAM, PSYCH_UP, EARTHQUAKE
@@ -1797,7 +1728,6 @@ BattleTowerMons4:
bigdw 125 ; SDef
db "KABIGON@@@@"
-
db LAPRAS
db LEFTOVERS
db THUNDERBOLT, ICE_BEAM, CONFUSE_RAY, SURF
@@ -1824,7 +1754,6 @@ BattleTowerMons4:
bigdw 111 ; SDef
db "RAPURASU@@@"
-
db STEELIX
db GOLD_BERRY
db SANDSTORM, IRON_TAIL, EARTHQUAKE, TOXIC
@@ -1851,7 +1780,6 @@ BattleTowerMons4:
bigdw 87 ; SDef
db "HAGANE-RU@@"
-
db ALAKAZAM
db KINGS_ROCK
db PSYCHIC_M, THUNDERPUNCH, RECOVER, FIRE_PUNCH
@@ -1878,7 +1806,6 @@ BattleTowerMons4:
bigdw 107 ; SDef
db "HU-DEiN@@@@"
-
db STARMIE
db LEFTOVERS
db BLIZZARD, THUNDERBOLT, SURF, PSYCHIC_M
@@ -1905,7 +1832,6 @@ BattleTowerMons4:
bigdw 105 ; SDef
db "SUTA-MI-@@@"
-
db WOBBUFFET
db GOLD_BERRY
db COUNTER, MIRROR_COAT, SAFEGUARD, DESTINY_BOND
@@ -1932,7 +1858,6 @@ BattleTowerMons4:
bigdw 79 ; SDef
db "SO-NANSU@@@"
-
db GOLEM
db FOCUS_BAND
db EXPLOSION, EARTHQUAKE, MEGA_PUNCH, ROCK_SLIDE
@@ -1959,7 +1884,6 @@ BattleTowerMons4:
bigdw 88 ; SDef
db "GORO-NIya@@"
-
db SCIZOR
db SCOPE_LENS
db SLASH, STEEL_WING, PURSUIT, HYPER_BEAM
@@ -1986,7 +1910,6 @@ BattleTowerMons4:
bigdw 102 ; SDef
db "HAtuSAMU@@@"
-
db DUGTRIO
db KINGS_ROCK
db EARTHQUAKE, HYPER_BEAM, SLUDGE_BOMB, MUD_SLAP
@@ -2013,7 +1936,6 @@ BattleTowerMons4:
bigdw 91 ; SDef
db "DAGUTORIO@@"
-
db SLOWBRO
db MIRACLEBERRY
db SURF, PSYCHIC_M, EARTHQUAKE, BLIZZARD
@@ -2040,7 +1962,6 @@ BattleTowerMons4:
bigdw 103 ; SDef
db "YADORAN@@@@"
-
db PORYGON2
db NO_ITEM
db CONVERSION2, CONVERSION, PSYBEAM, THIEF
@@ -2067,7 +1988,6 @@ BattleTowerMons4:
bigdw 115 ; SDef
db "PORIGON2@@@"
-
db ARCANINE
db CHARCOAL
db FLAME_WHEEL, LEER, BODY_SLAM, ROAR
@@ -2094,7 +2014,6 @@ BattleTowerMons4:
bigdw 99 ; SDef
db "UINDEi@@@@@"
-
db FORRETRESS
db LEFTOVERS
db RAPID_SPIN, PROTECT, TOXIC, SANDSTORM
@@ -2121,7 +2040,6 @@ BattleTowerMons4:
bigdw 87 ; SDef
db "HUoRETOSU@@"
-
db OMASTAR
db GOLD_BERRY
db CURSE, WATER_GUN, ANCIENTPOWER, ROCK_SMASH
@@ -2148,7 +2066,6 @@ BattleTowerMons4:
bigdw 88 ; SDef
db "OMUSUTA-@@@"
-
db CHARIZARD
db KINGS_ROCK
db FIRE_SPIN, DRAGON_RAGE, FLY, SLASH
@@ -2175,7 +2092,6 @@ BattleTowerMons4:
bigdw 106 ; SDef
db "RIZA-DON@@@"
-
db EXEGGUTOR
db BRIGHTPOWDER
db EGG_BOMB, STOMP, PSYCH_UP, CONFUSION
@@ -2202,7 +2118,6 @@ BattleTowerMons4:
bigdw 84 ; SDef
db "NAtuSI-@@@@"
-
db HYPNO
db BRIGHTPOWDER
db CONFUSION, THUNDERPUNCH, HEADBUTT, DISABLE
@@ -2229,7 +2144,6 @@ BattleTowerMons4:
bigdw 122 ; SDef
db "SURI-PA-@@@"
-
db MUK
db QUICK_CLAW
db SCREECH, TOXIC, SLUDGE, HARDEN
@@ -2256,7 +2170,6 @@ BattleTowerMons4:
bigdw 111 ; SDef
db "BETOBETON@@"
-
db ELECTABUZZ
db KINGS_ROCK
db LIGHT_SCREEN, THUNDERPUNCH, SWIFT, SNORE
@@ -2284,8 +2197,6 @@ BattleTowerMons4:
db "EREBU-@@@@@"
-
-
BattleTowerMons5:
db KINGDRA
@@ -2314,7 +2225,6 @@ BattleTowerMons5:
bigdw 144 ; SDef
db "KINGUDORA@@"
-
db HOUNDOOM
db MIRACLEBERRY
db REST, CRUNCH, DREAM_EATER, FLAMETHROWER
@@ -2341,7 +2251,6 @@ BattleTowerMons5:
bigdw 127 ; SDef
db "HERUGA-@@@@"
-
db SHUCKLE
db LEFTOVERS
db SANDSTORM, REST, TOXIC, WRAP
@@ -2368,7 +2277,6 @@ BattleTowerMons5:
bigdw 279 ; SDef
db "TUBOTUBO@@@"
-
db SNORLAX
db LEFTOVERS
db HYPER_BEAM, EARTHQUAKE, SURF, PSYCH_UP
@@ -2395,7 +2303,6 @@ BattleTowerMons5:
bigdw 159 ; SDef
db "KABIGON@@@@"
-
db LAPRAS
db GOLD_BERRY
db THUNDERBOLT, SURF, CONFUSE_RAY, BLIZZARD
@@ -2422,7 +2329,6 @@ BattleTowerMons5:
bigdw 143 ; SDef
db "RAPURASU@@@"
-
db JOLTEON
db KINGS_ROCK
db THUNDERBOLT, THUNDER_WAVE, SHADOW_BALL, HIDDEN_POWER
@@ -2449,7 +2355,6 @@ BattleTowerMons5:
bigdw 144 ; SDef
db "SANDA-SU@@@"
-
db SCIZOR
db LEFTOVERS
db HYPER_BEAM, SLASH, AGILITY, METAL_CLAW
@@ -2476,7 +2381,6 @@ BattleTowerMons5:
bigdw 124 ; SDef
db "HAtuSAMU@@@"
-
db SLOWKING
db MINT_BERRY
db REST, SURF, PSYCHIC_M, AMNESIA
@@ -2503,7 +2407,6 @@ BattleTowerMons5:
bigdw 156 ; SDef
db "YADOKINGU@@"
-
db MACHAMP
db GOLD_BERRY
db CROSS_CHOP, EARTHQUAKE, FIRE_BLAST, THUNDERPUNCH
@@ -2530,7 +2433,6 @@ BattleTowerMons5:
bigdw 128 ; SDef
db "KAIRIKI-@@@"
-
db STARMIE
db SCOPE_LENS
db THUNDER_WAVE, RECOVER, THUNDERBOLT, SURF
@@ -2557,7 +2459,6 @@ BattleTowerMons5:
bigdw 130 ; SDef
db "SUTA-MI-@@@"
-
db DUGTRIO
db KINGS_ROCK
db EARTHQUAKE, SLASH, HYPER_BEAM, SLUDGE_BOMB
@@ -2584,7 +2485,6 @@ BattleTowerMons5:
bigdw 116 ; SDef
db "DAGUTORIO@@"
-
db ELECTRODE
db MIRACLEBERRY
db THUNDERBOLT, EXPLOSION, MIRROR_COAT, REST
@@ -2611,7 +2511,6 @@ BattleTowerMons5:
bigdw 126 ; SDef
db "MARUMAIN@@@"
-
db AERODACTYL
db KINGS_ROCK
db HYPER_BEAM, EARTHQUAKE, FIRE_BLAST, IRON_TAIL
@@ -2638,7 +2537,6 @@ BattleTowerMons5:
bigdw 119 ; SDef
db "PUTERA@@@@@"
-
db CROBAT
db LEFTOVERS
db CONFUSE_RAY, ATTRACT, HYPER_BEAM, TOXIC
@@ -2665,7 +2563,6 @@ BattleTowerMons5:
bigdw 127 ; SDef
db "KUROBAtuTO@"
-
db ZAPDOS
db MIRACLEBERRY
db DRILL_PECK, THUNDERBOLT, THUNDER_WAVE, HYPER_BEAM
@@ -2692,7 +2589,6 @@ BattleTowerMons5:
bigdw 136 ; SDef
db "SANDA-@@@@@"
-
db SKARMORY
db GOLD_BERRY
db SANDSTORM, FLY, STEEL_WING, TOXIC
@@ -2719,7 +2615,6 @@ BattleTowerMons5:
bigdw 113 ; SDef
db "EA-MUDO@@@@"
-
db FORRETRESS
db LEFTOVERS
db SANDSTORM, TOXIC, EXPLOSION, SWAGGER
@@ -2746,7 +2641,6 @@ BattleTowerMons5:
bigdw 103 ; SDef
db "HUoRETOSU@@"
-
db STEELIX
db MIRACLEBERRY
db SANDSTORM, IRON_TAIL, REST, EARTHQUAKE
@@ -2773,7 +2667,6 @@ BattleTowerMons5:
bigdw 109 ; SDef
db "HAGANE-RU@@"
-
db GIRAFARIG
db SCOPE_LENS
db DREAM_EATER, CRUNCH, PSYCHIC_M, EARTHQUAKE
@@ -2800,7 +2693,6 @@ BattleTowerMons5:
bigdw 101 ; SDef
db "KIRINRIKI@@"
-
db GYARADOS
db MIRACLEBERRY
db HYPER_BEAM, SURF, RAIN_DANCE, ZAP_CANNON
@@ -2827,7 +2719,6 @@ BattleTowerMons5:
bigdw 135 ; SDef
db "GIyaRADOSU@"
-
db ARTICUNO
db GOLD_BERRY
db BLIZZARD, HYPER_BEAM, ROAR, ICY_WIND
@@ -2855,8 +2746,6 @@ BattleTowerMons5:
db "HURI-ZA-@@@"
-
-
BattleTowerMons6:
db KINGDRA
@@ -2885,7 +2774,6 @@ BattleTowerMons6:
bigdw 172 ; SDef
db "KINGUDORA@@"
-
db TYRANITAR
db GOLD_BERRY
db CRUNCH, EARTHQUAKE, ROCK_SLIDE, HYPER_BEAM
@@ -2912,7 +2800,6 @@ BattleTowerMons6:
bigdw 175 ; SDef
db "BANGIRASU@@"
-
db HOUNDOOM
db MIRACLEBERRY
db FLAMETHROWER, CRUNCH, DREAM_EATER, REST
@@ -2939,7 +2826,6 @@ BattleTowerMons6:
bigdw 153 ; SDef
db "HERUGA-@@@@"
-
db PORYGON2
db LEFTOVERS
db BLIZZARD, RECOVER, TOXIC, PSYCHIC_M
@@ -2966,7 +2852,6 @@ BattleTowerMons6:
bigdw 170 ; SDef
db "PORIGON2@@@"
-
db MACHAMP
db QUICK_CLAW
db FIRE_PUNCH, CROSS_CHOP, THUNDERPUNCH, EARTHQUAKE
@@ -2993,7 +2878,6 @@ BattleTowerMons6:
bigdw 158 ; SDef
db "KAIRIKI-@@@"
-
db ZAPDOS
db MINT_BERRY
db REST, DRILL_PECK, THUNDERBOLT, THUNDER_WAVE
@@ -3020,7 +2904,6 @@ BattleTowerMons6:
bigdw 161 ; SDef
db "SANDA-@@@@@"
-
db WOBBUFFET
db GOLD_BERRY
db COUNTER, MIRROR_COAT, DESTINY_BOND, SAFEGUARD
@@ -3047,7 +2930,6 @@ BattleTowerMons6:
bigdw 122 ; SDef
db "SO-NANSU@@@"
-
db AERODACTYL
db LEFTOVERS
db HYPER_BEAM, SUPERSONIC, EARTHQUAKE, BITE
@@ -3074,7 +2956,6 @@ BattleTowerMons6:
bigdw 142 ; SDef
db "PUTERA@@@@@"
-
db DRAGONITE
db MIRACLEBERRY
db HYPER_BEAM, ICY_WIND, THUNDERBOLT, SURF
@@ -3101,7 +2982,6 @@ BattleTowerMons6:
bigdw 172 ; SDef
db "KAIRIyu-@@@"
-
db UMBREON
db GOLD_BERRY
db MUD_SLAP, MOONLIGHT, PSYCHIC_M, FAINT_ATTACK
@@ -3128,7 +3008,6 @@ BattleTowerMons6:
bigdw 212 ; SDef
db "BURAtuKI-@@"
-
db ARCANINE
db CHARCOAL
db FLAMETHROWER, CRUNCH, EXTREMESPEED, IRON_TAIL
@@ -3155,7 +3034,6 @@ BattleTowerMons6:
bigdw 149 ; SDef
db "UINDEi@@@@@"
-
db SKARMORY
db MIRACLEBERRY
db STEEL_WING, FLY, TOXIC, PROTECT
@@ -3182,7 +3060,6 @@ BattleTowerMons6:
bigdw 135 ; SDef
db "EA-MUDO@@@@"
-
db BLISSEY
db LEFTOVERS
db SOFTBOILED, TOXIC, PROTECT, PSYCHIC_M
@@ -3209,7 +3086,6 @@ BattleTowerMons6:
bigdw 215 ; SDef
db "HAPINASU@@@"
-
db SNORLAX
db PINK_BOW
db ROCK_SLIDE, SURF, BODY_SLAM, EARTHQUAKE
@@ -3236,7 +3112,6 @@ BattleTowerMons6:
bigdw 184 ; SDef
db "KABIGON@@@@"
-
db HERACROSS
db FOCUS_BAND
db REVERSAL, MEGAHORN, EARTHQUAKE, COUNTER
@@ -3263,7 +3138,6 @@ BattleTowerMons6:
bigdw 167 ; SDef
db "HERAKUROSU@"
-
db JYNX
db MIRACLEBERRY
db BLIZZARD, PSYCHIC_M, SHADOW_BALL, ICY_WIND
@@ -3290,7 +3164,6 @@ BattleTowerMons6:
bigdw 165 ; SDef
db "RU-ZIyuRA@@"
-
db BLASTOISE
db GOLD_BERRY
db SURF, EARTHQUAKE, RAPID_SPIN, BLIZZARD
@@ -3317,7 +3190,6 @@ BattleTowerMons6:
bigdw 180 ; SDef
db "KAMEtuKUSU@"
-
db RHYDON
db QUICK_CLAW
db EARTHQUAKE, SURF, IRON_TAIL, ROCK_SLIDE
@@ -3344,7 +3216,6 @@ BattleTowerMons6:
bigdw 104 ; SDef
db "SAIDON@@@@@"
-
db SANDSLASH
db SCOPE_LENS
db EARTHQUAKE, SLASH, HYPER_BEAM, SNORE
@@ -3371,7 +3242,6 @@ BattleTowerMons6:
bigdw 105 ; SDef
db "SANDOPAN@@@"
-
db PARASECT
db GOLD_BERRY
db SPORE, GIGA_DRAIN, HYPER_BEAM, SLUDGE_BOMB
@@ -3398,7 +3268,6 @@ BattleTowerMons6:
bigdw 144 ; SDef
db "PARASEKUTO@"
-
db GOLEM
db BRIGHTPOWDER
db EXPLOSION, EARTHQUAKE, FIRE_PUNCH, FRUSTRATION
@@ -3426,8 +3295,6 @@ BattleTowerMons6:
db "GORO-NIya@@"
-
-
BattleTowerMons7:
db JOLTEON
@@ -3456,7 +3323,6 @@ BattleTowerMons7:
bigdw 201 ; SDef
db "SANDA-SU@@@"
-
db VAPOREON
db LEFTOVERS
db BLIZZARD, SHADOW_BALL, SURF, MUD_SLAP
@@ -3483,7 +3349,6 @@ BattleTowerMons7:
bigdw 197 ; SDef
db "SIyaWA-ZU@@"
-
db UMBREON
db GOLD_BERRY
db FAINT_ATTACK, MOONLIGHT, PSYCH_UP, TOXIC
@@ -3510,7 +3375,6 @@ BattleTowerMons7:
bigdw 247 ; SDef
db "BURAtuKI-@@"
-
db BLISSEY
db GOLD_BERRY
db COUNTER, SOFTBOILED, SHADOW_BALL, THUNDERBOLT
@@ -3537,7 +3401,6 @@ BattleTowerMons7:
bigdw 250 ; SDef
db "HAPINASU@@@"
-
db SNORLAX
db LEFTOVERS
db ROCK_SLIDE, EARTHQUAKE, BLIZZARD, SHADOW_BALL
@@ -3564,7 +3427,6 @@ BattleTowerMons7:
bigdw 215 ; SDef
db "KABIGON@@@@"
-
db HOUNDOOM
db KINGS_ROCK
db CRUNCH, FLAMETHROWER, FAINT_ATTACK, ROAR
@@ -3591,7 +3453,6 @@ BattleTowerMons7:
bigdw 175 ; SDef
db "HERUGA-@@@@"
-
db TYRANITAR
db LEFTOVERS
db EARTHQUAKE, CRUNCH, ROCK_SLIDE, HYPER_BEAM
@@ -3618,7 +3479,6 @@ BattleTowerMons7:
bigdw 203 ; SDef
db "BANGIRASU@@"
-
db ZAPDOS
db GOLD_BERRY
db THUNDERBOLT, DRILL_PECK, THUNDER_WAVE, HYPER_BEAM
@@ -3645,7 +3505,6 @@ BattleTowerMons7:
bigdw 189 ; SDef
db "SANDA-@@@@@"
-
db EXEGGUTOR
db MIRACLEBERRY
db REST, EXPLOSION, PSYCHIC_M, GIGA_DRAIN
@@ -3672,7 +3531,6 @@ BattleTowerMons7:
bigdw 151 ; SDef
db "NAtuSI-@@@@"
-
db UMBREON
db GOLD_BERRY
db MOONLIGHT, FAINT_ATTACK, PSYCHIC_M, SHADOW_BALL
@@ -3699,7 +3557,6 @@ BattleTowerMons7:
bigdw 240 ; SDef
db "BURAtuKI-@@"
-
db GYARADOS
db BRIGHTPOWDER
db SURF, THUNDERBOLT, HYPER_BEAM, ROAR
@@ -3726,7 +3583,6 @@ BattleTowerMons7:
bigdw 204 ; SDef
db "GIyaRADOSU@"
-
db QUAGSIRE
db MIRACLEBERRY
db EARTHQUAKE, SURF, SLUDGE_BOMB, IRON_TAIL
@@ -3753,7 +3609,6 @@ BattleTowerMons7:
bigdw 152 ; SDef
db "NUO-@@@@@@@"
-
db URSARING
db SCOPE_LENS
db SLASH, EARTHQUAKE, HYPER_BEAM, THUNDERPUNCH
@@ -3780,7 +3635,6 @@ BattleTowerMons7:
bigdw 166 ; SDef
db "RINGUMA@@@@"
-
db MR__MIME
db KINGS_ROCK
db REFLECT, FIRE_PUNCH, PSYCHIC_M, ENCORE
@@ -3807,7 +3661,6 @@ BattleTowerMons7:
bigdw 226 ; SDef
db "BARIYA-DO@@"
-
db PRIMEAPE
db QUICK_CLAW
db CROSS_CHOP, ICE_PUNCH, THUNDERPUNCH, ROCK_SLIDE
@@ -3834,7 +3687,6 @@ BattleTowerMons7:
bigdw 162 ; SDef
db "OKORIZARU@@"
-
db GIRAFARIG
db GOLD_BERRY
db AGILITY, BATON_PASS, CRUNCH, EARTHQUAKE
@@ -3861,7 +3713,6 @@ BattleTowerMons7:
bigdw 152 ; SDef
db "KIRINRIKI@@"
-
db HITMONLEE
db FOCUS_BAND
db REVERSAL, ENDURE, BODY_SLAM, MEGA_KICK
@@ -3888,7 +3739,6 @@ BattleTowerMons7:
bigdw 217 ; SDef
db "SAWAMURA-@@"
-
db HERACROSS
db BRIGHTPOWDER
db REVERSAL, ENDURE, MEGAHORN, EARTHQUAKE
@@ -3915,7 +3765,6 @@ BattleTowerMons7:
bigdw 186 ; SDef
db "HERAKUROSU@"
-
db VENUSAUR
db BRIGHTPOWDER
db SUNNY_DAY, SOLARBEAM, SYNTHESIS, HYPER_BEAM
@@ -3942,7 +3791,6 @@ BattleTowerMons7:
bigdw 180 ; SDef
db "HUSIGIBANA@"
-
db CHARIZARD
db SCOPE_LENS
db SLASH, EARTHQUAKE, HYPER_BEAM, FLAMETHROWER
@@ -3969,7 +3817,6 @@ BattleTowerMons7:
bigdw 159 ; SDef
db "RIZA-DON@@@"
-
db BLASTOISE
db QUICK_CLAW
db HYDRO_PUMP, ICE_PUNCH, HYPER_BEAM, IRON_TAIL
@@ -3997,8 +3844,6 @@ BattleTowerMons7:
db "KAMEtuKUSU@"
-
-
BattleTowerMons8:
db JOLTEON
@@ -4027,7 +3872,6 @@ BattleTowerMons8:
bigdw 221 ; SDef
db "SANDA-SU@@@"
-
db SNORLAX
db LEFTOVERS
db REST, BELLY_DRUM, SNORE, EARTHQUAKE
@@ -4054,7 +3898,6 @@ BattleTowerMons8:
bigdw 250 ; SDef
db "KABIGON@@@@"
-
db HOUNDOOM
db MINT_BERRY
db REST, CRUNCH, FLAMETHROWER, SUNNY_DAY
@@ -4081,7 +3924,6 @@ BattleTowerMons8:
bigdw 197 ; SDef
db "HERUGA-@@@@"
-
db TAUROS
db GOLD_BERRY
db EARTHQUAKE, BODY_SLAM, IRON_TAIL, HYPER_BEAM
@@ -4108,7 +3950,6 @@ BattleTowerMons8:
bigdw 183 ; SDef
db "KENTAROSU@@"
-
db LAPRAS
db MINT_BERRY
db REST, SURF, CONFUSE_RAY, PSYCHIC_M
@@ -4135,7 +3976,6 @@ BattleTowerMons8:
bigdw 218 ; SDef
db "RAPURASU@@@"
-
db TYRANITAR
db MIRACLEBERRY
db REST, CRUNCH, EARTHQUAKE, ROCK_SLIDE
@@ -4162,7 +4002,6 @@ BattleTowerMons8:
bigdw 226 ; SDef
db "BANGIRASU@@"
-
db GENGAR
db NO_ITEM
db THUNDERBOLT, SHADOW_BALL, CONFUSE_RAY, THIEF
@@ -4189,7 +4028,6 @@ BattleTowerMons8:
bigdw 189 ; SDef
db "GENGA-@@@@@"
-
db FORRETRESS
db LEFTOVERS
db EXPLOSION, TOXIC, SOLARBEAM, SWAGGER
@@ -4216,7 +4054,6 @@ BattleTowerMons8:
bigdw 165 ; SDef
db "HUoRETOSU@@"
-
db KINGDRA
db MINT_BERRY
db REST, SURF, BLIZZARD, DRAGONBREATH
@@ -4243,7 +4080,6 @@ BattleTowerMons8:
bigdw 221 ; SDef
db "KINGUDORA@@"
-
db DRAGONITE
db GOLD_BERRY
db THUNDER_WAVE, SURF, THUNDERBOLT, OUTRAGE
@@ -4270,7 +4106,6 @@ BattleTowerMons8:
bigdw 228 ; SDef
db "KAIRIyu-@@@"
-
db PORYGON2
db LEFTOVERS
db PSYCHIC_M, RECOVER, HYPER_BEAM, TRI_ATTACK
@@ -4297,7 +4132,6 @@ BattleTowerMons8:
bigdw 221 ; SDef
db "PORIGON2@@@"
-
db JYNX
db QUICK_CLAW
db LOVELY_KISS, BLIZZARD, DREAM_EATER, PSYCHIC_M
@@ -4324,7 +4158,6 @@ BattleTowerMons8:
bigdw 225 ; SDef
db "RU-ZIyuRA@@"
-
db MANTINE
db GOLD_BERRY
db SURF, CONFUSE_RAY, BLIZZARD, WING_ATTACK
@@ -4351,7 +4184,6 @@ BattleTowerMons8:
bigdw 292 ; SDef
db "MANTAIN@@@@"
-
db SKARMORY
db QUICK_CLAW
db STEEL_WING, FLY, MUD_SLAP, TOXIC
@@ -4378,7 +4210,6 @@ BattleTowerMons8:
bigdw 185 ; SDef
db "EA-MUDO@@@@"
-
db MOLTRES
db CHARCOAL
db FLAMETHROWER, SKY_ATTACK, STEEL_WING, HYPER_BEAM
@@ -4405,7 +4236,6 @@ BattleTowerMons8:
bigdw 207 ; SDef
db "HUaIYA-@@@@"
-
db AERODACTYL
db MIRACLEBERRY
db HYPER_BEAM, REST, EARTHQUAKE, ROAR
@@ -4432,7 +4262,6 @@ BattleTowerMons8:
bigdw 189 ; SDef
db "PUTERA@@@@@"
-
db ELECTRODE
db KINGS_ROCK
db THUNDERBOLT, EXPLOSION, MIRROR_COAT, TOXIC
@@ -4459,7 +4288,6 @@ BattleTowerMons8:
bigdw 201 ; SDef
db "MARUMAIN@@@"
-
db DUGTRIO
db SCOPE_LENS
db SLASH, EARTHQUAKE, THIEF, MUD_SLAP
@@ -4486,7 +4314,6 @@ BattleTowerMons8:
bigdw 177 ; SDef
db "DAGUTORIO@@"
-
db VICTREEBEL
db QUICK_CLAW
db GIGA_DRAIN, SLUDGE_BOMB, HYPER_BEAM, TOXIC
@@ -4513,7 +4340,6 @@ BattleTowerMons8:
bigdw 143 ; SDef
db "UTUBOtuTO@@"
-
db PINSIR
db GOLD_BERRY
db HYPER_BEAM, SUBMISSION, STRENGTH, TOXIC
@@ -4540,7 +4366,6 @@ BattleTowerMons8:
bigdw 157 ; SDef
db "KAIROSU@@@@"
-
db GRANBULL
db BRIGHTPOWDER
db ROAR, SHADOW_BALL, HYPER_BEAM, THUNDERPUNCH
@@ -4568,8 +4393,6 @@ BattleTowerMons8:
db "GURANBURU@@"
-
-
BattleTowerMons9:
db UMBREON
@@ -4598,7 +4421,6 @@ BattleTowerMons9:
bigdw 314 ; SDef
db "BURAtuKI-@@"
-
db DRAGONITE
db QUICK_CLAW
db FIRE_BLAST, HYPER_BEAM, OUTRAGE, BLIZZARD
@@ -4625,7 +4447,6 @@ BattleTowerMons9:
bigdw 263 ; SDef
db "KAIRIyu-@@@"
-
db STARMIE
db LEFTOVERS
db RECOVER, THUNDERBOLT, SURF, PSYCHIC_M
@@ -4652,7 +4473,6 @@ BattleTowerMons9:
bigdw 236 ; SDef
db "SUTA-MI-@@@"
-
db CLOYSTER
db LEFTOVERS
db EXPLOSION, BLIZZARD, SURF, ICY_WIND
@@ -4679,7 +4499,6 @@ BattleTowerMons9:
bigdw 162 ; SDef
db "PARUSIeN@@@"
-
db CROBAT
db GOLD_BERRY
db WING_ATTACK, HAZE, HYPER_BEAM, GIGA_DRAIN
@@ -4706,7 +4525,6 @@ BattleTowerMons9:
bigdw 225 ; SDef
db "KUROBAtuTO@"
-
db PORYGON2
db QUICK_CLAW
db TOXIC, PSYCHIC_M, RECOVER, PROTECT
@@ -4733,7 +4551,6 @@ BattleTowerMons9:
bigdw 248 ; SDef
db "PORIGON2@@@"
-
db KINGDRA
db LEFTOVERS
db DRAGONBREATH, SURF, HYPER_BEAM, BLIZZARD
@@ -4760,7 +4577,6 @@ BattleTowerMons9:
bigdw 248 ; SDef
db "KINGUDORA@@"
-
db TYRANITAR
db QUICK_CLAW
db HYPER_BEAM, CRUNCH, EARTHQUAKE, ROCK_SLIDE
@@ -4787,7 +4603,6 @@ BattleTowerMons9:
bigdw 259 ; SDef
db "BANGIRASU@@"
-
db LAPRAS
db MINT_BERRY
db REST, SURF, THUNDERBOLT, PSYCHIC_M
@@ -4814,7 +4629,6 @@ BattleTowerMons9:
bigdw 255 ; SDef
db "RAPURASU@@@"
-
db ESPEON
db GOLD_BERRY
db PSYCHIC_M, SHADOW_BALL, SUNNY_DAY, MORNING_SUN
@@ -4841,7 +4655,6 @@ BattleTowerMons9:
bigdw 250 ; SDef
db "E-HUi@@@@@@"
-
db MACHAMP
db QUICK_CLAW
db CROSS_CHOP, VITAL_THROW, FIRE_BLAST, EARTHQUAKE
@@ -4868,7 +4681,6 @@ BattleTowerMons9:
bigdw 230 ; SDef
db "KAIRIKI-@@@"
-
db SNORLAX
db MIRACLEBERRY
db FIRE_BLAST, SURF, EARTHQUAKE, HYPER_BEAM
@@ -4895,7 +4707,6 @@ BattleTowerMons9:
bigdw 275 ; SDef
db "KABIGON@@@@"
-
db ARCANINE
db MINT_BERRY
db SUNNY_DAY, FLAMETHROWER, EXTREMESPEED, REST
@@ -4922,7 +4733,6 @@ BattleTowerMons9:
bigdw 226 ; SDef
db "UINDEi@@@@@"
-
db BLISSEY
db LEFTOVERS
db SOLARBEAM, SUNNY_DAY, SOFTBOILED, FIRE_BLAST
@@ -4949,7 +4759,6 @@ BattleTowerMons9:
bigdw 322 ; SDef
db "HAPINASU@@@"
-
db HOUNDOOM
db BRIGHTPOWDER
db FLAMETHROWER, CRUNCH, SUNNY_DAY, SOLARBEAM
@@ -4976,7 +4785,6 @@ BattleTowerMons9:
bigdw 223 ; SDef
db "HERUGA-@@@@"
-
db SKARMORY
db QUICK_CLAW
db SANDSTORM, STEEL_WING, TOXIC, RETURN
@@ -5003,7 +4811,6 @@ BattleTowerMons9:
bigdw 193 ; SDef
db "EA-MUDO@@@@"
-
db SHUCKLE
db LEFTOVERS
db TOXIC, WRAP, PROTECT, ENCORE
@@ -5030,7 +4837,6 @@ BattleTowerMons9:
bigdw 493 ; SDef
db "TUBOTUBO@@@"
-
db FLAREON
db MINT_BERRY
db HYPER_BEAM, FLAMETHROWER, SHADOW_BALL, ROAR
@@ -5057,7 +4863,6 @@ BattleTowerMons9:
bigdw 265 ; SDef
db "BU-SUTA-@@@"
-
db MILTANK
db LEFTOVERS
db MILK_DRINK, EARTHQUAKE, ATTRACT, BODY_SLAM
@@ -5084,7 +4889,6 @@ BattleTowerMons9:
bigdw 182 ; SDef
db "MIRUTANKU@@"
-
db TAUROS
db PINK_BOW
db THUNDERBOLT, HYPER_BEAM, ATTRACT, EARTHQUAKE
@@ -5111,7 +4915,6 @@ BattleTowerMons9:
bigdw 180 ; SDef
db "KENTAROSU@@"
-
db MUK
db QUICK_CLAW
db TOXIC, SLUDGE_BOMB, ATTRACT, GIGA_DRAIN
@@ -5139,8 +4942,6 @@ BattleTowerMons9:
db "BETOBETON@@"
-
-
BattleTowerMons10:
db HOUNDOOM
@@ -5169,7 +4970,6 @@ BattleTowerMons10:
bigdw 252 ; SDef
db "HERUGA-@@@@"
-
db MACHAMP
db QUICK_CLAW
db CROSS_CHOP, EARTHQUAKE, HYPER_BEAM, VITAL_THROW
@@ -5196,7 +4996,6 @@ BattleTowerMons10:
bigdw 266 ; SDef
db "KAIRIKI-@@@"
-
db KINGDRA
db LEFTOVERS
db SURF, DRAGONBREATH, REST, TOXIC
@@ -5223,7 +5022,6 @@ BattleTowerMons10:
bigdw 284 ; SDef
db "KINGUDORA@@"
-
db JOLTEON
db BRIGHTPOWDER
db THUNDERBOLT, ROAR, THUNDER_WAVE, IRON_TAIL
@@ -5250,7 +5048,6 @@ BattleTowerMons10:
bigdw 278 ; SDef
db "SANDA-SU@@@"
-
db TAUROS
db KINGS_ROCK
db HYPER_BEAM, EARTHQUAKE, IRON_TAIL, THUNDERBOLT
@@ -5277,7 +5074,6 @@ BattleTowerMons10:
bigdw 230 ; SDef
db "KENTAROSU@@"
-
db ARCANINE
db LEFTOVERS
db FLAMETHROWER, EXTREMESPEED, IRON_TAIL, HYPER_BEAM
@@ -5304,7 +5100,6 @@ BattleTowerMons10:
bigdw 250 ; SDef
db "UINDEi@@@@@"
-
db CHARIZARD
db SCOPE_LENS
db FLAMETHROWER, EARTHQUAKE, SLASH, FLY
@@ -5331,7 +5126,6 @@ BattleTowerMons10:
bigdw 263 ; SDef
db "RIZA-DON@@@"
-
db ELECTRODE
db BRIGHTPOWDER
db THUNDER_WAVE, THUNDERBOLT, EXPLOSION, MIRROR_COAT
@@ -5358,7 +5152,6 @@ BattleTowerMons10:
bigdw 248 ; SDef
db "MARUMAIN@@@"
-
db RHYDON
db MIRACLEBERRY
db SURF, EARTHQUAKE, HYPER_BEAM, ROCK_SLIDE
@@ -5385,7 +5178,6 @@ BattleTowerMons10:
bigdw 178 ; SDef
db "SAIDON@@@@@"
-
db STEELIX
db LEFTOVERS
db EARTHQUAKE, HYPER_BEAM, SWAGGER, CRUNCH
@@ -5412,7 +5204,6 @@ BattleTowerMons10:
bigdw 218 ; SDef
db "HAGANE-RU@@"
-
db FEAROW
db KINGS_ROCK
db DRILL_PECK, STEEL_WING, HYPER_BEAM, MUD_SLAP
@@ -5439,7 +5230,6 @@ BattleTowerMons10:
bigdw 212 ; SDef
db "ONIDORIRU@@"
-
db MISDREAVUS
db FOCUS_BAND
db PERISH_SONG, MEAN_LOOK, PAIN_SPLIT, SHADOW_BALL
@@ -5466,7 +5256,6 @@ BattleTowerMons10:
bigdw 263 ; SDef
db "MUUMA@@@@@@"
-
db SNEASEL
db SCOPE_LENS
db SLASH, BLIZZARD, DREAM_EATER, FAINT_ATTACK
@@ -5493,7 +5282,6 @@ BattleTowerMons10:
bigdw 240 ; SDef
db "NIyu-RA@@@@"
-
db SCIZOR
db QUICK_CLAW
db STEEL_WING, HYPER_BEAM, SLASH, TOXIC
@@ -5520,7 +5308,6 @@ BattleTowerMons10:
bigdw 246 ; SDef
db "HAtuSAMU@@@"
-
db BLISSEY
db LEFTOVERS
db THUNDERBOLT, BLIZZARD, FIRE_BLAST, SOFTBOILED
@@ -5547,7 +5334,6 @@ BattleTowerMons10:
bigdw 346 ; SDef
db "HAPINASU@@@"
-
db PILOSWINE
db MINT_BERRY
db REST, BLIZZARD, HYPER_BEAM, EARTHQUAKE
@@ -5574,7 +5360,6 @@ BattleTowerMons10:
bigdw 194 ; SDef
db "INOMU-@@@@@"
-
db EXEGGUTOR
db QUICK_CLAW
db PSYCHIC_M, TOXIC, EXPLOSION, GIGA_DRAIN
@@ -5601,7 +5386,6 @@ BattleTowerMons10:
bigdw 218 ; SDef
db "NAtuSI-@@@@"
-
db OMASTAR
db LEFTOVERS
db SURF, ANCIENTPOWER, BLIZZARD, TOXIC
@@ -5628,7 +5412,6 @@ BattleTowerMons10:
bigdw 214 ; SDef
db "OMUSUTA-@@@"
-
db GOLEM
db BRIGHTPOWDER
db EXPLOSION, EARTHQUAKE, ROCK_SLIDE, FIRE_BLAST
@@ -5655,7 +5438,6 @@ BattleTowerMons10:
bigdw 190 ; SDef
db "GORO-NIya@@"
-
db HITMONCHAN
db FOCUS_BAND
db COUNTER, FIRE_PUNCH, THUNDERPUNCH, ICE_PUNCH
@@ -5682,7 +5464,6 @@ BattleTowerMons10:
bigdw 280 ; SDef
db "EBIWARA-@@@"
-
db LANTURN
db QUICK_CLAW
db SURF, RAIN_DANCE, ZAP_CANNON, CONFUSE_RAY
diff --git a/data/credits_strings.asm b/data/credits_strings.asm
index f23fe3723..7d1996a4c 100644
--- a/data/credits_strings.asm
+++ b/data/credits_strings.asm
@@ -188,7 +188,7 @@ CreditsStrings:
.MonsterDesign: db " MONSTER DESIGN@" ; "# デザイン@"
.GraphicsDesign: db " GRAPHICS DESIGN@" ; "グラフィック デザイン@"
.Music: db " MUSIC@" ; "おんがく@"
-.SoundEffects: db " SOUND EFFECTS@" ; "サウンド エフ→クト@"
+.SoundEffects: db " SOUND EFFECTS@" ; "サウンド エフェクト@"
.GameDesign: db " GAME DESIGN@" ; "ゲームデザイン@"
.GameScenario: db " GAME SCENARIO@" ; "シナりオ@"
.ToolProgramming: db " TOOL PROGRAMMING@" ; "ツール プログラム@"
@@ -202,7 +202,7 @@ CreditsStrings:
.ExecutiveProducer: db " EXECUTIVE PRODUCER@" ; "エグゼクティブ プロデューサー@"
.PokemonAnimation: db " #MON ANIMATION@" ; "# アニメーション@"
.PokedexText: db " #DEX TEXT@" ; "ずかん テキスト@"
-.MobilePrjLeader: db " MOBILE PRJ. LEADER@" ; "モバイルプロジ→クト りーダー@"
+.MobilePrjLeader: db " MOBILE PRJ. LEADER@" ; "モバイルプロジェクト りーダー@"
.MobileSystemAd: db " MOBILE SYSTEM AD.@" ; "モバイル システムアドバイザー@"
.MobileStadiumDir: db "MOBILE STADIUM DIR.@" ; "モバイルスタジアム ディレクター@"
.Coordination: db " COORDINATION@" ; "コーディネーター@"
diff --git a/data/engine_flags.asm b/data/engine_flags.asm
index 9099953ca..21f8ca0fe 100644
--- a/data/engine_flags.asm
+++ b/data/engine_flags.asm
@@ -197,4 +197,3 @@ EngineFlags:
engine_flag wSwarmFlags, SWARMFLAGS_DUNSPARCE_SWARM_F ; $a0
engine_flag wSwarmFlags, SWARMFLAGS_YANMA_SWARM_F
-
diff --git a/data/events/field_move_blocks.asm b/data/events/field_move_blocks.asm
index b7cae3dd7..fea80f537 100644
--- a/data/events/field_move_blocks.asm
+++ b/data/events/field_move_blocks.asm
@@ -42,7 +42,6 @@ CutTreeBlockPointers:
db $0f, $17, 0
db -1 ; end
-
WhirlpoolBlockPointers:
dbw TILESET_JOHTO, .johto
db -1 ; end
diff --git a/data/events/odd_eggs.asm b/data/events/odd_eggs.asm
index f006833a7..d8a289872 100644
--- a/data/events/odd_eggs.asm
+++ b/data/events/odd_eggs.asm
@@ -27,7 +27,6 @@ prob_total = 0
prob 10
prob 1
-
OddEggs:
OddEgg1:
diff --git a/data/events/pokedex_ratings.asm b/data/events/pokedex_ratings.asm
index 881ab1ab9..2a0488603 100644
--- a/data/events/pokedex_ratings.asm
+++ b/data/events/pokedex_ratings.asm
@@ -25,4 +25,3 @@ OakRatings:
rating 239, SFX_DEX_FANFARE_230_PLUS, OakRating17
rating 248, SFX_DEX_FANFARE_230_PLUS, OakRating18
rating 255, SFX_DEX_FANFARE_230_PLUS, OakRating19
- \ No newline at end of file
diff --git a/data/items/marts.asm b/data/items/marts.asm
index e761e624a..1d48ea532 100644
--- a/data/items/marts.asm
+++ b/data/items/marts.asm
@@ -36,7 +36,6 @@ Marts:
dw MartUnderground
.End
-
MartCherrygrove:
db 4 ; # items
db POTION
diff --git a/data/maps/attributes.asm b/data/maps/attributes.asm
index f6e961406..fa42c461e 100644
--- a/data/maps/attributes.asm
+++ b/data/maps/attributes.asm
@@ -63,7 +63,6 @@ elif "\1" == "east"
endc
ENDM
-
map_attributes NewBarkTown, NEW_BARK_TOWN, $05, WEST | EAST
connection west, Route29, ROUTE_29, 0, 0, 9
connection east, Route27, ROUTE_27, 0, 0, 9
diff --git a/data/maps/map_data.asm b/data/maps/map_data.asm
index 2e1b7c618..15ff249fe 100644
--- a/data/maps/map_data.asm
+++ b/data/maps/map_data.asm
@@ -6,7 +6,6 @@ SECTION "Maps", ROMX
INCLUDE "data/maps/maps.asm"
INCLUDE "data/maps/attributes.asm"
-
INCLUDE "data/maps/blocks.asm"
INCLUDE "data/maps/scripts.asm"
diff --git a/data/maps/maps.asm b/data/maps/maps.asm
index e86cef4c4..1cc528738 100644
--- a/data/maps/maps.asm
+++ b/data/maps/maps.asm
@@ -43,7 +43,6 @@ MapGroupPointers::
dw MapGroup_Saffron ; 25
dw MapGroup_Cherrygrove ; 26
-
MapGroup_Olivine:
map OlivinePokecenter1F, TILESET_POKECENTER, INDOOR, OLIVINE_CITY, MUSIC_POKEMON_CENTER, FALSE, PALETTE_DAY, FISHGROUP_SHORE
map OlivineGym, TILESET_CHAMPIONS_ROOM, INDOOR, OLIVINE_CITY, MUSIC_GYM, TRUE, PALETTE_DAY, FISHGROUP_SHORE
diff --git a/data/maps/outdoor_sprites.asm b/data/maps/outdoor_sprites.asm
index 64c0cf238..03f4076f9 100644
--- a/data/maps/outdoor_sprites.asm
+++ b/data/maps/outdoor_sprites.asm
@@ -30,7 +30,6 @@ OutdoorSprites:
dw SaffronGroupSprites
dw CherrygroveGroupSprites
-
PalletGroupSprites:
db SPRITE_SUICUNE
db SPRITE_SILVER_TROPHY
diff --git a/data/moves/effects.asm b/data/moves/effects.asm
index df597f8bc..81bd89f5f 100644
--- a/data/moves/effects.asm
+++ b/data/moves/effects.asm
@@ -1,3 +1,5 @@
+INCLUDE "data/moves/effects_pointers.asm"
+
MoveEffects: ; used only for BANK(MoveEffects)
NormalHit:
diff --git a/data/party_menu_qualities.asm b/data/party_menu_qualities.asm
index 3d09ed49d..b488f4eb1 100644
--- a/data/party_menu_qualities.asm
+++ b/data/party_menu_qualities.asm
@@ -18,7 +18,6 @@ endr
db -1 ; end
ENDM
-
PartyMenuQualityPointers:
; entries correspond to PARTYMENUACTION_* constants
dw .Default ; PARTYMENUACTION_CHOOSE_POKEMON
diff --git a/data/sgb_ctrl_packets.asm b/data/sgb_ctrl_packets.asm
index a8c1e25f5..b3c2b0404 100644
--- a/data/sgb_ctrl_packets.asm
+++ b/data/sgb_ctrl_packets.asm
@@ -37,7 +37,6 @@ sgb_data_snd: MACRO
db \3 ; length (1-11)
ENDM
-
; Crystal does not support SGB, so this is unused.
PalTrnPacket: sgb_pal_trn
@@ -49,7 +48,6 @@ PctTrnPacket: sgb_pct_trn
MaskEnFreezePacket: sgb_mask_en 1
MaskEnCancelPacket: sgb_mask_en 0
-
; These are packets containing SNES code.
; This set of packets is found in several Japanese SGB-compatible titles.
; It appears to be part of NCL's SGB devkit.
diff --git a/data/sprites/facings.asm b/data/sprites/facings.asm
index 6e8c304b1..aebf97ff5 100644
--- a/data/sprites/facings.asm
+++ b/data/sprites/facings.asm
@@ -37,7 +37,6 @@ Facings:
NUM_FACINGS EQU (Facings.End - Facings) / 2
-
; Tables used as a reference to transform OAM data.
; Format:
diff --git a/data/trainers/attributes.asm b/data/trainers/attributes.asm
index 364f62492..67d852d83 100644
--- a/data/trainers/attributes.asm
+++ b/data/trainers/attributes.asm
@@ -402,4 +402,3 @@ TrainerClassAttributes:
db 25 ; base reward
dw AI_BASIC | AI_SETUP | AI_SMART | AI_AGGRESSIVE | AI_CAUTIOUS | AI_STATUS | AI_RISKY
dw CONTEXT_USE | SWITCH_SOMETIMES
-
diff --git a/data/trainers/parties.asm b/data/trainers/parties.asm
index 3c07e6597..35de91e85 100644
--- a/data/trainers/parties.asm
+++ b/data/trainers/parties.asm
@@ -1,3 +1,5 @@
+INCLUDE "data/trainers/party_pointers.asm"
+
Trainers:
; Trainer data structure:
; - db "NAME@", TRAINERTYPE_* constant
@@ -8,7 +10,6 @@ Trainers:
; * for TRAINERTYPE_ITEM_MOVES: db level, species, item, 4 moves
; - db -1 ; end
-
FalknerGroup:
; FALKNER (1)
db "FALKNER@", TRAINERTYPE_MOVES
@@ -16,7 +17,6 @@ FalknerGroup:
db 9, PIDGEOTTO, TACKLE, MUD_SLAP, GUST, NO_MOVE
db -1 ; end
-
WhitneyGroup:
; WHITNEY (1)
db "WHITNEY@", TRAINERTYPE_MOVES
@@ -24,7 +24,6 @@ WhitneyGroup:
db 20, MILTANK, ROLLOUT, ATTRACT, STOMP, MILK_DRINK
db -1 ; end
-
BugsyGroup:
; BUGSY (1)
db "BUGSY@", TRAINERTYPE_MOVES
@@ -33,7 +32,6 @@ BugsyGroup:
db 16, SCYTHER, QUICK_ATTACK, LEER, FURY_CUTTER, NO_MOVE
db -1 ; end
-
MortyGroup:
; MORTY (1)
db "MORTY@", TRAINERTYPE_MOVES
@@ -43,7 +41,6 @@ MortyGroup:
db 23, HAUNTER, SPITE, MEAN_LOOK, MIMIC, NIGHT_SHADE
db -1 ; end
-
PryceGroup:
; PRYCE (1)
db "PRYCE@", TRAINERTYPE_MOVES
@@ -52,7 +49,6 @@ PryceGroup:
db 31, PILOSWINE, ICY_WIND, FURY_ATTACK, MIST, BLIZZARD
db -1 ; end
-
JasmineGroup:
; JASMINE (1)
db "JASMINE@", TRAINERTYPE_MOVES
@@ -61,7 +57,6 @@ JasmineGroup:
db 35, STEELIX, SCREECH, SUNNY_DAY, ROCK_THROW, IRON_TAIL
db -1 ; end
-
ChuckGroup:
; CHUCK (1)
db "CHUCK@", TRAINERTYPE_MOVES
@@ -69,7 +64,6 @@ ChuckGroup:
db 30, POLIWRATH, HYPNOSIS, MIND_READER, SURF, DYNAMICPUNCH
db -1 ; end
-
ClairGroup:
; CLAIR (1)
db "CLAIR@", TRAINERTYPE_MOVES
@@ -79,7 +73,6 @@ ClairGroup:
db 40, KINGDRA, SMOKESCREEN, SURF, HYPER_BEAM, DRAGONBREATH
db -1 ; end
-
Rival1Group:
; RIVAL1 (1)
db "?@", TRAINERTYPE_NORMAL
@@ -198,10 +191,8 @@ Rival1Group:
db 38, FERALIGATR, RAGE, WATER_GUN, SCARY_FACE, SLASH
db -1 ; end
-
PokemonProfGroup:
-
WillGroup:
; WILL (1)
db "WILL@", TRAINERTYPE_MOVES
@@ -212,7 +203,6 @@ WillGroup:
db 42, XATU, QUICK_ATTACK, FUTURE_SIGHT, CONFUSE_RAY, PSYCHIC_M
db -1 ; end
-
PKMNTrainerGroup:
; CAL (1)
db "CAL@", TRAINERTYPE_NORMAL
@@ -235,7 +225,6 @@ PKMNTrainerGroup:
db 50, FERALIGATR
db -1 ; end
-
BrunoGroup:
; BRUNO (1)
db "BRUNO@", TRAINERTYPE_MOVES
@@ -246,7 +235,6 @@ BrunoGroup:
db 46, MACHAMP, ROCK_SLIDE, FORESIGHT, VITAL_THROW, CROSS_CHOP
db -1 ; end
-
KarenGroup:
; KAREN (1)
db "KAREN@", TRAINERTYPE_MOVES
@@ -257,7 +245,6 @@ KarenGroup:
db 47, HOUNDOOM, ROAR, PURSUIT, FLAMETHROWER, CRUNCH
db -1 ; end
-
KogaGroup:
; KOGA (1)
db "KOGA@", TRAINERTYPE_MOVES
@@ -268,7 +255,6 @@ KogaGroup:
db 44, CROBAT, DOUBLE_TEAM, QUICK_ATTACK, WING_ATTACK, TOXIC
db -1 ; end
-
ChampionGroup:
; CHAMPION (1)
db "LANCE@", TRAINERTYPE_MOVES
@@ -280,7 +266,6 @@ ChampionGroup:
db 50, DRAGONITE, FIRE_BLAST, SAFEGUARD, OUTRAGE, HYPER_BEAM
db -1 ; end
-
BrockGroup:
; BROCK (1)
db "BROCK@", TRAINERTYPE_MOVES
@@ -291,7 +276,6 @@ BrockGroup:
db 42, KABUTOPS, SLASH, SURF, ENDURE, GIGA_DRAIN
db -1 ; end
-
MistyGroup:
; MISTY (1)
db "MISTY@", TRAINERTYPE_MOVES
@@ -301,7 +285,6 @@ MistyGroup:
db 47, STARMIE, SURF, CONFUSE_RAY, RECOVER, ICE_BEAM
db -1 ; end
-
LtSurgeGroup:
; LT_SURGE (1)
db "LT.SURGE@", TRAINERTYPE_MOVES
@@ -312,7 +295,6 @@ LtSurgeGroup:
db 46, ELECTABUZZ, QUICK_ATTACK, THUNDERPUNCH, LIGHT_SCREEN, THUNDER
db -1 ; end
-
ScientistGroup:
; SCIENTIST (1)
db "ROSS@", TRAINERTYPE_NORMAL
@@ -344,7 +326,6 @@ ScientistGroup:
db 30, PORYGON, CONVERSION, CONVERSION2, RECOVER, TRI_ATTACK
db -1 ; end
-
ErikaGroup:
; ERIKA (1)
db "ERIKA@", TRAINERTYPE_MOVES
@@ -354,7 +335,6 @@ ErikaGroup:
db 46, BELLOSSOM, SUNNY_DAY, SYNTHESIS, PETAL_DANCE, SOLARBEAM
db -1 ; end
-
YoungsterGroup:
; YOUNGSTER (1)
db "JOEY@", TRAINERTYPE_NORMAL
@@ -434,7 +414,6 @@ YoungsterGroup:
db 37, RATICATE, HYPER_BEAM, QUICK_ATTACK, HYPER_FANG, PURSUIT
db -1 ; end
-
SchoolboyGroup:
; SCHOOLBOY (1)
db "JACK@", TRAINERTYPE_NORMAL
@@ -591,7 +570,6 @@ SchoolboyGroup:
db 38, MAGNETON, ZAP_CANNON, THUNDER_WAVE, LOCK_ON, SWIFT
db -1 ; end
-
BirdKeeperGroup:
; BIRD_KEEPER (1)
db "ROD@", TRAINERTYPE_NORMAL
@@ -708,7 +686,6 @@ BirdKeeperGroup:
db 38, PIDGEOT, SWIFT, DETECT, STEEL_WING, FLY
db -1 ; end
-
LassGroup:
; LASS (1)
db "CARRIE@", TRAINERTYPE_MOVES
@@ -814,7 +791,6 @@ LassGroup:
db 36, GOLDUCK, DISABLE, SURF, PSYCHIC_M, SCREECH
db -1 ; end
-
JanineGroup:
; JANINE (1)
db "JANINE@", TRAINERTYPE_MOVES
@@ -825,7 +801,6 @@ JanineGroup:
db 39, VENOMOTH, FORESIGHT, DOUBLE_TEAM, GUST, PSYCHIC_M
db -1 ; end
-
CooltrainerMGroup:
; COOLTRAINERM (1)
db "NICK@", TRAINERTYPE_MOVES
@@ -956,7 +931,6 @@ CooltrainerMGroup:
db 37, DRAGONAIR, WRAP, SURF, DRAGON_RAGE, SLAM
db -1 ; end
-
CooltrainerFGroup:
; COOLTRAINERF (1)
db "GWEN@", TRAINERTYPE_NORMAL
@@ -1088,7 +1062,6 @@ CooltrainerFGroup:
db 35, SEADRA, SWIFT, LEER, WATERFALL, TWISTER
db -1 ; end
-
BeautyGroup:
; BEAUTY (1)
db "VICTORIA@", TRAINERTYPE_NORMAL
@@ -1184,7 +1157,6 @@ BeautyGroup:
db 19, CORSOLA
db -1 ; end
-
PokemaniacGroup:
; POKEMANIAC (1)
db "LARRY@", TRAINERTYPE_NORMAL
@@ -1266,7 +1238,6 @@ PokemaniacGroup:
db 17, NIDOQUEEN
db -1 ; end
-
GruntMGroup:
; GRUNTM (1)
db "GRUNT@", TRAINERTYPE_NORMAL
@@ -1458,7 +1429,6 @@ GruntMGroup:
db 30, GOLBAT
db -1 ; end
-
GentlemanGroup:
; GENTLEMAN (1)
db "PRESTON@", TRAINERTYPE_NORMAL
@@ -1487,7 +1457,6 @@ GentlemanGroup:
db 20, NOCTOWL
db -1 ; end
-
SkierGroup:
; SKIER (1)
db "ROXANNE@", TRAINERTYPE_NORMAL
@@ -1499,7 +1468,6 @@ SkierGroup:
db 28, DEWGONG
db -1 ; end
-
TeacherGroup:
; TEACHER (1)
db "COLETTE@", TRAINERTYPE_NORMAL
@@ -1517,7 +1485,6 @@ TeacherGroup:
db 35, JIGGLYPUFF
db -1 ; end
-
SabrinaGroup:
; SABRINA (1)
db "SABRINA@", TRAINERTYPE_MOVES
@@ -1526,7 +1493,6 @@ SabrinaGroup:
db 48, ALAKAZAM, RECOVER, FUTURE_SIGHT, PSYCHIC_M, REFLECT
db -1 ; end
-
BugCatcherGroup:
; BUG_CATCHER (1)
db "DON@", TRAINERTYPE_NORMAL
@@ -1647,7 +1613,6 @@ BugCatcherGroup:
db 10, PARAS
db -1 ; end
-
FisherGroup:
; FISHER (1)
db "JUSTIN@", TRAINERTYPE_NORMAL
@@ -1811,7 +1776,6 @@ FisherGroup:
db 37, QWILFISH, ROLLOUT, SURF, PIN_MISSILE, TAKE_DOWN
db -1 ; end
-
SwimmerMGroup:
; SWIMMERM (1)
db "HAROLD@", TRAINERTYPE_NORMAL
@@ -1953,7 +1917,6 @@ SwimmerMGroup:
db 35, SEADRA
db -1 ; end
-
SwimmerFGroup:
; SWIMMERF (1)
db "ELAINE@", TRAINERTYPE_NORMAL
@@ -2063,7 +2026,6 @@ SwimmerFGroup:
db 35, SEAKING
db -1 ; end
-
SailorGroup:
; SAILOR (1)
db "EUGENE@", TRAINERTYPE_NORMAL
@@ -2145,7 +2107,6 @@ SailorGroup:
db 38, POLIWRATH, SURF, STRENGTH, ICE_PUNCH, SUBMISSION
db -1 ; end
-
SuperNerdGroup:
; SUPER_NERD (1)
db "STAN@", TRAINERTYPE_NORMAL
@@ -2231,7 +2192,6 @@ SuperNerdGroup:
db 19, SLOWPOKE, CURSE, WATER_GUN, GROWL, STRENGTH
db -1 ; end
-
Rival2Group:
; RIVAL2 (1)
db "?@", TRAINERTYPE_MOVES
@@ -2293,7 +2253,6 @@ Rival2Group:
db 50, FERALIGATR, SURF, RAIN_DANCE, SLASH, SCREECH
db -1 ; end
-
GuitaristGroup:
; GUITARIST (1)
db "CLYDE@", TRAINERTYPE_NORMAL
@@ -2308,7 +2267,6 @@ GuitaristGroup:
db 32, MAGNEMITE
db -1 ; end
-
HikerGroup:
; HIKER (1)
db "ANTHONY@", TRAINERTYPE_NORMAL
@@ -2454,7 +2412,6 @@ HikerGroup:
db 34, MACHOKE, KARATE_CHOP, VITAL_THROW, HEADBUTT, DIG
db -1 ; end
-
BikerGroup:
; BIKER (1)
db "BENNY@", TRAINERTYPE_NORMAL
@@ -2514,7 +2471,6 @@ BikerGroup:
db 32, WEEZING
db -1 ; end
-
BlaineGroup:
; BLAINE (1)
db "BLAINE@", TRAINERTYPE_MOVES
@@ -2523,7 +2479,6 @@ BlaineGroup:
db 50, RAPIDASH, QUICK_ATTACK, FIRE_SPIN, FURY_ATTACK, FIRE_BLAST
db -1 ; end
-
BurglarGroup:
; BURGLAR (1)
db "DUNCAN@", TRAINERTYPE_NORMAL
@@ -2546,7 +2501,6 @@ BurglarGroup:
db 30, KOFFING
db -1 ; end
-
FirebreatherGroup:
; FIREBREATHER (1)
db "OTIS@", TRAINERTYPE_NORMAL
@@ -2597,7 +2551,6 @@ FirebreatherGroup:
db 28, KOFFING
db -1 ; end
-
JugglerGroup:
; JUGGLER (1)
db "IRWIN@", TRAINERTYPE_NORMAL
@@ -2646,7 +2599,6 @@ JugglerGroup:
db 30, ELECTRODE
db -1 ; end
-
BlackbeltGroup:
; BLACKBELT_T (1)
db "KENJI@", TRAINERTYPE_NORMAL
@@ -2705,7 +2657,6 @@ BlackbeltGroup:
db 34, MACHOKE
db -1 ; end
-
ExecutiveMGroup:
; EXECUTIVEM (1)
db "EXECUTIVE@", TRAINERTYPE_MOVES
@@ -2736,7 +2687,6 @@ ExecutiveMGroup:
db 22, KOFFING
db -1 ; end
-
PsychicGroup:
; PSYCHIC_T (1)
db "NATHAN@", TRAINERTYPE_NORMAL
@@ -2809,7 +2759,6 @@ PsychicGroup:
db 33, HYPNO
db -1 ; end
-
PicnickerGroup:
; PICNICKER (1)
db "LIZ@", TRAINERTYPE_NORMAL
@@ -2965,7 +2914,6 @@ PicnickerGroup:
db 43, CLEFAIRY, METRONOME, ENCORE, MOONLIGHT, MINIMIZE
db -1 ; end
-
CamperGroup:
; CAMPER (1)
db "ROLAND@", TRAINERTYPE_NORMAL
@@ -3109,7 +3057,6 @@ CamperGroup:
db 30, TAUROS
db -1 ; end
-
ExecutiveFGroup:
; EXECUTIVEF (1)
db "EXECUTIVE@", TRAINERTYPE_MOVES
@@ -3125,7 +3072,6 @@ ExecutiveFGroup:
db 25, MURKROW, PECK, PURSUIT, HAZE, NO_MOVE
db -1 ; end
-
SageGroup:
; SAGE (1)
db "CHOW@", TRAINERTYPE_NORMAL
@@ -3203,7 +3149,6 @@ SageGroup:
db 32, VAPOREON
db -1 ; end
-
MediumGroup:
; MEDIUM (1)
db "MARTHA@", TRAINERTYPE_NORMAL
@@ -3245,7 +3190,6 @@ MediumGroup:
db 36, SLOWBRO
db -1 ; end
-
BoarderGroup:
; BOARDER (1)
db "RONALD@", TRAINERTYPE_NORMAL
@@ -3267,7 +3211,6 @@ BoarderGroup:
db 24, SHELLDER
db -1 ; end
-
PokefanMGroup:
; POKEFANM (1)
db "WILLIAM@", TRAINERTYPE_ITEM
@@ -3350,7 +3293,6 @@ PokefanMGroup:
db 35, TEDDIURSA, BERRY
db -1 ; end
-
KimonoGirlGroup:
; KIMONO_GIRL (1)
db "NAOKO@", TRAINERTYPE_NORMAL
@@ -3384,7 +3326,6 @@ KimonoGirlGroup:
db 17, JOLTEON
db -1 ; end
-
TwinsGroup:
; TWINS (1)
db "AMY & MAY@", TRAINERTYPE_NORMAL
@@ -3446,7 +3387,6 @@ TwinsGroup:
db 38, DRATINI, THUNDER_WAVE, TWISTER, FLAMETHROWER, HEADBUTT
db -1 ; end
-
PokefanFGroup:
; POKEFANF (1)
db "BEVERLY@", TRAINERTYPE_ITEM
@@ -3482,7 +3422,6 @@ PokefanFGroup:
db 16, MEOWTH, BERRY
db -1 ; end
-
RedGroup:
; RED (1)
db "RED@", TRAINERTYPE_MOVES
@@ -3494,7 +3433,6 @@ RedGroup:
db 77, BLASTOISE, RAIN_DANCE, SURF, BLIZZARD, WHIRLPOOL
db -1 ; end
-
BlueGroup:
; BLUE (1)
db "BLUE@", TRAINERTYPE_MOVES
@@ -3506,7 +3444,6 @@ BlueGroup:
db 58, ARCANINE, ROAR, SWIFT, FLAMETHROWER, EXTREMESPEED
db -1 ; end
-
OfficerGroup:
; OFFICER (1)
db "KEITH@", TRAINERTYPE_NORMAL
@@ -3519,7 +3456,6 @@ OfficerGroup:
db 14, GROWLITHE
db -1 ; end
-
GruntFGroup:
; GRUNTF (1)
db "GRUNT@", TRAINERTYPE_NORMAL
@@ -3552,7 +3488,6 @@ GruntFGroup:
db 18, GLOOM, ABSORB, SWEET_SCENT, STUN_SPORE, SLEEP_POWDER
db -1 ; end
-
MysticalmanGroup:
; MYSTICALMAN (1)
db "EUSINE@", TRAINERTYPE_MOVES
diff --git a/data/types/names.asm b/data/types/names.asm
index 2fe9e959c..62d8e13bf 100644
--- a/data/types/names.asm
+++ b/data/types/names.asm
@@ -48,4 +48,3 @@ Ghost: db "GHOST@"
Steel: db "STEEL@"
Dragon: db "DRAGON@"
Dark: db "DARK@"
-
diff --git a/data/wild/fish.asm b/data/wild/fish.asm
index 919a75c15..1976c8f95 100644
--- a/data/wild/fish.asm
+++ b/data/wild/fish.asm
@@ -204,7 +204,6 @@ FishGroups:
db 90 percent + 1, MAGIKARP, 40
db 100 percent, REMORAID, 40
-
TimeFishGroups:
; day nite
db CORSOLA, 20, STARYU, 20 ; 0
diff --git a/docs/design_flaws.md b/docs/design_flaws.md
index 3536acd9f..4b24a0cc3 100644
--- a/docs/design_flaws.md
+++ b/docs/design_flaws.md
@@ -84,6 +84,7 @@ In [gfx/pics.asm](/gfx/pics.asm):
; PokemonPicPointers and UnownPicPointers are assumed to start at the same
; address, but in different banks. This is enforced in pokecrystal.link.
+
SECTION "Pic Pointers", ROMX
INCLUDE "data/pokemon/pic_pointers.asm"
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..6928a3a83 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,9 +593,7 @@ AI_Smart_DreamEater:
dec [hl]
ret
-
AI_Smart_EvasionUp:
-
; Dismiss this move if enemy's evasion can't raise anymore.
ld a, [wEnemyEvaLevel]
cp $d
@@ -688,7 +677,6 @@ AI_Smart_EvasionUp:
bit SUBSTATUS_ROLLOUT, a
jr nz, .asm_388ef
-
.asm_38936
inc [hl]
ret
@@ -714,7 +702,6 @@ AI_Smart_EvasionUp:
dec [hl]
ret
-
AI_Smart_AlwaysHit:
; 80% chance to greatly encourage this move if either...
@@ -736,9 +723,7 @@ AI_Smart_AlwaysHit:
dec [hl]
ret
-
AI_Smart_MirrorMove:
-
; If the player did not use any move last turn...
ld a, [wLastPlayerCounterMove]
and a
@@ -779,9 +764,7 @@ AI_Smart_MirrorMove:
dec [hl]
ret
-
AI_Smart_AccuracyDown:
-
; If player's HP is full...
call AICheckPlayerMaxHP
jr nc, .asm_389a0
@@ -885,9 +868,7 @@ 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.
push hl
ld hl, wEnemyAtkLevel
@@ -927,7 +908,6 @@ AI_Smart_ResetStats:
inc [hl]
ret
-
AI_Smart_Bide:
; 90% chance to discourage this move unless enemy's HP is full.
@@ -939,7 +919,6 @@ AI_Smart_Bide:
inc [hl]
ret
-
AI_Smart_ForceSwitch:
; Whirlwind, Roar.
@@ -956,7 +935,6 @@ AI_Smart_ForceSwitch:
inc [hl]
ret
-
AI_Smart_Heal:
AI_Smart_MorningSun:
AI_Smart_Synthesis:
@@ -980,7 +958,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 +967,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 +979,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 +993,6 @@ AI_Smart_Ohko:
inc [hl]
ret
-
AI_Smart_TrapTarget:
; Bind, Wrap, Fire Spin, Clamp
@@ -1058,7 +1032,6 @@ AI_Smart_TrapTarget:
dec [hl]
ret
-
AI_Smart_RazorWind:
AI_Smart_Unused2B:
ld a, [wEnemySubStatus1]
@@ -1112,9 +1085,7 @@ 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%.
call AICheckPlayerHalfHP
ret c
@@ -1130,9 +1101,7 @@ AI_Smart_Confuse:
inc [hl]
ret
-
AI_Smart_SpDefenseUp2:
-
; Discourage this move if enemy's HP is lower than 50%.
call AICheckEnemyHalfHP
jr nc, .asm_38b10
@@ -1165,7 +1134,6 @@ AI_Smart_SpDefenseUp2:
inc [hl]
ret
-
AI_Smart_Fly:
; Fly, Dig
@@ -1184,7 +1152,6 @@ AI_Smart_Fly:
dec [hl]
ret
-
AI_Smart_SuperFang:
; Discourage this move if player's HP is below 25%.
@@ -1193,9 +1160,7 @@ AI_Smart_SuperFang:
inc [hl]
ret
-
AI_Smart_Paralyze:
-
; 50% chance to discourage this move if player's HP is below 25%.
call AICheckPlayerQuarterHP
jr nc, .asm_38b3a
@@ -1218,7 +1183,6 @@ AI_Smart_Paralyze:
inc [hl]
ret
-
AI_Smart_SpeedDownHit:
; Icy Wind
@@ -1244,7 +1208,6 @@ AI_Smart_SpeedDownHit:
dec [hl]
ret
-
AI_Smart_Substitute:
; Dismiss this move if enemy's HP is below 50%.
@@ -1252,7 +1215,6 @@ AI_Smart_Substitute:
ret c
jp AIDiscourageMove
-
AI_Smart_HyperBeam:
call AICheckEnemyHalfHP
jr c, .asm_38b72
@@ -1276,7 +1238,6 @@ AI_Smart_HyperBeam:
inc [hl]
ret
-
AI_Smart_Rage:
ld a, [wEnemySubStatus4]
bit SUBSTATUS_RAGE, a
@@ -1315,7 +1276,6 @@ AI_Smart_Rage:
inc [hl]
ret
-
AI_Smart_Mimic:
ld a, [wLastPlayerCounterMove]
and a
@@ -1365,7 +1325,6 @@ AI_Smart_Mimic:
inc [hl]
ret
-
AI_Smart_Counter:
push hl
ld hl, wPlayerUsedMoves
@@ -1415,7 +1374,6 @@ AI_Smart_Counter:
cp SPECIAL
jr nc, .asm_38c38
-
.asm_38c30
call Random
cp 39 percent + 1
@@ -1430,7 +1388,6 @@ AI_Smart_Counter:
inc [hl]
ret
-
AI_Smart_Encore:
call AICompareSpeed
jr nc, .asm_38c81
@@ -1484,7 +1441,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 +1461,6 @@ AI_Smart_PainSplit:
inc [hl]
ret
-
AI_Smart_Snore:
AI_Smart_SleepTalk:
; Greatly encourage this move if enemy is fast asleep.
@@ -1527,7 +1482,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 +1494,6 @@ AI_Smart_DefrostOpponent:
dec [hl]
ret
-
AI_Smart_Spite:
ld a, [wLastPlayerCounterMove]
and a
@@ -1597,11 +1550,9 @@ AI_Smart_Spite:
dec [hl]
ret
-
Function_0x38d16
jp AIDiscourageMove
-
AI_Smart_DestinyBond:
AI_Smart_Reversal:
AI_Smart_SkullBash:
@@ -1612,7 +1563,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 +1620,6 @@ AI_Smart_HealBell:
jp AIDiscourageMove
-
AI_Smart_PriorityHit:
call AICompareSpeed
ret c
@@ -1702,7 +1651,6 @@ AI_Smart_PriorityHit:
dec [hl]
ret
-
AI_Smart_Thief:
; Don't use Thief unless it's the only move available.
@@ -1711,7 +1659,6 @@ AI_Smart_Thief:
ld [hl], a
ret
-
AI_Smart_Conversion2:
ld a, [wLastPlayerMove]
and a
@@ -1751,7 +1698,6 @@ AI_Smart_Conversion2:
inc [hl]
ret
-
AI_Smart_Disable:
call AICompareSpeed
jr nc, .asm_38df3
@@ -1783,7 +1729,6 @@ AI_Smart_Disable:
inc [hl]
ret
-
AI_Smart_MeanLook:
call AICheckEnemyHalfHP
jr nc, .asm_38e24
@@ -1825,7 +1770,6 @@ AI_Smart_MeanLook:
dec [hl]
ret
-
AICheckLastPlayerMon:
ld a, [wPartyCount]
ld b, a
@@ -1851,7 +1795,6 @@ AICheckLastPlayerMon:
ret
-
AI_Smart_Nightmare:
; 50% chance to encourage this move.
; The AI_Basic layer will make sure that
@@ -1862,7 +1805,6 @@ AI_Smart_Nightmare:
dec [hl]
ret
-
AI_Smart_FlameWheel:
; Use this move if the enemy is frozen.
@@ -1874,7 +1816,6 @@ rept 5
endr
ret
-
AI_Smart_Curse:
ld a, [wEnemyMonType1]
cp GHOST
@@ -1932,14 +1873,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 +1901,6 @@ AI_Smart_Curse:
dec [hl]
ret
-
AI_Smart_Protect:
ld a, [wEnemyProtectCount]
and a
@@ -2014,7 +1952,6 @@ AI_Smart_Protect:
inc [hl]
ret
-
AI_Smart_Foresight:
ld a, [wEnemyAccLevel]
cp $5
@@ -2044,7 +1981,6 @@ AI_Smart_Foresight:
dec [hl]
ret
-
AI_Smart_PerishSong:
push hl
callfar FindAliveEnemyMons
@@ -2081,9 +2017,7 @@ AI_Smart_PerishSong:
ld [hl], a
ret
-
AI_Smart_Sandstorm:
-
; Greatly discourage this move if the player is immune to Sandstorm damage.
ld a, [wBattleMonType1]
push hl
@@ -2125,7 +2059,6 @@ AI_Smart_Sandstorm:
db STEEL
db -1 ; end
-
AI_Smart_Endure:
ld a, [wEnemyProtectCount]
and a
@@ -2168,7 +2101,6 @@ AI_Smart_Endure:
inc [hl]
ret
-
AI_Smart_FuryCutter:
; Encourage this move based on Fury Cutter's count.
@@ -2192,7 +2124,6 @@ AI_Smart_FuryCutter:
; fallthrough
-
AI_Smart_Rollout:
; Rollout, Fury Cutter
@@ -2235,7 +2166,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 +2187,6 @@ AI_Smart_Attract:
dec [hl]
ret
-
AI_Smart_Safeguard:
; 80% chance to discourage this move if player's HP is below 50%.
@@ -2268,10 +2197,8 @@ AI_Smart_Safeguard:
inc [hl]
ret
-
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
@@ -2300,7 +2227,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 +2240,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 +2258,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 +2282,6 @@ AI_Smart_RapidSpin:
dec [hl]
ret
-
AI_Smart_HiddenPower:
push hl
ld a, 1
@@ -2397,9 +2320,7 @@ AI_Smart_HiddenPower:
inc [hl]
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]
@@ -2420,9 +2341,7 @@ 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]
@@ -2442,7 +2361,6 @@ AI_Smart_SunnyDay:
; fallthrough
-
AI_Smart_WeatherMove:
; Rain Dance, Sunny Day
@@ -2492,10 +2410,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 +2434,6 @@ AI_Smart_BellyDrum:
ld [hl], a
ret
-
AI_Smart_PsychUp:
push hl
ld hl, wEnemyAtkLevel
@@ -2576,7 +2491,6 @@ AI_Smart_PsychUp:
inc [hl]
ret
-
AI_Smart_MirrorCoat:
push hl
ld hl, wPlayerUsedMoves
@@ -2626,7 +2540,6 @@ AI_Smart_MirrorCoat:
cp SPECIAL
jr c, .asm_391d2
-
.asm_391ca
call Random
cp 100
@@ -2640,10 +2553,8 @@ AI_Smart_MirrorCoat:
inc [hl]
ret
-
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
@@ -2671,7 +2582,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 +2597,6 @@ AI_Smart_FutureSight:
dec [hl]
ret
-
AI_Smart_Stomp:
; 80% chance to encourage this move if the player has used Minimize.
@@ -2701,7 +2610,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 +2637,6 @@ AI_Smart_Solarbeam:
dec [hl]
ret
-
AI_Smart_Thunder:
; 90% chance to discourage this move when it's sunny.
@@ -2744,7 +2651,6 @@ AI_Smart_Thunder:
inc [hl]
ret
-
AICompareSpeed:
; Return carry if enemy is faster than player.
@@ -2760,7 +2666,6 @@ AICompareSpeed:
pop bc
ret
-
AICheckPlayerMaxHP:
push hl
push de
@@ -2769,7 +2674,6 @@ AICheckPlayerMaxHP:
ld hl, wBattleMonMaxHP
jr AICheckMaxHP
-
AICheckEnemyMaxHP:
push hl
push de
@@ -2778,7 +2682,6 @@ AICheckEnemyMaxHP:
ld hl, wEnemyMonMaxHP
; fallthrough
-
AICheckMaxHP:
; Return carry if hp at de matches max hp at hl.
@@ -2805,7 +2708,6 @@ AICheckMaxHP:
and a
ret
-
AICheckPlayerHalfHP:
push hl
ld hl, wBattleMonHP
@@ -2823,7 +2725,6 @@ AICheckPlayerHalfHP:
pop hl
ret
-
AICheckEnemyHalfHP:
push hl
push de
@@ -2845,7 +2746,6 @@ AICheckEnemyHalfHP:
pop hl
ret
-
AICheckEnemyQuarterHP:
push hl
push de
@@ -2869,7 +2769,6 @@ AICheckEnemyQuarterHP:
pop hl
ret
-
AICheckPlayerQuarterHP:
push hl
ld hl, wBattleMonHP
@@ -2889,7 +2788,6 @@ AICheckPlayerQuarterHP:
pop hl
ret
-
AIHasMoveEffect:
; Return carry if the enemy has move b.
@@ -2921,7 +2819,6 @@ AIHasMoveEffect:
scf
ret
-
AIHasMoveInArray:
; Return carry if the enemy has a move in array hl.
@@ -2955,10 +2852,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 +2904,6 @@ AI_Opportunist:
INCLUDE "data/battle/ai/stall_moves.asm"
-
AI_Aggressive:
; Use whatever does the most damage.
@@ -3117,7 +3011,6 @@ AI_Aggressive:
INCLUDE "data/battle/ai/reckless_moves.asm"
-
AIDamageCalc:
ld a, 1
ld [hBattleTurn], a
@@ -3137,7 +3030,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 +3072,6 @@ AI_Cautious:
INCLUDE "data/battle/ai/residual_moves.asm"
-
AI_Status:
; Dismiss status moves that don't affect the player.
@@ -3243,7 +3134,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 +3203,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 +3232,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..b9bd2ea60 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]
@@ -439,8 +435,9 @@ FindAliveEnemyMonsWithASuperEffectiveMove:
and c
ld c, a
-FindEnemyMonsWithASuperEffectiveMove:
+ ; fallthrough
+FindEnemyMonsWithASuperEffectiveMove:
ld a, -1
ld [wEnemyAISwitchScore], a
ld hl, wOTPartyMon1Moves
@@ -546,7 +543,6 @@ FindEnemyMonsWithASuperEffectiveMove:
pop bc
ret
-
FindEnemyMonsThatResistPlayer:
push bc
ld hl, wOTPartySpecies
@@ -607,7 +603,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..8747f46a6 100644
--- a/engine/battle/battle_transition.asm
+++ b/engine/battle/battle_transition.asm
@@ -6,6 +6,8 @@ BATTLETRANSITION_NO_CAVE_STRONGER EQU $18
BATTLETRANSITION_FINISH EQU $20
BATTLETRANSITION_END EQU $80
+BATTLETRANSITION_SQUARE EQUS "\"8\"" ; $fe
+
DoBattleTransition:
call .InitGFX
ld a, [rBGP]
@@ -97,7 +99,7 @@ LoadTrainerBattlePokeballTiles:
; Load the tiles used in the Pokeball Graphic that fills the screen
; at the start of every Trainer battle.
ld de, TrainerBattlePokeballTiles
- ld hl, vTiles1 tile $7e
+ ld hl, vTiles0 tile BATTLETRANSITION_SQUARE
ld b, BANK(TrainerBattlePokeballTiles)
ld c, 2
call Request2bpp
@@ -108,7 +110,7 @@ LoadTrainerBattlePokeballTiles:
ld [rVBK], a
ld de, TrainerBattlePokeballTiles
- ld hl, vTiles4 tile $7e
+ ld hl, vTiles3 tile BATTLETRANSITION_SQUARE
ld b, BANK(TrainerBattlePokeballTiles)
ld c, 2
call Request2bpp
@@ -146,7 +148,6 @@ ConvertTrainerBattlePokeballTilesTo2bpp:
TrainerBattlePokeballTiles:
INCBIN "gfx/overworld/trainer_battle_pokeball_tiles.2bpp"
-
BattleTransitionJumptable:
jumptable .Jumptable, wJumptableIndex
@@ -617,7 +618,7 @@ StartTrainerBattle_LoadPokeBallGraphics:
jr z, .done
sla a
jr nc, .no_load
- ld [hl], $fe
+ ld [hl], BATTLETRANSITION_SQUARE
.no_load
inc hl
jr .loop4
@@ -753,7 +754,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..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
@@ -6486,7 +6485,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..3e6d928d2 100644
--- a/engine/battle/effect_commands.asm
+++ b/engine/battle/effect_commands.asm
@@ -7,8 +7,6 @@ DoPlayerTurn:
jr DoTurn
-
-
DoEnemyTurn:
call SetEnemyTurn
@@ -24,7 +22,6 @@ DoEnemyTurn:
; fallthrough
-
DoTurn:
; Read in and execute the user's move effects for this turn.
@@ -40,7 +37,6 @@ DoTurn:
call UpdateMoveData
-
DoMove:
; Get the user's move effect.
ld a, BATTLE_VARS_MOVE_EFFECT
@@ -72,7 +68,6 @@ DoMove:
ld [wBattleScriptBufferAddress + 1], a
.ReadMoveEffectCommand:
-
; ld a, [wBattleScriptBufferAddress++]
ld a, [wBattleScriptBufferAddress]
ld l, a
@@ -112,8 +107,6 @@ DoMove:
.DoMoveEffectCommand:
jp hl
-
-
CheckTurn:
BattleCommand_CheckTurn:
; checkturn
@@ -141,9 +134,7 @@ BattleCommand_CheckTurn:
and a
jp nz, CheckEnemyTurn
-
CheckPlayerTurn:
-
ld hl, wPlayerSubStatus4
bit SUBSTATUS_RECHARGE, [hl]
jr z, .no_recharge
@@ -156,7 +147,6 @@ CheckPlayerTurn:
.no_recharge
-
ld hl, wBattleMonStatus
ld a, [hl]
and SLP
@@ -202,7 +192,6 @@ CheckPlayerTurn:
.not_asleep
-
ld hl, wBattleMonStatus
bit FRZ, [hl]
jr z, .not_frozen
@@ -222,7 +211,6 @@ CheckPlayerTurn:
.not_frozen
-
ld hl, wPlayerSubStatus3
bit SUBSTATUS_FLINCHED, [hl]
jr z, .not_flinched
@@ -236,7 +224,6 @@ CheckPlayerTurn:
.not_flinched
-
ld hl, wPlayerDisableCount
ld a, [hl]
and a
@@ -254,7 +241,6 @@ CheckPlayerTurn:
.not_disabled
-
ld a, [wPlayerSubStatus3]
add a
jr nc, .not_confused
@@ -293,7 +279,6 @@ CheckPlayerTurn:
.not_confused
-
ld a, [wPlayerSubStatus1]
add a ; bit SUBSTATUS_ATTRACT
jr nc, .not_infatuated
@@ -317,7 +302,6 @@ CheckPlayerTurn:
.not_infatuated
-
; We can't disable a move that doesn't exist.
ld a, [wDisabledMove]
and a
@@ -334,7 +318,6 @@ CheckPlayerTurn:
.no_disabled_move
-
ld hl, wBattleMonStatus
bit PAR, [hl]
ret z
@@ -349,8 +332,6 @@ CheckPlayerTurn:
call CantMove
jp EndTurn
-
-
CantMove:
ld a, BATTLE_VARS_SUBSTATUS1
call GetBattleVarAddr
@@ -377,19 +358,12 @@ CantMove:
res SUBSTATUS_FLYING, [hl]
jp AppearUserRaiseSub
-
-
-
OpponentCantMove:
call BattleCommand_SwitchTurn
call CantMove
jp BattleCommand_SwitchTurn
-
-
-
CheckEnemyTurn:
-
ld hl, wEnemySubStatus4
bit SUBSTATUS_RECHARGE, [hl]
jr z, .no_recharge
@@ -402,7 +376,6 @@ CheckEnemyTurn:
.no_recharge
-
ld hl, wEnemyMonStatus
ld a, [hl]
and SLP
@@ -446,7 +419,6 @@ CheckEnemyTurn:
.not_asleep
-
ld hl, wEnemyMonStatus
bit FRZ, [hl]
jr z, .not_frozen
@@ -465,7 +437,6 @@ CheckEnemyTurn:
.not_frozen
-
ld hl, wEnemySubStatus3
bit SUBSTATUS_FLINCHED, [hl]
jr z, .not_flinched
@@ -479,7 +450,6 @@ CheckEnemyTurn:
.not_flinched
-
ld hl, wEnemyDisableCount
ld a, [hl]
and a
@@ -498,7 +468,6 @@ CheckEnemyTurn:
.not_disabled
-
ld a, [wEnemySubStatus3]
add a ; bit SUBSTATUS_CONFUSED
jr nc, .not_confused
@@ -513,7 +482,6 @@ CheckEnemyTurn:
call StdBattleTextBox
jr .not_confused
-
.confused
ld hl, IsConfusedText
call StdBattleTextBox
@@ -557,7 +525,6 @@ CheckEnemyTurn:
.not_confused
-
ld a, [wEnemySubStatus1]
add a ; bit SUBSTATUS_ATTRACT
jr nc, .not_infatuated
@@ -581,7 +548,6 @@ CheckEnemyTurn:
.not_infatuated
-
; We can't disable a move that doesn't exist.
ld a, [wEnemyDisabledMove]
and a
@@ -599,7 +565,6 @@ CheckEnemyTurn:
.no_disabled_move
-
ld hl, wEnemyMonStatus
bit PAR, [hl]
ret z
@@ -615,16 +580,12 @@ CheckEnemyTurn:
; fallthrough
-
EndTurn:
ld a, $1
ld [wTurnEnded], a
jp ResetDamage
-
-
MoveDisabled:
-
; Make sure any charged moves fail
ld a, BATTLE_VARS_SUBSTATUS3
call GetBattleVarAddr
@@ -638,10 +599,7 @@ MoveDisabled:
ld hl, DisabledMoveText
jp StdBattleTextBox
-
-
HitConfusion:
-
ld hl, HurtItselfText
call StdBattleTextBox
@@ -670,8 +628,6 @@ HitConfusion:
call DoPlayerDamage
jp BattleCommand_RaiseSub
-
-
BattleCommand_CheckObedience:
; checkobedience
@@ -714,7 +670,6 @@ BattleCommand_CheckObedience:
cp [hl]
ret z
-
.obeylevel
; The maximum obedience level is constrained by owned badges:
ld hl, wJohtoBadges
@@ -742,7 +697,6 @@ BattleCommand_CheckObedience:
; no badges
ld a, 10
-
.getlevel
; c = obedience level
; d = monster level
@@ -761,14 +715,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 +738,6 @@ BattleCommand_CheckObedience:
call IgnoreSleepOnly
ret c
-
; Another random number from 0 to obedience level + monster level
.rand2
call BattleRandom
@@ -797,7 +748,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 +770,6 @@ BattleCommand_CheckObedience:
call HitConfusion
jp .EndDisobedience
-
.Nap:
call BattleRandom
add a
@@ -833,7 +782,6 @@ BattleCommand_CheckObedience:
ld hl, BeganToNapText
jr .Print
-
.DoNothing:
; 4 random choices
call BattleRandom
@@ -857,9 +805,7 @@ BattleCommand_CheckObedience:
call StdBattleTextBox
jp .EndDisobedience
-
.UseInstead:
-
; Can't use another move if the monster only has one!
ld a, [wBattleMonMoves + 1]
and a
@@ -870,7 +816,6 @@ BattleCommand_CheckObedience:
and a
jr nz, .DoNothing
-
ld hl, wBattleMonPP
ld de, wBattleMonMoves
ld b, 0
@@ -891,7 +836,6 @@ BattleCommand_CheckObedience:
and a
jr nz, .GetTotalPP
-
.CheckMovePP:
ld hl, wBattleMonPP
ld a, [wCurMoveNum]
@@ -905,7 +849,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 +861,6 @@ BattleCommand_CheckObedience:
ld c, a
push af
-
.RandomMove:
call BattleRandom
maskbits NUM_MOVES
@@ -940,7 +882,6 @@ BattleCommand_CheckObedience:
and PP_MASK
jr z, .RandomMove
-
; Use it.
ld a, [wCurMoveNum]
ld c, a
@@ -954,12 +895,10 @@ BattleCommand_CheckObedience:
call UpdateMoveData
call DoMove
-
; Restore original move choice.
pop af
ld [wCurMoveNum], a
-
.EndDisobedience:
xor a
ld [wLastPlayerMove], a
@@ -973,10 +912,7 @@ BattleCommand_CheckObedience:
jp EndMoveEffect
-
-
IgnoreSleepOnly:
-
ld a, BATTLE_VARS_MOVE_ANIM
call GetBattleVar
@@ -1003,17 +939,12 @@ IgnoreSleepOnly:
scf
ret
-
-
BattleCommand_UsedMoveText:
; usedmovetext
farcall DisplayUsedMoveText
ret
-
-
CheckUserIsCharging:
-
ld a, [hBattleTurn]
and a
ld a, [wPlayerCharging] ; player
@@ -1023,8 +954,6 @@ CheckUserIsCharging:
and a
ret
-
-
BattleCommand_DoTurn:
call CheckUserIsCharging
ret nz
@@ -1150,7 +1079,6 @@ BattleCommand_DoTurn:
ld b, 1
ret
-
.continuousmoves
db EFFECT_RAZOR_WIND
db EFFECT_SKY_ATTACK
@@ -1192,8 +1120,6 @@ CheckMimicUsed:
and a
ret
-
-
BattleCommand_Critical:
; critical
@@ -1286,10 +1212,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
@@ -1474,8 +1398,6 @@ BattleCommand_Stab:
ld [wTypeModifier], a
ret
-
-
BattleCheckTypeMatchup:
ld hl, wEnemyMonType1
ld a, [hBattleTurn]
@@ -1555,8 +1477,6 @@ CheckTypeMatchup:
pop hl
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.
@@ -1576,13 +1496,10 @@ BattleCommand_ResetTypeMatchup:
ld [wTypeMatchup], a
ret
-
-
INCLUDE "engine/battle/ai/switch.asm"
INCLUDE "data/types/type_matchups.asm"
-
BattleCommand_DamageVariation:
; damagevariation
@@ -1592,7 +1509,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]
@@ -1636,8 +1552,6 @@ BattleCommand_DamageVariation:
ld [hl], a
ret
-
-
BattleCommand_CheckHit:
; checkhit
@@ -1706,7 +1620,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 +1633,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 +1646,6 @@ BattleCommand_CheckHit:
and SLP
ret
-
.Protect:
; Return nz if the opponent is protected.
ld a, BATTLE_VARS_SUBSTATUS1_OPP
@@ -1756,7 +1667,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 +1696,6 @@ BattleCommand_CheckHit:
and a
ret
-
.DrainSub:
; Return z if using an HP drain move on a substitute.
call CheckSubstituteOpp
@@ -1805,7 +1714,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 +1749,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,16 +1760,13 @@ BattleCommand_CheckHit:
cp WEATHER_RAIN
ret
-
.XAccuracy:
ld a, BATTLE_VARS_SUBSTATUS4
call GetBattleVar
bit SUBSTATUS_X_ACCURACY, a
ret
-
.StatModifiers:
-
ld a, [hBattleTurn]
and a
@@ -1955,7 +1859,6 @@ BattleCommand_CheckHit:
INCLUDE "data/battle/accuracy_multipliers.asm"
-
BattleCommand_EffectChance:
; effectchance
@@ -1983,8 +1886,6 @@ BattleCommand_EffectChance:
and a
ret
-
-
BattleCommand_LowerSub:
; lowersub
@@ -2053,16 +1954,12 @@ BattleCommand_LowerSub:
ld [wSomeoneIsRampaging], a
ret
-
-
BattleCommand_MoveAnim:
; moveanim
call BattleCommand_LowerSub
call BattleCommand_MoveAnimNoSub
jp BattleCommand_RaiseSub
-
-
BattleCommand_MoveAnimNoSub:
ld a, [wAttackMissed]
and a
@@ -2127,8 +2024,6 @@ BattleCommand_MoveAnimNoSub:
ld [wNumHits], a
jp PlayFXAnimID
-
-
BattleCommand_StatUpAnim:
ld a, [wAttackMissed]
and a
@@ -2137,8 +2032,6 @@ BattleCommand_StatUpAnim:
xor a
jr BattleCommand_StatUpDownAnim
-
-
BattleCommand_StatDownAnim:
ld a, [wAttackMissed]
and a
@@ -2152,7 +2045,6 @@ BattleCommand_StatDownAnim:
; fallthrough
-
BattleCommand_StatUpDownAnim:
ld [wNumHits], a
xor a
@@ -2163,8 +2055,6 @@ BattleCommand_StatUpDownAnim:
ld d, 0
jp PlayFXAnimID
-
-
BattleCommand_SwitchTurn:
; switchturn
@@ -2173,8 +2063,6 @@ BattleCommand_SwitchTurn:
ld [hBattleTurn], a
ret
-
-
BattleCommand_RaiseSub:
; raisesub
@@ -2194,8 +2082,6 @@ BattleCommand_RaiseSub:
ld a, SUBSTITUTE
jp LoadAnim
-
-
BattleCommand_FailureText:
; failuretext
; If the move missed or failed, load the appropriate
@@ -2238,8 +2124,6 @@ BattleCommand_FailureText:
call AppearUserRaiseSub
jp EndMoveEffect
-
-
BattleCommand_ApplyDamage:
; applydamage
@@ -2332,8 +2216,6 @@ BattleCommand_ApplyDamage:
ld [de], a
ret
-
-
GetFailureResultText:
ld hl, DoesntAffectText
ld de, DoesntAffectText
@@ -2402,8 +2284,6 @@ FailText_CheckOpponentProtect:
.not_protected
jp StdBattleTextBox
-
-
BattleCommand_BideFailText:
ld a, [wAttackMissed]
and a
@@ -2414,8 +2294,6 @@ BattleCommand_BideFailText:
jp z, PrintDoesntAffect
jp PrintButItFailed
-
-
BattleCommand_CriticalText:
; criticaltext
; Prints the message for critical hits or one-hit KOs.
@@ -2447,7 +2325,6 @@ BattleCommand_CriticalText:
dw CriticalHitText
dw OneHitKOText
-
BattleCommand_StartLoop:
; startloop
@@ -2461,8 +2338,6 @@ BattleCommand_StartLoop:
ld [hl], a
ret
-
-
BattleCommand_SuperEffectiveLoopText:
; supereffectivelooptext
@@ -2473,7 +2348,6 @@ BattleCommand_SuperEffectiveLoopText:
; fallthrough
-
BattleCommand_SuperEffectiveText:
; supereffectivetext
@@ -2487,8 +2361,6 @@ BattleCommand_SuperEffectiveText:
.print
jp StdBattleTextBox
-
-
BattleCommand_CheckDestinyBond:
; checkdestinybond
@@ -2576,8 +2448,6 @@ BattleCommand_CheckDestinyBond:
.finish
jp EndMoveEffect
-
-
BattleCommand_BuildOpponentRage:
; buildopponentrage
@@ -2609,8 +2479,6 @@ BattleCommand_BuildOpponentRage:
call StdBattleTextBox
jp BattleCommand_SwitchTurn
-
-
BattleCommand_RageDamage:
; ragedamage
@@ -2639,8 +2507,6 @@ BattleCommand_RageDamage:
ld [wCurDamage + 1], a
ret
-
-
EndMoveEffect:
ld a, [wBattleScriptBufferAddress]
ld l, a
@@ -2652,8 +2518,6 @@ EndMoveEffect:
ld [hl], a
ret
-
-
DittoMetalPowder:
ld a, MON_SPECIES
call BattlePartyAttr
@@ -2690,8 +2554,6 @@ DittoMetalPowder:
rr c
ret
-
-
BattleCommand_DamageStats:
; damagestats
@@ -2701,7 +2563,6 @@ BattleCommand_DamageStats:
; fallthrough
-
PlayerAttackDamage:
; Return move power d, player level e, enemy defense c and player attack b.
@@ -2784,8 +2645,6 @@ PlayerAttackDamage:
and a
ret
-
-
TruncateHL_BC:
.loop
; Truncate 16-bit values hl and bc to 8-bit values b and c respectively.
@@ -2831,8 +2690,6 @@ TruncateHL_BC:
ld b, l
ret
-
-
GetDamageStatsCritical:
; Return carry if non-critical.
@@ -2843,7 +2700,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.
@@ -2884,8 +2740,6 @@ GetDamageStats:
pop hl
ret
-
-
ThickClubBoost:
; Return in hl the stat value at hl.
@@ -2901,8 +2755,6 @@ ThickClubBoost:
pop bc
ret
-
-
LightBallBoost:
; Return in hl the stat value at hl.
@@ -2918,8 +2770,6 @@ LightBallBoost:
pop bc
ret
-
-
SpeciesItemBoost:
; Return in hl the stat value at hl.
@@ -2960,8 +2810,6 @@ SpeciesItemBoost:
rl h
ret
-
-
EnemyAttackDamage:
call ResetDamage
@@ -3040,11 +2888,8 @@ EnemyAttackDamage:
and a
ret
-
-
INCLUDE "engine/battle/move_effects/beat_up.asm"
-
BattleCommand_ClearMissDamage:
; clearmissdamage
ld a, [wAttackMissed]
@@ -3053,8 +2898,6 @@ BattleCommand_ClearMissDamage:
jp ResetDamage
-
-
HitSelfInConfusion:
call ResetDamage
ld a, [hBattleTurn]
@@ -3091,8 +2934,6 @@ HitSelfInConfusion:
ld e, a
ret
-
-
BattleCommand_DamageCalc:
; damagecalc
@@ -3216,12 +3057,11 @@ BattleCommand_DamageCalc:
ld [hDivisor], a
ld b, 4
call Divide
-.DoneItem:
+.DoneItem:
; Critical hits
call .CriticalMultiplier
-
; Update wCurDamage (capped at 997).
ld hl, wCurDamage
ld b, [hl]
@@ -3286,7 +3126,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 +3140,6 @@ BattleCommand_DamageCalc:
and a
ret
-
.CriticalMultiplier:
ld a, [wCriticalHit]
and a
@@ -3325,11 +3163,8 @@ BattleCommand_DamageCalc:
ret
-
-
INCLUDE "data/types/type_boost_items.asm"
-
BattleCommand_ConstantDamage:
; constantdamage
@@ -3490,7 +3325,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 +3339,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
@@ -3532,8 +3365,6 @@ BattleCommand_DefrostOpponent:
ld [hl], a
ret
-
-
INCLUDE "engine/battle/move_effects/sleep_talk.asm"
INCLUDE "engine/battle/move_effects/destiny_bond.asm"
@@ -3544,7 +3375,6 @@ INCLUDE "engine/battle/move_effects/false_swipe.asm"
INCLUDE "engine/battle/move_effects/heal_bell.asm"
-
FarPlayBattleAnimation:
; play animation de
@@ -3566,8 +3396,6 @@ PlayFXAnimID:
callfar PlayBattleAnim
ret
-
-
DoEnemyDamage:
ld hl, wCurDamage
ld a, [hli]
@@ -3628,8 +3456,6 @@ DoEnemyDamage:
.did_no_damage
jp RefreshBattleHuds
-
-
DoPlayerDamage:
ld hl, wCurDamage
ld a, [hli]
@@ -3690,8 +3516,6 @@ DoPlayerDamage:
.did_no_damage
jp RefreshBattleHuds
-
-
DoSubstituteDamage:
ld hl, SubTookDamageText
call StdBattleTextBox
@@ -3749,10 +3573,7 @@ DoSubstituteDamage:
.done
jp ResetDamage
-
-
UpdateMoveData:
-
ld a, BATTLE_VARS_MOVE_ANIM
call GetBattleVarAddr
ld d, h
@@ -3768,8 +3589,6 @@ UpdateMoveData:
call GetMoveName
jp CopyName1
-
-
BattleCommand_SleepTarget:
; sleeptarget
@@ -3841,8 +3660,6 @@ BattleCommand_SleepTarget:
pop hl
jp StdBattleTextBox
-
-
.CheckAIRandomFail:
; Enemy turn
ld a, [hBattleTurn]
@@ -3871,8 +3688,6 @@ BattleCommand_SleepTarget:
xor a
ret
-
-
BattleCommand_PoisonTarget:
; poisontarget
@@ -3908,8 +3723,6 @@ BattleCommand_PoisonTarget:
farcall UseHeldStatusHealingItem
ret
-
-
BattleCommand_Poison:
; poison
@@ -3998,15 +3811,11 @@ BattleCommand_Poison:
pop hl
jp StdBattleTextBox
-
-
.apply_poison
call AnimateCurrentMove
call PoisonOpponent
jp RefreshBattleHuds
-
-
.check_toxic
ld a, BATTLE_VARS_SUBSTATUS5_OPP
call GetBattleVarAddr
@@ -4021,8 +3830,6 @@ BattleCommand_Poison:
cp EFFECT_TOXIC
ret
-
-
CheckIfTargetIsPoisonType:
ld de, wEnemyMonType1
ld a, [hBattleTurn]
@@ -4038,32 +3845,24 @@ CheckIfTargetIsPoisonType:
cp POISON
ret
-
-
PoisonOpponent:
ld a, BATTLE_VARS_STATUS_OPP
call GetBattleVarAddr
set PSN, [hl]
jp UpdateOpponentInParty
-
-
BattleCommand_DrainTarget:
; draintarget
call SapHealth
ld hl, SuckedHealthText
jp StdBattleTextBox
-
-
BattleCommand_EatDream:
; eatdream
call SapHealth
ld hl, DreamEatenText
jp StdBattleTextBox
-
-
SapHealth:
; Divide damage by 2, store it in hDividend
ld hl, wCurDamage
@@ -4157,8 +3956,6 @@ SapHealth:
call RefreshBattleHuds
jp UpdateBattleMonInParty
-
-
BattleCommand_BurnTarget:
; burntarget
@@ -4200,8 +3997,6 @@ BattleCommand_BurnTarget:
farcall UseHeldStatusHealingItem
ret
-
-
Defrost:
ld a, [hl]
and 1 << FRZ
@@ -4227,8 +4022,6 @@ Defrost:
ld hl, DefrostedOpponentText
jp StdBattleTextBox
-
-
BattleCommand_FreezeTarget:
; freezetarget
@@ -4282,8 +4075,6 @@ BattleCommand_FreezeTarget:
ld [hl], $1
ret
-
-
BattleCommand_ParalyzeTarget:
; paralyzetarget
@@ -4320,8 +4111,6 @@ BattleCommand_ParalyzeTarget:
ld hl, UseHeldStatusHealingItem
jp CallBattleCore
-
-
BattleCommand_AttackUp:
; attackup
ld b, ATTACK
@@ -4400,8 +4189,6 @@ BattleCommand_StatUp:
ret nz
jp StatUpAnimation
-
-
CheckIfStatCanBeRaised:
ld a, b
ld [wLoweredStat], a
@@ -4481,14 +4268,11 @@ CheckIfStatCanBeRaised:
ld [wFailedMessage], a
ret
-
-
.stats_already_max
pop hl
dec [hl]
; fallthrough
-
.cant_raise_stat
ld a, $2
ld [wFailedMessage], a
@@ -4496,15 +4280,11 @@ CheckIfStatCanBeRaised:
ld [wAttackMissed], a
ret
-
-
.stat_raise_failed
ld a, $1
ld [wFailedMessage], a
ret
-
-
StatUpAnimation:
ld bc, wPlayerMinimized
ld hl, DropPlayerSub
@@ -4530,8 +4310,6 @@ StatUpAnimation:
call WaitBGMap
jp BattleCommand_MoveDelay
-
-
BattleCommand_AttackDown:
; attackdown
ld a, ATTACK
@@ -4724,8 +4502,6 @@ BattleCommand_StatDown:
ld [wAttackMissed], a
ret
-
-
CheckMist:
ld a, BATTLE_VARS_MOVE_EFFECT
call GetBattleVar
@@ -4751,8 +4527,6 @@ CheckMist:
bit SUBSTATUS_MIST, a
ret
-
-
BattleCommand_StatUpMessage:
ld a, [wFailedMessage]
and a
@@ -4783,8 +4557,6 @@ BattleCommand_StatUpMessage:
text_jump UnknownText_0x1c0ce0
db "@"
-
-
BattleCommand_StatDownMessage:
ld a, [wFailedMessage]
and a
@@ -4814,8 +4586,6 @@ BattleCommand_StatDownMessage:
text_jump UnknownText_0x1c0d06
db "@"
-
-
TryLowerStat:
; Lower stat c from stat struct hl (buffer de).
@@ -4859,8 +4629,6 @@ TryLowerStat:
and a
ret
-
-
BattleCommand_StatUpFailText:
; statupfailtext
ld a, [wFailedMessage]
@@ -4879,8 +4647,6 @@ BattleCommand_StatUpFailText:
ld hl, WontRiseAnymoreText
jp StdBattleTextBox
-
-
BattleCommand_StatDownFailText:
; statdownfailtext
ld a, [wFailedMessage]
@@ -4902,8 +4668,6 @@ BattleCommand_StatDownFailText:
ld hl, WontDropAnymoreText
jp StdBattleTextBox
-
-
GetStatName:
ld hl, StatNames
ld c, "@"
@@ -4923,10 +4687,8 @@ GetStatName:
INCLUDE "data/battle/stat_names.asm"
-
INCLUDE "data/battle/stat_multipliers.asm"
-
BattleCommand_AllStatsUp:
; allstatsup
@@ -4955,14 +4717,11 @@ BattleCommand_AllStatsUp:
call BattleCommand_SpecialDefenseUp
jp BattleCommand_StatUpMessage
-
ResetMiss:
xor a
ld [wAttackMissed], a
ret
-
-
LowerStat:
ld [wLoweredStat], a
@@ -5034,8 +4793,6 @@ LowerStat:
ld [wFailedMessage], a
ret
-
-
BattleCommand_TriStatusChance:
; tristatuschance
@@ -5057,7 +4814,6 @@ BattleCommand_TriStatusChance:
dw BattleCommand_FreezeTarget ; freeze
dw BattleCommand_BurnTarget ; burn
-
BattleCommand_Curl:
; curl
ld a, BATTLE_VARS_SUBSTATUS2
@@ -5065,8 +4821,6 @@ BattleCommand_Curl:
set SUBSTATUS_CURLED, [hl]
ret
-
-
BattleCommand_RaiseSubNoAnim:
ld hl, GetBattleMonBackpic
ld a, [hBattleTurn]
@@ -5079,8 +4833,6 @@ BattleCommand_RaiseSubNoAnim:
call CallBattleCore
jp WaitBGMap
-
-
BattleCommand_LowerSubNoAnim:
ld hl, DropPlayerSub
ld a, [hBattleTurn]
@@ -5093,8 +4845,6 @@ BattleCommand_LowerSubNoAnim:
call CallBattleCore
jp WaitBGMap
-
-
CalcPlayerStats:
ld hl, wPlayerAtkLevel
ld de, wPlayerStats
@@ -5116,8 +4866,6 @@ CalcPlayerStats:
jp BattleCommand_SwitchTurn
-
-
CalcEnemyStats:
ld hl, wEnemyAtkLevel
ld de, wEnemyStats
@@ -5136,8 +4884,6 @@ CalcEnemyStats:
jp BattleCommand_SwitchTurn
-
-
CalcStats:
.loop
push af
@@ -5207,11 +4953,8 @@ CalcStats:
ret
-
-
INCLUDE "engine/battle/move_effects/bide.asm"
-
BattleCommand_CheckRampage:
; checkrampage
@@ -5249,8 +4992,6 @@ BattleCommand_CheckRampage:
ld b, rampage_command
jp SkipToBattleCommand
-
-
BattleCommand_Rampage:
; rampage
@@ -5278,11 +5019,8 @@ BattleCommand_Rampage:
ld [wSomeoneIsRampaging], a
ret
-
-
INCLUDE "engine/battle/move_effects/teleport.asm"
-
SetBattleDraw:
ld a, [wBattleResult]
and BATTLERESULT_BITMASK
@@ -5290,8 +5028,6 @@ SetBattleDraw:
ld [wBattleResult], a
ret
-
-
BattleCommand_ForceSwitch:
; forceswitch
@@ -5511,8 +5247,6 @@ BattleCommand_ForceSwitch:
.do_text
jp StdBattleTextBox
-
-
CheckPlayerHasMonToSwitchTo:
ld a, [wPartyCount]
ld d, a
@@ -5542,8 +5276,6 @@ CheckPlayerHasMonToSwitchTo:
and a
ret
-
-
BattleCommand_EndLoop:
; endloop
@@ -5678,8 +5410,6 @@ BattleCommand_EndLoop:
ld [wBattleScriptBufferAddress], a
ret
-
-
BattleCommand_FakeOut:
ld a, [wAttackMissed]
and a
@@ -5701,8 +5431,6 @@ BattleCommand_FakeOut:
ld [wAttackMissed], a
ret
-
-
BattleCommand_FlinchTarget:
call CheckSubstituteOpp
ret nz
@@ -5721,15 +5449,12 @@ BattleCommand_FlinchTarget:
; fallthrough
-
FlinchTarget:
ld a, BATTLE_VARS_SUBSTATUS3_OPP
call GetBattleVarAddr
set SUBSTATUS_FLINCHED, [hl]
jp EndRechargeOpp
-
-
CheckOpponentWentFirst:
; Returns a=0, z if user went first
; Returns a=1, nz if opponent went first
@@ -5741,8 +5466,6 @@ CheckOpponentWentFirst:
pop bc
ret
-
-
BattleCommand_HeldFlinch:
; kingsrock
@@ -5771,8 +5494,6 @@ BattleCommand_HeldFlinch:
set SUBSTATUS_FLINCHED, [hl]
ret
-
-
BattleCommand_OHKO:
; ohko
@@ -5819,8 +5540,6 @@ BattleCommand_OHKO:
ld [wAttackMissed], a
ret
-
-
BattleCommand_CheckCharge:
; checkcharge
@@ -5834,8 +5553,6 @@ BattleCommand_CheckCharge:
ld b, charge_command
jp SkipToBattleCommand
-
-
BattleCommand_Charge:
; charge
@@ -5977,13 +5694,10 @@ BattleCommand_Charge:
text_jump UnknownText_0x1c0d6c
db "@"
-
BattleCommand3c:
; unused
ret
-
-
BattleCommand_TrapTarget:
; traptarget
@@ -6040,12 +5754,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
@@ -6110,8 +5822,6 @@ BattleCommand_Recoil:
ld hl, RecoilText
jp StdBattleTextBox
-
-
BattleCommand_ConfuseTarget:
; confusetarget
@@ -6132,7 +5842,6 @@ BattleCommand_ConfuseTarget:
ret nz
jr BattleCommand_FinishConfusingTarget
-
BattleCommand_Confuse:
; confuse
@@ -6205,7 +5914,6 @@ BattleCommand_FinishConfusingTarget:
ld hl, UseConfusionHealingItem
jp CallBattleCore
-
BattleCommand_Confuse_CheckSnore_Swagger_ConfuseHit:
ld a, BATTLE_VARS_MOVE_EFFECT
call GetBattleVar
@@ -6217,8 +5925,6 @@ BattleCommand_Confuse_CheckSnore_Swagger_ConfuseHit:
ret z
jp PrintDidntAffect2
-
-
BattleCommand_Paralyze:
; paralyze
@@ -6299,8 +6005,6 @@ BattleCommand_Paralyze:
call AnimateFailedMove
jp PrintDoesntAffect
-
-
CheckMoveTypeMatchesTarget:
; Compare move type to opponent type.
; Return z if matching the opponent type,
@@ -6336,11 +6040,8 @@ CheckMoveTypeMatchesTarget:
pop hl
ret
-
-
INCLUDE "engine/battle/move_effects/substitute.asm"
-
BattleCommand_RechargeNextTurn:
; rechargenextturn
ld a, BATTLE_VARS_SUBSTATUS4
@@ -6348,8 +6049,6 @@ BattleCommand_RechargeNextTurn:
set SUBSTATUS_RECHARGE, [hl]
ret
-
-
EndRechargeOpp:
push hl
ld a, BATTLE_VARS_SUBSTATUS4_OPP
@@ -6358,11 +6057,8 @@ EndRechargeOpp:
pop hl
ret
-
-
INCLUDE "engine/battle/move_effects/rage.asm"
-
BattleCommand_DoubleFlyingDamage:
; doubleflyingdamage
ld a, BATTLE_VARS_SUBSTATUS3_OPP
@@ -6371,8 +6067,6 @@ BattleCommand_DoubleFlyingDamage:
ret z
jr DoubleDamage
-
-
BattleCommand_DoubleUndergroundDamage:
; doubleundergrounddamage
ld a, BATTLE_VARS_SUBSTATUS3_OPP
@@ -6382,7 +6076,6 @@ BattleCommand_DoubleUndergroundDamage:
; fallthrough
-
DoubleDamage:
ld hl, wCurDamage + 1
sla [hl]
@@ -6396,8 +6089,6 @@ DoubleDamage:
.quit
ret
-
-
INCLUDE "engine/battle/move_effects/mimic.asm"
INCLUDE "engine/battle/move_effects/leech_seed.asm"
@@ -6410,7 +6101,6 @@ INCLUDE "engine/battle/move_effects/pay_day.asm"
INCLUDE "engine/battle/move_effects/conversion.asm"
-
BattleCommand_ResetStats:
; resetstats
@@ -6444,8 +6134,6 @@ BattleCommand_ResetStats:
jr nz, .next
ret
-
-
BattleCommand_Heal:
; heal
@@ -6528,11 +6216,8 @@ BattleCommand_Heal:
ld hl, HPIsFullText
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.
@@ -6548,14 +6233,10 @@ BattleSideCopy:
.copy
jp CopyBytes
-
-
BattleEffect_ButItFailed:
call AnimateFailedMove
jp PrintButItFailed
-
-
ClearLastMove:
ld a, BATTLE_VARS_LAST_COUNTER_MOVE
call GetBattleVarAddr
@@ -6568,8 +6249,6 @@ ClearLastMove:
ld [hl], a
ret
-
-
ResetActorDisable:
ld a, [hBattleTurn]
and a
@@ -6586,8 +6265,6 @@ ResetActorDisable:
ld [wDisabledMove], a
ret
-
-
BattleCommand_Screen:
; screen
@@ -6633,22 +6310,16 @@ BattleCommand_Screen:
call AnimateFailedMove
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 +6327,11 @@ TryPrintButItFailed:
; fallthrough
-
PrintButItFailed:
; 'but it failed!'
ld hl, ButItFailedText
jp StdBattleTextBox
-
-
FailMove:
call AnimateFailedMove
; fallthrough
@@ -6673,45 +6341,34 @@ FailMimic:
ld de, ItFailedText ; 'it failed!'
jp FailText_CheckOpponentProtect
-
-
PrintDidntAffect:
; 'it didn't affect'
ld hl, DidntAffect1Text
jp StdBattleTextBox
-
-
PrintDidntAffect2:
call AnimateFailedMove
ld hl, DidntAffect1Text ; 'it didn't affect'
ld de, DidntAffect2Text ; 'it didn't affect'
jp FailText_CheckOpponentProtect
-
-
PrintParalyze:
; 'paralyzed! maybe it can't attack!'
ld hl, ParalyzedText
jp StdBattleTextBox
-
-
CheckSubstituteOpp:
ld a, BATTLE_VARS_SUBSTATUS4_OPP
call GetBattleVar
bit SUBSTATUS_SUBSTITUTE, a
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
@@ -6736,8 +6393,6 @@ CheckUserMove:
and a
ret
-
-
ResetTurn:
ld hl, wPlayerCharging
ld a, [hBattleTurn]
@@ -6752,11 +6407,8 @@ ResetTurn:
call DoMove
jp EndMoveEffect
-
-
INCLUDE "engine/battle/move_effects/thief.asm"
-
BattleCommand_ArenaTrap:
; arenatrap
@@ -6783,11 +6435,8 @@ BattleCommand_ArenaTrap:
call AnimateFailedMove
jp PrintButItFailed
-
-
INCLUDE "engine/battle/move_effects/nightmare.asm"
-
BattleCommand_Defrost:
; defrost
@@ -6819,8 +6468,6 @@ BattleCommand_Defrost:
ld hl, WasDefrostedText
jp StdBattleTextBox
-
-
INCLUDE "engine/battle/move_effects/curse.asm"
INCLUDE "engine/battle/move_effects/protect.asm"
@@ -6837,13 +6484,10 @@ 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 +6500,6 @@ INCLUDE "engine/battle/move_effects/frustration.asm"
INCLUDE "engine/battle/move_effects/safeguard.asm"
-
SafeCheckSafeguard:
push hl
ld hl, wEnemyScreens
@@ -6870,8 +6513,6 @@ SafeCheckSafeguard:
pop hl
ret
-
-
BattleCommand_CheckSafeguard:
; checksafeguard
ld hl, wEnemyScreens
@@ -6889,8 +6530,6 @@ BattleCommand_CheckSafeguard:
call StdBattleTextBox
jp EndMoveEffect
-
-
INCLUDE "engine/battle/move_effects/magnitude.asm"
INCLUDE "engine/battle/move_effects/baton_pass.asm"
@@ -6899,19 +6538,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 +6635,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 +6647,6 @@ INCLUDE "engine/battle/move_effects/psych_up.asm"
INCLUDE "engine/battle/move_effects/mirror_coat.asm"
-
BattleCommand_DoubleMinimizeDamage:
; doubleminimizedamage
@@ -7035,8 +6669,6 @@ BattleCommand_DoubleMinimizeDamage:
ld [hl], a
ret
-
-
BattleCommand_SkipSunCharge:
; mimicsuncharge
ld a, [wBattleWeather]
@@ -7045,13 +6677,10 @@ BattleCommand_SkipSunCharge:
ld b, charge_command
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
@@ -7059,8 +6688,6 @@ CheckHiddenOpponent:
and 1 << SUBSTATUS_FLYING | 1 << SUBSTATUS_UNDERGROUND
ret
-
-
GetUserItem:
; Return the effect of the user's item in bc, and its id at hl.
ld hl, wBattleMonItem
@@ -7072,8 +6699,6 @@ GetUserItem:
ld b, [hl]
jp GetItemHeldEffect
-
-
GetOpponentItem:
; Return the effect of the opponent's item in bc, and its id at hl.
ld hl, wEnemyMonItem
@@ -7085,8 +6710,6 @@ GetOpponentItem:
ld b, [hl]
jp GetItemHeldEffect
-
-
GetItemHeldEffect:
; Return the effect of item b in bc.
ld a, b
@@ -7107,8 +6730,6 @@ GetItemHeldEffect:
pop hl
ret
-
-
AnimateCurrentMoveEitherSide:
push hl
push de
@@ -7125,8 +6746,6 @@ AnimateCurrentMoveEitherSide:
pop hl
ret
-
-
AnimateCurrentMove:
push hl
push de
@@ -7143,8 +6762,6 @@ AnimateCurrentMove:
pop hl
ret
-
-
PlayDamageAnim:
xor a
ld [wFXAnimID + 1], a
@@ -7167,8 +6784,6 @@ PlayDamageAnim:
jp PlayUserBattleAnim
-
-
LoadMoveAnim:
xor a
ld [wNumHits], a
@@ -7181,13 +6796,11 @@ LoadMoveAnim:
; fallthrough
-
LoadAnim:
ld [wFXAnimID], a
; fallthrough
-
PlayUserBattleAnim:
push hl
push de
@@ -7198,8 +6811,6 @@ PlayUserBattleAnim:
pop hl
ret
-
-
PlayOpponentBattleAnim:
ld a, e
ld [wFXAnimID], a
@@ -7221,30 +6832,22 @@ PlayOpponentBattleAnim:
pop hl
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.
ld c, 40
jp DelayFrames
-
-
BattleCommand_ClearText:
; cleartext
@@ -7255,7 +6858,6 @@ BattleCommand_ClearText:
.text
db "@"
-
SkipToBattleCommand:
; Skip over commands until reaching command b.
ld a, [wBattleScriptBufferAddress + 1]
@@ -7273,8 +6875,6 @@ SkipToBattleCommand:
ld [wBattleScriptBufferAddress], a
ret
-
-
GetMoveAttr:
; Assuming hl = Moves + x, return attribute x of move a.
push bc
@@ -7284,8 +6884,6 @@ GetMoveAttr:
pop bc
ret
-
-
GetMoveData:
; Copy move struct a to de.
ld hl, Moves
@@ -7294,32 +6892,22 @@ GetMoveData:
ld a, BANK(Moves)
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
@@ -7330,4 +6918,3 @@ _CheckBattleScene:
pop de
pop hl
ret
-
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..48062f643 100644
--- a/engine/battle/misc.asm
+++ b/engine/battle/misc.asm
@@ -49,9 +49,7 @@ GetPlayerBackpicCoords:
lb bc, 6, 6
ret
-
DoWeatherModifiers:
-
ld de, WeatherTypeModifiers
ld a, [wBattleWeather]
ld b, a
@@ -76,7 +74,6 @@ DoWeatherModifiers:
inc de
jr .CheckWeatherType
-
.done_weather_types
ld de, WeatherMoveModifiers
@@ -147,7 +144,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..5d9f19838 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,9 +44,7 @@ BattleCommand_BatonPass:
call ResetBatonPassStatus
ret
-
.Enemy:
-
; Wildmons don't have anything to switch to
ld a, [wBattleMode]
dec a ; WILDMON
@@ -81,8 +78,6 @@ BattleCommand_BatonPass:
jr ResetBatonPassStatus
-
-
BatonPass_LinkPlayerSwitch:
ld a, [wLinkMode]
and a
@@ -100,8 +95,6 @@ BatonPass_LinkPlayerSwitch:
ld [wBattlePlayerAction], a
ret
-
-
BatonPass_LinkEnemySwitch:
ld a, [wLinkMode]
and a
@@ -127,14 +120,10 @@ BatonPass_LinkEnemySwitch:
.switch
jp CloseWindow
-
-
FailedBatonPass:
call AnimateFailedMove
jp PrintButItFailed
-
-
ResetBatonPassStatus:
; Reset status changes that aren't passed by Baton Pass.
@@ -174,8 +163,6 @@ ResetBatonPassStatus:
ld [wEnemyWrapCount], a
ret
-
-
CheckAnyOtherAlivePartyMons:
ld hl, wPartyMon1HP
ld a, [wPartyCount]
@@ -184,8 +171,6 @@ CheckAnyOtherAlivePartyMons:
ld e, a
jr CheckAnyOtherAliveMons
-
-
CheckAnyOtherAliveEnemyMons:
ld hl, wOTPartyMon1HP
ld a, [wOTPartyCount]
@@ -230,4 +215,3 @@ CheckAnyOtherAliveMons:
ld a, b
and a
ret
-
diff --git a/engine/battle/move_effects/beat_up.asm b/engine/battle/move_effects/beat_up.asm
index 40a375e0d..673fc46c6 100644
--- a/engine/battle/move_effects/beat_up.asm
+++ b/engine/battle/move_effects/beat_up.asm
@@ -193,14 +193,10 @@ BattleCommand_BeatUp:
ld d, a
ret
-
-
.beatup_fail
ld b, buildopponentrage_command
jp SkipToBattleCommand
-
-
BattleCommand_BeatUpFailText:
; beatupfailtext
@@ -210,8 +206,6 @@ BattleCommand_BeatUpFailText:
jp PrintButItFailed
-
-
GetBeatupMonLocation:
push bc
ld c, a
diff --git a/engine/battle/move_effects/belly_drum.asm b/engine/battle/move_effects/belly_drum.asm
index aec3a1d68..27ef1a542 100644
--- a/engine/battle/move_effects/belly_drum.asm
+++ b/engine/battle/move_effects/belly_drum.asm
@@ -32,4 +32,3 @@ BattleCommand_BellyDrum:
.failed
call AnimateFailedMove
jp PrintButItFailed
-
diff --git a/engine/battle/move_effects/bide.asm b/engine/battle/move_effects/bide.asm
index b28773df9..871e0e7a8 100644
--- a/engine/battle/move_effects/bide.asm
+++ b/engine/battle/move_effects/bide.asm
@@ -69,8 +69,6 @@ BattleCommand_StoreEnergy:
call StdBattleTextBox
jp EndMoveEffect
-
-
BattleCommand_UnleashEnergy:
; unleashenergy
@@ -100,4 +98,3 @@ BattleCommand_UnleashEnergy:
ld [wKickCounter], a
call AnimateCurrentMove
jp EndMoveEffect
-
diff --git a/engine/battle/move_effects/conversion.asm b/engine/battle/move_effects/conversion.asm
index bc2c746df..f9307056c 100644
--- a/engine/battle/move_effects/conversion.asm
+++ b/engine/battle/move_effects/conversion.asm
@@ -94,4 +94,3 @@ BattleCommand_Conversion:
call AnimateCurrentMove
ld hl, TransformedTypeText
jp StdBattleTextBox
-
diff --git a/engine/battle/move_effects/conversion2.asm b/engine/battle/move_effects/conversion2.asm
index b1d0e6282..14a7e257a 100644
--- a/engine/battle/move_effects/conversion2.asm
+++ b/engine/battle/move_effects/conversion2.asm
@@ -62,4 +62,3 @@ BattleCommand_Conversion2:
.failed
jp FailMove
-
diff --git a/engine/battle/move_effects/counter.asm b/engine/battle/move_effects/counter.asm
index 9d10d1865..f92e1b3ac 100644
--- a/engine/battle/move_effects/counter.asm
+++ b/engine/battle/move_effects/counter.asm
@@ -56,4 +56,3 @@ BattleCommand_Counter:
xor a
ld [wAttackMissed], a
ret
-
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/destiny_bond.asm b/engine/battle/move_effects/destiny_bond.asm
index 427c8b08a..55809d98a 100644
--- a/engine/battle/move_effects/destiny_bond.asm
+++ b/engine/battle/move_effects/destiny_bond.asm
@@ -7,4 +7,3 @@ BattleCommand_DestinyBond:
call AnimateCurrentMove
ld hl, DestinyBondEffectText
jp StdBattleTextBox
-
diff --git a/engine/battle/move_effects/disable.asm b/engine/battle/move_effects/disable.asm
index b1055b200..44017e30d 100644
--- a/engine/battle/move_effects/disable.asm
+++ b/engine/battle/move_effects/disable.asm
@@ -70,4 +70,3 @@ BattleCommand_Disable:
.failed
jp FailMove
-
diff --git a/engine/battle/move_effects/encore.asm b/engine/battle/move_effects/encore.asm
index e65925f52..f436fd970 100644
--- a/engine/battle/move_effects/encore.asm
+++ b/engine/battle/move_effects/encore.asm
@@ -118,4 +118,3 @@ BattleCommand_Encore:
.failed
jp PrintDidntAffect2
-
diff --git a/engine/battle/move_effects/false_swipe.asm b/engine/battle/move_effects/false_swipe.asm
index c61aa534a..4f4eb329c 100644
--- a/engine/battle/move_effects/false_swipe.asm
+++ b/engine/battle/move_effects/false_swipe.asm
@@ -46,4 +46,3 @@ BattleCommand_FalseSwipe:
.done
and a
ret
-
diff --git a/engine/battle/move_effects/focus_energy.asm b/engine/battle/move_effects/focus_energy.asm
index 8fa6b19ff..ffdc7b136 100644
--- a/engine/battle/move_effects/focus_energy.asm
+++ b/engine/battle/move_effects/focus_energy.asm
@@ -13,4 +13,3 @@ BattleCommand_FocusEnergy:
.already_pumped
call AnimateFailedMove
jp PrintButItFailed
-
diff --git a/engine/battle/move_effects/frustration.asm b/engine/battle/move_effects/frustration.asm
index 5e45636be..3d395b510 100644
--- a/engine/battle/move_effects/frustration.asm
+++ b/engine/battle/move_effects/frustration.asm
@@ -25,4 +25,3 @@ BattleCommand_FrustrationPower:
ld d, a
pop bc
ret
-
diff --git a/engine/battle/move_effects/fury_cutter.asm b/engine/battle/move_effects/fury_cutter.asm
index b34264d62..6aa6b7838 100644
--- a/engine/battle/move_effects/fury_cutter.asm
+++ b/engine/battle/move_effects/fury_cutter.asm
@@ -38,10 +38,7 @@ BattleCommand_FuryCutter:
ld [hl], a
ret
-
-
ResetFuryCutterCount:
-
push hl
ld hl, wPlayerFuryCutterCount
@@ -56,4 +53,3 @@ ResetFuryCutterCount:
pop hl
ret
-
diff --git a/engine/battle/move_effects/future_sight.asm b/engine/battle/move_effects/future_sight.asm
index c1b5c0e72..c28841b35 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
@@ -80,4 +79,3 @@ BattleCommand_FutureSight:
call AnimateFailedMove
call PrintButItFailed
jp EndMoveEffect
-
diff --git a/engine/battle/move_effects/heal_bell.asm b/engine/battle/move_effects/heal_bell.asm
index 060ac3423..2570a53ba 100644
--- a/engine/battle/move_effects/heal_bell.asm
+++ b/engine/battle/move_effects/heal_bell.asm
@@ -32,4 +32,3 @@ BattleCommand_HealBell:
and a
jp z, CalcPlayerStats
jp CalcEnemyStats
-
diff --git a/engine/battle/move_effects/hidden_power.asm b/engine/battle/move_effects/hidden_power.asm
index 19d7e0b32..3b40a6c31 100644
--- a/engine/battle/move_effects/hidden_power.asm
+++ b/engine/battle/move_effects/hidden_power.asm
@@ -6,4 +6,3 @@ BattleCommand_HiddenPower:
ret nz
farcall HiddenPowerDamage
ret
-
diff --git a/engine/battle/move_effects/leech_seed.asm b/engine/battle/move_effects/leech_seed.asm
index 44019a6ad..5602e7f62 100644
--- a/engine/battle/move_effects/leech_seed.asm
+++ b/engine/battle/move_effects/leech_seed.asm
@@ -38,4 +38,3 @@ BattleCommand_LeechSeed:
call AnimateFailedMove
ld hl, EvadedText
jp StdBattleTextBox
-
diff --git a/engine/battle/move_effects/lock_on.asm b/engine/battle/move_effects/lock_on.asm
index 7b6503575..7dc4a013d 100644
--- a/engine/battle/move_effects/lock_on.asm
+++ b/engine/battle/move_effects/lock_on.asm
@@ -19,4 +19,3 @@ BattleCommand_LockOn:
.fail
call AnimateFailedMove
jp PrintDidntAffect
-
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/mimic.asm b/engine/battle/move_effects/mimic.asm
index 2f91d6a1d..b1c6608fa 100644
--- a/engine/battle/move_effects/mimic.asm
+++ b/engine/battle/move_effects/mimic.asm
@@ -48,4 +48,3 @@ BattleCommand_Mimic:
.fail
jp FailMimic
-
diff --git a/engine/battle/move_effects/mirror_coat.asm b/engine/battle/move_effects/mirror_coat.asm
index f8b8ca114..8743c389d 100644
--- a/engine/battle/move_effects/mirror_coat.asm
+++ b/engine/battle/move_effects/mirror_coat.asm
@@ -57,4 +57,3 @@ BattleCommand_MirrorCoat:
xor a
ld [wAttackMissed], a
ret
-
diff --git a/engine/battle/move_effects/mist.asm b/engine/battle/move_effects/mist.asm
index 52e4e59f4..199a30045 100644
--- a/engine/battle/move_effects/mist.asm
+++ b/engine/battle/move_effects/mist.asm
@@ -13,4 +13,3 @@ BattleCommand_Mist:
.already_mist
call AnimateFailedMove
jp PrintButItFailed
-
diff --git a/engine/battle/move_effects/pain_split.asm b/engine/battle/move_effects/pain_split.asm
index a4dbd3d44..4e4380b23 100644
--- a/engine/battle/move_effects/pain_split.asm
+++ b/engine/battle/move_effects/pain_split.asm
@@ -89,7 +89,5 @@ BattleCommand_PainSplit:
ld [wBuffer6], a
ret
-
.ButItFailed:
jp PrintDidntAffect2
-
diff --git a/engine/battle/move_effects/pay_day.asm b/engine/battle/move_effects/pay_day.asm
index 53705d434..ba1dce884 100644
--- a/engine/battle/move_effects/pay_day.asm
+++ b/engine/battle/move_effects/pay_day.asm
@@ -24,4 +24,3 @@ BattleCommand_PayDay:
.done
ld hl, CoinsScatteredText
jp StdBattleTextBox
-
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..9025d2f4b 100644
--- a/engine/battle/move_effects/protect.asm
+++ b/engine/battle/move_effects/protect.asm
@@ -12,9 +12,7 @@ BattleCommand_Protect:
ld hl, ProtectedItselfText
jp StdBattleTextBox
-
ProtectChance:
-
ld de, wPlayerProtectCount
ld a, [hBattleTurn]
and a
@@ -68,7 +66,6 @@ ProtectChance:
and a
ret
-
.failed
xor a
ld [de], a
diff --git a/engine/battle/move_effects/psych_up.asm b/engine/battle/move_effects/psych_up.asm
index 743e93c86..02fdef5d2 100644
--- a/engine/battle/move_effects/psych_up.asm
+++ b/engine/battle/move_effects/psych_up.asm
@@ -47,4 +47,3 @@ BattleCommand_PsychUp:
call AnimateCurrentMove
ld hl, CopiedStatsText
jp StdBattleTextBox
-
diff --git a/engine/battle/move_effects/pursuit.asm b/engine/battle/move_effects/pursuit.asm
index 640957516..18c358144 100644
--- a/engine/battle/move_effects/pursuit.asm
+++ b/engine/battle/move_effects/pursuit.asm
@@ -22,4 +22,3 @@ BattleCommand_Pursuit:
ld [hli], a
ld [hl], a
ret
-
diff --git a/engine/battle/move_effects/rage.asm b/engine/battle/move_effects/rage.asm
index 1f40cc1fb..df206a6bf 100644
--- a/engine/battle/move_effects/rage.asm
+++ b/engine/battle/move_effects/rage.asm
@@ -4,4 +4,3 @@ BattleCommand_Rage:
call GetBattleVarAddr
set SUBSTATUS_RAGE, [hl]
ret
-
diff --git a/engine/battle/move_effects/rain_dance.asm b/engine/battle/move_effects/rain_dance.asm
index fa8881c3c..e9ef5d123 100644
--- a/engine/battle/move_effects/rain_dance.asm
+++ b/engine/battle/move_effects/rain_dance.asm
@@ -7,4 +7,3 @@ BattleCommand_StartRain:
call AnimateCurrentMove
ld hl, DownpourText
jp StdBattleTextBox
-
diff --git a/engine/battle/move_effects/rapid_spin.asm b/engine/battle/move_effects/rapid_spin.asm
index 089be7667..0dc8b7de2 100644
--- a/engine/battle/move_effects/rapid_spin.asm
+++ b/engine/battle/move_effects/rapid_spin.asm
@@ -34,4 +34,3 @@ BattleCommand_ClearHazards:
ld [de], a
ld hl, ReleasedByText
jp StdBattleTextBox
-
diff --git a/engine/battle/move_effects/return.asm b/engine/battle/move_effects/return.asm
index ee83843b3..d3071d23a 100644
--- a/engine/battle/move_effects/return.asm
+++ b/engine/battle/move_effects/return.asm
@@ -23,4 +23,3 @@ BattleCommand_HappinessPower:
ld d, a
pop bc
ret
-
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/safeguard.asm b/engine/battle/move_effects/safeguard.asm
index e4e2e0951..a926bdccc 100644
--- a/engine/battle/move_effects/safeguard.asm
+++ b/engine/battle/move_effects/safeguard.asm
@@ -21,4 +21,3 @@ BattleCommand_Safeguard:
.failed
call AnimateFailedMove
jp PrintButItFailed
-
diff --git a/engine/battle/move_effects/selfdestruct.asm b/engine/battle/move_effects/selfdestruct.asm
index 3c7b05ef9..d6eeac484 100644
--- a/engine/battle/move_effects/selfdestruct.asm
+++ b/engine/battle/move_effects/selfdestruct.asm
@@ -27,4 +27,3 @@ BattleCommand_Selfdestruct:
farcall DrawEnemyHUD
call WaitBGMap
jp RefreshBattleHuds
-
diff --git a/engine/battle/move_effects/sketch.asm b/engine/battle/move_effects/sketch.asm
index 1f2e67dd4..4c15dbe02 100644
--- a/engine/battle/move_effects/sketch.asm
+++ b/engine/battle/move_effects/sketch.asm
@@ -115,4 +115,3 @@ BattleCommand_Sketch:
.fail
call AnimateFailedMove
jp PrintDidntAffect
-
diff --git a/engine/battle/move_effects/sleep_talk.asm b/engine/battle/move_effects/sleep_talk.asm
index ce7a27ed5..ae2d252b7 100644
--- a/engine/battle/move_effects/sleep_talk.asm
+++ b/engine/battle/move_effects/sleep_talk.asm
@@ -141,4 +141,3 @@ BattleCommand_SleepTalk:
ret z
cp EFFECT_BIDE
ret
-
diff --git a/engine/battle/move_effects/snore.asm b/engine/battle/move_effects/snore.asm
index 4544b7fbd..e2432c59f 100644
--- a/engine/battle/move_effects/snore.asm
+++ b/engine/battle/move_effects/snore.asm
@@ -9,4 +9,3 @@ BattleCommand_Snore:
ld [wAttackMissed], a
call FailMove
jp EndMoveEffect
-
diff --git a/engine/battle/move_effects/spite.asm b/engine/battle/move_effects/spite.asm
index 7c9499074..8aba187a4 100644
--- a/engine/battle/move_effects/spite.asm
+++ b/engine/battle/move_effects/spite.asm
@@ -84,4 +84,3 @@ BattleCommand_Spite:
.failed
jp PrintDidntAffect2
-
diff --git a/engine/battle/move_effects/splash.asm b/engine/battle/move_effects/splash.asm
index ed9eeb4ca..493ea8ca6 100644
--- a/engine/battle/move_effects/splash.asm
+++ b/engine/battle/move_effects/splash.asm
@@ -2,4 +2,3 @@ BattleCommand_Splash:
call AnimateCurrentMove
farcall StubbedTrainerRankings_Splash
jp PrintNothingHappened
-
diff --git a/engine/battle/move_effects/substitute.asm b/engine/battle/move_effects/substitute.asm
index f439afd78..8f14bc315 100644
--- a/engine/battle/move_effects/substitute.asm
+++ b/engine/battle/move_effects/substitute.asm
@@ -86,4 +86,3 @@ BattleCommand_Substitute:
ld hl, TooWeakSubText
.jp_stdbattletextbox
jp StdBattleTextBox
-
diff --git a/engine/battle/move_effects/sunny_day.asm b/engine/battle/move_effects/sunny_day.asm
index ad2298401..f5825930f 100644
--- a/engine/battle/move_effects/sunny_day.asm
+++ b/engine/battle/move_effects/sunny_day.asm
@@ -7,4 +7,3 @@ BattleCommand_StartSun:
call AnimateCurrentMove
ld hl, SunGotBrightText
jp StdBattleTextBox
-
diff --git a/engine/battle/move_effects/teleport.asm b/engine/battle/move_effects/teleport.asm
index b9c7f9fb2..1c67ef112 100644
--- a/engine/battle/move_effects/teleport.asm
+++ b/engine/battle/move_effects/teleport.asm
@@ -87,4 +87,3 @@ BattleCommand_Teleport:
ld hl, FledFromBattleText
jp StdBattleTextBox
-
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/thunder.asm b/engine/battle/move_effects/thunder.asm
index 1a87176bd..b2a643787 100644
--- a/engine/battle/move_effects/thunder.asm
+++ b/engine/battle/move_effects/thunder.asm
@@ -16,4 +16,3 @@ BattleCommand_ThunderAccuracy:
; Redundant with CheckHit guranteeing hit
ld [hl], 100 percent
ret
-
diff --git a/engine/battle/move_effects/transform.asm b/engine/battle/move_effects/transform.asm
index fe85658e6..ef8071290 100644
--- a/engine/battle/move_effects/transform.asm
+++ b/engine/battle/move_effects/transform.asm
@@ -137,4 +137,3 @@ BattleCommand_Transform:
call nz, LoadAnim
ld hl, TransformedText
jp StdBattleTextBox
-
diff --git a/engine/battle/move_effects/triple_kick.asm b/engine/battle/move_effects/triple_kick.asm
index 4fb939d7c..e41044c9d 100644
--- a/engine/battle/move_effects/triple_kick.asm
+++ b/engine/battle/move_effects/triple_kick.asm
@@ -26,12 +26,9 @@ BattleCommand_TripleKick:
ld [hl], a
ret
-
-
BattleCommand_KickCounter:
; kickcounter
ld hl, wKickCounter
inc [hl]
ret
-
diff --git a/engine/battle/read_trainer_attributes.asm b/engine/battle/read_trainer_attributes.asm
index 12554ebaf..6db8f4204 100644
--- a/engine/battle/read_trainer_attributes.asm
+++ b/engine/battle/read_trainer_attributes.asm
@@ -62,3 +62,5 @@ GetTrainerAttributes:
ld a, [hl]
ld [wEnemyTrainerBaseReward], a
ret
+
+INCLUDE "data/trainers/attributes.asm"
diff --git a/engine/battle/read_trainer_dvs.asm b/engine/battle/read_trainer_dvs.asm
index 67ea0fe3c..d35c9ea61 100644
--- a/engine/battle/read_trainer_dvs.asm
+++ b/engine/battle/read_trainer_dvs.asm
@@ -17,3 +17,5 @@ GetTrainerDVs:
pop hl
ret
+
+INCLUDE "data/trainers/dvs.asm"
diff --git a/engine/battle/read_trainer_party.asm b/engine/battle/read_trainer_party.asm
index 3b1fe3bca..0a537b64e 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
@@ -388,3 +387,5 @@ Function39990:
ld bc, NAME_LENGTH
pop de
ret
+
+INCLUDE "data/trainers/parties.asm"
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..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
@@ -240,9 +232,7 @@ Unreferenced_Functioncc220:
call BattleAnimDelayFrame
ret
-
BattleAnim_ClearCGB_OAMFlags:
-
ld a, [wBattleAnimFlags]
bit 3, a
jr z, .delete
@@ -333,7 +323,6 @@ RunBattleAnimCommand:
ld l, a
jp hl
-
BattleAnimCommands::
; entries correspond to macros/scripts/battle_anims.asm enumeration
dw BattleAnimCmd_Obj
@@ -385,7 +374,6 @@ BattleAnimCommands::
dw BattleAnimCmd_Call
dw BattleAnimCmd_Ret
-
BattleAnimCmd_EA:
BattleAnimCmd_EB:
BattleAnimCmd_EC:
@@ -780,7 +768,6 @@ BattleAnimCmd_SetObj:
ret
BattleAnimCmd_EnemyFeetObj:
-
ld hl, wBattleAnimTileDict
.loop
ld a, [hl]
@@ -835,7 +822,6 @@ BattleAnimCmd_EnemyFeetObj:
ret
BattleAnimCmd_PlayerHeadObj:
-
ld hl, wBattleAnimTileDict
.loop
ld a, [hl]
@@ -934,7 +920,6 @@ BattleAnimCmd_Transform:
ret
BattleAnimCmd_UpdateActorPic:
-
ld de, vTiles0 tile $00
ld a, [hBattleTurn]
and a
@@ -954,7 +939,6 @@ BattleAnimCmd_UpdateActorPic:
ret
BattleAnimCmd_RaiseSub:
-
ld a, [rSVBK]
push af
ld a, 1 ; unnecessary bankswitch?
@@ -1304,7 +1288,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..e5e186ab7 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
@@ -2932,4 +2904,3 @@ BattleBGEffects_Cosine:
callfar BattleAnim_Cosine_e
ld a, e
ret
-
diff --git a/engine/battle_anims/core.asm b/engine/battle_anims/core.asm
index 20ab74e7b..0f3bb8488 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,8 +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..63177b1b1 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
@@ -123,4 +120,3 @@ LoadBattleAnimObj:
call DecompressRequest2bpp
pop bc
ret
-
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..e2db148b7 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 "@"
@@ -533,9 +530,6 @@ BTWinM25:
text_jump UnknownText_0x1ec99b
db "@"
-
-
-
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..76bdbaa76 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,11 +304,9 @@ CheckCaughtCelebi:
ld [wScriptVar], a
jr .done
-
.false
xor a ; FALSE
ld [wScriptVar], a
.done
ret
-
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..f5ad049f2 100644
--- a/engine/events/field_moves.asm
+++ b/engine/events/field_moves.asm
@@ -20,7 +20,7 @@ BlindingFlash:
ShakeHeadbuttTree:
farcall ClearSpriteAnims
ld de, CutGrassGFX
- ld hl, vTiles1
+ ld hl, vTiles1 tile $00
lb bc, BANK(CutGrassGFX), 4
call Request2bpp
ld de, HeadbuttTreeGFX
@@ -134,11 +134,11 @@ OWCutAnimation:
.LoadCutGFX:
callfar ClearSpriteAnims ; pointless to farcall
ld de, CutGrassGFX
- ld hl, vTiles1
+ ld hl, vTiles1 tile $00
lb bc, BANK(CutGrassGFX), 4
call Request2bpp
ld de, CutTreeGFX
- ld hl, vTiles1 tile $4
+ ld hl, vTiles1 tile $04
lb bc, BANK(CutTreeGFX), 4
call Request2bpp
ret
@@ -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..6cbc749d5 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
@@ -603,4 +602,3 @@ HOF_AnimatePlayerPic:
.PlayTime:
db "PLAY TIME@"
-
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..7fe8adba7 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
@@ -302,8 +301,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/print_unown.asm b/engine/events/print_unown.asm
index ed7087e35..9e231f449 100644
--- a/engine/events/print_unown.asm
+++ b/engine/events/print_unown.asm
@@ -1,3 +1,6 @@
+UNOWNSTAMP_BOLD_A EQUS "\"♂\"" ; $ef
+UNOWNSTAMP_BOLD_B EQUS "\"♀\"" ; $f5
+
_UnownPrinter:
ld a, [wUnownDex]
and a
@@ -15,12 +18,12 @@ _UnownPrinter:
call ClearTileMap
ld de, UnownDexATile
- ld hl, vTiles1 tile $6f
+ ld hl, vTiles0 tile UNOWNSTAMP_BOLD_A
lb bc, BANK(UnownDexBTile), 1
call Request1bpp
ld de, UnownDexBTile
- ld hl, vTiles1 tile $75
+ ld hl, vTiles0 tile UNOWNSTAMP_BOLD_B
lb bc, BANK(UnownDexBTile), 1
call Request1bpp
@@ -200,8 +203,8 @@ UnownDexDoWhatString:
db "Do what?@"
UnownDexMenuString:
- db "♂ PRINT"
- next "♀ CANCEL"
+ db UNOWNSTAMP_BOLD_A, " PRINT"
+ next UNOWNSTAMP_BOLD_B, " CANCEL"
next "← PREVIOUS"
next "→ NEXT"
db "@"
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/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/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/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..805a3ca71 100644
--- a/engine/games/card_flip.asm
+++ b/engine/games/card_flip.asm
@@ -1,5 +1,5 @@
-CARDFLIP_LIGHT_OFF EQU $ef
-CARDFLIP_LIGHT_ON EQU $f5
+CARDFLIP_LIGHT_OFF EQUS "\"♂\"" ; $ef
+CARDFLIP_LIGHT_ON EQUS "\"♀\"" ; $f5
CARDFLIP_DECK_SIZE EQU 4 * 6
@@ -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/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/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/load_pics.asm b/engine/gfx/load_pics.asm
index 9be8428a9..64190083d 100644
--- a/engine/gfx/load_pics.asm
+++ b/engine/gfx/load_pics.asm
@@ -158,7 +158,6 @@ GetAnimatedEnemyFrontpic:
ld de, wDecompressEnemyFrontpic + 7 * 7 tiles
ld c, 7 * 7
.got_dims
-
push hl
push bc
call LoadFrontpicTiles
@@ -418,39 +417,39 @@ PadFrontpic:
jr z, .five
.seven_loop
- ld c, $70
+ ld c, 7 << 4
call LoadOrientedFrontpic
dec b
jr nz, .seven_loop
ret
.six
- ld c, $70
+ ld c, 7 << 4
xor a
call .Fill
.six_loop
- ld c, $10
+ ld c, (7 - 6) << 4
xor a
call .Fill
- ld c, $60
+ ld c, 6 << 4
call LoadOrientedFrontpic
dec b
jr nz, .six_loop
ret
.five
- ld c, $70
+ ld c, 7 << 4
xor a
call .Fill
.five_loop
- ld c, $20
+ ld c, (7 - 5) << 4
xor a
call .Fill
- ld c, $50
+ ld c, 5 << 4
call LoadOrientedFrontpic
dec b
jr nz, .five_loop
- ld c, $70
+ ld c, 7 << 4
xor a
call .Fill
ret
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..1439b2c6d 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
@@ -486,8 +484,8 @@ PokeBallEffect:
ld de, wEnemyMonPP
ld bc, NUM_MOVES
call CopyBytes
-.Transformed:
+.Transformed:
ld a, [wEnemyMonSpecies]
ld [wWildMon], a
ld [wCurPartySpecies], a
@@ -562,8 +560,8 @@ PokeBallEffect:
ld a, FRIEND_BALL_HAPPINESS
ld [hl], a
-.SkipPartyMonFriendBall:
+.SkipPartyMonFriendBall:
ld hl, Text_AskNicknameNewlyCaughtMon
call PrintText
@@ -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
@@ -2832,8 +2784,6 @@ ApplyPPUp:
inc de
jr .loop
-
-
ComputeMaxPP:
push bc
; Divide the base PP by 5.
@@ -2918,7 +2868,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/print_item_description.asm b/engine/items/print_item_description.asm
index b6ab6c957..b0a3a0b33 100644
--- a/engine/items/print_item_description.asm
+++ b/engine/items/print_item_description.asm
@@ -28,3 +28,5 @@ PrintItemDescription:
ld d, [hl]
pop hl
jp PlaceString
+
+INCLUDE "data/items/descriptions.asm"
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..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
@@ -11,7 +10,6 @@ _Multiply::
ld [hMathBuffer + 3], a
ld [hMathBuffer + 4], a
-
.loop
ld a, [hMultiplier]
srl a
@@ -46,7 +44,6 @@ _Multiply::
dec b
jr z, .done
-
; hMultiplicand <<= 1
ld a, [hMultiplicand + 2]
@@ -67,7 +64,6 @@ _Multiply::
jr .loop
-
.done
ld a, [hMathBuffer + 4]
ld [hProduct + 3], a
@@ -83,7 +79,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..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
@@ -549,7 +548,6 @@ Continue_LoadMenuHeader:
db " @"
db "TIME@"
-
Continue_DisplayBadgesDexPlayerName:
call MenuBoxCoord2Tile
push hl
@@ -626,7 +624,6 @@ Continue_DisplayGameTime:
lb bc, PRINTNUM_LEADINGZEROS | 1, 2
jp PrintNum
-
OakSpeech:
farcall InitClock
call RotateFourPalettesLeft
@@ -803,7 +800,6 @@ StorePlayerName:
ret
ShrinkPlayer:
-
ld a, [hROMBank]
push af
@@ -913,7 +909,6 @@ ShrinkFrame:
ret
Intro_PlacePlayerSprite:
-
farcall GetPlayerIcon
ld c, $c
ld hl, vTiles0
@@ -957,7 +952,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 +1012,6 @@ StartTitleScreen:
dw CrystalIntroSequence
dw ResetClock
-
.TitleScreen:
farcall _TitleScreen
ret
@@ -1070,9 +1063,7 @@ TitleScreenScene:
inc [hl]
ret
-
TitleScreenEntrance:
-
; Animate the logo:
; Move each line by 4 pixels until our count hits 0.
ld a, [hSCX]
@@ -1119,9 +1110,7 @@ TitleScreenEntrance:
ld [hWY], a
ret
-
TitleScreenTimer:
-
; Next scene
ld hl, wJumptableIndex
inc [hl]
@@ -1135,7 +1124,6 @@ TitleScreenTimer:
ret
TitleScreenMain:
-
; Run the timer down.
ld hl, wTitleScreenTimer
ld e, [hl]
@@ -1236,7 +1224,6 @@ TitleScreenMain:
ret
TitleScreenEnd:
-
; Wait until the music is done fading.
ld hl, wTitleScreenTimer
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..c9ce72b13 100644
--- a/engine/menus/menu.asm
+++ b/engine/menus/menu.asm
@@ -55,8 +55,6 @@ _InterpretMobileMenu::
and a
ret
-
-
Draw2DMenu:
xor a
ld [hBGMapMode], a
@@ -158,7 +156,6 @@ Place2DMenuItemStrings:
rst FarCall
ret
-
Init2DMenuCursorPosition:
call GetMenuTextStartCoord
ld a, b
@@ -247,7 +244,6 @@ Init2DMenuCursorPosition:
ld [wMenuJoypadFilter], a
ret
-
_StaticMenuJoypad::
call Place2DMenuCursor
_ScrollingMenuJoypad::
@@ -276,7 +272,6 @@ MobileMenuJoypad:
ld c, a
ret
-
Unreferenced_Function241d5:
call Place2DMenuCursor
.loop
@@ -315,7 +310,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..8a8303067 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,4 @@ 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..108a4edf6 100644
--- a/engine/menus/start_menu.asm
+++ b/engine/menus/start_menu.asm
@@ -10,9 +10,7 @@
const STARTMENUITEM_POKEGEAR ; 7
const STARTMENUITEM_QUIT ; 8
-
StartMenu::
-
call ClearWindowData
ld de, SFX_MENU
@@ -25,8 +23,8 @@ StartMenu::
ld hl, .MenuHeader
jr z, .GotMenuData
ld hl, .ContestMenuHeader
-.GotMenuData:
+.GotMenuData:
call LoadMenuHeader
call .SetUpMenuItems
ld a, [wBattleMenuCursorBuffer]
@@ -157,7 +155,6 @@ StartMenu::
call FinishExitMenu
ret
-
.MenuHeader:
db MENU_BACKUP_TILES ; flags
menu_coords 10, 0, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1
@@ -235,7 +232,6 @@ StartMenu::
db "Quit and"
next "be judged.@"
-
.OpenMenu:
ld a, [wMenuSelection]
call .GetMenuAccountTextPointer
@@ -276,7 +272,6 @@ endr
pop de
ret
-
.GetMenuAccountTextPointer:
ld e, a
ld d, 0
@@ -289,7 +284,6 @@ rept 6
endr
ret
-
.SetUpMenuItems:
xor a
ld [wWhichIndexSet], a
@@ -349,7 +343,6 @@ endr
ld [wMenuItemsList], a
ret
-
.FillMenuList:
xor a
ld hl, wMenuItemsList
@@ -409,14 +402,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 +428,6 @@ StartMenu_Quit:
text_jump UnknownText_0x1c1a6c
db "@"
-
StartMenu_Save:
; Save the game.
@@ -450,7 +440,6 @@ StartMenu_Save:
ld a, 1
ret
-
StartMenu_Option:
; Game options.
@@ -459,7 +448,6 @@ StartMenu_Option:
ld a, 6
ret
-
StartMenu_Status:
; Player status.
@@ -469,9 +457,7 @@ StartMenu_Status:
ld a, 0
ret
-
StartMenu_Pokedex:
-
ld a, [wPartyCount]
and a
jr z, .asm_12949
@@ -484,18 +470,14 @@ StartMenu_Pokedex:
ld a, 0
ret
-
StartMenu_Pokegear:
-
call FadeToMenu
farcall PokeGear
call CloseSubmenu
ld a, 0
ret
-
StartMenu_Pack:
-
call FadeToMenu
farcall Pack
ld a, [wPackUsedItem]
@@ -510,9 +492,7 @@ StartMenu_Pack:
ld a, 4
ret
-
StartMenu_Pokemon:
-
ld a, [wPartyCount]
and a
jr z, .return
@@ -657,7 +637,6 @@ CantUseItemText:
text_jump UnknownText_0x1c1b03
db "@"
-
PartyMonItemName:
ld a, [wCurItem]
ld [wd265], a
@@ -665,14 +644,12 @@ PartyMonItemName:
call CopyName1
ret
-
CancelPokemonAction:
farcall InitPartyMenuWithCancel
farcall UnfreezeMonIcons
ld a, 1
ret
-
PokemonActionSubmenu:
hlcoord 1, 15
lb bc, 2, 18
@@ -717,9 +694,7 @@ PokemonActionSubmenu:
dbw MONMENUITEM_MOVE, ManagePokemonMoves
dbw MONMENUITEM_MAIL, MonMailAction
-
SwitchPartyMons:
-
; Don't try if there's nothing to switch!
ld a, [wPartyCount]
cp 2
@@ -769,9 +744,7 @@ SwitchPartyMons:
call CancelPokemonAction
ret
-
GiveTakePartyMonItem:
-
; Eggs can't hold items!
ld a, [wCurPartySpecies]
cp EGG
@@ -810,9 +783,7 @@ GiveTakePartyMonItem:
ld a, 3
ret
-
.GiveItem:
-
farcall DepositSellInitPackBuffers
.loop
@@ -842,9 +813,7 @@ GiveTakePartyMonItem:
.quit
ret
-
TryGiveItemToPartymon:
-
call SpeechTextBox
call PartyMonItemName
call GetPartyItemLocation
@@ -906,9 +875,7 @@ TryGiveItemToPartymon:
.abort
ret
-
GivePartyItem:
-
call GetPartyItemLocation
ld a, [wCurItem]
ld [hl], a
@@ -920,9 +887,7 @@ GivePartyItem:
.done
ret
-
TakePartyItem:
-
call SpeechTextBox
call GetPartyItemLocation
ld a, [hl]
@@ -955,7 +920,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 +932,6 @@ GiveTakeItemMenuData:
db "GIVE@"
db "TAKE@"
-
TookAndMadeHoldText:
text_jump UnknownText_0x1c1b2c
db "@"
@@ -1001,7 +964,6 @@ CantBeHeldText:
text_jump UnknownText_0x1c1c09
db "@"
-
GetPartyItemLocation:
push af
ld a, MON_ITEM
@@ -1009,14 +971,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 +988,6 @@ StartMenuYesNo:
call YesNoBox
jp ExitMenu
-
ComposeMailMessage:
ld de, wTempMailMessage
farcall _ComposeMailMessage
@@ -1130,7 +1089,6 @@ MonMailAction:
ld a, $3
ret
-
.MenuHeader:
db MENU_BACKUP_TILES ; flags
menu_coords 12, 10, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1
@@ -1144,7 +1102,6 @@ MonMailAction:
db "TAKE@"
db "QUIT@"
-
.mailwilllosemessagetext
; The MAIL will lose its message. OK?
text_jump UnknownText_0x1c1c22
@@ -1175,7 +1132,6 @@ MonMailAction:
text_jump UnknownText_0x1c1cc4
db "@"
-
OpenPartyStats:
call LoadStandardMenuHeader
call ClearSprites
@@ -1189,7 +1145,6 @@ OpenPartyStats:
ld a, 0
ret
-
MonMenu_Cut:
farcall CutFunction
ld a, [wFieldMoveSucceeded]
@@ -1203,7 +1158,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..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
@@ -38,9 +37,7 @@ GBCOnlyScreen:
call DelayFrame
jr .loop
-
DrawGBCOnlyScreen:
-
call DrawGBCOnlyBorder
; Pokemon
@@ -63,9 +60,7 @@ DrawGBCOnlyScreen:
ret
-
DrawGBCOnlyBorder:
-
hlcoord 0, 0
ld [hl], 0 ; top-left
@@ -111,7 +106,6 @@ DrawGBCOnlyBorder:
jr nz, .next_row
ret
-
DrawGBCOnlyGraphic:
ld de, SCREEN_WIDTH
.y
@@ -129,13 +123,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..3717b4e73 100644
--- a/engine/movie/title.asm
+++ b/engine/movie/title.asm
@@ -1,5 +1,4 @@
_TitleScreen:
-
call ClearBGPalettes
call ClearSprites
call ClearTileMap
@@ -18,25 +17,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 +42,6 @@ _TitleScreen:
ld a, 7 ; palette
call ByteFill
-
; BG Map 0:
; Apply logo gradient:
@@ -78,7 +72,6 @@ _TitleScreen:
ld a, 6
call ByteFill
-
; 'CRYSTAL VERSION'
hlbgcoord 5, 9
ld bc, NAME_LENGTH ; length of version text
@@ -91,12 +84,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 +98,6 @@ _TitleScreen:
ld de, vTiles0
call Decompress
-
; Clear screen tiles
hlbgcoord 0, 0
ld bc, 64 * BG_MAP_WIDTH
@@ -157,7 +147,6 @@ _TitleScreen:
pop af
ld [rSVBK], a
-
; LY/SCX trickery starts here
ld a, [rSVBK]
@@ -194,7 +183,6 @@ _TitleScreen:
pop af
ld [rSVBK], a
-
; Reset audio
call ChannelsOff
call EnableLCD
@@ -263,7 +251,6 @@ SuicuneFrameIterator:
db $00 ; vTiles5 tile $00
db $08 ; vTiles5 tile $08
-
LoadSuicuneFrame:
hlcoord 6, 12
ld b, 6
@@ -353,7 +340,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..e60344430 100644
--- a/engine/movie/trade_animation.asm
+++ b/engine/movie/trade_animation.asm
@@ -1,5 +1,5 @@
-TRADEANIM_RIGHT_ARROW EQU $ed
-TRADEANIM_LEFT_ARROW EQU $ee
+TRADEANIM_RIGHT_ARROW EQUS "\"▶\"" ; $ed
+TRADEANIM_LEFT_ARROW EQUS "\"▼\"" ; $ee
; TradeAnim_TubeAnimJumptable.Jumptable indexes
const_def
@@ -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]
@@ -1481,8 +1409,6 @@ TradeAnim_WaitAnim2:
call TradeAnim_AdvanceScriptPointer
ret
-
-
Unreferenced_DebugTrade:
; This function is not referenced.
; It was meant for use in Japanese versions, so the
@@ -1513,7 +1439,6 @@ Unreferenced_DebugTrade:
jr nz, .loop2
ret
-
debugtrade: MACRO
; species, ot name, ot id (?)
db \1, \2
@@ -1524,7 +1449,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/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/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.asm b/engine/overworld/events.asm
index daa7b8414..707d31e66 100644
--- a/engine/overworld/events.asm
+++ b/engine/overworld/events.asm
@@ -485,7 +485,6 @@ CheckTimeEvents:
ret
OWPlayerInput:
-
call PlayerMovement
ret c
and a
@@ -1026,4 +1025,614 @@ ChangeDirectionScript: ; 9
INCLUDE "engine/overworld/scripting.asm"
-INCLUDE "engine/overworld/events_2.asm"
+WarpToSpawnPoint::
+ ld hl, wStatusFlags2
+ res STATUSFLAGS2_SAFARI_GAME_F, [hl]
+ res STATUSFLAGS2_BUG_CONTEST_TIMER_F, [hl]
+ ret
+
+RunMemScript::
+; If there is no script here, we don't need to be here.
+ ld a, [wMapReentryScriptQueueFlag]
+ and a
+ ret z
+; Execute the script at (wMapReentryScriptBank):(wMapReentryScriptAddress).
+ ld hl, wMapReentryScriptAddress
+ ld a, [hli]
+ ld h, [hl]
+ ld l, a
+ ld a, [wMapReentryScriptBank]
+ call CallScript
+ scf
+; Clear the buffer for the next script.
+ push af
+ xor a
+ ld hl, wMapReentryScriptQueueFlag
+ ld bc, 8
+ call ByteFill
+ pop af
+ ret
+
+LoadScriptBDE::
+; If there's already a script here, don't overwrite.
+ ld hl, wMapReentryScriptQueueFlag
+ ld a, [hl]
+ and a
+ ret nz
+; Set the flag
+ ld [hl], 1
+ inc hl
+; Load the script pointer b:de into (wMapReentryScriptBank):(wMapReentryScriptAddress)
+ ld [hl], b
+ inc hl
+ ld [hl], e
+ inc hl
+ ld [hl], d
+ scf
+ ret
+
+TryTileCollisionEvent::
+ call GetFacingTileCoord
+ ld [wEngineBuffer1], a
+ ld c, a
+ farcall CheckFacingTileForStdScript
+ jr c, .done
+
+ call CheckCutTreeTile
+ jr nz, .whirlpool
+ farcall TryCutOW
+ jr .done
+
+.whirlpool
+ ld a, [wEngineBuffer1]
+ call CheckWhirlpoolTile
+ jr nz, .waterfall
+ farcall TryWhirlpoolOW
+ jr .done
+
+.waterfall
+ ld a, [wEngineBuffer1]
+ call CheckWaterfallTile
+ jr nz, .headbutt
+ farcall TryWaterfallOW
+ jr .done
+
+.headbutt
+ ld a, [wEngineBuffer1]
+ call CheckHeadbuttTreeTile
+ jr nz, .surf
+ farcall TryHeadbuttOW
+ jr c, .done
+ jr .noevent
+
+.surf
+ farcall TrySurfOW
+ jr nc, .noevent
+ jr .done
+
+.noevent
+ xor a
+ ret
+
+.done
+ call PlayClickSFX
+ ld a, $ff
+ scf
+ ret
+
+RandomEncounter::
+; Random encounter
+
+ call CheckWildEncounterCooldown
+ jr c, .nope
+ call CanUseSweetScent
+ jr nc, .nope
+ ld hl, wStatusFlags2
+ bit STATUSFLAGS2_BUG_CONTEST_TIMER_F, [hl]
+ jr nz, .bug_contest
+ farcall TryWildEncounter
+ jr nz, .nope
+ jr .ok
+
+.bug_contest
+ call _TryWildEncounter_BugContest
+ jr nc, .nope
+ jr .ok_bug_contest
+
+.nope
+ ld a, 1
+ and a
+ ret
+
+.ok
+ ld a, BANK(WildBattleScript)
+ ld hl, WildBattleScript
+ jr .done
+
+.ok_bug_contest
+ ld a, BANK(BugCatchingContestBattleScript)
+ ld hl, BugCatchingContestBattleScript
+ jr .done
+
+.done
+ call CallScript
+ scf
+ ret
+
+WildBattleScript:
+ randomwildmon
+ startbattle
+ reloadmapafterbattle
+ end
+
+CanUseSweetScent::
+ ld hl, wStatusFlags
+ bit STATUSFLAGS_NO_WILD_ENCOUNTERS_F, [hl]
+ jr nz, .no
+ ld a, [wEnvironment]
+ cp CAVE
+ jr z, .ice_check
+ cp DUNGEON
+ jr z, .ice_check
+ farcall CheckGrassCollision
+ jr nc, .no
+
+.ice_check
+ ld a, [wPlayerStandingTile]
+ call CheckIceTile
+ jr z, .no
+ scf
+ ret
+
+.no
+ and a
+ ret
+
+_TryWildEncounter_BugContest:
+ call TryWildEncounter_BugContest
+ ret nc
+ call ChooseWildEncounter_BugContest
+ farcall CheckRepelEffect
+ ret
+
+ChooseWildEncounter_BugContest::
+; Pick a random mon out of ContestMons.
+
+.loop
+ call Random
+ cp 100 << 1
+ jr nc, .loop
+ srl a
+
+ ld hl, ContestMons
+ ld de, 4
+.CheckMon:
+ sub [hl]
+ jr c, .GotMon
+ add hl, de
+ jr .CheckMon
+
+.GotMon:
+ inc hl
+
+; Species
+ ld a, [hli]
+ ld [wTempWildMonSpecies], a
+
+; Min level
+ ld a, [hli]
+ ld d, a
+
+; Max level
+ ld a, [hl]
+
+ sub d
+ jr nz, .RandomLevel
+
+; If min and max are the same.
+ ld a, d
+ jr .GotLevel
+
+.RandomLevel:
+; Get a random level between the min and max.
+ ld c, a
+ inc c
+ call Random
+ ld a, [hRandomAdd]
+ call SimpleDivide
+ add d
+
+.GotLevel:
+ ld [wCurPartyLevel], a
+
+ xor a
+ ret
+
+TryWildEncounter_BugContest:
+ ld a, [wPlayerStandingTile]
+ call CheckSuperTallGrassTile
+ ld b, 40 percent
+ jr z, .ok
+ ld b, 20 percent
+
+.ok
+ farcall ApplyMusicEffectOnEncounterRate
+ farcall ApplyCleanseTagEffectOnEncounterRate
+ call Random
+ ld a, [hRandomAdd]
+ cp b
+ ret c
+ ld a, 1
+ and a
+ ret
+
+INCLUDE "data/wild/bug_contest_mons.asm"
+
+DoBikeStep::
+ nop
+ nop
+ ; If the bike shop owner doesn't have our number, or
+ ; if we've already gotten the call, we don't have to
+ ; be here.
+ ld hl, wStatusFlags2
+ bit STATUSFLAGS2_BIKE_SHOP_CALL_F, [hl]
+ jr z, .NoCall
+
+ ; If we're not on the bike, we don't have to be here.
+ ld a, [wPlayerState]
+ cp PLAYER_BIKE
+ jr nz, .NoCall
+
+ ; If we're not in an area of phone service, we don't
+ ; have to be here.
+ call GetMapPhoneService
+ and a
+ jr nz, .NoCall
+
+ ; Check the bike step count and check whether we've
+ ; taken 65536 of them yet.
+ ld hl, wBikeStep
+ ld a, [hli]
+ ld d, a
+ ld e, [hl]
+ cp 255
+ jr nz, .increment
+ ld a, e
+ cp 255
+ jr z, .dont_increment
+
+.increment
+ inc de
+ ld [hl], e
+ dec hl
+ ld [hl], d
+
+.dont_increment
+ ; If we've taken at least 1024 steps, have the bike
+ ; shop owner try to call us.
+ ld a, d
+ cp HIGH(1024)
+ jr c, .NoCall
+
+ ; If a call has already been queued, don't overwrite
+ ; that call.
+ ld a, [wSpecialPhoneCallID]
+ and a
+ jr nz, .NoCall
+
+ ; Queue the call.
+ ld a, SPECIALCALL_BIKESHOP
+ ld [wSpecialPhoneCallID], a
+ xor a
+ ld [wSpecialPhoneCallID + 1], a
+ ld hl, wStatusFlags2
+ res STATUSFLAGS2_BIKE_SHOP_CALL_F, [hl]
+ scf
+ ret
+
+.NoCall:
+ xor a
+ ret
+
+ClearCmdQueue::
+ ld hl, wCmdQueue
+ ld de, 6
+ ld c, 4
+ xor a
+.loop
+ ld [hl], a
+ add hl, de
+ dec c
+ jr nz, .loop
+ ret
+
+HandleCmdQueue::
+ ld hl, wCmdQueue
+ xor a
+.loop
+ ld [hMapObjectIndexBuffer], a
+ ld a, [hl]
+ and a
+ jr z, .skip
+ push hl
+ ld b, h
+ ld c, l
+ call HandleQueuedCommand
+ pop hl
+
+.skip
+ ld de, CMDQUEUE_ENTRY_SIZE
+ add hl, de
+ ld a, [hMapObjectIndexBuffer]
+ inc a
+ cp CMDQUEUE_CAPACITY
+ jr nz, .loop
+ ret
+
+Unreferenced_GetNthCmdQueueEntry:
+ ld hl, wCmdQueue
+ ld bc, CMDQUEUE_ENTRY_SIZE
+ call AddNTimes
+ ld b, h
+ ld c, l
+ ret
+
+WriteCmdQueue::
+ push bc
+ push de
+ call .GetNextEmptyEntry
+ ld d, h
+ ld e, l
+ pop hl
+ pop bc
+ ret c
+ ld a, b
+ ld bc, CMDQUEUE_ENTRY_SIZE - 1
+ call FarCopyBytes
+ xor a
+ ld [hl], a
+ ret
+
+.GetNextEmptyEntry:
+ ld hl, wCmdQueue
+ ld de, CMDQUEUE_ENTRY_SIZE
+ ld c, CMDQUEUE_CAPACITY
+.loop
+ ld a, [hl]
+ and a
+ jr z, .done
+ add hl, de
+ dec c
+ jr nz, .loop
+ scf
+ ret
+
+.done
+ ld a, CMDQUEUE_CAPACITY
+ sub c
+ and a
+ ret
+
+DelCmdQueue::
+ ld hl, wCmdQueue
+ ld de, CMDQUEUE_ENTRY_SIZE
+ ld c, CMDQUEUE_CAPACITY
+.loop
+ ld a, [hl]
+ cp b
+ jr z, .done
+ add hl, de
+ dec c
+ jr nz, .loop
+ and a
+ ret
+
+.done
+ xor a
+ ld [hl], a
+ scf
+ ret
+
+_DelCmdQueue:
+ ld hl, CMDQUEUE_TYPE
+ add hl, bc
+ ld [hl], 0
+ ret
+
+HandleQueuedCommand:
+ ld hl, CMDQUEUE_TYPE
+ add hl, bc
+ ld a, [hl]
+ cp 5
+ jr c, .okay
+ xor a
+
+.okay
+ ld e, a
+ ld d, 0
+ ld hl, .Jumptable
+ add hl, de
+ add hl, de
+ add hl, de
+ ld a, [hli]
+ push af
+ ld a, [hli]
+ ld h, [hl]
+ ld l, a
+ pop af
+ rst FarCall
+ ret
+
+.Jumptable:
+ dba CmdQueue_Null
+ dba CmdQueue_Null2
+ dba CmdQueue_StoneTable
+ dba CmdQueue_Type3
+ dba CmdQueue_Type4
+
+CmdQueueAnonymousJumptable:
+ ld hl, CMDQUEUE_05
+ add hl, bc
+ ld a, [hl]
+ pop hl
+ rst JumpTable
+ ret
+
+CmdQueueAnonJT_Increment:
+ ld hl, CMDQUEUE_05
+ add hl, bc
+ inc [hl]
+ ret
+
+CmdQueueAnonJT_Decrement:
+ ld hl, CMDQUEUE_05
+ add hl, bc
+ dec [hl]
+ ret
+
+CmdQueue_Null:
+ ret
+
+CmdQueue_Null2:
+ call ret_2f3e
+ ret
+
+CmdQueue_Type4:
+ call CmdQueueAnonymousJumptable
+ ; anonymous dw
+ dw .zero
+ dw .one
+
+.zero
+ ld a, [hSCY]
+ ld hl, 4
+ add hl, bc
+ ld [hl], a
+ call CmdQueueAnonJT_Increment
+.one
+ ld hl, 1
+ add hl, bc
+ ld a, [hl]
+ dec a
+ ld [hl], a
+ jr z, .finish
+ and $1
+ jr z, .add
+ ld hl, 2
+ add hl, bc
+ ld a, [hSCY]
+ sub [hl]
+ ld [hSCY], a
+ ret
+
+.add
+ ld hl, 2
+ add hl, bc
+ ld a, [hSCY]
+ add [hl]
+ ld [hSCY], a
+ ret
+
+.finish
+ ld hl, 4
+ add hl, bc
+ ld a, [hl]
+ ld [hSCY], a
+ call _DelCmdQueue
+ ret
+
+CmdQueue_Type3:
+ call CmdQueueAnonymousJumptable
+ ; anonymous dw
+ dw .zero
+ dw .one
+ dw .two
+
+.zero
+ call .IsPlayerFacingDown
+ jr z, .PlayerNotFacingDown
+ call CmdQueueAnonJT_Increment
+.one
+ call .IsPlayerFacingDown
+ jr z, .PlayerNotFacingDown
+ call CmdQueueAnonJT_Increment
+
+ ld hl, 2
+ add hl, bc
+ ld a, [hl]
+ ld [wd173], a
+ ret
+
+.two
+ call .IsPlayerFacingDown
+ jr z, .PlayerNotFacingDown
+ call CmdQueueAnonJT_Decrement
+
+ ld hl, 3
+ add hl, bc
+ ld a, [hl]
+ ld [wd173], a
+ ret
+
+.PlayerNotFacingDown:
+ ld a, $7f
+ ld [wd173], a
+ ld hl, 5
+ add hl, bc
+ ld [hl], 0
+ ret
+
+.IsPlayerFacingDown:
+ push bc
+ ld bc, wPlayerStruct
+ call GetSpriteDirection
+ and a
+ pop bc
+ ret
+
+CmdQueue_StoneTable:
+ ld de, wPlayerStruct
+ ld a, NUM_OBJECT_STRUCTS
+.loop
+ push af
+
+ ld hl, OBJECT_SPRITE
+ add hl, de
+ ld a, [hl]
+ and a
+ jr z, .next
+
+ ld hl, OBJECT_MOVEMENTTYPE
+ add hl, de
+ ld a, [hl]
+ cp SPRITEMOVEDATA_STRENGTH_BOULDER
+ jr nz, .next
+
+ ld hl, OBJECT_NEXT_TILE
+ add hl, de
+ ld a, [hl]
+ call CheckPitTile
+ jr nz, .next
+
+ ld hl, OBJECT_DIRECTION_WALKING
+ add hl, de
+ ld a, [hl]
+ cp STANDING
+ jr nz, .next
+ call HandleStoneQueue
+ jr c, .fall_down_hole
+
+.next
+ ld hl, OBJECT_STRUCT_LENGTH
+ add hl, de
+ ld d, h
+ ld e, l
+
+ pop af
+ dec a
+ jr nz, .loop
+ ret
+
+.fall_down_hole
+ pop af
+ ret
diff --git a/engine/overworld/events_2.asm b/engine/overworld/events_2.asm
deleted file mode 100644
index b7376d48d..000000000
--- a/engine/overworld/events_2.asm
+++ /dev/null
@@ -1,617 +0,0 @@
-; More overworld event handling.
-
-
-WarpToSpawnPoint::
- ld hl, wStatusFlags2
- res STATUSFLAGS2_SAFARI_GAME_F, [hl]
- res STATUSFLAGS2_BUG_CONTEST_TIMER_F, [hl]
- ret
-
-RunMemScript::
-; If there is no script here, we don't need to be here.
- ld a, [wMapReentryScriptQueueFlag]
- and a
- ret z
-; Execute the script at (wMapReentryScriptBank):(wMapReentryScriptAddress).
- ld hl, wMapReentryScriptAddress
- ld a, [hli]
- ld h, [hl]
- ld l, a
- ld a, [wMapReentryScriptBank]
- call CallScript
- scf
-; Clear the buffer for the next script.
- push af
- xor a
- ld hl, wMapReentryScriptQueueFlag
- ld bc, 8
- call ByteFill
- pop af
- ret
-
-LoadScriptBDE::
-; If there's already a script here, don't overwrite.
- ld hl, wMapReentryScriptQueueFlag
- ld a, [hl]
- and a
- ret nz
-; Set the flag
- ld [hl], 1
- inc hl
-; Load the script pointer b:de into (wMapReentryScriptBank):(wMapReentryScriptAddress)
- ld [hl], b
- inc hl
- ld [hl], e
- inc hl
- ld [hl], d
- scf
- ret
-
-TryTileCollisionEvent::
- call GetFacingTileCoord
- ld [wEngineBuffer1], a
- ld c, a
- farcall CheckFacingTileForStdScript
- jr c, .done
-
- call CheckCutTreeTile
- jr nz, .whirlpool
- farcall TryCutOW
- jr .done
-
-.whirlpool
- ld a, [wEngineBuffer1]
- call CheckWhirlpoolTile
- jr nz, .waterfall
- farcall TryWhirlpoolOW
- jr .done
-
-.waterfall
- ld a, [wEngineBuffer1]
- call CheckWaterfallTile
- jr nz, .headbutt
- farcall TryWaterfallOW
- jr .done
-
-.headbutt
- ld a, [wEngineBuffer1]
- call CheckHeadbuttTreeTile
- jr nz, .surf
- farcall TryHeadbuttOW
- jr c, .done
- jr .noevent
-
-.surf
- farcall TrySurfOW
- jr nc, .noevent
- jr .done
-
-.noevent
- xor a
- ret
-
-.done
- call PlayClickSFX
- ld a, $ff
- scf
- ret
-
-
-RandomEncounter::
-; Random encounter
-
- call CheckWildEncounterCooldown
- jr c, .nope
- call CanUseSweetScent
- jr nc, .nope
- ld hl, wStatusFlags2
- bit STATUSFLAGS2_BUG_CONTEST_TIMER_F, [hl]
- jr nz, .bug_contest
- farcall TryWildEncounter
- jr nz, .nope
- jr .ok
-
-.bug_contest
- call _TryWildEncounter_BugContest
- jr nc, .nope
- jr .ok_bug_contest
-
-.nope
- ld a, 1
- and a
- ret
-
-.ok
- ld a, BANK(WildBattleScript)
- ld hl, WildBattleScript
- jr .done
-
-.ok_bug_contest
- ld a, BANK(BugCatchingContestBattleScript)
- ld hl, BugCatchingContestBattleScript
- jr .done
-
-.done
- call CallScript
- scf
- ret
-
-WildBattleScript:
- randomwildmon
- startbattle
- reloadmapafterbattle
- end
-
-CanUseSweetScent::
- ld hl, wStatusFlags
- bit STATUSFLAGS_NO_WILD_ENCOUNTERS_F, [hl]
- jr nz, .no
- ld a, [wEnvironment]
- cp CAVE
- jr z, .ice_check
- cp DUNGEON
- jr z, .ice_check
- farcall CheckGrassCollision
- jr nc, .no
-
-.ice_check
- ld a, [wPlayerStandingTile]
- call CheckIceTile
- jr z, .no
- scf
- ret
-
-.no
- and a
- ret
-
-_TryWildEncounter_BugContest:
- call TryWildEncounter_BugContest
- ret nc
- call ChooseWildEncounter_BugContest
- farcall CheckRepelEffect
- ret
-
-ChooseWildEncounter_BugContest::
-; Pick a random mon out of ContestMons.
-
-.loop
- call Random
- cp 100 << 1
- jr nc, .loop
- srl a
-
- ld hl, ContestMons
- ld de, 4
-.CheckMon:
- sub [hl]
- jr c, .GotMon
- add hl, de
- jr .CheckMon
-
-.GotMon:
- inc hl
-
-; Species
- ld a, [hli]
- ld [wTempWildMonSpecies], a
-
-; Min level
- ld a, [hli]
- ld d, a
-
-; Max level
- ld a, [hl]
-
- sub d
- jr nz, .RandomLevel
-
-; If min and max are the same.
- ld a, d
- jr .GotLevel
-
-.RandomLevel:
-; Get a random level between the min and max.
- ld c, a
- inc c
- call Random
- ld a, [hRandomAdd]
- call SimpleDivide
- add d
-
-.GotLevel:
- ld [wCurPartyLevel], a
-
- xor a
- ret
-
-TryWildEncounter_BugContest:
- ld a, [wPlayerStandingTile]
- call CheckSuperTallGrassTile
- ld b, 40 percent
- jr z, .ok
- ld b, 20 percent
-
-.ok
- farcall ApplyMusicEffectOnEncounterRate
- farcall ApplyCleanseTagEffectOnEncounterRate
- call Random
- ld a, [hRandomAdd]
- cp b
- ret c
- ld a, 1
- and a
- ret
-
-
-INCLUDE "data/wild/bug_contest_mons.asm"
-
-
-DoBikeStep::
- nop
- nop
- ; If the bike shop owner doesn't have our number, or
- ; if we've already gotten the call, we don't have to
- ; be here.
- ld hl, wStatusFlags2
- bit STATUSFLAGS2_BIKE_SHOP_CALL_F, [hl]
- jr z, .NoCall
-
- ; If we're not on the bike, we don't have to be here.
- ld a, [wPlayerState]
- cp PLAYER_BIKE
- jr nz, .NoCall
-
- ; If we're not in an area of phone service, we don't
- ; have to be here.
- call GetMapPhoneService
- and a
- jr nz, .NoCall
-
- ; Check the bike step count and check whether we've
- ; taken 65536 of them yet.
- ld hl, wBikeStep
- ld a, [hli]
- ld d, a
- ld e, [hl]
- cp 255
- jr nz, .increment
- ld a, e
- cp 255
- jr z, .dont_increment
-
-.increment
- inc de
- ld [hl], e
- dec hl
- ld [hl], d
-
-.dont_increment
- ; If we've taken at least 1024 steps, have the bike
- ; shop owner try to call us.
- ld a, d
- cp HIGH(1024)
- jr c, .NoCall
-
- ; If a call has already been queued, don't overwrite
- ; that call.
- ld a, [wSpecialPhoneCallID]
- and a
- jr nz, .NoCall
-
- ; Queue the call.
- ld a, SPECIALCALL_BIKESHOP
- ld [wSpecialPhoneCallID], a
- xor a
- ld [wSpecialPhoneCallID + 1], a
- ld hl, wStatusFlags2
- res STATUSFLAGS2_BIKE_SHOP_CALL_F, [hl]
- scf
- ret
-
-.NoCall:
- xor a
- ret
-
-ClearCmdQueue::
- ld hl, wCmdQueue
- ld de, 6
- ld c, 4
- xor a
-.loop
- ld [hl], a
- add hl, de
- dec c
- jr nz, .loop
- ret
-
-HandleCmdQueue::
- ld hl, wCmdQueue
- xor a
-.loop
- ld [hMapObjectIndexBuffer], a
- ld a, [hl]
- and a
- jr z, .skip
- push hl
- ld b, h
- ld c, l
- call HandleQueuedCommand
- pop hl
-
-.skip
- ld de, CMDQUEUE_ENTRY_SIZE
- add hl, de
- ld a, [hMapObjectIndexBuffer]
- inc a
- cp CMDQUEUE_CAPACITY
- jr nz, .loop
- ret
-
-Unreferenced_GetNthCmdQueueEntry:
- ld hl, wCmdQueue
- ld bc, CMDQUEUE_ENTRY_SIZE
- call AddNTimes
- ld b, h
- ld c, l
- ret
-
-WriteCmdQueue::
- push bc
- push de
- call .GetNextEmptyEntry
- ld d, h
- ld e, l
- pop hl
- pop bc
- ret c
- ld a, b
- ld bc, CMDQUEUE_ENTRY_SIZE - 1
- call FarCopyBytes
- xor a
- ld [hl], a
- ret
-
-.GetNextEmptyEntry:
- ld hl, wCmdQueue
- ld de, CMDQUEUE_ENTRY_SIZE
- ld c, CMDQUEUE_CAPACITY
-.loop
- ld a, [hl]
- and a
- jr z, .done
- add hl, de
- dec c
- jr nz, .loop
- scf
- ret
-
-.done
- ld a, CMDQUEUE_CAPACITY
- sub c
- and a
- ret
-
-DelCmdQueue::
- ld hl, wCmdQueue
- ld de, CMDQUEUE_ENTRY_SIZE
- ld c, CMDQUEUE_CAPACITY
-.loop
- ld a, [hl]
- cp b
- jr z, .done
- add hl, de
- dec c
- jr nz, .loop
- and a
- ret
-
-.done
- xor a
- ld [hl], a
- scf
- ret
-
-_DelCmdQueue:
- ld hl, CMDQUEUE_TYPE
- add hl, bc
- ld [hl], 0
- ret
-
-HandleQueuedCommand:
- ld hl, CMDQUEUE_TYPE
- add hl, bc
- ld a, [hl]
- cp 5
- jr c, .okay
- xor a
-
-.okay
- ld e, a
- ld d, 0
- ld hl, .Jumptable
- add hl, de
- add hl, de
- add hl, de
- ld a, [hli]
- push af
- ld a, [hli]
- ld h, [hl]
- ld l, a
- pop af
- rst FarCall
- ret
-
-.Jumptable:
- dba CmdQueue_Null
- dba CmdQueue_Null2
- dba CmdQueue_StoneTable
- dba CmdQueue_Type3
- dba CmdQueue_Type4
-
-CmdQueueAnonymousJumptable:
- ld hl, CMDQUEUE_05
- add hl, bc
- ld a, [hl]
- pop hl
- rst JumpTable
- ret
-
-CmdQueueAnonJT_Increment:
- ld hl, CMDQUEUE_05
- add hl, bc
- inc [hl]
- ret
-
-CmdQueueAnonJT_Decrement:
- ld hl, CMDQUEUE_05
- add hl, bc
- dec [hl]
- ret
-
-CmdQueue_Null:
- ret
-
-CmdQueue_Null2:
- call ret_2f3e
- ret
-
-CmdQueue_Type4:
- call CmdQueueAnonymousJumptable
- ; anonymous dw
- dw .zero
- dw .one
-
-.zero
- ld a, [hSCY]
- ld hl, 4
- add hl, bc
- ld [hl], a
- call CmdQueueAnonJT_Increment
-.one
- ld hl, 1
- add hl, bc
- ld a, [hl]
- dec a
- ld [hl], a
- jr z, .finish
- and $1
- jr z, .add
- ld hl, 2
- add hl, bc
- ld a, [hSCY]
- sub [hl]
- ld [hSCY], a
- ret
-
-.add
- ld hl, 2
- add hl, bc
- ld a, [hSCY]
- add [hl]
- ld [hSCY], a
- ret
-
-.finish
- ld hl, 4
- add hl, bc
- ld a, [hl]
- ld [hSCY], a
- call _DelCmdQueue
- ret
-
-CmdQueue_Type3:
- call CmdQueueAnonymousJumptable
- ; anonymous dw
- dw .zero
- dw .one
- dw .two
-
-.zero
- call .IsPlayerFacingDown
- jr z, .PlayerNotFacingDown
- call CmdQueueAnonJT_Increment
-.one
- call .IsPlayerFacingDown
- jr z, .PlayerNotFacingDown
- call CmdQueueAnonJT_Increment
-
- ld hl, 2
- add hl, bc
- ld a, [hl]
- ld [wd173], a
- ret
-
-.two
- call .IsPlayerFacingDown
- jr z, .PlayerNotFacingDown
- call CmdQueueAnonJT_Decrement
-
- ld hl, 3
- add hl, bc
- ld a, [hl]
- ld [wd173], a
- ret
-
-.PlayerNotFacingDown:
- ld a, $7f
- ld [wd173], a
- ld hl, 5
- add hl, bc
- ld [hl], 0
- ret
-
-.IsPlayerFacingDown:
- push bc
- ld bc, wPlayerStruct
- call GetSpriteDirection
- and a
- pop bc
- ret
-
-CmdQueue_StoneTable:
- ld de, wPlayerStruct
- ld a, NUM_OBJECT_STRUCTS
-.loop
- push af
-
- ld hl, OBJECT_SPRITE
- add hl, de
- ld a, [hl]
- and a
- jr z, .next
-
- ld hl, OBJECT_MOVEMENTTYPE
- add hl, de
- ld a, [hl]
- cp SPRITEMOVEDATA_STRENGTH_BOULDER
- jr nz, .next
-
- ld hl, OBJECT_NEXT_TILE
- add hl, de
- ld a, [hl]
- call CheckPitTile
- jr nz, .next
-
- ld hl, OBJECT_DIRECTION_WALKING
- add hl, de
- ld a, [hl]
- cp STANDING
- jr nz, .next
- call HandleStoneQueue
- jr c, .fall_down_hole
-
-.next
- ld hl, OBJECT_STRUCT_LENGTH
- add hl, de
- ld d, h
- ld e, l
-
- pop af
- dec a
- jr nz, .loop
- ret
-
-.fall_down_hole
- pop af
- ret
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..b4b5ef467 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]
@@ -58,7 +57,6 @@ CanObjectMoveInDirection:
and a
ret
-
WillObjectBumpIntoWater:
call Function6f5f
ret c
@@ -144,9 +142,9 @@ Function6f5f:
Function6f7f:
ld d, a
and $f0
- cp $b0
+ cp HI_NYBBLE_SIDE_WALLS
jr z, .done
- cp $c0
+ cp HI_NYBBLE_UNUSED_C0
jr z, .done
xor a
ret
@@ -216,10 +214,7 @@ Function6fa1:
scf
ret
-
-
CheckFacingObject::
-
call GetFacingTileCoord
; Double the distance for counter tiles.
@@ -258,7 +253,6 @@ CheckFacingObject::
scf
ret
-
WillObjectBumpIntoSomeoneElse:
ld hl, OBJECT_NEXT_MAP_X
add hl, bc
@@ -532,7 +526,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..f3dcb5b96 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
@@ -165,8 +161,6 @@ LoadUsedSpritesGFX:
farcall LoadEmote
ret
-
-
SafeGetSprite:
push hl
call GetSprite
@@ -200,7 +194,6 @@ GetSprite:
ld h, a
ret
-
GetMonSprite:
; Return carry if a monster sprite was loaded.
@@ -263,7 +256,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 +282,6 @@ _DoesSpriteHaveFacings::
and a
ret
-
_GetSpritePalette::
ld a, c
call GetMonSprite
@@ -310,14 +301,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 +345,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 +372,6 @@ LoadSpriteGFX:
ld a, l
ret
-
SortUsedSprites:
; Bubble-sort sprites by type.
@@ -455,7 +442,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 +500,6 @@ ArrangeUsedSprites:
.quit
ret
-
GetSpriteLength:
; Return the length of sprite type a in tiles.
@@ -536,7 +521,6 @@ GetSpriteLength:
ld a, 4
ret
-
GetUsedSprites:
ld hl, wUsedSprites
ld c, SPRITE_GFX_LIST_CAPACITY
@@ -678,7 +662,6 @@ LoadEmote::
call GetEmote2bpp
ret
-
INCLUDE "data/sprites/emotes.asm"
INCLUDE "data/sprites/sprite_mons.asm"
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/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..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
@@ -12,14 +11,11 @@ SelectMenu::
call WaitButton
jp CloseText
-
ItemMayBeRegisteredText:
text_jump UnknownText_0x1c1cf3
db "@"
-
CheckRegisteredItem:
-
ld a, [wWhichRegisteredItem]
and a
jr z, .NoRegisteredItem
@@ -85,7 +81,6 @@ CheckRegisteredItem:
scf
ret
-
.CheckRegisteredNo:
ld a, [wWhichRegisteredItem]
and REGISTERED_NUMBER
@@ -100,7 +95,6 @@ CheckRegisteredItem:
scf
ret
-
.IsSameItem:
ld a, [wRegisteredItem]
cp [hl]
@@ -113,9 +107,7 @@ CheckRegisteredItem:
scf
ret
-
UseRegisteredItem:
-
farcall CheckItemMenu
ld a, [wItemAttributeParamBuffer]
ld hl, .SwitchTo
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..407480d36 100644
--- a/engine/phone/generic_calls.asm
+++ b/engine/phone/generic_calls.asm
@@ -1255,11 +1255,9 @@ PhoneScript_MonFlavorText:
buttonsound
farjump PhoneScript_HangupText_Male
-
GrandmaString: db "Grandma@"
GrandpaString: db "Grandpa@"
MomString: db "Mom@"
DadString: db "Dad@"
SisterString: db "Sister@"
BrotherString: db "Brother@"
-
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..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]
@@ -427,7 +426,6 @@ DexEntryScreen_ArrowCursorData:
dwcoord 11, 17 ; CRY
dwcoord 15, 17 ; PRNT
-
DexEntryScreen_MenuActionJumptable:
dw Pokedex_Page
dw .Area
@@ -1069,7 +1067,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 +1413,6 @@ Pokedex_PlaceString:
ld [hli], a
jr .loop
-
Pokedex_PlaceBorder:
push hl
ld a, $33
@@ -1460,7 +1456,6 @@ Pokedex_PlaceBorder:
dec e
jr .row_loop
-
Pokedex_PrintListing:
; Prints the list of Pokémon on the main Pokédex screen.
@@ -1578,7 +1573,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 +1588,6 @@ Pokedex_GetSelectedMon:
ld [wd265], a
ret
-
Pokedex_CheckCaught:
push de
push hl
@@ -1605,7 +1598,6 @@ Pokedex_CheckCaught:
pop de
ret
-
Pokedex_CheckSeen:
push de
push hl
@@ -1616,8 +1608,6 @@ Pokedex_CheckSeen:
pop de
ret
-
-
Pokedex_OrderMonsByMode:
ld hl, wPokedexOrder
ld bc, wPokedexOrderEnd - wPokedexOrder
@@ -1711,12 +1701,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 +2337,6 @@ Pokedex_ApplyUsualPals:
call DmgToCgbObjPal0
ret
-
Pokedex_LoadPointer:
ld e, a
ld d, 0
@@ -2387,7 +2374,6 @@ Pokedex_LoadSelectedMonTiles:
call CloseSRAM
ret
-
Pokedex_LoadCurrentFootprint:
call Pokedex_GetSelectedMon
@@ -2431,7 +2417,6 @@ Pokedex_LoadAnyFootprint:
ret
-
Pokedex_LoadGFX:
call DisableLCD
ld hl, vTiles2
@@ -2561,7 +2546,6 @@ _NewPokedexEntry:
call PlayMonCry
ret
-
Pokedex_SetBGMapMode3:
ld a, $3
ld [hBGMapMode], a
@@ -2585,7 +2569,6 @@ Pokedex_SetBGMapMode_3ifDMG_4ifCGB:
call Pokedex_SetBGMapMode3
ret
-
Pokedex_ResetBGMapMode:
xor a
ld [hBGMapMode], a
diff --git a/engine/pokedex/pokedex_2.asm b/engine/pokedex/pokedex_2.asm
index 21aea61b4..8105a080a 100644
--- a/engine/pokedex/pokedex_2.asm
+++ b/engine/pokedex/pokedex_2.asm
@@ -279,3 +279,5 @@ endr
ld e, l
pop hl
ret
+
+INCLUDE "data/pokemon/dex_entry_pointers.asm"
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..8fc5ffa3d 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
@@ -2029,17 +1990,16 @@ PlayRadio:
lb bc, 4, 18
call TextBox
hlcoord 1, 14
- ld [hl], $72
+ ld [hl], "“"
pop de
hlcoord 2, 14
call PlaceString
ld h, b
ld l, c
- ld [hl], $73
+ ld [hl], "”"
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]
@@ -3011,4 +2946,3 @@ Unreferenced_Function92311:
xor a
ld [hBGMapMode], a
ret
-
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..7e7f0e097 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
@@ -961,4 +959,3 @@ Unreferenced_DayCareMonPrintEmptyString:
.string
db "@"
-
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/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
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/printer/printer.asm b/engine/printer/printer.asm
index e2b0f1af5..4dc74c6d2 100644
--- a/engine/printer/printer.asm
+++ b/engine/printer/printer.asm
@@ -1,5 +1,3 @@
-INCLUDE "engine/printer/printer_serial.asm"
-
SendScreenToPrinter:
.loop
call JoyTextDelay
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]
diff --git a/gfx/pics.asm b/gfx/pics.asm
index 5c5b85a26..d771b63d2 100644
--- a/gfx/pics.asm
+++ b/gfx/pics.asm
@@ -4,6 +4,7 @@ INCLUDE "constants.asm"
; PokemonPicPointers and UnownPicPointers are assumed to start at the same
; address, but in different banks. This is enforced in pokecrystal.link.
+
SECTION "Pic Pointers", ROMX
INCLUDE "data/pokemon/pic_pointers.asm"
@@ -782,14 +783,10 @@ INCBIN "gfx/pokemon/unown_r/back.2bpp.lz"
SECTION "Pics 20", ROMX
-
SECTION "Pics 21", ROMX
-
SECTION "Pics 22", ROMX
-
SECTION "Pics 23", ROMX
-
SECTION "Pics 24", ROMX
diff --git a/gfx/sgb/blk_packets.asm b/gfx/sgb/blk_packets.asm
index a50decd34..92c6cb437 100644
--- a/gfx/sgb/blk_packets.asm
+++ b/gfx/sgb/blk_packets.asm
@@ -13,7 +13,6 @@ attr_blk_data: MACRO
db \5, \6, \7, \8 ; x1, y1, x2, y2
ENDM
-
BlkPacket_9a86:
attr_blk 1
attr_blk_data %011, 0,0,0, 00,00, 19,17
diff --git a/gfx/sgb/pal_packets.asm b/gfx/sgb/pal_packets.asm
index 0a392fb22..1d5ae7e5e 100644
--- a/gfx/sgb/pal_packets.asm
+++ b/gfx/sgb/pal_packets.asm
@@ -16,7 +16,6 @@ sgb_pal23: MACRO
db (SGB_PAL23 << 3) + 1
ENDM
-
PalPacket_GSTitleScreen:
sgb_pal_set GS_TITLE_SCREEN_0, GS_TITLE_SCREEN_1, GS_TITLE_SCREEN_2, GS_TITLE_SCREEN_3
@@ -80,7 +79,6 @@ PalPacket_TradeTube:
PalPacket_GamefreakLogo:
sgb_pal_set GS_INTRO_GAMEFREAK_LOGO, 00, 00, 00
-
PalPacket_9ce6:
sgb_pal01
RGB 31, 31, 31
diff --git a/gfx/tileset_palette_maps.asm b/gfx/tileset_palette_maps.asm
index 612a314b7..41f71ff0b 100644
--- a/gfx/tileset_palette_maps.asm
+++ b/gfx/tileset_palette_maps.asm
@@ -9,7 +9,6 @@ rept (_NARG + -1) / 2
endr
ENDM
-
TilesetKantoPalMap:
INCLUDE "gfx/tilesets/kanto_palette_map.asm"
diff --git a/home.asm b/home.asm
index d7c84bc64..8f68511b4 100644
--- a/home.asm
+++ b/home.asm
@@ -2,12 +2,11 @@ INCLUDE "constants.asm"
SECTION "NULL", ROM0
-NULL::
+NULL::
INCLUDE "home/rst.asm"
-
INCLUDE "home/interrupts.asm"
diff --git a/home/audio.asm b/home/audio.asm
index 11ebd9b6b..dd115449d 100644
--- a/home/audio.asm
+++ b/home/audio.asm
@@ -1,7 +1,6 @@
; Audio interfaces.
MapSetup_Sound_Off::
-
push hl
push de
push bc
@@ -25,9 +24,7 @@ MapSetup_Sound_Off::
pop hl
ret
-
UpdateSound::
-
push hl
push de
push bc
@@ -51,11 +48,8 @@ UpdateSound::
pop hl
ret
-
_LoadMusicByte::
; wCurMusicByte = [a:de]
-GLOBAL LoadMusicByte
-
ld [hROMBank], a
ld [MBC3RomBank], a
@@ -67,7 +61,6 @@ GLOBAL LoadMusicByte
ld [MBC3RomBank], a
ret
-
PlayMusic::
; Play music de.
@@ -102,7 +95,6 @@ PlayMusic::
pop hl
ret
-
PlayMusic2::
; Stop playing music, then play music de.
@@ -134,8 +126,6 @@ PlayMusic2::
pop hl
ret
-
-
PlayCry::
; Play cry de.
@@ -187,7 +177,6 @@ endr
pop hl
ret
-
PlaySFX::
; Play sound effect de.
; Sound effects are ordered by priority (highest to lowest)
@@ -228,13 +217,11 @@ PlaySFX::
pop hl
ret
-
WaitPlaySFX::
call WaitSFX
call PlaySFX
ret
-
WaitSFX::
; infinite loop until sfx is done playing
@@ -545,7 +532,6 @@ TerminateExpBarSound::
ld [rNR14], a
ret
-
ChannelsOff::
; Quickly turn off music channels
xor a
diff --git a/home/battle.asm b/home/battle.asm
index 1899a40dc..e88adef02 100644
--- a/home/battle.asm
+++ b/home/battle.asm
@@ -9,7 +9,6 @@ UserPartyAttr::
pop af
jr OTPartyAttr
-
OpponentPartyAttr::
push af
ld a, [hBattleTurn]
@@ -21,7 +20,6 @@ OpponentPartyAttr::
pop af
jr OTPartyAttr
-
BattlePartyAttr::
; Get attribute a from the party struct of the active battle mon.
push bc
@@ -34,7 +32,6 @@ BattlePartyAttr::
pop bc
ret
-
OTPartyAttr::
; Get attribute a from the party struct of the active enemy mon.
push bc
@@ -47,7 +44,6 @@ OTPartyAttr::
pop bc
ret
-
ResetDamage::
xor a
ld [wCurDamage], a
@@ -64,7 +60,6 @@ SetEnemyTurn::
ld [hBattleTurn], a
ret
-
UpdateOpponentInParty::
ld a, [hBattleTurn]
and a
@@ -110,7 +105,6 @@ UpdateEnemyMonInParty::
ld bc, wEnemyMonMaxHP - wEnemyMonLevel
jp CopyBytes
-
RefreshBattleHuds::
call UpdateBattleHuds
ld c, 3
@@ -122,10 +116,8 @@ UpdateBattleHuds::
farcall UpdateEnemyHUD
ret
-
INCLUDE "home/battle_vars.asm"
-
FarCopyRadioText::
inc hl
ld a, [hROMBank]
@@ -149,12 +141,7 @@ FarCopyRadioText::
ld [MBC3RomBank], a
ret
-
MobileTextBorder::
-
-CELL_PHONE_TOP EQU $5e
-CELL_PHONE_BOTTOM EQU $5f
-
; For mobile link battles only.
ld a, [wLinkMode]
cp LINK_MOBILE
@@ -163,12 +150,11 @@ CELL_PHONE_BOTTOM EQU $5f
; Draw a cell phone icon at the
; top right corner of the border.
hlcoord 19, 12
- ld [hl], CELL_PHONE_TOP
+ ld [hl], $5e ; top
hlcoord 19, 13
- ld [hl], CELL_PHONE_BOTTOM
+ ld [hl], $5f ; bottom
ret
-
BattleTextBox::
; Open a textbox and print text at hl.
push hl
@@ -180,7 +166,6 @@ BattleTextBox::
call PrintTextBoxText
ret
-
StdBattleTextBox::
; Open a textbox and print battle text at 20:hl.
@@ -197,7 +182,6 @@ StdBattleTextBox::
ret
GetBattleAnimPointer::
-
ld a, BANK(BattleAnimations)
rst Bankswitch
@@ -212,7 +196,6 @@ GetBattleAnimPointer::
ret
GetBattleAnimByte::
-
push hl
push de
diff --git a/home/copy.asm b/home/copy.asm
index 65be3895a..68ed240e3 100644
--- a/home/copy.asm
+++ b/home/copy.asm
@@ -1,6 +1,5 @@
; Functions to copy data from ROM.
-
Get2bpp_2::
ld a, [rLCDC]
bit rLCDC_ENABLE, a
@@ -94,14 +93,10 @@ OldDMATransfer::
ld [hBGMapMode], a
ret
-
-
ReplaceKrisSprite::
farcall _ReplaceKrisSprite
ret
-
-
LoadStandardFont::
farcall _LoadStandardFont
ret
@@ -110,8 +105,6 @@ LoadFontsBattleExtra::
farcall _LoadFontsBattleExtra
ret
-
-
LoadFontsExtra::
farcall _LoadFontsExtra1
farcall _LoadFontsExtra2
@@ -139,8 +132,6 @@ DecompressRequest2bpp::
call CloseSRAM
ret
-
-
FarCopyBytes::
; copy bc bytes from a:hl to de
@@ -156,7 +147,6 @@ FarCopyBytes::
rst Bankswitch
ret
-
FarCopyBytesDouble::
; Copy bc bytes from a:hl to bc*2 bytes at de,
; doubling each byte in the process.
@@ -194,7 +184,6 @@ FarCopyBytesDouble::
rst Bankswitch
ret
-
Request2bpp::
; Load 2bpp at b:de to occupy c tiles of hl.
ld a, [hBGMapMode]
@@ -269,7 +258,6 @@ Request2bpp::
ld c, a
jr .loop
-
Request1bpp::
; Load 1bpp at b:de to occupy c tiles of hl.
ld a, [hBGMapMode]
@@ -344,7 +332,6 @@ Request1bpp::
ld c, a
jr .loop
-
Get2bpp::
ld a, [rLCDC]
bit rLCDC_ENABLE, a
@@ -374,7 +361,6 @@ Copy2bpp::
jp FarCopyBytes
-
Get1bpp::
ld a, [rLCDC]
bit rLCDC_ENABLE, a
diff --git a/home/decompress.asm b/home/decompress.asm
index 104fa0e30..d4bab7a6a 100644
--- a/home/decompress.asm
+++ b/home/decompress.asm
@@ -13,17 +13,14 @@ FarDecompress::
rst Bankswitch
ret
-
Decompress::
; Pokemon Crystal uses an lz variant for compression.
; This is mainly (but not necessarily) used for graphics.
; This function decompresses lz-compressed data from hl to de.
-
LZ_END EQU $ff ; Compressed data is terminated with $ff.
-
; A typical control command consists of:
LZ_CMD EQU %11100000 ; command id (bits 5-7)
@@ -31,7 +28,6 @@ LZ_LEN EQU %00011111 ; length n (bits 0-4)
; Additional parameters are read during command execution.
-
; Commands:
LZ_LITERAL EQU 0 << 5 ; Read literal data for n bytes.
@@ -39,7 +35,6 @@ LZ_ITERATE EQU 1 << 5 ; Write the same byte for n bytes.
LZ_ALTERNATE EQU 2 << 5 ; Alternate two bytes for n bytes.
LZ_ZERO EQU 3 << 5 ; Write 0 for n bytes.
-
; Another class of commands reuses data from the decompressed output.
LZ_RW EQU 2 + 5 ; bit
@@ -52,7 +47,6 @@ LZ_REPEAT EQU 4 << 5 ; Repeat n bytes from the offset.
LZ_FLIP EQU 5 << 5 ; Repeat n bitflipped bytes.
LZ_REVERSE EQU 6 << 5 ; Repeat n bytes in reverse.
-
; If the value in the count needs to be larger than 5 bits,
; LZ_LONG can be used to expand the count to 10 bits.
LZ_LONG EQU 7 << 5
@@ -67,10 +61,8 @@ LZ_LONG_HI EQU %00000011
; x: the new control command
; y: the length
-
; For more information, refer to the code below and in extras/gfx.py.
-
; Save the output address
; for rewrite commands.
ld a, e
@@ -112,7 +104,6 @@ LZ_LONG_HI EQU %00000011
inc bc
jr .command
-
.short
push af
@@ -124,7 +115,6 @@ LZ_LONG_HI EQU %00000011
; read at least 1 byte
inc c
-
.command
; Increment loop counts.
; We bail the moment they hit 0.
@@ -143,7 +133,6 @@ LZ_LONG_HI EQU %00000011
cp LZ_ZERO
jr z, .Zero
-
.Literal:
; Read literal data for bc bytes.
.lloop
@@ -158,7 +147,6 @@ LZ_LONG_HI EQU %00000011
inc de
jr .lloop
-
.Iter:
; Write the same byte for bc bytes.
ld a, [hli]
@@ -174,7 +162,6 @@ LZ_LONG_HI EQU %00000011
inc de
jr .iloop
-
.Alt:
; Alternate two bytes for bc bytes.
dec c
@@ -204,7 +191,6 @@ LZ_LONG_HI EQU %00000011
inc hl
jr .Main
-
.Zero:
; Write 0 for bc bytes.
xor a
@@ -220,7 +206,6 @@ LZ_LONG_HI EQU %00000011
inc de
jr .zloop
-
.rewrite
; Repeat decompressed data from output.
push hl
@@ -274,7 +259,6 @@ LZ_LONG_HI EQU %00000011
; More practically, LZ_LONG is not recursive.
; For now, it defaults to LZ_REPEAT.
-
.Repeat:
; Copy decompressed data for bc bytes.
dec c
@@ -288,7 +272,6 @@ LZ_LONG_HI EQU %00000011
inc de
jr .Repeat
-
.Flip:
; Copy bitflipped decompressed data for bc bytes.
dec c
@@ -314,7 +297,6 @@ LZ_LONG_HI EQU %00000011
inc de
jr .Flip
-
.Reverse:
; Copy reversed decompressed data for bc bytes.
dec c
@@ -329,7 +311,6 @@ LZ_LONG_HI EQU %00000011
inc de
jr .Reverse
-
.donerw
pop hl
diff --git a/home/delay.asm b/home/delay.asm
index 7d3e05c03..4ad25ef21 100644
--- a/home/delay.asm
+++ b/home/delay.asm
@@ -11,7 +11,6 @@ DelayFrame::
jr nz, .halt
ret
-
DelayFrames::
; Wait c frames
call DelayFrame
diff --git a/home/fade.asm b/home/fade.asm
index 9b0d10134..56f0197e6 100644
--- a/home/fade.asm
+++ b/home/fade.asm
@@ -1,6 +1,5 @@
; Functions to fade the screen in and out.
-
Unreferenced_Function48c::
; TimeOfDayFade
ld a, [wTimeOfDayPal]
@@ -21,7 +20,6 @@ Unreferenced_Function48c::
ld [rOBP1], a
ret
-
RotateFourPalettesRight::
ld a, [hCGB]
and a
@@ -106,7 +104,6 @@ RotatePalettesLeft::
jr nz, RotatePalettesLeft
ret
-
IncGradGBPalTable_00:: db %11111111, %11111111, %11111111
IncGradGBPalTable_01:: db %11111110, %11111110, %11111110
IncGradGBPalTable_02:: db %11111001, %11111001, %11111001
diff --git a/home/farcall.asm b/home/farcall.asm
index 25b3cd007..cb87b1774 100644
--- a/home/farcall.asm
+++ b/home/farcall.asm
@@ -14,7 +14,6 @@ FarCall_de::
push de
ret
-
FarCall_hl::
; Call a:hl.
; Preserves other registers.
diff --git a/home/flag.asm b/home/flag.asm
index 796c19880..411f04184 100644
--- a/home/flag.asm
+++ b/home/flag.asm
@@ -24,7 +24,6 @@ ResetFlashIfOutOfCave::
res STATUSFLAGS_FLASH_F, [hl]
ret
-
EventFlagAction::
ld hl, wEventFlags
call FlagAction
@@ -97,7 +96,6 @@ FlagAction::
ld [hl], a
ret
-
CheckReceivedDex::
ld de, ENGINE_POKEDEX
ld b, CHECK_FLAG
diff --git a/home/game_time.asm b/home/game_time.asm
index 61cff0a16..0300db73d 100644
--- a/home/game_time.asm
+++ b/home/game_time.asm
@@ -8,9 +8,7 @@ ResetGameTime::
ld [wGameTimeFrames], a
ret
-
GameTimer::
-
nop
ld a, [rSVBK]
@@ -24,12 +22,10 @@ GameTimer::
ld [rSVBK], a
ret
-
UpdateGameTimer::
; Increment the game timer by one frame.
; The game timer is capped at 999:59:59.00.
-
; Don't update if game logic is paused.
ld a, [wGameLogicPaused]
and a
@@ -45,7 +41,6 @@ UpdateGameTimer::
bit 0, [hl]
ret nz
-
; +1 frame
ld hl, wGameTimeFrames
ld a, [hl]
@@ -57,7 +52,6 @@ UpdateGameTimer::
ld [hl], a
ret
-
.second
xor a
ld [hl], a
@@ -73,7 +67,6 @@ UpdateGameTimer::
ld [hl], a
ret
-
.minute
xor a
ld [hl], a
@@ -89,7 +82,6 @@ UpdateGameTimer::
ld [hl], a
ret
-
.hour
xor a
ld [hl], a
@@ -101,7 +93,6 @@ UpdateGameTimer::
ld l, a
inc hl
-
; Cap the timer after 1000 hours.
ld a, h
cp HIGH(1000)
@@ -119,7 +110,6 @@ UpdateGameTimer::
ld [wGameTimeSeconds], a
ret
-
.ok
ld a, h
ld [wGameTimeHours], a
diff --git a/home/init.asm b/home/init.asm
index 5496ba45f..dc1f538be 100644
--- a/home/init.asm
+++ b/home/init.asm
@@ -18,7 +18,6 @@ Reset::
jr Init
-
_Start::
cp $11
jr z, .cgb
@@ -33,9 +32,7 @@ _Start::
ld a, $1
ld [hSystemBooted], a
-
Init::
-
di
xor a
@@ -100,7 +97,6 @@ Init::
call ClearSprites
call ClearsScratch
-
ld a, BANK(WriteOAMDMACodeToHRAM)
rst Bankswitch
@@ -171,7 +167,6 @@ Init::
ld [wMapMusic], a
jp GameInit
-
ClearVRAM::
; Wipe VRAM banks 0 and 1
diff --git a/home/joypad.asm b/home/joypad.asm
index 5b11002c7..87fc60d7e 100644
--- a/home/joypad.asm
+++ b/home/joypad.asm
@@ -102,7 +102,6 @@ endr
ret
-
GetJoypad::
; Update mirror joypad input from hJoypadDown (real input)
@@ -190,7 +189,6 @@ GetJoypad::
rst Bankswitch
jr .quit
-
.updateauto
; An input of $ff will end the stream.
ld a, [hli]
@@ -230,7 +228,6 @@ GetJoypad::
ld [hJoyDown], a ; input
jr .quit
-
StartAutoInput::
; Start reading automated input stream at a:hl.
@@ -252,7 +249,6 @@ StartAutoInput::
ld [wInputType], a
ret
-
StopAutoInput::
; Clear variables related to automated input.
xor a
@@ -264,7 +260,6 @@ StopAutoInput::
ld [wInputType], a
ret
-
JoyTitleScreenInput::
.loop
@@ -292,7 +287,6 @@ JoyTitleScreenInput::
scf
ret
-
JoyWaitAorB::
.loop
call DelayFrame
diff --git a/home/lcd.asm b/home/lcd.asm
index ecac5b5c3..7ea53d453 100644
--- a/home/lcd.asm
+++ b/home/lcd.asm
@@ -1,6 +1,5 @@
; LCD handling
-
Unreferenced_Function547::
ld a, [hLCDCPointer]
cp rSCX - $ff00
@@ -10,7 +9,6 @@ Unreferenced_Function547::
ld [$ff00+c], a
ret
-
LCD::
push af
ld a, [hLCDCPointer]
@@ -34,7 +32,6 @@ LCD::
pop af
reti
-
DisableLCD::
; Turn the LCD off
@@ -68,7 +65,6 @@ DisableLCD::
ld [rIE], a
ret
-
EnableLCD::
ld a, [rLCDC]
set rLCDC_ENABLE, a
diff --git a/home/map.asm b/home/map.asm
index 416b2f51a..550486081 100644
--- a/home/map.asm
+++ b/home/map.asm
@@ -757,7 +757,6 @@ ChangeMap::
ret
FillMapConnections::
-
; North
ld a, [wNorthConnectedMapGroup]
cp $ff
@@ -855,7 +854,6 @@ FillMapConnections::
FillNorthConnectionStrip::
FillSouthConnectionStrip::
-
ld c, 3
.y
push de
@@ -890,7 +888,6 @@ FillSouthConnectionStrip::
FillWestConnectionStrip::
FillEastConnectionStrip::
-
.loop
ld a, [wMapWidth]
add 6
@@ -1646,9 +1643,9 @@ GetMovementPermissions::
.CheckHiNybble:
and $f0
- cp $b0
+ cp HI_NYBBLE_SIDE_WALLS
ret z
- cp $c0
+ cp HI_NYBBLE_UNUSED_C0
ret
GetFacingTileCoord::
diff --git a/home/math.asm b/home/math.asm
index 4a1711343..f385ccbf8 100644
--- a/home/math.asm
+++ b/home/math.asm
@@ -23,7 +23,6 @@ SimpleMultiply::
pop bc
ret
-
SimpleDivide::
; Divide a by c. Return quotient b and remainder a.
ld b, 0
@@ -35,7 +34,6 @@ SimpleDivide::
add c
ret
-
Multiply::
; Multiply hMultiplicand (3 bytes) by hMultiplier. Result in hProduct.
; All values are big endian.
@@ -48,7 +46,6 @@ Multiply::
pop hl
ret
-
Divide::
; Divide hDividend length b (max 4 bytes) by hDivisor. Result in hQuotient.
; All values are big endian.
@@ -61,7 +58,6 @@ Divide::
pop hl
ret
-
SubtractSigned::
; Return a - b, sign in carry.
sub b
diff --git a/home/menu.asm b/home/menu.asm
index dd8442cb7..d10b6e936 100644
--- a/home/menu.asm
+++ b/home/menu.asm
@@ -1,6 +1,5 @@
; Functions used in displaying and handling menus.
-
LoadMenuHeader::
call CopyMenuHeader
call PushWindow
@@ -18,7 +17,6 @@ StoreTo_wMenuCursorBuffer::
ld [wMenuCursorBuffer], a
ret
-
MenuTextBox::
push hl
call LoadMenuTextBox
@@ -109,7 +107,6 @@ CopyNameFromMenu::
pop hl
ret
-
YesNoBox::
lb bc, SCREEN_WIDTH - 6, 7
@@ -330,7 +327,6 @@ InitMenuCursorAndButtonPermissions::
.disallow_left_right
ret
-
GetScrollingMenuJoypad::
call ScrollingMenuJoypad
ld hl, wMenuJoypadFilter
@@ -495,7 +491,6 @@ MenuClickSound::
pop af
ret
-
PlayClickSFX::
push de
ld de, SFX_READ_TEXT_2
diff --git a/home/menu_window.asm b/home/menu_window.asm
index 49536d5f0..7c511097d 100644
--- a/home/menu_window.asm
+++ b/home/menu_window.asm
@@ -187,14 +187,12 @@ ClearWholeMenuBox::
call ClearBox
ret
-
MenuBoxCoord2Tile::
ld a, [wMenuBorderLeftCoord]
ld c, a
ld a, [wMenuBorderTopCoord]
ld b, a
-
Coord2Tile::
; Return the address of wTileMap(c, b) in hl.
xor a
diff --git a/home/mobile.asm b/home/mobile.asm
index c27012098..21af7a73b 100644
--- a/home/mobile.asm
+++ b/home/mobile.asm
@@ -65,7 +65,6 @@ MobileReceive::
ret
-
Timer::
push af
push bc
diff --git a/home/movement.asm b/home/movement.asm
index fe36511c5..2c19b6355 100644
--- a/home/movement.asm
+++ b/home/movement.asm
@@ -190,4 +190,3 @@ HideCursor::
ld l, a
ld [hl], " "
ret
-
diff --git a/home/names.asm b/home/names.asm
index cbe21b821..e9c36fc1d 100644
--- a/home/names.asm
+++ b/home/names.asm
@@ -109,7 +109,6 @@ GetBasePokemonName::
pop hl
ret
-
GetPokemonName::
; Get Pokemon name wd265.
diff --git a/home/palettes.asm b/home/palettes.asm
index 09858145a..d5b6abff5 100644
--- a/home/palettes.asm
+++ b/home/palettes.asm
@@ -1,6 +1,5 @@
; Functions dealing with palettes.
-
UpdatePalsIfCGB::
; update bgp data from wBGPals2
; update obp data from wOBPals2
@@ -11,7 +10,6 @@ UpdatePalsIfCGB::
and a
ret z
-
UpdateCGBPals::
; return carry if successful
; any pals to update?
@@ -19,9 +17,7 @@ UpdateCGBPals::
and a
ret z
-
ForceUpdateCGBPals::
-
ld a, [rSVBK]
push af
ld a, BANK(wBGPals2)
@@ -69,7 +65,6 @@ endr
scf
ret
-
DmgToCgbBGPals::
; exists to forego reinserting cgb-converted image data
@@ -114,7 +109,6 @@ DmgToCgbBGPals::
pop af
ret
-
DmgToCgbObjPals::
; exists to forego reinserting cgb-converted image data
@@ -159,7 +153,6 @@ DmgToCgbObjPals::
pop hl
ret
-
DmgToCgbObjPal0::
ld [rOBP0], a
push af
@@ -235,8 +228,6 @@ DmgToCgbObjPal1::
pop af
ret
-
-
CopyPals::
; copy c palettes in order b from de to hl
@@ -289,7 +280,6 @@ endr
jr nz, CopyPals
ret
-
ClearVBank1::
ld a, [hCGB]
and a
@@ -307,11 +297,9 @@ ClearVBank1::
ld [rVBK], a
ret
-
ret_d90::
ret
-
ReloadSpritesNoPalettes::
ld a, [hCGB]
and a
@@ -331,7 +319,6 @@ ReloadSpritesNoPalettes::
call DelayFrame
ret
-
FarCallSwapTextboxPalettes::
homecall SwapTextboxPalettes
ret
diff --git a/home/random.asm b/home/random.asm
index 0ee1c50f2..e436e4ff6 100644
--- a/home/random.asm
+++ b/home/random.asm
@@ -47,7 +47,6 @@ BattleRandom::
ld a, [wPredefTemp + 1]
ret
-
RandomRange::
; Return a random number between 0 and a (non-inclusive).
diff --git a/home/text.asm b/home/text.asm
index ceb249c4e..d74af02af 100644
--- a/home/text.asm
+++ b/home/text.asm
@@ -19,7 +19,6 @@ FillBoxWithByte::
jr nz, .row
ret
-
ClearTileMap::
; Fill wTileMap with blank tiles.
@@ -34,7 +33,6 @@ ClearTileMap::
ret z
jp WaitBGMap
-
ClearScreen::
ld a, PAL_BG_TEXT
hlcoord 0, 0, wAttrMap
@@ -42,7 +40,6 @@ ClearScreen::
call ByteFill
jr ClearTileMap
-
TextBox::
; Draw a text box at hl with room for b lines of c characters each.
; Places a border around the textbox, then switches the palette to the
@@ -54,9 +51,7 @@ TextBox::
pop bc
jr TextBoxPalette
-
TextBoxBorder::
-
; Top
push hl
ld a, "┌"
@@ -102,7 +97,6 @@ TextBoxBorder::
jr nz, .loop
ret
-
TextBoxPalette::
; Fill text box width c height b at hl with pal 7
ld de, wAttrMap - wTileMap
@@ -127,7 +121,6 @@ TextBoxPalette::
jr nz, .col
ret
-
SpeechTextBox::
; Standard textbox.
hlcoord TEXTBOX_X, TEXTBOX_Y
@@ -144,7 +137,6 @@ RadioTerminator::
ret
.stop db "@"
-
PrintText::
call SetUpTextBox
BuenaPrintText::
@@ -167,7 +159,6 @@ SetUpTextBox::
pop hl
ret
-
PlaceString::
push hl
@@ -285,14 +276,12 @@ ENDM
call PrintLetterDelay
jp NextChar
-
DayOfWeekChar::
ld c, l
ld b, h
farcall Function17f036
jp PlaceNextChar
-
print_name: MACRO
push de
ld de, \1
@@ -318,7 +307,6 @@ PlaceJPRoute: print_name PlaceJPRouteText
PlaceWatashi: print_name PlaceWatashiText
PlaceKokoWa: print_name PlaceKokoWaText
-
PlaceMoveTargetsName::
ld a, [hBattleTurn]
xor 1
@@ -343,7 +331,6 @@ PlaceMoveUsersName::
ld de, wEnemyMonNick
jr PlaceCommandCharacter
-
PlaceEnemysName::
push de
@@ -377,7 +364,6 @@ PlaceEnemysName::
ld de, wOTClassName
jr PlaceCommandCharacter
-
PlaceGenderedPlayerName::
push de
ld de, wPlayerName
@@ -391,7 +377,6 @@ PlaceGenderedPlayerName::
ld de, ChanSuffixText
jr PlaceCommandCharacter
-
PlaceCommandCharacter::
call PlaceString
ld h, b
@@ -472,7 +457,6 @@ TextFar::
push hl
jp NextChar
-
LineChar::
pop hl
hlcoord TEXTBOX_INNERX, TEXTBOX_INNERY + 2
@@ -502,7 +486,6 @@ Paragraph::
pop de
jp NextChar
-
_ContText::
ld a, [wLinkMode]
or a
@@ -529,7 +512,6 @@ _ContTextNoPause::
pop de
jp NextChar
-
ContText::
push de
ld de, .cont
@@ -543,7 +525,6 @@ ContText::
.cont: db "<_CONT>@"
-
PlaceDexEnd::
; Ends a Pokédex entry in Gen 1.
; Dex entries are now regular strings.
@@ -661,7 +642,6 @@ PokeFluteTerminatorCharacter::
.stop: db "@"
-
PlaceHLTextAtBC::
ld a, [wTextBoxFlags]
push af
diff --git a/home/time.asm b/home/time.asm
index abac80e76..caf857a68 100644
--- a/home/time.asm
+++ b/home/time.asm
@@ -1,6 +1,5 @@
; Functions relating to the timer interrupt and the real-time-clock.
-
AskTimer::
push af
ld a, [hMobile]
@@ -12,7 +11,6 @@ AskTimer::
pop af
reti
-
LatchClock::
; latch clock counter data
ld a, 0
@@ -21,7 +19,6 @@ LatchClock::
ld [MBC3LatchClock], a
ret
-
UpdateTime::
call GetClock
call FixDays
@@ -29,7 +26,6 @@ UpdateTime::
farcall GetTimeOfDay
ret
-
GetClock::
; store clock data in hRTCDayHi-hRTCSeconds
@@ -70,7 +66,6 @@ GetClock::
call CloseSRAM
ret
-
FixDays::
; fix day count
; mod by 140
@@ -131,7 +126,6 @@ FixDays::
xor a
ret
-
FixTime::
; add ingame time (set at newgame) to current time
; day hr min sec
@@ -202,8 +196,6 @@ InitTime::
farcall _InitTime
ret
-
-
PanicResetClock::
call .ClearhRTC
call SetClock
@@ -218,7 +210,6 @@ PanicResetClock::
ld [hRTCDayHi], a
ret
-
SetClock::
; set clock data from hram
@@ -266,7 +257,6 @@ SetClock::
call CloseSRAM ; unlatch clock, disable clock r/w
ret
-
ClearRTCStatus::
; clear sRTCStatusFlags
xor a
diff --git a/home/trainers.asm b/home/trainers.asm
index e9c1c7167..5def6cf17 100644
--- a/home/trainers.asm
+++ b/home/trainers.asm
@@ -20,7 +20,6 @@ CheckTrainerBattle::
.loop
; Start a battle if the object:
-
push af
push de
@@ -128,7 +127,6 @@ LoadTrainer_continue::
ret
FacingPlayerDistance_bc::
-
push de
call FacingPlayerDistance
ld b, d
diff --git a/home/vblank.asm b/home/vblank.asm
index 3ae030ace..5e87dbcdf 100644
--- a/home/vblank.asm
+++ b/home/vblank.asm
@@ -6,7 +6,6 @@
; This prevents the display and audio output from lagging.
-
VBlank::
push af
push bc
@@ -45,7 +44,6 @@ VBlank::
dw VBlank6
dw VBlank0 ; just in case
-
VBlank0::
; normal operation
@@ -114,7 +112,6 @@ VBlank0::
call hTransferVirtualOAM
.done_oam
-
; vblank-sensitive operations are done
xor a
@@ -147,7 +144,6 @@ VBlank0::
ret
-
VBlank2::
; sound only
@@ -165,7 +161,6 @@ VBlank2::
ld [wVBlankOccurred], a
ret
-
VBlank1::
; scx, scy
; palettes
@@ -232,7 +227,6 @@ VBlank1::
ld [rIF], a
ret
-
UpdatePals::
; update pals for either dmg or cgb
@@ -251,7 +245,6 @@ UpdatePals::
and a
ret
-
VBlank3::
; scx, scy
; palettes
@@ -316,7 +309,6 @@ VBlank3::
ld [rIF], a
ret
-
VBlank4::
; bg map
; tiles
@@ -348,7 +340,6 @@ VBlank4::
rst Bankswitch
ret
-
VBlank5::
; scx
; palettes
@@ -397,7 +388,6 @@ VBlank5::
ld [rIE], a
ret
-
VBlank6::
; palettes
; tiles
diff --git a/home/video.asm b/home/video.asm
index 434783ba1..4b519fca0 100644
--- a/home/video.asm
+++ b/home/video.asm
@@ -17,7 +17,6 @@ DMATransfer::
scf
ret
-
UpdateBGMapBuffer::
; Copy [hBGMapTileCount] 16x8 tiles from wBGMapBuffer
; to bg map addresses in wBGMapBufferPtrs.
@@ -42,7 +41,6 @@ UpdateBGMapBuffer::
ld hl, wBGMapPalBuffer
ld de, wBGMapBuffer
-
.next
; Copy a pair of 16x8 blocks (one 16x16 block)
@@ -82,7 +80,6 @@ endr
jr nz, .next
-
ld a, [hSPBuffer]
ld l, a
ld a, [hSPBuffer + 1]
@@ -97,7 +94,6 @@ endr
scf
ret
-
WaitTop::
; Wait until the top third of the BG Map is being updated.
@@ -117,7 +113,6 @@ WaitTop::
ld [hBGMapMode], a
ret
-
UpdateBGMap::
; Update the BG Map, in thirds, from wTileMap and wAttrMap.
@@ -160,7 +155,6 @@ UpdateBGMap::
ld [hBGMapAddress + 1], a
ret
-
.Attr:
ld a, 1
ld [rVBK], a
@@ -172,11 +166,9 @@ UpdateBGMap::
ld [rVBK], a
ret
-
.Tiles:
hlcoord 0, 0
-
.update
ld [hSPBuffer], sp
@@ -188,10 +180,8 @@ UpdateBGMap::
jr z, .middle
; 2
-
THIRD_HEIGHT EQU SCREEN_HEIGHT / 3
-
.bottom
ld de, 2 * THIRD_HEIGHT * SCREEN_WIDTH
add hl, de
@@ -209,7 +199,6 @@ THIRD_HEIGHT EQU SCREEN_HEIGHT / 3
xor a
jr .start
-
.middle
ld de, THIRD_HEIGHT * SCREEN_WIDTH
add hl, de
@@ -227,7 +216,6 @@ THIRD_HEIGHT EQU SCREEN_HEIGHT / 3
ld a, 2
jr .start
-
.top
ld sp, hl
@@ -239,7 +227,6 @@ THIRD_HEIGHT EQU SCREEN_HEIGHT / 3
; Next time: middle third
ld a, 1
-
.start
; Which third to update next time
ld [hBGMapThird], a
@@ -250,7 +237,6 @@ THIRD_HEIGHT EQU SCREEN_HEIGHT / 3
; Discrepancy between wTileMap and BGMap
ld bc, BG_MAP_WIDTH - (SCREEN_WIDTH - 1)
-
.row
; Copy a row of 20 tiles
rept SCREEN_WIDTH / 2 - 1
@@ -269,7 +255,6 @@ endr
dec a
jr nz, .row
-
ld a, [hSPBuffer]
ld l, a
ld a, [hSPBuffer + 1]
@@ -277,7 +262,6 @@ endr
ld sp, hl
ret
-
Serve1bppRequest::
; Only call during the first fifth of VBlank
@@ -342,7 +326,6 @@ endr
dec b
jr nz, .next
-
ld a, l
ld [wRequested1bppDest], a
ld a, h
@@ -357,7 +340,6 @@ endr
ld sp, hl
ret
-
Serve2bppRequest::
; Only call during the first fifth of VBlank
@@ -373,9 +355,7 @@ Serve2bppRequest::
ret nc
jr _Serve2bppRequest
-
Serve2bppRequest_VBlank::
-
ld a, [wRequested2bpp]
and a
ret z
@@ -423,7 +403,6 @@ endr
dec b
jr nz, .next
-
ld a, l
ld [wRequested2bppDest], a
ld a, h
@@ -438,7 +417,6 @@ endr
ld sp, hl
ret
-
AnimateTileset::
; Only call during the first fifth of VBlank
diff --git a/home/window.asm b/home/window.asm
index f288e4eec..6d9bd5311 100644
--- a/home/window.asm
+++ b/home/window.asm
@@ -13,7 +13,6 @@ RefreshScreen::
rst Bankswitch
ret
-
CloseText::
ld a, [hOAMUpdate]
push af
diff --git a/macros/code.asm b/macros/code.asm
index 09b15255e..72fd4b0d2 100644
--- a/macros/code.asm
+++ b/macros/code.asm
@@ -19,7 +19,6 @@ ENDM
depixel EQUS "ldpixel de,"
bcpixel EQUS "ldpixel bc,"
-
; Design patterns
jumptable: MACRO
diff --git a/macros/data.asm b/macros/data.asm
index ad2d9b8ef..08a23ad29 100644
--- a/macros/data.asm
+++ b/macros/data.asm
@@ -2,7 +2,6 @@
percent EQUS "* $ff / 100"
-
; Constant data (db, dw, dl) macros
dwb: MACRO
@@ -87,7 +86,6 @@ dba_pic: MACRO ; dbw bank, address
dw \1
ENDM
-
dbpixel: MACRO
if _NARG >= 4
; x tile, x pxl, y tile, y pxl
@@ -103,14 +101,12 @@ dsprite: MACRO
db (\1 * 8) % $100 + \2, (\3 * 8) % $100 + \4, \5, \6
ENDM
-
menu_coords: MACRO
; x1, y1, x2, y2
db \2, \1 ; start coords
db \4, \3 ; end coords
ENDM
-
bcd: MACRO
rept _NARG
dn ((\1) % 100) / 10, (\1) % 10
@@ -118,7 +114,6 @@ rept _NARG
endr
ENDM
-
sine_table: MACRO
; \1 samples of sin(x) from x=0 to x<32768 (pi radians)
x = 0
diff --git a/macros/enum.asm b/macros/enum.asm
index 385aee6f8..009400743 100644
--- a/macros/enum.asm
+++ b/macros/enum.asm
@@ -22,7 +22,6 @@ enum_set: MACRO
__enum__ = \1
ENDM
-
; Enumerate constants
const_def: MACRO
@@ -43,7 +42,6 @@ shift_const: MACRO
const_value = const_value + 1
ENDM
-
; Enumerate strings
define: MACRO
diff --git a/macros/legacy.asm b/macros/legacy.asm
index 9e452da28..35e6e9ccb 100644
--- a/macros/legacy.asm
+++ b/macros/legacy.asm
@@ -8,7 +8,6 @@ callab EQUS "callfar"
; macros/scripts/audio.asm
unknownmusic0xde EQUS "sound_duty"
-
; macros/scripts/events.asm
checkmorn EQUS "checktime MORN"
@@ -54,7 +53,6 @@ displaylocation EQUS "landmarktotext"
givepokeitem EQUS "givepokemail"
checkpokeitem EQUS "checkpokemail"
-
; macros/scripts/maps.asm
mapconst: MACRO
@@ -94,7 +92,6 @@ PERSONTYPE_SCRIPT EQUS "OBJECTTYPE_SCRIPT"
PERSONTYPE_ITEMBALL EQUS "OBJECTTYPE_ITEMBALL"
PERSONTYPE_TRAINER EQUS "OBJECTTYPE_TRAINER"
-
; macros/scripts/movement.asm
show_person EQUS "show_object"
diff --git a/macros/scripts/maps.asm b/macros/scripts/maps.asm
index d5f5b00e1..7f5947a55 100644
--- a/macros/scripts/maps.asm
+++ b/macros/scripts/maps.asm
@@ -3,7 +3,6 @@ map_id: MACRO
db GROUP_\1, MAP_\1
ENDM
-
scene_script: MACRO
;\1: script pointer
dw \1
@@ -75,7 +74,6 @@ object_event: MACRO
dw \9
ENDM
-
trainer: MACRO
;\1: trainer group
;\2: trainer id
diff --git a/macros/scripts/trade_anims.asm b/macros/scripts/trade_anims.asm
index 633047b82..6227f2022 100644
--- a/macros/scripts/trade_anims.asm
+++ b/macros/scripts/trade_anims.asm
@@ -166,7 +166,6 @@ tradeanim_wait_180_if_ot_egg: MACRO
db tradeanim_wait_180_if_ot_egg_command
ENDM
-
; Mobile
enum_start $01
diff --git a/macros/wram.asm b/macros/wram.asm
index cbf13a1e5..eec839b7d 100644
--- a/macros/wram.asm
+++ b/macros/wram.asm
@@ -76,7 +76,6 @@ red_party_struct: MACRO
\1Special:: dw
ENDM
-
battle_struct: MACRO
\1Species:: db
\1Item:: db
@@ -114,7 +113,6 @@ box: MACRO
\1End:: ds 2 ; padding
ENDM
-
map_connection_struct: MACRO
\1ConnectedMapGroup:: db
\1ConnectedMapNumber:: db
diff --git a/main.asm b/main.asm
index fe0c76f99..5872ce6cb 100644
--- a/main.asm
+++ b/main.asm
@@ -117,10 +117,8 @@ INCLUDE "engine/events/prof_oaks_pc.asm"
INCLUDE "engine/overworld/decorations.asm"
INCLUDE "engine/pokemon/level_up_happiness.asm"
INCLUDE "engine/battle/read_trainer_dvs.asm"
-INCLUDE "data/trainers/dvs.asm"
INCLUDE "engine/battle/returntobattle_useball.asm"
INCLUDE "engine/battle/consume_held_item.asm"
-INCLUDE "data/moves/effects_pointers.asm"
INCLUDE "data/moves/effects.asm"
INCLUDE "engine/events/kurt_selectquantity_interpretjoypad.asm"
@@ -162,10 +160,7 @@ SECTION "Enemy Trainers", ROMX
INCLUDE "engine/battle/ai/items.asm"
INCLUDE "engine/battle/ai/scoring.asm"
INCLUDE "engine/battle/read_trainer_attributes.asm"
-INCLUDE "data/trainers/attributes.asm"
INCLUDE "engine/battle/read_trainer_party.asm"
-INCLUDE "data/trainers/party_pointers.asm"
-INCLUDE "data/trainers/parties.asm"
SECTION "Battle Core", ROMX
@@ -186,7 +181,6 @@ SECTION "bank11", ROMX
INCLUDE "engine/events/fruit_trees.asm"
INCLUDE "engine/battle/ai/move.asm"
INCLUDE "engine/pokedex/pokedex_2.asm"
-INCLUDE "data/pokemon/dex_entry_pointers.asm"
INCLUDE "engine/pokemon/mail.asm"
@@ -287,6 +281,7 @@ INCLUDE "engine/menus/debug.asm"
SECTION "bank21", ROMX
+INCLUDE "engine/printer/printer_serial.asm"
INCLUDE "engine/printer/printer.asm"
INCLUDE "gfx/battle_anims.asm"
INCLUDE "engine/events/halloffame.asm"
@@ -569,7 +564,6 @@ SECTION "Miscellaneous Text", ROMX
INCLUDE "data/items/names.asm"
INCLUDE "engine/items/print_item_description.asm"
-INCLUDE "data/items/descriptions.asm"
INCLUDE "data/moves/names.asm"
INCLUDE "engine/overworld/landmarks.asm"
diff --git a/mobile/mobile_12.asm b/mobile/mobile_12.asm
index 08466e0cb..d9528fbf6 100644
--- a/mobile/mobile_12.asm
+++ b/mobile/mobile_12.asm
@@ -1257,7 +1257,6 @@ String_48aa1:
db "Tell Now"
next "Tell Later@"
-
Function48ab5:
ld a, [hJoyPressed]
and A_BUTTON
diff --git a/mobile/mobile_22.asm b/mobile/mobile_22.asm
index 54d79efe0..da8fee07c 100644
--- a/mobile/mobile_22.asm
+++ b/mobile/mobile_22.asm
@@ -19,7 +19,6 @@ OpenSRAMBank4:
pop af
ret
-
Function89168:
ld hl, wGameTimerPause
set GAMETIMERPAUSE_MOBILE_7_F, [hl]
@@ -77,7 +76,6 @@ Function89193:
pop de
ret
-
Function8919e:
; Searches for the c'th string starting at de. Returns the pointer in de.
ld a, c
@@ -107,7 +105,6 @@ Function891b8:
call DelayFrame
ret
-
Function891ca:
push bc
call Function891b8
@@ -165,7 +162,6 @@ Function89215:
pop hl
ret
-
Function8921f:
push de
ld de, SCREEN_WIDTH
@@ -202,7 +198,6 @@ Mobile22_SetBGMapMode1:
ld [hBGMapMode], a
ret
-
Function89245:
farcall TryLoadSaveFile
ret c
@@ -324,7 +319,6 @@ Function892b7:
jr nz, .loop
ret
-
Function89305:
xor a
ld [wMenuSelection], a
@@ -382,7 +376,6 @@ Function89331:
pop bc
ret
-
Function89346:
ld h, b
ld l, c
@@ -478,7 +471,6 @@ Function8939a:
call Function89381
ret
-
Function893b3:
call DisableLCD
call ClearSprites
@@ -500,7 +492,6 @@ Function893cc:
call EnableLCD
ret
-
Function893e2:
call Function89b1e
call Function893b3
@@ -585,7 +576,6 @@ Function89481:
inc d
ret
-
Function89492:
ld d, 0
ld a, [wPlayerGender]
@@ -622,7 +612,6 @@ Function894bb:
pop bc
ret
-
Function894ca:
push bc
call Function894dc
@@ -784,7 +773,6 @@ Function8956f:
pop bc
ret
-
Function895c7:
ld a, [rSVBK]
push af
@@ -904,7 +892,6 @@ Function8966c:
pop bc
ret
-
Function8967a:
push bc
call Function89688
@@ -1205,7 +1192,6 @@ Function897d5:
pop bc
ret
-
Function89807:
ld hl, MobileAdapterGFX + $20 tiles
ld a, [wPlayerGender]
@@ -1273,7 +1259,6 @@ Function89856:
call Function897d5
ret
-
Function8987f:
call Function891b8
call Function895f2
@@ -1470,7 +1455,6 @@ Function8998b:
pop bc
ret
-
Function8999c:
ld de, wPlayerName
call PlaceString
@@ -1547,7 +1531,6 @@ Function89a0c:
call PlaceString
ret
-
Function89a23:
hlcoord 0, 11
ld b, $4
@@ -1702,7 +1685,6 @@ Function89a57:
ld [wd030], a
ret
-
Function89b00:
farcall MG_Mobile_Layout_LoadPals
ret
@@ -1787,7 +1769,6 @@ Function89b45:
pop hl
ret
-
Function89b78:
push bc
ld a, [wd010]
@@ -2204,7 +2185,6 @@ Jumptable_89e04:
dw Function8a999
dw Function8ab93
-
Function89e0a:
call OpenSRAMBank4
call Function8b3b0
@@ -2218,7 +2198,6 @@ Jumptable_89e18:
dw Function8a116
dw Function8a2aa
-
Function89e1e:
call OpenSRAMBank4
ld bc, $a037
@@ -2254,7 +2233,6 @@ Jumptable_89e3c:
dw Function89e58
dw Function89e68
-
Function89e58:
ld a, $1
call Function8a2fe
@@ -2781,7 +2759,6 @@ Strings_8a1cc:
db "まえ<NO>がめん<NI>もどります"
db "@"
-
Function8a20d:
ld hl, UnknownText_0x8a232
call PrintText
@@ -3369,7 +3346,6 @@ Jumptable_8a671:
dw Function8a8c3
dw Function8a930
-
Function8a679:
call Function891de
call ClearBGPalettes
@@ -3403,7 +3379,6 @@ Jumptable_8a6bc:
dw Function8a6c0
dw Function8a6c5
-
Function8a6c0:
call PlayClickSFX
and a
@@ -3477,7 +3452,6 @@ Jumptable_8a74f:
dw Function8a818
dw Function8a8a1
-
Function8a757:
call Function8939a
xor a
@@ -3863,7 +3837,6 @@ Jumptable_8aa6d:
dw Function8aab6
dw Function8ab11
-
Function8aa73:
ld a, [wMenuSelection]
ld e, a
diff --git a/mobile/mobile_22_2.asm b/mobile/mobile_22_2.asm
index 9aa3f2715..260e62073 100644
--- a/mobile/mobile_22_2.asm
+++ b/mobile/mobile_22_2.asm
@@ -280,7 +280,6 @@ Jumptable_8b4a0:
dw Function8b4a4
dw Function8b4b8
-
Function8b4a4:
push bc
push de
@@ -990,7 +989,6 @@ Function8b94a:
ld [wd030], a
ret
-
Function8b960:
ld hl, MenuHeader_0x8b9ac
call LoadMenuHeader
diff --git a/mobile/mobile_40.asm b/mobile/mobile_40.asm
index 1b7a15be2..dc3767bf4 100644
--- a/mobile/mobile_40.asm
+++ b/mobile/mobile_40.asm
@@ -435,7 +435,6 @@ Function100327:
farcall HDMATransferTileMapToWRAMBank3
ret
-
Function10032e:
call Function10034d
ld e, a
@@ -637,7 +636,6 @@ Function10043a:
pop hl
ret
-
Jumptable_10044e:
dw Function10046a
dw Function10047c
@@ -1189,7 +1187,6 @@ Function100772:
pop de
ret
-
Function10079c:
ld a, [wcd21]
cp $01
@@ -1374,7 +1371,6 @@ Function1008a6:
ld c, 0
ret
-
Function1008e0:
ld a, [hBGMapMode]
ld b, a
@@ -1437,7 +1433,6 @@ Function100902:
.string_100966
db "のこり   ふん!@"
-
Function100970:
hlcoord 0, 0
ld de, w3_dc00
@@ -2042,8 +2037,6 @@ Function100db0:
xor a
ret
-
-
Function100dc0:
ld a, [wLinkMode]
cp LINK_MOBILE
@@ -2168,7 +2161,6 @@ Function100e84:
rst JumpTable
ret
-
Jumptable_100e8c:
dw Function100ea2
dw Function100eae
@@ -2182,7 +2174,6 @@ Jumptable_100e8c:
dw Function100eae
dw Function100ec4
-
Function100ea2:
call Function100dc0
ret nc
@@ -2190,7 +2181,6 @@ Function100ea2:
set 0, [hl]
call Function100ec5
-
Function100eae:
scf
call Function100eca
@@ -6931,7 +6921,6 @@ Palettes_1032e2:
RGB 0, 0, 0
RGB 0, 0, 0
-
Function103302:
call Function103309
call Function103362
diff --git a/mobile/mobile_41.asm b/mobile/mobile_41.asm
index b96a145ad..087467710 100644
--- a/mobile/mobile_41.asm
+++ b/mobile/mobile_41.asm
@@ -513,7 +513,6 @@ CalculateTrainerRankingsChecksum:
pop bc
ret
-
BackupMobileEventIndex:
ld a, BANK(sMobileEventIndex)
call GetSRAMBank
@@ -526,7 +525,6 @@ BackupMobileEventIndex:
call CloseSRAM
ret
-
RestoreMobileEventIndex:
ld a, BANK(sMobileEventIndexBackup)
call GetSRAMBank
@@ -579,7 +577,6 @@ InitializeTrainerRankings:
call CopyBytes
ret
-
_MobilePrintNum::
; Supports signed 31-bit integers (up to 10 digits)
; b: Bits 0-4 = # bytes
diff --git a/mobile/mobile_45.asm b/mobile/mobile_45.asm
index a5d172415..e2168a737 100644
--- a/mobile/mobile_45.asm
+++ b/mobile/mobile_45.asm
@@ -143,7 +143,6 @@ Function114243::
pop de
jp hl
-
Function11425c:
ld [$dc02], a
pop af
@@ -152,11 +151,9 @@ Function11425c:
ld [MBC3SRamBank], a
ret
-
Stubbed_Function114268:
ret
-
Function114269:
ld h, d
ld l, e
@@ -296,7 +293,6 @@ Function114269:
ld [$dc02], a
jp .asm_11429b
-
Function114333:
push bc
ld bc, $dc00
@@ -304,7 +300,6 @@ Function114333:
pop bc
ret
-
Function11433c:
push de
ld h, d
@@ -397,7 +392,6 @@ Function11433c:
ld b, $1
jp Function11425c
-
Function1143b7:
ld a, [de]
ld b, a
@@ -448,7 +442,6 @@ Function1143b7:
pop hl
jp Function11425c
-
Function1143f3:
call Function114412
and a
@@ -476,7 +469,6 @@ Function1143f3:
ld b, $84
ret
-
Function114412:
ld a, c
ld [$dc00], a
@@ -606,7 +598,6 @@ Function114412:
ld a, $1
ret
-
Function1144c8:
push bc
ld bc, $dc00
@@ -614,7 +605,6 @@ Function1144c8:
pop bc
ret
-
Function1144d1:
call Function114561
dec de
@@ -712,7 +702,6 @@ Function1144d1:
ld a, $1
jp Function11425c
-
Function114561:
ld hl, $dc03
ld a, [de]
@@ -734,7 +723,6 @@ Function114561:
ld [hl], a
ret
-
Function114576:
xor a
ld [wDecoBed], a
@@ -789,7 +777,6 @@ Function114576:
ld [wDecoBed], a
ret
-
Function1145c5:
ld hl, $dc24
ld de, String_11421e
@@ -882,7 +869,6 @@ Function1145c5:
xor a
ret
-
Function11463c:
ld a, [$dc00]
push af
@@ -945,7 +931,6 @@ Function11463c:
ld a, $1
ret
-
Function11469b:
push bc
ld bc, $dc00
@@ -953,7 +938,6 @@ Function11469b:
pop bc
ret
-
Function1146a4:
call Function114867
and a
@@ -1011,7 +995,6 @@ Function1146a4:
ld a, $1
ret
-
Function1146fa:
call Function114867
and a
@@ -1137,7 +1120,6 @@ Function1146fa:
xor a
ret
-
Function1147cd:
ld bc, NULL
ld a, [wDecoRightOrnament]
@@ -1214,7 +1196,6 @@ Function1147cd:
ld a, $1
ret
-
Function11483a:
push bc
ld bc, $dc00
@@ -1222,7 +1203,6 @@ Function11483a:
pop bc
ret
-
Function114843:
ld a, [$dc00]
push af
@@ -1246,7 +1226,6 @@ Function114843:
ld a, $1
ret
-
Function114867:
ld hl, $dc06
ld a, [hli]
@@ -1305,7 +1284,6 @@ Function114867:
ld a, $1
ret
-
Function1148b9:
push bc
ld bc, wCurrMapBGEventCount
@@ -1313,7 +1291,6 @@ Function1148b9:
pop bc
ret
-
Function1148c2:
ld hl, $dc06
ld a, [hli]
@@ -1405,7 +1382,6 @@ Function1148c2:
ld a, $1
ret
-
Function114944:
push bc
ld bc, wCurrMapBGEventCount
@@ -1413,7 +1389,6 @@ Function114944:
pop bc
ret
-
Function11494d:
ld hl, $dc06
ld a, [hli]
@@ -1497,7 +1472,6 @@ Function11494d:
ld a, $1
ret
-
Function1149c3:
push bc
ld bc, wCurrMapBGEventCount
@@ -1505,7 +1479,6 @@ Function1149c3:
pop bc
ret
-
Function1149cc:
ld hl, $dc06
ld a, [hl]
@@ -1555,7 +1528,6 @@ Function1149cc:
ld a, $1
ret
-
Function114a0f:
push bc
ld bc, wCurrMapBGEventCount
@@ -1563,7 +1535,6 @@ Function114a0f:
pop bc
ret
-
Function114a18:
ld bc, NULL
ld h, b
@@ -1630,7 +1601,6 @@ Function114a18:
ld a, $1
ret
-
Function114a71:
push bc
ld bc, $dc00
@@ -1638,7 +1608,6 @@ Function114a71:
pop bc
ret
-
Function114a7a:
ld bc, NULL
.asm_114a7d
@@ -1690,7 +1659,6 @@ Function114a7a:
ld a, $1
ret
-
Function114ac6:
push bc
ld bc, $dc00
@@ -1698,7 +1666,6 @@ Function114ac6:
pop bc
ret
-
Function114acf:
.asm_114acf
push hl
@@ -1801,7 +1768,6 @@ Function114acf:
xor a
ret
-
Function114b4c:
push bc
ld bc, $dc00
@@ -1809,7 +1775,6 @@ Function114b4c:
pop bc
ret
-
Function114b55:
call Function114561
ld b, $0
@@ -1884,7 +1849,6 @@ endr
ld b, $82
jp Function11425c
-
Function114bbc:
ld h, d
ld l, e
@@ -1938,7 +1902,6 @@ Function114bbc:
pop hl
jp Function11425c
-
Function114c0b:
ld hl, $dc24
push bc
@@ -1997,7 +1960,6 @@ Function114c0b:
jr z, .asm_114c24
jr .asm_114c18
-
Function114c55:
push bc
ld bc, $dc00
@@ -2005,7 +1967,6 @@ Function114c55:
pop bc
ret
-
Function114c5e:
ld de, wPartyMon5Defense
push hl
@@ -2105,7 +2066,6 @@ Function114c5e:
dec bc
ret
-
Function114cd9:
ld h, d
ld l, e
@@ -2171,7 +2131,6 @@ endr
ld a, $1
jp Function11425c
-
Function114d39:
.asm_114d39
ld a, [$dc04]
@@ -2239,7 +2198,6 @@ Function114d39:
ld [hli], a
ret
-
Function114d99:
ld de, wPartyMon5Defense
xor a
@@ -2313,7 +2271,6 @@ Function114d99:
xor a
ret
-
Function114df1:
cp $1b
ret nz
@@ -2363,7 +2320,6 @@ Function114df1:
xor a
ret
-
Function114e2d:
cp $30
jr c, .asm_114e45
@@ -2399,7 +2355,6 @@ Function114e2d:
xor a
ret
-
Function114e62:
ld a, c
and a
@@ -2443,7 +2398,6 @@ Function114e62:
ld b, $83
jp Function11425c
-
Function114ea0:
ld hl, $dc06
ld a, [hli]
@@ -2490,7 +2444,6 @@ Function114ea0:
ld b, $83
ret
-
Function114ee0:
push bc
ld bc, wCurrMapBGEventCount
@@ -2498,7 +2451,6 @@ Function114ee0:
pop bc
ret
-
Function114ee9:
ld hl, $dc03
ld a, b
@@ -2532,7 +2484,6 @@ Function114ee9:
ld [hl], d
ret
-
Function114f0a:
call Function114f39
and a
@@ -2568,7 +2519,6 @@ Function114f0a:
ld a, $ff
ret
-
Function114f39:
ld hl, $dc0d
ld e, [hl]
@@ -2599,7 +2549,6 @@ Function114f39:
.asm_114f58
ret
-
Function114f59:
ld a, [wTimerEventStartDay]
and a
@@ -2726,7 +2675,6 @@ Function114f59:
xor a
ret
-
Function115020:
push hl
ld hl, $dc06
@@ -2774,7 +2722,6 @@ Function115020:
ld a, $1
ret
-
Function115059:
push bc
ld bc, wCurrMapBGEventCount
@@ -2782,7 +2729,6 @@ Function115059:
pop bc
ret
-
Function115062:
ld hl, wDecoBed
ld a, [hli]
@@ -2836,7 +2782,6 @@ Function115062:
.asm_1150b2
ret
-
Function1150b3:
ld hl, $dc24
ld de, wPartyMon5Defense
@@ -2939,7 +2884,6 @@ Function1150b3:
ld [de], a
ret
-
Function115136:
ld hl, $dc06
ld a, [hli]
@@ -2986,7 +2930,6 @@ Function115136:
ld a, $1
ret
-
Function115170:
push bc
ld bc, wCurrMapBGEventCount
@@ -2994,7 +2937,6 @@ Function115170:
pop bc
ret
-
Function115179:
ld hl, $dc06
ld a, [hli]
@@ -3105,7 +3047,6 @@ Function115179:
xor a
ret
-
Function11520e:
push bc
ld bc, wCurrMapBGEventCount
@@ -3113,7 +3054,6 @@ Function11520e:
pop bc
ret
-
Function115217:
push hl
ld hl, $dc06
@@ -3199,7 +3139,6 @@ Function115217:
call z, Function115286
jr .asm_115252
-
Function115286:
push bc
ld bc, wCurrMapBGEventCount
@@ -3207,7 +3146,6 @@ Function115286:
pop bc
ret
-
Function11528f:
ld hl, wDecoBed
ld c, [hl]
@@ -3231,7 +3169,6 @@ Function11528f:
ld [hl], c
ret
-
Function1152af:
push bc
ld bc, $dc00
@@ -3239,7 +3176,6 @@ Function1152af:
pop bc
ret
-
Function1152b8:
push bc
call Function11537d
@@ -3365,7 +3301,6 @@ Function1152b8:
xor a
jp Function11425c
-
Function11537d:
ld hl, $dc06
ld a, [de]
@@ -3414,7 +3349,6 @@ Function11537d:
ld [wTimerEventStartDay], a
ret
-
Function1153b5:
ld hl, $dc0d
ld e, [hl]
@@ -3440,7 +3374,6 @@ Function1153b5:
ld [hl], d
ret
-
Function1153d2:
ld a, [$dc03]
ld d, a
@@ -3627,7 +3560,6 @@ Function1153d2:
xor a
ret
-
Function1154d4:
xor a
ld [wTimerEventStartDay], a
@@ -3758,7 +3690,6 @@ Function1154d4:
call Function1155d1
jr .asm_115547
-
Function1155af:
ld hl, $dc06
ld a, [de]
@@ -3789,7 +3720,6 @@ Function1155af:
call Function1155d1
ret
-
Function1155d1:
ld a, [$dc0d]
ld l, a
@@ -3833,7 +3763,6 @@ Function1155d1:
ld [$dc0e], a
ret
-
Function11560a:
ld a, [$dc06]
ld [wCurrMapBGEventCount], a
@@ -3960,7 +3889,6 @@ Function11560a:
ld bc, $03db
jr .asm_115659
-
Function1156cc:
ld a, [wTimerEventStartDay]
and a
@@ -4023,7 +3951,6 @@ Function1156cc:
ld b, $83
jp Function11425c
-
Function115732:
ld hl, $dc02
ld a, [de]
@@ -4066,7 +3993,6 @@ Function115732:
ld [hl], b
ret
-
Function11575c:
ld hl, $dc05
ld a, [hli]
@@ -4153,7 +4079,6 @@ Function11575c:
ld [wTimerEventStartDay], a
ret
-
Function1157d0:
ld hl, $dc05
ld a, [hli]
@@ -4211,7 +4136,6 @@ Function1157d0:
ld [wTimerEventStartDay], a
ret
-
Function11581e:
ld a, [wTimerEventStartDay]
and a
@@ -4318,7 +4242,6 @@ Function11581e:
ld [wTimerEventStartDay], a
ret
-
Function1158c2:
ld a, e
ld [wSwarmFlags], a
@@ -4527,7 +4450,6 @@ endr
ld [hl], a
ret
-
Function1159dc:
cp $1a
jr c, .asm_1159ef
@@ -4556,7 +4478,6 @@ Function1159dc:
ld a, $2b
ret
-
Function1159fb:
ld a, [wTimerEventStartDay]
and a
@@ -4618,7 +4539,6 @@ Function1159fb:
ld a, $1
jp Function11425c
-
Function115a5f:
ld hl, $dc05
ld a, [hli]
@@ -4678,7 +4598,6 @@ Function115a5f:
ld [wTimerEventStartDay], a
ret
-
Function115ab0:
ld hl, $dc05
ld a, [hli]
@@ -4738,7 +4657,6 @@ Function115ab0:
xor a
ret
-
Function115b00:
ld a, [wTimerEventStartDay]
and a
@@ -4871,7 +4789,6 @@ Function115b00:
xor a
ret
-
Function115bc8:
xor a
ld [wDecoCarpet], a
@@ -4971,7 +4888,6 @@ Function115bc8:
ld a, $2
ret
-
Function115c49:
ld a, e
ld [wWeeklyFlags], a
@@ -5109,7 +5025,6 @@ endr
jp nz, .asm_115c64
ret
-
Function115cfd:
cp $2b
jr c, .asm_115d27
@@ -5179,7 +5094,6 @@ Function115cfd:
sub $47
ret
-
Function115d53:
.asm_115d53
ld a, [de]
@@ -5194,7 +5108,6 @@ Function115d53:
ld [hl], a
ret
-
Function115d61:
push bc
ld bc, $dc00
@@ -5202,7 +5115,6 @@ Function115d61:
pop bc
ret
-
Function115d6a:
.asm_115d6a
ld a, [hli]
@@ -5216,7 +5128,6 @@ Function115d6a:
xor a
ret
-
Function115d77:
push bc
ld bc, wCurrMapBGEventCount
@@ -5224,7 +5135,6 @@ Function115d77:
pop bc
ret
-
Function115d80:
ld e, a
ld a, d
@@ -5246,10 +5156,8 @@ Function115d80:
ld e, $0
ret
-
INCLUDE "mobile/mobile_45_sprite_engine.asm"
-
Function116567:
ld hl, wc3f7
dec [hl]
@@ -5287,7 +5195,6 @@ Function116567:
ld [wc3f7], a
ret
-
Function11659d:
ld a, [wc314]
cp $12
@@ -5302,7 +5209,6 @@ Function11659d:
ld l, a
jp hl
-
Jumptable_1165af:
dw Function11677e
dw Function1165d5
@@ -5345,7 +5251,6 @@ Function1165e3:
ret c
jp Function116797
-
Function1165f5:
ld a, $1
ld c, a
@@ -5366,7 +5271,6 @@ Function116600:
ld [wc314], a
ret
-
Function116615:
call Function11678e
@@ -5388,7 +5292,6 @@ Function116623:
ret c
jp Function116797
-
Function116635:
ld a, $2
ld c, a
@@ -5409,7 +5312,6 @@ Function116640:
ld [wc314], a
ret
-
Function116655:
xor a
ld [wc314 + 3], a
@@ -5455,7 +5357,6 @@ Function11668d:
ld [wc314], a
ret
-
Function11669f:
call Function11678e
@@ -5503,7 +5404,6 @@ Function1166d6:
ld [wc314], a
ret
-
Function1166f4:
ld [wc30e], a
ld a, b
@@ -5530,7 +5430,6 @@ Function1166f4:
call Function116797
ret
-
Function11671f:
ld [wc30f], a
ld a, b
@@ -5553,7 +5452,6 @@ Function11671f:
call Function116797
ret
-
Function116747:
ld hl, wc30e
ld a, [wc314 + 2]
@@ -5565,7 +5463,6 @@ Function116747:
ld [hl], a
ret
-
Function116758:
ld a, [wc30f]
cp $30
@@ -5595,7 +5492,6 @@ Function116758:
ld [wc314 + 4], a
ret
-
Function11677e:
ld a, $0
@@ -5612,7 +5508,6 @@ Function116780:
and a
ret
-
Function11678e:
ld hl, wc314
ld a, [hl]
@@ -5620,13 +5515,11 @@ Function11678e:
inc [hl]
ret
-
Function116797:
ld hl, wc314
inc [hl]
ret
-
Function11679c:
ld a, c
ld [wc311], a
@@ -5682,7 +5575,6 @@ asm_1167af
ld [wc313], a
ret
-
Unknown_1167eb:
dw Unknown_1167fb
dw Unknown_116808
@@ -6725,7 +6617,6 @@ GiveOddEgg:
farcall _GiveOddEgg
ret
-
Function11765d:
ld a, [hInMenu]
push af
@@ -6826,7 +6717,6 @@ Jumptable_117728:
dw Function117984
dw Function1179a7
-
Function117738:
farcall Function171ccd
depixel 6, 3
@@ -7178,7 +7068,6 @@ Function1179a7:
ld [wcd49], a
ret
-
MenuHeader_1179b5:
db MENU_BACKUP_TILES ; flags
menu_coords 0, 12, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1
@@ -7191,7 +7080,6 @@ MenuHeader_1179bd:
dw NULL
db 0 ; default option
-
YessNoString_1179c5:
db "はい"
next "いいえ@"
@@ -7213,14 +7101,12 @@ MobilePassword_IncrementJumptable:
inc [hl]
ret
-
Unknown_117a0f:
INCBIN "data/mobile/ascii-alpha.txt"
Unknown_117a47:
INCBIN "data/mobile/ascii-sym.txt"
-
; everything from here to the end of the bank is related to the
; Mobile Stadium option from the continue/newgame menu.
; Needs better function names
@@ -7234,13 +7120,11 @@ MobileStudium:
ld [hInMenu], a
ret
-
Function117a8d:
call Function117a94
call Function117acd
ret
-
Function117a94:
xor a
ld [wJumptableIndex], a
@@ -7253,7 +7137,6 @@ Function117a94:
farcall HDMATransferAttrMapAndTileMapToWRAMBank3
ret
-
Function117ab4:
call ClearBGPalettes
call ClearSprites
@@ -7262,7 +7145,6 @@ Function117ab4:
farcall ReloadMapPart
ret
-
Function117acd:
call JoyTextDelay
ld a, [wJumptableIndex]
diff --git a/mobile/mobile_45_sprite_engine.asm b/mobile/mobile_45_sprite_engine.asm
index 70e8ef9f8..eb1b74ab2 100644
--- a/mobile/mobile_45_sprite_engine.asm
+++ b/mobile/mobile_45_sprite_engine.asm
@@ -16,7 +16,6 @@ Function115d99:
ld [wc308], a
ret
-
Function115dc3:
xor a
ld [wc305], a
@@ -26,7 +25,6 @@ Function115dc3:
call ByteFill
ret
-
Function115dd3:
ld a, [wc305]
and a
@@ -75,7 +73,6 @@ Function115dd3:
jr nz, .asm_115e04
ret
-
Function115e18:
ld a, c
ld [wc30a], a
@@ -83,7 +80,6 @@ Function115e18:
ld [wc30b], a
jr Function115e2b
-
Function115e22:
ld hl, wc30c
dec [hl]
@@ -122,7 +118,6 @@ Function115e2b:
ld [wc30c], a
ret
-
Unknown_115e59:
dw Unknown_115e61
dw Unknown_115e6c
@@ -315,7 +310,6 @@ Unknown_116005:
GFX_11601a::
INCBIN "gfx/unknown/11601a.2bpp"
-
Function11615a:
xor a
ld [wc30d], a
@@ -343,7 +337,6 @@ Function11615a:
ld [wc3f3], a
ret
-
Function11619d:
ld a, [wc30d]
and a
@@ -360,7 +353,6 @@ Function11619d:
call Function1161b8
ret
-
Function1161b8:
ld a, [$c319]
ld e, a
@@ -373,7 +365,6 @@ Function1161b8:
ld l, a
jp hl
-
.Jumptable:
dw Function1161d5
dw Function116294
@@ -493,7 +484,6 @@ Function1161d5:
ld [$c319], a
ret
-
MenuHeader_11628c:
db MENU_BACKUP_TILES ; flags
menu_coords 0, 6, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1
@@ -524,7 +514,6 @@ Function116294:
ld [hWY], a
ret
-
Function1162cb:
farcall Function170cc6
ld a, [$c319]
@@ -543,7 +532,6 @@ Function1162cb:
ld [rSVBK], a
ret
-
Function1162f2:
call Function11659d
call Function116758
@@ -633,7 +621,6 @@ Function1162f2:
jr nz, .asm_11635a
ret
-
Function11636e:
ld a, [rSVBK]
push af
@@ -671,7 +658,6 @@ Function11636e:
ld [wc30d], a
ret
-
Function1163c0:
ld a, [rSVBK]
push af
@@ -729,7 +715,6 @@ Function1163c0:
ld [wc30d], a
ret
-
Function116441:
farcall Function17d405
ld a, $90
@@ -746,7 +731,6 @@ Function116441:
ld [wc30d], a
ret
-
Function116468:
call Function116567
ld a, [wc314]
diff --git a/mobile/mobile_46.asm b/mobile/mobile_46.asm
index 1f7ab27d0..43ddf5201 100644
--- a/mobile/mobile_46.asm
+++ b/mobile/mobile_46.asm
@@ -333,7 +333,6 @@ Function118284:
call BattleTowerRoomMenu_Cleanup
ret
-
Function1182d5:
call BattleTowerRoomMenu_InitRAM
ld a, $18
@@ -1120,12 +1119,10 @@ Function118903:
call BattleTowerRoomMenu2
jp BattleTowerRoomMenu_IncrementJumptable
-
Function11891c:
call Function118b42
jp BattleTowerRoomMenu_IncrementJumptable
-
BattleTowerRoomMenu_PickLevelMessage:
ld a, [wcd38]
and a
@@ -1307,8 +1304,6 @@ BattleTowerRoomMenu_UpdatePickLevelMenu:
ld [wMobileInactivityTimerFrames], a
ret
-
-
Function118a54:
ld a, [wcd55]
ld l, a
@@ -1489,7 +1484,6 @@ Function118b9a:
and a
ret
-
charmap " ", $20 ; revert to ascii
ExchangeDownloadURL:
@@ -1507,7 +1501,6 @@ MenuDownloadURL:
IndexDownloadURL:
db "http://gameboy.datacenter.ne.jp/cgb/download?name=/01/CGB-BXTJ/tamago/index.txt", 0
-
Unreferenced_Function118d35:
ld hl, $d200
ld a, [wcd38]
@@ -7690,5 +7683,3 @@ TilemapPack_11bb7d:
db $2e, $0a, $85, $0a, $0a, $0a, $8d, $00 ; 22
db $2e, $0a, $0a, $84, $0a, $0a, $8e, $00 ; 23
db -1
-
-
diff --git a/mobile/mobile_5b.asm b/mobile/mobile_5b.asm
index fe0869067..9388e8d04 100644
--- a/mobile/mobile_5b.asm
+++ b/mobile/mobile_5b.asm
@@ -214,7 +214,6 @@ INCBIN "gfx/mobile/mobile_splash.attrmap"
UnknownMobilePalettes_16c903:
INCLUDE "gfx/unknown/16c903.pal"
-
Function16c943:
ld a, [wd003]
and a
@@ -769,17 +768,14 @@ Unknown_16cfa9:
RGB 31, 31, 31
RGB 07, 07, 07
-
Unknown_16cfb1:
RGB 31, 31, 31
RGB 13, 09, 18
RGB 26, 21, 16
RGB 07, 07, 07
-
Unknown_16cfb9:
RGB 31, 31, 31
RGB 18, 05, 02
RGB 27, 11, 12
RGB 07, 07, 07
-
diff --git a/mobile/mobile_5c.asm b/mobile/mobile_5c.asm
index cbe858f6d..2874ce65a 100644
--- a/mobile/mobile_5c.asm
+++ b/mobile/mobile_5c.asm
@@ -35,7 +35,6 @@ Function170000:
call CopyBytes
ret
-
Function17005a:
ld a, $5
call GetSRAMBank
@@ -72,7 +71,6 @@ Function17005a:
call CloseSRAM
ret
-
INCLUDE "engine/events/battle_tower/battle_tower.asm"
Function170be4:
@@ -85,7 +83,6 @@ Function170be4:
call CloseSRAM
ret
-
Clears5_a89a:
ld a, $5
call GetSRAMBank
@@ -96,7 +93,6 @@ Clears5_a89a:
call CloseSRAM
ret
-
Function170c06:
ld a, $5
call GetSRAMBank
@@ -199,7 +195,6 @@ Function170c06:
call CloseSRAM
ret
-
Function170c8b:
ld hl, wLastEnemyCounterMove
ld b, $5
@@ -211,7 +206,6 @@ Function170c8b:
jr nz, .asm_170c90
ret
-
CheckBTMonMovesForErrors:
ld c, BATTLETOWER_PARTY_LENGTH
ld hl, wBT_OTTempMon1Moves
@@ -254,7 +248,6 @@ CheckBTMonMovesForErrors:
jr nz, .loop
ret
-
Function170cc6:
ld a, [rSVBK]
push af
@@ -282,7 +275,6 @@ Function170cc6:
ld [rSVBK], a
ret
-
Function170d02:
ld a, $1
ld [rVBK], a
@@ -294,7 +286,6 @@ Function170d02:
ld [rVBK], a
ret
-
PichuAnimatedMobileGFX:
INCBIN "gfx/mobile/pichu_animated.2bpp.lz"
@@ -380,7 +371,6 @@ Jumptable_171a45:
dw Function171c39
dw Function171c41
-
Function171a5d:
ld a, [wc821]
bit 1, a
@@ -417,7 +407,6 @@ Function171a95:
call PlaceString
jp Function171c66
-
String_171aa7:
db "モバイルアダプタに"
next "せつぞく しています"
@@ -658,7 +647,6 @@ Function171c66:
inc [hl]
ret
-
MenuHeader_171c6b:
db MENU_BACKUP_TILES ; flags
menu_coords 0, 12, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1
@@ -767,7 +755,6 @@ Function171d2b:
call PlaceString
ret
-
Palette_171d71:
RGB 0, 0, 0
RGB 3, 0, 0
@@ -833,7 +820,6 @@ String_172e5d:
db "せつぞくする モバイルセンターを"
next "えらんで ください@"
-
Function172e78:
ld a, $7f
hlcoord 0, 0
@@ -859,7 +845,6 @@ Function172e78:
call CopyBytes
ret
-
Function172eb9:
ld a, [rSVBK]
push af
@@ -878,7 +863,6 @@ Function172eb9:
ld [rSVBK], a
ret
-
Palette_172edf:
RGB 5, 12, 17
RGB 31, 31, 31
diff --git a/mobile/mobile_5e.asm b/mobile/mobile_5e.asm
index 969baf34b..1035bb026 100644
--- a/mobile/mobile_5e.asm
+++ b/mobile/mobile_5e.asm
@@ -190,7 +190,6 @@ Jumptable_17a7b6:
dw Function17a81a
dw Function17a7f4
-
Function17a7c2:
ld a, $4
call Function17aad3
diff --git a/mobile/mobile_5f.asm b/mobile/mobile_5f.asm
index 675dfebc4..ed2b5188c 100644
--- a/mobile/mobile_5f.asm
+++ b/mobile/mobile_5f.asm
@@ -172,7 +172,6 @@ HaveWantPals:
RGB 0, 0, 0
RGB 0, 0, 0
-
CheckStringForErrors:
; Valid character ranges:
; $0, $5 - $13, $19 - $1c, $26 - $34, $3a - $3e, $40 - $48, $60 - $ff
@@ -413,7 +412,6 @@ Function17d1f1:
.asm_17d223
ret
-
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Parameter: [wScriptVar] = 0..1
;
@@ -1036,7 +1034,6 @@ Function17d60b:
call CloseSRAM
ret
-
Function17d6a1:
push hl
ld a, [wcd6e]
@@ -3530,7 +3527,6 @@ Function17e6de:
jr nz, .asm_17e6ee
ret
-
PokemonNewsGFX:
INCBIN "gfx/mobile/pokemon_news.2bpp"
@@ -3574,7 +3570,6 @@ Palette_17eff6:
RGB 24, 16, 3
RGB 0, 0, 0
-
Function17f036::
ld a, $6
call GetSRAMBank
@@ -5041,7 +5036,6 @@ String_17fd84:
next "せつめいしょを ごらんください"
db "@"
-
String_17fdb2:
db "3ぷん いじょう なにも"
next "にゅうりょく しなかったので"
diff --git a/mobile/mobile_menu.asm b/mobile/mobile_menu.asm
index a8bae8f1c..ba8ae5784 100644
--- a/mobile/mobile_menu.asm
+++ b/mobile/mobile_menu.asm
@@ -99,7 +99,6 @@ Function49f16:
call ClearBox
jp .joy_loop
-
MobileString1:
db "めいしフォルダー"
next "あいさつ"
@@ -108,7 +107,6 @@ MobileString1:
next "もどる"
db "@"
-
MobileStrings2:
String_0x49fe9:
@@ -614,7 +612,6 @@ Function4a492:
call MG_Mobile_Layout00
ret
-
MainMenu_MobileStudium:
ld a, [wStartDay]
ld b, a
@@ -640,7 +637,6 @@ MainMenu_MobileStudium:
ld [wStartSecond], a
ret
-
Function4a4c4:
call ClearBGPalettes
call Function4a3a7
diff --git a/wram.asm b/wram.asm
index 723a293ff..186c528a0 100644
--- a/wram.asm
+++ b/wram.asm
@@ -1,4 +1,5 @@
INCLUDE "constants.asm"
+
INCLUDE "macros/wram.asm"
@@ -2111,7 +2112,6 @@ wEnemyMonCatchRate:: db ; d22b
wEnemyMonBaseExp:: db ; d22c
wEnemyMonEnd::
-
wBattleMode:: ; d22d
; 0: overworld
; 1: wild battle
@@ -2471,7 +2471,6 @@ wBadges::
wJohtoBadges:: flag_array NUM_JOHTO_BADGES ; d857
wKantoBadges:: flag_array NUM_KANTO_BADGES ; d858
-
wTMsHMs:: ds NUM_TMS + NUM_HMS ; d859
wTMsHMsEnd::
@@ -2750,7 +2749,6 @@ wKurtApricornQuantity:: db
wPlayerDataEnd::
-
wCurrMapData::
wVisitedSpawns:: flag_array NUM_SPAWNS ; dca5