mirror of
https://github.com/thornAvery/kep-hack.git
synced 2026-02-06 15:45:24 +13:00
Use more lb
and other clean up
This commit is contained in:
parent
891627d4ba
commit
f8a9c37a00
106 changed files with 346 additions and 326 deletions
|
|
@ -116,7 +116,7 @@ BillsPCMenu: ; 214e8 (8:54e8)
|
|||
ld [wCurrentMenuItem], a
|
||||
ld hl, vChars2 + $780
|
||||
ld de, PokeballTileGraphics
|
||||
ld bc, (BANK(PokeballTileGraphics) << 8) + $01
|
||||
lb bc, BANK(PokeballTileGraphics), $01
|
||||
call CopyVideoData
|
||||
call LoadScreenTilesFromBuffer2DisableBGTransfer
|
||||
coord hl, 0, 0
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ DisplayDiploma: ; 566e2 (15:66e2)
|
|||
ld a, BANK(CircleTile)
|
||||
call FarCopyData2
|
||||
coord hl, 0, 0
|
||||
ld bc, $1012
|
||||
lb bc, 16, 18
|
||||
predef Diploma_TextBoxBorder
|
||||
ld hl, DiplomaTextPointersAndCoords
|
||||
ld c, $5
|
||||
|
|
@ -41,7 +41,7 @@ DisplayDiploma: ; 566e2 (15:66e2)
|
|||
; Move the player 33 pixels right and set the priority bit so he appears
|
||||
; behind the background layer.
|
||||
ld hl, wOAMBuffer + $01
|
||||
ld bc, $8028
|
||||
lb bc, $80, $28
|
||||
.adjustPlayerGfxLoop
|
||||
ld a, [hl] ; X
|
||||
add 33
|
||||
|
|
|
|||
|
|
@ -90,7 +90,7 @@ LeaguePCShowMon: ; 76610 (1d:6610)
|
|||
ld a, [hli]
|
||||
ld [wHoFMonLevel], a
|
||||
ld de, wcd6d
|
||||
ld bc, $000B
|
||||
ld bc, 11
|
||||
call CopyData
|
||||
ld b, $0B
|
||||
ld c, 0
|
||||
|
|
|
|||
|
|
@ -5,8 +5,8 @@ AskName: ; 64eb (1:64eb)
|
|||
ld a, [W_ISINBATTLE]
|
||||
dec a
|
||||
coord hl, 0, 0
|
||||
ld b, $4
|
||||
ld c, $b
|
||||
ld b, 4
|
||||
ld c, 11
|
||||
call z, ClearScreenArea ; only if in wild batle
|
||||
ld a, [wcf91]
|
||||
ld [wd11e], a
|
||||
|
|
@ -14,7 +14,7 @@ AskName: ; 64eb (1:64eb)
|
|||
ld hl, DoYouWantToNicknameText
|
||||
call PrintText
|
||||
coord hl, 14, 7
|
||||
ld bc, $80f
|
||||
lb bc, 8, 15
|
||||
ld a, TWO_OPTION_MENU
|
||||
ld [wTextBoxID], a
|
||||
call DisplayTextBoxID
|
||||
|
|
@ -64,10 +64,10 @@ DisplayNameRaterScreen: ; 655c (1:655c)
|
|||
call RestoreScreenTilesAndReloadTilePatterns
|
||||
call LoadGBPal
|
||||
ld a, [wcf4b]
|
||||
cp $50
|
||||
cp "@"
|
||||
jr z, .playerCancelled
|
||||
ld hl, wPartyMonNicks
|
||||
ld bc, $b
|
||||
ld bc, 11
|
||||
ld a, [wWhichPokemon]
|
||||
call AddNTimes
|
||||
ld e, l
|
||||
|
|
@ -269,7 +269,7 @@ DisplayNamingScreen: ; 6596 (1:6596)
|
|||
ret z
|
||||
call CalcStringLength
|
||||
dec hl
|
||||
ld [hl], $50
|
||||
ld [hl], "@"
|
||||
ret
|
||||
.pressedRight
|
||||
ld a, [wCurrentMenuItem]
|
||||
|
|
@ -342,7 +342,7 @@ PrintAlphabet: ; 676f (1:676f)
|
|||
ld de, UpperCaseAlphabet
|
||||
.lowercase
|
||||
coord hl, 2, 5
|
||||
ld bc, $509 ; 5 rows, 9 columns
|
||||
lb bc, 5, 9 ; 5 rows, 9 columns
|
||||
.outerLoop
|
||||
push bc
|
||||
.innerLoop
|
||||
|
|
@ -373,7 +373,7 @@ PrintNicknameAndUnderscores: ; 680e (1:680e)
|
|||
ld a, c
|
||||
ld [wNamingScreenNameLength], a
|
||||
coord hl, 10, 2
|
||||
ld bc, $10a
|
||||
lb bc, 1, 10
|
||||
call ClearScreenArea
|
||||
coord hl, 10, 2
|
||||
ld de, wcf4b
|
||||
|
|
@ -458,7 +458,7 @@ CalcStringLength: ; 68eb (1:68eb)
|
|||
ld c, $0
|
||||
.loop
|
||||
ld a, [hl]
|
||||
cp $50
|
||||
cp "@"
|
||||
ret z
|
||||
inc hl
|
||||
inc c
|
||||
|
|
|
|||
|
|
@ -120,7 +120,7 @@ HandlePokedexSideMenu: ; 4006d (10:406d)
|
|||
push bc
|
||||
coord hl, 0, 3
|
||||
ld de,20
|
||||
ld bc,$7f0d ; 13 blank tiles
|
||||
lb bc, " ", 13
|
||||
call DrawTileLine ; cover up the menu cursor in the pokemon list
|
||||
pop bc
|
||||
ret
|
||||
|
|
@ -128,7 +128,7 @@ HandlePokedexSideMenu: ; 4006d (10:406d)
|
|||
push bc
|
||||
coord hl, 15, 10
|
||||
ld de,20
|
||||
ld bc,$7f07 ; 7 blank tiles
|
||||
lb bc, " ", 7
|
||||
call DrawTileLine ; cover up the menu cursor in the side menu
|
||||
pop bc
|
||||
jr .exitSideMenu
|
||||
|
|
@ -212,7 +212,7 @@ HandlePokedexListMenu: ; 40111 (10:4111)
|
|||
xor a
|
||||
ld [H_AUTOBGTRANSFERENABLED],a
|
||||
coord hl, 4, 2
|
||||
ld bc,$0e0a
|
||||
lb bc, 14, 10
|
||||
call ClearScreenArea
|
||||
coord hl, 1, 3
|
||||
ld a,[wListScrollOffset]
|
||||
|
|
@ -413,14 +413,14 @@ ShowPokedexDataInternal: ; 402e2 (10:42e2)
|
|||
ld [hTilesetType],a
|
||||
coord hl, 0, 0
|
||||
ld de,1
|
||||
ld bc,$6414
|
||||
lb bc, $64, SCREEN_WIDTH
|
||||
call DrawTileLine ; draw top border
|
||||
coord hl, 0, 17
|
||||
ld b,$6f
|
||||
ld b, $6f
|
||||
call DrawTileLine ; draw bottom border
|
||||
coord hl, 0, 1
|
||||
ld de,20
|
||||
ld bc,$6610
|
||||
lb bc, $66, $10
|
||||
call DrawTileLine ; draw left border
|
||||
coord hl, 19, 1
|
||||
ld b,$67
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ StartMenu_Pokemon: ; 130a9 (4:70a9)
|
|||
ld [wTextBoxID],a
|
||||
call DisplayTextBoxID ; display pokemon menu options
|
||||
ld hl,wFieldMoves
|
||||
ld bc,$020c ; max menu item ID, top menu item Y
|
||||
lb bc, $02, $0c ; max menu item ID, top menu item Y
|
||||
ld e,5
|
||||
.adjustMenuVariablesLoop
|
||||
dec e
|
||||
|
|
@ -523,7 +523,7 @@ StartMenu_TrainerInfo: ; 13460 (4:7460)
|
|||
; loads tile patterns and draws everything except for gym leader faces / badges
|
||||
DrawTrainerInfo: ; 1349a (4:749a)
|
||||
ld de,RedPicFront
|
||||
ld bc,(BANK(RedPicFront) << 8) | $01
|
||||
lb bc, BANK(RedPicFront), $01
|
||||
predef DisplayPicCenteredOrUpperRight
|
||||
call DisableLCD
|
||||
coord hl, 0, 2
|
||||
|
|
@ -632,7 +632,7 @@ TrainerInfo_BadgesText: ; 13597 (4:7597)
|
|||
; [wTrainerInfoTextBoxNextRowOffset] = distance from the end of a text box row to the start of the next
|
||||
TrainerInfo_DrawTextBox: ; 135a0 (4:75a0)
|
||||
ld a,$79 ; upper left corner tile ID
|
||||
ld de,$7a7b ; top edge and upper right corner tile ID's
|
||||
lb de, $7a, $7b ; top edge and upper right corner tile ID's
|
||||
call TrainerInfo_DrawHorizontalEdge ; draw top edge
|
||||
call TrainerInfo_NextTextBoxRow
|
||||
ld a,[wTrainerInfoTextBoxWidthPlus1]
|
||||
|
|
@ -647,7 +647,7 @@ TrainerInfo_DrawTextBox: ; 135a0 (4:75a0)
|
|||
dec c
|
||||
jr nz,.loop
|
||||
ld a,$7d ; lower left corner tile ID
|
||||
ld de,$777e ; bottom edge and lower right corner tile ID's
|
||||
lb de,$77, $7e ; bottom edge and lower right corner tile ID's
|
||||
|
||||
TrainerInfo_DrawHorizontalEdge: ; 135c3 (4:75c3)
|
||||
ld [hli],a ; place left corner tile
|
||||
|
|
@ -813,36 +813,36 @@ SwitchPartyMon_InitVarOrSwapData: ; 13653 (4:7653)
|
|||
call SkipFixedLengthTextEntries
|
||||
push hl
|
||||
ld de, wSwitchPartyMonTempBuffer
|
||||
ld bc, $b
|
||||
ld bc, 11
|
||||
call CopyData
|
||||
ld hl, wPartyMonOT
|
||||
ld a, [wMenuItemToSwap]
|
||||
call SkipFixedLengthTextEntries
|
||||
pop de
|
||||
push hl
|
||||
ld bc, $b
|
||||
ld bc, 11
|
||||
call CopyData
|
||||
pop de
|
||||
ld hl, wSwitchPartyMonTempBuffer
|
||||
ld bc, $b
|
||||
ld bc, 11
|
||||
call CopyData
|
||||
ld hl, wPartyMonNicks
|
||||
ld a, [wCurrentMenuItem]
|
||||
call SkipFixedLengthTextEntries
|
||||
push hl
|
||||
ld de, wSwitchPartyMonTempBuffer
|
||||
ld bc, $b
|
||||
ld bc, 11
|
||||
call CopyData
|
||||
ld hl, wPartyMonNicks
|
||||
ld a, [wMenuItemToSwap]
|
||||
call SkipFixedLengthTextEntries
|
||||
pop de
|
||||
push hl
|
||||
ld bc, $b
|
||||
ld bc, 11
|
||||
call CopyData
|
||||
pop de
|
||||
ld hl, wSwitchPartyMonTempBuffer
|
||||
ld bc, $b
|
||||
ld bc, 11
|
||||
call CopyData
|
||||
ld a, [wMenuItemToSwap]
|
||||
ld [wSwappedMenuItem], a
|
||||
|
|
|
|||
|
|
@ -87,34 +87,34 @@ StatusScreen: ; 12953 (4:6953)
|
|||
call LoadHpBarAndStatusTilePatterns
|
||||
ld de, BattleHudTiles1 ; source
|
||||
ld hl, vChars2 + $6d0 ; dest
|
||||
ld bc, (BANK(BattleHudTiles1) << 8) + $03 ; bank bytes/8
|
||||
lb bc, BANK(BattleHudTiles1), $03
|
||||
call CopyVideoDataDouble ; ·│ :L and halfarrow line end
|
||||
ld de, BattleHudTiles2
|
||||
ld hl, vChars2 + $780
|
||||
ld bc, (BANK(BattleHudTiles2) << 8) + $01
|
||||
lb bc, BANK(BattleHudTiles2), $01
|
||||
call CopyVideoDataDouble ; │
|
||||
ld de, BattleHudTiles3
|
||||
ld hl, vChars2 + $760
|
||||
ld bc, (BANK(BattleHudTiles3) << 8) + $02
|
||||
lb bc, BANK(BattleHudTiles3), $02
|
||||
call CopyVideoDataDouble ; ─┘
|
||||
ld de, PTile
|
||||
ld hl, vChars2 + $720
|
||||
ld bc,(BANK(PTile) << 8 | $01)
|
||||
lb bc, BANK(PTile), $01
|
||||
call CopyVideoDataDouble ; P (for PP), inline
|
||||
ld a, [hTilesetType]
|
||||
push af
|
||||
xor a
|
||||
ld [hTilesetType], a
|
||||
coord hl, 19, 1
|
||||
ld bc, $060a
|
||||
lb bc, 6, 10
|
||||
call DrawLineBox ; Draws the box around name, HP and status
|
||||
ld de, $fffa
|
||||
ld de, -6
|
||||
add hl, de
|
||||
ld [hl], $f2 ; . after No ("." is a different one)
|
||||
dec hl
|
||||
ld [hl], "№"
|
||||
coord hl, 19, 9
|
||||
ld bc, $0806
|
||||
lb bc, 8, 6
|
||||
call DrawLineBox ; Draws the box around types, ID No. and OT
|
||||
coord hl, 10, 9
|
||||
ld de, Type1Text
|
||||
|
|
@ -224,7 +224,7 @@ OKText: ; 12ac4 (4:6ac4)
|
|||
|
||||
; Draws a line starting from hl high b and wide c
|
||||
DrawLineBox: ; 0x12ac7
|
||||
ld de, $0014 ; New line
|
||||
ld de, SCREEN_WIDTH ; New line
|
||||
.PrintVerticalLine
|
||||
ld [hl], $78 ; │
|
||||
add hl, de
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue