fix variable naming

This commit is contained in:
YamaArashi 2015-07-18 08:17:29 -07:00
parent b85d7c65f3
commit fc9af362ae
106 changed files with 773 additions and 671 deletions

View file

@ -163,7 +163,7 @@ DrawFrameBlock: ; 78000 (1e:4000)
PlayAnimation: ; 780f1 (1e:40f1) PlayAnimation: ; 780f1 (1e:40f1)
xor a xor a
ld [$FF8B],a ld [$FF8B],a ; it looks like nothing reads this
ld [W_SUBANIMTRANSFORM],a ld [W_SUBANIMTRANSFORM],a
ld a,[W_ANIMATIONID] ; get animation number ld a,[W_ANIMATIONID] ; get animation number
dec a dec a

View file

@ -1310,7 +1310,7 @@ SevenSpacesText: ; 3c8d7 (f:48d7)
; if a is 8, the slide is to the right, else it is to the left ; if a is 8, the slide is to the right, else it is to the left
; bug: when this is called, [H_AUTOBGTRANSFERENABLED] is non-zero, so there is screen tearing ; bug: when this is called, [H_AUTOBGTRANSFERENABLED] is non-zero, so there is screen tearing
SlideTrainerPicOffScreen: ; 3c8df (f:48df) SlideTrainerPicOffScreen: ; 3c8df (f:48df)
ld [$FF8B], a ld [hSlideAmount], a
ld c, a ld c, a
.slideStepLoop ; each iteration, the trainer pic is slid one tile left/right .slideStepLoop ; each iteration, the trainer pic is slid one tile left/right
push bc push bc
@ -1318,10 +1318,10 @@ SlideTrainerPicOffScreen: ; 3c8df (f:48df)
ld b, 7 ; number of rows ld b, 7 ; number of rows
.rowLoop .rowLoop
push hl push hl
ld a, [$FF8B] ld a, [hSlideAmount]
ld c, a ld c, a
.columnLoop .columnLoop
ld a, [$FF8B] ld a, [hSlideAmount]
cp 8 cp 8
jr z, .slideRight jr z, .slideRight
.slideLeft ; slide player sprite off screen .slideLeft ; slide player sprite off screen
@ -1590,14 +1590,14 @@ TryRunningFromBattle: ; 3cab9 (f:4ab9)
ld a, [hl] ld a, [hl]
ld [H_MULTIPLICAND + 2], a ld [H_MULTIPLICAND + 2], a
ld a, [de] ld a, [de]
ld [$ff8d], a ld [hEnemySpeed], a
inc de inc de
ld a, [de] ld a, [de]
ld [$ff8e], a ld [hEnemySpeed + 1], a
call LoadScreenTilesFromBuffer1 call LoadScreenTilesFromBuffer1
ld de, H_MULTIPLICAND + 1 ld de, H_MULTIPLICAND + 1
ld hl, $ff8d ld hl, hEnemySpeed
ld c, $2 ld c, 2
call StringCmp call StringCmp
jr nc, .canEscape ; jump if player speed greater than enemy speed jr nc, .canEscape ; jump if player speed greater than enemy speed
xor a xor a
@ -1609,9 +1609,9 @@ TryRunningFromBattle: ; 3cab9 (f:4ab9)
ld [H_DIVIDEND], a ld [H_DIVIDEND], a
ld a, [H_PRODUCT + 3] ld a, [H_PRODUCT + 3]
ld [H_DIVIDEND + 1], a ld [H_DIVIDEND + 1], a
ld a, [$ff8d] ld a, [hEnemySpeed]
ld b, a ld b, a
ld a, [$ff8e] ld a, [hEnemySpeed + 1]
; divide enemy speed by 4 ; divide enemy speed by 4
srl b srl b
rr a rr a
@ -6411,7 +6411,7 @@ LoadPlayerBackPic: ; 3ec92 (f:6c92)
predef ScaleSpriteByTwo predef ScaleSpriteByTwo
ld hl, wOAMBuffer ld hl, wOAMBuffer
xor a xor a
ld [$FF8B], a ; initial tile number ld [hOAMTile], a ; initial tile number
ld b, $7 ; 7 columns ld b, $7 ; 7 columns
ld e, $a0 ; X for the left-most column ld e, $a0 ; X for the left-most column
.loop ; each loop iteration writes 3 OAM entries in a vertical column .loop ; each loop iteration writes 3 OAM entries in a vertical column
@ -6425,16 +6425,16 @@ LoadPlayerBackPic: ; 3ec92 (f:6c92)
add d ; increase Y by height of tile add d ; increase Y by height of tile
ld d, a ld d, a
inc hl inc hl
ld a, [$FF8B] ld a, [hOAMTile]
ld [hli], a ; OAM tile number ld [hli], a ; OAM tile number
inc a ; increment tile number inc a ; increment tile number
ld [$FF8B], a ld [hOAMTile], a
inc hl inc hl
dec c dec c
jr nz, .innerLoop jr nz, .innerLoop
ld a, [$FF8B] ld a, [hOAMTile]
add $4 ; increase tile number by 4 add $4 ; increase tile number by 4
ld [$FF8B], a ld [hOAMTile], a
ld a, $8 ; width of tile ld a, $8 ; width of tile
add e ; increase X by width of tile add e ; increase X by width of tile
ld e, a ld e, a

View file

@ -89,7 +89,7 @@ TryDoWildEncounter: ; 13870 (4:7870)
jr .willEncounter jr .willEncounter
.lastRepelStep .lastRepelStep
ld [wRepelRemainingSteps], a ld [wRepelRemainingSteps], a
ld a, $d2 ld a, 210
ld [H_DOWNARROWBLINKCNT2], a ld [H_DOWNARROWBLINKCNT2], a
call EnableAutoTextBoxDrawing call EnableAutoTextBoxDrawing
call DisplayTextID call DisplayTextID

View file

@ -556,11 +556,11 @@ ItemUseSurfboard: ; d9b4 (3:59b4)
jp PrintText jp PrintText
.tryToStopSurfing .tryToStopSurfing
xor a xor a
ld [$ff8c],a ld [hSpriteIndexOrTextID],a
ld d,16 ; talking range in pixels (normal range) ld d,16 ; talking range in pixels (normal range)
call IsSpriteInFrontOfPlayer2 call IsSpriteInFrontOfPlayer2
res 7,[hl] res 7,[hl]
ld a,[$ff8c] ld a,[hSpriteIndexOrTextID]
and a ; is there a sprite in the way? and a ; is there a sprite in the way?
jr nz,.cannotStopSurfing jr nz,.cannotStopSurfing
ld hl,TilePairCollisionsWater ld hl,TilePairCollisionsWater

View file

@ -1,7 +1,6 @@
GetMachinePrice: ; 7bf86 (1e:7f86) GetMachinePrice: ; 7bf86 (1e:7f86)
; Input: [wcf91] = Item Id of a TM ; Input: [wcf91] = Item Id of a TM
; Output: Stores the 2-byte TM price in [H_DOWNARROWBLINKCNT1] and [H_DOWNARROWBLINKCNT2] ; Output: Stores the TM price at hItemPrice
; as a BCD
ld a, [wcf91] ; a contains TM item id ld a, [wcf91] ; a contains TM item id
sub TM_01 sub TM_01
ret c ret c
@ -17,10 +16,10 @@ GetMachinePrice: ; 7bf86 (1e:7f86)
swap a swap a
.highNybbleIsPrice .highNybbleIsPrice
and $f0 and $f0
ld [H_DOWNARROWBLINKCNT2], a ld [hItemPrice + 1], a
xor a xor a
ld [H_DOWNARROWBLINKCNT1], a ld [hItemPrice], a
ld [$ff8d], a ld [hItemPrice + 2], a
ret ret
INCLUDE "data/tm_prices.asm" INCLUDE "data/tm_prices.asm"

View file

@ -512,25 +512,25 @@ ShowPokedexDataInternal: ; 402e2 (10:42e2)
inc de inc de
inc de ; de = address of upper byte of weight inc de ; de = address of upper byte of weight
push de push de
; put weight in big-endian order at $ff8b ; put weight in big-endian order at hDexWeight
ld hl,$ff8b ld hl,hDexWeight
ld a,[hl] ; save existing value of [$ff8b] ld a,[hl] ; save existing value of [hDexWeight]
push af push af
ld a,[de] ; a = upper byte of weight ld a,[de] ; a = upper byte of weight
ld [hli],a ; store upper byte of weight in [$ff8b] ld [hli],a ; store upper byte of weight in [hDexWeight]
ld a,[hl] ; save existing value of [$ff8c] ld a,[hl] ; save existing value of [hDexWeight + 1]
push af push af
dec de dec de
ld a,[de] ; a = lower byte of weight ld a,[de] ; a = lower byte of weight
ld [hl],a ; store lower byte of weight in [$ff8c] ld [hl],a ; store lower byte of weight in [hDexWeight + 1]
ld de,$ff8b ld de,hDexWeight
hlCoord 11, 8 hlCoord 11, 8
ld bc,$0205 ; no leading zeroes, right-aligned, 2 bytes, 5 digits ld bc,$0205 ; no leading zeroes, right-aligned, 2 bytes, 5 digits
call PrintNumber ; print weight call PrintNumber ; print weight
hlCoord 14, 8 hlCoord 14, 8
ld a,[$ff8c] ld a,[hDexWeight + 1]
sub a,10 sub a,10
ld a,[$ff8b] ld a,[hDexWeight]
sbc a,0 sbc a,0
jr nc,.next jr nc,.next
ld [hl],"0" ; if the weight is less than 10, put a 0 before the decimal point ld [hl],"0" ; if the weight is less than 10, put a 0 before the decimal point
@ -540,9 +540,9 @@ ShowPokedexDataInternal: ; 402e2 (10:42e2)
ld [hld],a ; make space for the decimal point by moving the last digit forward one tile ld [hld],a ; make space for the decimal point by moving the last digit forward one tile
ld [hl],$f2 ; decimal point tile ld [hl],$f2 ; decimal point tile
pop af pop af
ld [$ff8c],a ; restore original value of [$ff8c] ld [hDexWeight + 1],a ; restore original value of [hDexWeight + 1]
pop af pop af
ld [$ff8b],a ; restore original value of [$ff8b] ld [hDexWeight],a ; restore original value of [hDexWeight]
pop hl pop hl
inc hl ; hl = address of pokedex description text inc hl ; hl = address of pokedex description text
bcCoord 1, 11 bcCoord 1, 11

View file

@ -58,13 +58,13 @@ WhichPrizeTextPtr: ; 52789 (14:6789)
GetPrizeMenuId: ; 5278e (14:678e) GetPrizeMenuId: ; 5278e (14:678e)
; determine which one among the three ; determine which one among the three
; prize-texts has been selected ; prize-texts has been selected
; using the text ID (stored in [$FF8C]) ; using the text ID (stored in [hSpriteIndexOrTextID])
; load the three prizes at wd13d-wd13f ; load the three prizes at wd13d-wd13f
; load the three prices at wd141-wd146 ; load the three prices at wd141-wd146
; display the three prizes' names ; display the three prizes' names
; (distinguishing between Pokemon names ; (distinguishing between Pokemon names
; and Items (specifically TMs) names) ; and Items (specifically TMs) names)
ld a,[$FF8C] ld a,[hSpriteIndexOrTextID]
sub a,$03 ; prize-texts' id are 3, 4 and 5 sub a,$03 ; prize-texts' id are 3, 4 and 5
ld [wd12f],a ; prize-texts' id (relative, i.e. 0, 1 or 2) ld [wd12f],a ; prize-texts' id (relative, i.e. 0, 1 or 2)
add a add a

View file

@ -524,7 +524,7 @@ StartMenu_TrainerInfo: ; 13460 (4:7460)
DrawTrainerInfo: ; 1349a (4:749a) DrawTrainerInfo: ; 1349a (4:749a)
ld de,RedPicFront ld de,RedPicFront
ld bc,(BANK(RedPicFront) << 8) | $01 ld bc,(BANK(RedPicFront) << 8) | $01
predef Predef3B predef DisplayPicCenteredOrUpperRight
call DisableLCD call DisableLCD
hlCoord 0, 2 hlCoord 0, 2
ld a," " ld a," "

View file

@ -34,9 +34,9 @@ SetDefaultNames: ; 60ca (1:60ca)
OakSpeech: ; 6115 (1:6115) OakSpeech: ; 6115 (1:6115)
ld a,$FF ld a,$FF
call PlaySound ; stop music call PlaySound ; stop music
ld a, BANK(Music_Routes2) ; bank of song ld a, BANK(Music_Routes2)
ld c,a ld c,a
ld a, MUSIC_ROUTES2 ; song # ld a, MUSIC_ROUTES2
call PlayMusic call PlayMusic
call ClearScreen call ClearScreen
call LoadTextBoxTilePatterns call LoadTextBoxTilePatterns
@ -54,50 +54,49 @@ OakSpeech: ; 6115 (1:6115)
xor a xor a
ld [hTilesetType],a ld [hTilesetType],a
ld a,[wd732] ld a,[wd732]
bit 1,a ; XXX when is bit 1 set? bit 1,a ; possibly a debug mode bit
jp nz,Func_61bc ; easter egg: skip the intro jp nz,.skipChoosingNames
ld de,ProfOakPic ld de,ProfOakPic
ld bc, (Bank(ProfOakPic) << 8) | $00 ld bc, (Bank(ProfOakPic) << 8) | $00
call IntroPredef3B ; displays Oak pic? call IntroDisplayPicCenteredOrUpperRight
call FadeInIntroPic call FadeInIntroPic
ld hl,OakSpeechText1 ld hl,OakSpeechText1
call PrintText ; prints text box call PrintText
call GBFadeOutToWhite call GBFadeOutToWhite
call ClearScreen call ClearScreen
ld a,NIDORINO ld a,NIDORINO
ld [wd0b5],a ; pic displayed is stored at this location ld [wd0b5],a
ld [wcf91],a ld [wcf91],a
call GetMonHeader ; this is also related to the pic call GetMonHeader
hlCoord 6, 4 ; position on tilemap the pic is displayed hlCoord 6, 4
call LoadFlippedFrontSpriteByMonIndex ; displays pic? call LoadFlippedFrontSpriteByMonIndex
call MovePicLeft call MovePicLeft
ld hl,OakSpeechText2 ld hl,OakSpeechText2
call PrintText ; Prints text box call PrintText
call GBFadeOutToWhite call GBFadeOutToWhite
call ClearScreen call ClearScreen
ld de,RedPicFront ld de,RedPicFront
ld bc,(Bank(RedPicFront) << 8) | $00 ld bc,(Bank(RedPicFront) << 8) | $00
call IntroPredef3B ; displays player pic? call IntroDisplayPicCenteredOrUpperRight
call MovePicLeft call MovePicLeft
ld hl,IntroducePlayerText ld hl,IntroducePlayerText
call PrintText call PrintText
call LoadDefaultNamesPlayer ; brings up NewName/Red/etc menu call ChoosePlayerName
call GBFadeOutToWhite call GBFadeOutToWhite
call ClearScreen call ClearScreen
ld de,Rival1Pic ld de,Rival1Pic
ld bc,(Bank(Rival1Pic) << 8) | $00 ld bc,(Bank(Rival1Pic) << 8) | $00
call IntroPredef3B ; displays rival pic call IntroDisplayPicCenteredOrUpperRight
call FadeInIntroPic call FadeInIntroPic
ld hl,IntroduceRivalText ld hl,IntroduceRivalText
call PrintText call PrintText
call LoadDefaultNamesRival call ChooseRivalName
.skipChoosingNames
Func_61bc: ; 61bc (1:61bc)
call GBFadeOutToWhite call GBFadeOutToWhite
call ClearScreen call ClearScreen
ld de,RedPicFront ld de,RedPicFront
ld bc,(Bank(RedPicFront) << 8) | $00 ld bc,(Bank(RedPicFront) << 8) | $00
call IntroPredef3B call IntroDisplayPicCenteredOrUpperRight
call GBFadeInFromWhite call GBFadeInFromWhite
ld a,[wd72d] ld a,[wd72d]
and a and a
@ -120,12 +119,12 @@ Func_61bc: ; 61bc (1:61bc)
call CopyVideoData call CopyVideoData
ld de,ShrinkPic1 ld de,ShrinkPic1
ld bc,(BANK(ShrinkPic1) << 8) | $00 ld bc,(BANK(ShrinkPic1) << 8) | $00
call IntroPredef3B call IntroDisplayPicCenteredOrUpperRight
ld c,4 ld c,4
call DelayFrames call DelayFrames
ld de,ShrinkPic2 ld de,ShrinkPic2
ld bc,(BANK(ShrinkPic2) << 8) | $00 ld bc,(BANK(ShrinkPic2) << 8) | $00
call IntroPredef3B call IntroDisplayPicCenteredOrUpperRight
call ResetPlayerSpriteData call ResetPlayerSpriteData
ld a,[H_LOADEDROMBANK] ld a,[H_LOADEDROMBANK]
push af push af
@ -207,10 +206,12 @@ MovePicLeft: ; 6288 (1:6288)
ld [rWX],a ld [rWX],a
jr .next jr .next
Predef3B: ; 62a1 (1:62a1) DisplayPicCenteredOrUpperRight: ; 62a1 (1:62a1)
call GetPredefRegisters call GetPredefRegisters
IntroPredef3B: ; 62a4 (1:62a4) IntroDisplayPicCenteredOrUpperRight: ; 62a4 (1:62a4)
; bank of sprite given in b ; b = bank
; de = address of compressed pic
; c: 0 = centred, non-zero = upper-right
push bc push bc
ld a,b ld a,b
call UncompressSpriteFromDE call UncompressSpriteFromDE

View file

@ -1,29 +1,29 @@
LoadDefaultNamesPlayer: ; 695d (1:695d) ChoosePlayerName: ; 695d (1:695d)
call Func_6a12 call OakSpeechSlidePicRight
ld de, DefaultNamesPlayer ld de, DefaultNamesPlayer
call DisplayIntroNameTextBox call DisplayIntroNameTextBox
ld a, [wCurrentMenuItem] ld a, [wCurrentMenuItem]
and a and a
jr z, .asm_697a jr z, .customName
ld hl, DefaultNamesPlayerList ld hl, DefaultNamesPlayerList
call Func_6ad6 call GetDefaultName
ld de, wPlayerName ld de, wPlayerName
call Func_69ec call OakSpeechSlidePicLeft
jr .asm_6999 jr .done
.asm_697a .customName
ld hl, wPlayerName ld hl, wPlayerName
xor a ; NAME_PLAYER_SCREEN xor a ; NAME_PLAYER_SCREEN
ld [wNamingScreenType], a ld [wNamingScreenType], a
call DisplayNamingScreen call DisplayNamingScreen
ld a, [wcf4b] ld a, [wcf4b]
cp $50 cp "@"
jr z, .asm_697a jr z, .customName
call ClearScreen call ClearScreen
call Delay3 call Delay3
ld de, RedPicFront ld de, RedPicFront
ld b, BANK(RedPicFront) ld b, BANK(RedPicFront)
call IntroPredef3B call IntroDisplayPicCenteredOrUpperRight
.asm_6999 .done
ld hl, YourNameIsText ld hl, YourNameIsText
jp PrintText jp PrintText
@ -31,32 +31,32 @@ YourNameIsText: ; 699f (1:699f)
TX_FAR _YourNameIsText TX_FAR _YourNameIsText
db "@" db "@"
LoadDefaultNamesRival: ; 69a4 (1:69a4) ChooseRivalName: ; 69a4 (1:69a4)
call Func_6a12 call OakSpeechSlidePicRight
ld de, DefaultNamesRival ld de, DefaultNamesRival
call DisplayIntroNameTextBox call DisplayIntroNameTextBox
ld a, [wCurrentMenuItem] ld a, [wCurrentMenuItem]
and a and a
jr z, .asm_69c1 jr z, .customName
ld hl, DefaultNamesRivalList ld hl, DefaultNamesRivalList
call Func_6ad6 call GetDefaultName
ld de, W_RIVALNAME ld de, W_RIVALNAME
call Func_69ec call OakSpeechSlidePicLeft
jr .asm_69e1 jr .done
.asm_69c1 .customName
ld hl, W_RIVALNAME ld hl, W_RIVALNAME
ld a, NAME_RIVAL_SCREEN ld a, NAME_RIVAL_SCREEN
ld [wNamingScreenType], a ld [wNamingScreenType], a
call DisplayNamingScreen call DisplayNamingScreen
ld a, [wcf4b] ld a, [wcf4b]
cp $50 cp "@"
jr z, .asm_69c1 jr z, .customName
call ClearScreen call ClearScreen
call Delay3 call Delay3
ld de, Rival1Pic ld de, Rival1Pic
ld b, $13 ld b, $13
call IntroPredef3B call IntroDisplayPicCenteredOrUpperRight
.asm_69e1 .done
ld hl, HisNameIsText ld hl, HisNameIsText
jp PrintText jp PrintText
@ -64,11 +64,11 @@ HisNameIsText: ; 69e7 (1:69e7)
TX_FAR _HisNameIsText TX_FAR _HisNameIsText
db "@" db "@"
Func_69ec: ; 69ec (1:69ec) OakSpeechSlidePicLeft: ; 69ec (1:69ec)
push de push de
hlCoord 0, 0 hlCoord 0, 0
ld bc, $c0b lb bc, 12, 11
call ClearScreenArea call ClearScreenArea ; clear the name list text box
ld c, 10 ld c, 10
call DelayFrames call DelayFrames
pop de pop de
@ -77,77 +77,83 @@ Func_69ec: ; 69ec (1:69ec)
call CopyData call CopyData
call Delay3 call Delay3
hlCoord 12, 4 hlCoord 12, 4
ld de, $67d lb de, 6, 6 * SCREEN_WIDTH + 5
ld a, $ff ld a, $ff
jr asm_6a19 jr OakSpeechSlidePicCommon
Func_6a12: ; 6a12 (1:6a12) OakSpeechSlidePicRight: ; 6a12 (1:6a12)
hlCoord 5, 4 hlCoord 5, 4
ld de, $67d lb de, 6, 6 * SCREEN_WIDTH + 5
xor a xor a
asm_6a19: ; 6a19 (1:6a19)
OakSpeechSlidePicCommon: ; 6a19 (1:6a19)
push hl push hl
push de push de
push bc push bc
ld [$ff8d], a ld [hSlideDirection], a
ld a, d ld a, d
ld [H_DOWNARROWBLINKCNT1], a ld [hSlideAmount], a
ld a, e ld a, e
ld [H_DOWNARROWBLINKCNT2], a ld [hSlidingRegionSize], a
ld c, a ld c, a
ld a, [$ff8d] ld a, [hSlideDirection]
and a and a
jr nz, .asm_6a2d jr nz, .next
ld d, $0 ; If sliding right, point hl to the end of the pic's tiles.
ld d, 0
add hl, de add hl, de
.asm_6a2d .next
ld d, h ld d, h
ld e, l ld e, l
.asm_6a2f .loop
xor a xor a
ld [H_AUTOBGTRANSFERENABLED], a ld [H_AUTOBGTRANSFERENABLED], a
ld a, [$ff8d] ld a, [hSlideDirection]
and a and a
jr nz, .asm_6a3c jr nz, .slideLeft
; sliding right
ld a, [hli] ld a, [hli]
ld [hld], a ld [hld], a
dec hl dec hl
jr .asm_6a3f jr .next2
.asm_6a3c .slideLeft
ld a, [hld] ld a, [hld]
ld [hli], a ld [hli], a
inc hl inc hl
.asm_6a3f .next2
dec c dec c
jr nz, .asm_6a2f jr nz, .loop
ld a, [$ff8d] ld a, [hSlideDirection]
and a and a
jr z, .asm_6a4a jr z, .next3
; If sliding left, we need to zero the last tile in the pic (there is no need
; to take a corresponding action when sliding right because hl initially points
; to a 0 tile in that case).
xor a xor a
dec hl dec hl
ld [hl], a ld [hl], a
.asm_6a4a .next3
ld a, $1 ld a, 1
ld [H_AUTOBGTRANSFERENABLED], a ld [H_AUTOBGTRANSFERENABLED], a
call Delay3 call Delay3
ld a, [H_DOWNARROWBLINKCNT2] ld a, [hSlidingRegionSize]
ld c, a ld c, a
ld h, d ld h, d
ld l, e ld l, e
ld a, [$ff8d] ld a, [hSlideDirection]
and a and a
jr nz, .asm_6a5e jr nz, .slideLeft2
inc hl inc hl
jr .asm_6a5f jr .next4
.asm_6a5e .slideLeft2
dec hl dec hl
.asm_6a5f .next4
ld d, h ld d, h
ld e, l ld e, l
ld a, [H_DOWNARROWBLINKCNT1] ld a, [hSlideAmount]
dec a dec a
ld [H_DOWNARROWBLINKCNT1], a ld [hSlideAmount], a
jr nz, .asm_6a2f jr nz, .loop
pop bc pop bc
pop de pop de
pop hl pop hl
@ -229,22 +235,24 @@ DefaultNamesRival:
db "@" db "@"
ENDC ENDC
Func_6ad6: ; 6ad6 (1:6ad6) GetDefaultName: ; 6ad6 (1:6ad6)
; a = name index
; hl = name list
ld b, a ld b, a
ld c, $0 ld c, 0
.asm_6ad9 .loop
ld d, h ld d, h
ld e, l ld e, l
.asm_6adb .innerLoop
ld a, [hli] ld a, [hli]
cp $50 cp "@"
jr nz, .asm_6adb jr nz, .innerLoop
ld a, b ld a, b
cp c cp c
jr z, .asm_6ae7 jr z, .foundName
inc c inc c
jr .asm_6ad9 jr .loop
.asm_6ae7 .foundName
ld h, d ld h, d
ld l, e ld l, e
ld de, wcd6d ld de, wcd6d

View file

@ -1,7 +1,7 @@
PickupItem: PickUpItem:
call EnableAutoTextBoxDrawing call EnableAutoTextBoxDrawing
ld a, [H_DOWNARROWBLINKCNT2] ld a, [hSpriteIndexOrTextID]
ld b, a ld b, a
ld hl, W_MISSABLEOBJECTLIST ld hl, W_MISSABLEOBJECTLIST
.missableObjectsListLoop .missableObjectsListLoop
@ -18,7 +18,7 @@ PickupItem:
ld [$ffdb], a ld [$ffdb], a
ld hl, W_MAPSPRITEEXTRADATA ld hl, W_MAPSPRITEEXTRADATA
ld a, [H_DOWNARROWBLINKCNT2] ld a, [hSpriteIndexOrTextID]
dec a dec a
add a add a
ld d, 0 ld d, 0

View file

@ -39,7 +39,7 @@ LoadMapSpriteTilePatterns: ; 17871 (5:7871)
ld b,$10 ; number of sprite slots ld b,$10 ; number of sprite slots
ld hl,wSpriteStateData2 + $0d ld hl,wSpriteStateData2 + $0d
xor a xor a
ld [$ff8e],a ; 4-tile sprite counter ld [hFourTileSpriteCount],a
.copyPictureIDLoop ; loop to copy picture ID from $C2XD to $C2XE .copyPictureIDLoop ; loop to copy picture ID from $C2XD to $C2XE
ld a,[hli] ; $C2XD (sprite picture ID) ld a,[hli] ; $C2XD (sprite picture ID)
ld [hld],a ; $C2XE ld [hld],a ; $C2XE
@ -98,14 +98,14 @@ LoadMapSpriteTilePatterns: ; 17871 (5:7871)
cp a,SPRITE_BALL ; is it a 4-tile sprite? cp a,SPRITE_BALL ; is it a 4-tile sprite?
jr c,.notFourTileSprite jr c,.notFourTileSprite
pop af pop af
ld a,[$ff8e] ; 4-tile sprite counter ld a,[hFourTileSpriteCount]
add a,11 add a,11
jr .storeVRAMSlot jr .storeVRAMSlot
.notFourTileSprite .notFourTileSprite
pop af pop af
.storeVRAMSlot .storeVRAMSlot
ld [hl],a ; store VRAM slot at $C2XE ld [hl],a ; store VRAM slot at $C2XE
ld [$ff8d],a ; used to determine if it's 4-tile sprite later ld [hVRAMSlot],a ; used to determine if it's 4-tile sprite later
ld a,b ; a = current sprite picture ID ld a,b ; a = current sprite picture ID
dec a dec a
add a add a
@ -128,7 +128,7 @@ LoadMapSpriteTilePatterns: ; 17871 (5:7871)
push bc push bc
ld hl,vNPCSprites ; VRAM base address ld hl,vNPCSprites ; VRAM base address
ld bc,$c0 ; number of bytes per VRAM slot ld bc,$c0 ; number of bytes per VRAM slot
ld a,[$ff8d] ld a,[hVRAMSlot]
cp a,11 ; is it a 4-tile sprite? cp a,11 ; is it a 4-tile sprite?
jr nc,.fourTileSpriteVRAMAddr jr nc,.fourTileSpriteVRAMAddr
ld d,a ld d,a
@ -142,13 +142,13 @@ LoadMapSpriteTilePatterns: ; 17871 (5:7871)
jr .loadStillTilePattern jr .loadStillTilePattern
.fourTileSpriteVRAMAddr .fourTileSpriteVRAMAddr
ld hl,vSprites + $7c0 ; address for second 4-tile sprite ld hl,vSprites + $7c0 ; address for second 4-tile sprite
ld a,[$ff8e] ; 4-tile sprite counter ld a,[hFourTileSpriteCount]
and a ; is it the first 4-tile sprite? and a
jr nz,.loadStillTilePattern jr nz,.loadStillTilePattern
; if it's the first 4-tile sprite ; if it's the first 4-tile sprite
ld hl,vSprites + $780 ; address for first 4-tile sprite ld hl,vSprites + $780 ; address for first 4-tile sprite
inc a inc a
ld [$ff8e],a ; 4-tile sprite counter ld [hFourTileSpriteCount],a
.loadStillTilePattern .loadStillTilePattern
pop bc pop bc
pop de pop de
@ -168,7 +168,7 @@ LoadMapSpriteTilePatterns: ; 17871 (5:7871)
.skipFirstLoad .skipFirstLoad
pop de pop de
pop hl pop hl
ld a,[$ff8d] ld a,[hVRAMSlot]
cp a,11 ; is it a 4-tile sprite? cp a,11 ; is it a 4-tile sprite?
jr nc,.skipSecondLoad ; if so, there is no second block jr nc,.skipSecondLoad ; if so, there is no second block
push de push de

View file

@ -111,7 +111,7 @@ PredefPointers:: ; 4fe79 (13:7e79)
add_predef InternalClockTradeAnim add_predef InternalClockTradeAnim
add_predef TrainerEngage add_predef TrainerEngage
add_predef IndexToPokedex add_predef IndexToPokedex
add_predef Predef3B; 3B display pic? add_predef DisplayPicCenteredOrUpperRight; 3B display pic?
add_predef UsedCut add_predef UsedCut
add_predef ShowPokedexData add_predef ShowPokedexData
add_predef WriteMonMoves add_predef WriteMonMoves
@ -144,7 +144,7 @@ PredefPointers:: ; 4fe79 (13:7e79)
add_predef GetTileTwoStepsInFrontOfPlayer add_predef GetTileTwoStepsInFrontOfPlayer
add_predef CheckForCollisionWhenPushingBoulder add_predef CheckForCollisionWhenPushingBoulder
add_predef PrintStrengthTxt add_predef PrintStrengthTxt
add_predef PickupItem add_predef PickUpItem
add_predef PrintMoveType add_predef PrintMoveType
add_predef LoadMovePPs add_predef LoadMovePPs
add_predef DrawHP ; 5F add_predef DrawHP ; 5F

View file

@ -969,10 +969,10 @@ PokeCenterSignText:: ; 24ef (0:24ef)
TX_FAR _PokeCenterSignText TX_FAR _PokeCenterSignText
db "@" db "@"
Predef5CText:: ; 24f4 (0:24f4) PickUpItemText:: ; 24f4 (0:24f4)
; XXX better label (what does predef $5C do?) ; XXX better label (what does predef $5C do?)
TX_ASM TX_ASM
predef PickupItem predef PickUpItem
jp TextScriptEnd jp TextScriptEnd
@ -1050,7 +1050,7 @@ Func_28cb:: ; 28cb (0:28cb)
jp PlaySound jp PlaySound
; this function is used to display sign messages, sprite dialog, etc. ; this function is used to display sign messages, sprite dialog, etc.
; INPUT: [$ff8c] = sprite ID or text ID ; INPUT: [hSpriteIndexOrTextID] = sprite ID or text ID
DisplayTextID:: ; 2920 (0:2920) DisplayTextID:: ; 2920 (0:2920)
ld a,[H_LOADEDROMBANK] ld a,[H_LOADEDROMBANK]
push af push af
@ -1069,7 +1069,7 @@ DisplayTextID:: ; 2920 (0:2920)
ld h,[hl] ld h,[hl]
ld l,a ; hl = map text pointer ld l,a ; hl = map text pointer
ld d,$00 ld d,$00
ld a,[$ff8c] ; text ID ld a,[hSpriteIndexOrTextID] ; text ID
ld [wSpriteIndex],a ld [wSpriteIndex],a
and a and a
jp z,DisplayStartMenu jp z,DisplayStartMenu
@ -1083,7 +1083,7 @@ DisplayTextID:: ; 2920 (0:2920)
jp z,DisplayRepelWoreOffText jp z,DisplayRepelWoreOffText
ld a,[W_NUMSPRITES] ld a,[W_NUMSPRITES]
ld e,a ld e,a
ld a,[$ff8c] ; sprite ID ld a,[hSpriteIndexOrTextID] ; sprite ID
cp e cp e
jr z,.spriteHandling jr z,.spriteHandling
jr nc,.skipSpriteHandling jr nc,.skipSpriteHandling
@ -1096,7 +1096,7 @@ DisplayTextID:: ; 2920 (0:2920)
pop bc pop bc
pop de pop de
ld hl,W_MAPSPRITEDATA ; NPC text entries ld hl,W_MAPSPRITEDATA ; NPC text entries
ld a,[$ff8c] ld a,[hSpriteIndexOrTextID]
dec a dec a
add a add a
add l add l
@ -1235,10 +1235,12 @@ LoadItemList:: ; 2a5a (0:2a5a)
ret ret
DisplayPokemonCenterDialogue:: ; 2a72 (0:2a72) DisplayPokemonCenterDialogue:: ; 2a72 (0:2a72)
; zeroing these doesn't appear to serve any purpose
xor a xor a
ld [$ff8b],a ld [$ff8b],a
ld [$ff8c],a ld [$ff8c],a
ld [$ff8d],a ld [$ff8d],a
inc hl inc hl
ld a,[H_LOADEDROMBANK] ld a,[H_LOADEDROMBANK]
push af push af
@ -2487,8 +2489,8 @@ CheckForEngagingTrainers:: ; 3306 (0:3306)
ld c, a ld c, a
call TrainerFlagAction ; read trainer flag call TrainerFlagAction ; read trainer flag
ld a, c ld a, c
and a and a ; has the trainer already been defeated?
jr nz, .trainerAlreadyFought jr nz, .continue
push hl push hl
push de push de
push hl push hl
@ -2507,7 +2509,7 @@ CheckForEngagingTrainers:: ; 3306 (0:3306)
ld a, [wTrainerSpriteOffset] ld a, [wTrainerSpriteOffset]
and a and a
ret nz ; break if the trainer is engaging ret nz ; break if the trainer is engaging
.trainerAlreadyFought .continue
ld hl, $c ld hl, $c
add hl, de add hl, de
ld d, h ld d, h
@ -2737,7 +2739,7 @@ SetSpriteFacingDirection:: ; 34ae (0:34ae)
ld a, $9 ld a, $9
ld [H_SPRITEDATAOFFSET], a ld [H_SPRITEDATAOFFSET], a
call GetPointerWithinSpriteStateData1 call GetPointerWithinSpriteStateData1
ld a, [$ff8d] ld a, [hSpriteFacingDirection]
ld [hl], a ld [hl], a
ret ret
@ -2858,18 +2860,18 @@ DecodeRLEList:: ; 350c (0:350c)
inc a ; include sentinel in counting inc a ; include sentinel in counting
ret ret
; sets movement byte 1 for sprite [$FF8C] to $FE and byte 2 to [$FF8D] ; sets movement byte 1 for sprite [H_SPRITEINDEX] to $FE and byte 2 to [hSpriteMovementByte2]
SetSpriteMovementBytesToFE:: ; 3533 (0:3533) SetSpriteMovementBytesToFE:: ; 3533 (0:3533)
push hl push hl
call GetSpriteMovementByte1Pointer call GetSpriteMovementByte1Pointer
ld [hl], $fe ld [hl], $fe
call GetSpriteMovementByte2Pointer call GetSpriteMovementByte2Pointer
ld a, [$ff8d] ld a, [hSpriteMovementByte2]
ld [hl], a ld [hl], a
pop hl pop hl
ret ret
; sets both movement bytes for sprite [$FF8C] to $FF ; sets both movement bytes for sprite [H_SPRITEINDEX] to $FF
SetSpriteMovementBytesToFF:: ; 3541 (0:3541) SetSpriteMovementBytesToFF:: ; 3541 (0:3541)
push hl push hl
call GetSpriteMovementByte1Pointer call GetSpriteMovementByte1Pointer
@ -2879,20 +2881,20 @@ SetSpriteMovementBytesToFF:: ; 3541 (0:3541)
pop hl pop hl
ret ret
; returns the sprite movement byte 1 pointer for sprite [$FF8C] in hl ; returns the sprite movement byte 1 pointer for sprite [H_SPRITEINDEX] in hl
GetSpriteMovementByte1Pointer:: ; 354e (0:354e) GetSpriteMovementByte1Pointer:: ; 354e (0:354e)
ld h,$C2 ld h,$C2
ld a,[H_SPRITEINDEX] ; the sprite to move ld a,[H_SPRITEINDEX]
swap a swap a
add a,6 add a,6
ld l,a ld l,a
ret ret
; returns the sprite movement byte 2 pointer for sprite [$FF8C] in hl ; returns the sprite movement byte 2 pointer for sprite [H_SPRITEINDEX] in hl
GetSpriteMovementByte2Pointer:: ; 3558 (0:3558) GetSpriteMovementByte2Pointer:: ; 3558 (0:3558)
push de push de
ld hl,W_MAPSPRITEDATA ld hl,W_MAPSPRITEDATA
ld a,[$FF8C] ; the sprite to move ld a,[H_SPRITEINDEX]
dec a dec a
add a add a
ld d,0 ld d,0

View file

@ -1,10 +1,10 @@
FarCopyData2:: FarCopyData2::
; Identical to FarCopyData, but uses $ff8b ; Identical to FarCopyData, but uses hROMBankTemp
; as temp space instead of wBuffer. ; as temp space instead of wBuffer.
ld [$ff8b],a ld [hROMBankTemp],a
ld a,[H_LOADEDROMBANK] ld a,[H_LOADEDROMBANK]
push af push af
ld a,[$ff8b] ld a,[hROMBankTemp]
ld [H_LOADEDROMBANK],a ld [H_LOADEDROMBANK],a
ld [MBC1RomBank],a ld [MBC1RomBank],a
call CopyData call CopyData
@ -15,10 +15,10 @@ FarCopyData2::
FarCopyData3:: FarCopyData3::
; Copy bc bytes from a:de to hl. ; Copy bc bytes from a:de to hl.
ld [$ff8b],a ld [hROMBankTemp],a
ld a,[H_LOADEDROMBANK] ld a,[H_LOADEDROMBANK]
push af push af
ld a,[$ff8b] ld a,[hROMBankTemp]
ld [H_LOADEDROMBANK],a ld [H_LOADEDROMBANK],a
ld [MBC1RomBank],a ld [MBC1RomBank],a
push hl push hl
@ -38,10 +38,10 @@ FarCopyData3::
FarCopyDataDouble:: FarCopyDataDouble::
; Expand bc bytes of 1bpp image data ; Expand bc bytes of 1bpp image data
; from a:hl to 2bpp data at de. ; from a:hl to 2bpp data at de.
ld [$ff8b],a ld [hROMBankTemp],a
ld a,[H_LOADEDROMBANK] ld a,[H_LOADEDROMBANK]
push af push af
ld a,[$ff8b] ld a,[hROMBankTemp]
ld [H_LOADEDROMBANK],a ld [H_LOADEDROMBANK],a
ld [MBC1RomBank],a ld [MBC1RomBank],a
.loop .loop
@ -70,7 +70,7 @@ CopyVideoData::
ld [H_AUTOBGTRANSFERENABLED], a ld [H_AUTOBGTRANSFERENABLED], a
ld a, [H_LOADEDROMBANK] ld a, [H_LOADEDROMBANK]
ld [$ff8b], a ld [hROMBankTemp], a
ld a, b ld a, b
ld [H_LOADEDROMBANK], a ld [H_LOADEDROMBANK], a
@ -94,7 +94,7 @@ CopyVideoData::
.done .done
ld [H_VBCOPYSIZE], a ld [H_VBCOPYSIZE], a
call DelayFrame call DelayFrame
ld a, [$ff8b] ld a, [hROMBankTemp]
ld [H_LOADEDROMBANK], a ld [H_LOADEDROMBANK], a
ld [MBC1RomBank], a ld [MBC1RomBank], a
pop af pop af
@ -119,7 +119,7 @@ CopyVideoDataDouble::
xor a ; disable auto-transfer while copying xor a ; disable auto-transfer while copying
ld [H_AUTOBGTRANSFERENABLED], a ld [H_AUTOBGTRANSFERENABLED], a
ld a, [H_LOADEDROMBANK] ld a, [H_LOADEDROMBANK]
ld [$ff8b], a ld [hROMBankTemp], a
ld a, b ld a, b
ld [H_LOADEDROMBANK], a ld [H_LOADEDROMBANK], a
@ -143,7 +143,7 @@ CopyVideoDataDouble::
.done .done
ld [H_VBCOPYDOUBLESIZE], a ld [H_VBCOPYDOUBLESIZE], a
call DelayFrame call DelayFrame
ld a, [$ff8b] ld a, [hROMBankTemp]
ld [H_LOADEDROMBANK], a ld [H_LOADEDROMBANK], a
ld [MBC1RomBank], a ld [MBC1RomBank], a
pop af pop af

View file

