summaryrefslogtreecommitdiff
path: root/engine
diff options
context:
space:
mode:
authorYamaArashi <shadow962@live.com>2016-06-11 17:30:20 -0700
committerGitHub <noreply@github.com>2016-06-11 17:30:20 -0700
commit7e12ca56a8d04d33f3945bb5b981c311fcdd44ef (patch)
tree8a61aee33d6b47e960dc71dbb89c096622bbdc95 /engine
parentd8dae96f35222ababb9688ce2aed3292515f8ca2 (diff)
parent7f34e28f242ee4d0caba0bd96b040811dcb86c50 (diff)
Merge pull request #133 from YamaArashi/master
Remove address comments
Diffstat (limited to 'engine')
-rwxr-xr-xengine/HoF_room_pc.asm24
-rwxr-xr-xengine/battle/animations.asm304
-rwxr-xr-xengine/battle/bank_e_misc.asm6
-rw-r--r--engine/battle/battle_transitions.asm76
-rw-r--r--engine/battle/common_text.asm40
-rwxr-xr-xengine/battle/core.asm636
-rw-r--r--engine/battle/decrement_pp.asm2
-rw-r--r--engine/battle/display_effectiveness.asm6
-rw-r--r--engine/battle/draw_hud_pokeball_gfx.asm28
-rwxr-xr-xengine/battle/end_of_battle.asm10
-rw-r--r--engine/battle/experience.asm16
-rw-r--r--engine/battle/get_trainer_name.asm2
-rw-r--r--engine/battle/ghost_marowak_anim.asm4
-rw-r--r--engine/battle/init_battle_variables.asm2
-rw-r--r--engine/battle/link_battle_versus_text.asm2
-rw-r--r--engine/battle/moveEffects/conversion_effect.asm8
-rw-r--r--engine/battle/moveEffects/drain_hp_effect.asm6
-rw-r--r--engine/battle/moveEffects/focus_energy_effect.asm4
-rw-r--r--engine/battle/moveEffects/haze_effect.asm10
-rw-r--r--engine/battle/moveEffects/heal_effect.asm8
-rw-r--r--engine/battle/moveEffects/leech_seed_effect.asm6
-rw-r--r--engine/battle/moveEffects/mist_effect.asm4
-rw-r--r--engine/battle/moveEffects/one_hit_ko_effect.asm2
-rw-r--r--engine/battle/moveEffects/paralyze_effect.asm2
-rw-r--r--engine/battle/moveEffects/pay_day_effect.asm4
-rw-r--r--engine/battle/moveEffects/recoil_effect.asm4
-rw-r--r--engine/battle/moveEffects/reflect_light_screen_effect.asm8
-rw-r--r--engine/battle/moveEffects/substitute_effect.asm8
-rw-r--r--engine/battle/moveEffects/transform_effect.asm4
-rw-r--r--engine/battle/print_type.asm10
-rwxr-xr-xengine/battle/read_trainer_party.asm2
-rwxr-xr-xengine/battle/safari_zone.asm6
-rw-r--r--engine/battle/save_trainer_name.asm46
-rw-r--r--engine/battle/scale_sprites.asm10
-rw-r--r--engine/battle/scroll_draw_trainer_pic.asm4
-rw-r--r--engine/battle/trainer_ai.asm104
-rwxr-xr-xengine/battle/trainer_pic_money_pointers.asm2
-rw-r--r--engine/battle/unused_stats_functions.asm4
-rw-r--r--engine/battle/wild_encounters.asm4
-rwxr-xr-xengine/cable_club.asm20
-rwxr-xr-xengine/clear_save.asm4
-rwxr-xr-xengine/evolution.asm12
-rwxr-xr-xengine/evolve_trade.asm2
-rwxr-xr-xengine/evos_moves.asm26
-rwxr-xr-xengine/experience.asm8
-rwxr-xr-xengine/game_corner_slots.asm8
-rwxr-xr-xengine/game_corner_slots2.asm6
-rwxr-xr-xengine/gamefreak.asm26
-rwxr-xr-xengine/give_pokemon.asm10
-rwxr-xr-xengine/hall_of_fame.asm32
-rwxr-xr-xengine/hidden_object_functions14.asm36
-rwxr-xr-xengine/hidden_object_functions17.asm80
-rwxr-xr-xengine/hidden_object_functions18.asm56
-rwxr-xr-xengine/hidden_object_functions3.asm24
-rwxr-xr-xengine/hidden_object_functions7.asm84
-rwxr-xr-xengine/hp_bar.asm16
-rwxr-xr-xengine/in_game_trades.asm60
-rwxr-xr-xengine/intro.asm56
-rwxr-xr-xengine/items/itemfinder.asm4
-rwxr-xr-xengine/items/items.asm226
-rwxr-xr-xengine/items/tm_prices.asm2
-rwxr-xr-xengine/items/tmhm.asm4
-rwxr-xr-xengine/items/tms.asm4
-rwxr-xr-xengine/learn_move.asm28
-rwxr-xr-xengine/load_pokedex_tiles.asm2
-rw-r--r--engine/menu/bills_pc.asm34
-rwxr-xr-xengine/menu/diploma.asm6
-rwxr-xr-xengine/menu/league_pc.asm8
-rwxr-xr-xengine/menu/main_menu.asm52
-rwxr-xr-xengine/menu/naming_screen.asm36
-rwxr-xr-xengine/menu/oaks_pc.asm8
-rwxr-xr-xengine/menu/party_menu.asm38
-rwxr-xr-xengine/menu/pc.asm24
-rwxr-xr-xengine/menu/players_pc.asm42
-rwxr-xr-xengine/menu/pokedex.asm34
-rwxr-xr-xengine/menu/prize_menu.asm30
-rwxr-xr-xengine/menu/start_menu.asm6
-rwxr-xr-xengine/menu/start_sub_menus.asm46
-rwxr-xr-xengine/menu/status_screen.asm38
-rwxr-xr-xengine/menu/vending_machine.asm20
-rwxr-xr-xengine/mon_party_sprites.asm28
-rwxr-xr-xengine/multiply_divide.asm4
-rwxr-xr-xengine/oak_speech.asm24
-rwxr-xr-xengine/oak_speech2.asm36
-rwxr-xr-xengine/overworld/cable_club_npc.asm18
-rwxr-xr-xengine/overworld/card_key.asm10
-rwxr-xr-xengine/overworld/cinnabar_lab.asm14
-rwxr-xr-xengine/overworld/cut.asm22
-rwxr-xr-xengine/overworld/cut2.asm6
-rwxr-xr-xengine/overworld/doors.asm26
-rwxr-xr-xengine/overworld/elevator.asm4
-rwxr-xr-xengine/overworld/emotion_bubbles.asm8
-rwxr-xr-xengine/overworld/healing_machine.asm10
-rwxr-xr-xengine/overworld/hidden_items.asm14
-rwxr-xr-xengine/overworld/hidden_objects.asm6
-rw-r--r--engine/overworld/is_player_just_outside_map.asm2
-rwxr-xr-xengine/overworld/ledges.asm10
-rwxr-xr-xengine/overworld/map_sprites.asm10
-rw-r--r--engine/overworld/movement.asm46
-rwxr-xr-xengine/overworld/npc_movement.asm42
-rwxr-xr-xengine/overworld/oaks_aide.asm12
-rw-r--r--engine/overworld/oam.asm2
-rwxr-xr-xengine/overworld/pewter_guys.asm8
-rwxr-xr-xengine/overworld/player_animations.asm52
-rwxr-xr-xengine/overworld/pokecenter.asm12
-rwxr-xr-xengine/overworld/pokemart.asm24
-rwxr-xr-xengine/overworld/saffron_guards.asm4
-rwxr-xr-xengine/overworld/ssanne.asm12
-rwxr-xr-xengine/overworld/trainers.asm22
-rwxr-xr-xengine/palettes.asm64
-rwxr-xr-xengine/play_time.asm4
-rwxr-xr-xengine/pokedex_rating.asm38
-rwxr-xr-xengine/predefs.asm2
-rwxr-xr-xengine/predefs12.asm6
-rwxr-xr-xengine/predefs17.asm2
-rwxr-xr-xengine/predefs17_2.asm2
-rwxr-xr-xengine/predefs7.asm4
-rwxr-xr-xengine/save.asm76
-rwxr-xr-xengine/slot_machine.asm110
-rwxr-xr-xengine/status_ailments.asm2
-rwxr-xr-xengine/titlescreen.asm32
-rwxr-xr-xengine/titlescreen2.asm16
-rwxr-xr-xengine/town_map.asm46
-rwxr-xr-xengine/trade.asm108
-rwxr-xr-xengine/trade2.asm6
-rwxr-xr-xengine/turn_sprite.asm2
126 files changed, 1847 insertions, 1847 deletions
diff --git a/engine/HoF_room_pc.asm b/engine/HoF_room_pc.asm
index e00fc57d..a17d2e51 100755
--- a/engine/HoF_room_pc.asm
+++ b/engine/HoF_room_pc.asm
@@ -1,4 +1,4 @@
-HallOfFamePC: ; 7405c (1d:405c)
+HallOfFamePC:
callba AnimateHallOfFame
call ClearScreen
ld c, 100
@@ -33,7 +33,7 @@ HallOfFamePC: ; 7405c (1d:405c)
ld [wNumCreditsMonsDisplayed], a
jp Credits
-FadeInCreditsText: ; 740ba (1d:40ba)
+FadeInCreditsText:
ld hl, HoFGBPalettes
ld b, 4
.asm_740bf
@@ -45,7 +45,7 @@ FadeInCreditsText: ; 740ba (1d:40ba)
jr nz, .asm_740bf
ret
-DisplayCreditsMon: ; 740cb (1d:40cb)
+DisplayCreditsMon:
xor a
ld [H_AUTOBGTRANSFERENABLED],a
call SaveScreenTilesToBuffer1
@@ -106,7 +106,7 @@ DisplayCreditsMon: ; 740cb (1d:40cb)
INCLUDE "data/credit_mons.asm"
-ScrollCreditsMonLeft: ; 74140 (1d:4140)
+ScrollCreditsMonLeft:
ld h, b
ld l, $20
call ScrollCreditsMonLeft_SetSCX
@@ -118,7 +118,7 @@ ScrollCreditsMonLeft: ; 74140 (1d:4140)
ld b, a
ret
-ScrollCreditsMonLeft_SetSCX: ; 74152 (1d:4152)
+ScrollCreditsMonLeft_SetSCX:
ld a, [rLY]
cp l
jr nz, ScrollCreditsMonLeft_SetSCX
@@ -130,13 +130,13 @@ ScrollCreditsMonLeft_SetSCX: ; 74152 (1d:4152)
jr z, .loop
ret
-HoFGBPalettes: ; 74160 (1d:4160)
+HoFGBPalettes:
db %11000000
db %11010000
db %11100000
db %11110000
-CreditsCopyTileMapToVRAM: ; 74164 (1d:4164)
+CreditsCopyTileMapToVRAM:
ld a, l
ld [H_AUTOBGTRANSFERDEST], a
ld a, h
@@ -145,7 +145,7 @@ CreditsCopyTileMapToVRAM: ; 74164 (1d:4164)
ld [H_AUTOBGTRANSFERENABLED], a
jp Delay3
-ZeroMemory: ; 74171 (1d:4171)
+ZeroMemory:
; zero bc bytes at hl
ld [hl], 0
inc hl
@@ -156,18 +156,18 @@ ZeroMemory: ; 74171 (1d:4171)
jr nz, ZeroMemory
ret
-FillFourRowsWithBlack: ; 7417b (1d:417b)
+FillFourRowsWithBlack:
ld bc, SCREEN_WIDTH * 4
ld a, $7e
jp FillMemory
-FillMiddleOfScreenWithWhite: ; 74183 (1d:4183)
+FillMiddleOfScreenWithWhite:
coord hl, 0, 4
ld bc, SCREEN_WIDTH * 10
ld a, " "
jp FillMemory
-Credits: ; 7418e (1d:418e)
+Credits:
ld de, CreditsOrder
push de
.nextCreditsScreen
@@ -256,7 +256,7 @@ Credits: ; 7418e (1d:418e)
call PlaceString
jp FadeInCreditsText
-TheEndTextString: ; 74229 (1d:4229)
+TheEndTextString:
; "T H E E N D"
db $60," ",$62," ",$64," ",$64," ",$66," ",$68,"@"
db $61," ",$63," ",$65," ",$65," ",$67," ",$69,"@"
diff --git a/engine/battle/animations.asm b/engine/battle/animations.asm
index be8d2b18..ea5738bc 100755
--- a/engine/battle/animations.asm
+++ b/engine/battle/animations.asm
@@ -1,6 +1,6 @@
; Draws a "frame block". Frame blocks are blocks of tiles that are put
; together to form frames in battle animations.
-DrawFrameBlock: ; 78000 (1e:4000)
+DrawFrameBlock:
ld l,c
ld h,b
ld a,[hli]
@@ -161,7 +161,7 @@ DrawFrameBlock: ; 78000 (1e:4000)
.done
ret
-PlayAnimation: ; 780f1 (1e:40f1)
+PlayAnimation:
xor a
ld [$FF8B],a ; it looks like nothing reads this
ld [wSubAnimTransform],a
@@ -256,7 +256,7 @@ PlayAnimation: ; 780f1 (1e:40f1)
.AnimationOver ; 417B
ret
-LoadSubanimation: ; 7817c (1e:417c)
+LoadSubanimation:
ld a,[wSubAnimAddrPtr + 1]
ld h,a
ld a,[wSubAnimAddrPtr]
@@ -306,7 +306,7 @@ LoadSubanimation: ; 7817c (1e:417c)
; called if the subanimation type is not 5
; sets the transform to 0 (i.e. no transform) if it's the player's turn
; sets the transform to the subanimation type if it's the enemy's turn
-GetSubanimationTransform1: ; 781c2 (1e:41c2)
+GetSubanimationTransform1:
ld b,a
ld a,[H_WHOSETURN]
and a
@@ -318,7 +318,7 @@ GetSubanimationTransform1: ; 781c2 (1e:41c2)
; called if the subanimation type is 5
; sets the transform to 2 (i.e. horizontal and vertical flip) if it's the player's turn
; sets the transform to 0 (i.e. no transform) if it's the enemy's turn
-GetSubanimationTransform2: ; 781ca (1e:41ca)
+GetSubanimationTransform2:
ld a,[H_WHOSETURN]
and a
ld a,2 << 5
@@ -327,7 +327,7 @@ GetSubanimationTransform2: ; 781ca (1e:41ca)
ret
; loads tile patterns for battle animations
-LoadAnimationTileset: ; 781d2 (1e:41d2)
+LoadAnimationTileset:
ld a,[wWhichBattleAnimTileset]
add a
add a
@@ -347,7 +347,7 @@ LoadAnimationTileset: ; 781d2 (1e:41d2)
ld c,a ; number of tiles
jp CopyVideoData ; load tileset
-AnimationTilesetPointers: ; 781f2 (1e:41f2)
+AnimationTilesetPointers:
db 79 ; number of tiles
dw AnimationTileset1
db $FF
@@ -360,13 +360,13 @@ AnimationTilesetPointers: ; 781f2 (1e:41f2)
dw AnimationTileset1
db $FF
-AnimationTileset1: ; 781fe (1e:41fe)
+AnimationTileset1:
INCBIN "gfx/attack_anim_1.2bpp"
-AnimationTileset2: ; 786ee (1e:46ee)
+AnimationTileset2:
INCBIN "gfx/attack_anim_2.2bpp"
-SlotMachineTiles2: ; 78bde (1e:4bde)
+SlotMachineTiles2:
IF DEF(_RED)
INCBIN "gfx/red/slotmachine2.2bpp"
ENDC
@@ -374,7 +374,7 @@ IF DEF(_BLUE)
INCBIN "gfx/blue/slotmachine2.2bpp"
ENDC
-MoveAnimation: ; 78d5e (1e:4d5e)
+MoveAnimation:
push hl
push de
push bc
@@ -419,7 +419,7 @@ MoveAnimation: ; 78d5e (1e:4d5e)
pop hl
ret
-ShareMoveAnimations: ; 78da6 (1e:4da6)
+ShareMoveAnimations:
; some moves just reuse animations from status conditions
ld a,[H_WHOSETURN]
and a
@@ -442,7 +442,7 @@ ShareMoveAnimations: ; 78da6 (1e:4da6)
ld [wAnimationID],a
ret
-PlayApplyingAttackAnimation: ; 78dbd (1e:4dbd)
+PlayApplyingAttackAnimation:
; Generic animation that shows after the move's individual animation
; Different animation depending on whether the move has an additional effect and on whose turn it is
ld a,[wAnimationType]
@@ -459,7 +459,7 @@ PlayApplyingAttackAnimation: ; 78dbd (1e:4dbd)
ld l,a
jp [hl]
-AnimationTypePointerTable: ; 78dcf (1e:4dcf)
+AnimationTypePointerTable:
dw ShakeScreenVertically ; enemy mon has used a damaging move without a side effect
dw ShakeScreenHorizontallyHeavy ; enemy mon has used a damaging move with a side effect
dw ShakeScreenHorizontallySlow ; enemy mon has used a non-damaging move
@@ -467,33 +467,33 @@ AnimationTypePointerTable: ; 78dcf (1e:4dcf)
dw ShakeScreenHorizontallyLight ; player mon has used a damaging move with a side effect
dw ShakeScreenHorizontallySlow2 ; player mon has used a non-damaging move
-ShakeScreenVertically: ; 78ddb (1e:4ddb)
+ShakeScreenVertically:
call PlayApplyingAttackSound
ld b, 8
jp AnimationShakeScreenVertically
-ShakeScreenHorizontallyHeavy: ; 78de3 (1e:4de3)
+ShakeScreenHorizontallyHeavy:
call PlayApplyingAttackSound
ld b, 8
jp AnimationShakeScreenHorizontallyFast
-ShakeScreenHorizontallySlow: ; 78deb (1e:4deb)
+ShakeScreenHorizontallySlow:
lb bc, 6, 2
jr AnimationShakeScreenHorizontallySlow
-BlinkEnemyMonSprite: ; 78df0 (1e:4df0)
+BlinkEnemyMonSprite:
call PlayApplyingAttackSound
jp AnimationBlinkEnemyMon
-ShakeScreenHorizontallyLight: ; 78df6 (1e:4df6)
+ShakeScreenHorizontallyLight:
call PlayApplyingAttackSound
ld b, 2
jp AnimationShakeScreenHorizontallyFast
-ShakeScreenHorizontallySlow2: ; 78dfe (1e:4dfe)
+ShakeScreenHorizontallySlow2:
lb bc, 3, 2
-AnimationShakeScreenHorizontallySlow: ; 78e01 (1e:4e01)
+AnimationShakeScreenHorizontallySlow:
push bc
push bc
.loop1
@@ -518,7 +518,7 @@ AnimationShakeScreenHorizontallySlow: ; 78e01 (1e:4e01)
jr nz, AnimationShakeScreenHorizontallySlow
ret
-SetAnimationPalette: ; 78e23 (1e:4e23)
+SetAnimationPalette:
ld a, [wOnSGB]
and a
ld a, $e4
@@ -546,7 +546,7 @@ SetAnimationPalette: ; 78e23 (1e:4e23)
ld [rOBP1], a
ret
-PlaySubanimation: ; 78e53 (1e:4e53)
+PlaySubanimation:
ld a,[wAnimSoundID]
cp a,$FF
jr z,.skipPlayingSound
@@ -612,7 +612,7 @@ PlaySubanimation: ; 78e53 (1e:4e53)
ld [wSubAnimSubEntryAddr],a
jp .loop
-AnimationCleanOAM: ; 78ec8 (1e:4ec8)
+AnimationCleanOAM:
push hl
push de
push bc
@@ -627,7 +627,7 @@ AnimationCleanOAM: ; 78ec8 (1e:4ec8)
; this runs after each frame block is drawn in a subanimation
; it runs a particular special effect based on the animation ID
-DoSpecialEffectByAnimationId: ; 78ed7 (1e:4ed7)
+DoSpecialEffectByAnimationId:
push hl
push de
push bc
@@ -650,7 +650,7 @@ DoSpecialEffectByAnimationId: ; 78ed7 (1e:4ed7)
ret
; Format: Animation ID (1 byte), Address (2 bytes)
-AnimationIdSpecialEffects: ; 78ef5 (1e:4ef5)
+AnimationIdSpecialEffects:
db MEGA_PUNCH
dw AnimationFlashScreen
@@ -725,7 +725,7 @@ AnimationIdSpecialEffects: ; 78ef5 (1e:4ef5)
db $FF ; terminator
-DoBallTossSpecialEffects: ; 78f3e (1e:4f3e)
+DoBallTossSpecialEffects:
ld a,[wcf91]
cp a,3 ; is it a Master Ball or Ultra Ball?
jr nc,.skipFlashingEffect
@@ -779,7 +779,7 @@ DoBallTossSpecialEffects: ; 78f3e (1e:4f3e)
ld [wSubAnimCounter],a
ret
-DoBallShakeSpecialEffects: ; 78f96 (1e:4f96)
+DoBallShakeSpecialEffects:
ld a,[wSubAnimCounter]
cp a,4 ; is it the beginning of a shake?
jr nz,.skipPlayingSound
@@ -813,14 +813,14 @@ DoBallShakeSpecialEffects: ; 78f96 (1e:4f96)
ret
; plays a sound after the second frame of the poof animation
-DoPoofSpecialEffects: ; 78fce (1e:4fce)
+DoPoofSpecialEffects:
ld a,[wSubAnimCounter]
cp a,5
ret nz
ld a,SFX_BALL_POOF
jp PlaySound
-DoRockSlideSpecialEffects: ; 78fd9 (1e:4fd9)
+DoRockSlideSpecialEffects:
ld a,[wSubAnimCounter]
cp a,12
ret nc
@@ -836,21 +836,21 @@ DoRockSlideSpecialEffects: ; 78fd9 (1e:4fd9)
ld b,1
predef_jump PredefShakeScreenVertically ; shake vertically
-FlashScreenEveryEightFrameBlocks: ; 78ff7 (1e:4ff7)
+FlashScreenEveryEightFrameBlocks:
ld a,[wSubAnimCounter]
and a,7 ; is the subanimation counter exactly 8?
call z,AnimationFlashScreen ; if so, flash the screen
ret
; flashes the screen if the subanimation counter is divisible by 4
-FlashScreenEveryFourFrameBlocks: ; 79000 (1e:5000)
+FlashScreenEveryFourFrameBlocks:
ld a,[wSubAnimCounter]
and a,3
call z,AnimationFlashScreen
ret
; used for Explosion and Selfdestruct
-DoExplodeSpecialEffects: ; 79009 (1e:5009)
+DoExplodeSpecialEffects:
ld a,[wSubAnimCounter]
cp a,1 ; is it the end of the subanimation?
jr nz,FlashScreenEveryFourFrameBlocks
@@ -859,7 +859,7 @@ DoExplodeSpecialEffects: ; 79009 (1e:5009)
jp AnimationHideMonPic ; make pokemon disappear
; flashes the screen when subanimation counter is 1 modulo 4
-DoBlizzardSpecialEffects: ; 79016 (1e:5016)
+DoBlizzardSpecialEffects:
ld a,[wSubAnimCounter]
cp a,13
jp z,AnimationFlashScreen
@@ -873,7 +873,7 @@ DoBlizzardSpecialEffects: ; 79016 (1e:5016)
; flashes the screen at 3 points in the subanimation
; unused
-FlashScreenUnused: ; 7902e (1e:502e)
+FlashScreenUnused:
ld a,[wSubAnimCounter]
cp a,14
jp z,AnimationFlashScreen
@@ -884,7 +884,7 @@ FlashScreenUnused: ; 7902e (1e:502e)
ret
; function to make the pokemon disappear at the beginning of the animation
-TradeHidePokemon: ; 79041 (1e:5041)
+TradeHidePokemon:
ld a,[wSubAnimCounter]
cp a,6
ret nz
@@ -892,7 +892,7 @@ TradeHidePokemon: ; 79041 (1e:5041)
jp ClearMonPicFromTileMap ; make pokemon disappear
; function to make a shaking pokeball jump up at the end of the animation
-TradeShakePokeball: ; 7904c (1e:504c)
+TradeShakePokeball:
ld a,[wSubAnimCounter]
cp a,1
ret nz
@@ -921,7 +921,7 @@ TradeShakePokeball: ; 7904c (1e:504c)
ld a,SFX_TRADE_MACHINE
jp PlaySound
-BallMoveDistances1: ; 79078 (1e:5078)
+BallMoveDistances1:
db -12,-12,-8
db $ff ; terminator
@@ -962,13 +962,13 @@ TradeJumpPokeball: ; 507C
pop de
jr .loop
-BallMoveDistances2: ; 790b3 (1e:50b3)
+BallMoveDistances2:
db 11,12,-12,-7,7,12,-8,8
db $ff ; terminator
; this function copies the current musical note graphic
; so that there are two musical notes flying towards the defending pokemon
-DoGrowlSpecialEffects: ; 790bc (1e:50bc)
+DoGrowlSpecialEffects:
ld hl,wOAMBuffer ; OAM buffer
ld de,wOAMBuffer + $10
ld bc,$10
@@ -979,14 +979,14 @@ DoGrowlSpecialEffects: ; 790bc (1e:50bc)
ret
; this is associated with Tail Whip, but Tail Whip doesn't use any subanimations
-TailWhipAnimationUnused: ; 790d0 (1e:50d0)
+TailWhipAnimationUnused:
ld a,1
ld [wSubAnimCounter],a
ld c,20
jp DelayFrames
; Format: Special Effect ID (1 byte), Address (2 bytes)
-SpecialEffectPointers: ; 790da (1e:50da)
+SpecialEffectPointers:
db SE_DARK_SCREEN_FLASH ; $FE
dw AnimationFlashScreen
db SE_DARK_SCREEN_PALETTE ; $FD
@@ -1067,13 +1067,13 @@ SpecialEffectPointers: ; 790da (1e:50da)
dw AnimationWavyScreen
db $FF
-AnimationDelay10: ; 79150 (1e:5150)
+AnimationDelay10:
ld c,10
jp DelayFrames
; calls a function with the turn flipped from player to enemy or vice versa
; input - hl - address of function to call
-CallWithTurnFlipped: ; 79155 (1e:5155)
+CallWithTurnFlipped:
ld a,[H_WHOSETURN]
push af
xor a,1
@@ -1087,7 +1087,7 @@ CallWithTurnFlipped: ; 79155 (1e:5155)
ret
; flashes the screen for an extended period (48 frames)
-AnimationFlashScreenLong: ; 79165 (1e:5165)
+AnimationFlashScreenLong:
ld a,3 ; cycle through the palettes 3 times
ld [wFlashScreenLongCounter],a
ld a,[wOnSGB] ; running on SGB?
@@ -1113,7 +1113,7 @@ AnimationFlashScreenLong: ; 79165 (1e:5165)
ret
; BG palettes
-FlashScreenLongMonochrome: ; 7918e (1e:518e)
+FlashScreenLongMonochrome:
db %11111001 ; 3, 3, 2, 1
db %11111110 ; 3, 3, 3, 2
db %11111111 ; 3, 3, 3, 3
@@ -1129,7 +1129,7 @@ FlashScreenLongMonochrome: ; 7918e (1e:518e)
db $01 ; terminator
; BG palettes
-FlashScreenLongSGB: ; 7919b (1e:519b)
+FlashScreenLongSGB:
db %11111000 ; 3, 3, 2, 0
db %11111100 ; 3, 3, 3, 0
db %11111111 ; 3, 3, 3, 3
@@ -1146,7 +1146,7 @@ FlashScreenLongSGB: ; 7919b (1e:519b)
; causes a delay of 2 frames for the first cycle
; causes a delay of 1 frame for the second and third cycles
-FlashScreenLongDelay: ; 791a8 (1e:51a8)
+FlashScreenLongDelay:
ld a,[wFlashScreenLongCounter]
cp a,4 ; never true since [wFlashScreenLongCounter] starts at 3
ld c,4
@@ -1159,7 +1159,7 @@ FlashScreenLongDelay: ; 791a8 (1e:51a8)
.delayFrames
jp DelayFrames
-AnimationFlashScreen: ; 791be (1e:51be)
+AnimationFlashScreen:
ld a,[rBGP]
push af ; save initial palette
ld a,%00011011 ; 0, 1, 2, 3 (inverted colors)
@@ -1174,42 +1174,42 @@ AnimationFlashScreen: ; 791be (1e:51be)
ld [rBGP],a ; restore initial palette
ret
-AnimationDarkScreenPalette: ; 791d6 (1e:51d6)
+AnimationDarkScreenPalette:
; Changes the screen's palette to a dark palette.
lb bc, $6f, $6f
jr SetAnimationBGPalette
-AnimationDarkenMonPalette: ; 791db (1e:51db)
+AnimationDarkenMonPalette:
; Darkens the mon sprite's palette.
lb bc, $f9, $f4
jr SetAnimationBGPalette
-AnimationUnusedPalette1: ; 791e0 (1e:51e0)
+AnimationUnusedPalette1:
lb bc, $fe, $f8
jr SetAnimationBGPalette
-AnimationUnusedPalette2: ; 791e5 (1e:51e5)
+AnimationUnusedPalette2:
lb bc, $ff, $ff
jr SetAnimationBGPalette
-AnimationResetScreenPalette: ; 791ea (1e:51ea)
+AnimationResetScreenPalette:
; Restores the screen's palette to the normal palette.
lb bc, $e4, $e4
jr SetAnimationBGPalette
-AnimationUnusedPalette3: ; 791ef (1e:51ef)
+AnimationUnusedPalette3:
lb bc, $00, $00
jr SetAnimationBGPalette
-AnimationLightScreenPalette: ; 791f4 (1e:51f4)
+AnimationLightScreenPalette:
; Changes the screen to use a palette with light colors.
lb bc, $90, $90
jr SetAnimationBGPalette
-AnimationUnusedPalette4: ; 791f9 (1e:51f9)
+AnimationUnusedPalette4:
lb bc, $40, $40
-SetAnimationBGPalette: ; 791fc (1e:51fc)
+SetAnimationBGPalette:
ld a, [wOnSGB]
and a
ld a, b
@@ -1221,17 +1221,17 @@ SetAnimationBGPalette: ; 791fc (1e:51fc)
ld b, $5
-AnimationShakeScreenVertically: ; 79209 (1e:5209)
+AnimationShakeScreenVertically:
predef_jump PredefShakeScreenVertically
-AnimationShakeScreen: ; 7920e (1e:520e)
+AnimationShakeScreen:
; Shakes the screen for a while. Used in Earthquake/Fissure/etc. animations.
ld b, $8
-AnimationShakeScreenHorizontallyFast: ; 79210 (1e:5210)
+AnimationShakeScreenHorizontallyFast:
predef_jump PredefShakeScreenHorizontally
-AnimationWaterDropletsEverywhere: ; 79215 (1e:5215)
+AnimationWaterDropletsEverywhere:
; Draws water droplets all over the screen and makes them
; scroll. It's hard to describe, but it's the main animation
; in Surf/Mist/Toxic.
@@ -1258,7 +1258,7 @@ AnimationWaterDropletsEverywhere: ; 79215 (1e:5215)
jr nz, .loop
ret
-_AnimationWaterDroplets: ; 79246 (1e:5246)
+_AnimationWaterDroplets:
ld hl, wOAMBuffer
.loop
ld a, [wBaseCoordY]
@@ -1284,7 +1284,7 @@ _AnimationWaterDroplets: ; 79246 (1e:5246)
call AnimationCleanOAM
jp DelayFrame
-AnimationSlideMonUp: ; 7927a (1e:527a)
+AnimationSlideMonUp:
; Slides the mon's sprite upwards.
ld c, 7
ld a, [H_WHOSETURN]
@@ -1300,7 +1300,7 @@ AnimationSlideMonUp: ; 7927a (1e:527a)
ld [wSlideMonUpBottomRowLeftTile], a
jp _AnimationSlideMonUp
-AnimationSlideMonDown: ; 79297 (1e:5297)
+AnimationSlideMonDown:
; Slides the mon's sprite down out of the screen.
xor a
call GetTileIDList
@@ -1317,19 +1317,19 @@ AnimationSlideMonDown: ; 79297 (1e:5297)
jr nz, .loop
ret
-AnimationSlideMonOff: ; 792af (1e:52af)
+AnimationSlideMonOff:
; Slides the mon's sprite off the screen horizontally.
ld e, 8
ld a, 3
ld [wSlideMonDelay], a
jp _AnimationSlideMonOff
-AnimationSlideEnemyMonOff: ; 792b9 (1e:52b9)
+AnimationSlideEnemyMonOff:
; Slides the enemy mon off the screen horizontally.
ld hl, AnimationSlideMonOff
jp CallWithTurnFlipped
-_AnimationSlideMonUp: ; 792bf (1e:52bf)
+_AnimationSlideMonUp:
push de
push hl
push bc
@@ -1380,7 +1380,7 @@ _AnimationSlideMonUp: ; 792bf (1e:52bf)
jr nz, _AnimationSlideMonUp
ret
-ShakeEnemyHUD_WritePlayerMonPicOAM: ; 792fd (1e:52fd)
+ShakeEnemyHUD_WritePlayerMonPicOAM:
; Writes the OAM entries for a copy of the player mon's pic in OAM.
; The top 5 rows are reproduced in OAM, although only 2 are actually needed.
ld a, $10
@@ -1408,7 +1408,7 @@ ShakeEnemyHUD_WritePlayerMonPicOAM: ; 792fd (1e:52fd)
ld [wBaseCoordX], a
jr .loop
-BattleAnimWriteOAMEntry: ; 79329 (1e:5329)
+BattleAnimWriteOAMEntry:
; Y coordinate = e (increased by 8 each call, before the write to OAM)
; X coordinate = [wBaseCoordX]
; tile = d
@@ -1425,11 +1425,11 @@ BattleAnimWriteOAMEntry: ; 79329 (1e:5329)
ld [hli], a
ret
-AdjustOAMBlockXPos: ; 79337 (1e:5337)
+AdjustOAMBlockXPos:
ld l, e
ld h, d
-AdjustOAMBlockXPos2: ; 79339 (1e:5339)
+AdjustOAMBlockXPos2:
ld de, 4
.loop
ld a, [wCoordAdjustmentAmount]
@@ -1449,11 +1449,11 @@ AdjustOAMBlockXPos2: ; 79339 (1e:5339)
jr nz, .loop
ret
-AdjustOAMBlockYPos: ; 79350 (1e:5350)
+AdjustOAMBlockYPos:
ld l, e
ld h, d
-AdjustOAMBlockYPos2: ; 79352 (1e:5352)
+AdjustOAMBlockYPos2:
ld de, 4
.loop
ld a, [wCoordAdjustmentAmount]
@@ -1472,12 +1472,12 @@ AdjustOAMBlockYPos2: ; 79352 (1e:5352)
jr nz, .loop
ret
-AnimationBlinkEnemyMon: ; 79369 (1e:5369)
+AnimationBlinkEnemyMon:
; Make the enemy mon's sprite blink on and off for a second or two
ld hl, AnimationBlinkMon
jp CallWithTurnFlipped
-AnimationBlinkMon: ; 7936f (1e:536f)
+AnimationBlinkMon:
; Make the mon's sprite blink on and off for a second or two.
push af
ld c, 6
@@ -1495,7 +1495,7 @@ AnimationBlinkMon: ; 7936f (1e:536f)
pop af
ret
-AnimationFlashMonPic: ; 79389 (1e:5389)
+AnimationFlashMonPic:
; Flashes the mon's sprite on and off
ld a, [wBattleMonSpecies]
ld [wChangeMonPicPlayerTurnSpecies], a
@@ -1503,25 +1503,25 @@ AnimationFlashMonPic: ; 79389 (1e:5389)
ld [wChangeMonPicEnemyTurnSpecies], a
jp ChangeMonPic
-AnimationFlashEnemyMonPic: ; 79398 (1e:5398)
+AnimationFlashEnemyMonPic:
; Flashes the enemy mon's sprite on and off
ld hl, AnimationFlashMonPic
jp CallWithTurnFlipped
-AnimationShowMonPic: ; 7939e (1e:539e)
+AnimationShowMonPic:
xor a
call GetTileIDList
call GetMonSpriteTileMapPointerFromRowCount
call CopyPicTiles
jp Delay3
-AnimationShowEnemyMonPic: ; 793ab (1e:53ab)
+AnimationShowEnemyMonPic:
; Shows the emenmy mon's front sprite. Used in animations like Seismic Toss
; to make the mon's sprite reappear after disappears offscreen.
ld hl, AnimationShowMonPic
jp CallWithTurnFlipped
-AnimationShakeBackAndForth: ; 793b1 (1e:53b1)
+AnimationShakeBackAndForth:
; Shakes the mon's sprite back and forth rapidly. This is used in Double Team.
; The mon's sprite disappears after this animation.
ld a, [H_WHOSETURN]
@@ -1568,7 +1568,7 @@ AnimationShakeBackAndForth: ; 793b1 (1e:53b1)
jr nz, .loop
ret
-AnimationMoveMonHorizontally: ; 793f9 (1e:53f9)
+AnimationMoveMonHorizontally:
; Shifts the mon's sprite horizontally to a fixed location. Used by lots of
; animations like Tackle/Body Slam.
call AnimationHideMonPic
@@ -1586,7 +1586,7 @@ AnimationMoveMonHorizontally: ; 793f9 (1e:53f9)
ld c, 3
jp DelayFrames
-AnimationResetMonPosition: ; 79415 (1e:5415)
+AnimationResetMonPosition:
; Resets the mon's sprites to be located at the normal coordinates.
ld a, [H_WHOSETURN]
and a
@@ -1597,7 +1597,7 @@ AnimationResetMonPosition: ; 79415 (1e:5415)
call ClearMonPicFromTileMap
jp AnimationShowMonPic
-AnimationSpiralBallsInward: ; 79424 (1e:5424)
+AnimationSpiralBallsInward:
; Creates an effect that looks like energy balls spiralling into the
; player mon's sprite. Used in Focus Energy, for example.
ld a, [H_WHOSETURN]
@@ -1651,7 +1651,7 @@ AnimationSpiralBallsInward: ; 79424 (1e:5424)
call AnimationCleanOAM
jp AnimationFlashScreen
-SpiralBallAnimationCoordinates: ; 79476 (1e:5476)
+SpiralBallAnimationCoordinates:
; y, x pairs
; This is the sequence of screen coordinates that the spiralling
; balls are positioned at.
@@ -1678,7 +1678,7 @@ SpiralBallAnimationCoordinates: ; 79476 (1e:5476)
db $50, $28
db $FF ; list terminator
-AnimationSquishMonPic: ; 794a1 (1e:54a1)
+AnimationSquishMonPic:
; Squishes the mon's sprite horizontally making it
; disappear. Used by Teleport/Sky Attack animations.
ld c, 4
@@ -1709,7 +1709,7 @@ AnimationSquishMonPic: ; 794a1 (1e:54a1)
ld c, 2
jp DelayFrame
-_AnimationSquishMonPic: ; 794d4 (1e:54d4)
+_AnimationSquishMonPic:
ld c, 7
.loop
push bc
@@ -1734,7 +1734,7 @@ _AnimationSquishMonPic: ; 794d4 (1e:54d4)
jr nz, .loop
jp Delay3
-AnimationShootBallsUpward: ; 794f9 (1e:54f9)
+AnimationShootBallsUpward:
; Shoots one pillar of "energy" balls upwards. Used in Teleport/Sky Attack
; animations.
ld a, [H_WHOSETURN]
@@ -1753,7 +1753,7 @@ AnimationShootBallsUpward: ; 794f9 (1e:54f9)
call _AnimationShootBallsUpward
jp AnimationCleanOAM
-_AnimationShootBallsUpward: ; 79517 (1e:5517)
+_AnimationShootBallsUpward:
push bc
xor a
ld [wWhichBattleAnimTileset], a
@@ -1803,7 +1803,7 @@ _AnimationShootBallsUpward: ; 79517 (1e:5517)
jr nz, .loop
ret
-AnimationShootManyBallsUpward: ; 79566 (1e:5566)
+AnimationShootManyBallsUpward:
; Shoots several pillars of "energy" balls upward.
ld a, [H_WHOSETURN]
and a
@@ -1827,19 +1827,19 @@ AnimationShootManyBallsUpward: ; 79566 (1e:5566)
pop hl
jr .loop
-UpwardBallsAnimXCoordinatesPlayerTurn: ; 79591 (1e:5591)
+UpwardBallsAnimXCoordinatesPlayerTurn:
; List of x coordinates for each pillar of "energy" balls in the
; AnimationShootManyBallsUpward animation. It's unused in the game.
db $10, $40, $28, $18, $38, $30
db $FF ; list terminator
-UpwardBallsAnimXCoordinatesEnemyTurn: ; 79598 (1e:5598)
+UpwardBallsAnimXCoordinatesEnemyTurn:
; List of x coordinates for each pillar of "energy" balls in the
; AnimationShootManyBallsUpward animation. It's unused in the game.
db $60, $90, $78, $68, $88, $80
db $FF ; list terminator
-AnimationMinimizeMon: ; 7959f (1e:559f)
+AnimationMinimizeMon:
; Changes the mon's sprite to a mini black sprite. Used by the
; Minimize animation.
ld hl, wTempPic
@@ -1863,10 +1863,10 @@ AnimationMinimizeMon: ; 7959f (1e:559f)
call Delay3
jp AnimationShowMonPic
-MinimizedMonSprite: ; 795c4 (1e:55c4)
+MinimizedMonSprite:
INCBIN "gfx/minimized_mon_sprite.1bpp"
-AnimationSlideMonDownAndHide: ; 795c9 (1e:55c9)
+AnimationSlideMonDownAndHide:
; Slides the mon's sprite down and disappears. Used in Acid Armor.
ld a, $1
ld c, $2
@@ -1893,7 +1893,7 @@ AnimationSlideMonDownAndHide: ; 795c9 (1e:55c9)
call FillMemory
jp CopyTempPicToMonPic
-_AnimationSlideMonOff: ; 795f8 (1e:55f8)
+_AnimationSlideMonOff:
; Slides the mon's sprite off the screen horizontally by e tiles and waits
; [wSlideMonDelay] V-blanks each time the pic is slid by one tile.
ld a, [H_WHOSETURN]
@@ -1965,7 +1965,7 @@ _AnimationSlideMonOff: ; 795f8 (1e:55f8)
ld a, " "
ret
-AnimationSlideMonHalfOff: ; 79645 (1e:5645)
+AnimationSlideMonHalfOff:
; Slides the mon's sprite halfway off the screen. It's used in Softboiled.
ld e, 4
ld a, 4
@@ -1973,7 +1973,7 @@ AnimationSlideMonHalfOff: ; 79645 (1e:5645)
call _AnimationSlideMonOff
jp Delay3
-CopyTempPicToMonPic: ; 79652 (1e:5652)
+CopyTempPicToMonPic:
ld a, [H_WHOSETURN]
and a
ld hl, vBackPic ; player turn
@@ -1984,7 +1984,7 @@ CopyTempPicToMonPic: ; 79652 (1e:5652)
ld bc, 7 * 7
jp CopyVideoData
-AnimationWavyScreen: ; 79666 (1e:5666)
+AnimationWavyScreen:
; used in Psywave/Psychic etc.
ld hl, vBGMap0
call BattleAnimCopyTileMapToVRAM
@@ -2025,7 +2025,7 @@ AnimationWavyScreen: ; 79666 (1e:5666)
call BattleAnimCopyTileMapToVRAM
ret
-WavyScreen_SetSCX: ; 796ae (1e:56ae)
+WavyScreen_SetSCX:
ld a, [rSTAT]
and $3 ; is it H-blank?
jr nz, WavyScreen_SetSCX ; wait until it's H-blank
@@ -2038,14 +2038,14 @@ WavyScreen_SetSCX: ; 796ae (1e:56ae)
ld hl, WavyScreenLineOffsets ; go back to the beginning if so
ret
-WavyScreenLineOffsets: ; 796bf (1e:56bf)
+WavyScreenLineOffsets:
; Sequence of horizontal line pixel offsets for the wavy screen animation.
; This sequence vaguely resembles a sine wave.
db 0, 0, 0, 0, 0, 1, 1, 1, 2, 2, 2, 2, 2, 1, 1, 1
db 0, 0, 0, 0, 0, -1, -1, -1, -2, -2, -2, -2, -2, -1, -1, -1
db $80 ; terminator
-AnimationSubstitute: ; 796e0 (1e:56e0)
+AnimationSubstitute:
; Changes the pokemon's sprite to the mini sprite
ld hl, wTempPic
xor a
@@ -2084,12 +2084,12 @@ AnimationSubstitute: ; 796e0 (1e:56e0)
call CopyTempPicToMonPic
jp AnimationShowMonPic
-CopySlowbroSpriteData: ; 7973f (1e:573f)
+CopySlowbroSpriteData:
ld bc, $0010
ld a, BANK(SlowbroSprite)
jp FarCopyData2
-HideSubstituteShowMonAnim: ; 79747 (1e:5747)
+HideSubstituteShowMonAnim:
ld a, [H_WHOSETURN]
and a
ld hl, wPlayerMonMinimized
@@ -2114,12 +2114,12 @@ HideSubstituteShowMonAnim: ; 79747 (1e:5747)
call AnimationFlashMonPic
jp AnimationShowMonPic
-ReshowSubstituteAnim: ; 79771 (1e:5771)
+ReshowSubstituteAnim:
call AnimationSlideMonOff
call AnimationSubstitute
jp AnimationShowMonPic
-AnimationBoundUpAndDown: ; 7977a (1e:577a)
+AnimationBoundUpAndDown:
; Bounces the mon's sprite up and down several times. It is used
; by Splash's animation.
ld c, 5
@@ -2131,7 +2131,7 @@ AnimationBoundUpAndDown: ; 7977a (1e:577a)
jr nz, .loop
jp AnimationShowMonPic
-AnimationTransformMon: ; 79787 (1e:5787)
+AnimationTransformMon:
; Redraws this mon's sprite as the back/front sprite of the opposing mon.
; Used in Transform.
ld a, [wEnemyMonSpecies]
@@ -2139,7 +2139,7 @@ AnimationTransformMon: ; 79787 (1e:5787)
ld a, [wBattleMonSpecies]
ld [wChangeMonPicEnemyTurnSpecies], a
-ChangeMonPic: ; 79793 (1e:5793)
+ChangeMonPic:
ld a, [H_WHOSETURN]
and a
jr z, .playerTurn
@@ -2170,7 +2170,7 @@ ChangeMonPic: ; 79793 (1e:5793)
ld b, SET_PAL_BATTLE
jp RunPaletteCommand
-AnimationHideEnemyMonPic: ; 797d8 (1e:57d8)
+AnimationHideEnemyMonPic:
; Hides the enemy mon's sprite
xor a
ld [H_AUTOBGTRANSFERENABLED], a
@@ -2180,7 +2180,7 @@ AnimationHideEnemyMonPic: ; 797d8 (1e:57d8)
ld [H_AUTOBGTRANSFERENABLED], a
jp Delay3
-InitMultipleObjectsOAM: ; 797e8 (1e:57e8)
+InitMultipleObjectsOAM:
; Writes c OAM entries with tile d.
; Sets their Y coordinates to sequential multiples of 8, starting from 0.
; Sets their X coordinates to 0.
@@ -2201,7 +2201,7 @@ InitMultipleObjectsOAM: ; 797e8 (1e:57e8)
jr nz, .loop
ret
-AnimationHideMonPic: ; 79801 (1e:5801)
+AnimationHideMonPic:
; Hides the mon's sprite.
ld a, [H_WHOSETURN]
and a
@@ -2211,7 +2211,7 @@ AnimationHideMonPic: ; 79801 (1e:5801)
.playerTurn
ld a, 5 * SCREEN_WIDTH + 1
-ClearMonPicFromTileMap: ; 7980c (1e:580c)
+ClearMonPicFromTileMap:
push hl
push de
push bc
@@ -2229,7 +2229,7 @@ ClearMonPicFromTileMap: ; 7980c (1e:580c)
; puts the tile map destination address of a mon sprite in hl, given the row count in b
; The usual row count is 7, but it may be smaller when sliding a mon sprite in/out,
; in order to show only a portion of the mon sprite.
-GetMonSpriteTileMapPointerFromRowCount: ; 79820 (1e:5820)
+GetMonSpriteTileMapPointerFromRowCount:
push de
ld a, [H_WHOSETURN]
and a
@@ -2262,7 +2262,7 @@ GetMonSpriteTileMapPointerFromRowCount: ; 79820 (1e:5820)
; de = tile ID list pointer
; b = number of rows
; c = number of columns
-GetTileIDList: ; 79842 (1e:5842)
+GetTileIDList:
ld hl, TileIDListPointerTable
ld e, a
ld d, 0
@@ -2283,7 +2283,7 @@ GetTileIDList: ; 79842 (1e:5842)
ld b, a
ret
-AnimCopyRowLeft: ; 7985b (1e:585b)
+AnimCopyRowLeft:
; copy a row of c tiles 1 tile left
ld a, [hld]
ld [hli], a
@@ -2292,7 +2292,7 @@ AnimCopyRowLeft: ; 7985b (1e:585b)
jr nz, AnimCopyRowLeft
ret
-AnimCopyRowRight: ; 79862 (1e:5862)
+AnimCopyRowRight:
; copy a row of c tiles 1 tile right
ld a, [hli]
ld [hld], a
@@ -2302,14 +2302,14 @@ AnimCopyRowRight: ; 79862 (1e:5862)
ret
; get the sound of the move id in b
-GetMoveSoundB: ; 79869 (1e:5869)
+GetMoveSoundB:
ld a, b
call GetMoveSound
ld b, a
ret
; get the sound of the (move id - 1) in a
-GetMoveSound: ; 7986f (1e:586f)
+GetMoveSound:
ld hl,MoveSoundTable
ld e,a
ld d,0
@@ -2349,7 +2349,7 @@ GetMoveSound: ; 7986f (1e:586f)
ld a,b
ret
-IsCryMove: ; 798ad (1e:58ad)
+IsCryMove:
; set carry if the move animation involves playing a monster cry
ld a,[wAnimationID]
cp a,GROWL
@@ -2362,7 +2362,7 @@ IsCryMove: ; 798ad (1e:58ad)
scf
ret
-MoveSoundTable: ; 798bc (1e:58bc)
+MoveSoundTable:
db SFX_POUND, $00,$80 ; POUND
db SFX_BATTLE_0C, $10,$80 ; KARATE_CHOP
db SFX_DOUBLESLAP, $00,$80 ; DOUBLESLAP
@@ -2530,7 +2530,7 @@ MoveSoundTable: ; 798bc (1e:58bc)
db SFX_BATTLE_0B, $00,$80 ; STRUGGLE
db SFX_BATTLE_0B, $00,$80
-CopyPicTiles: ; 79aae (1e:5aae)
+CopyPicTiles:
ld a, [H_WHOSETURN]
and a
ld a, $31 ; base tile ID of player mon sprite
@@ -2542,7 +2542,7 @@ CopyPicTiles: ; 79aae (1e:5aae)
jr CopyTileIDs_NoBGTransfer
; copy the tiles used when a mon is being sent out of or into a pokeball
-CopyDownscaledMonTiles: ; 79aba (1e:5aba)
+CopyDownscaledMonTiles:
call GetPredefRegisters
ld a, [wDownscaledMonSize]
and a
@@ -2553,14 +2553,14 @@ CopyDownscaledMonTiles: ; 79aba (1e:5aba)
ld de, DownscaledMonTiles_3x3
; fall through
-CopyTileIDs_NoBGTransfer: ; 79acb (1e:5acb)
+CopyTileIDs_NoBGTransfer:
xor a
ld [H_AUTOBGTRANSFERENABLED], a
; fall through
; b = number of rows
; c = number of columns
-CopyTileIDs: ; 79ace (1e:5ace)
+CopyTileIDs:
push hl
.rowLoop
push bc
@@ -2585,7 +2585,7 @@ CopyTileIDs: ; 79ace (1e:5ace)
pop hl
ret
-TileIDListPointerTable: ; 79aea (1e:5aea)
+TileIDListPointerTable:
dw Unknown_79b24
db $77
dw Unknown_79b55
@@ -2603,19 +2603,19 @@ TileIDListPointerTable: ; 79aea (1e:5aea)
dw Unknown_79c50
db $3C
-DownscaledMonTiles_5x5: ; 79b02 (1e:5b02)
+DownscaledMonTiles_5x5:
db $31,$38,$46,$54,$5B
db $32,$39,$47,$55,$5C
db $34,$3B,$49,$57,$5E
db $36,$3D,$4B,$59,$60
db $37,$3E,$4C,$5A,$61
-DownscaledMonTiles_3x3: ; 79b1b (1e:5b1b)
+DownscaledMonTiles_3x3:
db $31,$46,$5B
db $34,$49,$5E
db $37,$4C,$61
-Unknown_79b24: ; 79b24 (1e:5b24)
+Unknown_79b24:
db $00,$07,$0E,$15,$1C,$23,$2A
db $01,$08,$0F,$16,$1D,$24,$2B
db $02,$09,$10,$17,$1E,$25,$2C
@@ -2624,19 +2624,19 @@ Unknown_79b24: ; 79b24 (1e:5b24)
db $05,$0C,$13,$1A,$21,$28,$2F
db $06,$0D,$14,$1B,$22,$29,$30
-Unknown_79b55: ; 79b55 (1e:5b55)
+Unknown_79b55:
db $00,$07,$0E,$15,$1C,$23,$2A
db $01,$08,$0F,$16,$1D,$24,$2B
db $03,$0A,$11,$18,$1F,$26,$2D
db $04,$0B,$12,$19,$20,$27,$2E
db $05,$0C,$13,$1A,$21,$28,$2F
-Unknown_79b78: ; 79b78 (1e:5b78)
+Unknown_79b78:
db $00,$07,$0E,$15,$1C,$23,$2A
db $02,$09,$10,$17,$1E,$25,$2C
db $04,$0B,$12,$19,$20,$27,$2E
-Unknown_79b8d: ; 79b8d (1e:5b8d)
+Unknown_79b8d:
db $00,$00,$00,$00,$00,$00,$00
db $00,$00,$00,$00,$00,$19,$00
db $02,$06,$0B,$10,$14,$1A,$00
@@ -2645,7 +2645,7 @@ Unknown_79b8d: ; 79b8d (1e:5b8d)
db $04,$09,$0E,$13,$17,$1D,$1F
db $05,$0A,$0F,$01,$18,$1E,$20
-Unknown_79bbe: ; 79bbe (1e:5bbe)
+Unknown_79bbe:
db $00,$00,$00,$30,$00,$37,$00
db $00,$00,$2B,$31,$34,$38,$3D
db $21,$26,$2C,$01,$35,$39,$3E
@@ -2654,7 +2654,7 @@ Unknown_79bbe: ; 79bbe (1e:5bbe)
db $24,$29,$2F,$01,$01,$3B,$00
db $25,$2A,$01,$01,$01,$3C,$00
-Unknown_79bef: ; 79bef (1e:5bef)
+Unknown_79bef:
db $00,$00,$00,$00,$00,$00,$00
db $00,$00,$47,$4D,$00,$00,$00
db $00,$00,$48,$4E,$52,$56,$5B
@@ -2663,7 +2663,7 @@ Unknown_79bef: ; 79bef (1e:5bef)
db $41,$45,$4B,$51,$4C,$59,$5D
db $42,$46,$4C,$4C,$55,$5A,$5E
-Unknown_79c20: ; 79c20 (1e:5c20)
+Unknown_79c20:
db $31,$32,$32,$32,$32,$33
db $34,$35,$36,$36,$37,$38
db $34,$39,$3A,$3A,$3B,$38
@@ -2673,12 +2673,12 @@ Unknown_79c20: ; 79c20 (1e:5c20)
db $41,$43,$4B,$4C,$4D,$4E
db $4F,$50,$50,$50,$51,$52
-Unknown_79c50: ; 79c50 (1e:5c50)
+Unknown_79c50:
db $43,$55,$56,$53,$53,$53,$53,$53,$53,$53,$53,$53
db $43,$57,$58,$54,$54,$54,$54,$54,$54,$54,$54,$54
db $43,$59,$5A,$43,$43,$43,$43,$43,$43,$43,$43,$43
-AnimationLeavesFalling: ; 79c74 (1e:5c74)
+AnimationLeavesFalling:
; Makes leaves float down from the top of the screen. This is used
; in Razor Leaf's animation.
ld a, [rOBP0]
@@ -2693,7 +2693,7 @@ AnimationLeavesFalling: ; 79c74 (1e:5c74)
ld [rOBP0], a
ret
-AnimationPetalsFalling: ; 79c8a (1e:5c8a)
+AnimationPetalsFalling:
; Makes lots of petals fall down from the top of the screen. It's used in
; the animation for Petal Dance.
ld d, $71 ; petal tile
@@ -2702,7 +2702,7 @@ AnimationPetalsFalling: ; 79c8a (1e:5c8a)
call AnimationFallingObjects
jp ClearSprites
-AnimationFallingObjects: ; 79c97 (1e:5c97)
+AnimationFallingObjects:
ld c, a
ld a, 1
call InitMultipleObjectsOAM
@@ -2741,7 +2741,7 @@ AnimationFallingObjects: ; 79c97 (1e:5c97)
jr nz, .loop ; keep moving the falling objects down until it does
ret
-FallingObjects_UpdateOAMEntry: ; 79cdb (1e:5cdb)
+FallingObjects_UpdateOAMEntry:
; Increases Y by 2 pixels and adjusts X and X flip based on the falling object's
; movement byte.
ld hl, wOAMBuffer
@@ -2785,10 +2785,10 @@ FallingObjects_UpdateOAMEntry: ; 79cdb (1e:5cdb)
ld [hl], a ; attribute
ret
-FallingObjects_DeltaXs: ; 79d0d (1e:5d0d)
+FallingObjects_DeltaXs:
db 0, 1, 3, 5, 7, 9, 11, 13, 15
-FallingObjects_UpdateMovementByte: ; 79d16 (1e:5d16)
+FallingObjects_UpdateMovementByte:
ld a, [wFallingObjectMovementByte]
inc a
ld b, a
@@ -2804,7 +2804,7 @@ FallingObjects_UpdateMovementByte: ; 79d16 (1e:5d16)
ld [wFallingObjectMovementByte], a
ret
-FallingObjects_InitXCoords: ; 79d2a (1e:5d2a)
+FallingObjects_InitXCoords:
ld hl, wOAMBuffer + $01
ld de, FallingObjects_InitialXCoords
ld a, [wNumFallingObjects]
@@ -2820,10 +2820,10 @@ FallingObjects_InitXCoords: ; 79d2a (1e:5d2a)
jr nz, .loop
ret
-FallingObjects_InitialXCoords: ; 79d3e (1e:5d3e)
+FallingObjects_InitialXCoords:
db $38,$40,$50,$60,$70,$88,$90,$56,$67,$4A,$77,$84,$98,$32,$22,$5C,$6C,$7D,$8E,$99
-FallingObjects_InitMovementData: ; 79d52 (1e:5d52)
+FallingObjects_InitMovementData:
ld hl, wFallingObjectsMovementData
ld de, FallingObjects_InitialMovementData
ld a, [wNumFallingObjects]
@@ -2836,10 +2836,10 @@ FallingObjects_InitMovementData: ; 79d52 (1e:5d52)
jr nz, .loop
ret
-FallingObjects_InitialMovementData: ; 79d63 (1e:5d63)
+FallingObjects_InitialMovementData:
db $00,$84,$06,$81,$02,$88,$01,$83,$05,$89,$09,$80,$07,$87,$03,$82,$04,$85,$08,$86
-AnimationShakeEnemyHUD: ; 79d77 (1e:5d77)
+AnimationShakeEnemyHUD:
; Shakes the enemy HUD.
; Make a copy of the back pic's tile patterns in sprite tile pattern VRAM.
@@ -2912,7 +2912,7 @@ AnimationShakeEnemyHUD: ; 79d77 (1e:5d77)
; b = tile ID list index
; c = base tile ID
-CopyTileIDsFromList: ; 79dda (1e:5dda)
+CopyTileIDsFromList:
call GetPredefRegisters
ld a, c
ld [hBaseTileID], a
@@ -2922,7 +2922,7 @@ CopyTileIDsFromList: ; 79dda (1e:5dda)
pop hl
jp CopyTileIDs
-ShakeEnemyHUD_ShakeBG: ; 79de9 (1e:5de9)
+ShakeEnemyHUD_ShakeBG:
ld a, [hSCX]
ld [wTempSCX], a
.loop
@@ -2942,14 +2942,14 @@ ShakeEnemyHUD_ShakeBG: ; 79de9 (1e:5de9)
ld [hSCX], a
ret
-BattleAnimCopyTileMapToVRAM: ; 79e0d (1e:5e0d)
+BattleAnimCopyTileMapToVRAM:
ld a, h
ld [H_AUTOBGTRANSFERDEST + 1], a
ld a, l
ld [H_AUTOBGTRANSFERDEST], a
jp Delay3
-TossBallAnimation: ; 79e16 (1e:5e16)
+TossBallAnimation:
ld a,[wIsInBattle]
cp a,2
jr z,.BlockBall ; if in trainer battle, play different animation
@@ -2992,7 +2992,7 @@ TossBallAnimation: ; 79e16 (1e:5e16)
jr nz,.PlayNextAnimation
ret
-.PokeBallAnimations: ; 79e50 (1e:5e50)
+.PokeBallAnimations:
; sequence of animations that make up the Poké Ball toss
db POOF_ANIM,HIDEPIC_ANIM,SHAKE_ANIM,POOF_ANIM,SHOWPIC_ANIM
@@ -3006,7 +3006,7 @@ TossBallAnimation: ; 79e16 (1e:5e16)
ld [wAnimationID],a
jp PlayAnimation
-PlayApplyingAttackSound: ; 79e6a (1e:5e6a)
+PlayApplyingAttackSound:
; play a different sound depending if move is not very effective, neutral, or super-effective
; don't play any sound at all if move is ineffective
call WaitForSoundToFinish
diff --git a/engine/battle/bank_e_misc.asm b/engine/battle/bank_e_misc.asm
index dc766f23..33af6f6f 100755
--- a/engine/battle/bank_e_misc.asm
+++ b/engine/battle/bank_e_misc.asm
@@ -1,5 +1,5 @@
; formats a string at wMovesString that lists the moves at wMoves
-FormatMovesString: ; 39b87 (e:5b87)
+FormatMovesString:
ld hl, wMoves
ld de, wMovesString
ld b, $0
@@ -52,7 +52,7 @@ FormatMovesString: ; 39b87 (e:5b87)
ret
; XXX this is called in a few places, but it doesn't appear to do anything useful
-InitList: ; 39bd5 (e:5bd5)
+InitList:
ld a, [wInitListType]
cp INIT_ENEMYOT_LIST
jr nz, .notEnemy
@@ -103,7 +103,7 @@ InitList: ; 39bd5 (e:5bd5)
ret
; get species of mon e in list [wMonDataLocation] for LoadMonData
-GetMonSpecies: ; 39c37 (e:5c37)
+GetMonSpecies:
ld hl, wPartySpecies
ld a, [wMonDataLocation]
and a
diff --git a/engine/battle/battle_transitions.asm b/engine/battle/battle_transitions.asm
index 545273ee..9e02c56f 100644
--- a/engine/battle/battle_transitions.asm
+++ b/engine/battle/battle_transitions.asm
@@ -1,4 +1,4 @@
-BattleTransition: ; 7096d (1c:496d)
+BattleTransition:
ld a, 1
ld [H_AUTOBGTRANSFERENABLED], a
call Delay3
@@ -70,7 +70,7 @@ BattleTransition: ; 7096d (1c:496d)
; bit 0: set if trainer battle
; bit 1: set if enemy is at least 3 levels higher than player
; bit 2: set if dungeon map
-BattleTransitions: ; 709d2 (1c:49d2)
+BattleTransitions:
dw BattleTransition_DoubleCircle ; %000
dw BattleTransition_Spiral ; %001
dw BattleTransition_Circle ; %010
@@ -80,7 +80,7 @@ BattleTransitions: ; 709d2 (1c:49d2)
dw BattleTransition_VerticalStripes ; %110
dw BattleTransition_Split ; %111
-GetBattleTransitionID_WildOrTrainer: ; 709e2 (1c:49e2)
+GetBattleTransitionID_WildOrTrainer:
ld a, [wCurOpponent]
cp 200
jr nc, .trainer
@@ -90,7 +90,7 @@ GetBattleTransitionID_WildOrTrainer: ; 709e2 (1c:49e2)
set 0, c
ret
-GetBattleTransitionID_CompareLevels: ; 709ef (1c:49ef)
+GetBattleTransitionID_CompareLevels:
ld hl, wPartyMon1HP
.faintedLoop
ld a, [hli]
@@ -121,7 +121,7 @@ GetBattleTransitionID_CompareLevels: ; 709ef (1c:49ef)
; fails to recognize VICTORY_ROAD_2, VICTORY_ROAD_3, all ROCKET_HIDEOUT maps,
; MANSION_1, SEAFOAM_ISLANDS_[2-5], POWER_PLANT, DIGLETTS_CAVE
; and SILPH_CO_[9-11]F as dungeon maps
-GetBattleTransitionID_IsDungeonMap: ; 70a19 (1c:4a19)
+GetBattleTransitionID_IsDungeonMap:
ld a, [wCurMap]
ld e, a
ld hl, DungeonMaps1
@@ -153,7 +153,7 @@ GetBattleTransitionID_IsDungeonMap: ; 70a19 (1c:4a19)
; GetBattleTransitionID_IsDungeonMap checks if wCurMap
; is equal to one of these maps
-DungeonMaps1: ; 70a3f (1c:4a3f)
+DungeonMaps1:
db VIRIDIAN_FOREST
db ROCK_TUNNEL_1
db SEAFOAM_ISLANDS_1
@@ -162,7 +162,7 @@ DungeonMaps1: ; 70a3f (1c:4a3f)
; GetBattleTransitionID_IsDungeonMap checks if wCurMap
; is in between or equal to each pair of maps
-DungeonMaps2: ; 70a44 (1c:4a44)
+DungeonMaps2:
; all MT_MOON maps
db MT_MOON_1
db MT_MOON_3
@@ -181,17 +181,17 @@ DungeonMaps2: ; 70a44 (1c:4a44)
db UNKNOWN_DUNGEON_1
db $FF
-LoadBattleTransitionTile: ; 70a4d (1c:4a4d)
+LoadBattleTransitionTile:
ld hl, vChars1 + $7f0
ld de, BattleTransitionTile
lb bc, BANK(BattleTransitionTile), (BattleTransitionTileEnd - BattleTransitionTile) / $10
jp CopyVideoData
-BattleTransitionTile: ; 70a59 (1c:4a59)
+BattleTransitionTile:
INCBIN "gfx/battle_transition.2bpp"
BattleTransitionTileEnd:
-BattleTransition_BlackScreen: ; 70a69 (1c:4a69)
+BattleTransition_BlackScreen:
ld a, $ff
ld [rBGP], a
ld [rOBP0], a
@@ -202,7 +202,7 @@ BattleTransition_BlackScreen: ; 70a69 (1c:4a69)
; called regardless of mon levels, but does an
; outward spiral if enemy is at least 3 levels
; higher than player and does an inward spiral otherwise
-BattleTransition_Spiral: ; 70a72 (1c:4a72)
+BattleTransition_Spiral:
ld a, [wBattleTransitionSpiralDirection]
and a
jr z, .outwardSpiral
@@ -235,7 +235,7 @@ BattleTransition_Spiral: ; 70a72 (1c:4a72)
ld [wOutwardSpiralTileMapPointer], a
ret
-BattleTransition_InwardSpiral: ; 70aaa (1c:4aaa)
+BattleTransition_InwardSpiral:
ld a, 7
ld [wInwardSpiralUpdateScreenCounter], a
coord hl, 0, 0
@@ -265,7 +265,7 @@ BattleTransition_InwardSpiral: ; 70aaa (1c:4aaa)
jr nz, .loop
ret
-BattleTransition_InwardSpiral_: ; 70ae0 (1c:4ae0)
+BattleTransition_InwardSpiral_:
push bc
.loop
ld [hl], $ff
@@ -284,7 +284,7 @@ BattleTransition_InwardSpiral_: ; 70ae0 (1c:4ae0)
pop bc
ret
-BattleTransition_OutwardSpiral_: ; 70af9 (1c:4af9)
+BattleTransition_OutwardSpiral_:
ld bc, -SCREEN_WIDTH
ld de, SCREEN_WIDTH
ld a, [wOutwardSpiralTileMapPointer + 1]
@@ -352,7 +352,7 @@ BattleTransition_OutwardSpiral_: ; 70af9 (1c:4af9)
jr .done
FlashScreen:
-BattleTransition_FlashScreen_: ; 70b5d (1c:4b5d)
+BattleTransition_FlashScreen_:
ld hl, BattleTransition_FlashScreenPalettes
.loop
ld a, [hli]
@@ -367,12 +367,12 @@ BattleTransition_FlashScreen_: ; 70b5d (1c:4b5d)
jr nz, BattleTransition_FlashScreen_
ret
-BattleTransition_FlashScreenPalettes: ; 70b72 (1c:4b72)
+BattleTransition_FlashScreenPalettes:
db $F9,$FE,$FF,$FE,$F9,$E4,$90,$40,$00,$40,$90,$E4
db $01 ; terminator
; used for low level trainer dungeon battles
-BattleTransition_Shrink: ; 70b7f (1c:4b7f)
+BattleTransition_Shrink:
ld c, SCREEN_HEIGHT / 2
.loop
push bc
@@ -406,7 +406,7 @@ BattleTransition_Shrink: ; 70b7f (1c:4b7f)
jp DelayFrames
; used for high level trainer dungeon battles
-BattleTransition_Split: ; 70bca (1c:4bca)
+BattleTransition_Split:
ld c, SCREEN_HEIGHT / 2
xor a
ld [H_AUTOBGTRANSFERENABLED], a
@@ -437,7 +437,7 @@ BattleTransition_Split: ; 70bca (1c:4bca)
ld c, 10
jp DelayFrames
-BattleTransition_CopyTiles1: ; 70c12 (1c:4c12)
+BattleTransition_CopyTiles1:
ld a, c
ld [wBattleTransitionCopyTilesOffset], a
ld a, b
@@ -469,7 +469,7 @@ BattleTransition_CopyTiles1: ; 70c12 (1c:4c12)
jr nz, .loop2
ret
-BattleTransition_CopyTiles2: ; 70c3f (1c:4c3f)
+BattleTransition_CopyTiles2:
ld a, c
ld [wBattleTransitionCopyTilesOffset], a
ld a, b
@@ -519,7 +519,7 @@ BattleTransition_CopyTiles2: ; 70c3f (1c:4c3f)
ret
; used for high level wild dungeon battles
-BattleTransition_VerticalStripes: ; 70c7e (1c:4c7e)
+BattleTransition_VerticalStripes:
ld c, SCREEN_HEIGHT
coord hl, 0, 0
coord de, 1, 17
@@ -547,7 +547,7 @@ BattleTransition_VerticalStripes: ; 70c7e (1c:4c7e)
jr nz, .loop
jp BattleTransition_BlackScreen
-BattleTransition_VerticalStripes_: ; 70caa (1c:4caa)
+BattleTransition_VerticalStripes_:
ld c, SCREEN_WIDTH / 2
.loop
ld [hl], $ff
@@ -558,7 +558,7 @@ BattleTransition_VerticalStripes_: ; 70caa (1c:4caa)
ret
; used for low level wild dungeon battles
-BattleTransition_HorizontalStripes: ; 70cb4 (1c:4cb4)
+BattleTransition_HorizontalStripes:
ld c, SCREEN_WIDTH
coord hl, 0, 0
coord de, 19, 1
@@ -582,7 +582,7 @@ BattleTransition_HorizontalStripes: ; 70cb4 (1c:4cb4)
jr nz, .loop
jp BattleTransition_BlackScreen
-BattleTransition_HorizontalStripes_: ; 70cd8 (1c:4cd8)
+BattleTransition_HorizontalStripes_:
ld c, SCREEN_HEIGHT / 2
ld de, SCREEN_WIDTH * 2
.loop
@@ -595,7 +595,7 @@ BattleTransition_HorizontalStripes_: ; 70cd8 (1c:4cd8)
; used for high level wild non-dungeon battles
; makes one full circle around the screen
; by animating each half circle one at a time
-BattleTransition_Circle: ; 70ce4 (1c:4ce4)
+BattleTransition_Circle:
call BattleTransition_FlashScreen
lb bc, 0, SCREEN_WIDTH / 2
ld hl, BattleTransition_HalfCircle1
@@ -606,14 +606,14 @@ BattleTransition_Circle: ; 70ce4 (1c:4ce4)
call BattleTransition_Circle_Sub1
jp BattleTransition_BlackScreen
-BattleTransition_FlashScreen: ; 70cfd (1c:4cfd)
+BattleTransition_FlashScreen:
ld b, $3
call BattleTransition_FlashScreen_
xor a
ld [H_AUTOBGTRANSFERENABLED], a
ret
-BattleTransition_Circle_Sub1: ; 70d06 (1c:4d06)
+BattleTransition_Circle_Sub1:
push bc
push hl
ld a, b
@@ -627,7 +627,7 @@ BattleTransition_Circle_Sub1: ; 70d06 (1c:4d06)
jr nz, BattleTransition_Circle_Sub1
ret
-BattleTransition_TransferDelay3: ; 70d19 (1c:4d19)
+BattleTransition_TransferDelay3:
ld a, 1
ld [H_AUTOBGTRANSFERENABLED], a
call Delay3
@@ -638,7 +638,7 @@ BattleTransition_TransferDelay3: ; 70d19 (1c:4d19)
; used for low level wild non-dungeon battles
; makes two half circles around the screen
; by animating both half circles at the same time
-BattleTransition_DoubleCircle: ; 70d24 (1c:4d24)
+BattleTransition_DoubleCircle:
call BattleTransition_FlashScreen
ld c, SCREEN_WIDTH / 2
ld hl, BattleTransition_HalfCircle1
@@ -666,7 +666,7 @@ BattleTransition_DoubleCircle: ; 70d24 (1c:4d24)
jr nz, .loop
jp BattleTransition_BlackScreen
-BattleTransition_Circle_Sub2: ; 70d50 (1c:4d50)
+BattleTransition_Circle_Sub2:
ld [wBattleTransitionCircleScreenQuadrantY], a
ld a, [hli]
ld [wBattleTransitionCircleScreenQuadrantX], a
@@ -679,7 +679,7 @@ BattleTransition_Circle_Sub2: ; 70d50 (1c:4d50)
ld l, a
jp BattleTransition_Circle_Sub3
-BattleTransition_HalfCircle1: ; 70d61 (1c:4d61)
+BattleTransition_HalfCircle1:
db $01
dw BattleTransition_CircleData1
dwCoord 18, 6
@@ -720,7 +720,7 @@ BattleTransition_HalfCircle1: ; 70d61 (1c:4d61)
dw BattleTransition_CircleData1
dwCoord 1, 6
-BattleTransition_HalfCircle2: ; 70d93 (1c:4d93)
+BattleTransition_HalfCircle2:
db $00
dw BattleTransition_CircleData1
dwCoord 1, 11
@@ -761,7 +761,7 @@ BattleTransition_HalfCircle2: ; 70d93 (1c:4d93)
dw BattleTransition_CircleData1
dwCoord 18, 11
-BattleTransition_Circle_Sub3: ; 70dc5 (1c:4dc5)
+BattleTransition_Circle_Sub3:
push hl
ld a, [de]
ld c, a
@@ -806,17 +806,17 @@ BattleTransition_Circle_Sub3: ; 70dc5 (1c:4dc5)
jr nz, .loop2
jr BattleTransition_Circle_Sub3
-BattleTransition_CircleData1: ; 70dfe (1c:4dfe)
+BattleTransition_CircleData1:
db $02,$03,$05,$04,$09,$FF
-BattleTransition_CircleData2: ; 70e04 (1c:4e04)
+BattleTransition_CircleData2:
db $01,$01,$02,$02,$04,$02,$04,$02,$03,$FF
-BattleTransition_CircleData3: ; 70e0e (1c:4e0e)
+BattleTransition_CircleData3:
db $02,$01,$03,$01,$04,$01,$04,$01,$04,$01,$03,$01,$02,$01,$01,$01,$01,$FF
-BattleTransition_CircleData4: ; 70e20 (1c:4e20)
+BattleTransition_CircleData4:
db $04,$01,$04,$00,$03,$01,$03,$00,$02,$01,$02,$00,$01,$FF
-BattleTransition_CircleData5: ; 70e2e (1c:4e2e)
+BattleTransition_CircleData5:
db $04,$00,$03,$00,$03,$00,$02,$00,$02,$00,$01,$00,$01,$00,$01,$FF
diff --git a/engine/battle/common_text.asm b/engine/battle/common_text.asm
index 476284f0..3d46c947 100644
--- a/engine/battle/common_text.asm
+++ b/engine/battle/common_text.asm
@@ -1,4 +1,4 @@
-PrintBeginningBattleText: ; 58d99 (16:4d99)
+PrintBeginningBattleText:
ld a, [wIsInBattle]
dec a
jr nz, .trainerBattle
@@ -70,31 +70,31 @@ PrintBeginningBattleText: ; 58d99 (16:4d99)
.done
ret
-WildMonAppearedText: ; 58e3b (16:4e3b)
+WildMonAppearedText:
TX_FAR _WildMonAppearedText
db "@"
-HookedMonAttackedText: ; 58e40 (16:4e40)
+HookedMonAttackedText:
TX_FAR _HookedMonAttackedText
db "@"
-EnemyAppearedText: ; 58e45 (16:4e45)
+EnemyAppearedText:
TX_FAR _EnemyAppearedText
db "@"
-TrainerWantsToFightText: ; 58e4a (16:4e4a)
+TrainerWantsToFightText:
TX_FAR _TrainerWantsToFightText
db "@"
-UnveiledGhostText: ; 58e4f (16:4e4f)
+UnveiledGhostText:
TX_FAR _UnveiledGhostText
db "@"
-GhostCantBeIDdText: ; 58e54 (16:4e54)
+GhostCantBeIDdText:
TX_FAR _GhostCantBeIDdText
db "@"
-PrintSendOutMonMessage: ; 58e59 (16:4e59)
+PrintSendOutMonMessage:
ld hl, wEnemyMonHP
ld a, [hli]
or [hl]
@@ -137,22 +137,22 @@ PrintSendOutMonMessage: ; 58e59 (16:4e59)
.printText
jp PrintText
-GoText: ; 58eae (16:4eae)
+GoText:
TX_FAR _GoText
TX_ASM
jr PrintPlayerMon1Text
-DoItText: ; 58eb5 (16:4eb5)
+DoItText:
TX_FAR _DoItText
TX_ASM
jr PrintPlayerMon1Text
-GetmText: ; 58ebc (16:4ebc)
+GetmText:
TX_FAR _GetmText
TX_ASM
jr PrintPlayerMon1Text
-EnemysWeakText: ; 58ec3 (16:4ec3)
+EnemysWeakText:
TX_FAR _EnemysWeakText
TX_ASM
@@ -160,15 +160,15 @@ PrintPlayerMon1Text:
ld hl, PlayerMon1Text
ret
-PlayerMon1Text: ; 58ecc (16:4ecc)
+PlayerMon1Text:
TX_FAR _PlayerMon1Text
db "@"
-RetreatMon: ; 58ed1 (16:4ed1)
+RetreatMon:
ld hl, PlayerMon2Text
jp PrintText
-PlayerMon2Text: ; 58ed7 (16:4ed7)
+PlayerMon2Text:
TX_FAR _PlayerMon2Text
TX_ASM
push de
@@ -219,25 +219,25 @@ PlayerMon2Text: ; 58ed7 (16:4ed7)
ld hl, GoodText ; HP went down 70% or more
ret
-EnoughText: ; 58f25 (16:4f25)
+EnoughText:
TX_FAR _EnoughText
TX_ASM
jr PrintComeBackText
-OKExclamationText: ; 58f2c (16:4f2c)
+OKExclamationText:
TX_FAR _OKExclamationText
TX_ASM
jr PrintComeBackText
-GoodText: ; 58f33 (16:4f33)
+GoodText:
TX_FAR _GoodText
TX_ASM
jr PrintComeBackText
-PrintComeBackText: ; 58f3a (16:4f3a)
+PrintComeBackText:
ld hl, ComeBackText
ret
-ComeBackText: ; 58f3e (16:4f3e)
+ComeBackText:
TX_FAR _ComeBackText
db "@"
diff --git a/engine/battle/core.asm b/engine/battle/core.asm
index fce78717..f8053a9e 100755
--- a/engine/battle/core.asm
+++ b/engine/battle/core.asm
@@ -1,7 +1,7 @@
BattleCore:
; These are move effects (second value from the Moves table in bank $E).
-ResidualEffects1: ; 3c000 (f:4000)
+ResidualEffects1:
; most non-side effects
db CONVERSION_EFFECT
db HAZE_EFFECT
@@ -20,13 +20,13 @@ ResidualEffects1: ; 3c000 (f:4000)
db LEECH_SEED_EFFECT
db SPLASH_EFFECT
db -1
-SetDamageEffects: ; 3c011 (f:4011)
+SetDamageEffects:
; moves that do damage but not through normal calculations
; e.g., Super Fang, Psywave
db SUPER_FANG_EFFECT
db SPECIAL_DAMAGE_EFFECT
db -1
-ResidualEffects2: ; 3c014 (f:4014)
+ResidualEffects2:
; non-side effects not included in ResidualEffects1
; stat-affecting moves, sleep-inflicting moves, and Bide
; e.g., Meditate, Bide, Hypnosis
@@ -58,7 +58,7 @@ ResidualEffects2: ; 3c014 (f:4014)
db ACCURACY_DOWN2_EFFECT
db EVASION_DOWN2_EFFECT
db -1
-AlwaysHappenSideEffects: ; 3c030 (f:4030)
+AlwaysHappenSideEffects:
; Attacks that aren't finished after they faint the opponent.
db DRAIN_HP_EFFECT
db EXPLODE_EFFECT
@@ -71,7 +71,7 @@ AlwaysHappenSideEffects: ; 3c030 (f:4030)
db TWINEEDLE_EFFECT
db RAGE_EFFECT
db -1
-SpecialEffects: ; 3c03b (f:403b)
+SpecialEffects:
; Effects from arrays 2, 4, and 5B, minus Twineedle and Rage.
; Includes all effects that do not need to be called at the end of
; ExecutePlayerMove (or ExecuteEnemyMove), because they have already been handled
@@ -90,13 +90,13 @@ SpecialEffects: ; 3c03b (f:403b)
db JUMP_KICK_EFFECT
db RECOIL_EFFECT
; fallthrough to Next EffectsArray
-SpecialEffectsCont: ; 3c049 (f:4049)
+SpecialEffectsCont:
; damaging moves whose effect is executed prior to damage calculation
db THRASH_PETAL_DANCE_EFFECT
db TRAPPING_EFFECT
db -1
-SlidePlayerAndEnemySilhouettesOnScreen: ; 3c04c (f:404c)
+SlidePlayerAndEnemySilhouettesOnScreen:
call LoadPlayerBackPic
ld a, MESSAGE_BOX ; the usual text box at the bottom of the screen
ld [wTextBoxID], a
@@ -193,7 +193,7 @@ SlidePlayerAndEnemySilhouettesOnScreen: ; 3c04c (f:404c)
; the lower of the player's pic (his body) is part of the background, but his head is a sprite
; the reason for this is that it shares Y coordinates with the lower part of the enemy pic, so background scrolling wouldn't work for both pics
; instead, the enemy pic is part of the background and uses the scroll register, while the player's head is a sprite and is slid by changing its X coordinates in a loop
-SlidePlayerHeadLeft: ; 3c0ff (f:40ff)
+SlidePlayerHeadLeft:
push bc
ld hl, wOAMBuffer + $01
ld c, $15 ; number of OAM entries
@@ -207,7 +207,7 @@ SlidePlayerHeadLeft: ; 3c0ff (f:40ff)
pop bc
ret
-SetScrollXForSlidingPlayerBodyLeft: ; 3c110 (f:4110)
+SetScrollXForSlidingPlayerBodyLeft:
ld a, [rLY]
cp l
jr nz, SetScrollXForSlidingPlayerBodyLeft
@@ -219,7 +219,7 @@ SetScrollXForSlidingPlayerBodyLeft: ; 3c110 (f:4110)
jr z, .loop
ret
-StartBattle: ; 3c11e (f:411e)
+StartBattle:
xor a
ld [wPartyGainExpFlags], a
ld [wPartyFoughtCurrentEnemyFlags], a
@@ -341,7 +341,7 @@ StartBattle: ; 3c11e (f:411e)
jr MainInBattleLoop
; wild mon or link battle enemy ran from battle
-EnemyRan: ; 3c202 (f:4202)
+EnemyRan:
call LoadScreenTilesFromBuffer1
ld a, [wLinkState]
cp LINK_STATE_BATTLING
@@ -359,15 +359,15 @@ EnemyRan: ; 3c202 (f:4202)
ld [H_WHOSETURN], a
jpab AnimationSlideEnemyMonOff
-WildRanText: ; 3c229 (f:4229)
+WildRanText:
TX_FAR _WildRanText
db "@"
-EnemyRanText: ; 3c22e (f:422e)
+EnemyRanText:
TX_FAR _EnemyRanText
db "@"
-MainInBattleLoop: ; 3c233 (f:4233)
+MainInBattleLoop:
call ReadPlayerMonCurHPAndStatus
ld hl, wBattleMonHP
ld a, [hli]
@@ -557,7 +557,7 @@ MainInBattleLoop: ; 3c233 (f:4233)
call CheckNumAttacksLeft
jp MainInBattleLoop
-HandlePoisonBurnLeechSeed: ; 3c3bd (f:43bd)
+HandlePoisonBurnLeechSeed:
ld hl, wBattleMonHP
ld de, wBattleMonStatus
ld a, [H_WHOSETURN]
@@ -621,15 +621,15 @@ HandlePoisonBurnLeechSeed: ; 3c3bd (f:43bd)
xor a
ret
-HurtByPoisonText: ; 3c42e (f:442e)
+HurtByPoisonText:
TX_FAR _HurtByPoisonText
db "@"
-HurtByBurnText: ; 3c433 (f:4433)
+HurtByBurnText:
TX_FAR _HurtByBurnText
db "@"
-HurtByLeechSeedText: ; 3c438 (f:4438)
+HurtByLeechSeedText:
TX_FAR _HurtByLeechSeedText
db "@"
@@ -637,7 +637,7 @@ HurtByLeechSeedText: ; 3c438 (f:4438)
; note that the toxic ticks are considered even if the damage is not poison (hence the Leech Seed glitch)
; hl: HP pointer
; bc (out): total damage
-HandlePoisonBurnLeechSeed_DecreaseOwnHP: ; 3c43d (f:443d)
+HandlePoisonBurnLeechSeed_DecreaseOwnHP:
push hl
push hl
ld bc, $e ; skip to max HP
@@ -705,7 +705,7 @@ HandlePoisonBurnLeechSeed_DecreaseOwnHP: ; 3c43d (f:443d)
; adds bc to enemy HP
; bc isn't updated if HP substracted was capped to prevent overkill
-HandlePoisonBurnLeechSeed_IncreaseEnemyHP: ; 3c4a3 (f:44a3)
+HandlePoisonBurnLeechSeed_IncreaseEnemyHP:
push hl
ld hl, wEnemyMonMaxHP
ld a, [H_WHOSETURN]
@@ -755,7 +755,7 @@ HandlePoisonBurnLeechSeed_IncreaseEnemyHP: ; 3c4a3 (f:44a3)
pop hl
ret
-UpdateCurMonHPBar: ; 3c4f6 (f:44f6)
+UpdateCurMonHPBar:
coord hl, 10, 9 ; tile pointer to player HP bar
ld a, [H_WHOSETURN]
and a
@@ -770,7 +770,7 @@ UpdateCurMonHPBar: ; 3c4f6 (f:44f6)
pop bc
ret
-CheckNumAttacksLeft: ; 3c50f (f:450f)
+CheckNumAttacksLeft:
ld a, [wPlayerNumAttacksLeft]
and a
jr nz, .checkEnemy
@@ -786,7 +786,7 @@ CheckNumAttacksLeft: ; 3c50f (f:450f)
res UsingTrappingMove, [hl] ; enemy not using multi-turn attack like wrap any more
ret
-HandleEnemyMonFainted: ; 3c525 (f:4525)
+HandleEnemyMonFainted:
xor a
ld [wInHandlePlayerMonFainted], a
call FaintEnemyPokemon
@@ -949,7 +949,7 @@ EnemyMonFaintedText: ; 0x3c63e
TX_FAR _EnemyMonFaintedText
db "@"
-EndLowHealthAlarm: ; 3c643 (f:4643)
+EndLowHealthAlarm:
; This function is called when the player has the won the battle. It turns off
; the low health alarm and prevents it from reactivating until the next battle.
xor a
@@ -959,7 +959,7 @@ EndLowHealthAlarm: ; 3c643 (f:4643)
ld [wLowHealthAlarmDisabled], a ; prevent it from reactivating
ret
-AnyEnemyPokemonAliveCheck: ; 3c64f (f:464f)
+AnyEnemyPokemonAliveCheck:
ld a, [wEnemyPartyCount]
ld b, a
xor a
@@ -977,7 +977,7 @@ AnyEnemyPokemonAliveCheck: ; 3c64f (f:464f)
ret
; stores whether enemy ran in Z flag
-ReplaceFaintedEnemyMon: ; 3c664 (f:4664)
+ReplaceFaintedEnemyMon:
ld hl, wEnemyHPBarColor
ld e, $30
call GetBattleHealthBarColor
@@ -1000,7 +1000,7 @@ ReplaceFaintedEnemyMon: ; 3c664 (f:4664)
inc a ; reset Z flag
ret
-TrainerBattleVictory: ; 3c696 (f:4696)
+TrainerBattleVictory:
call EndLowHealthAlarm
ld b, MUSIC_DEFEATED_GYM_LEADER
ld a, [wGymLeaderNo]
@@ -1036,15 +1036,15 @@ TrainerBattleVictory: ; 3c696 (f:4696)
ld c, $3
predef_jump AddBCDPredef
-MoneyForWinningText: ; 3c6e4 (f:46e4)
+MoneyForWinningText:
TX_FAR _MoneyForWinningText
db "@"
-TrainerDefeatedText: ; 3c6e9 (f:46e9)
+TrainerDefeatedText:
TX_FAR _TrainerDefeatedText
db "@"
-PlayBattleVictoryMusic: ; 3c6ee (f:46ee)
+PlayBattleVictoryMusic:
push af
ld a, $ff
ld [wNewSoundID], a
@@ -1054,7 +1054,7 @@ PlayBattleVictoryMusic: ; 3c6ee (f:46ee)
call PlayMusic
jp Delay3
-HandlePlayerMonFainted: ; 3c700 (f:4700)
+HandlePlayerMonFainted:
ld a, 1
ld [wInHandlePlayerMonFainted], a
call RemoveFaintedPlayerMon
@@ -1088,7 +1088,7 @@ HandlePlayerMonFainted: ; 3c700 (f:4700)
jp MainInBattleLoop
; resets flags, slides mon's pic down, plays cry, and prints fainted message
-RemoveFaintedPlayerMon: ; 3c741 (f:4741)
+RemoveFaintedPlayerMon:
ld a, [wPlayerMonNumber]
ld c, a
ld hl, wPartyGainExpFlags
@@ -1131,13 +1131,13 @@ RemoveFaintedPlayerMon: ; 3c741 (f:4741)
ld hl, PlayerMonFaintedText
jp PrintText
-PlayerMonFaintedText: ; 3c796 (f:4796)
+PlayerMonFaintedText:
TX_FAR _PlayerMonFaintedText
db "@"
; asks if you want to use next mon
; stores whether you ran in C flag
-DoUseNextMonDialogue: ; 3c79b (f:479b)
+DoUseNextMonDialogue:
call PrintEmptyString
call SaveScreenTilesToBuffer1
ld a, [wIsInBattle]
@@ -1165,13 +1165,13 @@ DoUseNextMonDialogue: ; 3c79b (f:479b)
ld de, wEnemyMonSpeed
jp TryRunningFromBattle
-UseNextMonText: ; 3c7d3 (f:47d3)
+UseNextMonText:
TX_FAR _UseNextMonText
db "@"
; choose next player mon to send out
; stores whether enemy mon has no HP left in Z flag
-ChooseNextMon: ; 3c7d8 (f:47d8)
+ChooseNextMon:
ld a, BATTLE_PARTY_MENU
ld [wPartyMenuTypeOrMessageID], a
call DisplayPartyMenu
@@ -1217,7 +1217,7 @@ ChooseNextMon: ; 3c7d8 (f:47d8)
; called when player is out of usable mons.
; prints approriate lose message, sets carry flag if player blacked out (special case for initial rival fight)
-HandlePlayerBlackOut: ; 3c837 (f:4837)
+HandlePlayerBlackOut:
ld a, [wLinkState]
cp LINK_STATE_BATTLING
jr z, .notSony1Battle
@@ -1252,21 +1252,21 @@ HandlePlayerBlackOut: ; 3c837 (f:4837)
scf
ret
-Sony1WinText: ; 3c884 (f:4884)
+Sony1WinText:
TX_FAR _Sony1WinText
db "@"
-PlayerBlackedOutText2: ; 3c889 (f:4889)
+PlayerBlackedOutText2:
TX_FAR _PlayerBlackedOutText2
db "@"
-LinkBattleLostText: ; 3c88e (f:488e)
+LinkBattleLostText:
TX_FAR _LinkBattleLostText
db "@"
; slides pic of fainted mon downwards until it disappears
; bug: when this is called, [H_AUTOBGTRANSFERENABLED] is non-zero, so there is screen tearing
-SlideDownFaintedMonPic: ; 3c893 (f:4893)
+SlideDownFaintedMonPic:
ld a, [wd730]
push af
set 6, a
@@ -1312,14 +1312,14 @@ SlideDownFaintedMonPic: ; 3c893 (f:4893)
ld [wd730], a
ret
-SevenSpacesText: ; 3c8d7 (f:48d7)
+SevenSpacesText:
db " @"
; slides the player or enemy trainer off screen
; a is the number of tiles to slide it horizontally (always 9 for the player trainer or 8 for the enemy trainer)
; if a is 8, the slide is to the right, else it is to the left
; bug: when this is called, [H_AUTOBGTRANSFERENABLED] is non-zero, so there is screen tearing
-SlideTrainerPicOffScreen: ; 3c8df (f:48df)
+SlideTrainerPicOffScreen:
ld [hSlideAmount], a
ld c, a
.slideStepLoop ; each iteration, the trainer pic is slid one tile left/right
@@ -1360,7 +1360,7 @@ SlideTrainerPicOffScreen: ; 3c8df (f:48df)
ret
; send out a trainer's mon
-EnemySendOut: ; 3c90e (f:490e)
+EnemySendOut:
ld hl,wPartyGainExpFlags
xor a
ld [hl],a
@@ -1376,7 +1376,7 @@ EnemySendOut: ; 3c90e (f:490e)
predef FlagActionPredef
; don't change wPartyGainExpFlags or wPartyFoughtCurrentEnemyFlags
-EnemySendOutFirstMon: ; 3c92a (f:492a)
+EnemySendOutFirstMon:
xor a
ld hl,wEnemyStatsToDouble ; clear enemy statuses
ld [hli],a
@@ -1529,17 +1529,17 @@ EnemySendOutFirstMon: ; 3c92a (f:492a)
call SaveScreenTilesToBuffer1
jp SwitchPlayerMon
-TrainerAboutToUseText: ; 3ca79 (f:4a79)
+TrainerAboutToUseText:
TX_FAR _TrainerAboutToUseText
db "@"
-TrainerSentOutText: ; 3ca7e (f:4a7e)
+TrainerSentOutText:
TX_FAR _TrainerSentOutText
db "@"
; tests if the player has any pokemon that are not fainted
; sets d = 0 if all fainted, d != 0 if some mons are still alive
-AnyPartyAlive: ; 3ca83 (f:4a83)
+AnyPartyAlive:
ld a, [wPartyCount]
ld e, a
xor a
@@ -1557,7 +1557,7 @@ AnyPartyAlive: ; 3ca83 (f:4a83)
; tests if player mon has fainted
; stores whether mon has fainted in Z flag
-HasMonFainted: ; 3ca97 (f:4a97)
+HasMonFainted:
ld a, [wWhichPokemon]
ld hl, wPartyMon1HP
ld bc, wPartyMon2 - wPartyMon1
@@ -1574,13 +1574,13 @@ HasMonFainted: ; 3ca97 (f:4a97)
xor a
ret
-NoWillText: ; 3cab4 (f:4ab4)
+NoWillText:
TX_FAR _NoWillText
db "@"
; try to run from battle (hl = player speed, de = enemy speed)
; stores whether the attempt was successful in carry flag
-TryRunningFromBattle: ; 3cab9 (f:4ab9)
+TryRunningFromBattle:
call IsGhostBattle
jp z, .canEscape ; jump if it's a ghost battle
ld a, [wBattleType]
@@ -1697,20 +1697,20 @@ TryRunningFromBattle: ; 3cab9 (f:4ab9)
scf ; set carry
ret
-CantEscapeText: ; 3cb97 (f:4b97)
+CantEscapeText:
TX_FAR _CantEscapeText
db "@"
-NoRunningText: ; 3cb9c (f:4b9c)
+NoRunningText:
TX_FAR _NoRunningText
db "@"
-GotAwayText: ; 3cba1 (f:4ba1)
+GotAwayText:
TX_FAR _GotAwayText
db "@"
; copies from party data to battle mon data when sending out a new player mon
-LoadBattleMonFromParty: ; 3cba6 (f:4ba6)
+LoadBattleMonFromParty:
ld a, [wWhichPokemon]
ld bc, wPartyMon2 - wPartyMon1
ld hl, wPartyMon1Species
@@ -1754,7 +1754,7 @@ LoadBattleMonFromParty: ; 3cba6 (f:4ba6)
ret
; copies from enemy party data to current enemy mon data when sending out a new enemy mon
-LoadEnemyMonFromParty: ; 3cc13 (f:4c13)
+LoadEnemyMonFromParty:
ld a, [wWhichPokemon]
ld bc, wEnemyMon2 - wEnemyMon1
ld hl, wEnemyMons
@@ -1807,7 +1807,7 @@ LoadEnemyMonFromParty: ; 3cc13 (f:4c13)
ld [wEnemyMonPartyPos], a
ret
-SendOutMon: ; 3cc91 (f:4c91)
+SendOutMon:
callab PrintSendOutMonMessage
ld hl, wEnemyMonHP
ld a, [hli]
@@ -1853,7 +1853,7 @@ SendOutMon: ; 3cc91 (f:4c91)
jp SaveScreenTilesToBuffer1
; show 2 stages of the player mon getting smaller before disappearing
-AnimateRetreatingPlayerMon: ; 3ccfa (f:4cfa)
+AnimateRetreatingPlayerMon:
coord hl, 1, 5
lb bc, 7, 7
call ClearScreenArea
@@ -1883,7 +1883,7 @@ AnimateRetreatingPlayerMon: ; 3ccfa (f:4cfa)
jp ClearScreenArea
; reads player's current mon's HP into wBattleMonHP
-ReadPlayerMonCurHPAndStatus: ; 3cd43 (f:4d43)
+ReadPlayerMonCurHPAndStatus:
ld a, [wPlayerMonNumber]
ld hl, wPartyMon1HP
ld bc, wPartyMon2 - wPartyMon1
@@ -1894,11 +1894,11 @@ ReadPlayerMonCurHPAndStatus: ; 3cd43 (f:4d43)
ld bc, $4 ; 2 bytes HP, 1 byte unknown (unused?), 1 byte status
jp CopyData
-DrawHUDsAndHPBars: ; 3cd5a (f:4d5a)
+DrawHUDsAndHPBars:
call DrawPlayerHUDAndHPBar
jp DrawEnemyHUDAndHPBar
-DrawPlayerHUDAndHPBar: ; 3cd60 (f:4d60)
+DrawPlayerHUDAndHPBar:
xor a
ld [H_AUTOBGTRANSFERENABLED], a
coord hl, 9, 7
@@ -1959,7 +1959,7 @@ DrawPlayerHUDAndHPBar: ; 3cd60 (f:4d60)
set 7, [hl] ;enable low health alarm
ret
-DrawEnemyHUDAndHPBar: ; 3cdec (f:4dec)
+DrawEnemyHUDAndHPBar:
xor a
ld [H_AUTOBGTRANSFERENABLED], a
coord hl, 0, 0
@@ -2049,7 +2049,7 @@ DrawEnemyHUDAndHPBar: ; 3cdec (f:4dec)
ld [H_AUTOBGTRANSFERENABLED], a
ld hl, wEnemyHPBarColor
-GetBattleHealthBarColor: ; 3ce90 (f:4e90)
+GetBattleHealthBarColor:
ld b, [hl]
call GetHealthBarColor
ld a, [hl]
@@ -2063,7 +2063,7 @@ GetBattleHealthBarColor: ; 3ce90 (f:4e90)
; (i.e. for names longer than 4 letters)
; if the name is 3 or 4 letters long, it is printed 1 space more to the right than usual
; (i.e. for names longer than 4 letters)
-CenterMonName: ; 3ce9c (f:4e9c)
+CenterMonName:
push de
inc hl
inc hl
@@ -2084,7 +2084,7 @@ CenterMonName: ; 3ce9c (f:4e9c)
pop de
ret
-DisplayBattleMenu: ; 3ceb3 (f:4eb3)
+DisplayBattleMenu:
call LoadScreenTilesFromBuffer1 ; restore saved screen
ld a, [wBattleType]
and a
@@ -2498,7 +2498,7 @@ PartyMenuOrRockOrRun:
call GBPalNormal
; fall through to SwitchPlayerMon
-SwitchPlayerMon: ; 3d1ba (f:51ba)
+SwitchPlayerMon:
callab RetreatMon
ld c, 50
call DelayFrames
@@ -2521,11 +2521,11 @@ SwitchPlayerMon: ; 3d1ba (f:51ba)
and a
ret
-AlreadyOutText: ; 3d1f5 (f:51f5)
+AlreadyOutText:
TX_FAR _AlreadyOutText
db "@"
-BattleMenu_RunWasSelected: ; 3d1fa (f:51fa)
+BattleMenu_RunWasSelected:
call LoadScreenTilesFromBuffer1
ld a, $3
ld [wCurrentMenuItem], a
@@ -2540,7 +2540,7 @@ BattleMenu_RunWasSelected: ; 3d1fa (f:51fa)
ret nz ; return if the player couldn't escape
jp DisplayBattleMenu
-MoveSelectionMenu: ; 3d219 (f:5219)
+MoveSelectionMenu:
ld a, [wMoveMenuType]
dec a
jr z, .mimicmenu
@@ -2658,7 +2658,7 @@ MoveSelectionMenu: ; 3d219 (f:5219)
ld [hl], a
; fallthrough
-SelectMenuItem: ; 3d2fe (f:52fe)
+SelectMenuItem:
ld a, [wMoveMenuType]
and a
jr z, .battleselect
@@ -2753,18 +2753,18 @@ SelectMenuItem: ; 3d2fe (f:52fe)
call LoadScreenTilesFromBuffer1
jp MoveSelectionMenu
-MoveNoPPText: ; 3d3ae (f:53ae)
+MoveNoPPText:
TX_FAR _MoveNoPPText
db "@"
-MoveDisabledText: ; 3d3b3 (f:53b3)
+MoveDisabledText:
TX_FAR _MoveDisabledText
db "@"
-WhichTechniqueString: ; 3d3b8 (f:53b8)
+WhichTechniqueString:
db "WHICH TECHNIQUE?@"
-CursorUp: ; 3d3c9 (f:53c9)
+CursorUp:
ld a, [wCurrentMenuItem]
and a
jp nz, SelectMenuItem
@@ -2774,7 +2774,7 @@ CursorUp: ; 3d3c9 (f:53c9)
ld [wCurrentMenuItem], a
jp SelectMenuItem
-CursorDown: ; 3d3dd (f:53dd)
+CursorDown:
ld a, [wCurrentMenuItem]
ld b, a
ld a, [wNumMovesMinusOne]
@@ -2787,7 +2787,7 @@ CursorDown: ; 3d3dd (f:53dd)
ld [wCurrentMenuItem], a
jp SelectMenuItem
-AnyMoveToSelect: ; 3d3f5 (f:53f5)
+AnyMoveToSelect:
; return z and Struggle as the selected move if all moves have 0 PP and/or are disabled
ld a, STRUGGLE
ld [wPlayerSelectedMove], a
@@ -2830,11 +2830,11 @@ AnyMoveToSelect: ; 3d3f5 (f:53f5)
xor a
ret
-NoMovesLeftText: ; 3d430 (f:5430)
+NoMovesLeftText:
TX_FAR _NoMovesLeftText
db "@"
-SwapMovesInMenu: ; 3d435 (f:5435)
+SwapMovesInMenu:
ld a, [wMenuItemToSwap]
and a
jr z, .noMenuItemSelected
@@ -2910,7 +2910,7 @@ SwapMovesInMenu: ; 3d435 (f:5435)
ld [wMenuItemToSwap], a ; select the current menu item for swapping
jp MoveSelectionMenu
-PrintMenuItem: ; 3d4b6 (f:54b6)
+PrintMenuItem:
xor a
ld [H_AUTOBGTRANSFERENABLED], a
coord hl, 0, 8
@@ -2981,13 +2981,13 @@ PrintMenuItem: ; 3d4b6 (f:54b6)
ld [H_AUTOBGTRANSFERENABLED], a
jp Delay3
-DisabledText: ; 3d555 (f:5555)
+DisabledText:
db "disabled!@"
-TypeText: ; 3d55f (f:555f)
+TypeText:
db "TYPE@"
-SelectEnemyMove: ; 3d564 (f:5564)
+SelectEnemyMove:
ld a, [wLinkState]
sub LINK_STATE_BATTLING
jr nz, .noLinkBattle
@@ -3080,7 +3080,7 @@ SelectEnemyMove: ; 3d564 (f:5564)
jr .done
; this appears to exchange data with the other gameboy during link battles
-LinkBattleExchangeData: ; 3d605 (f:5605)
+LinkBattleExchangeData:
ld a, $ff
ld [wSerialExchangeNybbleReceiveData], a
ld a, [wPlayerMoveListIndex]
@@ -3128,7 +3128,7 @@ LinkBattleExchangeData: ; 3d605 (f:5605)
jr nz, .syncLoop3
ret
-ExecutePlayerMove: ; 3d65e (f:565e)
+ExecutePlayerMove:
xor a
ld [H_WHOSETURN], a ; set player's turn
ld a, [wPlayerSelectedMove]
@@ -3156,7 +3156,7 @@ ExecutePlayerMove: ; 3d65e (f:565e)
call CheckForDisobedience
jp z, ExecutePlayerMoveDone
-CheckIfPlayerNeedsToChargeUp: ; 3d69a (f:569a)
+CheckIfPlayerNeedsToChargeUp:
ld a, [wPlayerMoveEffect]
cp CHARGE_EFFECT
jp z, JumpMoveEffect
@@ -3165,13 +3165,13 @@ CheckIfPlayerNeedsToChargeUp: ; 3d69a (f:569a)
jr PlayerCanExecuteMove
; in-battle stuff
-PlayerCanExecuteChargingMove: ; 3d6a9 (f:56a9)
+PlayerCanExecuteChargingMove:
ld hl,wPlayerBattleStatus1
res ChargingUp,[hl] ; reset charging up and invulnerability statuses if mon was charging up for an attack
; being fully paralyzed or hurting oneself in confusion removes charging up status
; resulting in the Pokemon being invulnerable for the whole battle
res Invulnerable,[hl]
-PlayerCanExecuteMove: ; 3d6b0 (f:56b0)
+PlayerCanExecuteMove:
call PrintMonName1Text
ld hl,DecrementPP
ld de,wPlayerSelectedMove ; pointer to the move just used
@@ -3188,7 +3188,7 @@ PlayerCanExecuteMove: ; 3d6b0 (f:56b0)
ld de,1
call IsInArray
call c,JumpMoveEffect ; execute the effects of SpecialEffectsCont moves (e.g. Wrap, Thrash) but don't skip anything
-PlayerCalcMoveDamage: ; 3d6dc (f:56dc)
+PlayerCalcMoveDamage:
ld a,[wPlayerMoveEffect]
ld hl,SetDamageEffects
ld de,1
@@ -3325,17 +3325,17 @@ MirrorMoveCheck
; Responsible for executing Twineedle's second side effect (poison).
jp ExecutePlayerMoveDone
-MultiHitText: ; 3d805 (f:5805)
+MultiHitText:
TX_FAR _MultiHitText
db "@"
-ExecutePlayerMoveDone: ; 3d80a (f:580a)
+ExecutePlayerMoveDone:
xor a
ld [wActionResultOrTookBattleTurn],a
ld b,1
ret
-PrintGhostText: ; 3d811 (f:5811)
+PrintGhostText:
; print the ghost battle messages
call IsGhostBattle
ret nz
@@ -3355,15 +3355,15 @@ PrintGhostText: ; 3d811 (f:5811)
xor a
ret
-ScaredText: ; 3d830 (f:5830)
+ScaredText:
TX_FAR _ScaredText
db "@"
-GetOutText: ; 3d835 (f:5835)
+GetOutText:
TX_FAR _GetOutText
db "@"
-IsGhostBattle: ; 3d83a (f:583a)
+IsGhostBattle:
ld a,[wIsInBattle]
dec a
ret nz
@@ -3382,7 +3382,7 @@ IsGhostBattle: ; 3d83a (f:583a)
; checks for various status conditions affecting the player mon
; stores whether the mon cannot use a move this turn in Z flag
-CheckPlayerStatusConditions: ; 3d854 (f:5854)
+CheckPlayerStatusConditions:
ld hl,wBattleMonStatus
ld a,[hl]
and a,SLP ; sleep mask
@@ -3643,67 +3643,67 @@ CheckPlayerStatusConditions: ; 3d854 (f:5854)
and a
ret
-FastAsleepText: ; 3da3d (f:5a3d)
+FastAsleepText:
TX_FAR _FastAsleepText
db "@"
-WokeUpText: ; 3da42 (f:5a42)
+WokeUpText:
TX_FAR _WokeUpText
db "@"
-IsFrozenText: ; 3da47 (f:5a47)
+IsFrozenText:
TX_FAR _IsFrozenText
db "@"
-FullyParalyzedText: ; 3da4c (f:5a4c)
+FullyParalyzedText:
TX_FAR _FullyParalyzedText
db "@"
-FlinchedText: ; 3da51 (f:5a51)
+FlinchedText:
TX_FAR _FlinchedText
db "@"
-MustRechargeText: ; 3da56 (f:5a56)
+MustRechargeText:
TX_FAR _MustRechargeText
db "@"
-DisabledNoMoreText: ; 3da5b (f:5a5b)
+DisabledNoMoreText:
TX_FAR _DisabledNoMoreText
db "@"
-IsConfusedText: ; 3da60 (f:5a60)
+IsConfusedText:
TX_FAR _IsConfusedText
db "@"
-HurtItselfText: ; 3da65 (f:5a65)
+HurtItselfText:
TX_FAR _HurtItselfText
db "@"
-ConfusedNoMoreText: ; 3da6a (f:5a6a)
+ConfusedNoMoreText:
TX_FAR _ConfusedNoMoreText
db "@"
-SavingEnergyText: ; 3da6f (f:5a6f)
+SavingEnergyText:
TX_FAR _SavingEnergyText
db "@"
-UnleashedEnergyText: ; 3da74 (f:5a74)
+UnleashedEnergyText:
TX_FAR _UnleashedEnergyText
db "@"
-ThrashingAboutText: ; 3da79 (f:5a79)
+ThrashingAboutText:
TX_FAR _ThrashingAboutText
db "@"
-AttackContinuesText: ; 3da7e (f:5a7e)
+AttackContinuesText:
TX_FAR _AttackContinuesText
db "@"
-CantMoveText: ; 3da83 (f:5a83)
+CantMoveText:
TX_FAR _CantMoveText
db "@"
-PrintMoveIsDisabledText: ; 3da88 (f:5a88)
+PrintMoveIsDisabledText:
ld hl, wPlayerSelectedMove
ld de, wPlayerBattleStatus1
ld a, [H_WHOSETURN]
@@ -3721,11 +3721,11 @@ PrintMoveIsDisabledText: ; 3da88 (f:5a88)
ld hl, MoveIsDisabledText
jp PrintText
-MoveIsDisabledText: ; 3daa8 (f:5aa8)
+MoveIsDisabledText:
TX_FAR _MoveIsDisabledText
db "@"
-HandleSelfConfusionDamage: ; 3daad (f:5aad)
+HandleSelfConfusionDamage:
ld hl, HurtItselfText
call PrintText
ld hl, wEnemyMonDefense
@@ -3769,7 +3769,7 @@ HandleSelfConfusionDamage: ; 3daad (f:5aad)
ld [H_WHOSETURN], a
jp ApplyDamageToPlayerPokemon
-PrintMonName1Text: ; 3daf5 (f:5af5)
+PrintMonName1Text:
ld hl, MonName1Text
jp PrintText
@@ -3778,7 +3778,7 @@ PrintMonName1Text: ; 3daf5 (f:5af5)
; those text strings are identical and both continue at PrintInsteadText
; this likely had to do with Japanese grammar that got translated,
; but the functionality didn't get removed
-MonName1Text: ; 3dafb (f:5afb)
+MonName1Text:
TX_FAR _MonName1Text
TX_ASM
ld a, [H_WHOSETURN]
@@ -3803,33 +3803,33 @@ MonName1Text: ; 3dafb (f:5afb)
ld hl, Used1Text
ret
-Used1Text: ; 3db2d (f:5b2d)
+Used1Text:
TX_FAR _Used1Text
TX_ASM
jr PrintInsteadText
-Used2Text: ; 3db34 (f:5b34)
+Used2Text:
TX_FAR _Used2Text
TX_ASM
; fall through
-PrintInsteadText: ; 3db39 (f:5b39)
+PrintInsteadText:
ld a, [wMonIsDisobedient]
and a
jr z, PrintMoveName
ld hl, InsteadText
ret
-InsteadText: ; 3db43 (f:5b43)
+InsteadText:
TX_FAR _InsteadText
TX_ASM
; fall through
-PrintMoveName: ; 3db48 (f:5b48)
+PrintMoveName:
ld hl, _PrintMoveName
ret
-_PrintMoveName: ; 3db4c (f:5b4c)
+_PrintMoveName:
TX_FAR _CF4BText
TX_ASM
ld hl, ExclamationPointPointerTable
@@ -3845,30 +3845,30 @@ _PrintMoveName: ; 3db4c (f:5b4c)
ld l, a
ret
-ExclamationPointPointerTable: ; 3db62 (f:5b62)
+ExclamationPointPointerTable:
dw ExclamationPoint1Text
dw ExclamationPoint2Text
dw ExclamationPoint3Text
dw ExclamationPoint4Text
dw ExclamationPoint5Text
-ExclamationPoint1Text: ; 3db6c (f:5b6c)
+ExclamationPoint1Text:
TX_FAR _ExclamationPoint1Text
db "@"
-ExclamationPoint2Text: ; 3db71 (f:5b71)
+ExclamationPoint2Text:
TX_FAR _ExclamationPoint2Text
db "@"
-ExclamationPoint3Text: ; 3db76 (f:5b76)
+ExclamationPoint3Text:
TX_FAR _ExclamationPoint3Text
db "@"
-ExclamationPoint4Text: ; 3db7b (f:5b7b)
+ExclamationPoint4Text:
TX_FAR _ExclamationPoint4Text
db "@"
-ExclamationPoint5Text: ; 3db80 (f:5b80)
+ExclamationPoint5Text:
TX_FAR _ExclamationPoint5Text
db "@"
@@ -3879,7 +3879,7 @@ ExclamationPoint5Text: ; 3db80 (f:5b80)
; but all five text strings are identical
; this likely had to do with Japanese grammar that got translated,
; but the functionality didn't get removed
-DetermineExclamationPointTextNum: ; 3db85 (f:5b85)
+DetermineExclamationPointTextNum:
push bc
ld a, [wd11e] ; move ID
ld c, a
@@ -3901,7 +3901,7 @@ DetermineExclamationPointTextNum: ; 3db85 (f:5b85)
pop bc
ret
-ExclamationPointMoveSets: ; 3dba3 (f:5ba3)
+ExclamationPointMoveSets:
db SWORDS_DANCE, GROWTH
db $00
db RECOVER, BIDE, SELFDESTRUCT, AMNESIA
@@ -3916,7 +3916,7 @@ ExclamationPointMoveSets: ; 3dba3 (f:5ba3)
db $00
db $FF ; terminator
-PrintMoveFailureText: ; 3dbe2 (f:5be2)
+PrintMoveFailureText:
ld de, wPlayerMoveEffect
ld a, [H_WHOSETURN]
and a
@@ -3973,28 +3973,28 @@ PrintMoveFailureText: ; 3dbe2 (f:5be2)
.enemyTurn
jp ApplyDamageToEnemyPokemon
-AttackMissedText: ; 3dc42 (f:5c42)
+AttackMissedText:
TX_FAR _AttackMissedText
db "@"
-KeptGoingAndCrashedText: ; 3dc47 (f:5c47)
+KeptGoingAndCrashedText:
TX_FAR _KeptGoingAndCrashedText
db "@"
-UnaffectedText: ; 3dc4c (f:5c4c)
+UnaffectedText:
TX_FAR _UnaffectedText
db "@"
-PrintDoesntAffectText: ; 3dc51 (f:5c51)
+PrintDoesntAffectText:
ld hl, DoesntAffectMonText
jp PrintText
-DoesntAffectMonText: ; 3dc57 (f:5c57)
+DoesntAffectMonText:
TX_FAR _DoesntAffectMonText
db "@"
; if there was a critical hit or an OHKO was successful, print the corresponding text
-PrintCriticalOHKOText: ; 3dc5c (f:5c5c)
+PrintCriticalOHKOText:
ld a, [wCriticalHitOrOHKO]
and a
jr z, .done ; do nothing if there was no critical hit or successful OHKO
@@ -4014,21 +4014,21 @@ PrintCriticalOHKOText: ; 3dc5c (f:5c5c)
ld c, 20
jp DelayFrames
-CriticalOHKOTextPointers: ; 3dc7a (f:5c7a)
+CriticalOHKOTextPointers:
dw CriticalHitText
dw OHKOText
-CriticalHitText: ; 3dc7e (f:5c7e)
+CriticalHitText:
TX_FAR _CriticalHitText
db "@"
-OHKOText: ; 3dc83 (f:5c83)
+OHKOText:
TX_FAR _OHKOText
db "@"
; checks if a traded mon will disobey due to lack of badges
; stores whether the mon will use a move in Z flag
-CheckForDisobedience: ; 3dc88 (f:5c88)
+CheckForDisobedience:
xor a
ld [wMonIsDisobedient], a
ld a, [wLinkState]
@@ -4207,28 +4207,28 @@ CheckForDisobedience: ; 3dc88 (f:5c88)
xor a ; set Z flag
ret
-LoafingAroundText: ; 3ddb6 (f:5db6)
+LoafingAroundText:
TX_FAR _LoafingAroundText
db "@"
-BeganToNapText: ; 3ddbb (f:5dbb)
+BeganToNapText:
TX_FAR _BeganToNapText
db "@"
-WontObeyText: ; 3ddc0 (f:5dc0)
+WontObeyText:
TX_FAR _WontObeyText
db "@"
-TurnedAwayText: ; 3ddc5 (f:5dc5)
+TurnedAwayText:
TX_FAR _TurnedAwayText
db "@"
-IgnoredOrdersText: ; 3ddca (f:5dca)
+IgnoredOrdersText:
TX_FAR _IgnoredOrdersText
db "@"
; sets b, c, d, and e for the CalculateDamage routine in the case of an attack by the player mon
-GetDamageVarsForPlayerAttack: ; 3ddcf (f:5dcf)
+GetDamageVarsForPlayerAttack:
xor a
ld hl, wDamage ; damage to eventually inflict, initialise to zero
ldi [hl], a
@@ -4341,7 +4341,7 @@ GetDamageVarsForPlayerAttack: ; 3ddcf (f:5dcf)
ret
; sets b, c, d, and e for the CalculateDamage routine in the case of an attack by the enemy mon
-GetDamageVarsForEnemyAttack: ; 3de75 (f:5e75)
+GetDamageVarsForEnemyAttack:
ld hl, wDamage ; damage to eventually inflict, initialise to zero
xor a
ld [hli], a
@@ -4456,7 +4456,7 @@ GetDamageVarsForEnemyAttack: ; 3de75 (f:5e75)
; get stat c of enemy mon
; c: stat to get (HP=1,Attack=2,Defense=3,Speed=4,Special=5)
-GetEnemyMonStat: ; 3df1c (f:5f1c)
+GetEnemyMonStat:
push de
push bc
ld a, [wLinkState]
@@ -4497,7 +4497,7 @@ GetEnemyMonStat: ; 3df1c (f:5f1c)
pop de
ret
-CalculateDamage: ; 3df65 (f:5f65)
+CalculateDamage:
; input:
; b: attack
; c: opponent defense
@@ -4659,14 +4659,14 @@ CalculateDamage: ; 3df65 (f:5f65)
and a
ret
-JumpToOHKOMoveEffect: ; 3e016 (f:6016)
+JumpToOHKOMoveEffect:
call JumpMoveEffect
ld a, [wMoveMissed]
dec a
ret
-UnusedHighCriticalMoves: ; 3e01e (f:601e)
+UnusedHighCriticalMoves:
db KARATE_CHOP
db RAZOR_LEAF
db CRABHAMMER
@@ -4677,7 +4677,7 @@ UnusedHighCriticalMoves: ; 3e01e (f:601e)
; determines if attack is a critical hit
; azure heights claims "the fastest pokémon (who are,not coincidentally,
; among the most popular) tend to CH about 20 to 25% of the time."
-CriticalHitTest: ; 3e023 (f:6023)
+CriticalHitTest:
xor a
ld [wCriticalHitOrOHKO], a
ld a, [H_WHOSETURN]
@@ -4744,7 +4744,7 @@ CriticalHitTest: ; 3e023 (f:6023)
ret
; high critical hit moves
-HighCriticalMoves: ; 3e08e (f:608e)
+HighCriticalMoves:
db KARATE_CHOP
db RAZOR_LEAF
db CRABHAMMER
@@ -4753,7 +4753,7 @@ HighCriticalMoves: ; 3e08e (f:608e)
; function to determine if Counter hits and if so, how much damage it does
-HandleCounterMove: ; 3e093 (f:6093)
+HandleCounterMove:
; The variables checked by Counter are updated whenever the cursor points to a new move in the battle selection menu.
; This is irrelevant for the opponent's side outside of link battles, since the move selection is controlled by the AI.
; However, in the scenario where the player switches out and the opponent uses Counter,
@@ -4818,7 +4818,7 @@ HandleCounterMove: ; 3e093 (f:6093)
xor a
ret
-ApplyAttackToEnemyPokemon: ; 3e0df (f:60df)
+ApplyAttackToEnemyPokemon:
ld a,[wPlayerMoveEffect]
cp a,OHKO_EFFECT
jr z,ApplyDamageToEnemyPokemon
@@ -4884,7 +4884,7 @@ ApplyAttackToEnemyPokemon: ; 3e0df (f:60df)
ld a,b
ld [hl],a
-ApplyDamageToEnemyPokemon: ; 3e142 (f:6142)
+ApplyDamageToEnemyPokemon:
ld hl,wDamage
ld a,[hli]
ld b,a
@@ -4934,10 +4934,10 @@ ApplyDamageToEnemyPokemon: ; 3e142 (f:6142)
xor a
ld [wHPBarType],a
predef UpdateHPBar2 ; animate the HP bar shortening
-ApplyAttackToEnemyPokemonDone: ; 3e19d (f:619d)
+ApplyAttackToEnemyPokemonDone:
jp DrawHUDsAndHPBars
-ApplyAttackToPlayerPokemon: ; 3e1a0 (f:61a0)
+ApplyAttackToPlayerPokemon:
ld a,[wEnemyMoveEffect]
cp a,OHKO_EFFECT
jr z,ApplyDamageToPlayerPokemon
@@ -5003,7 +5003,7 @@ ApplyAttackToPlayerPokemon: ; 3e1a0 (f:61a0)
ld a,b
ld [hl],a
-ApplyDamageToPlayerPokemon: ; 3e200 (f:6200)
+ApplyDamageToPlayerPokemon:
ld hl,wDamage
ld a,[hli]
ld b,a
@@ -5055,7 +5055,7 @@ ApplyDamageToPlayerPokemon: ; 3e200 (f:6200)
ApplyAttackToPlayerPokemonDone
jp DrawHUDsAndHPBars
-AttackSubstitute: ; 3e25e (f:625e)
+AttackSubstitute:
; Unlike the two ApplyAttackToPokemon functions, Attack Substitute is shared by player and enemy.
; Self-confusion damage as well as Hi-Jump Kick and Jump Kick recoil cause a momentary turn swap before being applied.
; If the user has a Substitute up and would take damage because of that,
@@ -5110,16 +5110,16 @@ AttackSubstitute: ; 3e25e (f:625e)
ld [hl],a ; zero the effect of the attacker's move
jp DrawHUDsAndHPBars
-SubstituteTookDamageText: ; 3e2ac (f:62ac)
+SubstituteTookDamageText:
TX_FAR _SubstituteTookDamageText
db "@"
-SubstituteBrokeText: ; 3e2b1 (f:62b1)
+SubstituteBrokeText:
TX_FAR _SubstituteBrokeText
db "@"
; this function raises the attack modifier of a pokemon using Rage when that pokemon is attacked
-HandleBuildingRage: ; 3e2b6 (f:62b6)
+HandleBuildingRage:
; values for the player turn
ld hl,wEnemyBattleStatus2
ld de,wEnemyMonStatMods
@@ -5161,13 +5161,13 @@ HandleBuildingRage: ; 3e2b6 (f:62b6)
ld [H_WHOSETURN],a
ret
-BuildingRageText: ; 3e2f8 (f:62f8)
+BuildingRageText:
TX_FAR _BuildingRageText
db "@"
; copy last move for Mirror Move
; sets zero flag on failure and unsets zero flag on success
-MirrorMoveCopyMove: ; 3e2fd (f:62fd)
+MirrorMoveCopyMove:
; Mirror Move makes use of ccf1 (wPlayerUsedMove) and ccf2 (wEnemyUsedMove) addresses,
; which are mainly used to print the "[Pokemon] used [Move]" text.
; Both are set to 0 whenever a new Pokemon is sent out
@@ -5197,12 +5197,12 @@ MirrorMoveCopyMove: ; 3e2fd (f:62fd)
xor a
ret
-MirrorMoveFailedText: ; 3e324 (f:6324)
+MirrorMoveFailedText:
TX_FAR _MirrorMoveFailedText
db "@"
; function used to reload move data for moves like Mirror Move and Metronome
-ReloadMoveData: ; 3e329 (f:6329)
+ReloadMoveData:
ld [wd11e],a
dec a
ld hl,Moves
@@ -5219,7 +5219,7 @@ ReloadMoveData: ; 3e329 (f:6329)
ret
; function that picks a random move for metronome
-MetronomePickMove: ; 3e348 (f:6348)
+MetronomePickMove:
xor a
ld [wAnimationType],a
ld a,METRONOME
@@ -5248,7 +5248,7 @@ MetronomePickMove: ; 3e348 (f:6348)
; this function increments the current move's PP
; it's used to prevent moves that run another move within the same turn
; (like Mirror Move and Metronome) from losing 2 PP
-IncrementMovePP: ; 3e373 (f:6373)
+IncrementMovePP:
ld a,[H_WHOSETURN]
and a
; values for player turn
@@ -5280,7 +5280,7 @@ IncrementMovePP: ; 3e373 (f:6373)
ret
; function to adjust the base damage of an attack to account for type effectiveness
-AdjustDamageForMoveType: ; 3e3a5 (f:63a5)
+AdjustDamageForMoveType:
; values for player turn
ld hl,wBattleMonType
ld a,[hli]
@@ -5399,7 +5399,7 @@ AdjustDamageForMoveType: ; 3e3a5 (f:63a5)
; the result is stored in [wTypeEffectiveness]
; ($05 is not very effective, $10 is neutral, $14 is super effective)
; as far is can tell, this is only used once in some AI code to help decide which move to use
-AIGetTypeEffectiveness: ; 3e449 (f:6449)
+AIGetTypeEffectiveness:
ld a,[wEnemyMoveType]
ld d,a ; d = type of enemy move
ld hl,wBattleMonType
@@ -5434,7 +5434,7 @@ AIGetTypeEffectiveness: ; 3e449 (f:6449)
INCLUDE "data/type_effects.asm"
; some tests that need to pass for a move to hit
-MoveHitTest: ; 3e56b (f:656b)
+MoveHitTest:
; player's turn
ld hl,wEnemyBattleStatus1
ld de,wPlayerMoveEffect
@@ -5554,7 +5554,7 @@ MoveHitTest: ; 3e56b (f:656b)
ret
; values for player turn
-CalcHitChance: ; 3e624 (f:6624)
+CalcHitChance:
ld hl,wPlayerMoveAccuracy
ld a,[H_WHOSETURN]
and a
@@ -5626,7 +5626,7 @@ CalcHitChance: ; 3e624 (f:6624)
ret
; multiplies damage by a random percentage from ~85% to 100%
-RandomizeDamage: ; 3e687 (f:6687)
+RandomizeDamage:
ld hl, wDamage
ld a, [hli]
and a
@@ -5663,7 +5663,7 @@ RandomizeDamage: ; 3e687 (f:6687)
ret
; for more detailed commentary, see equivalent function for player side (ExecutePlayerMove)
-ExecuteEnemyMove: ; 3e6bc (f:66bc)
+ExecuteEnemyMove:
ld a, [wEnemySelectedMove]
inc a
jp z, ExecuteEnemyMoveDone
@@ -5695,14 +5695,14 @@ ExecuteEnemyMove: ; 3e6bc (f:66bc)
jr nz, EnemyCanExecuteChargingMove ; if so, jump
call GetCurrentMove
-CheckIfEnemyNeedsToChargeUp: ; 3e6fc (f:66fc)
+CheckIfEnemyNeedsToChargeUp:
ld a, [wEnemyMoveEffect]
cp CHARGE_EFFECT
jp z, JumpMoveEffect
cp FLY_EFFECT
jp z, JumpMoveEffect
jr EnemyCanExecuteMove
-EnemyCanExecuteChargingMove: ; 3e70b (f:670b)
+EnemyCanExecuteChargingMove:
ld hl, wEnemyBattleStatus1
res ChargingUp, [hl] ; no longer charging up for attack
res Invulnerable, [hl] ; no longer invulnerable to typical attacks
@@ -5715,7 +5715,7 @@ EnemyCanExecuteChargingMove: ; 3e70b (f:670b)
call GetName
ld de, wcd6d
call CopyStringToCF4B
-EnemyCanExecuteMove: ; 3e72b (f:672b)
+EnemyCanExecuteMove:
xor a
ld [wMonIsDisobedient], a
call PrintMonName1Text
@@ -5729,7 +5729,7 @@ EnemyCanExecuteMove: ; 3e72b (f:672b)
ld de, $1
call IsInArray
call c, JumpMoveEffect
-EnemyCalcMoveDamage: ; 3e750 (f:6750)
+EnemyCalcMoveDamage:
call SwapPlayerAndEnemyLevels
ld a, [wEnemyMoveEffect]
ld hl, SetDamageEffects
@@ -5747,9 +5747,9 @@ EnemyCalcMoveDamage: ; 3e750 (f:6750)
call AdjustDamageForMoveType
call RandomizeDamage
-EnemyMoveHitTest: ; 3e77f (f:677f)
+EnemyMoveHitTest:
call MoveHitTest
-handleIfEnemyMoveMissed: ; 3e782 (f:6782)
+handleIfEnemyMoveMissed:
ld a, [wMoveMissed]
and a
jr z, .asm_3e791
@@ -5760,17 +5760,17 @@ handleIfEnemyMoveMissed: ; 3e782 (f:6782)
.asm_3e791
call SwapPlayerAndEnemyLevels
-GetEnemyAnimationType: ; 3e794 (f:6794)
+GetEnemyAnimationType:
ld a, [wEnemyMoveEffect]
and a
ld a, $1
jr z, playEnemyMoveAnimation
ld a, $2
jr playEnemyMoveAnimation
-asm_3e7a0: ; 3e7a0 (f:67a0)
+asm_3e7a0:
call SwapPlayerAndEnemyLevels
xor a
-playEnemyMoveAnimation: ; 3e7a4 (f:67a4)
+playEnemyMoveAnimation:
push af
ld a, [wEnemyBattleStatus2]
bit HasSubstituteUp, a ; does mon have a substitute?
@@ -5790,7 +5790,7 @@ playEnemyMoveAnimation: ; 3e7a4 (f:67a4)
call nz, Bankswitch ; slide the substitute's sprite out
jr EnemyCheckIfMirrorMoveEffect
-EnemyCheckIfFlyOrChargeEffect: ; 3e7d1 (f:67d1)
+EnemyCheckIfFlyOrChargeEffect:
call SwapPlayerAndEnemyLevels
ld c, 30
call DelayFrames
@@ -5805,7 +5805,7 @@ EnemyCheckIfFlyOrChargeEffect: ; 3e7d1 (f:67d1)
ld [wAnimationType], a
ld a,STATUS_AFFECTED_ANIM
call PlayMoveAnimation
-EnemyCheckIfMirrorMoveEffect: ; 3e7ef (f:67ef)
+EnemyCheckIfMirrorMoveEffect:
ld a, [wEnemyMoveEffect]
cp MIRROR_MOVE_EFFECT
jr nz, .notMirrorMoveEffect
@@ -5872,17 +5872,17 @@ EnemyCheckIfMirrorMoveEffect: ; 3e7ef (f:67ef)
call nc, JumpMoveEffect
jr ExecuteEnemyMoveDone
-HitXTimesText: ; 3e887 (f:6887)
+HitXTimesText:
TX_FAR _HitXTimesText
db "@"
-ExecuteEnemyMoveDone: ; 3e88c (f:688c)
+ExecuteEnemyMoveDone:
ld b, $1
ret
; checks for various status conditions affecting the enemy mon
; stores whether the mon cannot use a move this turn in Z flag
-CheckEnemyStatusConditions: ; 3e88f (f:688f)
+CheckEnemyStatusConditions:
ld hl, wEnemyMonStatus
ld a, [hl]
and SLP ; sleep mask
@@ -6164,7 +6164,7 @@ CheckEnemyStatusConditions: ; 3e88f (f:688f)
and a ; clear Z flag
ret
-GetCurrentMove: ; 3eabe (f:6abe)
+GetCurrentMove:
ld a, [H_WHOSETURN]
and a
jp z, .player
@@ -6195,7 +6195,7 @@ GetCurrentMove: ; 3eabe (f:6abe)
ld de, wcd6d
jp CopyStringToCF4B
-LoadEnemyMonData: ; 3eb01 (f:6b01)
+LoadEnemyMonData:
ld a, [wLinkState]
cp LINK_STATE_BATTLING
jp z, LoadEnemyMonFromParty
@@ -6355,7 +6355,7 @@ LoadEnemyMonData: ; 3eb01 (f:6b01)
ret
; calls BattleTransition to show the battle transition animation and initializes some battle variables
-DoBattleTransitionAndInitBattleVariables: ; 3ec32 (f:6c32)
+DoBattleTransitionAndInitBattleVariables:
ld a, [wLinkState]
cp LINK_STATE_BATTLING
jr nz, .next
@@ -6391,7 +6391,7 @@ DoBattleTransitionAndInitBattleVariables: ; 3ec32 (f:6c32)
ret
; swaps the level values of the BattleMon and EnemyMon structs
-SwapPlayerAndEnemyLevels: ; 3ec81 (f:6c81)
+SwapPlayerAndEnemyLevels:
push bc
ld a, [wBattleMonLevel]
ld b, a
@@ -6405,7 +6405,7 @@ SwapPlayerAndEnemyLevels: ; 3ec81 (f:6c81)
; loads either red back pic or old man back pic
; also writes OAM data and loads tile patterns for the Red or Old Man back sprite's head
; (for use when scrolling the player sprite and enemy's silhouettes on screen)
-LoadPlayerBackPic: ; 3ec92 (f:6c92)
+LoadPlayerBackPic:
ld a, [wBattleType]
dec a ; is it the old man tutorial?
ld de, RedPicBack
@@ -6466,26 +6466,26 @@ LoadPlayerBackPic: ; 3ec92 (f:6c92)
predef_jump CopyUncompressedPicToTilemap
; does nothing since no stats are ever selected (barring glitches)
-DoubleOrHalveSelectedStats: ; 3ed02 (f:6d02)
+DoubleOrHalveSelectedStats:
callab DoubleSelectedStats
jpab HalveSelectedStats
-ScrollTrainerPicAfterBattle: ; 3ed12 (f:6d12)
+ScrollTrainerPicAfterBattle:
jpab _ScrollTrainerPicAfterBattle
-ApplyBurnAndParalysisPenaltiesToPlayer: ; 3ed1a (f:6d1a)
+ApplyBurnAndParalysisPenaltiesToPlayer:
ld a, $1
jr ApplyBurnAndParalysisPenalties
-ApplyBurnAndParalysisPenaltiesToEnemy: ; 3ed1e (f:6d1e)
+ApplyBurnAndParalysisPenaltiesToEnemy:
xor a
-ApplyBurnAndParalysisPenalties: ; 3ed1f (f:6d1f)
+ApplyBurnAndParalysisPenalties:
ld [H_WHOSETURN], a
call QuarterSpeedDueToParalysis
jp HalveAttackDueToBurn
-QuarterSpeedDueToParalysis: ; 3ed27 (f:6d27)
+QuarterSpeedDueToParalysis:
ld a, [H_WHOSETURN]
and a
jr z, .playerTurn
@@ -6528,7 +6528,7 @@ QuarterSpeedDueToParalysis: ; 3ed27 (f:6d27)
ld [hl], b
ret
-HalveAttackDueToBurn: ; 3ed64 (f:6d64)
+HalveAttackDueToBurn:
ld a, [H_WHOSETURN]
and a
jr z, .playerTurn
@@ -6567,7 +6567,7 @@ HalveAttackDueToBurn: ; 3ed64 (f:6d64)
ld [hl], b
ret
-CalculateModifiedStats: ; 3ed99 (f:6d99)
+CalculateModifiedStats:
ld c, 0
.loop
call CalculateModifiedStat
@@ -6578,7 +6578,7 @@ CalculateModifiedStats: ; 3ed99 (f:6d99)
ret
; calculate modified stat for stat c (0 = attack, 1 = defense, 2 = speed, 3 = special)
-CalculateModifiedStat: ; 3eda5 (f:6da5)
+CalculateModifiedStat:
push bc
push bc
ld a, [wCalculateWhoseStats]
@@ -6656,7 +6656,7 @@ CalculateModifiedStat: ; 3eda5 (f:6da5)
pop bc
ret
-ApplyBadgeStatBoosts: ; 3ee19 (f:6e19)
+ApplyBadgeStatBoosts:
ld a, [wLinkState]
cp LINK_STATE_BATTLING
ret z ; return if link battle
@@ -6709,10 +6709,10 @@ ApplyBadgeStatBoosts: ; 3ee19 (f:6e19)
ld [hld], a
ret
-LoadHudAndHpBarAndStatusTilePatterns: ; 3ee58 (f:6e58)
+LoadHudAndHpBarAndStatusTilePatterns:
call LoadHpBarAndStatusTilePatterns
-LoadHudTilePatterns: ; 3ee5b (f:6e5b)
+LoadHudTilePatterns:
ld a, [rLCDC]
add a ; is LCD disabled?
jr c, .lcdEnabled
@@ -6737,7 +6737,7 @@ LoadHudTilePatterns: ; 3ee5b (f:6e5b)
lb bc, BANK(BattleHudTiles2), (BattleHudTiles3End - BattleHudTiles2) / $8
jp CopyVideoDataDouble
-PrintEmptyString: ; 3ee94 (f:6e94)
+PrintEmptyString:
ld hl, .emptyString
jp PrintText
.emptyString
@@ -6796,7 +6796,7 @@ BattleRandom:
ret
-HandleExplodingAnimation: ; 3eed3 (f:6ed3)
+HandleExplodingAnimation:
ld a, [H_WHOSETURN]
and a
ld hl, wEnemyMonType1
@@ -6827,23 +6827,23 @@ HandleExplodingAnimation: ; 3eed3 (f:6ed3)
ld a, 5
ld [wAnimationType], a
-PlayMoveAnimation: ; 3ef07 (f:6f07)
+PlayMoveAnimation:
ld [wAnimationID],a
call Delay3
predef_jump MoveAnimation
-InitBattle: ; 3ef12 (f:6f12)
+InitBattle:
ld a, [wCurOpponent]
and a
jr z, DetermineWildOpponent
-InitOpponent: ; 3ef18 (f:6f18)
+InitOpponent:
ld a, [wCurOpponent]
ld [wcf91], a
ld [wEnemyMonSpecies2], a
jr InitBattleCommon
-DetermineWildOpponent: ; 3ef23 (f:6f23)
+DetermineWildOpponent:
ld a, [wd732]
bit 1, a
jr z, .asm_3ef2f
@@ -6856,7 +6856,7 @@ DetermineWildOpponent: ; 3ef23 (f:6f23)
ret nz
callab TryDoWildEncounter
ret nz
-InitBattleCommon: ; 3ef3d (f:6f3d)
+InitBattleCommon:
ld a, [wMapPalOffset]
push af
ld hl, wLetterPrintingDelayFlags
@@ -6885,7 +6885,7 @@ InitBattleCommon: ; 3ef3d (f:6f3d)
ld [wIsInBattle], a
jp _InitBattleCommon
-InitWildBattle: ; 3ef8b (f:6f8b)
+InitWildBattle:
ld a, $1
ld [wIsInBattle], a
call LoadEnemyMonData
@@ -6935,7 +6935,7 @@ InitWildBattle: ; 3ef8b (f:6f8b)
predef CopyUncompressedPicToTilemap
; common code that executes after init battle code specific to trainer or wild battles
-_InitBattleCommon: ; 3efeb (f:6feb)
+_InitBattleCommon:
ld b, SET_PAL_BATTLE_BLACK
call RunPaletteCommand
call SlidePlayerAndEnemySilhouettesOnScreen
@@ -6976,7 +6976,7 @@ _InitBattleCommon: ; 3efeb (f:6feb)
.emptyString
db "@"
-_LoadTrainerPic: ; 3f04b (f:704b)
+_LoadTrainerPic:
; wd033-wd034 contain pointer to pic
ld a, [wTrainerPicPointer]
ld e, a
@@ -6995,14 +6995,14 @@ _LoadTrainerPic: ; 3f04b (f:704b)
jp LoadUncompressedSpriteData
; unreferenced
-ResetCryModifiers: ; 3f069 (f:7069)
+ResetCryModifiers:
xor a
ld [wFrequencyModifier], a
ld [wTempoModifier], a
jp PlaySound
; animates the mon "growing" out of the pokeball
-AnimateSendingOutMon: ; 3f073 (f:7073)
+AnimateSendingOutMon:
ld a, [wPredefRegisters]
ld h, a
ld a, [wPredefRegisters + 1]
@@ -7042,13 +7042,13 @@ AnimateSendingOutMon: ; 3f073 (f:7073)
add $31
jr CopyUncompressedPicToHL
-CopyUncompressedPicToTilemap: ; 3f0c6 (f:70c6)
+CopyUncompressedPicToTilemap:
ld a, [wPredefRegisters]
ld h, a
ld a, [wPredefRegisters + 1]
ld l, a
ld a, [hStartTileID]
-CopyUncompressedPicToHL: ; 3f0d0 (f:70d0)
+CopyUncompressedPicToHL:
lb bc, 7, 7
ld de, SCREEN_WIDTH
push af
@@ -7095,7 +7095,7 @@ CopyUncompressedPicToHL: ; 3f0d0 (f:70d0)
jr nz, .flippedLoop
ret
-LoadMonBackPic: ; 3f103 (f:7103)
+LoadMonBackPic:
; Assumes the monster's attributes have
; been loaded with GetMonHeader.
ld a, [wBattleMonSpecies2]
@@ -7116,12 +7116,12 @@ LoadMonBackPic: ; 3f103 (f:7103)
ld b, a
jp CopyVideoData
-JumpMoveEffect: ; 3f132 (f:7132)
+JumpMoveEffect:
call _JumpMoveEffect
ld b, $1
ret
-_JumpMoveEffect: ; 3f138 (f:7138)
+_JumpMoveEffect:
ld a, [H_WHOSETURN]
and a
ld a, [wPlayerMoveEffect]
@@ -7139,7 +7139,7 @@ _JumpMoveEffect: ; 3f138 (f:7138)
ld l, a
jp [hl] ; jump to special effect handler
-MoveEffectPointerTable: ; 3f150 (f:7150)
+MoveEffectPointerTable:
dw SleepEffect ; unused effect
dw PoisonEffect ; POISON_SIDE_EFFECT1
dw DrainHPEffect ; DRAIN_HP_EFFECT
@@ -7227,7 +7227,7 @@ MoveEffectPointerTable: ; 3f150 (f:7150)
dw SplashEffect ; SPLASH_EFFECT
dw DisableEffect ; DISABLE_EFFECT
-SleepEffect: ; 3f1fc (f:71fc)
+SleepEffect:
ld de, wEnemyMonStatus
ld bc, wEnemyBattleStatus2
ld a, [H_WHOSETURN]
@@ -7271,15 +7271,15 @@ SleepEffect: ; 3f1fc (f:71fc)
.didntAffect
jp PrintDidntAffectText
-FellAsleepText: ; 3f245 (f:7245)
+FellAsleepText:
TX_FAR _FellAsleepText
db "@"
-AlreadyAsleepText: ; 3f24a (f:724a)
+AlreadyAsleepText:
TX_FAR _AlreadyAsleepText
db "@"
-PoisonEffect: ; 3f24f (f:724f)
+PoisonEffect:
ld hl, wEnemyMonStatus
ld de, wPlayerMoveEffect
ld a, [H_WHOSETURN]
@@ -7365,18 +7365,18 @@ PoisonEffect: ; 3f24f (f:724f)
call DelayFrames
jp PrintDidntAffectText
-PoisonedText: ; 3f2df (f:72df)
+PoisonedText:
TX_FAR _PoisonedText
db "@"
-BadlyPoisonedText: ; 3f2e4 (f:72e4)
+BadlyPoisonedText:
TX_FAR _BadlyPoisonedText
db "@"
-DrainHPEffect: ; 3f2e9 (f:72e9)
+DrainHPEffect:
jpab DrainHPEffect_
-ExplodeEffect: ; 3f2f1 (f:72f1)
+ExplodeEffect:
ld hl, wBattleMonHP
ld de, wPlayerBattleStatus2
ld a, [H_WHOSETURN]
@@ -7395,7 +7395,7 @@ ExplodeEffect: ; 3f2f1 (f:72f1)
ld [de], a
ret
-FreezeBurnParalyzeEffect: ; 3f30c (f:730c)
+FreezeBurnParalyzeEffect:
xor a
ld [wAnimationType], a
call CheckTargetSubstitute ; test bit 4 of d063/d068 flags [target has substitute flag]
@@ -7454,7 +7454,7 @@ FreezeBurnParalyzeEffect: ; 3f30c (f:730c)
call PlayBattleAnimation
ld hl, FrozenText
jp PrintText
-opponentAttacker: ; 3f382 (f:7382)
+opponentAttacker:
ld a, [wBattleMonStatus] ; mostly same as above with addresses swapped for opponent
and a
jp nz, CheckDefrost
@@ -7500,15 +7500,15 @@ opponentAttacker: ; 3f382 (f:7382)
ld hl, FrozenText
jp PrintText
-BurnedText: ; 3f3d8 (f:73d8)
+BurnedText:
TX_FAR _BurnedText
db "@"
-FrozenText: ; 3f3dd (f:73dd)
+FrozenText:
TX_FAR _FrozenText
db "@"
-CheckDefrost: ; 3f3e2 (f:73e2)
+CheckDefrost:
; any fire-type move that has a chance inflict burn (all but Fire Spin) will defrost a frozen target
and a, 1 << FRZ ; are they frozen?
ret z ; return if so
@@ -7543,11 +7543,11 @@ CheckDefrost: ; 3f3e2 (f:73e2)
.common
jp PrintText
-FireDefrostedText: ; 3f423 (f:7423)
+FireDefrostedText:
TX_FAR _FireDefrostedText
db "@"
-StatModifierUpEffect: ; 3f428 (f:7428)
+StatModifierUpEffect:
ld hl, wPlayerMonStatMods
ld de, wPlayerMoveEffect
ld a, [H_WHOSETURN]
@@ -7646,13 +7646,13 @@ StatModifierUpEffect: ; 3f428 (f:7428)
ld a, 999 % $100
ld [H_MULTIPLICAND + 2], a
-UpdateStat: ; 3f4c3 (f:74c3)
+UpdateStat:
ld a, [H_PRODUCT + 2]
ld [hli], a
ld a, [H_PRODUCT + 3]
ld [hl], a
pop hl
-UpdateStatDone: ; 3f4ca (f:74ca)
+UpdateStatDone:
ld b, c
inc b
call PrintStatText
@@ -7703,15 +7703,15 @@ UpdateStatDone: ; 3f4ca (f:74ca)
call QuarterSpeedDueToParalysis ; apply speed penalty to the player whose turn is not, if it's paralyzed
jp HalveAttackDueToBurn ; apply attack penalty to the player whose turn is not, if it's burned
-RestoreOriginalStatModifier: ; 3f520 (f:7520)
+RestoreOriginalStatModifier:
pop hl
dec [hl]
-PrintNothingHappenedText: ; 3f522 (f:7522)
+PrintNothingHappenedText:
ld hl, NothingHappenedText
jp PrintText
-MonsStatsRoseText: ; 3f528 (f:7528)
+MonsStatsRoseText:
TX_FAR _MonsStatsRoseText
TX_ASM
ld hl, GreatlyRoseText
@@ -7726,15 +7726,15 @@ MonsStatsRoseText: ; 3f528 (f:7528)
ld hl, RoseText
ret
-GreatlyRoseText: ; 3f542 (f:7542)
+GreatlyRoseText:
db $0a
TX_FAR _GreatlyRoseText
-RoseText: ; 3f547 (f:7547)
+RoseText:
TX_FAR _RoseText
db "@"
-StatModifierDownEffect: ; 3f54c (f:754c)
+StatModifierDownEffect:
ld hl, wEnemyMonStatMods
ld de, wPlayerMoveEffect
ld bc, wEnemyBattleStatus1
@@ -7864,14 +7864,14 @@ StatModifierDownEffect: ; 3f54c (f:754c)
ld a, $1
ld [H_MULTIPLICAND + 2], a
-UpdateLoweredStat: ; 3f624 (f:7624)
+UpdateLoweredStat:
ld a, [H_PRODUCT + 2]
ld [hli], a
ld a, [H_PRODUCT + 3]
ld [hl], a
pop de
pop hl
-UpdateLoweredStatDone: ; 3f62c (f:762c)
+UpdateLoweredStatDone:
ld b, c
inc b
push de
@@ -7895,25 +7895,25 @@ UpdateLoweredStatDone: ; 3f62c (f:762c)
call QuarterSpeedDueToParalysis
jp HalveAttackDueToBurn
-CantLowerAnymore_Pop: ; 3f64d (f:764d)
+CantLowerAnymore_Pop:
pop de
pop hl
inc [hl]
-CantLowerAnymore: ; 3f650 (f:7650)
+CantLowerAnymore:
ld a, [de]
cp ATTACK_DOWN_SIDE_EFFECT
ret nc
ld hl, NothingHappenedText
jp PrintText
-MoveMissed: ; 3f65a (f:765a)
+MoveMissed:
ld a, [de]
cp $44
ret nc
jp ConditionalPrintButItFailed
-MonsStatsFellText: ; 3f661 (f:7661)
+MonsStatsFellText:
TX_FAR _MonsStatsFellText
TX_ASM
ld hl, FellText
@@ -7930,15 +7930,15 @@ MonsStatsFellText: ; 3f661 (f:7661)
ld hl, GreatlyFellText
ret
-GreatlyFellText: ; 3f67e (f:767e)
+GreatlyFellText:
db $0a
TX_FAR _GreatlyFellText
-FellText: ; 3f683 (f:7683)
+FellText:
TX_FAR _FellText
db "@"
-PrintStatText: ; 3f688 (f:7688)
+PrintStatText:
ld hl, StatsTextStrings
ld c, "@"
.asm_3f68d
@@ -7954,7 +7954,7 @@ PrintStatText: ; 3f688 (f:7688)
ld bc, $a
jp CopyData
-StatsTextStrings: ; 3f69f (f:769f)
+StatsTextStrings:
db "ATTACK@"
db "DEFENSE@"
db "SPEED@"
@@ -7962,7 +7962,7 @@ StatsTextStrings: ; 3f69f (f:769f)
db "ACCURACY@"
db "EVADE@"
-StatModifierRatios: ; 3f6cb (f:76cb)
+StatModifierRatios:
; first byte is numerator, second byte is denominator
db 25, 100 ; 0.25
db 28, 100 ; 0.28
@@ -7978,7 +7978,7 @@ StatModifierRatios: ; 3f6cb (f:76cb)
db 35, 10 ; 3.50
db 4, 1 ; 4.00
-BideEffect: ; 3f6e5 (f:76e5)
+BideEffect:
ld hl, wPlayerBattleStatus1
ld de, wPlayerBideAccumulatedDamage
ld bc, wPlayerNumAttacksLeft
@@ -8005,7 +8005,7 @@ BideEffect: ; 3f6e5 (f:76e5)
add XSTATITEM_ANIM
jp PlayBattleAnimation2
-ThrashPetalDanceEffect: ; 3f717 (f:7717)
+ThrashPetalDanceEffect:
ld hl, wPlayerBattleStatus1
ld de, wPlayerNumAttacksLeft
ld a, [H_WHOSETURN]
@@ -8024,7 +8024,7 @@ ThrashPetalDanceEffect: ; 3f717 (f:7717)
add ANIM_B0
jp PlayBattleAnimation2
-SwitchAndTeleportEffect: ; 3f739 (f:7739)
+SwitchAndTeleportEffect:
ld a, [H_WHOSETURN]
and a
jr nz, .asm_3f791
@@ -8127,19 +8127,19 @@ SwitchAndTeleportEffect: ; 3f739 (f:7739)
.asm_3f7ff
jp PrintText
-RanFromBattleText: ; 3f802 (f:7802)
+RanFromBattleText:
TX_FAR _RanFromBattleText
db "@"
-RanAwayScaredText: ; 3f807 (f:7807)
+RanAwayScaredText:
TX_FAR _RanAwayScaredText
db "@"
-WasBlownAwayText: ; 3f80c (f:780c)
+WasBlownAwayText:
TX_FAR _WasBlownAwayText
db "@"
-TwoToFiveAttacksEffect: ; 3f811 (f:7811)
+TwoToFiveAttacksEffect:
ld hl, wPlayerBattleStatus1
ld de, wPlayerNumAttacksLeft
ld bc, wPlayerNumHits
@@ -8184,7 +8184,7 @@ TwoToFiveAttacksEffect: ; 3f811 (f:7811)
ld [hl], a ; set Twineedle's effect to poison effect
jr .saveNumberOfHits
-FlinchSideEffect: ; 3f85b (f:785b)
+FlinchSideEffect:
call CheckTargetSubstitute
ret nz
ld hl, wEnemyBattleStatus1
@@ -8208,10 +8208,10 @@ FlinchSideEffect: ; 3f85b (f:785b)
call ClearHyperBeam
ret
-OneHitKOEffect: ; 3f884 (f:7884)
+OneHitKOEffect:
jpab OneHitKOEffect_
-ChargeEffect: ; 3f88c (f:788c)
+ChargeEffect:
ld hl, wPlayerBattleStatus1
ld de, wPlayerMoveEffect
ld a, [H_WHOSETURN]
@@ -8245,7 +8245,7 @@ ChargeEffect: ; 3f88c (f:788c)
ld hl, ChargeMoveEffectText
jp PrintText
-ChargeMoveEffectText: ; 3f8c8 (f:78c8)
+ChargeMoveEffectText:
TX_FAR _ChargeMoveEffectText
TX_ASM
ld a, [wChargeMoveNum]
@@ -8269,31 +8269,31 @@ ChargeMoveEffectText: ; 3f8c8 (f:78c8)
.asm_3f8f8
ret
-MadeWhirlwindText: ; 3f8f9 (f:78f9)
+MadeWhirlwindText:
TX_FAR _MadeWhirlwindText
db "@"
-TookInSunlightText: ; 3f8fe (f:78fe)
+TookInSunlightText:
TX_FAR _TookInSunlightText
db "@"
-LoweredItsHeadText: ; 3f903 (f:7903)
+LoweredItsHeadText:
TX_FAR _LoweredItsHeadText
db "@"
-SkyAttackGlowingText: ; 3f908 (f:7908)
+SkyAttackGlowingText:
TX_FAR _SkyAttackGlowingText
db "@"
-FlewUpHighText: ; 3f90d (f:790d)
+FlewUpHighText:
TX_FAR _FlewUpHighText
db "@"
-DugAHoleText: ; 3f912 (f:7912)
+DugAHoleText:
TX_FAR _DugAHoleText
db "@"
-TrappingEffect: ; 3f917 (f:7917)
+TrappingEffect:
ld hl, wPlayerBattleStatus1
ld de, wPlayerNumAttacksLeft
ld a, [H_WHOSETURN]
@@ -8318,22 +8318,22 @@ TrappingEffect: ; 3f917 (f:7917)
ld [de], a
ret
-MistEffect: ; 3f941 (f:7941)
+MistEffect:
jpab MistEffect_
-FocusEnergyEffect: ; 3f949 (f:7949)
+FocusEnergyEffect:
jpab FocusEnergyEffect_
-RecoilEffect: ; 3f951 (f:7951)
+RecoilEffect:
jpab RecoilEffect_
-ConfusionSideEffect: ; 3f959 (f:7959)
+ConfusionSideEffect:
call BattleRandom
cp $19
ret nc
jr ConfusionSideEffectSuccess
-ConfusionEffect: ; 3f961 (f:7961)
+ConfusionEffect:
call CheckTargetSubstitute
jr nz, ConfusionEffectFailed
call MoveHitTest
@@ -8341,7 +8341,7 @@ ConfusionEffect: ; 3f961 (f:7961)
and a
jr nz, ConfusionEffectFailed
-ConfusionSideEffectSuccess: ; 3f96f (f:796f)
+ConfusionSideEffectSuccess:
ld a, [H_WHOSETURN]
and a
ld hl, wEnemyBattleStatus1
@@ -8367,24 +8367,24 @@ ConfusionSideEffectSuccess: ; 3f96f (f:796f)
ld hl, BecameConfusedText
jp PrintText
-BecameConfusedText: ; 3f9a1 (f:79a1)
+BecameConfusedText:
TX_FAR _BecameConfusedText
db "@"
-ConfusionEffectFailed: ; 3f9a6 (f:79a6)
+ConfusionEffectFailed:
cp CONFUSION_SIDE_EFFECT
ret z
ld c, 50
call DelayFrames
jp ConditionalPrintButItFailed
-ParalyzeEffect: ; 3f9b1 (f:79b1)
+ParalyzeEffect:
jpab ParalyzeEffect_
-SubstituteEffect: ; 3f9b9 (f:79b9)
+SubstituteEffect:
jpab SubstituteEffect_
-HyperBeamEffect: ; 3f9c1 (f:79c1)
+HyperBeamEffect:
ld hl, wPlayerBattleStatus2
ld a, [H_WHOSETURN]
and a
@@ -8394,7 +8394,7 @@ HyperBeamEffect: ; 3f9c1 (f:79c1)
set NeedsToRecharge, [hl] ; mon now needs to recharge
ret
-ClearHyperBeam: ; 3f9cf (f:79cf)
+ClearHyperBeam:
push hl
ld hl, wEnemyBattleStatus2
ld a, [H_WHOSETURN]
@@ -8406,7 +8406,7 @@ ClearHyperBeam: ; 3f9cf (f:79cf)
pop hl
ret
-RageEffect: ; 3f9df (f:79df)
+RageEffect:
ld hl, wPlayerBattleStatus2
ld a, [H_WHOSETURN]
and a
@@ -8416,7 +8416,7 @@ RageEffect: ; 3f9df (f:79df)
set UsingRage, [hl] ; mon is now in "rage" mode
ret
-MimicEffect: ; 3f9ed (f:79ed)
+MimicEffect:
ld c, 50
call DelayFrames
call MoveHitTest
@@ -8488,18 +8488,18 @@ MimicEffect: ; 3f9ed (f:79ed)
.asm_3fa74
jp PrintButItFailedText_
-MimicLearnedMoveText: ; 3fa77 (f:7a77)
+MimicLearnedMoveText:
TX_FAR _MimicLearnedMoveText
db "@"
-LeechSeedEffect: ; 3fa7c (f:7a7c)
+LeechSeedEffect:
jpab LeechSeedEffect_
-SplashEffect: ; 3fa84 (f:7a84)
+SplashEffect:
call PlayCurrentMoveAnimation
jp PrintNoEffectText
-DisableEffect: ; 3fa8a (f:7a8a)
+DisableEffect:
call MoveHitTest
ld a, [wMoveMissed]
and a
@@ -8582,74 +8582,74 @@ DisableEffect: ; 3fa8a (f:7a8a)
.moveMissed
jp PrintButItFailedText_
-MoveWasDisabledText: ; 3fb09 (f:7b09)
+MoveWasDisabledText:
TX_FAR _MoveWasDisabledText
db "@"
-PayDayEffect: ; 3fb0e (f:7b0e)
+PayDayEffect:
jpab PayDayEffect_
-ConversionEffect: ; 3fb16 (f:7b16)
+ConversionEffect:
jpab ConversionEffect_
-HazeEffect: ; 3fb1e (f:7b1e)
+HazeEffect:
jpab HazeEffect_
-HealEffect: ; 3fb26 (f:7b26)
+HealEffect:
jpab HealEffect_
-TransformEffect: ; 3fb2e (f:7b2e)
+TransformEffect:
jpab TransformEffect_
-ReflectLightScreenEffect: ; 3fb36 (f:7b36)
+ReflectLightScreenEffect:
jpab ReflectLightScreenEffect_
-NothingHappenedText: ; 3fb3e (f:7b3e)
+NothingHappenedText:
TX_FAR _NothingHappenedText
db "@"
-PrintNoEffectText: ; 3fb43 (f:7b43)
+PrintNoEffectText:
ld hl, NoEffectText
jp PrintText
-NoEffectText: ; 3fb49 (f:7b49)
+NoEffectText:
TX_FAR _NoEffectText
db "@"
-ConditionalPrintButItFailed: ; 3fb4e (f:7b4e)
+ConditionalPrintButItFailed:
ld a, [wMoveDidntMiss]
and a
ret nz ; return if the side effect failed, yet the attack was successful
-PrintButItFailedText_: ; 3fb53 (f:7b53)
+PrintButItFailedText_:
ld hl, ButItFailedText
jp PrintText
-ButItFailedText: ; 3fb59 (f:7b59)
+ButItFailedText:
TX_FAR _ButItFailedText
db "@"
-PrintDidntAffectText: ; 3fb5e (f:7b5e)
+PrintDidntAffectText:
ld hl, DidntAffectText
jp PrintText
-DidntAffectText: ; 3fb64 (f:7b64)
+DidntAffectText:
TX_FAR _DidntAffectText
db "@"
-IsUnaffectedText: ; 3fb69 (f:7b69)
+IsUnaffectedText:
TX_FAR _IsUnaffectedText
db "@"
-PrintMayNotAttackText: ; 3fb6e (f:7b6e)
+PrintMayNotAttackText:
ld hl, ParalyzedMayNotAttackText
jp PrintText
-ParalyzedMayNotAttackText: ; 3fb74 (f:7b74)
+ParalyzedMayNotAttackText:
TX_FAR _ParalyzedMayNotAttackText
db "@"
-CheckTargetSubstitute: ; 3fb79 (f:7b79)
+CheckTargetSubstitute:
push hl
ld hl, wEnemyBattleStatus2
ld a, [H_WHOSETURN]
@@ -8661,7 +8661,7 @@ CheckTargetSubstitute: ; 3fb79 (f:7b79)
pop hl
ret
-PlayCurrentMoveAnimation2: ; 3fb89 (f:7b89)
+PlayCurrentMoveAnimation2:
; animation at MOVENUM will be played unless MOVENUM is 0
; plays wAnimationType 3 or 6
ld a, [H_WHOSETURN]
@@ -8673,7 +8673,7 @@ PlayCurrentMoveAnimation2: ; 3fb89 (f:7b89)
and a
ret z
-PlayBattleAnimation2: ; 3fb96 (f:7b96)
+PlayBattleAnimation2:
; play animation ID at a and animation type 6 or 3
ld [wAnimationID], a
ld a, [H_WHOSETURN]
@@ -8685,7 +8685,7 @@ PlayBattleAnimation2: ; 3fb96 (f:7b96)
ld [wAnimationType], a
jp PlayBattleAnimationGotID
-PlayCurrentMoveAnimation: ; 3fba8 (f:7ba8)
+PlayCurrentMoveAnimation:
; animation at MOVENUM will be played unless MOVENUM is 0
; resets wAnimationType
xor a
@@ -8699,11 +8699,11 @@ PlayCurrentMoveAnimation: ; 3fba8 (f:7ba8)
and a
ret z
-PlayBattleAnimation: ; 3fbb9 (f:7bb9)
+PlayBattleAnimation:
; play animation ID at a and predefined animation type
ld [wAnimationID], a
-PlayBattleAnimationGotID: ; 3fbbc (f:7bbc)
+PlayBattleAnimationGotID:
; play animation at wAnimationID
push hl
push de
diff --git a/engine/battle/decrement_pp.asm b/engine/battle/decrement_pp.asm
index f1a0dd58..984af087 100644
--- a/engine/battle/decrement_pp.asm
+++ b/engine/battle/decrement_pp.asm
@@ -1,4 +1,4 @@
-DecrementPP: ; 68000 (1a:4000)
+DecrementPP:
; after using a move, decrement pp in battle and (if not transformed?) in party
ld a, [de]
cp a, STRUGGLE
diff --git a/engine/battle/display_effectiveness.asm b/engine/battle/display_effectiveness.asm
index 17f0bd5b..85f2bc3e 100644
--- a/engine/battle/display_effectiveness.asm
+++ b/engine/battle/display_effectiveness.asm
@@ -1,4 +1,4 @@
-DisplayEffectiveness: ; 2fb7b (b:7b7b)
+DisplayEffectiveness:
ld a, [wDamageMultipliers]
and a, $7F
cp a, $0A
@@ -9,10 +9,10 @@ DisplayEffectiveness: ; 2fb7b (b:7b7b)
.done
jp PrintText
-SuperEffectiveText: ; 2fb8e (b:7b8e)
+SuperEffectiveText:
TX_FAR _SuperEffectiveText
db "@"
-NotVeryEffectiveText: ; 2fb93 (b:7b93)
+NotVeryEffectiveText:
TX_FAR _NotVeryEffectiveText
db "@"
diff --git a/engine/battle/draw_hud_pokeball_gfx.asm b/engine/battle/draw_hud_pokeball_gfx.asm
index 8cfd30af..d477ffdf 100644
--- a/engine/battle/draw_hud_pokeball_gfx.asm
+++ b/engine/battle/draw_hud_pokeball_gfx.asm
@@ -1,4 +1,4 @@
-DrawAllPokeballs: ; 3a849 (e:6849)
+DrawAllPokeballs:
call LoadPartyPokeballGfx
call SetupOwnPartyPokeballs
ld a, [wIsInBattle]
@@ -6,17 +6,17 @@ DrawAllPokeballs: ; 3a849 (e:6849)
ret z ; return if wild pokémon
jp SetupEnemyPartyPokeballs
-DrawEnemyPokeballs: ; 3a857 (e:6857)
+DrawEnemyPokeballs:
call LoadPartyPokeballGfx
jp SetupEnemyPartyPokeballs
-LoadPartyPokeballGfx: ; 3a85d (e:685d)
+LoadPartyPokeballGfx:
ld de, PokeballTileGraphics
ld hl, vSprites + $310
lb bc, BANK(PokeballTileGraphics), (PokeballTileGraphicsEnd - PokeballTileGraphics) / $10
jp CopyVideoData
-SetupOwnPartyPokeballs: ; 3a869 (e:6869)
+SetupOwnPartyPokeballs:
call PlacePlayerHUDTiles
ld hl, wPartyMon1
ld de, wPartyCount
@@ -30,7 +30,7 @@ SetupOwnPartyPokeballs: ; 3a869 (e:6869)
ld hl, wOAMBuffer
jp WritePokeballOAMData
-SetupEnemyPartyPokeballs: ; 3a887 (e:6887)
+SetupEnemyPartyPokeballs:
call PlaceEnemyHUDTiles
ld hl, wEnemyMons
ld de, wEnemyPartyCount
@@ -66,7 +66,7 @@ SetupPokeballs: ; 0x3a8a6
jr nz, .monloop
ret
-PickPokeball: ; 3a8c2 (e:68c2)
+PickPokeball:
inc hl
ld a, [hli]
and a
@@ -94,7 +94,7 @@ PickPokeball: ; 3a8c2 (e:68c2)
add hl, bc ; next mon struct
ret
-WritePokeballOAMData: ; 3a8e1 (e:68e1)
+WritePokeballOAMData:
ld de, wBuffer
ld c, PARTY_LENGTH
.loop
@@ -116,7 +116,7 @@ WritePokeballOAMData: ; 3a8e1 (e:68e1)
jr nz, .loop
ret
-PlacePlayerHUDTiles: ; 3a902 (e:6902)
+PlacePlayerHUDTiles:
ld hl, PlayerBattleHUDGraphicsTiles
ld de, wHUDGraphicsTiles
ld bc, $3
@@ -125,13 +125,13 @@ PlacePlayerHUDTiles: ; 3a902 (e:6902)
ld de, -1
jr PlaceHUDTiles
-PlayerBattleHUDGraphicsTiles: ; 3a916 (e:6916)
+PlayerBattleHUDGraphicsTiles:
; The tile numbers for specific parts of the battle display for the player's pokemon
db $73 ; unused ($73 is hardcoded into the routine that uses these bytes)
db $77 ; lower-right corner tile of the HUD
db $6F ; lower-left triangle tile of the HUD
-PlaceEnemyHUDTiles: ; 3a919 (e:6919)
+PlaceEnemyHUDTiles:
ld hl, EnemyBattleHUDGraphicsTiles
ld de, wHUDGraphicsTiles
ld bc, $3
@@ -140,13 +140,13 @@ PlaceEnemyHUDTiles: ; 3a919 (e:6919)
ld de, $1
jr PlaceHUDTiles
-EnemyBattleHUDGraphicsTiles: ; 3a92d (e:692d)
+EnemyBattleHUDGraphicsTiles:
; The tile numbers for specific parts of the battle display for the enemy
db $73 ; unused ($73 is hardcoded in the routine that uses these bytes)
db $74 ; lower-left corner tile of the HUD
db $78 ; lower-right triangle tile of the HUD
-PlaceHUDTiles: ; 3a930 (e:6930)
+PlaceHUDTiles:
ld [hl], $73
ld bc, SCREEN_WIDTH
add hl, bc
@@ -163,7 +163,7 @@ PlaceHUDTiles: ; 3a930 (e:6930)
ld [hl], a
ret
-SetupPlayerAndEnemyPokeballs: ; 3a948 (e:6948)
+SetupPlayerAndEnemyPokeballs:
call LoadPartyPokeballGfx
ld hl, wPartyMons
ld de, wPartyCount
@@ -187,6 +187,6 @@ SetupPlayerAndEnemyPokeballs: ; 3a948 (e:6948)
jp WritePokeballOAMData
; four tiles: pokeball, black pokeball (status ailment), crossed out pokeball (faited) and pokeball slot (no mon)
-PokeballTileGraphics:: ; 3a97e (e:697e)
+PokeballTileGraphics::
INCBIN "gfx/pokeball.2bpp"
PokeballTileGraphicsEnd:
diff --git a/engine/battle/end_of_battle.asm b/engine/battle/end_of_battle.asm
index 34bc3119..2d6ab2e9 100755
--- a/engine/battle/end_of_battle.asm
+++ b/engine/battle/end_of_battle.asm
@@ -1,4 +1,4 @@
-EndOfBattle: ; 137aa (4:77aa)
+EndOfBattle:
ld a, [wLinkState]
cp LINK_STATE_BATTLING
jr nz, .notLinkBattle
@@ -74,15 +74,15 @@ EndOfBattle: ; 137aa (4:77aa)
ld [wDestinationWarpID], a
ret
-YouWinText: ; 13853 (4:7853)
+YouWinText:
db "YOU WIN@"
-YouLoseText: ; 1385b (4:785b)
+YouLoseText:
db "YOU LOSE@"
-DrawText: ; 13864 (4:7864)
+DrawText:
db " DRAW@"
-PickUpPayDayMoneyText: ; 1386b (4:786b)
+PickUpPayDayMoneyText:
TX_FAR _PickUpPayDayMoneyText
db "@"
diff --git a/engine/battle/experience.asm b/engine/battle/experience.asm
index 0480bfcb..c1914806 100644
--- a/engine/battle/experience.asm
+++ b/engine/battle/experience.asm
@@ -1,4 +1,4 @@
-GainExperience: ; 5524f (15:524f)
+GainExperience:
ld a, [wLinkState]
cp LINK_STATE_BATTLING
ret z ; return if link battle
@@ -291,7 +291,7 @@ GainExperience: ; 5524f (15:524f)
predef_jump FlagActionPredef ; set the fought current enemy flag for the mon that is currently out
; divide enemy base stats, catch rate, and base exp by the number of mons gaining exp
-DivideExpDataByNumMonsGainingExp: ; 5546c (15:546c)
+DivideExpDataByNumMonsGainingExp:
ld a, [wPartyGainExpFlags]
ld b, a
xor a
@@ -325,7 +325,7 @@ DivideExpDataByNumMonsGainingExp: ; 5546c (15:546c)
ret
; multiplies exp by 1.5
-BoostExp: ; 5549f (15:549f)
+BoostExp:
ld a, [H_QUOTIENT + 2]
ld b, a
ld a, [H_QUOTIENT + 3]
@@ -339,7 +339,7 @@ BoostExp: ; 5549f (15:549f)
ld [H_QUOTIENT + 2], a
ret
-GainedText: ; 554b2 (15:54b2)
+GainedText:
TX_FAR _GainedText
TX_ASM
ld a, [wBoostExpByExpAll]
@@ -353,20 +353,20 @@ GainedText: ; 554b2 (15:54b2)
ld hl, BoostedText
ret
-WithExpAllText: ; 554cb (15:54cb)
+WithExpAllText:
TX_FAR _WithExpAllText
TX_ASM
ld hl, ExpPointsText
ret
-BoostedText: ; 554d4 (15:54d4)
+BoostedText:
TX_FAR _BoostedText
-ExpPointsText: ; 554d8 (15:54d8)
+ExpPointsText:
TX_FAR _ExpPointsText
db "@"
-GrewLevelText: ; 554dd (15:54dd)
+GrewLevelText:
TX_FAR _GrewLevelText
db $0b
db "@"
diff --git a/engine/battle/get_trainer_name.asm b/engine/battle/get_trainer_name.asm
index 36492292..deed8e95 100644
--- a/engine/battle/get_trainer_name.asm
+++ b/engine/battle/get_trainer_name.asm
@@ -1,4 +1,4 @@
-GetTrainerName_: ; 13a58 (4:7a58)
+GetTrainerName_:
ld hl, wGrassRate
ld a, [wLinkState]
and a
diff --git a/engine/battle/ghost_marowak_anim.asm b/engine/battle/ghost_marowak_anim.asm
index 6702589d..7adb20d8 100644
--- a/engine/battle/ghost_marowak_anim.asm
+++ b/engine/battle/ghost_marowak_anim.asm
@@ -1,4 +1,4 @@
-MarowakAnim: ; 708ca (1c:48ca)
+MarowakAnim:
; animate the ghost being unveiled as a Marowak
ld a, $e4
ld [rOBP1], a
@@ -49,7 +49,7 @@ MarowakAnim: ; 708ca (1c:48ca)
jp ClearSprites
; copies a mon pic's from background VRAM to sprite VRAM and sets up OAM
-CopyMonPicFromBGToSpriteVRAM: ; 7092a (1c:492a)
+CopyMonPicFromBGToSpriteVRAM:
ld de, vFrontPic
ld hl, vSprites
ld bc, 7 * 7
diff --git a/engine/battle/init_battle_variables.asm b/engine/battle/init_battle_variables.asm
index 9372a786..bdd5d8f4 100644
--- a/engine/battle/init_battle_variables.asm
+++ b/engine/battle/init_battle_variables.asm
@@ -1,4 +1,4 @@
-InitBattleVariables: ; 525af (14:65af)
+InitBattleVariables:
ld a, [hTilesetType]
ld [wSavedTilesetType], a
xor a
diff --git a/engine/battle/link_battle_versus_text.asm b/engine/battle/link_battle_versus_text.asm
index dfb2fe35..57e7f1bb 100644
--- a/engine/battle/link_battle_versus_text.asm
+++ b/engine/battle/link_battle_versus_text.asm
@@ -1,5 +1,5 @@
; display "[player] VS [enemy]" text box with pokeballs representing their parties next to the names
-DisplayLinkBattleVersusTextBox: ; 372d6 (d:72d6)
+DisplayLinkBattleVersusTextBox:
call LoadTextBoxTilePatterns
coord hl, 3, 4
ld b, $7
diff --git a/engine/battle/moveEffects/conversion_effect.asm b/engine/battle/moveEffects/conversion_effect.asm
index 8e895361..9c347876 100644
--- a/engine/battle/moveEffects/conversion_effect.asm
+++ b/engine/battle/moveEffects/conversion_effect.asm
@@ -1,4 +1,4 @@
-ConversionEffect_: ; 139a3 (4:79a3)
+ConversionEffect_:
ld hl, wEnemyMonType1
ld de, wBattleMonType1
ld a, [H_WHOSETURN]
@@ -24,12 +24,12 @@ ConversionEffect_: ; 139a3 (4:79a3)
ld hl, ConvertedTypeText
jp PrintText
-ConvertedTypeText: ; 139cd (4:79cd)
+ConvertedTypeText:
TX_FAR _ConvertedTypeText
db "@"
-PrintButItFailedText: ; 139d2 (4:79d2)
+PrintButItFailedText:
ld hl, PrintButItFailedText_
-CallBankF: ; 139d5 (4:79d5)
+CallBankF:
ld b, BANK(PrintButItFailedText_)
jp Bankswitch
diff --git a/engine/battle/moveEffects/drain_hp_effect.asm b/engine/battle/moveEffects/drain_hp_effect.asm
index ffa75c13..e5f4681a 100644
--- a/engine/battle/moveEffects/drain_hp_effect.asm
+++ b/engine/battle/moveEffects/drain_hp_effect.asm
@@ -1,4 +1,4 @@
-DrainHPEffect_: ; 783f (1:783f)
+DrainHPEffect_:
ld hl, wDamage
ld a, [hl]
srl a ; divide damage by 2
@@ -95,10 +95,10 @@ DrainHPEffect_: ; 783f (1:783f)
.printText
jp PrintText
-SuckedHealthText: ; 78dc (1:78dc)
+SuckedHealthText:
TX_FAR _SuckedHealthText
db "@"
-DreamWasEatenText: ; 78e1 (1:78e1)
+DreamWasEatenText:
TX_FAR _DreamWasEatenText
db "@"
diff --git a/engine/battle/moveEffects/focus_energy_effect.asm b/engine/battle/moveEffects/focus_energy_effect.asm
index b1cd03f3..9ba0ade0 100644
--- a/engine/battle/moveEffects/focus_energy_effect.asm
+++ b/engine/battle/moveEffects/focus_energy_effect.asm
@@ -1,4 +1,4 @@
-FocusEnergyEffect_: ; 27f86 (9:7f86)
+FocusEnergyEffect_:
ld hl, wPlayerBattleStatus2
ld a, [H_WHOSETURN]
and a
@@ -16,7 +16,7 @@ FocusEnergyEffect_: ; 27f86 (9:7f86)
call DelayFrames
jpab PrintButItFailedText_
-GettingPumpedText: ; 27fb3 (9:7fb3)
+GettingPumpedText:
db $0a
TX_FAR _GettingPumpedText
db "@"
diff --git a/engine/battle/moveEffects/haze_effect.asm b/engine/battle/moveEffects/haze_effect.asm
index 8c759cce..bd20f231 100644
--- a/engine/battle/moveEffects/haze_effect.asm
+++ b/engine/battle/moveEffects/haze_effect.asm
@@ -1,4 +1,4 @@
-HazeEffect_: ; 139da (4:79da)
+HazeEffect_:
ld a, $7
; store 7 on every stat mod
ld hl, wPlayerMonAttackMod
@@ -45,7 +45,7 @@ HazeEffect_: ; 139da (4:79da)
ld hl, StatusChangesEliminatedText
jp PrintText
-CureVolatileStatuses: ; 13a37 (4:7a37)
+CureVolatileStatuses:
; only cures statuses of the Pokemon not using Haze
res Confused, [hl]
inc hl ; BATTSTATUS2
@@ -58,7 +58,7 @@ CureVolatileStatuses: ; 13a37 (4:7a37)
ld [hl], a
ret
-ResetStatMods: ; 13a43 (4:7a43)
+ResetStatMods:
ld b, $8
.loop
ld [hli], a
@@ -66,7 +66,7 @@ ResetStatMods: ; 13a43 (4:7a43)
jr nz, .loop
ret
-ResetStats: ; 13a4a (4:7a4a)
+ResetStats:
ld b, $8
.loop
ld a, [hli]
@@ -76,6 +76,6 @@ ResetStats: ; 13a4a (4:7a4a)
jr nz, .loop
ret
-StatusChangesEliminatedText: ; 13a53 (4:7a53)
+StatusChangesEliminatedText:
TX_FAR _StatusChangesEliminatedText
db "@"
diff --git a/engine/battle/moveEffects/heal_effect.asm b/engine/battle/moveEffects/heal_effect.asm
index 4b8f83bd..b7d8283f 100644
--- a/engine/battle/moveEffects/heal_effect.asm
+++ b/engine/battle/moveEffects/heal_effect.asm
@@ -1,4 +1,4 @@
-HealEffect_: ; 3b9ec (e:79ec)
+HealEffect_:
ld a, [H_WHOSETURN]
and a
ld de, wBattleMonHP
@@ -107,14 +107,14 @@ HealEffect_: ; 3b9ec (e:79ec)
ld hl, PrintButItFailedText_
jp BankswitchEtoF
-StartedSleepingEffect: ; 3baa2 (e:7aa2)
+StartedSleepingEffect:
TX_FAR _StartedSleepingEffect
db "@"
-FellAsleepBecameHealthyText: ; 3baa7 (e:7aa7)
+FellAsleepBecameHealthyText:
TX_FAR _FellAsleepBecameHealthyText
db "@"
-RegainedHealthText: ; 3baac (e:7aac)
+RegainedHealthText:
TX_FAR _RegainedHealthText
db "@"
diff --git a/engine/battle/moveEffects/leech_seed_effect.asm b/engine/battle/moveEffects/leech_seed_effect.asm
index ea7ceb30..0f3a2666 100644
--- a/engine/battle/moveEffects/leech_seed_effect.asm
+++ b/engine/battle/moveEffects/leech_seed_effect.asm
@@ -1,4 +1,4 @@
-LeechSeedEffect_: ; 2bea9 (a:7ea9)
+LeechSeedEffect_:
callab MoveHitTest
ld a, [wMoveMissed]
and a
@@ -31,10 +31,10 @@ LeechSeedEffect_: ; 2bea9 (a:7ea9)
ld hl, EvadedAttackText
jp PrintText
-WasSeededText: ; 2bef2 (a:7ef2)
+WasSeededText:
TX_FAR _WasSeededText
db "@"
-EvadedAttackText: ; 2bef7 (a:7ef7)
+EvadedAttackText:
TX_FAR _EvadedAttackText
db "@"
diff --git a/engine/battle/moveEffects/mist_effect.asm b/engine/battle/moveEffects/mist_effect.asm
index fcdb4b28..b92777de 100644
--- a/engine/battle/moveEffects/mist_effect.asm
+++ b/engine/battle/moveEffects/mist_effect.asm
@@ -1,4 +1,4 @@
-MistEffect_: ; 33f2b (c:7f2b)
+MistEffect_:
ld hl, wPlayerBattleStatus2
ld a, [H_WHOSETURN]
and a
@@ -14,6 +14,6 @@ MistEffect_: ; 33f2b (c:7f2b)
.mistAlreadyInUse
jpab PrintButItFailedText_
-ShroudedInMistText: ; 33f52 (c:7f52)
+ShroudedInMistText:
TX_FAR _ShroudedInMistText
db "@"
diff --git a/engine/battle/moveEffects/one_hit_ko_effect.asm b/engine/battle/moveEffects/one_hit_ko_effect.asm
index efba0b79..827e2197 100644
--- a/engine/battle/moveEffects/one_hit_ko_effect.asm
+++ b/engine/battle/moveEffects/one_hit_ko_effect.asm
@@ -1,4 +1,4 @@
-OneHitKOEffect_: ; 33f57 (c:7f57)
+OneHitKOEffect_:
ld hl, wDamage
xor a
ld [hli], a
diff --git a/engine/battle/moveEffects/paralyze_effect.asm b/engine/battle/moveEffects/paralyze_effect.asm
index eac42a90..95979ae6 100644
--- a/engine/battle/moveEffects/paralyze_effect.asm
+++ b/engine/battle/moveEffects/paralyze_effect.asm
@@ -1,4 +1,4 @@
-ParalyzeEffect_: ; 52601 (14:6601)
+ParalyzeEffect_:
ld hl, wEnemyMonStatus
ld de, wPlayerMoveType
ld a, [H_WHOSETURN]
diff --git a/engine/battle/moveEffects/pay_day_effect.asm b/engine/battle/moveEffects/pay_day_effect.asm
index eb228615..e5daf014 100644
--- a/engine/battle/moveEffects/pay_day_effect.asm
+++ b/engine/battle/moveEffects/pay_day_effect.asm
@@ -1,4 +1,4 @@
-PayDayEffect_: ; 2feb8 (b:7eb8)
+PayDayEffect_:
xor a
ld hl, wcd6d
ld [hli], a
@@ -40,6 +40,6 @@ PayDayEffect_: ; 2feb8 (b:7eb8)
ld hl, CoinsScatteredText
jp PrintText
-CoinsScatteredText: ; 2ff04 (b:7f04)
+CoinsScatteredText:
TX_FAR _CoinsScatteredText
db "@"
diff --git a/engine/battle/moveEffects/recoil_effect.asm b/engine/battle/moveEffects/recoil_effect.asm
index 43bf8d5f..7fc90c44 100644
--- a/engine/battle/moveEffects/recoil_effect.asm
+++ b/engine/battle/moveEffects/recoil_effect.asm
@@ -1,4 +1,4 @@
-RecoilEffect_: ; 1392c (4:792c)
+RecoilEffect_:
ld a, [H_WHOSETURN]
and a
ld a, [wPlayerMoveNum]
@@ -65,6 +65,6 @@ RecoilEffect_: ; 1392c (4:792c)
predef UpdateHPBar2
ld hl, HitWithRecoilText
jp PrintText
-HitWithRecoilText: ; 1399e (4:799e)
+HitWithRecoilText:
TX_FAR _HitWithRecoilText
db "@"
diff --git a/engine/battle/moveEffects/reflect_light_screen_effect.asm b/engine/battle/moveEffects/reflect_light_screen_effect.asm
index 45f785a4..b45fbe20 100644
--- a/engine/battle/moveEffects/reflect_light_screen_effect.asm
+++ b/engine/battle/moveEffects/reflect_light_screen_effect.asm
@@ -1,4 +1,4 @@
-ReflectLightScreenEffect_: ; 3bb97 (e:7b97)
+ReflectLightScreenEffect_:
ld hl, wPlayerBattleStatus3
ld de, wPlayerMoveEffect
ld a, [H_WHOSETURN]
@@ -32,14 +32,14 @@ ReflectLightScreenEffect_: ; 3bb97 (e:7b97)
ld hl, PrintButItFailedText_
jp BankswitchEtoF
-LightScreenProtectedText: ; 3bbd7 (e:7bd7)
+LightScreenProtectedText:
TX_FAR _LightScreenProtectedText
db "@"
-ReflectGainedArmorText: ; 3bbdc (e:7bdc)
+ReflectGainedArmorText:
TX_FAR _ReflectGainedArmorText
db "@"
-BankswitchEtoF: ; 3bbe1 (e:7be1)
+BankswitchEtoF:
ld b, BANK(BattleCore)
jp Bankswitch
diff --git a/engine/battle/moveEffects/substitute_effect.asm b/engine/battle/moveEffects/substitute_effect.asm
index 7cac9f62..03314ebf 100644
--- a/engine/battle/moveEffects/substitute_effect.asm
+++ b/engine/battle/moveEffects/substitute_effect.asm
@@ -1,4 +1,4 @@
-SubstituteEffect_: ; 17dad (5:7dad)
+SubstituteEffect_:
ld c, 50
call DelayFrames
ld hl, wBattleMonMaxHP
@@ -64,14 +64,14 @@ SubstituteEffect_: ; 17dad (5:7dad)
.printText
jp PrintText
-SubstituteText: ; 17e1d (5:7e1d)
+SubstituteText:
TX_FAR _SubstituteText
db "@"
-HasSubstituteText: ; 17e22 (5:7e22)
+HasSubstituteText:
TX_FAR _HasSubstituteText
db "@"
-TooWeakSubstituteText: ; 17e27 (5:7e27)
+TooWeakSubstituteText:
TX_FAR _TooWeakSubstituteText
db "@"
diff --git a/engine/battle/moveEffects/transform_effect.asm b/engine/battle/moveEffects/transform_effect.asm
index 097a0d3a..45f8c910 100644
--- a/engine/battle/moveEffects/transform_effect.asm
+++ b/engine/battle/moveEffects/transform_effect.asm
@@ -1,4 +1,4 @@
-TransformEffect_: ; 3bab1 (e:7ab1)
+TransformEffect_:
ld hl, wBattleMonSpecies
ld de, wEnemyMonSpecies
ld bc, wEnemyBattleStatus3
@@ -143,6 +143,6 @@ TransformEffect_: ; 3bab1 (e:7ab1)
ld hl, PrintButItFailedText_
jp BankswitchEtoF
-TransformedText: ; 3bb92 (e:7b92)
+TransformedText:
TX_FAR _TransformedText
db "@"
diff --git a/engine/battle/print_type.asm b/engine/battle/print_type.asm
index deca2426..f717f871 100644
--- a/engine/battle/print_type.asm
+++ b/engine/battle/print_type.asm
@@ -1,6 +1,6 @@
; [wd0b5] = pokemon ID
; hl = dest addr
-PrintMonType: ; 27d6b (9:7d6b)
+PrintMonType:
call GetPredefRegisters
push hl
call GetMonHeader
@@ -19,25 +19,25 @@ PrintMonType: ; 27d6b (9:7d6b)
; a = type
; hl = dest addr
-PrintType: ; 27d89 (9:7d89)
+PrintType:
push hl
jr PrintType_
; erase "TYPE2/" if the mon only has 1 type
-EraseType2Text: ; 27d8c (9:7d8c)
+EraseType2Text:
ld a, " "
ld bc, $13
add hl, bc
ld bc, $6
jp FillMemory
-PrintMoveType: ; 27d98 (9:7d98)
+PrintMoveType:
call GetPredefRegisters
push hl
ld a, [wPlayerMoveType]
; fall through
-PrintType_: ; 27d9f (9:7d9f)
+PrintType_:
add a
ld hl, TypeNames
ld e, a
diff --git a/engine/battle/read_trainer_party.asm b/engine/battle/read_trainer_party.asm
index 4a5657b2..3672d8dc 100755
--- a/engine/battle/read_trainer_party.asm
+++ b/engine/battle/read_trainer_party.asm
@@ -1,4 +1,4 @@
-ReadTrainer: ; 39c53 (e:5c53)
+ReadTrainer:
; don't change any moves in a link battle
ld a,[wLinkState]
diff --git a/engine/battle/safari_zone.asm b/engine/battle/safari_zone.asm
index 344e2309..1eb1a615 100755
--- a/engine/battle/safari_zone.asm
+++ b/engine/battle/safari_zone.asm
@@ -1,4 +1,4 @@
-PrintSafariZoneBattleText: ; 4277 (1:4277)
+PrintSafariZoneBattleText:
ld hl, wSafariBaitFactor
ld a, [hl]
and a
@@ -27,10 +27,10 @@ PrintSafariZoneBattleText: ; 4277 (1:4277)
pop hl
jp PrintText
-SafariZoneEatingText: ; 42a7 (1:42a7)
+SafariZoneEatingText:
TX_FAR _SafariZoneEatingText
db "@"
-SafariZoneAngryText: ; 42ac (1:42ac)
+SafariZoneAngryText:
TX_FAR _SafariZoneAngryText
db "@"
diff --git a/engine/battle/save_trainer_name.asm b/engine/battle/save_trainer_name.asm
index ceba63bd..7e2c911c 100644
--- a/engine/battle/save_trainer_name.asm
+++ b/engine/battle/save_trainer_name.asm
@@ -1,4 +1,4 @@
-SaveTrainerName: ; 27e4a (9:7e4a)
+SaveTrainerName:
ld hl,TrainerNamePointers
ld a,[wTrainerClass]
dec a
@@ -18,7 +18,7 @@ SaveTrainerName: ; 27e4a (9:7e4a)
jr nz,.CopyCharacter
ret
-TrainerNamePointers: ; 27e64 (9:7e64)
+TrainerNamePointers:
; what is the point of these?
dw YoungsterName
dw BugCatcherName
@@ -68,45 +68,45 @@ TrainerNamePointers: ; 27e64 (9:7e64)
dw wTrainerName
dw wTrainerName
-YoungsterName: ; 27ec2 (9:7ec2)
+YoungsterName:
db "YOUNGSTER@"
-BugCatcherName: ; 27ecc (9:7ecc)
+BugCatcherName:
db "BUG CATCHER@"
-LassName: ; 27ed8 (9:7ed8)
+LassName:
db "LASS@"
-JrTrainerMName: ; 27edd (9:7edd)
+JrTrainerMName:
db "JR.TRAINER♂@"
-JrTrainerFName: ; 27ee9 (9:7ee9)
+JrTrainerFName:
db "JR.TRAINER♀@"
-PokemaniacName: ; 27ef5 (9:7ef5)
+PokemaniacName:
db "POKéMANIAC@"
-SuperNerdName: ; 27f00 (9:7f00)
+SuperNerdName:
db "SUPER NERD@"
-BurglarName: ; 27f0b (9:7f0b)
+BurglarName:
db "BURGLAR@"
-EngineerName: ; 27f13 (9:7f13)
+EngineerName:
db "ENGINEER@"
-JugglerXName: ; 27f1c (9:7f1c)
+JugglerXName:
db "JUGGLER@"
-SwimmerName: ; 27f24 (9:7f24)
+SwimmerName:
db "SWIMMER@"
-BeautyName: ; 27f2c (9:7f2c)
+BeautyName:
db "BEAUTY@"
-RockerName: ; 27f33 (9:7f33)
+RockerName:
db "ROCKER@"
-JugglerName: ; 27f3a (9:7f3a)
+JugglerName:
db "JUGGLER@"
-BlackbeltName: ; 27f42 (9:7f42)
+BlackbeltName:
db "BLACKBELT@"
-ProfOakName: ; 27f4c (9:7f4c)
+ProfOakName:
db "PROF.OAK@"
-ChiefName: ; 27f55 (9:7f55)
+ChiefName:
db "CHIEF@"
-ScientistName: ; 27f5b (9:7f5b)
+ScientistName:
db "SCIENTIST@"
-RocketName: ; 27f65 (9:7f65)
+RocketName:
db "ROCKET@"
-CooltrainerMName: ; 27f6c (9:7f6c)
+CooltrainerMName:
db "COOLTRAINER♂@"
-CooltrainerFName: ; 27f79 (9:7f79)
+CooltrainerFName:
db "COOLTRAINER♀@"
diff --git a/engine/battle/scale_sprites.asm b/engine/battle/scale_sprites.asm
index 6a8d43a9..98521528 100644
--- a/engine/battle/scale_sprites.asm
+++ b/engine/battle/scale_sprites.asm
@@ -1,7 +1,7 @@
; scales both uncompressed sprite chunks by two in every dimension (creating 2x2 output pixels per input pixel)
; assumes that input sprite chunks are 4x4 tiles, and the rightmost and bottommost 4 pixels will be ignored
; resulting in a 7*7 tile output sprite chunk
-ScaleSpriteByTwo: ; 2fe40 (b:7e40)
+ScaleSpriteByTwo:
ld de, sSpriteBuffer1 + (4*4*8) - 5 ; last byte of input data, last 4 rows already skipped
ld hl, sSpriteBuffer0 + SPRITEBUFFERSIZE - 1 ; end of destination buffer
call ScaleLastSpriteColumnByTwo ; last tile column is special case
@@ -10,7 +10,7 @@ ScaleSpriteByTwo: ; 2fe40 (b:7e40)
ld hl, sSpriteBuffer1 + SPRITEBUFFERSIZE - 1 ; end of destination buffer
call ScaleLastSpriteColumnByTwo ; last tile column is special case
-ScaleFirstThreeSpriteColumnsByTwo: ; 2fe55 (b:7e55)
+ScaleFirstThreeSpriteColumnsByTwo:
ld b, $3 ; 3 tile columns
.columnLoop
ld c, 4*8 - 4 ; $1c, 4 tiles minus 4 unused rows
@@ -39,7 +39,7 @@ ScaleFirstThreeSpriteColumnsByTwo: ; 2fe55 (b:7e55)
jr nz, .columnLoop
ret
-ScaleLastSpriteColumnByTwo: ; 2fe7d (b:7e7d)
+ScaleLastSpriteColumnByTwo:
ld a, 4*8 - 4 ; $1c, 4 tiles minus 4 unused rows
ld [H_SPRITEINTERLACECOUNTER], a
ld bc, -1
@@ -61,7 +61,7 @@ ScaleLastSpriteColumnByTwo: ; 2fe7d (b:7e7d)
; scales the given 4 bits in a (4x1 pixels) to 2 output bytes (8x2 pixels)
; hl: destination pointer
; bc: destination pointer offset (added after the two bytes have been written)
-ScalePixelsByTwo: ; 2fe97 (b:7e97)
+ScalePixelsByTwo:
push hl
and $f
ld hl, DuplicateBitsTable
@@ -78,7 +78,7 @@ ScalePixelsByTwo: ; 2fe97 (b:7e97)
ret
; repeats each input bit twice
-DuplicateBitsTable: ; 2fea8 (b:7ea8)
+DuplicateBitsTable:
db $00, $03, $0c, $0f
db $30, $33, $3c, $3f
db $c0, $c3, $cc, $cf
diff --git a/engine/battle/scroll_draw_trainer_pic.asm b/engine/battle/scroll_draw_trainer_pic.asm
index 5949208c..98893dcf 100644
--- a/engine/battle/scroll_draw_trainer_pic.asm
+++ b/engine/battle/scroll_draw_trainer_pic.asm
@@ -1,4 +1,4 @@
-_ScrollTrainerPicAfterBattle: ; 396d3 (e:56d3)
+_ScrollTrainerPicAfterBattle:
; Load the enemy trainer's pic and scrolls it into
; the screen from the right.
xor a
@@ -32,7 +32,7 @@ _ScrollTrainerPicAfterBattle: ; 396d3 (e:56d3)
jr .scrollLoop
; write one 7-tile column of the trainer pic to the tilemap
-DrawTrainerPicColumn: ; 39707 (e:5707)
+DrawTrainerPicColumn:
push hl
push de
push bc
diff --git a/engine/battle/trainer_ai.asm b/engine/battle/trainer_ai.asm
index bab4c253..385cdd1b 100644
--- a/engine/battle/trainer_ai.asm
+++ b/engine/battle/trainer_ai.asm
@@ -1,6 +1,6 @@
; creates a set of moves that may be used and returns its address in hl
; unused slots are filled with 0, all used slots may be chosen with equal probability
-AIEnemyTrainerChooseMoves: ; 39719 (e:5719)
+AIEnemyTrainerChooseMoves:
ld a, $a
ld hl, wBuffer ; init temporary move selection array. Only the moves with the lowest numbers are chosen in the end
ld [hli], a ; move 1
@@ -103,14 +103,14 @@ AIEnemyTrainerChooseMoves: ; 39719 (e:5719)
ld hl, wEnemyMonMoves ; use original move set
ret
-AIMoveChoiceModificationFunctionPointers: ; 397a3 (e:57a3)
+AIMoveChoiceModificationFunctionPointers:
dw AIMoveChoiceModification1
dw AIMoveChoiceModification2
dw AIMoveChoiceModification3
dw AIMoveChoiceModification4 ; unused, does nothing
; discourages moves that cause no damage but only a status ailment if player's mon already has one
-AIMoveChoiceModification1: ; 397ab (e:57ab)
+AIMoveChoiceModification1:
ld a, [wBattleMonStatus]
and a
ret z ; return if no status ailment on player's mon
@@ -155,7 +155,7 @@ StatusAilmentMoveEffects: ; 57e2
; slightly encourage moves with specific effects.
; in particular, stat-modifying moves and other move effects
; that fall in-bewteen
-AIMoveChoiceModification2: ; 397e7 (e:57e7)
+AIMoveChoiceModification2:
ld a, [wAILayer2Encouragement]
cp $1
ret nz
@@ -188,7 +188,7 @@ AIMoveChoiceModification2: ; 397e7 (e:57e7)
; encourages moves that are effective against the player's mon (even if non-damaging).
; discourage damaging moves that are ineffective or not very effective against the player's mon,
; unless there's no damaging move that deals at least neutral damage
-AIMoveChoiceModification3: ; 39817 (e:5817)
+AIMoveChoiceModification3:
ld hl, wBuffer - 1 ; temp move selection array (-1 byte offset)
ld de, wEnemyMonMoves ; enemy moves
ld b, NUM_MOVES + 1
@@ -255,10 +255,10 @@ AIMoveChoiceModification3: ; 39817 (e:5817)
jr z, .nextMove
inc [hl] ; sligthly discourage this move
jr .nextMove
-AIMoveChoiceModification4: ; 39883 (e:5883)
+AIMoveChoiceModification4:
ret
-ReadMove: ; 39884 (e:5884)
+ReadMove:
push hl
push de
push bc
@@ -275,7 +275,7 @@ ReadMove: ; 39884 (e:5884)
; move choice modification methods that are applied for each trainer class
; 0 is sentinel value
-TrainerClassMoveChoiceModifications: ; 3989b (e:589b)
+TrainerClassMoveChoiceModifications:
db 0 ; YOUNGSTER
db 1,0 ; BUG CATCHER
db 1,0 ; LASS
@@ -336,7 +336,7 @@ INCLUDE "data/trainer_moves.asm"
INCLUDE "data/trainer_parties.asm"
-TrainerAI: ; 3a52e (e:652e)
+TrainerAI:
and a
ld a,[wIsInBattle]
dec a
@@ -368,7 +368,7 @@ TrainerAI: ; 3a52e (e:652e)
call Random
jp [hl]
-TrainerAIPointers: ; 3a55c (e:655c)
+TrainerAIPointers:
; one entry per trainer class
; first byte, number of times (per Pokémon) it can occur
; next two bytes, pointer to AI subroutine for trainer class
@@ -420,27 +420,27 @@ TrainerAIPointers: ; 3a55c (e:655c)
dbw 2,AgathaAI ; agatha
dbw 1,LanceAI ; lance
-JugglerAI: ; 3a5e9 (e:65e9)
+JugglerAI:
cp $40
ret nc
jp AISwitchIfEnoughMons
-BlackbeltAI: ; 3a5ef (e:65ef)
+BlackbeltAI:
cp $20
ret nc
jp AIUseXAttack
-GiovanniAI: ; 3a5f5 (e:65f5)
+GiovanniAI:
cp $40
ret nc
jp AIUseGuardSpec
-CooltrainerMAI: ; 3a5fb (e:65fb)
+CooltrainerMAI:
cp $40
ret nc
jp AIUseXAttack
-CooltrainerFAI: ; 3a601 (e:6601)
+CooltrainerFAI:
cp $40
ld a,$A
call AICheckIfHPBelowFraction
@@ -450,24 +450,24 @@ CooltrainerFAI: ; 3a601 (e:6601)
ret nc
jp AISwitchIfEnoughMons
-BrockAI: ; 3a614 (e:6614)
+BrockAI:
; if his active monster has a status condition, use a full heal
ld a,[wEnemyMonStatus]
and a
ret z
jp AIUseFullHeal
-MistyAI: ; 3a61c (e:661c)
+MistyAI:
cp $40
ret nc
jp AIUseXDefend
-LtSurgeAI: ; 3a622 (e:6622)
+LtSurgeAI:
cp $40
ret nc
jp AIUseXSpeed
-ErikaAI: ; 3a628 (e:6628)
+ErikaAI:
cp $80
ret nc
ld a,$A
@@ -475,17 +475,17 @@ ErikaAI: ; 3a628 (e:6628)
ret nc
jp AIUseSuperPotion
-KogaAI: ; 3a634 (e:6634)
+KogaAI:
cp $40
ret nc
jp AIUseXAttack
-BlaineAI: ; 3a63a (e:663a)
+BlaineAI:
cp $40
ret nc
jp AIUseSuperPotion
-SabrinaAI: ; 3a640 (e:6640)
+SabrinaAI:
cp $40
ret nc
ld a,$A
@@ -493,7 +493,7 @@ SabrinaAI: ; 3a640 (e:6640)
ret nc
jp AIUseHyperPotion
-Sony2AI: ; 3a64c (e:664c)
+Sony2AI:
cp $20
ret nc
ld a,5
@@ -501,7 +501,7 @@ Sony2AI: ; 3a64c (e:664c)
ret nc
jp AIUsePotion
-Sony3AI: ; 3a658 (e:6658)
+Sony3AI:
cp $20
ret nc
ld a,5
@@ -509,7 +509,7 @@ Sony3AI: ; 3a658 (e:6658)
ret nc
jp AIUseFullRestore
-LoreleiAI: ; 3a664 (e:6664)
+LoreleiAI:
cp $80
ret nc
ld a,5
@@ -517,12 +517,12 @@ LoreleiAI: ; 3a664 (e:6664)
ret nc
jp AIUseSuperPotion
-BrunoAI: ; 3a670 (e:6670)
+BrunoAI:
cp $40
ret nc
jp AIUseXDefend
-AgathaAI: ; 3a676 (e:6676)
+AgathaAI:
cp $14
jp c,AISwitchIfEnoughMons
cp $80
@@ -532,7 +532,7 @@ AgathaAI: ; 3a676 (e:6676)
ret nc
jp AIUseSuperPotion
-LanceAI: ; 3a687 (e:6687)
+LanceAI:
cp $80
ret nc
ld a,5
@@ -540,23 +540,23 @@ LanceAI: ; 3a687 (e:6687)
ret nc
jp AIUseHyperPotion
-GenericAI: ; 3a693 (e:6693)
+GenericAI:
and a ; clear carry
ret
; end of individual trainer AI routines
-DecrementAICount: ; 3a695 (e:6695)
+DecrementAICount:
ld hl,wAICount
dec [hl]
scf
ret
-AIPlayRestoringSFX: ; 3a69b (e:669b)
+AIPlayRestoringSFX:
ld a,SFX_HEAL_AILMENT
jp PlaySoundWaitForCurrent
-AIUseFullRestore: ; 3a6a0 (e:66a0)
+AIUseFullRestore:
call AICureStatus
ld a,FULL_RESTORE
ld [wAIItem],a
@@ -580,25 +580,25 @@ AIUseFullRestore: ; 3a6a0 (e:66a0)
ld [wEnemyMonHP],a
jr AIPrintItemUseAndUpdateHPBar
-AIUsePotion: ; 3a6ca (e:66ca)
+AIUsePotion:
; enemy trainer heals his monster with a potion
ld a,POTION
ld b,20
jr AIRecoverHP
-AIUseSuperPotion: ; 3a6d0 (e:66d0)
+AIUseSuperPotion:
; enemy trainer heals his monster with a super potion
ld a,SUPER_POTION
ld b,50
jr AIRecoverHP
-AIUseHyperPotion: ; 3a6d6 (e:66d6)
+AIUseHyperPotion:
; enemy trainer heals his monster with a hyper potion
ld a,HYPER_POTION
ld b,200
; fallthrough
-AIRecoverHP: ; 3a6da (e:66da)
+AIRecoverHP:
; heal b HP and print "trainer used $(a) on pokemon!"
ld [wAIItem],a
ld hl,wEnemyMonHP + 1
@@ -639,7 +639,7 @@ AIRecoverHP: ; 3a6da (e:66da)
ld [wHPBarNewHP+1],a
; fallthrough
-AIPrintItemUseAndUpdateHPBar: ; 3a718 (e:6718)
+AIPrintItemUseAndUpdateHPBar:
call AIPrintItemUse_
coord hl, 2, 2
xor a
@@ -647,7 +647,7 @@ AIPrintItemUseAndUpdateHPBar: ; 3a718 (e:6718)
predef UpdateHPBar2
jp DecrementAICount
-AISwitchIfEnoughMons: ; 3a72a (e:672a)
+AISwitchIfEnoughMons:
; enemy trainer switches if there are 3 or more unfainted mons in party
ld a,[wEnemyPartyCount]
ld c,a
@@ -677,7 +677,7 @@ AISwitchIfEnoughMons: ; 3a72a (e:672a)
and a
ret
-SwitchEnemyMon: ; 3a74b (e:674b)
+SwitchEnemyMon:
; prepare to withdraw the active monster: copy hp, number, and status to roster
@@ -708,17 +708,17 @@ SwitchEnemyMon: ; 3a74b (e:674b)
scf
ret
-AIBattleWithdrawText: ; 3a781 (e:6781)
+AIBattleWithdrawText:
TX_FAR _AIBattleWithdrawText
db "@"
-AIUseFullHeal: ; 3a786 (e:6786)
+AIUseFullHeal:
call AIPlayRestoringSFX
call AICureStatus
ld a,FULL_HEAL
jp AIPrintItemUse
-AICureStatus: ; 3a791 (e:6791)
+AICureStatus:
; cures the status of enemy's active pokemon
ld a,[wEnemyMonPartyPos]
ld hl,wEnemyMon1Status
@@ -738,7 +738,7 @@ AIUseXAccuracy: ; 0x3a7a8 unused
ld a,X_ACCURACY
jp AIPrintItemUse
-AIUseGuardSpec: ; 3a7b5 (e:67b5)
+AIUseGuardSpec:
call AIPlayRestoringSFX
ld hl,wEnemyBattleStatus2
set 1,[hl]
@@ -752,7 +752,7 @@ AIUseDireHit: ; 0x3a7c2 unused
ld a,DIRE_HIT
jp AIPrintItemUse
-AICheckIfHPBelowFraction: ; 3a7cf (e:67cf)
+AICheckIfHPBelowFraction:
; return carry if enemy trainer's current HP is below 1 / a of the maximum
ld [H_DIVISOR],a
ld hl,wEnemyMonMaxHP
@@ -778,27 +778,27 @@ AICheckIfHPBelowFraction: ; 3a7cf (e:67cf)
sub c
ret
-AIUseXAttack: ; 3a7f2 (e:67f2)
+AIUseXAttack:
ld b,$A
ld a,X_ATTACK
jr AIIncreaseStat
-AIUseXDefend: ; 3a7f8 (e:67f8)
+AIUseXDefend:
ld b,$B
ld a,X_DEFEND
jr AIIncreaseStat
-AIUseXSpeed: ; 3a7fe (e:67fe)
+AIUseXSpeed:
ld b,$C
ld a,X_SPEED
jr AIIncreaseStat
-AIUseXSpecial: ; 3a804 (e:6804)
+AIUseXSpecial:
ld b,$D
ld a,X_SPECIAL
; fallthrough
-AIIncreaseStat: ; 3a808 (e:6808)
+AIIncreaseStat:
ld [wAIItem],a
push bc
call AIPrintItemUse_
@@ -820,12 +820,12 @@ AIIncreaseStat: ; 3a808 (e:6808)
ld [hl],a
jp DecrementAICount
-AIPrintItemUse: ; 3a82c (e:682c)
+AIPrintItemUse:
ld [wAIItem],a
call AIPrintItemUse_
jp DecrementAICount
-AIPrintItemUse_: ; 3a835 (e:6835)
+AIPrintItemUse_:
; print "x used [wAIItem] on z!"
ld a,[wAIItem]
ld [wd11e],a
@@ -833,6 +833,6 @@ AIPrintItemUse_: ; 3a835 (e:6835)
ld hl, AIBattleUseItemText
jp PrintText
-AIBattleUseItemText: ; 3a844 (e:6844)
+AIBattleUseItemText:
TX_FAR _AIBattleUseItemText
db "@"
diff --git a/engine/battle/trainer_pic_money_pointers.asm b/engine/battle/trainer_pic_money_pointers.asm
index 3f684db3..37678e74 100755
--- a/engine/battle/trainer_pic_money_pointers.asm
+++ b/engine/battle/trainer_pic_money_pointers.asm
@@ -1,4 +1,4 @@
-TrainerPicAndMoneyPointers: ; 39914 (e:5914)
+TrainerPicAndMoneyPointers:
; trainer pic pointers and base money.
; money received after battle = base money × level of highest-level enemy mon
dw YoungsterPic
diff --git a/engine/battle/unused_stats_functions.asm b/engine/battle/unused_stats_functions.asm
index 23ddbc20..55f78fd3 100644
--- a/engine/battle/unused_stats_functions.asm
+++ b/engine/battle/unused_stats_functions.asm
@@ -1,5 +1,5 @@
; does nothing since no stats are ever selected (barring glitches)
-DoubleSelectedStats: ; 39680 (e:5680)
+DoubleSelectedStats:
ld a, [H_WHOSETURN]
and a
ld a, [wPlayerStatsToDouble]
@@ -29,7 +29,7 @@ DoubleSelectedStats: ; 39680 (e:5680)
ret
; does nothing since no stats are ever selected (barring glitches)
-HalveSelectedStats: ; 396a7 (e:56a7)
+HalveSelectedStats:
ld a, [H_WHOSETURN]
and a
ld a, [wPlayerStatsToHalve]
diff --git a/engine/battle/wild_encounters.asm b/engine/battle/wild_encounters.asm
index 044f7ea5..231c46e7 100644
--- a/engine/battle/wild_encounters.asm
+++ b/engine/battle/wild_encounters.asm
@@ -1,6 +1,6 @@
; try to initiate a wild pokemon encounter
; returns success in Z
-TryDoWildEncounter: ; 13870 (4:7870)
+TryDoWildEncounter:
ld a, [wNPCMovementScriptPointerTableNum]
and a
ret nz
@@ -101,7 +101,7 @@ TryDoWildEncounter: ; 13870 (4:7870)
xor a
ret
-WildMonEncounterSlotChances: ; 13918 (4:7918)
+WildMonEncounterSlotChances:
; There are 10 slots for wild pokemon, and this is the table that defines how common each of
; those 10 slots is. A random number is generated and then the first byte of each pair in this
; table is compared against that random number. If the random number is less than or equal
diff --git a/engine/cable_club.asm b/engine/cable_club.asm
index f2f881d8..d9893f1f 100755
--- a/engine/cable_club.asm
+++ b/engine/cable_club.asm
@@ -1,7 +1,7 @@
; performs the appropriate action when the player uses the gameboy on the table in the Colosseum or Trade Center
; In the Colosseum, it starts a battle. In the Trade Center, it displays the trade selection screen.
; Before doing either action, it swaps random numbers, trainer names and party data with the other gameboy.
-CableClub_DoBattleOrTrade: ; 5317 (1:5317)
+CableClub_DoBattleOrTrade:
ld c, 80
call DelayFrames
call ClearScreen
@@ -289,7 +289,7 @@ CableClub_DoBattleOrTradeAgain: ; 5345
call PlayMusic
jr CallCurrentTradeCenterFunction
-PleaseWaitString: ; 550f (1:550f)
+PleaseWaitString:
db "PLEASE WAIT!@"
CallCurrentTradeCenterFunction:
@@ -576,7 +576,7 @@ TradeCenter_SelectMon:
jr nz, .cancelMenuItem_Loop
; fall through
-ReturnToCableClubRoom: ; 577d (1:577d)
+ReturnToCableClubRoom:
call GBPalWhiteOutWithDelay3
ld hl, wFontLoaded
ld a, [hl]
@@ -871,7 +871,7 @@ TradeCenter_Trade:
ld [wTradeCenterPointerTableIndex], a
jp CallCurrentTradeCenterFunction
-WillBeTradedText: ; 5a24 (1:5a24)
+WillBeTradedText:
TX_FAR _WillBeTradedText
db "@"
@@ -882,11 +882,11 @@ TradeCanceled:
db "Too bad! The trade"
next "was canceled!@"
-TradeCenterPointerTable: ; 5a5b (1:5a5b)
+TradeCenterPointerTable:
dw TradeCenter_SelectMon
dw TradeCenter_Trade
-CableClub_Run: ; 5a5f (1:5a5f)
+CableClub_Run:
ld a, [wLinkState]
cp LINK_STATE_START_TRADE
jr z, .doBattleOrTrade
@@ -923,15 +923,15 @@ CableClub_Run: ; 5a5f (1:5a5f)
ld [wNewSoundID], a
jp PlaySound
-EmptyFunc3: ; 5aaf (1:5aaf)
+EmptyFunc3:
ret
-Diploma_TextBoxBorder: ; 5ab0 (1:5ab0)
+Diploma_TextBoxBorder:
call GetPredefRegisters
; b = height
; c = width
-CableClub_TextBoxBorder: ; 5ab3 (1:5ab3)
+CableClub_TextBoxBorder:
push hl
ld a, $78 ; border upper left corner tile
ld [hli], a
@@ -962,7 +962,7 @@ CableClub_TextBoxBorder: ; 5ab3 (1:5ab3)
ret
; c = width
-CableClub_DrawHorizontalLine: ; 5ae0 (1:5ae0)
+CableClub_DrawHorizontalLine:
ld d, c
.asm_5ae1
ld [hli], a
diff --git a/engine/clear_save.asm b/engine/clear_save.asm
index adbef1a4..b47cd6c4 100755
--- a/engine/clear_save.asm
+++ b/engine/clear_save.asm
@@ -1,4 +1,4 @@
-DoClearSaveDialogue: ; 1c98a (7:498a)
+DoClearSaveDialogue:
call ClearScreen
call RunDefaultPaletteCommand
call LoadFontTilePatterns
@@ -18,6 +18,6 @@ DoClearSaveDialogue: ; 1c98a (7:498a)
callba ClearSAV
jp Init
-ClearSaveDataText: ; 1c9c1 (7:49c1)
+ClearSaveDataText:
TX_FAR _ClearSaveDataText
db "@"
diff --git a/engine/evolution.asm b/engine/evolution.asm
index c65cc293..c0a3434a 100755
--- a/engine/evolution.asm
+++ b/engine/evolution.asm
@@ -1,4 +1,4 @@
-EvolveMon: ; 7bde9 (1e:7de9)
+EvolveMon:
push hl
push de
push bc
@@ -93,16 +93,16 @@ EvolveMon: ; 7bde9 (1e:7de9)
ld a, [wEvoOldSpecies]
jr .done
-EvolutionSetWholeScreenPalette: ; 7beb4 (1e:7eb4)
+EvolutionSetWholeScreenPalette:
ld b, SET_PAL_POKEMON_WHOLE_SCREEN
jp RunPaletteCommand
-Evolution_LoadPic: ; 7beb9 (1e:7eb9)
+Evolution_LoadPic:
call GetMonHeader
coord hl, 7, 2
jp LoadFlippedFrontSpriteByMonIndex
-Evolution_BackAndForthAnim: ; 7bec2 (1e:7ec2)
+Evolution_BackAndForthAnim:
; show the mon change back and forth between the new and old species b times
ld a, $31
ld [wEvoMonTileOffset], a
@@ -114,7 +114,7 @@ Evolution_BackAndForthAnim: ; 7bec2 (1e:7ec2)
jr nz, Evolution_BackAndForthAnim
ret
-Evolution_ChangeMonPic: ; 7bed6 (1e:7ed6)
+Evolution_ChangeMonPic:
push bc
xor a
ld [H_AUTOBGTRANSFERENABLED], a
@@ -139,7 +139,7 @@ Evolution_ChangeMonPic: ; 7bed6 (1e:7ed6)
pop bc
ret
-Evolution_CheckForCancel: ; 7befa (1e:7efa)
+Evolution_CheckForCancel:
call DelayFrame
push bc
call JoypadLowSensitivity
diff --git a/engine/evolve_trade.asm b/engine/evolve_trade.asm
index 81e41166..e17fc05c 100755
--- a/engine/evolve_trade.asm
+++ b/engine/evolve_trade.asm
@@ -1,4 +1,4 @@
-EvolveTradeMon: ; 17d7d (5:7d7d)
+EvolveTradeMon:
; Verify the TradeMon's species name before
; attempting to initiate a trade evolution.
diff --git a/engine/evos_moves.asm b/engine/evos_moves.asm
index 2113e50a..f50f8081 100755
--- a/engine/evos_moves.asm
+++ b/engine/evos_moves.asm
@@ -1,5 +1,5 @@
; try to evolve the mon in [wWhichPokemon]
-TryEvolvingMon: ; 3ad0e (e:6d0e)
+TryEvolvingMon:
ld hl, wCanEvolveFlags
xor a
ld [hl], a
@@ -10,7 +10,7 @@ TryEvolvingMon: ; 3ad0e (e:6d0e)
; this is only called after battle
; it is supposed to do level up evolutions, though there is a bug that allows item evolutions to occur
-EvolutionAfterBattle: ; 3ad1c (e:6d1c)
+EvolutionAfterBattle:
ld a, [hTilesetType]
push af
xor a
@@ -257,7 +257,7 @@ Evolution_PartyMonLoop: ; loop over party mons
call nz, PlayDefaultMusic
ret
-RenameEvolvedMon: ; 3aef7 (e:6ef7)
+RenameEvolvedMon:
; Renames the mon to its new, evolved form's standard name unless it had a
; nickname, in which case the nickname is kept.
ld a, [wd0b5]
@@ -287,7 +287,7 @@ RenameEvolvedMon: ; 3aef7 (e:6ef7)
pop de
jp CopyData
-CancelledEvolution: ; 3af2e (e:6f2e)
+CancelledEvolution:
ld hl, StoppedEvolvingText
call PrintText
call ClearScreen
@@ -295,29 +295,29 @@ CancelledEvolution: ; 3af2e (e:6f2e)
call Evolution_ReloadTilesetTilePatterns
jp Evolution_PartyMonLoop
-EvolvedText: ; 3af3e (e:6f3e)
+EvolvedText:
TX_FAR _EvolvedText
db "@"
-IntoText: ; 3af43 (e:6f43)
+IntoText:
TX_FAR _IntoText
db "@"
-StoppedEvolvingText: ; 3af48 (e:6f48)
+StoppedEvolvingText:
TX_FAR _StoppedEvolvingText
db "@"
-IsEvolvingText: ; 3af4d (e:6f4d)
+IsEvolvingText:
TX_FAR _IsEvolvingText
db "@"
-Evolution_ReloadTilesetTilePatterns: ; 3af52 (e:6f52)
+Evolution_ReloadTilesetTilePatterns:
ld a, [wLinkState]
cp LINK_STATE_TRADING
ret z
jp ReloadTilesetTilePatterns
-LearnMoveFromLevelUp: ; 3af5b (e:6f5b)
+LearnMoveFromLevelUp:
ld hl, EvosMovesPointerTable
ld a, [wd11e] ; species
ld [wcf91], a
@@ -377,7 +377,7 @@ LearnMoveFromLevelUp: ; 3af5b (e:6f5b)
; writes the moves a mon has at level [wCurEnemyLVL] to [de]
; move slots are being filled up sequentially and shifted if all slots are full
-WriteMonMoves: ; 3afb8 (e:6fb8)
+WriteMonMoves:
call GetPredefRegisters
push hl
push de
@@ -497,7 +497,7 @@ WriteMonMoves: ; 3afb8 (e:6fb8)
ret
; shifts all move data one up (freeing 4th move slot)
-WriteMonMoves_ShiftMoveData: ; 3b04e (e:704e)
+WriteMonMoves_ShiftMoveData:
ld c, NUM_MOVES - 1
.loop
inc de
@@ -507,7 +507,7 @@ WriteMonMoves_ShiftMoveData: ; 3b04e (e:704e)
jr nz, .loop
ret
-Evolution_FlagAction: ; 3b057 (e:7057)
+Evolution_FlagAction:
predef_jump FlagActionPredef
INCLUDE "data/evos_moves.asm"
diff --git a/engine/experience.asm b/engine/experience.asm
index e1037950..2efc13de 100755
--- a/engine/experience.asm
+++ b/engine/experience.asm
@@ -1,5 +1,5 @@
; calculates the level a mon should be based on its current exp
-CalcLevelFromExperience: ; 58f43 (16:4f43)
+CalcLevelFromExperience:
ld a, [wLoadedMonSpecies]
ld [wd0b5], a
call GetMonHeader
@@ -28,7 +28,7 @@ CalcLevelFromExperience: ; 58f43 (16:4f43)
ret
; calculates the amount of experience needed for level d
-CalcExperience: ; 58f6a (16:4f6a)
+CalcExperience:
ld a, [wMonHGrowthRate]
add a
add a
@@ -137,7 +137,7 @@ CalcExperience: ; 58f6a (16:4f6a)
ret
; calculates d*d
-CalcDSquared: ; 59010 (16:5010)
+CalcDSquared:
xor a
ld [H_MULTIPLICAND], a
ld [H_MULTIPLICAND + 1], a
@@ -151,7 +151,7 @@ CalcDSquared: ; 59010 (16:5010)
; resulting in
; (a*n^3)/b + sign*c*n^2 + d*n - e
; where sign = -1 <=> S=1
-GrowthRateTable: ; 5901d (16:501d)
+GrowthRateTable:
db $11,$00,$00,$00 ; medium fast n^3
db $34,$0A,$00,$1E ; (unused?) 3/4 n^3 + 10 n^2 - 30
db $34,$14,$00,$46 ; (unused?) 3/4 n^3 + 20 n^2 - 70
diff --git a/engine/game_corner_slots.asm b/engine/game_corner_slots.asm
index ff17d4d3..3c5b3a10 100755
--- a/engine/game_corner_slots.asm
+++ b/engine/game_corner_slots.asm
@@ -1,4 +1,4 @@
-StartSlotMachine: ; 37e2d (d:7e2d)
+StartSlotMachine:
ld a, [wHiddenObjectFunctionArgument]
cp $fd
jr z, .printOutOfOrder
@@ -41,14 +41,14 @@ StartSlotMachine: ; 37e2d (d:7e2d)
call PrintPredefTextID
ret
-GameCornerOutOfOrderText: ; 37e79 (d:7e79)
+GameCornerOutOfOrderText:
TX_FAR _GameCornerOutOfOrderText
db "@"
-GameCornerOutToLunchText: ; 37e7e (d:7e7e)
+GameCornerOutToLunchText:
TX_FAR _GameCornerOutToLunchText
db "@"
-GameCornerSomeonesKeysText: ; 37e83 (d:7e83)
+GameCornerSomeonesKeysText:
TX_FAR _GameCornerSomeonesKeysText
db "@"
diff --git a/engine/game_corner_slots2.asm b/engine/game_corner_slots2.asm
index 58386ba1..6bbaf72d 100755
--- a/engine/game_corner_slots2.asm
+++ b/engine/game_corner_slots2.asm
@@ -1,4 +1,4 @@
-AbleToPlaySlotsCheck: ; 2ff09 (b:7f09)
+AbleToPlaySlotsCheck:
ld a, [wSpriteStateData1 + 2]
and $8
jr z, .done ; not able
@@ -22,10 +22,10 @@ AbleToPlaySlotsCheck: ; 2ff09 (b:7f09)
ld [wCanPlaySlots], a
ret
-GameCornerCoinCaseText: ; 2ff32 (b:7f32)
+GameCornerCoinCaseText:
TX_FAR _GameCornerCoinCaseText
db "@"
-GameCornerNoCoinsText: ; 2ff37 (b:7f37)
+GameCornerNoCoinsText:
TX_FAR _GameCornerNoCoinsText
db "@"
diff --git a/engine/gamefreak.asm b/engine/gamefreak.asm
index fa8faebc..69c059ff 100755
--- a/engine/gamefreak.asm
+++ b/engine/gamefreak.asm
@@ -1,4 +1,4 @@
-LoadShootingStarGraphics: ; 70000 (1c:4000)
+LoadShootingStarGraphics:
ld a, $f9
ld [rOBP0], a
ld a, $a4
@@ -24,7 +24,7 @@ LoadShootingStarGraphics: ; 70000 (1c:4000)
ld bc, GameFreakShootingStarOAMDataEnd - GameFreakShootingStarOAMData
jp CopyData
-AnimateShootingStar: ; 70044 (1c:4044)
+AnimateShootingStar:
call LoadShootingStarGraphics
ld a, SFX_SHOOTING_STAR
call PlaySound
@@ -145,11 +145,11 @@ AnimateShootingStar: ; 70044 (1c:4044)
and a
ret
-SmallStarsOAM: ; 700ee (1c:40ee)
+SmallStarsOAM:
db $00,$00,$A2,$90
SmallStarsOAMEnd:
-SmallStarsWaveCoordsPointerTable: ; 700f2 (1c:40f2)
+SmallStarsWaveCoordsPointerTable:
dw SmallStarsWave1Coords
dw SmallStarsWave2Coords
dw SmallStarsWave3Coords
@@ -160,34 +160,34 @@ SmallStarsWaveCoordsPointerTable: ; 700f2 (1c:40f2)
; The stars that fall from the Gamefreak logo come in 4 waves of 4 OAM entries.
; These arrays contain the Y and X coordinates of each OAM entry.
-SmallStarsWave1Coords: ; 700fe (1c:40fe)
+SmallStarsWave1Coords:
db $68,$30
db $68,$40
db $68,$58
db $68,$78
-SmallStarsWave2Coords: ; 70106 (1c:4106)
+SmallStarsWave2Coords:
db $68,$38
db $68,$48
db $68,$60
db $68,$70
-SmallStarsWave3Coords: ; 7010e (1c:410e)
+SmallStarsWave3Coords:
db $68,$34
db $68,$4C
db $68,$54
db $68,$64
-SmallStarsWave4Coords: ; 70116 (1c:4116)
+SmallStarsWave4Coords:
db $68,$3C
db $68,$5C
db $68,$6C
db $68,$74
-SmallStarsEmptyWave: ; 7011e (1c:411e)
+SmallStarsEmptyWave:
db $FF
-MoveDownSmallStars: ; 7011f (1c:411f)
+MoveDownSmallStars:
ld b, 8
.loop
ld hl, wOAMBuffer + $5c
@@ -213,7 +213,7 @@ MoveDownSmallStars: ; 7011f (1c:411f)
jr nz, .loop
ret
-GameFreakLogoOAMData: ; 70140 (1c:4140)
+GameFreakLogoOAMData:
db $48,$50,$8D,$00
db $48,$58,$8E,$00
db $50,$50,$8F,$00
@@ -232,13 +232,13 @@ GameFreakLogoOAMData: ; 70140 (1c:4140)
db $60,$78,$86,$00
GameFreakLogoOAMDataEnd:
-GameFreakShootingStarOAMData: ; 70180 (1c:4180)
+GameFreakShootingStarOAMData:
db $00,$A0,$A0,$10
db $00,$A8,$A0,$30
db $08,$A0,$A1,$10
db $08,$A8,$A1,$30
GameFreakShootingStarOAMDataEnd:
-FallingStar: ; 70190 (1c:4190)
+FallingStar:
INCBIN "gfx/falling_star.2bpp"
FallingStarEnd:
diff --git a/engine/give_pokemon.asm b/engine/give_pokemon.asm
index 33e7b426..549a042d 100755
--- a/engine/give_pokemon.asm
+++ b/engine/give_pokemon.asm
@@ -1,4 +1,4 @@
-_GivePokemon: ; 4fda5 (13:7da5)
+_GivePokemon:
; returns success in carry
; and whether the mon was added to the party in [wAddedToParty]
call EnableAutoTextBoxDrawing
@@ -51,7 +51,7 @@ _GivePokemon: ; 4fda5 (13:7da5)
scf
ret
-SetPokedexOwnedFlag: ; 4fe11 (13:7e11)
+SetPokedexOwnedFlag:
ld a, [wcf91]
push af
ld [wd11e], a
@@ -68,15 +68,15 @@ SetPokedexOwnedFlag: ; 4fe11 (13:7e11)
ld hl, GotMonText
jp PrintText
-GotMonText: ; 4fe39 (13:7e39)
+GotMonText:
TX_FAR _GotMonText
db $0b
db "@"
-SetToBoxText: ; 4fe3f (13:7e3f)
+SetToBoxText:
TX_FAR _SetToBoxText
db "@"
-BoxIsFullText: ; 4fe44 (13:7e44)
+BoxIsFullText:
TX_FAR _BoxIsFullText
db "@"
diff --git a/engine/hall_of_fame.asm b/engine/hall_of_fame.asm
index 4225c5a1..0e35f709 100755
--- a/engine/hall_of_fame.asm
+++ b/engine/hall_of_fame.asm
@@ -1,4 +1,4 @@
-AnimateHallOfFame: ; 701a0 (1c:41a0)
+AnimateHallOfFame:
call HoFFadeOutScreenAndMusic
call ClearScreen
ld c, 100
@@ -91,10 +91,10 @@ AnimateHallOfFame: ; 701a0 (1c:41a0)
res 3, [hl]
ret
-HallOfFameText: ; 7026b (1c:426b)
+HallOfFameText:
db "HALL OF FAME@"
-HoFShowMonOrPlayer: ; 70278 (1c:4278)
+HoFShowMonOrPlayer:
call ClearScreen
ld a, $d0
ld [hSCY], a
@@ -149,14 +149,14 @@ HoFShowMonOrPlayer: ; 70278 (1c:4278)
jr nz, .ScrollPic
ret
-HoFDisplayAndRecordMonInfo: ; 702e1 (1c:42e1)
+HoFDisplayAndRecordMonInfo:
ld a, [wHoFPartyMonIndex]
ld hl, wPartyMonNicks
call GetPartyMonName
call HoFDisplayMonInfo
jp HoFRecordMonInfo
-HoFDisplayMonInfo: ; 702f0 (1c:42f0)
+HoFDisplayMonInfo:
coord hl, 0, 2
ld b, 9
ld c, 10
@@ -177,12 +177,12 @@ HoFDisplayMonInfo: ; 702f0 (1c:42f0)
ld a, [wHoFMonSpecies]
jp PlayCry
-HoFMonInfoText: ; 70329 (1c:4329)
+HoFMonInfoText:
db "LEVEL/"
next "TYPE1/"
next "TYPE2/@"
-HoFLoadPlayerPics: ; 7033e (1c:433e)
+HoFLoadPlayerPics:
ld de, RedPicFront
ld a, BANK(RedPicFront)
call UncompressSpriteFromDE
@@ -200,13 +200,13 @@ HoFLoadPlayerPics: ; 7033e (1c:433e)
call InterlaceMergeSpriteBuffers
ld c, $1
-HoFLoadMonPlayerPicTileIDs: ; 7036d (1c:436d)
+HoFLoadMonPlayerPicTileIDs:
; c = base tile ID
ld b, 0
coord hl, 12, 5
predef_jump CopyTileIDsFromList
-HoFDisplayPlayerStats: ; 70377 (1c:4377)
+HoFDisplayPlayerStats:
SetEvent EVENT_HALL_OF_FAME_DEX_RATING
predef DisplayDexRating
coord hl, 0, 4
@@ -245,26 +245,26 @@ HoFDisplayPlayerStats: ; 70377 (1c:4377)
call HoFPrintTextAndDelay
ld hl, wDexRatingText
-HoFPrintTextAndDelay: ; 703e2 (1c:43e2)
+HoFPrintTextAndDelay:
call PrintText
ld c, 120
jp DelayFrames
-HoFPlayTimeText: ; 703ea (1c:43ea)
+HoFPlayTimeText:
db "PLAY TIME@"
-HoFMoneyText: ; 703f4 (1c:43f4)
+HoFMoneyText:
db "MONEY@"
-DexSeenOwnedText: ; 703fa (1c:43fa)
+DexSeenOwnedText:
TX_FAR _DexSeenOwnedText
db "@"
-DexRatingText: ; 703ff (1c:43ff)
+DexRatingText:
TX_FAR _DexRatingText
db "@"
-HoFRecordMonInfo: ; 70404 (1c:4404)
+HoFRecordMonInfo:
ld hl, wHallOfFame
ld bc, HOF_MON
ld a, [wHoFPartyMonIndex]
@@ -279,7 +279,7 @@ HoFRecordMonInfo: ; 70404 (1c:4404)
ld bc, NAME_LENGTH
jp CopyData
-HoFFadeOutScreenAndMusic: ; 70423 (1c:4423)
+HoFFadeOutScreenAndMusic:
ld a, 10
ld [wAudioFadeOutCounterReloadValue], a
ld [wAudioFadeOutCounter], a
diff --git a/engine/hidden_object_functions14.asm b/engine/hidden_object_functions14.asm
index 97187638..7591fac0 100755
--- a/engine/hidden_object_functions14.asm
+++ b/engine/hidden_object_functions14.asm
@@ -1,16 +1,16 @@
-PrintNotebookText: ; 52996 (14:6996)
+PrintNotebookText:
call EnableAutoTextBoxDrawing
ld a, $1
ld [wDoNotWaitForButtonPressAfterDisplayingText], a
ld a, [wHiddenObjectFunctionArgument]
jp PrintPredefTextID
-TMNotebook: ; 529a4 (14:69a4)
+TMNotebook:
TX_FAR TMNotebookText
db $0d
db "@"
-ViridianSchoolNotebook: ; 529aa (14:69aa)
+ViridianSchoolNotebook:
TX_ASM
ld hl, ViridianSchoolNotebookText1
call PrintText
@@ -31,7 +31,7 @@ ViridianSchoolNotebook: ; 529aa (14:69aa)
.doneReading
jp TextScriptEnd
-TurnPageSchoolNotebook: ; 529db (14:69db)
+TurnPageSchoolNotebook:
ld hl, TurnPageText
call PrintText
call YesNoChoice
@@ -39,62 +39,62 @@ TurnPageSchoolNotebook: ; 529db (14:69db)
and a
ret
-TurnPageText: ; 529e9 (14:69e9)
+TurnPageText:
TX_FAR _TurnPageText
db "@"
-ViridianSchoolNotebookText5: ; 529ee (14:69ee)
+ViridianSchoolNotebookText5:
TX_FAR _ViridianSchoolNotebookText5
db $0d
db "@"
-ViridianSchoolNotebookText1: ; 529f4 (14:69f4)
+ViridianSchoolNotebookText1:
TX_FAR _ViridianSchoolNotebookText1
db "@"
-ViridianSchoolNotebookText2: ; 529f9 (14:69f9)
+ViridianSchoolNotebookText2:
TX_FAR _ViridianSchoolNotebookText2
db "@"
-ViridianSchoolNotebookText3: ; 529fe (14:69fe)
+ViridianSchoolNotebookText3:
TX_FAR _ViridianSchoolNotebookText3
db "@"
-ViridianSchoolNotebookText4: ; 52a03 (14:6a03)
+ViridianSchoolNotebookText4:
TX_FAR _ViridianSchoolNotebookText4
db "@"
-PrintFightingDojoText2: ; 52a08 (14:6a08)
+PrintFightingDojoText2:
call EnableAutoTextBoxDrawing
tx_pre_jump FightingDojoText_52a10
-FightingDojoText_52a10: ; 52a10 (14:6a10)
+FightingDojoText_52a10:
TX_FAR _FightingDojoText_52a10
db "@"
-PrintFightingDojoText3: ; 52a15 (14:6a15)
+PrintFightingDojoText3:
call EnableAutoTextBoxDrawing
tx_pre_jump FightingDojoText_52a1d
-FightingDojoText_52a1d: ; 52a1d (14:6a1d)
+FightingDojoText_52a1d:
TX_FAR _FightingDojoText_52a1d
db "@"
-PrintFightingDojoText: ; 52a22 (14:6a22)
+PrintFightingDojoText:
call EnableAutoTextBoxDrawing
tx_pre_jump FightingDojoText
-FightingDojoText: ; 52a2a (14:6a2a)
+FightingDojoText:
TX_FAR _FightingDojoText
db "@"
-PrintIndigoPlateauHQText: ; 52a2f (14:6a2f)
+PrintIndigoPlateauHQText:
ld a, [wSpriteStateData1 + 9]
cp SPRITE_FACING_UP
ret nz
call EnableAutoTextBoxDrawing
tx_pre_jump IndigoPlateauHQText
-IndigoPlateauHQText: ; 52a3d (14:6a3d)
+IndigoPlateauHQText:
TX_FAR _IndigoPlateauHQText
db "@"
diff --git a/engine/hidden_object_functions17.asm b/engine/hidden_object_functions17.asm
index 67cba382..dee5efea 100755
--- a/engine/hidden_object_functions17.asm
+++ b/engine/hidden_object_functions17.asm
@@ -1,19 +1,19 @@
-PrintRedSNESText: ; 5db79 (17:5b79)
+PrintRedSNESText:
call EnableAutoTextBoxDrawing
tx_pre_jump RedBedroomSNESText
-RedBedroomSNESText: ; 5db81 (17:5b81)
+RedBedroomSNESText:
TX_FAR _RedBedroomSNESText
db "@"
-OpenRedsPC: ; 5db86 (17:5b86)
+OpenRedsPC:
call EnableAutoTextBoxDrawing
tx_pre_jump RedBedroomPCText
-RedBedroomPCText: ; 5db8e (17:5b8e)
+RedBedroomPCText:
TX_PLAYERS_PC
-Route15GateLeftBinoculars: ; 5db8f (17:5b8f)
+Route15GateLeftBinoculars:
ld a, [wSpriteStateData1 + 9]
cp SPRITE_FACING_UP
ret nz
@@ -24,11 +24,11 @@ Route15GateLeftBinoculars: ; 5db8f (17:5b8f)
call PlayCry
jp DisplayMonFrontSpriteInBox
-Route15UpstairsBinocularsText: ; 5dba8 (17:5ba8)
+Route15UpstairsBinocularsText:
TX_FAR _Route15UpstairsBinocularsText
db "@"
-AerodactylFossil: ; 5dbad (17:5bad)
+AerodactylFossil:
ld a, FOSSIL_AERODACTYL
ld [wcf91], a
call DisplayMonFrontSpriteInBox
@@ -36,11 +36,11 @@ AerodactylFossil: ; 5dbad (17:5bad)
tx_pre AerodactylFossilText
ret
-AerodactylFossilText: ; 5dbbe (17:5bbe)
+AerodactylFossilText:
TX_FAR _AerodactylFossilText
db "@"
-KabutopsFossil: ; 5bdc3 (17:5bc3)
+KabutopsFossil:
ld a, FOSSIL_KABUTOPS
ld [wcf91], a
call DisplayMonFrontSpriteInBox
@@ -48,11 +48,11 @@ KabutopsFossil: ; 5bdc3 (17:5bc3)
tx_pre KabutopsFossilText
ret
-KabutopsFossilText: ; 5dbd4 (17:5bd4)
+KabutopsFossilText:
TX_FAR _KabutopsFossilText
db "@"
-DisplayMonFrontSpriteInBox: ; 5dbd9 (17:5bd9)
+DisplayMonFrontSpriteInBox:
; Displays a pokemon's front sprite in a pop-up window.
; [wcf91] = pokemon interal id number
ld a, 1
@@ -81,7 +81,7 @@ DisplayMonFrontSpriteInBox: ; 5dbd9 (17:5bd9)
ld [hWY], a
ret
-PrintBlackboardLinkCableText: ; 5dc1a (17:5c1a)
+PrintBlackboardLinkCableText:
call EnableAutoTextBoxDrawing
ld a, $1
ld [wDoNotWaitForButtonPressAfterDisplayingText], a
@@ -89,7 +89,7 @@ PrintBlackboardLinkCableText: ; 5dc1a (17:5c1a)
call PrintPredefTextID
ret
-LinkCableHelp: ; 5dc29 (17:5c29)
+LinkCableHelp:
TX_ASM
call SaveScreenTilesToBuffer1
ld hl, LinkCableHelpText1
@@ -142,38 +142,38 @@ LinkCableHelp: ; 5dc29 (17:5c29)
call LoadScreenTilesFromBuffer1
jp TextScriptEnd
-LinkCableHelpText1: ; 5dc9e (17:5c9e)
+LinkCableHelpText1:
TX_FAR _LinkCableHelpText1
db "@"
-LinkCableHelpText2: ; 5dca3 (17:5ca3)
+LinkCableHelpText2:
TX_FAR _LinkCableHelpText2
db "@"
-HowToLinkText: ; 5dca8 (17:5ca8)
+HowToLinkText:
db "HOW TO LINK"
next "COLOSSEUM"
next "TRADE CENTER"
next "STOP READING@"
-LinkCableInfoTexts: ; 5dcd8 (17:5cd8)
+LinkCableInfoTexts:
dw LinkCableInfoText1
dw LinkCableInfoText2
dw LinkCableInfoText3
-LinkCableInfoText1: ; 5dcde (17:5cde)
+LinkCableInfoText1:
TX_FAR _LinkCableInfoText1
db "@"
-LinkCableInfoText2: ; 5dce3 (17:5ce3)
+LinkCableInfoText2:
TX_FAR _LinkCableInfoText2
db "@"
-LinkCableInfoText3: ; 5dce8 (17:5ce8)
+LinkCableInfoText3:
TX_FAR _LinkCableInfoText3
db "@"
-ViridianSchoolBlackboard: ; 5dced (17:5ced)
+ViridianSchoolBlackboard:
TX_ASM
call SaveScreenTilesToBuffer1
ld hl, ViridianSchoolBlackboardText1
@@ -259,60 +259,60 @@ ViridianSchoolBlackboard: ; 5dced (17:5ced)
call LoadScreenTilesFromBuffer1
jp TextScriptEnd
-ViridianSchoolBlackboardText1: ; 5dda2 (17:5da2)
+ViridianSchoolBlackboardText1:
TX_FAR _ViridianSchoolBlackboardText1
db "@"
-ViridianSchoolBlackboardText2: ; 5dda7 (17:5da7)
+ViridianSchoolBlackboardText2:
TX_FAR _ViridianSchoolBlackboardText2
db "@"
-StatusAilmentText1: ; 5ddac (17:5dac)
+StatusAilmentText1:
db " SLP"
next " PSN"
next " PAR@"
-StatusAilmentText2: ; 5ddbb (17:5dbb)
+StatusAilmentText2:
db " BRN"
next " FRZ"
next " QUIT@@"
-ViridianBlackboardStatusPointers: ; 5ddcc (17:5ddc)
+ViridianBlackboardStatusPointers:
dw ViridianBlackboardSleepText
dw ViridianBlackboardPoisonText
dw ViridianBlackboardPrlzText
dw ViridianBlackboardBurnText
dw ViridianBlackboardFrozenText
-ViridianBlackboardSleepText: ; 5ddd6 (17:5dd6)
+ViridianBlackboardSleepText:
TX_FAR _ViridianBlackboardSleepText
db "@"
-ViridianBlackboardPoisonText: ; 5dddb (17:5ddb)
+ViridianBlackboardPoisonText:
TX_FAR _ViridianBlackboardPoisonText
db "@"
-ViridianBlackboardPrlzText: ; 5dde0 (17:5de0)
+ViridianBlackboardPrlzText:
TX_FAR _ViridianBlackboardPrlzText
db "@"
-ViridianBlackboardBurnText: ; 5dde5 (17:5de5)
+ViridianBlackboardBurnText:
TX_FAR _ViridianBlackboardBurnText
db "@"
-ViridianBlackboardFrozenText: ; 5ddea (17:5dea)
+ViridianBlackboardFrozenText:
TX_FAR _ViridianBlackboardFrozenText
db "@"
-PrintTrashText: ; 5ddef (17:5def)
+PrintTrashText:
call EnableAutoTextBoxDrawing
tx_pre_jump VermilionGymTrashText
-VermilionGymTrashText: ; 5ddf7 (17:5df7)
+VermilionGymTrashText:
TX_FAR _VermilionGymTrashText
db "@"
-GymTrashScript: ; 5ddfc (17:5dfc)
+GymTrashScript:
call EnableAutoTextBoxDrawing
ld a, [wHiddenObjectFunctionArgument]
ld [wGymTrashCanIndex], a
@@ -410,7 +410,7 @@ GymTrashScript: ; 5ddfc (17:5dfc)
.done
jp PrintPredefTextID
-GymTrashCans: ; 5de7d (17:5e7d)
+GymTrashCans:
; byte 0: mask for random number
; bytes 1-4: indices of the trash cans that can have the second lock
; (but see the comment above explaining a bug regarding this)
@@ -434,7 +434,7 @@ GymTrashCans: ; 5de7d (17:5e7d)
db 2, 11, 13, 0, 0 ; 14
; 5dec8
-VermilionGymTrashSuccessText1: ; 5dec8 (17:5ec8)
+VermilionGymTrashSuccessText1:
TX_FAR _VermilionGymTrashSuccessText1
TX_ASM
call WaitForSoundToFinish
@@ -444,12 +444,12 @@ VermilionGymTrashSuccessText1: ; 5dec8 (17:5ec8)
jp TextScriptEnd
; unused
-VermilionGymTrashSuccessText2: ; 5dedb (17:5edb)
+VermilionGymTrashSuccessText2:
TX_FAR _VermilionGymTrashSuccessText2
db "@"
; unused
-VermilionGymTrashSuccesPlaySfx: ; 5dee0 (17:5ee0)
+VermilionGymTrashSuccesPlaySfx:
TX_ASM
call WaitForSoundToFinish
ld a, SFX_SWITCH
@@ -457,7 +457,7 @@ VermilionGymTrashSuccesPlaySfx: ; 5dee0 (17:5ee0)
call WaitForSoundToFinish
jp TextScriptEnd
-VermilionGymTrashSuccessText3: ; 5deef (17:5eef)
+VermilionGymTrashSuccessText3:
TX_FAR _VermilionGymTrashSuccessText3
TX_ASM
call WaitForSoundToFinish
@@ -466,7 +466,7 @@ VermilionGymTrashSuccessText3: ; 5deef (17:5eef)
call WaitForSoundToFinish
jp TextScriptEnd
-VermilionGymTrashFailText: ; 5df02 (17:5f02)
+VermilionGymTrashFailText:
TX_FAR _VermilionGymTrashFailText
TX_ASM
call WaitForSoundToFinish
diff --git a/engine/hidden_object_functions18.asm b/engine/hidden_object_functions18.asm
index e8b990e5..6ce582ed 100755
--- a/engine/hidden_object_functions18.asm
+++ b/engine/hidden_object_functions18.asm
@@ -1,4 +1,4 @@
-GymStatues: ; 62419 (18:6419)
+GymStatues:
; if in a gym and have the corresponding badge, a = GymStatueText2_id and jp PrintPredefTextID
; if in a gym and don’t have the corresponding badge, a = GymStatueText1_id and jp PrintPredefTextID
; else ret
@@ -28,7 +28,7 @@ GymStatues: ; 62419 (18:6419)
.haveBadge
jp PrintPredefTextID
-.BadgeFlags: ; 62442 (18:6442)
+.BadgeFlags:
db PEWTER_GYM, %00000001
db CERULEAN_GYM, %00000010
db VERMILION_GYM,%00000100
@@ -39,15 +39,15 @@ GymStatues: ; 62419 (18:6419)
db VIRIDIAN_GYM, %10000000
db $ff
-GymStatueText1: ; 62453 (18:6453)
+GymStatueText1:
TX_FAR _GymStatueText1
db "@"
-GymStatueText2: ; 62458 (18:6458)
+GymStatueText2:
TX_FAR _GymStatueText2
db "@"
-PrintBenchGuyText: ; 6245d (18:645d)
+PrintBenchGuyText:
call EnableAutoTextBoxDrawing
ld hl, BenchGuyTextPointers
ld a, [wCurMap]
@@ -71,7 +71,7 @@ PrintBenchGuyText: ; 6245d (18:645d)
jp PrintPredefTextID
; format: db map id, player sprite facing direction, text id of PredefTextIDPointerTable
-BenchGuyTextPointers: ; 6247e (18:647e)
+BenchGuyTextPointers:
db VIRIDIAN_POKECENTER, SPRITE_FACING_LEFT
db (ViridianCityPokecenterBenchGuyText_id - TextPredefs) / 2 + 1
db PEWTER_POKECENTER, SPRITE_FACING_LEFT
@@ -98,59 +98,59 @@ BenchGuyTextPointers: ; 6247e (18:647e)
db (RockTunnelPokecenterBenchGuyText_id - TextPredefs) / 2 + 1
db $FF
-ViridianCityPokecenterBenchGuyText: ; 624a3 (18:64a3)
+ViridianCityPokecenterBenchGuyText:
TX_FAR _ViridianCityPokecenterGuyText
db "@"
-PewterCityPokecenterBenchGuyText: ; 624a8 (18:64a8)
+PewterCityPokecenterBenchGuyText:
TX_FAR _PewterCityPokecenterGuyText
db "@"
-CeruleanCityPokecenterBenchGuyText: ; 624ad (18:64ad)
+CeruleanCityPokecenterBenchGuyText:
TX_FAR _CeruleanPokecenterGuyText
db "@"
-LavenderCityPokecenterBenchGuyText: ; 624b2 (18:64b2)
+LavenderCityPokecenterBenchGuyText:
TX_FAR _LavenderPokecenterGuyText
db "@"
-MtMoonPokecenterBenchGuyText: ; 624b7 (18:64b7)
+MtMoonPokecenterBenchGuyText:
TX_FAR _MtMoonPokecenterBenchGuyText
db "@"
-RockTunnelPokecenterBenchGuyText: ; 624bc (18:64bc)
+RockTunnelPokecenterBenchGuyText:
TX_FAR _RockTunnelPokecenterGuyText
db "@"
-UnusedBenchGuyText1: ; 624c1 (18:64c1)
+UnusedBenchGuyText1:
TX_FAR _UnusedBenchGuyText1
db "@"
-UnusedBenchGuyText2: ; 624c6 (18:64c6)
+UnusedBenchGuyText2:
TX_FAR _UnusedBenchGuyText2
db "@"
-UnusedBenchGuyText3: ; 624cb (18:64cb)
+UnusedBenchGuyText3:
TX_FAR _UnusedBenchGuyText3
db "@"
-VermilionCityPokecenterBenchGuyText: ; 624d0 (18:64d0)
+VermilionCityPokecenterBenchGuyText:
TX_FAR _VermilionPokecenterGuyText
db "@"
-CeladonCityPokecenterBenchGuyText: ; 624d5 (18:64d5)
+CeladonCityPokecenterBenchGuyText:
TX_FAR _CeladonCityPokecenterGuyText
db "@"
-FuchsiaCityPokecenterBenchGuyText: ; 624da (18:64da)
+FuchsiaCityPokecenterBenchGuyText:
TX_FAR _FuchsiaCityPokecenterGuyText
db "@"
-CinnabarIslandPokecenterBenchGuyText: ; 624df (18:64df)
+CinnabarIslandPokecenterBenchGuyText:
TX_FAR _CinnabarPokecenterGuyText
db "@"
-SaffronCityPokecenterBenchGuyText: ; 624e4 (18:64e4)
+SaffronCityPokecenterBenchGuyText:
TX_ASM
CheckEvent EVENT_BEAT_SILPH_CO_GIOVANNI
ld hl, SaffronCityPokecenterBenchGuyText2
@@ -160,32 +160,32 @@ SaffronCityPokecenterBenchGuyText: ; 624e4 (18:64e4)
call PrintText
jp TextScriptEnd
-SaffronCityPokecenterBenchGuyText1: ; 624f8 (18:64f8)
+SaffronCityPokecenterBenchGuyText1:
TX_FAR _SaffronCityPokecenterGuyText1
db "@"
-SaffronCityPokecenterBenchGuyText2: ; 624fd (18:64fd)
+SaffronCityPokecenterBenchGuyText2:
TX_FAR _SaffronCityPokecenterGuyText2
db "@"
-CeladonCityHotelText: ; 62502 (18:6502)
+CeladonCityHotelText:
TX_FAR _CeladonCityHotelText
db "@"
ret
-UnusedPredefText: ; 62508 (18:6508)
+UnusedPredefText:
db "@"
-PrintBookcaseText: ; 6509 (18:6509)
+PrintBookcaseText:
call EnableAutoTextBoxDrawing
tx_pre_jump BookcaseText
-BookcaseText: ; 62511 (18:6511)
+BookcaseText:
TX_FAR _BookcaseText
db "@"
-OpenPokemonCenterPC: ; 62516 (18:6516)
+OpenPokemonCenterPC:
ld a, [wSpriteStateData1 + 9]
cp SPRITE_FACING_UP ; check to see if player is facing up
ret nz
@@ -194,5 +194,5 @@ OpenPokemonCenterPC: ; 62516 (18:6516)
ld [wAutoTextBoxDrawingControl], a
tx_pre_jump PokemonCenterPCText
-PokemonCenterPCText: ; 62529 (18:6529)
+PokemonCenterPCText:
TX_POKECENTER_PC
diff --git a/engine/hidden_object_functions3.asm b/engine/hidden_object_functions3.asm
index d6e25cec..efdbd081 100755
--- a/engine/hidden_object_functions3.asm
+++ b/engine/hidden_object_functions3.asm
@@ -1,5 +1,5 @@
; prints text for bookshelves in buildings without sign events
-PrintBookshelfText: ; fb50 (3:7b50)
+PrintBookshelfText:
ld a, [wSpriteStateData1 + 9] ; player's sprite facing direction
cp SPRITE_FACING_UP
jr nz, .noMatch
@@ -37,7 +37,7 @@ PrintBookshelfText: ; fb50 (3:7b50)
jpba PrintCardKeyText
; format: db tileset id, bookshelf tile id, text id
-BookshelfTileIDs: ; fb8b (3:7b8b)
+BookshelfTileIDs:
db PLATEAU, $30
db (IndigoPlateauStatues_id - TextPredefs) / 2 + 1
db HOUSE, $3D
@@ -74,7 +74,7 @@ BookshelfTileIDs: ; fb8b (3:7b8b)
db (BookOrSculptureText_id - TextPredefs) / 2 + 1
db $FF
-IndigoPlateauStatues: ; fbbf (3:7bbf)
+IndigoPlateauStatues:
TX_ASM
ld hl, IndigoPlateauStatuesText1
call PrintText
@@ -87,19 +87,19 @@ IndigoPlateauStatues: ; fbbf (3:7bbf)
call PrintText
jp TextScriptEnd
-IndigoPlateauStatuesText1: ; fbd9 (3:7bd9)
+IndigoPlateauStatuesText1:
TX_FAR _IndigoPlateauStatuesText1
db "@"
-IndigoPlateauStatuesText2: ; fbde (3:7bde)
+IndigoPlateauStatuesText2:
TX_FAR _IndigoPlateauStatuesText2
db "@"
-IndigoPlateauStatuesText3: ; fbe3 (3:7be3)
+IndigoPlateauStatuesText3:
TX_FAR _IndigoPlateauStatuesText3
db "@"
-BookOrSculptureText: ; fbe8 (3:7be8)
+BookOrSculptureText:
TX_ASM
ld hl, PokemonBooksText
ld a, [wCurMapTileset]
@@ -113,19 +113,19 @@ BookOrSculptureText: ; fbe8 (3:7be8)
call PrintText
jp TextScriptEnd
-PokemonBooksText: ; fc03 (3:7c03)
+PokemonBooksText:
TX_FAR _PokemonBooksText
db "@"
-DiglettSculptureText: ; fc08 (3:7c08)
+DiglettSculptureText:
TX_FAR _DiglettSculptureText
db "@"
-ElevatorText: ; fc0d (3:7c0d)
+ElevatorText:
TX_FAR _ElevatorText
db "@"
-TownMapText: ; fc12 (3:7c12)
+TownMapText:
TX_FAR _TownMapText
db $06
TX_ASM
@@ -148,6 +148,6 @@ TownMapText: ; fc12 (3:7c12)
push af
jp CloseTextDisplay
-PokemonStuffText: ; fc45 (3:7c45)
+PokemonStuffText:
TX_FAR _PokemonStuffText
db "@"
diff --git a/engine/hidden_object_functions7.asm b/engine/hidden_object_functions7.asm
index 7ab0637b..9b1532bc 100755
--- a/engine/hidden_object_functions7.asm
+++ b/engine/hidden_object_functions7.asm
@@ -1,20 +1,20 @@
-PrintNewBikeText: ; 1e94b (7:694b)
+PrintNewBikeText:
call EnableAutoTextBoxDrawing
tx_pre_jump NewBicycleText
-NewBicycleText: ; 1e953 (7:6953)
+NewBicycleText:
TX_FAR _NewBicycleText
db "@"
-DisplayOakLabLeftPoster: ; 1e958 (7:6958)
+DisplayOakLabLeftPoster:
call EnableAutoTextBoxDrawing
tx_pre_jump PushStartText
-PushStartText: ; 1e960 (7:6960)
+PushStartText:
TX_FAR _PushStartText
db "@"
-DisplayOakLabRightPoster: ; 1e965 (7:6965)
+DisplayOakLabRightPoster:
call EnableAutoTextBoxDrawing
ld hl, wPokedexOwned
ld b, wPokedexOwnedEnd - wPokedexOwned
@@ -28,15 +28,15 @@ DisplayOakLabRightPoster: ; 1e965 (7:6965)
.ownLessThanTwo
jp PrintPredefTextID
-SaveOptionText: ; 1e97e (7:697e)
+SaveOptionText:
TX_FAR _SaveOptionText
db "@"
-StrengthsAndWeaknessesText: ; 1e983 (7:6983)
+StrengthsAndWeaknessesText:
TX_FAR _StrengthsAndWeaknessesText
db "@"
-SafariZoneCheck: ; 1e988 (7:6988)
+SafariZoneCheck:
CheckEventHL EVENT_IN_SAFARI_ZONE ; if we are not in the Safari Zone,
jr z, SafariZoneGameStillGoing ; don't bother printing game over text
ld a, [wNumSafariBalls]
@@ -44,7 +44,7 @@ SafariZoneCheck: ; 1e988 (7:6988)
jr z, SafariZoneGameOver
jr SafariZoneGameStillGoing
-SafariZoneCheckSteps: ; 1e997 (7:6997)
+SafariZoneCheckSteps:
ld a, [wSafariSteps]
ld b, a
ld a, [wSafariSteps + 1]
@@ -56,12 +56,12 @@ SafariZoneCheckSteps: ; 1e997 (7:6997)
ld [wSafariSteps], a
ld a, c
ld [wSafariSteps + 1], a
-SafariZoneGameStillGoing: ; 1e9ab (7:69ab)
+SafariZoneGameStillGoing:
xor a
ld [wSafariZoneGameOver], a
ret
-SafariZoneGameOver: ; 1e9b0 (7:69b0)
+SafariZoneGameOver:
call EnableAutoTextBoxDrawing
xor a
ld [wAudioFadeOutControl], a
@@ -90,13 +90,13 @@ SafariZoneGameOver: ; 1e9b0 (7:69b0)
ld [wSafariZoneGameOver], a
ret
-PrintSafariGameOverText: ; 1e9ed (7:69ed)
+PrintSafariGameOverText:
xor a
ld [wJoyIgnore], a
ld hl, SafariGameOverText
jp PrintText
-SafariGameOverText: ; 1e9f7 (7:69f7)
+SafariGameOverText:
TX_ASM
ld a, [wNumSafariBalls]
and a
@@ -108,22 +108,22 @@ SafariGameOverText: ; 1e9f7 (7:69f7)
call PrintText
jp TextScriptEnd
-TimesUpText: ; 1ea0d (7:6a0d)
+TimesUpText:
TX_FAR _TimesUpText
db "@"
-GameOverText: ; 1ea12 (7:6a12)
+GameOverText:
TX_FAR _GameOverText
db "@"
-PrintCinnabarQuiz: ; 1ea17 (7:6a17)
+PrintCinnabarQuiz:
ld a, [wSpriteStateData1 + 9]
cp SPRITE_FACING_UP
ret nz
call EnableAutoTextBoxDrawing
tx_pre_jump CinnabarGymQuiz
-CinnabarGymQuiz: ; 1ea25 (7:6a25)
+CinnabarGymQuiz:
TX_ASM
xor a
ld [wOpponentAfterWrongAnswer], a
@@ -153,11 +153,11 @@ CinnabarGymQuiz: ; 1ea25 (7:6a25)
call CinnabarGymQuiz_1ea92
jp TextScriptEnd
-CinnabarGymQuizIntroText: ; 1ea5b (7:6a5b)
+CinnabarGymQuizIntroText:
TX_FAR _CinnabarGymQuizIntroText
db "@"
-CinnabarQuizQuestions: ; 1ea60 (7:6a60)
+CinnabarQuizQuestions:
dw CinnabarQuizQuestionsText1
dw CinnabarQuizQuestionsText2
dw CinnabarQuizQuestionsText3
@@ -165,35 +165,35 @@ CinnabarQuizQuestions: ; 1ea60 (7:6a60)
dw CinnabarQuizQuestionsText5
dw CinnabarQuizQuestionsText6
-CinnabarQuizQuestionsText1: ; 1ea6c (7:6a6c)
+CinnabarQuizQuestionsText1:
TX_FAR _CinnabarQuizQuestionsText1
db "@"
-CinnabarQuizQuestionsText2: ; 1ea71 (7:6a71)
+CinnabarQuizQuestionsText2:
TX_FAR _CinnabarQuizQuestionsText2
db "@"
-CinnabarQuizQuestionsText3: ; 1ea76 (7:6a76)
+CinnabarQuizQuestionsText3:
TX_FAR _CinnabarQuizQuestionsText3
db "@"
-CinnabarQuizQuestionsText4: ; 1ea7b (7:6a7b)
+CinnabarQuizQuestionsText4:
TX_FAR _CinnabarQuizQuestionsText4
db "@"
-CinnabarQuizQuestionsText5: ; 1ea80 (7:6a80)
+CinnabarQuizQuestionsText5:
TX_FAR _CinnabarQuizQuestionsText5
db "@"
-CinnabarQuizQuestionsText6: ; 1ea85 (7:6a85)
+CinnabarQuizQuestionsText6:
TX_FAR _CinnabarQuizQuestionsText6
db "@"
-CinnabarGymGateFlagAction: ; 1ea8a (7:6a8a)
+CinnabarGymGateFlagAction:
EventFlagAddress hl, EVENT_CINNABAR_GYM_GATE0_UNLOCKED
predef_jump FlagActionPredef
-CinnabarGymQuiz_1ea92: ; 1ea92 (7:6a92)
+CinnabarGymQuiz_1ea92:
call YesNoChoice
ld a, [$ffdc]
ld c, a
@@ -234,7 +234,7 @@ CinnabarGymQuiz_1ea92: ; 1ea92 (7:6a92)
ld [wOpponentAfterWrongAnswer], a
ret
-CinnabarGymQuizCorrectText: ; 1eae3 (7:6ae3)
+CinnabarGymQuizCorrectText:
db $0b
TX_FAR _CinnabarGymQuizCorrectText
db $06
@@ -254,11 +254,11 @@ CinnabarGymQuizCorrectText: ; 1eae3 (7:6ae3)
call WaitForSoundToFinish
jp TextScriptEnd
-CinnabarGymQuizIncorrectText: ; 1eb05 (7:6b05)
+CinnabarGymQuizIncorrectText:
TX_FAR _CinnabarGymQuizIncorrectText
db "@"
-UpdateCinnabarGymGateTileBlocks_: ; 1eb0a (7:6b0a)
+UpdateCinnabarGymGateTileBlocks_:
; Update the overworld map with open floor blocks or locked gate blocks
; depending on event flags.
ld a, 6
@@ -301,7 +301,7 @@ UpdateCinnabarGymGateTileBlocks_: ; 1eb0a (7:6b0a)
jr nz, .loop
ret
-CinnabarGymGateCoords: ; 1eb48 (7:6b48)
+CinnabarGymGateCoords:
; format: x-coord, y-coord, direction, padding
; direction: $54 = horizontal gate, $5f = vertical gate
db $09,$03,$54,$00
@@ -311,16 +311,16 @@ CinnabarGymGateCoords: ; 1eb48 (7:6b48)
db $02,$06,$54,$00
db $02,$03,$54,$00
-PrintMagazinesText: ; 1eb60 (7:6b60)
+PrintMagazinesText:
call EnableAutoTextBoxDrawing
tx_pre MagazinesText
ret
-MagazinesText: ; 1eb69 (7:6b69)
+MagazinesText:
TX_FAR _MagazinesText
db "@"
-BillsHousePC: ; 1eb6e (7:6b6e)
+BillsHousePC:
call EnableAutoTextBoxDrawing
ld a, [wSpriteStateData1 + 9]
cp SPRITE_FACING_UP
@@ -366,11 +366,11 @@ BillsHousePC: ; 1eb6e (7:6b6e)
tx_pre BillsHousePokemonList
ret
-BillsHouseMonitorText: ; 1ebdd (7:6bdd)
+BillsHouseMonitorText:
TX_FAR _BillsHouseMonitorText
db "@"
-BillsHouseInitiatedText: ; 1ebe2 (7:6be2)
+BillsHouseInitiatedText:
TX_FAR _BillsHouseInitiatedText
db $06
TX_ASM
@@ -386,7 +386,7 @@ BillsHouseInitiatedText: ; 1ebe2 (7:6be2)
call DelayFrames
jp TextScriptEnd
-BillsHousePokemonList: ; 1ec05 (7:6c05)
+BillsHousePokemonList:
TX_ASM
call SaveScreenTilesToBuffer1
ld hl, BillsHousePokemonListText1
@@ -440,28 +440,28 @@ BillsHousePokemonList: ; 1ec05 (7:6c05)
call LoadScreenTilesFromBuffer2
jp TextScriptEnd
-BillsHousePokemonListText1: ; 1ec7f (7:6c7f)
+BillsHousePokemonListText1:
TX_FAR _BillsHousePokemonListText1
db "@"
-BillsMonListText: ; 1ec84 (7:6c84)
+BillsMonListText:
db "EEVEE"
next "FLAREON"
next "JOLTEON"
next "VAPOREON"
next "CANCEL@"
-BillsHousePokemonListText2: ; 1ecaa (7:6caa)
+BillsHousePokemonListText2:
TX_FAR _BillsHousePokemonListText2
db "@"
-DisplayOakLabEmailText: ; 1ecaf (7:6caf)
+DisplayOakLabEmailText:
ld a, [wSpriteStateData1 + 9]
cp SPRITE_FACING_UP
ret nz
call EnableAutoTextBoxDrawing
tx_pre_jump OakLabEmailText
-OakLabEmailText: ; 1ecbd (7:6cbd)
+OakLabEmailText:
TX_FAR _OakLabEmailText
db "@"
diff --git a/engine/hp_bar.asm b/engine/hp_bar.asm
index 792661ab..3fa01208 100755
--- a/engine/hp_bar.asm
+++ b/engine/hp_bar.asm
@@ -1,9 +1,9 @@
-HPBarLength: ; f9dc (3:79dc)
+HPBarLength:
call GetPredefRegisters
; calculates bc * 48 / de, the number of pixels the HP bar has
; the result is always at least 1
-GetHPBarLength: ; f9df (3:79df)
+GetHPBarLength:
push hl
xor a
ld hl, H_MULTIPLICAND
@@ -45,7 +45,7 @@ GetHPBarLength: ; f9df (3:79df)
ret
; predef $48
-UpdateHPBar: ; fa1d (3:7a1d)
+UpdateHPBar:
UpdateHPBar2:
push hl
ld hl, wHPBarOldHP
@@ -136,7 +136,7 @@ UpdateHPBar2:
; animates the HP bar going up or down for (a) ticks (two waiting frames each)
; stops prematurely if bar is filled up
; e: current health (in pixels) to start with
-UpdateHPBar_AnimateHPBar: ; fab1 (3:7ab1)
+UpdateHPBar_AnimateHPBar:
push hl
.barAnimationLoop
push af
@@ -162,7 +162,7 @@ UpdateHPBar_AnimateHPBar: ; fab1 (3:7ab1)
ret
; compares old HP and new HP and sets c and z flags accordingly
-UpdateHPBar_CompareNewHPToOldHP: ; fad1 (3:7ad1)
+UpdateHPBar_CompareNewHPToOldHP:
ld a, d
sub b
ret nz
@@ -171,7 +171,7 @@ UpdateHPBar_CompareNewHPToOldHP: ; fad1 (3:7ad1)
ret
; calcs HP difference between bc and de (into de)
-UpdateHPBar_CalcHPDifference: ; fad7 (3:7ad7)
+UpdateHPBar_CalcHPDifference:
ld a, d
sub b
jr c, .oldHPGreater
@@ -200,7 +200,7 @@ UpdateHPBar_CalcHPDifference: ; fad7 (3:7ad7)
ld de, $0
ret
-UpdateHPBar_PrintHPNumber: ; faf5 (3:7af5)
+UpdateHPBar_PrintHPNumber:
push af
push de
ld a, [wHPBarType]
@@ -240,7 +240,7 @@ UpdateHPBar_PrintHPNumber: ; faf5 (3:7af5)
; calcs number of HP bar pixels for old and new HP value
; d: new pixels
; e: old pixels
-UpdateHPBar_CalcOldNewHPBarPixels: ; fb30 (3:7b30)
+UpdateHPBar_CalcOldNewHPBarPixels:
push hl
ld hl, wHPBarMaxHP
ld a, [hli] ; max HP into de
diff --git a/engine/in_game_trades.asm b/engine/in_game_trades.asm
index 176d6af7..bacf531b 100755
--- a/engine/in_game_trades.asm
+++ b/engine/in_game_trades.asm
@@ -1,4 +1,4 @@
-DoInGameTradeDialogue: ; 71ad9 (1c:5ad9)
+DoInGameTradeDialogue:
; trigger the trade offer/action specified by wWhichTrade
call SaveScreenTilesToBuffer2
ld hl,TradeMons
@@ -75,7 +75,7 @@ DoInGameTradeDialogue: ; 71ad9 (1c:5ad9)
jp PrintText
; copies name of species a to hl
-InGameTrade_GetMonName: ; 71b6a (1c:5b6a)
+InGameTrade_GetMonName:
push de
ld [wd11e],a
call GetMonName
@@ -86,7 +86,7 @@ InGameTrade_GetMonName: ; 71b6a (1c:5b6a)
INCLUDE "data/trades.asm"
-InGameTrade_DoTrade: ; 71c07 (1c:5c07)
+InGameTrade_DoTrade:
xor a ; NORMAL_PARTY_MENU
ld [wPartyMenuTypeOrMessageID],a
dec a
@@ -150,7 +150,7 @@ InGameTrade_DoTrade: ; 71c07 (1c:5c07)
ld [wInGameTradeTextPointerTableIndex],a
ret
-InGameTrade_RestoreScreen: ; 71ca2 (1c:5ca2)
+InGameTrade_RestoreScreen:
call GBPalWhiteOutWithDelay3
call RestoreScreenTilesAndReloadTilePatterns
call ReloadTilesetTilePatterns
@@ -161,7 +161,7 @@ InGameTrade_RestoreScreen: ; 71ca2 (1c:5ca2)
call DelayFrames
jpba LoadWildData
-InGameTrade_PrepareTradeData: ; 71cc1 (1c:5cc1)
+InGameTrade_PrepareTradeData:
ld hl, wTradedPlayerMonSpecies
ld a, [wInGameTradeGiveMonSpecies]
ld [hli], a ; wTradedPlayerMonSpecies
@@ -191,7 +191,7 @@ InGameTrade_PrepareTradeData: ; 71cc1 (1c:5cc1)
ld de, wTradedEnemyMonOTID
jp CopyData
-InGameTrade_CopyData: ; 71d11 (1c:5d11)
+InGameTrade_CopyData:
push hl
push bc
call CopyData
@@ -199,7 +199,7 @@ InGameTrade_CopyData: ; 71d11 (1c:5d11)
pop hl
ret
-InGameTrade_CopyDataToReceivedMon: ; 71d19 (1c:5d19)
+InGameTrade_CopyDataToReceivedMon:
ld hl, wPartyMonNicks
ld bc, NAME_LENGTH
call InGameTrade_GetReceivedMonPointer
@@ -221,7 +221,7 @@ InGameTrade_CopyDataToReceivedMon: ; 71d19 (1c:5d19)
; the received mon's index is (partyCount - 1),
; so this adds bc to hl (partyCount - 1) times and moves the result to de
-InGameTrade_GetReceivedMonPointer: ; 71d4f (1c:5d4f)
+InGameTrade_GetReceivedMonPointer:
ld a, [wPartyCount]
dec a
call AddNTimes
@@ -229,100 +229,100 @@ InGameTrade_GetReceivedMonPointer: ; 71d4f (1c:5d4f)
ld d, h
ret
-InGameTrade_TrainerString: ; 71d59 (1c:5d59)
+InGameTrade_TrainerString:
; "TRAINER@@@@@@@@@@"
db $5d, "@@@@@@@@@@"
-InGameTradeTextPointers: ; 71d64 (1c:5d64)
+InGameTradeTextPointers:
dw TradeTextPointers1
dw TradeTextPointers2
dw TradeTextPointers3
-TradeTextPointers1: ; 71d6a (1c:5d6a)
+TradeTextPointers1:
dw WannaTrade1Text
dw NoTrade1Text
dw WrongMon1Text
dw Thanks1Text
dw AfterTrade1Text
-TradeTextPointers2: ; 71d74 (1c:5d74)
+TradeTextPointers2:
dw WannaTrade2Text
dw NoTrade2Text
dw WrongMon2Text
dw Thanks2Text
dw AfterTrade2Text
-TradeTextPointers3: ; 71d7e (1c:5d7e)
+TradeTextPointers3:
dw WannaTrade3Text
dw NoTrade3Text
dw WrongMon3Text
dw Thanks3Text
dw AfterTrade3Text
-ConnectCableText: ; 71d88 (1c:5d88)
+ConnectCableText:
TX_FAR _ConnectCableText
db "@"
-TradedForText: ; 71d8d (1c:5d8d)
+TradedForText:
TX_FAR _TradedForText
db $11, $a, "@"
-WannaTrade1Text: ; 71d94 (1c:5d94)
+WannaTrade1Text:
TX_FAR _WannaTrade1Text
db "@"
-NoTrade1Text: ; 71d99 (1c:5d99)
+NoTrade1Text:
TX_FAR _NoTrade1Text
db "@"
-WrongMon1Text: ; 71d9e (1c:5d9e)
+WrongMon1Text:
TX_FAR _WrongMon1Text
db "@"
-Thanks1Text: ; 71da3 (1c:5da3)
+Thanks1Text:
TX_FAR _Thanks1Text
db "@"
-AfterTrade1Text: ; 71da8 (1c:5da8)
+AfterTrade1Text:
TX_FAR _AfterTrade1Text
db "@"
-WannaTrade2Text: ; 71dad (1c:5dad)
+WannaTrade2Text:
TX_FAR _WannaTrade2Text
db "@"
-NoTrade2Text: ; 71db2 (1c:5db2)
+NoTrade2Text:
TX_FAR _NoTrade2Text
db "@"
-WrongMon2Text: ; 71db7 (1c:5db7)
+WrongMon2Text:
TX_FAR _WrongMon2Text
db "@"
-Thanks2Text: ; 71dbc (1c:5dbc)
+Thanks2Text:
TX_FAR _Thanks2Text
db "@"
-AfterTrade2Text: ; 71dc1 (1c:5dc1)
+AfterTrade2Text:
TX_FAR _AfterTrade2Text
db "@"
-WannaTrade3Text: ; 71dc6 (1c:5dc6)
+WannaTrade3Text:
TX_FAR _WannaTrade3Text
db "@"
-NoTrade3Text: ; 71dcb (1c:5dcb)
+NoTrade3Text:
TX_FAR _NoTrade3Text
db "@"
-WrongMon3Text: ; 71dd0 (1c:5dd0)
+WrongMon3Text:
TX_FAR _WrongMon3Text
db "@"
-Thanks3Text: ; 71dd5 (1c:5dd5)
+Thanks3Text:
TX_FAR _Thanks3Text
db "@"
-AfterTrade3Text: ; 71dda (1c:5dda)
+AfterTrade3Text:
TX_FAR _AfterTrade3Text
db "@"
diff --git a/engine/intro.asm b/engine/intro.asm
index e0c8242c..320267c7 100755
--- a/engine/intro.asm
+++ b/engine/intro.asm
@@ -2,7 +2,7 @@ MOVE_GENGAR_RIGHT EQU $00
MOVE_GENGAR_LEFT EQU $01
MOVE_NIDORINO_RIGHT EQU $ff
-PlayIntro: ; 41682 (10:5682)
+PlayIntro:
xor a
ld [hJoyHeld], a
inc a
@@ -17,7 +17,7 @@ PlayIntro: ; 41682 (10:5682)
call DelayFrame
ret
-PlayIntroScene: ; 4169d (10:569d)
+PlayIntroScene:
ld b, SET_PAL_NIDORINO_INTRO
call RunPaletteCommand
ld a, %11100100
@@ -137,7 +137,7 @@ PlayIntroScene: ; 4169d (10:569d)
ld de, IntroNidorinoAnimation7
jp AnimateIntroNidorino
-AnimateIntroNidorino: ; 41793 (10:5793)
+AnimateIntroNidorino:
ld a, [de]
cp $50
ret z
@@ -154,7 +154,7 @@ AnimateIntroNidorino: ; 41793 (10:5793)
inc de
jr AnimateIntroNidorino
-UpdateIntroNidorinoOAM: ; 417ae (10:57ae)
+UpdateIntroNidorinoOAM:
ld hl, wOAMBuffer
ld a, [wIntroNidorinoBaseTile]
ld d, a
@@ -173,7 +173,7 @@ UpdateIntroNidorinoOAM: ; 417ae (10:57ae)
jr nz, .loop
ret
-InitIntroNidorinoOAM: ; 417c7 (10:57c7)
+InitIntroNidorinoOAM:
ld hl, wOAMBuffer
ld d, 0
.loop
@@ -202,17 +202,17 @@ InitIntroNidorinoOAM: ; 417c7 (10:57c7)
jr nz, .loop
ret
-IntroClearScreen: ; 417f0 (10:57f0)
+IntroClearScreen:
ld hl, vBGMap1
ld bc, $240
jr IntroClearCommon
-IntroClearMiddleOfScreen: ; 417f8 (10:57f8)
+IntroClearMiddleOfScreen:
; clear the area of the tile map between the black bars on the top and bottom
coord hl, 0, 4
ld bc, SCREEN_WIDTH * 10
-IntroClearCommon: ; 417fe (10:57fe)
+IntroClearCommon:
ld [hl], $0
inc hl
dec bc
@@ -221,7 +221,7 @@ IntroClearCommon: ; 417fe (10:57fe)
jr nz, IntroClearCommon
ret
-IntroPlaceBlackTiles: ; 41807 (10:5807)
+IntroPlaceBlackTiles:
ld a, $1
.loop
ld [hli], a
@@ -229,7 +229,7 @@ IntroPlaceBlackTiles: ; 41807 (10:5807)
jr nz, .loop
ret
-IntroMoveMon: ; 4180e (10:580e)
+IntroMoveMon:
; d = number of times to move the mon (2 pixels each time)
; e: $00 = move Gengar right, $01 = move Gengar left, $ff = move Nidorino right
ld a, e
@@ -266,20 +266,20 @@ IntroMoveMon: ; 4180e (10:580e)
jr nz, IntroMoveMon
ret
-IntroCopyTiles: ; 4183f (10:583f)
+IntroCopyTiles:
coord hl, 13, 7
-CopyTileIDsFromList_ZeroBaseTileID: ; 41842 (10:5842)
+CopyTileIDsFromList_ZeroBaseTileID:
ld c, 0
predef_jump CopyTileIDsFromList
-PlayMoveSoundB: ; 41849 (10:5849)
+PlayMoveSoundB:
; unused
predef GetMoveSoundB
ld a, b
jp PlaySound
-LoadIntroGraphics: ; 41852 (10:5852)
+LoadIntroGraphics:
ld hl, FightIntroBackMon
ld de, vChars2
ld bc, FightIntroBackMonEnd - FightIntroBackMon
@@ -301,7 +301,7 @@ LoadIntroGraphics: ; 41852 (10:5852)
ld a, BANK(FightIntroFrontMon)
jp FarCopyData2
-PlayShootingStar: ; 4188a (10:588a)
+PlayShootingStar:
ld b, SET_PAL_GAME_FREAK_INTRO
call RunPaletteCommand
callba LoadCopyrightAndTextBoxTiles
@@ -338,7 +338,7 @@ PlayShootingStar: ; 4188a (10:588a)
call ClearSprites
jp Delay3
-IntroDrawBlackBars: ; 418e9 (10:58e9)
+IntroDrawBlackBars:
; clear the screen and draw black bars on the top and bottom
call IntroClearScreen
coord hl, 0, 0
@@ -354,14 +354,14 @@ IntroDrawBlackBars: ; 418e9 (10:58e9)
ld c, $80
jp IntroPlaceBlackTiles
-EmptyFunc4: ; 4190c (10:590c)
+EmptyFunc4:
ret
-IntroNidorinoAnimation0: ; 4190d (10:590d)
+IntroNidorinoAnimation0:
db 0, 0
db $50
-IntroNidorinoAnimation1: ; 41910 (10:5910)
+IntroNidorinoAnimation1:
; This is a sequence of pixel movements for part of the Nidorino animation. This
; list describes how Nidorino should hop.
; First byte is y movement, second byte is x movement
@@ -372,7 +372,7 @@ IntroNidorinoAnimation1: ; 41910 (10:5910)
db 2, 2
db $50 ; list terminator
-IntroNidorinoAnimation2: ; 4191b (10:591b)
+IntroNidorinoAnimation2:
; This is a sequence of pixel movements for part of the Nidorino animation.
; First byte is y movement, second byte is x movement
db 0, 0
@@ -382,7 +382,7 @@ IntroNidorinoAnimation2: ; 4191b (10:591b)
db 2, -2
db $50 ; list terminator
-IntroNidorinoAnimation3: ; 41926 (10:5926)
+IntroNidorinoAnimation3:
; This is a sequence of pixel movements for part of the Nidorino animation.
; First byte is y movement, second byte is x movement
db 0, 0
@@ -392,7 +392,7 @@ IntroNidorinoAnimation3: ; 41926 (10:5926)
db 12, 6
db $50 ; list terminator
-IntroNidorinoAnimation4: ; 41931 (10:5931)
+IntroNidorinoAnimation4:
; This is a sequence of pixel movements for part of the Nidorino animation.
; First byte is y movement, second byte is x movement
db 0, 0
@@ -402,7 +402,7 @@ IntroNidorinoAnimation4: ; 41931 (10:5931)
db 8, -4
db $50 ; list terminator
-IntroNidorinoAnimation5: ; 4193c (10:593c)
+IntroNidorinoAnimation5:
; This is a sequence of pixel movements for part of the Nidorino animation.
; First byte is y movement, second byte is x movement
db 0, 0
@@ -412,7 +412,7 @@ IntroNidorinoAnimation5: ; 4193c (10:593c)
db 8, 4
db $50 ; list terminator
-IntroNidorinoAnimation6: ; 41947 (10:5947)
+IntroNidorinoAnimation6:
; This is a sequence of pixel movements for part of the Nidorino animation.
; First byte is y movement, second byte is x movement
db 0, 0
@@ -421,7 +421,7 @@ IntroNidorinoAnimation6: ; 41947 (10:5947)
db 0, 0
db $50 ; list terminator
-IntroNidorinoAnimation7: ; 41950 (10:5950)
+IntroNidorinoAnimation7:
; This is a sequence of pixel movements for part of the Nidorino animation.
; First byte is y movement, second byte is x movement
db -8, -16
@@ -430,17 +430,17 @@ IntroNidorinoAnimation7: ; 41950 (10:5950)
db -4, -10
db $50 ; list terminator
-GameFreakIntro: ; 41959 (10:5959)
+GameFreakIntro:
INCBIN "gfx/gamefreak_intro.2bpp"
INCBIN "gfx/gamefreak_logo.2bpp"
ds $10 ; blank tile
GameFreakIntroEnd:
-FightIntroBackMon: ; 41a99 (10:5a99)
+FightIntroBackMon:
INCBIN "gfx/intro_fight.2bpp"
FightIntroBackMonEnd:
-FightIntroFrontMon: ; 42099 (10:6099)
+FightIntroFrontMon:
IF DEF(_RED)
INCBIN "gfx/red/intro_nido_1.6x6.2bpp"
diff --git a/engine/items/itemfinder.asm b/engine/items/itemfinder.asm
index d638b0b8..7c15d4bb 100755
--- a/engine/items/itemfinder.asm
+++ b/engine/items/itemfinder.asm
@@ -1,4 +1,4 @@
-HiddenItemNear: ; 7481f (1d:481f)
+HiddenItemNear:
ld hl, HiddenItemCoords
ld b, 0
.loop
@@ -43,7 +43,7 @@ HiddenItemNear: ; 7481f (1d:481f)
scf
ret
-Sub5ClampTo0: ; 7486b (1d:486b)
+Sub5ClampTo0:
; subtract 5 but clamp to 0
sub 5
cp $f0
diff --git a/engine/items/items.asm b/engine/items/items.asm
index 1dd0a6f7..a6717494 100755
--- a/engine/items/items.asm
+++ b/engine/items/items.asm
@@ -1,4 +1,4 @@
-UseItem_: ; d5c7 (3:55c7)
+UseItem_:
ld a,1
ld [wActionResultOrTookBattleTurn],a ; initialise to success value
ld a,[wcf91] ;contains item_ID
@@ -15,7 +15,7 @@ UseItem_: ; d5c7 (3:55c7)
ld l,a
jp [hl]
-ItemUsePtrTable: ; d5e1 (3:55e1)
+ItemUsePtrTable:
dw ItemUseBall ; MASTER_BALL
dw ItemUseBall ; ULTRA_BALL
dw ItemUseBall ; GREAT_BALL
@@ -100,7 +100,7 @@ ItemUsePtrTable: ; d5e1 (3:55e1)
dw ItemUsePPRestore ; ELIXER
dw ItemUsePPRestore ; MAX_ELIXER
-ItemUseBall: ; d687 (3:5687)
+ItemUseBall:
; Balls can't be used out of battle.
ld a,[wIsInBattle]
@@ -583,56 +583,56 @@ ItemUseBall: ; d687 (3:5687)
ld [wItemQuantity],a
jp RemoveItemFromInventory
-ItemUseBallText00: ; d937 (3:5937)
+ItemUseBallText00:
;"It dodged the thrown ball!"
;"This pokemon can't be caught"
TX_FAR _ItemUseBallText00
db "@"
-ItemUseBallText01: ; d93c (3:593c)
+ItemUseBallText01:
;"You missed the pokemon!"
TX_FAR _ItemUseBallText01
db "@"
-ItemUseBallText02: ; d941 (3:5941)
+ItemUseBallText02:
;"Darn! The pokemon broke free!"
TX_FAR _ItemUseBallText02
db "@"
-ItemUseBallText03: ; d946 (3:5946)
+ItemUseBallText03:
;"Aww! It appeared to be caught!"
TX_FAR _ItemUseBallText03
db "@"
-ItemUseBallText04: ; d94b (3:594b)
+ItemUseBallText04:
;"Shoot! It was so close too!"
TX_FAR _ItemUseBallText04
db "@"
-ItemUseBallText05: ; d950 (3:5950)
+ItemUseBallText05:
;"All right! {MonName} was caught!"
;play sound
TX_FAR _ItemUseBallText05
db $12,$06
db "@"
-ItemUseBallText07: ; d957 (3:5957)
+ItemUseBallText07:
;"X was transferred to Bill's PC"
TX_FAR _ItemUseBallText07
db "@"
-ItemUseBallText08: ; d95c (3:595c)
+ItemUseBallText08:
;"X was transferred to someone's PC"
TX_FAR _ItemUseBallText08
db "@"
-ItemUseBallText06: ; d961 (3:5961)
+ItemUseBallText06:
;"New DEX data will be added..."
;play sound
TX_FAR _ItemUseBallText06
db $13,$06
db "@"
-ItemUseTownMap: ; d968 (3:5968)
+ItemUseTownMap:
ld a,[wIsInBattle]
and a
jp nz,ItemUseNotTime
jpba DisplayTownMap
-ItemUseBicycle: ; d977 (3:5977)
+ItemUseBicycle:
ld a,[wIsInBattle]
and a
jp nz,ItemUseNotTime
@@ -663,7 +663,7 @@ ItemUseBicycle: ; d977 (3:5977)
jp PrintText
; used for Surf out-of-battle effect
-ItemUseSurfboard: ; d9b4 (3:59b4)
+ItemUseSurfboard:
ld a,[wWalkBikeSurfState]
ld [wWalkBikeSurfStateCopy],a
cp a,2 ; is the player already surfing?
@@ -742,18 +742,18 @@ ItemUseSurfboard: ; d9b4 (3:59b4)
ld [wSimulatedJoypadStatesIndex],a
ret
-SurfingGotOnText: ; da4c (3:5a4c)
+SurfingGotOnText:
TX_FAR _SurfingGotOnText
db "@"
-SurfingNoPlaceToGetOffText: ; da51 (3:5a51)
+SurfingNoPlaceToGetOffText:
TX_FAR _SurfingNoPlaceToGetOffText
db "@"
-ItemUsePokedex: ; da56 (3:5a56)
+ItemUsePokedex:
predef_jump ShowPokedexMenu
-ItemUseEvoStone: ; da5b (3:5a5b)
+ItemUseEvoStone:
ld a,[wIsInBattle]
and a
jp nz,ItemUseNotTime
@@ -794,12 +794,12 @@ ItemUseEvoStone: ; da5b (3:5a5b)
pop af
ret
-ItemUseVitamin: ; dab4 (3:5ab4)
+ItemUseVitamin:
ld a,[wIsInBattle]
and a
jp nz,ItemUseNotTime
-ItemUseMedicine: ; dabb (3:5abb)
+ItemUseMedicine:
ld a,[wPartyCount]
and a
jp z,.emptyParty
@@ -1414,22 +1414,22 @@ ItemUseMedicine: ; dabb (3:5abb)
ld [wWhichPokemon],a
jp RemoveUsedItem
-VitaminStatRoseText: ; df24 (3:5f24)
+VitaminStatRoseText:
TX_FAR _VitaminStatRoseText
db "@"
-VitaminNoEffectText: ; df29 (3:5f29)
+VitaminNoEffectText:
TX_FAR _VitaminNoEffectText
db "@"
-VitaminText: ; df2e (3:5f2e)
+VitaminText:
db "HEALTH@"
db "ATTACK@"
db "DEFENSE@"
db "SPEED@"
db "SPECIAL@"
-ItemUseBait: ; df52 (3:5f52)
+ItemUseBait:
ld hl,ThrewBaitText
call PrintText
ld hl,wEnemyMonCatchRate ; catch rate
@@ -1439,7 +1439,7 @@ ItemUseBait: ; df52 (3:5f52)
ld de,wSafariEscapeFactor ; escape factor
jr BaitRockCommon
-ItemUseRock: ; df67 (3:5f67)
+ItemUseRock:
ld hl,ThrewRockText
call PrintText
ld hl,wEnemyMonCatchRate ; catch rate
@@ -1453,7 +1453,7 @@ ItemUseRock: ; df67 (3:5f67)
ld hl,wSafariEscapeFactor ; escape factor
ld de,wSafariBaitFactor ; bait factor
-BaitRockCommon: ; df7f (3:5f7f)
+BaitRockCommon:
ld [wAnimationID],a
xor a
ld [wAnimationType],a
@@ -1476,16 +1476,16 @@ BaitRockCommon: ; df7f (3:5f7f)
ld c,70
jp DelayFrames
-ThrewBaitText: ; dfa5 (3:5fa5)
+ThrewBaitText:
TX_FAR _ThrewBaitText
db "@"
-ThrewRockText: ; dfaa (3:5faa)
+ThrewRockText:
TX_FAR _ThrewRockText
db "@"
; also used for Dig out-of-battle effect
-ItemUseEscapeRope: ; dfaf (3:5faf)
+ItemUseEscapeRope:
ld a,[wIsInBattle]
and a
jr nz,.notUsable
@@ -1523,14 +1523,14 @@ ItemUseEscapeRope: ; dfaf (3:5faf)
.notUsable
jp ItemUseNotTime
-EscapeRopeTilesets: ; dffd (3:5ffd)
+EscapeRopeTilesets:
db FOREST, CEMETERY, CAVERN, FACILITY, INTERIOR
db $ff ; terminator
-ItemUseRepel: ; e003 (3:6003)
+ItemUseRepel:
ld b,100
-ItemUseRepelCommon: ; e005 (3:6005)
+ItemUseRepelCommon:
ld a,[wIsInBattle]
and a
jp nz,ItemUseNotTime
@@ -1539,7 +1539,7 @@ ItemUseRepelCommon: ; e005 (3:6005)
jp PrintItemUseTextAndRemoveItem
; handles X Accuracy item
-ItemUseXAccuracy: ; e013 (3:6013)
+ItemUseXAccuracy:
ld a,[wIsInBattle]
and a
jp z,ItemUseNotTime
@@ -1549,7 +1549,7 @@ ItemUseXAccuracy: ; e013 (3:6013)
; This function is bugged and never works. It always jumps to ItemUseNotTime.
; The Card Key is handled in a different way.
-ItemUseCardKey: ; e022 (3:6022)
+ItemUseCardKey:
xor a
ld [wUnusedD71F],a
call GetTileAndCoordsInFrontOfPlayer
@@ -1609,7 +1609,7 @@ ItemUseCardKey: ; e022 (3:6022)
; 02: X
; 03: ID?
-CardKeyTable1: ; e072 (3:6072)
+CardKeyTable1:
db SILPH_CO_2F,$04,$04,$00
db SILPH_CO_2F,$04,$05,$01
db SILPH_CO_4F,$0C,$04,$02
@@ -1622,7 +1622,7 @@ CardKeyTable1: ; e072 (3:6072)
db SILPH_CO_10F,$08,$0B,$09
db $ff
-CardKeyTable2: ; e09b (3:609b)
+CardKeyTable2:
db SILPH_CO_3F,$08,$09,$0A
db SILPH_CO_3F,$09,$09,$0B
db SILPH_CO_5F,$04,$07,$0C
@@ -1635,12 +1635,12 @@ CardKeyTable2: ; e09b (3:609b)
db SILPH_CO_9F,$09,$03,$13
db $ff
-CardKeyTable3: ; e0c4 (3:60c4)
+CardKeyTable3:
db SILPH_CO_11F,$08,$09,$14
db SILPH_CO_11F,$09,$09,$15
db $ff
-ItemUsePokedoll: ; e0cd (3:60cd)
+ItemUsePokedoll:
ld a,[wIsInBattle]
dec a
jp nz,ItemUseNotTime
@@ -1648,7 +1648,7 @@ ItemUsePokedoll: ; e0cd (3:60cd)
ld [wEscapedFromBattle],a
jp PrintItemUseTextAndRemoveItem
-ItemUseGuardSpec: ; e0dc (3:60dc)
+ItemUseGuardSpec:
ld a,[wIsInBattle]
and a
jp z,ItemUseNotTime
@@ -1656,15 +1656,15 @@ ItemUseGuardSpec: ; e0dc (3:60dc)
set ProtectedByMist,[hl] ; Mist bit
jp PrintItemUseTextAndRemoveItem
-ItemUseSuperRepel: ; e0eb (3:60eb)
+ItemUseSuperRepel:
ld b,200
jp ItemUseRepelCommon
-ItemUseMaxRepel: ; e0f0 (3:60f0)
+ItemUseMaxRepel:
ld b,250
jp ItemUseRepelCommon
-ItemUseDireHit: ; e0f5 (3:60f5)
+ItemUseDireHit:
ld a,[wIsInBattle]
and a
jp z,ItemUseNotTime
@@ -1672,7 +1672,7 @@ ItemUseDireHit: ; e0f5 (3:60f5)
set GettingPumped,[hl] ; Focus Energy bit
jp PrintItemUseTextAndRemoveItem
-ItemUseXStat: ; e104 (3:6104)
+ItemUseXStat:
ld a,[wIsInBattle]
and a
jr nz,.inBattle
@@ -1705,7 +1705,7 @@ ItemUseXStat: ; e104 (3:6104)
ld [hl],a ; restore [wPlayerMoveNum]
ret
-ItemUsePokeflute: ; e140 (3:6140)
+ItemUsePokeflute:
ld a,[wIsInBattle]
and a
jr nz,.inBattle
@@ -1789,7 +1789,7 @@ ItemUsePokeflute: ; e140 (3:6140)
; [wWereAnyMonsAsleep] should be initialized to 0
; OUTPUT:
; [wWereAnyMonsAsleep]: set to 1 if any pokemon were asleep
-WakeUpEntireParty: ; e1e5 (3:61e5)
+WakeUpEntireParty:
ld de,44
ld c,6
.loop
@@ -1811,7 +1811,7 @@ WakeUpEntireParty: ; e1e5 (3:61e5)
; Format:
; 00: Y
; 01: X
-Route12SnorlaxFluteCoords: ; e1fd (3:61fd)
+Route12SnorlaxFluteCoords:
db 62,9 ; one space West of Snorlax
db 61,10 ; one space North of Snorlax
db 63,10 ; one space South of Snorlax
@@ -1821,20 +1821,20 @@ Route12SnorlaxFluteCoords: ; e1fd (3:61fd)
; Format:
; 00: Y
; 01: X
-Route16SnorlaxFluteCoords: ; e206 (3:6206)
+Route16SnorlaxFluteCoords:
db 10,27 ; one space East of Snorlax
db 10,25 ; one space West of Snorlax
db $ff ; terminator
-PlayedFluteNoEffectText: ; e20b (3:620b)
+PlayedFluteNoEffectText:
TX_FAR _PlayedFluteNoEffectText
db "@"
-FluteWokeUpText: ; e210 (3:6210)
+FluteWokeUpText:
TX_FAR _FluteWokeUpText
db "@"
-PlayedFluteHadEffectText: ; e215 (3:6215)
+PlayedFluteHadEffectText:
TX_FAR _PlayedFluteHadEffectText
db $06
TX_ASM
@@ -1855,25 +1855,25 @@ PlayedFluteHadEffectText: ; e215 (3:6215)
.done
jp TextScriptEnd ; end text
-ItemUseCoinCase: ; e23a (3:623a)
+ItemUseCoinCase:
ld a,[wIsInBattle]
and a
jp nz,ItemUseNotTime
ld hl,CoinCaseNumCoinsText
jp PrintText
-CoinCaseNumCoinsText: ; e247 (3:6247)
+CoinCaseNumCoinsText:
TX_FAR _CoinCaseNumCoinsText
db "@"
-ItemUseOldRod: ; e24c (3:624c)
+ItemUseOldRod:
call FishingInit
jp c, ItemUseNotTime
lb bc, 5, MAGIKARP
ld a, $1 ; set bite
jr RodResponse
-ItemUseGoodRod: ; e259 (3:6259)
+ItemUseGoodRod:
call FishingInit
jp c,ItemUseNotTime
.RandomLoop
@@ -1901,12 +1901,12 @@ ItemUseGoodRod: ; e259 (3:6259)
INCLUDE "data/good_rod.asm"
-ItemUseSuperRod: ; e283 (3:6283)
+ItemUseSuperRod:
call FishingInit
jp c, ItemUseNotTime
call ReadSuperRodData
ld a, e
-RodResponse: ; e28d (3:628d)
+RodResponse:
ld [wRodResponse], a
dec a ; is there a bite?
@@ -1933,7 +1933,7 @@ RodResponse: ; e28d (3:628d)
; checks if fishing is possible and if so, runs initialization code common to all rods
; unsets carry if fishing is possible, sets carry if not
-FishingInit: ; e2b4 (3:62b4)
+FishingInit:
ld a,[wIsInBattle]
and a
jr z,.notInBattle
@@ -1958,10 +1958,10 @@ FishingInit: ; e2b4 (3:62b4)
scf ; can't fish when surfing
ret
-ItemUseOaksParcel: ; e2de (3:62de)
+ItemUseOaksParcel:
jp ItemUseNotYoursToUse
-ItemUseItemfinder: ; e2e1 (3:62e1)
+ItemUseItemfinder:
ld a,[wIsInBattle]
and a
jp nz,ItemUseNotTime
@@ -1981,20 +1981,20 @@ ItemUseItemfinder: ; e2e1 (3:62e1)
.printText
jp PrintText
-ItemfinderFoundItemText: ; e30d (3:630d)
+ItemfinderFoundItemText:
TX_FAR _ItemfinderFoundItemText
db "@"
-ItemfinderFoundNothingText: ; e312 (3:6312)
+ItemfinderFoundNothingText:
TX_FAR _ItemfinderFoundNothingText
db "@"
-ItemUsePPUp: ; e317 (3:6317)
+ItemUsePPUp:
ld a,[wIsInBattle]
and a
jp nz,ItemUseNotTime
-ItemUsePPRestore: ; e31e (3:631e)
+ItemUsePPRestore:
ld a,[wWhichPokemon]
push af
ld a,[wcf91]
@@ -2170,31 +2170,31 @@ ItemUsePPRestore: ; e31e (3:631e)
ld [wActionResultOrTookBattleTurn],a ; item use failed
ret
-RaisePPWhichTechniqueText: ; e45d (3:645d)
+RaisePPWhichTechniqueText:
TX_FAR _RaisePPWhichTechniqueText
db "@"
-RestorePPWhichTechniqueText: ; e462 (3:6462)
+RestorePPWhichTechniqueText:
TX_FAR _RestorePPWhichTechniqueText
db "@"
-PPMaxedOutText: ; e467 (3:6467)
+PPMaxedOutText:
TX_FAR _PPMaxedOutText
db "@"
-PPIncreasedText: ; e46c (3:646c)
+PPIncreasedText:
TX_FAR _PPIncreasedText
db "@"
-PPRestoredText: ; e471 (3:6471)
+PPRestoredText:
TX_FAR _PPRestoredText
db "@"
; for items that can't be used from the Item menu
-UnusableItem: ; e476 (3:6476)
+UnusableItem:
jp ItemUseNotTime
-ItemUseTMHM: ; e479 (3:6479)
+ItemUseTMHM:
ld a,[wIsInBattle]
and a
jp nz,ItemUseNotTime
@@ -2291,48 +2291,48 @@ ItemUseTMHM: ; e479 (3:6479)
ret c
jp RemoveUsedItem
-BootedUpTMText: ; e54f (3:654f)
+BootedUpTMText:
TX_FAR _BootedUpTMText
db "@"
-BootedUpHMText: ; e554 (3:6554)
+BootedUpHMText:
TX_FAR _BootedUpHMText
db "@"
-TeachMachineMoveText: ; e559 (3:6559)
+TeachMachineMoveText:
TX_FAR _TeachMachineMoveText
db "@"
-MonCannotLearnMachineMoveText: ; e55e (3:655e)
+MonCannotLearnMachineMoveText:
TX_FAR _MonCannotLearnMachineMoveText
db "@"
-PrintItemUseTextAndRemoveItem: ; e563 (3:6563)
+PrintItemUseTextAndRemoveItem:
ld hl,ItemUseText00
call PrintText
ld a,SFX_HEAL_AILMENT
call PlaySound
call WaitForTextScrollButtonPress ; wait for button press
-RemoveUsedItem: ; e571 (3:6571)
+RemoveUsedItem:
ld hl,wNumBagItems
ld a,1 ; one item
ld [wItemQuantity],a
jp RemoveItemFromInventory
-ItemUseNoEffect: ; e57c (3:657c)
+ItemUseNoEffect:
ld hl,ItemUseNoEffectText
jr ItemUseFailed
-ItemUseNotTime: ; e581 (3:6581)
+ItemUseNotTime:
ld hl,ItemUseNotTimeText
jr ItemUseFailed
-ItemUseNotYoursToUse: ; e586 (3:6586)
+ItemUseNotYoursToUse:
ld hl,ItemUseNotYoursToUseText
jr ItemUseFailed
-ThrowBallAtTrainerMon: ; e58b (3:658b)
+ThrowBallAtTrainerMon:
call RunDefaultPaletteCommand
call LoadScreenTilesFromBuffer1 ; restore saved screen
call Delay3
@@ -2345,67 +2345,67 @@ ThrowBallAtTrainerMon: ; e58b (3:658b)
call PrintText
jr RemoveUsedItem
-NoCyclingAllowedHere: ; e5ac (3:65ac)
+NoCyclingAllowedHere:
ld hl,NoCyclingAllowedHereText
jr ItemUseFailed
-BoxFullCannotThrowBall: ; e5b1 (3:65b1)
+BoxFullCannotThrowBall:
ld hl,BoxFullCannotThrowBallText
jr ItemUseFailed
-SurfingAttemptFailed: ; e5b6 (3:65b6)
+SurfingAttemptFailed:
ld hl,NoSurfingHereText
-ItemUseFailed: ; e5b9 (3:65b9)
+ItemUseFailed:
xor a
ld [wActionResultOrTookBattleTurn],a ; item use failed
jp PrintText
-ItemUseNotTimeText: ; e5c0 (3:65c0)
+ItemUseNotTimeText:
TX_FAR _ItemUseNotTimeText
db "@"
-ItemUseNotYoursToUseText: ; e5c5 (3:65c5)
+ItemUseNotYoursToUseText:
TX_FAR _ItemUseNotYoursToUseText
db "@"
-ItemUseNoEffectText: ; e5ca (3:65ca)
+ItemUseNoEffectText:
TX_FAR _ItemUseNoEffectText
db "@"
-ThrowBallAtTrainerMonText1: ; e5cf (3:65cf)
+ThrowBallAtTrainerMonText1:
TX_FAR _ThrowBallAtTrainerMonText1
db "@"
-ThrowBallAtTrainerMonText2: ; e5d4 (3:65d4)
+ThrowBallAtTrainerMonText2:
TX_FAR _ThrowBallAtTrainerMonText2
db "@"
-NoCyclingAllowedHereText: ; e5d9 (3:65d9)
+NoCyclingAllowedHereText:
TX_FAR _NoCyclingAllowedHereText
db "@"
-NoSurfingHereText: ; e5de (3:65de)
+NoSurfingHereText:
TX_FAR _NoSurfingHereText
db "@"
-BoxFullCannotThrowBallText: ; e5e3 (3:65e3)
+BoxFullCannotThrowBallText:
TX_FAR _BoxFullCannotThrowBallText
db "@"
-ItemUseText00: ; e5e8 (3:65e8)
+ItemUseText00:
TX_FAR _ItemUseText001
db $05
TX_FAR _ItemUseText002
db "@"
-GotOnBicycleText: ; e5f2 (3:65f2)
+GotOnBicycleText:
TX_FAR _GotOnBicycleText1
db $05
TX_FAR _GotOnBicycleText2
db "@"
-GotOffBicycleText: ; e5fc (3:65fc)
+GotOffBicycleText:
TX_FAR _GotOffBicycleText1
db $05
TX_FAR _GotOffBicycleText2
@@ -2416,7 +2416,7 @@ GotOffBicycleText: ; e5fc (3:65fc)
; INPUT:
; [wWhichPokemon] = index of pokemon in party
; [wCurrentMenuItem] = index of move (when using a PP Up)
-RestoreBonusPP: ; e606 (3:6606)
+RestoreBonusPP:
ld hl,wPartyMon1Moves
ld bc, wPartyMon2 - wPartyMon1
ld a,[wWhichPokemon]
@@ -2458,7 +2458,7 @@ RestoreBonusPP: ; e606 (3:6606)
; INPUT:
; [de] = normal max PP
; [hl] = move PP
-AddBonusPP: ; e642 (3:6642)
+AddBonusPP:
push bc
ld a,[de] ; normal max PP of move
ld [H_DIVIDEND + 3],a
@@ -2507,7 +2507,7 @@ AddBonusPP: ; e642 (3:6642)
; [wCurrentMenuItem] = move index
; OUTPUT:
; [wMaxPP] = max PP
-GetMaxPP: ; e677 (3:6677)
+GetMaxPP:
ld a,[wMonDataLocation]
and a
ld hl,wPartyMon1Moves
@@ -2567,11 +2567,11 @@ GetMaxPP: ; e677 (3:6677)
ld [wMaxPP],a ; store max PP
ret
-GetSelectedMoveOffset: ; e6e3 (3:66e3)
+GetSelectedMoveOffset:
ld a,[wWhichPokemon]
call AddNTimes
-GetSelectedMoveOffset2: ; e6e9 (3:66e9)
+GetSelectedMoveOffset2:
ld a,[wCurrentMenuItem]
ld c,a
ld b,0
@@ -2586,7 +2586,7 @@ GetSelectedMoveOffset2: ; e6e9 (3:66e9)
; [wItemQuantity] = quantity to toss
; OUTPUT:
; clears carry flag if the item is tossed, sets carry flag if not
-TossItem_: ; e6f1 (3:66f1)
+TossItem_:
push hl
ld a,[wcf91]
call IsItemHM
@@ -2636,15 +2636,15 @@ TossItem_: ; e6f1 (3:66f1)
scf
ret
-ThrewAwayItemText: ; e755 (3:6755)
+ThrewAwayItemText:
TX_FAR _ThrewAwayItemText
db "@"
-IsItOKToTossItemText: ; e75a (3:675a)
+IsItOKToTossItemText:
TX_FAR _IsItOKToTossItemText
db "@"
-TooImportantToTossText: ; e75f (3:675f)
+TooImportantToTossText:
TX_FAR _TooImportantToTossText
db "@"
@@ -2655,7 +2655,7 @@ TooImportantToTossText: ; e75f (3:675f)
; [wIsKeyItem] = result
; 00: item is not key item
; 01: item is key item
-IsKeyItem_: ; e764 (3:6764)
+IsKeyItem_:
ld a,$01
ld [wIsKeyItem],a
ld a,[wcf91]
@@ -2686,7 +2686,7 @@ IsKeyItem_: ; e764 (3:6764)
INCLUDE "data/key_items.asm"
-SendNewMonToBox: ; e7a4 (3:67a4)
+SendNewMonToBox:
ld de, wNumInBox
ld a, [de]
inc a
@@ -2855,7 +2855,7 @@ SendNewMonToBox: ; e7a4 (3:67a4)
; checks if the tile in front of the player is a shore or water tile
; used for surfing and fishing
; unsets carry if it is, sets carry if not
-IsNextTileShoreOrWater: ; e8b8 (3:68b8)
+IsNextTileShoreOrWater:
ld a, [wCurMapTileset]
ld hl, WaterTilesets
ld de,1
@@ -2880,11 +2880,11 @@ IsNextTileShoreOrWater: ; e8b8 (3:68b8)
ret
; tilesets with water
-WaterTilesets: ; e8e0 (3:68e0)
+WaterTilesets:
db OVERWORLD, FOREST, DOJO, GYM, SHIP, SHIP_PORT, CAVERN, FACILITY, PLATEAU
db $ff ; terminator
-ReadSuperRodData: ; e8ea (3:68ea)
+ReadSuperRodData:
; return e = 2 if no fish on this map
; return e = 1 if a bite, bc = level,species
; return e = 0 if no bite
@@ -2933,13 +2933,13 @@ INCLUDE "data/super_rod.asm"
; reloads map view and processes sprite data
; for items that cause the overworld to be displayed
-ItemUseReloadOverworldData: ; e9c5 (3:69c5)
+ItemUseReloadOverworldData:
call LoadCurrentMapView
jp UpdateSprites
; creates a list at wBuffer of maps where the mon in [wd11e] can be found.
; this is used by the pokedex to display locations the mon can be found on the map.
-FindWildLocationsOfMon: ; e9cb (3:69cb)
+FindWildLocationsOfMon:
ld hl, WildDataPointers
ld de, wBuffer
ld c, $0
@@ -2968,7 +2968,7 @@ FindWildLocationsOfMon: ; e9cb (3:69cb)
ld [de], a
ret
-CheckMapForMon: ; e9f0 (3:69f0)
+CheckMapForMon:
inc hl
ld b, $a
.loop
diff --git a/engine/items/tm_prices.asm b/engine/items/tm_prices.asm
index 6bb7f711..80e6bf3c 100755
--- a/engine/items/tm_prices.asm
+++ b/engine/items/tm_prices.asm
@@ -1,4 +1,4 @@
-GetMachinePrice: ; 7bf86 (1e:7f86)
+GetMachinePrice:
; Input: [wcf91] = Item Id of a TM
; Output: Stores the TM price at hItemPrice
ld a, [wcf91] ; a contains TM item id
diff --git a/engine/items/tmhm.asm b/engine/items/tmhm.asm
index 0fcc5710..7ccaa232 100755
--- a/engine/items/tmhm.asm
+++ b/engine/items/tmhm.asm
@@ -1,5 +1,5 @@
; checks if the mon in [wWhichPokemon] already knows the move in [wMoveNum]
-CheckIfMoveIsKnown: ; 2fe18 (b:7e18)
+CheckIfMoveIsKnown:
ld a, [wWhichPokemon]
ld hl, wPartyMon1Moves
ld bc, wPartyMon2 - wPartyMon1
@@ -21,6 +21,6 @@ CheckIfMoveIsKnown: ; 2fe18 (b:7e18)
scf
ret
-AlreadyKnowsText: ; 2fe3b (b:7e3b)
+AlreadyKnowsText:
TX_FAR _AlreadyKnowsText
db "@"
diff --git a/engine/items/tms.asm b/engine/items/tms.asm
index 7d00f7f3..da1b5e72 100755
--- a/engine/items/tms.asm
+++ b/engine/items/tms.asm
@@ -1,5 +1,5 @@
; tests if mon [wcf91] can learn move [wMoveNum]
-CanLearnTM: ; 1373e (4:773e)
+CanLearnTM:
ld a, [wcf91]
ld [wd0b5], a
call GetMonHeader
@@ -22,7 +22,7 @@ CanLearnTM: ; 1373e (4:773e)
; converts TM/HM number in wd11e into move number
; HMs start at 51
-TMToMove: ; 13763 (4:7763)
+TMToMove:
ld a, [wd11e]
dec a
ld hl, TechnicalMachines
diff --git a/engine/learn_move.asm b/engine/learn_move.asm
index ede8a542..5fa6df08 100755
--- a/engine/learn_move.asm
+++ b/engine/learn_move.asm
@@ -1,4 +1,4 @@
-LearnMove: ; 6e43 (1:6e43)
+LearnMove:
call SaveScreenTilesToBuffer1
ld a, [wWhichPokemon]
ld hl, wPartyMonNicks
@@ -8,7 +8,7 @@ LearnMove: ; 6e43 (1:6e43)
ld bc, NAME_LENGTH
call CopyData
-DontAbandonLearning: ; 6e5b (1:6e5b)
+DontAbandonLearning:
ld hl, wPartyMon1Moves
ld bc, wPartyMon2Moves - wPartyMon1Moves
ld a, [wWhichPokemon]
@@ -73,7 +73,7 @@ DontAbandonLearning: ; 6e5b (1:6e5b)
call CopyData
jp PrintLearnedMove
-AbandonLearning: ; 6eda (1:6eda)
+AbandonLearning:
ld hl, AbandonLearningText
call PrintText
coord hl, 14, 7
@@ -89,13 +89,13 @@ AbandonLearning: ; 6eda (1:6eda)
ld b, 0
ret
-PrintLearnedMove: ; 6efe (1:6efe)
+PrintLearnedMove:
ld hl, LearnedMove1Text
call PrintText
ld b, 1
ret
-TryingToLearn: ; 6f07 (1:6f07)
+TryingToLearn:
push hl
ld hl, TryingToLearnText
call PrintText
@@ -183,27 +183,27 @@ TryingToLearn: ; 6f07 (1:6f07)
scf
ret
-LearnedMove1Text: ; 6fb4 (1:6fb4)
+LearnedMove1Text:
TX_FAR _LearnedMove1Text
db $b,6,"@"
-WhichMoveToForgetText: ; 6fb4 (1:6fb4)
+WhichMoveToForgetText:
TX_FAR _WhichMoveToForgetText
db "@"
-AbandonLearningText: ; 6fb9 (1:6fb9)
+AbandonLearningText:
TX_FAR _AbandonLearningText
db "@"
-DidNotLearnText: ; 6fbe (1:6fbe)
+DidNotLearnText:
TX_FAR _DidNotLearnText
db "@"
-TryingToLearnText: ; 6fc3 (1:6fc3)
+TryingToLearnText:
TX_FAR _TryingToLearnText
db "@"
-OneTwoAndText: ; 6fc8 (1:6fc8)
+OneTwoAndText:
TX_FAR _OneTwoAndText
db $a
TX_ASM
@@ -212,13 +212,13 @@ OneTwoAndText: ; 6fc8 (1:6fc8)
ld hl, PoofText
ret
-PoofText: ; 6fd7 (1:6fd7)
+PoofText:
TX_FAR _PoofText
db $a
-ForgotAndText: ; 6fdc (1:6fdc)
+ForgotAndText:
TX_FAR _ForgotAndText
db "@"
-HMCantDeleteText: ; 6fe1 (1:6fe1)
+HMCantDeleteText:
TX_FAR _HMCantDeleteText
db "@"
diff --git a/engine/load_pokedex_tiles.asm b/engine/load_pokedex_tiles.asm
index 1189d2f0..637b7a24 100755
--- a/engine/load_pokedex_tiles.asm
+++ b/engine/load_pokedex_tiles.asm
@@ -1,5 +1,5 @@
; Loads tile patterns for tiles used in the pokedex.
-LoadPokedexTilePatterns: ; 17840 (5:7840)
+LoadPokedexTilePatterns:
call LoadHpBarAndStatusTilePatterns
ld de,PokedexTileGraphics
ld hl,vChars2 + $600
diff --git a/engine/menu/bills_pc.asm b/engine/menu/bills_pc.asm
index 0be2e6b0..384ab485 100644
--- a/engine/menu/bills_pc.asm
+++ b/engine/menu/bills_pc.asm
@@ -1,4 +1,4 @@
-DisplayPCMainMenu:: ; 213c8 (8:53c8)
+DisplayPCMainMenu::
xor a
ld [H_AUTOBGTRANSFERENABLED], a
call SaveScreenTilesToBuffer2
@@ -111,7 +111,7 @@ BillsPC_:: ; 0x214c2
ld hl, SwitchOnText
call PrintText
-BillsPCMenu: ; 214e8 (8:54e8)
+BillsPCMenu:
ld a, [wParentMenuItem]
ld [wCurrentMenuItem], a
ld hl, vChars2 + $780
@@ -185,7 +185,7 @@ BillsPCMenu: ; 214e8 (8:54e8)
cp $3
jp z, BillsPCChangeBox ; change box
-ExitBillsPC: ; 21588 (8:5588)
+ExitBillsPC:
ld a, [wFlags_0xcd60]
bit 3, a ; accessing Bill's PC through another PC?
jr nz, .next
@@ -204,7 +204,7 @@ ExitBillsPC: ; 21588 (8:5588)
res 6, [hl]
ret
-BillsPCDeposit: ; 215ac (8:55ac)
+BillsPCDeposit:
ld a, [wPartyCount]
dec a
jr nz, .partyLargeEnough
@@ -253,7 +253,7 @@ BillsPCDeposit: ; 215ac (8:55ac)
call PrintText
jp BillsPCMenu
-BillsPCWithdraw: ; 21618 (8:5618)
+BillsPCWithdraw:
ld a, [wNumInBox]
and a
jr nz, .boxNotEmpty
@@ -290,7 +290,7 @@ BillsPCWithdraw: ; 21618 (8:5618)
call PrintText
jp BillsPCMenu
-BillsPCRelease: ; 21673 (8:5673)
+BillsPCRelease:
ld a, [wNumInBox]
and a
jr nz, .loop
@@ -317,11 +317,11 @@ BillsPCRelease: ; 21673 (8:5673)
call PrintText
jp BillsPCMenu
-BillsPCChangeBox: ; 216b3 (8:56b3)
+BillsPCChangeBox:
callba ChangeBox
jp BillsPCMenu
-DisplayMonListMenu: ; 216be (8:56be)
+DisplayMonListMenu:
ld a, l
ld [wListPointer], a
ld a, h
@@ -338,7 +338,7 @@ DisplayMonListMenu: ; 216be (8:56be)
ld [wPartyAndBillsPCSavedMenuItem], a
ret
-BillsPCMenuText: ; 216e1 (8:56e1)
+BillsPCMenuText:
db "WITHDRAW ", $4a
next "DEPOSIT ", $4a
next "RELEASE ", $4a
@@ -346,10 +346,10 @@ BillsPCMenuText: ; 216e1 (8:56e1)
next "SEE YA!"
db "@"
-BoxNoPCText: ; 21713 (8:5713)
+BoxNoPCText:
db "BOX No.@"
-KnowsHMMove:: ; 2171b (8:571b)
+KnowsHMMove::
; returns whether mon with party index [wWhichPokemon] knows an HM move
ld hl, wPartyMon1Moves
ld bc, wPartyMon2 - wPartyMon1
@@ -376,7 +376,7 @@ KnowsHMMove:: ; 2171b (8:571b)
and a
ret
-HMMoveArray: ; 21745 (8:5745)
+HMMoveArray:
db CUT
db FLY
db SURF
@@ -384,7 +384,7 @@ HMMoveArray: ; 21745 (8:5745)
db FLASH
db -1
-DisplayDepositWithdrawMenu: ; 2174b (8:574b)
+DisplayDepositWithdrawMenu:
coord hl, 9, 10
ld b, 6
ld c, 9
@@ -505,7 +505,7 @@ MonWasReleasedText: ; 0x21820
TX_FAR _MonWasReleasedText
db "@"
-CableClubLeftGameboy:: ; 5824 (8:5825)
+CableClubLeftGameboy::
ld a, [hSerialConnectionStatus]
cp USING_EXTERNAL_CLOCK
ret z
@@ -522,7 +522,7 @@ CableClubLeftGameboy:: ; 5824 (8:5825)
call EnableAutoTextBoxDrawing
tx_pre_jump JustAMomentText
-CableClubRightGameboy:: ; 5845 (8:5845)
+CableClubRightGameboy::
ld a, [hSerialConnectionStatus]
cp USING_INTERNAL_CLOCK
ret z
@@ -539,7 +539,7 @@ CableClubRightGameboy:: ; 5845 (8:5845)
call EnableAutoTextBoxDrawing
tx_pre_jump JustAMomentText
-JustAMomentText:: ; 21865 (8:5865)
+JustAMomentText::
TX_FAR _JustAMomentText
db "@"
@@ -549,6 +549,6 @@ JustAMomentText:: ; 21865 (8:5865)
call EnableAutoTextBoxDrawing
tx_pre_jump OpenBillsPCText
-OpenBillsPCText:: ; 21878 (8:5878)
+OpenBillsPCText::
db $FD ; FuncTX_BillsPC
diff --git a/engine/menu/diploma.asm b/engine/menu/diploma.asm
index 630c6c23..09ba123e 100755
--- a/engine/menu/diploma.asm
+++ b/engine/menu/diploma.asm
@@ -1,4 +1,4 @@
-DisplayDiploma: ; 566e2 (15:66e2)
+DisplayDiploma:
call SaveScreenTilesToBuffer2
call GBPalWhiteOutWithDelay3
call ClearScreen
@@ -69,7 +69,7 @@ DisplayDiploma: ; 566e2 (15:66e2)
call Delay3
jp GBPalNormal
-UnusedPlayerNameLengthFunc: ; 56777 (15:6777)
+UnusedPlayerNameLengthFunc:
; Unused function that does a calculation involving the length of the player's
; name.
ld hl, wPlayerName
@@ -81,7 +81,7 @@ UnusedPlayerNameLengthFunc: ; 56777 (15:6777)
dec c
jr .loop
-DiplomaTextPointersAndCoords: ; 56784 (15:6784)
+DiplomaTextPointersAndCoords:
dw DiplomaText
dwCoord 5, 2
dw DiplomaPlayer
diff --git a/engine/menu/league_pc.asm b/engine/menu/league_pc.asm
index 7c31d346..e1359063 100755
--- a/engine/menu/league_pc.asm
+++ b/engine/menu/league_pc.asm
@@ -50,7 +50,7 @@ PKMNLeaguePC: ; 0x7657e
call RunDefaultPaletteCommand
jp GBPalNormal
-LeaguePCShowTeam: ; 765e5 (1d:65e5)
+LeaguePCShowTeam:
ld c, PARTY_LENGTH
.loop
push bc
@@ -77,7 +77,7 @@ LeaguePCShowTeam: ; 765e5 (1d:65e5)
scf
ret
-LeaguePCShowMon: ; 76610 (1d:6610)
+LeaguePCShowMon:
call GBPalWhiteOutWithDelay3
call ClearScreen
ld hl, wHallOfFame
@@ -112,9 +112,9 @@ LeaguePCShowMon: ; 76610 (1d:6610)
call PrintNumber
jpba HoFDisplayMonInfo
-HallOfFameNoText: ; 76670 (1d:6670)
+HallOfFameNoText:
db "HALL OF FAME No @"
-AccessedHoFPCText: ; 76683 (1d:6683)
+AccessedHoFPCText:
TX_FAR _AccessedHoFPCText
db "@"
diff --git a/engine/menu/main_menu.asm b/engine/menu/main_menu.asm
index 75458c5e..d3152e4e 100755
--- a/engine/menu/main_menu.asm
+++ b/engine/menu/main_menu.asm
@@ -1,4 +1,4 @@
-MainMenu: ; 5af2 (1:5af2)
+MainMenu:
; Check save file
call InitOptions
xor a
@@ -124,14 +124,14 @@ MainMenu: ; 5af2 (1:5af2)
call SpecialWarpIn
jp SpecialEnterMap
-InitOptions: ; 5bff (1:5bff)
+InitOptions:
ld a,1 ; no delay
ld [wLetterPrintingDelayFlags],a
ld a,3 ; medium speed
ld [wOptions],a
ret
-LinkMenu: ; 5c0a (1:5c0a)
+LinkMenu:
xor a
ld [wLetterPrintingDelayFlags], a
ld hl, wd72e
@@ -292,19 +292,19 @@ LinkMenu: ; 5c0a (1:5c0a)
res 6, [hl]
ret
-WhereWouldYouLikeText: ; 5d43 (1:5d43)
+WhereWouldYouLikeText:
TX_FAR _WhereWouldYouLikeText
db "@"
-PleaseWaitText: ; 5d48 (1:5d48)
+PleaseWaitText:
TX_FAR _PleaseWaitText
db "@"
-LinkCanceledText: ; 5d4d (1:5d4d)
+LinkCanceledText:
TX_FAR _LinkCanceledText
db "@"
-StartNewGame: ; 5d52 (1:5d52)
+StartNewGame:
ld hl, wd732
res 1, [hl]
call OakSpeech
@@ -312,7 +312,7 @@ StartNewGame: ; 5d52 (1:5d52)
call DelayFrames
; enter map after using a special warp or loading the game from the main menu
-SpecialEnterMap: ; 5d5f (1:5d5f)
+SpecialEnterMap:
xor a
ld [hJoyPressed], a
ld [hJoyHeld], a
@@ -328,19 +328,19 @@ SpecialEnterMap: ; 5d5f (1:5d5f)
ret nz
jp EnterMap
-ContinueText: ; 5d7e (1:5d7e)
+ContinueText:
db "CONTINUE", $4e
-NewGameText: ; 5d87 (1:5d87)
+NewGameText:
db "NEW GAME", $4e
db "OPTION@"
-CableClubOptionsText: ; 5d97 (1:5d97)
+CableClubOptionsText:
db "TRADE CENTER", $4e
db "COLOSSEUM", $4e
db "CANCEL@"
-DisplayContinueGameInfo: ; 5db5 (1:5db5)
+DisplayContinueGameInfo:
xor a
ld [H_AUTOBGTRANSFERENABLED], a
coord hl, 4, 7
@@ -364,7 +364,7 @@ DisplayContinueGameInfo: ; 5db5 (1:5db5)
ld c, 30
jp DelayFrames
-PrintSaveScreenText: ; 5def (1:5def)
+PrintSaveScreenText:
xor a
ld [H_AUTOBGTRANSFERENABLED], a
coord hl, 4, 0
@@ -390,7 +390,7 @@ PrintSaveScreenText: ; 5def (1:5def)
ld c, 30
jp DelayFrames
-PrintNumBadges: ; 5e2f (1:5e2f)
+PrintNumBadges:
push hl
ld hl, wObtainedBadges
ld b, $1
@@ -400,7 +400,7 @@ PrintNumBadges: ; 5e2f (1:5e2f)
lb bc, 1, 2
jp PrintNumber
-PrintNumOwnedMons: ; 5e42 (1:5e42)
+PrintNumOwnedMons:
push hl
ld hl, wPokedexOwned
ld b, wPokedexOwnedEnd - wPokedexOwned
@@ -410,7 +410,7 @@ PrintNumOwnedMons: ; 5e42 (1:5e42)
lb bc, 1, 3
jp PrintNumber
-PrintPlayTime: ; 5e55 (1:5e55)
+PrintPlayTime:
ld de, wPlayTimeHours
lb bc, 1, 3
call PrintNumber
@@ -420,13 +420,13 @@ PrintPlayTime: ; 5e55 (1:5e55)
lb bc, LEADING_ZEROES | 1, 2
jp PrintNumber
-SaveScreenInfoText: ; 5e6a (1:5e6a)
+SaveScreenInfoText:
db "PLAYER"
next "BADGES "
next "#DEX "
next "TIME@"
-DisplayOptionMenu: ; 5e8a (1:5e8a)
+DisplayOptionMenu:
coord hl, 0, 0
ld b,3
ld c,18
@@ -578,23 +578,23 @@ DisplayOptionMenu: ; 5e8a (1:5e8a)
ld [wOptionsTextSpeedCursorX],a ; text speed cursor X coordinate
jp .eraseOldMenuCursor
-TextSpeedOptionText: ; 5fc0 (1:5fc0)
+TextSpeedOptionText:
db "TEXT SPEED"
next " FAST MEDIUM SLOW@"
-BattleAnimationOptionText: ; 5fde (1:5fde)
+BattleAnimationOptionText:
db "BATTLE ANIMATION"
next " ON OFF@"
-BattleStyleOptionText: ; 5ffd (1:5ffd)
+BattleStyleOptionText:
db "BATTLE STYLE"
next " SHIFT SET@"
-OptionMenuCancelText: ; 6018 (1:6018)
+OptionMenuCancelText:
db "CANCEL@"
; sets the options variable according to the current placement of the menu cursors in the options menu
-SetOptionsFromCursorPositions: ; 601f (1:601f)
+SetOptionsFromCursorPositions:
ld hl,TextSpeedOptionData
ld a,[wOptionsTextSpeedCursorX] ; text speed cursor X coordinate
ld c,a
@@ -630,7 +630,7 @@ SetOptionsFromCursorPositions: ; 601f (1:601f)
ret
; reads the options variable and places menu cursors in the correct positions within the options menu
-SetCursorPositionsFromOptions: ; 604c (1:604c)
+SetCursorPositionsFromOptions:
ld hl,TextSpeedOptionData + 1
ld a,[wOptions]
ld c,a
@@ -674,14 +674,14 @@ SetCursorPositionsFromOptions: ; 604c (1:604c)
; Format:
; 00: X coordinate of menu cursor
; 01: delay after printing a letter (in frames)
-TextSpeedOptionData: ; 6096 (1:6096)
+TextSpeedOptionData:
db 14,5 ; Slow
db 7,3 ; Medium
db 1,1 ; Fast
db 7 ; default X coordinate (Medium)
db $ff ; terminator
-CheckForPlayerNameInSRAM: ; 609e (1:609e)
+CheckForPlayerNameInSRAM:
; Check if the player name data in SRAM has a string terminator character
; (indicating that a name may have been saved there) and return whether it does
; in carry.
diff --git a/engine/menu/naming_screen.asm b/engine/menu/naming_screen.asm
index 41f63095..759be189 100755
--- a/engine/menu/naming_screen.asm
+++ b/engine/menu/naming_screen.asm
@@ -1,4 +1,4 @@
-AskName: ; 64eb (1:64eb)
+AskName:
call SaveScreenTilesToBuffer1
call GetPredefRegisters
push hl
@@ -53,7 +53,7 @@ DoYouWantToNicknameText: ; 0x6557
TX_FAR _DoYouWantToNicknameText
db "@"
-DisplayNameRaterScreen: ; 655c (1:655c)
+DisplayNameRaterScreen:
ld hl, wBuffer
xor a
ld [wUpdateSpritesEnabled], a
@@ -81,7 +81,7 @@ DisplayNameRaterScreen: ; 655c (1:655c)
scf
ret
-DisplayNamingScreen: ; 6596 (1:6596)
+DisplayNamingScreen:
push hl
ld hl, wd730
set 6, [hl]
@@ -323,7 +323,7 @@ DisplayNamingScreen: ; 6596 (1:6596)
ld [wTopMenuItemX], a
jp EraseMenuCursor
-LoadEDTile: ; 675b (1:675b)
+LoadEDTile:
ld de, ED_Tile
ld hl, vFont + $700
ld bc, (ED_TileEnd - ED_Tile) / $8
@@ -331,11 +331,11 @@ LoadEDTile: ; 675b (1:675b)
;lb bc, BANK(ED_Tile), (ED_TileEnd - ED_Tile) / $8
jp CopyVideoDataDouble
-ED_Tile: ; 6767 (1:6767)
+ED_Tile:
INCBIN "gfx/ED_tile.1bpp"
ED_TileEnd:
-PrintAlphabet: ; 676f (1:676f)
+PrintAlphabet:
xor a
ld [H_AUTOBGTRANSFERENABLED], a
ld a, [wAlphabetCase]
@@ -365,13 +365,13 @@ PrintAlphabet: ; 676f (1:676f)
ld [H_AUTOBGTRANSFERENABLED], a
jp Delay3
-LowerCaseAlphabet: ; 679e (1:679e)
+LowerCaseAlphabet:
db "abcdefghijklmnopqrstuvwxyz ×():;[]",$e1,$e2,"-?!♂♀/",$f2,",¥UPPER CASE@"
-UpperCaseAlphabet: ; 67d6 (1:67d6)
+UpperCaseAlphabet:
db "ABCDEFGHIJKLMNOPQRSTUVWXYZ ×():;[]",$e1,$e2,"-?!♂♀/",$f2,",¥lower case@"
-PrintNicknameAndUnderscores: ; 680e (1:680e)
+PrintNicknameAndUnderscores:
call CalcStringLength
ld a, c
ld [wNamingScreenNameLength], a
@@ -425,7 +425,7 @@ PrintNicknameAndUnderscores: ; 680e (1:680e)
ld [hl], $77 ; raised underscore tile id
ret
-DakutensAndHandakutens: ; 6871 (1:6871)
+DakutensAndHandakutens:
push de
call CalcStringLength
dec hl
@@ -439,7 +439,7 @@ DakutensAndHandakutens: ; 6871 (1:6871)
ld [wNamingScreenLetter], a
ret
-Dakutens: ; 6885 (1:6885)
+Dakutens:
db "かが", "きぎ", "くぐ", "けげ", "こご"
db "さざ", "しじ", "すず", "せぜ", "そぞ"
db "ただ", "ちぢ", "つづ", "てで", "とど"
@@ -450,13 +450,13 @@ Dakutens: ; 6885 (1:6885)
db "ハバ", "ヒビ", "フブ", "へべ", "ホボ"
db $ff
-Handakutens: ; 68d6 (1:68d6)
+Handakutens:
db "はぱ", "ひぴ", "ふぷ", "へぺ", "ほぽ"
db "ハパ", "ヒピ", "フプ", "へぺ", "ホポ"
db $ff
; calculates the length of the string at wcf4b and stores it in c
-CalcStringLength: ; 68eb (1:68eb)
+CalcStringLength:
ld hl, wcf4b
ld c, $0
.loop
@@ -467,7 +467,7 @@ CalcStringLength: ; 68eb (1:68eb)
inc c
jr .loop
-PrintNamingText: ; 68f8 (1:68f8)
+PrintNamingText:
coord hl, 0, 1
ld a, [wNamingScreenType]
ld de, YourTextString
@@ -499,14 +499,14 @@ PrintNamingText: ; 68f8 (1:68f8)
.placeString
jp PlaceString
-YourTextString: ; 693f (1:693f)
+YourTextString:
db "YOUR @"
-RivalsTextString: ; 6945 (1:6945)
+RivalsTextString:
db "RIVAL's @"
-NameTextString: ; 694d (1:694d)
+NameTextString:
db "NAME?@"
-NicknameTextString: ; 6953 (1:6953)
+NicknameTextString:
db "NICKNAME?@"
diff --git a/engine/menu/oaks_pc.asm b/engine/menu/oaks_pc.asm
index 7ff03c46..55852b63 100755
--- a/engine/menu/oaks_pc.asm
+++ b/engine/menu/oaks_pc.asm
@@ -1,4 +1,4 @@
-OpenOaksPC: ; 1e915 (7:6915)
+OpenOaksPC:
call SaveScreenTilesToBuffer2
ld hl, AccessedOaksPCText
call PrintText
@@ -14,14 +14,14 @@ OpenOaksPC: ; 1e915 (7:6915)
call PrintText
jp LoadScreenTilesFromBuffer2
-GetDexRatedText: ; 1e93b (7:693b)
+GetDexRatedText:
TX_FAR _GetDexRatedText
db "@"
-ClosedOaksPCText: ; 1e940 (7:6940)
+ClosedOaksPCText:
TX_FAR _ClosedOaksPCText
db $0d,"@"
-AccessedOaksPCText: ; 1e946 (7:6946)
+AccessedOaksPCText:
TX_FAR _AccessedOaksPCText
db "@"
diff --git a/engine/menu/party_menu.asm b/engine/menu/party_menu.asm
index f3e1a138..7ef14232 100755
--- a/engine/menu/party_menu.asm
+++ b/engine/menu/party_menu.asm
@@ -17,14 +17,14 @@
; f6: health returned
; f7: revitalized
; f8: leveled up
-DrawPartyMenu_: ; 12cd2 (4:6cd2)
+DrawPartyMenu_:
xor a
ld [H_AUTOBGTRANSFERENABLED],a
call ClearScreen
call UpdateSprites
callba LoadMonPartySpriteGfxWithLCDDisabled ; load pokemon icon graphics
-RedrawPartyMenu_: ; 12ce3 (4:6ce3)
+RedrawPartyMenu_:
ld a,[wPartyMenuTypeOrMessageID]
cp a,SWAP_MONS_PARTY_MENU
jp z,.printMessage
@@ -234,7 +234,7 @@ RedrawPartyMenu_: ; 12ce3 (4:6ce3)
call PrintText
jr .done
-PartyMenuItemUseMessagePointers: ; 12e61 (4:6e61)
+PartyMenuItemUseMessagePointers:
dw AntidoteText
dw BurnHealText
dw IceHealText
@@ -245,7 +245,7 @@ PartyMenuItemUseMessagePointers: ; 12e61 (4:6e61)
dw ReviveText
dw RareCandyText
-PartyMenuMessagePointers: ; 12e73 (4:6e73)
+PartyMenuMessagePointers:
dw PartyMenuNormalText
dw PartyMenuItemUseText
dw PartyMenuBattleText
@@ -253,65 +253,65 @@ PartyMenuMessagePointers: ; 12e73 (4:6e73)
dw PartyMenuSwapMonText
dw PartyMenuItemUseText
-PartyMenuNormalText: ; 12e7f (4:6e7f)
+PartyMenuNormalText:
TX_FAR _PartyMenuNormalText
db "@"
-PartyMenuItemUseText: ; 12e84 (4:6e84)
+PartyMenuItemUseText:
TX_FAR _PartyMenuItemUseText
db "@"
-PartyMenuBattleText: ; 12e89 (4:6e89)
+PartyMenuBattleText:
TX_FAR _PartyMenuBattleText
db "@"
-PartyMenuUseTMText: ; 12e8e (4:6e8e)
+PartyMenuUseTMText:
TX_FAR _PartyMenuUseTMText
db "@"
-PartyMenuSwapMonText: ; 12e93 (4:6e93)
+PartyMenuSwapMonText:
TX_FAR _PartyMenuSwapMonText
db "@"
-PotionText: ; 12e98 (4:6e98)
+PotionText:
TX_FAR _PotionText
db "@"
-AntidoteText: ; 12e9d (4:6e9d)
+AntidoteText:
TX_FAR _AntidoteText
db "@"
-ParlyzHealText: ; 12ea2 (4:6ea2)
+ParlyzHealText:
TX_FAR _ParlyzHealText
db "@"
-BurnHealText: ; 12ea7 (4:6ea7)
+BurnHealText:
TX_FAR _BurnHealText
db "@"
-IceHealText: ; 12eac (4:6eac)
+IceHealText:
TX_FAR _IceHealText
db "@"
-AwakeningText: ; 12eb1 (4:6eb1)
+AwakeningText:
TX_FAR _AwakeningText
db "@"
-FullHealText: ; 12eb6 (4:6eb6)
+FullHealText:
TX_FAR _FullHealText
db "@"
-ReviveText: ; 12ebb (4:6ebb)
+ReviveText:
TX_FAR _ReviveText
db "@"
-RareCandyText: ; 12ec0 (4:6ec0)
+RareCandyText:
TX_FAR _RareCandyText
db $0B
db $06
db "@"
-SetPartyMenuHPBarColor: ; 12ec7 (4:6ec7)
+SetPartyMenuHPBarColor:
ld hl, wPartyMenuHPBarColors
ld a, [wWhichPartyMenuHPBar]
ld c, a
diff --git a/engine/menu/pc.asm b/engine/menu/pc.asm
index 78b35b95..8ec31226 100755
--- a/engine/menu/pc.asm
+++ b/engine/menu/pc.asm
@@ -1,4 +1,4 @@
-ActivatePC: ; 17e2c (5:7e2c)
+ActivatePC:
call SaveScreenTilesToBuffer2
ld a, SFX_TURN_ON_PC
call PlaySound
@@ -9,7 +9,7 @@ ActivatePC: ; 17e2c (5:7e2c)
set 3, [hl]
call LoadScreenTilesFromBuffer2
call Delay3
-PCMainMenu: ; 17e48 (5:7e48)
+PCMainMenu:
callba DisplayPCMainMenu
ld hl, wFlags_0xcd60
set 5, [hl]
@@ -58,19 +58,19 @@ PCMainMenu: ; 17e48 (5:7e48)
call PrintText
callba PlayerPC
jr ReloadMainMenu
-OaksPC: ; 17ec0 (5:7ec0)
+OaksPC:
ld a, SFX_ENTER_PC
call PlaySound
call WaitForSoundToFinish
callba OpenOaksPC
jr ReloadMainMenu
-PKMNLeague: ; 17ed2 (5:7ed2)
+PKMNLeague:
ld a, SFX_ENTER_PC
call PlaySound
call WaitForSoundToFinish
callba PKMNLeaguePC
jr ReloadMainMenu
-BillsPC: ; 17ee4 (5:7ee4)
+BillsPC:
ld a, SFX_ENTER_PC
call PlaySound
call WaitForSoundToFinish
@@ -83,13 +83,13 @@ BillsPC: ; 17ee4 (5:7ee4)
.printText
call PrintText
callba BillsPC_
-ReloadMainMenu: ; 17f06 (5:7f06)
+ReloadMainMenu:
xor a
ld [wDoNotWaitForButtonPressAfterDisplayingText], a
call ReloadMapData
call UpdateSprites
jp PCMainMenu
-LogOff: ; 17f13 (5:7f13)
+LogOff:
ld a, SFX_TURN_OFF_PC
call PlaySound
call WaitForSoundToFinish
@@ -98,24 +98,24 @@ LogOff: ; 17f13 (5:7f13)
res 5, [hl]
ret
-TurnedOnPC1Text: ; 17f23 (5:7f23)
+TurnedOnPC1Text:
TX_FAR _TurnedOnPC1Text
db "@"
-AccessedBillsPCText: ; 17f28 (5:7f28)
+AccessedBillsPCText:
TX_FAR _AccessedBillsPCText
db "@"
-AccessedSomeonesPCText: ; 17f2d (5:7f2d)
+AccessedSomeonesPCText:
TX_FAR _AccessedSomeonesPCText
db "@"
-AccessedMyPCText: ; 17f32 (5:7f32)
+AccessedMyPCText:
TX_FAR _AccessedMyPCText
db "@"
; removes one of the specified item ID [hItemToRemoveID] from bag (if existent)
-RemoveItemByID: ; 17f37 (5:7f37)
+RemoveItemByID:
ld hl, wBagItems
ld a, [hItemToRemoveID]
ld b, a
diff --git a/engine/menu/players_pc.asm b/engine/menu/players_pc.asm
index 00889e93..bc2be4ef 100755
--- a/engine/menu/players_pc.asm
+++ b/engine/menu/players_pc.asm
@@ -1,4 +1,4 @@
-PlayerPC: ; 78e6 (1:78e6)
+PlayerPC:
ld hl, wd730
set 6, [hl]
ld a, ITEM_NAME
@@ -16,7 +16,7 @@ PlayerPC: ; 78e6 (1:78e6)
ld hl, TurnedOnPC2Text
call PrintText
-PlayerPCMenu: ; 790c (1:790c)
+PlayerPCMenu:
ld a, [wParentMenuItem]
ld [wCurrentMenuItem], a
ld hl, wFlags_0xcd60
@@ -62,7 +62,7 @@ PlayerPCMenu: ; 790c (1:790c)
dec a
jp z, PlayerPCToss
-ExitPlayerPC: ; 796d (1:796d)
+ExitPlayerPC:
ld a, [wFlags_0xcd60]
bit 3, a ; accessing player's PC through another PC?
jr nz, .next
@@ -83,7 +83,7 @@ ExitPlayerPC: ; 796d (1:796d)
ld [wDoNotWaitForButtonPressAfterDisplayingText], a
ret
-PlayerPCDeposit: ; 7995 (1:7995)
+PlayerPCDeposit:
xor a
ld [wCurrentMenuItem], a
ld [wListScrollOffset], a
@@ -137,7 +137,7 @@ PlayerPCDeposit: ; 7995 (1:7995)
call PrintText
jp .loop
-PlayerPCWithdraw: ; 7a12 (1:7a12)
+PlayerPCWithdraw:
xor a
ld [wCurrentMenuItem], a
ld [wListScrollOffset], a
@@ -191,7 +191,7 @@ PlayerPCWithdraw: ; 7a12 (1:7a12)
call PrintText
jp .loop
-PlayerPCToss: ; 7a8f (1:7a8f)
+PlayerPCToss:
xor a
ld [wCurrentMenuItem], a
ld [wListScrollOffset], a
@@ -240,64 +240,64 @@ PlayerPCToss: ; 7a8f (1:7a8f)
call TossItem ; disallows tossing key items
jp .loop
-PlayersPCMenuEntries: ; 7af5 (1:7af5)
+PlayersPCMenuEntries:
db "WITHDRAW ITEM"
next "DEPOSIT ITEM"
next "TOSS ITEM"
next "LOG OFF@"
-TurnedOnPC2Text: ; 7b22 (1:7b22)
+TurnedOnPC2Text:
TX_FAR _TurnedOnPC2Text
db "@"
-WhatDoYouWantText: ; 7b27 (1:7b27)
+WhatDoYouWantText:
TX_FAR _WhatDoYouWantText
db "@"
-WhatToDepositText: ; 7b2c (1:7b2c)
+WhatToDepositText:
TX_FAR _WhatToDepositText
db "@"
-DepositHowManyText: ; 7b31 (1:7b31)
+DepositHowManyText:
TX_FAR _DepositHowManyText
db "@"
-ItemWasStoredText: ; 7b36 (1:7b36)
+ItemWasStoredText:
TX_FAR _ItemWasStoredText
db "@"
-NothingToDepositText: ; 7b3b (1:7b3b)
+NothingToDepositText:
TX_FAR _NothingToDepositText
db "@"
-NoRoomToStoreText: ; 7b40 (1:7b40)
+NoRoomToStoreText:
TX_FAR _NoRoomToStoreText
db "@"
-WhatToWithdrawText: ; 7b45 (1:7b45)
+WhatToWithdrawText:
TX_FAR _WhatToWithdrawText
db "@"
-WithdrawHowManyText: ; 7b4a (1:7b4a)
+WithdrawHowManyText:
TX_FAR _WithdrawHowManyText
db "@"
-WithdrewItemText: ; 7b4f (1:7b4f)
+WithdrewItemText:
TX_FAR _WithdrewItemText
db "@"
-NothingStoredText: ; 7b54 (1:7b54)
+NothingStoredText:
TX_FAR _NothingStoredText
db "@"
-CantCarryMoreText: ; 7b59 (1:7b59)
+CantCarryMoreText:
TX_FAR _CantCarryMoreText
db "@"
-WhatToTossText: ; 7b5e (1:7b5e)
+WhatToTossText:
TX_FAR _WhatToTossText
db "@"
-TossHowManyText: ; 7b63 (1:7b63)
+TossHowManyText:
TX_FAR _TossHowManyText
db "@"
diff --git a/engine/menu/pokedex.asm b/engine/menu/pokedex.asm
index 3898ef43..3078f1a9 100755
--- a/engine/menu/pokedex.asm
+++ b/engine/menu/pokedex.asm
@@ -1,4 +1,4 @@
-ShowPokedexMenu: ; 40000 (10:4000)
+ShowPokedexMenu:
call GBPalWhiteOut
call ClearScreen
call UpdateSprites
@@ -57,7 +57,7 @@ ShowPokedexMenu: ; 40000 (10:4000)
; 00: showed pokemon data or area
; 01: the player chose Quit
; 02: the pokemon has not been seen yet or the player pressed the B button
-HandlePokedexSideMenu: ; 4006d (10:406d)
+HandlePokedexSideMenu:
call PlaceUnfilledArrowMenuCursor
ld a,[wCurrentMenuItem]
push af
@@ -150,7 +150,7 @@ HandlePokedexSideMenu: ; 4006d (10:406d)
; handles the list of pokemon on the left of the pokedex screen
; sets carry flag if player presses A, unsets carry flag if player presses B
-HandlePokedexListMenu: ; 40111 (10:4111)
+HandlePokedexListMenu:
xor a
ld [H_AUTOBGTRANSFERENABLED],a
; draw the horizontal line separating the seen and owned amounts from the menu
@@ -342,7 +342,7 @@ HandlePokedexListMenu: ; 40111 (10:4111)
and a
ret
-DrawPokedexVerticalLine: ; 4028e (10:428e)
+DrawPokedexVerticalLine:
ld c,9 ; height of line
ld de,20 ; width of screen
ld a,$71 ; vertical line tile
@@ -354,16 +354,16 @@ DrawPokedexVerticalLine: ; 4028e (10:428e)
jr nz,.loop
ret
-PokedexSeenText: ; 4029d (10:429d)
+PokedexSeenText:
db "SEEN@"
-PokedexOwnText: ; 402a2 (10:42a2)
+PokedexOwnText:
db "OWN@"
-PokedexContentsText: ; 402a6 (10:42a6)
+PokedexContentsText:
db "CONTENTS@"
-PokedexMenuItemsText: ; 402af (10:42af)
+PokedexMenuItemsText:
db "DATA"
next "CRY"
next "AREA"
@@ -373,7 +373,7 @@ PokedexMenuItemsText: ; 402af (10:42af)
; INPUT:
; [wd11e] = pokedex number
; hl = address of bit field
-IsPokemonBitSet: ; 402c2 (10:42c2)
+IsPokemonBitSet:
ld a,[wd11e]
dec a
ld c,a
@@ -384,14 +384,14 @@ IsPokemonBitSet: ; 402c2 (10:42c2)
ret
; function to display pokedex data from outside the pokedex
-ShowPokedexData: ; 402d1 (10:42d1)
+ShowPokedexData:
call GBPalWhiteOutWithDelay3
call ClearScreen
call UpdateSprites
callab LoadPokedexTilePatterns ; load pokedex tiles
; function to display pokedex data from inside the pokedex
-ShowPokedexDataInternal: ; 402e2 (10:42e2)
+ShowPokedexDataInternal:
ld hl,wd72c
set 1,[hl]
ld a,$33 ; 3/7 volume
@@ -567,15 +567,15 @@ ShowPokedexDataInternal: ; 402e2 (10:42e2)
ld [rNR50],a
ret
-HeightWeightText: ; 40448 (10:4448)
+HeightWeightText:
db "HT ?",$60,"??",$61,$4E,"WT ???lb@"
; XXX does anything point to this?
-PokeText: ; 4045d (10:445d)
+PokeText:
db "#@"
; horizontal line that divides the pokedex text description from the rest of the data
-PokedexDataDividerLine: ; 4045f (10:445f)
+PokedexDataDividerLine:
db $68,$69,$6B,$69,$6B
db $69,$6B,$69,$6B,$6B
db $6B,$6B,$69,$6B,$69
@@ -588,7 +588,7 @@ PokedexDataDividerLine: ; 4045f (10:445f)
; c = number of tile ID's to write
; de = amount to destination address after each tile (1 for horizontal, 20 for vertical)
; hl = destination address
-DrawTileLine: ; 40474 (10:4474)
+DrawTileLine:
push bc
push de
.loop
@@ -602,7 +602,7 @@ DrawTileLine: ; 40474 (10:4474)
INCLUDE "data/pokedex_entries.asm"
-PokedexToIndex: ; 40ff9 (10:4ff9)
+PokedexToIndex:
; converts the Pokédex number at wd11e to an index
push bc
push hl
@@ -623,7 +623,7 @@ PokedexToIndex: ; 40ff9 (10:4ff9)
pop bc
ret
-IndexToPokedex: ; 41010 (10:5010)
+IndexToPokedex:
; converts the indexédex number at wd11e to a Pokédex number
push bc
push hl
diff --git a/engine/menu/prize_menu.asm b/engine/menu/prize_menu.asm
index 434a1943..b48fa99c 100755
--- a/engine/menu/prize_menu.asm
+++ b/engine/menu/prize_menu.asm
@@ -1,4 +1,4 @@
-CeladonPrizeMenu: ; 5271b (14:671b)
+CeladonPrizeMenu:
ld b,COIN_CASE
call IsItemInBag
jr nz,.havingCoinCase
@@ -42,20 +42,20 @@ CeladonPrizeMenu: ; 5271b (14:671b)
res 6,[hl]
ret
-RequireCoinCaseTextPtr: ; 5277e (14:677e)
+RequireCoinCaseTextPtr:
TX_FAR _RequireCoinCaseText
db $0D
db "@"
-ExchangeCoinsForPrizesTextPtr: ; 52784 (14:6784)
+ExchangeCoinsForPrizesTextPtr:
TX_FAR _ExchangeCoinsForPrizesText
db "@"
-WhichPrizeTextPtr: ; 52789 (14:6789)
+WhichPrizeTextPtr:
TX_FAR _WhichPrizeText
db "@"
-GetPrizeMenuId: ; 5278e (14:678e)
+GetPrizeMenuId:
; determine which one among the three
; prize-texts has been selected
; using the text ID (stored in [hSpriteIndexOrTextID])
@@ -147,7 +147,7 @@ GetPrizeMenuId: ; 5278e (14:678e)
INCLUDE "data/prizes.asm"
-PrintPrizePrice: ; 5287a (14:687a)
+PrintPrizePrice:
coord hl, 11, 0
ld b,$01
ld c,$07
@@ -171,7 +171,7 @@ PrintPrizePrice: ; 5287a (14:687a)
.SixSpacesText
db " @"
-LoadCoinsToSubtract: ; 528b1 (14:68b1)
+LoadCoinsToSubtract:
ld a,[wWhichPrize]
add a
ld d,0
@@ -186,7 +186,7 @@ LoadCoinsToSubtract: ; 528b1 (14:68b1)
ld [hCoins + 1],a
ret
-HandlePrizeChoice: ; 528c6 (14:68c6)
+HandlePrizeChoice:
ld a,[wCurrentMenuItem]
ld [wWhichPrize],a
ld d,0
@@ -260,35 +260,35 @@ HandlePrizeChoice: ; 528c6 (14:68c6)
ld hl,OhFineThenTextPtr
jp PrintText
-UnknownData52951: ; 52951 (14:6951)
+UnknownData52951:
; XXX what's this?
db $00,$01,$00,$01,$00,$01,$00,$00,$01
-HereYouGoTextPtr: ; 5295a (14:695a)
+HereYouGoTextPtr:
TX_FAR _HereYouGoText
db $0D
db "@"
-SoYouWantPrizeTextPtr: ; 52960 (14:6960)
+SoYouWantPrizeTextPtr:
TX_FAR _SoYouWantPrizeText
db "@"
-SorryNeedMoreCoinsText: ; 52965 (14:6965)
+SorryNeedMoreCoinsText:
TX_FAR _SorryNeedMoreCoinsText
db $0D
db "@"
-PrizeRoomBagIsFullTextPtr: ; 5296b (14:696b)
+PrizeRoomBagIsFullTextPtr:
TX_FAR _OopsYouDontHaveEnoughRoomText
db $0D
db "@"
-OhFineThenTextPtr: ; 52971 (14:6971)
+OhFineThenTextPtr:
TX_FAR _OhFineThenText
db $0D ; wait keypress (A/B) without blink
db "@"
-GetPrizeMonLevel: ; 52977 (14:6977)
+GetPrizeMonLevel:
ld a,[wcf91]
ld b,a
ld hl,PrizeMonLevelDictionary
diff --git a/engine/menu/start_menu.asm b/engine/menu/start_menu.asm
index 3c48e6ed..029d8c01 100755
--- a/engine/menu/start_menu.asm
+++ b/engine/menu/start_menu.asm
@@ -1,4 +1,4 @@
-DisplayStartMenu:: ; 2acd (0:2acd)
+DisplayStartMenu::
ld a,BANK(StartMenu_Pokedex)
ld [H_LOADEDROMBANK],a
ld [MBC1RomBank],a
@@ -7,7 +7,7 @@ DisplayStartMenu:: ; 2acd (0:2acd)
ld a, SFX_START_MENU
call PlaySound
-RedisplayStartMenu:: ; 2adf (0:2adf)
+RedisplayStartMenu::
callba DrawStartMenu
callba PrintSafariZoneSteps ; print Safari Zone info, if in Safari Zone
call UpdateSprites
@@ -76,7 +76,7 @@ RedisplayStartMenu:: ; 2adf (0:2adf)
jp z,StartMenu_Option
; EXIT falls through to here
-CloseStartMenu:: ; 2b70 (0:2b70)
+CloseStartMenu::
call Joypad
ld a,[hJoyPressed]
bit 0,a ; was A button newly pressed?
diff --git a/engine/menu/start_sub_menus.asm b/engine/menu/start_sub_menus.asm
index 34c21da0..9ae6cbe5 100755
--- a/engine/menu/start_sub_menus.asm
+++ b/engine/menu/start_sub_menus.asm
@@ -1,4 +1,4 @@
-StartMenu_Pokedex: ; 13095 (4:7095)
+StartMenu_Pokedex:
predef ShowPokedexMenu
call LoadScreenTilesFromBuffer2 ; restore saved screen
call Delay3
@@ -6,7 +6,7 @@ StartMenu_Pokedex: ; 13095 (4:7095)
call UpdateSprites
jp RedisplayStartMenu
-StartMenu_Pokemon: ; 130a9 (4:70a9)
+StartMenu_Pokemon:
ld a,[wPartyCount]
and a
jp z,RedisplayStartMenu
@@ -284,7 +284,7 @@ StartMenu_Pokemon: ; 130a9 (4:70a9)
db "@"
; writes a blank tile to all possible menu cursor positions on the party menu
-ErasePartyMenuCursors: ; 132ed (4:72ed)
+ErasePartyMenuCursors:
coord hl, 0, 1
ld bc,2 * 20 ; menu cursor positions are 2 rows apart
ld a,6 ; 6 menu cursor positions
@@ -295,11 +295,11 @@ ErasePartyMenuCursors: ; 132ed (4:72ed)
jr nz,.loop
ret
-ItemMenuLoop: ; 132fc (4:72fc)
+ItemMenuLoop:
call LoadScreenTilesFromBuffer2DisableBGTransfer ; restore saved screen
call RunDefaultPaletteCommand
-StartMenu_Item: ; 13302 (4:7302)
+StartMenu_Item:
ld a,[wLinkState]
dec a ; is the player in the Colosseum or Trade Centre?
jr nz,.notInCableClubRoom
@@ -438,16 +438,16 @@ StartMenu_Item: ; 13302 (4:7302)
.tossZeroItems
jp ItemMenuLoop
-CannotUseItemsHereText: ; 1342a (4:742a)
+CannotUseItemsHereText:
TX_FAR _CannotUseItemsHereText
db "@"
-CannotGetOffHereText: ; 1342f (4:742f)
+CannotGetOffHereText:
TX_FAR _CannotGetOffHereText
db "@"
; items which bring up the party menu when used
-UsableItems_PartyMenu: ; 13434 (4:7434)
+UsableItems_PartyMenu:
db MOON_STONE
db ANTIDOTE
db BURN_HEAL
@@ -487,7 +487,7 @@ UsableItems_PartyMenu: ; 13434 (4:7434)
db $ff
; items which close the item menu when used
-UsableItems_CloseMenu: ; 13459 (4:7459)
+UsableItems_CloseMenu:
db ESCAPE_ROPE
db ITEMFINDER
db POKE_FLUTE
@@ -496,7 +496,7 @@ UsableItems_CloseMenu: ; 13459 (4:7459)
db SUPER_ROD
db $ff
-StartMenu_TrainerInfo: ; 13460 (4:7460)
+StartMenu_TrainerInfo:
call GBPalWhiteOut
call ClearScreen
call UpdateSprites
@@ -521,7 +521,7 @@ StartMenu_TrainerInfo: ; 13460 (4:7460)
jp RedisplayStartMenu
; loads tile patterns and draws everything except for gym leader faces / badges
-DrawTrainerInfo: ; 1349a (4:749a)
+DrawTrainerInfo:
ld de,RedPicFront
lb bc, BANK(RedPicFront), $01
predef DisplayPicCenteredOrUpperRight
@@ -610,17 +610,17 @@ DrawTrainerInfo: ; 1349a (4:749a)
lb bc, LEADING_ZEROES | 1, 2
jp PrintNumber
-TrainerInfo_FarCopyData: ; 1357f (4:757f)
+TrainerInfo_FarCopyData:
ld a,BANK(TrainerInfoTextBoxTileGraphics)
jp FarCopyData2
-TrainerInfo_NameMoneyTimeText: ; 13584 (4:7584)
+TrainerInfo_NameMoneyTimeText:
db "NAME/"
next "MONEY/"
next "TIME/@"
; $76 is a circle tile
-TrainerInfo_BadgesText: ; 13597 (4:7597)
+TrainerInfo_BadgesText:
db $76,"BADGES",$76,"@"
; draws a text box on the trainer info screen
@@ -630,7 +630,7 @@ TrainerInfo_BadgesText: ; 13597 (4:7597)
; [wTrainerInfoTextBoxWidthPlus1] = width
; [wTrainerInfoTextBoxWidth] = width - 1
; [wTrainerInfoTextBoxNextRowOffset] = distance from the end of a text box row to the start of the next
-TrainerInfo_DrawTextBox: ; 135a0 (4:75a0)
+TrainerInfo_DrawTextBox:
ld a,$79 ; upper left corner tile ID
lb de, $7a, $7b ; top edge and upper right corner tile ID's
call TrainerInfo_DrawHorizontalEdge ; draw top edge
@@ -649,7 +649,7 @@ TrainerInfo_DrawTextBox: ; 135a0 (4:75a0)
ld a,$7d ; lower left corner tile ID
lb de,$77, $7e ; bottom edge and lower right corner tile ID's
-TrainerInfo_DrawHorizontalEdge: ; 135c3 (4:75c3)
+TrainerInfo_DrawHorizontalEdge:
ld [hli],a ; place left corner tile
ld a,[wTrainerInfoTextBoxWidth]
ld c,a
@@ -662,7 +662,7 @@ TrainerInfo_DrawHorizontalEdge: ; 135c3 (4:75c3)
ld [hl],a ; place right corner tile
ret
-TrainerInfo_NextTextBoxRow: ; 135d0 (4:75d0)
+TrainerInfo_NextTextBoxRow:
ld a,[wTrainerInfoTextBoxNextRowOffset] ; distance to the start of the next row
.loop
inc hl
@@ -674,7 +674,7 @@ TrainerInfo_NextTextBoxRow: ; 135d0 (4:75d0)
; INPUT:
; hl = address of top tile in the line
; a = tile ID
-TrainerInfo_DrawVerticalLine: ; 135d8 (4:75d8)
+TrainerInfo_DrawVerticalLine:
ld de,20
ld c,8
.loop
@@ -684,7 +684,7 @@ TrainerInfo_DrawVerticalLine: ; 135d8 (4:75d8)
jr nz,.loop
ret
-StartMenu_SaveReset: ; 135e3 (4:75e3)
+StartMenu_SaveReset:
ld a,[wd72e]
bit 6,a ; is the player using the link feature?
jp nz,Init
@@ -692,7 +692,7 @@ StartMenu_SaveReset: ; 135e3 (4:75e3)
call LoadScreenTilesFromBuffer2 ; restore saved screen
jp HoldTextDisplayOpen
-StartMenu_Option: ; 135f6 (4:75f6)
+StartMenu_Option:
xor a
ld [H_AUTOBGTRANSFERENABLED],a
call ClearScreen
@@ -703,7 +703,7 @@ StartMenu_Option: ; 135f6 (4:75f6)
call UpdateSprites
jp RedisplayStartMenu
-SwitchPartyMon: ; 13613 (4:7613)
+SwitchPartyMon:
call SwitchPartyMon_InitVarOrSwapData ; swap data
ld a, [wSwappedMenuItem]
call SwitchPartyMon_ClearGfx
@@ -711,7 +711,7 @@ SwitchPartyMon: ; 13613 (4:7613)
call SwitchPartyMon_ClearGfx
jp RedrawPartyMenu_
-SwitchPartyMon_ClearGfx: ; 13625 (4:7625)
+SwitchPartyMon_ClearGfx:
push af
coord hl, 0, 0
ld bc, SCREEN_WIDTH * 2
@@ -737,7 +737,7 @@ SwitchPartyMon_ClearGfx: ; 13625 (4:7625)
ld a, SFX_SWAP
jp PlaySound
-SwitchPartyMon_InitVarOrSwapData: ; 13653 (4:7653)
+SwitchPartyMon_InitVarOrSwapData:
; This is used to initialise [wMenuItemToSwap] and to actually swap the data.
ld a, [wMenuItemToSwap]
and a ; has [wMenuItemToSwap] been initialised yet?
diff --git a/engine/menu/status_screen.asm b/engine/menu/status_screen.asm
index d07cc026..4770483d 100755
--- a/engine/menu/status_screen.asm
+++ b/engine/menu/status_screen.asm
@@ -1,15 +1,15 @@
-DrawHP: ; 128ef (4:68ef)
+DrawHP:
; Draws the HP bar in the stats screen
call GetPredefRegisters
ld a, $1
jr DrawHP_
-DrawHP2: ; 128f6 (4:68f6)
+DrawHP2:
; Draws the HP bar in the party screen
call GetPredefRegisters
ld a, $2
-DrawHP_: ; 128fb (4:68fb)
+DrawHP_:
ld [wHPBarType], a
push hl
ld a, [wLoadedMonHP]
@@ -63,7 +63,7 @@ DrawHP_: ; 128fb (4:68fb)
; Predef 0x37
-StatusScreen: ; 12953 (4:6953)
+StatusScreen:
call LoadMonData
ld a, [wMonDataLocation]
cp BOX_DATA
@@ -192,34 +192,34 @@ StatusScreen: ; 12953 (4:6953)
ld a, [wWhichPokemon]
jp SkipFixedLengthTextEntries
-OTPointers: ; 12a95 (4:6a95)
+OTPointers:
dw wPartyMonOT
dw wEnemyMonOT
dw wBoxMonOT
dw wDayCareMonOT
-NamePointers2: ; 12a9d (4:6a9d)
+NamePointers2:
dw wPartyMonNicks
dw wEnemyMonNicks
dw wBoxMonNicks
dw wDayCareMonName
-Type1Text: ; 12aa5 (4:6aa5)
+Type1Text:
db "TYPE1/", $4e
-Type2Text: ; 12aac (4:6aac)
+Type2Text:
db "TYPE2/", $4e
-IDNoText: ; 12ab3 (4:6ab3)
+IDNoText:
db $73, "№", "/", $4e
-OTText: ; 12ab7 (4:6ab7)
+OTText:
db "OT/", $4e, "@"
-StatusText: ; 12abc (4:6abc)
+StatusText:
db "STATUS/@"
-OKText: ; 12ac4 (4:6ac4)
+OKText:
db "OK@"
; Draws a line starting from hl high b and wide c
@@ -244,7 +244,7 @@ PTile: ; 12adc (4:6adc) ; This is a single 1bpp "P" tile
INCBIN "gfx/p_tile.1bpp"
PTileEnd:
-PrintStatsBox: ; 12ae4 (4:6ae4)
+PrintStatsBox:
ld a, d
and a ; a is 0 from the status screen
jr nz, .DifferentBox
@@ -287,13 +287,13 @@ PrintStat
add hl, de
ret
-StatsText: ; 12b3a (4:6b3a)
+StatsText:
db "ATTACK"
next "DEFENSE"
next "SPEED"
next "SPECIAL@"
-StatusScreen2: ; 12b57 (4:6b57)
+StatusScreen2:
ld a, [hTilesetType]
push af
xor a
@@ -435,7 +435,7 @@ StatusScreen2: ; 12b57 (4:6b57)
call GBPalWhiteOut
jp ClearScreen
-CalcExpToLevelUp: ; 12c86 (4:6c86)
+CalcExpToLevelUp:
ld a, [wLoadedMonLevel]
cp MAX_LEVEL
jr z, .atMaxLevel
@@ -461,16 +461,16 @@ CalcExpToLevelUp: ; 12c86 (4:6c86)
ld [hl], a
ret
-StatusScreenExpText: ; 12caf (4:6caf)
+StatusScreenExpText:
db "EXP POINTS"
next "LEVEL UP@"
-StatusScreen_ClearName: ; 12cc3 (4:6cc3)
+StatusScreen_ClearName:
ld bc, 10
ld a, " "
jp FillMemory
-StatusScreen_PrintPP: ; 12ccb (4:6ccb)
+StatusScreen_PrintPP:
; print PP or -- c times, going down two rows each time
ld [hli], a
ld [hld], a
diff --git a/engine/menu/vending_machine.asm b/engine/menu/vending_machine.asm
index 8460889f..b32568f9 100755
--- a/engine/menu/vending_machine.asm
+++ b/engine/menu/vending_machine.asm
@@ -1,4 +1,4 @@
-VendingMachineMenu: ; 74ee0 (1d:4ee0)
+VendingMachineMenu:
ld hl, VendingMachineText1
call PrintText
ld a, MONEY_BOX
@@ -80,38 +80,38 @@ VendingMachineMenu: ; 74ee0 (1d:4ee0)
ld hl, VendingMachineText7
jp PrintText
-VendingMachineText1: ; 74f99 (1d:4f99)
+VendingMachineText1:
TX_FAR _VendingMachineText1
db "@"
-DrinkText: ; 74f9e (1d:4f9e)
+DrinkText:
db "FRESH WATER"
next "SODA POP"
next "LEMONADE"
next "CANCEL@"
-DrinkPriceText: ; 74fc3 (1d:4fc3)
+DrinkPriceText:
db "¥200"
next "¥300"
next "¥350",$4E,"@"
-VendingMachineText4: ; 74fd3 (1d:4fd3)
+VendingMachineText4:
TX_FAR _VendingMachineText4
db "@"
-VendingMachineText5: ; 74fd8 (1d:4fd8)
+VendingMachineText5:
TX_FAR _VendingMachineText5
db "@"
-VendingMachineText6: ; 74fdd (1d:4fdd)
+VendingMachineText6:
TX_FAR _VendingMachineText6
db "@"
-VendingMachineText7: ; 74fe2 (1d:4fe2)
+VendingMachineText7:
TX_FAR _VendingMachineText7
db "@"
-LoadVendingMachineItem: ; 74fe7 (1d:4fe7)
+LoadVendingMachineItem:
ld hl, VendingPrices
ld a, [wCurrentMenuItem]
add a
@@ -129,7 +129,7 @@ LoadVendingMachineItem: ; 74fe7 (1d:4fe7)
ld [hVendingMachinePrice + 2], a
ret
-VendingPrices: ; 75000 (1d:5000)
+VendingPrices:
db FRESH_WATER,$00,$02,$00
db SODA_POP, $00,$03,$00
db LEMONADE, $00,$03,$50
diff --git a/engine/mon_party_sprites.asm b/engine/mon_party_sprites.asm
index 185151cb..6845b790 100755
--- a/engine/mon_party_sprites.asm
+++ b/engine/mon_party_sprites.asm
@@ -1,4 +1,4 @@
-AnimatePartyMon_ForceSpeed1: ; 716f7 (1c:56f7)
+AnimatePartyMon_ForceSpeed1:
xor a
ld [wCurrentMenuItem], a
ld b, a
@@ -9,7 +9,7 @@ AnimatePartyMon_ForceSpeed1: ; 716f7 (1c:56f7)
; 0: green
; 1: yellow
; 2: red
-AnimatePartyMon: ; 716ff (1c:56ff)
+AnimatePartyMon:
ld hl, wPartyMenuHPBarColors
ld a, [wCurrentMenuItem]
ld c, a
@@ -17,7 +17,7 @@ AnimatePartyMon: ; 716ff (1c:56ff)
add hl, bc
ld a, [hl]
-GetAnimationSpeed: ; 7170a (1c:570a)
+GetAnimationSpeed:
ld c, a
ld hl, PartyMonSpeeds
add hl, bc
@@ -85,15 +85,15 @@ GetAnimationSpeed: ; 7170a (1c:570a)
; The members of the PartyMonSpeeds array specify the number of V-blanks
; that each frame lasts for green HP, yellow HP, and red HP in order.
; On the naming screen, the yellow HP speed is always used.
-PartyMonSpeeds: ; 71769 (1c:5769)
+PartyMonSpeeds:
db 5, 16, 32
-LoadMonPartySpriteGfx: ; 7176c (1c:576c)
+LoadMonPartySpriteGfx:
; Load mon party sprite tile patterns into VRAM during V-blank.
ld hl, MonPartySpritePointers
ld a, $1c
-LoadAnimSpriteGfx: ; 71771 (1c:5771)
+LoadAnimSpriteGfx:
; Load animated sprite tile patterns into VRAM during V-blank. hl is the address
; of an array of structures that contain arguments for CopyVideoData and a is
; the number of structures in the array.
@@ -125,7 +125,7 @@ LoadAnimSpriteGfx: ; 71771 (1c:5771)
jr nz, .loop
ret
-LoadMonPartySpriteGfxWithLCDDisabled: ; 71791 (1c:5791)
+LoadMonPartySpriteGfxWithLCDDisabled:
; Load mon party sprite tile patterns into VRAM immediately by disabling the
; LCD.
call DisableLCD
@@ -162,7 +162,7 @@ LoadMonPartySpriteGfxWithLCDDisabled: ; 71791 (1c:5791)
jr nz, .asm_7179c
jp EnableLCD
-MonPartySpritePointers: ; 717c0 (1c:57c0)
+MonPartySpritePointers:
dw SlowbroSprite + $c0
db $40 / $10 ; 40 bytes
db BANK(SlowbroSprite)
@@ -303,7 +303,7 @@ MonPartySpritePointers: ; 717c0 (1c:57c0)
db BANK(MonPartySprites)
dw vSprites + $780
-WriteMonPartySpriteOAMByPartyIndex: ; 71868 (1c:5868)
+WriteMonPartySpriteOAMByPartyIndex:
; Write OAM blocks for the party mon in [hPartyMonIndex].
push hl
push de
@@ -322,7 +322,7 @@ WriteMonPartySpriteOAMByPartyIndex: ; 71868 (1c:5868)
pop hl
ret
-WriteMonPartySpriteOAMBySpecies: ; 71882 (1c:5882)
+WriteMonPartySpriteOAMBySpecies:
; Write OAM blocks for the party sprite of the species in
; [wMonPartySpriteSpecies].
xor a
@@ -332,7 +332,7 @@ WriteMonPartySpriteOAMBySpecies: ; 71882 (1c:5882)
ld [wOAMBaseTile], a
jr WriteMonPartySpriteOAM
-UnusedPartyMonSpriteFunction: ; 71890 (1c:5890)
+UnusedPartyMonSpriteFunction:
; This function is unused and doesn't appear to do anything useful. It looks
; like it may have been intended to load the tile patterns and OAM data for
; the mon party sprite associated with the species in [wcf91].
@@ -370,7 +370,7 @@ UnusedPartyMonSpriteFunction: ; 71890 (1c:5890)
pop hl
jp CopyVideoData
-WriteMonPartySpriteOAM: ; 718c3 (1c:58c3)
+WriteMonPartySpriteOAM:
; Write the OAM blocks for the first animation frame into the OAM buffer and
; make a copy at wMonPartySpritesSavedOAM.
push af
@@ -396,7 +396,7 @@ WriteMonPartySpriteOAM: ; 718c3 (1c:58c3)
ld bc, $60
jp CopyData
-GetPartyMonSpriteID: ; 718e9 (1c:58e9)
+GetPartyMonSpriteID:
ld [wd11e], a
predef IndexToPokedex
ld a, [wd11e]
@@ -419,5 +419,5 @@ GetPartyMonSpriteID: ; 718e9 (1c:58e9)
INCLUDE "data/mon_party_sprites.asm"
-MonPartySprites: ; 71959 (1c:5959)
+MonPartySprites:
INCBIN "gfx/mon_ow_sprites.2bpp"
diff --git a/engine/multiply_divide.asm b/engine/multiply_divide.asm
index ec16c42b..52e86b36 100755
--- a/engine/multiply_divide.asm
+++ b/engine/multiply_divide.asm
@@ -1,4 +1,4 @@
-_Multiply: ; 37d41 (d:7d41)
+_Multiply:
ld a, $8
ld b, a
xor a
@@ -59,7 +59,7 @@ _Multiply: ; 37d41 (d:7d41)
ld [H_PRODUCT], a
ret
-_Divide: ; 37da5 (d:7da5)
+_Divide:
xor a
ld [H_DIVIDEBUFFER], a
ld [H_DIVIDEBUFFER+1], a
diff --git a/engine/oak_speech.asm b/engine/oak_speech.asm
index c4d35639..31c00fd0 100755
--- a/engine/oak_speech.asm
+++ b/engine/oak_speech.asm
@@ -1,4 +1,4 @@
-SetDefaultNames: ; 60ca (1:60ca)
+SetDefaultNames:
ld a, [wLetterPrintingDelayFlags]
push af
ld a, [wOptions]
@@ -31,7 +31,7 @@ SetDefaultNames: ; 60ca (1:60ca)
ld bc, NAME_LENGTH
jp CopyData
-OakSpeech: ; 6115 (1:6115)
+OakSpeech:
ld a,$FF
call PlaySound ; stop music
ld a, BANK(Music_Routes2)
@@ -152,25 +152,25 @@ OakSpeech: ; 6115 (1:6115)
call DelayFrames
call GBFadeOutToWhite
jp ClearScreen
-OakSpeechText1: ; 6253 (1:6253)
+OakSpeechText1:
TX_FAR _OakSpeechText1
db "@"
-OakSpeechText2: ; 6258 (1:6258)
+OakSpeechText2:
TX_FAR _OakSpeechText2A
db $14 ; play NIDORINA cry from TextCommandSounds
TX_FAR _OakSpeechText2B
db "@"
-IntroducePlayerText: ; 6262 (1:6262)
+IntroducePlayerText:
TX_FAR _IntroducePlayerText
db "@"
-IntroduceRivalText: ; 6267 (1:6267)
+IntroduceRivalText:
TX_FAR _IntroduceRivalText
db "@"
-OakSpeechText3: ; 626c (1:626c)
+OakSpeechText3:
TX_FAR _OakSpeechText3
db "@"
-FadeInIntroPic: ; 6271 (1:6271)
+FadeInIntroPic:
ld hl,IntroFadePalettes
ld b,6
.next
@@ -182,7 +182,7 @@ FadeInIntroPic: ; 6271 (1:6271)
jr nz,.next
ret
-IntroFadePalettes: ; 6282 (1:6282)
+IntroFadePalettes:
db %01010100
db %10101000
db %11111100
@@ -190,7 +190,7 @@ IntroFadePalettes: ; 6282 (1:6282)
db %11110100
db %11100100
-MovePicLeft: ; 6288 (1:6288)
+MovePicLeft:
ld a,119
ld [rWX],a
call DelayFrame
@@ -206,9 +206,9 @@ MovePicLeft: ; 6288 (1:6288)
ld [rWX],a
jr .next
-DisplayPicCenteredOrUpperRight: ; 62a1 (1:62a1)
+DisplayPicCenteredOrUpperRight:
call GetPredefRegisters
-IntroDisplayPicCenteredOrUpperRight: ; 62a4 (1:62a4)
+IntroDisplayPicCenteredOrUpperRight:
; b = bank
; de = address of compressed pic
; c: 0 = centred, non-zero = upper-right
diff --git a/engine/oak_speech2.asm b/engine/oak_speech2.asm
index d58aef83..1ae06313 100755
--- a/engine/oak_speech2.asm
+++ b/engine/oak_speech2.asm
@@ -1,4 +1,4 @@
-ChoosePlayerName: ; 695d (1:695d)
+ChoosePlayerName:
call OakSpeechSlidePicRight
ld de, DefaultNamesPlayer
call DisplayIntroNameTextBox
@@ -27,11 +27,11 @@ ChoosePlayerName: ; 695d (1:695d)
ld hl, YourNameIsText
jp PrintText
-YourNameIsText: ; 699f (1:699f)
+YourNameIsText:
TX_FAR _YourNameIsText
db "@"
-ChooseRivalName: ; 69a4 (1:69a4)
+ChooseRivalName:
call OakSpeechSlidePicRight
ld de, DefaultNamesRival
call DisplayIntroNameTextBox
@@ -60,11 +60,11 @@ ChooseRivalName: ; 69a4 (1:69a4)
ld hl, HisNameIsText
jp PrintText
-HisNameIsText: ; 69e7 (1:69e7)
+HisNameIsText:
TX_FAR _HisNameIsText
db "@"
-OakSpeechSlidePicLeft: ; 69ec (1:69ec)
+OakSpeechSlidePicLeft:
push de
coord hl, 0, 0
lb bc, 12, 11
@@ -81,12 +81,12 @@ OakSpeechSlidePicLeft: ; 69ec (1:69ec)
ld a, $ff
jr OakSpeechSlidePicCommon
-OakSpeechSlidePicRight: ; 6a12 (1:6a12)
+OakSpeechSlidePicRight:
coord hl, 5, 4
lb de, 6, 6 * SCREEN_WIDTH + 5
xor a
-OakSpeechSlidePicCommon: ; 6a19 (1:6a19)
+OakSpeechSlidePicCommon:
push hl
push de
push bc
@@ -159,7 +159,7 @@ OakSpeechSlidePicCommon: ; 6a19 (1:6a19)
pop hl
ret
-DisplayIntroNameTextBox: ; 6a6c (1:6a6c)
+DisplayIntroNameTextBox:
push de
coord hl, 0, 0
ld b, $a
@@ -188,14 +188,14 @@ DisplayIntroNameTextBox: ; 6a6c (1:6a6c)
db "NAME@"
IF DEF(_RED)
-DefaultNamesPlayer: ; 6aa8 (1:6aa8)
+DefaultNamesPlayer:
db "NEW NAME"
next "RED"
next "ASH"
next "JACK"
db "@"
-DefaultNamesRival: ; 6abe (1:6abe)
+DefaultNamesRival:
db "NEW NAME"
next "BLUE"
next "GARY"
@@ -204,14 +204,14 @@ DefaultNamesRival: ; 6abe (1:6abe)
ENDC
IF DEF(_BLUE)
-DefaultNamesPlayer: ; 6aa8 (1:6aa8)
+DefaultNamesPlayer:
db "NEW NAME"
next "BLUE"
next "GARY"
next "JOHN"
db "@"
-DefaultNamesRival: ; 6abe (1:6abe)
+DefaultNamesRival:
db "NEW NAME"
next "RED"
next "ASH"
@@ -219,7 +219,7 @@ DefaultNamesRival: ; 6abe (1:6abe)
db "@"
ENDC
-GetDefaultName: ; 6ad6 (1:6ad6)
+GetDefaultName:
; a = name index
; hl = name list
ld b, a
@@ -244,29 +244,29 @@ GetDefaultName: ; 6ad6 (1:6ad6)
jp CopyData
IF DEF(_RED)
-DefaultNamesPlayerList: ; 6af2 (1:6af2)
+DefaultNamesPlayerList:
db "NEW NAME@"
db "RED@"
db "ASH@"
db "JACK@"
-DefaultNamesRivalList: ; 6b08 (1:6b08)
+DefaultNamesRivalList:
db "NEW NAME@"
db "BLUE@"
db "GARY@"
db "JOHN@"
ENDC
IF DEF(_BLUE)
-DefaultNamesPlayerList: ; 6af2 (1:6af2)
+DefaultNamesPlayerList:
db "NEW NAME@"
db "BLUE@"
db "GARY@"
db "JOHN@"
-DefaultNamesRivalList: ; 6b08 (1:6b08)
+DefaultNamesRivalList:
db "NEW NAME@"
db "RED@"
db "ASH@"
db "JACK@"
ENDC
-TextTerminator_6b20: ; 6b20 (1:6b20)
+TextTerminator_6b20:
db "@"
diff --git a/engine/overworld/cable_club_npc.asm b/engine/overworld/cable_club_npc.asm
index a2feba06..70b499a0 100755
--- a/engine/overworld/cable_club_npc.asm
+++ b/engine/overworld/cable_club_npc.asm
@@ -1,4 +1,4 @@
-CableClubNPC: ; 71c5 (1:71c5)
+CableClubNPC:
ld hl, CableClubNPCWelcomeText
call PrintText
CheckEvent EVENT_GOT_POKEDEX
@@ -109,35 +109,35 @@ CableClubNPC: ; 71c5 (1:71c5)
ld [hl], a
jpab LinkMenu
-CableClubNPCAreaReservedFor2FriendsLinkedByCableText: ; 72b3 (1:72b3)
+CableClubNPCAreaReservedFor2FriendsLinkedByCableText:
TX_FAR _CableClubNPCAreaReservedFor2FriendsLinkedByCableText
db "@"
-CableClubNPCWelcomeText: ; 72b8 (1:72b8)
+CableClubNPCWelcomeText:
TX_FAR _CableClubNPCWelcomeText
db "@"
-CableClubNPCPleaseApplyHereHaveToSaveText: ; 72bd (1:72bd)
+CableClubNPCPleaseApplyHereHaveToSaveText:
TX_FAR _CableClubNPCPleaseApplyHereHaveToSaveText
db "@"
-CableClubNPCPleaseWaitText: ; 72c2 (1:72c2)
+CableClubNPCPleaseWaitText:
TX_FAR _CableClubNPCPleaseWaitText
db $a, "@"
-CableClubNPCLinkClosedBecauseOfInactivityText: ; 72c8 (1:72c8)
+CableClubNPCLinkClosedBecauseOfInactivityText:
TX_FAR _CableClubNPCLinkClosedBecauseOfInactivityText
db "@"
-CableClubNPCPleaseComeAgainText: ; 72cd (1:72cd)
+CableClubNPCPleaseComeAgainText:
TX_FAR _CableClubNPCPleaseComeAgainText
db "@"
-CableClubNPCMakingPreparationsText: ; 72d2 (1:72d2)
+CableClubNPCMakingPreparationsText:
TX_FAR _CableClubNPCMakingPreparationsText
db "@"
-CloseLinkConnection: ; 72d7 (1:72d7)
+CloseLinkConnection:
call Delay3
ld a, CONNECTION_NOT_ESTABLISHED
ld [hSerialConnectionStatus], a
diff --git a/engine/overworld/card_key.asm b/engine/overworld/card_key.asm
index 49d99575..61e512de 100755
--- a/engine/overworld/card_key.asm
+++ b/engine/overworld/card_key.asm
@@ -1,4 +1,4 @@
-PrintCardKeyText: ; 52673 (14:6673)
+PrintCardKeyText:
ld hl, SilphCoMapList
ld a, [wCurMap]
ld b, a
@@ -58,7 +58,7 @@ PrintCardKeyText: ; 52673 (14:6673)
ld [hSpriteIndexOrTextID], a
jp PrintPredefTextID
-SilphCoMapList: ; 526e3 (14:66e3)
+SilphCoMapList:
db SILPH_CO_2F
db SILPH_CO_3F
db SILPH_CO_4F
@@ -71,19 +71,19 @@ SilphCoMapList: ; 526e3 (14:66e3)
db SILPH_CO_11F
db $FF
-CardKeySuccessText: ; 526ee (14:66ee)
+CardKeySuccessText:
TX_FAR _CardKeySuccessText1
db $0b
TX_FAR _CardKeySuccessText2
db "@"
-CardKeyFailText: ; 526f8 (14:66f8)
+CardKeyFailText:
TX_FAR _CardKeyFailText
db "@"
; d = Y
; e = X
-GetCoordsInFrontOfPlayer: ; 526fd (14:66fd)
+GetCoordsInFrontOfPlayer:
ld a, [wYCoord]
ld d, a
ld a, [wXCoord]
diff --git a/engine/overworld/cinnabar_lab.asm b/engine/overworld/cinnabar_lab.asm
index f7c5e326..13313746 100755
--- a/engine/overworld/cinnabar_lab.asm
+++ b/engine/overworld/cinnabar_lab.asm
@@ -1,4 +1,4 @@
-GiveFossilToCinnabarLab: ; 61006 (18:5006)
+GiveFossilToCinnabarLab:
ld hl, wd730
set 6, [hl]
xor a
@@ -72,23 +72,23 @@ GiveFossilToCinnabarLab: ; 61006 (18:5006)
call PrintText
ret
-LabFossil_610ae: ; 610ae (18:50ae)
+LabFossil_610ae:
TX_FAR _Lab4Text_610ae
db "@"
-LabFossil_610b3: ; 610b3 (18:50b3)
+LabFossil_610b3:
TX_FAR _Lab4Text_610b3
db "@"
-LabFossil_610b8: ; 610b8 (18:50b8)
+LabFossil_610b8:
TX_FAR _Lab4Text_610b8
db "@"
-LabFossil_610bd: ; 610bd (18:50bd)
+LabFossil_610bd:
TX_FAR _Lab4Text_610bd
db "@"
-PrintFossilsInBag: ; 610c2 (18:50c2)
+PrintFossilsInBag:
; Prints each fossil in the player's bag on a separate line in the menu.
ld hl, wFilteredBagItems
xor a
@@ -112,7 +112,7 @@ PrintFossilsInBag: ; 610c2 (18:50c2)
jr .loop
; loads the names of the fossil item and the resulting mon
-LoadFossilItemAndMonName: ; 610eb (18:50eb)
+LoadFossilItemAndMonName:
ld a, [wFossilMon]
ld [wd11e], a
call GetMonName
diff --git a/engine/overworld/cut.asm b/engine/overworld/cut.asm
index 8a0513b2..2f13dfba 100755
--- a/engine/overworld/cut.asm
+++ b/engine/overworld/cut.asm
@@ -1,4 +1,4 @@
-UsedCut: ; ef54 (3:6f54)
+UsedCut:
xor a
ld [wActionResultOrTookBattleTurn], a ; initialise to failure value
ld a, [wCurMapTileset]
@@ -67,11 +67,11 @@ UsedCut: ; ef54 (3:6f54)
call UpdateSprites
jp RedrawMapView
-UsedCutText: ; eff2 (3:6ff2)
+UsedCutText:
TX_FAR _UsedCutText
db "@"
-InitCutAnimOAM: ; eff7 (3:6ff7)
+InitCutAnimOAM:
xor a
ld [wWhichAnimationOffsets], a
ld a, $e4
@@ -111,22 +111,22 @@ InitCutAnimOAM: ; eff7 (3:6ff7)
jr nz, .loop
ret
-LoadCutGrassAnimationTilePattern: ; f04c (3:704c)
+LoadCutGrassAnimationTilePattern:
ld de, AnimationTileset2 + $60 ; tile depicting a leaf
lb bc, BANK(AnimationTileset2), $01
jp CopyVideoData
-WriteCutOrBoulderDustAnimationOAMBlock: ; f055 (3:7055)
+WriteCutOrBoulderDustAnimationOAMBlock:
call GetCutOrBoulderDustAnimationOffsets
ld a, $9
ld de, CutOrBoulderDustAnimationTilesAndAttributes
jp WriteOAMBlock
-CutOrBoulderDustAnimationTilesAndAttributes: ; f060 (3:7060)
+CutOrBoulderDustAnimationTilesAndAttributes:
db $FC,$10,$FD,$10
db $FE,$10,$FF,$10
-GetCutOrBoulderDustAnimationOffsets: ; f068 (3:7068)
+GetCutOrBoulderDustAnimationOffsets:
ld hl, wSpriteStateData1 + 4
ld a, [hli] ; player's sprite screen Y position
ld b, a
@@ -157,14 +157,14 @@ GetCutOrBoulderDustAnimationOffsets: ; f068 (3:7068)
ld c, a
ret
-CutAnimationOffsets: ; f08f (3:708f)
+CutAnimationOffsets:
; Each pair represents the x and y pixels offsets from the player of where the cut tree animation should be drawn
db 8, 36 ; player is facing down
db 8, 4 ; player is facing up
db -8, 20 ; player is facing left
db 24, 20 ; player is facing right
-BoulderDustAnimationOffsets: ; f097 (3:7097)
+BoulderDustAnimationOffsets:
; Each pair represents the x and y pixels offsets from the player of where the cut tree animation should be drawn
; These offsets represent 2 blocks away from the player
db 8, 52 ; player is facing down
@@ -172,7 +172,7 @@ BoulderDustAnimationOffsets: ; f097 (3:7097)
db -24, 20 ; player is facing left
db 40, 20 ; player is facing right
-ReplaceTreeTileBlock: ; f09f (3:709f)
+ReplaceTreeTileBlock:
; Determine the address of the tile block that contains the tile in front of the
; player (i.e. where the tree is) and replace it with the corresponding tile
; block that doesn't have the tree.
@@ -248,7 +248,7 @@ ReplaceTreeTileBlock: ; f09f (3:709f)
ld [hl], a
ret
-CutTreeBlockSwaps: ; f100 (3:7100)
+CutTreeBlockSwaps:
; first byte = tileset block containing the cut tree
; second byte = corresponding tileset block after the cut animation happens
db $32, $6D
diff --git a/engine/overworld/cut2.asm b/engine/overworld/cut2.asm
index 1cf832b5..f16fed66 100755
--- a/engine/overworld/cut2.asm
+++ b/engine/overworld/cut2.asm
@@ -1,4 +1,4 @@
-AnimCut: ; 79e96 (1e:5e96)
+AnimCut:
ld a, [wCutTile]
cp $52
jr z, .grass
@@ -43,7 +43,7 @@ AnimCut: ; 79e96 (1e:5e96)
jr nz, .cutGrassLoop
ret
-AnimCutGrass_UpdateOAMEntries: ; 79eed (1e:5eed)
+AnimCutGrass_UpdateOAMEntries:
push bc
ld hl, wOAMBuffer + $91
ld a, 1
@@ -74,7 +74,7 @@ AnimCutGrass_UpdateOAMEntries: ; 79eed (1e:5eed)
jr nz, AnimCutGrass_UpdateOAMEntries
ret
-AnimCutGrass_SwapOAMEntries: ; 79f30 (1e:5f30)
+AnimCutGrass_SwapOAMEntries:
ld hl, wOAMBuffer + $90
ld de, wBuffer
ld bc, $8
diff --git a/engine/overworld/doors.asm b/engine/overworld/doors.asm
index 3145c3c6..c39e096d 100755
--- a/engine/overworld/doors.asm
+++ b/engine/overworld/doors.asm
@@ -1,5 +1,5 @@
; returns whether the player is standing on a door tile in carry
-IsPlayerStandingOnDoorTile: ; 1a609 (6:6609)
+IsPlayerStandingOnDoorTile:
push de
ld hl, DoorTileIDPointers
ld a, [wCurMapTileset]
@@ -25,7 +25,7 @@ IsPlayerStandingOnDoorTile: ; 1a609 (6:6609)
and a
ret
-DoorTileIDPointers: ; 1a62c (6:662c)
+DoorTileIDPointers:
dbw OVERWORLD, OverworldDoorTileIDs
dbw FOREST, ForestDoorTileIDs
dbw MART, MartDoorTileIDs
@@ -41,35 +41,35 @@ DoorTileIDPointers: ; 1a62c (6:662c)
dbw PLATEAU, PlateauDoorTileIDs
db $ff
-OverworldDoorTileIDs: ; 1a654 (6:6654)
+OverworldDoorTileIDs:
db $1B,$58,$00
-ForestDoorTileIDs: ; 1a657 (6:6657)
+ForestDoorTileIDs:
db $3a,$00
-MartDoorTileIDs: ; 1a659 (6:6659)
+MartDoorTileIDs:
db $5e,$00
-HouseDoorTileIDs: ; 1a65b (6:665b)
+HouseDoorTileIDs:
db $54,$00
-TilesetMuseumDoorTileIDs: ; 1a65d (6:665d)
+TilesetMuseumDoorTileIDs:
db $3b,$00
-ShipDoorTileIDs: ; 1a65f (6:665f)
+ShipDoorTileIDs:
db $1e,$00
-LobbyDoorTileIDs: ; 1a661 (6:6661)
+LobbyDoorTileIDs:
db $1c,$38,$1a,$00
-MansionDoorTileIDs: ; 1a665 (6:6665)
+MansionDoorTileIDs:
db $1a,$1c,$53,$00
-LabDoorTileIDs: ; 1a669 (6:6669)
+LabDoorTileIDs:
db $34,$00
-FacilityDoorTileIDs: ; 1a66b (6:666b)
+FacilityDoorTileIDs:
db $43,$58,$1b,$00
-PlateauDoorTileIDs: ; 1a66f (6:666f)
+PlateauDoorTileIDs:
db $3b,$1b,$00
diff --git a/engine/overworld/elevator.asm b/engine/overworld/elevator.asm
index 05a9cc4e..4ec34922 100755
--- a/engine/overworld/elevator.asm
+++ b/engine/overworld/elevator.asm
@@ -1,4 +1,4 @@
-ShakeElevator: ; 7bf15 (1e:7f15)
+ShakeElevator:
ld de, -$20
call ShakeElevatorRedrawRow
ld de, SCREEN_HEIGHT * $20
@@ -39,7 +39,7 @@ ShakeElevator: ; 7bf15 (1e:7f15)
call UpdateSprites
jp PlayDefaultMusic
-ShakeElevatorRedrawRow: ; 7bf64 (1e:7f64)
+ShakeElevatorRedrawRow:
; This function is used to redraw certain portions of the screen, but it does
; not appear to ever result in any visible effect, so this function seems to
; be pointless.
diff --git a/engine/overworld/emotion_bubbles.asm b/engine/overworld/emotion_bubbles.asm
index f8665dd6..4df8b6f6 100755
--- a/engine/overworld/emotion_bubbles.asm
+++ b/engine/overworld/emotion_bubbles.asm
@@ -1,4 +1,4 @@
-EmotionBubble: ; 17c47 (5:7c47)
+EmotionBubble:
ld a, [wWhichEmotionBubble]
ld c, a
ld b, 0
@@ -61,14 +61,14 @@ EmotionBubble: ; 17c47 (5:7c47)
call DelayFrame
jp UpdateSprites
-EmotionBubblesPointerTable: ; 17caf (5:7caf)
+EmotionBubblesPointerTable:
dw EmotionBubbles
dw EmotionBubbles + $40
dw EmotionBubbles + $80
-EmotionBubblesOAM: ; 17cb5 (5:7cb5)
+EmotionBubblesOAM:
db $F8,$00,$F9,$00
db $FA,$00,$FB,$00
-EmotionBubbles: ; 17cbd (5:7cbd)
+EmotionBubbles:
INCBIN "gfx/emotion_bubbles.2bpp"
diff --git a/engine/overworld/healing_machine.asm b/engine/overworld/healing_machine.asm
index bf7130cb..38a44cfb 100755
--- a/engine/overworld/healing_machine.asm
+++ b/engine/overworld/healing_machine.asm
@@ -1,4 +1,4 @@
-AnimateHealingMachine: ; 70433 (1c:4433)
+AnimateHealingMachine:
ld de, PokeCenterFlashingMonitorAndHealBall
ld hl, vChars0 + $7c0
lb bc, BANK(PokeCenterFlashingMonitorAndHealBall), $03 ; loads one too many tiles
@@ -62,10 +62,10 @@ AnimateHealingMachine: ; 70433 (1c:4433)
ld [hl], a
jp UpdateSprites
-PokeCenterFlashingMonitorAndHealBall: ; 704b7 (1c:44b7)
+PokeCenterFlashingMonitorAndHealBall:
INCBIN "gfx/pokecenter_ball.2bpp"
-PokeCenterOAMData: ; 704d7 (1c:44d7)
+PokeCenterOAMData:
db $24,$34,$7C,$10 ; heal machine monitor
db $2B,$30,$7D,$10 ; pokeballs 1-6
db $2B,$38,$7D,$30
@@ -75,7 +75,7 @@ PokeCenterOAMData: ; 704d7 (1c:44d7)
db $35,$38,$7D,$30
; d = value to xor with palette
-FlashSprite8Times: ; 704f3 (1c:44f3)
+FlashSprite8Times:
ld b, 8
.loop
ld a, [rOBP1]
@@ -87,7 +87,7 @@ FlashSprite8Times: ; 704f3 (1c:44f3)
jr nz, .loop
ret
-CopyHealingMachineOAM: ; 70503 (1c:4503)
+CopyHealingMachineOAM:
; copy one OAM entry and advance the pointers
ld a, [de]
inc de
diff --git a/engine/overworld/hidden_items.asm b/engine/overworld/hidden_items.asm
index f7f81070..11e6ad55 100755
--- a/engine/overworld/hidden_items.asm
+++ b/engine/overworld/hidden_items.asm
@@ -1,4 +1,4 @@
-HiddenItems: ; 76688 (1d:6688)
+HiddenItems:
ld hl, HiddenItemCoords
call FindHiddenItemOrCoinsIndex
ld [wHiddenItemOrCoinsIndex], a
@@ -20,7 +20,7 @@ HiddenItems: ; 76688 (1d:6688)
INCLUDE "data/hidden_item_coords.asm"
-FoundHiddenItemText: ; 7675b (1d:675b)
+FoundHiddenItemText:
TX_FAR _FoundHiddenItemText
TX_ASM
ld a, [wHiddenObjectFunctionArgument] ; item ID
@@ -45,11 +45,11 @@ FoundHiddenItemText: ; 7675b (1d:675b)
call PrintText
jp TextScriptEnd
-HiddenItemBagFullText: ; 76794 (1d:6794)
+HiddenItemBagFullText:
TX_FAR _HiddenItemBagFullText
db "@"
-HiddenCoins: ; 76799 (1d:6799)
+HiddenCoins:
ld b, COIN_CASE
predef GetQuantityOfItemInBag
ld a, b
@@ -120,17 +120,17 @@ HiddenCoins: ; 76799 (1d:6799)
INCLUDE "data/hidden_coins.asm"
-FoundHiddenCoinsText: ; 76847 (1d:6847)
+FoundHiddenCoinsText:
TX_FAR _FoundHiddenCoinsText
db $10,"@"
-DroppedHiddenCoinsText: ; 7684d (1d:684d)
+DroppedHiddenCoinsText:
TX_FAR _FoundHiddenCoins2Text
db $10
TX_FAR _DroppedHiddenCoinsText
db "@"
-FindHiddenItemOrCoinsIndex: ; 76857 (1d:6857)
+FindHiddenItemOrCoinsIndex:
ld a, [wHiddenObjectY]
ld d, a
ld a, [wHiddenObjectX]
diff --git a/engine/overworld/hidden_objects.asm b/engine/overworld/hidden_objects.asm
index 1fc20e5c..dcdf8537 100755
--- a/engine/overworld/hidden_objects.asm
+++ b/engine/overworld/hidden_objects.asm
@@ -1,4 +1,4 @@
-IsPlayerOnDungeonWarp: ; 46981 (11:6981)
+IsPlayerOnDungeonWarp:
xor a
ld [wWhichDungeonWarp], a
ld a, [wd72d]
@@ -15,7 +15,7 @@ IsPlayerOnDungeonWarp: ; 46981 (11:6981)
ret
; if a hidden object was found, stores $00 in [$ffee], else stores $ff
-CheckForHiddenObject: ; 469a0 (11:69a0)
+CheckForHiddenObject:
ld hl, $ffeb
xor a
ld [hli], a
@@ -86,7 +86,7 @@ CheckForHiddenObject: ; 469a0 (11:69a0)
; checks if the coordinates in front of the player's sprite match Y in b and X in c
; [hCoordsInFrontOfPlayerMatch] = $00 if they match, $ff if they don't match
-CheckIfCoordsInFrontOfPlayerMatch: ; 46a01 (11:6a01)
+CheckIfCoordsInFrontOfPlayerMatch:
ld a, [wSpriteStateData1 + 9] ; player's sprite facing direction
cp SPRITE_FACING_UP
jr z, .facingUp
diff --git a/engine/overworld/is_player_just_outside_map.asm b/engine/overworld/is_player_just_outside_map.asm
index e9ba204a..44690db0 100644
--- a/engine/overworld/is_player_just_outside_map.asm
+++ b/engine/overworld/is_player_just_outside_map.asm
@@ -1,5 +1,5 @@
; returns whether the player is one tile outside the map in Z
-IsPlayerJustOutsideMap: ; 128d8 (4:68d8)
+IsPlayerJustOutsideMap:
ld a, [wYCoord]
ld b, a
ld a, [wCurMapHeight]
diff --git a/engine/overworld/ledges.asm b/engine/overworld/ledges.asm
index b04f6332..342540b2 100755
--- a/engine/overworld/ledges.asm
+++ b/engine/overworld/ledges.asm
@@ -1,4 +1,4 @@
-HandleLedges: ; 1a672 (6:6672)
+HandleLedges:
ld a, [wd736]
bit 6, a ; already jumping down ledge
ret nz
@@ -55,7 +55,7 @@ HandleLedges: ; 1a672 (6:6672)
ret
; (player direction) (tile player standing on) (ledge tile) (input required)
-LedgeTiles: ; 1a6cf (6:66cf)
+LedgeTiles:
db SPRITE_FACING_DOWN, $2C,$37,D_DOWN
db SPRITE_FACING_DOWN, $39,$36,D_DOWN
db SPRITE_FACING_DOWN, $39,$37,D_DOWN
@@ -66,7 +66,7 @@ LedgeTiles: ; 1a6cf (6:66cf)
db SPRITE_FACING_RIGHT,$39,$0D,D_RIGHT
db $FF
-LoadHoppingShadowOAM: ; 1a6f0 (6:66f0)
+LoadHoppingShadowOAM:
ld hl, vChars1 + $7f0
ld de, LedgeHoppingShadow
lb bc, BANK(LedgeHoppingShadow), (LedgeHoppingShadowEnd - LedgeHoppingShadow) / $8
@@ -77,10 +77,10 @@ LoadHoppingShadowOAM: ; 1a6f0 (6:66f0)
call WriteOAMBlock
ret
-LedgeHoppingShadow: ; 1a708 (6:6708)
+LedgeHoppingShadow:
INCBIN "gfx/ledge_hopping_shadow.1bpp"
LedgeHoppingShadowEnd:
-LedgeHoppingShadowOAM: ; 1a710 (6:6710)
+LedgeHoppingShadowOAM:
db $FF,$10,$FF,$20
db $FF,$40,$FF,$60
diff --git a/engine/overworld/map_sprites.asm b/engine/overworld/map_sprites.asm
index bdd3320b..05588321 100755
--- a/engine/overworld/map_sprites.asm
+++ b/engine/overworld/map_sprites.asm
@@ -8,7 +8,7 @@
; fields, respectively, within loops. The X is the loop index.
; If there is an inner loop, Y is the inner loop index, i.e. $C1Y* and $C2Y*
; denote fields of the sprite slots interated over in the inner loop.
-InitMapSprites: ; 1785b (5:785b)
+InitMapSprites:
call InitOutsideMapSprites
ret c ; return if the map is an outside map (already handled by above call)
; if the map is an inside map (i.e. mapID >= $25)
@@ -29,7 +29,7 @@ InitMapSprites: ; 1785b (5:785b)
; This is used for both inside and outside maps, since it is called by
; InitOutsideMapSprites.
; Loads tile pattern data for sprites into VRAM.
-LoadMapSpriteTilePatterns: ; 17871 (5:7871)
+LoadMapSpriteTilePatterns:
ld a,[wNumSprites]
and a ; are there any sprites?
jr nz,.spritesExist
@@ -236,7 +236,7 @@ LoadMapSpriteTilePatterns: ; 17871 (5:7871)
; de = pointer to sprite sheet
; bc = length in bytes
; a = ROM bank
-ReadSpriteSheetData: ; 17971 (5:7971)
+ReadSpriteSheetData:
ld a,[hli]
ld e,a
ld a,[hli]
@@ -250,7 +250,7 @@ ReadSpriteSheetData: ; 17971 (5:7971)
; Loads sprite set for outside maps (cities and routes) and sets VRAM slots.
; sets carry if the map is a city or route, unsets carry if not
-InitOutsideMapSprites: ; 1797b (5:797b)
+InitOutsideMapSprites:
ld a,[wCurMap]
cp a,REDS_HOUSE_1F ; is the map a city or a route (map ID less than $25)?
ret nc ; if not, return
@@ -380,7 +380,7 @@ InitOutsideMapSprites: ; 1797b (5:797b)
; Chooses the correct sprite set ID depending on the player's position within
; the map for maps with two sprite sets.
-GetSplitMapSpriteSetID: ; 17a1a (5:7a1a)
+GetSplitMapSpriteSetID:
cp a,$f8
jr z,.route20
ld hl,SplitMapSpriteSets
diff --git a/engine/overworld/movement.asm b/engine/overworld/movement.asm
index 2af2e518..e60f820a 100644
--- a/engine/overworld/movement.asm
+++ b/engine/overworld/movement.asm
@@ -1,4 +1,4 @@
-UpdatePlayerSprite: ; 4e31 (1:4e31)
+UpdatePlayerSprite:
ld a, [wSpriteStateData2]
and a
jr z, .checkIfTextBoxInFrontOfSprite
@@ -98,7 +98,7 @@ UpdatePlayerSprite: ; 4e31 (1:4e31)
ld [wSpriteStateData2 + 7], a
ret
-UnusedReadSpriteDataFunction: ; 4ec7 (1:4ec7)
+UnusedReadSpriteDataFunction:
push bc
push af
ld a, [H_CURRENTSPRITEOFFSET]
@@ -109,7 +109,7 @@ UnusedReadSpriteDataFunction: ; 4ec7 (1:4ec7)
pop bc
ret
-UpdateNPCSprite: ; 4ed1 (1:4ed1)
+UpdateNPCSprite:
ld a, [H_CURRENTSPRITEOFFSET]
swap a
dec a
@@ -249,7 +249,7 @@ UpdateNPCSprite: ; 4ed1 (1:4ed1)
jr TryWalking
; changes facing direction by zeroing the movement delta and calling TryWalking
-ChangeFacingDirection: ; 4fc8 (1:4fc8)
+ChangeFacingDirection:
ld de, $0
; fall through
@@ -259,7 +259,7 @@ ChangeFacingDirection: ; 4fc8 (1:4fc8)
; e: X movement delta (-1, 0 or 1)
; hl: pointer to tile the sprite would walk onto
; set carry on failure, clears carry on success
-TryWalking: ; 4fcb (1:4fcb)
+TryWalking:
push hl
ld h, $c1
ld a, [H_CURRENTSPRITEOFFSET]
@@ -298,7 +298,7 @@ TryWalking: ; 4fcb (1:4fcb)
jp UpdateSpriteImage
; update the walking animation parameters for a sprite that is currently walking
-UpdateSpriteInWalkingAnimation: ; 4ffe (1:4ffe)
+UpdateSpriteInWalkingAnimation:
ld a, [H_CURRENTSPRITEOFFSET]
add $7
ld l, a
@@ -371,7 +371,7 @@ UpdateSpriteInWalkingAnimation: ; 4ffe (1:4ffe)
ret
; update delay value (c2x8) for sprites in the delayed state (c1x1)
-UpdateSpriteMovementDelay: ; 5057 (1:5057)
+UpdateSpriteMovementDelay:
ld h, $c2
ld a, [H_CURRENTSPRITEOFFSET]
add $6
@@ -392,7 +392,7 @@ UpdateSpriteMovementDelay: ; 5057 (1:5057)
inc a
ld l, a
ld [hl], $1 ; c1x1 = 1 (mark as ready to move)
-notYetMoving: ; 5073 (1:5073)
+notYetMoving:
ld h, $c1
ld a, [H_CURRENTSPRITEOFFSET]
add $8
@@ -400,7 +400,7 @@ notYetMoving: ; 5073 (1:5073)
ld [hl], $0 ; c1x8 = 0 (walk animation frame)
jp UpdateSpriteImage
-MakeNPCFacePlayer: ; 507f (1:507f)
+MakeNPCFacePlayer:
; Make an NPC face the player if the player has spoken to him or her.
; Check if the behaviour of the NPC facing the player when spoken to is
@@ -434,7 +434,7 @@ MakeNPCFacePlayer: ; 507f (1:507f)
ld [hl], c ; c1x9: set facing direction
jr notYetMoving
-InitializeSpriteStatus: ; 50ad (1:50ad)
+InitializeSpriteStatus:
ld [hl], $1 ; $c1x1: set movement status to ready
inc l
ld [hl], $ff ; $c1x2: set sprite image to $ff (invisible/off screen)
@@ -448,7 +448,7 @@ InitializeSpriteStatus: ; 50ad (1:50ad)
ret
; calculates the spprite's scrren position form its map position and the player position
-InitializeSpriteScreenPosition: ; 50bd (1:50bd)
+InitializeSpriteScreenPosition:
ld h, $c2
ld a, [H_CURRENTSPRITEOFFSET]
add $4
@@ -472,7 +472,7 @@ InitializeSpriteScreenPosition: ; 50bd (1:50bd)
ret
; tests if sprite is off screen or otherwise unable to do anything
-CheckSpriteAvailability: ; 50dc (1:50dc)
+CheckSpriteAvailability:
predef IsObjectHidden
ld a, [$ffe5]
and a
@@ -553,7 +553,7 @@ CheckSpriteAvailability: ; 50dc (1:50dc)
.done
ret
-UpdateSpriteImage: ; 5157 (1:5157)
+UpdateSpriteImage:
ld h, $c1
ld a, [H_CURRENTSPRITEOFFSET]
add $8
@@ -578,7 +578,7 @@ UpdateSpriteImage: ; 5157 (1:5157)
; d: Y movement delta (-1, 0 or 1)
; e: X movement delta (-1, 0 or 1)
; set carry on failure, clears carry on success
-CanWalkOntoTile: ; 516e (1:516e)
+CanWalkOntoTile:
ld h, $c2
ld a, [H_CURRENTSPRITEOFFSET]
add $6
@@ -689,7 +689,7 @@ CanWalkOntoTile: ; 516e (1:516e)
; calculates the tile pointer pointing to the tile the current sprite stancs on
; this is always the lower left tile of the 2x2 tile blocks all sprites are snapped to
; hl: output pointer
-GetTileSpriteStandsOn: ; 5207 (1:5207)
+GetTileSpriteStandsOn:
ld h, $c1
ld a, [H_CURRENTSPRITEOFFSET]
add $4
@@ -718,7 +718,7 @@ GetTileSpriteStandsOn: ; 5207 (1:5207)
ret
; loads [de+a] into a
-LoadDEPlusA: ; 522f (1:522f)
+LoadDEPlusA:
add e
ld e, a
jr nc, .noCarry
@@ -727,7 +727,7 @@ LoadDEPlusA: ; 522f (1:522f)
ld a, [de]
ret
-DoScriptedNPCMovement: ; 5236 (1:5236)
+DoScriptedNPCMovement:
; This is an alternative method of scripting an NPC's movement and is only used
; a few times in the game. It is used when the NPC and player must walk together
; in sync, such as when the player is following the NPC somewhere. An NPC can't
@@ -798,23 +798,23 @@ DoScriptedNPCMovement: ; 5236 (1:5236)
inc [hl]
ret
-InitScriptedNPCMovement: ; 52a6 (1:52a6)
+InitScriptedNPCMovement:
xor a
ld [wNPCMovementDirections2Index], a
ld a, 8
ld [wScriptedNPCWalkCounter], a
jp AnimScriptedNPCMovement
-GetSpriteScreenYPointer: ; 52b2 (1:52b2)
+GetSpriteScreenYPointer:
ld a, $4
ld b, a
jr GetSpriteScreenXYPointerCommon
-GetSpriteScreenXPointer: ; 52b7 (1:52b7)
+GetSpriteScreenXPointer:
ld a, $6
ld b, a
-GetSpriteScreenXYPointerCommon: ; 52ba (1:52ba)
+GetSpriteScreenXYPointerCommon:
ld hl, wSpriteStateData1
ld a, [H_CURRENTSPRITEOFFSET]
add l
@@ -822,7 +822,7 @@ GetSpriteScreenXYPointerCommon: ; 52ba (1:52ba)
ld l, a
ret
-AnimScriptedNPCMovement: ; 52c3 (1:52c3)
+AnimScriptedNPCMovement:
ld hl, wSpriteStateData2
ld a, [H_CURRENTSPRITEOFFSET]
add $e
@@ -861,7 +861,7 @@ AnimScriptedNPCMovement: ; 52c3 (1:52c3)
ld [hl], a
ret
-AdvanceScriptedNPCAnimFrameCounter: ; 5301 (1:5301)
+AdvanceScriptedNPCAnimFrameCounter:
ld a, [H_CURRENTSPRITEOFFSET]
add $7
ld l, a
diff --git a/engine/overworld/npc_movement.asm b/engine/overworld/npc_movement.asm
index 719c8835..98d1b7a7 100755
--- a/engine/overworld/npc_movement.asm
+++ b/engine/overworld/npc_movement.asm
@@ -1,4 +1,4 @@
-PlayerStepOutFromDoor: ; 1a3e0 (6:63e0)
+PlayerStepOutFromDoor:
ld hl, wd730
res 1, [hl]
call IsPlayerStandingOnDoorTile
@@ -27,7 +27,7 @@ PlayerStepOutFromDoor: ; 1a3e0 (6:63e0)
res 7, [hl]
ret
-_EndNPCMovementScript: ; 1a41d (6:641d)
+_EndNPCMovementScript:
ld hl, wd730
res 7, [hl]
ld hl, wd72e
@@ -44,14 +44,14 @@ _EndNPCMovementScript: ; 1a41d (6:641d)
ld [wSimulatedJoypadStatesEnd], a
ret
-PalletMovementScriptPointerTable: ; 1a442 (6:6442)
+PalletMovementScriptPointerTable:
dw PalletMovementScript_OakMoveLeft
dw PalletMovementScript_PlayerMoveLeft
dw PalletMovementScript_WaitAndWalkToLab
dw PalletMovementScript_WalkToLab
dw PalletMovementScript_Done
-PalletMovementScript_OakMoveLeft: ; 1a44c (6:644c)
+PalletMovementScript_OakMoveLeft:
ld a, [wXCoord]
sub $a
ld [wNumStepsToTake], a
@@ -85,7 +85,7 @@ PalletMovementScript_OakMoveLeft: ; 1a44c (6:644c)
ld [wJoyIgnore], a
ret
-PalletMovementScript_PlayerMoveLeft: ; 1a485 (6:6485)
+PalletMovementScript_PlayerMoveLeft:
ld a, [wd730]
bit 0, a ; is an NPC being moved by a script?
ret nz ; return if Oak is still moving
@@ -98,12 +98,12 @@ PalletMovementScript_PlayerMoveLeft: ; 1a485 (6:6485)
ld [wNPCMovementScriptFunctionNum], a
ret
-PalletMovementScript_WaitAndWalkToLab: ; 1a4a1 (6:64a1)
+PalletMovementScript_WaitAndWalkToLab:
ld a, [wSimulatedJoypadStatesIndex]
and a ; is the player done moving left yet?
ret nz
-PalletMovementScript_WalkToLab: ; 1a4a6 (6:64a6)
+PalletMovementScript_WalkToLab:
xor a
ld [wOverrideSimulatedJoypadStatesMask], a
ld a, [wSpriteIndex]
@@ -127,7 +127,7 @@ PalletMovementScript_WalkToLab: ; 1a4a6 (6:64a6)
ld [wNPCMovementScriptFunctionNum], a
ret
-RLEList_ProfOakWalkToLab: ; 1a4dc (6:64dc)
+RLEList_ProfOakWalkToLab:
db NPC_MOVEMENT_DOWN, $05
db NPC_MOVEMENT_LEFT, $01
db NPC_MOVEMENT_DOWN, $05
@@ -136,7 +136,7 @@ RLEList_ProfOakWalkToLab: ; 1a4dc (6:64dc)
db $E0, $01 ; stand still
db $FF
-RLEList_PlayerWalkToLab: ; 1a4e9 (6:64e9)
+RLEList_PlayerWalkToLab:
db D_UP, $02
db D_RIGHT, $03
db D_DOWN, $05
@@ -144,7 +144,7 @@ RLEList_PlayerWalkToLab: ; 1a4e9 (6:64e9)
db D_DOWN, $06
db $FF
-PalletMovementScript_Done: ; 1a4f4 (6:64f4)
+PalletMovementScript_Done:
ld a, [wSimulatedJoypadStatesIndex]
and a
ret nz
@@ -157,11 +157,11 @@ PalletMovementScript_Done: ; 1a4f4 (6:64f4)
res 7, [hl]
jp EndNPCMovementScript
-PewterMuseumGuyMovementScriptPointerTable: ; 1a510 (6:6510)
+PewterMuseumGuyMovementScriptPointerTable:
dw PewterMovementScript_WalkToMuseum
dw PewterMovementScript_Done
-PewterMovementScript_WalkToMuseum: ; 1a514 (6:6514)
+PewterMovementScript_WalkToMuseum:
ld a, BANK(Music_MuseumGuy)
ld [wAudioROMBank], a
ld [wAudioSavedROMBank], a
@@ -189,21 +189,21 @@ PewterMovementScript_WalkToMuseum: ; 1a514 (6:6514)
ld [wNPCMovementScriptFunctionNum], a
ret
-RLEList_PewterMuseumPlayer: ; 1a559 (6:6559)
+RLEList_PewterMuseumPlayer:
db 0, $01
db D_UP, $03
db D_LEFT, $0D
db D_UP, $06
db $FF
-RLEList_PewterMuseumGuy: ; 1a562 (6:6562)
+RLEList_PewterMuseumGuy:
db NPC_MOVEMENT_UP, $06
db NPC_MOVEMENT_LEFT, $0D
db NPC_MOVEMENT_UP, $03
db NPC_MOVEMENT_LEFT, $01
db $FF
-PewterMovementScript_Done: ; 1a56b (6:656b)
+PewterMovementScript_Done:
ld a, [wSimulatedJoypadStatesIndex]
and a
ret nz
@@ -213,11 +213,11 @@ PewterMovementScript_Done: ; 1a56b (6:656b)
res 7, [hl]
jp EndNPCMovementScript
-PewterGymGuyMovementScriptPointerTable: ; 1a57d (6:657d)
+PewterGymGuyMovementScriptPointerTable:
dw PewterMovementScript_WalkToGym
dw PewterMovementScript_Done
-PewterMovementScript_WalkToGym: ; 1a581 (6:6581)
+PewterMovementScript_WalkToGym:
ld a, BANK(Music_MuseumGuy)
ld [wAudioROMBank], a
ld [wAudioSavedROMBank], a
@@ -248,7 +248,7 @@ PewterMovementScript_WalkToGym: ; 1a581 (6:6581)
ld [wNPCMovementScriptFunctionNum], a
ret
-RLEList_PewterGymPlayer: ; 1a5cd (6:65cd)
+RLEList_PewterGymPlayer:
db 0, $01
db D_RIGHT, $02
db D_DOWN, $05
@@ -257,7 +257,7 @@ RLEList_PewterGymPlayer: ; 1a5cd (6:65cd)
db D_LEFT, $0F
db $FF
-RLEList_PewterGymGuy: ; 1a5da (6:65da)
+RLEList_PewterGymGuy:
db NPC_MOVEMENT_DOWN, $02
db NPC_MOVEMENT_LEFT, $0F
db NPC_MOVEMENT_UP, $05
@@ -266,7 +266,7 @@ RLEList_PewterGymGuy: ; 1a5da (6:65da)
db NPC_MOVEMENT_RIGHT, $03
db $FF
-FreezeEnemyTrainerSprite: ; 1a5e7 (6:65e7)
+FreezeEnemyTrainerSprite:
ld a, [wCurMap]
cp POKEMONTOWER_7
ret z ; the Rockets on Pokemon Tower 7F leave after battling, so don't freeze them
@@ -285,7 +285,7 @@ FreezeEnemyTrainerSprite: ; 1a5e7 (6:65e7)
ld [H_SPRITEINDEX], a
jp SetSpriteMovementBytesToFF
-RivalIDs: ; 1a605 (6:6605)
+RivalIDs:
db OPP_SONY1
db OPP_SONY2
db OPP_SONY3
diff --git a/engine/overworld/oaks_aide.asm b/engine/overworld/oaks_aide.asm
index 8ac456d2..d73174c4 100755
--- a/engine/overworld/oaks_aide.asm
+++ b/engine/overworld/oaks_aide.asm
@@ -45,27 +45,27 @@ OaksAideScript: ; 0x59035
ld [hOaksAideResult], a
ret
-OaksAideHiText: ; 59091 (16:5091)
+OaksAideHiText:
TX_FAR _OaksAideHiText
db "@"
-OaksAideUhOhText: ; 59096 (16:5096)
+OaksAideUhOhText:
TX_FAR _OaksAideUhOhText
db "@"
-OaksAideComeBackText: ; 5909b (16:509b)
+OaksAideComeBackText:
TX_FAR _OaksAideComeBackText
db "@"
-OaksAideHereYouGoText: ; 590a0 (16:50a0)
+OaksAideHereYouGoText:
TX_FAR _OaksAideHereYouGoText
db "@"
-OaksAideGotItemText: ; 590a5 (16:50a5)
+OaksAideGotItemText:
TX_FAR _OaksAideGotItemText
db $0b
db "@"
-OaksAideNoRoomText: ; 590ab (16:50ab)
+OaksAideNoRoomText:
TX_FAR _OaksAideNoRoomText
db "@"
diff --git a/engine/overworld/oam.asm b/engine/overworld/oam.asm
index 41360965..94082beb 100644
--- a/engine/overworld/oam.asm
+++ b/engine/overworld/oam.asm
@@ -166,7 +166,7 @@ PrepareOAMData:
add hl, de
jr .clear
-GetSpriteScreenXY: ; 4bd1 (1:4bd1)
+GetSpriteScreenXY:
inc e
inc e
ld a, [de] ; c1x4
diff --git a/engine/overworld/pewter_guys.asm b/engine/overworld/pewter_guys.asm
index 543dac91..532fa4bf 100755
--- a/engine/overworld/pewter_guys.asm
+++ b/engine/overworld/pewter_guys.asm
@@ -1,4 +1,4 @@
-PewterGuys: ; 37ca1 (d:7ca1)
+PewterGuys:
ld hl, wSimulatedJoypadStatesEnd
ld a, [wSimulatedJoypadStatesIndex]
dec a ; this decrement causes it to overwrite the last byte before $FF in the list
@@ -48,14 +48,14 @@ PewterGuys: ; 37ca1 (d:7ca1)
inc hl
jr .findMatchingCoordsLoop
-PointerTable_37ce6: ; 37ce6 (d:7ce6)
+PointerTable_37ce6:
dw PewterMuseumGuyCoords
dw PewterGymGuyCoords
; these are the four coordinates of the spaces below, above, to the left and
; to the right of the museum guy, and pointers to different movements for
; the player to make to get positioned before the main movement.
-PewterMuseumGuyCoords: ; 37cea (d:7cea)
+PewterMuseumGuyCoords:
db 18, 27
dw .down
db 16, 27
@@ -78,7 +78,7 @@ PewterMuseumGuyCoords: ; 37cea (d:7cea)
; different movements for the player to make to get positioned before the
; main movement
; $00 is a pause
-PewterGymGuyCoords: ; 37d06 (d:7d06)
+PewterGymGuyCoords:
db 16, 34
dw .one
db 17, 35
diff --git a/engine/overworld/player_animations.asm b/engine/overworld/player_animations.asm
index de36eeaf..f7b63aaa 100755
--- a/engine/overworld/player_animations.asm
+++ b/engine/overworld/player_animations.asm
@@ -1,4 +1,4 @@
-EnterMapAnim: ; 70510 (1c:4510)
+EnterMapAnim:
call InitFacingDirectionList
ld a, $ec
ld [wSpriteStateData1 + 4], a ; player's sprite Y screen position
@@ -63,7 +63,7 @@ EnterMapAnim: ; 70510 (1c:4510)
call LoadPlayerSpriteGraphics
jr .restoreDefaultMusic
-FlyAnimationEnterScreenCoords: ; 70592 (1c:4592)
+FlyAnimationEnterScreenCoords:
; y, x pairs
; This is the sequence of screen coordinates used by the overworld
; Fly animation when the player is entering a map.
@@ -80,7 +80,7 @@ FlyAnimationEnterScreenCoords: ; 70592 (1c:4592)
db $3C, $48
db $3C, $40
-PlayerSpinWhileMovingDown: ; 705aa (1c:45aa)
+PlayerSpinWhileMovingDown:
ld hl, wPlayerSpinWhileMovingUpOrDownAnimDeltaY
ld a, $10
ld [hli], a ; wPlayerSpinWhileMovingUpOrDownAnimDeltaY
@@ -90,7 +90,7 @@ PlayerSpinWhileMovingDown: ; 705aa (1c:45aa)
ld [hl], a ; wPlayerSpinWhileMovingUpOrDownAnimFrameDelay
jp PlayerSpinWhileMovingUpOrDown
-_LeaveMapAnim: ; 705ba (1c:45ba)
+_LeaveMapAnim:
call InitFacingDirectionList
call IsPlayerStandingOnWarpPadOrHole
ld a, b
@@ -167,7 +167,7 @@ _LeaveMapAnim: ; 705ba (1c:45ba)
call GBFadeOutToWhite
jp RestoreFacingDirectionAndYScreenPos
-FlyAnimationScreenCoords1: ; 7064f (1c:464f)
+FlyAnimationScreenCoords1:
; y, x pairs
; This is the sequence of screen coordinates used by the first part
; of the Fly overworld animation.
@@ -184,7 +184,7 @@ FlyAnimationScreenCoords1: ; 7064f (1c:464f)
db $2A, $98
db $27, $A0
-FlyAnimationScreenCoords2: ; 70667 (1c:4667)
+FlyAnimationScreenCoords2:
; y, x pairs
; This is the sequence of screen coordinates used by the second part
; of the Fly overworld animation.
@@ -201,7 +201,7 @@ FlyAnimationScreenCoords2: ; 70667 (1c:4667)
db $F0, $00
-LeaveMapThroughHoleAnim: ; 7067d (1c:467d)
+LeaveMapThroughHoleAnim:
ld a, $ff
ld [wUpdateSpritesEnabled], a ; disable UpdateSprites
; shift upper half of player's sprite down 8 pixels and hide lower half
@@ -223,7 +223,7 @@ LeaveMapThroughHoleAnim: ; 7067d (1c:467d)
ld [wUpdateSpritesEnabled], a ; enable UpdateSprites
jp RestoreFacingDirectionAndYScreenPos
-DoFlyAnimation: ; 706ae (1c:46ae)
+DoFlyAnimation:
ld a, [wFlyAnimBirdSpriteImageIndex]
xor $1 ; make the bird flap its wings
ld [wFlyAnimBirdSpriteImageIndex], a
@@ -247,7 +247,7 @@ DoFlyAnimation: ; 706ae (1c:46ae)
jr nz, DoFlyAnimation
ret
-LoadBirdSpriteGraphics: ; 706d7 (1c:46d7)
+LoadBirdSpriteGraphics:
ld de, BirdSprite
ld hl, vNPCSprites
lb bc, BANK(BirdSprite), $0c
@@ -257,7 +257,7 @@ LoadBirdSpriteGraphics: ; 706d7 (1c:46d7)
lb bc, BANK(BirdSprite), $0c
jp CopyVideoData
-InitFacingDirectionList: ; 706ef (1c:46ef)
+InitFacingDirectionList:
ld a, [wSpriteStateData1 + 2] ; player's sprite facing direction (image index is locked to standing images)
ld [wSavedPlayerFacingDirection], a
ld a, [wSpriteStateData1 + 4] ; player's sprite Y screen position
@@ -276,12 +276,12 @@ InitFacingDirectionList: ; 706ef (1c:46ef)
dec hl
ret
-PlayerSpinningFacingOrder: ; 70713 (1c:4713)
+PlayerSpinningFacingOrder:
; The order of the direction the player's sprite is facing when teleporting
; away. Creates a spinning effect.
db SPRITE_FACING_DOWN, SPRITE_FACING_LEFT, SPRITE_FACING_UP, SPRITE_FACING_RIGHT
-SpinPlayerSprite: ; 70717 (1c:4717)
+SpinPlayerSprite:
; copy the current value from the list into the sprite data and rotate the list
ld a, [hl]
ld [wSpriteStateData1 + 2], a ; player's sprite facing direction (image index is locked to standing images)
@@ -295,7 +295,7 @@ SpinPlayerSprite: ; 70717 (1c:4717)
pop hl
ret
-PlayerSpinInPlace: ; 70730 (1c:4730)
+PlayerSpinInPlace:
call SpinPlayerSprite
ld a, [wPlayerSpinInPlaceAnimFrameDelay]
ld c, a
@@ -316,7 +316,7 @@ PlayerSpinInPlace: ; 70730 (1c:4730)
call DelayFrames
jr PlayerSpinInPlace
-PlayerSpinWhileMovingUpOrDown: ; 70755 (1c:4755)
+PlayerSpinWhileMovingUpOrDown:
call SpinPlayerSprite
ld a, [wPlayerSpinWhileMovingUpOrDownAnimDeltaY]
ld c, a
@@ -332,7 +332,7 @@ PlayerSpinWhileMovingUpOrDown: ; 70755 (1c:4755)
call DelayFrames
jr PlayerSpinWhileMovingUpOrDown
-RestoreFacingDirectionAndYScreenPos: ; 70772 (1c:4772)
+RestoreFacingDirectionAndYScreenPos:
ld a, [wSavedPlayerScreenY]
ld [wSpriteStateData1 + 4], a
ld a, [wSavedPlayerFacingDirection]
@@ -340,14 +340,14 @@ RestoreFacingDirectionAndYScreenPos: ; 70772 (1c:4772)
ret
; if SGB, 2 frames, else 3 frames
-GetPlayerTeleportAnimFrameDelay: ; 7077f (1c:477f)
+GetPlayerTeleportAnimFrameDelay:
ld a, [wOnSGB]
xor $1
inc a
inc a
ret
-IsPlayerStandingOnWarpPadOrHole: ; 70787 (1c:4787)
+IsPlayerStandingOnWarpPadOrHole:
ld b, 0
ld hl, .warpPadAndHoleData
ld a, [wCurMapTileset]
@@ -374,14 +374,14 @@ IsPlayerStandingOnWarpPadOrHole: ; 70787 (1c:4787)
ret
; format: db tileset id, tile id, value to be put in [wStandingOnWarpPadOrHole]
-.warpPadAndHoleData: ; 707a9 (1c:47a9)
+.warpPadAndHoleData:
db FACILITY, $20, 1 ; warp pad
db FACILITY, $11, 2 ; hole
db CAVERN, $22, 2 ; hole
db INTERIOR, $55, 1 ; warp pad
db $FF
-FishingAnim: ; 707b6 (1c:47b6)
+FishingAnim:
ld c, 10
call DelayFrames
ld hl, wd736
@@ -462,19 +462,19 @@ FishingAnim: ; 707b6 (1c:47b6)
ld [hl], a
ret
-NoNibbleText: ; 70847 (1c:4847)
+NoNibbleText:
TX_FAR _NoNibbleText
db "@"
-NothingHereText: ; 7084c (1c:484c)
+NothingHereText:
TX_FAR _NothingHereText
db "@"
-ItsABiteText: ; 70851 (1c:4851)
+ItsABiteText:
TX_FAR _ItsABiteText
db "@"
-FishingRodOAM: ; 70856 (1c:4856)
+FishingRodOAM:
; specifies how the fishing rod should be drawn on the screen
; first byte = screen y coordinate
; second byte = screen x coordinate
@@ -485,7 +485,7 @@ FishingRodOAM: ; 70856 (1c:4856)
db $50, $40, $FE, $00 ; player facing left
db $50, $58, $FE, $20 ; player facing right ($20 means "horizontally flip the tile")
-RedFishingTiles: ; 70866 (1c:4866)
+RedFishingTiles:
dw RedFishingTilesFront
db 2, BANK(RedFishingTilesFront)
dw vNPCSprites + $20
@@ -502,7 +502,7 @@ RedFishingTiles: ; 70866 (1c:4866)
db 3, BANK(RedFishingRodTiles)
dw vNPCSprites2 + $7d0
-_HandleMidJump: ; 7087e (1c:487e)
+_HandleMidJump:
ld a, [wPlayerJumpingYScreenCoordsIndex]
ld c, a
inc a
@@ -534,6 +534,6 @@ _HandleMidJump: ; 7087e (1c:487e)
ld [wJoyIgnore], a
ret
-PlayerJumpingYScreenCoords: ; 708ba (1c:48ba)
+PlayerJumpingYScreenCoords:
; Sequence of y screen coordinates for player's sprite when jumping over a ledge.
db $38, $36, $34, $32, $31, $30, $30, $30, $31, $32, $33, $34, $36, $38, $3C, $3C
diff --git a/engine/overworld/pokecenter.asm b/engine/overworld/pokecenter.asm
index f302d994..3a302d70 100755
--- a/engine/overworld/pokecenter.asm
+++ b/engine/overworld/pokecenter.asm
@@ -1,4 +1,4 @@
-DisplayPokemonCenterDialogue_: ; 6fe6 (1:6fe6)
+DisplayPokemonCenterDialogue_:
call SaveScreenTilesToBuffer1 ; save screen
ld hl, PokemonCenterWelcomeText
call PrintText
@@ -45,24 +45,24 @@ DisplayPokemonCenterDialogue_: ; 6fe6 (1:6fe6)
call PrintText
jp UpdateSprites
-PokemonCenterWelcomeText: ; 705d (1:705d)
+PokemonCenterWelcomeText:
TX_FAR _PokemonCenterWelcomeText
db "@"
-ShallWeHealYourPokemonText: ; 7062 (1:7062)
+ShallWeHealYourPokemonText:
db $a
TX_FAR _ShallWeHealYourPokemonText
db "@"
-NeedYourPokemonText: ; 7068 (1:7068)
+NeedYourPokemonText:
TX_FAR _NeedYourPokemonText
db "@"
-PokemonFightingFitText: ; 706d (1:706d)
+PokemonFightingFitText:
TX_FAR _PokemonFightingFitText
db "@"
-PokemonCenterFarewellText: ; 7072 (1:7072)
+PokemonCenterFarewellText:
db $a
TX_FAR _PokemonCenterFarewellText
db "@"
diff --git a/engine/overworld/pokemart.asm b/engine/overworld/pokemart.asm
index ae96c4a9..e50c508e 100755
--- a/engine/overworld/pokemart.asm
+++ b/engine/overworld/pokemart.asm
@@ -1,4 +1,4 @@
-DisplayPokemartDialogue_: ; 6c20 (1:6c20)
+DisplayPokemartDialogue_:
ld a,[wListScrollOffset]
ld [wSavedListScrollOffset],a
call UpdateSprites
@@ -227,46 +227,46 @@ DisplayPokemartDialogue_: ; 6c20 (1:6c20)
ld [wListScrollOffset],a
ret
-PokemartBuyingGreetingText: ; 6e0c (1:6e0c)
+PokemartBuyingGreetingText:
TX_FAR _PokemartBuyingGreetingText
db "@"
-PokemartTellBuyPriceText: ; 6e11 (1:6e11)
+PokemartTellBuyPriceText:
TX_FAR _PokemartTellBuyPriceText
db "@"
-PokemartBoughtItemText: ; 6e16 (1:6e16)
+PokemartBoughtItemText:
TX_FAR _PokemartBoughtItemText
db "@"
-PokemartNotEnoughMoneyText: ; 6e1b (1:6e1b)
+PokemartNotEnoughMoneyText:
TX_FAR _PokemartNotEnoughMoneyText
db "@"
-PokemartItemBagFullText: ; 6e20 (1:6e20)
+PokemartItemBagFullText:
TX_FAR _PokemartItemBagFullText
db "@"
-PokemonSellingGreetingText: ; 6e25 (1:6e25)
+PokemonSellingGreetingText:
TX_FAR _PokemonSellingGreetingText
db "@"
-PokemartTellSellPriceText: ; 6e2a (1:6e2a)
+PokemartTellSellPriceText:
TX_FAR _PokemartTellSellPriceText
db "@"
-PokemartItemBagEmptyText: ; 6e2f (1:6e2f)
+PokemartItemBagEmptyText:
TX_FAR _PokemartItemBagEmptyText
db "@"
-PokemartUnsellableItemText: ; 6e34 (1:6e34)
+PokemartUnsellableItemText:
TX_FAR _PokemartUnsellableItemText
db "@"
-PokemartThankYouText: ; 6e39 (1:6e39)
+PokemartThankYouText:
TX_FAR _PokemartThankYouText
db "@"
-PokemartAnythingElseText: ; 6e3e (1:6e3e)
+PokemartAnythingElseText:
TX_FAR _PokemartAnythingElseText
db "@"
diff --git a/engine/overworld/saffron_guards.asm b/engine/overworld/saffron_guards.asm
index c0d6a985..3b26b6f8 100755
--- a/engine/overworld/saffron_guards.asm
+++ b/engine/overworld/saffron_guards.asm
@@ -1,4 +1,4 @@
-RemoveGuardDrink: ; 5a59f (16:659f)
+RemoveGuardDrink:
ld hl, GuardDrinksList
.drinkLoop
ld a, [hli]
@@ -12,5 +12,5 @@ RemoveGuardDrink: ; 5a59f (16:659f)
jr z, .drinkLoop
jpba RemoveItemByID
-GuardDrinksList: ; 5a5b7 (16:65b7)
+GuardDrinksList:
db FRESH_WATER, SODA_POP, LEMONADE, $00
diff --git a/engine/overworld/ssanne.asm b/engine/overworld/ssanne.asm
index e631bbfa..712c53ed 100755
--- a/engine/overworld/ssanne.asm
+++ b/engine/overworld/ssanne.asm
@@ -1,4 +1,4 @@
-AnimateBoulderDust: ; 79f54 (1e:5f54)
+AnimateBoulderDust:
ld a, $1
ld [wWhichAnimationOffsets], a ; select the boulder dust offsets
ld a, [wUpdateSpritesEnabled]
@@ -29,7 +29,7 @@ AnimateBoulderDust: ; 79f54 (1e:5f54)
ld [wUpdateSpritesEnabled], a
jp LoadPlayerSpriteGraphics
-GetMoveBoulderDustFunctionPointer: ; 79f92 (1e:5f92)
+GetMoveBoulderDustFunctionPointer:
ld a, [wSpriteStateData1 + 9] ; player's sprite facing direction
ld hl, MoveBoulderDustFunctionPointerTable
ld c, a
@@ -51,7 +51,7 @@ GetMoveBoulderDustFunctionPointer: ; 79f92 (1e:5f92)
pop hl
ret
-MoveBoulderDustFunctionPointerTable: ; 79fb0 (1e:5fb0)
+MoveBoulderDustFunctionPointerTable:
; facing down
db $FF,$00
dw AdjustOAMBlockYPos
@@ -68,7 +68,7 @@ MoveBoulderDustFunctionPointerTable: ; 79fb0 (1e:5fb0)
db $FF,$01
dw AdjustOAMBlockXPos
-LoadSmokeTileFourTimes: ; 79fc0 (1e:5fc0)
+LoadSmokeTileFourTimes:
ld hl, vChars1 + $7c0
ld c, $4
.loop
@@ -83,11 +83,11 @@ LoadSmokeTileFourTimes: ; 79fc0 (1e:5fc0)
jr nz, .loop
ret
-LoadSmokeTile: ; 79fd4 (1e:5fd4)
+LoadSmokeTile:
ld de, SSAnneSmokePuffTile
lb bc, BANK(SSAnneSmokePuffTile), (SSAnneSmokePuffTileEnd - SSAnneSmokePuffTile) / $10
jp CopyVideoData
-SSAnneSmokePuffTile: ; 79fdd (1e:5fdd)
+SSAnneSmokePuffTile:
INCBIN "gfx/ss_anne_smoke_puff.2bpp"
SSAnneSmokePuffTileEnd:
diff --git a/engine/overworld/trainers.asm b/engine/overworld/trainers.asm
index 66ae20ce..1d0340c9 100755
--- a/engine/overworld/trainers.asm
+++ b/engine/overworld/trainers.asm
@@ -1,4 +1,4 @@
-_GetSpritePosition1: ; 567f9 (15:67f9)
+_GetSpritePosition1:
ld hl, wSpriteStateData1
ld de, $4
ld a, [wSpriteIndex]
@@ -17,7 +17,7 @@ _GetSpritePosition1: ; 567f9 (15:67f9)
ld [$ffee], a
ret
-_GetSpritePosition2: ; 56819 (15:6819)
+_GetSpritePosition2:
ld hl, wSpriteStateData1
ld de, $4
ld a, [wSpriteIndex]
@@ -36,7 +36,7 @@ _GetSpritePosition2: ; 56819 (15:6819)
ld [wSavedSpriteMapX], a
ret
-_SetSpritePosition1: ; 5683d (15:683d)
+_SetSpritePosition1:
ld hl, wSpriteStateData1
ld de, $4
ld a, [wSpriteIndex]
@@ -55,7 +55,7 @@ _SetSpritePosition1: ; 5683d (15:683d)
ld [hl], a
ret
-_SetSpritePosition2: ; 5685d (15:685d)
+_SetSpritePosition2:
ld hl, wSpriteStateData1
ld de, $0004
ld a, [wSpriteIndex]
@@ -74,7 +74,7 @@ _SetSpritePosition2: ; 5685d (15:685d)
ld [hl], a
ret
-TrainerWalkUpToPlayer: ; 56881 (15:6881)
+TrainerWalkUpToPlayer:
ld a, [wSpriteIndex]
swap a
ld [wTrainerSpriteOffset], a
@@ -149,7 +149,7 @@ TrainerWalkUpToPlayer: ; 56881 (15:6881)
; input: de = offset within sprite entry
; output: de = pointer to sprite data
-GetSpriteDataPointer: ; 56903 (15:6903)
+GetSpriteDataPointer:
push de
add hl, de
ld a, [H_SPRITEINDEX]
@@ -161,7 +161,7 @@ GetSpriteDataPointer: ; 56903 (15:6903)
ret
; tests if this trainer is in the right position to engage the player and do so if she is.
-TrainerEngage: ; 5690f (15:690f)
+TrainerEngage:
push hl
push de
ld a, [wTrainerSpriteOffset]
@@ -225,14 +225,14 @@ TrainerEngage: ; 5690f (15:690f)
set 0, [hl]
call EngageMapTrainer
ld a, $ff
-.noEngage: ; 56988 (15:6988)
+.noEngage:
ld [wTrainerSpriteOffset], a
pop de
pop hl
ret
; reads trainer's Y position to wTrainerScreenY and X position to wTrainerScreenX
-ReadTrainerScreenPosition: ; 5698e (15:698e)
+ReadTrainerScreenPosition:
ld a, [wTrainerSpriteOffset]
add $4
ld d, $0
@@ -254,7 +254,7 @@ ReadTrainerScreenPosition: ; 5698e (15:698e)
; checks if the sprite is properly lined up with the player with respect to the direction it's looking. Also checks the distance between player and sprite
; note that this does not necessarily mean the sprite is seeing the player, he could be behind it's back
; a: distance player to sprite
-CheckSpriteCanSeePlayer: ; 569af (15:69af)
+CheckSpriteCanSeePlayer:
ld b, a
ld a, [wTrainerEngageDistance] ; how far the trainer can see
cp b
@@ -290,7 +290,7 @@ CheckSpriteCanSeePlayer: ; 569af (15:69af)
ret
; tests if the player is in front of the sprite (rather than behind it)
-CheckPlayerIsInFrontOfSprite: ; 569e3 (15:69e3)
+CheckPlayerIsInFrontOfSprite:
ld a, [wCurMap]
cp POWER_PLANT
jp z, .engage ; bypass this for power plant to get voltorb fake items to work
diff --git a/engine/palettes.asm b/engine/palettes.asm
index 94466533..4785ade2 100755
--- a/engine/palettes.asm
+++ b/engine/palettes.asm
@@ -1,4 +1,4 @@
-_RunPaletteCommand: ; 71ddf (1c:5ddf)
+_RunPaletteCommand:
call GetPredefRegisters
ld a, b
cp $ff
@@ -19,13 +19,13 @@ _RunPaletteCommand: ; 71ddf (1c:5ddf)
push de
jp [hl]
-SetPal_BattleBlack: ; 71dff (1c:5dff)
+SetPal_BattleBlack:
ld hl, PalPacket_Black
ld de, BlkPacket_Battle
ret
; uses PalPacket_Empty to build a packet based on mon IDs and health color
-SetPal_Battle: ; 71e06 (1c:5e06)
+SetPal_Battle:
ld hl, PalPacket_Empty
ld de, wPalPacket
ld bc, $10
@@ -58,13 +58,13 @@ SetPal_Battle: ; 71e06 (1c:5e06)
ld [wDefaultPaletteCommand], a
ret
-SetPal_TownMap: ; 71e48 (1c:5e48)
+SetPal_TownMap:
ld hl, PalPacket_TownMap
ld de, BlkPacket_WholeScreen
ret
; uses PalPacket_Empty to build a packet based the mon ID
-SetPal_StatusScreen: ; 71e4f (1c:5e4f)
+SetPal_StatusScreen:
ld hl, PalPacket_Empty
ld de, wPalPacket
ld bc, $10
@@ -87,12 +87,12 @@ SetPal_StatusScreen: ; 71e4f (1c:5e4f)
ld de, BlkPacket_StatusScreen
ret
-SetPal_PartyMenu: ; 71e7b (1c:5e7b)
+SetPal_PartyMenu:
ld hl, PalPacket_PartyMenu
ld de, wPartyMenuBlkPacket
ret
-SetPal_Pokedex: ; 71e82 (1c:5e82)
+SetPal_Pokedex:
ld hl, PalPacket_Pokedex
ld de, wPalPacket
ld bc, $10
@@ -105,28 +105,28 @@ SetPal_Pokedex: ; 71e82 (1c:5e82)
ld de, BlkPacket_Pokedex
ret
-SetPal_Slots: ; 71e9f (1c:5e9f)
+SetPal_Slots:
ld hl, PalPacket_Slots
ld de, BlkPacket_Slots
ret
-SetPal_TitleScreen: ; 71ea6 (1c:5ea6)
+SetPal_TitleScreen:
ld hl, PalPacket_Titlescreen
ld de, BlkPacket_Titlescreen
ret
; used mostly for menus and the Oak intro
-SetPal_Generic: ; 71ead (1c:5ead)
+SetPal_Generic:
ld hl, PalPacket_Generic
ld de, BlkPacket_WholeScreen
ret
-SetPal_NidorinoIntro: ; 71eb4 (1c:5eb4)
+SetPal_NidorinoIntro:
ld hl, PalPacket_NidorinoIntro
ld de, BlkPacket_NidorinoIntro
ret
-SetPal_GameFreakIntro: ; 71ebb (1c:5ebb)
+SetPal_GameFreakIntro:
ld hl, PalPacket_GameFreakIntro
ld de, BlkPacket_GameFreakIntro
ld a, SET_PAL_GENERIC
@@ -134,7 +134,7 @@ SetPal_GameFreakIntro: ; 71ebb (1c:5ebb)
ret
; uses PalPacket_Empty to build a packet based on the current map
-SetPal_Overworld: ; 71ec7 (1c:5ec7)
+SetPal_Overworld:
ld hl, PalPacket_Empty
ld de, wPalPacket
ld bc, $10
@@ -181,7 +181,7 @@ SetPal_Overworld: ; 71ec7 (1c:5ec7)
; used when a Pokemon is the only thing on the screen
; such as evolution, trading and the Hall of Fame
-SetPal_PokemonWholeScreen: ; 71f17 (1c:5f17)
+SetPal_PokemonWholeScreen:
push bc
ld hl, PalPacket_Empty
ld de, wPalPacket
@@ -200,7 +200,7 @@ SetPal_PokemonWholeScreen: ; 71f17 (1c:5f17)
ld de, BlkPacket_WholeScreen
ret
-SetPal_TrainerCard: ; 71f3b (1c:5f3b)
+SetPal_TrainerCard:
ld hl, BlkPacket_TrainerCard
ld de, wTrainerCardBlkPacket
ld bc, $40
@@ -240,7 +240,7 @@ SetPal_TrainerCard: ; 71f3b (1c:5f3b)
ld de, wTrainerCardBlkPacket
ret
-SetPalFunctions: ; 71f73 (1c:5f73)
+SetPalFunctions:
dw SetPal_BattleBlack
dw SetPal_Battle
dw SetPal_TownMap
@@ -258,7 +258,7 @@ SetPalFunctions: ; 71f73 (1c:5f73)
; The length of the blk data of each badge on the Trainer Card.
; The Rainbow Badge has 3 entries because of its many colors.
-BadgeBlkDataLengths: ; 71f8f (1c:5f8f)
+BadgeBlkDataLengths:
db 6 ; Boulder Badge
db 6 ; Cascade Badge
db 6 ; Thunder Badge
@@ -268,12 +268,12 @@ BadgeBlkDataLengths: ; 71f8f (1c:5f8f)
db 6 ; Volcano Badge
db 6 ; Earth Badge
-DeterminePaletteID: ; 71f97 (1c:5f97)
+DeterminePaletteID:
bit Transformed, a ; a is battle status 3
ld a, PAL_GREYMON ; if the mon has used Transform, use Ditto's palette
ret nz
ld a, [hl]
-DeterminePaletteIDOutOfBattle: ; 71f9d (1c:5f9d)
+DeterminePaletteIDOutOfBattle:
ld [wd11e], a
and a ; is the mon index 0?
jr z, .skipDexNumConversion
@@ -289,13 +289,13 @@ DeterminePaletteIDOutOfBattle: ; 71f9d (1c:5f9d)
ld a, [hl]
ret
-InitPartyMenuBlkPacket: ; 71fb6 (1c:5fb6)
+InitPartyMenuBlkPacket:
ld hl, BlkPacket_PartyMenu
ld de, wPartyMenuBlkPacket
ld bc, $30
jp CopyData
-UpdatePartyMenuBlkPacket: ; 71fc2 (1c:5fc2)
+UpdatePartyMenuBlkPacket:
; Update the blk packet with the palette of the HP bar that is
; specified in [wWhichPartyMenuHPBar].
ld hl, wPartyMenuHPBarColors
@@ -323,7 +323,7 @@ UpdatePartyMenuBlkPacket: ; 71fc2 (1c:5fc2)
ld [hl], e
ret
-SendSGBPacket: ; 71feb (1c:5feb)
+SendSGBPacket:
;check number of packets
ld a,[hl]
and a,$07
@@ -388,7 +388,7 @@ SendSGBPacket: ; 71feb (1c:5feb)
; else send 16 more bytes
jr .loop2
-LoadSGB: ; 7202b (1c:602b)
+LoadSGB:
xor a
ld [wOnSGB], a
call CheckSGB
@@ -422,7 +422,7 @@ LoadSGB: ; 7202b (1c:602b)
ld hl, MaskEnCancelPacket
jp SendSGBPacket
-PrepareSuperNintendoVRAMTransfer: ; 72075 (1c:6075)
+PrepareSuperNintendoVRAMTransfer:
ld hl, .packetPointers
ld c, 9
.loop
@@ -451,7 +451,7 @@ PrepareSuperNintendoVRAMTransfer: ; 72075 (1c:6075)
dw DataSnd_725a8
dw DataSnd_725b8
-CheckSGB: ; 7209b (1c:609b)
+CheckSGB:
; Returns whether the game is running on an SGB in carry.
ld hl, MltReq2Packet
di
@@ -503,12 +503,12 @@ CheckSGB: ; 7209b (1c:609b)
scf
ret
-SendMltReq1Packet: ; 72102 (1c:6102)
+SendMltReq1Packet:
ld hl, MltReq1Packet
call SendSGBPacket
jp Wait7000
-CopyGfxToSuperNintendoVRAM: ; 7210b (1c:610b)
+CopyGfxToSuperNintendoVRAM:
di
push de
call DisableLCD
@@ -547,7 +547,7 @@ CopyGfxToSuperNintendoVRAM: ; 7210b (1c:610b)
ei
ret
-Wait7000: ; 7214a (1c:614a)
+Wait7000:
; Each loop takes 9 cycles so this routine actually waits 63000 cycles.
ld de, 7000
.loop
@@ -560,7 +560,7 @@ Wait7000: ; 7214a (1c:614a)
jr nz, .loop
ret
-SendSGBPackets: ; 72156 (1c:6156)
+SendSGBPackets:
ld a, [wGBC]
and a
jr z, .notGBC
@@ -575,7 +575,7 @@ SendSGBPackets: ; 72156 (1c:6156)
pop hl
jp SendSGBPacket
-InitGBCPalettes: ; 7216d (1c:616d)
+InitGBCPalettes:
ld a, $80 ; index 0 with auto-increment
ld [rBGPI], a
inc hl
@@ -597,10 +597,10 @@ InitGBCPalettes: ; 7216d (1c:616d)
jr nz, .loop
ret
-EmptyFunc5: ; 72187 (1c:6187)
+EmptyFunc5:
ret
-CopySGBBorderTiles: ; 72188 (1c:6188)
+CopySGBBorderTiles:
; SGB tile data is stored in a 4BPP planar format.
; Each tile is 32 bytes. The first 16 bytes contain bit planes 1 and 2, while
; the second 16 bytes contain bit planes 3 and 4.
diff --git a/engine/play_time.asm b/engine/play_time.asm
index 79deaf5e..a5202cc6 100755
--- a/engine/play_time.asm
+++ b/engine/play_time.asm
@@ -1,4 +1,4 @@
-TrackPlayTime: ; 18dee (6:4dee)
+TrackPlayTime:
call CountDownIgnoreInputBitReset
ld a, [wd732]
bit 0, a
@@ -36,7 +36,7 @@ TrackPlayTime: ; 18dee (6:4dee)
ld [wPlayTimeMaxed], a
ret
-CountDownIgnoreInputBitReset: ; 18e36 (6:4e36)
+CountDownIgnoreInputBitReset:
ld a, [wIgnoreInputCounter]
and a
jr nz, .asm_18e40
diff --git a/engine/pokedex_rating.asm b/engine/pokedex_rating.asm
index 73025f0a..f8e29e5c 100755
--- a/engine/pokedex_rating.asm
+++ b/engine/pokedex_rating.asm
@@ -1,4 +1,4 @@
-DisplayDexRating: ; 44169 (11:4169)
+DisplayDexRating:
ld hl, wPokedexSeen
ld b, wPokedexSeenEnd - wPokedexSeen
call CountSetBits
@@ -51,11 +51,11 @@ DisplayDexRating: ; 44169 (11:4169)
ld [de], a
ret
-PokedexRatingText_441cc: ; 441cc (11:41cc)
+PokedexRatingText_441cc:
TX_FAR _OaksLabText_441cc
db "@"
-DexRatingsTable: ; 441d1 (11:41d1)
+DexRatingsTable:
db 10
dw PokedexRatingText_44201
db 20
@@ -89,66 +89,66 @@ DexRatingsTable: ; 441d1 (11:41d1)
db 152
dw PokedexRatingText_4424c
-PokedexRatingText_44201: ; 44201 (11:4201)
+PokedexRatingText_44201:
TX_FAR _OaksLabText_44201
db "@"
-PokedexRatingText_44206: ; 44206 (11:4206)
+PokedexRatingText_44206:
TX_FAR _OaksLabText_44206
db "@"
-PokedexRatingText_4420b: ; 4420b (11:420b)
+PokedexRatingText_4420b:
TX_FAR _OaksLabText_4420b
db "@"
-PokedexRatingText_44210: ; 44210 (11:4210)
+PokedexRatingText_44210:
TX_FAR _OaksLabText_44210
db "@"
-PokedexRatingText_44215: ; 44215 (11:4215)
+PokedexRatingText_44215:
TX_FAR _OaksLabText_44215
db "@"
-PokedexRatingText_4421a: ; 4421a (11:421a)
+PokedexRatingText_4421a:
TX_FAR _OaksLabText_4421a
db "@"
-PokedexRatingText_4421f: ; 4421f (11:421f)
+PokedexRatingText_4421f:
TX_FAR _OaksLabText_4421f
db "@"
-PokedexRatingText_44224: ; 44224 (11:4224)
+PokedexRatingText_44224:
TX_FAR _OaksLabText_44224
db "@"
-PokedexRatingText_44229: ; 44229 (11:4229)
+PokedexRatingText_44229:
TX_FAR _OaksLabText_44229
db "@"
-PokedexRatingText_4422e: ; 4422e (11:422e)
+PokedexRatingText_4422e:
TX_FAR _OaksLabText_4422e
db "@"
-PokedexRatingText_44233: ; 44233 (11:4233)
+PokedexRatingText_44233:
TX_FAR _OaksLabText_44233
db "@"
-PokedexRatingText_44238: ; 44238 (11:4238)
+PokedexRatingText_44238:
TX_FAR _OaksLabText_44238
db "@"
-PokedexRatingText_4423d: ; 4423d (11:423d)
+PokedexRatingText_4423d:
TX_FAR _OaksLabText_4423d
db "@"
-PokedexRatingText_44242: ; 44242 (11:4242)
+PokedexRatingText_44242:
TX_FAR _OaksLabText_44242
db "@"
-PokedexRatingText_44247: ; 44247 (11:4247)
+PokedexRatingText_44247:
TX_FAR _OaksLabText_44247
db "@"
-PokedexRatingText_4424c: ; 4424c (11:424c)
+PokedexRatingText_4424c:
TX_FAR _OaksLabText_4424c
db "@"
diff --git a/engine/predefs.asm b/engine/predefs.asm
index 16533751..fd11475b 100755
--- a/engine/predefs.asm
+++ b/engine/predefs.asm
@@ -49,7 +49,7 @@ GetPredefPointer:
ret
-PredefPointers:: ; 4fe79 (13:7e79)
+PredefPointers::
; these are pointers to ASM routines.
; they appear to be used in overworld map scripts.
add_predef DrawPlayerHUDAndHPBar
diff --git a/engine/predefs12.asm b/engine/predefs12.asm
index 269a681e..dc79d6f3 100755
--- a/engine/predefs12.asm
+++ b/engine/predefs12.asm
@@ -1,5 +1,5 @@
; b = new colour for BG colour 0 (usually white) for 4 frames
-ChangeBGPalColor0_4Frames: ; 480eb (12:40eb)
+ChangeBGPalColor0_4Frames:
call GetPredefRegisters
ld a, [rBGP]
or b
@@ -11,7 +11,7 @@ ChangeBGPalColor0_4Frames: ; 480eb (12:40eb)
ld [rBGP], a
ret
-PredefShakeScreenVertically: ; 480ff (12:40ff)
+PredefShakeScreenVertically:
; Moves the window down and then back in a sequence of progressively smaller
; numbers of pixels, starting at b.
call GetPredefRegisters
@@ -37,7 +37,7 @@ PredefShakeScreenVertically: ; 480ff (12:40ff)
ld c, 3
jp DelayFrames
-PredefShakeScreenHorizontally: ; 48125 (12:4125)
+PredefShakeScreenHorizontally:
; Moves the window right and then back in a sequence of progressively smaller
; numbers of pixels, starting at b.
call GetPredefRegisters
diff --git a/engine/predefs17.asm b/engine/predefs17.asm
index a674b45a..21289c6a 100755
--- a/engine/predefs17.asm
+++ b/engine/predefs17.asm
@@ -1,6 +1,6 @@
; this function temporarily makes the starters (and Ivysaur) seen
; so that the full Pokedex information gets displayed in Oak's lab
-StarterDex: ; 5c0dc (17:40dc)
+StarterDex:
ld a, %01001011 ; set starter flags
ld [wPokedexOwned], a
predef ShowPokedexData
diff --git a/engine/predefs17_2.asm b/engine/predefs17_2.asm
index c0df7d0a..e9235f13 100755
--- a/engine/predefs17_2.asm
+++ b/engine/predefs17_2.asm
@@ -1,5 +1,5 @@
; updates the types of a party mon (pointed to in hl) to the ones of the mon specified in wd11e
-SetPartyMonTypes: ; 5db5e (17:5b5e)
+SetPartyMonTypes:
call GetPredefRegisters
ld bc, wPartyMon1Type - wPartyMon1 ; $5
add hl, bc
diff --git a/engine/predefs7.asm b/engine/predefs7.asm
index c336eaa9..752bdd1a 100755
--- a/engine/predefs7.asm
+++ b/engine/predefs7.asm
@@ -1,4 +1,4 @@
-DisplayElevatorFloorMenu: ; 1c9c6 (7:49c6)
+DisplayElevatorFloorMenu:
ld hl, WhichFloorText
call PrintText
ld hl, wItemList
@@ -43,6 +43,6 @@ DisplayElevatorFloorMenu: ; 1c9c6 (7:49c6)
ld [hli], a ; destination map ID
ret
-WhichFloorText: ; 1ca14 (7:4a14)
+WhichFloorText:
TX_FAR _WhichFloorText
db "@"
diff --git a/engine/save.asm b/engine/save.asm
index e47be58a..4a2ac196 100755
--- a/engine/save.asm
+++ b/engine/save.asm
@@ -1,4 +1,4 @@
-LoadSAV: ; 735e8 (1c:75e8)
+LoadSAV:
;(if carry -> write
;"the file data is destroyed")
call ClearScreen
@@ -27,11 +27,11 @@ LoadSAV: ; 735e8 (1c:75e8)
ld [wSaveFileStatus], a
ret
-FileDataDestroyedText: ; 7361e (1c:761e)
+FileDataDestroyedText:
TX_FAR _FileDataDestroyedText
db "@"
-LoadSAV0: ; 73623 (1c:7623)
+LoadSAV0:
ld a, SRAM_ENABLE
ld [MBC1SRamEnable], a
ld a, $1
@@ -78,7 +78,7 @@ LoadSAV0: ; 73623 (1c:7623)
and a
jp SAVGoodChecksum
-LoadSAV1: ; 73690 (1c:7690)
+LoadSAV1:
ld a, SRAM_ENABLE
ld [MBC1SRamEnable], a
ld a, $1
@@ -98,7 +98,7 @@ LoadSAV1: ; 73690 (1c:7690)
and a
jp SAVGoodChecksum
-LoadSAV2: ; 736bd (1c:76bd)
+LoadSAV2:
ld a, SRAM_ENABLE
ld [MBC1SRamEnable], a
ld a, $1
@@ -122,22 +122,22 @@ LoadSAV2: ; 736bd (1c:76bd)
and a
jp SAVGoodChecksum
-SAVBadCheckSum: ; 736f7 (1c:76f7)
+SAVBadCheckSum:
scf
-SAVGoodChecksum: ; 736f8 (1c:76f8)
+SAVGoodChecksum:
ld a, $0
ld [MBC1SRamBankingMode], a
ld [MBC1SRamEnable], a
ret
-LoadSAVIgnoreBadCheckSum: ; 73701 (1c:7701)
+LoadSAVIgnoreBadCheckSum:
; unused function that loads save data and ignores bad checksums
call LoadSAV0
call LoadSAV1
jp LoadSAV2
-SaveSAV: ; 7370a (1c:770a)
+SaveSAV:
callba PrintSaveScreenText
ld hl,WouldYouLikeToSaveText
call SaveSAVConfirm
@@ -173,7 +173,7 @@ SaveSAV: ; 7370a (1c:770a)
NowSavingString:
db "Now saving...@"
-SaveSAVConfirm: ; 73768 (1c:7768)
+SaveSAVConfirm:
call PrintText
coord hl, 0, 7
lb bc, 8, 1
@@ -187,15 +187,15 @@ WouldYouLikeToSaveText: ; 0x7377d
TX_FAR _WouldYouLikeToSaveText
db "@"
-GameSavedText: ; 73782 (1c:7782)
+GameSavedText:
TX_FAR _GameSavedText
db "@"
-OlderFileWillBeErasedText: ; 73787 (1c:7787)
+OlderFileWillBeErasedText:
TX_FAR _OlderFileWillBeErasedText
db "@"
-SaveSAVtoSRAM0: ; 7378c (1c:778c)
+SaveSAVtoSRAM0:
ld a, SRAM_ENABLE
ld [MBC1SRamEnable], a
ld a, $1
@@ -228,7 +228,7 @@ SaveSAVtoSRAM0: ; 7378c (1c:778c)
ld [MBC1SRamEnable], a
ret
-SaveSAVtoSRAM1: ; 737e2 (1c:77e2)
+SaveSAVtoSRAM1:
; stored pokémon
ld a, SRAM_ENABLE
ld [MBC1SRamEnable], a
@@ -248,7 +248,7 @@ SaveSAVtoSRAM1: ; 737e2 (1c:77e2)
ld [MBC1SRamEnable], a
ret
-SaveSAVtoSRAM2: ; 7380f (1c:780f)
+SaveSAVtoSRAM2:
ld a, SRAM_ENABLE
ld [MBC1SRamEnable], a
ld a, $1
@@ -271,14 +271,14 @@ SaveSAVtoSRAM2: ; 7380f (1c:780f)
ld [MBC1SRamEnable], a
ret
-SaveSAVtoSRAM: ; 73848 (1c:7848)
+SaveSAVtoSRAM:
ld a, $2
ld [wSaveFileStatus], a
call SaveSAVtoSRAM0
call SaveSAVtoSRAM1
jp SaveSAVtoSRAM2
-SAVCheckSum: ; 73856 (1c:7856)
+SAVCheckSum:
;Check Sum (result[1 byte] is complemented)
ld d, 0
.loop
@@ -293,7 +293,7 @@ SAVCheckSum: ; 73856 (1c:7856)
cpl
ret
-CalcIndividualBoxCheckSums: ; 73863 (1c:7863)
+CalcIndividualBoxCheckSums:
ld hl, sBox1 ; sBox7
ld de, sBank2IndividualBoxChecksums ; sBank3IndividualBoxChecksums
ld b, NUM_BOXES / 2
@@ -310,7 +310,7 @@ CalcIndividualBoxCheckSums: ; 73863 (1c:7863)
jr nz, .loop
ret
-GetBoxSRAMLocation: ; 7387b (1c:787b)
+GetBoxSRAMLocation:
; in: a = box num
; out: b = box SRAM bank, hl = pointer to start of box
ld hl, BoxSRAMPointerTable
@@ -331,7 +331,7 @@ GetBoxSRAMLocation: ; 7387b (1c:787b)
ld l, a
ret
-BoxSRAMPointerTable: ; 73895 (1c:7895)
+BoxSRAMPointerTable:
dw sBox1 ; sBox7
dw sBox2 ; sBox8
dw sBox3 ; sBox9
@@ -339,7 +339,7 @@ BoxSRAMPointerTable: ; 73895 (1c:7895)
dw sBox5 ; sBox11
dw sBox6 ; sBox12
-ChangeBox:: ; 738a1 (1c:78a1)
+ChangeBox::
ld hl, WhenYouChangeBoxText
call PrintText
call YesNoChoice
@@ -385,11 +385,11 @@ ChangeBox:: ; 738a1 (1c:78a1)
call WaitForSoundToFinish
ret
-WhenYouChangeBoxText: ; 73909 (1c:7909)
+WhenYouChangeBoxText:
TX_FAR _WhenYouChangeBoxText
db "@"
-CopyBoxToOrFromSRAM: ; 7390e (1c:790e)
+CopyBoxToOrFromSRAM:
; copy an entire box from hl to de with b as the SRAM bank
push hl
ld a, SRAM_ENABLE
@@ -418,7 +418,7 @@ CopyBoxToOrFromSRAM: ; 7390e (1c:790e)
ld [MBC1SRamEnable], a
ret
-DisplayChangeBoxMenu: ; 7393f (1c:793f)
+DisplayChangeBoxMenu:
xor a
ld [H_AUTOBGTRANSFERENABLED], a
ld a, A_BUTTON | B_BUTTON
@@ -489,11 +489,11 @@ DisplayChangeBoxMenu: ; 7393f (1c:793f)
ld [H_AUTOBGTRANSFERENABLED], a
ret
-ChooseABoxText: ; 739d4 (1c:79d4)
+ChooseABoxText:
TX_FAR _ChooseABoxText
db "@"
-BoxNames: ; 739d9 (1c:79d9)
+BoxNames:
db "BOX 1"
next "BOX 2"
next "BOX 3"
@@ -507,10 +507,10 @@ BoxNames: ; 739d9 (1c:79d9)
next "BOX11"
next "BOX12@"
-BoxNoText: ; 73a21 (1c:7a21)
+BoxNoText:
db "BOX No.@"
-EmptyAllSRAMBoxes: ; 73a29 (1c:7a29)
+EmptyAllSRAMBoxes:
; marks all boxes in SRAM as empty (initialisation for the first time the
; player changes the box)
ld a, SRAM_ENABLE
@@ -528,7 +528,7 @@ EmptyAllSRAMBoxes: ; 73a29 (1c:7a29)
ld [MBC1SRamEnable], a
ret
-EmptySRAMBoxesInBank: ; 73a4b (1c:7a4b)
+EmptySRAMBoxesInBank:
; marks every box in the current SRAM bank as empty
ld hl, sBox1 ; sBox7
call EmptySRAMBox
@@ -549,14 +549,14 @@ EmptySRAMBoxesInBank: ; 73a4b (1c:7a4b)
call CalcIndividualBoxCheckSums
ret
-EmptySRAMBox: ; 73a7f (1c:7a7f)
+EmptySRAMBox:
xor a
ld [hli], a
dec a
ld [hl], a
ret
-GetMonCountsForAllBoxes: ; 73a84 (1c:7a84)
+GetMonCountsForAllBoxes:
ld hl, wBoxMonCounts
push hl
ld a, SRAM_ENABLE
@@ -585,7 +585,7 @@ GetMonCountsForAllBoxes: ; 73a84 (1c:7a84)
ret
-GetMonCountsForBoxesInBank: ; 73ab8 (1c:7ab8)
+GetMonCountsForBoxesInBank:
ld a, [sBox1] ; sBox7
ld [hli], a
ld a, [sBox2] ; sBox8
@@ -600,7 +600,7 @@ GetMonCountsForBoxesInBank: ; 73ab8 (1c:7ab8)
ld [hli], a
ret
-SAVCheckRandomID: ; 73ad1 (1c:7ad1)
+SAVCheckRandomID:
;checks if Sav file is the same by checking player's name 1st letter ($a598)
; and the two random numbers generated at game beginning
;(which are stored at wPlayerID)s
@@ -634,7 +634,7 @@ SAVCheckRandomID: ; 73ad1 (1c:7ad1)
ld [MBC1SRamEnable],a
ret
-SaveHallOfFameTeams: ; 73b0d (1c:7b0d)
+SaveHallOfFameTeams:
ld a, [wNumHoFTeams]
dec a
cp HOF_TEAM_CAPACITY
@@ -658,7 +658,7 @@ SaveHallOfFameTeams: ; 73b0d (1c:7b0d)
ld bc, HOF_TEAM
jr HallOfFame_Copy
-LoadHallOfFameTeams: ; 73b3f (1c:7b3f)
+LoadHallOfFameTeams:
ld hl, sHallOfFame
ld bc, HOF_TEAM
ld a, [wHoFTeamIndex]
@@ -667,7 +667,7 @@ LoadHallOfFameTeams: ; 73b3f (1c:7b3f)
ld bc, HOF_TEAM
; fallthrough
-HallOfFame_Copy: ; 73b51 (1c:7b51)
+HallOfFame_Copy:
ld a, SRAM_ENABLE
ld [MBC1SRamEnable], a
ld a, $1
@@ -680,7 +680,7 @@ HallOfFame_Copy: ; 73b51 (1c:7b51)
ld [MBC1SRamEnable], a
ret
-ClearSAV: ; 73b6a (1c:7b6a)
+ClearSAV:
ld a, SRAM_ENABLE
ld [MBC1SRamEnable], a
ld a, $1
@@ -698,7 +698,7 @@ ClearSAV: ; 73b6a (1c:7b6a)
ld [MBC1SRamEnable], a
ret
-PadSRAM_FF: ; 73b8f (1c:7b8f)
+PadSRAM_FF:
ld [MBC1SRamBank], a
ld hl, $a000
ld bc, $2000
diff --git a/engine/slot_machine.asm b/engine/slot_machine.asm
index eb1cf3c3..733cc29c 100755
--- a/engine/slot_machine.asm
+++ b/engine/slot_machine.asm
@@ -1,4 +1,4 @@
-PromptUserToPlaySlots: ; 3730e (d:730e)
+PromptUserToPlaySlots:
call SaveScreenTilesToBuffer2
ld a, BANK(DisplayTextIDInit)
ld [wAutoTextBoxDrawingControl], a
@@ -52,11 +52,11 @@ PromptUserToPlaySlots: ; 3730e (d:730e)
push af
jp CloseTextDisplay
-PlaySlotMachineText: ; 37390 (d:7390)
+PlaySlotMachineText:
TX_FAR _PlaySlotMachineText
db "@"
-MainSlotMachineLoop: ; 37395 (d:7395)
+MainSlotMachineLoop:
call SlotMachine_PrintCreditCoins
xor a
ld hl, wPayoutCoins
@@ -146,32 +146,32 @@ MainSlotMachineLoop: ; 37395 (d:7395)
call SlotMachine_PutOutLitBalls
jp MainSlotMachineLoop
-CoinMultiplierSlotMachineText: ; 3745e (d:745e)
+CoinMultiplierSlotMachineText:
db "×3"
next "×2"
next "×1@"
-OutOfCoinsSlotMachineText: ; 37467 (d:7467)
+OutOfCoinsSlotMachineText:
TX_FAR _OutOfCoinsSlotMachineText
db "@"
-BetHowManySlotMachineText: ; 3746c (d:746c)
+BetHowManySlotMachineText:
TX_FAR _BetHowManySlotMachineText
db "@"
-StartSlotMachineText: ; 37471 (d:7471)
+StartSlotMachineText:
TX_FAR _StartSlotMachineText
db "@"
-NotEnoughCoinsSlotMachineText: ; 37476 (d:7476)
+NotEnoughCoinsSlotMachineText:
TX_FAR _NotEnoughCoinsSlotMachineText
db "@"
-OneMoreGoSlotMachineText: ; 3747b (d:747b)
+OneMoreGoSlotMachineText:
TX_FAR _OneMoreGoSlotMachineText
db "@"
-SlotMachine_SetFlags: ; 37480 (d:7480)
+SlotMachine_SetFlags:
ld hl, wSlotMachineFlags
bit 7, [hl]
ret nz
@@ -201,7 +201,7 @@ SlotMachine_SetFlags: ; 37480 (d:7480)
set 7, [hl]
ret
-SlotMachine_SpinWheels: ; 374ad (d:74ad)
+SlotMachine_SpinWheels:
ld c, 20
.loop1
push bc
@@ -233,7 +233,7 @@ SlotMachine_SpinWheels: ; 374ad (d:74ad)
; visible. The 3 functions below ensure this by checking if the wheel offset
; is even before stopping the wheel.
-SlotMachine_StopOrAnimWheel1: ; 374df (d:74df)
+SlotMachine_StopOrAnimWheel1:
ld a, [wStoppingWhichSlotMachineWheel]
cp 1
jr c, .animWheel
@@ -251,7 +251,7 @@ SlotMachine_StopOrAnimWheel1: ; 374df (d:74df)
.animWheel
jp SlotMachine_AnimWheel1
-SlotMachine_StopOrAnimWheel2: ; 374fb (d:74fb)
+SlotMachine_StopOrAnimWheel2:
ld a, [wStoppingWhichSlotMachineWheel]
cp 2
jr c, .animWheel
@@ -269,7 +269,7 @@ SlotMachine_StopOrAnimWheel2: ; 374fb (d:74fb)
.animWheel
jp SlotMachine_AnimWheel2
-SlotMachine_StopOrAnimWheel3: ; 37517 (d:7517)
+SlotMachine_StopOrAnimWheel3:
ld a, [wStoppingWhichSlotMachineWheel]
cp 3
jr c, .animWheel
@@ -285,7 +285,7 @@ SlotMachine_StopOrAnimWheel3: ; 37517 (d:7517)
and a
ret
-SlotMachine_StopWheel1Early: ; 3752c (d:752c)
+SlotMachine_StopWheel1Early:
call SlotMachine_GetWheel1Tiles
ld hl, wSlotMachineWheel1BottomTile
ld a, [wSlotMachineFlags]
@@ -314,7 +314,7 @@ SlotMachine_StopWheel1Early: ; 3752c (d:752c)
ld [hl], 0
ret
-SlotMachine_StopWheel2Early: ; 37552 (d:7552)
+SlotMachine_StopWheel2Early:
call SlotMachine_GetWheel2Tiles
ld a, [wSlotMachineFlags]
and $80
@@ -337,7 +337,7 @@ SlotMachine_StopWheel2Early: ; 37552 (d:7552)
ld [wSlotMachineWheel2SlipCounter], a
ret
-SlotMachine_FindWheel1Wheel2Matches: ; 3756e (d:756e)
+SlotMachine_FindWheel1Wheel2Matches:
; return whether wheel 1 and wheel 2's current positions allow a match (given
; that wheel 3 stops in a good position) in Z
ld hl, wSlotMachineWheel1BottomTile
@@ -363,7 +363,7 @@ SlotMachine_FindWheel1Wheel2Matches: ; 3756e (d:756e)
dec de
ret
-SlotMachine_CheckForMatches: ; 37588 (d:7588)
+SlotMachine_CheckForMatches:
call SlotMachine_GetWheel3Tiles
ld a, [wSlotMachineBet]
cp 2
@@ -475,7 +475,7 @@ SlotMachine_CheckForMatches: ; 37588 (d:7588)
ld [rOBP0], a
jp .done
-SymbolLinedUpSlotMachineText: ; 37665 (d:7665)
+SymbolLinedUpSlotMachineText:
TX_ASM
push bc
call SlotMachine_PrintWinningSymbol
@@ -487,11 +487,11 @@ SymbolLinedUpSlotMachineText: ; 37665 (d:7665)
inc bc
ret
-LinedUpText: ; 37673 (d:7673)
+LinedUpText:
TX_FAR _LinedUpText
db "@"
-SlotRewardPointers: ; 37678 (d:7678)
+SlotRewardPointers:
dw SlotReward300Func
dw SlotReward300Text
dw SlotReward100Func
@@ -505,24 +505,24 @@ SlotRewardPointers: ; 37678 (d:7678)
dw SlotReward15Func
dw SlotReward15Text
-SlotReward300Text: ; 37690 (d:7690)
+SlotReward300Text:
db "300@"
-SlotReward100Text: ; 37694 (d:7694)
+SlotReward100Text:
db "100@"
-SlotReward8Text: ; 37698 (d:7698)
+SlotReward8Text:
db "8@"
-SlotReward15Text: ; 3769a (d:769a)
+SlotReward15Text:
db "15@"
-NotThisTimeText: ; 3769d (d:769d)
+NotThisTimeText:
TX_FAR _NotThisTimeText
db "@"
; compares the slot machine tiles at bc, de, and hl
-SlotMachine_CheckForMatch: ; 376a2 (d:76a2)
+SlotMachine_CheckForMatch:
ld a, [de]
cp [hl]
ret nz
@@ -530,24 +530,24 @@ SlotMachine_CheckForMatch: ; 376a2 (d:76a2)
cp [hl]
ret
-SlotMachine_GetWheel3Tiles: ; 376a8 (d:76a8)
+SlotMachine_GetWheel3Tiles:
ld de, wSlotMachineWheel3BottomTile
ld hl, SlotMachineWheel3
ld a, [wSlotMachineWheel3Offset]
call SlotMachine_GetWheelTiles
-SlotMachine_GetWheel2Tiles: ; 376b4 (d:76b4)
+SlotMachine_GetWheel2Tiles:
ld de, wSlotMachineWheel2BottomTile
ld hl, SlotMachineWheel2
ld a, [wSlotMachineWheel2Offset]
call SlotMachine_GetWheelTiles
-SlotMachine_GetWheel1Tiles: ; 376c0 (d:76c0)
+SlotMachine_GetWheel1Tiles:
ld de, wSlotMachineWheel1BottomTile
ld hl, SlotMachineWheel1
ld a, [wSlotMachineWheel1Offset]
-SlotMachine_GetWheelTiles: ; 376c9 (d:76c9)
+SlotMachine_GetWheelTiles:
ld c, a
ld b, 0
add hl, bc
@@ -561,7 +561,7 @@ SlotMachine_GetWheelTiles: ; 376c9 (d:76c9)
jr nz, .loop
ret
-SlotReward8Func: ; 376d7 (d:76d7)
+SlotReward8Func:
ld hl, wSlotMachineAllowMatchesCounter
ld a, [hl]
and a
@@ -572,7 +572,7 @@ SlotReward8Func: ; 376d7 (d:76d7)
ld de, 8
ret
-SlotReward15Func: ; 376e5 (d:76e5)
+SlotReward15Func:
ld hl, wSlotMachineAllowMatchesCounter
ld a, [hl]
and a
@@ -583,7 +583,7 @@ SlotReward15Func: ; 376e5 (d:76e5)
ld de, 15
ret
-SlotReward100Func: ; 376f3 (d:76f3)
+SlotReward100Func:
ld a, SFX_GET_KEY_ITEM
call PlaySound
xor a
@@ -592,7 +592,7 @@ SlotReward100Func: ; 376f3 (d:76f3)
ld de, 100
ret
-SlotReward300Func: ; 37702 (d:7702)
+SlotReward300Func:
ld hl, YeahText
call PrintText
ld a, SFX_GET_ITEM_2
@@ -608,11 +608,11 @@ SlotReward300Func: ; 37702 (d:7702)
ld de, 300
ret
-YeahText: ; 37722 (d:7722)
+YeahText:
TX_FAR _YeahText
db $0a, "@"
-SlotMachine_PrintWinningSymbol: ; 37728 (d:7728)
+SlotMachine_PrintWinningSymbol:
; prints winning symbol and down arrow in text box
coord hl, 2, 14
ld a, [wSlotMachineWinningSymbol]
@@ -630,7 +630,7 @@ SlotMachine_PrintWinningSymbol: ; 37728 (d:7728)
ld [hl], $ee ; down arrow
ret
-SlotMachine_SubtractBetFromPlayerCoins: ; 37741 (d:7741)
+SlotMachine_SubtractBetFromPlayerCoins:
ld hl, wTempCoins2 + 1
ld a, [wSlotMachineBet]
ld [hld], a
@@ -640,19 +640,19 @@ SlotMachine_SubtractBetFromPlayerCoins: ; 37741 (d:7741)
ld c, $2
predef SubBCDPredef
-SlotMachine_PrintCreditCoins: ; 37754 (d:7754)
+SlotMachine_PrintCreditCoins:
coord hl, 5, 1
ld de, wPlayerCoins
ld c, $2
jp PrintBCDNumber
-SlotMachine_PrintPayoutCoins: ; 3775f (d:775f)
+SlotMachine_PrintPayoutCoins:
coord hl, 11, 1
ld de, wPayoutCoins
lb bc, LEADING_ZEROES | 2, 4 ; 2 bytes, 4 digits
jp PrintNumber
-SlotMachine_PayCoinsToPlayer: ; 3776b (d:776b)
+SlotMachine_PayCoinsToPlayer:
ld a, $1
ld [wMuteAudioAndPauseMusic], a
call WaitForSoundToFinish
@@ -709,12 +709,12 @@ SlotMachine_PayCoinsToPlayer: ; 3776b (d:776b)
call DelayFrames
jr .loop
-SlotMachine_PutOutLitBalls: ; 377ce (d:77ce)
+SlotMachine_PutOutLitBalls:
ld a, $23
ld [wNewSlotMachineBallTile], a
jr SlotMachine_UpdateThreeCoinBallTiles
-SlotMachine_LightBalls: ; 377d5 (d:77d5)
+SlotMachine_LightBalls:
ld a, $14
ld [wNewSlotMachineBallTile], a
ld a, [wSlotMachineBet]
@@ -723,22 +723,22 @@ SlotMachine_LightBalls: ; 377d5 (d:77d5)
dec a
jr z, SlotMachine_UpdateTwoCoinBallTiles
-SlotMachine_UpdateThreeCoinBallTiles: ; 377e3 (d:77e3)
+SlotMachine_UpdateThreeCoinBallTiles:
coord hl, 3, 2
call SlotMachine_UpdateBallTiles
coord hl, 3, 10
call SlotMachine_UpdateBallTiles
-SlotMachine_UpdateTwoCoinBallTiles: ; 377ef (d:77ef)
+SlotMachine_UpdateTwoCoinBallTiles:
coord hl, 3, 4
call SlotMachine_UpdateBallTiles
coord hl, 3, 8
call SlotMachine_UpdateBallTiles
-SlotMachine_UpdateOneCoinBallTiles: ; 377fb (d:77fb)
+SlotMachine_UpdateOneCoinBallTiles:
coord hl, 3, 6
-SlotMachine_UpdateBallTiles: ; 377fe (d:77fe)
+SlotMachine_UpdateBallTiles:
ld a, [wNewSlotMachineBallTile]
ld [hl], a
ld bc, 13
@@ -753,7 +753,7 @@ SlotMachine_UpdateBallTiles: ; 377fe (d:77fe)
ld [hl], a
ret
-SlotMachine_AnimWheel1: ; 37813 (d:7813)
+SlotMachine_AnimWheel1:
ld bc, SlotMachineWheel1
ld de, wSlotMachineWheel1Offset
ld hl, wOAMBuffer
@@ -761,7 +761,7 @@ SlotMachine_AnimWheel1: ; 37813 (d:7813)
ld [wBaseCoordX], a
jr SlotMachine_AnimWheel
-SlotMachine_AnimWheel2: ; 37823 (d:7823)
+SlotMachine_AnimWheel2:
ld bc, SlotMachineWheel2
ld de, wSlotMachineWheel2Offset
ld hl, wOAMBuffer + $30
@@ -769,14 +769,14 @@ SlotMachine_AnimWheel2: ; 37823 (d:7823)
ld [wBaseCoordX], a
jr SlotMachine_AnimWheel
-SlotMachine_AnimWheel3: ; 37833 (d:7833)
+SlotMachine_AnimWheel3:
ld bc, SlotMachineWheel3
ld de, wSlotMachineWheel3Offset
ld hl, wOAMBuffer + $60
ld a, $70
ld [wBaseCoordX], a
-SlotMachine_AnimWheel: ; 37841 (d:7841)
+SlotMachine_AnimWheel:
ld a, $58
ld [wBaseCoordY], a
push de
@@ -821,7 +821,7 @@ SlotMachine_AnimWheel: ; 37841 (d:7841)
ld [de], a
ret
-SlotMachine_HandleInputWhileWheelsSpin: ; 37882 (d:7882)
+SlotMachine_HandleInputWhileWheelsSpin:
call DelayFrame
call JoypadLowSensitivity
ld a, [hJoy5]
@@ -845,7 +845,7 @@ SlotMachine_HandleInputWhileWheelsSpin: ; 37882 (d:7882)
ret nz
jr .loop
-LoadSlotMachineTiles: ; 378a8 (d:78a8)
+LoadSlotMachineTiles:
call DisableLCD
ld hl, SlotMachineTiles2
ld de, vChars0
@@ -876,12 +876,12 @@ LoadSlotMachineTiles: ; 378a8 (d:78a8)
call SlotMachine_AnimWheel2
jp SlotMachine_AnimWheel3
-SlotMachineMap: ; 378f5 (d:78f5)
+SlotMachineMap:
INCBIN "gfx/tilemaps/slotmachine.map"
INCLUDE "data/slot_machine_wheels.asm"
-SlotMachineTiles1: ; 37a51 (d:7a51)
+SlotMachineTiles1:
IF DEF(_RED)
INCBIN "gfx/red/slotmachine1.2bpp"
ENDC
diff --git a/engine/status_ailments.asm b/engine/status_ailments.asm
index 9bcfe9f0..787533c4 100755
--- a/engine/status_ailments.asm
+++ b/engine/status_ailments.asm
@@ -1,4 +1,4 @@
-PrintStatusAilment: ; 747de (1d:47de)
+PrintStatusAilment:
ld a, [de]
bit PSN, a
jr nz, .psn
diff --git a/engine/titlescreen.asm b/engine/titlescreen.asm
index cbe19d6d..fb51d884 100755
--- a/engine/titlescreen.asm
+++ b/engine/titlescreen.asm
@@ -1,9 +1,9 @@
; copy text of fixed length NAME_LENGTH (like player name, rival name, mon names, ...)
-CopyFixedLengthText: ; 42b1 (1:42b1)
+CopyFixedLengthText:
ld bc, NAME_LENGTH
jp CopyData
-SetDefaultNamesBeforeTitlescreen: ; 42b7 (1:42b7)
+SetDefaultNamesBeforeTitlescreen:
ld hl, NintenText
ld de, wPlayerName
call CopyFixedLengthText
@@ -21,7 +21,7 @@ SetDefaultNamesBeforeTitlescreen: ; 42b7 (1:42b7)
ld [wAudioROMBank], a
ld [wAudioSavedROMBank], a
-DisplayTitleScreen: ; 42dd (1:42dd)
+DisplayTitleScreen:
call GBPalWhiteOut
ld a, $1
ld [H_AUTOBGTRANSFERENABLED], a
@@ -158,7 +158,7 @@ ENDC
call .ScrollTitleScreenPokemonLogo
jr .bouncePokemonLogoLoop
-.TitleScreenPokemonLogoYScrolls: ; 43db (1:43db)
+.TitleScreenPokemonLogoYScrolls:
; Controls the bouncing effect of the Pokemon logo on the title screen
db -4,16 ; y scroll amount, number of times to scroll
db 3,4
@@ -257,7 +257,7 @@ ENDC
.doClearSaveDialogue
jpba DoClearSaveDialogue
-TitleScreenPickNewMon: ; 4496 (1:4496)
+TitleScreenPickNewMon:
ld a, vBGMap0 / $100
call TitleScreenCopyTileMapToVRAM
@@ -285,14 +285,14 @@ TitleScreenPickNewMon: ; 4496 (1:4496)
callba TitleScroll
ret
-TitleScreenScrollInMon: ; 44c1 (1:44c1)
+TitleScreenScrollInMon:
ld d, 0 ; scroll in
callba TitleScroll
xor a
ld [hWY], a
ret
-ScrollTitleScreenGameVersion: ; 44cf (1:44cf)
+ScrollTitleScreenGameVersion:
.wait
ld a, [rLY]
cp l
@@ -307,7 +307,7 @@ ScrollTitleScreenGameVersion: ; 44cf (1:44cf)
jr z, .wait2
ret
-DrawPlayerCharacter: ; 44dd (1:44dd)
+DrawPlayerCharacter:
ld hl, PlayerCharacterTitleGraphics
ld de, vSprites
ld bc, PlayerCharacterTitleGraphicsEnd - PlayerCharacterTitleGraphics
@@ -344,30 +344,30 @@ DrawPlayerCharacter: ; 44dd (1:44dd)
jr nz, .loop
ret
-ClearBothBGMaps: ; 4519 (1:4519)
+ClearBothBGMaps:
ld hl, vBGMap0
ld bc, $400 * 2
ld a, " "
jp FillMemory
-LoadTitleMonSprite: ; 4524 (1:4524)
+LoadTitleMonSprite:
ld [wcf91], a
ld [wd0b5], a
coord hl, 5, 10
call GetMonHeader
jp LoadFrontSpriteByMonIndex
-TitleScreenCopyTileMapToVRAM: ; 4533 (1:4533)
+TitleScreenCopyTileMapToVRAM:
ld [H_AUTOBGTRANSFERDEST + 1], a
jp Delay3
-LoadCopyrightAndTextBoxTiles: ; 4538 (1:4538)
+LoadCopyrightAndTextBoxTiles:
xor a
ld [hWY], a
call ClearScreen
call LoadTextBoxTilePatterns
-LoadCopyrightTiles: ; 4541 (1:4541)
+LoadCopyrightTiles:
ld de, NintendoCopyrightLogoGraphics
ld hl, vChars2 + $600
lb bc, BANK(NintendoCopyrightLogoGraphics), (GamefreakLogoGraphicsEnd - NintendoCopyrightLogoGraphics) / $10
@@ -376,7 +376,7 @@ LoadCopyrightTiles: ; 4541 (1:4541)
ld de, CopyrightTextString
jp PlaceString
-CopyrightTextString: ; 4556 (1:4556)
+CopyrightTextString:
db $60,$61,$62,$61,$63,$61,$64,$7F,$65,$66,$67,$68,$69,$6A ; ©'95.'96.'98 Nintendo
next $60,$61,$62,$61,$63,$61,$64,$7F,$6B,$6C,$6D,$6E,$6F,$70,$71,$72 ; ©'95.'96.'98 Creatures inc.
next $60,$61,$62,$61,$63,$61,$64,$7F,$73,$74,$75,$76,$77,$78,$79,$7A,$7B ; ©'95.'96.'98 GAME FREAK inc.
@@ -385,13 +385,13 @@ CopyrightTextString: ; 4556 (1:4556)
INCLUDE "data/title_mons.asm"
; prints version text (red, blue)
-PrintGameVersionOnTitleScreen: ; 4598 (1:4598)
+PrintGameVersionOnTitleScreen:
coord hl, 7, 8
ld de, VersionOnTitleScreenText
jp PlaceString
; these point to special tiles specifically loaded for that purpose and are not usual text
-VersionOnTitleScreenText: ; 45a1 (1:45a1)
+VersionOnTitleScreenText:
IF DEF(_RED)
db $60,$61,$7F,$65,$66,$67,$68,$69,"@" ; "Red Version"
ENDC
diff --git a/engine/titlescreen2.asm b/engine/titlescreen2.asm
index c0853a0d..2ed77dec 100755
--- a/engine/titlescreen2.asm
+++ b/engine/titlescreen2.asm
@@ -1,22 +1,22 @@
-TitleScroll_WaitBall: ; 37244 (d:7244)
+TitleScroll_WaitBall:
; Wait around for the TitleBall animation to play out.
; hi: speed
; lo: duration
db $05, $05, 0
-TitleScroll_In: ; 37247 (d:7247)
+TitleScroll_In:
; Scroll a TitleMon in from the right.
; hi: speed
; lo: duration
db $a2, $94, $84, $63, $52, $31, $11, 0
-TitleScroll_Out: ; 3724f (d:724f)
+TitleScroll_Out:
; Scroll a TitleMon out to the left.
; hi: speed
; lo: duration
db $12, $22, $32, $42, $52, $62, $83, $93, 0
-TitleScroll: ; 37258 (d:7258)
+TitleScroll:
ld a, d
ld bc, TitleScroll_In
@@ -31,7 +31,7 @@ TitleScroll: ; 37258 (d:7258)
ld e, 0 ; don't animate titleball
.ok
-_TitleScroll: ; 3726a (d:726a)
+_TitleScroll:
ld a, [bc]
and a
ret z
@@ -82,12 +82,12 @@ _TitleScroll: ; 3726a (d:726a)
jr z, .wait2
ret
-TitleBallYTable: ; 372a0 (d:72a0)
+TitleBallYTable:
; OBJ y-positions for the Poke Ball held by Red in the title screen.
; This is really two 0-terminated lists. Initiated with an index of 1.
db 0, $71, $6f, $6e, $6d, $6c, $6d, $6e, $6f, $71, $74, 0
-TitleScreenAnimateBallIfStarterOut: ; 372ac (d:72ac)
+TitleScreenAnimateBallIfStarterOut:
; Animate the TitleBall if a starter just got scrolled out.
ld a, [wTitleMonSpecies]
cp STARTER1
@@ -102,7 +102,7 @@ TitleScreenAnimateBallIfStarterOut: ; 372ac (d:72ac)
ld d, 0
jp _TitleScroll
-GetTitleBallY: ; 372c4 (d:72c4)
+GetTitleBallY:
; Get position e from TitleBallYTable
push de
push hl
diff --git a/engine/town_map.asm b/engine/town_map.asm
index 727197de..b2f1e656 100755
--- a/engine/town_map.asm
+++ b/engine/town_map.asm
@@ -1,4 +1,4 @@
-DisplayTownMap: ; 70e3e (1c:4e3e)
+DisplayTownMap:
call LoadTownMap
ld hl, wUpdateSpritesEnabled
ld a, [hl]
@@ -105,11 +105,11 @@ DisplayTownMap: ; 70e3e (1c:4e3e)
INCLUDE "data/town_map_order.asm"
-TownMapCursor: ; 70f40 (1c:4f40)
+TownMapCursor:
INCBIN "gfx/town_map_cursor.1bpp"
TownMapCursorEnd:
-LoadTownMap_Nest: ; 70f60 (1c:4f60)
+LoadTownMap_Nest:
call LoadTownMap
ld hl, wUpdateSpritesEnabled
ld a, [hl]
@@ -131,10 +131,10 @@ LoadTownMap_Nest: ; 70f60 (1c:4f60)
ld [hl], a
ret
-MonsNestText: ; 70f89 (1c:4f89)
+MonsNestText:
db "'s NEST@"
-LoadTownMap_Fly: ; 70f90 (1c:4f90)
+LoadTownMap_Fly:
call ClearSprites
call LoadTownMap
call LoadPlayerSpriteGraphics
@@ -243,10 +243,10 @@ LoadTownMap_Fly: ; 70f90 (1c:4f90)
ld hl, wFlyLocationsList + 11
jr .pressedDown
-ToText: ; 7106d (1c:506d)
+ToText:
db "To@"
-BuildFlyLocationsList: ; 71070 (1c:5070)
+BuildFlyLocationsList:
ld hl, wFlyLocationsList - 1
ld [hl], $ff
inc hl
@@ -270,11 +270,11 @@ BuildFlyLocationsList: ; 71070 (1c:5070)
ld [hl], $ff
ret
-TownMapUpArrow: ; 71093 (1c:5093)
+TownMapUpArrow:
INCBIN "gfx/up_arrow.1bpp"
TownMapUpArrowEnd:
-LoadTownMap: ; 7109b (1c:509b)
+LoadTownMap:
call GBPalWhiteOutWithDelay3
call ClearScreen
call UpdateSprites
@@ -324,11 +324,11 @@ LoadTownMap: ; 7109b (1c:509b)
ld [wTownMapSpriteBlinkingEnabled], a
ret
-CompressedMap: ; 71100 (1c:5100)
+CompressedMap:
; you can decompress this file with the redrle program in the extras/ dir
INCBIN "gfx/town_map.rle"
-ExitTownMap: ; 711ab (1c:51ab)
+ExitTownMap:
; clear town map graphics data and load usual graphics data
xor a
ld [wTownMapSpriteBlinkingEnabled], a
@@ -340,7 +340,7 @@ ExitTownMap: ; 711ab (1c:51ab)
call UpdateSprites
jp RunDefaultPaletteCommand
-DrawPlayerOrBirdSprite: ; 711c4 (1c:51c4)
+DrawPlayerOrBirdSprite:
; a = map number
; b = OAM base tile
push af
@@ -366,7 +366,7 @@ DrawPlayerOrBirdSprite: ; 711c4 (1c:51c4)
ld bc, $a0
jp CopyData
-DisplayWildLocations: ; 711ef (1c:51ef)
+DisplayWildLocations:
callba FindWildLocationsOfMon
call ZeroOutDuplicatesInList
ld hl, wOAMBuffer
@@ -414,10 +414,10 @@ DisplayWildLocations: ; 711ef (1c:51ef)
ld bc, $a0
jp CopyData
-AreaUnknownText: ; 7124a (1c:524a)
+AreaUnknownText:
db " AREA UNKNOWN@"
-TownMapCoordsToOAMCoords: ; 71258 (1c:5258)
+TownMapCoordsToOAMCoords:
; in: lower nybble of a = x, upper nybble of a = y
; out: b and [hl] = (y * 8) + 24, c and [hl+1] = (x * 8) + 24
push af
@@ -435,14 +435,14 @@ TownMapCoordsToOAMCoords: ; 71258 (1c:5258)
ld [hli], a
ret
-WritePlayerOrBirdSpriteOAM: ; 7126d (1c:526d)
+WritePlayerOrBirdSpriteOAM:
ld a, [wOAMBaseTile]
and a
ld hl, wOAMBuffer + $90 ; for player sprite
jr z, WriteTownMapSpriteOAM
ld hl, wOAMBuffer + $80 ; for bird sprite
-WriteTownMapSpriteOAM: ; 71279 (1c:5279)
+WriteTownMapSpriteOAM:
push hl
; Subtract 4 from c (X coord) and 4 from b (Y coord). However, the carry from c
@@ -454,7 +454,7 @@ WriteTownMapSpriteOAM: ; 71279 (1c:5279)
ld c, l
pop hl
-WriteAsymmetricMonPartySpriteOAM: ; 71281 (1c:5281)
+WriteAsymmetricMonPartySpriteOAM:
; Writes 4 OAM blocks for a helix mon party sprite, since it does not have
; a vertical line of symmetry.
lb de, 2, 2
@@ -487,7 +487,7 @@ WriteAsymmetricMonPartySpriteOAM: ; 71281 (1c:5281)
jr nz, .loop
ret
-WriteSymmetricMonPartySpriteOAM: ; 712a6 (1c:52a6)
+WriteSymmetricMonPartySpriteOAM:
; Writes 4 OAM blocks for a mon party sprite other than a helix. All the
; sprites other than the helix one have a vertical line of symmetry which allows
; the X-flip OAM bit to be used so that only 2 rather than 4 tile patterns are
@@ -529,7 +529,7 @@ WriteSymmetricMonPartySpriteOAM: ; 712a6 (1c:52a6)
jr nz, .loop
ret
-ZeroOutDuplicatesInList: ; 712d9 (1c:52d9)
+ZeroOutDuplicatesInList:
; replace duplicate bytes in the list of wild pokemon locations with 0
ld de, wBuffer
.loop
@@ -552,7 +552,7 @@ ZeroOutDuplicatesInList: ; 712d9 (1c:52d9)
inc hl
jr .zeroDuplicatesLoop
-LoadTownMapEntry: ; 712f1 (1c:52f1)
+LoadTownMapEntry:
; in: a = map number
; out: lower nybble of [de] = x, upper nybble of [de] = y, hl = address of name
cp REDS_HOUSE_1F
@@ -586,11 +586,11 @@ INCLUDE "data/town_map_entries.asm"
INCLUDE "text/map_names.asm"
-MonNestIcon: ; 716be (1c:56be)
+MonNestIcon:
INCBIN "gfx/mon_nest_icon.1bpp"
MonNestIconEnd:
-TownMapSpriteBlinkingAnimation: ; 716c6 (1c:56c6)
+TownMapSpriteBlinkingAnimation:
ld a, [wAnimCounter]
inc a
cp 25
diff --git a/engine/trade.asm b/engine/trade.asm
index 1642e729..78444cf6 100755
--- a/engine/trade.asm
+++ b/engine/trade.asm
@@ -1,4 +1,4 @@
-InternalClockTradeAnim: ; 410e2 (10:50e2)
+InternalClockTradeAnim:
; Do the trading animation with the player's gameboy on the left.
; In-game trades and internally clocked link cable trades use this.
ld a, [wTradedPlayerMonSpecies]
@@ -8,7 +8,7 @@ InternalClockTradeAnim: ; 410e2 (10:50e2)
ld de, InternalClockTradeFuncSequence
jr TradeAnimCommon
-ExternalClockTradeAnim: ; 410f3 (10:50f3)
+ExternalClockTradeAnim:
; Do the trading animation with the player's gameboy on the right.
; Externally clocked link cable trades use this.
ld a, [wTradedEnemyMonSpecies]
@@ -17,7 +17,7 @@ ExternalClockTradeAnim: ; 410f3 (10:50f3)
ld [wRightGBMonSpecies], a
ld de, ExternalClockTradeFuncSequence
-TradeAnimCommon: ; 41102 (10:5102)
+TradeAnimCommon:
ld a, [wOptions]
push af
ld a, [hSCY]
@@ -69,7 +69,7 @@ tradefunc: MACRO
; They are from opposite perspectives. The external clock one makes use of
; Trade_SwapNames to swap the player and enemy names for some functions.
-InternalClockTradeFuncSequence: ; 41138 (10:5138)
+InternalClockTradeFuncSequence:
tradefunc LoadTradingGFXAndMonNames
tradefunc Trade_ShowPlayerMon
tradefunc Trade_DrawOpenEndOfLinkCable
@@ -88,7 +88,7 @@ InternalClockTradeFuncSequence: ; 41138 (10:5138)
tradefunc Trade_Cleanup
db $FF
-ExternalClockTradeFuncSequence: ; 41149 (10:5149)
+ExternalClockTradeFuncSequence:
tradefunc LoadTradingGFXAndMonNames
tradefunc Trade_ShowClearedWindow
tradefunc PrintTradeWillTradeText
@@ -112,7 +112,7 @@ ExternalClockTradeFuncSequence: ; 41149 (10:5149)
tradefunc Trade_Cleanup
db $FF
-TradeFuncPointerTable: ; 4115f (10:515f)
+TradeFuncPointerTable:
addtradefunc LoadTradingGFXAndMonNames
addtradefunc Trade_ShowPlayerMon
addtradefunc Trade_DrawOpenEndOfLinkCable
@@ -131,11 +131,11 @@ TradeFuncPointerTable: ; 4115f (10:515f)
addtradefunc Trade_SlideTextBoxOffScreen
addtradefunc Trade_SwapNames
-Trade_Delay100: ; 41181 (10:5181)
+Trade_Delay100:
ld c, 100
jp DelayFrames
-Trade_CopyTileMapToVRAM: ; 41186 (10:5186)
+Trade_CopyTileMapToVRAM:
ld a, $1
ld [H_AUTOBGTRANSFERENABLED], a
call Delay3
@@ -143,17 +143,17 @@ Trade_CopyTileMapToVRAM: ; 41186 (10:5186)
ld [H_AUTOBGTRANSFERENABLED], a
ret
-Trade_Delay80: ; 41191 (10:5191)
+Trade_Delay80:
ld c, 80
jp DelayFrames
-Trade_ClearTileMap: ; 41196 (10:5196)
+Trade_ClearTileMap:
coord hl, 0, 0
ld bc, SCREEN_WIDTH * SCREEN_HEIGHT
ld a, " "
jp FillMemory
-LoadTradingGFXAndMonNames: ; 411a1 (10:51a1)
+LoadTradingGFXAndMonNames:
call Trade_ClearTileMap
call DisableLCD
ld hl, TradingAnimationGraphics
@@ -196,12 +196,12 @@ LoadTradingGFXAndMonNames: ; 411a1 (10:51a1)
ld [wd11e], a
jp GetMonName
-Trade_LoadMonPartySpriteGfx: ; 4120b (10:520b)
+Trade_LoadMonPartySpriteGfx:
ld a, %11010000
ld [rOBP1], a
jpba LoadMonPartySpriteGfx
-Trade_SwapNames: ; 41217 (10:5217)
+Trade_SwapNames:
ld hl, wPlayerName
ld de, wBuffer
ld bc, NAME_LENGTH
@@ -215,14 +215,14 @@ Trade_SwapNames: ; 41217 (10:5217)
ld bc, NAME_LENGTH
jp CopyData
-Trade_Cleanup: ; 4123b (10:523b)
+Trade_Cleanup:
xor a
call LoadGBPal
ld hl, wd730
res 6, [hl] ; turn off instant text printing
ret
-Trade_ShowPlayerMon: ; 41245 (10:5245)
+Trade_ShowPlayerMon:
ld a, %10101011
ld [rLCDC], a
ld a, $50
@@ -264,7 +264,7 @@ Trade_ShowPlayerMon: ; 41245 (10:5245)
ld [H_AUTOBGTRANSFERENABLED], a
ret
-Trade_DrawOpenEndOfLinkCable: ; 41298 (10:5298)
+Trade_DrawOpenEndOfLinkCable:
call Trade_ClearTileMap
ld b, vBGMap0 / $100
call CopyScreenTileBufferToVRAM
@@ -296,7 +296,7 @@ Trade_DrawOpenEndOfLinkCable: ; 41298 (10:5298)
jr nz, .loop
ret
-Trade_AnimateBallEnteringLinkCable: ; 412d2 (10:52d2)
+Trade_AnimateBallEnteringLinkCable:
ld a, TRADE_BALL_SHAKE_ANIM
call Trade_ShowAnimation
ld c, 10
@@ -345,11 +345,11 @@ Trade_AnimateBallEnteringLinkCable: ; 412d2 (10:52d2)
ld [H_AUTOBGTRANSFERENABLED], a
ret
-Trade_BallInsideLinkCableOAM: ; 4132e (10:532e)
+Trade_BallInsideLinkCableOAM:
db $7E,$00,$7E,$20
db $7E,$40,$7E,$60
-Trade_ShowEnemyMon: ; 41336 (10:5336)
+Trade_ShowEnemyMon:
ld a, TRADE_BALL_TILT_ANIM
call Trade_ShowAnimation
call Trade_ShowClearedWindow
@@ -375,7 +375,7 @@ Trade_ShowEnemyMon: ; 41336 (10:5336)
call ClearScreenArea
jp PrintTradeTakeCareText
-Trade_AnimLeftToRight: ; 41376 (10:5376)
+Trade_AnimLeftToRight:
; Animates the mon moving from the left GB to the right one.
call Trade_InitGameboyTransferGfx
ld a, $1
@@ -409,7 +409,7 @@ Trade_AnimLeftToRight: ; 41376 (10:5376)
call Trade_AnimMonMoveVertical
jp ClearSprites
-Trade_AnimRightToLeft: ; 413c6 (10:53c6)
+Trade_AnimRightToLeft:
; Animates the mon moving from the right GB to the left one.
call Trade_InitGameboyTransferGfx
xor a
@@ -441,7 +441,7 @@ Trade_AnimRightToLeft: ; 413c6 (10:53c6)
ld [H_AUTOBGTRANSFERENABLED], a
jp ClearSprites
-Trade_InitGameboyTransferGfx: ; 41411 (10:5411)
+Trade_InitGameboyTransferGfx:
; Initialises the graphics for showing a mon moving between gameboys.
ld a, $1
ld [H_AUTOBGTRANSFERENABLED], a
@@ -458,7 +458,7 @@ Trade_InitGameboyTransferGfx: ; 41411 (10:5411)
ld [hWY], a
ret
-Trade_DrawLeftGameboy: ; 4142d (10:542d)
+Trade_DrawLeftGameboy:
call Trade_ClearTileMap
; draw link cable
@@ -488,7 +488,7 @@ Trade_DrawLeftGameboy: ; 4142d (10:542d)
jp DelayFrame
-Trade_DrawRightGameboy: ; 4145c (10:545c)
+Trade_DrawRightGameboy:
call Trade_ClearTileMap
; draw horizontal segment of link cable
@@ -535,7 +535,7 @@ Trade_DrawRightGameboy: ; 4145c (10:545c)
jp DelayFrame
-Trade_DrawCableAcrossScreen: ; 4149f (10:549f)
+Trade_DrawCableAcrossScreen:
; Draws the link cable across the screen.
call Trade_ClearTileMap
coord hl, 0, 4
@@ -547,7 +547,7 @@ Trade_DrawCableAcrossScreen: ; 4149f (10:549f)
jr nz, .loop
ret
-Trade_CopyCableTilesOffScreen: ; 414ae (10:54ae)
+Trade_CopyCableTilesOffScreen:
; This is used to copy the link cable tiles off screen so that the cable
; continues when the screen is scrolled.
push hl
@@ -563,7 +563,7 @@ Trade_CopyCableTilesOffScreen: ; 414ae (10:54ae)
ld c, 10
jp DelayFrames
-Trade_AnimMonMoveHorizontal: ; 414c5 (10:54c5)
+Trade_AnimMonMoveHorizontal:
; Animates the mon going through the link cable horizontally over a distance of
; b 16-pixel units.
ld a, [wTradedMonMovingRight]
@@ -590,7 +590,7 @@ Trade_AnimMonMoveHorizontal: ; 414c5 (10:54c5)
jr nz, Trade_AnimMonMoveHorizontal
ret
-Trade_AnimCircledMon: ; 414e8 (10:54e8)
+Trade_AnimCircledMon:
; Cycles between the two animation frames of the mon party sprite, cycles
; between a circle and an oval around the mon sprite, and makes the cable flash.
push de
@@ -614,11 +614,11 @@ Trade_AnimCircledMon: ; 414e8 (10:54e8)
pop de
ret
-Trade_WriteCircledMonOAM: ; 41505 (10:5505)
+Trade_WriteCircledMonOAM:
callba WriteMonPartySpriteOAMBySpecies
call Trade_WriteCircleOAM
-Trade_AddOffsetsToOAMCoords: ; 41510 (10:5510)
+Trade_AddOffsetsToOAMCoords:
ld hl, wOAMBuffer
ld c, $14
.loop
@@ -634,7 +634,7 @@ Trade_AddOffsetsToOAMCoords: ; 41510 (10:5510)
jr nz, .loop
ret
-Trade_AnimMonMoveVertical: ; 41525 (10:5525)
+Trade_AnimMonMoveVertical:
; Animates the mon going through the link cable vertically as well as
; horizontally for a bit. The last bit of horizontal movement (when moving
; right) or the first bit of horizontal movement (when moving left) are done
@@ -670,7 +670,7 @@ Trade_AnimMonMoveVertical: ; 41525 (10:5525)
jr nz, .loop
ret
-Trade_WriteCircleOAM: ; 41558 (10:5558)
+Trade_WriteCircleOAM:
; Writes the OAM blocks for the circle around the traded mon as it passes
; the link cable.
ld hl, Trade_CircleOAMPointers
@@ -697,7 +697,7 @@ Trade_WriteCircleOAM: ; 41558 (10:5558)
jr nz, .loop
ret
-Trade_CircleOAMPointers: ; 41574 (10:5574)
+Trade_CircleOAMPointers:
dw Trade_CircleOAM0
db $08,$08
dw Trade_CircleOAM1
@@ -707,24 +707,24 @@ Trade_CircleOAMPointers: ; 41574 (10:5574)
dw Trade_CircleOAM3
db $18,$18
-Trade_CircleOAM0: ; 41584 (10:5584)
+Trade_CircleOAM0:
db $38,$10,$39,$10
db $3A,$10,$3B,$10
-Trade_CircleOAM1: ; 4158c (10:558c)
+Trade_CircleOAM1:
db $39,$30,$38,$30
db $3B,$30,$3A,$30
-Trade_CircleOAM2: ; 41594 (10:5594)
+Trade_CircleOAM2:
db $3A,$50,$3B,$50
db $38,$50,$39,$50
-Trade_CircleOAM3: ; 4159c (10:559c)
+Trade_CircleOAM3:
db $3B,$70,$3A,$70
db $39,$70,$38,$70
; a = species
-Trade_LoadMonSprite: ; 415a4 (10:55a4)
+Trade_LoadMonSprite:
ld [wcf91], a
ld [wd0b5], a
ld [wWholeScreenPaletteMonSpecies], a
@@ -740,7 +740,7 @@ Trade_LoadMonSprite: ; 415a4 (10:55a4)
ld c, 10
jp DelayFrames
-Trade_ShowClearedWindow: ; 415c8 (10:55c8)
+Trade_ShowClearedWindow:
; clears the window and covers the BG entirely with the window
ld a, $1
ld [H_AUTOBGTRANSFERENABLED], a
@@ -755,7 +755,7 @@ Trade_ShowClearedWindow: ; 415c8 (10:55c8)
ld [hSCX], a
ret
-Trade_SlideTextBoxOffScreen: ; 415df (10:55df)
+Trade_SlideTextBoxOffScreen:
; Slides the window right until it's off screen. The window usually just has
; a text box at the bottom when this is called. However, when this is called
; after Trade_ShowEnemyMon in the external clock sequence, there is a mon pic
@@ -777,18 +777,18 @@ Trade_SlideTextBoxOffScreen: ; 415df (10:55df)
ld [rWX], a
ret
-PrintTradeWentToText: ; 415fe (10:55fe)
+PrintTradeWentToText:
ld hl, TradeWentToText
call PrintText
ld c, 200
call DelayFrames
jp Trade_SlideTextBoxOffScreen
-TradeWentToText: ; 4160c (10:560c)
+TradeWentToText:
TX_FAR _TradeWentToText
db "@"
-PrintTradeForSendsText: ; 41611 (10:5611)
+PrintTradeForSendsText:
ld hl, TradeForText
call PrintText
call Trade_Delay80
@@ -796,15 +796,15 @@ PrintTradeForSendsText: ; 41611 (10:5611)
call PrintText
jp Trade_Delay80
-TradeForText: ; 41623 (10:5623)
+TradeForText:
TX_FAR _TradeForText
db "@"
-TradeSendsText: ; 41628 (10:5628)
+TradeSendsText:
TX_FAR _TradeSendsText
db "@"
-PrintTradeFarewellText: ; 4162d (10:562d)
+PrintTradeFarewellText:
ld hl, TradeWavesFarewellText
call PrintText
call Trade_Delay80
@@ -813,24 +813,24 @@ PrintTradeFarewellText: ; 4162d (10:562d)
call Trade_Delay80
jp Trade_SlideTextBoxOffScreen
-TradeWavesFarewellText: ; 41642 (10:5642)
+TradeWavesFarewellText:
TX_FAR _TradeWavesFarewellText
db "@"
-TradeTransferredText: ; 41647 (10:5647)
+TradeTransferredText:
TX_FAR _TradeTransferredText
db "@"
-PrintTradeTakeCareText: ; 4164c (10:564c)
+PrintTradeTakeCareText:
ld hl, TradeTakeCareText
call PrintText
jp Trade_Delay80
-TradeTakeCareText: ; 41655 (10:5655)
+TradeTakeCareText:
TX_FAR _TradeTakeCareText
db "@"
-PrintTradeWillTradeText: ; 4165a (10:565a)
+PrintTradeWillTradeText:
ld hl, TradeWillTradeText
call PrintText
call Trade_Delay80
@@ -838,15 +838,15 @@ PrintTradeWillTradeText: ; 4165a (10:565a)
call PrintText
jp Trade_Delay80
-TradeWillTradeText: ; 4166c (10:566c)
+TradeWillTradeText:
TX_FAR _TradeWillTradeText
db "@"
-TradeforText: ; 41671 (10:5671)
+TradeforText:
TX_FAR _TradeforText
db "@"
-Trade_ShowAnimation: ; 41676 (10:5676)
+Trade_ShowAnimation:
ld [wAnimationID], a
xor a
ld [wAnimationType], a
diff --git a/engine/trade2.asm b/engine/trade2.asm
index 10bef792..16d07b17 100755
--- a/engine/trade2.asm
+++ b/engine/trade2.asm
@@ -1,4 +1,4 @@
-Trade_PrintPlayerMonInfoText: ; 42769 (10:6769)
+Trade_PrintPlayerMonInfoText:
coord hl, 5, 0
ld de,Trade_MonInfoText
call PlaceString
@@ -20,7 +20,7 @@ Trade_PrintPlayerMonInfoText: ; 42769 (10:6769)
lb bc, LEADING_ZEROES | 2, 5
jp PrintNumber
-Trade_PrintEnemyMonInfoText: ; 427a7 (10:67a7)
+Trade_PrintEnemyMonInfoText:
coord hl, 5, 10
ld de,Trade_MonInfoText
call PlaceString
@@ -42,7 +42,7 @@ Trade_PrintEnemyMonInfoText: ; 427a7 (10:67a7)
lb bc, LEADING_ZEROES | 2, 5
jp PrintNumber
-Trade_MonInfoText: ; 427e5 (10:67e5)
+Trade_MonInfoText:
db "──",$74,$F2,$4E
db $4E
db "OT/",$4E
diff --git a/engine/turn_sprite.asm b/engine/turn_sprite.asm
index 84037cfe..e8a47a8f 100755
--- a/engine/turn_sprite.asm
+++ b/engine/turn_sprite.asm
@@ -1,4 +1,4 @@
-UpdateSpriteFacingOffsetAndDelayMovement: ; 13074 (4:7074)
+UpdateSpriteFacingOffsetAndDelayMovement:
ld h, $c2
ld a, [H_CURRENTSPRITEOFFSET]
add $8