Consolidate coord macros

This commit is contained in:
dannye 2015-07-18 15:52:03 -05:00
parent 0ad1153f16
commit 148d3f3cf2
58 changed files with 528 additions and 539 deletions

View file

@ -14,9 +14,9 @@ HallOfFamePC: ; 7405c (1d:405c)
ld bc, $10
ld a, $ff
call FillMemory
hlCoord 0, 0
coord hl, 0, 0
call FillFourRowsWithBlack
hlCoord 0, 14
coord hl, 0, 14
call FillFourRowsWithBlack
ld a, $c0
ld [rBGP], a
@ -61,7 +61,7 @@ DisplayCreditsMon: ; 740cb (1d:40cb)
ld a,[hl]
ld [wcf91],a
ld [wd0b5],a
hlCoord 8, 6
coord hl, 8, 6
call GetMonHeader
call LoadFrontSpriteByMonIndex
ld hl,vBGMap0 + $c
@ -162,7 +162,7 @@ FillFourRowsWithBlack: ; 7417b (1d:417b)
jp FillMemory
FillMiddleOfScreenWithWhite: ; 74183 (1d:4183)
hlCoord 0, 4
coord hl, 0, 4
ld bc, SCREEN_WIDTH * 10
ld a, $7f ; blank white tile
jp FillMemory
@ -172,7 +172,7 @@ Credits: ; 7418e (1d:418e)
push de
.nextCreditsScreen
pop de
hlCoord 9, 6
coord hl, 9, 6
push hl
call FillMiddleOfScreenWithWhite
pop hl
@ -248,10 +248,10 @@ Credits: ; 7418e (1d:418e)
ld hl, vChars2 + $600
ld bc, (BANK(TheEndGfx) << 8) + $0a
call CopyVideoData
hlCoord 4, 8
coord hl, 4, 8
ld de, TheEndTextString
call PlaceString
hlCoord 4, 9
coord hl, 4, 9
inc de
call PlaceString
jp FadeInCreditsText

View file

@ -759,7 +759,7 @@ DoBallTossSpecialEffects: ; 78f3e (1e:4f3e)
cp a,1
ret nz
.moveGhostMarowakLeft
hlCoord 17, 0
coord hl, 17, 0
ld de,20
ld bc,$0707 ; 7 rows and 7 columns
.loop
@ -858,7 +858,7 @@ DoExplodeSpecialEffects: ; 79009 (1e:5009)
cp a,1 ; is it the end of the subanimation?
jr nz,FlashScreenEveryFourFrameBlocks
; if it's the end of the subanimation, make the attacking pokemon disappear
hlCoord 1, 5
coord hl, 1, 5
jp AnimationHideMonPic ; make pokemon disappear
; flashes the screen when subanimation counter is 1 modulo 4
@ -1292,12 +1292,12 @@ AnimationSlideMonUp: ; 7927a (1e:527a)
ld c, $7
ld a, [H_WHOSETURN]
and a
hlCoord 1, 6
deCoord 1, 5
coord hl, 1, 6
coord de, 1, 5
ld a, $30
jr z, .asm_79291
hlCoord 12, 1
deCoord 12, 0
coord hl, 12, 1
coord de, 12, 0
ld a, $ff
.asm_79291
ld [wd09f], a
@ -1352,9 +1352,9 @@ _AnimationSlideMonUp: ; 792bf (1e:52bf)
jr nz, .asm_792c4
ld a, [H_WHOSETURN]
and a
hlCoord 1, 11
coord hl, 1, 11
jr z, .asm_792e2
hlCoord 12, 6
coord hl, 12, 6
.asm_792e2
ld a, [wd09f]
inc a
@ -1513,11 +1513,11 @@ AnimationShakeBackAndForth: ; 793b1 (1e:53b1)
; The mon's sprite disappears after this animation.
ld a, [H_WHOSETURN]
and a
hlCoord 0, 5
deCoord 2, 5
coord hl, 0, 5
coord de, 2, 5
jr z, .asm_793c2
hlCoord 11, 0
deCoord 13, 0
coord hl, 11, 0
coord de, 13, 0
.asm_793c2
xor a
@ -1561,9 +1561,9 @@ AnimationMoveMonHorizontally: ; 793f9 (1e:53f9)
call AnimationHideMonPic
ld a, [H_WHOSETURN]
and a
hlCoord 2, 5
coord hl, 2, 5
jr z, .asm_79407
hlCoord 11, 0
coord hl, 11, 0
.asm_79407
xor a
push hl
@ -1674,12 +1674,12 @@ AnimationSquishMonPic: ; 794a1 (1e:54a1)
ld a, [H_WHOSETURN]
and a
jr z, .asm_794b1
hlCoord 16, 0
deCoord 14, 0
coord hl, 16, 0
coord de, 14, 0
jr .asm_794b7
.asm_794b1
hlCoord 5, 5
deCoord 3, 5
coord hl, 5, 5
coord de, 3, 5
.asm_794b7
push de
xor a
@ -1883,10 +1883,10 @@ AnimationSlideMonLeft: ; 795f8 (1e:55f8)
ld a, [H_WHOSETURN]
and a
jr z, .asm_79602
hlCoord 12, 0
coord hl, 12, 0
jr .asm_79605
.asm_79602
hlCoord 0, 5
coord hl, 0, 5
.asm_79605
ld d, $8
.asm_79607
@ -2121,7 +2121,7 @@ Func_79793: ; 79793 (1e:5793)
xor a
ld [W_SPRITEFLIPPED], a
call GetMonHeader
hlCoord 12, 0
coord hl, 12, 0
call LoadFrontSpriteByMonIndex
jr .asm_797d3
.asm_797b0
@ -2185,7 +2185,7 @@ Func_7980c: ; 7980c (1e:580c)
push bc
ld e, a
ld d, $0
hlCoord 0, 0
coord hl, 0, 0
add hl, de
ld bc, $707
call ClearScreenArea
@ -2207,7 +2207,7 @@ GetMonSpriteTileMapPointerFromRowCount: ; 79820 (1e:5820)
.enemyTurn
ld a, 12
.next
hlCoord 0, 0
coord hl, 0, 0
ld e, a
ld d, 0
add hl, de

View file

@ -202,7 +202,7 @@ BattleTransition_Spiral: ; 70a72 (1c:4a72)
call BattleTransition_InwardSpiral
jr .done
.outwardSpiral
hlCoord 10, 10
coord hl, 10, 10
ld a, $3
ld [wd09f], a
ld a, l
@ -231,7 +231,7 @@ BattleTransition_Spiral: ; 70a72 (1c:4a72)
BattleTransition_InwardSpiral: ; 70aaa (1c:4aaa)
ld a, $7
ld [wWhichTrade], a
hlCoord 0, 0
coord hl, 0, 0
ld c, $11
ld de, SCREEN_WIDTH
call BattleTransition_InwardSpiral_
@ -371,20 +371,20 @@ BattleTransition_Shrink: ; 70b7f (1c:4b7f)
push bc
xor a
ld [H_AUTOBGTRANSFERENABLED], a
hlCoord 0, 7
deCoord 0, 8
coord hl, 0, 7
coord de, 0, 8
ld bc, -SCREEN_WIDTH * 2
call BattleTransition_CopyTiles1
hlCoord 0, 10
deCoord 0, 9
coord hl, 0, 10
coord de, 0, 9
ld bc, SCREEN_WIDTH * 2
call BattleTransition_CopyTiles1
hlCoord 8, 0
deCoord 9, 0
coord hl, 8, 0
coord de, 9, 0
ld bc, -2
call BattleTransition_CopyTiles2
hlCoord 11, 0
deCoord 10, 0
coord hl, 11, 0
coord de, 10, 0
ld bc, $2
call BattleTransition_CopyTiles2
ld a, $1
@ -405,20 +405,20 @@ BattleTransition_Split: ; 70bca (1c:4bca)
ld [H_AUTOBGTRANSFERENABLED], a
.loop
push bc
hlCoord 0, 16
deCoord 0, 17
coord hl, 0, 16
coord de, 0, 17
ld bc, -SCREEN_WIDTH * 2
call BattleTransition_CopyTiles1
hlCoord 0, 1
deCoord 0, 0
coord hl, 0, 1
coord de, 0, 0
ld bc, SCREEN_WIDTH * 2
call BattleTransition_CopyTiles1
hlCoord 18, 0
deCoord 19, 0
coord hl, 18, 0
coord de, 19, 0
ld bc, -2
call BattleTransition_CopyTiles2
hlCoord 1, 0
deCoord 0, 0
coord hl, 1, 0
coord de, 0, 0
ld bc, $2
call BattleTransition_CopyTiles2
call BattleTransition_TransferDelay3
@ -514,8 +514,8 @@ BattleTransition_CopyTiles2: ; 70c3f (1c:4c3f)
; used for high level wild dungeon battles
BattleTransition_VerticalStripes: ; 70c7e (1c:4c7e)
ld c, SCREEN_HEIGHT
hlCoord 0, 0
deCoord 1, 17
coord hl, 0, 0
coord de, 1, 17
xor a
ld [H_AUTOBGTRANSFERENABLED], a
.loop
@ -553,8 +553,8 @@ BattleTransition_VerticalStripes_: ; 70caa (1c:4caa)
; used for low level wild dungeon battles
BattleTransition_HorizontalStripes: ; 70cb4 (1c:4cb4)
ld c, SCREEN_WIDTH
hlCoord 0, 0
deCoord 19, 1
coord hl, 0, 0
coord de, 19, 1
xor a
ld [H_AUTOBGTRANSFERENABLED], a
.loop

View file

@ -101,7 +101,7 @@ SlidePlayerAndEnemySilhouettesOnScreen: ; 3c04c (f:404c)
ld a, MESSAGE_BOX ; the usual text box at the bottom of the screen
ld [wTextBoxID], a
call DisplayTextBoxID
hlCoord 1, 5
coord hl, 1, 5
ld bc, $307
call ClearScreenArea
call DisableLCD
@ -117,7 +117,7 @@ SlidePlayerAndEnemySilhouettesOnScreen: ; 3c04c (f:404c)
or c
jr nz, .clearBackgroundLoop
; copy the work RAM tile map to VRAM
hlCoord 0, 0
coord hl, 0, 0
ld de, vBGMap0
ld b, 18 ; number of rows
.copyRowLoop
@ -176,7 +176,7 @@ SlidePlayerAndEnemySilhouettesOnScreen: ; 3c04c (f:404c)
ld [H_AUTOBGTRANSFERENABLED], a
ld a, $31
ld [$ffe1], a
hlCoord 1, 5
coord hl, 1, 5
predef CopyUncompressedPicToTilemap
xor a
ld [hWY], a
@ -324,7 +324,7 @@ StartBattle: ; 3c11e (f:411e)
ld [wcf91], a
ld [wBattleMonSpecies2], a
call LoadScreenTilesFromBuffer1
hlCoord 1, 5
coord hl, 1, 5
ld a, $9
call SlideTrainerPicOffScreen
call SaveScreenTilesToBuffer1
@ -760,12 +760,12 @@ HandlePoisonBurnLeechSeed_IncreaseEnemyHP: ; 3c4a3 (f:44a3)
ret
UpdateCurMonHPBar: ; 3c4f6 (f:44f6)
hlCoord 10, 9 ; tile pointer to player HP bar
coord hl, 10, 9 ; tile pointer to player HP bar
ld a, [H_WHOSETURN]
and a
ld a, $1
jr z, .playersTurn
hlCoord 2, 2 ; tile pointer to enemy HP bar
coord hl, 2, 2 ; tile pointer to enemy HP bar
xor a
.playersTurn
push bc
@ -852,10 +852,10 @@ FaintEnemyPokemon: ; 0x3c567
ld hl, wPlayerUsedMove
ld [hli], a
ld [hl], a
hlCoord 12, 5
deCoord 12, 6
coord hl, 12, 5
coord de, 12, 6
call SlideDownFaintedMonPic
hlCoord 0, 0
coord hl, 0, 0
ld bc, $40b
call ClearScreenArea
ld a, [W_ISINBATTLE]
@ -1105,11 +1105,11 @@ RemoveFaintedPlayerMon: ; 3c741 (f:4741)
ld [hl], a
ld [wBattleMonStatus], a
call ReadPlayerMonCurHPAndStatus
hlCoord 9, 7
coord hl, 9, 7
ld bc, $50b
call ClearScreenArea
hlCoord 1, 10
deCoord 1, 11
coord hl, 1, 10
coord de, 1, 11
call SlideDownFaintedMonPic
ld a, $1
ld [wBattleResult], a
@ -1137,7 +1137,7 @@ DoUseNextMonDialogue: ; 3c79b (f:479b)
ld hl, UseNextMonText
call PrintText
.displayYesNoBox
hlCoord 13, 9
coord hl, 13, 9
ld bc, $a0e
ld a, TWO_OPTION_MENU
ld [wTextBoxID], a
@ -1214,7 +1214,7 @@ HandlePlayerBlackOut: ; 3c837 (f:4837)
ld a, [W_CUROPPONENT]
cp $c8 + SONY1
jr nz, .notSony1Battle
hlCoord 0, 0 ; sony 1 battle
coord hl, 0, 0 ; sony 1 battle
ld bc, $815
call ClearScreenArea
call ScrollTrainerPicAfterBattle
@ -1384,7 +1384,7 @@ EnemySendOutFirstMon: ; 3c92a (f:492a)
ld [wAICount],a
ld hl,W_PLAYERBATTSTATUS1
res 5,[hl]
hlCoord 18, 0
coord hl, 18, 0
ld a,8
call SlideTrainerPicOffScreen
call PrintEmptyString
@ -1454,7 +1454,7 @@ EnemySendOutFirstMon: ; 3c92a (f:492a)
jr nz,.next4
ld hl, TrainerAboutToUseText
call PrintText
hlCoord 0, 7
coord hl, 0, 7
ld bc,$0801
ld a,TWO_OPTION_MENU
ld [wTextBoxID],a
@ -1489,7 +1489,7 @@ EnemySendOutFirstMon: ; 3c92a (f:492a)
call LoadScreenTilesFromBuffer1
.next4
call ClearSprites
hlCoord 0, 0
coord hl, 0, 0
ld bc,$040B
call ClearScreenArea
ld b,1
@ -1505,7 +1505,7 @@ EnemySendOutFirstMon: ; 3c92a (f:492a)
call LoadMonFrontSprite
ld a,$CF
ld [$FFE1],a
hlCoord 15, 6
coord hl, 15, 6
predef AnimateSendingOutMon
ld a,[wEnemyMonSpecies2]
call PlayCry
@ -1835,7 +1835,7 @@ SendOutMon: ; 3cc91 (f:4c91)
ld [H_WHOSETURN], a
ld a, POOF_ANIM
call PlayMoveAnimation
hlCoord 4, 11
coord hl, 4, 11
predef AnimateSendingOutMon
ld a, [wcf91]
call PlayCry
@ -1844,10 +1844,10 @@ SendOutMon: ; 3cc91 (f:4c91)
; show 2 stages of the player mon getting smaller before disappearing
AnimateRetreatingPlayerMon: ; 3ccfa (f:4cfa)
hlCoord 1, 5
coord hl, 1, 5
ld bc, $707
call ClearScreenArea
hlCoord 3, 7
coord hl, 3, 7
ld bc, $505
xor a
ld [wDownscaledMonSize], a
@ -1856,7 +1856,7 @@ AnimateRetreatingPlayerMon: ; 3ccfa (f:4cfa)
ld c, 4
call DelayFrames
call .clearScreenArea
hlCoord 4, 9
coord hl, 4, 9
ld bc, $303
ld a, $1
ld [wDownscaledMonSize], a
@ -1868,7 +1868,7 @@ AnimateRetreatingPlayerMon: ; 3ccfa (f:4cfa)
ld a, $4c
Coorda 5, 11
.clearScreenArea
hlCoord 1, 5
coord hl, 1, 5
ld bc, $707
jp ClearScreenArea
@ -1891,14 +1891,14 @@ DrawHUDsAndHPBars: ; 3cd5a (f:4d5a)
DrawPlayerHUDAndHPBar: ; 3cd60 (f:4d60)
xor a
ld [H_AUTOBGTRANSFERENABLED], a
hlCoord 9, 7
coord hl, 9, 7
ld bc, $50b
call ClearScreenArea
callab PlacePlayerHUDTiles
hlCoord 18, 9
coord hl, 18, 9
ld [hl], $73
ld de, wBattleMonNick
hlCoord 10, 7
coord hl, 10, 7
call CenterMonName
call PlaceString
ld hl, wBattleMonSpecies
@ -1909,7 +1909,7 @@ DrawPlayerHUDAndHPBar: ; 3cd60 (f:4d60)
ld de, wLoadedMonLevel
ld bc, $b
call CopyData
hlCoord 14, 8
coord hl, 14, 8
push hl
inc hl
ld de, wLoadedMonStatus
@ -1920,7 +1920,7 @@ DrawPlayerHUDAndHPBar: ; 3cd60 (f:4d60)
.asm_3cdae
ld a, [wLoadedMonSpecies]
ld [wcf91], a
hlCoord 10, 9
coord hl, 10, 9
predef DrawHP
ld a, $1
ld [H_AUTOBGTRANSFERENABLED], a
@ -1952,15 +1952,15 @@ DrawPlayerHUDAndHPBar: ; 3cd60 (f:4d60)
DrawEnemyHUDAndHPBar: ; 3cdec (f:4dec)
xor a
ld [H_AUTOBGTRANSFERENABLED], a
hlCoord 0, 0
coord hl, 0, 0
ld bc, $40c
call ClearScreenArea
callab PlaceEnemyHUDTiles
ld de, wEnemyMonNick
hlCoord 1, 0
coord hl, 1, 0
call CenterMonName
call PlaceString
hlCoord 4, 1
coord hl, 4, 1
push hl
inc hl
ld de, wEnemyMonStatus
@ -2033,7 +2033,7 @@ DrawEnemyHUDAndHPBar: ; 3cdec (f:4dec)
.drawHPBar
xor a
ld [wHPBarType], a
hlCoord 2, 2
coord hl, 2, 2
call DrawHPBar
ld a, $1
ld [H_AUTOBGTRANSFERENABLED], a
@ -2108,12 +2108,12 @@ DisplayBattleMenu: ; 3ceb3 (f:4eb3)
ld bc, $b
call CopyData
; the following simulates the keystrokes by drawing menus on screen
hlCoord 9, 14
coord hl, 9, 14
ld [hl], "▶"
ld c, 80
call DelayFrames
ld [hl], $7f
hlCoord 9, 16
coord hl, 9, 16
ld [hl], "▶"
ld c, 50
call DelayFrames
@ -2145,7 +2145,7 @@ DisplayBattleMenu: ; 3ceb3 (f:4eb3)
.safariLeftColumn
Coorda 13, 14
Coorda 13, 16
hlCoord 7, 14
coord hl, 7, 14
ld de, W_NUMSAFARIBALLS
ld bc, $102
call PrintNumber
@ -2178,7 +2178,7 @@ DisplayBattleMenu: ; 3ceb3 (f:4eb3)
.safariRightColumn
Coorda 1, 14 ; clear upper cursor position in left column
Coorda 1, 16 ; clear lower cursor position in left column
hlCoord 7, 14
coord hl, 7, 14
ld de, W_NUMSAFARIBALLS
ld bc, $102
call PrintNumber
@ -2399,7 +2399,7 @@ PartyMenuOrRockOrRun:
call GBPalNormal
jp DisplayBattleMenu
.partyMonDeselected
hlCoord 11, 11
coord hl, 11, 11
ld bc, $81
ld a, $7f
call FillMemory
@ -2561,17 +2561,17 @@ MoveSelectionMenu: ; 3d219 (f:5219)
ret z
ld hl, wBattleMonMoves
call .loadmoves
hlCoord 4, 12
coord hl, 4, 12
ld b, $4
ld c, $e
di
call TextBoxBorder
hlCoord 4, 12
coord hl, 4, 12
ld [hl], $7a
hlCoord 10, 12
coord hl, 10, 12
ld [hl], $7e
ei
hlCoord 6, 13
coord hl, 6, 13
call .writemoves
ld b, $5
ld a, $c
@ -2579,11 +2579,11 @@ MoveSelectionMenu: ; 3d219 (f:5219)
.mimicmenu
ld hl, wEnemyMonMoves
call .loadmoves
hlCoord 0, 7
coord hl, 0, 7
ld b, $4
ld c, $e
call TextBoxBorder
hlCoord 2, 8
coord hl, 2, 8
call .writemoves
ld b, $1
ld a, $7
@ -2594,11 +2594,11 @@ MoveSelectionMenu: ; 3d219 (f:5219)
ld bc, $2c
call AddNTimes
call .loadmoves
hlCoord 4, 7
coord hl, 4, 7
ld b, $4
ld c, $e
call TextBoxBorder
hlCoord 6, 8
coord hl, 6, 8
call .writemoves
ld b, $5
ld a, $7
@ -2654,7 +2654,7 @@ SelectMenuItem: ; 3d2fe (f:52fe)
jr z, .battleselect
dec a
jr nz, .select
hlCoord 1, 14
coord hl, 1, 14
ld de, WhichTechniqueString
call PlaceString
jr .select
@ -2666,7 +2666,7 @@ SelectMenuItem: ; 3d2fe (f:52fe)
ld a, [wMenuItemToSwap]
and a
jr z, .select
hlCoord 5, 13
coord hl, 5, 13
dec a
ld bc, $14
call AddNTimes
@ -2903,7 +2903,7 @@ SwapMovesInMenu: ; 3d435 (f:5435)
PrintMenuItem: ; 3d4b6 (f:54b6)
xor a
ld [H_AUTOBGTRANSFERENABLED], a
hlCoord 0, 8
coord hl, 0, 8
ld b, $3
ld c, $9
call TextBoxBorder
@ -2916,7 +2916,7 @@ PrintMenuItem: ; 3d4b6 (f:54b6)
ld a, [wCurrentMenuItem]
cp b
jr nz, .notDisabled
hlCoord 1, 10
coord hl, 1, 10
ld de, DisabledText
call PlaceString
jr .moveDisabled
@ -2948,23 +2948,23 @@ PrintMenuItem: ; 3d4b6 (f:54b6)
and $3f
ld [wcd6d], a
; print TYPE/<type> and <curPP>/<maxPP>
hlCoord 1, 9
coord hl, 1, 9
ld de, TypeText
call PlaceString
hlCoord 7, 11
coord hl, 7, 11
ld [hl], "/"
hlCoord 5, 9
coord hl, 5, 9
ld [hl], "/"
hlCoord 5, 11
coord hl, 5, 11
ld de, wcd6d
ld bc, $102
call PrintNumber
hlCoord 8, 11
coord hl, 8, 11
ld de, wd11e
ld bc, $102
call PrintNumber
call GetCurrentMove
hlCoord 2, 10
coord hl, 2, 10
predef PrintMoveType
.moveDisabled
ld a, $1
@ -4924,7 +4924,7 @@ ApplyDamageToEnemyPokemon: ; 3e142 (f:6142)
ld [wHPBarNewHP+1],a
ld a,[hl]
ld [wHPBarNewHP],a
hlCoord 2, 2
coord hl, 2, 2
xor a
ld [wHPBarType],a
predef UpdateHPBar2 ; animate the HP bar shortening
@ -5042,7 +5042,7 @@ ApplyDamageToPlayerPokemon: ; 3e200 (f:6200)
ld [wHPBarMaxHP+1],a
ld a,[hl]
ld [wHPBarMaxHP],a
hlCoord 10, 9
coord hl, 10, 9
ld a,$01
ld [wHPBarType],a
predef UpdateHPBar2 ; animate the HP bar shortening
@ -6456,7 +6456,7 @@ LoadPlayerBackPic: ; 3ec92 (f:6c92)
ld [$0], a
ld a, $31
ld [$ffe1], a
hlCoord 1, 5
coord hl, 1, 5
predef_jump CopyUncompressedPicToTilemap
; does nothing since no stats are ever selected (barring glitches)
@ -6875,7 +6875,7 @@ InitBattleCommon: ; 3ef3d (f:6f3d)
ld [$ffe1], a
dec a
ld [wAICount], a
hlCoord 12, 0
coord hl, 12, 0
predef CopyUncompressedPicToTilemap
ld a, $ff
ld [wEnemyMonPartyPos], a
@ -6929,7 +6929,7 @@ InitWildBattle: ; 3ef8b (f:6f8b)
xor a
ld [W_TRAINERCLASS], a
ld [$ffe1], a
hlCoord 12, 0
coord hl, 12, 0
predef CopyUncompressedPicToTilemap
; common code that executes after init battle code specific to trainer or wild battles
@ -6951,10 +6951,10 @@ InitBattle_Common: ; 3efeb (f:6feb)
ld a, $9c
ld [H_AUTOBGTRANSFERDEST + 1], a
call LoadScreenTilesFromBuffer1
hlCoord 9, 7
coord hl, 9, 7
ld bc, $50a
call ClearScreenArea
hlCoord 1, 0
coord hl, 1, 0
ld bc, $40a
call ClearScreenArea
call ClearSprites
@ -7098,7 +7098,7 @@ LoadMonBackPic: ; 3f103 (f:7103)
; been loaded with GetMonHeader.
ld a, [wBattleMonSpecies2]
ld [wcf91], a
hlCoord 1, 5
coord hl, 1, 5
ld b, $7
ld c, $8
call ClearScreenArea

View file

@ -121,7 +121,7 @@ PlacePlayerHUDTiles: ; 3a902 (e:6902)
ld de, wTrainerFacingDirection
ld bc, $3
call CopyData
hlCoord 18, 10
coord hl, 18, 10
ld de, rIE
jr PlaceHUDTiles
@ -136,7 +136,7 @@ PlaceEnemyHUDTiles: ; 3a919 (e:6919)
ld de, wTrainerFacingDirection
ld bc, $3
call CopyData
hlCoord 1, 2
coord hl, 1, 2
ld de, $1
jr PlaceHUDTiles

View file

@ -19,7 +19,7 @@ EndOfBattle: ; 137aa (4:77aa)
jr z, .placeWinOrLoseString
ld de, DrawText
.placeWinOrLoseString
hlCoord 6, 8
coord hl, 6, 8
call PlaceString
ld c, 200
call DelayFrames

View file

