mirror of
https://github.com/thornAvery/kep-hack.git
synced 2026-02-06 15:45:24 +13:00
Sync coordinate macros with pokecrystal
This commit is contained in:
parent
45ed05decf
commit
13129459f1
75 changed files with 675 additions and 661 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue