Sync coordinate macros with pokecrystal

This commit is contained in:
Rangi 2020-07-07 11:30:10 -04:00
parent 45ed05decf
commit 13129459f1
75 changed files with 675 additions and 661 deletions

View file

@ -682,7 +682,7 @@ DoBallTossSpecialEffects:
cp 1 cp 1
ret nz ret nz
.moveGhostMarowakLeft .moveGhostMarowakLeft
coord hl, 17, 0 hlcoord 17, 0
ld de, 20 ld de, 20
lb bc, 7, 7 lb bc, 7, 7
.loop .loop
@ -781,7 +781,7 @@ DoExplodeSpecialEffects:
cp 1 ; is it the end of the subanimation? cp 1 ; is it the end of the subanimation?
jr nz, FlashScreenEveryFourFrameBlocks jr nz, FlashScreenEveryFourFrameBlocks
; if it's the end of the subanimation, make the attacking pokemon disappear ; if it's the end of the subanimation, make the attacking pokemon disappear
coord hl, 1, 5 hlcoord 1, 5
jp AnimationHideMonPic ; make pokemon disappear jp AnimationHideMonPic ; make pokemon disappear
; flashes the screen when subanimation counter is 1 modulo 4 ; flashes the screen when subanimation counter is 1 modulo 4
@ -1135,12 +1135,12 @@ AnimationSlideMonUp:
ld c, 7 ld c, 7
ldh a, [hWhoseTurn] ldh a, [hWhoseTurn]
and a and a
coord hl, 1, 6 hlcoord 1, 6
coord de, 1, 5 decoord 1, 5
ld a, $30 ld a, $30
jr z, .next jr z, .next
coord hl, 12, 1 hlcoord 12, 1
coord de, 12, 0 decoord 12, 0
ld a, $ff ld a, $ff
.next .next
ld [wSlideMonUpBottomRowLeftTile], a ld [wSlideMonUpBottomRowLeftTile], a
@ -1203,9 +1203,9 @@ _AnimationSlideMonUp:
; Fill in the bottom row of the mon pic with the next row's tile IDs. ; Fill in the bottom row of the mon pic with the next row's tile IDs.
ldh a, [hWhoseTurn] ldh a, [hWhoseTurn]
and a and a
coord hl, 1, 11 hlcoord 1, 11
jr z, .next jr z, .next
coord hl, 12, 6 hlcoord 12, 6
.next .next
ld a, [wSlideMonUpBottomRowLeftTile] ld a, [wSlideMonUpBottomRowLeftTile]
inc a inc a
@ -1372,11 +1372,11 @@ AnimationShakeBackAndForth:
; The mon's sprite disappears after this animation. ; The mon's sprite disappears after this animation.
ldh a, [hWhoseTurn] ldh a, [hWhoseTurn]
and a and a
coord hl, 0, 5 hlcoord 0, 5
coord de, 2, 5 decoord 2, 5
jr z, .next jr z, .next
coord hl, 11, 0 hlcoord 11, 0
coord de, 13, 0 decoord 13, 0
.next .next
xor a xor a
@ -1420,9 +1420,9 @@ AnimationMoveMonHorizontally:
call AnimationHideMonPic call AnimationHideMonPic
ldh a, [hWhoseTurn] ldh a, [hWhoseTurn]
and a and a
coord hl, 2, 5 hlcoord 2, 5
jr z, .next jr z, .next
coord hl, 11, 0 hlcoord 11, 0
.next .next
xor a xor a
push hl push hl
@ -1533,12 +1533,12 @@ AnimationSquishMonPic:
ldh a, [hWhoseTurn] ldh a, [hWhoseTurn]
and a and a
jr z, .playerTurn jr z, .playerTurn
coord hl, 16, 0 hlcoord 16, 0
coord de, 14, 0 decoord 14, 0
jr .next jr .next
.playerTurn .playerTurn
coord hl, 5, 5 hlcoord 5, 5
coord de, 3, 5 decoord 3, 5
.next .next
push de push de
xor a ; left xor a ; left
@ -1746,10 +1746,10 @@ _AnimationSlideMonOff:
ldh a, [hWhoseTurn] ldh a, [hWhoseTurn]
and a and a
jr z, .playerTurn jr z, .playerTurn
coord hl, 12, 0 hlcoord 12, 0
jr .next jr .next
.playerTurn .playerTurn
coord hl, 0, 5 hlcoord 0, 5
.next .next
ld d, 8 ; d's value is unused ld d, 8 ; d's value is unused
.slideLoop ; iterates once for each time the pic slides by one tile .slideLoop ; iterates once for each time the pic slides by one tile
@ -1996,7 +1996,7 @@ ChangeMonPic:
xor a xor a
ld [wSpriteFlipped], a ld [wSpriteFlipped], a
call GetMonHeader call GetMonHeader
coord hl, 12, 0 hlcoord 12, 0
call LoadFrontSpriteByMonIndex call LoadFrontSpriteByMonIndex
jr .done jr .done
.playerTurn .playerTurn
@ -2064,7 +2064,7 @@ ClearMonPicFromTileMap:
push bc push bc
ld e, a ld e, a
ld d, 0 ld d, 0
coord hl, 0, 0 hlcoord 0, 0
add hl, de add hl, de
lb bc, 7, 7 lb bc, 7, 7
call ClearScreenArea call ClearScreenArea
@ -2086,7 +2086,7 @@ GetMonSpriteTileMapPointerFromRowCount:
.enemyTurn .enemyTurn
ld a, 12 ld a, 12
.next .next
coord hl, 0, 0 hlcoord 0, 0
ld e, a ld e, a
ld d, 0 ld d, 0
add hl, de add hl, de

View file

@ -181,7 +181,7 @@ BattleTransition_Spiral:
call BattleTransition_InwardSpiral call BattleTransition_InwardSpiral
jr .done jr .done
.outwardSpiral .outwardSpiral
coord hl, 10, 10 hlcoord 10, 10
ld a, $3 ld a, $3
ld [wOutwardSpiralCurrentDirection], a ld [wOutwardSpiralCurrentDirection], a
ld a, l ld a, l
@ -210,7 +210,7 @@ BattleTransition_Spiral:
BattleTransition_InwardSpiral: BattleTransition_InwardSpiral:
ld a, 7 ld a, 7
ld [wInwardSpiralUpdateScreenCounter], a ld [wInwardSpiralUpdateScreenCounter], a
coord hl, 0, 0 hlcoord 0, 0
ld c, SCREEN_HEIGHT - 1 ld c, SCREEN_HEIGHT - 1
ld de, SCREEN_WIDTH ld de, SCREEN_WIDTH
call BattleTransition_InwardSpiral_ call BattleTransition_InwardSpiral_
@ -350,20 +350,20 @@ BattleTransition_Shrink:
push bc push bc
xor a xor a
ldh [hAutoBGTransferEnabled], a ldh [hAutoBGTransferEnabled], a
coord hl, 0, 7 hlcoord 0, 7
coord de, 0, 8 decoord 0, 8
ld bc, -SCREEN_WIDTH * 2 ld bc, -SCREEN_WIDTH * 2
call BattleTransition_CopyTiles1 call BattleTransition_CopyTiles1
coord hl, 0, 10 hlcoord 0, 10
coord de, 0, 9 decoord 0, 9
ld bc, SCREEN_WIDTH * 2 ld bc, SCREEN_WIDTH * 2
call BattleTransition_CopyTiles1 call BattleTransition_CopyTiles1
coord hl, 8, 0 hlcoord 8, 0
coord de, 9, 0 decoord 9, 0
ld bc, -2 ld bc, -2
call BattleTransition_CopyTiles2 call BattleTransition_CopyTiles2
coord hl, 11, 0 hlcoord 11, 0
coord de, 10, 0 decoord 10, 0
ld bc, 2 ld bc, 2
call BattleTransition_CopyTiles2 call BattleTransition_CopyTiles2
ld a, $1 ld a, $1
@ -384,20 +384,20 @@ BattleTransition_Split:
ldh [hAutoBGTransferEnabled], a ldh [hAutoBGTransferEnabled], a
.loop .loop
push bc push bc
coord hl, 0, 16 hlcoord 0, 16
coord de, 0, 17 decoord 0, 17
ld bc, -SCREEN_WIDTH * 2 ld bc, -SCREEN_WIDTH * 2
call BattleTransition_CopyTiles1 call BattleTransition_CopyTiles1
coord hl, 0, 1 hlcoord 0, 1
coord de, 0, 0 decoord 0, 0
ld bc, SCREEN_WIDTH * 2 ld bc, SCREEN_WIDTH * 2
call BattleTransition_CopyTiles1 call BattleTransition_CopyTiles1
coord hl, 18, 0 hlcoord 18, 0
coord de, 19, 0 decoord 19, 0
ld bc, -2 ld bc, -2
call BattleTransition_CopyTiles2 call BattleTransition_CopyTiles2
coord hl, 1, 0 hlcoord 1, 0
coord de, 0, 0 decoord 0, 0
ld bc, 2 ld bc, 2
call BattleTransition_CopyTiles2 call BattleTransition_CopyTiles2
call BattleTransition_TransferDelay3 call BattleTransition_TransferDelay3
@ -493,8 +493,8 @@ BattleTransition_CopyTiles2:
; used for high level wild dungeon battles ; used for high level wild dungeon battles
BattleTransition_VerticalStripes: BattleTransition_VerticalStripes:
ld c, SCREEN_HEIGHT ld c, SCREEN_HEIGHT
coord hl, 0, 0 hlcoord 0, 0
coord de, 1, 17 decoord 1, 17
xor a xor a
ldh [hAutoBGTransferEnabled], a ldh [hAutoBGTransferEnabled], a
.loop .loop
@ -532,8 +532,8 @@ BattleTransition_VerticalStripes_:
; used for low level wild dungeon battles ; used for low level wild dungeon battles
BattleTransition_HorizontalStripes: BattleTransition_HorizontalStripes:
ld c, SCREEN_WIDTH ld c, SCREEN_WIDTH
coord hl, 0, 0 hlcoord 0, 0
coord de, 19, 1 decoord 19, 1
xor a xor a
ldh [hAutoBGTransferEnabled], a ldh [hAutoBGTransferEnabled], a
.loop .loop
@ -654,84 +654,84 @@ BattleTransition_Circle_Sub2:
BattleTransition_HalfCircle1: BattleTransition_HalfCircle1:
db $01 db $01
dw BattleTransition_CircleData1 dw BattleTransition_CircleData1
dwCoord 18, 6 dwcoord 18, 6
db $01 db $01
dw BattleTransition_CircleData2 dw BattleTransition_CircleData2
dwCoord 19, 3 dwcoord 19, 3
db $01 db $01
dw BattleTransition_CircleData3 dw BattleTransition_CircleData3
dwCoord 18, 0 dwcoord 18, 0
db $01 db $01
dw BattleTransition_CircleData4 dw BattleTransition_CircleData4
dwCoord 14, 0 dwcoord 14, 0
db $01 db $01
dw BattleTransition_CircleData5 dw BattleTransition_CircleData5
dwCoord 10, 0 dwcoord 10, 0
db $00 db $00
dw BattleTransition_CircleData5 dw BattleTransition_CircleData5
dwCoord 9, 0 dwcoord 9, 0
db $00 db $00
dw BattleTransition_CircleData4 dw BattleTransition_CircleData4
dwCoord 5, 0 dwcoord 5, 0
db $00 db $00
dw BattleTransition_CircleData3 dw BattleTransition_CircleData3
dwCoord 1, 0 dwcoord 1, 0
db $00 db $00
dw BattleTransition_CircleData2 dw BattleTransition_CircleData2
dwCoord 0, 3 dwcoord 0, 3
db $00 db $00
dw BattleTransition_CircleData1 dw BattleTransition_CircleData1
dwCoord 1, 6 dwcoord 1, 6
BattleTransition_HalfCircle2: BattleTransition_HalfCircle2:
db $00 db $00
dw BattleTransition_CircleData1 dw BattleTransition_CircleData1
dwCoord 1, 11 dwcoord 1, 11
db $00 db $00
dw BattleTransition_CircleData2 dw BattleTransition_CircleData2
dwCoord 0, 14 dwcoord 0, 14
db $00 db $00
dw BattleTransition_CircleData3 dw BattleTransition_CircleData3
dwCoord 1, 17 dwcoord 1, 17
db $00 db $00
dw BattleTransition_CircleData4 dw BattleTransition_CircleData4
dwCoord 5, 17 dwcoord 5, 17
db $00 db $00
dw BattleTransition_CircleData5 dw BattleTransition_CircleData5
dwCoord 9, 17 dwcoord 9, 17
db $01 db $01
dw BattleTransition_CircleData5 dw BattleTransition_CircleData5
dwCoord 10, 17 dwcoord 10, 17
db $01 db $01
dw BattleTransition_CircleData4 dw BattleTransition_CircleData4
dwCoord 14, 17 dwcoord 14, 17
db $01 db $01
dw BattleTransition_CircleData3 dw BattleTransition_CircleData3
dwCoord 18, 17 dwcoord 18, 17
db $01 db $01
dw BattleTransition_CircleData2 dw BattleTransition_CircleData2
dwCoord 19, 14 dwcoord 19, 14
db $01 db $01
dw BattleTransition_CircleData1 dw BattleTransition_CircleData1
dwCoord 18, 11 dwcoord 18, 11
BattleTransition_Circle_Sub3: BattleTransition_Circle_Sub3:
push hl push hl

View file

@ -11,7 +11,7 @@ SlidePlayerAndEnemySilhouettesOnScreen:
ld a, MESSAGE_BOX ; the usual text box at the bottom of the screen ld a, MESSAGE_BOX ; the usual text box at the bottom of the screen
ld [wTextBoxID], a ld [wTextBoxID], a
call DisplayTextBoxID call DisplayTextBoxID
coord hl, 1, 5 hlcoord 1, 5
lb bc, 3, 7 lb bc, 3, 7
call ClearScreenArea call ClearScreenArea
call DisableLCD call DisableLCD
@ -27,7 +27,7 @@ SlidePlayerAndEnemySilhouettesOnScreen:
or c or c
jr nz, .clearBackgroundLoop jr nz, .clearBackgroundLoop
; copy the work RAM tile map to VRAM ; copy the work RAM tile map to VRAM
coord hl, 0, 0 hlcoord 0, 0
ld de, vBGMap0 ld de, vBGMap0
ld b, 18 ; number of rows ld b, 18 ; number of rows
.copyRowLoop .copyRowLoop
@ -86,7 +86,7 @@ SlidePlayerAndEnemySilhouettesOnScreen:
ldh [hAutoBGTransferEnabled], a ldh [hAutoBGTransferEnabled], a
ld a, $31 ld a, $31
ldh [hStartTileID], a ldh [hStartTileID], a
coord hl, 1, 5 hlcoord 1, 5
predef CopyUncompressedPicToTilemap predef CopyUncompressedPicToTilemap
xor a xor a
ldh [hWY], a ldh [hWY], a
@ -232,7 +232,7 @@ StartBattle:
ld [wcf91], a ld [wcf91], a
ld [wBattleMonSpecies2], a ld [wBattleMonSpecies2], a
call LoadScreenTilesFromBuffer1 call LoadScreenTilesFromBuffer1
coord hl, 1, 5 hlcoord 1, 5
ld a, $9 ld a, $9
call SlideTrainerPicOffScreen call SlideTrainerPicOffScreen
call SaveScreenTilesToBuffer1 call SaveScreenTilesToBuffer1
@ -666,12 +666,12 @@ HandlePoisonBurnLeechSeed_IncreaseEnemyHP:
ret ret
UpdateCurMonHPBar: UpdateCurMonHPBar:
coord hl, 10, 9 ; tile pointer to player HP bar hlcoord 10, 9 ; tile pointer to player HP bar
ldh a, [hWhoseTurn] ldh a, [hWhoseTurn]
and a and a
ld a, $1 ld a, $1
jr z, .playersTurn jr z, .playersTurn
coord hl, 2, 2 ; tile pointer to enemy HP bar hlcoord 2, 2 ; tile pointer to enemy HP bar
xor a xor a
.playersTurn .playersTurn
push bc push bc
@ -767,10 +767,10 @@ FaintEnemyPokemon:
ld hl, wPlayerUsedMove ld hl, wPlayerUsedMove
ld [hli], a ld [hli], a
ld [hl], a ld [hl], a
coord hl, 12, 5 hlcoord 12, 5
coord de, 12, 6 decoord 12, 6
call SlideDownFaintedMonPic call SlideDownFaintedMonPic
coord hl, 0, 0 hlcoord 0, 0
lb bc, 4, 11 lb bc, 4, 11
call ClearScreenArea call ClearScreenArea
ld a, [wIsInBattle] ld a, [wIsInBattle]
@ -1021,11 +1021,11 @@ RemoveFaintedPlayerMon:
ld [hl], a ld [hl], a
ld [wBattleMonStatus], a ld [wBattleMonStatus], a
call ReadPlayerMonCurHPAndStatus call ReadPlayerMonCurHPAndStatus
coord hl, 9, 7 hlcoord 9, 7
lb bc, 5, 11 lb bc, 5, 11
call ClearScreenArea call ClearScreenArea
coord hl, 1, 10 hlcoord 1, 10
coord de, 1, 11 decoord 1, 11
call SlideDownFaintedMonPic call SlideDownFaintedMonPic
ld a, $1 ld a, $1
ld [wBattleResult], a ld [wBattleResult], a
@ -1059,7 +1059,7 @@ DoUseNextMonDialogue:
ld hl, UseNextMonText ld hl, UseNextMonText
call PrintText call PrintText
.displayYesNoBox .displayYesNoBox
coord hl, 13, 9 hlcoord 13, 9
lb bc, 10, 14 lb bc, 10, 14
ld a, TWO_OPTION_MENU ld a, TWO_OPTION_MENU
ld [wTextBoxID], a ld [wTextBoxID], a
@ -1136,7 +1136,7 @@ HandlePlayerBlackOut:
ld a, [wCurOpponent] ld a, [wCurOpponent]
cp OPP_SONY1 cp OPP_SONY1
jr nz, .notSony1Battle jr nz, .notSony1Battle
coord hl, 0, 0 ; sony 1 battle hlcoord 0, 0 ; sony 1 battle
lb bc, 8, 21 lb bc, 8, 21
call ClearScreenArea call ClearScreenArea
call ScrollTrainerPicAfterBattle call ScrollTrainerPicAfterBattle
@ -1306,7 +1306,7 @@ EnemySendOutFirstMon:
ld [wAICount], a ld [wAICount], a
ld hl, wPlayerBattleStatus1 ld hl, wPlayerBattleStatus1
res 5, [hl] res 5, [hl]
coord hl, 18, 0 hlcoord 18, 0
ld a, 8 ld a, 8
call SlideTrainerPicOffScreen call SlideTrainerPicOffScreen
call PrintEmptyString call PrintEmptyString
@ -1376,7 +1376,7 @@ EnemySendOutFirstMon:
jr nz, .next4 jr nz, .next4
ld hl, TrainerAboutToUseText ld hl, TrainerAboutToUseText
call PrintText call PrintText
coord hl, 0, 7 hlcoord 0, 7
lb bc, 8, 1 lb bc, 8, 1
ld a, TWO_OPTION_MENU ld a, TWO_OPTION_MENU
ld [wTextBoxID], a ld [wTextBoxID], a
@ -1411,7 +1411,7 @@ EnemySendOutFirstMon:
call LoadScreenTilesFromBuffer1 call LoadScreenTilesFromBuffer1
.next4 .next4
call ClearSprites call ClearSprites
coord hl, 0, 0 hlcoord 0, 0
lb bc, 4, 11 lb bc, 4, 11
call ClearScreenArea call ClearScreenArea
ld b, SET_PAL_BATTLE ld b, SET_PAL_BATTLE
@ -1427,7 +1427,7 @@ EnemySendOutFirstMon:
call LoadMonFrontSprite call LoadMonFrontSprite
ld a, -$31 ld a, -$31
ldh [hStartTileID], a ldh [hStartTileID], a
coord hl, 15, 6 hlcoord 15, 6
predef AnimateSendingOutMon predef AnimateSendingOutMon
ld a, [wEnemyMonSpecies2] ld a, [wEnemyMonSpecies2]
call PlayCry call PlayCry
@ -1757,7 +1757,7 @@ SendOutMon:
ldh [hWhoseTurn], a ldh [hWhoseTurn], a
ld a, POOF_ANIM ld a, POOF_ANIM
call PlayMoveAnimation call PlayMoveAnimation
coord hl, 4, 11 hlcoord 4, 11
predef AnimateSendingOutMon predef AnimateSendingOutMon
ld a, [wcf91] ld a, [wcf91]
call PlayCry call PlayCry
@ -1766,10 +1766,10 @@ SendOutMon:
; show 2 stages of the player mon getting smaller before disappearing ; show 2 stages of the player mon getting smaller before disappearing
AnimateRetreatingPlayerMon: AnimateRetreatingPlayerMon:
coord hl, 1, 5 hlcoord 1, 5
lb bc, 7, 7 lb bc, 7, 7
call ClearScreenArea call ClearScreenArea
coord hl, 3, 7 hlcoord 3, 7
lb bc, 5, 5 lb bc, 5, 5
xor a xor a
ld [wDownscaledMonSize], a ld [wDownscaledMonSize], a
@ -1778,7 +1778,7 @@ AnimateRetreatingPlayerMon:
ld c, 4 ld c, 4
call DelayFrames call DelayFrames
call .clearScreenArea call .clearScreenArea
coord hl, 4, 9 hlcoord 4, 9
lb bc, 3, 3 lb bc, 3, 3
ld a, 1 ld a, 1
ld [wDownscaledMonSize], a ld [wDownscaledMonSize], a
@ -1788,9 +1788,9 @@ AnimateRetreatingPlayerMon:
call Delay3 call Delay3
call .clearScreenArea call .clearScreenArea
ld a, $4c ld a, $4c
Coorda 5, 11 ldcoord_a 5, 11
.clearScreenArea .clearScreenArea
coord hl, 1, 5 hlcoord 1, 5
lb bc, 7, 7 lb bc, 7, 7
jp ClearScreenArea jp ClearScreenArea
@ -1813,14 +1813,14 @@ DrawHUDsAndHPBars:
DrawPlayerHUDAndHPBar: DrawPlayerHUDAndHPBar:
xor a xor a
ldh [hAutoBGTransferEnabled], a ldh [hAutoBGTransferEnabled], a
coord hl, 9, 7 hlcoord 9, 7
lb bc, 5, 11 lb bc, 5, 11
call ClearScreenArea call ClearScreenArea
callfar PlacePlayerHUDTiles callfar PlacePlayerHUDTiles
coord hl, 18, 9 hlcoord 18, 9
ld [hl], $73 ld [hl], $73
ld de, wBattleMonNick ld de, wBattleMonNick
coord hl, 10, 7 hlcoord 10, 7
call CenterMonName call CenterMonName
call PlaceString call PlaceString
ld hl, wBattleMonSpecies ld hl, wBattleMonSpecies
@ -1831,7 +1831,7 @@ DrawPlayerHUDAndHPBar:
ld de, wLoadedMonLevel ld de, wLoadedMonLevel
ld bc, wBattleMonPP - wBattleMonLevel ld bc, wBattleMonPP - wBattleMonLevel
call CopyData call CopyData
coord hl, 14, 8 hlcoord 14, 8
push hl push hl
inc hl inc hl
ld de, wLoadedMonStatus ld de, wLoadedMonStatus
@ -1842,7 +1842,7 @@ DrawPlayerHUDAndHPBar:
.doNotPrintLevel .doNotPrintLevel
ld a, [wLoadedMonSpecies] ld a, [wLoadedMonSpecies]
ld [wcf91], a ld [wcf91], a
coord hl, 10, 9 hlcoord 10, 9
predef DrawHP predef DrawHP
ld a, $1 ld a, $1
ldh [hAutoBGTransferEnabled], a ldh [hAutoBGTransferEnabled], a
@ -1874,15 +1874,15 @@ DrawPlayerHUDAndHPBar:
DrawEnemyHUDAndHPBar: DrawEnemyHUDAndHPBar:
xor a xor a
ldh [hAutoBGTransferEnabled], a ldh [hAutoBGTransferEnabled], a
coord hl, 0, 0 hlcoord 0, 0
lb bc, 4, 12 lb bc, 4, 12
call ClearScreenArea call ClearScreenArea
callfar PlaceEnemyHUDTiles callfar PlaceEnemyHUDTiles
ld de, wEnemyMonNick ld de, wEnemyMonNick
coord hl, 1, 0 hlcoord 1, 0
call CenterMonName call CenterMonName
call PlaceString call PlaceString
coord hl, 4, 1 hlcoord 4, 1
push hl push hl
inc hl inc hl
ld de, wEnemyMonStatus ld de, wEnemyMonStatus
@ -1955,7 +1955,7 @@ DrawEnemyHUDAndHPBar:
.drawHPBar .drawHPBar
xor a xor a
ld [wHPBarType], a ld [wHPBarType], a
coord hl, 2, 2 hlcoord 2, 2
call DrawHPBar call DrawHPBar
ld a, $1 ld a, $1
ldh [hAutoBGTransferEnabled], a ldh [hAutoBGTransferEnabled], a
@ -2030,12 +2030,12 @@ DisplayBattleMenu::
ld bc, NAME_LENGTH ld bc, NAME_LENGTH
call CopyData call CopyData
; the following simulates the keystrokes by drawing menus on screen ; the following simulates the keystrokes by drawing menus on screen
coord hl, 9, 14 hlcoord 9, 14
ld [hl], "▶" ld [hl], "▶"
ld c, 80 ld c, 80
call DelayFrames call DelayFrames
ld [hl], " " ld [hl], " "
coord hl, 9, 16 hlcoord 9, 16
ld [hl], "▶" ld [hl], "▶"
ld c, 50 ld c, 50
call DelayFrames call DelayFrames
@ -2060,14 +2060,14 @@ DisplayBattleMenu::
ld a, " " ld a, " "
jr z, .safariLeftColumn jr z, .safariLeftColumn
; put cursor in left column for normal battle menu (i.e. when it's not a Safari battle) ; put cursor in left column for normal battle menu (i.e. when it's not a Safari battle)
Coorda 15, 14 ; clear upper cursor position in right column ldcoord_a 15, 14 ; clear upper cursor position in right column
Coorda 15, 16 ; clear lower cursor position in right column ldcoord_a 15, 16 ; clear lower cursor position in right column
ld b, $9 ; top menu item X ld b, $9 ; top menu item X
jr .leftColumn_WaitForInput jr .leftColumn_WaitForInput
.safariLeftColumn .safariLeftColumn
Coorda 13, 14 ldcoord_a 13, 14
Coorda 13, 16 ldcoord_a 13, 16
coord hl, 7, 14 hlcoord 7, 14
ld de, wNumSafariBalls ld de, wNumSafariBalls
lb bc, 1, 2 lb bc, 1, 2
call PrintNumber call PrintNumber
@ -2093,14 +2093,14 @@ DisplayBattleMenu::
ld a, " " ld a, " "
jr z, .safariRightColumn jr z, .safariRightColumn
; put cursor in right column for normal battle menu (i.e. when it's not a Safari battle) ; put cursor in right column for normal battle menu (i.e. when it's not a Safari battle)
Coorda 9, 14 ; clear upper cursor position in left column ldcoord_a 9, 14 ; clear upper cursor position in left column
Coorda 9, 16 ; clear lower cursor position in left column ldcoord_a 9, 16 ; clear lower cursor position in left column
ld b, $f ; top menu item X ld b, $f ; top menu item X
jr .rightColumn_WaitForInput jr .rightColumn_WaitForInput
.safariRightColumn .safariRightColumn
Coorda 1, 14 ; clear upper cursor position in left column ldcoord_a 1, 14 ; clear upper cursor position in left column
Coorda 1, 16 ; clear lower cursor position in left column ldcoord_a 1, 16 ; clear lower cursor position in left column
coord hl, 7, 14 hlcoord 7, 14
ld de, wNumSafariBalls ld de, wNumSafariBalls
lb bc, 1, 2 lb bc, 1, 2
call PrintNumber call PrintNumber
@ -2321,7 +2321,7 @@ PartyMenuOrRockOrRun:
call GBPalNormal call GBPalNormal
jp DisplayBattleMenu jp DisplayBattleMenu
.partyMonDeselected .partyMonDeselected
coord hl, 11, 11 hlcoord 11, 11
ld bc, 6 * SCREEN_WIDTH + 9 ld bc, 6 * SCREEN_WIDTH + 9
ld a, " " ld a, " "
call FillMemory call FillMemory
@ -2483,18 +2483,18 @@ MoveSelectionMenu:
ret z ret z
ld hl, wBattleMonMoves ld hl, wBattleMonMoves
call .loadmoves call .loadmoves
coord hl, 4, 12 hlcoord 4, 12
ld b, 4 ld b, 4
ld c, 14 ld c, 14
di ; out of pure coincidence, it is possible for vblank to occur between the di and ei di ; out of pure coincidence, it is possible for vblank to occur between the di and ei
; so it is necessary to put the di ei block to not cause tearing ; so it is necessary to put the di ei block to not cause tearing
call TextBoxBorder call TextBoxBorder
coord hl, 4, 12 hlcoord 4, 12
ld [hl], $7a ld [hl], $7a
coord hl, 10, 12 hlcoord 10, 12
ld [hl], $7e ld [hl], $7e
ei ei
coord hl, 6, 13 hlcoord 6, 13
call .writemoves call .writemoves
ld b, $5 ld b, $5
ld a, $c ld a, $c
@ -2502,11 +2502,11 @@ MoveSelectionMenu:
.mimicmenu .mimicmenu
ld hl, wEnemyMonMoves ld hl, wEnemyMonMoves
call .loadmoves call .loadmoves
coord hl, 0, 7 hlcoord 0, 7
ld b, 4 ld b, 4
ld c, 14 ld c, 14
call TextBoxBorder call TextBoxBorder
coord hl, 2, 8 hlcoord 2, 8
call .writemoves call .writemoves
ld b, $1 ld b, $1
ld a, $7 ld a, $7
@ -2517,11 +2517,11 @@ MoveSelectionMenu:
ld bc, wPartyMon2 - wPartyMon1 ld bc, wPartyMon2 - wPartyMon1
call AddNTimes call AddNTimes
call .loadmoves call .loadmoves
coord hl, 4, 7 hlcoord 4, 7
ld b, 4 ld b, 4
ld c, 14 ld c, 14
call TextBoxBorder call TextBoxBorder
coord hl, 6, 8 hlcoord 6, 8
call .writemoves call .writemoves
ld b, $5 ld b, $5
ld a, $7 ld a, $7
@ -2577,7 +2577,7 @@ SelectMenuItem:
jr z, .battleselect jr z, .battleselect
dec a dec a
jr nz, .select jr nz, .select
coord hl, 1, 14 hlcoord 1, 14
ld de, WhichTechniqueString ld de, WhichTechniqueString
call PlaceString call PlaceString
jr .select jr .select
@ -2589,7 +2589,7 @@ SelectMenuItem:
ld a, [wMenuItemToSwap] ld a, [wMenuItemToSwap]
and a and a
jr z, .select jr z, .select
coord hl, 5, 13 hlcoord 5, 13
dec a dec a
ld bc, SCREEN_WIDTH ld bc, SCREEN_WIDTH
call AddNTimes call AddNTimes
@ -2826,7 +2826,7 @@ SwapMovesInMenu:
PrintMenuItem: PrintMenuItem:
xor a xor a
ldh [hAutoBGTransferEnabled], a ldh [hAutoBGTransferEnabled], a
coord hl, 0, 8 hlcoord 0, 8
ld b, 3 ld b, 3
ld c, 9 ld c, 9
call TextBoxBorder call TextBoxBorder
@ -2839,7 +2839,7 @@ PrintMenuItem:
ld a, [wCurrentMenuItem] ld a, [wCurrentMenuItem]
cp b cp b
jr nz, .notDisabled jr nz, .notDisabled
coord hl, 1, 10 hlcoord 1, 10
ld de, DisabledText ld de, DisabledText
call PlaceString call PlaceString
jr .moveDisabled jr .moveDisabled
@ -2871,23 +2871,23 @@ PrintMenuItem:
and $3f and $3f
ld [wcd6d], a ld [wcd6d], a
; print TYPE/<type> and <curPP>/<maxPP> ; print TYPE/<type> and <curPP>/<maxPP>
coord hl, 1, 9 hlcoord 1, 9
ld de, TypeText ld de, TypeText
call PlaceString call PlaceString
coord hl, 7, 11 hlcoord 7, 11
ld [hl], "/" ld [hl], "/"
coord hl, 5, 9 hlcoord 5, 9
ld [hl], "/" ld [hl], "/"
coord hl, 5, 11 hlcoord 5, 11
ld de, wcd6d ld de, wcd6d
lb bc, 1, 2 lb bc, 1, 2
call PrintNumber call PrintNumber
coord hl, 8, 11 hlcoord 8, 11
ld de, wMaxPP ld de, wMaxPP
lb bc, 1, 2 lb bc, 1, 2
call PrintNumber call PrintNumber
call GetCurrentMove call GetCurrentMove
coord hl, 2, 10 hlcoord 2, 10
predef PrintMoveType predef PrintMoveType
.moveDisabled .moveDisabled
ld a, $1 ld a, $1
@ -4822,7 +4822,7 @@ ApplyDamageToEnemyPokemon:
ld [wHPBarNewHP+1], a ld [wHPBarNewHP+1], a
ld a, [hl] ld a, [hl]
ld [wHPBarNewHP], a ld [wHPBarNewHP], a
coord hl, 2, 2 hlcoord 2, 2
xor a xor a
ld [wHPBarType], a ld [wHPBarType], a
predef UpdateHPBar2 ; animate the HP bar shortening predef UpdateHPBar2 ; animate the HP bar shortening
@ -4940,7 +4940,7 @@ ApplyDamageToPlayerPokemon:
ld [wHPBarMaxHP+1], a ld [wHPBarMaxHP+1], a
ld a, [hl] ld a, [hl]
ld [wHPBarMaxHP], a ld [wHPBarMaxHP], a
coord hl, 10, 9 hlcoord 10, 9
ld a, $01 ld a, $01
ld [wHPBarType], a ld [wHPBarType], a
predef UpdateHPBar2 ; animate the HP bar shortening predef UpdateHPBar2 ; animate the HP bar shortening
@ -6354,7 +6354,7 @@ LoadPlayerBackPic:
ld [MBC1SRamEnable], a ld [MBC1SRamEnable], a
ld a, $31 ld a, $31
ldh [hStartTileID], a ldh [hStartTileID], a
coord hl, 1, 5 hlcoord 1, 5
predef_jump CopyUncompressedPicToTilemap predef_jump CopyUncompressedPicToTilemap
; does nothing since no stats are ever selected (barring glitches) ; does nothing since no stats are ever selected (barring glitches)
@ -6770,7 +6770,7 @@ InitBattleCommon:
ldh [hStartTileID], a ldh [hStartTileID], a
dec a dec a
ld [wAICount], a ld [wAICount], a
coord hl, 12, 0 hlcoord 12, 0
predef CopyUncompressedPicToTilemap predef CopyUncompressedPicToTilemap
ld a, $ff ld a, $ff
ld [wEnemyMonPartyPos], a ld [wEnemyMonPartyPos], a
@ -6824,7 +6824,7 @@ InitWildBattle:
xor a xor a
ld [wTrainerClass], a ld [wTrainerClass], a
ldh [hStartTileID], a ldh [hStartTileID], a
coord hl, 12, 0 hlcoord 12, 0
predef CopyUncompressedPicToTilemap predef CopyUncompressedPicToTilemap
; common code that executes after init battle code specific to trainer or wild battles ; common code that executes after init battle code specific to trainer or wild battles
@ -6846,10 +6846,10 @@ _InitBattleCommon:
ld a, $9c ld a, $9c
ldh [hAutoBGTransferDest + 1], a ldh [hAutoBGTransferDest + 1], a
call LoadScreenTilesFromBuffer1 call LoadScreenTilesFromBuffer1
coord hl, 9, 7 hlcoord 9, 7
lb bc, 5, 10 lb bc, 5, 10
call ClearScreenArea call ClearScreenArea
coord hl, 1, 0 hlcoord 1, 0
lb bc, 4, 10 lb bc, 4, 10
call ClearScreenArea call ClearScreenArea
call ClearSprites call ClearSprites
@ -6993,7 +6993,7 @@ LoadMonBackPic:
; been loaded with GetMonHeader. ; been loaded with GetMonHeader.
ld a, [wBattleMonSpecies2] ld a, [wBattleMonSpecies2]
ld [wcf91], a ld [wcf91], a
coord hl, 1, 5 hlcoord 1, 5
ld b, 7 ld b, 7
ld c, 8 ld c, 8
call ClearScreenArea call ClearScreenArea

View file

@ -121,7 +121,7 @@ PlacePlayerHUDTiles:
ld de, wHUDGraphicsTiles ld de, wHUDGraphicsTiles
ld bc, $3 ld bc, $3
call CopyData call CopyData
coord hl, 18, 10 hlcoord 18, 10
ld de, -1 ld de, -1
jr PlaceHUDTiles jr PlaceHUDTiles
@ -136,7 +136,7 @@ PlaceEnemyHUDTiles:
ld de, wHUDGraphicsTiles ld de, wHUDGraphicsTiles
ld bc, $3 ld bc, $3
call CopyData call CopyData
coord hl, 1, 2 hlcoord 1, 2
ld de, $1 ld de, $1
jr PlaceHUDTiles jr PlaceHUDTiles

View file

@ -19,7 +19,7 @@ EndOfBattle:
jr z, .placeWinOrLoseString jr z, .placeWinOrLoseString
ld de, DrawText ld de, DrawText
.placeWinOrLoseString .placeWinOrLoseString
coord hl, 6, 8 hlcoord 6, 8
call PlaceString call PlaceString
ld c, 200 ld c, 200
call DelayFrames call DelayFrames

View file

@ -4,7 +4,7 @@ MarowakAnim:
ldh [rOBP1], a ldh [rOBP1], a
call CopyMonPicFromBGToSpriteVRAM ; cover the BG ghost pic with a sprite ghost pic that looks the same call CopyMonPicFromBGToSpriteVRAM ; cover the BG ghost pic with a sprite ghost pic that looks the same
; now that the ghost pic is being displayed using sprites, clear the ghost pic from the BG tilemap ; now that the ghost pic is being displayed using sprites, clear the ghost pic from the BG tilemap
coord hl, 12, 0 hlcoord 12, 0
lb bc, 7, 7 lb bc, 7, 7
call ClearScreenArea call ClearScreenArea
call Delay3 call Delay3

View file

@ -1,18 +1,18 @@
; display "[player] VS [enemy]" text box with pokeballs representing their parties next to the names ; display "[player] VS [enemy]" text box with pokeballs representing their parties next to the names
DisplayLinkBattleVersusTextBox: DisplayLinkBattleVersusTextBox:
call LoadTextBoxTilePatterns call LoadTextBoxTilePatterns
coord hl, 3, 4 hlcoord 3, 4
ld b, 7 ld b, 7
ld c, 12 ld c, 12
call TextBoxBorder call TextBoxBorder
coord hl, 4, 5 hlcoord 4, 5
ld de, wPlayerName ld de, wPlayerName
call PlaceString call PlaceString
coord hl, 4, 10 hlcoord 4, 10
ld de, wLinkEnemyTrainerName ld de, wLinkEnemyTrainerName
call PlaceString call PlaceString
; place bold "VS" tiles between the names ; place bold "VS" tiles between the names
coord hl, 9, 8 hlcoord 9, 8
ld a, $69 ld a, $69
ld [hli], a ld [hli], a
ld [hl], $6a ld [hl], $6a

View file

@ -71,10 +71,10 @@ DrainHPEffect_:
.next .next
ldh a, [hWhoseTurn] ldh a, [hWhoseTurn]
and a and a
coord hl, 10, 9 hlcoord 10, 9
ld a, $1 ld a, $1
jr z, .next2 jr z, .next2
coord hl, 2, 2 hlcoord 2, 2
xor a xor a
.next2 .next2
ld [wHPBarType], a ld [wHPBarType], a

View file

@ -89,10 +89,10 @@ HealEffect_:
call BankswitchEtoF call BankswitchEtoF
ldh a, [hWhoseTurn] ldh a, [hWhoseTurn]
and a and a
coord hl, 10, 9 hlcoord 10, 9
ld a, $1 ld a, $1
jr z, .updateHPBar jr z, .updateHPBar
coord hl, 2, 2 hlcoord 2, 2
xor a xor a
.updateHPBar .updateHPBar
ld [wHPBarType], a ld [wHPBarType], a

View file

@ -53,12 +53,12 @@ RecoilEffect_:
ld [hli], a ld [hli], a
ld [hl], a ld [hl], a
.getHPBarCoords .getHPBarCoords
coord hl, 10, 9 hlcoord 10, 9
ldh a, [hWhoseTurn] ldh a, [hWhoseTurn]
and a and a
ld a, $1 ld a, $1
jr z, .updateHPBar jr z, .updateHPBar
coord hl, 2, 2 hlcoord 2, 2
xor a xor a
.updateHPBar .updateHPBar
ld [wHPBarType], a ld [wHPBarType], a

View file

@ -6,7 +6,7 @@ _ScrollTrainerPicAfterBattle:
ld b, SET_PAL_BATTLE ld b, SET_PAL_BATTLE
call RunPaletteCommand call RunPaletteCommand
callfar _LoadTrainerPic callfar _LoadTrainerPic
coord hl, 19, 0 hlcoord 19, 0
ld c, $0 ld c, $0
.scrollLoop .scrollLoop
inc c inc c

View file

@ -542,7 +542,7 @@ AIRecoverHP:
AIPrintItemUseAndUpdateHPBar: AIPrintItemUseAndUpdateHPBar:
call AIPrintItemUse_ call AIPrintItemUse_
coord hl, 2, 2 hlcoord 2, 2
xor a xor a
ld [wHPBarType], a ld [wHPBarType], a
predef UpdateHPBar2 predef UpdateHPBar2

View file

@ -25,7 +25,7 @@ TryDoWildEncounter:
.next .next
; determine if wild pokemon can appear in the half-block we're standing in ; determine if wild pokemon can appear in the half-block we're standing in
; is the bottom right tile (9,9) of the half-block we're standing in a grass/water tile? ; is the bottom right tile (9,9) of the half-block we're standing in a grass/water tile?
coord hl, 9, 9 hlcoord 9, 9
ld c, [hl] ld c, [hl]
ld a, [wGrassTile] ld a, [wGrassTile]
cp c cp c
@ -64,7 +64,7 @@ TryDoWildEncounter:
; determine which wild pokemon (grass or water) can appear in the half-block we're standing in ; determine which wild pokemon (grass or water) can appear in the half-block we're standing in
ld c, [hl] ld c, [hl]
ld hl, wGrassMons ld hl, wGrassMons
aCoord 8, 9 lda_coord 8, 9
cp $14 ; is the bottom left tile (8,9) of the half-block we're standing in a water tile? cp $14 ; is the bottom left tile (8,9) of the half-block we're standing in a water tile?
jr nz, .gotWildEncounterType ; else, it's treated as a grass tile by default jr nz, .gotWildEncounterType ; else, it's treated as a grass tile by default
ld hl, wWaterMons ld hl, wWaterMons

View file

@ -20,7 +20,7 @@ GiveFossilToCinnabarLab::
dec l dec l
ld b, l ld b, l
ld c, $d ld c, $d
coord hl, 0, 0 hlcoord 0, 0
call TextBoxBorder call TextBoxBorder
call UpdateSprites call UpdateSprites
call PrintFossilsInBag call PrintFossilsInBag
@ -100,7 +100,7 @@ PrintFossilsInBag:
push hl push hl
ld [wd11e], a ld [wd11e], a
call GetItemName call GetItemName
coord hl, 2, 2 hlcoord 2, 2
ldh a, [hItemCounter] ldh a, [hItemCounter]
ld bc, SCREEN_WIDTH * 2 ld bc, SCREEN_WIDTH * 2
call AddNTimes call AddNTimes

View file

@ -14,7 +14,7 @@ DisplayDiploma::
ld bc, $10 ld bc, $10
ld a, BANK(CircleTile) ld a, BANK(CircleTile)
call FarCopyData2 call FarCopyData2
coord hl, 0, 0 hlcoord 0, 0
lb bc, 16, 18 lb bc, 16, 18
predef Diploma_TextBoxBorder predef Diploma_TextBoxBorder
ld hl, DiplomaTextPointersAndCoords ld hl, DiplomaTextPointersAndCoords
@ -35,7 +35,7 @@ DisplayDiploma::
pop bc pop bc
dec c dec c
jr nz, .asm_56715 jr nz, .asm_56715
coord hl, 10, 4 hlcoord 10, 4
ld de, wPlayerName ld de, wPlayerName
call PlaceString call PlaceString
farcall DrawPlayerCharacter farcall DrawPlayerCharacter
@ -85,15 +85,15 @@ UnusedPlayerNameLengthFunc:
DiplomaTextPointersAndCoords: DiplomaTextPointersAndCoords:
dw DiplomaText dw DiplomaText
dwCoord 5, 2 dwcoord 5, 2
dw DiplomaPlayer dw DiplomaPlayer
dwCoord 3, 4 dwcoord 3, 4
dw DiplomaEmptyText dw DiplomaEmptyText
dwCoord 15, 4 dwcoord 15, 4
dw DiplomaCongrats dw DiplomaCongrats
dwCoord 2, 6 dwcoord 2, 6
dw DiplomaGameFreak dw DiplomaGameFreak
dwCoord 9, 16 dwcoord 9, 16
DiplomaText: DiplomaText:
db CIRCLE_TILE_ID, "Diploma", CIRCLE_TILE_ID, "@" db CIRCLE_TILE_ID, "Diploma", CIRCLE_TILE_ID, "@"

View file

@ -84,11 +84,11 @@ BillsHousePokemonList::
.billsPokemonLoop .billsPokemonLoop
ld hl, wd730 ld hl, wd730
set 6, [hl] set 6, [hl]
coord hl, 0, 0 hlcoord 0, 0
ld b, 10 ld b, 10
ld c, 9 ld c, 9
call TextBoxBorder call TextBoxBorder
coord hl, 2, 2 hlcoord 2, 2
ld de, BillsMonListText ld de, BillsMonListText
call PlaceString call PlaceString
ld hl, BillsHousePokemonListText2 ld hl, BillsHousePokemonListText2

View file

@ -4,7 +4,7 @@ BookOrSculptureText::
ld a, [wCurMapTileset] ld a, [wCurMapTileset]
cp MANSION ; Celadon Mansion tileset cp MANSION ; Celadon Mansion tileset
jr nz, .ok jr nz, .ok
aCoord 8, 6 lda_coord 8, 6
cp $38 cp $38
jr nz, .ok jr nz, .ok
ld hl, DiglettSculptureText ld hl, DiglettSculptureText

View file

@ -6,7 +6,7 @@ PrintBookshelfText::
; facing up ; facing up
ld a, [wCurMapTileset] ld a, [wCurMapTileset]
ld b, a ld b, a
aCoord 8, 7 lda_coord 8, 7
ld c, a ld c, a
ld hl, BookshelfTileIDs ld hl, BookshelfTileIDs
.loop .loop

View file

@ -42,7 +42,7 @@ DisplayMonFrontSpriteInBox:
call LoadMonFrontSprite call LoadMonFrontSprite
ld a, $80 ld a, $80
ldh [hStartTileID], a ldh [hStartTileID], a
coord hl, 10, 11 hlcoord 10, 11
predef AnimateSendingOutMon predef AnimateSendingOutMon
call WaitForTextScrollButtonPress call WaitForTextScrollButtonPress
call LoadScreenTilesFromBuffer1 call LoadScreenTilesFromBuffer1

View file

@ -26,11 +26,11 @@ LinkCableHelp::
.linkHelpLoop .linkHelpLoop
ld hl, wd730 ld hl, wd730
set 6, [hl] set 6, [hl]
coord hl, 0, 0 hlcoord 0, 0
ld b, 8 ld b, 8
ld c, 13 ld c, 13
call TextBoxBorder call TextBoxBorder
coord hl, 2, 2 hlcoord 2, 2
ld de, HowToLinkText ld de, HowToLinkText
call PlaceString call PlaceString
ld hl, LinkCableHelpText2 ld hl, LinkCableHelpText2
@ -110,13 +110,13 @@ ViridianSchoolBlackboard::
.blackboardLoop .blackboardLoop
ld hl, wd730 ld hl, wd730
set 6, [hl] set 6, [hl]
coord hl, 0, 0 hlcoord 0, 0
lb bc, 6, 10 lb bc, 6, 10
call TextBoxBorder call TextBoxBorder
coord hl, 1, 2 hlcoord 1, 2
ld de, StatusAilmentText1 ld de, StatusAilmentText1
call PlaceString call PlaceString
coord hl, 6, 2 hlcoord 6, 2
ld de, StatusAilmentText2 ld de, StatusAilmentText2
call PlaceString call PlaceString
ld hl, ViridianSchoolBlackboardText2 ld hl, ViridianSchoolBlackboardText2