@ -444,7 +444,7 @@ CheckWarpsCollision:: ; 0706 (0:0706)
ld a,[hli] ld a,[hli]
ld [wDestinationWarpID],a ld [wDestinationWarpID],a
ld a,[hl] ld a,[hl]
ld [$ff8b],a ; save target map ld [hWarpDestinationMap],a
jr WarpFound2 jr WarpFound2
.retry1 .retry1
inc hl inc hl
@ -466,7 +466,7 @@ WarpFound1:: ; 0735 (0:0735)
ld a,[hli] ld a,[hli]
ld [wDestinationWarpID],a ld [wDestinationWarpID],a
ld a,[hli] ld a,[hli]
ld [$ff8b],a ; save target map ld [hWarpDestinationMap],a
WarpFound2:: ; 073c (0:073c) WarpFound2:: ; 073c (0:073c)
ld a,[wNumberOfWarps] ld a,[wNumberOfWarps]
@ -481,8 +481,8 @@ WarpFound2:: ; 073c (0:073c)
ld [wLastMap],a ld [wLastMap],a
ld a,[W_CURMAPWIDTH] ld a,[W_CURMAPWIDTH]
ld [wd366],a ld [wd366],a
ld a,[$ff8b] ; destination map number ld a,[hWarpDestinationMap]
ld [W_CURMAP],a ; change current map to destination map ld [W_CURMAP],a
cp a,ROCK_TUNNEL_1 cp a,ROCK_TUNNEL_1
jr nz,.notRockTunnel jr nz,.notRockTunnel
ld a,$06 ld a,$06
@ -493,11 +493,11 @@ WarpFound2:: ; 073c (0:073c)
jr .done jr .done
; for maps that can have the 0xFF destination map, which means to return to the outside map; not all these maps are necessarily indoors, though ; for maps that can have the 0xFF destination map, which means to return to the outside map; not all these maps are necessarily indoors, though
.indoorMaps .indoorMaps
ld a,[$ff8b] ; destination map ld a,[hWarpDestinationMap] ; destination map
cp a,$ff cp a,$ff
jr z,.goBackOutside jr z,.goBackOutside
; if not going back to the previous map ; if not going back to the previous map
ld [W_CURMAP],a ; current map number ld [W_CURMAP],a
callba IsPlayerStandingOnWarpPadOrHole callba IsPlayerStandingOnWarpPadOrHole
ld a,[wcd5b] ld a,[wcd5b]
dec a ; is the player on a warp pad? dec a ; is the player on a warp pad?
@ -539,22 +539,22 @@ CheckMapConnections:: ; 07ba (0:07ba)
jr nz,.checkEastMap jr nz,.checkEastMap
ld a,[W_MAPCONN3PTR] ld a,[W_MAPCONN3PTR]
ld [W_CURMAP],a ld [W_CURMAP],a
ld a,[wd38f] ; new X coordinate upon entering west map ld a,[wWestConnectedMapXAlignment] ; new X coordinate upon entering west map
ld [W_XCOORD],a ld [W_XCOORD],a
ld a,[W_YCOORD] ld a,[W_YCOORD]
ld c,a ld c,a
ld a,[wd38e] ; Y adjustment upon entering west map ld a,[wWestConnectedMapYAlignment] ; Y adjustment upon entering west map
add c add c
ld c,a ld c,a
ld [W_YCOORD],a ld [W_YCOORD],a
ld a,[wd390] ; pointer to upper left corner of map without adjustment for Y position ld a,[wWestConnectedMapViewPointer] ; pointer to upper left corner of map without adjustment for Y position
ld l,a ld l,a
ld a,[wd391] ld a,[wWestConnectedMapViewPointer + 1]
ld h,a ld h,a
srl c srl c
jr z,.savePointer1 jr z,.savePointer1
.pointerAdjustmentLoop1 .pointerAdjustmentLoop1
ld a,[wd38d] ; width of connected map ld a,[wWestConnectedMapWidth] ; width of connected map
add a,$06 add a,$06
ld e,a ld e,a
ld d,$00 ld d,$00
@ -575,22 +575,22 @@ CheckMapConnections:: ; 07ba (0:07ba)
jr nz,.checkNorthMap jr nz,.checkNorthMap
ld a,[W_MAPCONN4PTR] ld a,[W_MAPCONN4PTR]
ld [W_CURMAP],a ld [W_CURMAP],a
ld a,[wd39a] ; new X coordinate upon entering east map ld a,[wEastConnectedMapXAlignment] ; new X coordinate upon entering east map
ld [W_XCOORD],a ld [W_XCOORD],a
ld a,[W_YCOORD] ld a,[W_YCOORD]
ld c,a ld c,a
ld a,[wd399] ; Y adjustment upon entering east map ld a,[wEastConnectedMapYAlignment] ; Y adjustment upon entering east map
add c add c
ld c,a ld c,a
ld [W_YCOORD],a ld [W_YCOORD],a
ld a,[wd39b] ; pointer to upper left corner of map without adjustment for Y position ld a,[wEastConnectedMapViewPointer] ; pointer to upper left corner of map without adjustment for Y position
ld l,a ld l,a
ld a,[wd39c] ld a,[wEastConnectedMapViewPointer + 1]
ld h,a ld h,a
srl c srl c
jr z,.savePointer2 jr z,.savePointer2
.pointerAdjustmentLoop2 .pointerAdjustmentLoop2
ld a,[wd398] ld a,[wEastConnectedMapWidth]
add a,$06 add a,$06
ld e,a ld e,a
ld d,$00 ld d,$00
@ -610,19 +610,19 @@ CheckMapConnections:: ; 07ba (0:07ba)
jr nz,.checkSouthMap jr nz,.checkSouthMap
ld a,[W_MAPCONN1PTR] ld a,[W_MAPCONN1PTR]
ld [W_CURMAP],a ld [W_CURMAP],a
ld a,[wd378] ; new Y coordinate upon entering north map ld a,[wNorthConnectedMapYAlignment] ; new Y coordinate upon entering north map
ld [W_YCOORD],a ld [W_YCOORD],a
ld a,[W_XCOORD] ld a,[W_XCOORD]
ld c,a ld c,a
ld a,[wd379] ; X adjustment upon entering north map ld a,[wNorthConnectedMapXAlignment] ; X adjustment upon entering north map
add c add c
ld c,a ld c,a
ld [W_XCOORD],a ld [W_XCOORD],a
ld a,[wd37a] ; pointer to upper left corner of map without adjustment for X position ld a,[wNorthConnectedMapViewPointer] ; pointer to upper left corner of map without adjustment for X position
ld l,a ld l,a
ld a,[wd37b] ld a,[wNorthConnectedMapViewPointer + 1]
ld h,a ld h,a
ld b,$00 ld b,0
srl c srl c
add hl,bc add hl,bc
ld a,l ld a,l
@ -637,19 +637,19 @@ CheckMapConnections:: ; 07ba (0:07ba)
jr nz,.didNotEnterConnectedMap jr nz,.didNotEnterConnectedMap
ld a,[W_MAPCONN2PTR] ld a,[W_MAPCONN2PTR]
ld [W_CURMAP],a ld [W_CURMAP],a
ld a,[wd383] ; new Y coordinate upon entering south map ld a,[wSouthConnectedMapYAlignment] ; new Y coordinate upon entering south map
ld [W_YCOORD],a ld [W_YCOORD],a
ld a,[W_XCOORD] ld a,[W_XCOORD]
ld c,a ld c,a
ld a,[wd384] ; X adjustment upon entering south map ld a,[wSouthConnectedMapXAlignment] ; X adjustment upon entering south map
add c add c
ld c,a ld c,a
ld [W_XCOORD],a ld [W_XCOORD],a
ld a,[wd385] ; pointer to upper left corner of map without adjustment for X position ld a,[wSouthConnectedMapViewPointer] ; pointer to upper left corner of map without adjustment for X position
ld l,a ld l,a
ld a,[wd386] ld a,[wSouthConnectedMapViewPointer + 1]
ld h,a ld h,a
ld b,$00 ld b,0
srl c srl c
add hl,bc add hl,bc
ld a,l ld a,l
@ -884,9 +884,9 @@ LoadTileBlockMap:: ; 09fc (0:09fc)
; a 3-byte border at the edges of the map is kept so that there is space for map connections ; a 3-byte border at the edges of the map is kept so that there is space for map connections
ld hl,wOverworldMap ld hl,wOverworldMap
ld a,[W_CURMAPWIDTH] ld a,[W_CURMAPWIDTH]
ld [$ff8c],a ld [hMapWidth],a
add a,$06 ; border (east and west) add a,$06 ; border (east and west)
ld [$ff8b],a ; map width + border ld [hMapStride],a ; map width + border
ld b,$00 ld b,$00
ld c,a ld c,a
; make space for north border (next 3 lines) ; make space for north border (next 3 lines)
@ -903,7 +903,7 @@ LoadTileBlockMap:: ; 09fc (0:09fc)
ld b,a ld b,a
.rowLoop ; copy one row each iteration .rowLoop ; copy one row each iteration
push hl push hl
ld a,[$ff8c] ; map width (without border) ld a,[hMapWidth] ; map width (without border)
ld c,a ld c,a
.rowInnerLoop .rowInnerLoop
ld a,[de] ld a,[de]
@ -913,7 +913,7 @@ LoadTileBlockMap:: ; 09fc (0:09fc)
jr nz,.rowInnerLoop jr nz,.rowInnerLoop
; add the map width plus the border to the base address of the current row to get the next row's address ; add the map width plus the border to the base address of the current row to get the next row's address
pop hl pop hl
ld a,[$ff8b] ; map width + border ld a,[hMapStride] ; map width + border
add l add l
ld l,a ld l,a
jr nc,.noCarry jr nc,.noCarry
@ -926,72 +926,72 @@ LoadTileBlockMap:: ; 09fc (0:09fc)
cp a,$ff cp a,$ff
jr z,.southConnection jr z,.southConnection
call SwitchToMapRomBank call SwitchToMapRomBank
ld a,[wd372] ld a,[wNorthConnectionStripSrc]
ld l,a ld l,a
ld a,[wd373] ld a,[wNorthConnectionStripSrc + 1]
ld h,a ld h,a
ld a,[wd374] ld a,[wNorthConnectionStripDest]
ld e,a ld e,a
ld a,[wd375] ld a,[wNorthConnectionStripDest + 1]
ld d,a ld d,a
ld a,[wd376] ld a,[wNorthConnectionStripWidth]
ld [$ff8b],a ld [hNorthSouthConnectionStripWidth],a
ld a,[wd377] ld a,[wNorthConnectedMapWidth]
ld [$ff8c],a ld [hNorthSouthConnectedMapWidth],a
call LoadNorthSouthConnectionsTileMap call LoadNorthSouthConnectionsTileMap
.southConnection .southConnection
ld a,[W_MAPCONN2PTR] ld a,[W_MAPCONN2PTR]
cp a,$ff cp a,$ff
jr z,.westConnection jr z,.westConnection
call SwitchToMapRomBank call SwitchToMapRomBank
ld a,[wd37d] ld a,[wSouthConnectionStripSrc]
ld l,a ld l,a
ld a,[wd37e] ld a,[wSouthConnectionStripSrc + 1]
ld h,a ld h,a
ld a,[wd37f] ld a,[wSouthConnectionStripDest]
ld e,a ld e,a
ld a,[wd380] ld a,[wSouthConnectionStripDest + 1]
ld d,a ld d,a
ld a,[wd381] ld a,[wSouthConnectionStripWidth]
ld [$ff8b],a ld [hNorthSouthConnectionStripWidth],a
ld a,[wd382] ld a,[wSouthConnectedMapWidth]
ld [$ff8c],a ld [hNorthSouthConnectedMapWidth],a
call LoadNorthSouthConnectionsTileMap call LoadNorthSouthConnectionsTileMap
.westConnection .westConnection
ld a,[W_MAPCONN3PTR] ld a,[W_MAPCONN3PTR]
cp a,$ff cp a,$ff
jr z,.eastConnection jr z,.eastConnection
call SwitchToMapRomBank call SwitchToMapRomBank
ld a,[wd388] ld a,[wWestConnectionStripSrc]
ld l,a ld l,a
ld a,[wd389] ld a,[wWestConnectionStripSrc + 1]
ld h,a ld h,a
ld a,[wd38a] ld a,[wWestConnectionStripDest]
ld e,a ld e,a
ld a,[wd38b] ld a,[wWestConnectionStripDest + 1]
ld d,a ld d,a
ld a,[wd38c] ld a,[wWestConnectionStripHeight]
ld b,a ld b,a
ld a,[wd38d] ld a,[wWestConnectedMapWidth]
ld [$ff8b],a ld [hEastWestConnectedMapWidth],a
call LoadEastWestConnectionsTileMap call LoadEastWestConnectionsTileMap
.eastConnection .eastConnection
ld a,[W_MAPCONN4PTR] ld a,[W_MAPCONN4PTR]
cp a,$ff cp a,$ff
jr z,.done jr z,.done
call SwitchToMapRomBank call SwitchToMapRomBank
ld a,[wd393] ld a,[wEastConnectionStripSrc]
ld l,a ld l,a
ld a,[wd394] ld a,[wEastConnectionStripSrc + 1]
ld h,a ld h,a
ld a,[wd395] ld a,[wEastConnectionStripDest]
ld e,a ld e,a
ld a,[wd396] ld a,[wEastConnectionStripDest + 1]
ld d,a ld d,a
ld a,[wd397] ld a,[wEastConnectionStripHeight]
ld b,a ld b,a
ld a,[wd398] ld a,[wEastConnectedMapWidth]
ld [$ff8b],a ld [hEastWestConnectedMapWidth],a
call LoadEastWestConnectionsTileMap call LoadEastWestConnectionsTileMap
.done .done
ret ret
@ -1001,7 +1001,7 @@ LoadNorthSouthConnectionsTileMap:: ; 0ade (0:0ade)
.loop .loop
push de push de
push hl push hl
ld a,[$ff8b] ; width of connection ld a,[hNorthSouthConnectionStripWidth]
ld b,a ld b,a
.innerLoop .innerLoop
ld a,[hli] ld a,[hli]
@ -1011,7 +1011,7 @@ LoadNorthSouthConnectionsTileMap:: ; 0ade (0:0ade)
jr nz,.innerLoop jr nz,.innerLoop
pop hl pop hl
pop de pop de
ld a,[$ff8c] ; width of connected map ld a,[hNorthSouthConnectedMapWidth]
add l add l
ld l,a ld l,a
jr nc,.noCarry1 jr nc,.noCarry1
@ -1040,7 +1040,7 @@ LoadEastWestConnectionsTileMap:: ; 0b02 (0:0b02)
jr nz,.innerLoop jr nz,.innerLoop
pop de pop de
pop hl pop hl
ld a,[$ff8b] ; width of connected map ld a,[hEastWestConnectedMapWidth]
add l add l
ld l,a ld l,a
jr nc,.noCarry1 jr nc,.noCarry1
@ -2022,7 +2022,7 @@ LoadMapHeader:: ; 107c (0:107c)
ld b,a ld b,a
res 7,a res 7,a
ld [W_CURMAPTILESET],a ld [W_CURMAPTILESET],a
ld [$ff8b],a ld [hPreviousTileset],a
bit 7,b bit 7,b
ret nz ret nz
ld hl,MapHeaderPointers ld hl,MapHeaderPointers
@ -2191,24 +2191,24 @@ LoadMapHeader:: ; 107c (0:107c)
ld a,[hli] ld a,[hli]
ld [de],a ; store movement byte 1 at C2X6 ld [de],a ; store movement byte 1 at C2X6
ld a,[hli] ld a,[hli]
ld [$ff8d],a ; save movement byte 2 ld [hLoadSpriteTemp1],a ; save movement byte 2
ld a,[hli] ld a,[hli]
ld [$ff8e],a ; save text ID and flags byte ld [hLoadSpriteTemp2],a ; save text ID and flags byte
push bc push bc
push hl push hl
ld b,$00 ld b,$00
ld hl,W_MAPSPRITEDATA ld hl,W_MAPSPRITEDATA
add hl,bc add hl,bc
ld a,[$ff8d] ld a,[hLoadSpriteTemp1]
ld [hli],a ; store movement byte 2 in byte 0 of sprite entry ld [hli],a ; store movement byte 2 in byte 0 of sprite entry
ld a,[$ff8e] ld a,[hLoadSpriteTemp2]
ld [hl],a ; this appears pointless, since the value is overwritten immediately after ld [hl],a ; this appears pointless, since the value is overwritten immediately after
ld a,[$ff8e] ld a,[hLoadSpriteTemp2]
ld [$ff8d],a ld [hLoadSpriteTemp1],a
and a,$3f and a,$3f
ld [hl],a ; store text ID in byte 1 of sprite entry ld [hl],a ; store text ID in byte 1 of sprite entry
pop hl pop hl
ld a,[$ff8d] ld a,[hLoadSpriteTemp1]
bit 6,a bit 6,a
jr nz,.trainerSprite jr nz,.trainerSprite
bit 7,a bit 7,a
@ -2216,25 +2216,25 @@ LoadMapHeader:: ; 107c (0:107c)
jr .regularSprite jr .regularSprite
.trainerSprite .trainerSprite
ld a,[hli] ld a,[hli]
ld [$ff8d],a ; save trainer class ld [hLoadSpriteTemp1],a ; save trainer class
ld a,[hli] ld a,[hli]
ld [$ff8e],a ; save trainer number (within class) ld [hLoadSpriteTemp2],a ; save trainer number (within class)
push hl push hl
ld hl,W_MAPSPRITEEXTRADATA ld hl,W_MAPSPRITEEXTRADATA
add hl,bc add hl,bc
ld a,[$ff8d] ld a,[hLoadSpriteTemp1]
ld [hli],a ; store trainer class in byte 0 of the entry ld [hli],a ; store trainer class in byte 0 of the entry
ld a,[$ff8e] ld a,[hLoadSpriteTemp2]
ld [hl],a ; store trainer number in byte 1 of the entry ld [hl],a ; store trainer number in byte 1 of the entry
pop hl pop hl
jr .nextSprite jr .nextSprite
.itemBallSprite .itemBallSprite
ld a,[hli] ld a,[hli]
ld [$ff8d],a ; save item number ld [hLoadSpriteTemp1],a ; save item number
push hl push hl
ld hl,W_MAPSPRITEEXTRADATA ld hl,W_MAPSPRITEEXTRADATA
add hl,bc add hl,bc
ld a,[$ff8d] ld a,[hLoadSpriteTemp1]
ld [hli],a ; store item number in byte 0 of the entry ld [hli],a ; store item number in byte 0 of the entry
xor a xor a
ld [hl],a ; zero byte 1, since it is not used ld [hl],a ; zero byte 1, since it is not used

View file

@ -1,9 +1,3 @@
H_SPRITEWIDTH EQU $FF8B ; in tiles
H_SPRITEINTERLACECOUNTER EQU $FF8B
H_SPRITEHEIGHT EQU $FF8C ; in tiles
H_SPRITEOFFSET EQU $FF8D
hSoftReset EQU $FF8A hSoftReset EQU $FF8A
; Initialized to 16. ; Initialized to 16.
; Decremented each input iteration if the player ; Decremented each input iteration if the player
@ -12,8 +6,28 @@ hSoftReset EQU $FF8A
hBaseTileID EQU $FF8B hBaseTileID EQU $FF8B
; 3-byte BCD number
hItemPrice EQU $FF8B hItemPrice EQU $FF8B
hDexWeight EQU $FF8B
hWarpDestinationMap EQU $FF8B
hOAMTile EQU $FF8B
hROMBankTemp EQU $FF8B
hPreviousTileset EQU $FF8B
hEastWestConnectedMapWidth EQU $FF8B
hSlideAmount EQU $FF8B
H_SPRITEWIDTH EQU $FF8B ; in tiles
H_SPRITEINTERLACECOUNTER EQU $FF8B
H_SPRITEHEIGHT EQU $FF8C ; in tiles
H_SPRITEOFFSET EQU $FF8D
; counters for blinking down arrow ; counters for blinking down arrow
H_DOWNARROWBLINKCNT1 EQU $FF8B H_DOWNARROWBLINKCNT1 EQU $FF8B
H_DOWNARROWBLINKCNT2 EQU $FF8C H_DOWNARROWBLINKCNT2 EQU $FF8C
@ -21,11 +35,40 @@ H_DOWNARROWBLINKCNT2 EQU $FF8C
H_SPRITEDATAOFFSET EQU $FF8B H_SPRITEDATAOFFSET EQU $FF8B
H_SPRITEINDEX EQU $FF8C H_SPRITEINDEX EQU $FF8C
hMapStride EQU $FF8B
hMapWidth EQU $FF8C
hNorthSouthConnectionStripWidth EQU $FF8B
hNorthSouthConnectedMapWidth EQU $FF8C
; DisplayTextID's argument ; DisplayTextID's argument
hSpriteIndexOrTextID EQU $FF8C hSpriteIndexOrTextID EQU $FF8C
hPartyMonIndex EQU $FF8C hPartyMonIndex EQU $FF8C
; the total number of tiles being shifted each time the pic slides by one tile
hSlidingRegionSize EQU $FF8C
; 2 bytes
hEnemySpeed EQU $FF8D
hVRAMSlot EQU $FF8D
hFourTileSpriteCount EQU $FF8E
; -1 = left
; 0 = right
hSlideDirection EQU $FF8D
hSpriteFacingDirection EQU $FF8D
hSpriteMovementByte2 EQU $FF8D
hSpriteImageIndex EQU $FF8D
hLoadSpriteTemp1 EQU $FF8D
hLoadSpriteTemp2 EQU $FF8E
hHalveItemPrices EQU $FF8E hHalveItemPrices EQU $FF8E
hSpriteOffset2 EQU $FF8F hSpriteOffset2 EQU $FF8F

View file

@ -13,6 +13,10 @@ dex EQUS "db $5f, $50" ; End a Pokedex entry.
percent EQUS "* $ff / 100" percent EQUS "* $ff / 100"
lb: MACRO ; r, hi, lo
ld \1, (\2) << 8 + (\3)
ENDM
; Constant enumeration is useful for monsters, items, moves, etc. ; Constant enumeration is useful for monsters, items, moves, etc.
const_def: MACRO const_def: MACRO
@ -530,7 +534,7 @@ ENDM
SOUTH_MAP_CONNECTION: MACRO SOUTH_MAP_CONNECTION: MACRO
db \1 ; map id db \1 ; map id
dw \6 + \4 ; "Conection Strip" location dw \6 + \4 ; "Conection Strip" location
dw wOverworldMap + 3 + (\8 + 3) * (\7 + 6) + \3 ; current map positoin dw wOverworldMap + 3 + (\8 + 3) * (\7 + 6) + \3 ; current map position
db \5 ; width of connection strip db \5 ; width of connection strip
db \2 ; map width db \2 ; map width
db 0 ; y alignment (y coordinate of player when entering map) db 0 ; y alignment (y coordinate of player when entering map)

View file

@ -996,7 +996,7 @@ DisplayTextIDInit: ; 7096 (1:7096)
ld a,[wAutoTextBoxDrawingControl] ld a,[wAutoTextBoxDrawingControl]
bit 0,a bit 0,a
jr nz,.skipDrawingTextBoxBorder jr nz,.skipDrawingTextBoxBorder
ld a,[$ff8c] ; text ID (or sprite ID) ld a,[hSpriteIndexOrTextID] ; text ID (or sprite ID)
and a and a
jr nz,.notStartMenu jr nz,.notStartMenu
; if text ID is 0 (i.e. the start menu) ; if text ID is 0 (i.e. the start menu)
@ -2094,7 +2094,7 @@ IsPlayerStandingOnWarp: ; c35f (3:435f)
ld a, [hli] ; target warp ld a, [hli] ; target warp
ld [wDestinationWarpID], a ld [wDestinationWarpID], a
ld a, [hl] ; target map ld a, [hl] ; target map
ld [$ff8b], a ld [hWarpDestinationMap], a
ld hl, wd736 ld hl, wd736
set 2, [hl] ; standing on warp flag set 2, [hl] ; standing on warp flag
ret ret
@ -2593,7 +2593,7 @@ ApplyOutOfBattlePoisonDamage: ; c69c (3:469c)
ld [wJoyIgnore], a ld [wJoyIgnore], a
call EnableAutoTextBoxDrawing call EnableAutoTextBoxDrawing
ld a, $d0 ld a, $d0
ld [$ff8c], a ld [hSpriteIndexOrTextID], a
call DisplayTextID call DisplayTextID
pop de pop de
pop hl pop hl
@ -2640,7 +2640,7 @@ ApplyOutOfBattlePoisonDamage: ; c69c (3:469c)
jr nz, .noBlackOut jr nz, .noBlackOut
call EnableAutoTextBoxDrawing call EnableAutoTextBoxDrawing
ld a, $d1 ld a, $d1
ld [$ff8c], a ld [hSpriteIndexOrTextID], a
call DisplayTextID call DisplayTextID
ld hl, wd72e ld hl, wd72e
set 5, [hl] set 5, [hl]
@ -2692,7 +2692,7 @@ LoadTilesetHeader: ; c754 (3:4754)
jr c, .asm_c797 jr c, .asm_c797
ld a, [W_CURMAPTILESET] ld a, [W_CURMAPTILESET]
ld b, a ld b, a
ld a, [$ff8b] ld a, [hPreviousTileset]
cp b cp b
jr z, .done jr z, .done
.asm_c797 .asm_c797
@ -3454,15 +3454,15 @@ TryPushingBoulder: ; f225 (3:7225)
bit 1, a ; has boulder dust animation from previous push played yet? bit 1, a ; has boulder dust animation from previous push played yet?
ret nz ret nz
xor a xor a
ld [$ff8c], a ld [hSpriteIndexOrTextID], a
call IsSpriteInFrontOfPlayer call IsSpriteInFrontOfPlayer
ld a, [$ff8c] ld a, [hSpriteIndexOrTextID]
ld [wBoulderSpriteIndex], a ld [wBoulderSpriteIndex], a
and a and a
jp z, ResetBoulderPushFlags jp z, ResetBoulderPushFlags
ld hl, wSpriteStateData1 + 1 ld hl, wSpriteStateData1 + 1
ld d, $0 ld d, $0
ld a, [$ff8c] ld a, [hSpriteIndexOrTextID]
swap a swap a
ld e, a ld e, a
add hl, de add hl, de

View file

@ -76,7 +76,7 @@ AgathaScript0: ; 76490 (1d:6490)
jr z, AgathaScript_76474 jr z, AgathaScript_76474
.asm_764b4 .asm_764b4
ld a, $2 ld a, $2
ld [H_DOWNARROWBLINKCNT2], a ld [hSpriteIndexOrTextID], a
call DisplayTextID call DisplayTextID
ld a, D_UP ld a, D_UP
ld [wSimulatedJoypadStatesEnd], a ld [wSimulatedJoypadStatesEnd], a
@ -112,7 +112,7 @@ AgathaScript2: ; 764ed (1d:64ed)
cp $ff cp $ff
jp z, AgathaScript_76464 jp z, AgathaScript_76464
ld a, $1 ld a, $1
ld [H_DOWNARROWBLINKCNT2], a ld [hSpriteIndexOrTextID], a
call DisplayTextID call DisplayTextID
ld a, $1 ld a, $1
ld [W_GARYCURSCRIPT], a ld [W_GARYCURSCRIPT], a

View file