@ -4,7 +4,7 @@ MarowakAnim: ; 708ca (1c:48ca)
ld [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
hlCoord 12, 0
coord hl, 12, 0
ld bc, $707
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: ; 372d6 (d:72d6)
call LoadTextBoxTilePatterns
hlCoord 3, 4
coord hl, 3, 4
ld b, $7
ld c, $c
call TextBoxBorder
hlCoord 4, 5
coord hl, 4, 5
ld de, wPlayerName
call PlaceString
hlCoord 4, 10
coord hl, 4, 10
ld de, wLinkEnemyTrainerName
call PlaceString
; place bold "VS" tiles between the names
hlCoord 9, 8
coord hl, 9, 8
ld a, $69
ld [hli], a
ld [hl], $6a

View file

@ -71,10 +71,10 @@ DrainHPEffect_: ; 783f (1:783f)
.next
ld a, [H_WHOSETURN]
and a
hlCoord 10, 9
coord hl, 10, 9
ld a, $1
jr z, .next2
hlCoord 2, 2
coord hl, 2, 2
xor a
.next2
ld [wHPBarType], a

View file

@ -89,10 +89,10 @@ HealEffect_: ; 3b9ec (e:79ec)
call BankswitchEtoF
ld a, [H_WHOSETURN]
and a
hlCoord 10, 9
coord hl, 10, 9
ld a, $1
jr z, .updateHPBar
hlCoord 2, 2
coord hl, 2, 2
xor a
.updateHPBar
ld [wHPBarType], a

View file

@ -53,12 +53,12 @@ RecoilEffect_: ; 1392c (4:792c)
ld [hli], a
ld [hl], a
.getHPBarCoords
hlCoord 10, 9
coord hl, 10, 9
ld a, [H_WHOSETURN]
and a
ld a, $1
jr z, .updateHPBar
hlCoord 2, 2
coord hl, 2, 2
xor a
.updateHPBar
ld [wHPBarType], a

View file

@ -6,7 +6,7 @@ _ScrollTrainerPicAfterBattle: ; 396d3 (e:56d3)
ld b, $1
call GoPAL_SET
callab _LoadTrainerPic
hlCoord 19, 0
coord hl, 19, 0
ld c, $0
.scrollLoop
inc c

View file

@ -641,7 +641,7 @@ AIRecoverHP: ; 3a6da (e:66da)
AIPrintItemUseAndUpdateHPBar: ; 3a718 (e:6718)
call AIPrintItemUse_
hlCoord 2, 2
coord hl, 2, 2
xor a
ld [wHPBarType],a
predef UpdateHPBar2

View file

@ -25,7 +25,7 @@ TryDoWildEncounter: ; 13870 (4:7870)
.asm_1389e
; 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?
hlCoord 9, 9
coord hl, 9, 9
ld c, [hl]
ld a, [W_GRASSTILE]
cp c

View file

@ -9,11 +9,11 @@ CableClub_DoBattleOrTrade: ; 5317 (1:5317)
call LoadFontTilePatterns
call LoadHpBarAndStatusTilePatterns
call LoadTrainerInfoTextBoxTiles
hlCoord 3, 8
coord hl, 3, 8
ld b, 2
ld c, 12
call CableClub_TextBoxBorder
hlCoord 4, 10
coord hl, 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
hlCoord 1, 1
coord hl, 1, 1
ld bc, $0601
call ClearScreenArea
.playerMonMenu_HandleInput
@ -464,11 +464,11 @@ TradeCenter_SelectMon:
dec a
.displayStatsTradeMenu
push af
hlCoord 0, 14
coord hl, 0, 14
ld b, 2
ld c, 18
call CableClub_TextBoxBorder
hlCoord 2, 16
coord hl, 2, 16
ld de, .statsTrade
call PlaceString
xor a
@ -596,15 +596,15 @@ ReturnToCableClubRoom: ; 577d (1:577d)
ret
TradeCenter_DrawCancelBox:
hlCoord 11, 15
coord hl, 11, 15
ld a, $7e
ld bc, 2 * 20 + 9
call FillMemory
hlCoord 0, 15
coord hl, 0, 15
ld b, 1
ld c, 9
call CableClub_TextBoxBorder
hlCoord 2, 16
coord hl, 2, 16
ld de, CancelTextString
jp PlaceString
@ -613,7 +613,7 @@ CancelTextString:
TradeCenter_PlaceSelectedEnemyMonMenuCursor:
ld a, [wSerialSyncAndExchangeNybbleReceiveData]
hlCoord 1, 9
coord hl, 1, 9
ld bc, 20
call AddNTimes
ld [hl], $ec ; cursor
@ -630,24 +630,24 @@ TradeCenter_DisplayStats:
jp TradeCenter_DrawCancelBox
TradeCenter_DrawPartyLists:
hlCoord 0, 0
coord hl, 0, 0
ld b, 6
ld c, 18
call CableClub_TextBoxBorder
hlCoord 0, 8
coord hl, 0, 8
ld b, 6
ld c, 18
call CableClub_TextBoxBorder
hlCoord 5, 0
coord hl, 5, 0
ld de, wPlayerName
call PlaceString
hlCoord 5, 8
coord hl, 5, 8
ld de, wLinkEnemyTrainerName
call PlaceString
hlCoord 2, 1
coord hl, 2, 1
ld de, wPartySpecies
call TradeCenter_PrintPartyListNames
hlCoord 2, 9
coord hl, 2, 9
ld de, wEnemyPartyMons
; fall through
@ -684,7 +684,7 @@ TradeCenter_Trade:
ld [wSerialExchangeNybbleReceiveData], a
ld [wMenuWatchMovingOutOfBounds], a
ld [wMenuJoypadPollCount], a
hlCoord 0, 12
coord hl, 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
bcCoord 1, 14
coord bc, 1, 14
call TextCommandProcessor
call SaveScreenTilesToBuffer1
hlCoord 10, 7
coord hl, 10, 7
ld bc, $080b
ld a, TRADE_CANCEL_MENU
ld [wTwoOptionMenuID], a
@ -726,11 +726,11 @@ TradeCenter_Trade:
; if trade cancelled
ld a, $1
ld [wSerialExchangeNybbleSendData], a
hlCoord 0, 12
coord hl, 0, 12
ld b, 4
ld c, 18
call CableClub_TextBoxBorder
hlCoord 1, 14
coord hl, 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
hlCoord 0, 12
coord hl, 0, 12
ld b, 4
ld c, 18
call CableClub_TextBoxBorder
hlCoord 1, 14
coord hl, 1, 14
ld de, TradeCanceled
call PlaceString
jp .tradeCancelled
@ -851,11 +851,11 @@ TradeCenter_Trade:
call Serial_PrintWaitingTextAndSyncAndExchangeNybble
ld c, 40
call DelayFrames
hlCoord 0, 12
coord hl, 0, 12
ld b, 4
ld c, 18
call CableClub_TextBoxBorder
hlCoord 1, 14
coord hl, 1, 14
ld de, TradeCompleted
call PlaceString
predef SaveSAVtoSRAM2

View file

@ -5,7 +5,7 @@ DoClearSaveDialogue: ; 1c98a (7:498a)
call LoadTextBoxTilePatterns
ld hl, ClearSaveDataText
call PrintText
hlCoord 14, 7
coord hl, 14, 7
ld bc, $80f
ld a, NO_YES_MENU
ld [wTwoOptionMenuID], a

View file

@ -99,7 +99,7 @@ EvolutionSetWholeScreenPalette: ; 7beb4 (1e:7eb4)
Evolution_LoadPic: ; 7beb9 (1e:7eb9)
call GetMonHeader
hlCoord 7, 2
coord hl, 7, 2
jp LoadFlippedFrontSpriteByMonIndex
Func_7bec2: ; 7bec2 (1e:7ec2)
@ -117,7 +117,7 @@ Func_7bed6: ; 7bed6 (1e:7ed6)
push bc
xor a
ld [H_AUTOBGTRANSFERENABLED], a
hlCoord 7, 2
coord hl, 7, 2
ld bc, $707
ld de, $d
.asm_7bee3

View file

@ -121,7 +121,7 @@ Evolution_PartyMonLoop: ; loop over party mons
call DelayFrames
xor a
ld [H_AUTOBGTRANSFERENABLED], a
hlCoord 0, 0
coord hl, 0, 0
ld bc, $c14
call ClearScreenArea
ld a, $1

View file

@ -57,11 +57,11 @@ AnimateHallOfFame: ; 701a0 (1c:41a0)
call HoFDisplayAndRecordMonInfo
ld c, 80
call DelayFrames
hlCoord 2, 13
coord hl, 2, 13
ld b, $3
ld c, $e
call TextBoxBorder
hlCoord 4, 15
coord hl, 4, 15
ld de, HallOfFameText
call PlaceString
ld c, 180
@ -112,7 +112,7 @@ HoFShowMonOrPlayer: ; 70278 (1c:4278)
call HoFLoadPlayerPics
jr .next1
.showMon
hlCoord 12, 5
coord hl, 12, 5
call GetMonHeader
call LoadFrontSpriteByMonIndex
predef LoadMonBackPic
@ -157,22 +157,22 @@ HoFDisplayAndRecordMonInfo: ; 702e1 (1c:42e1)
jp HoFRecordMonInfo
HoFDisplayMonInfo: ; 702f0 (1c:42f0)
hlCoord 0, 2
coord hl, 0, 2
ld b, 9
ld c, 10
call TextBoxBorder
hlCoord 2, 6
coord hl, 2, 6
ld de, HoFMonInfoText
call PlaceString
hlCoord 1, 4
coord hl, 1, 4
ld de, wcd6d
call PlaceString
ld a, [wHoFMonLevel]
hlCoord 8, 7
coord hl, 8, 7
call PrintLevelCommon
ld a, [wHoFMonSpecies]
ld [wd0b5], a
hlCoord 3, 9
coord hl, 3, 9
predef PrintMonType
ld a, [wHoFMonSpecies]
jp PlayCry
@ -203,28 +203,28 @@ HoFLoadPlayerPics: ; 7033e (1c:433e)
HoFLoadMonPlayerPicTileIDs: ; 7036d (1c:436d)
; c = base tile ID
ld b, 0
hlCoord 12, 5
coord hl, 12, 5
predef_jump CopyTileIDsFromList
HoFDisplayPlayerStats: ; 70377 (1c:4377)
ld hl, wd747
set 3, [hl]
predef DisplayDexRating
hlCoord 0, 4
coord hl, 0, 4
ld b, $6
ld c, $a
call TextBoxBorder
hlCoord 5, 0
coord hl, 5, 0
ld b, $2
ld c, $9
call TextBoxBorder
hlCoord 7, 2
coord hl, 7, 2
ld de, wPlayerName
call PlaceString
hlCoord 1, 6
coord hl, 1, 6
ld de, HoFPlayTimeText
call PlaceString
hlCoord 5, 7
coord hl, 5, 7
ld de, W_PLAYTIMEHOURS + 1
ld bc, $103
call PrintNumber
@ -233,10 +233,10 @@ HoFDisplayPlayerStats: ; 70377 (1c:4377)
ld de, W_PLAYTIMEMINUTES + 1
ld bc, $8102
call PrintNumber
hlCoord 1, 9
coord hl, 1, 9
ld de, HoFMoneyText
call PlaceString
hlCoord 4, 10
coord hl, 4, 10
ld de, wPlayerMoney
ld c, $a3
call PrintBCDNumber

View file

@ -72,7 +72,7 @@ DisplayMonFrontSpriteInBox: ; 5dbd9 (17:5bd9)
call LoadMonFrontSprite
ld a, $80
ld [$ffe1], a
hlCoord 10, 11
coord hl, 10, 11
predef AnimateSendingOutMon
call WaitForTextScrollButtonPress
call LoadScreenTilesFromBuffer1
@ -109,11 +109,11 @@ LinkCableHelp: ; 5dc29 (17:5c29)
.asm_5c51
ld hl, wd730
set 6, [hl]
hlCoord 0, 0
coord hl, 0, 0
ld b, $8
ld c, $d
call TextBoxBorder
hlCoord 2, 2
coord hl, 2, 2
ld de, HowToLinkText
call PlaceString
ld hl, LinkCableHelpText2
@ -193,13 +193,13 @@ ViridianSchoolBlackboard: ; 5dced (17:5ced)
.asm_5dd15
ld hl, wd730
set 6, [hl]
hlCoord 0, 0
coord hl, 0, 0
ld bc, $060a
call TextBoxBorder
hlCoord 1, 2
coord hl, 1, 2
ld de, StatusAilmentText1
call PlaceString
hlCoord 6, 2
coord hl, 6, 2
ld de, StatusAilmentText2
call PlaceString
ld hl, ViridianSchoolBlackboardText2

View file

@ -402,11 +402,11 @@ BillsHousePokemonList: ; 1ec05 (7:6c05)
.asm_1ec2d
ld hl, wd730
set 6, [hl]
hlCoord 0, 0
coord hl, 0, 0
ld b, $a
ld c, $9
call TextBoxBorder
hlCoord 2, 2
coord hl, 2, 2
ld de, BillsMonListText
call PlaceString
ld hl, BillsHousePokemonListText2

View file

@ -205,7 +205,7 @@ IntroClearScreen: ; 417f0 (10:57f0)
IntroClearMiddleOfScreen: ; 417f8 (10:57f8)
; clear the area of the tile map between the black bars on the top and bottom
hlCoord 0, 4
coord hl, 0, 4
ld bc, SCREEN_WIDTH * 10
IntroClearCommon: ; 417fe (10:57fe)
@ -263,7 +263,7 @@ IntroMoveMon: ; 4180e (10:580e)
ret
IntroCopyTiles: ; 4183f (10:583f)
hlCoord 13, 7
coord hl, 13, 7
CopyTileIDsFromList_ZeroBaseTileID: ; 41842 (10:5842)
ld c, 0
@ -337,10 +337,10 @@ PlayShootingStar: ; 4188a (10:588a)
IntroDrawBlackBars: ; 418e9 (10:58e9)
; clear the screen and draw black bars on the top and bottom
call IntroClearScreen
hlCoord 0, 0
coord hl, 0, 0
ld c, SCREEN_WIDTH * 4
call IntroPlaceBlackTiles
hlCoord 0, 14
coord hl, 0, 14
ld c, SCREEN_WIDTH * 4
call IntroPlaceBlackTiles
ld hl, vBGMap1

View file

@ -913,7 +913,7 @@ ItemUseMedicine: ; dabb (3:5abb)
sbc b
ld [hl],a
ld [wHPBarNewHP+1],a
hlCoord 4, 1
coord hl, 4, 1
ld a,[wWhichPokemon]
ld bc,2 * 20
call AddNTimes ; calculate coordinates of HP bar of pokemon that used Softboiled
@ -2095,7 +2095,7 @@ ItemUseTMHM: ; e479 (3:6479)
call PrintText
ld hl,TeachMachineMoveText
call PrintText
hlCoord 14, 7
coord hl, 14, 7
ld bc,$080f
ld a,TWO_OPTION_MENU
ld [wTextBoxID],a
@ -2486,7 +2486,7 @@ TossItem_: ; e6f1 (3:66f1)
call CopyStringToCF4B ; copy name to wcf4b
ld hl,IsItOKToTossItemText
call PrintText
hlCoord 14, 7
coord hl, 14, 7
ld bc,$080f
ld a,TWO_OPTION_MENU
ld [wTextBoxID],a

View file

@ -76,7 +76,7 @@ DontAbandonLearning: ; 6e5b (1:6e5b)
AbandonLearning: ; 6eda (1:6eda)
ld hl, AbandonLearningText
call PrintText
hlCoord 14, 7
coord hl, 14, 7
ld bc, $80f
ld a, TWO_OPTION_MENU
ld [wTextBoxID], a
@ -99,7 +99,7 @@ TryingToLearn: ; 6f07 (1:6f07)
push hl
ld hl, TryingToLearnText
call PrintText
hlCoord 14, 7
coord hl, 14, 7
ld bc, $80f
ld a, TWO_OPTION_MENU
ld [wTextBoxID], a
@ -120,11 +120,11 @@ TryingToLearn: ; 6f07 (1:6f07)
push hl
ld hl, WhichMoveToForgetText
call PrintText
hlCoord 4, 7
coord hl, 4, 7
ld b, $4
ld c, $e
call TextBoxBorder
hlCoord 6, 8
coord hl, 6, 8
ld de, wMovesString
ld a, [hFlags_0xFFF6]
set 2, a

View file

@ -11,17 +11,17 @@ DisplayPCMainMenu:: ; 213c8 (8:53c8)
ld a, [wNumHoFTeams]
and a
jr nz, .leaguePCAvailable
hlCoord 0, 0
coord hl, 0, 0
ld b, 8
ld c, 14
jr .next
.noOaksPC
hlCoord 0, 0
coord hl, 0, 0
ld b, 6
ld c, 14
jr .next
.leaguePCAvailable
hlCoord 0, 0
coord hl, 0, 0
ld b, 10
ld c, 14
.next
@ -32,15 +32,15 @@ DisplayPCMainMenu:: ; 213c8 (8:53c8)
ld a, [wd7f1]
bit 0, a
jr nz, .metBill
hlCoord 2, 2
coord hl, 2, 2
ld de, SomeonesPCText
jr .next2
.metBill
hlCoord 2, 2
coord hl, 2, 2
ld de, BillsPCText
.next2
call PlaceString
hlCoord 2, 4
coord hl, 2, 4
ld de, wPlayerName
call PlaceString
ld l, c
@ -50,7 +50,7 @@ DisplayPCMainMenu:: ; 213c8 (8:53c8)
ld a, [wd74b]
bit 5, a ; received pokedex?
jr z, .noOaksPC2
hlCoord 2, 6
coord hl, 2, 6
ld de, OaksPCText
call PlaceString
ld a, [wNumHoFTeams]
@ -58,20 +58,20 @@ DisplayPCMainMenu:: ; 213c8 (8:53c8)
jr z, .noLeaguePC
ld a, 4
ld [wMaxMenuItem], a
hlCoord 2, 8
coord hl, 2, 8
ld de, PKMNLeaguePCText
call PlaceString
hlCoord 2, 10
coord hl, 2, 10
ld de, LogOffPCText
jr .next3
.noLeaguePC
hlCoord 2, 8
coord hl, 2, 8
ld de, LogOffPCText
jr .next3
.noOaksPC2
ld a, $2
ld [wMaxMenuItem], a
hlCoord 2, 6
coord hl, 2, 6
ld de, LogOffPCText
.next3
call PlaceString
@ -122,11 +122,11 @@ BillsPCMenu: ; 214e8 (8:54e8)
ld bc, (BANK(PokeballTileGraphics) << 8) + $01
call CopyVideoData
call LoadScreenTilesFromBuffer2DisableBGTransfer
hlCoord 0, 0
coord hl, 0, 0
ld b, 10
ld c, 12
call TextBoxBorder
hlCoord 2, 2
coord hl, 2, 2
ld de, BillsPCMenuText
call PlaceString
ld hl, wTopMenuItemY
@ -149,7 +149,7 @@ BillsPCMenu: ; 214e8 (8:54e8)
ld [wPlayerMonNumber], a
ld hl, WhatText
call PrintText
hlCoord 9, 14
coord hl, 9, 14
ld b, 2
ld c, 9
call TextBoxBorder
@ -159,7 +159,7 @@ BillsPCMenu: ; 214e8 (8:54e8)
jr c, .singleDigitBoxNum
; two digit box num
sub 9
hlCoord 17, 16
coord hl, 17, 16
ld [hl], "1"
add "0"
jr .next
@ -167,7 +167,7 @@ BillsPCMenu: ; 214e8 (8:54e8)
add "1"
.next
Coorda 18, 16
hlCoord 10, 16
coord hl, 10, 16
ld de, BoxNoPCText
call PlaceString
ld a, 1
@ -391,7 +391,7 @@ HMMoveArray: ; 21745 (8:5745)
db -1
DisplayDepositWithdrawMenu: ; 2174b (8:574b)
hlCoord 9, 10
coord hl, 9, 10
ld b, 6
ld c, 9
call TextBoxBorder
@ -401,9 +401,9 @@ DisplayDepositWithdrawMenu: ; 2174b (8:574b)
jr nz, .next
ld de, WithdrawPCText
.next
hlCoord 11, 12
coord hl, 11, 12
call PlaceString
hlCoord 11, 14
coord hl, 11, 14
ld de, StatsCancelPCText
call PlaceString
ld hl, wTopMenuItemY

View file

@ -12,7 +12,7 @@ DisplayDiploma: ; 566e2 (15:66e2)
ld bc, $0010
ld a, BANK(CircleTile)
call FarCopyData2
hlCoord 0, 0
coord hl, 0, 0
ld bc, $1012
predef Diploma_TextBoxBorder
ld hl, DiplomaTextPointersAndCoords
@ -33,7 +33,7 @@ DisplayDiploma: ; 566e2 (15:66e2)
pop bc
dec c
jr nz, .asm_56715
hlCoord 10, 4
coord hl, 10, 4
ld de, wPlayerName
call PlaceString
callba DrawPlayerCharacter

View file

@ -95,18 +95,18 @@ LeaguePCShowMon: ; 76610 (1d:6610)
ld b, $0B
ld c, 0
call GoPAL_SET
hlCoord 12, 5
coord hl, 12, 5
call GetMonHeader
call LoadFrontSpriteByMonIndex
call GBPalNormal
hlCoord 0, 13
coord hl, 0, 13
ld b, 2
ld c, $12
call TextBoxBorder
hlCoord 1, 15
coord hl, 1, 15
ld de, HallOfFameNoText
call PlaceString
hlCoord 16, 15
coord hl, 16, 15
ld de, wHoFTeamNo
ld bc, $0103
call PrintNumber

View file

@ -33,20 +33,20 @@ MainMenu: ; 5af2 (1:5af2)
ld a,[wd088]
cp a,1
jr z,.next1
hlCoord 0, 0
coord hl, 0, 0
ld b,6
ld c,13
call TextBoxBorder
hlCoord 2, 2
coord hl, 2, 2
ld de,ContinueText
call PlaceString
jr .next2
.next1
hlCoord 0, 0
coord hl, 0, 0
ld b,4
ld c,13
call TextBoxBorder
hlCoord 2, 2
coord hl, 2, 2
ld de,NewGameText
call PlaceString
.next2
@ -139,12 +139,12 @@ LinkMenu: ; 5c0a (1:5c0a)
call SaveScreenTilesToBuffer1
ld hl, WhereWouldYouLikeText
call PrintText
hlCoord 5, 5
coord hl, 5, 5
ld b, $6
ld c, $d
call TextBoxBorder
call UpdateSprites
hlCoord 7, 7
coord hl, 7, 7
ld de, CableClubOptionsText
call PlaceString
xor a
@ -340,21 +340,21 @@ CableClubOptionsText: ; 5d97 (1:5d97)
ContinueGame: ; 5db5 (1:5db5)
xor a
ld [H_AUTOBGTRANSFERENABLED], a
hlCoord 4, 7
coord hl, 4, 7
ld b, $8
ld c, $e
call TextBoxBorder
hlCoord 5, 9
coord hl, 5, 9
ld de, SaveScreenInfoText
call PlaceString
hlCoord 12, 9
coord hl, 12, 9
ld de, wPlayerName
call PlaceString
hlCoord 17, 11
coord hl, 17, 11
call Func_5e2f
hlCoord 16, 13
coord hl, 16, 13
call Func_5e42
hlCoord 13, 15
coord hl, 13, 15
call Func_5e55
ld a, $1
ld [H_AUTOBGTRANSFERENABLED], a
@ -364,23 +364,23 @@ ContinueGame: ; 5db5 (1:5db5)
PrintSaveScreenText: ; 5def (1:5def)
xor a
ld [H_AUTOBGTRANSFERENABLED], a
hlCoord 4, 0
coord hl, 4, 0
ld b, $8
ld c, $e
call TextBoxBorder
call LoadTextBoxTilePatterns
call UpdateSprites
hlCoord 5, 2
coord hl, 5, 2
ld de, SaveScreenInfoText
call PlaceString
hlCoord 12, 2
coord hl, 12, 2
ld de, wPlayerName
call PlaceString
hlCoord 17, 4
coord hl, 17, 4
call Func_5e2f
hlCoord 16, 6
coord hl, 16, 6
call Func_5e42
hlCoord 13, 8
coord hl, 13, 8
call Func_5e55
ld a, $1
ld [H_AUTOBGTRANSFERENABLED], a
@ -424,28 +424,28 @@ SaveScreenInfoText: ; 5e6a (1:5e6a)
next "TIME@"
DisplayOptionMenu: ; 5e8a (1:5e8a)
hlCoord 0, 0
coord hl, 0, 0
ld b,3
ld c,18
call TextBoxBorder
hlCoord 0, 5
coord hl, 0, 5
ld b,3
ld c,18
call TextBoxBorder
hlCoord 0, 10
coord hl, 0, 10
ld b,3
ld c,18
call TextBoxBorder
hlCoord 1, 1
coord hl, 1, 1
ld de,TextSpeedOptionText
call PlaceString
hlCoord 1, 6
coord hl, 1, 6
ld de,BattleAnimationOptionText
call PlaceString
hlCoord 1, 11
coord hl, 1, 11
ld de,BattleStyleOptionText
call PlaceString
hlCoord 2, 16
coord hl, 2, 16
ld de,OptionMenuCancelText
call PlaceString
xor a
@ -639,7 +639,7 @@ SetCursorPositionsFromOptions: ; 604c (1:604c)
dec hl
ld a,[hl]
ld [wOptionsTextSpeedCursorX],a ; text speed cursor X coordinate
hlCoord 0, 3
coord hl, 0, 3
call .placeUnfilledRightArrow
sla c
ld a,1 ; On
@ -647,7 +647,7 @@ SetCursorPositionsFromOptions: ; 604c (1:604c)
ld a,10 ; Off
.storeBattleAnimationCursorX
ld [wOptionsBattleAnimCursorX],a ; battle animation cursor X coordinate
hlCoord 0, 8
coord hl, 0, 8
call .placeUnfilledRightArrow
sla c
ld a,1
@ -655,10 +655,10 @@ SetCursorPositionsFromOptions: ; 604c (1:604c)
ld a,10
.storeBattleStyleCursorX
ld [wOptionsBattleStyleCursorX],a ; battle style cursor X coordinate
hlCoord 0, 13
coord hl, 0, 13
call .placeUnfilledRightArrow
; cursor in front of Cancel
hlCoord 0, 16
coord hl, 0, 16
ld a,1
.placeUnfilledRightArrow
ld e,a

View file

@ -4,7 +4,7 @@ AskName: ; 64eb (1:64eb)
push hl
ld a, [W_ISINBATTLE]
dec a
hlCoord 0, 0
coord hl, 0, 0
ld b, $4
ld c, $b
call z, ClearScreenArea ; only if in wild batle
@ -13,7 +13,7 @@ AskName: ; 64eb (1:64eb)
call GetMonName
ld hl, DoYouWantToNicknameText
call PrintText
hlCoord 14, 7
coord hl, 14, 7
ld bc, $80f
ld a, TWO_OPTION_MENU
ld [wTextBoxID], a
@ -93,7 +93,7 @@ DisplayNamingScreen: ; 6596 (1:6596)
call LoadHpBarAndStatusTilePatterns
call LoadEDTile
callba LoadMonPartySpriteGfx
hlCoord 0, 4
coord hl, 0, 4
ld b, $9
ld c, $12
call TextBoxBorder
@ -343,7 +343,7 @@ PrintAlphabet: ; 676f (1:676f)
jr nz, .lowercase
ld de, UpperCaseAlphabet
.lowercase
hlCoord 2, 5
coord hl, 2, 5
ld bc, $509 ; 5 rows, 9 columns
.outerLoop
push bc
@ -374,13 +374,13 @@ PrintNicknameAndUnderscores: ; 680e (1:680e)
call CalcStringLength
ld a, c
ld [wHPBarMaxHP], a
hlCoord 10, 2
coord hl, 10, 2
ld bc, $10a
call ClearScreenArea
hlCoord 10, 2
coord hl, 10, 2
ld de, wcf4b
call PlaceString
hlCoord 10, 3
coord hl, 10, 3
ld a, [wNamingScreenType]
cp NAME_MON_SCREEN
jr nc, .pokemon1
@ -419,7 +419,7 @@ PrintNicknameAndUnderscores: ; 680e (1:680e)
.emptySpacesRemaining
ld c, a
ld b, $0
hlCoord 10, 3
coord hl, 10, 3
add hl, bc
ld [hl], $77 ; raised underscore tile id
ret
@ -467,7 +467,7 @@ CalcStringLength: ; 68eb (1:68eb)
jr .loop
PrintNamingText: ; 68f8 (1:68f8)
hlCoord 0, 1
coord hl, 0, 1
ld a, [wNamingScreenType]
ld de, YourTextString
and a
@ -482,12 +482,12 @@ PrintNamingText: ; 68f8 (1:68f8)
pop af
ld [wd11e], a
call GetMonName
hlCoord 4, 1
coord hl, 4, 1
call PlaceString
ld hl, $1
add hl, bc
ld [hl], $c9
hlCoord 1, 3
coord hl, 1, 3
ld de, NicknameTextString
jr .placeString
.notNickname

View file

@ -30,7 +30,7 @@ RedrawPartyMenu_: ; 12ce3 (4:6ce3)
jp z,.printMessage
call ErasePartyMenuCursors
callba SendBlkPacket_PartyMenu
hlCoord 3, 0
coord hl, 3, 0
ld de,wPartySpecies
xor a
ld c,a

View file

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

View file

@ -118,7 +118,7 @@ HandlePokedexSideMenu: ; 4006d (10:406d)
pop af
ld [wCurrentMenuItem],a
push bc
hlCoord 0, 3
coord hl, 0, 3
ld de,20
ld bc,$7f0d ; 13 blank tiles
call DrawTileLine ; cover up the menu cursor in the pokemon list
@ -126,7 +126,7 @@ HandlePokedexSideMenu: ; 4006d (10:406d)
ret
.buttonBPressed
push bc
hlCoord 15, 10
coord hl, 15, 10
ld de,20
ld bc,$7f07 ; 7 blank tiles
call DrawTileLine ; cover up the menu cursor in the side menu
@ -153,43 +153,43 @@ HandlePokedexListMenu: ; 40111 (10:4111)
xor a
ld [H_AUTOBGTRANSFERENABLED],a
; draw the horizontal line separating the seen and owned amounts from the menu
hlCoord 15, 8
coord hl, 15, 8
ld a,$7a ; horizontal line tile
ld [hli],a
ld [hli],a
ld [hli],a
ld [hli],a
ld [hli],a
hlCoord 14, 0
coord hl, 14, 0
ld [hl],$71 ; vertical line tile
hlCoord 14, 1
coord hl, 14, 1
call DrawPokedexVerticalLine
hlCoord 14, 9
coord hl, 14, 9
call DrawPokedexVerticalLine
ld hl,wPokedexSeen
ld b,wPokedexSeenEnd - wPokedexSeen
call CountSetBits
ld de,wd11e
hlCoord 16, 3
coord hl, 16, 3
ld bc,$0103
call PrintNumber ; print number of seen pokemon
ld hl,wPokedexOwned
ld b,wPokedexOwnedEnd - wPokedexOwned
call CountSetBits
ld de,wd11e
hlCoord 16, 6
coord hl, 16, 6
ld bc,$0103
call PrintNumber ; print number of owned pokemon
hlCoord 16, 2
coord hl, 16, 2
ld de,PokedexSeenText
call PlaceString
hlCoord 16, 5
coord hl, 16, 5
ld de,PokedexOwnText
call PlaceString
hlCoord 1, 1
coord hl, 1, 1
ld de,PokedexContentsText
call PlaceString
hlCoord 16, 10
coord hl, 16, 10
ld de,PokedexMenuItemsText
call PlaceString
; find the highest pokedex number among the pokemon the player has seen
@ -211,10 +211,10 @@ HandlePokedexListMenu: ; 40111 (10:4111)
.loop
xor a
ld [H_AUTOBGTRANSFERENABLED],a
hlCoord 4, 2
coord hl, 4, 2
ld bc,$0e0a
call ClearScreenArea
hlCoord 1, 3
coord hl, 1, 3
ld a,[wListScrollOffset]
ld [wd11e],a
ld d,7
@ -411,18 +411,18 @@ ShowPokedexDataInternal: ; 402e2 (10:42e2)
push af
xor a
ld [hTilesetType],a
hlCoord 0, 0
coord hl, 0, 0
ld de,1
ld bc,$6414
call DrawTileLine ; draw top border
hlCoord 0, 17
coord hl, 0, 17
ld b,$6f
call DrawTileLine ; draw bottom border
hlCoord 0, 1
coord hl, 0, 1
ld de,20
ld bc,$6610
call DrawTileLine ; draw left border
hlCoord 19, 1
coord hl, 19, 1
ld b,$67
call DrawTileLine ; draw right border
ld a,$63 ; upper left corner tile
@ -433,14 +433,14 @@ ShowPokedexDataInternal: ; 402e2 (10:42e2)
Coorda 0, 17
ld a,$6e ; lower right corner tile
Coorda 19, 17
hlCoord 0, 9
coord hl, 0, 9
ld de,PokedexDataDividerLine
call PlaceString ; draw horizontal divider line
hlCoord 9, 6
coord hl, 9, 6
ld de,HeightWeightText
call PlaceString
call GetMonName
hlCoord 9, 2
coord hl, 9, 2
call PlaceString
ld hl,PokedexEntryPointers
ld a,[wd11e]
@ -452,7 +452,7 @@ ShowPokedexDataInternal: ; 402e2 (10:42e2)
ld a,[hli]
ld e,a
ld d,[hl] ; de = address of pokedex entry
hlCoord 9, 4
coord hl, 9, 4
call PlaceString ; print species name
ld h,b
ld l,c
@ -460,7 +460,7 @@ ShowPokedexDataInternal: ; 402e2 (10:42e2)
ld a,[wd11e]
push af
call IndexToPokedex
hlCoord 2, 8
coord hl, 2, 8
ld a, "№"
ld [hli],a
ld a,$f2
@ -482,7 +482,7 @@ ShowPokedexDataInternal: ; 402e2 (10:42e2)
call Delay3
call GBPalNormal
call GetMonHeader ; load pokemon picture location
hlCoord 1, 1
coord hl, 1, 1
call LoadFlippedFrontSpriteByMonIndex ; draw pokemon picture
ld a,[wcf91]
call PlayCry ; play pokemon cry
@ -495,14 +495,14 @@ ShowPokedexDataInternal: ; 402e2 (10:42e2)
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
hlCoord 12, 6
coord hl, 12, 6
ld bc,$0102
call PrintNumber ; print feet (height)
ld a,$60 ; feet symbol tile (one tick)
ld [hl],a
inc de
inc de ; de = address of inches (height)
hlCoord 15, 6
coord hl, 15, 6
ld bc,$8102
call PrintNumber ; print inches (height)
ld a,$61 ; inches symbol tile (two ticks)
@ -524,10 +524,10 @@ ShowPokedexDataInternal: ; 402e2 (10:42e2)
ld a,[de] ; a = lower byte of weight
ld [hl],a ; store lower byte of weight in [hDexWeight + 1]
ld de,hDexWeight
hlCoord 11, 8
coord hl, 11, 8
ld bc,$0205 ; no leading zeroes, right-aligned, 2 bytes, 5 digits
call PrintNumber ; print weight
hlCoord 14, 8
coord hl, 14, 8
ld a,[hDexWeight + 1]
sub a,10
ld a,[hDexWeight]
@ -545,7 +545,7 @@ ShowPokedexDataInternal: ; 402e2 (10:42e2)
ld [hDexWeight],a ; restore original value of [hDexWeight]
pop hl
inc hl ; hl = address of pokedex description text
bcCoord 1, 11
coord bc, 1, 11
ld a,2
ld [$fff4],a
call TextCommandProcessor ; print pokedex description text

View file

@ -22,7 +22,7 @@ CeladonPrizeMenu: ; 5271b (14:671b)
ld a,$01
ld [wTopMenuItemX],a
call PrintPrizePrice
hlCoord 0, 2
coord hl, 0, 2
ld b,$08
ld c,$10
call TextBoxBorder
@ -93,42 +93,42 @@ GetPrizeMenuId: ; 5278e (14:678e)
ld a,[W_PRIZE1]
ld [wd11e],a
call GetItemName
hlCoord 2, 4
coord hl, 2, 4
call PlaceString
ld a,[W_PRIZE2]
ld [wd11e],a
call GetItemName
hlCoord 2, 6
coord hl, 2, 6
call PlaceString
ld a,[W_PRIZE3]
ld [wd11e],a
call GetItemName
hlCoord 2, 8
coord hl, 2, 8
call PlaceString
jr .putNoThanksText
.putMonName
ld a,[W_PRIZE1]
ld [wd11e],a
call GetMonName
hlCoord 2, 4
coord hl, 2, 4
call PlaceString
ld a,[W_PRIZE2]
ld [wd11e],a
call GetMonName
hlCoord 2, 6
coord hl, 2, 6
call PlaceString
ld a,[W_PRIZE3]
ld [wd11e],a
call GetMonName
hlCoord 2, 8
coord hl, 2, 8
call PlaceString
.putNoThanksText
hlCoord 2, 10
coord hl, 2, 10
ld de,NoThanksText
call PlaceString
; put prices on the right side of the textbox
ld de,wd141
hlCoord 13, 5
coord hl, 13, 5
; reg. c:
; [low nybble] number of bytes
; [bit 765 = %100] space-padding (not zero-padding)
@ -137,29 +137,29 @@ GetPrizeMenuId: ; 5278e (14:678e)
; used by text-command $02)
call PrintBCDNumber
ld de,wd143
hlCoord 13, 7
coord hl, 13, 7
ld c,(%1 << 7 | 2)
call PrintBCDNumber
ld de,wd145
hlCoord 13, 9
coord hl, 13, 9
ld c,(1 << 7 | 2)
jp PrintBCDNumber
INCLUDE "data/prizes.asm"
PrintPrizePrice: ; 5287a (14:687a)
hlCoord 11, 0
coord hl, 11, 0
ld b,$01
ld c,$07
call TextBoxBorder
call UpdateSprites
hlCoord 12, 0
coord hl, 12, 0
ld de,.CoinText
call PlaceString
hlCoord 13, 1
coord hl, 13, 1
ld de,.SixSpacesText
call PlaceString
hlCoord 13, 1
coord hl, 13, 1
ld de,wPlayerCoins
ld c,%10000010
call PrintBCDNumber

View file

@ -285,7 +285,7 @@ StartMenu_Pokemon: ; 130a9 (4:70a9)
; writes a blank tile to all possible menu cursor positions on the party menu
ErasePartyMenuCursors: ; 132ed (4:72ed)
hlCoord 0, 1
coord hl, 0, 1
ld bc,2 * 20 ; menu cursor positions are 2 rows apart
ld a,6 ; 6 menu cursor positions
.loop
@ -526,10 +526,10 @@ DrawTrainerInfo: ; 1349a (4:749a)
ld bc,(BANK(RedPicFront) << 8) | $01
predef DisplayPicCenteredOrUpperRight
call DisableLCD
hlCoord 0, 2
coord hl, 0, 2
ld a," "
call TrainerInfo_DrawVerticalLine
hlCoord 1, 2
coord hl, 1, 2
call TrainerInfo_DrawVerticalLine
ld hl,vChars2 + $70
ld de,vChars2
@ -572,7 +572,7 @@ DrawTrainerInfo: ; 1349a (4:749a)
dec a
ld [hli],a
ld [hl],1
hlCoord 0, 0
coord hl, 0, 0
call TrainerInfo_DrawTextBox
ld hl,wTrainerInfoTextBoxWidthPlus1
ld a,16 + 1
@ -580,27 +580,27 @@ DrawTrainerInfo: ; 1349a (4:749a)
dec a
ld [hli],a
ld [hl],3
hlCoord 1, 10
coord hl, 1, 10
call TrainerInfo_DrawTextBox
hlCoord 0, 10
coord hl, 0, 10
ld a,$d7
call TrainerInfo_DrawVerticalLine
hlCoord 19, 10
coord hl, 19, 10
call TrainerInfo_DrawVerticalLine
hlCoord 6, 9
coord hl, 6, 9
ld de,TrainerInfo_BadgesText
call PlaceString
hlCoord 2, 2
coord hl, 2, 2
ld de,TrainerInfo_NameMoneyTimeText
call PlaceString
hlCoord 7, 2
coord hl, 7, 2
ld de,wPlayerName
call PlaceString
hlCoord 8, 4
coord hl, 8, 4
ld de,wPlayerMoney
ld c,$e3
call PrintBCDNumber
hlCoord 9, 6
coord hl, 9, 6
ld de,W_PLAYTIMEHOURS + 1 ; hours
ld bc,$4103
call PrintNumber
@ -713,7 +713,7 @@ SwitchPartyMon: ; 13613 (4:7613)
SwitchPartyMon_ClearGfx: ; 13625 (4:7625)
push af
hlCoord 0, 0
coord hl, 0, 0
ld bc, SCREEN_WIDTH * 2
call AddNTimes
ld c, SCREEN_WIDTH * 2

