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

View file

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

View file

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

View file

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

View file

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

View file

@ -4,7 +4,7 @@ MarowakAnim:
ldh [rOBP1], a
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
coord hl, 12, 0
hlcoord 12, 0
lb bc, 7, 7
call ClearScreenArea
call Delay3

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -25,7 +25,7 @@ TryDoWildEncounter:
.next
; 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?
coord hl, 9, 9
hlcoord 9, 9
ld c, [hl]
ld a, [wGrassTile]
cp c
@ -64,7 +64,7 @@ TryDoWildEncounter:
; determine which wild pokemon (grass or water) can appear in the half-block we're standing in
ld c, [hl]
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?
jr nz, .gotWildEncounterType ; else, it's treated as a grass tile by default
ld hl, wWaterMons

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -154,10 +154,10 @@ SaveSAV:
ret nz
.save
call SaveSAVtoSRAM
coord hl, 1, 13
hlcoord 1, 13
lb bc, 4, 18
call ClearScreenArea
coord hl, 1, 14
hlcoord 1, 14
ld de, NowSavingString
call PlaceString
ld c, 120
@ -175,7 +175,7 @@ NowSavingString:
SaveSAVConfirm:
call PrintText
coord hl, 0, 7
hlcoord 0, 7
lb bc, 8, 1
ld a, TWO_OPTION_MENU
ld [wTextBoxID], a
@ -435,20 +435,20 @@ DisplayChangeBoxMenu:
and $7f
ld [wCurrentMenuItem], a
ld [wLastMenuItem], a
coord hl, 0, 0
hlcoord 0, 0
ld b, 2
ld c, 9
call TextBoxBorder
ld hl, ChooseABoxText
call PrintText
coord hl, 11, 0
hlcoord 11, 0
ld b, 12
ld c, 7
call TextBoxBorder
ld hl, hFlagsFFF6
set 2, [hl]
ld de, BoxNames
coord hl, 13, 1
hlcoord 13, 1
call PlaceString
ld hl, hFlagsFFF6
res 2, [hl]
@ -457,19 +457,19 @@ DisplayChangeBoxMenu:
cp 9
jr c, .singleDigitBoxNum
sub 9
coord hl, 8, 2
hlcoord 8, 2
ld [hl], "1"
add "0"
jr .next
.singleDigitBoxNum
add "1"
.next
Coorda 9, 2
coord hl, 1, 2
ldcoord_a 9, 2
hlcoord 1, 2
ld de, BoxNoText
call PlaceString
call GetMonCountsForAllBoxes
coord hl, 18, 1
hlcoord 18, 1
ld de, wBoxMonCounts
ld bc, SCREEN_WIDTH
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
ErasePartyMenuCursors::
coord hl, 0, 1
hlcoord 0, 1
ld bc, 2 * 20 ; menu cursor positions are 2 rows apart
ld a, 6 ; 6 menu cursor positions
.loop
@ -330,10 +330,10 @@ StartMenu_Item::
.choseItem
; erase menu cursor (blank each tile in front of an item name)
ld a, " "
Coorda 5, 4
Coorda 5, 6
Coorda 5, 8
Coorda 5, 10
ldcoord_a 5, 4
ldcoord_a 5, 6
ldcoord_a 5, 8
ldcoord_a 5, 10
call PlaceUnfilledArrowMenuCursor
xor a
ld [wMenuItemToSwap], a
@ -480,10 +480,10 @@ DrawTrainerInfo:
lb bc, BANK(RedPicFront), $01
predef DisplayPicCenteredOrUpperRight
call DisableLCD
coord hl, 0, 2
hlcoord 0, 2
ld a, " "
call TrainerInfo_DrawVerticalLine
coord hl, 1, 2
hlcoord 1, 2
call TrainerInfo_DrawVerticalLine
ld hl, vChars2 + $70
ld de, vChars2
@ -526,7 +526,7 @@ DrawTrainerInfo:
dec a
ld [hli], a
ld [hl], 1
coord hl, 0, 0
hlcoord 0, 0
call TrainerInfo_DrawTextBox
ld hl, wTrainerInfoTextBoxWidthPlus1
ld a, 16 + 1
@ -534,27 +534,27 @@ DrawTrainerInfo:
dec a
ld [hli], a
ld [hl], 3
coord hl, 1, 10
hlcoord 1, 10
call TrainerInfo_DrawTextBox
coord hl, 0, 10
hlcoord 0, 10
ld a, $d7
call TrainerInfo_DrawVerticalLine
coord hl, 19, 10
hlcoord 19, 10
call TrainerInfo_DrawVerticalLine
coord hl, 6, 9
hlcoord 6, 9
ld de, TrainerInfo_BadgesText
call PlaceString
coord hl, 2, 2
hlcoord 2, 2
ld de, TrainerInfo_NameMoneyTimeText
call PlaceString
coord hl, 7, 2
hlcoord 7, 2
ld de, wPlayerName
call PlaceString
coord hl, 8, 4
hlcoord 8, 4
ld de, wPlayerMoney
ld c, $e3
call PrintBCDNumber
coord hl, 9, 6
hlcoord 9, 6
ld de, wPlayTimeHours ; hours
lb bc, LEFT_ALIGN | 1, 3
call PrintNumber
@ -667,7 +667,7 @@ SwitchPartyMon::
SwitchPartyMon_ClearGfx:
push af
coord hl, 0, 0
hlcoord 0, 0
ld bc, SCREEN_WIDTH * 2
call AddNTimes
ld c, SCREEN_WIDTH * 2

View file

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

View file

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

View file

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

View file

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

View file

@ -217,7 +217,7 @@ IntroClearScreen:
IntroClearMiddleOfScreen:
; 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
IntroClearCommon:
@ -274,7 +274,7 @@ IntroMoveMon:
ret
IntroCopyTiles:
coord hl, 13, 7
hlcoord 13, 7
CopyTileIDsFromList_ZeroBaseTileID:
ld c, 0
@ -348,16 +348,16 @@ PlayShootingStar:
IntroDrawBlackBars:
; clear the screen and draw black bars on the top and bottom
call IntroClearScreen
coord hl, 0, 0
hlcoord 0, 0
ld c, SCREEN_WIDTH * 4
call IntroPlaceBlackTiles
coord hl, 0, 14
hlcoord 0, 14
ld c, SCREEN_WIDTH * 4
call IntroPlaceBlackTiles
ld hl, vBGMap1
ld c, BG_MAP_WIDTH * 4
call IntroPlaceBlackTiles
ld hl, vBGMap1 + BG_MAP_WIDTH * 14
hlbgcoord 0, 14, vBGMap1
ld c, BG_MAP_WIDTH * 4
jp IntroPlaceBlackTiles

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -11,7 +11,7 @@ IsPlayerStandingOnDoorTile:
ld a, [hli]
ld h, [hl]
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
.loop
ld a, [hli]

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -31,7 +31,7 @@ DisplayListMenuID::
call DisplayTextBoxID ; draw the menu text box
call UpdateSprites ; disable sprites behind the text box
; 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
ld a, [wListMenuID]
and a ; is it a PC pokemon list?
@ -67,12 +67,12 @@ DisplayListMenuIDLoop::
jr z, .notOldManBattle
.oldManBattle
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
call DelayFrames
xor a
ld [wCurrentMenuItem], a
coord hl, 5, 4
hlcoord 5, 4
ld a, l
ld [wMenuCursorLocation], a
ld a, h
@ -194,23 +194,23 @@ DisplayListMenuIDLoop::
DisplayChooseQuantityMenu::
; text box dimensions/coordinates for just quantity
coord hl, 15, 9
hlcoord 15, 9
ld b, 1 ; height
ld c, 3 ; width
ld a, [wListMenuID]
cp PRICEDITEMLISTMENU
jr nz, .drawTextBox
; text box dimensions/coordinates for quantity and price
coord hl, 7, 9
hlcoord 7, 9
ld b, 1 ; height
ld c, 11 ; width
.drawTextBox
call TextBoxBorder
coord hl, 16, 10
hlcoord 16, 10
ld a, [wListMenuID]
cp PRICEDITEMLISTMENU
jr nz, .printInitialQuantity
coord hl, 8, 10
hlcoord 8, 10
.printInitialQuantity
ld de, InitialQuantityText
call PlaceString
@ -250,7 +250,7 @@ DisplayChooseQuantityMenu::
ld a, [wMaxItemQuantity]
ld [hl], a
.handleNewQuantity
coord hl, 17, 10
hlcoord 17, 10
ld a, [wListMenuID]
cp PRICEDITEMLISTMENU
jr nz, .printQuantity
@ -289,13 +289,13 @@ DisplayChooseQuantityMenu::
ldh a, [hDivideBCDQuotient + 2]
ldh [hMoney + 2], a
.skipHalvingPrice
coord hl, 12, 10
hlcoord 12, 10
ld de, SpacesBetweenQuantityAndPriceText
call PlaceString
ld de, hMoney ; total price
ld c, $a3
call PrintBCDNumber
coord hl, 9, 10
hlcoord 9, 10
.printQuantity
ld de, wItemQuantity ; current quantity
lb bc, LEADING_ZEROES | 1, 2 ; 1 byte, 2 digits
@ -334,7 +334,7 @@ ExitListMenu::
ret
PrintListMenuEntries::
coord hl, 5, 3
hlcoord 5, 3
ld b, 9
ld c, 14
call ClearScreenArea
@ -359,7 +359,7 @@ PrintListMenuEntries::
jr nc, .noCarry
inc d
.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
.loop
ld a, b

View file

@ -103,7 +103,7 @@ OverworldLoopLessDelay::
jr nz, .checkForOpponent
bit 0, a
jr nz, .checkForOpponent
aCoord 8, 9
lda_coord 8, 9
ld [wTilePlayerStandingOn], a ; unused?
call DisplayTextID ; display either the start menu or the NPC/sign text
ld a, [wEnteringCableClub]
@ -688,7 +688,7 @@ CheckMapConnections::
; function to play a sound when changing maps
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
jr nz, .didNotGoThroughDoor
ld a, SFX_GO_INSIDE
@ -1297,7 +1297,7 @@ CheckForJumpingAndTilePairCollisions::
; if not jumping
CheckForTilePairCollisions2::
aCoord 8, 9 ; tile the player is on
lda_coord 8, 9 ; tile the player is on
ld [wTilePlayerStandingOn], a
CheckForTilePairCollisions::
@ -1438,7 +1438,7 @@ LoadCurrentMapView::
ld bc, $2
add hl, bc
.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
.rowLoop2
ld c, SCREEN_WIDTH
@ -1711,7 +1711,7 @@ MoveTileBlockMapPointerNorth::
; the portion of the map that was newly exposed due to the player's movement
ScheduleNorthRowRedraw::
coord hl, 0, 0
hlcoord 0, 0
call CopyToRedrawRowOrColumnSrcTiles
ld a, [wMapViewVRAMPointer]
ldh [hRedrawRowOrColumnDest], a
@ -1733,7 +1733,7 @@ CopyToRedrawRowOrColumnSrcTiles::
ret
ScheduleSouthRowRedraw::
coord hl, 0, 16
hlcoord 0, 16
call CopyToRedrawRowOrColumnSrcTiles
ld a, [wMapViewVRAMPointer]
ld l, a
@ -1752,7 +1752,7 @@ ScheduleSouthRowRedraw::
ret
ScheduleEastColumnRedraw::
coord hl, 18, 0
hlcoord 18, 0
call ScheduleColumnRedrawHelper
ld a, [wMapViewVRAMPointer]
ld c, a
@ -1790,7 +1790,7 @@ ScheduleColumnRedrawHelper::
ret
ScheduleWestColumnRedraw::
coord hl, 0, 0
hlcoord 0, 0
call ScheduleColumnRedrawHelper
ld a, [wMapViewVRAMPointer]
ldh [hRedrawRowOrColumnDest], a
@ -2342,7 +2342,7 @@ LoadMapData::
call LoadTilesetTilePatternData
call LoadCurrentMapView
; copy current map view to VRAM
coord hl, 0, 0
hlcoord 0, 0
ld de, vBGMap0
ld b, 18
.vramCopyLoop