@ -23,7 +23,7 @@ BillsHouseScript1: ; 1e783 (7:6783)
ld de, MovementData_1e7a0 ld de, MovementData_1e7a0
.notDown .notDown
ld a, $1 ld a, $1
ld [$ff8c], a ld [H_SPRITEINDEX], a
call MoveSprite call MoveSprite
ld a, $2 ld a, $2
ld [W_BILLSHOUSECURSCRIPT], a ld [W_BILLSHOUSECURSCRIPT], a
@ -82,7 +82,7 @@ BillsHouseScript3: ; 1e7c5 (7:67c5)
ld c, 8 ld c, 8
call DelayFrames call DelayFrames
ld a, $2 ld a, $2
ld [$ff8c], a ld [H_SPRITEINDEX], a
ld de, MovementData_1e807 ld de, MovementData_1e807
call MoveSprite call MoveSprite
ld a, $4 ld a, $4
@ -113,7 +113,7 @@ BillsHouseScript4: ; 1e80d (7:680d)
BillsHouseScript5: ; 1e827 (7:6827) BillsHouseScript5: ; 1e827 (7:6827)
ld a, $4 ld a, $4
ld [$ff8c], a ld [hSpriteIndexOrTextID], a
call DisplayTextID call DisplayTextID
ld a, $0 ld a, $0
ld [W_BILLSHOUSECURSCRIPT], a ld [W_BILLSHOUSECURSCRIPT], a

View file

@ -76,7 +76,7 @@ BrunoScript0: ; 76339 (1d:6339)
jr z, BrunoScript_7631d jr z, BrunoScript_7631d
.asm_7635d .asm_7635d
ld a, $2 ld a, $2
ld [H_DOWNARROWBLINKCNT2], a ld [hSpriteIndexOrTextID], a
call DisplayTextID call DisplayTextID
ld a, D_UP ld a, D_UP
ld [wSimulatedJoypadStatesEnd], a ld [wSimulatedJoypadStatesEnd], a
@ -112,7 +112,7 @@ BrunoScript2: ; 76396 (1d:6396)
cp $ff cp $ff
jp z, BrunoScript_7630d jp z, BrunoScript_7630d
ld a, $1 ld a, $1
ld [H_DOWNARROWBLINKCNT2], a ld [hSpriteIndexOrTextID], a
jp DisplayTextID jp DisplayTextID
BrunoTextPointers: ; 763a8 (1d:63a8) BrunoTextPointers: ; 763a8 (1d:63a8)

View file

@ -58,10 +58,10 @@ CeladonGameCornerScript1: ; 48c19 (12:4c19)
ld a, $f0 ld a, $f0
ld [wJoyIgnore], a ld [wJoyIgnore], a
ld a, $d ld a, $d
ld [H_SPRITEHEIGHT], a ld [hSpriteIndexOrTextID], a
call DisplayTextID call DisplayTextID
ld a, $b ld a, $b
ld [H_SPRITEHEIGHT], a ld [H_SPRITEINDEX], a
call SetSpriteMovementBytesToFF call SetSpriteMovementBytesToFF
ld de, MovementData_48c5a ld de, MovementData_48c5a
ld a, [W_YCOORD] ld a, [W_YCOORD]
@ -76,7 +76,7 @@ CeladonGameCornerScript1: ; 48c19 (12:4c19)
ld de, MovementData_48c63 ld de, MovementData_48c63
.asm_48c4d .asm_48c4d
ld a, $b ld a, $b
ld [H_DOWNARROWBLINKCNT2], a ld [H_SPRITEINDEX], a
call MoveSprite call MoveSprite
ld a, $2 ld a, $2
ld [W_CELADONGAMECORNERCURSCRIPT], a ld [W_CELADONGAMECORNERCURSCRIPT], a

View file

@ -44,7 +44,7 @@ CeladonGymScript3: ; 48956 (12:4956)
CeladonGymText_48963: ; 48963 (12:4963) CeladonGymText_48963: ; 48963 (12:4963)
ld a, $9 ld a, $9
ld [H_DOWNARROWBLINKCNT2], a ld [hSpriteIndexOrTextID], a
call DisplayTextID call DisplayTextID
ld hl, wd77c ld hl, wd77c
set 1, [hl] set 1, [hl]
@ -52,14 +52,14 @@ CeladonGymText_48963: ; 48963 (12:4963)
call GiveItem call GiveItem
jr nc, .BagFull jr nc, .BagFull
ld a, $a ld a, $a
ld [H_DOWNARROWBLINKCNT2], a ld [hSpriteIndexOrTextID], a
call DisplayTextID call DisplayTextID
ld hl, wd77c ld hl, wd77c
set 0, [hl] set 0, [hl]
jr .asm_4898c jr .asm_4898c
.BagFull .BagFull
ld a, $b ld a, $b
ld [H_DOWNARROWBLINKCNT2], a ld [hSpriteIndexOrTextID], a
call DisplayTextID call DisplayTextID
.asm_4898c .asm_4898c
ld hl, W_OBTAINEDBADGES ld hl, W_OBTAINEDBADGES

View file

@ -28,7 +28,7 @@ CeruleanCityScript4: ; 194a7 (6:54a7)
ld hl, wd75b ld hl, wd75b
set 7, [hl] set 7, [hl]
ld a, $2 ld a, $2
ld [$ff8c], a ld [hSpriteIndexOrTextID], a
call DisplayTextID call DisplayTextID
xor a xor a
ld [wJoyIgnore], a ld [wJoyIgnore], a
@ -55,7 +55,7 @@ CeruleanCityScript0: ; 194c8 (6:54c8)
ld [wSpriteStateData1 + $29], a ld [wSpriteStateData1 + $29], a
call Delay3 call Delay3
ld a, $2 ld a, $2
ld [$ff8c], a ld [hSpriteIndexOrTextID], a
jp DisplayTextID jp DisplayTextID
.asm_194f7 .asm_194f7
ld a, [wd75a] ld a, [wd75a]
@ -82,9 +82,9 @@ CeruleanCityScript0: ; 194c8 (6:54c8)
cp $14 cp $14
jr z, .asm_19535 jr z, .asm_19535
ld a, $1 ld a, $1
ld [$ff8c], a ld [H_SPRITEINDEX], a
ld a, $5 ld a, $5
ld [$ff8b], a ld [H_SPRITEDATAOFFSET], a
call GetPointerWithinSpriteStateData2 call GetPointerWithinSpriteStateData2
ld [hl], $19 ld [hl], $19
.asm_19535 .asm_19535
@ -93,7 +93,7 @@ CeruleanCityScript0: ; 194c8 (6:54c8)
predef ShowObject predef ShowObject
ld de, CeruleanCityMovement1 ld de, CeruleanCityMovement1
ld a, $1 ld a, $1
ld [$ff8c], a ld [H_SPRITEINDEX], a
call MoveSprite call MoveSprite
ld a, $1 ld a, $1
ld [W_CERULEANCITYCURSCRIPT], a ld [W_CERULEANCITYCURSCRIPT], a
@ -117,9 +117,9 @@ CeruleanCityMovement1: ; 19559 (6:5559)
CeruleanCityScript_1955d: ; 1955d (6:555d) CeruleanCityScript_1955d: ; 1955d (6:555d)
ld a,1 ld a,1
ld [$ff8c],a ld [H_SPRITEINDEX],a
xor a ; SPRITE_FACING_DOWN xor a ; SPRITE_FACING_DOWN
ld [$ff8d],a ld [hSpriteFacingDirection],a
jp SetSpriteFacingDirectionAndDelay ; face object jp SetSpriteFacingDirectionAndDelay ; face object
CeruleanCityScript1: ; 19567 (6:5567) CeruleanCityScript1: ; 19567 (6:5567)
@ -129,7 +129,7 @@ CeruleanCityScript1: ; 19567 (6:5567)
xor a xor a
ld [wJoyIgnore], a ld [wJoyIgnore], a
ld a, $1 ld a, $1
ld [$ff8c], a ld [hSpriteIndexOrTextID], a
call DisplayTextID call DisplayTextID
ld hl, wd72d ld hl, wd72d
set 6, [hl] set 6, [hl]
@ -173,14 +173,14 @@ CeruleanCityScript2: ; 195b1 (6:55b1)
ld hl, wd75a ld hl, wd75a
set 0, [hl] set 0, [hl]
ld a, $1 ld a, $1
ld [$ff8c], a ld [hSpriteIndexOrTextID], a
call DisplayTextID call DisplayTextID
ld a, $ff ld a, $ff
ld [wc0ee], a ld [wc0ee], a
call PlaySound call PlaySound
callba Music_RivalAlternateStart callba Music_RivalAlternateStart
ld a, $1 ld a, $1
ld [$ff8c], a ld [H_SPRITEINDEX], a
call SetSpriteMovementBytesToFF call SetSpriteMovementBytesToFF
ld a, [W_XCOORD] ld a, [W_XCOORD]
cp $14 cp $14
@ -191,7 +191,7 @@ CeruleanCityScript2: ; 195b1 (6:55b1)
ld de, CeruleanCityMovement3 ld de, CeruleanCityMovement3
.asm_195f3 .asm_195f3
ld a, $1 ld a, $1
ld [$ff8c], a ld [H_SPRITEINDEX], a
call MoveSprite call MoveSprite
ld a, $3 ld a, $3
ld [W_CERULEANCITYCURSCRIPT], a ld [W_CERULEANCITYCURSCRIPT], a
@ -295,7 +295,7 @@ CeruleanCityText2: ; 1967c (6:567c)
ld hl, CeruleanCityText_196ee ld hl, CeruleanCityText_196ee
ld de, CeruleanCityText_196ee ld de, CeruleanCityText_196ee
call SaveEndBattleTextPointers call SaveEndBattleTextPointers
ld a, [$ff8c] ld a, [hSpriteIndexOrTextID]
ld [wSpriteIndex], a ld [wSpriteIndex], a
call EngageMapTrainer call EngageMapTrainer
call InitBattleEnemyParameters call InitBattleEnemyParameters

View file

@ -44,7 +44,7 @@ CeruleanGymScript3: ; 5c700 (17:4700)
CeruleanGymScript_5c70d: ; 5c70d (17:470d) CeruleanGymScript_5c70d: ; 5c70d (17:470d)
ld a, $5 ld a, $5
ld [H_DOWNARROWBLINKCNT2], a ld [hSpriteIndexOrTextID], a
call DisplayTextID call DisplayTextID
ld hl, wd75e ld hl, wd75e
set 7, [hl] set 7, [hl]
@ -52,14 +52,14 @@ CeruleanGymScript_5c70d: ; 5c70d (17:470d)
call GiveItem call GiveItem
jr nc, .BagFull jr nc, .BagFull
ld a, $6 ld a, $6
ld [H_DOWNARROWBLINKCNT2], a ld [hSpriteIndexOrTextID], a
call DisplayTextID call DisplayTextID
ld hl, wd75e ld hl, wd75e
set 6, [hl] set 6, [hl]
jr .asm_5c736 jr .asm_5c736
.BagFull .BagFull
ld a, $7 ld a, $7
ld [H_DOWNARROWBLINKCNT2], a ld [hSpriteIndexOrTextID], a
call DisplayTextID call DisplayTextID
.asm_5c736 .asm_5c736
ld hl, W_OBTAINEDBADGES ld hl, W_OBTAINEDBADGES

View file

@ -37,7 +37,7 @@ CinnabarGymScript_75792: ; 75792 (1d:5792)
ret ret
CinnabarGymScript_757a0: ; 757a0 (1d:57a0) CinnabarGymScript_757a0: ; 757a0 (1d:57a0)
ld a, [H_DOWNARROWBLINKCNT2] ld a, [hSpriteIndexOrTextID]
ld [wTrainerHeaderFlagBit], a ld [wTrainerHeaderFlagBit], a
ret ret
@ -51,7 +51,7 @@ CinnabarGymScript0: ; 757ae (1d:57ae)
ld a, [wda38] ld a, [wda38]
and a and a
ret z ret z
ld [$ff8c], a ld [H_SPRITEINDEX], a
cp $4 cp $4
jr nz, .asm_757c3 jr nz, .asm_757c3
ld a, $4 ld a, $4
@ -86,7 +86,7 @@ CinnabarGymScript1: ; 757dc (1d:57dc)
ld [wJoyIgnore], a ld [wJoyIgnore], a
ld a, [wda38] ld a, [wda38]
ld [wTrainerHeaderFlagBit], a ld [wTrainerHeaderFlagBit], a
ld [$ff8c], a ld [hSpriteIndexOrTextID], a
jp DisplayTextID jp DisplayTextID
CinnabarGymScript_757f1: ; 757f1 (1d:57f1) CinnabarGymScript_757f1: ; 757f1 (1d:57f1)
@ -139,7 +139,7 @@ CinnabarGymScript3: ; 7584a (1d:584a)
ld [wJoyIgnore], a ld [wJoyIgnore], a
CinnabarGymScript3_75857: ; 75857 (1d:5857) CinnabarGymScript3_75857: ; 75857 (1d:5857)
ld a, $a ld a, $a
ld [$ff8c], a ld [hSpriteIndexOrTextID], a
call DisplayTextID call DisplayTextID
ld hl, wd79a ld hl, wd79a
set 1, [hl] set 1, [hl]
@ -147,14 +147,14 @@ CinnabarGymScript3_75857: ; 75857 (1d:5857)
call GiveItem call GiveItem
jr nc, .BagFull jr nc, .BagFull
ld a, $b ld a, $b
ld [$ff8c], a ld [hSpriteIndexOrTextID], a
call DisplayTextID call DisplayTextID
ld hl, wd79a ld hl, wd79a
set 0, [hl] set 0, [hl]
jr .asm_75880 jr .asm_75880
.BagFull .BagFull
ld a, $c ld a, $c
ld [$ff8c], a ld [hSpriteIndexOrTextID], a
call DisplayTextID call DisplayTextID
.asm_75880 .asm_75880
ld hl, W_OBTAINEDBADGES ld hl, W_OBTAINEDBADGES
@ -189,7 +189,7 @@ CinnabarGymTextPointers: ; 7589f (1d:589f)
dw TM38NoRoomText dw TM38NoRoomText
CinnabarGymScript_758b7: ; 758b7 (1d:58b7) CinnabarGymScript_758b7: ; 758b7 (1d:58b7)
ld a, [H_DOWNARROWBLINKCNT2] ld a, [hSpriteIndexOrTextID]
ld [wSpriteIndex], a ld [wSpriteIndex], a
call EngageMapTrainer call EngageMapTrainer
call InitBattleEnemyParameters call InitBattleEnemyParameters

View file

@ -27,7 +27,7 @@ CinnabarIslandScript0: ; 1ca38 (7:4a38)
ld a, $8 ld a, $8
ld [wd528], a ld [wd528], a
ld a, $8 ld a, $8
ld [$ff8c], a ld [hSpriteIndexOrTextID], a
call DisplayTextID call DisplayTextID
xor a xor a
ld [hJoyHeld], a ld [hJoyHeld], a

View file

@ -45,12 +45,12 @@ FightingDojoScript1: ; 5cd83 (17:4d83)
ld a, $1 ld a, $1
ld [wd528], a ld [wd528], a
ld a, $1 ld a, $1
ld [$ff8c], a ld [H_SPRITEINDEX], a
ld a, SPRITE_FACING_LEFT ld a, SPRITE_FACING_LEFT
ld [$ff8d], a ld [hSpriteFacingDirection], a
call SetSpriteFacingDirectionAndDelay call SetSpriteFacingDirectionAndDelay
ld a, $1 ld a, $1
ld [$ff8c], a ld [hSpriteIndexOrTextID], a
call DisplayTextID call DisplayTextID
ret ret
@ -64,9 +64,9 @@ FightingDojoScript3: ; 5cdc6 (17:4dc6)
ld a, $1 ld a, $1
ld [wd528], a ld [wd528], a
ld a, $1 ld a, $1
ld [$ff8c], a ld [H_SPRITEINDEX], a
ld a, SPRITE_FACING_LEFT ld a, SPRITE_FACING_LEFT
ld [$ff8d], a ld [hSpriteFacingDirection], a
call SetSpriteFacingDirectionAndDelay call SetSpriteFacingDirectionAndDelay
.asm_5cde4 .asm_5cde4
@ -76,7 +76,7 @@ FightingDojoScript3: ; 5cdc6 (17:4dc6)
or $3e or $3e
ld [wd7b1], a ld [wd7b1], a
ld a, $8 ld a, $8
ld [$ff8c], a ld [hSpriteIndexOrTextID], a
call DisplayTextID call DisplayTextID
xor a xor a
ld [wJoyIgnore], a ld [wJoyIgnore], a
@ -148,7 +148,7 @@ FightingDojoText1: ; 5ce44 (17:4e44)
ld hl, FightingDojoText_5ce93 ld hl, FightingDojoText_5ce93
ld de, FightingDojoText_5ce93 ld de, FightingDojoText_5ce93
call SaveEndBattleTextPointers call SaveEndBattleTextPointers
ld a, [H_SPRITEINDEX] ld a, [hSpriteIndexOrTextID]
ld [wSpriteIndex], a ld [wSpriteIndex], a
call EngageMapTrainer call EngageMapTrainer
call InitBattleEnemyParameters call InitBattleEnemyParameters

View file

@ -44,7 +44,7 @@ FuchsiaGymScript3: ; 7548a (1d:548a)
ld [wJoyIgnore], a ld [wJoyIgnore], a
FuchsiaGymScript3_75497: ; 75497 (1d:5497) FuchsiaGymScript3_75497: ; 75497 (1d:5497)
ld a, $9 ld a, $9
ld [H_DOWNARROWBLINKCNT2], a ld [hSpriteIndexOrTextID], a
call DisplayTextID call DisplayTextID
ld hl, wd792 ld hl, wd792
set 1, [hl] set 1, [hl]
@ -52,14 +52,14 @@ FuchsiaGymScript3_75497: ; 75497 (1d:5497)
call GiveItem call GiveItem
jr nc, .BagFull jr nc, .BagFull
ld a, $a ld a, $a
ld [H_DOWNARROWBLINKCNT2], a ld [hSpriteIndexOrTextID], a
call DisplayTextID call DisplayTextID
ld hl, wd792 ld hl, wd792
set 0, [hl] set 0, [hl]
jr .asm_754c0 jr .asm_754c0
.BagFull .BagFull
ld a, $b ld a, $b
ld [H_DOWNARROWBLINKCNT2], a ld [hSpriteIndexOrTextID], a
call DisplayTextID call DisplayTextID
.asm_754c0 .asm_754c0
ld hl, W_OBTAINEDBADGES ld hl, W_OBTAINEDBADGES

View file

@ -3,7 +3,7 @@ FuchsiaHouse2Script: ; 750b5 (1d:50b5)
FuchsiaHouse2TextPointers: ; 750b8 (1d:50b8) FuchsiaHouse2TextPointers: ; 750b8 (1d:50b8)
dw FuchsiaHouse2Text1 dw FuchsiaHouse2Text1
dw Predef5CText dw PickUpItemText
dw BoulderText dw BoulderText
dw FuchsiaHouse2Text4 dw FuchsiaHouse2Text4
dw FuchsiaHouse2Text5 dw FuchsiaHouse2Text5

View file

@ -55,7 +55,7 @@ GaryScript2: ; 75f6a (1d:5f6a)
ld hl, W_OPTIONS ld hl, W_OPTIONS
res 7, [hl] res 7, [hl]
ld a, $1 ld a, $1
ld [$ff8c], a ld [hSpriteIndexOrTextID], a
call DisplayTextID call DisplayTextID
call Delay3 call Delay3
ld hl, wd72d ld hl, wd72d
@ -99,10 +99,10 @@ GaryScript3: ; 75fbb (1d:5fbb)
ld a, $f0 ld a, $f0
ld [wJoyIgnore], a ld [wJoyIgnore], a
ld a, $1 ld a, $1
ld [$ff8c], a ld [hSpriteIndexOrTextID], a
call GaryScript_760c8 call GaryScript_760c8
ld a, $1 ld a, $1
ld [$ff8c], a ld [H_SPRITEINDEX], a
call SetSpriteMovementBytesToFF call SetSpriteMovementBytesToFF
ld a, $4 ld a, $4
ld [W_GARYCURSCRIPT], a ld [W_GARYCURSCRIPT], a
@ -111,14 +111,14 @@ GaryScript3: ; 75fbb (1d:5fbb)
GaryScript4: ; 75fe4 (1d:5fe4) GaryScript4: ; 75fe4 (1d:5fe4)
callba Music_Cities1AlternateTempo callba Music_Cities1AlternateTempo
ld a, $2 ld a, $2
ld [$ff8c], a ld [hSpriteIndexOrTextID], a
call GaryScript_760c8 call GaryScript_760c8
ld a, $2 ld a, $2
ld [$ff8c], a ld [H_SPRITEINDEX], a
call SetSpriteMovementBytesToFF call SetSpriteMovementBytesToFF
ld de, MovementData_76014 ld de, MovementData_76014
ld a, $2 ld a, $2
ld [$ff8c], a ld [H_SPRITEINDEX], a
call MoveSprite call MoveSprite
ld a, HS_CHAMPIONS_ROOM_OAK ld a, HS_CHAMPIONS_ROOM_OAK
ld [wcc4d], a ld [wcc4d], a
@ -142,17 +142,17 @@ GaryScript5: ; 7601a (1d:601a)
ld a, $2 ld a, $2
ld [wd528], a ld [wd528], a
ld a, $1 ld a, $1
ld [$ff8c], a ld [H_SPRITEINDEX], a
ld a, SPRITE_FACING_LEFT ld a, SPRITE_FACING_LEFT
ld [$ff8d], a ld [hSpriteFacingDirection], a
call SetSpriteFacingDirectionAndDelay call SetSpriteFacingDirectionAndDelay
ld a, $2 ld a, $2
ld [$ff8c], a ld [H_SPRITEINDEX], a
xor a ; SPRITE_FACING_DOWN xor a ; SPRITE_FACING_DOWN
ld [$ff8d], a ld [hSpriteFacingDirection], a
call SetSpriteFacingDirectionAndDelay ; face object call SetSpriteFacingDirectionAndDelay
ld a, $3 ld a, $3
ld [$ff8c], a ld [hSpriteIndexOrTextID], a
call GaryScript_760c8 call GaryScript_760c8
ld a, $6 ld a, $6
ld [W_GARYCURSCRIPT], a ld [W_GARYCURSCRIPT], a
@ -160,12 +160,12 @@ GaryScript5: ; 7601a (1d:601a)
GaryScript6: ; 76047 (1d:6047) GaryScript6: ; 76047 (1d:6047)
ld a, $2 ld a, $2
ld [$ff8c], a ld [H_SPRITEINDEX], a
ld a, SPRITE_FACING_RIGHT ld a, SPRITE_FACING_RIGHT
ld [$ff8d], a ld [hSpriteFacingDirection], a
call SetSpriteFacingDirectionAndDelay ; face object call SetSpriteFacingDirectionAndDelay
ld a, $4 ld a, $4
ld [$ff8c], a ld [hSpriteIndexOrTextID], a
call GaryScript_760c8 call GaryScript_760c8
ld a, $7 ld a, $7
ld [W_GARYCURSCRIPT], a ld [W_GARYCURSCRIPT], a
@ -173,16 +173,16 @@ GaryScript6: ; 76047 (1d:6047)
GaryScript7: ; 7605f (1d:605f) GaryScript7: ; 7605f (1d:605f)
ld a, $2 ld a, $2
ld [$ff8c], a ld [H_SPRITEINDEX], a
xor a ; SPRITE_FACING_DOWN xor a ; SPRITE_FACING_DOWN
ld [$ff8d], a ld [hSpriteFacingDirection], a
call SetSpriteFacingDirectionAndDelay ; face object call SetSpriteFacingDirectionAndDelay
ld a, $5 ld a, $5
ld [$ff8c], a ld [hSpriteIndexOrTextID], a
call GaryScript_760c8 call GaryScript_760c8
ld de, MovementData_76080 ld de, MovementData_76080
ld a, $2 ld a, $2
ld [$ff8c], a ld [H_SPRITEINDEX], a
call MoveSprite call MoveSprite
ld a, $8 ld a, $8
ld [W_GARYCURSCRIPT], a ld [W_GARYCURSCRIPT], a

View file

@ -83,10 +83,10 @@ HallofFameRoomScript1: ; 5a52b (16:652b)
ld a, $1 ld a, $1
ld [wd528], a ld [wd528], a
ld a, $1 ld a, $1
ld [$ff8c], a ld [H_SPRITEINDEX], a
call SetSpriteMovementBytesToFF call SetSpriteMovementBytesToFF
ld a, SPRITE_FACING_LEFT ld a, $8
ld [$ff8d], a ld [hSpriteFacingDirection], a
call SetSpriteFacingDirectionAndDelay call SetSpriteFacingDirectionAndDelay
call Delay3 call Delay3
xor a xor a
@ -94,7 +94,7 @@ HallofFameRoomScript1: ; 5a52b (16:652b)
inc a inc a
ld [wd528], a ld [wd528], a
ld a, $1 ld a, $1
ld [$ff8c], a ld [hSpriteIndexOrTextID], a
call DisplayTextID call DisplayTextID
ld a, $ff ld a, $ff
ld [wJoyIgnore], a ld [wJoyIgnore], a

View file

@ -64,7 +64,7 @@ LanceScript0: ; 5a305 (16:6305)
cp $3 cp $3
jr nc, .asm_5a325 jr nc, .asm_5a325
ld a, $1 ld a, $1
ld [H_DOWNARROWBLINKCNT2], a ld [hSpriteIndexOrTextID], a
jp DisplayTextID jp DisplayTextID
.asm_5a325 .asm_5a325
cp $5 cp $5
@ -93,7 +93,7 @@ LanceScript2: ; 5a349 (16:6349)
cp $ff cp $ff
jp z, LanceScript_5a2f5 jp z, LanceScript_5a2f5
ld a, $1 ld a, $1
ld [H_DOWNARROWBLINKCNT2], a ld [hSpriteIndexOrTextID], a
jp DisplayTextID jp DisplayTextID
LanceScript_5a35b: ; 5a35b (16:635b) LanceScript_5a35b: ; 5a35b (16:635b)

View file

@ -77,7 +77,7 @@ LoreleiScript0: ; 761e2 (1d:61e2)
jr z, LoreleiScript_761c6 jr z, LoreleiScript_761c6
.asm_76206 .asm_76206
ld a, $2 ld a, $2
ld [H_DOWNARROWBLINKCNT2], a ld [hSpriteIndexOrTextID], a
call DisplayTextID call DisplayTextID
ld a, D_UP ld a, D_UP
ld [wSimulatedJoypadStatesEnd], a ld [wSimulatedJoypadStatesEnd], a
@ -112,7 +112,7 @@ LoreleiScript2: ; 7623f (1d:623f)
cp $ff cp $ff
jp z, LoreleiScript_761b6 jp z, LoreleiScript_761b6
ld a, $1 ld a, $1
ld [H_DOWNARROWBLINKCNT2], a ld [hSpriteIndexOrTextID], a
jp DisplayTextID jp DisplayTextID
LoreleiTextPointers: ; 76251 (1d:6251) LoreleiTextPointers: ; 76251 (1d:6251)

View file

@ -53,7 +53,7 @@ Mansion1Script_Switches: ; 44316 (11:4316)
xor a xor a
ld [hJoyHeld], a ld [hJoyHeld], a
ld a, $4 ld a, $4
ld [H_SPRITEHEIGHT], a ld [hSpriteIndexOrTextID], a
jp DisplayTextID jp DisplayTextID
Mansion1ScriptPointers: ; 44326 (11:4326) Mansion1ScriptPointers: ; 44326 (11:4326)
@ -63,8 +63,8 @@ Mansion1ScriptPointers: ; 44326 (11:4326)
Mansion1TextPointers: ; 4432c (11:432c) Mansion1TextPointers: ; 4432c (11:432c)
dw Mansion1Text1 dw Mansion1Text1
dw Predef5CText dw PickUpItemText
dw Predef5CText dw PickUpItemText
dw Mansion1Text4 dw Mansion1Text4
Mansion1TrainerHeaders: ; 44334 (11:4334) Mansion1TrainerHeaders: ; 44334 (11:4334)

View file

@ -49,7 +49,7 @@ Mansion2Script_Switches: ; 52037 (14:6037)
xor a xor a
ld [hJoyHeld], a ld [hJoyHeld], a
ld a, $5 ld a, $5
ld [H_SPRITEHEIGHT], a ld [hSpriteIndexOrTextID], a
jp DisplayTextID jp DisplayTextID
Mansion2ScriptPointers: ; 52047 (14:6047) Mansion2ScriptPointers: ; 52047 (14:6047)
@ -59,7 +59,7 @@ Mansion2ScriptPointers: ; 52047 (14:6047)
Mansion2TextPointers: ; 5204d (14:604d) Mansion2TextPointers: ; 5204d (14:604d)
dw Mansion2Text1 dw Mansion2Text1
dw Predef5CText dw PickUpItemText
dw Mansion2Text3 dw Mansion2Text3
dw Mansion2Text4 dw Mansion2Text4
dw Mansion2Text5 dw Mansion2Text5

View file

@ -80,14 +80,14 @@ Mansion3Script_Switches: ; 5227a (14:627a)
xor a xor a
ld [hJoyHeld], a ld [hJoyHeld], a
ld a, $6 ld a, $6
ld [H_DOWNARROWBLINKCNT2], a ld [hSpriteIndexOrTextID], a
jp DisplayTextID jp DisplayTextID
Mansion3TextPointers: ; 5228a (14:628a) Mansion3TextPointers: ; 5228a (14:628a)
dw Mansion3Text1 dw Mansion3Text1
dw Mansion3Text2 dw Mansion3Text2
dw Predef5CText dw PickUpItemText
dw Predef5CText dw PickUpItemText
dw Mansion3Text5 dw Mansion3Text5
dw Mansion3Text6 dw Mansion3Text6

View file

@ -51,7 +51,7 @@ Mansion4Script_Switches: ; 52420 (14:6420)
xor a xor a
ld [hJoyHeld], a ld [hJoyHeld], a
ld a, $9 ld a, $9
ld [H_DOWNARROWBLINKCNT2], a ld [hSpriteIndexOrTextID], a
jp DisplayTextID jp DisplayTextID
Mansion4ScriptPointers: ; 52430 (14:6430) Mansion4ScriptPointers: ; 52430 (14:6430)
@ -62,12 +62,12 @@ Mansion4ScriptPointers: ; 52430 (14:6430)
Mansion4TextPointers: ; 52436 (14:6436) Mansion4TextPointers: ; 52436 (14:6436)
dw Mansion4Text1 dw Mansion4Text1
dw Mansion4Text2 dw Mansion4Text2
dw Predef5CText dw PickUpItemText
dw Predef5CText dw PickUpItemText
dw Predef5CText dw PickUpItemText
dw Predef5CText dw PickUpItemText
dw Mansion4Text7 dw Mansion4Text7
dw Predef5CText dw PickUpItemText
dw Mansion3Text6 dw Mansion3Text6
Mansion4TrainerHeaders: ; 52448 (14:6448) Mansion4TrainerHeaders: ; 52448 (14:6448)

View file

@ -20,12 +20,12 @@ MtMoon1TextPointers: ; 499e1 (12:59e1)
dw MtMoon1Text5 dw MtMoon1Text5
dw MtMoon1Text6 dw MtMoon1Text6
dw MtMoon1Text7 dw MtMoon1Text7
dw Predef5CText dw PickUpItemText
dw Predef5CText dw PickUpItemText
dw Predef5CText dw PickUpItemText
dw Predef5CText dw PickUpItemText
dw Predef5CText dw PickUpItemText
dw Predef5CText dw PickUpItemText
dw MtMoon1Text14 dw MtMoon1Text14
MtMoon1TrainerHeaders: ; 499fd (12:59fd) MtMoon1TrainerHeaders: ; 499fd (12:59fd)

View file

@ -66,7 +66,7 @@ MtMoon3Script0: ; 49d6f (12:5d6f)
xor a xor a
ld [hJoyHeld], a ld [hJoyHeld], a
ld a, $1 ld a, $1
ld [H_DOWNARROWBLINKCNT2], a ld [hSpriteIndexOrTextID], a
jp DisplayTextID jp DisplayTextID
MtMoon3Script_49d91: ; 49d91 (12:5d91) MtMoon3Script_49d91: ; 49d91 (12:5d91)
@ -92,7 +92,7 @@ MtMoon3Script3: ; 49d9a (12:5d9a)
MtMoon3Script4: ; 49dba (12:5dba) MtMoon3Script4: ; 49dba (12:5dba)
ld a, $1 ld a, $1
ld [H_DOWNARROWBLINKCNT2], a ld [H_SPRITEINDEX], a
call SetSpriteMovementBytesToFF call SetSpriteMovementBytesToFF
ld hl, CoordsData_49dea ld hl, CoordsData_49dea
call ArePlayerCoordsInArray call ArePlayerCoordsInArray
@ -106,7 +106,7 @@ MtMoon3Script4: ; 49dba (12:5dba)
ld de, MovementData_49df8 ld de, MovementData_49df8
.asm_49dda .asm_49dda
ld a, $1 ld a, $1
ld [H_DOWNARROWBLINKCNT2], a ld [H_SPRITEINDEX], a
call MoveSprite call MoveSprite
ld a, $5 ld a, $5
ld [W_MTMOON3CURSCRIPT], a ld [W_MTMOON3CURSCRIPT], a
@ -140,7 +140,7 @@ MtMoon3Script5: ; 49dfb (12:5dfb)
ld a, $1 ld a, $1
ld [wDoNotWaitForButtonPressAfterDisplayingText], a ld [wDoNotWaitForButtonPressAfterDisplayingText], a
ld a, $a ld a, $a
ld [H_DOWNARROWBLINKCNT2], a ld [hSpriteIndexOrTextID], a
call DisplayTextID call DisplayTextID
ld a, [wd7f6] ld a, [wd7f6]
bit 6, a bit 6, a
@ -167,8 +167,8 @@ MtMoon3TextPointers: ; 49e34 (12:5e34)
dw MtMoon3Text5 dw MtMoon3Text5
dw MtMoon3Text6 dw MtMoon3Text6
dw MtMoon3Text7 dw MtMoon3Text7
dw Predef5CText dw PickUpItemText
dw Predef5CText dw PickUpItemText
dw MtMoon3Text_49f99 dw MtMoon3Text_49f99
MtMoon3TrainerHeaders: ; 49e48 (12:5e48) MtMoon3TrainerHeaders: ; 49e48 (12:5e48)

View file

@ -25,7 +25,7 @@ Museum1FScript0: ; 5c10d (17:410d)
xor a xor a
ld [hJoyHeld], a ld [hJoyHeld], a
ld a, $1 ld a, $1
ld [$ff8c], a ld [hSpriteIndexOrTextID], a
jp DisplayTextID jp DisplayTextID
Museum1FScript1: ; 5c12a (17:412a) Museum1FScript1: ; 5c12a (17:412a)
@ -69,7 +69,7 @@ Museum1FText1: ; 5c135 (17:4135)
call PrintText call PrintText
jp Museum1FScriptEnd jp Museum1FScriptEnd
.asm_3ded4 .asm_3ded4
ld a, $13 ld a, MONEY_BOX
ld [wTextBoxID], a ld [wTextBoxID], a
call DisplayTextBoxID call DisplayTextBoxID
xor a xor a
@ -96,15 +96,15 @@ Museum1FText1: ; 5c135 (17:4135)
ld hl, wd754 ld hl, wd754
set 0, [hl] set 0, [hl]
xor a xor a
ld [wWhichTrade], a ld [wMuseumPriceTemp], a
ld [wTrainerEngageDistance], a ld [wMuseumPriceTemp + 1], a
ld a, $50 ld a, $50
ld [wTrainerFacingDirection], a ld [wMuseumPriceTemp + 2], a
ld hl, wTrainerFacingDirection ld hl, wMuseumPriceTemp + 2
ld de, wPlayerMoney + 2 ld de, wPlayerMoney + 2
ld c, $3 ld c, $3
predef SubBCDPredef predef SubBCDPredef
ld a, $13 ld a, MONEY_BOX
ld [wTextBoxID], a ld [wTextBoxID], a
call DisplayTextBoxID call DisplayTextBoxID
ld a, (SFX_02_5a - SFX_Headers_02) / 3 ld a, (SFX_02_5a - SFX_Headers_02) / 3

View file

@ -89,13 +89,13 @@ OaksLabScript3: ; 1cba2 (7:4ba2)
call StartSimulatingJoypadStates call StartSimulatingJoypadStates
ld a, $1 ld a, $1
ld [H_SPRITEINDEX], a ld [H_SPRITEINDEX], a
xor a ; SPRITE_FACING_DOWN xor a
ld [$ff8d], a ld [hSpriteFacingDirection], a
call SetSpriteFacingDirectionAndDelay call SetSpriteFacingDirectionAndDelay
ld a, $5 ld a, $5
ld [H_SPRITEINDEX], a ld [H_SPRITEINDEX], a
xor a ; SPRITE_FACING_DOWN xor a
ld [$ff8d], a ld [hSpriteFacingDirection], a
call SetSpriteFacingDirectionAndDelay call SetSpriteFacingDirectionAndDelay
ld a, $4 ld a, $4
@ -117,7 +117,7 @@ OaksLabScript4: ; 1cbd2 (7:4bd2)
ld a, $1 ld a, $1
ld [H_SPRITEINDEX], a ld [H_SPRITEINDEX], a
ld a, SPRITE_FACING_UP ld a, SPRITE_FACING_UP
ld [$ff8d], a ld [hSpriteFacingDirection], a
call SetSpriteFacingDirectionAndDelay call SetSpriteFacingDirectionAndDelay
call UpdateSprites call UpdateSprites
ld hl, W_FLAGS_D733 ld hl, W_FLAGS_D733
@ -132,19 +132,19 @@ OaksLabScript5: ; 1cbfd (7:4bfd)
ld a, $fc ld a, $fc
ld [wJoyIgnore], a ld [wJoyIgnore], a
ld a, $11 ld a, $11
ld [$ff8c], a ld [hSpriteIndexOrTextID], a
call DisplayTextID call DisplayTextID
call Delay3 call Delay3
ld a, $12 ld a, $12
ld [$ff8c], a ld [hSpriteIndexOrTextID], a
call DisplayTextID call DisplayTextID
call Delay3 call Delay3
ld a, $13 ld a, $13
ld [$ff8c], a ld [hSpriteIndexOrTextID], a
call DisplayTextID call DisplayTextID
call Delay3 call Delay3
ld a, $14 ld a, $14
ld [$ff8c], a ld [hSpriteIndexOrTextID], a
call DisplayTextID call DisplayTextID
ld hl, wd74b ld hl, wd74b
set 1, [hl] set 1, [hl]
@ -162,16 +162,16 @@ OaksLabScript6: ; 1cc36 (7:4c36)
ld a, $5 ld a, $5
ld [H_SPRITEINDEX], a ld [H_SPRITEINDEX], a
xor a ; SPRITE_FACING_DOWN xor a ; SPRITE_FACING_DOWN
ld [$ff8d], a ld [hSpriteFacingDirection], a
call SetSpriteFacingDirectionAndDelay call SetSpriteFacingDirectionAndDelay
ld a, $1 ld a, $1
ld [H_SPRITEINDEX], a ld [H_SPRITEINDEX], a
xor a xor a
ld [$ff8d], a ld [hSpriteFacingDirection], a
call SetSpriteFacingDirectionAndDelay call SetSpriteFacingDirectionAndDelay
call UpdateSprites call UpdateSprites
ld a, $c ld a, $c
ld [$ff8c], a ld [hSpriteIndexOrTextID], a
call DisplayTextID call DisplayTextID
ld a, $1 ld a, $1
ld [wSimulatedJoypadStatesIndex], a ld [wSimulatedJoypadStatesIndex], a
@ -261,7 +261,7 @@ OaksLabScript8: ; 1cc80 (7:4c80)
ld a, $1 ld a, $1
ld [H_SPRITEINDEX], a ld [H_SPRITEINDEX], a
ld a, $4 ld a, $4
ld [$ff8b], a ld [H_SPRITEDATAOFFSET], a
call GetPointerWithinSpriteStateData1 call GetPointerWithinSpriteStateData1
push hl push hl
ld [hl], $4c ld [hl], $4c
@ -302,10 +302,10 @@ OaksLabScript9: ; 1cd00 (7:4d00)
ld a, $1 ld a, $1
ld [H_SPRITEINDEX], a ld [H_SPRITEINDEX], a
ld a, SPRITE_FACING_UP ld a, SPRITE_FACING_UP
ld [$ff8d], a ld [hSpriteFacingDirection], a
call SetSpriteFacingDirectionAndDelay call SetSpriteFacingDirectionAndDelay
ld a, $d ld a, $d
ld [$ff8c], a ld [hSpriteIndexOrTextID], a
call DisplayTextID call DisplayTextID
ld a, [wTrainerEngageDistance] ld a, [wTrainerEngageDistance]
cp $2 cp $2
@ -331,10 +331,10 @@ OaksLabScript9: ; 1cd00 (7:4d00)
ld a, $1 ld a, $1
ld [H_SPRITEINDEX], a ld [H_SPRITEINDEX], a
ld a, SPRITE_FACING_UP ld a, SPRITE_FACING_UP
ld [$ff8d], a ld [hSpriteFacingDirection], a
call SetSpriteFacingDirectionAndDelay call SetSpriteFacingDirectionAndDelay
ld a, $e ld a, $e
ld [$ff8c], a ld [hSpriteIndexOrTextID], a
call DisplayTextID call DisplayTextID
ld hl, wd74b ld hl, wd74b
set 2, [hl] set 2, [hl]
@ -352,7 +352,7 @@ OaksLabScript10: ; 1cd6d (7:4d6d)
ld a, $1 ld a, $1
ld [H_SPRITEINDEX], a ld [H_SPRITEINDEX], a
xor a ; SPRITE_FACING_DOWN xor a ; SPRITE_FACING_DOWN
ld [$ff8d], a ld [hSpriteFacingDirection], a
call SetSpriteFacingDirectionAndDelay call SetSpriteFacingDirectionAndDelay
ld a, $8 ld a, $8
ld [wd528], a ld [wd528], a
@ -360,7 +360,7 @@ OaksLabScript10: ; 1cd6d (7:4d6d)
ld a, MUSIC_MEET_RIVAL ld a, MUSIC_MEET_RIVAL
call PlayMusic call PlayMusic
ld a, $f ld a, $f
ld [$ff8c], a ld [hSpriteIndexOrTextID], a
call DisplayTextID call DisplayTextID
ld a, $1 ld a, $1
ld [hNPCPlayerRelativePosPerspective], a ld [hNPCPlayerRelativePosPerspective], a
@ -432,7 +432,7 @@ OaksLabScript12: ; 1ce03 (7:4e03)
ld a, $1 ld a, $1
ld [H_SPRITEINDEX], a ld [H_SPRITEINDEX], a
xor a ; SPRITE_FACING_DOWN xor a ; SPRITE_FACING_DOWN
ld [$ff8d], a ld [hSpriteFacingDirection], a
call SetSpriteFacingDirectionAndDelay call SetSpriteFacingDirectionAndDelay
predef HealParty predef HealParty
ld hl, wd74b ld hl, wd74b
@ -446,7 +446,7 @@ OaksLabScript13: ; 1ce32 (7:4e32)
ld c, 20 ld c, 20
call DelayFrames call DelayFrames
ld a, $10 ld a, $10
ld [$ff8c], a ld [hSpriteIndexOrTextID], a
call DisplayTextID call DisplayTextID
callba Music_RivalAlternateStart callba Music_RivalAlternateStart
ld a, $1 ld a, $1
@ -522,7 +522,7 @@ OaksLabScript15: ; 1ceb0 (7:4eb0)
call PlaySound call PlaySound
callba Music_RivalAlternateStart callba Music_RivalAlternateStart
ld a, $15 ld a, $15
ld [$ff8c], a ld [hSpriteIndexOrTextID], a
call DisplayTextID call DisplayTextID
call OaksLabScript_1d02b call OaksLabScript_1d02b
ld a, HS_OAKS_LAB_RIVAL ld a, HS_OAKS_LAB_RIVAL
@ -549,12 +549,12 @@ OaksLabScript_1cefd: ; 1cefd (7:4efd)
ld a, $1 ld a, $1
ld [H_SPRITEINDEX], a ld [H_SPRITEINDEX], a
ld a, SPRITE_FACING_UP ld a, SPRITE_FACING_UP
ld [$ff8d], a ld [hSpriteFacingDirection], a
call SetSpriteFacingDirectionAndDelay call SetSpriteFacingDirectionAndDelay
ld a, $8 ld a, $8
ld [H_SPRITEINDEX], a ld [H_SPRITEINDEX], a
xor a ; SPRITE_FACING_DOWN xor a ; SPRITE_FACING_DOWN
ld [$ff8d], a ld [hSpriteFacingDirection], a
jp SetSpriteFacingDirectionAndDelay jp SetSpriteFacingDirectionAndDelay
OaksLabScript16: ; 1cf12 (7:4f12) OaksLabScript16: ; 1cf12 (7:4f12)
@ -567,21 +567,21 @@ OaksLabScript16: ; 1cf12 (7:4f12)
ld [wJoyIgnore], a ld [wJoyIgnore], a
call OaksLabScript_1cefd call OaksLabScript_1cefd
ld a, $16 ld a, $16
ld [$ff8c], a ld [hSpriteIndexOrTextID], a
call DisplayTextID call DisplayTextID
call DelayFrame call DelayFrame
call OaksLabScript_1cefd call OaksLabScript_1cefd
ld a, $17 ld a, $17
ld [$ff8c], a ld [hSpriteIndexOrTextID], a
call DisplayTextID call DisplayTextID
call DelayFrame call DelayFrame
call OaksLabScript_1cefd call OaksLabScript_1cefd
ld a, $18 ld a, $18
ld [$ff8c], a ld [hSpriteIndexOrTextID], a
call DisplayTextID call DisplayTextID
call DelayFrame call DelayFrame
ld a, $19 ld a, $19
ld [$ff8c], a ld [hSpriteIndexOrTextID], a
call DisplayTextID call DisplayTextID
call Delay3 call Delay3
ld a, HS_POKEDEX_1 ld a, HS_POKEDEX_1
@ -592,16 +592,16 @@ OaksLabScript16: ; 1cf12 (7:4f12)
predef HideObject predef HideObject
call OaksLabScript_1cefd call OaksLabScript_1cefd
ld a, $1a ld a, $1a
ld [$ff8c], a ld [hSpriteIndexOrTextID], a
call DisplayTextID call DisplayTextID
ld a, $1 ld a, $1
ld [H_SPRITEINDEX], a ld [H_SPRITEINDEX], a
ld a, SPRITE_FACING_RIGHT ld a, SPRITE_FACING_RIGHT
ld [$ff8d], a ld [hSpriteFacingDirection], a
call SetSpriteFacingDirectionAndDelay call SetSpriteFacingDirectionAndDelay
call Delay3 call Delay3
ld a, $1b ld a, $1b
ld [$ff8c], a ld [hSpriteIndexOrTextID], a
call DisplayTextID call DisplayTextID
ld hl, wd74b ld hl, wd74b
set 5, [hl] set 5, [hl]
@ -856,13 +856,13 @@ OaksLabScript_1d157: ; 1d157 (7:5157)
ld a, $5 ld a, $5
ld [H_SPRITEINDEX], a ld [H_SPRITEINDEX], a
ld a, $9 ld a, $9
ld [$ff8b], a ld [H_SPRITEDATAOFFSET], a
call GetPointerWithinSpriteStateData1 call GetPointerWithinSpriteStateData1
ld [hl], $0 ld [hl], $0
ld a, $1 ld a, $1
ld [H_SPRITEINDEX], a ld [H_SPRITEINDEX], a
ld a, $9 ld a, $9
ld [$ff8b], a ld [H_SPRITEDATAOFFSET], a
call GetPointerWithinSpriteStateData1 call GetPointerWithinSpriteStateData1
ld [hl], $c ld [hl], $c
ld hl, wd730 ld hl, wd730
@ -962,7 +962,7 @@ OaksLabScript_1d22d: ; 1d22d (7:522d)
ld a, $5 ld a, $5
ld [H_SPRITEINDEX], a ld [H_SPRITEINDEX], a
ld a, $9 ld a, $9
ld [$ff8b], a ld [H_SPRITEDATAOFFSET], a
call GetPointerWithinSpriteStateData1 call GetPointerWithinSpriteStateData1
ld [hl], $0 ld [hl], $0
ld hl, OaksLabLastMonText ld hl, OaksLabLastMonText