View file

@ -105,7 +105,7 @@ StatusScreen: ; 12953 (4:6953)
push af
xor a
ld [hTilesetType], a
hlCoord 19, 1
coord hl, 19, 1
ld bc, $060a
call DrawLineBox ; Draws the box around name, HP and status
ld de, $fffa
@ -113,54 +113,54 @@ StatusScreen: ; 12953 (4:6953)
ld [hl], $f2 ; . after No ("." is a different one)
dec hl
ld [hl], "№"
hlCoord 19, 9
coord hl, 19, 9
ld bc, $0806
call DrawLineBox ; Draws the box around types, ID No. and OT
hlCoord 10, 9
coord hl, 10, 9
ld de, Type1Text
call PlaceString ; "TYPE1/"
hlCoord 11, 3
coord hl, 11, 3
predef DrawHP
ld hl, wcf25
call GetHealthBarColor
ld b, $3
call GoPAL_SET ; SGB palette
hlCoord 16, 6
coord hl, 16, 6
ld de, wLoadedMonStatus
call PrintStatusCondition
jr nz, .StatusWritten
hlCoord 16, 6
coord hl, 16, 6
ld de, OKText
call PlaceString ; "OK"
.StatusWritten
hlCoord 9, 6
coord hl, 9, 6
ld de, StatusText
call PlaceString ; "STATUS/"
hlCoord 14, 2
coord hl, 14, 2
call PrintLevel ; Pokémon level
ld a, [W_MONHDEXNUM]
ld [wd11e], a
ld [wd0b5], a
predef IndexToPokedex
hlCoord 3, 7
coord hl, 3, 7
ld de, wd11e
ld bc, $8103 ; Zero-padded, 3
call PrintNumber ; Pokémon no.
hlCoord 11, 10
coord hl, 11, 10
predef PrintMonType
ld hl, NamePointers2
call .GetStringPointer
ld d, h
ld e, l
hlCoord 9, 1
coord hl, 9, 1
call PlaceString ; Pokémon name
ld hl, OTPointers
call .GetStringPointer
ld d, h
ld e, l
hlCoord 12, 16
coord hl, 12, 16
call PlaceString ; OT
hlCoord 12, 14
coord hl, 12, 14
ld de, wLoadedMonOTID
ld bc, $8205 ; 5
call PrintNumber ; ID Number
@ -168,7 +168,7 @@ StatusScreen: ; 12953 (4:6953)
call PrintStatsBox
call Delay3
call GBPalNormal
hlCoord 1, 0
coord hl, 1, 0
call LoadFlippedFrontSpriteByMonIndex ; draw Pokémon picture
ld a, [wcf91]
call PlayCry ; play Pokémon cry
@ -247,19 +247,19 @@ PrintStatsBox: ; 12ae4 (4:6ae4)
ld a, d
and a ; a is 0 from the status screen
jr nz, .DifferentBox
hlCoord 0, 8
coord hl, 0, 8
ld b, $8
ld c, $8
call TextBoxBorder ; Draws the box
hlCoord 1, 9 ; Start printing stats from here
coord hl, 1, 9 ; Start printing stats from here
ld bc, $0019 ; Number offset
jr .PrintStats
.DifferentBox
hlCoord 9, 2
coord hl, 9, 2
ld b, $8
ld c, $9
call TextBoxBorder
hlCoord 11, 3
coord hl, 11, 3
ld bc, $0018
.PrintStats
push bc
@ -306,16 +306,16 @@ StatusScreen2: ; 12b57 (4:6b57)
ld bc, NUM_MOVES
call CopyData
callab FormatMovesString
hlCoord 9, 2
coord hl, 9, 2
ld bc, $050a
call ClearScreenArea ; Clear under name
hlCoord 19, 3
coord hl, 19, 3
ld [hl], $78
hlCoord 0, 8
coord hl, 0, 8
ld b, $8
ld c, $12
call TextBoxBorder ; Draw move container
hlCoord 2, 9
coord hl, 2, 9
ld de, wMovesString
call PlaceString ; Print moves
ld a, [wNumMovesMinusOne]
@ -324,7 +324,7 @@ StatusScreen2: ; 12b57 (4:6b57)
ld a, $4
sub c
ld b, a ; Number of moves ?
hlCoord 11, 10
coord hl, 11, 10
ld de, SCREEN_WIDTH * 2
ld a, $72 ; special P tile id
call StatusScreen_PrintPP ; Print "PP"
@ -336,7 +336,7 @@ StatusScreen2: ; 12b57 (4:6b57)
call StatusScreen_PrintPP ; Fill the rest with --
.InitPP ; 12bbb
ld hl, wLoadedMonMoves
deCoord 14, 10
coord de, 14, 10
ld b, 0
.PrintPP ; 12bc3
ld a, [hli]
@ -386,7 +386,7 @@ StatusScreen2: ; 12b57 (4:6b57)
cp $4
jr nz, .PrintPP
.PPDone
hlCoord 9, 3
coord hl, 9, 3
ld de, EXPPointsText
call PlaceString
ld a, [wLoadedMonLevel] ; level
@ -396,7 +396,7 @@ StatusScreen2: ; 12b57 (4:6b57)
inc a
ld [wLoadedMonLevel], a ; Increase temporarily if not 100
.Level100
hlCoord 14, 6
coord hl, 14, 6
ld [hl], $70 ; 1-tile "to"
inc hl
inc hl
@ -404,22 +404,22 @@ StatusScreen2: ; 12b57 (4:6b57)
pop af
ld [wLoadedMonLevel], a
ld de, wLoadedMonExp
hlCoord 12, 4
coord hl, 12, 4
ld bc, $0307
call PrintNumber ; exp
call .asm_12c86
ld de, wLoadedMonExp
hlCoord 7, 6
coord hl, 7, 6
ld bc, $0307
call PrintNumber
hlCoord 9, 0
coord hl, 9, 0
call StatusScreen_ClearName
hlCoord 9, 1
coord hl, 9, 1
call StatusScreen_ClearName
ld a, [W_MONHDEXNUM]
ld [wd11e], a
call GetMonName
hlCoord 9, 1
coord hl, 9, 1
call PlaceString
ld a, $1
ld [$ffba], a