View file

@ -84,7 +84,7 @@ DisplayPokemartDialogue_::
ld hl, PokemartTellSellPriceText ld hl, PokemartTellSellPriceText
lb bc, 14, 1 ; location that PrintText always prints to, this is useless lb bc, 14, 1 ; location that PrintText always prints to, this is useless
call PrintText call PrintText
coord hl, 14, 7 hlcoord 14, 7
lb bc, 8, 15 lb bc, 8, 15
ld a, TWO_OPTION_MENU ld a, TWO_OPTION_MENU
ld [wTextBoxID], a ld [wTextBoxID], a
@ -162,7 +162,7 @@ DisplayPokemartDialogue_::
call CopyStringToCF4B ; copy name to wcf4b call CopyStringToCF4B ; copy name to wcf4b
ld hl, PokemartTellBuyPriceText ld hl, PokemartTellBuyPriceText
call PrintText call PrintText
coord hl, 14, 7 hlcoord 14, 7
lb bc, 8, 15 lb bc, 8, 15
ld a, TWO_OPTION_MENU ld a, TWO_OPTION_MENU
ld [wTextBoxID], a ld [wTextBoxID], a

View file

@ -22,7 +22,7 @@ CeladonPrizeMenu::
ld a, $01 ld a, $01
ld [wTopMenuItemX], a ld [wTopMenuItemX], a
call PrintPrizePrice call PrintPrizePrice
coord hl, 0, 2 hlcoord 0, 2
ld b, 8 ld b, 8
ld c, 16 ld c, 16
call TextBoxBorder call TextBoxBorder
@ -93,71 +93,71 @@ GetPrizeMenuId:
ld a, [wPrize1] ld a, [wPrize1]
ld [wd11e], a ld [wd11e], a
call GetItemName call GetItemName
coord hl, 2, 4 hlcoord 2, 4
call PlaceString call PlaceString
ld a, [wPrize2] ld a, [wPrize2]
ld [wd11e], a ld [wd11e], a
call GetItemName call GetItemName
coord hl, 2, 6 hlcoord 2, 6
call PlaceString call PlaceString
ld a, [wPrize3] ld a, [wPrize3]
ld [wd11e], a ld [wd11e], a
call GetItemName call GetItemName
coord hl, 2, 8 hlcoord 2, 8
call PlaceString call PlaceString
jr .putNoThanksText jr .putNoThanksText
.putMonName .putMonName
ld a, [wPrize1] ld a, [wPrize1]
ld [wd11e], a ld [wd11e], a
call GetMonName call GetMonName
coord hl, 2, 4 hlcoord 2, 4
call PlaceString call PlaceString
ld a, [wPrize2] ld a, [wPrize2]
ld [wd11e], a ld [wd11e], a
call GetMonName call GetMonName
coord hl, 2, 6 hlcoord 2, 6
call PlaceString call PlaceString
ld a, [wPrize3] ld a, [wPrize3]
ld [wd11e], a ld [wd11e], a
call GetMonName call GetMonName
coord hl, 2, 8 hlcoord 2, 8
call PlaceString call PlaceString
.putNoThanksText .putNoThanksText
coord hl, 2, 10 hlcoord 2, 10
ld de, NoThanksText ld de, NoThanksText
call PlaceString call PlaceString
; put prices on the right side of the textbox ; put prices on the right side of the textbox
ld de, wPrize1Price ld de, wPrize1Price
coord hl, 13, 5 hlcoord 13, 5
; reg. c: ; reg. c:
; [low nybble] number of bytes ; [low nybble] number of bytes
; [bits 765 = %100] space-padding (not zero-padding) ; [bits 765 = %100] space-padding (not zero-padding)
ld c, (1 << 7 | 2) ld c, (1 << 7 | 2)
call PrintBCDNumber call PrintBCDNumber
ld de, wPrize2Price ld de, wPrize2Price
coord hl, 13, 7 hlcoord 13, 7
ld c, (1 << 7 | 2) ld c, (1 << 7 | 2)
call PrintBCDNumber call PrintBCDNumber
ld de, wPrize3Price ld de, wPrize3Price
coord hl, 13, 9 hlcoord 13, 9
ld c, (1 << 7 | 2) ld c, (1 << 7 | 2)
jp PrintBCDNumber jp PrintBCDNumber
INCLUDE "data/events/prizes.asm" INCLUDE "data/events/prizes.asm"
PrintPrizePrice: PrintPrizePrice:
coord hl, 11, 0 hlcoord 11, 0
ld b, 1 ld b, 1
ld c, 7 ld c, 7
call TextBoxBorder call TextBoxBorder
call UpdateSprites call UpdateSprites
coord hl, 12, 0 hlcoord 12, 0
ld de, .CoinString ld de, .CoinString
call PlaceString call PlaceString
coord hl, 13, 1 hlcoord 13, 1
ld de, .SixSpacesString ld de, .SixSpacesString
call PlaceString call PlaceString
coord hl, 13, 1 hlcoord 13, 1
ld de, wPlayerCoins ld de, wPlayerCoins
ld c, %10000010 ld c, %10000010
call PrintBCDNumber call PrintBCDNumber

View file

@ -17,15 +17,15 @@ VendingMachineMenu::
ld [wTopMenuItemX], a ld [wTopMenuItemX], a
ld hl, wd730 ld hl, wd730
set 6, [hl] set 6, [hl]
coord hl, 0, 3 hlcoord 0, 3
ld b, 8 ld b, 8
ld c, 12 ld c, 12
call TextBoxBorder call TextBoxBorder
call UpdateSprites call UpdateSprites
coord hl, 2, 5 hlcoord 2, 5
ld de, DrinkText ld de, DrinkText
call PlaceString call PlaceString
coord hl, 9, 6 hlcoord 9, 6
ld de, DrinkPriceText ld de, DrinkPriceText
call PlaceString call PlaceString
ld hl, wd730 ld hl, wd730

View file

@ -1044,7 +1044,7 @@ ItemUseMedicine:
sbc b sbc b
ld [hl], a ld [hl], a
ld [wHPBarNewHP+1], a ld [wHPBarNewHP+1], a
coord hl, 4, 1 hlcoord 4, 1
ld a, [wWhichPokemon] ld a, [wWhichPokemon]
ld bc, 2 * SCREEN_WIDTH ld bc, 2 * SCREEN_WIDTH
call AddNTimes ; calculate coordinates of HP bar of pokemon that used Softboiled call AddNTimes ; calculate coordinates of HP bar of pokemon that used Softboiled
@ -2221,7 +2221,7 @@ ItemUseTMHM:
call PrintText call PrintText
ld hl, TeachMachineMoveText ld hl, TeachMachineMoveText
call PrintText call PrintText
coord hl, 14, 7 hlcoord 14, 7
lb bc, 8, 15 lb bc, 8, 15
ld a, TWO_OPTION_MENU ld a, TWO_OPTION_MENU
ld [wTextBoxID], a ld [wTextBoxID], a
@ -2607,7 +2607,7 @@ TossItem_::
call CopyStringToCF4B ; copy name to wcf4b call CopyStringToCF4B ; copy name to wcf4b
ld hl, IsItOKToTossItemText ld hl, IsItOKToTossItemText
call PrintText call PrintText
coord hl, 14, 7 hlcoord 14, 7
lb bc, 8, 15 lb bc, 8, 15
ld a, TWO_OPTION_MENU ld a, TWO_OPTION_MENU
ld [wTextBoxID], a ld [wTextBoxID], a

View file

@ -11,7 +11,7 @@ DisplayTownMap:
push af push af
ld b, $0 ld b, $0
call DrawPlayerOrBirdSprite ; player sprite call DrawPlayerOrBirdSprite ; player sprite
coord hl, 1, 0 hlcoord 1, 0
ld de, wcd6d ld de, wcd6d
call PlaceString call PlaceString
ld hl, wOAMBuffer ld hl, wOAMBuffer
@ -28,7 +28,7 @@ DisplayTownMap:
jr .enterLoop jr .enterLoop
.townMapLoop .townMapLoop
coord hl, 0, 0 hlcoord 0, 0
lb bc, 1, 20 lb bc, 1, 20
call ClearScreenArea call ClearScreenArea
ld hl, TownMapOrder ld hl, TownMapOrder
@ -55,7 +55,7 @@ DisplayTownMap:
inc de inc de
cp $50 cp $50
jr nz, .copyMapName jr nz, .copyMapName
coord hl, 1, 0 hlcoord 1, 0
ld de, wcd6d ld de, wcd6d
call PlaceString call PlaceString
ld hl, wOAMBuffer + $10 ld hl, wOAMBuffer + $10
@ -118,7 +118,7 @@ LoadTownMap_Nest:
push hl push hl
call DisplayWildLocations call DisplayWildLocations
call GetMonName call GetMonName
coord hl, 1, 0 hlcoord 1, 0
call PlaceString call PlaceString
ld h, b ld h, b
ld l, c ld l, c
@ -153,34 +153,34 @@ LoadTownMap_Fly::
push af push af
ld [hl], $ff ld [hl], $ff
push hl push hl
coord hl, 0, 0 hlcoord 0, 0
ld de, ToText ld de, ToText
call PlaceString call PlaceString
ld a, [wCurMap] ld a, [wCurMap]
ld b, $0 ld b, $0
call DrawPlayerOrBirdSprite call DrawPlayerOrBirdSprite
ld hl, wFlyLocationsList ld hl, wFlyLocationsList
coord de, 18, 0 decoord 18, 0
.townMapFlyLoop .townMapFlyLoop
ld a, " " ld a, " "
ld [de], a ld [de], a
push hl push hl
push hl push hl
coord hl, 3, 0 hlcoord 3, 0
lb bc, 1, 15 lb bc, 1, 15
call ClearScreenArea call ClearScreenArea
pop hl pop hl
ld a, [hl] ld a, [hl]
ld b, $4 ld b, $4
call DrawPlayerOrBirdSprite ; draw bird sprite call DrawPlayerOrBirdSprite ; draw bird sprite
coord hl, 3, 0 hlcoord 3, 0
ld de, wcd6d ld de, wcd6d
call PlaceString call PlaceString
ld c, 15 ld c, 15
call DelayFrames call DelayFrames
coord hl, 18, 0 hlcoord 18, 0
ld [hl], "▲" ld [hl], "▲"
coord hl, 19, 0 hlcoord 19, 0
ld [hl], "▼" ld [hl], "▼"
pop hl pop hl
.inputLoop .inputLoop
@ -219,7 +219,7 @@ LoadTownMap_Fly::
ld [hl], a ld [hl], a
ret ret
.pressedUp .pressedUp
coord de, 18, 0 decoord 18, 0
inc hl inc hl
ld a, [hl] ld a, [hl]
cp $ff cp $ff
@ -231,7 +231,7 @@ LoadTownMap_Fly::
ld hl, wFlyLocationsList ld hl, wFlyLocationsList
jp .townMapFlyLoop jp .townMapFlyLoop
.pressedDown .pressedDown
coord de, 19, 0 decoord 19, 0
dec hl dec hl
ld a, [hl] ld a, [hl]
cp $ff cp $ff
@ -278,7 +278,7 @@ LoadTownMap:
call GBPalWhiteOutWithDelay3 call GBPalWhiteOutWithDelay3
call ClearScreen call ClearScreen
call UpdateSprites call UpdateSprites
coord hl, 0, 0 hlcoord 0, 0
ld b, $12 ld b, $12
ld c, $12 ld c, $12
call TextBoxBorder call TextBoxBorder
@ -293,7 +293,7 @@ LoadTownMap:
ld bc, MonNestIconEnd - MonNestIcon ld bc, MonNestIconEnd - MonNestIcon
ld a, BANK(MonNestIcon) ld a, BANK(MonNestIcon)
call FarCopyDataDouble call FarCopyDataDouble
coord hl, 0, 0 hlcoord 0, 0
ld de, CompressedMap ld de, CompressedMap
.nextTile .nextTile
ld a, [de] ld a, [de]
@ -395,11 +395,11 @@ DisplayWildLocations:
and a ; were any OAM entries written? and a ; were any OAM entries written?
jr nz, .drawPlayerSprite jr nz, .drawPlayerSprite
; if no OAM entries were written, print area unknown text ; if no OAM entries were written, print area unknown text
coord hl, 1, 7 hlcoord 1, 7
ld b, 2 ld b, 2
ld c, 15 ld c, 15
call TextBoxBorder call TextBoxBorder
coord hl, 2, 9 hlcoord 2, 9
ld de, AreaUnknownText ld de, AreaUnknownText
call PlaceString call PlaceString
jr .done jr .done

View file

@ -9,11 +9,11 @@ CableClub_DoBattleOrTrade:
call LoadFontTilePatterns call LoadFontTilePatterns
call LoadHpBarAndStatusTilePatterns call LoadHpBarAndStatusTilePatterns
call LoadTrainerInfoTextBoxTiles call LoadTrainerInfoTextBoxTiles
coord hl, 3, 8 hlcoord 3, 8
ld b, 2 ld b, 2
ld c, 12 ld c, 12
call CableClub_TextBoxBorder call CableClub_TextBoxBorder
coord hl, 4, 10 hlcoord 4, 10
ld de, PleaseWaitString ld de, PleaseWaitString
call PlaceString call PlaceString
ld hl, wPlayerNumHits ld hl, wPlayerNumHits
@ -399,7 +399,7 @@ TradeCenter_SelectMon:
ld [wTopMenuItemY], a ld [wTopMenuItemY], a
ld a, 1 ld a, 1
ld [wTopMenuItemX], a ld [wTopMenuItemX], a
coord hl, 1, 1 hlcoord 1, 1
lb bc, 6, 1 lb bc, 6, 1
call ClearScreenArea call ClearScreenArea
.playerMonMenu_HandleInput .playerMonMenu_HandleInput
@ -464,11 +464,11 @@ TradeCenter_SelectMon:
dec a dec a
.displayStatsTradeMenu .displayStatsTradeMenu
push af push af
coord hl, 0, 14 hlcoord 0, 14
ld b, 2 ld b, 2
ld c, 18 ld c, 18
call CableClub_TextBoxBorder call CableClub_TextBoxBorder
coord hl, 2, 16 hlcoord 2, 16
ld de, .statsTrade ld de, .statsTrade
call PlaceString call PlaceString
xor a xor a
@ -480,7 +480,7 @@ TradeCenter_SelectMon:
ld [wTopMenuItemY], a ld [wTopMenuItemY], a
.selectStatsMenuItem .selectStatsMenuItem
ld a, " " ld a, " "
Coorda 11, 16 ldcoord_a 11, 16
ld a, D_RIGHT | B_BUTTON | A_BUTTON ld a, D_RIGHT | B_BUTTON | A_BUTTON
ld [wMenuWatchedKeys], a ld [wMenuWatchedKeys], a
ld a, 1 ld a, 1
@ -497,7 +497,7 @@ TradeCenter_SelectMon:
jp .playerMonMenu jp .playerMonMenu
.selectTradeMenuItem .selectTradeMenuItem
ld a, " " ld a, " "
Coorda 1, 16 ldcoord_a 1, 16
ld a, D_LEFT | B_BUTTON | A_BUTTON ld a, D_LEFT | B_BUTTON | A_BUTTON
ld [wMenuWatchedKeys], a ld [wMenuWatchedKeys], a
ld a, 11 ld a, 11
@ -548,7 +548,7 @@ TradeCenter_SelectMon:
ld [hl], a ld [hl], a
.cancelMenuItem_Loop .cancelMenuItem_Loop
ld a, "▶" ; filled arrow cursor ld a, "▶" ; filled arrow cursor
Coorda 1, 16 ldcoord_a 1, 16
.cancelMenuItem_JoypadLoop .cancelMenuItem_JoypadLoop
call JoypadLowSensitivity call JoypadLowSensitivity
ldh a, [hJoy5] ldh a, [hJoy5]
@ -560,14 +560,14 @@ TradeCenter_SelectMon:
jr z, .cancelMenuItem_JoypadLoop jr z, .cancelMenuItem_JoypadLoop
; if Up pressed ; if Up pressed
ld a, " " ld a, " "
Coorda 1, 16 ldcoord_a 1, 16
ld a, [wPartyCount] ld a, [wPartyCount]
dec a dec a
ld [wCurrentMenuItem], a ld [wCurrentMenuItem], a
jp .playerMonMenu jp .playerMonMenu
.cancelMenuItem_APressed .cancelMenuItem_APressed
ld a, "▷" ; unfilled arrow cursor ld a, "▷" ; unfilled arrow cursor
Coorda 1, 16 ldcoord_a 1, 16
ld a, $f ld a, $f
ld [wSerialExchangeNybbleSendData], a ld [wSerialExchangeNybbleSendData], a
call Serial_PrintWaitingTextAndSyncAndExchangeNybble call Serial_PrintWaitingTextAndSyncAndExchangeNybble
@ -596,15 +596,15 @@ ReturnToCableClubRoom:
ret ret
TradeCenter_DrawCancelBox: TradeCenter_DrawCancelBox:
coord hl, 11, 15 hlcoord 11, 15
ld a, $7e ld a, $7e
ld bc, 2 * SCREEN_WIDTH + 9 ld bc, 2 * SCREEN_WIDTH + 9
call FillMemory call FillMemory
coord hl, 0, 15 hlcoord 0, 15
ld b, 1 ld b, 1
ld c, 9 ld c, 9
call CableClub_TextBoxBorder call CableClub_TextBoxBorder
coord hl, 2, 16 hlcoord 2, 16
ld de, CancelTextString ld de, CancelTextString
jp PlaceString jp PlaceString
@ -613,7 +613,7 @@ CancelTextString:
TradeCenter_PlaceSelectedEnemyMonMenuCursor: TradeCenter_PlaceSelectedEnemyMonMenuCursor:
ld a, [wSerialSyncAndExchangeNybbleReceiveData] ld a, [wSerialSyncAndExchangeNybbleReceiveData]
coord hl, 1, 9 hlcoord 1, 9
ld bc, SCREEN_WIDTH ld bc, SCREEN_WIDTH
call AddNTimes call AddNTimes
ld [hl], "▷" ; cursor ld [hl], "▷" ; cursor
@ -630,24 +630,24 @@ TradeCenter_DisplayStats:
jp TradeCenter_DrawCancelBox jp TradeCenter_DrawCancelBox
TradeCenter_DrawPartyLists: TradeCenter_DrawPartyLists:
coord hl, 0, 0 hlcoord 0, 0
ld b, 6 ld b, 6
ld c, 18 ld c, 18
call CableClub_TextBoxBorder call CableClub_TextBoxBorder
coord hl, 0, 8 hlcoord 0, 8
ld b, 6 ld b, 6
ld c, 18 ld c, 18
call CableClub_TextBoxBorder call CableClub_TextBoxBorder
coord hl, 5, 0 hlcoord 5, 0
ld de, wPlayerName ld de, wPlayerName
call PlaceString call PlaceString
coord hl, 5, 8 hlcoord 5, 8
ld de, wLinkEnemyTrainerName ld de, wLinkEnemyTrainerName
call PlaceString call PlaceString
coord hl, 2, 1 hlcoord 2, 1
ld de, wPartySpecies ld de, wPartySpecies
call TradeCenter_PrintPartyListNames call TradeCenter_PrintPartyListNames
coord hl, 2, 9 hlcoord 2, 9
ld de, wEnemyPartyMons ld de, wEnemyPartyMons
; fall through ; fall through
@ -684,7 +684,7 @@ TradeCenter_Trade:
ld [wSerialExchangeNybbleReceiveData], a ld [wSerialExchangeNybbleReceiveData], a
ld [wMenuWatchMovingOutOfBounds], a ld [wMenuWatchMovingOutOfBounds], a
ld [wMenuJoypadPollCount], a ld [wMenuJoypadPollCount], a
coord hl, 0, 12 hlcoord 0, 12
ld b, 4 ld b, 4
ld c, 18 ld c, 18
call CableClub_TextBoxBorder call CableClub_TextBoxBorder
@ -709,10 +709,10 @@ TradeCenter_Trade:
ld [wd11e], a ld [wd11e], a
call GetMonName call GetMonName
ld hl, WillBeTradedText ld hl, WillBeTradedText
coord bc, 1, 14 bccoord 1, 14
call TextCommandProcessor call TextCommandProcessor
call SaveScreenTilesToBuffer1 call SaveScreenTilesToBuffer1
coord hl, 10, 7 hlcoord 10, 7
lb bc, 8, 11 lb bc, 8, 11
ld a, TRADE_CANCEL_MENU ld a, TRADE_CANCEL_MENU
ld [wTwoOptionMenuID], a ld [wTwoOptionMenuID], a
@ -726,11 +726,11 @@ TradeCenter_Trade:
; if trade cancelled ; if trade cancelled
ld a, $1 ld a, $1
ld [wSerialExchangeNybbleSendData], a ld [wSerialExchangeNybbleSendData], a
coord hl, 0, 12 hlcoord 0, 12
ld b, 4 ld b, 4
ld c, 18 ld c, 18
call CableClub_TextBoxBorder call CableClub_TextBoxBorder
coord hl, 1, 14 hlcoord 1, 14
ld de, TradeCanceled ld de, TradeCanceled
call PlaceString call PlaceString
call Serial_PrintWaitingTextAndSyncAndExchangeNybble call Serial_PrintWaitingTextAndSyncAndExchangeNybble
@ -743,11 +743,11 @@ TradeCenter_Trade:
dec a ; did the other person cancel? dec a ; did the other person cancel?
jr nz, .doTrade jr nz, .doTrade
; if the other person cancelled ; if the other person cancelled
coord hl, 0, 12 hlcoord 0, 12
ld b, 4 ld b, 4
ld c, 18 ld c, 18
call CableClub_TextBoxBorder call CableClub_TextBoxBorder
coord hl, 1, 14 hlcoord 1, 14
ld de, TradeCanceled ld de, TradeCanceled
call PlaceString call PlaceString
jp .tradeCancelled jp .tradeCancelled
@ -851,11 +851,11 @@ TradeCenter_Trade:
call Serial_PrintWaitingTextAndSyncAndExchangeNybble call Serial_PrintWaitingTextAndSyncAndExchangeNybble
ld c, 40 ld c, 40
call DelayFrames call DelayFrames
coord hl, 0, 12 hlcoord 0, 12
ld b, 4 ld b, 4
ld c, 18 ld c, 18
call CableClub_TextBoxBorder call CableClub_TextBoxBorder
coord hl, 1, 14 hlcoord 1, 14
ld de, TradeCompleted ld de, TradeCompleted
call PlaceString call PlaceString
predef SaveSAVtoSRAM2 predef SaveSAVtoSRAM2

View file

@ -1,5 +1,5 @@
PrintWaitingText:: PrintWaitingText::
coord hl, 3, 10 hlcoord 3, 10
ld b, $1 ld b, $1
ld c, $b ld c, $b
ld a, [wIsInBattle] ld a, [wIsInBattle]
@ -10,7 +10,7 @@ PrintWaitingText::
.asm_4c17 .asm_4c17
call CableClub_TextBoxBorder call CableClub_TextBoxBorder
.asm_4c1a .asm_4c1a
coord hl, 4, 11 hlcoord 4, 11
ld de, WaitingText ld de, WaitingText
call PlaceString call PlaceString
ld c, 50 ld c, 50

View file

@ -13,18 +13,18 @@ DisplayTextIDInit::
; below this, so this seems unnecessary. ; below this, so this seems unnecessary.
CheckEvent EVENT_GOT_POKEDEX CheckEvent EVENT_GOT_POKEDEX
; start menu with pokedex ; start menu with pokedex
coord hl, 10, 0 hlcoord 10, 0
ld b, $0e ld b, $0e
ld c, $08 ld c, $08
jr nz, .drawTextBoxBorder jr nz, .drawTextBoxBorder
; start menu without pokedex ; start menu without pokedex
coord hl, 10, 0 hlcoord 10, 0
ld b, $0c ld b, $0c
ld c, $08 ld c, $08
jr .drawTextBoxBorder jr .drawTextBoxBorder
; if text ID is not 0 (i.e. not the start menu) then do a standard dialogue text box ; if text ID is not 0 (i.e. not the start menu) then do a standard dialogue text box
.notStartMenu .notStartMenu
coord hl, 0, 12 hlcoord 0, 12
ld b, $04 ld b, $04
ld c, $12 ld c, $12
.drawTextBoxBorder .drawTextBoxBorder