View file

@ -67,7 +67,7 @@ PalletTownScript2: ; 18ed2 (6:4ed2)
ld a,1 ld a,1
ld [H_SPRITEINDEX],a ld [H_SPRITEINDEX],a
ld a,SPRITE_FACING_UP ld a,SPRITE_FACING_UP
ld [$FF8D],a ld [hSpriteFacingDirection],a
call SetSpriteFacingDirectionAndDelay call SetSpriteFacingDirectionAndDelay
call Delay3 call Delay3
ld a,1 ld a,1

View file

@ -31,7 +31,7 @@ PewterCityScript_1925e: ; 1925e (6:525e)
ld a, $f0 ld a, $f0
ld [wJoyIgnore], a ld [wJoyIgnore], a
ld a, $5 ld a, $5
ld [$ff8c], a ld [hSpriteIndexOrTextID], a
jp DisplayTextID jp DisplayTextID
CoordsData_19277: ; 19277 (6:5277) CoordsData_19277: ; 19277 (6:5277)
@ -48,16 +48,16 @@ PewterCityScript1: ; 19280 (6:5280)
ld a, $3 ld a, $3
ld [H_SPRITEINDEX], a ld [H_SPRITEINDEX], a
ld a, SPRITE_FACING_UP ld a, SPRITE_FACING_UP
ld [$ff8d], a ld [hSpriteFacingDirection], a
call SetSpriteFacingDirectionAndDelay call SetSpriteFacingDirectionAndDelay
ld a, ($3 << 4) | SPRITE_FACING_UP ld a, ($3 << 4) | SPRITE_FACING_UP
ld [$ff8d], a ld [hSpriteImageIndex], a
call SetSpriteImageIndexAfterSettingFacingDirection call SetSpriteImageIndexAfterSettingFacingDirection
call PlayDefaultMusic call PlayDefaultMusic
ld hl, wFlags_0xcd60 ld hl, wFlags_0xcd60
set 4, [hl] set 4, [hl]
ld a, $d ld a, $d
ld [$ff8c], a ld [hSpriteIndexOrTextID], a
call DisplayTextID call DisplayTextID
ld a, $3c ld a, $3c
ld [$ffeb], a ld [$ffeb], a
@ -71,7 +71,7 @@ PewterCityScript1: ; 19280 (6:5280)
ld [wSpriteIndex], a ld [wSpriteIndex], a
call SetSpritePosition1 call SetSpritePosition1
ld a, $3 ld a, $3
ld [$ff8c], a ld [H_SPRITEINDEX], a
ld de, MovementData_PewterMuseumGuyExit ld de, MovementData_PewterMuseumGuyExit
call MoveSprite call MoveSprite
ld a, $2 ld a, $2
@ -114,18 +114,18 @@ PewterCityScript4: ; 19305 (6:5305)
and a and a
ret nz ret nz
ld a, $5 ld a, $5
ld [$ff8c], a ld [H_SPRITEINDEX], a
ld a, SPRITE_FACING_LEFT ld a, SPRITE_FACING_LEFT
ld [$ff8d], a ld [hSpriteFacingDirection], a
call SetSpriteFacingDirectionAndDelay call SetSpriteFacingDirectionAndDelay
ld a, ($1 << 4) | SPRITE_FACING_LEFT ld a, ($1 << 4) | SPRITE_FACING_LEFT
ld [$ff8d], a ld [hSpriteImageIndex], a
call SetSpriteImageIndexAfterSettingFacingDirection call SetSpriteImageIndexAfterSettingFacingDirection
call PlayDefaultMusic call PlayDefaultMusic
ld hl, wFlags_0xcd60 ld hl, wFlags_0xcd60
set 4, [hl] set 4, [hl]
ld a, $e ld a, $e
ld [$ff8c], a ld [hSpriteIndexOrTextID], a
call DisplayTextID call DisplayTextID
ld a, $3c ld a, $3c
ld [$ffeb], a ld [$ffeb], a
@ -139,7 +139,7 @@ PewterCityScript4: ; 19305 (6:5305)
ld [wSpriteIndex], a ld [wSpriteIndex], a
call SetSpritePosition1 call SetSpritePosition1
ld a, $5 ld a, $5
ld [$ff8c], a ld [H_SPRITEINDEX], a
ld de, MovementData_PewterGymGuyExit ld de, MovementData_PewterGymGuyExit
call MoveSprite call MoveSprite
ld a, $5 ld a, $5

View file

@ -44,7 +44,7 @@ PewterGymScript3: ; 5c3d2 (17:43d2)
PewterGymScript_5c3df: ; 5c3df (17:43df) PewterGymScript_5c3df: ; 5c3df (17:43df)
ld a, $4 ld a, $4
ld [H_DOWNARROWBLINKCNT2], a ld [hSpriteIndexOrTextID], a
call DisplayTextID call DisplayTextID
ld hl, wd755 ld hl, wd755
set 7, [hl] set 7, [hl]
@ -52,14 +52,14 @@ PewterGymScript_5c3df: ; 5c3df (17:43df)
call GiveItem call GiveItem
jr nc, .BagFull jr nc, .BagFull
ld a, $5 ld a, $5
ld [H_DOWNARROWBLINKCNT2], a ld [hSpriteIndexOrTextID], a
call DisplayTextID call DisplayTextID
ld hl, wd755 ld hl, wd755
set 6, [hl] set 6, [hl]
jr .asm_5c408 jr .asm_5c408
.BagFull .BagFull
ld a, $6 ld a, $6
ld [H_DOWNARROWBLINKCNT2], a ld [hSpriteIndexOrTextID], a
call DisplayTextID call DisplayTextID
.asm_5c408 .asm_5c408
ld hl, W_OBTAINEDBADGES ld hl, W_OBTAINEDBADGES

View file

@ -31,7 +31,7 @@ PokemonTower2Script0: ; 6050f (18:450f)
call PlayMusic call PlayMusic
ld hl, wd764 ld hl, wd764
res 6, [hl] res 6, [hl]
ld a, [wWhichTrade] ld a, [wCoordIndex]
cp $1 cp $1
ld a, $8 ld a, $8
ld b, SPRITE_FACING_DOWN ld b, SPRITE_FACING_DOWN
@ -43,12 +43,12 @@ PokemonTower2Script0: ; 6050f (18:450f)
.asm_60544 .asm_60544
ld [wd528], a ld [wd528], a
ld a, $1 ld a, $1
ld [$ff8c], a ld [H_SPRITEINDEX], a
ld a, b ld a, b
ld [$ff8d], a ld [hSpriteFacingDirection], a
call SetSpriteFacingDirectionAndDelay call SetSpriteFacingDirectionAndDelay
ld a, $1 ld a, $1
ld [$ff8c], a ld [hSpriteIndexOrTextID], a
call DisplayTextID call DisplayTextID
xor a xor a
ld [hJoyHeld], a ld [hJoyHeld], a
@ -69,7 +69,7 @@ PokemonTower2Script1: ; 60563 (18:4563)
ld hl, wd764 ld hl, wd764
set 7, [hl] set 7, [hl]
ld a, $1 ld a, $1
ld [$ff8c], a ld [hSpriteIndexOrTextID], a
call DisplayTextID call DisplayTextID
ld de, MovementData_605b2 ld de, MovementData_605b2
ld a, [wd764] ld a, [wd764]
@ -78,7 +78,7 @@ PokemonTower2Script1: ; 60563 (18:4563)
ld de, MovementData_605a9 ld de, MovementData_605a9
.asm_60589 .asm_60589
ld a, $1 ld a, $1
ld [$ff8c], a ld [H_SPRITEINDEX], a
call MoveSprite call MoveSprite
ld a, $ff ld a, $ff
ld [wc0ee], a ld [wc0ee], a

View file

@ -16,7 +16,7 @@ PokemonTower3TextPointers: ; 606e5 (18:46e5)
dw PokemonTower3Text1 dw PokemonTower3Text1
dw PokemonTower3Text2 dw PokemonTower3Text2
dw PokemonTower3Text3 dw PokemonTower3Text3
dw Predef5CText dw PickUpItemText
PokemonTower3TrainerHeaders: ; 606ed (18:46ed) PokemonTower3TrainerHeaders: ; 606ed (18:46ed)
PokemonTower3TrainerHeader0: ; 606ed (18:46ed) PokemonTower3TrainerHeader0: ; 606ed (18:46ed)

View file

@ -16,9 +16,9 @@ PokemonTower4TextPointers: ; 6080f (18:480f)
dw PokemonTower4Text1 dw PokemonTower4Text1
dw PokemonTower4Text2 dw PokemonTower4Text2
dw PokemonTower4Text3 dw PokemonTower4Text3
dw Predef5CText dw PickUpItemText
dw Predef5CText dw PickUpItemText
dw Predef5CText dw PickUpItemText
PokemonTower4TrainerHeaders: ; 6081b (18:481b) PokemonTower4TrainerHeaders: ; 6081b (18:481b)
PokemonTower4TrainerHeader0: ; 6081b (18:481b) PokemonTower4TrainerHeader0: ; 6081b (18:481b)

View file

@ -38,7 +38,7 @@ PokemonTower5Script0: ; 6094b (18:494b)
call Delay3 call Delay3
call GBFadeInFromWhite call GBFadeInFromWhite
ld a, $7 ld a, $7
ld [H_DOWNARROWBLINKCNT2], a ld [hSpriteIndexOrTextID], a
call DisplayTextID call DisplayTextID
xor a xor a
ld [wJoyIgnore], a ld [wJoyIgnore], a
@ -57,7 +57,7 @@ PokemonTower5TextPointers: ; 6099b (18:499b)
dw PokemonTower5Text3 dw PokemonTower5Text3
dw PokemonTower5Text4 dw PokemonTower5Text4
dw PokemonTower5Text5 dw PokemonTower5Text5
dw Predef5CText dw PickUpItemText
dw PokemonTower5Text7 dw PokemonTower5Text7
PokemonTower5TrainerHeaders: ; 609a9 (18:49a9) PokemonTower5TrainerHeaders: ; 609a9 (18:49a9)

View file

@ -31,7 +31,7 @@ PokemonTower6Script0: ; 60b17 (18:4b17)
xor a xor a
ld [hJoyHeld], a ld [hJoyHeld], a
ld a, $6 ld a, $6
ld [H_DOWNARROWBLINKCNT2], a ld [hSpriteIndexOrTextID], a
call DisplayTextID call DisplayTextID
ld a, MAROWAK ld a, MAROWAK
ld [W_CUROPPONENT], a ld [W_CUROPPONENT], a
@ -63,7 +63,7 @@ PokemonTower6Script4: ; 60b48 (18:4b48)
ld hl, wd768 ld hl, wd768
set 7, [hl] set 7, [hl]
ld a, $7 ld a, $7
ld [H_DOWNARROWBLINKCNT2], a ld [hSpriteIndexOrTextID], a
call DisplayTextID call DisplayTextID
xor a xor a
ld [wJoyIgnore], a ld [wJoyIgnore], a
@ -100,8 +100,8 @@ PokemonTower6TextPointers: ; 60bb1 (18:4bb1)
dw PokemonTower6Text1 dw PokemonTower6Text1
dw PokemonTower6Text2 dw PokemonTower6Text2
dw PokemonTower6Text3 dw PokemonTower6Text3
dw Predef5CText dw PickUpItemText
dw Predef5CText dw PickUpItemText
dw PokemonTower6Text6 dw PokemonTower6Text6
dw PokemonTower6Text7 dw PokemonTower6Text7

View file

@ -31,7 +31,7 @@ PokemonTower7Script2: ; 60d23 (18:4d23)
ld a, $f0 ld a, $f0
ld [wJoyIgnore], a ld [wJoyIgnore], a
ld a, [wSpriteIndex] ld a, [wSpriteIndex]
ld [H_DOWNARROWBLINKCNT2], a ld [hSpriteIndexOrTextID], a
call DisplayTextID call DisplayTextID
call PokemonTower7Script_60db6 call PokemonTower7Script_60db6
ld a, $3 ld a, $3
@ -72,7 +72,7 @@ PokemonTower7Script4: ; 60d86 (18:4d86)
ld a, SPRITE_FACING_UP ld a, SPRITE_FACING_UP
ld [wSpriteStateData1 + 9], a ld [wSpriteStateData1 + 9], a
ld a, LAVENDER_HOUSE_1 ld a, LAVENDER_HOUSE_1
ld [H_DOWNARROWBLINKCNT1], a ld [hWarpDestinationMap], a
ld a, $1 ld a, $1
ld [wDestinationWarpID], a ld [wDestinationWarpID], a
ld a, LAVENDER_TOWN ld a, LAVENDER_TOWN
@ -107,7 +107,7 @@ PokemonTower7Script_60db6: ; 60db6 (18:4db6)
ld d, [hl] ld d, [hl]
ld e, a ld e, a
ld a, [wSpriteIndex] ld a, [wSpriteIndex]
ld [H_DOWNARROWBLINKCNT2], a ld [H_SPRITEINDEX], a
jp MoveSprite jp MoveSprite
.asm_60dde .asm_60dde
inc hl inc hl

View file

@ -22,11 +22,11 @@ PowerPlantTextPointers: ; 1e2df (7:62df)
dw PowerPlantText7 dw PowerPlantText7
dw PowerPlantText8 dw PowerPlantText8
dw PowerPlantText9 dw PowerPlantText9
dw Predef5CText dw PickUpItemText
dw Predef5CText dw PickUpItemText
dw Predef5CText dw PickUpItemText
dw Predef5CText dw PickUpItemText
dw Predef5CText dw PickUpItemText
PowerPlantTrainerHeaders: ; 1e2fb (7:62fb) PowerPlantTrainerHeaders: ; 1e2fb (7:62fb)
PowerPlantTrainerHeader0: ; 1e2fb (7:62fb) PowerPlantTrainerHeader0: ; 1e2fb (7:62fb)

View file

@ -43,8 +43,8 @@ RocketHideout1TextPointers: ; 44c14 (11:4c14)
dw RocketHideout1Text3 dw RocketHideout1Text3
dw RocketHideout1Text4 dw RocketHideout1Text4
dw RocketHideout1Text5 dw RocketHideout1Text5
dw Predef5CText dw PickUpItemText
dw Predef5CText dw PickUpItemText
RocketHideout1TrainerHeaders: ; 44c22 (11:4c22) RocketHideout1TrainerHeaders: ; 44c22 (11:4c22)
RocketHideout1TrainerHeader0: ; 44c22 (11:4c22) RocketHideout1TrainerHeader0: ; 44c22 (11:4c22)

View file

@ -415,10 +415,10 @@ SpinnerArrowAnimTiles: ; 45087 (11:5087)
RocketHideout2TextPointers: ; 450c7 (11:50c7) RocketHideout2TextPointers: ; 450c7 (11:50c7)
dw RocketHideout2Text1 dw RocketHideout2Text1
dw Predef5CText dw PickUpItemText
dw Predef5CText dw PickUpItemText
dw Predef5CText dw PickUpItemText
dw Predef5CText dw PickUpItemText
RocketHideout2TrainerHeaders: ; 450d1 (11:50d1) RocketHideout2TrainerHeaders: ; 450d1 (11:50d1)
RocketHideout2TrainerHeader0: ; 450d1 (11:50d1) RocketHideout2TrainerHeader0: ; 450d1 (11:50d1)

View file

@ -146,8 +146,8 @@ RocketHideout3Script3: ; 452e4 (11:452e4)
RocketHideout3TextPointers: ; 452fa (11:52fa) RocketHideout3TextPointers: ; 452fa (11:52fa)
dw RocketHideout3Text1 dw RocketHideout3Text1
dw RocketHideout3Text2 dw RocketHideout3Text2
dw Predef5CText dw PickUpItemText
dw Predef5CText dw PickUpItemText
RocketHideout3TrainerHeaders: ; 45302 (11:5302) RocketHideout3TrainerHeaders: ; 45302 (11:5302)
RocketHideout3TrainerHeader0: ; 45302 (11:5302) RocketHideout3TrainerHeader0: ; 45302 (11:5302)

View file

@ -56,7 +56,7 @@ RocketHideout4Script3: ; 454b6 (11:54b6)
ld hl, wd81b ld hl, wd81b
set 7, [hl] set 7, [hl]
ld a, $a ld a, $a
ld [H_SPRITEHEIGHT], a ld [hSpriteIndexOrTextID], a
call DisplayTextID call DisplayTextID
call GBFadeOutToBlack call GBFadeOutToBlack
ld a, HS_ROCKET_HIDEOUT_4_GIOVANNI ld a, HS_ROCKET_HIDEOUT_4_GIOVANNI
@ -81,11 +81,11 @@ RocketHideout4TextPointers: ; 45501 (11:5501)
dw RocketHideout4Text2 dw RocketHideout4Text2
dw RocketHideout4Text3 dw RocketHideout4Text3
dw RocketHideout4Text4 dw RocketHideout4Text4
dw Predef5CText dw PickUpItemText
dw Predef5CText dw PickUpItemText
dw Predef5CText dw PickUpItemText
dw Predef5CText dw PickUpItemText
dw Predef5CText dw PickUpItemText
dw RocketHideout4Text10 dw RocketHideout4Text10
RocketHideout4TrainerHeaders: ; 45515 (11:5515) RocketHideout4TrainerHeaders: ; 45515 (11:5515)

View file

@ -28,7 +28,7 @@ Route12Script0: ; 59619 (16:5619)
res 6, [hl] res 6, [hl]
jp z, CheckFightingMapTrainers jp z, CheckFightingMapTrainers
ld a, $d ld a, $d
ld [H_DOWNARROWBLINKCNT2], a ld [hSpriteIndexOrTextID], a
call DisplayTextID call DisplayTextID
ld a, SNORLAX ld a, SNORLAX
ld [W_CUROPPONENT], a ld [W_CUROPPONENT], a
@ -51,7 +51,7 @@ Route12Script3: ; 5964c (16:564c)
cp $2 cp $2
jr z, .asm_59664 jr z, .asm_59664
ld a, $e ld a, $e
ld [H_DOWNARROWBLINKCNT2], a ld [hSpriteIndexOrTextID], a
call DisplayTextID call DisplayTextID
.asm_59664 .asm_59664
ld hl, wd7d8 ld hl, wd7d8
@ -71,8 +71,8 @@ Route12TextPointers: ; 59675 (16:5675)
dw Route12Text6 dw Route12Text6
dw Route12Text7 dw Route12Text7
dw Route12Text8 dw Route12Text8
dw Predef5CText dw PickUpItemText
dw Predef5CText dw PickUpItemText
dw Route12Text11 dw Route12Text11
dw Route12Text12 dw Route12Text12
dw Route12Text13 dw Route12Text13

View file

@ -23,7 +23,7 @@ Route15TextPointers: ; 597c7 (16:57c7)
dw Route15Text8 dw Route15Text8
dw Route15Text9 dw Route15Text9
dw Route15Text10 dw Route15Text10
dw Predef5CText dw PickUpItemText
dw Route15Text12 dw Route15Text12
Route15TrainerHeaders: ; 597df (16:57df) Route15TrainerHeaders: ; 597df (16:57df)

View file

@ -28,7 +28,7 @@ Route16Script0: ; 59959 (16:5959)
res 0, [hl] res 0, [hl]
jp z, CheckFightingMapTrainers jp z, CheckFightingMapTrainers
ld a, $a ld a, $a
ld [H_DOWNARROWBLINKCNT2], a ld [hSpriteIndexOrTextID], a
call DisplayTextID call DisplayTextID
ld a, SNORLAX ld a, SNORLAX
ld [W_CUROPPONENT], a ld [W_CUROPPONENT], a
@ -52,7 +52,7 @@ Route16Script3: ; 5998f (16:598f)
cp $2 cp $2
jr z, .asm_599a8 jr z, .asm_599a8
ld a, $b ld a, $b
ld [H_DOWNARROWBLINKCNT2], a ld [hSpriteIndexOrTextID], a
call DisplayTextID call DisplayTextID
.asm_599a8 .asm_599a8
ld hl, wd7e0 ld hl, wd7e0

View file

@ -19,14 +19,14 @@ Route16GateScript0: ; 496d7 (12:56d7)
call ArePlayerCoordsInArray call ArePlayerCoordsInArray
ret nc ret nc
ld a, $3 ld a, $3
ld [$ff8c], a ld [hSpriteIndexOrTextID], a
call DisplayTextID call DisplayTextID
xor a xor a
ld [hJoyHeld], a ld [hJoyHeld], a
ld a, [wWhichTrade] ld a, [wCoordIndex]
cp $1 cp $1
jr z, .asm_4970e jr z, .asm_4970e
ld a, [wWhichTrade] ld a, [wCoordIndex]
dec a dec a
ld [wSimulatedJoypadStatesIndex], a ld [wSimulatedJoypadStatesIndex], a
ld b, $0 ld b, $0
@ -59,7 +59,7 @@ Route16GateScript1: ; 4971d (12:571d)
Route16GateScript2: ; 49727 (12:5727) Route16GateScript2: ; 49727 (12:5727)
ld a, $1 ld a, $1
ld [H_SPRITEHEIGHT], a ld [hSpriteIndexOrTextID], a
call DisplayTextID call DisplayTextID
ld a, $1 ld a, $1
ld [wSimulatedJoypadStatesIndex], a ld [wSimulatedJoypadStatesIndex], a

View file

@ -19,17 +19,17 @@ Route18GateScript0: ; 4988f (12:588f)
call ArePlayerCoordsInArray call ArePlayerCoordsInArray
ret nc ret nc
ld a, $2 ld a, $2
ld [$ff8c], a ld [hSpriteIndexOrTextID], a
call DisplayTextID call DisplayTextID
xor a xor a
ld [hJoyHeld], a ld [hJoyHeld], a
ld a, [wWhichTrade] ld a, [wCoordIndex]
cp $1 cp $1
jr z, .asm_498c6 jr z, .asm_498c6
ld a, [wWhichTrade] ld a, [wCoordIndex]
dec a dec a
ld [wSimulatedJoypadStatesIndex], a ld [wSimulatedJoypadStatesIndex], a
ld b, $0 ld b, 0
ld c, a ld c, a
ld a, D_UP ld a, D_UP
ld hl, wSimulatedJoypadStatesEnd ld hl, wSimulatedJoypadStatesEnd
@ -59,7 +59,7 @@ Route18GateScript1: ; 498d5 (12:58d5)
Route18GateScript2: ; 498df (12:58df) Route18GateScript2: ; 498df (12:58df)
ld a, $1 ld a, $1
ld [H_SPRITEHEIGHT], a ld [hSpriteIndexOrTextID], a
call DisplayTextID call DisplayTextID
ld a, $1 ld a, $1
ld [wSimulatedJoypadStatesIndex], a ld [wSimulatedJoypadStatesIndex], a

View file

@ -2,8 +2,8 @@ Route2Script: ; 554e3 (15:54e3)
jp EnableAutoTextBoxDrawing jp EnableAutoTextBoxDrawing
Route2TextPointers: ; 554e6 (15:54e6) Route2TextPointers: ; 554e6 (15:54e6)
dw Predef5CText dw PickUpItemText
dw Predef5CText dw PickUpItemText
dw Route2Text3 dw Route2Text3
dw Route2Text4 dw Route2Text4

View file

@ -43,8 +43,8 @@ Route22MoveRivalSprite: ; 50ee6 (14:4ee6)
inc de inc de
.asm_50ef1 .asm_50ef1
call MoveSprite call MoveSprite
ld a, $c ld a, SPRITE_FACING_RIGHT
ld [$ff8d], a ld [hSpriteFacingDirection], a
jp SetSpriteFacingDirectionAndDelay jp SetSpriteFacingDirectionAndDelay
Route22RivalMovementData: ; 50efb (14:4efb) Route22RivalMovementData: ; 50efb (14:4efb)
@ -61,7 +61,7 @@ Route22Script0: ; 50f00 (14:4f00)
ld hl, .Route22RivalBattleCoords ld hl, .Route22RivalBattleCoords
call ArePlayerCoordsInArray call ArePlayerCoordsInArray
ret nc ret nc
ld a, [wWhichTrade] ld a, [wCoordIndex]
ld [wcf0d], a ld [wcf0d], a
xor a xor a
ld [hJoyHeld], a ld [hJoyHeld], a
@ -98,7 +98,7 @@ Route22Script0: ; 50f00 (14:4f00)
ld a, MUSIC_MEET_RIVAL ld a, MUSIC_MEET_RIVAL
call PlayMusic call PlayMusic
ld a, $1 ld a, $1
ld [$ff8c], a ld [H_SPRITEINDEX], a
call Route22MoveRivalSprite call Route22MoveRivalSprite
ld a, $1 ld a, $1
ld [W_ROUTE22CURSCRIPT], a ld [W_ROUTE22CURSCRIPT], a
@ -113,19 +113,19 @@ Route22Script1: ; 50f62 (14:4f62)
jr nz, .asm_50f78 jr nz, .asm_50f78
ld a, $4 ld a, $4
ld [wd528], a ld [wd528], a
ld a, $4 ld a, SPRITE_FACING_UP
jr .asm_50f7a jr .asm_50f7a
.asm_50f78 .asm_50f78
ld a, $c ld a, SPRITE_FACING_RIGHT
.asm_50f7a .asm_50f7a
ld [$ff8d], a ld [hSpriteFacingDirection], a
ld a, $1 ld a, $1
ld [$ff8c], a ld [H_SPRITEINDEX], a
call SetSpriteFacingDirectionAndDelay call SetSpriteFacingDirectionAndDelay
xor a xor a
ld [wJoyIgnore], a ld [wJoyIgnore], a
ld a, $1 ld a, $1
ld [$ff8c], a ld [hSpriteIndexOrTextID], a
call DisplayTextID call DisplayTextID
ld hl, wd72d ld hl, wd72d
set 6, [hl] set 6, [hl]
@ -159,16 +159,16 @@ Route22Script2: ; 50fb5 (14:4fb5)
.notDown .notDown
ld a, SPRITE_FACING_RIGHT ld a, SPRITE_FACING_RIGHT
.done .done
ld [$ff8d], a ld [hSpriteFacingDirection], a
ld a, $1 ld a, $1
ld [$ff8c], a ld [H_SPRITEINDEX], a
call SetSpriteFacingDirectionAndDelay call SetSpriteFacingDirectionAndDelay
ld a, $f0 ld a, $f0
ld [wJoyIgnore], a ld [wJoyIgnore], a
ld hl, wd7eb ld hl, wd7eb
set 5, [hl] set 5, [hl]
ld a, $1 ld a, $1
ld [$ff8c], a ld [hSpriteIndexOrTextID], a
call DisplayTextID call DisplayTextID
ld a, $ff ld a, $ff
ld [wc0ee], a ld [wc0ee], a
@ -194,7 +194,7 @@ Route22Script_5100d: ; 5100d (14:500d)
ld de, Route22RivalExitMovementData2 ld de, Route22RivalExitMovementData2
Route22MoveRival1: ; 51010 (14:5010) Route22MoveRival1: ; 51010 (14:5010)
ld a, $1 ld a, $1
ld [H_SPRITEHEIGHT], a ld [H_SPRITEINDEX], a
jp MoveSprite jp MoveSprite
Route22RivalExitMovementData1: ; 51017 (14:5017) Route22RivalExitMovementData1: ; 51017 (14:5017)
@ -255,7 +255,7 @@ Route22Script_5104e: ; 5104e (14:504e)
call PlaySound call PlaySound
callba Music_RivalAlternateTempo callba Music_RivalAlternateTempo
ld a, $2 ld a, $2
ld [H_DOWNARROWBLINKCNT2], a ld [H_SPRITEINDEX], a
call Route22MoveRivalSprite call Route22MoveRivalSprite
ld a, $4 ld a, $4
ld [W_ROUTE22CURSCRIPT], a ld [W_ROUTE22CURSCRIPT], a
@ -266,25 +266,25 @@ Route22Script4: ; 51087 (14:5087)
bit 0, a bit 0, a
ret nz ret nz
ld a, $2 ld a, $2
ld [H_DOWNARROWBLINKCNT2], a ld [H_SPRITEINDEX], a
ld a, [wcf0d] ld a, [wcf0d]
cp $1 cp $1
jr nz, .asm_510a1 jr nz, .asm_510a1
ld a, $4 ld a, $4
ld [wd528], a ld [wd528], a
ld a, $4 ld a, SPRITE_FACING_UP
jr .asm_510a8 jr .asm_510a8
.asm_510a1 .asm_510a1
ld a, $2 ld a, $2
ld [wd528], a ld [wd528], a
ld a, $c ld a, SPRITE_FACING_RIGHT
.asm_510a8 .asm_510a8
ld [$ff8d], a ld [hSpriteFacingDirection], a
call SetSpriteFacingDirectionAndDelay call SetSpriteFacingDirectionAndDelay
xor a xor a
ld [wJoyIgnore], a ld [wJoyIgnore], a
ld a, $2 ld a, $2
ld [H_DOWNARROWBLINKCNT2], a ld [hSpriteIndexOrTextID], a
call DisplayTextID call DisplayTextID
ld hl, wd72d ld hl, wd72d
set 6, [hl] set 6, [hl]
@ -310,27 +310,27 @@ Route22Script5: ; 510df (14:50df)
cp $ff cp $ff
jp z, Route22Script_50ece jp z, Route22Script_50ece
ld a, $2 ld a, $2
ld [H_DOWNARROWBLINKCNT2], a ld [H_SPRITEINDEX], a
ld a, [wcf0d] ld a, [wcf0d]
cp $1 cp $1
jr nz, .asm_510fb jr nz, .asm_510fb
ld a, $4 ld a, $4
ld [wd528], a ld [wd528], a
ld a, $4 ld a, SPRITE_FACING_UP
jr .asm_51102 jr .asm_51102
.asm_510fb .asm_510fb
ld a, $2 ld a, $2
ld [wd528], a ld [wd528], a
ld a, $c ld a, SPRITE_FACING_RIGHT
.asm_51102 .asm_51102
ld [$ff8d], a ld [hSpriteFacingDirection], a
call SetSpriteFacingDirectionAndDelay call SetSpriteFacingDirectionAndDelay
ld a, $f0 ld a, $f0
ld [wJoyIgnore], a ld [wJoyIgnore], a
ld hl, wd7eb ld hl, wd7eb
set 6, [hl] set 6, [hl]
ld a, $2 ld a, $2
ld [H_DOWNARROWBLINKCNT2], a ld [hSpriteIndexOrTextID], a
call DisplayTextID call DisplayTextID
ld a, $ff ld a, $ff
ld [wc0ee], a ld [wc0ee], a
@ -356,7 +356,7 @@ Route22Script_51142: ; 51142 (14:5142)
ld de, MovementData_5114d ld de, MovementData_5114d
Route22MoveRival2: ; 51145 (14:5145) Route22MoveRival2: ; 51145 (14:5145)
ld a, $2 ld a, $2
ld [H_DOWNARROWBLINKCNT2], a ld [H_SPRITEINDEX], a
jp MoveSprite jp MoveSprite
MovementData_5114c: ; 5114c (14:514c) MovementData_5114c: ; 5114c (14:514c)

View file

@ -24,7 +24,7 @@ Route22GateScript0: ; 1e6a4 (7:66a4)
xor a xor a
ld [hJoyHeld], a ld [hJoyHeld], a
ld a, $1 ld a, $1
ld [$ff8c], a ld [hSpriteIndexOrTextID], a
jp DisplayTextID jp DisplayTextID
Route22GateScriptCoords: ; 1e6b5 (7:66b5) Route22GateScriptCoords: ; 1e6b5 (7:66b5)

View file

@ -49,9 +49,9 @@ Route23Script0: ; 51219 (14:5219)
ret nc ret nc
.asm_51237 .asm_51237
ld a, e ld a, e
ld [$ff8c], a ld [hSpriteIndexOrTextID], a
ld a, c ld a, c
ld [wWhichTrade], a ld [wWhichBadge], a
ld b, $2 ld b, $2
ld hl, wd7ed ld hl, wd7ed
predef FlagActionPredef predef FlagActionPredef
@ -69,21 +69,21 @@ YCoordsData_51255: ; 51255 (14:5255)
Route23Script_5125d: ; 5125d (14:525d) Route23Script_5125d: ; 5125d (14:525d)
ld hl, BadgeTextPointers ld hl, BadgeTextPointers
ld a, [wWhichTrade] ld a, [wWhichBadge]
ld c, a ld c, a
ld b, $0 ld b, 0
add hl, bc add hl, bc
add hl, bc add hl, bc
ld a, [hli] ld a, [hli]
ld h, [hl] ld h, [hl]
ld l, a ld l, a
ld de, wcd6d ld de, wcd6d
.asm_5126e .copyTextLoop
ld a, [hli] ld a, [hli]
ld [de], a ld [de], a
inc de inc de
cp $50 cp "@"
jr nz, .asm_5126e jr nz, .copyTextLoop
ret ret
BadgeTextPointers: ; 51276 (14:5276) BadgeTextPointers: ; 51276 (14:5276)
@ -188,9 +188,9 @@ Route23Text7: ; 5133d (14:533d)
jp TextScriptEnd jp TextScriptEnd
Route23Script_51346: ; 51346 (14:5346) Route23Script_51346: ; 51346 (14:5346)
ld [wWhichTrade], a ld [wWhichBadge], a
call Route23Script_5125d call Route23Script_5125d
ld a, [wWhichTrade] ld a, [wWhichBadge]
inc a inc a
ld c, a ld c, a
ld b, $2 ld b, $2
@ -208,7 +208,7 @@ Route23Script_51346: ; 51346 (14:5346)
.asm_5136e .asm_5136e
ld hl, VictoryRoadGuardText2 ld hl, VictoryRoadGuardText2
call PrintText call PrintText
ld a, [wWhichTrade] ld a, [wWhichBadge]
ld c, a ld c, a
ld b, $1 ld b, $1
ld hl, wd7ed ld hl, wd7ed

View file

@ -31,7 +31,7 @@ Route24Script0: ; 513d5 (14:53d5)
xor a xor a
ld [hJoyHeld], a ld [hJoyHeld], a
ld a, $1 ld a, $1
ld [H_DOWNARROWBLINKCNT2], a ld [hSpriteIndexOrTextID], a
call DisplayTextID call DisplayTextID
ld hl, wd7f0 ld hl, wd7f0
bit 1, [hl] bit 1, [hl]
@ -70,7 +70,7 @@ Route24Script3: ; 51422 (14:5422)
ld hl, wd7ef ld hl, wd7ef
set 1, [hl] set 1, [hl]
ld a, $1 ld a, $1
ld [H_DOWNARROWBLINKCNT2], a ld [hSpriteIndexOrTextID], a
call DisplayTextID call DisplayTextID
xor a xor a
ld [wJoyIgnore], a ld [wJoyIgnore], a
@ -87,7 +87,7 @@ Route24TextPointers: ; 5144b (14:544b)
dw Route24Text5 dw Route24Text5
dw Route24Text6 dw Route24Text6
dw Route24Text7 dw Route24Text7
dw Predef5CText dw PickUpItemText
Route24TrainerHeaders: ; 5145b (14:545b) Route24TrainerHeaders: ; 5145b (14:545b)
Route24TrainerHeader0: ; 5145b (14:545b) Route24TrainerHeader0: ; 5145b (14:545b)
@ -170,7 +170,7 @@ Route24Text1: ; 514a4 (14:54a4)
ld hl, Route24Text_5152b ld hl, Route24Text_5152b
ld de, Route24Text_5152b ld de, Route24Text_5152b
call SaveEndBattleTextPointers call SaveEndBattleTextPointers
ld a, [$ff8c] ld a, [hSpriteIndexOrTextID]
ld [wSpriteIndex], a ld [wSpriteIndex], a
call EngageMapTrainer call EngageMapTrainer
call InitBattleEnemyParameters call InitBattleEnemyParameters

View file

@ -51,7 +51,7 @@ Route25TextPointers: ; 51628 (14:5628)
dw Route25Text7 dw Route25Text7
dw Route25Text8 dw Route25Text8
dw Route25Text9 dw Route25Text9
dw Predef5CText dw PickUpItemText
dw Route25Text11 dw Route25Text11
Route25TrainerHeaders: ; 5163e (14:563e) Route25TrainerHeaders: ; 5163e (14:563e)

View file

@ -15,7 +15,7 @@ Route4ScriptPointers: ; 5566b (15:566b)
Route4TextPointers: ; 55671 (15:5671) Route4TextPointers: ; 55671 (15:5671)
dw Route4Text1 dw Route4Text1
dw Route4Text2 dw Route4Text2
dw Predef5CText dw PickUpItemText
dw PokeCenterSignText dw PokeCenterSignText
dw Route4Text5 dw Route4Text5
dw Route4Text6 dw Route4Text6

View file

@ -31,7 +31,7 @@ Route5GateScript0: ; 1df50 (7:5f50)
and a and a
jr nz, .asm_1df82 jr nz, .asm_1df82
ld a, $2 ld a, $2
ld [$ff8c], a ld [hSpriteIndexOrTextID], a
call DisplayTextID call DisplayTextID
call Route5GateScript_1df43 call Route5GateScript_1df43
ld a, $1 ld a, $1
@ -39,7 +39,7 @@ Route5GateScript0: ; 1df50 (7:5f50)
ret ret
.asm_1df82 .asm_1df82
ld a, $3 ld a, $3
ld [$ff8c], a ld [hSpriteIndexOrTextID], a
call DisplayTextID call DisplayTextID
ld hl, wd728 ld hl, wd728
set 6, [hl] set 6, [hl]

View file

@ -25,7 +25,7 @@ Route6GateScript0: ; 1e04e (7:604e)
and a and a
jr nz, .asm_1e080 jr nz, .asm_1e080
ld a, $2 ld a, $2
ld [$ff8c], a ld [hSpriteIndexOrTextID], a
call DisplayTextID call DisplayTextID
call Route6GateScript_1e0a1 call Route6GateScript_1e0a1
ld a, $1 ld a, $1
@ -35,7 +35,7 @@ Route6GateScript0: ; 1e04e (7:604e)
ld hl, wd728 ld hl, wd728
set 6, [hl] set 6, [hl]
ld a, $3 ld a, $3
ld [$ff8c], a ld [hSpriteIndexOrTextID], a
jp DisplayTextID jp DisplayTextID
CoordsData_1e08c: ; 1e08c (7:608c) CoordsData_1e08c: ; 1e08c (7:608c)

View file

@ -37,7 +37,7 @@ Route7GateScript0: ; 1e128 (7:6128)
and a and a
jr nz, .asm_1e15a jr nz, .asm_1e15a
ld a, $2 ld a, $2
ld [$ff8c], a ld [hSpriteIndexOrTextID], a
call DisplayTextID call DisplayTextID
call Route7GateScript_1e111 call Route7GateScript_1e111
ld a, $1 ld a, $1
@ -45,7 +45,7 @@ Route7GateScript0: ; 1e128 (7:6128)
ret ret
.asm_1e15a .asm_1e15a
ld a, $3 ld a, $3
ld [$ff8c], a ld [hSpriteIndexOrTextID], a
call DisplayTextID call DisplayTextID
ld hl, wd728 ld hl, wd728
set 6, [hl] set 6, [hl]

View file

@ -36,7 +36,7 @@ Route8GateScript0: ; 1e1ee (7:61ee)
and a and a
jr nz, .asm_1e220 jr nz, .asm_1e220
ld a, $2 ld a, $2
ld [$ff8c], a ld [hSpriteIndexOrTextID], a
call DisplayTextID call DisplayTextID
call Route8GateScript_1e1d7 call Route8GateScript_1e1d7
ld a, $1 ld a, $1
@ -46,7 +46,7 @@ Route8GateScript0: ; 1e1ee (7:61ee)
ld hl, wd728 ld hl, wd728
set 6, [hl] set 6, [hl]
ld a, $3 ld a, $3
ld [$ff8c], a ld [hSpriteIndexOrTextID], a
jp DisplayTextID jp DisplayTextID
CoordsData_1e22c: ; 1e22c (7:622c) CoordsData_1e22c: ; 1e22c (7:622c)

View file

@ -22,7 +22,7 @@ Route9TextPointers: ; 556d5 (15:56d5)
dw Route9Text7 dw Route9Text7
dw Route9Text8 dw Route9Text8
dw Route9Text9 dw Route9Text9
dw Predef5CText dw PickUpItemText
dw Route9Text11 dw Route9Text11
Route9TrainerHeaders: ; 556eb (15:56eb) Route9TrainerHeaders: ; 556eb (15:56eb)

View file

@ -2,7 +2,7 @@ SafariZoneCenterScript: ; 45bb2 (11:5bb2)
jp EnableAutoTextBoxDrawing jp EnableAutoTextBoxDrawing
SafariZoneCenterTextPointers: ; 45bb5 (11:5bb5) SafariZoneCenterTextPointers: ; 45bb5 (11:5bb5)
dw Predef5CText dw PickUpItemText
dw SafariZoneCenterText2 dw SafariZoneCenterText2
dw SafariZoneCenterText3 dw SafariZoneCenterText3

View file

@ -2,10 +2,10 @@ SafariZoneEastScript: ; 4586b (11:586b)
jp EnableAutoTextBoxDrawing jp EnableAutoTextBoxDrawing
SafariZoneEastTextPointers: ; 4586e (11:586e) SafariZoneEastTextPointers: ; 4586e (11:586e)
dw Predef5CText dw PickUpItemText
dw Predef5CText dw PickUpItemText
dw Predef5CText dw PickUpItemText
dw Predef5CText dw PickUpItemText
dw SafariZoneEastText5 dw SafariZoneEastText5
dw SafariZoneEastText6 dw SafariZoneEastText6
dw SafariZoneEastText7 dw SafariZoneEastText7

View file

@ -18,7 +18,7 @@ SafariZoneEntranceScriptPointers: ; 751d9 (1d:51d9)
call ArePlayerCoordsInArray call ArePlayerCoordsInArray
ret nc ret nc
ld a, $3 ld a, $3
ld [$ff8c], a ld [hSpriteIndexOrTextID], a
call DisplayTextID call DisplayTextID
ld a, $ff ld a, $ff
ld [wJoyIgnore], a ld [wJoyIgnore], a
@ -56,7 +56,7 @@ SafariZoneEntranceScriptPointers: ; 751d9 (1d:51d9)
ld [wJoyIgnore], a ld [wJoyIgnore], a
call UpdateSprites call UpdateSprites
ld a, $4 ld a, $4
ld [$ff8c], a ld [hSpriteIndexOrTextID], a
call DisplayTextID call DisplayTextID
ld a, $ff ld a, $ff
ld [wJoyIgnore], a ld [wJoyIgnore], a
@ -83,7 +83,7 @@ SafariZoneEntranceScriptPointers: ; 751d9 (1d:51d9)
ld a, $f0 ld a, $f0
ld [wJoyIgnore], a ld [wJoyIgnore], a
ld a, $6 ld a, $6
ld [$ff8c], a ld [hSpriteIndexOrTextID], a
call DisplayTextID call DisplayTextID
xor a xor a
ld [W_NUMSAFARIBALLS], a ld [W_NUMSAFARIBALLS], a
@ -95,7 +95,7 @@ SafariZoneEntranceScriptPointers: ; 751d9 (1d:51d9)
jr .asm_75286 jr .asm_75286
.asm_7527f .asm_7527f
ld a, $5 ld a, $5
ld [$ff8c], a ld [hSpriteIndexOrTextID], a
call DisplayTextID call DisplayTextID
.asm_75286 .asm_75286
ret ret

View file

@ -2,8 +2,8 @@ SafariZoneNorthScript: ; 459ab (11:59ab)
jp EnableAutoTextBoxDrawing jp EnableAutoTextBoxDrawing
SafariZoneNorthTextPointers: ; 459ae (11:59ae) SafariZoneNorthTextPointers: ; 459ae (11:59ae)
dw Predef5CText dw PickUpItemText
dw Predef5CText dw PickUpItemText
dw SafariZoneNorthText3 dw SafariZoneNorthText3
dw SafariZoneNorthText4 dw SafariZoneNorthText4
dw SafariZoneNorthText5 dw SafariZoneNorthText5

View file

@ -2,10 +2,10 @@ SafariZoneWestScript: ; 4a1b5 (12:61b5)
jp EnableAutoTextBoxDrawing jp EnableAutoTextBoxDrawing
SafariZoneWestTextPointers: ; 4a1b8 (12:61b8) SafariZoneWestTextPointers: ; 4a1b8 (12:61b8)
dw Predef5CText dw PickUpItemText
dw Predef5CText dw PickUpItemText
dw Predef5CText dw PickUpItemText
dw Predef5CText dw PickUpItemText
dw SafariZoneWestText5 dw SafariZoneWestText5
dw SafariZoneWestText6 dw SafariZoneWestText6
dw SafariZoneWestText7 dw SafariZoneWestText7