View file

@ -17,15 +17,15 @@ VendingMachineMenu: ; 74ee0 (1d:4ee0)
ld [wTopMenuItemX], a
ld hl, wd730
set 6, [hl]
hlCoord 0, 3
coord hl, 0, 3
ld b, 8
ld c, 12
call TextBoxBorder
call UpdateSprites
hlCoord 2, 5
coord hl, 2, 5
ld de, DrinkText
call PlaceString
hlCoord 9, 6
coord hl, 9, 6
ld de, DrinkPriceText
call PlaceString
ld hl, wd730

View file

@ -68,7 +68,7 @@ OakSpeech: ; 6115 (1:6115)
ld [wd0b5],a
ld [wcf91],a
call GetMonHeader
hlCoord 6, 4
coord hl, 6, 4
call LoadFlippedFrontSpriteByMonIndex
call MovePicLeft
ld hl,OakSpeechText2
@ -141,7 +141,7 @@ OakSpeech: ; 6115 (1:6115)
ld [MBC1RomBank],a
ld c,20
call DelayFrames
hlCoord 6, 5
coord hl, 6, 5
ld b,7
ld c,7
call ClearScreenArea
@ -224,9 +224,9 @@ IntroDisplayPicCenteredOrUpperRight: ; 62a4 (1:62a4)
pop bc
ld a,c
and a
hlCoord 15, 1
coord hl, 15, 1
jr nz,.next
hlCoord 6, 4
coord hl, 6, 4
.next
xor a
ld [$FFE1],a

View file

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

View file

@ -20,7 +20,7 @@ GiveFossilToCinnabarLab: ; 61006 (18:5006)
dec l
ld b, l
ld c, $d
hlCoord 0, 0
coord hl, 0, 0
call TextBoxBorder
call UpdateSprites
call Func_610c2
@ -101,7 +101,7 @@ Func_610c2: ; 610c2 (18:50c2)
push hl
ld [wd11e], a
call GetItemName
hlCoord 2, 2
coord hl, 2, 2
ld a, [$ffdb]
ld bc, SCREEN_WIDTH * 2
call AddNTimes

View file

@ -704,7 +704,7 @@ GetTileSpriteStandsOn: ; 5207 (1:5207)
add SCREEN_WIDTH ; screen X tile + 20
ld d, $0
ld e, a
hlCoord 0, 0
coord hl, 0, 0
add hl, bc
add hl, bc
add hl, bc

View file

@ -84,7 +84,7 @@ DisplayPokemartDialogue_: ; 6c20 (1:6c20)
ld hl,PokemartTellSellPriceText
ld bc,$0e01
call PrintText
hlCoord 14, 7
coord hl, 14, 7
ld bc,$080f
ld a,TWO_OPTION_MENU
ld [wTextBoxID],a
@ -162,7 +162,7 @@ DisplayPokemartDialogue_: ; 6c20 (1:6c20)
call CopyStringToCF4B ; copy name to wcf4b
ld hl,PokemartTellBuyPriceText
call PrintText
hlCoord 14, 7
coord hl, 14, 7
ld bc,$080f
ld a,TWO_OPTION_MENU
ld [wTextBoxID],a

View file

@ -151,10 +151,10 @@ SaveSAV: ; 7370a (1c:770a)
ret nz
.save
call SaveSAVtoSRAM
hlCoord 1, 13
coord hl, 1, 13
ld bc,$0412
call ClearScreenArea ; clear area 4x12 starting at 13,1
hlCoord 1, 14
coord hl, 1, 14
ld de,NowSavingString
call PlaceString
ld c,120
@ -172,7 +172,7 @@ NowSavingString:
SaveSAVConfirm: ; 73768 (1c:7768)
call PrintText
hlCoord 0, 7
coord hl, 0, 7
ld bc,$0801
ld a,TWO_OPTION_MENU
ld [wTextBoxID],a
@ -426,20 +426,20 @@ Func_7393f: ; 7393f (1c:793f)
and $7f
ld [wCurrentMenuItem], a
ld [wLastMenuItem], a
hlCoord 0, 0
coord hl, 0, 0
ld b, $2
ld c, $9
call TextBoxBorder
ld hl, ChooseABoxText
call PrintText
hlCoord 11, 0
coord hl, 11, 0
ld b, $c
ld c, $7
call TextBoxBorder
ld hl, hFlags_0xFFF6
set 2, [hl]
ld de, BoxNames
hlCoord 13, 1
coord hl, 13, 1
call PlaceString
ld hl, hFlags_0xFFF6
res 2, [hl]
@ -448,7 +448,7 @@ Func_7393f: ; 7393f (1c:793f)
cp 9
jr c, .asm_739a6
sub 9
hlCoord 8, 2
coord hl, 8, 2
ld [hl], "1"
add "0"
jr .asm_739a8
@ -456,11 +456,11 @@ Func_7393f: ; 7393f (1c:793f)
add "1"
.asm_739a8
Coorda 9, 2
hlCoord 1, 2
coord hl, 1, 2
ld de, BoxNoText
call PlaceString
call Func_73a84
hlCoord 18, 1
coord hl, 18, 1
ld de, wWhichTrade
ld bc, SCREEN_WIDTH
ld a, $c

View file

@ -79,11 +79,11 @@ MainSlotMachineLoop: ; 37395 (d:7395)
ld [wCurrentMenuItem], a
ld [wLastMenuItem], a
ld [wMenuWatchMovingOutOfBounds], a
hlCoord 14, 11
coord hl, 14, 11
ld b, 5
ld c, 4
call TextBoxBorder
hlCoord 16, 12
coord hl, 16, 12
ld de, CoinMultiplierSlotMachineText
call PlaceString
call HandleMenuInput
@ -133,7 +133,7 @@ MainSlotMachineLoop: ; 37395 (d:7395)
.skip2
ld hl, OneMoreGoSlotMachineText
call PrintText
hlCoord 14, 12
coord hl, 14, 12
ld bc, $0d0f
xor a ; YES_NO_MENU
ld [wTwoOptionMenuID], a
@ -614,7 +614,7 @@ YeahText: ; 37722 (d:7722)
SlotMachine_PrintWinningSymbol: ; 37728 (d:7728)
; prints winning symbol and down arrow in text box
hlCoord 2, 14
coord hl, 2, 14
ld a, [wSlotMachineWinningSymbol]
add $25
ld [hli], a
@ -626,7 +626,7 @@ SlotMachine_PrintWinningSymbol: ; 37728 (d:7728)
ld [hli], a
inc a
ld [hl], a
hlCoord 18, 16
coord hl, 18, 16
ld [hl], $ee ; down arrow
ret
@ -641,13 +641,13 @@ SlotMachine_SubtractBetFromPlayerCoins: ; 37741 (d:7741)
predef SubBCDPredef
SlotMachine_PrintCreditCoins: ; 37754 (d:7754)
hlCoord 5, 1
coord hl, 5, 1
ld de, wPlayerCoins
ld c, $2
jp PrintBCDNumber
SlotMachine_PrintPayoutCoins: ; 3775f (d:775f)
hlCoord 11, 1
coord hl, 11, 1
ld de, wPayoutCoins
ld bc, $8204 ; 2 bytes, 4 digits, leading zeroes
jp PrintNumber
@ -724,19 +724,19 @@ SlotMachine_LightBalls: ; 377d5 (d:77d5)
jr z, SlotMachine_UpdateTwoCoinBallTiles
SlotMachine_UpdateThreeCoinBallTiles: ; 377e3 (d:77e3)
hlCoord 3, 2
coord hl, 3, 2
call SlotMachine_UpdateBallTiles
hlCoord 3, 10
coord hl, 3, 10
call SlotMachine_UpdateBallTiles
SlotMachine_UpdateTwoCoinBallTiles: ; 377ef (d:77ef)
hlCoord 3, 4
coord hl, 3, 4
call SlotMachine_UpdateBallTiles
hlCoord 3, 8
coord hl, 3, 8
call SlotMachine_UpdateBallTiles
SlotMachine_UpdateOneCoinBallTiles: ; 377fb (d:77fb)
hlCoord 3, 6
coord hl, 3, 6
SlotMachine_UpdateBallTiles: ; 377fe (d:77fe)
ld a, [wd08a]
@ -863,7 +863,7 @@ LoadSlotMachineTiles: ; 378a8 (d:78a8)
ld a, BANK(SlotMachineTiles2)
call FarCopyData2
ld hl, SlotMachineMap
deCoord 0, 0
coord de, 0, 0
ld bc, $00f0
call CopyData
call EnableLCD

View file

@ -70,7 +70,7 @@ ENDC
call ClearBothBGMaps
; place tiles for pokemon logo (except for the last row)
hlCoord 2, 1
coord hl, 2, 1
ld a, $80
ld de, SCREEN_WIDTH
ld c, 6
@ -88,7 +88,7 @@ ENDC
jr nz, .pokemonLogoTileLoop
; place tiles for the last row of the pokemon logo
hlCoord 2, 7
coord hl, 2, 7
ld a, $31
ld b, $10
.pokemonLogoLastTileRowLoop
@ -105,7 +105,7 @@ ENDC
ld [hl], a
; place tiles for title screen copyright
hlCoord 2, 17
coord hl, 2, 17
ld de, .tileScreenCopyrightTiles
ld b, $10
.tileScreenCopyrightTilesLoop
@ -362,7 +362,7 @@ ClearBothBGMaps: ; 4519 (1:4519)
LoadTitleMonSprite: ; 4524 (1:4524)
ld [wcf91], a
ld [wd0b5], a
hlCoord 5, 10
coord hl, 5, 10
call GetMonHeader
jp LoadFrontSpriteByMonIndex
@ -381,7 +381,7 @@ LoadCopyrightTiles: ; 4541 (1:4541)
ld hl, vChars2 + $600
ld bc, (BANK(NintendoCopyrightLogoGraphics) << 8) + $1c
call CopyVideoData
hlCoord 2, 7
coord hl, 2, 7
ld de, CopyrightTextString
jp PlaceString
@ -395,7 +395,7 @@ INCLUDE "data/title_mons.asm"
; prints version text (red, blue)
PrintGameVersionOnTitleScreen: ; 4598 (1:4598)
hlCoord 7, 8
coord hl, 7, 8
ld de, VersionOnTitleScreenText
jp PlaceString

View file

@ -11,7 +11,7 @@ DisplayTownMap: ; 70e3e (1c:4e3e)
push af
ld b, $0
call DrawPlayerOrBirdSprite ; player sprite
hlCoord 1, 0
coord hl, 1, 0
ld de, wcd6d
call PlaceString
ld hl, wOAMBuffer
@ -28,7 +28,7 @@ DisplayTownMap: ; 70e3e (1c:4e3e)
jr .enterLoop
.townMapLoop
hlCoord 0, 0
coord hl, 0, 0
ld bc, $114
call ClearScreenArea
ld hl, TownMapOrder
@ -55,7 +55,7 @@ DisplayTownMap: ; 70e3e (1c:4e3e)
inc de
cp $50
jr nz, .copyMapName
hlCoord 1, 0
coord hl, 1, 0
ld de, wcd6d
call PlaceString
ld hl, wOAMBuffer + $10
@ -117,7 +117,7 @@ LoadTownMap_Nest: ; 70f60 (1c:4f60)
push hl
call DisplayWildLocations
call GetMonName
hlCoord 1, 0
coord hl, 1, 0
call PlaceString
ld h, b
ld l, c
@ -152,34 +152,34 @@ LoadTownMap_Fly: ; 70f90 (1c:4f90)
push af
ld [hl], $ff
push hl
hlCoord 0, 0
coord hl, 0, 0
ld de, ToText
call PlaceString
ld a, [W_CURMAP]
ld b, $0
call DrawPlayerOrBirdSprite
ld hl, wFlyLocationsList
deCoord 18, 0
coord de, 18, 0
.townMapFlyLoop
ld a, $7f
ld [de], a
push hl
push hl
hlCoord 3, 0
coord hl, 3, 0
ld bc, $10f
call ClearScreenArea
pop hl
ld a, [hl]
ld b, $4
call DrawPlayerOrBirdSprite ; draw bird sprite
hlCoord 3, 0
coord hl, 3, 0
ld de, wcd6d
call PlaceString
ld c, 15
call DelayFrames
hlCoord 18, 0
coord hl, 18, 0
ld [hl], $ed
hlCoord 19, 0
coord hl, 19, 0
ld [hl], $ee
pop hl
.inputLoop
@ -218,7 +218,7 @@ LoadTownMap_Fly: ; 70f90 (1c:4f90)
ld [hl], a
ret
.pressedUp
deCoord 18, 0
coord de, 18, 0
inc hl
ld a, [hl]
cp $ff
@ -230,7 +230,7 @@ LoadTownMap_Fly: ; 70f90 (1c:4f90)
ld hl, wFlyLocationsList
jp .townMapFlyLoop
.pressedDown
deCoord 19, 0
coord de, 19, 0
dec hl
ld a, [hl]
cp $ff
@ -276,7 +276,7 @@ LoadTownMap: ; 7109b (1c:509b)
call GBPalWhiteOutWithDelay3
call ClearScreen
call UpdateSprites
hlCoord 0, 0
coord hl, 0, 0
ld b, $12
ld c, $12
call TextBoxBorder
@ -291,7 +291,7 @@ LoadTownMap: ; 7109b (1c:509b)
ld bc, $8
ld a, BANK(MonNestIcon)
call FarCopyDataDouble
hlCoord 0, 0
coord hl, 0, 0
ld de, CompressedMap
.nextTile
ld a, [de]
@ -394,11 +394,11 @@ DisplayWildLocations: ; 711ef (1c:51ef)
and a ; were any OAM entries written?
jr nz, .drawPlayerSprite
; if no OAM entries were written, print area unknown text
hlCoord 1, 7
coord hl, 1, 7
ld b, $2
ld c, $f
call TextBoxBorder
hlCoord 2, 9
coord hl, 2, 9
ld de, AreaUnknownText
call PlaceString
jr .done

View file

@ -148,7 +148,7 @@ Trade_Delay80: ; 41191 (10:5191)
jp DelayFrames
Trade_ClearTileMap: ; 41196 (10:5196)
hlCoord 0, 0
coord hl, 0, 0
ld bc, 20 * 18
ld a, " "
jp FillMemory
@ -234,7 +234,7 @@ Trade_ShowPlayerMon: ; 41245 (10:5245)
ld [hSCX], a
xor a
ld [H_AUTOBGTRANSFERENABLED], a
hlCoord 4, 0
coord hl, 4, 0
ld b, 6
ld c, 10
call TextBoxBorder
@ -283,7 +283,7 @@ Trade_DrawOpenEndOfLinkCable: ; 41298 (10:5298)
call DelayFrame
ld a, %10001011
ld [rLCDC], a
hlCoord 6, 2
coord hl, 6, 2
ld b, $7 ; open end of link cable tile ID list index
call CopyTileIDsFromList_ZeroBaseTileID
call Trade_CopyTileMapToVRAM
@ -355,7 +355,7 @@ Trade_ShowEnemyMon: ; 41336 (10:5336)
ld a, TRADE_BALL_TILT_ANIM
call Trade_ShowAnimation
call Trade_ShowClearedWindow
hlCoord 4, 10
coord hl, 4, 10
ld b, 6
ld c, 10
call TextBoxBorder
@ -372,7 +372,7 @@ Trade_ShowEnemyMon: ; 41336 (10:5336)
ld a, [wTradedEnemyMonSpecies]
call PlayCry
call Trade_Delay100
hlCoord 4, 10
coord hl, 4, 10
ld bc, $80c
call ClearScreenArea
jp PrintTradeTakeCareText
@ -464,7 +464,7 @@ Trade_DrawLeftGameboy: ; 4142d (10:542d)
call Trade_ClearTileMap
; draw link cable
hlCoord 11, 4
coord hl, 11, 4
ld a, $5d
ld [hli], a
ld a, $5e
@ -475,16 +475,16 @@ Trade_DrawLeftGameboy: ; 4142d (10:542d)
jr nz, .loop
; draw gameboy pic
hlCoord 5, 3
coord hl, 5, 3
ld b, $6
call CopyTileIDsFromList_ZeroBaseTileID
; draw text box with player name below gameboy pic
hlCoord 4, 12
coord hl, 4, 12
ld b, 2
ld c, 7
call TextBoxBorder
hlCoord 5, 14
coord hl, 5, 14
ld de, wPlayerName
call PlaceString
@ -494,7 +494,7 @@ Trade_DrawRightGameboy: ; 4145c (10:545c)
call Trade_ClearTileMap
; draw horizontal segment of link cable
hlCoord 0, 4
coord hl, 0, 4
ld a, $5e
ld c, $e
.loop
@ -522,16 +522,16 @@ Trade_DrawRightGameboy: ; 4145c (10:545c)
ld [hl], a
; draw gameboy pic
hlCoord 7, 8
coord hl, 7, 8
ld b, $6
call CopyTileIDsFromList_ZeroBaseTileID
; draw text box with enemy name above link cable
hlCoord 6, 0
coord hl, 6, 0
ld b, $2
ld c, $7
call TextBoxBorder
hlCoord 7, 2
coord hl, 7, 2
ld de, wLinkEnemyTrainerName
call PlaceString
@ -540,7 +540,7 @@ Trade_DrawRightGameboy: ; 4145c (10:545c)
Trade_DrawCableAcrossScreen: ; 4149f (10:549f)
; Draws the link cable across the screen.
call Trade_ClearTileMap
hlCoord 0, 4
coord hl, 0, 4
ld a, $5e
ld c, SCREEN_WIDTH
.loop
@ -553,7 +553,7 @@ Trade_CopyCableTilesOffScreen: ; 414ae (10:54ae)
; This is used to copy the link cable tiles off screen so that the cable
; continues when the screen is scrolled.
push hl
hlCoord 0, 4
coord hl, 0, 4
call CopyToScreenEdgeTiles
pop hl
ld a, h
@ -737,7 +737,7 @@ Trade_LoadMonSprite: ; 415a4 (10:55a4)
xor $1
ld [H_AUTOBGTRANSFERENABLED], a
call GetMonHeader
hlCoord 7, 2
coord hl, 7, 2
call LoadFlippedFrontSpriteByMonIndex
ld c, 10
jp DelayFrames

View file

@ -1,43 +1,43 @@
Trade_PrintPlayerMonInfoText: ; 42769 (10:6769)
hlCoord 5, 0
coord hl, 5, 0
ld de,Trade_MonInfoText
call PlaceString
ld a,[wTradedPlayerMonSpecies]
ld [wd11e],a
predef IndexToPokedex
hlCoord 9, 0
coord hl, 9, 0
ld de,wd11e
ld bc,$8103
call PrintNumber
hlCoord 5, 2
coord hl, 5, 2
ld de,wcf4b
call PlaceString
hlCoord 8, 4
coord hl, 8, 4
ld de,wTradedPlayerMonOT
call PlaceString
hlCoord 8, 6
coord hl, 8, 6
ld de,wTradedPlayerMonOTID
ld bc,$8205
jp PrintNumber
Trade_PrintEnemyMonInfoText: ; 427a7 (10:67a7)
hlCoord 5, 10
coord hl, 5, 10
ld de,Trade_MonInfoText
call PlaceString
ld a,[wTradedEnemyMonSpecies]
ld [wd11e],a
predef IndexToPokedex
hlCoord 9, 10
coord hl, 9, 10
ld de,wd11e
ld bc,$8103
call PrintNumber
hlCoord 5, 12
coord hl, 5, 12
ld de,wcd6d
call PlaceString
hlCoord 8, 14
coord hl, 8, 14
ld de,wTradedEnemyMonOT
call PlaceString
hlCoord 8, 16
coord hl, 8, 16
ld de,wTradedEnemyMonOTID
ld bc,$8205
jp PrintNumber

View file

@ -1405,7 +1405,7 @@ DisplayListMenuID:: ; 2be6 (0:2be6)
call DisplayTextBoxID ; draw the menu text box
call UpdateSprites ; disable sprites behind the text box
; the code up to .skipMovingSprites appears to be useless
hlCoord 4, 2 ; coordinates of upper left corner of menu text box
coord hl, 4, 2 ; coordinates of upper left corner of menu text box
ld de,$090e ; height and width of menu text box
ld a,[wListMenuID]
and a ; is it a PC pokemon list?
@ -1446,7 +1446,7 @@ DisplayListMenuIDLoop:: ; 2c53 (0:2c53)
call DelayFrames
xor a
ld [wCurrentMenuItem],a
hlCoord 5, 4
coord hl, 5, 4
ld a,l
ld [wMenuCursorLocation],a
ld a,h
@ -1568,23 +1568,23 @@ DisplayListMenuIDLoop:: ; 2c53 (0:2c53)
DisplayChooseQuantityMenu:: ; 2d57 (0:2d57)
; text box dimensions/coordinates for just quantity
hlCoord 15, 9
coord hl, 15, 9
ld b,1 ; height
ld c,3 ; width
ld a,[wListMenuID]
cp a,PRICEDITEMLISTMENU
jr nz,.drawTextBox
; text box dimensions/coordinates for quantity and price
hlCoord 7, 9
coord hl, 7, 9
ld b,1 ; height
ld c,11 ; width
.drawTextBox
call TextBoxBorder
hlCoord 16, 10
coord hl, 16, 10
ld a,[wListMenuID]
cp a,PRICEDITEMLISTMENU
jr nz,.printInitialQuantity
hlCoord 8, 10
coord hl, 8, 10
.printInitialQuantity
ld de,InitialQuantityText
call PlaceString
@ -1624,7 +1624,7 @@ DisplayChooseQuantityMenu:: ; 2d57 (0:2d57)
ld a,[wMaxItemQuantity]
ld [hl],a
.handleNewQuantity
hlCoord 17, 10
coord hl, 17, 10
ld a,[wListMenuID]
cp a,PRICEDITEMLISTMENU
jr nz,.printQuantity
@ -1663,13 +1663,13 @@ DisplayChooseQuantityMenu:: ; 2d57 (0:2d57)
ld a,[hDivideBCDQuotient + 2]
ld [hMoney + 2],a
.skipHalvingPrice
hlCoord 12, 10
coord hl, 12, 10
ld de,SpacesBetweenQuantityAndPriceText
call PlaceString
ld de,hMoney ; total price
ld c,$a3
call PrintBCDNumber
hlCoord 9, 10
coord hl, 9, 10
.printQuantity
ld de,wItemQuantity ; current quantity
ld bc,$8102 ; print leading zeroes, 1 byte, 2 digits
@ -1708,7 +1708,7 @@ ExitListMenu:: ; 2e3b (0:2e3b)
ret
PrintListMenuEntries:: ; 2e5a (0:2e5a)
hlCoord 5, 3
coord hl, 5, 3
ld b,$09
ld c,$0e
call ClearScreenArea
@ -1733,7 +1733,7 @@ PrintListMenuEntries:: ; 2e5a (0:2e5a)
jr nc,.noCarry
inc d
.noCarry
hlCoord 6, 4 ; coordinates of first list entry name
coord hl, 6, 4 ; coordinates of first list entry name
ld b,4 ; print 4 names
.loop
ld a,b
@ -3011,7 +3011,7 @@ Func_35f4:: ; 35f4 (0:35f4)
InitYesNoTextBoxParameters:: ; 35ff (0:35ff)
xor a ; YES_NO_MENU
ld [wTwoOptionMenuID], a
hlCoord 14, 7
coord hl, 14, 7
ld bc, $80f
ret
@ -3019,7 +3019,7 @@ YesNoChoicePokeCenter:: ; 360a (0:360a)
call SaveScreenTilesToBuffer1
ld a, HEAL_CANCEL_MENU
ld [wTwoOptionMenuID], a
hlCoord 11, 6
coord hl, 11, 6
ld bc, $80c
jr DisplayYesNoChoice
@ -3027,7 +3027,7 @@ Func_361a:: ; 361a (0:361a)
call SaveScreenTilesToBuffer1
ld a, WIDE_YES_NO_MENU
ld [wTwoOptionMenuID], a
hlCoord 12, 7
coord hl, 12, 7
ld bc, $080d
DisplayYesNoChoice:: ; 3628 (0:3628)
ld a, TWO_OPTION_MENU
@ -3176,7 +3176,7 @@ UncompressSpriteFromDE:: ; 36eb (0:36eb)
SaveScreenTilesToBuffer2:: ; 36f4 (0:36f4)
hlCoord 0, 0
coord hl, 0, 0
ld de, wTileMapBackup2
ld bc, SCREEN_WIDTH * SCREEN_HEIGHT
call CopyData
@ -3193,13 +3193,13 @@ LoadScreenTilesFromBuffer2DisableBGTransfer:: ; 3709 (0:3709)
xor a
ld [H_AUTOBGTRANSFERENABLED], a
ld hl, wTileMapBackup2
deCoord 0, 0
coord de, 0, 0
ld bc, $168
call CopyData
ret
SaveScreenTilesToBuffer1:: ; 3719 (0:3719)
hlCoord 0, 0
coord hl, 0, 0
ld de, wTileMapBackup
ld bc, SCREEN_WIDTH * SCREEN_HEIGHT
jp CopyData
@ -3208,7 +3208,7 @@ LoadScreenTilesFromBuffer1:: ; 3725 (0:3725)
xor a
ld [H_AUTOBGTRANSFERENABLED], a
ld hl, wTileMapBackup
deCoord 0, 0
coord de, 0, 0
ld bc, SCREEN_WIDTH * SCREEN_HEIGHT
call CopyData
ld a, $1
@ -3470,7 +3470,7 @@ WaitForTextScrollButtonPress:: ; 3865 (0:3865)
jr z, .skipAnimation
call TownMapSpriteBlinkingAnimation
.skipAnimation
hlCoord 18, 16
coord hl, 18, 16
call HandleDownArrowBlinkTiming
pop hl
call JoypadLowSensitivity
@ -3946,7 +3946,7 @@ HandleMenuInputPokemonSelection:: ; 3ac2 (0:3ac2)
and a ; was a key pressed?
jr nz,.keyPressed
push hl
hlCoord 18, 11 ; coordinates of blinking down arrow in some menus
coord hl, 18, 11 ; coordinates of blinking down arrow in some menus
call HandleDownArrowBlinkTiming ; blink down arrow (if any)
pop hl
ld a,[wMenuJoypadPollCount]
@ -4037,7 +4037,7 @@ PlaceMenuCursor:: ; 3b7c (0:3b7c)
ld a,[wTopMenuItemY]
and a ; is the y coordinate 0?
jr z,.adjustForXCoord
hlCoord 0, 0
coord hl, 0, 0
ld bc,SCREEN_WIDTH
.topMenuItemLoop
add hl,bc
@ -4207,7 +4207,7 @@ PrintText:: ; 3c49 (0:3c49)
call Delay3
pop hl
Func_3c59:: ; 3c59 (0:3c59)
bcCoord 1, 14
coord bc, 1, 14
jp TextCommandProcessor