View file

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

View file

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

View file

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

View file

@ -1,65 +1,79 @@
validateCoords: MACRO
IF \1 >= SCREEN_WIDTH
validate_coords: MACRO
IF _NARG >= 4
IF \1 >= \3
fail "x coord out of range"
ENDC
IF \2 >= SCREEN_HEIGHT
IF \2 >= \4
fail "y coord out of range"
ENDC
ELSE
validate_coords \1, \2, SCREEN_WIDTH, SCREEN_HEIGHT
ENDC
ENDM
;\1 = r
;\2 = X
;\3 = Y
;\4 = which tilemap (optional)
hlcoord EQUS "coord hl,"
bccoord EQUS "coord bc,"
decoord EQUS "coord de,"
coord: MACRO
validateCoords \2, \3
; register, x, y[, origin]
validate_coords \2, \3
IF _NARG >= 4
ld \1, \4 + SCREEN_WIDTH * \3 + \2
ld \1, (\3) * SCREEN_WIDTH + (\2) + \4
ELSE
ld \1, wTileMap + SCREEN_WIDTH * \3 + \2
ld \1, (\3) * SCREEN_WIDTH + (\2) + wTileMap
ENDC
ENDM
;\1 = X
;\2 = Y
;\3 = which tilemap (optional)
aCoord: MACRO
validateCoords \1, \2
IF _NARG >= 3
ld a, [\3 + SCREEN_WIDTH * \2 + \1]
hlbgcoord EQUS "bgcoord hl,"
bcbgcoord EQUS "bgcoord bc,"
debgcoord EQUS "bgcoord de,"
bgcoord: MACRO
; register, x, y[, origin]
validate_coords \2, \3, BG_MAP_WIDTH, BG_MAP_HEIGHT
IF _NARG >= 4
ld \1, (\3) * BG_MAP_WIDTH + (\2) + \4
ELSE
ld a, [wTileMap + SCREEN_WIDTH * \2 + \1]
ld \1, (\3) * BG_MAP_WIDTH + (\2) + vBGMap0
ENDC
ENDM
;\1 = X
;\2 = Y
;\3 = which tilemap (optional)
Coorda: MACRO
validateCoords \1, \2
IF _NARG >= 3
ld [\3 + SCREEN_WIDTH * \2 + \1], a
ELSE
ld [wTileMap + SCREEN_WIDTH * \2 + \1], a
ENDC
ENDM
hlowcoord EQUS "owcoord hl,"
bcowcoord EQUS "owcoord bc,"
deowcoord EQUS "owcoord de,"
;\1 = X
;\2 = Y
;\3 = which tilemap (optional)
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
;\2 = X
;\3 = Y
;\4 = map width
overworldMapCoord: MACRO
owcoord: MACRO
; register, x, y, map width
ld \1, wOverworldMap + ((\2) + 3) + (((\3) + 3) * ((\4) + (3 * 2)))
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
fail "\1 is not a TM or HM move"
ENDC
shift
SHIFT
ENDR
REPT 3 ; TM01-TM24 (24/24)
db _tms1 & $ff

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -52,7 +52,7 @@ VermilionDock_1db9b:
call DelayFrames
ld b, $9c
call CopyScreenTileBufferToVRAM
coord hl, 0, 10
hlcoord 0, 10
ld bc, SCREEN_WIDTH * 6
ld a, $14 ; water tile
call FillMemory
@ -184,7 +184,7 @@ VermilionDock_EraseSSAnne:
ld bc, (5 * BG_MAP_WIDTH) + SCREEN_WIDTH
ld a, $14 ; water tile
call FillMemory
ld hl, vBGMap0 + 10 * BG_MAP_WIDTH
hlbgcoord 0, 10
ld de, wVermilionDockTileMapBuffer
ld bc, (6 * BG_MAP_WIDTH) / 16
call CopyVideoData
@ -194,7 +194,7 @@ VermilionDock_EraseSSAnne:
; 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
; 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 [hli], a
ld [hli], a