View file

@ -44,7 +44,7 @@ SaffronGymScript3: ; 5d05b (17:505b)
SaffronGymText_5d068: ; 5d068 (17:5068) SaffronGymText_5d068: ; 5d068 (17:5068)
ld a, $a ld a, $a
ld [H_DOWNARROWBLINKCNT2], a ld [hSpriteIndexOrTextID], a
call DisplayTextID call DisplayTextID
ld hl, wd7b3 ld hl, wd7b3
set 1, [hl] set 1, [hl]
@ -52,14 +52,14 @@ SaffronGymText_5d068: ; 5d068 (17:5068)
call GiveItem call GiveItem
jr nc, .BagFull jr nc, .BagFull
ld a, $b ld a, $b
ld [H_DOWNARROWBLINKCNT2], a ld [hSpriteIndexOrTextID], a
call DisplayTextID call DisplayTextID
ld hl, wd7b3 ld hl, wd7b3
set 0, [hl] set 0, [hl]
jr .asm_5d091 jr .asm_5d091
.BagFull .BagFull
ld a, $c ld a, $c
ld [H_DOWNARROWBLINKCNT2], a ld [hSpriteIndexOrTextID], a
call DisplayTextID call DisplayTextID
.asm_5d091 .asm_5d091
ld hl, W_OBTAINEDBADGES ld hl, W_OBTAINEDBADGES

View file

@ -44,9 +44,9 @@ SilphCo10TextPointers: ; 5a186 (16:6186)
dw SilphCo10Text1 dw SilphCo10Text1
dw SilphCo10Text2 dw SilphCo10Text2
dw SilphCo10Text3 dw SilphCo10Text3
dw Predef5CText dw PickUpItemText
dw Predef5CText dw PickUpItemText
dw Predef5CText dw PickUpItemText
SilphCo10TrainerHeaders: ; 5a192 (16:6192) SilphCo10TrainerHeaders: ; 5a192 (16:6192)
SilphCo10TrainerHeader0: ; 5a192 (16:6192) SilphCo10TrainerHeader0: ; 5a192 (16:6192)

View file

@ -170,17 +170,17 @@ SilphCo11Script0: ; 621db (18:61db)
ld hl, CoordsData_62211 ld hl, CoordsData_62211
call ArePlayerCoordsInArray call ArePlayerCoordsInArray
jp nc, CheckFightingMapTrainers jp nc, CheckFightingMapTrainers
ld a, [wWhichTrade] ld a, [wCoordIndex]
ld [wcf0d], a ld [wcf0d], a
xor a xor a
ld [hJoyHeld], a ld [hJoyHeld], a
ld a, $f0 ld a, $f0
ld [wJoyIgnore], a ld [wJoyIgnore], a
ld a, $3 ld a, $3
ld [H_DOWNARROWBLINKCNT2], a ld [hSpriteIndexOrTextID], a
call DisplayTextID call DisplayTextID
ld a, $3 ld a, $3
ld [H_DOWNARROWBLINKCNT2], a ld [H_SPRITEINDEX], a
call SetSpriteMovementBytesToFF call SetSpriteMovementBytesToFF
ld de, MovementData_62216 ld de, MovementData_62216
call MoveSprite call MoveSprite
@ -201,9 +201,9 @@ MovementData_62216: ; 62216 (18:6216)
SilphCo11Script_6221a: ; 6221a (18:621a) SilphCo11Script_6221a: ; 6221a (18:621a)
ld [wd528], a ld [wd528], a
ld a, $3 ld a, $3
ld [H_DOWNARROWBLINKCNT2], a ld [H_SPRITEINDEX], a
ld a, b ld a, b
ld [$ff8d], a ld [hSpriteFacingDirection], a
jp SetSpriteFacingDirectionAndDelay jp SetSpriteFacingDirectionAndDelay
SilphCo11Script5: ; 62227 (18:6227) SilphCo11Script5: ; 62227 (18:6227)
@ -214,17 +214,17 @@ SilphCo11Script5: ; 62227 (18:6227)
cp $1 cp $1
jr z, .asm_6223c jr z, .asm_6223c
ld a, $2 ld a, $2
ld b, $c ld b, SPRITE_FACING_RIGHT
jr .asm_62240 jr .asm_62240
.asm_6223c .asm_6223c
ld a, $8 ld a, $8
ld b, $0 ld b, SPRITE_FACING_DOWN
.asm_62240 .asm_62240
call SilphCo11Script_6221a call SilphCo11Script_6221a
ld a, $f0 ld a, $f0
ld [wJoyIgnore], a ld [wJoyIgnore], a
ld a, $6 ld a, $6
ld [H_DOWNARROWBLINKCNT2], a ld [hSpriteIndexOrTextID], a
call DisplayTextID call DisplayTextID
call GBFadeOutToBlack call GBFadeOutToBlack
call SilphCo11Script_6216d call SilphCo11Script_6216d
@ -242,17 +242,17 @@ SilphCo11Script3: ; 6226a (18:626a)
bit 0, a bit 0, a
ret nz ret nz
ld a, $3 ld a, $3
ld [H_DOWNARROWBLINKCNT2], a ld [H_SPRITEINDEX], a
call SetSpriteMovementBytesToFF call SetSpriteMovementBytesToFF
ld a, [wcf0d] ld a, [wcf0d]
cp $1 cp $1
jr z, .asm_62284 jr z, .asm_62284
ld a, $2 ld a, $2
ld b, $c ld b, SPRITE_FACING_RIGHT
jr .asm_62288 jr .asm_62288
.asm_62284 .asm_62284
ld a, $8 ld a, $8
ld b, $0 ld b, SPRITE_FACING_DOWN
.asm_62288 .asm_62288
call SilphCo11Script_6221a call SilphCo11Script_6221a
call Delay3 call Delay3
@ -266,7 +266,7 @@ SilphCo11Script4: ; 62293 (18:6293)
ld hl, SilphCo10Text_62330 ld hl, SilphCo10Text_62330
ld de, SilphCo10Text_62330 ld de, SilphCo10Text_62330
call SaveEndBattleTextPointers call SaveEndBattleTextPointers
ld a, [H_DOWNARROWBLINKCNT2] ld a, [H_SPRITEINDEX]
ld [wSpriteIndex], a ld [wSpriteIndex], a
call EngageMapTrainer call EngageMapTrainer
call InitBattleEnemyParameters call InitBattleEnemyParameters

View file

@ -58,7 +58,7 @@ SilphCo3TextPointers: ; 59fc4 (16:5fc4)
dw SilphCo3Text1 dw SilphCo3Text1
dw SilphCo3Text2 dw SilphCo3Text2
dw SilphCo3Text3 dw SilphCo3Text3
dw Predef5CText dw PickUpItemText
SilphCo3TrainerHeaders: ; 59fcc (16:5fcc) SilphCo3TrainerHeaders: ; 59fcc (16:5fcc)
SilphCo3TrainerHeader0: ; 59fcc (16:5fcc) SilphCo3TrainerHeader0: ; 59fcc (16:5fcc)

View file

@ -95,9 +95,9 @@ SilphCo4TextPointers: ; 19da0 (6:5da0)
dw SilphCo4Text2 dw SilphCo4Text2
dw SilphCo4Text3 dw SilphCo4Text3
dw SilphCo4Text4 dw SilphCo4Text4
dw Predef5CText dw PickUpItemText
dw Predef5CText dw PickUpItemText
dw Predef5CText dw PickUpItemText
SilphCo4TrainerHeaders: ; 19dae (6:5dae) SilphCo4TrainerHeaders: ; 19dae (6:5dae)
SilphCo4TrainerHeader0: ; 19dae (6:5dae) SilphCo4TrainerHeader0: ; 19dae (6:5dae)

View file

@ -74,9 +74,9 @@ SilphCo5TextPointers: ; 19fbc (6:5fbc)
dw SilphCo5Text3 dw SilphCo5Text3
dw SilphCo5Text4 dw SilphCo5Text4
dw SilphCo5Text5 dw SilphCo5Text5
dw Predef5CText dw PickUpItemText
dw Predef5CText dw PickUpItemText
dw Predef5CText dw PickUpItemText
dw SilphCo5Text9 dw SilphCo5Text9
dw SilphCo5Text10 dw SilphCo5Text10
dw SilphCo5Text11 dw SilphCo5Text11

View file

@ -50,8 +50,8 @@ SilphCo6TextPointers: ; 1a1f6 (6:61f6)
dw SilphCo6Text6 dw SilphCo6Text6
dw SilphCo6Text7 dw SilphCo6Text7
dw SilphCo6Text8 dw SilphCo6Text8
dw Predef5CText dw PickUpItemText
dw Predef5CText dw PickUpItemText
SilphCo6TrainerHeaders: ; 1a20a (6:620a) SilphCo6TrainerHeaders: ; 1a20a (6:620a)
SilphCo6TrainerHeader0: ; 1a20a (6:620a) SilphCo6TrainerHeader0: ; 1a20a (6:620a)

View file

@ -136,10 +136,10 @@ SilphCo7Script0: ; 51c23 (14:5c23)
ld a, MUSIC_MEET_RIVAL ld a, MUSIC_MEET_RIVAL
call PlayMusic call PlayMusic
ld a, $9 ld a, $9
ld [H_DOWNARROWBLINKCNT2], a ld [hSpriteIndexOrTextID], a
call DisplayTextID call DisplayTextID
ld a, $9 ld a, $9
ld [H_DOWNARROWBLINKCNT2], a ld [H_SPRITEINDEX], a
call SetSpriteMovementBytesToFF call SetSpriteMovementBytesToFF
ld de, MovementData_51c7d ld de, MovementData_51c7d
ld a, [wWhichTrade] ld a, [wWhichTrade]
@ -149,7 +149,7 @@ SilphCo7Script0: ; 51c23 (14:5c23)
inc de inc de
.asm_51c6c .asm_51c6c
ld a, $9 ld a, $9
ld [H_DOWNARROWBLINKCNT2], a ld [H_SPRITEINDEX], a
call MoveSprite call MoveSprite
ld a, $3 ld a, $3
jp SilphCo7Text_51c10 jp SilphCo7Text_51c10
@ -173,7 +173,7 @@ SilphCo7Script3: ; 51c82 (14:5c82)
xor a xor a
ld [wJoyIgnore], a ld [wJoyIgnore], a
ld a, $d ld a, $d
ld [H_DOWNARROWBLINKCNT2], a ld [hSpriteIndexOrTextID], a
call DisplayTextID call DisplayTextID
call Delay3 call Delay3
ld hl, wd72d ld hl, wd72d
@ -212,12 +212,12 @@ SilphCo7Script4: ; 51cc8 (14:5cc8)
ld a, $4 ld a, $4
ld [wd528], a ld [wd528], a
ld a, $9 ld a, $9
ld [H_DOWNARROWBLINKCNT2], a ld [H_SPRITEINDEX], a
ld a, $4 ld a, SPRITE_FACING_UP
ld [$ff8d], a ld [hSpriteFacingDirection], a
call SetSpriteFacingDirectionAndDelay call SetSpriteFacingDirectionAndDelay
ld a, $f ld a, $f
ld [H_DOWNARROWBLINKCNT2], a ld [hSpriteIndexOrTextID], a
call DisplayTextID call DisplayTextID
ld a, $ff ld a, $ff
ld [wc0ee], a ld [wc0ee], a
@ -230,7 +230,7 @@ SilphCo7Script4: ; 51cc8 (14:5cc8)
ld de, MovementData_51d1a ld de, MovementData_51d1a
.asm_51d0e .asm_51d0e
ld a, $9 ld a, $9
ld [H_DOWNARROWBLINKCNT2], a ld [H_SPRITEINDEX], a
call MoveSprite call MoveSprite
ld a, $5 ld a, $5
jp SilphCo7Text_51c10 jp SilphCo7Text_51c10
@ -272,9 +272,9 @@ SilphCo7TextPointers: ; 51d3f (14:5d3f)
dw SilphCo7Text7 dw SilphCo7Text7
dw SilphCo7Text8 dw SilphCo7Text8
dw SilphCo7Text9 dw SilphCo7Text9
dw Predef5CText dw PickUpItemText
dw Predef5CText dw PickUpItemText
dw Predef5CText dw PickUpItemText
dw SilphCo7Text13 dw SilphCo7Text13
dw SilphCo7Text14 dw SilphCo7Text14
dw SilphCo7Text15 dw SilphCo7Text15

View file

@ -21,9 +21,9 @@ SSAnne10TextPointers: ; 61d6e (18:5d6e)
dw SSAnne10Text6 dw SSAnne10Text6
dw SSAnne10Text7 dw SSAnne10Text7
dw SSAnne10Text8 dw SSAnne10Text8
dw Predef5CText dw PickUpItemText
dw Predef5CText dw PickUpItemText
dw Predef5CText dw PickUpItemText
SSAnne10TrainerHeaders: ; 61d84 (18:5d84) SSAnne10TrainerHeaders: ; 61d84 (18:5d84)
SSAnne10TrainerHeader0: ; 61d84 (18:5d84) SSAnne10TrainerHeader0: ; 61d84 (18:5d84)

View file

@ -30,14 +30,14 @@ SSAnne2Script0: ; 613be (18:53be)
ld c, BANK(Music_MeetRival) ld c, BANK(Music_MeetRival)
ld a, MUSIC_MEET_RIVAL ld a, MUSIC_MEET_RIVAL
call PlayMusic call PlayMusic
ld a, [wWhichTrade] ld a, [wCoordIndex]
ld [$ffdb], a ld [$ffdb], a
ld a, HS_SS_ANNE_2_RIVAL ld a, HS_SS_ANNE_2_RIVAL
ld [wcc4d], a ld [wcc4d], a
predef ShowObject predef ShowObject
call Delay3 call Delay3
ld a, $2 ld a, $2
ld [$ff8c], a ld [H_SPRITEINDEX], a
call SetSpriteMovementBytesToFF call SetSpriteMovementBytesToFF
xor a xor a
ld [hJoyHeld], a ld [hJoyHeld], a
@ -79,11 +79,11 @@ SSAnne2Script_61416: ; 61416 (18:5416)
ld a, SPRITE_FACING_RIGHT ld a, SPRITE_FACING_RIGHT
jr .asm_61427 jr .asm_61427
.asm_61426 .asm_61426
xor a xor a ; SPRITE_FACING_DOWN
.asm_61427 .asm_61427
ld [$ff8d], a ld [hSpriteFacingDirection], a
ld a, $2 ld a, $2
ld [H_DOWNARROWBLINKCNT2], a ld [H_SPRITEINDEX], a
jp SetSpriteFacingDirectionAndDelay jp SetSpriteFacingDirectionAndDelay
SSAnne2Script1: ; 61430 (18:5430) SSAnne2Script1: ; 61430 (18:5430)
@ -94,7 +94,7 @@ SSAnne2Script1: ; 61430 (18:5430)
xor a xor a
ld [wJoyIgnore], a ld [wJoyIgnore], a
ld a, $2 ld a, $2
ld [$ff8c], a ld [hSpriteIndexOrTextID], a
call DisplayTextID call DisplayTextID
call Delay3 call Delay3
ld a, SONY2 + $c8 ld a, SONY2 + $c8
@ -129,10 +129,10 @@ SSAnne2Script2: ; 6146d (18:546d)
ld a, $f0 ld a, $f0
ld [wJoyIgnore], a ld [wJoyIgnore], a
ld a, $3 ld a, $3
ld [$ff8c], a ld [hSpriteIndexOrTextID], a
call DisplayTextID call DisplayTextID
ld a, $2 ld a, $2
ld [$ff8c], a ld [H_SPRITEINDEX], a
call SetSpriteMovementBytesToFF call SetSpriteMovementBytesToFF
ld a, [W_XCOORD] ld a, [W_XCOORD]
cp $25 cp $25
@ -143,7 +143,7 @@ SSAnne2Script2: ; 6146d (18:546d)
ld de, MovementData_614b7 ld de, MovementData_614b7
.asm_6149a .asm_6149a
ld a, $2 ld a, $2
ld [$ff8c], a ld [H_SPRITEINDEX], a
call MoveSprite call MoveSprite
ld a, $ff ld a, $ff
ld [wc0ee], a ld [wc0ee], a

View file

@ -22,7 +22,7 @@ SSAnne8TextPointers: ; 6198f (18:598f)
dw SSAnne8Text7 dw SSAnne8Text7
dw SSAnne8Text8 dw SSAnne8Text8
dw SSAnne8Text9 dw SSAnne8Text9
dw Predef5CText dw PickUpItemText
dw SSAnne8Text11 dw SSAnne8Text11
SSAnne8TrainerHeaders: ; 619a5 (18:59a5) SSAnne8TrainerHeaders: ; 619a5 (18:59a5)

View file

@ -21,10 +21,10 @@ SSAnne9TextPointers: ; 61b6a (18:5b6a)
dw SSAnne9Text3 dw SSAnne9Text3
dw SSAnne9Text4 dw SSAnne9Text4
dw SSAnne9Text5 dw SSAnne9Text5
dw Predef5CText dw PickUpItemText
dw SSAnne9Text7 dw SSAnne9Text7
dw SSAnne9Text8 dw SSAnne9Text8
dw Predef5CText dw PickUpItemText
dw SSAnne9Text10 dw SSAnne9Text10
dw SSAnne9Text11 dw SSAnne9Text11
dw SSAnne9Text12 dw SSAnne9Text12

View file

@ -2,13 +2,13 @@ TradeCenterScript: ; 4fd10 (13:7d10)
call EnableAutoTextBoxDrawing call EnableAutoTextBoxDrawing
ld a, [$ffaa] ld a, [$ffaa]
cp $2 cp $2
ld a, $8 ld a, SPRITE_FACING_LEFT
jr z, .asm_4fd1d jr z, .next
ld a, $c ld a, SPRITE_FACING_RIGHT
.asm_4fd1d .next
ld [$ff8d], a ld [hSpriteFacingDirection], a
ld a, $1 ld a, $1
ld [$ff8c], a ld [H_SPRITEINDEX], a
call SetSpriteFacingDirection call SetSpriteFacingDirection
ld hl, wd72d ld hl, wd72d
bit 0, [hl] bit 0, [hl]

View file

@ -2,6 +2,6 @@ UnknownDungeon1Script: ; 74d0c (1d:4d0c)
jp EnableAutoTextBoxDrawing jp EnableAutoTextBoxDrawing
UnknownDungeon1TextPointers: ; 74d0f (1d:4d0f) UnknownDungeon1TextPointers: ; 74d0f (1d:4d0f)
dw Predef5CText dw PickUpItemText
dw Predef5CText dw PickUpItemText
dw Predef5CText dw PickUpItemText

View file

@ -2,6 +2,6 @@ UnknownDungeon2Script: ; 45e0b (11:5e0b)
jp EnableAutoTextBoxDrawing jp EnableAutoTextBoxDrawing
UnknownDungeon2TextPointers: ; 45e0e (11:5e0e) UnknownDungeon2TextPointers: ; 45e0e (11:5e0e)
dw Predef5CText dw PickUpItemText
dw Predef5CText dw PickUpItemText
dw Predef5CText dw PickUpItemText

View file

@ -14,8 +14,8 @@ UnknownDungeon3ScriptPointers: ; 45f03 (11:5f03)
UnknownDungeon3TextPointers: ; 45f09 (11:5f09) UnknownDungeon3TextPointers: ; 45f09 (11:5f09)
dw UnknownDungeon3Text1 dw UnknownDungeon3Text1
dw Predef5CText dw PickUpItemText
dw Predef5CText dw PickUpItemText
UnknownDungeon3TrainerHeaders: ; 45f0f (11:5f0f) UnknownDungeon3TrainerHeaders: ; 45f0f (11:5f0f)
UnknownDungeon3TrainerHeader0: ; 45f0f (11:5f0f) UnknownDungeon3TrainerHeader0: ; 45f0f (11:5f0f)

View file

@ -49,7 +49,7 @@ VermilionCityScript0: ; 197e6 (6:57e6)
ld [hJoyHeld], a ld [hJoyHeld], a
ld [wcf0d], a ld [wcf0d], a
ld a, $3 ld a, $3
ld [$ff8c], a ld [hSpriteIndexOrTextID], a
call DisplayTextID call DisplayTextID
ld a, [wd803] ld a, [wd803]
bit 2, a bit 2, a

View file

@ -64,7 +64,7 @@ VermilionGymScript3: ; 5ca9d (17:4a9d)
VermilionGymScript_5caaa: ; 5caaa (17:4aaa) VermilionGymScript_5caaa: ; 5caaa (17:4aaa)
ld a, $6 ld a, $6
ld [H_DOWNARROWBLINKCNT2], a ld [hSpriteIndexOrTextID], a
call DisplayTextID call DisplayTextID
ld hl, wd773 ld hl, wd773
set 7, [hl] set 7, [hl]
@ -72,14 +72,14 @@ VermilionGymScript_5caaa: ; 5caaa (17:4aaa)
call GiveItem call GiveItem
jr nc, .BagFull jr nc, .BagFull
ld a, $7 ld a, $7
ld [H_DOWNARROWBLINKCNT2], a ld [hSpriteIndexOrTextID], a
call DisplayTextID call DisplayTextID
ld hl, wd773 ld hl, wd773
set 6, [hl] set 6, [hl]
jr .asm_5cad3 jr .asm_5cad3
.BagFull .BagFull
ld a, $8 ld a, $8
ld [H_DOWNARROWBLINKCNT2], a ld [hSpriteIndexOrTextID], a
call DisplayTextID call DisplayTextID
.asm_5cad3 .asm_5cad3
ld hl, W_OBTAINEDBADGES ld hl, W_OBTAINEDBADGES

View file

@ -43,8 +43,8 @@ CoordsData_5da5c: ; 5da5c (17:5a5c)
VictoryRoad1TextPointers: ; 5da5f (17:5a5f) VictoryRoad1TextPointers: ; 5da5f (17:5a5f)
dw VictoryRoad1Text1 dw VictoryRoad1Text1
dw VictoryRoad1Text2 dw VictoryRoad1Text2
dw Predef5CText dw PickUpItemText
dw Predef5CText dw PickUpItemText
dw BoulderText dw BoulderText
dw BoulderText dw BoulderText
dw BoulderText dw BoulderText

View file

@ -77,10 +77,10 @@ VictoryRoad2TextPointers: ; 5181b (14:581b)
dw VictoryRoad2Text4 dw VictoryRoad2Text4
dw VictoryRoad2Text5 dw VictoryRoad2Text5
dw VictoryRoad2Text6 dw VictoryRoad2Text6
dw Predef5CText dw PickUpItemText
dw Predef5CText dw PickUpItemText
dw Predef5CText dw PickUpItemText
dw Predef5CText dw PickUpItemText
dw BoulderText dw BoulderText
dw BoulderText dw BoulderText
dw BoulderText dw BoulderText

View file

@ -83,8 +83,8 @@ VictoryRoad3TextPointers: ; 44a24 (11:4a24)
dw VictoryRoad3Text2 dw VictoryRoad3Text2
dw VictoryRoad3Text3 dw VictoryRoad3Text3
dw VictoryRoad3Text4 dw VictoryRoad3Text4
dw Predef5CText dw PickUpItemText
dw Predef5CText dw PickUpItemText
dw BoulderText dw BoulderText
dw BoulderText dw BoulderText
dw BoulderText dw BoulderText

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