remove address comments

This commit is contained in:
YamaArashi 2016-06-11 17:24:04 -07:00
parent cee4d559f9
commit 7f34e28f24
764 changed files with 8371 additions and 8371 deletions

View file

@ -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,"@"

File diff suppressed because it is too large Load diff

View file

@ -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

View file

@ -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

View file

@ -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 "@"

File diff suppressed because it is too large Load diff

View file

@ -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

View file

@ -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 "@"

View file

@ -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:

View file

@ -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 "@"

View file

@ -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 "@"

View file

@ -1,4 +1,4 @@
GetTrainerName_: ; 13a58 (4:7a58)
GetTrainerName_:
ld hl, wGrassRate
ld a, [wLinkState]
and a

View file

@ -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

View file

@ -1,4 +1,4 @@
InitBattleVariables: ; 525af (14:65af)
InitBattleVariables:
ld a, [hTilesetType]
ld [wSavedTilesetType], a
xor a

View file

@ -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

View file

@ -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

View file

@ -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 "@"

View file

@ -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 "@"

View file

@ -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 "@"

View file

@ -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 "@"

View file

@ -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 "@"

View file

@ -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 "@"

View file

@ -1,4 +1,4 @@
OneHitKOEffect_: ; 33f57 (c:7f57)
OneHitKOEffect_:
ld hl, wDamage
xor a
ld [hli], a

View file

@ -1,4 +1,4 @@
ParalyzeEffect_: ; 52601 (14:6601)
ParalyzeEffect_:
ld hl, wEnemyMonStatus
ld de, wPlayerMoveType
ld a, [H_WHOSETURN]

View file

@ -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 "@"

View file

@ -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 "@"

View file

@ -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

View file

@ -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 "@"

View file

@ -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 "@"

View file

@ -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

View file

@ -1,4 +1,4 @@
ReadTrainer: ; 39c53 (e:5c53)
ReadTrainer:
; don't change any moves in a link battle
ld a,[wLinkState]

View file

@ -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 "@"

View file

@ -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♀@"

View file

@ -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

View file

@ -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

View file

@ -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 "@"

View file

@ -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

View file

@ -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]

View file

@ -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

View file

@ -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

View file

@ -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 "@"

View file

@ -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

View file

@ -1,4 +1,4 @@
EvolveTradeMon: ; 17d7d (5:7d7d)
EvolveTradeMon:
; Verify the TradeMon's species name before
; attempting to initiate a trade evolution.

View file

@ -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"

View file

@ -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

View file

@ -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 "@"

View file

@ -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 "@"

View file

@ -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:

View file

@ -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 "@"

View file

@ -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

View file

@ -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 "@"

View file

@ -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

View file

@ -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 dont 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

View file

@ -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 "@"

View file

@ -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 "@"

View file

@ -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

View file

@ -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 "@"

View file

@ -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"

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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 "@"

View file

@ -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

View file

@ -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 "@"

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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 "@"

View file

@ -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.

View file

@ -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?@"

View file

@ -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 "@"

View file

@ -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

View file

@ -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

View file

@ -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 "@"

View file

@ -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

View file

@ -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

View file

@ -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?

View file

@ -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?

View file

@ -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

View file

@ -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

View file

@ -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"

View file

@ -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

View file

@ -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

View file

@ -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 "@"

View file

@ -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

View file

@ -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]

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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.

View file

@ -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"

View file

@ -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

View file

@ -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]

View file

@ -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

View file

@ -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]

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

Some files were not shown because too many files have changed in this diff Show more