View file

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

View file

@ -1420,7 +1420,7 @@ LoadCurrentMapView:: ; 0caa (0:0caa)
ld bc,$0002
add hl,bc
.copyToVisibleAreaBuffer
deCoord 0, 0 ; base address for the tiles that are directly transfered to VRAM during V-blank
coord de, 0, 0 ; base address for the tiles that are directly transfered to VRAM during V-blank
ld b, SCREEN_HEIGHT
.rowLoop2
ld c, SCREEN_WIDTH
@ -1693,7 +1693,7 @@ MoveTileBlockMapPointerNorth:: ; 0e85 (0:0e85)
; the portion of the map that was newly exposed due to the player's movement
ScheduleNorthRowRedraw:: ; 0e91 (0:0e91)
hlCoord 0, 0
coord hl, 0, 0
call CopyToScreenEdgeTiles
ld a,[wMapViewVRAMPointer]
ld [H_SCREENEDGEREDRAWADDR],a
@ -1715,7 +1715,7 @@ CopyToScreenEdgeTiles:: ; 0ea6 (0:0ea6)
ret
ScheduleSouthRowRedraw:: ; 0eb2 (0:0eb2)
hlCoord 0, 16
coord hl, 0, 16
call CopyToScreenEdgeTiles
ld a,[wMapViewVRAMPointer]
ld l,a
@ -1734,7 +1734,7 @@ ScheduleSouthRowRedraw:: ; 0eb2 (0:0eb2)
ret
ScheduleEastColumnRedraw:: ; 0ed3 (0:0ed3)
hlCoord 18, 0
coord hl, 18, 0
call ScheduleColumnRedrawHelper
ld a,[wMapViewVRAMPointer]
ld c,a
@ -1772,7 +1772,7 @@ ScheduleColumnRedrawHelper:: ; 0ef2 (0:0ef2)
ret
ScheduleWestColumnRedraw:: ; 0f08 (0:0f08)
hlCoord 0, 0
coord hl, 0, 0
call ScheduleColumnRedrawHelper
ld a,[wMapViewVRAMPointer]
ld [H_SCREENEDGEREDRAWADDR],a
@ -2323,7 +2323,7 @@ LoadMapData:: ; 1241 (0:1241)
call LoadTilesetTilePatternData
call LoadCurrentMapView
; copy current map view to VRAM
hlCoord 0, 0
coord hl, 0, 0
ld de,vBGMap0
ld b,18
.vramCopyLoop

View file

@ -76,7 +76,7 @@ PlaceNextChar:: ; 1956 (0:1956)
cp $4F
jr nz,.next3
pop hl
hlCoord 1, 16
coord hl, 1, 16
push hl
jp PlaceNextChar_inc
@ -290,13 +290,13 @@ Char51:: ; 1ab4 (0:1ab4)
Coorda 18, 16
call ProtectedDelay3
call ManualTextScroll
hlCoord 1, 13
coord hl, 1, 13
ld bc,$0412
call ClearScreenArea
ld c,20
call DelayFrames
pop de
hlCoord 1, 14
coord hl, 1, 14
jp PlaceNextChar_inc
Char49:: ; 1ad5 (0:1ad5)
@ -305,14 +305,14 @@ Char49:: ; 1ad5 (0:1ad5)
Coorda 18, 16
call ProtectedDelay3
call ManualTextScroll
hlCoord 1, 10
coord hl, 1, 10
ld bc,$0712
call ClearScreenArea
ld c,20
call DelayFrames
pop de
pop hl
hlCoord 1, 11
coord hl, 1, 11
push hl
jp PlaceNextChar_inc
@ -330,13 +330,13 @@ Char4C:: ; 1b0a (0:1b0a)
push de
call Next1B18
call Next1B18
hlCoord 1, 16
coord hl, 1, 16
pop de
jp PlaceNextChar_inc
Next1B18:: ; 1b18 (0:1b18)
hlCoord 0, 14
deCoord 0, 13
coord hl, 0, 14
coord de, 0, 13
ld b,60
.next
ld a,[hli]
@ -344,7 +344,7 @@ Next1B18:: ; 1b18 (0:1b18)
inc de
dec b
jr nz,.next
hlCoord 1, 16
coord hl, 1, 16
ld a, " "
ld b,SCREEN_WIDTH - 2
.next2
@ -499,7 +499,7 @@ TextCommand03:: ; 1bb7 (0:1bb7)
; (no arguments)
TextCommand05:: ; 1bc5 (0:1bc5)
pop hl
bcCoord 1, 16 ; address of second line of dialogue text box
coord bc, 1, 16 ; address of second line of dialogue text box
jp NextTextCommand
; blink arrow and wait for A or B to be pressed
@ -528,7 +528,7 @@ TextCommand07:: ; 1be7 (0:1be7)
call Next1B18 ; scroll up text
call Next1B18
pop hl
bcCoord 1, 16 ; address of second line of dialogue text box
coord bc, 1, 16 ; address of second line of dialogue text box
jp NextTextCommand
; execute asm inline

View file

@ -130,7 +130,7 @@ AutoBgMapTransfer:: ; 1d57 (0:1d57)
dec a
jr z,.transferMiddleThird
.transferBottomThird
hlCoord 0, 12
coord hl, 0, 12
ld sp,hl
ld a,[H_AUTOBGTRANSFERDEST + 1]
ld h,a
@ -141,7 +141,7 @@ AutoBgMapTransfer:: ; 1d57 (0:1d57)
xor a ; TRANSFERTOP
jr .doTransfer
.transferTopThird
hlCoord 0, 0
coord hl, 0, 0
ld sp,hl
ld a,[H_AUTOBGTRANSFERDEST + 1]
ld h,a
@ -150,7 +150,7 @@ AutoBgMapTransfer:: ; 1d57 (0:1d57)
ld a,TRANSFERMIDDLE
jr .doTransfer
.transferMiddleThird
hlCoord 0, 6
coord hl, 0, 6
ld sp,hl
ld a,[H_AUTOBGTRANSFERDEST + 1]
ld h,a

View file

@ -67,22 +67,11 @@ bcd3: MACRO
coins equs "bcd2"
money equs "bcd3"
;\1 = X
;\2 = Y
hlCoord: MACRO
ld hl, wTileMap + 20 * \2 + \1
ENDM
;\1 = X
;\2 = Y
deCoord: MACRO
ld de, wTileMap + 20 * \2 + \1
ENDM
;\1 = X
;\2 = Y
bcCoord: MACRO
ld bc, wTileMap + 20 * \2 + \1
;\1 = r
;\2 = X
;\3 = Y
coord: MACRO
ld \1, wTileMap + 20 * \3 + \2
ENDM
;\1 = X

View file

@ -158,7 +158,7 @@ INCLUDE "engine/overworld/oam.asm"
INCLUDE "engine/oam_dma.asm"
PrintWaitingText:
hlCoord 3, 10
coord hl, 3, 10
ld b, $1
ld c, $b
ld a, [W_ISINBATTLE]
@ -169,7 +169,7 @@ PrintWaitingText:
.asm_4c17
call CableClub_TextBoxBorder
.asm_4c1a
hlCoord 4, 11
coord hl, 4, 11
ld de, WaitingText
call PlaceString
ld c, 50
@ -1005,18 +1005,18 @@ DisplayTextIDInit: ; 7096 (1:7096)
ld a,[wd74b]
bit 5,a ; does the player have the pokedex?
; start menu with pokedex
hlCoord 10, 0
coord hl, 10, 0
ld b,$0e
ld c,$08
jr nz,.drawTextBoxBorder
; start menu without pokedex
hlCoord 10, 0
coord hl, 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
hlCoord 0, 12
coord hl, 0, 12
ld b,$04
ld c,$12
.drawTextBoxBorder
@ -1074,12 +1074,12 @@ DrawStartMenu: ; 710b (1:710b)
ld a,[wd74b]
bit 5,a ; does the player have the pokedex?
; menu with pokedex
hlCoord 10, 0
coord hl, 10, 0
ld b,$0e
ld c,$08
jr nz,.drawTextBoxBorder
; shorter menu if the player doesn't have the pokedex
hlCoord 10, 0
coord hl, 10, 0
ld b,$0c
ld c,$08
.drawTextBoxBorder
@ -1097,7 +1097,7 @@ DrawStartMenu: ; 710b (1:710b)
ld [wMenuWatchMovingOutOfBounds],a
ld hl,wd730
set 6,[hl] ; no pauses between printing each letter
hlCoord 12, 2
coord hl, 12, 2
ld a,[wd74b]
bit 5,a ; does the player have the pokedex?
; case for not having pokdex
@ -1276,7 +1276,7 @@ GetTextBoxIDText: ; 7367 (1:7367)
; hl = address of upper left corner of text box
GetAddressOfScreenCoords: ; 7375 (1:7375)
push bc
hlCoord 0, 0
coord hl, 0, 0
ld bc,20
.loop ; loop to add d rows to the base address
ld a,d
@ -1437,11 +1437,11 @@ DisplayMoneyBox: ; 74ba (1:74ba)
ld a, MONEY_BOX_TEMPLATE
ld [wTextBoxID], a
call DisplayTextBoxID
hlCoord 13, 1
coord hl, 13, 1
ld b, $1
ld c, $6
call ClearScreenArea
hlCoord 12, 1
coord hl, 12, 1
ld de, wPlayerMoney
ld c, $a3
call PrintBCDNumber
@ -1734,14 +1734,14 @@ DisplayFieldMoveMonMenu: ; 76e1 (1:76e1)
jr nz, .fieldMovesExist
; no field moves
hlCoord 11, 11
coord hl, 11, 11
ld b, 5
ld c, 7
call TextBoxBorder
call UpdateSprites
ld a, 12
ld [hFieldMoveMonMenuTopMenuItemX], a
hlCoord 13, 12
coord hl, 13, 12
ld de, PokemonMenuEntries
jp PlaceString
@ -1750,7 +1750,7 @@ DisplayFieldMoveMonMenu: ; 76e1 (1:76e1)
; 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.
hlCoord 0, 11
coord hl, 0, 11
ld a, [wFieldMovesLeftmostXCoord]
dec a
ld e, a
@ -1781,7 +1781,7 @@ DisplayFieldMoveMonMenu: ; 76e1 (1:76e1)
call UpdateSprites
; Calculate the position of the first field move name to print.
hlCoord 0, 12
coord hl, 0, 12
ld a, [wFieldMovesLeftmostXCoord]
inc a
ld e, a
@ -1830,7 +1830,7 @@ DisplayFieldMoveMonMenu: ; 76e1 (1:76e1)
pop hl
ld a, [wFieldMovesLeftmostXCoord]
ld [hFieldMoveMonMenuTopMenuItemX], a
hlCoord 0, 12
coord hl, 0, 12
ld a, [wFieldMovesLeftmostXCoord]
inc a
ld e, a
@ -2316,28 +2316,28 @@ PrintSafariZoneSteps: ; c52f (3:452f)
ret c
cp UNKNOWN_DUNGEON_2
ret nc
hlCoord 0, 0
coord hl, 0, 0
ld b, $3
ld c, $7
call TextBoxBorder
hlCoord 1, 1
coord hl, 1, 1
ld de, wSafariSteps
ld bc, $203
call PrintNumber
hlCoord 4, 1
coord hl, 4, 1
ld de, SafariSteps
call PlaceString
hlCoord 1, 3
coord hl, 1, 3
ld de, SafariBallText
call PlaceString
ld a, [W_NUMSAFARIBALLS]
cp $a
jr nc, .asm_c56d
hlCoord 5, 3
coord hl, 5, 3
ld a, $7f
ld [hl], a
.asm_c56d
hlCoord 6, 3
coord hl, 6, 3
ld de, W_NUMSAFARIBALLS
ld bc, $102
jp PrintNumber
@ -3025,11 +3025,11 @@ DrawBadges: ; ea03 (3:6a03)
ld [hli], a
ld [hl], $60 ; First name
hlCoord 2, 11
coord hl, 2, 11
ld de, wTempObtainedBadgesBooleans
call .DrawBadgeRow
hlCoord 2, 14
coord hl, 2, 14
ld de, wTempObtainedBadgesBooleans + 4
; call .DrawBadgeRow
; ret

View file

@ -51,15 +51,15 @@ BikeShopText1: ; 1d745 (7:5745)
ld [wTopMenuItemX], a
ld hl, wd730
set 6, [hl]
hlCoord 0, 0
coord hl, 0, 0
ld b, $4
ld c, $f
call TextBoxBorder
call UpdateSprites
hlCoord 2, 2
coord hl, 2, 2
ld de, BikeShopMenuText
call PlaceString
hlCoord 8, 3
coord hl, 8, 3
ld de, BikeShopMenuPrice
call PlaceString
ld hl, BikeShopText_1d815

View file

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

View file

@ -63,7 +63,7 @@ CeladonMartRoofScript_4840c: ; 4840c (12:440c)
dec l
ld b, l
ld c, $c
hlCoord 0, 0
coord hl, 0, 0
call TextBoxBorder
call UpdateSprites
call CeladonMartRoofScript_48532
@ -200,7 +200,7 @@ CeladonMartRoofScript_48532: ; 48532 (12:4532)
push hl
ld [wd11e], a
call GetItemName
hlCoord 2, 2
coord hl, 2, 2
ld a, [$ffdb]
ld bc, SCREEN_WIDTH * 2
call AddNTimes

View file

@ -53,7 +53,7 @@ VermilionDock_1db9b: ; 1db9b (7:5b9b)
call DelayFrames
ld b, $9c
call CopyScreenTileBufferToVRAM
hlCoord 0, 10
coord hl, 0, 10
ld bc, $0078
ld a, $14
call FillMemory