View file

@ -43,11 +43,11 @@ DrawBadges:
ld [hli], a ld [hli], a
ld [hl], $60 ; First name ld [hl], $60 ; First name
coord hl, 2, 11 hlcoord 2, 11
ld de, wTempObtainedBadgesBooleans ld de, wTempObtainedBadgesBooleans
call .DrawBadgeRow call .DrawBadgeRow
coord hl, 2, 14 hlcoord 2, 14
ld de, wTempObtainedBadgesBooleans + 4 ld de, wTempObtainedBadgesBooleans + 4
; call .DrawBadgeRow ; call .DrawBadgeRow
; ret ; ret

View file

@ -2,12 +2,12 @@
DrawStartMenu:: DrawStartMenu::
CheckEvent EVENT_GOT_POKEDEX CheckEvent EVENT_GOT_POKEDEX
; menu with pokedex ; menu with pokedex
coord hl, 10, 0 hlcoord 10, 0
ld b, $0e ld b, $0e
ld c, $08 ld c, $08
jr nz, .drawTextBoxBorder jr nz, .drawTextBoxBorder
; shorter menu if the player doesn't have the pokedex ; shorter menu if the player doesn't have the pokedex
coord hl, 10, 0 hlcoord 10, 0
ld b, $0c ld b, $0c
ld c, $08 ld c, $08
.drawTextBoxBorder .drawTextBoxBorder
@ -25,7 +25,7 @@ DrawStartMenu::
ld [wMenuWatchMovingOutOfBounds], a ld [wMenuWatchMovingOutOfBounds], a
ld hl, wd730 ld hl, wd730
set 6, [hl] ; no pauses between printing each letter set 6, [hl] ; no pauses between printing each letter
coord hl, 12, 2 hlcoord 12, 2
CheckEvent EVENT_GOT_POKEDEX CheckEvent EVENT_GOT_POKEDEX
; case for not having pokedex ; case for not having pokedex
ld a, $06 ld a, $06

View file

@ -95,18 +95,18 @@ LeaguePCShowMon:
ld b, SET_PAL_POKEMON_WHOLE_SCREEN ld b, SET_PAL_POKEMON_WHOLE_SCREEN
ld c, 0 ld c, 0
call RunPaletteCommand call RunPaletteCommand
coord hl, 12, 5 hlcoord 12, 5
call GetMonHeader call GetMonHeader
call LoadFrontSpriteByMonIndex call LoadFrontSpriteByMonIndex
call GBPalNormal call GBPalNormal
coord hl, 0, 13 hlcoord 0, 13
ld b, 2 ld b, 2
ld c, $12 ld c, $12
call TextBoxBorder call TextBoxBorder
coord hl, 1, 15 hlcoord 1, 15
ld de, HallOfFameNoText ld de, HallOfFameNoText
call PlaceString call PlaceString
coord hl, 16, 15 hlcoord 16, 15
ld de, wHoFTeamNo ld de, wHoFTeamNo
lb bc, 1, 3 lb bc, 1, 3
call PrintNumber call PrintNumber

View file

@ -33,20 +33,20 @@ MainMenu:
cp 1 cp 1
jr z, .noSaveFile jr z, .noSaveFile
; there's a save file ; there's a save file
coord hl, 0, 0 hlcoord 0, 0
ld b, 6 ld b, 6
ld c, 13 ld c, 13
call TextBoxBorder call TextBoxBorder
coord hl, 2, 2 hlcoord 2, 2
ld de, ContinueText ld de, ContinueText
call PlaceString call PlaceString
jr .next2 jr .next2
.noSaveFile .noSaveFile
coord hl, 0, 0 hlcoord 0, 0
ld b, 4 ld b, 4
ld c, 13 ld c, 13
call TextBoxBorder call TextBoxBorder
coord hl, 2, 2 hlcoord 2, 2
ld de, NewGameText ld de, NewGameText
call PlaceString call PlaceString
.next2 .next2
@ -141,12 +141,12 @@ LinkMenu:
call SaveScreenTilesToBuffer1 call SaveScreenTilesToBuffer1
ld hl, WhereWouldYouLikeText ld hl, WhereWouldYouLikeText
call PrintText call PrintText
coord hl, 5, 5 hlcoord 5, 5
ld b, $6 ld b, $6
ld c, $d ld c, $d
call TextBoxBorder call TextBoxBorder
call UpdateSprites call UpdateSprites
coord hl, 7, 7 hlcoord 7, 7
ld de, CableClubOptionsText ld de, CableClubOptionsText
call PlaceString call PlaceString
xor a xor a
@ -240,11 +240,11 @@ LinkMenu:
ld c, d ld c, d
.updateCursorPosition .updateCursorPosition
ld a, b ld a, b
Coorda 6, 7 ldcoord_a 6, 7
ld a, c ld a, c
Coorda 6, 9 ldcoord_a 6, 9
ld a, d ld a, d
Coorda 6, 11 ldcoord_a 6, 11
ld c, 40 ld c, 40
call DelayFrames call DelayFrames
call LoadScreenTilesFromBuffer1 call LoadScreenTilesFromBuffer1
@ -345,21 +345,21 @@ CableClubOptionsText:
DisplayContinueGameInfo: DisplayContinueGameInfo:
xor a xor a
ldh [hAutoBGTransferEnabled], a ldh [hAutoBGTransferEnabled], a
coord hl, 4, 7 hlcoord 4, 7
ld b, 8 ld b, 8
ld c, 14 ld c, 14
call TextBoxBorder call TextBoxBorder
coord hl, 5, 9 hlcoord 5, 9
ld de, SaveScreenInfoText ld de, SaveScreenInfoText
call PlaceString call PlaceString
coord hl, 12, 9 hlcoord 12, 9
ld de, wPlayerName ld de, wPlayerName
call PlaceString call PlaceString
coord hl, 17, 11 hlcoord 17, 11
call PrintNumBadges call PrintNumBadges
coord hl, 16, 13 hlcoord 16, 13
call PrintNumOwnedMons call PrintNumOwnedMons
coord hl, 13, 15 hlcoord 13, 15
call PrintPlayTime call PrintPlayTime
ld a, 1 ld a, 1
ldh [hAutoBGTransferEnabled], a ldh [hAutoBGTransferEnabled], a
@ -369,23 +369,23 @@ DisplayContinueGameInfo:
PrintSaveScreenText: PrintSaveScreenText:
xor a xor a
ldh [hAutoBGTransferEnabled], a ldh [hAutoBGTransferEnabled], a
coord hl, 4, 0 hlcoord 4, 0
ld b, $8 ld b, $8
ld c, $e ld c, $e
call TextBoxBorder call TextBoxBorder
call LoadTextBoxTilePatterns call LoadTextBoxTilePatterns
call UpdateSprites call UpdateSprites
coord hl, 5, 2 hlcoord 5, 2
ld de, SaveScreenInfoText ld de, SaveScreenInfoText
call PlaceString call PlaceString
coord hl, 12, 2 hlcoord 12, 2
ld de, wPlayerName ld de, wPlayerName
call PlaceString call PlaceString
coord hl, 17, 4 hlcoord 17, 4
call PrintNumBadges call PrintNumBadges
coord hl, 16, 6 hlcoord 16, 6
call PrintNumOwnedMons call PrintNumOwnedMons
coord hl, 13, 8 hlcoord 13, 8
call PrintPlayTime call PrintPlayTime
ld a, $1 ld a, $1
ldh [hAutoBGTransferEnabled], a ldh [hAutoBGTransferEnabled], a
@ -429,28 +429,28 @@ SaveScreenInfoText:
next "TIME@" next "TIME@"
DisplayOptionMenu: DisplayOptionMenu:
coord hl, 0, 0 hlcoord 0, 0
ld b, 3 ld b, 3
ld c, 18 ld c, 18
call TextBoxBorder call TextBoxBorder
coord hl, 0, 5 hlcoord 0, 5
ld b, 3 ld b, 3
ld c, 18 ld c, 18
call TextBoxBorder call TextBoxBorder
coord hl, 0, 10 hlcoord 0, 10
ld b, 3 ld b, 3
ld c, 18 ld c, 18
call TextBoxBorder call TextBoxBorder
coord hl, 1, 1 hlcoord 1, 1
ld de, TextSpeedOptionText ld de, TextSpeedOptionText
call PlaceString call PlaceString
coord hl, 1, 6 hlcoord 1, 6
ld de, BattleAnimationOptionText ld de, BattleAnimationOptionText
call PlaceString call PlaceString
coord hl, 1, 11 hlcoord 1, 11
ld de, BattleStyleOptionText ld de, BattleStyleOptionText
call PlaceString call PlaceString
coord hl, 2, 16 hlcoord 2, 16
ld de, OptionMenuCancelText ld de, OptionMenuCancelText
call PlaceString call PlaceString
xor a xor a
@ -644,7 +644,7 @@ SetCursorPositionsFromOptions:
dec hl dec hl
ld a, [hl] ld a, [hl]
ld [wOptionsTextSpeedCursorX], a ; text speed cursor X coordinate ld [wOptionsTextSpeedCursorX], a ; text speed cursor X coordinate
coord hl, 0, 3 hlcoord 0, 3
call .placeUnfilledRightArrow call .placeUnfilledRightArrow
sla c sla c
ld a, 1 ; On ld a, 1 ; On
@ -652,7 +652,7 @@ SetCursorPositionsFromOptions:
ld a, 10 ; Off ld a, 10 ; Off
.storeBattleAnimationCursorX .storeBattleAnimationCursorX
ld [wOptionsBattleAnimCursorX], a ; battle animation cursor X coordinate ld [wOptionsBattleAnimCursorX], a ; battle animation cursor X coordinate
coord hl, 0, 8 hlcoord 0, 8
call .placeUnfilledRightArrow call .placeUnfilledRightArrow
sla c sla c
ld a, 1 ld a, 1
@ -660,10 +660,10 @@ SetCursorPositionsFromOptions:
ld a, 10 ld a, 10
.storeBattleStyleCursorX .storeBattleStyleCursorX
ld [wOptionsBattleStyleCursorX], a ; battle style cursor X coordinate ld [wOptionsBattleStyleCursorX], a ; battle style cursor X coordinate
coord hl, 0, 13 hlcoord 0, 13
call .placeUnfilledRightArrow call .placeUnfilledRightArrow
; cursor in front of Cancel ; cursor in front of Cancel
coord hl, 0, 16 hlcoord 0, 16
ld a, 1 ld a, 1
.placeUnfilledRightArrow .placeUnfilledRightArrow
ld e, a ld e, a

View file

@ -4,7 +4,7 @@ AskName:
push hl push hl
ld a, [wIsInBattle] ld a, [wIsInBattle]
dec a dec a
coord hl, 0, 0 hlcoord 0, 0
ld b, 4 ld b, 4
ld c, 11 ld c, 11
call z, ClearScreenArea ; only if in wild battle call z, ClearScreenArea ; only if in wild battle
@ -13,7 +13,7 @@ AskName:
call GetMonName call GetMonName
ld hl, DoYouWantToNicknameText ld hl, DoYouWantToNicknameText
call PrintText call PrintText
coord hl, 14, 7 hlcoord 14, 7
lb bc, 8, 15 lb bc, 8, 15
ld a, TWO_OPTION_MENU ld a, TWO_OPTION_MENU
ld [wTextBoxID], a ld [wTextBoxID], a
@ -93,7 +93,7 @@ DisplayNamingScreen:
call LoadHpBarAndStatusTilePatterns call LoadHpBarAndStatusTilePatterns
call LoadEDTile call LoadEDTile
farcall LoadMonPartySpriteGfx farcall LoadMonPartySpriteGfx
coord hl, 0, 4 hlcoord 0, 4
ld b, 9 ld b, 9
ld c, 18 ld c, 18
call TextBoxBorder call TextBoxBorder
@ -344,7 +344,7 @@ PrintAlphabet:
jr nz, .lowercase jr nz, .lowercase
ld de, UpperCaseAlphabet ld de, UpperCaseAlphabet
.lowercase .lowercase
coord hl, 2, 5 hlcoord 2, 5
lb bc, 5, 9 ; 5 rows, 9 columns lb bc, 5, 9 ; 5 rows, 9 columns
.outerLoop .outerLoop
push bc push bc
@ -371,13 +371,13 @@ PrintNicknameAndUnderscores:
call CalcStringLength call CalcStringLength
ld a, c ld a, c
ld [wNamingScreenNameLength], a ld [wNamingScreenNameLength], a
coord hl, 10, 2 hlcoord 10, 2
lb bc, 1, 10 lb bc, 1, 10
call ClearScreenArea call ClearScreenArea
coord hl, 10, 2 hlcoord 10, 2
ld de, wcf4b ld de, wcf4b
call PlaceString call PlaceString
coord hl, 10, 3 hlcoord 10, 3
ld a, [wNamingScreenType] ld a, [wNamingScreenType]
cp NAME_MON_SCREEN cp NAME_MON_SCREEN
jr nc, .pokemon1 jr nc, .pokemon1
@ -416,7 +416,7 @@ PrintNicknameAndUnderscores:
.emptySpacesRemaining .emptySpacesRemaining
ld c, a ld c, a
ld b, $0 ld b, $0
coord hl, 10, 3 hlcoord 10, 3
add hl, bc add hl, bc
ld [hl], $77 ; raised underscore tile id ld [hl], $77 ; raised underscore tile id
ret ret
@ -450,7 +450,7 @@ CalcStringLength:
jr .loop jr .loop
PrintNamingText: PrintNamingText:
coord hl, 0, 1 hlcoord 0, 1
ld a, [wNamingScreenType] ld a, [wNamingScreenType]
ld de, YourTextString ld de, YourTextString
and a and a
@ -465,12 +465,12 @@ PrintNamingText:
pop af pop af
ld [wd11e], a ld [wd11e], a
call GetMonName call GetMonName
coord hl, 4, 1 hlcoord 4, 1
call PlaceString call PlaceString
ld hl, $1 ld hl, $1
add hl, bc add hl, bc
ld [hl], $c9 ld [hl], $c9
coord hl, 1, 3 hlcoord 1, 3
ld de, NicknameTextString ld de, NicknameTextString
jr .placeString jr .placeString
.notNickname .notNickname

View file

@ -30,7 +30,7 @@ RedrawPartyMenu_::
jp z, .printMessage jp z, .printMessage
call ErasePartyMenuCursors call ErasePartyMenuCursors
farcall InitPartyMenuBlkPacket farcall InitPartyMenuBlkPacket
coord hl, 3, 0 hlcoord 3, 0
ld de, wPartySpecies ld de, wPartySpecies
xor a xor a
ld c, a ld c, a

View file

@ -22,12 +22,12 @@ PlayerPCMenu:
ld hl, wFlags_0xcd60 ld hl, wFlags_0xcd60
set 5, [hl] set 5, [hl]
call LoadScreenTilesFromBuffer2 call LoadScreenTilesFromBuffer2
coord hl, 0, 0 hlcoord 0, 0
ld b, $8 ld b, $8
ld c, $e ld c, $e
call TextBoxBorder call TextBoxBorder
call UpdateSprites call UpdateSprites
coord hl, 2, 2 hlcoord 2, 2
ld de, PlayersPCMenuEntries ld de, PlayersPCMenuEntries
call PlaceString call PlaceString
ld hl, wTopMenuItemY ld hl, wTopMenuItemY

View file

@ -119,7 +119,7 @@ HandlePokedexSideMenu:
pop af pop af
ld [wCurrentMenuItem], a ld [wCurrentMenuItem], a
push bc push bc
coord hl, 0, 3 hlcoord 0, 3
ld de, 20 ld de, 20
lb bc, " ", 13 lb bc, " ", 13
call DrawTileLine ; cover up the menu cursor in the pokemon list call DrawTileLine ; cover up the menu cursor in the pokemon list
@ -128,7 +128,7 @@ HandlePokedexSideMenu:
.buttonBPressed .buttonBPressed
push bc push bc
coord hl, 15, 10 hlcoord 15, 10
ld de, 20 ld de, 20
lb bc, " ", 7 lb bc, " ", 7
call DrawTileLine ; cover up the menu cursor in the side menu call DrawTileLine ; cover up the menu cursor in the side menu
@ -158,43 +158,43 @@ HandlePokedexListMenu:
xor a xor a
ldh [hAutoBGTransferEnabled], a ldh [hAutoBGTransferEnabled], a
; draw the horizontal line separating the seen and owned amounts from the menu ; draw the horizontal line separating the seen and owned amounts from the menu
coord hl, 15, 8 hlcoord 15, 8
ld a, "─" ld a, "─"
ld [hli], a ld [hli], a
ld [hli], a ld [hli], a
ld [hli], a ld [hli], a
ld [hli], a ld [hli], a
ld [hli], a ld [hli], a
coord hl, 14, 0 hlcoord 14, 0
ld [hl], $71 ; vertical line tile ld [hl], $71 ; vertical line tile
coord hl, 14, 1 hlcoord 14, 1
call DrawPokedexVerticalLine call DrawPokedexVerticalLine
coord hl, 14, 9 hlcoord 14, 9
call DrawPokedexVerticalLine call DrawPokedexVerticalLine
ld hl, wPokedexSeen ld hl, wPokedexSeen
ld b, wPokedexSeenEnd - wPokedexSeen ld b, wPokedexSeenEnd - wPokedexSeen
call CountSetBits call CountSetBits
ld de, wNumSetBits ld de, wNumSetBits
coord hl, 16, 3 hlcoord 16, 3
lb bc, 1, 3 lb bc, 1, 3
call PrintNumber ; print number of seen pokemon call PrintNumber ; print number of seen pokemon
ld hl, wPokedexOwned ld hl, wPokedexOwned
ld b, wPokedexOwnedEnd - wPokedexOwned ld b, wPokedexOwnedEnd - wPokedexOwned
call CountSetBits call CountSetBits
ld de, wNumSetBits ld de, wNumSetBits
coord hl, 16, 6 hlcoord 16, 6
lb bc, 1, 3 lb bc, 1, 3
call PrintNumber ; print number of owned pokemon call PrintNumber ; print number of owned pokemon
coord hl, 16, 2 hlcoord 16, 2
ld de, PokedexSeenText ld de, PokedexSeenText
call PlaceString call PlaceString
coord hl, 16, 5 hlcoord 16, 5
ld de, PokedexOwnText ld de, PokedexOwnText
call PlaceString call PlaceString
coord hl, 1, 1 hlcoord 1, 1
ld de, PokedexContentsText ld de, PokedexContentsText
call PlaceString call PlaceString
coord hl, 16, 10 hlcoord 16, 10
ld de, PokedexMenuItemsText ld de, PokedexMenuItemsText
call PlaceString call PlaceString
; find the highest pokedex number among the pokemon the player has seen ; find the highest pokedex number among the pokemon the player has seen
@ -217,10 +217,10 @@ HandlePokedexListMenu:
.loop .loop
xor a xor a
ldh [hAutoBGTransferEnabled], a ldh [hAutoBGTransferEnabled], a
coord hl, 4, 2 hlcoord 4, 2
lb bc, 14, 10 lb bc, 14, 10
call ClearScreenArea call ClearScreenArea
coord hl, 1, 3 hlcoord 1, 3
ld a, [wListScrollOffset] ld a, [wListScrollOffset]
ld [wd11e], a ld [wd11e], a
ld d, 7 ld d, 7
@ -415,43 +415,43 @@ ShowPokedexDataInternal:
xor a xor a
ldh [hTilesetType], a ldh [hTilesetType], a
coord hl, 0, 0 hlcoord 0, 0
ld de, 1 ld de, 1
lb bc, $64, SCREEN_WIDTH lb bc, $64, SCREEN_WIDTH
call DrawTileLine ; draw top border call DrawTileLine ; draw top border
coord hl, 0, 17 hlcoord 0, 17
ld b, $6f ld b, $6f
call DrawTileLine ; draw bottom border call DrawTileLine ; draw bottom border
coord hl, 0, 1 hlcoord 0, 1
ld de, 20 ld de, 20
lb bc, $66, $10 lb bc, $66, $10
call DrawTileLine ; draw left border call DrawTileLine ; draw left border
coord hl, 19, 1 hlcoord 19, 1
ld b, $67 ld b, $67
call DrawTileLine ; draw right border call DrawTileLine ; draw right border
ld a, $63 ; upper left corner tile ld a, $63 ; upper left corner tile
Coorda 0, 0 ldcoord_a 0, 0
ld a, $65 ; upper right corner tile ld a, $65 ; upper right corner tile
Coorda 19, 0 ldcoord_a 19, 0
ld a, $6c ; lower left corner tile ld a, $6c ; lower left corner tile
Coorda 0, 17 ldcoord_a 0, 17
ld a, $6e ; lower right corner tile ld a, $6e ; lower right corner tile
Coorda 19, 17 ldcoord_a 19, 17
coord hl, 0, 9 hlcoord 0, 9
ld de, PokedexDataDividerLine ld de, PokedexDataDividerLine
call PlaceString ; draw horizontal divider line call PlaceString ; draw horizontal divider line
coord hl, 9, 6 hlcoord 9, 6
ld de, HeightWeightText ld de, HeightWeightText
call PlaceString call PlaceString
call GetMonName call GetMonName
coord hl, 9, 2 hlcoord 9, 2
call PlaceString call PlaceString
ld hl, PokedexEntryPointers ld hl, PokedexEntryPointers
@ -465,7 +465,7 @@ ShowPokedexDataInternal:
ld e, a ld e, a
ld d, [hl] ; de = address of pokedex entry ld d, [hl] ; de = address of pokedex entry
coord hl, 9, 4 hlcoord 9, 4
call PlaceString ; print species name call PlaceString ; print species name
ld h, b ld h, b
@ -475,7 +475,7 @@ ShowPokedexDataInternal:
push af push af
call IndexToPokedex call IndexToPokedex
coord hl, 2, 8 hlcoord 2, 8
ld a, "№" ld a, "№"
ld [hli], a ld [hli], a
ld a, "<DOT>" ld a, "<DOT>"
@ -500,7 +500,7 @@ ShowPokedexDataInternal:
call Delay3 call Delay3
call GBPalNormal call GBPalNormal
call GetMonHeader ; load pokemon picture location call GetMonHeader ; load pokemon picture location
coord hl, 1, 1 hlcoord 1, 1
call LoadFlippedFrontSpriteByMonIndex ; draw pokemon picture call LoadFlippedFrontSpriteByMonIndex ; draw pokemon picture
ld a, [wcf91] ld a, [wcf91]
call PlayCry ; play pokemon cry call PlayCry ; play pokemon cry
@ -515,14 +515,14 @@ ShowPokedexDataInternal:
jp z, .waitForButtonPress ; if the pokemon has not been owned, don't print the height, weight, or description jp z, .waitForButtonPress ; if the pokemon has not been owned, don't print the height, weight, or description
inc de ; de = address of feet (height) inc de ; de = address of feet (height)
ld a, [de] ; reads feet, but a is overwritten without being used ld a, [de] ; reads feet, but a is overwritten without being used
coord hl, 12, 6 hlcoord 12, 6
lb bc, 1, 2 lb bc, 1, 2
call PrintNumber ; print feet (height) call PrintNumber ; print feet (height)
ld a, "" ld a, ""
ld [hl], a ld [hl], a
inc de inc de
inc de ; de = address of inches (height) inc de ; de = address of inches (height)
coord hl, 15, 6 hlcoord 15, 6
lb bc, LEADING_ZEROES | 1, 2 lb bc, LEADING_ZEROES | 1, 2
call PrintNumber ; print inches (height) call PrintNumber ; print inches (height)
ld a, "″" ld a, "″"
@ -544,10 +544,10 @@ ShowPokedexDataInternal:
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 [hDexWeight + 1] ld [hl], a ; store lower byte of weight in [hDexWeight + 1]
ld de, hDexWeight ld de, hDexWeight
coord hl, 11, 8 hlcoord 11, 8
lb bc, 2, 5 ; 2 bytes, 5 digits lb bc, 2, 5 ; 2 bytes, 5 digits
call PrintNumber ; print weight call PrintNumber ; print weight
coord hl, 14, 8 hlcoord 14, 8
ldh a, [hDexWeight + 1] ldh a, [hDexWeight + 1]
sub 10 sub 10
ldh a, [hDexWeight] ldh a, [hDexWeight]
@ -565,7 +565,7 @@ ShowPokedexDataInternal:
ldh [hDexWeight], a ; restore original value of [hDexWeight] ldh [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
coord bc, 1, 11 bccoord 1, 11
ld a, %10 ld a, %10
ldh [hClearLetterPrintingDelayFlags], a ldh [hClearLetterPrintingDelayFlags], a
call TextCommandProcessor ; print pokedex description text call TextCommandProcessor ; print pokedex description text

View file

@ -154,10 +154,10 @@ SaveSAV:
ret nz ret nz
.save .save
call SaveSAVtoSRAM call SaveSAVtoSRAM
coord hl, 1, 13 hlcoord 1, 13
lb bc, 4, 18 lb bc, 4, 18
call ClearScreenArea call ClearScreenArea
coord hl, 1, 14 hlcoord 1, 14
ld de, NowSavingString ld de, NowSavingString
call PlaceString call PlaceString
ld c, 120 ld c, 120
@ -175,7 +175,7 @@ NowSavingString:
SaveSAVConfirm: SaveSAVConfirm:
call PrintText call PrintText
coord hl, 0, 7 hlcoord 0, 7
lb bc, 8, 1 lb bc, 8, 1
ld a, TWO_OPTION_MENU ld a, TWO_OPTION_MENU
ld [wTextBoxID], a ld [wTextBoxID], a
@ -435,20 +435,20 @@ DisplayChangeBoxMenu:
and $7f and $7f
ld [wCurrentMenuItem], a ld [wCurrentMenuItem], a
ld [wLastMenuItem], a ld [wLastMenuItem], a
coord hl, 0, 0 hlcoord 0, 0
ld b, 2 ld b, 2
ld c, 9 ld c, 9
call TextBoxBorder call TextBoxBorder
ld hl, ChooseABoxText ld hl, ChooseABoxText
call PrintText call PrintText
coord hl, 11, 0 hlcoord 11, 0
ld b, 12 ld b, 12
ld c, 7 ld c, 7
call TextBoxBorder call TextBoxBorder
ld hl, hFlagsFFF6 ld hl, hFlagsFFF6
set 2, [hl] set 2, [hl]
ld de, BoxNames ld de, BoxNames
coord hl, 13, 1 hlcoord 13, 1
call PlaceString call PlaceString
ld hl, hFlagsFFF6 ld hl, hFlagsFFF6
res 2, [hl] res 2, [hl]
@ -457,19 +457,19 @@ DisplayChangeBoxMenu:
cp 9 cp 9
jr c, .singleDigitBoxNum jr c, .singleDigitBoxNum
sub 9 sub 9
coord hl, 8, 2 hlcoord 8, 2
ld [hl], "1" ld [hl], "1"
add "0" add "0"
jr .next jr .next
.singleDigitBoxNum .singleDigitBoxNum
add "1" add "1"
.next .next
Coorda 9, 2 ldcoord_a 9, 2
coord hl, 1, 2 hlcoord 1, 2
ld de, BoxNoText ld de, BoxNoText
call PlaceString call PlaceString
call GetMonCountsForAllBoxes call GetMonCountsForAllBoxes
coord hl, 18, 1 hlcoord 18, 1
ld de, wBoxMonCounts ld de, wBoxMonCounts
ld bc, SCREEN_WIDTH ld bc, SCREEN_WIDTH
ld a, $c ld a, $c

View file

@ -285,7 +285,7 @@ StartMenu_Pokemon::
; writes a blank tile to all possible menu cursor positions on the party menu ; writes a blank tile to all possible menu cursor positions on the party menu
ErasePartyMenuCursors:: ErasePartyMenuCursors::
coord hl, 0, 1 hlcoord 0, 1
ld bc, 2 * 20 ; menu cursor positions are 2 rows apart ld bc, 2 * 20 ; menu cursor positions are 2 rows apart
ld a, 6 ; 6 menu cursor positions ld a, 6 ; 6 menu cursor positions
.loop .loop
@ -330,10 +330,10 @@ StartMenu_Item::
.choseItem .choseItem
; erase menu cursor (blank each tile in front of an item name) ; erase menu cursor (blank each tile in front of an item name)
ld a, " " ld a, " "
Coorda 5, 4 ldcoord_a 5, 4
Coorda 5, 6 ldcoord_a 5, 6
Coorda 5, 8 ldcoord_a 5, 8
Coorda 5, 10 ldcoord_a 5, 10
call PlaceUnfilledArrowMenuCursor call PlaceUnfilledArrowMenuCursor
xor a xor a
ld [wMenuItemToSwap], a ld [wMenuItemToSwap], a
@ -480,10 +480,10 @@ DrawTrainerInfo:
lb bc, BANK(RedPicFront), $01 lb bc, BANK(RedPicFront), $01
predef DisplayPicCenteredOrUpperRight predef DisplayPicCenteredOrUpperRight
call DisableLCD call DisableLCD
coord hl, 0, 2 hlcoord 0, 2
ld a, " " ld a, " "
call TrainerInfo_DrawVerticalLine call TrainerInfo_DrawVerticalLine
coord hl, 1, 2 hlcoord 1, 2
call TrainerInfo_DrawVerticalLine call TrainerInfo_DrawVerticalLine
ld hl, vChars2 + $70 ld hl, vChars2 + $70
ld de, vChars2 ld de, vChars2
@ -526,7 +526,7 @@ DrawTrainerInfo:
dec a dec a
ld [hli], a ld [hli], a
ld [hl], 1 ld [hl], 1
coord hl, 0, 0 hlcoord 0, 0
call TrainerInfo_DrawTextBox call TrainerInfo_DrawTextBox
ld hl, wTrainerInfoTextBoxWidthPlus1 ld hl, wTrainerInfoTextBoxWidthPlus1
ld a, 16 + 1 ld a, 16 + 1
@ -534,27 +534,27 @@ DrawTrainerInfo:
dec a dec a
ld [hli], a ld [hli], a
ld [hl], 3 ld [hl], 3
coord hl, 1, 10 hlcoord 1, 10
call TrainerInfo_DrawTextBox call TrainerInfo_DrawTextBox
coord hl, 0, 10 hlcoord 0, 10
ld a, $d7 ld a, $d7
call TrainerInfo_DrawVerticalLine call TrainerInfo_DrawVerticalLine
coord hl, 19, 10 hlcoord 19, 10
call TrainerInfo_DrawVerticalLine call TrainerInfo_DrawVerticalLine
coord hl, 6, 9 hlcoord 6, 9
ld de, TrainerInfo_BadgesText ld de, TrainerInfo_BadgesText
call PlaceString call PlaceString
coord hl, 2, 2 hlcoord 2, 2
ld de, TrainerInfo_NameMoneyTimeText ld de, TrainerInfo_NameMoneyTimeText
call PlaceString call PlaceString
coord hl, 7, 2 hlcoord 7, 2
ld de, wPlayerName ld de, wPlayerName
call PlaceString call PlaceString
coord hl, 8, 4 hlcoord 8, 4
ld de, wPlayerMoney ld de, wPlayerMoney
ld c, $e3 ld c, $e3
call PrintBCDNumber call PrintBCDNumber
coord hl, 9, 6 hlcoord 9, 6
ld de, wPlayTimeHours ; hours ld de, wPlayTimeHours ; hours
lb bc, LEFT_ALIGN | 1, 3 lb bc, LEFT_ALIGN | 1, 3
call PrintNumber call PrintNumber
@ -667,7 +667,7 @@ SwitchPartyMon::
SwitchPartyMon_ClearGfx: SwitchPartyMon_ClearGfx:
push af push af
coord hl, 0, 0 hlcoord 0, 0
ld bc, SCREEN_WIDTH * 2 ld bc, SCREEN_WIDTH * 2
call AddNTimes call AddNTimes
ld c, SCREEN_WIDTH * 2 ld c, SCREEN_WIDTH * 2

View file

@ -111,7 +111,7 @@ GetTextBoxIDText:
; hl = address of upper left corner of text box ; hl = address of upper left corner of text box
GetAddressOfScreenCoords: GetAddressOfScreenCoords:
push bc push bc
coord hl, 0, 0 hlcoord 0, 0
ld bc, 20 ld bc, 20
.loop ; loop to add d rows to the base address .loop ; loop to add d rows to the base address
ld a, d ld a, d
@ -274,11 +274,11 @@ DisplayMoneyBox:
ld a, MONEY_BOX_TEMPLATE ld a, MONEY_BOX_TEMPLATE
ld [wTextBoxID], a ld [wTextBoxID], a
call DisplayTextBoxID call DisplayTextBoxID
coord hl, 13, 1 hlcoord 13, 1
ld b, 1 ld b, 1
ld c, 6 ld c, 6
call ClearScreenArea call ClearScreenArea
coord hl, 12, 1 hlcoord 12, 1
ld de, wPlayerMoney ld de, wPlayerMoney
ld c, $a3 ld c, $a3
call PrintBCDNumber call PrintBCDNumber
@ -578,14 +578,14 @@ DisplayFieldMoveMonMenu:
jr nz, .fieldMovesExist jr nz, .fieldMovesExist
; no field moves ; no field moves
coord hl, 11, 11 hlcoord 11, 11
ld b, 5 ld b, 5
ld c, 7 ld c, 7
call TextBoxBorder call TextBoxBorder
call UpdateSprites call UpdateSprites
ld a, 12 ld a, 12
ldh [hFieldMoveMonMenuTopMenuItemX], a ldh [hFieldMoveMonMenuTopMenuItemX], a
coord hl, 13, 12 hlcoord 13, 12
ld de, PokemonMenuEntries ld de, PokemonMenuEntries
jp PlaceString jp PlaceString
@ -594,7 +594,7 @@ DisplayFieldMoveMonMenu:
; Calculate the text box position and dimensions based on the leftmost X coord ; Calculate the text box position and dimensions based on the leftmost X coord
; of the field move names before adjusting for the number of field moves. ; of the field move names before adjusting for the number of field moves.
coord hl, 0, 11 hlcoord 0, 11
ld a, [wFieldMovesLeftmostXCoord] ld a, [wFieldMovesLeftmostXCoord]
dec a dec a
ld e, a ld e, a
@ -625,7 +625,7 @@ DisplayFieldMoveMonMenu:
call UpdateSprites call UpdateSprites
; Calculate the position of the first field move name to print. ; Calculate the position of the first field move name to print.
coord hl, 0, 12 hlcoord 0, 12
ld a, [wFieldMovesLeftmostXCoord] ld a, [wFieldMovesLeftmostXCoord]
inc a inc a
ld e, a ld e, a
@ -674,7 +674,7 @@ DisplayFieldMoveMonMenu:
pop hl pop hl
ld a, [wFieldMovesLeftmostXCoord] ld a, [wFieldMovesLeftmostXCoord]
ldh [hFieldMoveMonMenuTopMenuItemX], a ldh [hFieldMoveMonMenuTopMenuItemX], a
coord hl, 0, 12 hlcoord 0, 12
ld a, [wFieldMovesLeftmostXCoord] ld a, [wFieldMovesLeftmostXCoord]
inc a inc a
ld e, a ld e, a

View file

@ -14,9 +14,9 @@ HallOfFamePC:
ld bc, $10 ld bc, $10
ld a, $ff ld a, $ff
call FillMemory call FillMemory
coord hl, 0, 0 hlcoord 0, 0
call FillFourRowsWithBlack call FillFourRowsWithBlack
coord hl, 0, 14 hlcoord 0, 14
call FillFourRowsWithBlack call FillFourRowsWithBlack
ld a, %11000000 ld a, %11000000
ldh [rBGP], a ldh [rBGP], a
@ -61,7 +61,7 @@ DisplayCreditsMon:
ld a, [hl] ld a, [hl]
ld [wcf91], a ld [wcf91], a
ld [wd0b5], a ld [wd0b5], a
coord hl, 8, 6 hlcoord 8, 6
call GetMonHeader call GetMonHeader
call LoadFrontSpriteByMonIndex call LoadFrontSpriteByMonIndex
ld hl, vBGMap0 + $c ld hl, vBGMap0 + $c
@ -162,7 +162,7 @@ FillFourRowsWithBlack:
jp FillMemory jp FillMemory
FillMiddleOfScreenWithWhite: FillMiddleOfScreenWithWhite:
coord hl, 0, 4 hlcoord 0, 4
ld bc, SCREEN_WIDTH * 10 ld bc, SCREEN_WIDTH * 10
ld a, " " ld a, " "
jp FillMemory jp FillMemory
@ -172,7 +172,7 @@ Credits:
push de push de
.nextCreditsScreen .nextCreditsScreen
pop de pop de
coord hl, 9, 6 hlcoord 9, 6
push hl push hl
call FillMiddleOfScreenWithWhite call FillMiddleOfScreenWithWhite
pop hl pop hl
@ -248,10 +248,10 @@ Credits:
ld hl, vChars2 + $600 ld hl, vChars2 + $600
lb bc, BANK(TheEndGfx), (TheEndGfxEnd - TheEndGfx) / $10 lb bc, BANK(TheEndGfx), (TheEndGfxEnd - TheEndGfx) / $10
call CopyVideoData call CopyVideoData
coord hl, 4, 8 hlcoord 4, 8
ld de, TheEndTextString ld de, TheEndTextString
call PlaceString call PlaceString
coord hl, 4, 9 hlcoord 4, 9
inc de inc de
call PlaceString call PlaceString
jp FadeInCreditsText jp FadeInCreditsText

View file

@ -99,7 +99,7 @@ EvolutionSetWholeScreenPalette:
Evolution_LoadPic: Evolution_LoadPic:
call GetMonHeader call GetMonHeader
coord hl, 7, 2 hlcoord 7, 2
jp LoadFlippedFrontSpriteByMonIndex jp LoadFlippedFrontSpriteByMonIndex
Evolution_BackAndForthAnim: Evolution_BackAndForthAnim:
@ -118,7 +118,7 @@ Evolution_ChangeMonPic:
push bc push bc
xor a xor a
ldh [hAutoBGTransferEnabled], a ldh [hAutoBGTransferEnabled], a
coord hl, 7, 2 hlcoord 7, 2
lb bc, 7, 7 lb bc, 7, 7
ld de, SCREEN_WIDTH - 7 ld de, SCREEN_WIDTH - 7
.loop .loop

View file

@ -57,11 +57,11 @@ AnimateHallOfFame:
call HoFDisplayAndRecordMonInfo call HoFDisplayAndRecordMonInfo
ld c, 80 ld c, 80
call DelayFrames call DelayFrames
coord hl, 2, 13 hlcoord 2, 13
ld b, 3 ld b, 3
ld c, 14 ld c, 14
call TextBoxBorder call TextBoxBorder
coord hl, 4, 15 hlcoord 4, 15
ld de, HallOfFameText ld de, HallOfFameText
call PlaceString call PlaceString
ld c, 180 ld c, 180
@ -112,7 +112,7 @@ HoFShowMonOrPlayer:
call HoFLoadPlayerPics call HoFLoadPlayerPics
jr .next1 jr .next1
.showMon .showMon
coord hl, 12, 5 hlcoord 12, 5
call GetMonHeader call GetMonHeader
call LoadFrontSpriteByMonIndex call LoadFrontSpriteByMonIndex
predef LoadMonBackPic predef LoadMonBackPic
@ -157,22 +157,22 @@ HoFDisplayAndRecordMonInfo:
jp HoFRecordMonInfo jp HoFRecordMonInfo
HoFDisplayMonInfo: HoFDisplayMonInfo:
coord hl, 0, 2 hlcoord 0, 2
ld b, 9 ld b, 9
ld c, 10 ld c, 10
call TextBoxBorder call TextBoxBorder
coord hl, 2, 6 hlcoord 2, 6
ld de, HoFMonInfoText ld de, HoFMonInfoText
call PlaceString call PlaceString
coord hl, 1, 4 hlcoord 1, 4
ld de, wcd6d ld de, wcd6d
call PlaceString call PlaceString
ld a, [wHoFMonLevel] ld a, [wHoFMonLevel]
coord hl, 8, 7 hlcoord 8, 7
call PrintLevelCommon call PrintLevelCommon
ld a, [wHoFMonSpecies] ld a, [wHoFMonSpecies]
ld [wd0b5], a ld [wd0b5], a
coord hl, 3, 9 hlcoord 3, 9
predef PrintMonType predef PrintMonType
ld a, [wHoFMonSpecies] ld a, [wHoFMonSpecies]
jp PlayCry jp PlayCry
@ -203,27 +203,27 @@ HoFLoadPlayerPics:
HoFLoadMonPlayerPicTileIDs: HoFLoadMonPlayerPicTileIDs:
; c = base tile ID ; c = base tile ID
ld b, 0 ld b, 0
coord hl, 12, 5 hlcoord 12, 5
predef_jump CopyTileIDsFromList predef_jump CopyTileIDsFromList
HoFDisplayPlayerStats: HoFDisplayPlayerStats:
SetEvent EVENT_HALL_OF_FAME_DEX_RATING SetEvent EVENT_HALL_OF_FAME_DEX_RATING
predef DisplayDexRating predef DisplayDexRating
coord hl, 0, 4 hlcoord 0, 4
ld b, 6 ld b, 6
ld c, 10 ld c, 10
call TextBoxBorder call TextBoxBorder
coord hl, 5, 0 hlcoord 5, 0
ld b, 2 ld b, 2
ld c, 9 ld c, 9
call TextBoxBorder call TextBoxBorder
coord hl, 7, 2 hlcoord 7, 2
ld de, wPlayerName ld de, wPlayerName
call PlaceString call PlaceString
coord hl, 1, 6 hlcoord 1, 6
ld de, HoFPlayTimeText ld de, HoFPlayTimeText
call PlaceString call PlaceString
coord hl, 5, 7 hlcoord 5, 7
ld de, wPlayTimeHours ld de, wPlayTimeHours
lb bc, 1, 3 lb bc, 1, 3
call PrintNumber call PrintNumber
@ -232,10 +232,10 @@ HoFDisplayPlayerStats:
ld de, wPlayTimeMinutes ld de, wPlayTimeMinutes
lb bc, LEADING_ZEROES | 1, 2 lb bc, LEADING_ZEROES | 1, 2
call PrintNumber call PrintNumber
coord hl, 1, 9 hlcoord 1, 9
ld de, HoFMoneyText ld de, HoFMoneyText
call PlaceString call PlaceString
coord hl, 4, 10 hlcoord 4, 10
ld de, wPlayerMoney ld de, wPlayerMoney
ld c, $a3 ld c, $a3
call PrintBCDNumber call PrintBCDNumber

View file

@ -217,7 +217,7 @@ IntroClearScreen:
IntroClearMiddleOfScreen: IntroClearMiddleOfScreen:
; clear the area of the tile map between the black bars on the top and bottom ; clear the area of the tile map between the black bars on the top and bottom
coord hl, 0, 4 hlcoord 0, 4
ld bc, SCREEN_WIDTH * 10 ld bc, SCREEN_WIDTH * 10
IntroClearCommon: IntroClearCommon:
@ -274,7 +274,7 @@ IntroMoveMon:
ret ret
IntroCopyTiles: IntroCopyTiles:
coord hl, 13, 7 hlcoord 13, 7
CopyTileIDsFromList_ZeroBaseTileID: CopyTileIDsFromList_ZeroBaseTileID:
ld c, 0 ld c, 0
@ -348,16 +348,16 @@ PlayShootingStar:
IntroDrawBlackBars: IntroDrawBlackBars:
; clear the screen and draw black bars on the top and bottom ; clear the screen and draw black bars on the top and bottom
call IntroClearScreen call IntroClearScreen
coord hl, 0, 0 hlcoord 0, 0
ld c, SCREEN_WIDTH * 4 ld c, SCREEN_WIDTH * 4
call IntroPlaceBlackTiles call IntroPlaceBlackTiles
coord hl, 0, 14 hlcoord 0, 14
ld c, SCREEN_WIDTH * 4 ld c, SCREEN_WIDTH * 4
call IntroPlaceBlackTiles call IntroPlaceBlackTiles
ld hl, vBGMap1 ld hl, vBGMap1
ld c, BG_MAP_WIDTH * 4 ld c, BG_MAP_WIDTH * 4
call IntroPlaceBlackTiles call IntroPlaceBlackTiles
ld hl, vBGMap1 + BG_MAP_WIDTH * 14 hlbgcoord 0, 14, vBGMap1
ld c, BG_MAP_WIDTH * 4 ld c, BG_MAP_WIDTH * 4
jp IntroPlaceBlackTiles jp IntroPlaceBlackTiles

View file

@ -5,7 +5,7 @@ DoClearSaveDialogue:
call LoadTextBoxTilePatterns call LoadTextBoxTilePatterns
ld hl, ClearSaveDataText ld hl, ClearSaveDataText
call PrintText call PrintText
coord hl, 14, 7 hlcoord 14, 7
lb bc, 8, 15 lb bc, 8, 15
ld a, NO_YES_MENU ld a, NO_YES_MENU
ld [wTwoOptionMenuID], a ld [wTwoOptionMenuID], a

View file

@ -68,7 +68,7 @@ OakSpeech:
ld [wd0b5], a ld [wd0b5], a
ld [wcf91], a ld [wcf91], a
call GetMonHeader call GetMonHeader
coord hl, 6, 4 hlcoord 6, 4
call LoadFlippedFrontSpriteByMonIndex call LoadFlippedFrontSpriteByMonIndex
call MovePicLeft call MovePicLeft
ld hl, OakSpeechText2 ld hl, OakSpeechText2
@ -141,7 +141,7 @@ OakSpeech:
ld [MBC1RomBank], a ld [MBC1RomBank], a
ld c, 20 ld c, 20
call DelayFrames call DelayFrames
coord hl, 6, 5 hlcoord 6, 5
ld b, 7 ld b, 7
ld c, 7 ld c, 7
call ClearScreenArea call ClearScreenArea
@ -224,9 +224,9 @@ IntroDisplayPicCenteredOrUpperRight:
pop bc pop bc
ld a, c ld a, c
and a and a
coord hl, 15, 1 hlcoord 15, 1
jr nz, .next jr nz, .next
coord hl, 6, 4 hlcoord 6, 4
.next .next
xor a xor a
ldh [hStartTileID], a ldh [hStartTileID], a

View file

@ -66,7 +66,7 @@ HisNameIsText:
OakSpeechSlidePicLeft: OakSpeechSlidePicLeft:
push de push de
coord hl, 0, 0 hlcoord 0, 0
lb bc, 12, 11 lb bc, 12, 11
call ClearScreenArea ; clear the name list text box call ClearScreenArea ; clear the name list text box
ld c, 10 ld c, 10
@ -76,13 +76,13 @@ OakSpeechSlidePicLeft:
ld bc, NAME_LENGTH ld bc, NAME_LENGTH
call CopyData call CopyData
call Delay3 call Delay3
coord hl, 12, 4 hlcoord 12, 4
lb de, 6, 6 * SCREEN_WIDTH + 5 lb de, 6, 6 * SCREEN_WIDTH + 5
ld a, $ff ld a, $ff
jr OakSpeechSlidePicCommon jr OakSpeechSlidePicCommon
OakSpeechSlidePicRight: OakSpeechSlidePicRight:
coord hl, 5, 4 hlcoord 5, 4
lb de, 6, 6 * SCREEN_WIDTH + 5 lb de, 6, 6 * SCREEN_WIDTH + 5
xor a xor a
@ -161,15 +161,15 @@ OakSpeechSlidePicCommon:
DisplayIntroNameTextBox: DisplayIntroNameTextBox:
push de push de
coord hl, 0, 0 hlcoord 0, 0
ld b, $a ld b, $a
ld c, $9 ld c, $9
call TextBoxBorder call TextBoxBorder
coord hl, 3, 0 hlcoord 3, 0
ld de, .namestring ld de, .namestring
call PlaceString call PlaceString
pop de pop de
coord hl, 2, 2 hlcoord 2, 2
call PlaceString call PlaceString
call UpdateSprites call UpdateSprites
xor a xor a

View file

@ -63,7 +63,7 @@ DisplayTitleScreen:
call ClearBothBGMaps call ClearBothBGMaps
; place tiles for pokemon logo (except for the last row) ; place tiles for pokemon logo (except for the last row)
coord hl, 2, 1 hlcoord 2, 1
ld a, $80 ld a, $80
ld de, SCREEN_WIDTH ld de, SCREEN_WIDTH
ld c, 6 ld c, 6
@ -81,7 +81,7 @@ DisplayTitleScreen:
jr nz, .pokemonLogoTileLoop jr nz, .pokemonLogoTileLoop
; place tiles for the last row of the pokemon logo ; place tiles for the last row of the pokemon logo
coord hl, 2, 7 hlcoord 2, 7
ld a, $31 ld a, $31
ld b, $10 ld b, $10
.pokemonLogoLastTileRowLoop .pokemonLogoLastTileRowLoop
@ -98,7 +98,7 @@ DisplayTitleScreen:
ld [hl], a ld [hl], a
; place tiles for title screen copyright ; place tiles for title screen copyright
coord hl, 2, 17 hlcoord 2, 17
ld de, .tileScreenCopyrightTiles ld de, .tileScreenCopyrightTiles
ld b, $10 ld b, $10
.tileScreenCopyrightTilesLoop .tileScreenCopyrightTilesLoop
@ -353,7 +353,7 @@ ClearBothBGMaps:
LoadTitleMonSprite: LoadTitleMonSprite:
ld [wcf91], a ld [wcf91], a
ld [wd0b5], a ld [wd0b5], a
coord hl, 5, 10 hlcoord 5, 10
call GetMonHeader call GetMonHeader
jp LoadFrontSpriteByMonIndex jp LoadFrontSpriteByMonIndex
@ -372,7 +372,7 @@ LoadCopyrightTiles:
ld hl, vChars2 + $600 ld hl, vChars2 + $600
lb bc, BANK(NintendoCopyrightLogoGraphics), (GamefreakLogoGraphicsEnd - NintendoCopyrightLogoGraphics) / $10 lb bc, BANK(NintendoCopyrightLogoGraphics), (GamefreakLogoGraphicsEnd - NintendoCopyrightLogoGraphics) / $10
call CopyVideoData call CopyVideoData
coord hl, 2, 7 hlcoord 2, 7
ld de, CopyrightTextString ld de, CopyrightTextString
jp PlaceString jp PlaceString
@ -386,7 +386,7 @@ INCLUDE "data/pokemon/title_mons.asm"
; prints version text (red, blue) ; prints version text (red, blue)
PrintGameVersionOnTitleScreen: PrintGameVersionOnTitleScreen:
coord hl, 7, 8 hlcoord 7, 8
ld de, VersionOnTitleScreenText ld de, VersionOnTitleScreenText
jp PlaceString jp PlaceString

View file

@ -148,7 +148,7 @@ Trade_Delay80:
jp DelayFrames jp DelayFrames
Trade_ClearTileMap: Trade_ClearTileMap:
coord hl, 0, 0 hlcoord 0, 0
ld bc, SCREEN_WIDTH * SCREEN_HEIGHT ld bc, SCREEN_WIDTH * SCREEN_HEIGHT
ld a, " " ld a, " "
jp FillMemory jp FillMemory
@ -232,7 +232,7 @@ Trade_ShowPlayerMon:
ldh [hSCX], a ldh [hSCX], a
xor a xor a
ldh [hAutoBGTransferEnabled], a ldh [hAutoBGTransferEnabled], a
coord hl, 4, 0 hlcoord 4, 0
ld b, 6 ld b, 6
ld c, 10 ld c, 10
call TextBoxBorder call TextBoxBorder
@ -281,7 +281,7 @@ Trade_DrawOpenEndOfLinkCable:
call DelayFrame call DelayFrame
ld a, %10001011 ld a, %10001011
ldh [rLCDC], a ldh [rLCDC], a
coord hl, 6, 2 hlcoord 6, 2
ld b, $7 ; open end of link cable tile ID list index ld b, $7 ; open end of link cable tile ID list index
call CopyTileIDsFromList_ZeroBaseTileID call CopyTileIDsFromList_ZeroBaseTileID
call Trade_CopyTileMapToVRAM call Trade_CopyTileMapToVRAM
@ -353,7 +353,7 @@ Trade_ShowEnemyMon:
ld a, TRADE_BALL_TILT_ANIM ld a, TRADE_BALL_TILT_ANIM
call Trade_ShowAnimation call Trade_ShowAnimation
call Trade_ShowClearedWindow call Trade_ShowClearedWindow
coord hl, 4, 10 hlcoord 4, 10
ld b, 6 ld b, 6
ld c, 10 ld c, 10
call TextBoxBorder call TextBoxBorder
@ -370,7 +370,7 @@ Trade_ShowEnemyMon:
ld a, [wTradedEnemyMonSpecies] ld a, [wTradedEnemyMonSpecies]
call PlayCry call PlayCry
call Trade_Delay100 call Trade_Delay100
coord hl, 4, 10 hlcoord 4, 10
lb bc, 8, 12 lb bc, 8, 12
call ClearScreenArea call ClearScreenArea
jp PrintTradeTakeCareText jp PrintTradeTakeCareText
@ -462,7 +462,7 @@ Trade_DrawLeftGameboy:
call Trade_ClearTileMap call Trade_ClearTileMap
; draw link cable ; draw link cable
coord hl, 11, 4 hlcoord 11, 4
ld a, $5d ld a, $5d
ld [hli], a ld [hli], a
ld a, $5e ld a, $5e
@ -473,16 +473,16 @@ Trade_DrawLeftGameboy:
jr nz, .loop jr nz, .loop
; draw gameboy pic ; draw gameboy pic
coord hl, 5, 3 hlcoord 5, 3
ld b, $6 ld b, $6
call CopyTileIDsFromList_ZeroBaseTileID call CopyTileIDsFromList_ZeroBaseTileID
; draw text box with player name below gameboy pic ; draw text box with player name below gameboy pic
coord hl, 4, 12 hlcoord 4, 12
ld b, 2 ld b, 2
ld c, 7 ld c, 7
call TextBoxBorder call TextBoxBorder
coord hl, 5, 14 hlcoord 5, 14
ld de, wPlayerName ld de, wPlayerName
call PlaceString call PlaceString
@ -492,7 +492,7 @@ Trade_DrawRightGameboy:
call Trade_ClearTileMap call Trade_ClearTileMap
; draw horizontal segment of link cable ; draw horizontal segment of link cable
coord hl, 0, 4 hlcoord 0, 4
ld a, $5e ld a, $5e
ld c, $e ld c, $e
.loop .loop
@ -520,16 +520,16 @@ Trade_DrawRightGameboy:
ld [hl], a ld [hl], a
; draw gameboy pic ; draw gameboy pic
coord hl, 7, 8 hlcoord 7, 8
ld b, $6 ld b, $6
call CopyTileIDsFromList_ZeroBaseTileID call CopyTileIDsFromList_ZeroBaseTileID
; draw text box with enemy name above link cable ; draw text box with enemy name above link cable
coord hl, 6, 0 hlcoord 6, 0
ld b, 2 ld b, 2
ld c, 7 ld c, 7
call TextBoxBorder call TextBoxBorder
coord hl, 7, 2 hlcoord 7, 2
ld de, wLinkEnemyTrainerName ld de, wLinkEnemyTrainerName
call PlaceString call PlaceString
@ -538,7 +538,7 @@ Trade_DrawRightGameboy:
Trade_DrawCableAcrossScreen: Trade_DrawCableAcrossScreen:
; Draws the link cable across the screen. ; Draws the link cable across the screen.
call Trade_ClearTileMap call Trade_ClearTileMap
coord hl, 0, 4 hlcoord 0, 4
ld a, $5e ld a, $5e
ld c, SCREEN_WIDTH ld c, SCREEN_WIDTH
.loop .loop
@ -551,7 +551,7 @@ Trade_CopyCableTilesOffScreen:
; This is used to copy the link cable tiles off screen so that the cable ; This is used to copy the link cable tiles off screen so that the cable
; continues when the screen is scrolled. ; continues when the screen is scrolled.
push hl push hl
coord hl, 0, 4 hlcoord 0, 4
call CopyToRedrawRowOrColumnSrcTiles call CopyToRedrawRowOrColumnSrcTiles
pop hl pop hl
ld a, h ld a, h
@ -735,7 +735,7 @@ Trade_LoadMonSprite:
xor $1 xor $1
ldh [hAutoBGTransferEnabled], a ldh [hAutoBGTransferEnabled], a
call GetMonHeader call GetMonHeader
coord hl, 7, 2 hlcoord 7, 2
call LoadFlippedFrontSpriteByMonIndex call LoadFlippedFrontSpriteByMonIndex
ld c, 10 ld c, 10
jp DelayFrames jp DelayFrames

View file

@ -1,43 +1,43 @@
Trade_PrintPlayerMonInfoText: Trade_PrintPlayerMonInfoText:
coord hl, 5, 0 hlcoord 5, 0
ld de, Trade_MonInfoText ld de, Trade_MonInfoText
call PlaceString call PlaceString
ld a, [wTradedPlayerMonSpecies] ld a, [wTradedPlayerMonSpecies]
ld [wd11e], a ld [wd11e], a
predef IndexToPokedex predef IndexToPokedex
coord hl, 9, 0 hlcoord 9, 0
ld de, wd11e ld de, wd11e
lb bc, LEADING_ZEROES | 1, 3 lb bc, LEADING_ZEROES | 1, 3
call PrintNumber call PrintNumber
coord hl, 5, 2 hlcoord 5, 2
ld de, wcf4b ld de, wcf4b
call PlaceString call PlaceString
coord hl, 8, 4 hlcoord 8, 4
ld de, wTradedPlayerMonOT ld de, wTradedPlayerMonOT
call PlaceString call PlaceString
coord hl, 8, 6 hlcoord 8, 6
ld de, wTradedPlayerMonOTID ld de, wTradedPlayerMonOTID
lb bc, LEADING_ZEROES | 2, 5 lb bc, LEADING_ZEROES | 2, 5
jp PrintNumber jp PrintNumber
Trade_PrintEnemyMonInfoText: Trade_PrintEnemyMonInfoText:
coord hl, 5, 10 hlcoord 5, 10
ld de, Trade_MonInfoText ld de, Trade_MonInfoText
call PlaceString call PlaceString
ld a, [wTradedEnemyMonSpecies] ld a, [wTradedEnemyMonSpecies]
ld [wd11e], a ld [wd11e], a
predef IndexToPokedex predef IndexToPokedex
coord hl, 9, 10 hlcoord 9, 10
ld de, wd11e ld de, wd11e
lb bc, LEADING_ZEROES | 1, 3 lb bc, LEADING_ZEROES | 1, 3
call PrintNumber call PrintNumber
coord hl, 5, 12 hlcoord 5, 12
ld de, wcd6d ld de, wcd6d
call PlaceString call PlaceString
coord hl, 8, 14 hlcoord 8, 14
ld de, wTradedEnemyMonOT ld de, wTradedEnemyMonOT
call PlaceString call PlaceString
coord hl, 8, 16 hlcoord 8, 16
ld de, wTradedEnemyMonOTID ld de, wTradedEnemyMonOTID
lb bc, LEADING_ZEROES | 2, 5 lb bc, LEADING_ZEROES | 2, 5
jp PrintNumber jp PrintNumber

View file

@ -11,7 +11,7 @@ IsPlayerStandingOnDoorTile:
ld a, [hli] ld a, [hli]
ld h, [hl] ld h, [hl]
ld l, a ld l, a
aCoord 8, 9 ; a = lower left background tile under player's sprite lda_coord 8, 9 ; a = lower left background tile under player's sprite
ld b, a ld b, a
.loop .loop
ld a, [hli] ld a, [hli]

View file

@ -8,7 +8,7 @@ HandleLedges::
predef GetTileAndCoordsInFrontOfPlayer predef GetTileAndCoordsInFrontOfPlayer
ld a, [wSpritePlayerStateData1FacingDirection] ld a, [wSpritePlayerStateData1FacingDirection]
ld b, a ld b, a
aCoord 8, 9 lda_coord 8, 9
ld c, a ld c, a
ld a, [wTileInFrontOfPlayer] ld a, [wTileInFrontOfPlayer]
ld d, a ld d, a

View file

@ -13,7 +13,7 @@ UpdatePlayerSprite:
; background tile the sprite is standing on is greater than $5F, which is ; background tile the sprite is standing on is greater than $5F, which is
; the maximum number for map tiles ; the maximum number for map tiles
.checkIfTextBoxInFrontOfSprite .checkIfTextBoxInFrontOfSprite
aCoord 8, 9 lda_coord 8, 9
ldh [hTilePlayerStandingOn], a ldh [hTilePlayerStandingOn], a
cp MAP_TILESET_SIZE cp MAP_TILESET_SIZE
jr c, .lowerLeftTileIsMapTile jr c, .lowerLeftTileIsMapTile
@ -709,7 +709,7 @@ GetTileSpriteStandsOn:
add SCREEN_WIDTH ; screen X tile + 20 add SCREEN_WIDTH ; screen X tile + 20
ld d, $0 ld d, $0
ld e, a ld e, a
coord hl, 0, 0 hlcoord 0, 0
add hl, bc add hl, bc
add hl, bc add hl, bc
add hl, bc add hl, bc

View file

@ -358,7 +358,7 @@ IsPlayerStandingOnWarpPadOrHole::
jr z, .done jr z, .done
cp c cp c
jr nz, .nextEntry jr nz, .nextEntry
aCoord 8, 9 lda_coord 8, 9
cp [hl] cp [hl]
jr z, .foundMatch jr z, .foundMatch
.nextEntry .nextEntry

View file

@ -204,7 +204,7 @@ IsPlayerStandingOnDoorTileOrWarpTile::
ld h, [hl] ld h, [hl]
ld l, a ld l, a
ld de, $1 ld de, $1
aCoord 8, 9 lda_coord 8, 9
call IsInArray call IsInArray
jr nc, .done jr nc, .done
ld hl, wd736 ld hl, wd736
@ -223,28 +223,28 @@ PrintSafariZoneSteps::
ret c ret c
cp CERULEAN_CAVE_2F cp CERULEAN_CAVE_2F
ret nc ret nc
coord hl, 0, 0 hlcoord 0, 0
ld b, 3 ld b, 3
ld c, 7 ld c, 7
call TextBoxBorder call TextBoxBorder
coord hl, 1, 1 hlcoord 1, 1
ld de, wSafariSteps ld de, wSafariSteps
lb bc, 2, 3 lb bc, 2, 3
call PrintNumber call PrintNumber
coord hl, 4, 1 hlcoord 4, 1
ld de, SafariSteps ld de, SafariSteps
call PlaceString call PlaceString
coord hl, 1, 3 hlcoord 1, 3
ld de, SafariBallText ld de, SafariBallText
call PlaceString call PlaceString
ld a, [wNumSafariBalls] ld a, [wNumSafariBalls]
cp 10 cp 10
jr nc, .asm_c56d jr nc, .asm_c56d
coord hl, 5, 3 hlcoord 5, 3
ld a, " " ld a, " "
ld [hl], a ld [hl], a
.asm_c56d .asm_c56d
coord hl, 6, 3 hlcoord 6, 3
ld de, wNumSafariBalls ld de, wNumSafariBalls
lb bc, 1, 2 lb bc, 1, 2
jp PrintNumber jp PrintNumber
@ -267,28 +267,28 @@ _GetTileAndCoordsInFrontOfPlayer:
and a ; cp SPRITE_FACING_DOWN and a ; cp SPRITE_FACING_DOWN
jr nz, .notFacingDown jr nz, .notFacingDown
; facing down ; facing down
aCoord 8, 11 lda_coord 8, 11
inc d inc d
jr .storeTile jr .storeTile
.notFacingDown .notFacingDown
cp SPRITE_FACING_UP cp SPRITE_FACING_UP
jr nz, .notFacingUp jr nz, .notFacingUp
; facing up ; facing up
aCoord 8, 7 lda_coord 8, 7
dec d dec d
jr .storeTile jr .storeTile
.notFacingUp .notFacingUp
cp SPRITE_FACING_LEFT cp SPRITE_FACING_LEFT
jr nz, .notFacingLeft jr nz, .notFacingLeft
; facing left ; facing left
aCoord 6, 9 lda_coord 6, 9
dec e dec e
jr .storeTile jr .storeTile
.notFacingLeft .notFacingLeft
cp SPRITE_FACING_RIGHT cp SPRITE_FACING_RIGHT
jr nz, .storeTile jr nz, .storeTile
; facing right ; facing right
aCoord 10, 9 lda_coord 10, 9
inc e inc e
.storeTile .storeTile
ld c, a ld c, a
@ -308,7 +308,7 @@ GetTileTwoStepsInFrontOfPlayer:
; facing down ; facing down
ld hl, hPlayerFacing ld hl, hPlayerFacing
set 0, [hl] set 0, [hl]
aCoord 8, 13 lda_coord 8, 13
inc d inc d
jr .storeTile jr .storeTile
.notFacingDown .notFacingDown
@ -317,7 +317,7 @@ GetTileTwoStepsInFrontOfPlayer:
; facing up ; facing up
ld hl, hPlayerFacing ld hl, hPlayerFacing
set 1, [hl] set 1, [hl]
aCoord 8, 5 lda_coord 8, 5
dec d dec d
jr .storeTile jr .storeTile
.notFacingUp .notFacingUp
@ -326,7 +326,7 @@ GetTileTwoStepsInFrontOfPlayer:
; facing left ; facing left
ld hl, hPlayerFacing ld hl, hPlayerFacing
set 2, [hl] set 2, [hl]
aCoord 4, 9 lda_coord 4, 9
dec e dec e
jr .storeTile jr .storeTile
.notFacingLeft .notFacingLeft
@ -335,7 +335,7 @@ GetTileTwoStepsInFrontOfPlayer:
; facing right ; facing right
ld hl, hPlayerFacing ld hl, hPlayerFacing
set 3, [hl] set 3, [hl]
aCoord 12, 9 lda_coord 12, 9
inc e inc e
.storeTile .storeTile
ld c, a ld c, a

View file

@ -10,17 +10,17 @@ DisplayPCMainMenu::
ld a, [wNumHoFTeams] ld a, [wNumHoFTeams]
and a and a
jr nz, .leaguePCAvailable jr nz, .leaguePCAvailable
coord hl, 0, 0 hlcoord 0, 0
ld b, 8 ld b, 8
ld c, 14 ld c, 14
jr .next jr .next
.noOaksPC .noOaksPC
coord hl, 0, 0 hlcoord 0, 0
ld b, 6 ld b, 6
ld c, 14 ld c, 14
jr .next jr .next
.leaguePCAvailable .leaguePCAvailable
coord hl, 0, 0 hlcoord 0, 0
ld b, 10 ld b, 10
ld c, 14 ld c, 14
.next .next
@ -30,15 +30,15 @@ DisplayPCMainMenu::
ld [wMaxMenuItem], a ld [wMaxMenuItem], a
CheckEvent EVENT_MET_BILL CheckEvent EVENT_MET_BILL
jr nz, .metBill jr nz, .metBill
coord hl, 2, 2 hlcoord 2, 2
ld de, SomeonesPCText ld de, SomeonesPCText
jr .next2 jr .next2
.metBill .metBill
coord hl, 2, 2 hlcoord 2, 2
ld de, BillsPCText ld de, BillsPCText
.next2 .next2
call PlaceString call PlaceString
coord hl, 2, 4 hlcoord 2, 4
ld de, wPlayerName ld de, wPlayerName
call PlaceString call PlaceString
ld l, c ld l, c
@ -47,7 +47,7 @@ DisplayPCMainMenu::
call PlaceString call PlaceString
CheckEvent EVENT_GOT_POKEDEX CheckEvent EVENT_GOT_POKEDEX
jr z, .noOaksPC2 jr z, .noOaksPC2
coord hl, 2, 6 hlcoord 2, 6
ld de, OaksPCText ld de, OaksPCText
call PlaceString call PlaceString
ld a, [wNumHoFTeams] ld a, [wNumHoFTeams]
@ -55,20 +55,20 @@ DisplayPCMainMenu::
jr z, .noLeaguePC jr z, .noLeaguePC
ld a, 4 ld a, 4
ld [wMaxMenuItem], a ld [wMaxMenuItem], a
coord hl, 2, 8 hlcoord 2, 8
ld de, PKMNLeaguePCText ld de, PKMNLeaguePCText
call PlaceString call PlaceString
coord hl, 2, 10 hlcoord 2, 10
ld de, LogOffPCText ld de, LogOffPCText
jr .next3 jr .next3
.noLeaguePC .noLeaguePC
coord hl, 2, 8 hlcoord 2, 8
ld de, LogOffPCText ld de, LogOffPCText
jr .next3 jr .next3
.noOaksPC2 .noOaksPC2
ld a, $2 ld a, $2
ld [wMaxMenuItem], a ld [wMaxMenuItem], a
coord hl, 2, 6 hlcoord 2, 6
ld de, LogOffPCText ld de, LogOffPCText
.next3 .next3
call PlaceString call PlaceString
@ -119,11 +119,11 @@ BillsPCMenu:
lb bc, BANK(PokeballTileGraphics), $01 lb bc, BANK(PokeballTileGraphics), $01
call CopyVideoData call CopyVideoData
call LoadScreenTilesFromBuffer2DisableBGTransfer call LoadScreenTilesFromBuffer2DisableBGTransfer
coord hl, 0, 0 hlcoord 0, 0
ld b, 10 ld b, 10
ld c, 12 ld c, 12
call TextBoxBorder call TextBoxBorder
coord hl, 2, 2 hlcoord 2, 2
ld de, BillsPCMenuText ld de, BillsPCMenuText
call PlaceString call PlaceString
ld hl, wTopMenuItemY ld hl, wTopMenuItemY
@ -146,7 +146,7 @@ BillsPCMenu:
ld [wPlayerMonNumber], a ld [wPlayerMonNumber], a
ld hl, WhatText ld hl, WhatText
call PrintText call PrintText
coord hl, 9, 14 hlcoord 9, 14
ld b, 2 ld b, 2
ld c, 9 ld c, 9
call TextBoxBorder call TextBoxBorder
@ -156,15 +156,15 @@ BillsPCMenu:
jr c, .singleDigitBoxNum jr c, .singleDigitBoxNum
; two digit box num ; two digit box num
sub 9 sub 9
coord hl, 17, 16 hlcoord 17, 16
ld [hl], "1" ld [hl], "1"
add "0" add "0"
jr .next jr .next
.singleDigitBoxNum .singleDigitBoxNum
add "1" add "1"
.next .next
Coorda 18, 16 ldcoord_a 18, 16
coord hl, 10, 16 hlcoord 10, 16
ld de, BoxNoPCText ld de, BoxNoPCText
call PlaceString call PlaceString
ld a, 1 ld a, 1
@ -380,7 +380,7 @@ HMMoveArray:
INCLUDE "data/moves/hm_moves.asm" INCLUDE "data/moves/hm_moves.asm"
DisplayDepositWithdrawMenu: DisplayDepositWithdrawMenu:
coord hl, 9, 10 hlcoord 9, 10
ld b, 6 ld b, 6
ld c, 9 ld c, 9
call TextBoxBorder call TextBoxBorder
@ -390,9 +390,9 @@ DisplayDepositWithdrawMenu:
jr nz, .next jr nz, .next
ld de, WithdrawPCText ld de, WithdrawPCText
.next .next
coord hl, 11, 12 hlcoord 11, 12
call PlaceString call PlaceString
coord hl, 11, 14 hlcoord 11, 14
ld de, StatsCancelPCText ld de, StatsCancelPCText
call PlaceString call PlaceString
ld hl, wTopMenuItemY ld hl, wTopMenuItemY

View file

@ -121,7 +121,7 @@ Evolution_PartyMonLoop: ; loop over party mons
call DelayFrames call DelayFrames
xor a xor a
ldh [hAutoBGTransferEnabled], a ldh [hAutoBGTransferEnabled], a
coord hl, 0, 0 hlcoord 0, 0
lb bc, 12, 20 lb bc, 12, 20
call ClearScreenArea call ClearScreenArea
ld a, $1 ld a, $1

View file

@ -76,7 +76,7 @@ DontAbandonLearning:
AbandonLearning: AbandonLearning:
ld hl, AbandonLearningText ld hl, AbandonLearningText
call PrintText call PrintText
coord hl, 14, 7 hlcoord 14, 7
lb bc, 8, 15 lb bc, 8, 15
ld a, TWO_OPTION_MENU ld a, TWO_OPTION_MENU
ld [wTextBoxID], a ld [wTextBoxID], a
@ -99,7 +99,7 @@ TryingToLearn:
push hl push hl
ld hl, TryingToLearnText ld hl, TryingToLearnText
call PrintText call PrintText
coord hl, 14, 7 hlcoord 14, 7
lb bc, 8, 15 lb bc, 8, 15
ld a, TWO_OPTION_MENU ld a, TWO_OPTION_MENU
ld [wTextBoxID], a ld [wTextBoxID], a
@ -120,11 +120,11 @@ TryingToLearn:
push hl push hl
ld hl, WhichMoveToForgetText ld hl, WhichMoveToForgetText
call PrintText call PrintText
coord hl, 4, 7 hlcoord 4, 7
ld b, 4 ld b, 4
ld c, 14 ld c, 14
call TextBoxBorder call TextBoxBorder
coord hl, 6, 8 hlcoord 6, 8
ld de, wMovesString ld de, wMovesString
ldh a, [hFlagsFFF6] ldh a, [hFlagsFFF6]
set 2, a set 2, a

View file

@ -105,7 +105,7 @@ StatusScreen:
push af push af
xor a xor a
ldh [hTilesetType], a ldh [hTilesetType], a
coord hl, 19, 1 hlcoord 19, 1
lb bc, 6, 10 lb bc, 6, 10
call DrawLineBox ; Draws the box around name, HP and status call DrawLineBox ; Draws the box around name, HP and status
ld de, -6 ld de, -6
@ -113,54 +113,54 @@ StatusScreen:
ld [hl], "<DOT>" ld [hl], "<DOT>"
dec hl dec hl
ld [hl], "№" ld [hl], "№"
coord hl, 19, 9 hlcoord 19, 9
lb bc, 8, 6 lb bc, 8, 6
call DrawLineBox ; Draws the box around types, ID No. and OT call DrawLineBox ; Draws the box around types, ID No. and OT
coord hl, 10, 9 hlcoord 10, 9
ld de, Type1Text ld de, Type1Text
call PlaceString ; "TYPE1/" call PlaceString ; "TYPE1/"
coord hl, 11, 3 hlcoord 11, 3
predef DrawHP predef DrawHP
ld hl, wStatusScreenHPBarColor ld hl, wStatusScreenHPBarColor
call GetHealthBarColor call GetHealthBarColor
ld b, SET_PAL_STATUS_SCREEN ld b, SET_PAL_STATUS_SCREEN
call RunPaletteCommand call RunPaletteCommand
coord hl, 16, 6 hlcoord 16, 6
ld de, wLoadedMonStatus ld de, wLoadedMonStatus
call PrintStatusCondition call PrintStatusCondition
jr nz, .StatusWritten jr nz, .StatusWritten
coord hl, 16, 6 hlcoord 16, 6
ld de, OKText ld de, OKText
call PlaceString ; "OK" call PlaceString ; "OK"
.StatusWritten .StatusWritten
coord hl, 9, 6 hlcoord 9, 6
ld de, StatusText ld de, StatusText
call PlaceString ; "STATUS/" call PlaceString ; "STATUS/"
coord hl, 14, 2 hlcoord 14, 2
call PrintLevel ; Pokémon level call PrintLevel ; Pokémon level
ld a, [wMonHIndex] ld a, [wMonHIndex]
ld [wd11e], a ld [wd11e], a
ld [wd0b5], a ld [wd0b5], a
predef IndexToPokedex predef IndexToPokedex
coord hl, 3, 7 hlcoord 3, 7
ld de, wd11e ld de, wd11e
lb bc, LEADING_ZEROES | 1, 3 lb bc, LEADING_ZEROES | 1, 3
call PrintNumber ; Pokémon no. call PrintNumber ; Pokémon no.
coord hl, 11, 10 hlcoord 11, 10
predef PrintMonType predef PrintMonType
ld hl, NamePointers2 ld hl, NamePointers2
call .GetStringPointer call .GetStringPointer
ld d, h ld d, h
ld e, l ld e, l
coord hl, 9, 1 hlcoord 9, 1
call PlaceString ; Pokémon name call PlaceString ; Pokémon name
ld hl, OTPointers ld hl, OTPointers
call .GetStringPointer call .GetStringPointer
ld d, h ld d, h
ld e, l ld e, l
coord hl, 12, 16 hlcoord 12, 16
call PlaceString ; OT call PlaceString ; OT
coord hl, 12, 14 hlcoord 12, 14
ld de, wLoadedMonOTID ld de, wLoadedMonOTID
lb bc, LEADING_ZEROES | 2, 5 lb bc, LEADING_ZEROES | 2, 5
call PrintNumber ; ID Number call PrintNumber ; ID Number
@ -168,7 +168,7 @@ StatusScreen:
call PrintStatsBox call PrintStatsBox
call Delay3 call Delay3
call GBPalNormal call GBPalNormal
coord hl, 1, 0 hlcoord 1, 0
call LoadFlippedFrontSpriteByMonIndex ; draw Pokémon picture call LoadFlippedFrontSpriteByMonIndex ; draw Pokémon picture
ld a, [wcf91] ld a, [wcf91]
call PlayCry ; play Pokémon cry call PlayCry ; play Pokémon cry
@ -252,19 +252,19 @@ PrintStatsBox:
ld a, d ld a, d
and a ; a is 0 from the status screen and a ; a is 0 from the status screen
jr nz, .DifferentBox jr nz, .DifferentBox
coord hl, 0, 8 hlcoord 0, 8
ld b, 8 ld b, 8
ld c, 8 ld c, 8
call TextBoxBorder ; Draws the box call TextBoxBorder ; Draws the box
coord hl, 1, 9 ; Start printing stats from here hlcoord 1, 9 ; Start printing stats from here
ld bc, $19 ; Number offset ld bc, $19 ; Number offset
jr .PrintStats jr .PrintStats
.DifferentBox .DifferentBox
coord hl, 9, 2 hlcoord 9, 2
ld b, 8 ld b, 8
ld c, 9 ld c, 9
call TextBoxBorder call TextBoxBorder
coord hl, 11, 3 hlcoord 11, 3
ld bc, $18 ld bc, $18
.PrintStats .PrintStats
push bc push bc
@ -311,16 +311,16 @@ StatusScreen2:
ld bc, NUM_MOVES ld bc, NUM_MOVES
call CopyData call CopyData
callfar FormatMovesString callfar FormatMovesString
coord hl, 9, 2 hlcoord 9, 2
lb bc, 5, 10 lb bc, 5, 10
call ClearScreenArea ; Clear under name call ClearScreenArea ; Clear under name
coord hl, 19, 3 hlcoord 19, 3
ld [hl], $78 ld [hl], $78
coord hl, 0, 8 hlcoord 0, 8
ld b, 8 ld b, 8
ld c, 18 ld c, 18
call TextBoxBorder ; Draw move container call TextBoxBorder ; Draw move container
coord hl, 2, 9 hlcoord 2, 9
ld de, wMovesString ld de, wMovesString
call PlaceString ; Print moves call PlaceString ; Print moves
ld a, [wNumMovesMinusOne] ld a, [wNumMovesMinusOne]
@ -329,7 +329,7 @@ StatusScreen2:
ld a, $4 ld a, $4
sub c sub c
ld b, a ; Number of moves ? ld b, a ; Number of moves ?
coord hl, 11, 10 hlcoord 11, 10
ld de, SCREEN_WIDTH * 2 ld de, SCREEN_WIDTH * 2
ld a, "<BOLD_P>" ld a, "<BOLD_P>"
call StatusScreen_PrintPP ; Print "PP" call StatusScreen_PrintPP ; Print "PP"
@ -341,7 +341,7 @@ StatusScreen2:
call StatusScreen_PrintPP ; Fill the rest with -- call StatusScreen_PrintPP ; Fill the rest with --
.InitPP .InitPP
ld hl, wLoadedMonMoves ld hl, wLoadedMonMoves
coord de, 14, 10 decoord 14, 10
ld b, 0 ld b, 0
.PrintPP .PrintPP
ld a, [hli] ld a, [hli]
@ -391,7 +391,7 @@ StatusScreen2:
cp $4 cp $4
jr nz, .PrintPP jr nz, .PrintPP
.PPDone .PPDone
coord hl, 9, 3 hlcoord 9, 3
ld de, StatusScreenExpText ld de, StatusScreenExpText
call PlaceString call PlaceString
ld a, [wLoadedMonLevel] ld a, [wLoadedMonLevel]
@ -401,7 +401,7 @@ StatusScreen2:
inc a inc a
ld [wLoadedMonLevel], a ; Increase temporarily if not 100 ld [wLoadedMonLevel], a ; Increase temporarily if not 100
.Level100 .Level100
coord hl, 14, 6 hlcoord 14, 6
ld [hl], "<to>" ld [hl], "<to>"
inc hl inc hl
inc hl inc hl
@ -409,22 +409,22 @@ StatusScreen2:
pop af pop af
ld [wLoadedMonLevel], a ld [wLoadedMonLevel], a
ld de, wLoadedMonExp ld de, wLoadedMonExp
coord hl, 12, 4 hlcoord 12, 4
lb bc, 3, 7 lb bc, 3, 7
call PrintNumber ; exp call PrintNumber ; exp
call CalcExpToLevelUp call CalcExpToLevelUp
ld de, wLoadedMonExp ld de, wLoadedMonExp
coord hl, 7, 6 hlcoord 7, 6
lb bc, 3, 7 lb bc, 3, 7
call PrintNumber ; exp needed to level up call PrintNumber ; exp needed to level up
coord hl, 9, 0 hlcoord 9, 0
call StatusScreen_ClearName call StatusScreen_ClearName
coord hl, 9, 1 hlcoord 9, 1
call StatusScreen_ClearName call StatusScreen_ClearName
ld a, [wMonHIndex] ld a, [wMonHIndex]
ld [wd11e], a ld [wd11e], a
call GetMonName call GetMonName
coord hl, 9, 1 hlcoord 9, 1
call PlaceString call PlaceString
ld a, $1 ld a, $1
ldh [hAutoBGTransferEnabled], a ldh [hAutoBGTransferEnabled], a

View file

@ -79,11 +79,11 @@ MainSlotMachineLoop:
ld [wCurrentMenuItem], a ld [wCurrentMenuItem], a
ld [wLastMenuItem], a ld [wLastMenuItem], a
ld [wMenuWatchMovingOutOfBounds], a ld [wMenuWatchMovingOutOfBounds], a
coord hl, 14, 11 hlcoord 14, 11
ld b, 5 ld b, 5
ld c, 4 ld c, 4
call TextBoxBorder call TextBoxBorder
coord hl, 16, 12 hlcoord 16, 12
ld de, CoinMultiplierSlotMachineText ld de, CoinMultiplierSlotMachineText
call PlaceString call PlaceString
call HandleMenuInput call HandleMenuInput
@ -133,7 +133,7 @@ MainSlotMachineLoop:
.skip2 .skip2
ld hl, OneMoreGoSlotMachineText ld hl, OneMoreGoSlotMachineText
call PrintText call PrintText
coord hl, 14, 12 hlcoord 14, 12
lb bc, 13, 15 lb bc, 13, 15
xor a ; YES_NO_MENU xor a ; YES_NO_MENU
ld [wTwoOptionMenuID], a ld [wTwoOptionMenuID], a
@ -615,7 +615,7 @@ YeahText:
SlotMachine_PrintWinningSymbol: SlotMachine_PrintWinningSymbol:
; prints winning symbol and down arrow in text box ; prints winning symbol and down arrow in text box
coord hl, 2, 14 hlcoord 2, 14
ld a, [wSlotMachineWinningSymbol] ld a, [wSlotMachineWinningSymbol]
add $25 add $25
ld [hli], a ld [hli], a
@ -627,7 +627,7 @@ SlotMachine_PrintWinningSymbol:
ld [hli], a ld [hli], a
inc a inc a
ld [hl], a ld [hl], a
coord hl, 18, 16 hlcoord 18, 16
ld [hl], "▼" ld [hl], "▼"
ret ret
@ -642,13 +642,13 @@ SlotMachine_SubtractBetFromPlayerCoins:
predef SubBCDPredef predef SubBCDPredef
SlotMachine_PrintCreditCoins: SlotMachine_PrintCreditCoins:
coord hl, 5, 1 hlcoord 5, 1
ld de, wPlayerCoins ld de, wPlayerCoins
ld c, $2 ld c, $2
jp PrintBCDNumber jp PrintBCDNumber
SlotMachine_PrintPayoutCoins: SlotMachine_PrintPayoutCoins:
coord hl, 11, 1 hlcoord 11, 1
ld de, wPayoutCoins ld de, wPayoutCoins
lb bc, LEADING_ZEROES | 2, 4 ; 2 bytes, 4 digits lb bc, LEADING_ZEROES | 2, 4 ; 2 bytes, 4 digits
jp PrintNumber jp PrintNumber
@ -725,19 +725,19 @@ SlotMachine_LightBalls:
jr z, SlotMachine_UpdateTwoCoinBallTiles jr z, SlotMachine_UpdateTwoCoinBallTiles
SlotMachine_UpdateThreeCoinBallTiles: SlotMachine_UpdateThreeCoinBallTiles:
coord hl, 3, 2 hlcoord 3, 2
call SlotMachine_UpdateBallTiles call SlotMachine_UpdateBallTiles
coord hl, 3, 10 hlcoord 3, 10
call SlotMachine_UpdateBallTiles call SlotMachine_UpdateBallTiles
SlotMachine_UpdateTwoCoinBallTiles: SlotMachine_UpdateTwoCoinBallTiles:
coord hl, 3, 4 hlcoord 3, 4
call SlotMachine_UpdateBallTiles call SlotMachine_UpdateBallTiles
coord hl, 3, 8 hlcoord 3, 8
call SlotMachine_UpdateBallTiles call SlotMachine_UpdateBallTiles
SlotMachine_UpdateOneCoinBallTiles: SlotMachine_UpdateOneCoinBallTiles:
coord hl, 3, 6 hlcoord 3, 6
SlotMachine_UpdateBallTiles: SlotMachine_UpdateBallTiles:
ld a, [wNewSlotMachineBallTile] ld a, [wNewSlotMachineBallTile]
@ -864,7 +864,7 @@ LoadSlotMachineTiles:
ld a, BANK(SlotMachineTiles2) ld a, BANK(SlotMachineTiles2)
call FarCopyData2 call FarCopyData2
ld hl, SlotMachineMap ld hl, SlotMachineMap
coord de, 0, 0 decoord 0, 0
ld bc, SlotMachineMapEnd - SlotMachineMap ld bc, SlotMachineMapEnd - SlotMachineMap
call CopyData call CopyData
call EnableLCD call EnableLCD

View file

@ -869,7 +869,7 @@ UncompressSpriteFromDE::
jp UncompressSpriteData jp UncompressSpriteData
SaveScreenTilesToBuffer2:: SaveScreenTilesToBuffer2::
coord hl, 0, 0 hlcoord 0, 0
ld de, wTileMapBackup2 ld de, wTileMapBackup2
ld bc, SCREEN_WIDTH * SCREEN_HEIGHT ld bc, SCREEN_WIDTH * SCREEN_HEIGHT
call CopyData call CopyData
@ -886,13 +886,13 @@ LoadScreenTilesFromBuffer2DisableBGTransfer::
xor a xor a
ldh [hAutoBGTransferEnabled], a ldh [hAutoBGTransferEnabled], a
ld hl, wTileMapBackup2 ld hl, wTileMapBackup2
coord de, 0, 0 decoord 0, 0
ld bc, SCREEN_WIDTH * SCREEN_HEIGHT ld bc, SCREEN_WIDTH * SCREEN_HEIGHT
call CopyData call CopyData
ret ret
SaveScreenTilesToBuffer1:: SaveScreenTilesToBuffer1::
coord hl, 0, 0 hlcoord 0, 0
ld de, wTileMapBackup ld de, wTileMapBackup
ld bc, SCREEN_WIDTH * SCREEN_HEIGHT ld bc, SCREEN_WIDTH * SCREEN_HEIGHT
jp CopyData jp CopyData
@ -901,7 +901,7 @@ LoadScreenTilesFromBuffer1::
xor a xor a
ldh [hAutoBGTransferEnabled], a ldh [hAutoBGTransferEnabled], a
ld hl, wTileMapBackup ld hl, wTileMapBackup
coord de, 0, 0 decoord 0, 0
ld bc, SCREEN_WIDTH * SCREEN_HEIGHT ld bc, SCREEN_WIDTH * SCREEN_HEIGHT
call CopyData call CopyData
ld a, 1 ld a, 1
@ -1071,7 +1071,7 @@ WaitForTextScrollButtonPress::
jr z, .skipAnimation jr z, .skipAnimation
call TownMapSpriteBlinkingAnimation call TownMapSpriteBlinkingAnimation
.skipAnimation .skipAnimation
coord hl, 18, 16 hlcoord 18, 16
call HandleDownArrowBlinkTiming call HandleDownArrowBlinkTiming
pop hl pop hl
call JoypadLowSensitivity call JoypadLowSensitivity
@ -1304,7 +1304,7 @@ HandleMenuInput_::
and a ; was a key pressed? and a ; was a key pressed?
jr nz, .keyPressed jr nz, .keyPressed
push hl push hl
coord hl, 18, 11 ; coordinates of blinking down arrow in some menus hlcoord 18, 11 ; coordinates of blinking down arrow in some menus
call HandleDownArrowBlinkTiming ; blink down arrow (if any) call HandleDownArrowBlinkTiming ; blink down arrow (if any)
pop hl pop hl
ld a, [wMenuJoypadPollCount] ld a, [wMenuJoypadPollCount]
@ -1395,7 +1395,7 @@ PlaceMenuCursor::
ld a, [wTopMenuItemY] ld a, [wTopMenuItemY]
and a ; is the y coordinate 0? and a ; is the y coordinate 0?
jr z, .adjustForXCoord jr z, .adjustForXCoord
coord hl, 0, 0 hlcoord 0, 0
ld bc, SCREEN_WIDTH ld bc, SCREEN_WIDTH
.topMenuItemLoop .topMenuItemLoop
add hl, bc add hl, bc
@ -1565,7 +1565,7 @@ PrintText::
call Delay3 call Delay3
pop hl pop hl
PrintText_NoCreatingTextBox:: PrintText_NoCreatingTextBox::
coord bc, 1, 14 bccoord 1, 14
jp TextCommandProcessor jp TextCommandProcessor
INCLUDE "home/print_num.asm" INCLUDE "home/print_num.asm"

View file

@ -184,17 +184,17 @@ CopyScreenTileBufferToVRAM::
ld c, 6 ld c, 6
ld hl, $600 * 0 ld hl, $600 * 0
coord de, 0, 6 * 0 decoord 0, 6 * 0
call .setup call .setup
call DelayFrame call DelayFrame
ld hl, $600 * 1 ld hl, $600 * 1
coord de, 0, 6 * 1 decoord 0, 6 * 1
call .setup call .setup
call DelayFrame call DelayFrame
ld hl, $600 * 2 ld hl, $600 * 2
coord de, 0, 6 * 2 decoord 0, 6 * 2
call .setup call .setup
jp DelayFrame jp DelayFrame
@ -217,7 +217,7 @@ ClearScreen::
; for the bg map to update. ; for the bg map to update.
ld bc, 20 * 18 ld bc, 20 * 18
inc b inc b
coord hl, 0, 0 hlcoord 0, 0
ld a, " " ld a, " "
.loop .loop
ld [hli], a ld [hli], a

View file

@ -31,7 +31,7 @@ DisplayListMenuID::
call DisplayTextBoxID ; draw the menu text box call DisplayTextBoxID ; draw the menu text box
call UpdateSprites ; disable sprites behind the text box call UpdateSprites ; disable sprites behind the text box
; the code up to .skipMovingSprites appears to be useless ; the code up to .skipMovingSprites appears to be useless
coord hl, 4, 2 ; coordinates of upper left corner of menu text box hlcoord 4, 2 ; coordinates of upper left corner of menu text box
lb de, 9, 14 ; height and width of menu text box lb de, 9, 14 ; height and width of menu text box
ld a, [wListMenuID] ld a, [wListMenuID]
and a ; is it a PC pokemon list? and a ; is it a PC pokemon list?
@ -67,12 +67,12 @@ DisplayListMenuIDLoop::
jr z, .notOldManBattle jr z, .notOldManBattle
.oldManBattle .oldManBattle
ld a, "▶" ld a, "▶"
Coorda 5, 4 ; place menu cursor in front of first menu entry ldcoord_a 5, 4 ; place menu cursor in front of first menu entry
ld c, 80 ld c, 80
call DelayFrames call DelayFrames
xor a xor a
ld [wCurrentMenuItem], a ld [wCurrentMenuItem], a
coord hl, 5, 4 hlcoord 5, 4
ld a, l ld a, l
ld [wMenuCursorLocation], a ld [wMenuCursorLocation], a
ld a, h ld a, h
@ -194,23 +194,23 @@ DisplayListMenuIDLoop::
DisplayChooseQuantityMenu:: DisplayChooseQuantityMenu::
; text box dimensions/coordinates for just quantity ; text box dimensions/coordinates for just quantity
coord hl, 15, 9 hlcoord 15, 9
ld b, 1 ; height ld b, 1 ; height
ld c, 3 ; width ld c, 3 ; width
ld a, [wListMenuID] ld a, [wListMenuID]
cp PRICEDITEMLISTMENU cp PRICEDITEMLISTMENU
jr nz, .drawTextBox jr nz, .drawTextBox
; text box dimensions/coordinates for quantity and price ; text box dimensions/coordinates for quantity and price
coord hl, 7, 9 hlcoord 7, 9
ld b, 1 ; height ld b, 1 ; height
ld c, 11 ; width ld c, 11 ; width
.drawTextBox .drawTextBox
call TextBoxBorder call TextBoxBorder
coord hl, 16, 10 hlcoord 16, 10
ld a, [wListMenuID] ld a, [wListMenuID]
cp PRICEDITEMLISTMENU cp PRICEDITEMLISTMENU
jr nz, .printInitialQuantity jr nz, .printInitialQuantity
coord hl, 8, 10 hlcoord 8, 10
.printInitialQuantity .printInitialQuantity
ld de, InitialQuantityText ld de, InitialQuantityText
call PlaceString call PlaceString
@ -250,7 +250,7 @@ DisplayChooseQuantityMenu::
ld a, [wMaxItemQuantity] ld a, [wMaxItemQuantity]
ld [hl], a ld [hl], a
.handleNewQuantity .handleNewQuantity
coord hl, 17, 10 hlcoord 17, 10
ld a, [wListMenuID] ld a, [wListMenuID]
cp PRICEDITEMLISTMENU cp PRICEDITEMLISTMENU
jr nz, .printQuantity jr nz, .printQuantity
@ -289,13 +289,13 @@ DisplayChooseQuantityMenu::
ldh a, [hDivideBCDQuotient + 2] ldh a, [hDivideBCDQuotient + 2]
ldh [hMoney + 2], a ldh [hMoney + 2], a
.skipHalvingPrice .skipHalvingPrice
coord hl, 12, 10 hlcoord 12, 10
ld de, SpacesBetweenQuantityAndPriceText ld de, SpacesBetweenQuantityAndPriceText
call PlaceString call PlaceString
ld de, hMoney ; total price ld de, hMoney ; total price
ld c, $a3 ld c, $a3
call PrintBCDNumber call PrintBCDNumber
coord hl, 9, 10 hlcoord 9, 10
.printQuantity .printQuantity
ld de, wItemQuantity ; current quantity ld de, wItemQuantity ; current quantity
lb bc, LEADING_ZEROES | 1, 2 ; 1 byte, 2 digits lb bc, LEADING_ZEROES | 1, 2 ; 1 byte, 2 digits
@ -334,7 +334,7 @@ ExitListMenu::
ret ret
PrintListMenuEntries:: PrintListMenuEntries::
coord hl, 5, 3 hlcoord 5, 3
ld b, 9 ld b, 9
ld c, 14 ld c, 14
call ClearScreenArea call ClearScreenArea
@ -359,7 +359,7 @@ PrintListMenuEntries::
jr nc, .noCarry jr nc, .noCarry
inc d inc d
.noCarry .noCarry
coord hl, 6, 4 ; coordinates of first list entry name hlcoord 6, 4 ; coordinates of first list entry name
ld b, 4 ; print 4 names ld b, 4 ; print 4 names
.loop .loop
ld a, b ld a, b

View file

@ -103,7 +103,7 @@ OverworldLoopLessDelay::
jr nz, .checkForOpponent jr nz, .checkForOpponent
bit 0, a bit 0, a
jr nz, .checkForOpponent jr nz, .checkForOpponent
aCoord 8, 9 lda_coord 8, 9
ld [wTilePlayerStandingOn], a ; unused? ld [wTilePlayerStandingOn], a ; unused?
call DisplayTextID ; display either the start menu or the NPC/sign text call DisplayTextID ; display either the start menu or the NPC/sign text
ld a, [wEnteringCableClub] ld a, [wEnteringCableClub]
@ -688,7 +688,7 @@ CheckMapConnections::
; function to play a sound when changing maps ; function to play a sound when changing maps
PlayMapChangeSound:: PlayMapChangeSound::
aCoord 8, 8 ; upper left tile of the 4x4 square the player's sprite is standing on lda_coord 8, 8 ; upper left tile of the 4x4 square the player's sprite is standing on
cp $0b ; door tile in tileset 0 cp $0b ; door tile in tileset 0
jr nz, .didNotGoThroughDoor jr nz, .didNotGoThroughDoor
ld a, SFX_GO_INSIDE ld a, SFX_GO_INSIDE
@ -1297,7 +1297,7 @@ CheckForJumpingAndTilePairCollisions::
; if not jumping ; if not jumping
CheckForTilePairCollisions2:: CheckForTilePairCollisions2::
aCoord 8, 9 ; tile the player is on lda_coord 8, 9 ; tile the player is on
ld [wTilePlayerStandingOn], a ld [wTilePlayerStandingOn], a
CheckForTilePairCollisions:: CheckForTilePairCollisions::
@ -1438,7 +1438,7 @@ LoadCurrentMapView::
ld bc, $2 ld bc, $2
add hl, bc add hl, bc
.copyToVisibleAreaBuffer .copyToVisibleAreaBuffer
coord de, 0, 0 ; base address for the tiles that are directly transferred to VRAM during V-blank decoord 0, 0 ; base address for the tiles that are directly transferred to VRAM during V-blank
ld b, SCREEN_HEIGHT ld b, SCREEN_HEIGHT
.rowLoop2 .rowLoop2
ld c, SCREEN_WIDTH ld c, SCREEN_WIDTH
@ -1711,7 +1711,7 @@ MoveTileBlockMapPointerNorth::
; the portion of the map that was newly exposed due to the player's movement ; the portion of the map that was newly exposed due to the player's movement
ScheduleNorthRowRedraw:: ScheduleNorthRowRedraw::
coord hl, 0, 0 hlcoord 0, 0
call CopyToRedrawRowOrColumnSrcTiles call CopyToRedrawRowOrColumnSrcTiles
ld a, [wMapViewVRAMPointer] ld a, [wMapViewVRAMPointer]
ldh [hRedrawRowOrColumnDest], a ldh [hRedrawRowOrColumnDest], a
@ -1733,7 +1733,7 @@ CopyToRedrawRowOrColumnSrcTiles::
ret ret
ScheduleSouthRowRedraw:: ScheduleSouthRowRedraw::
coord hl, 0, 16 hlcoord 0, 16
call CopyToRedrawRowOrColumnSrcTiles call CopyToRedrawRowOrColumnSrcTiles
ld a, [wMapViewVRAMPointer] ld a, [wMapViewVRAMPointer]
ld l, a ld l, a
@ -1752,7 +1752,7 @@ ScheduleSouthRowRedraw::
ret ret
ScheduleEastColumnRedraw:: ScheduleEastColumnRedraw::
coord hl, 18, 0 hlcoord 18, 0
call ScheduleColumnRedrawHelper call ScheduleColumnRedrawHelper
ld a, [wMapViewVRAMPointer] ld a, [wMapViewVRAMPointer]
ld c, a ld c, a
@ -1790,7 +1790,7 @@ ScheduleColumnRedrawHelper::
ret ret
ScheduleWestColumnRedraw:: ScheduleWestColumnRedraw::
coord hl, 0, 0 hlcoord 0, 0
call ScheduleColumnRedrawHelper call ScheduleColumnRedrawHelper
ld a, [wMapViewVRAMPointer] ld a, [wMapViewVRAMPointer]
ldh [hRedrawRowOrColumnDest], a ldh [hRedrawRowOrColumnDest], a
@ -2342,7 +2342,7 @@ LoadMapData::
call LoadTilesetTilePatternData call LoadTilesetTilePatternData
call LoadCurrentMapView call LoadCurrentMapView
; copy current map view to VRAM ; copy current map view to VRAM
coord hl, 0, 0 hlcoord 0, 0
ld de, vBGMap0 ld de, vBGMap0
ld b, 18 ld b, 18
.vramCopyLoop .vramCopyLoop

View file

@ -76,7 +76,7 @@ PlaceNextChar::
cp "<LINE>" cp "<LINE>"
jr nz, .NotLine jr nz, .NotLine
pop hl pop hl
coord hl, 1, 16 hlcoord 1, 16
push hl push hl
jp NextChar jp NextChar
@ -207,12 +207,12 @@ PromptText::
cp LINK_STATE_BATTLING cp LINK_STATE_BATTLING
jp z, .ok jp z, .ok
ld a, "▼" ld a, "▼"
Coorda 18, 16 ldcoord_a 18, 16
.ok .ok
call ProtectedDelay3 call ProtectedDelay3
call ManualTextScroll call ManualTextScroll
ld a, " " ld a, " "
Coorda 18, 16 ldcoord_a 18, 16
DoneText:: DoneText::
pop hl pop hl
@ -226,49 +226,49 @@ DoneText::
Paragraph:: Paragraph::
push de push de
ld a, "▼" ld a, "▼"
Coorda 18, 16 ldcoord_a 18, 16
call ProtectedDelay3 call ProtectedDelay3
call ManualTextScroll call ManualTextScroll
coord hl, 1, 13 hlcoord 1, 13
lb bc, 4, 18 lb bc, 4, 18
call ClearScreenArea call ClearScreenArea
ld c, 20 ld c, 20
call DelayFrames call DelayFrames
pop de pop de
coord hl, 1, 14 hlcoord 1, 14
jp NextChar jp NextChar
PageChar:: PageChar::
push de push de
ld a, "▼" ld a, "▼"
Coorda 18, 16 ldcoord_a 18, 16
call ProtectedDelay3 call ProtectedDelay3
call ManualTextScroll call ManualTextScroll
coord hl, 1, 10 hlcoord 1, 10
lb bc, 7, 18 lb bc, 7, 18
call ClearScreenArea call ClearScreenArea
ld c, 20 ld c, 20
call DelayFrames call DelayFrames
pop de pop de
pop hl pop hl
coord hl, 1, 11 hlcoord 1, 11
push hl push hl
jp NextChar jp NextChar
_ContText:: _ContText::
ld a, "▼" ld a, "▼"
Coorda 18, 16 ldcoord_a 18, 16
call ProtectedDelay3 call ProtectedDelay3
push de push de
call ManualTextScroll call ManualTextScroll
pop de pop de
ld a, " " ld a, " "
Coorda 18, 16 ldcoord_a 18, 16
_ContTextNoPause:: _ContTextNoPause::
push de push de
call ScrollTextUpOneLine call ScrollTextUpOneLine
call ScrollTextUpOneLine call ScrollTextUpOneLine
coord hl, 1, 16 hlcoord 1, 16
pop de pop de
jp NextChar jp NextChar
@ -277,8 +277,8 @@ _ContTextNoPause::
; first time, copy the two rows of text to the "in between" rows that are usually emtpy ; first time, copy the two rows of text to the "in between" rows that are usually emtpy
; second time, copy the bottom row of text into the top row of text ; second time, copy the bottom row of text into the top row of text
ScrollTextUpOneLine:: ScrollTextUpOneLine::
coord hl, 0, 14 ; top row of text hlcoord 0, 14 ; top row of text
coord de, 0, 13 ; empty line above text decoord 0, 13 ; empty line above text
ld b, SCREEN_WIDTH * 3 ld b, SCREEN_WIDTH * 3
.copyText .copyText
ld a, [hli] ld a, [hli]
@ -286,7 +286,7 @@ ScrollTextUpOneLine::
inc de inc de
dec b dec b
jr nz, .copyText jr nz, .copyText
coord hl, 1, 16 hlcoord 1, 16
ld a, " " ld a, " "
ld b, SCREEN_WIDTH - 2 ld b, SCREEN_WIDTH - 2
.clearText .clearText
@ -424,7 +424,7 @@ TextCommand_MOVE::
TextCommand_LOW:: TextCommand_LOW::
; write text at (1,16) ; write text at (1,16)
pop hl pop hl
coord bc, 1, 16 ; second line of dialogue text box bccoord 1, 16 ; second line of dialogue text box
jp NextTextCommand jp NextTextCommand
TextCommand_PROMPT_BUTTON:: TextCommand_PROMPT_BUTTON::
@ -433,12 +433,12 @@ TextCommand_PROMPT_BUTTON::
cp LINK_STATE_BATTLING cp LINK_STATE_BATTLING
jp z, TextCommand_WAIT_BUTTON jp z, TextCommand_WAIT_BUTTON
ld a, "▼" ld a, "▼"
Coorda 18, 16 ; place down arrow in lower right corner of dialogue text box ldcoord_a 18, 16 ; place down arrow in lower right corner of dialogue text box
push bc push bc
call ManualTextScroll ; blink arrow and wait for A or B to be pressed call ManualTextScroll ; blink arrow and wait for A or B to be pressed
pop bc pop bc
ld a, " " ld a, " "
Coorda 18, 16 ; overwrite down arrow with blank space ldcoord_a 18, 16 ; overwrite down arrow with blank space
pop hl pop hl
jp NextTextCommand jp NextTextCommand
@ -446,11 +446,11 @@ TextCommand_SCROLL::
; pushes text up two lines and sets the BC cursor to the border tile ; pushes text up two lines and sets the BC cursor to the border tile
; below the first character column of the text box. ; below the first character column of the text box.
ld a, " " ld a, " "
Coorda 18, 16 ; place blank space in lower right corner of dialogue text box ldcoord_a 18, 16 ; place blank space in lower right corner of dialogue text box
call ScrollTextUpOneLine call ScrollTextUpOneLine
call ScrollTextUpOneLine call ScrollTextUpOneLine
pop hl pop hl
coord bc, 1, 16 ; second line of dialogue text box bccoord 1, 16 ; second line of dialogue text box
jp NextTextCommand jp NextTextCommand
TextCommand_START_ASM:: TextCommand_START_ASM::

View file

@ -134,7 +134,7 @@ AutoBgMapTransfer::
dec a dec a
jr z, .transferMiddleThird jr z, .transferMiddleThird
.transferBottomThird .transferBottomThird
coord hl, 0, 12 hlcoord 0, 12
ld sp, hl ld sp, hl
ldh a, [hAutoBGTransferDest + 1] ldh a, [hAutoBGTransferDest + 1]
ld h, a ld h, a
@ -145,7 +145,7 @@ AutoBgMapTransfer::
xor a ; TRANSFERTOP xor a ; TRANSFERTOP
jr .doTransfer jr .doTransfer
.transferTopThird .transferTopThird
coord hl, 0, 0 hlcoord 0, 0
ld sp, hl ld sp, hl
ldh a, [hAutoBGTransferDest + 1] ldh a, [hAutoBGTransferDest + 1]
ld h, a ld h, a
@ -154,7 +154,7 @@ AutoBgMapTransfer::
ld a, TRANSFERMIDDLE ld a, TRANSFERMIDDLE
jr .doTransfer jr .doTransfer
.transferMiddleThird .transferMiddleThird
coord hl, 0, 6 hlcoord 0, 6
ld sp, hl ld sp, hl
ldh a, [hAutoBGTransferDest + 1] ldh a, [hAutoBGTransferDest + 1]
ld h, a ld h, a

View file

@ -14,7 +14,7 @@ Func_35f4::
InitYesNoTextBoxParameters:: InitYesNoTextBoxParameters::
xor a ; YES_NO_MENU xor a ; YES_NO_MENU
ld [wTwoOptionMenuID], a ld [wTwoOptionMenuID], a
coord hl, 14, 7 hlcoord 14, 7
ld bc, $80f ld bc, $80f
ret ret
@ -22,7 +22,7 @@ YesNoChoicePokeCenter::
call SaveScreenTilesToBuffer1 call SaveScreenTilesToBuffer1
ld a, HEAL_CANCEL_MENU ld a, HEAL_CANCEL_MENU
ld [wTwoOptionMenuID], a ld [wTwoOptionMenuID], a
coord hl, 11, 6 hlcoord 11, 6
lb bc, 8, 12 lb bc, 8, 12
jr DisplayYesNoChoice jr DisplayYesNoChoice
@ -30,7 +30,7 @@ WideYesNoChoice:: ; unused
call SaveScreenTilesToBuffer1 call SaveScreenTilesToBuffer1
ld a, WIDE_YES_NO_MENU ld a, WIDE_YES_NO_MENU
ld [wTwoOptionMenuID], a ld [wTwoOptionMenuID], a
coord hl, 12, 7 hlcoord 12, 7
lb bc, 8, 13 lb bc, 8, 13
DisplayYesNoChoice:: DisplayYesNoChoice::

View file

@ -1,65 +1,79 @@
validateCoords: MACRO validate_coords: MACRO
IF \1 >= SCREEN_WIDTH
fail "x coord out of range"
ENDC
IF \2 >= SCREEN_HEIGHT
fail "y coord out of range"
ENDC
ENDM
;\1 = r
;\2 = X
;\3 = Y
;\4 = which tilemap (optional)
coord: MACRO
validateCoords \2, \3
IF _NARG >= 4 IF _NARG >= 4
ld \1, \4 + SCREEN_WIDTH * \3 + \2 IF \1 >= \3
fail "x coord out of range"
ENDC
IF \2 >= \4
fail "y coord out of range"
ENDC
ELSE ELSE
ld \1, wTileMap + SCREEN_WIDTH * \3 + \2 validate_coords \1, \2, SCREEN_WIDTH, SCREEN_HEIGHT
ENDC ENDC
ENDM ENDM
;\1 = X hlcoord EQUS "coord hl,"
;\2 = Y bccoord EQUS "coord bc,"
;\3 = which tilemap (optional) decoord EQUS "coord de,"
aCoord: MACRO
validateCoords \1, \2 coord: MACRO
IF _NARG >= 3 ; register, x, y[, origin]
ld a, [\3 + SCREEN_WIDTH * \2 + \1] validate_coords \2, \3
IF _NARG >= 4
ld \1, (\3) * SCREEN_WIDTH + (\2) + \4
ELSE ELSE
ld a, [wTileMap + SCREEN_WIDTH * \2 + \1] ld \1, (\3) * SCREEN_WIDTH + (\2) + wTileMap
ENDC ENDC
ENDM ENDM
;\1 = X hlbgcoord EQUS "bgcoord hl,"
;\2 = Y bcbgcoord EQUS "bgcoord bc,"
;\3 = which tilemap (optional) debgcoord EQUS "bgcoord de,"
Coorda: MACRO
validateCoords \1, \2 bgcoord: MACRO
IF _NARG >= 3 ; register, x, y[, origin]
ld [\3 + SCREEN_WIDTH * \2 + \1], a validate_coords \2, \3, BG_MAP_WIDTH, BG_MAP_HEIGHT
IF _NARG >= 4
ld \1, (\3) * BG_MAP_WIDTH + (\2) + \4
ELSE ELSE
ld [wTileMap + SCREEN_WIDTH * \2 + \1], a ld \1, (\3) * BG_MAP_WIDTH + (\2) + vBGMap0
ENDC ENDC
ENDM ENDM
;\1 = X hlowcoord EQUS "owcoord hl,"
;\2 = Y bcowcoord EQUS "owcoord bc,"
;\3 = which tilemap (optional) deowcoord EQUS "owcoord de,"
dwCoord: MACRO
validateCoords \1, \2
IF _NARG >= 3
dw \3 + SCREEN_WIDTH * \2 + \1
ELSE
dw wTileMap + SCREEN_WIDTH * \2 + \1
ENDC
ENDM
;\1 = r owcoord: MACRO
;\2 = X ; register, x, y, map width
;\3 = Y
;\4 = map width
overworldMapCoord: MACRO
ld \1, wOverworldMap + ((\2) + 3) + (((\3) + 3) * ((\4) + (3 * 2))) ld \1, wOverworldMap + ((\2) + 3) + (((\3) + 3) * ((\4) + (3 * 2)))
ENDM ENDM
dwcoord: MACRO
; x, y
validate_coords \1, \2
IF _NARG >= 3
dw (\2) * SCREEN_WIDTH + (\1) + \3
ELSE
dw (\2) * SCREEN_WIDTH + (\1) + wTileMap
ENDC
ENDM
ldcoord_a: MACRO
; x, y[, origin]
validate_coords \1, \2
IF _NARG >= 3
ld [(\2) * SCREEN_WIDTH + (\1) + \3], a
ELSE
ld [(\2) * SCREEN_WIDTH + (\1) + wTileMap], a
ENDC
ENDM
lda_coord: MACRO
; x, y[, origin]
validate_coords \1, \2
IF _NARG >= 3
ld a, [(\2) * SCREEN_WIDTH + (\1) + \3]
ELSE
ld a, [(\2) * SCREEN_WIDTH + (\1) + wTileMap]
ENDC
ENDM

View file

@ -33,7 +33,7 @@ _tms3 = _tms3 | (1 << ((\1_TMNUM) - 1 - 48))
else else
fail "\1 is not a TM or HM move" fail "\1 is not a TM or HM move"
ENDC ENDC
shift SHIFT
ENDR ENDR
REPT 3 ; TM01-TM24 (24/24) REPT 3 ; TM01-TM24 (24/24)
db _tms1 & $ff db _tms1 & $ff

View file

@ -1,7 +1,7 @@
RGB: MACRO RGB: MACRO
REPT _NARG / 3 REPT _NARG / 3
dw palred (\1) + palgreen (\2) + palblue (\3) dw palred (\1) + palgreen (\2) + palblue (\3)
shift 3 SHIFT 3
ENDR ENDR
ENDM ENDM

View file

@ -185,7 +185,7 @@ SetEvents: MACRO
SetEvent \1 SetEvent \1
REPT _NARG - 1 REPT _NARG - 1
SetEventReuseHL \2 SetEventReuseHL \2
shift SHIFT
ENDR ENDR
ENDM ENDM
@ -237,7 +237,7 @@ ResetEvents: MACRO
ResetEvent \1 ResetEvent \1
REPT _NARG - 1 REPT _NARG - 1
ResetEventReuseHL \2 ResetEventReuseHL \2
shift SHIFT
ENDR ENDR
ENDM ENDM

View file

@ -200,7 +200,7 @@ script_mart: MACRO
db _NARG ; number of items db _NARG ; number of items
REPT _NARG REPT _NARG
db \1 ; item id db \1 ; item id
shift SHIFT
ENDR ENDR
db -1 ; end db -1 ; end
ENDM ENDM

View file

@ -49,15 +49,15 @@ BikeShopText1:
ld [wTopMenuItemX], a ld [wTopMenuItemX], a
ld hl, wd730 ld hl, wd730
set 6, [hl] set 6, [hl]
coord hl, 0, 0 hlcoord 0, 0
ld b, $4 ld b, $4
ld c, $f ld c, $f
call TextBoxBorder call TextBoxBorder
call UpdateSprites call UpdateSprites
coord hl, 2, 2 hlcoord 2, 2
ld de, BikeShopMenuText ld de, BikeShopMenuText
call PlaceString call PlaceString
coord hl, 8, 3 hlcoord 8, 3
ld de, BikeShopMenuPrice ld de, BikeShopMenuPrice
call PlaceString call PlaceString
ld hl, BikeShopText_1d815 ld hl, BikeShopText_1d815

View file

@ -64,7 +64,7 @@ CeladonMartRoofScript_GiveDrinkToGirl:
dec l dec l
ld b, l ld b, l
ld c, 12 ld c, 12
coord hl, 0, 0 hlcoord 0, 0
call TextBoxBorder call TextBoxBorder
call UpdateSprites call UpdateSprites
call CeladonMartRoofScript_PrintDrinksInBag call CeladonMartRoofScript_PrintDrinksInBag
@ -194,7 +194,7 @@ CeladonMartRoofScript_PrintDrinksInBag:
push hl push hl
ld [wd11e], a ld [wd11e], a
call GetItemName call GetItemName
coord hl, 2, 2 hlcoord 2, 2
ldh a, [hItemCounter] ldh a, [hItemCounter]
ld bc, SCREEN_WIDTH * 2 ld bc, SCREEN_WIDTH * 2
call AddNTimes call AddNTimes

View file

@ -474,32 +474,32 @@ CeladonGameCornerText_48f19:
CeladonGameCornerScript_48f1e: CeladonGameCornerScript_48f1e:
ld hl, wd730 ld hl, wd730
set 6, [hl] set 6, [hl]
coord hl, 11, 0 hlcoord 11, 0
ld b, $5 ld b, $5
ld c, $7 ld c, $7
call TextBoxBorder call TextBoxBorder
call UpdateSprites call UpdateSprites
coord hl, 12, 1 hlcoord 12, 1
ld b, 4 ld b, 4
ld c, 7 ld c, 7
call ClearScreenArea call ClearScreenArea
coord hl, 12, 2 hlcoord 12, 2
ld de, GameCornerMoneyText ld de, GameCornerMoneyText
call PlaceString call PlaceString
coord hl, 12, 3 hlcoord 12, 3
ld de, GameCornerBlankText1 ld de, GameCornerBlankText1
call PlaceString call PlaceString
coord hl, 12, 3 hlcoord 12, 3
ld de, wPlayerMoney ld de, wPlayerMoney
ld c, $a3 ld c, $a3
call PrintBCDNumber call PrintBCDNumber
coord hl, 12, 4 hlcoord 12, 4
ld de, GameCornerCoinText ld de, GameCornerCoinText
call PlaceString call PlaceString
coord hl, 12, 5 hlcoord 12, 5
ld de, GameCornerBlankText2 ld de, GameCornerBlankText2
call PlaceString call PlaceString
coord hl, 15, 5 hlcoord 15, 5
ld de, wPlayerCoins ld de, wPlayerCoins
ld c, $82 ld c, $82
call PrintBCDNumber call PrintBCDNumber

View file

@ -52,7 +52,7 @@ VermilionDock_1db9b:
call DelayFrames call DelayFrames
ld b, $9c ld b, $9c
call CopyScreenTileBufferToVRAM call CopyScreenTileBufferToVRAM
coord hl, 0, 10 hlcoord 0, 10
ld bc, SCREEN_WIDTH * 6 ld bc, SCREEN_WIDTH * 6
ld a, $14 ; water tile ld a, $14 ; water tile
call FillMemory call FillMemory
@ -184,7 +184,7 @@ VermilionDock_EraseSSAnne:
ld bc, (5 * BG_MAP_WIDTH) + SCREEN_WIDTH ld bc, (5 * BG_MAP_WIDTH) + SCREEN_WIDTH
ld a, $14 ; water tile ld a, $14 ; water tile
call FillMemory call FillMemory
ld hl, vBGMap0 + 10 * BG_MAP_WIDTH hlbgcoord 0, 10
ld de, wVermilionDockTileMapBuffer ld de, wVermilionDockTileMapBuffer
ld bc, (6 * BG_MAP_WIDTH) / 16 ld bc, (6 * BG_MAP_WIDTH) / 16
call CopyVideoData call CopyVideoData
@ -194,7 +194,7 @@ VermilionDock_EraseSSAnne:
; the blocks is unnecessary because the blocks the ship occupies are south of ; the blocks is unnecessary because the blocks the ship occupies are south of
; the player and won't be redrawn when the player automatically walks north and ; the player and won't be redrawn when the player automatically walks north and
; exits the map. This code could be removed without affecting anything. ; exits the map. This code could be removed without affecting anything.
overworldMapCoord hl, 5, 2, VERMILION_DOCK_WIDTH hlowcoord 5, 2, VERMILION_DOCK_WIDTH
ld a, $d ; water block ld a, $d ; water block
ld [hli], a ld [hli], a
ld [hli], a ld [hli], a