mirror of
https://github.com/thornAvery/kep-hack.git
synced 2026-02-06 15:45:24 +13:00
remove address comments
This commit is contained in:
parent
cee4d559f9
commit
7f34e28f24
764 changed files with 8371 additions and 8371 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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]
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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]
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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]
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -45,27 +45,27 @@ OaksAideScript: ; 0x59035
|
|||
ld [hOaksAideResult], a
|
||||
ret
|
||||
|
||||
OaksAideHiText: ; 59091 (16:5091)
|
||||
OaksAideHiText:
|
||||
TX_FAR _OaksAideHiText
|
||||
db "@"
|
||||
|
||||
OaksAideUhOhText: ; 59096 (16:5096)
|
||||
OaksAideUhOhText:
|
||||
TX_FAR _OaksAideUhOhText
|
||||
db "@"
|
||||
|
||||
OaksAideComeBackText: ; 5909b (16:509b)
|
||||
OaksAideComeBackText:
|
||||
TX_FAR _OaksAideComeBackText
|
||||
db "@"
|
||||
|
||||
OaksAideHereYouGoText: ; 590a0 (16:50a0)
|
||||
OaksAideHereYouGoText:
|
||||
TX_FAR _OaksAideHereYouGoText
|
||||
db "@"
|
||||
|
||||
OaksAideGotItemText: ; 590a5 (16:50a5)
|
||||
OaksAideGotItemText:
|
||||
TX_FAR _OaksAideGotItemText
|
||||
db $0b
|
||||
db "@"
|
||||
|
||||
OaksAideNoRoomText: ; 590ab (16:50ab)
|
||||
OaksAideNoRoomText:
|
||||
TX_FAR _OaksAideNoRoomText
|
||||
db "@"
|
||||
|
|
|
|||
|
|
@ -166,7 +166,7 @@ PrepareOAMData:
|
|||
add hl, de
|
||||
jr .clear
|
||||
|
||||
GetSpriteScreenXY: ; 4bd1 (1:4bd1)
|
||||
GetSpriteScreenXY:
|
||||
inc e
|
||||
inc e
|
||||
ld a, [de] ; c1x4
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
PewterGuys: ; 37ca1 (d:7ca1)
|
||||
PewterGuys:
|
||||
ld hl, wSimulatedJoypadStatesEnd
|
||||
ld a, [wSimulatedJoypadStatesIndex]
|
||||
dec a ; this decrement causes it to overwrite the last byte before $FF in the list
|
||||
|
|
@ -48,14 +48,14 @@ PewterGuys: ; 37ca1 (d:7ca1)
|
|||
inc hl
|
||||
jr .findMatchingCoordsLoop
|
||||
|
||||
PointerTable_37ce6: ; 37ce6 (d:7ce6)
|
||||
PointerTable_37ce6:
|
||||
dw PewterMuseumGuyCoords
|
||||
dw PewterGymGuyCoords
|
||||
|
||||
; these are the four coordinates of the spaces below, above, to the left and
|
||||
; to the right of the museum guy, and pointers to different movements for
|
||||
; the player to make to get positioned before the main movement.
|
||||
PewterMuseumGuyCoords: ; 37cea (d:7cea)
|
||||
PewterMuseumGuyCoords:
|
||||
db 18, 27
|
||||
dw .down
|
||||
db 16, 27
|
||||
|
|
@ -78,7 +78,7 @@ PewterMuseumGuyCoords: ; 37cea (d:7cea)
|
|||
; different movements for the player to make to get positioned before the
|
||||
; main movement
|
||||
; $00 is a pause
|
||||
PewterGymGuyCoords: ; 37d06 (d:7d06)
|
||||
PewterGymGuyCoords:
|
||||
db 16, 34
|
||||
dw .one
|
||||
db 17, 35
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
EnterMapAnim: ; 70510 (1c:4510)
|
||||
EnterMapAnim:
|
||||
call InitFacingDirectionList
|
||||
ld a, $ec
|
||||
ld [wSpriteStateData1 + 4], a ; player's sprite Y screen position
|
||||
|
|
@ -63,7 +63,7 @@ EnterMapAnim: ; 70510 (1c:4510)
|
|||
call LoadPlayerSpriteGraphics
|
||||
jr .restoreDefaultMusic
|
||||
|
||||
FlyAnimationEnterScreenCoords: ; 70592 (1c:4592)
|
||||
FlyAnimationEnterScreenCoords:
|
||||
; y, x pairs
|
||||
; This is the sequence of screen coordinates used by the overworld
|
||||
; Fly animation when the player is entering a map.
|
||||
|
|
@ -80,7 +80,7 @@ FlyAnimationEnterScreenCoords: ; 70592 (1c:4592)
|
|||
db $3C, $48
|
||||
db $3C, $40
|
||||
|
||||
PlayerSpinWhileMovingDown: ; 705aa (1c:45aa)
|
||||
PlayerSpinWhileMovingDown:
|
||||
ld hl, wPlayerSpinWhileMovingUpOrDownAnimDeltaY
|
||||
ld a, $10
|
||||
ld [hli], a ; wPlayerSpinWhileMovingUpOrDownAnimDeltaY
|
||||
|
|
@ -90,7 +90,7 @@ PlayerSpinWhileMovingDown: ; 705aa (1c:45aa)
|
|||
ld [hl], a ; wPlayerSpinWhileMovingUpOrDownAnimFrameDelay
|
||||
jp PlayerSpinWhileMovingUpOrDown
|
||||
|
||||
_LeaveMapAnim: ; 705ba (1c:45ba)
|
||||
_LeaveMapAnim:
|
||||
call InitFacingDirectionList
|
||||
call IsPlayerStandingOnWarpPadOrHole
|
||||
ld a, b
|
||||
|
|
@ -167,7 +167,7 @@ _LeaveMapAnim: ; 705ba (1c:45ba)
|
|||
call GBFadeOutToWhite
|
||||
jp RestoreFacingDirectionAndYScreenPos
|
||||
|
||||
FlyAnimationScreenCoords1: ; 7064f (1c:464f)
|
||||
FlyAnimationScreenCoords1:
|
||||
; y, x pairs
|
||||
; This is the sequence of screen coordinates used by the first part
|
||||
; of the Fly overworld animation.
|
||||
|
|
@ -184,7 +184,7 @@ FlyAnimationScreenCoords1: ; 7064f (1c:464f)
|
|||
db $2A, $98
|
||||
db $27, $A0
|
||||
|
||||
FlyAnimationScreenCoords2: ; 70667 (1c:4667)
|
||||
FlyAnimationScreenCoords2:
|
||||
; y, x pairs
|
||||
; This is the sequence of screen coordinates used by the second part
|
||||
; of the Fly overworld animation.
|
||||
|
|
@ -201,7 +201,7 @@ FlyAnimationScreenCoords2: ; 70667 (1c:4667)
|
|||
|
||||
db $F0, $00
|
||||
|
||||
LeaveMapThroughHoleAnim: ; 7067d (1c:467d)
|
||||
LeaveMapThroughHoleAnim:
|
||||
ld a, $ff
|
||||
ld [wUpdateSpritesEnabled], a ; disable UpdateSprites
|
||||
; shift upper half of player's sprite down 8 pixels and hide lower half
|
||||
|
|
@ -223,7 +223,7 @@ LeaveMapThroughHoleAnim: ; 7067d (1c:467d)
|
|||
ld [wUpdateSpritesEnabled], a ; enable UpdateSprites
|
||||
jp RestoreFacingDirectionAndYScreenPos
|
||||
|
||||
DoFlyAnimation: ; 706ae (1c:46ae)
|
||||
DoFlyAnimation:
|
||||
ld a, [wFlyAnimBirdSpriteImageIndex]
|
||||
xor $1 ; make the bird flap its wings
|
||||
ld [wFlyAnimBirdSpriteImageIndex], a
|
||||
|
|
@ -247,7 +247,7 @@ DoFlyAnimation: ; 706ae (1c:46ae)
|
|||
jr nz, DoFlyAnimation
|
||||
ret
|
||||
|
||||
LoadBirdSpriteGraphics: ; 706d7 (1c:46d7)
|
||||
LoadBirdSpriteGraphics:
|
||||
ld de, BirdSprite
|
||||
ld hl, vNPCSprites
|
||||
lb bc, BANK(BirdSprite), $0c
|
||||
|
|
@ -257,7 +257,7 @@ LoadBirdSpriteGraphics: ; 706d7 (1c:46d7)
|
|||
lb bc, BANK(BirdSprite), $0c
|
||||
jp CopyVideoData
|
||||
|
||||
InitFacingDirectionList: ; 706ef (1c:46ef)
|
||||
InitFacingDirectionList:
|
||||
ld a, [wSpriteStateData1 + 2] ; player's sprite facing direction (image index is locked to standing images)
|
||||
ld [wSavedPlayerFacingDirection], a
|
||||
ld a, [wSpriteStateData1 + 4] ; player's sprite Y screen position
|
||||
|
|
@ -276,12 +276,12 @@ InitFacingDirectionList: ; 706ef (1c:46ef)
|
|||
dec hl
|
||||
ret
|
||||
|
||||
PlayerSpinningFacingOrder: ; 70713 (1c:4713)
|
||||
PlayerSpinningFacingOrder:
|
||||
; The order of the direction the player's sprite is facing when teleporting
|
||||
; away. Creates a spinning effect.
|
||||
db SPRITE_FACING_DOWN, SPRITE_FACING_LEFT, SPRITE_FACING_UP, SPRITE_FACING_RIGHT
|
||||
|
||||
SpinPlayerSprite: ; 70717 (1c:4717)
|
||||
SpinPlayerSprite:
|
||||
; copy the current value from the list into the sprite data and rotate the list
|
||||
ld a, [hl]
|
||||
ld [wSpriteStateData1 + 2], a ; player's sprite facing direction (image index is locked to standing images)
|
||||
|
|
@ -295,7 +295,7 @@ SpinPlayerSprite: ; 70717 (1c:4717)
|
|||
pop hl
|
||||
ret
|
||||
|
||||
PlayerSpinInPlace: ; 70730 (1c:4730)
|
||||
PlayerSpinInPlace:
|
||||
call SpinPlayerSprite
|
||||
ld a, [wPlayerSpinInPlaceAnimFrameDelay]
|
||||
ld c, a
|
||||
|
|
@ -316,7 +316,7 @@ PlayerSpinInPlace: ; 70730 (1c:4730)
|
|||
call DelayFrames
|
||||
jr PlayerSpinInPlace
|
||||
|
||||
PlayerSpinWhileMovingUpOrDown: ; 70755 (1c:4755)
|
||||
PlayerSpinWhileMovingUpOrDown:
|
||||
call SpinPlayerSprite
|
||||
ld a, [wPlayerSpinWhileMovingUpOrDownAnimDeltaY]
|
||||
ld c, a
|
||||
|
|
@ -332,7 +332,7 @@ PlayerSpinWhileMovingUpOrDown: ; 70755 (1c:4755)
|
|||
call DelayFrames
|
||||
jr PlayerSpinWhileMovingUpOrDown
|
||||
|
||||
RestoreFacingDirectionAndYScreenPos: ; 70772 (1c:4772)
|
||||
RestoreFacingDirectionAndYScreenPos:
|
||||
ld a, [wSavedPlayerScreenY]
|
||||
ld [wSpriteStateData1 + 4], a
|
||||
ld a, [wSavedPlayerFacingDirection]
|
||||
|
|
@ -340,14 +340,14 @@ RestoreFacingDirectionAndYScreenPos: ; 70772 (1c:4772)
|
|||
ret
|
||||
|
||||
; if SGB, 2 frames, else 3 frames
|
||||
GetPlayerTeleportAnimFrameDelay: ; 7077f (1c:477f)
|
||||
GetPlayerTeleportAnimFrameDelay:
|
||||
ld a, [wOnSGB]
|
||||
xor $1
|
||||
inc a
|
||||
inc a
|
||||
ret
|
||||
|
||||
IsPlayerStandingOnWarpPadOrHole: ; 70787 (1c:4787)
|
||||
IsPlayerStandingOnWarpPadOrHole:
|
||||
ld b, 0
|
||||
ld hl, .warpPadAndHoleData
|
||||
ld a, [wCurMapTileset]
|
||||
|
|
@ -374,14 +374,14 @@ IsPlayerStandingOnWarpPadOrHole: ; 70787 (1c:4787)
|
|||
ret
|
||||
|
||||
; format: db tileset id, tile id, value to be put in [wStandingOnWarpPadOrHole]
|
||||
.warpPadAndHoleData: ; 707a9 (1c:47a9)
|
||||
.warpPadAndHoleData:
|
||||
db FACILITY, $20, 1 ; warp pad
|
||||
db FACILITY, $11, 2 ; hole
|
||||
db CAVERN, $22, 2 ; hole
|
||||
db INTERIOR, $55, 1 ; warp pad
|
||||
db $FF
|
||||
|
||||
FishingAnim: ; 707b6 (1c:47b6)
|
||||
FishingAnim:
|
||||
ld c, 10
|
||||
call DelayFrames
|
||||
ld hl, wd736
|
||||
|
|
@ -462,19 +462,19 @@ FishingAnim: ; 707b6 (1c:47b6)
|
|||
ld [hl], a
|
||||
ret
|
||||
|
||||
NoNibbleText: ; 70847 (1c:4847)
|
||||
NoNibbleText:
|
||||
TX_FAR _NoNibbleText
|
||||
db "@"
|
||||
|
||||
NothingHereText: ; 7084c (1c:484c)
|
||||
NothingHereText:
|
||||
TX_FAR _NothingHereText
|
||||
db "@"
|
||||
|
||||
ItsABiteText: ; 70851 (1c:4851)
|
||||
ItsABiteText:
|
||||
TX_FAR _ItsABiteText
|
||||
db "@"
|
||||
|
||||
FishingRodOAM: ; 70856 (1c:4856)
|
||||
FishingRodOAM:
|
||||
; specifies how the fishing rod should be drawn on the screen
|
||||
; first byte = screen y coordinate
|
||||
; second byte = screen x coordinate
|
||||
|
|
@ -485,7 +485,7 @@ FishingRodOAM: ; 70856 (1c:4856)
|
|||
db $50, $40, $FE, $00 ; player facing left
|
||||
db $50, $58, $FE, $20 ; player facing right ($20 means "horizontally flip the tile")
|
||||
|
||||
RedFishingTiles: ; 70866 (1c:4866)
|
||||
RedFishingTiles:
|
||||
dw RedFishingTilesFront
|
||||
db 2, BANK(RedFishingTilesFront)
|
||||
dw vNPCSprites + $20
|
||||
|
|
@ -502,7 +502,7 @@ RedFishingTiles: ; 70866 (1c:4866)
|
|||
db 3, BANK(RedFishingRodTiles)
|
||||
dw vNPCSprites2 + $7d0
|
||||
|
||||
_HandleMidJump: ; 7087e (1c:487e)
|
||||
_HandleMidJump:
|
||||
ld a, [wPlayerJumpingYScreenCoordsIndex]
|
||||
ld c, a
|
||||
inc a
|
||||
|
|
@ -534,6 +534,6 @@ _HandleMidJump: ; 7087e (1c:487e)
|
|||
ld [wJoyIgnore], a
|
||||
ret
|
||||
|
||||
PlayerJumpingYScreenCoords: ; 708ba (1c:48ba)
|
||||
PlayerJumpingYScreenCoords:
|
||||
; Sequence of y screen coordinates for player's sprite when jumping over a ledge.
|
||||
db $38, $36, $34, $32, $31, $30, $30, $30, $31, $32, $33, $34, $36, $38, $3C, $3C
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
DisplayPokemonCenterDialogue_: ; 6fe6 (1:6fe6)
|
||||
DisplayPokemonCenterDialogue_:
|
||||
call SaveScreenTilesToBuffer1 ; save screen
|
||||
ld hl, PokemonCenterWelcomeText
|
||||
call PrintText
|
||||
|
|
@ -45,24 +45,24 @@ DisplayPokemonCenterDialogue_: ; 6fe6 (1:6fe6)
|
|||
call PrintText
|
||||
jp UpdateSprites
|
||||
|
||||
PokemonCenterWelcomeText: ; 705d (1:705d)
|
||||
PokemonCenterWelcomeText:
|
||||
TX_FAR _PokemonCenterWelcomeText
|
||||
db "@"
|
||||
|
||||
ShallWeHealYourPokemonText: ; 7062 (1:7062)
|
||||
ShallWeHealYourPokemonText:
|
||||
db $a
|
||||
TX_FAR _ShallWeHealYourPokemonText
|
||||
db "@"
|
||||
|
||||
NeedYourPokemonText: ; 7068 (1:7068)
|
||||
NeedYourPokemonText:
|
||||
TX_FAR _NeedYourPokemonText
|
||||
db "@"
|
||||
|
||||
PokemonFightingFitText: ; 706d (1:706d)
|
||||
PokemonFightingFitText:
|
||||
TX_FAR _PokemonFightingFitText
|
||||
db "@"
|
||||
|
||||
PokemonCenterFarewellText: ; 7072 (1:7072)
|
||||
PokemonCenterFarewellText:
|
||||
db $a
|
||||
TX_FAR _PokemonCenterFarewellText
|
||||
db "@"
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
DisplayPokemartDialogue_: ; 6c20 (1:6c20)
|
||||
DisplayPokemartDialogue_:
|
||||
ld a,[wListScrollOffset]
|
||||
ld [wSavedListScrollOffset],a
|
||||
call UpdateSprites
|
||||
|
|
@ -227,46 +227,46 @@ DisplayPokemartDialogue_: ; 6c20 (1:6c20)
|
|||
ld [wListScrollOffset],a
|
||||
ret
|
||||
|
||||
PokemartBuyingGreetingText: ; 6e0c (1:6e0c)
|
||||
PokemartBuyingGreetingText:
|
||||
TX_FAR _PokemartBuyingGreetingText
|
||||
db "@"
|
||||
|
||||
PokemartTellBuyPriceText: ; 6e11 (1:6e11)
|
||||
PokemartTellBuyPriceText:
|
||||
TX_FAR _PokemartTellBuyPriceText
|
||||
db "@"
|
||||
|
||||
PokemartBoughtItemText: ; 6e16 (1:6e16)
|
||||
PokemartBoughtItemText:
|
||||
TX_FAR _PokemartBoughtItemText
|
||||
db "@"
|
||||
|
||||
PokemartNotEnoughMoneyText: ; 6e1b (1:6e1b)
|
||||
PokemartNotEnoughMoneyText:
|
||||
TX_FAR _PokemartNotEnoughMoneyText
|
||||
db "@"
|
||||
|
||||
PokemartItemBagFullText: ; 6e20 (1:6e20)
|
||||
PokemartItemBagFullText:
|
||||
TX_FAR _PokemartItemBagFullText
|
||||
db "@"
|
||||
|
||||
PokemonSellingGreetingText: ; 6e25 (1:6e25)
|
||||
PokemonSellingGreetingText:
|
||||
TX_FAR _PokemonSellingGreetingText
|
||||
db "@"
|
||||
|
||||
PokemartTellSellPriceText: ; 6e2a (1:6e2a)
|
||||
PokemartTellSellPriceText:
|
||||
TX_FAR _PokemartTellSellPriceText
|
||||
db "@"
|
||||
|
||||
PokemartItemBagEmptyText: ; 6e2f (1:6e2f)
|
||||
PokemartItemBagEmptyText:
|
||||
TX_FAR _PokemartItemBagEmptyText
|
||||
db "@"
|
||||
|
||||
PokemartUnsellableItemText: ; 6e34 (1:6e34)
|
||||
PokemartUnsellableItemText:
|
||||
TX_FAR _PokemartUnsellableItemText
|
||||
db "@"
|
||||
|
||||
PokemartThankYouText: ; 6e39 (1:6e39)
|
||||
PokemartThankYouText:
|
||||
TX_FAR _PokemartThankYouText
|
||||
db "@"
|
||||
|
||||
PokemartAnythingElseText: ; 6e3e (1:6e3e)
|
||||
PokemartAnythingElseText:
|
||||
TX_FAR _PokemartAnythingElseText
|
||||
db "@"
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
RemoveGuardDrink: ; 5a59f (16:659f)
|
||||
RemoveGuardDrink:
|
||||
ld hl, GuardDrinksList
|
||||
.drinkLoop
|
||||
ld a, [hli]
|
||||
|
|
@ -12,5 +12,5 @@ RemoveGuardDrink: ; 5a59f (16:659f)
|
|||
jr z, .drinkLoop
|
||||
jpba RemoveItemByID
|
||||
|
||||
GuardDrinksList: ; 5a5b7 (16:65b7)
|
||||
GuardDrinksList:
|
||||
db FRESH_WATER, SODA_POP, LEMONADE, $00
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
AnimateBoulderDust: ; 79f54 (1e:5f54)
|
||||
AnimateBoulderDust:
|
||||
ld a, $1
|
||||
ld [wWhichAnimationOffsets], a ; select the boulder dust offsets
|
||||
ld a, [wUpdateSpritesEnabled]
|
||||
|
|
@ -29,7 +29,7 @@ AnimateBoulderDust: ; 79f54 (1e:5f54)
|
|||
ld [wUpdateSpritesEnabled], a
|
||||
jp LoadPlayerSpriteGraphics
|
||||
|
||||
GetMoveBoulderDustFunctionPointer: ; 79f92 (1e:5f92)
|
||||
GetMoveBoulderDustFunctionPointer:
|
||||
ld a, [wSpriteStateData1 + 9] ; player's sprite facing direction
|
||||
ld hl, MoveBoulderDustFunctionPointerTable
|
||||
ld c, a
|
||||
|
|
@ -51,7 +51,7 @@ GetMoveBoulderDustFunctionPointer: ; 79f92 (1e:5f92)
|
|||
pop hl
|
||||
ret
|
||||
|
||||
MoveBoulderDustFunctionPointerTable: ; 79fb0 (1e:5fb0)
|
||||
MoveBoulderDustFunctionPointerTable:
|
||||
; facing down
|
||||
db $FF,$00
|
||||
dw AdjustOAMBlockYPos
|
||||
|
|
@ -68,7 +68,7 @@ MoveBoulderDustFunctionPointerTable: ; 79fb0 (1e:5fb0)
|
|||
db $FF,$01
|
||||
dw AdjustOAMBlockXPos
|
||||
|
||||
LoadSmokeTileFourTimes: ; 79fc0 (1e:5fc0)
|
||||
LoadSmokeTileFourTimes:
|
||||
ld hl, vChars1 + $7c0
|
||||
ld c, $4
|
||||
.loop
|
||||
|
|
@ -83,11 +83,11 @@ LoadSmokeTileFourTimes: ; 79fc0 (1e:5fc0)
|
|||
jr nz, .loop
|
||||
ret
|
||||
|
||||
LoadSmokeTile: ; 79fd4 (1e:5fd4)
|
||||
LoadSmokeTile:
|
||||
ld de, SSAnneSmokePuffTile
|
||||
lb bc, BANK(SSAnneSmokePuffTile), (SSAnneSmokePuffTileEnd - SSAnneSmokePuffTile) / $10
|
||||
jp CopyVideoData
|
||||
|
||||
SSAnneSmokePuffTile: ; 79fdd (1e:5fdd)
|
||||
SSAnneSmokePuffTile:
|
||||
INCBIN "gfx/ss_anne_smoke_puff.2bpp"
|
||||
SSAnneSmokePuffTileEnd:
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
_GetSpritePosition1: ; 567f9 (15:67f9)
|
||||
_GetSpritePosition1:
|
||||
ld hl, wSpriteStateData1
|
||||
ld de, $4
|
||||
ld a, [wSpriteIndex]
|
||||
|
|
@ -17,7 +17,7 @@ _GetSpritePosition1: ; 567f9 (15:67f9)
|
|||
ld [$ffee], a
|
||||
ret
|
||||
|
||||
_GetSpritePosition2: ; 56819 (15:6819)
|
||||
_GetSpritePosition2:
|
||||
ld hl, wSpriteStateData1
|
||||
ld de, $4
|
||||
ld a, [wSpriteIndex]
|
||||
|
|
@ -36,7 +36,7 @@ _GetSpritePosition2: ; 56819 (15:6819)
|
|||
ld [wSavedSpriteMapX], a
|
||||
ret
|
||||
|
||||
_SetSpritePosition1: ; 5683d (15:683d)
|
||||
_SetSpritePosition1:
|
||||
ld hl, wSpriteStateData1
|
||||
ld de, $4
|
||||
ld a, [wSpriteIndex]
|
||||
|
|
@ -55,7 +55,7 @@ _SetSpritePosition1: ; 5683d (15:683d)
|
|||
ld [hl], a
|
||||
ret
|
||||
|
||||
_SetSpritePosition2: ; 5685d (15:685d)
|
||||
_SetSpritePosition2:
|
||||
ld hl, wSpriteStateData1
|
||||
ld de, $0004
|
||||
ld a, [wSpriteIndex]
|
||||
|
|
@ -74,7 +74,7 @@ _SetSpritePosition2: ; 5685d (15:685d)
|
|||
ld [hl], a
|
||||
ret
|
||||
|
||||
TrainerWalkUpToPlayer: ; 56881 (15:6881)
|
||||
TrainerWalkUpToPlayer:
|
||||
ld a, [wSpriteIndex]
|
||||
swap a
|
||||
ld [wTrainerSpriteOffset], a
|
||||
|
|
@ -149,7 +149,7 @@ TrainerWalkUpToPlayer: ; 56881 (15:6881)
|
|||
|
||||
; input: de = offset within sprite entry
|
||||
; output: de = pointer to sprite data
|
||||
GetSpriteDataPointer: ; 56903 (15:6903)
|
||||
GetSpriteDataPointer:
|
||||
push de
|
||||
add hl, de
|
||||
ld a, [H_SPRITEINDEX]
|
||||
|
|
@ -161,7 +161,7 @@ GetSpriteDataPointer: ; 56903 (15:6903)
|
|||
ret
|
||||
|
||||
; tests if this trainer is in the right position to engage the player and do so if she is.
|
||||
TrainerEngage: ; 5690f (15:690f)
|
||||
TrainerEngage:
|
||||
push hl
|
||||
push de
|
||||
ld a, [wTrainerSpriteOffset]
|
||||
|
|
@ -225,14 +225,14 @@ TrainerEngage: ; 5690f (15:690f)
|
|||
set 0, [hl]
|
||||
call EngageMapTrainer
|
||||
ld a, $ff
|
||||
.noEngage: ; 56988 (15:6988)
|
||||
.noEngage:
|
||||
ld [wTrainerSpriteOffset], a
|
||||
pop de
|
||||
pop hl
|
||||
ret
|
||||
|
||||
; reads trainer's Y position to wTrainerScreenY and X position to wTrainerScreenX
|
||||
ReadTrainerScreenPosition: ; 5698e (15:698e)
|
||||
ReadTrainerScreenPosition:
|
||||
ld a, [wTrainerSpriteOffset]
|
||||
add $4
|
||||
ld d, $0
|
||||
|
|
@ -254,7 +254,7 @@ ReadTrainerScreenPosition: ; 5698e (15:698e)
|
|||
; checks if the sprite is properly lined up with the player with respect to the direction it's looking. Also checks the distance between player and sprite
|
||||
; note that this does not necessarily mean the sprite is seeing the player, he could be behind it's back
|
||||
; a: distance player to sprite
|
||||
CheckSpriteCanSeePlayer: ; 569af (15:69af)
|
||||
CheckSpriteCanSeePlayer:
|
||||
ld b, a
|
||||
ld a, [wTrainerEngageDistance] ; how far the trainer can see
|
||||
cp b
|
||||
|
|
@ -290,7 +290,7 @@ CheckSpriteCanSeePlayer: ; 569af (15:69af)
|
|||
ret
|
||||
|
||||
; tests if the player is in front of the sprite (rather than behind it)
|
||||
CheckPlayerIsInFrontOfSprite: ; 569e3 (15:69e3)
|
||||
CheckPlayerIsInFrontOfSprite:
|
||||
ld a, [wCurMap]
|
||||
cp POWER_PLANT
|
||||
jp z, .engage ; bypass this for power plant to get voltorb fake items to work
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue