Use *Coord instead of FuncCoord

Using 'Coord =' doesn't like using wTileMap
So use hlCoord, deCoord, bcCoord, aCoord, Coorda, or dwCoord
to avoid static addresses
This commit is contained in:
U-Fish-PC\Daniel 2014-06-25 16:58:27 -04:00
parent b36f793667
commit bd533aa79b
53 changed files with 519 additions and 975 deletions

View file

@ -32,18 +32,15 @@ Func_213c8:: ; 213c8 (8:53c8)
ld a, [wd7f1]
bit 0, a
jr nz, .asm_21414
FuncCoord 2, 2
ld hl, Coord
hlCoord 2, 2
ld de, SomeonesPCText ; $548b
jr .asm_2141a
.asm_21414
FuncCoord 2, 2
ld hl, Coord
hlCoord 2, 2
ld de, BillsPCText ; $5497
.asm_2141a
call PlaceString
FuncCoord 2, 4
ld hl, Coord
hlCoord 2, 4
ld de, wPlayerName ; wd158
call PlaceString
ld l, c
@ -53,8 +50,7 @@ Func_213c8:: ; 213c8 (8:53c8)
ld a, [wd74b]
bit 5, a
jr z, .asm_21462
FuncCoord 2, 6
ld hl, Coord
hlCoord 2, 6
ld de, OaksPCText ; $54a5
call PlaceString
ld a, [wd5a2]
@ -62,24 +58,20 @@ Func_213c8:: ; 213c8 (8:53c8)
jr z, .asm_2145a
ld a, $4
ld [wMaxMenuItem], a ; wMaxMenuItem
FuncCoord 2, 8
ld hl, Coord
hlCoord 2, 8
ld de, PKMNLeaguePCText ; $54b2
call PlaceString
FuncCoord 2, 10
ld hl, Coord
hlCoord 2, 10
ld de, LogOffPCText ; $54ba
jr .asm_2146d
.asm_2145a
FuncCoord 2, 8
ld hl, Coord
hlCoord 2, 8
ld de, LogOffPCText ; $54ba
jr .asm_2146d
.asm_21462
ld a, $2
ld [wMaxMenuItem], a ; wMaxMenuItem
FuncCoord 2, 6
ld hl, Coord
hlCoord 2, 6
ld de, LogOffPCText ; $54ba
.asm_2146d
call PlaceString
@ -146,8 +138,7 @@ BillsPCMenu:
ld b, $a
ld c, $c
call TextBoxBorder
FuncCoord 2, 2
ld hl, Coord
hlCoord 2, 2
ld de, BillsPCMenuText ; $56e1
call PlaceString
ld hl, wTopMenuItemY ; wTopMenuItemY
@ -170,8 +161,7 @@ BillsPCMenu:
ld [wPlayerMonNumber], a ; wPlayerMonNumber
ld hl, WhatText
call PrintText
FuncCoord 9, 14
ld hl, Coord
hlCoord 9, 14
ld b, $2
ld c, $9
call TextBoxBorder
@ -180,18 +170,15 @@ BillsPCMenu:
cp $9
jr c, .asm_2154f
sub $9
FuncCoord 17, 16
ld hl, Coord
hlCoord 17, 16
ld [hl], $f7
add $f6
jr .asm_21551
.asm_2154f
add $f7
.asm_21551
FuncCoord 18, 16
ld [Coord], a
FuncCoord 10, 16
ld hl, Coord
Coorda 18, 16
hlCoord 10, 16
ld de, BoxNoPCText ; $5713
call PlaceString
ld a, $1
@ -405,8 +392,7 @@ HMMoveArray: ; 21745 (8:5745)
db $ff
Func_2174b: ; 2174b (8:574b)
FuncCoord 9, 10
ld hl, Coord
hlCoord 9, 10
ld b, $6
ld c, $9
call TextBoxBorder
@ -416,11 +402,9 @@ Func_2174b: ; 2174b (8:574b)
jr nz, .asm_21761
ld de, WithdrawPCText ; $57d3
.asm_21761
FuncCoord 11, 12
ld hl, Coord
hlCoord 11, 12
call PlaceString
FuncCoord 11, 14
ld hl, Coord
hlCoord 11, 14
ld de, StatsCancelPCText ; $57dc
call PlaceString
ld hl, wTopMenuItemY ; wTopMenuItemY

View file

@ -33,8 +33,7 @@ DisplayDiploma: ; 566e2 (15:66e2)
pop bc
dec c
jr nz, .asm_56715 ; 0x56725 $ee
FuncCoord 10, 4
ld hl, Coord
hlCoord 10, 4
ld de, wPlayerName
call PlaceString
callba Func_44dd

View file

@ -93,22 +93,18 @@ Func_76610: ; 76610 (1d:6610)
ld b, $0B
ld c, 0
call GoPAL_SET
FuncCoord 12, 5
ld hl, Coord
hlCoord 12, 5
call GetMonHeader
call LoadFrontSpriteByMonIndex
call GBPalNormal
FuncCoord 0, 13
ld hl, Coord
hlCoord 0, 13
ld b, 2
ld c, $12
call TextBoxBorder
FuncCoord 1, 15
ld hl, Coord
hlCoord 1, 15
ld de, HallOfFameNoText
call PlaceString
FuncCoord 16, 15
ld hl, Coord
hlCoord 16, 15
ld de, wcd42
ld bc, $0103
call PrintNumber

View file

@ -33,24 +33,20 @@ MainMenu: ; 5af2 (1:5af2)
ld a,[wd088]
cp a,1
jr z,.next1
FuncCoord 0,0
ld hl,Coord
hlCoord 0, 0
ld b,6
ld c,13
call TextBoxBorder
FuncCoord 2,2
ld hl,Coord
hlCoord 2, 2
ld de,ContinueText
call PlaceString
jr .next2
.next1
FuncCoord 0,0
ld hl,Coord
hlCoord 0, 0
ld b,4
ld c,13
call TextBoxBorder
FuncCoord 2,2
ld hl,Coord
hlCoord 2, 2
ld de,NewGameText
call PlaceString
.next2
@ -142,14 +138,12 @@ LinkMenu: ; 5c0a (1:5c0a)
call SaveScreenTilesToBuffer1
ld hl, WhereWouldYouLikeText
call PrintText
FuncCoord 5, 5
ld hl, Coord
hlCoord 5, 5
ld b, $6
ld c, $d
call TextBoxBorder
call UpdateSprites
FuncCoord 7, 7
ld hl, Coord
hlCoord 7, 7
ld de, TradeCenterText
call PlaceString
xor a
@ -238,14 +232,11 @@ LinkMenu: ; 5c0a (1:5c0a)
ld c, d
.asm_5ccc
ld a, b
FuncCoord 6, 7
ld [Coord], a
Coorda 6, 7
ld a, c
FuncCoord 6, 9
ld [Coord], a
Coorda 6, 9
ld a, d
FuncCoord 6, 11
ld [Coord], a
Coorda 6, 11
ld c, $28
call DelayFrames
call LoadScreenTilesFromBuffer1
@ -343,27 +334,21 @@ TradeCenterText: ; 5d97 (1:5d97)
ContinueGame: ; 5db5 (1:5db5)
xor a
ld [H_AUTOBGTRANSFERENABLED], a ; $ffba
FuncCoord 4, 7
ld hl, Coord
hlCoord 4, 7
ld b, $8
ld c, $e
call TextBoxBorder
FuncCoord 5, 9
ld hl, Coord
hlCoord 5, 9
ld de, SaveScreenInfoText
call PlaceString
FuncCoord 12, 9
ld hl, Coord
hlCoord 12, 9
ld de, wPlayerName ; wd158
call PlaceString
FuncCoord 17, 11
ld hl, Coord
hlCoord 17, 11
call Func_5e2f
FuncCoord 16, 13
ld hl, Coord
hlCoord 16, 13
call Func_5e42
FuncCoord 13, 15
ld hl, Coord
hlCoord 13, 15
call Func_5e55
ld a, $1
ld [H_AUTOBGTRANSFERENABLED], a ; $ffba
@ -433,35 +418,28 @@ SaveScreenInfoText: ; 5e6a (1:5e6a)
next "TIME@"
DisplayOptionMenu: ; 5e8a (1:5e8a)
FuncCoord 0,0
ld hl,Coord
hlCoord 0, 0
ld b,3
ld c,18
call TextBoxBorder
FuncCoord 0,5
ld hl,Coord
hlCoord 0, 5
ld b,3
ld c,18
call TextBoxBorder
FuncCoord 0,10
ld hl,Coord
hlCoord 0, 10
ld b,3
ld c,18
call TextBoxBorder
FuncCoord 1,1
ld hl,Coord
hlCoord 1, 1
ld de,TextSpeedOptionText
call PlaceString
FuncCoord 1,6
ld hl,Coord
hlCoord 1, 6
ld de,BattleAnimationOptionText
call PlaceString
FuncCoord 1,11
ld hl,Coord
hlCoord 1, 11
ld de,BattleStyleOptionText
call PlaceString
FuncCoord 2,16
ld hl,Coord
hlCoord 2, 16
ld de,OptionMenuCancelText
call PlaceString
xor a
@ -655,8 +633,7 @@ SetCursorPositionsFromOptions: ; 604c (1:604c)
dec hl
ld a,[hl]
ld [wWhichTrade],a ; text speed cursor X coordinate
FuncCoord 0,3
ld hl,Coord
hlCoord 0, 3
call .placeUnfilledRightArrow
sla c
ld a,1 ; On
@ -664,8 +641,7 @@ SetCursorPositionsFromOptions: ; 604c (1:604c)
ld a,10 ; Off
.storeBattleAnimationCursorX
ld [wTrainerEngageDistance],a ; battle animation cursor X coordinate
FuncCoord 0,8
ld hl,Coord
hlCoord 0, 8
call .placeUnfilledRightArrow
sla c
ld a,1
@ -673,12 +649,10 @@ SetCursorPositionsFromOptions: ; 604c (1:604c)
ld a,10
.storeBattleStyleCursorX
ld [wTrainerFacingDirection],a ; battle style cursor X coordinate
FuncCoord 0,13
ld hl,Coord
hlCoord 0, 13
call .placeUnfilledRightArrow
; cursor in front of Cancel
FuncCoord 0,16
ld hl,Coord
hlCoord 0, 16
ld a,1
.placeUnfilledRightArrow
ld e,a

View file

@ -13,8 +13,7 @@ AskName: ; 64eb (1:64eb)
call GetMonName
ld hl, DoYouWantToNicknameText
call PrintText
FuncCoord 14, 7
ld hl, Coord
hlCoord 14, 7
ld bc, $80f
ld a, $14
ld [wd125], a
@ -94,8 +93,7 @@ DisplayNamingScreen: ; 6596 (1:6596)
call LoadHpBarAndStatusTilePatterns
call LoadEDTile
callba Func_7176c
FuncCoord 0, 4
ld hl, Coord
hlCoord 0, 4
ld b, $9
ld c, $12
call TextBoxBorder
@ -341,8 +339,7 @@ PrintAlphabet: ; 676f (1:676f)
jr nz, .asm_677e
ld de, UpperCaseAlphabet ; $67d6
.asm_677e
FuncCoord 2, 5
ld hl, Coord
hlCoord 2, 5
ld bc, $509
.asm_6784
push bc
@ -373,16 +370,13 @@ Func_680e: ; 680e (1:680e)
call CalcStringLength
ld a, c
ld [wHPBarMaxHP], a
FuncCoord 10, 2
ld hl, Coord
hlCoord 10, 2
ld bc, $10a
call ClearScreenArea
FuncCoord 10, 2
ld hl, Coord
hlCoord 10, 2
ld de, wcf4b
call PlaceString
FuncCoord 10, 3
ld hl, Coord
hlCoord 10, 3
ld a, [wd07d]
cp $2
jr nc, .asm_6835
@ -419,8 +413,7 @@ Func_680e: ; 680e (1:680e)
.asm_6867
ld c, a
ld b, $0
FuncCoord 10, 3
ld hl, Coord
hlCoord 10, 3
add hl, bc
ld [hl], $77
ret
@ -468,8 +461,7 @@ CalcStringLength: ; 68eb (1:68eb)
jr .asm_68f0
PrintNamingText: ; 68f8 (1:68f8)
FuncCoord 0, 1
ld hl, Coord
hlCoord 0, 1
ld a, [wd07d]
ld de, YourTextString ; $693f
and a
@ -484,14 +476,12 @@ PrintNamingText: ; 68f8 (1:68f8)
pop af
ld [wd11e], a
call GetMonName
FuncCoord 4, 1
ld hl, Coord
hlCoord 4, 1
call PlaceString
ld hl, $1
add hl, bc
ld [hl], $c9
FuncCoord 1, 3
ld hl, Coord
hlCoord 1, 3
ld de, NicknameTextString ; $6953
jr .placeString
.notNickname

View file

@ -30,8 +30,7 @@ RedrawPartyMenu_: ; 12ce3 (4:6ce3)
jp z,.printMessage
call ErasePartyMenuCursors
callba SendBlkPacket_PartyMenu ; loads some data to wcf2e
FuncCoord 3,0
ld hl,Coord
hlCoord 3, 0
ld de,wPartySpecies
xor a
ld c,a

View file

@ -26,8 +26,7 @@ Func_790c: ; 790c (1:790c)
ld c, $e
call TextBoxBorder
call UpdateSprites
FuncCoord 2, 2
ld hl, Coord
hlCoord 2, 2
ld de, PlayersPCMenuEntries ; $7af5
call PlaceString
ld hl, wTopMenuItemY ; wTopMenuItemY

View file

@ -118,8 +118,7 @@ HandlePokedexSideMenu: ; 4006d (10:406d)
pop af
ld [wCurrentMenuItem],a
push bc
FuncCoord 0,3
ld hl,Coord
hlCoord 0, 3
ld de,20
ld bc,$7f0d ; 13 blank tiles
call DrawTileLine ; cover up the menu cursor in the pokemon list
@ -127,8 +126,7 @@ HandlePokedexSideMenu: ; 4006d (10:406d)
ret
.buttonBPressed
push bc
FuncCoord 15,10
ld hl,Coord
hlCoord 15, 10
ld de,20
ld bc,$7f07 ; 7 blank tiles
call DrawTileLine ; cover up the menu cursor in the side menu
@ -155,53 +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
FuncCoord 15,8
ld hl,Coord
hlCoord 15, 8
ld a,$7a ; horizontal line tile
ld [hli],a
ld [hli],a
ld [hli],a
ld [hli],a
ld [hli],a
FuncCoord 14,0
ld hl,Coord
hlCoord 14, 0
ld [hl],$71 ; vertical line tile
FuncCoord 14,1
ld hl,Coord
hlCoord 14, 1
call DrawPokedexVerticalLine
FuncCoord 14,9
ld hl,Coord
hlCoord 14, 9
call DrawPokedexVerticalLine
ld hl,wPokedexSeen
ld b,wPokedexSeenEnd - wPokedexSeen
call CountSetBits
ld de,wd11e
FuncCoord 16,3
ld hl,Coord
hlCoord 16, 3
ld bc,$0103
call PrintNumber ; print number of seen pokemon
ld hl,wPokedexOwned
ld b,wPokedexOwnedEnd - wPokedexOwned
call CountSetBits
ld de,wd11e
FuncCoord 16,6
ld hl,Coord
hlCoord 16, 6
ld bc,$0103
call PrintNumber ; print number of owned pokemon
FuncCoord 16,2
ld hl,Coord
hlCoord 16, 2
ld de,PokedexSeenText
call PlaceString
FuncCoord 16,5
ld hl,Coord
hlCoord 16, 5
ld de,PokedexOwnText
call PlaceString
FuncCoord 1,1
ld hl,Coord
hlCoord 1, 1
ld de,PokedexContentsText
call PlaceString
FuncCoord 16,10
ld hl,Coord
hlCoord 16, 10
ld de,PokedexMenuItemsText
call PlaceString
; find the highest pokedex number among the pokemon the player has seen
@ -223,12 +211,10 @@ HandlePokedexListMenu: ; 40111 (10:4111)
.loop
xor a
ld [H_AUTOBGTRANSFERENABLED],a
FuncCoord 4,2
ld hl,Coord
hlCoord 4, 2
ld bc,$0e0a
call ClearScreenArea
FuncCoord 1,3
ld hl,Coord
hlCoord 1, 3
ld a,[wListScrollOffset]
ld [wd11e],a
ld d,7
@ -422,47 +408,36 @@ ShowPokedexDataInternal: ; 402e2 (10:42e2)
push af
xor a
ld [$ffd7],a
FuncCoord 0,0
ld hl,Coord
hlCoord 0, 0
ld de,1
ld bc,$6414
call DrawTileLine ; draw top border
FuncCoord 0,17
ld hl,Coord
hlCoord 0, 17
ld b,$6f
call DrawTileLine ; draw bottom border
FuncCoord 0,1
ld hl,Coord
hlCoord 0, 1
ld de,20
ld bc,$6610
call DrawTileLine ; draw left border
FuncCoord 19,1
ld hl,Coord
hlCoord 19, 1
ld b,$67
call DrawTileLine ; draw right border
FuncCoord 0,0
ld a,$63 ; upper left corner tile
ld [Coord],a
FuncCoord 19,0
Coorda 0, 0
ld a,$65 ; upper right corner tile
ld [Coord],a
FuncCoord 0,17
Coorda 19, 0
ld a,$6c ; lower left corner tile
ld [Coord],a
FuncCoord 19,17
Coorda 0, 17
ld a,$6e ; lower right corner tile
ld [Coord],a
FuncCoord 0,9
ld hl,Coord
Coorda 19, 17
hlCoord 0, 9
ld de,PokedexDataDividerLine
call PlaceString ; draw horizontal divider line
FuncCoord 9,6
ld hl,Coord
hlCoord 9, 6
ld de,HeightWeightText
call PlaceString
call GetMonName
FuncCoord 9,2
ld hl,Coord
hlCoord 9, 2
call PlaceString
ld hl,PokedexEntryPointers
ld a,[wd11e]
@ -474,8 +449,7 @@ ShowPokedexDataInternal: ; 402e2 (10:42e2)
ld a,[hli]
ld e,a
ld d,[hl] ; de = address of pokedex entry
FuncCoord 9,4
ld hl,Coord
hlCoord 9, 4
call PlaceString ; print species name
ld h,b
ld l,c
@ -483,8 +457,7 @@ ShowPokedexDataInternal: ; 402e2 (10:42e2)
ld a,[wd11e]
push af
call IndexToPokedex
FuncCoord 2,8
ld hl,Coord
hlCoord 2, 8
ld a, "№"
ld [hli],a
ld a,$f2
@ -506,8 +479,7 @@ ShowPokedexDataInternal: ; 402e2 (10:42e2)
call Delay3
call GBPalNormal
call GetMonHeader ; load pokemon picture location
FuncCoord 1,1
ld hl,Coord
hlCoord 1, 1
call LoadFlippedFrontSpriteByMonIndex ; draw pokemon picture
ld a,[wcf91]
call PlayCry ; play pokemon cry
@ -520,16 +492,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
FuncCoord 12,6
ld hl,Coord
hlCoord 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)
FuncCoord 15,6
ld hl,Coord
hlCoord 15, 6
ld bc,$8102
call PrintNumber ; print inches (height)
ld a,$61 ; inches symbol tile (two ticks)
@ -550,13 +520,11 @@ ShowPokedexDataInternal: ; 402e2 (10:42e2)
dec de
ld a,[de] ; a = lower byte of weight
ld [hl],a ; store lower byte of weight in [$ff8c]
FuncCoord 11,8
ld de,$ff8b
ld hl,Coord
hlCoord 11, 8
ld bc,$0205 ; no leading zeroes, right-aligned, 2 bytes, 5 digits
call PrintNumber ; print weight
FuncCoord 14,8
ld hl,Coord
hlCoord 14, 8
ld a,[$ff8c]
sub a,10
ld a,[$ff8b]
@ -574,8 +542,7 @@ ShowPokedexDataInternal: ; 402e2 (10:42e2)
ld [$ff8b],a ; restore original value of [$ff8b]
pop hl
inc hl ; hl = address of pokedex description text
FuncCoord 1,11
ld bc,Coord
bcCoord 1, 11
ld a,2
ld [$fff4],a
call TextCommandProcessor ; print pokedex description text

View file

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

View file

@ -285,8 +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)
FuncCoord 0,1
ld hl,Coord
hlCoord 0, 1
ld bc,2 * 20 ; menu cursor positions are 2 rows apart
ld a,6 ; 6 menu cursor positions
.loop
@ -331,14 +330,10 @@ StartMenu_Item: ; 13302 (4:7302)
.choseItem
; erase menu cursor (blank each tile in front of an item name)
ld a," "
FuncCoord 5,4
ld [Coord],a
FuncCoord 5,6
ld [Coord],a
FuncCoord 5,8
ld [Coord],a
FuncCoord 5,10
ld [Coord],a
Coorda 5, 4
Coorda 5, 6
Coorda 5, 8
Coorda 5, 10
call PlaceUnfilledArrowMenuCursor
xor a
ld [wcc35],a
@ -531,12 +526,10 @@ DrawTrainerInfo: ; 1349a (4:749a)
ld bc,(BANK(RedPicFront) << 8) | $01
predef Predef3B
call DisableLCD
FuncCoord 0,2
ld hl,Coord
hlCoord 0, 2
ld a," "
call TrainerInfo_DrawVerticalLine
FuncCoord 1,2
ld hl,Coord
hlCoord 1, 2
call TrainerInfo_DrawVerticalLine
ld hl,vChars2 + $70
ld de,vChars2
@ -579,8 +572,7 @@ DrawTrainerInfo: ; 1349a (4:749a)
dec a
ld [hli],a
ld [hl],1
FuncCoord 0,0
ld hl,Coord
hlCoord 0, 0
call TrainerInfo_DrawTextBox
ld hl,wWhichTrade
ld a,16 + 1
@ -588,35 +580,27 @@ DrawTrainerInfo: ; 1349a (4:749a)
dec a
ld [hli],a
ld [hl],3
FuncCoord 1,10
ld hl,Coord
hlCoord 1, 10
call TrainerInfo_DrawTextBox
FuncCoord 0,10
ld hl,Coord
hlCoord 0, 10
ld a,$d7
call TrainerInfo_DrawVerticalLine
FuncCoord 19,10
ld hl,Coord
hlCoord 19, 10
call TrainerInfo_DrawVerticalLine
FuncCoord 6,9
ld hl,Coord
hlCoord 6, 9
ld de,TrainerInfo_BadgesText
call PlaceString
FuncCoord 2,2
ld hl,Coord
hlCoord 2, 2
ld de,TrainerInfo_NameMoneyTimeText
call PlaceString
FuncCoord 7,2
ld hl,Coord
hlCoord 7, 2
ld de,wPlayerName
call PlaceString
FuncCoord 8,4
ld hl,Coord
hlCoord 8, 4
ld de,wPlayerMoney
ld c,$e3
call PrintBCDNumber
FuncCoord 9,6
ld hl,Coord
hlCoord 9, 6
ld de,W_PLAYTIMEHOURS + 1 ; hours
ld bc,$4103
call PrintNumber

View file

@ -40,8 +40,7 @@ StatusScreen: ; 12953 (4:6953)
push af
xor a
ld [$ffd7], a
FuncCoord 19,1
ld hl, Coord
hlCoord 19, 1
ld bc, $060a
call DrawLineBox ; Draws the box around name, HP and status
ld de, $fffa
@ -49,66 +48,54 @@ StatusScreen: ; 12953 (4:6953)
ld [hl], $f2 ; . after No ("." is a different one)
dec hl
ld [hl], "№"
FuncCoord 19,9
ld hl, Coord
hlCoord 19, 9
ld bc, $0806
call DrawLineBox ; Draws the box around types, ID No. and OT
FuncCoord 10,9
ld hl, Coord
hlCoord 10, 9
ld de, Type1Text
call PlaceString ; "TYPE1/"
FuncCoord 11,3
ld hl, Coord
hlCoord 11, 3
predef DrawHP ; predef $5f
ld hl, wcf25
call GetHealthBarColor
ld b, $3
call GoPAL_SET ; SGB palette
FuncCoord 16,6
ld hl, Coord
hlCoord 16, 6
ld de, wcf9c
call PrintStatusCondition
jr nz, .StatusWritten ; 0x129fc $9
FuncCoord 16,6
ld hl, Coord
hlCoord 16, 6
ld de, OKText
call PlaceString ; "OK"
.StatusWritten
FuncCoord 9,6
ld hl, Coord
hlCoord 9, 6
ld de, StatusText
call PlaceString ; "STATUS/"
FuncCoord 14,2
ld hl, Coord
hlCoord 14, 2
call PrintLevel ; Pokémon level
ld a, [W_MONHDEXNUM]
ld [wd11e], a
ld [wd0b5], a
predef IndexToPokedex
FuncCoord 3,7
ld hl, Coord
hlCoord 3, 7
ld de, wd11e
ld bc, $8103 ; Zero-padded, 3
call PrintNumber ; Pokémon no.
FuncCoord 11,10
ld hl, Coord
hlCoord 11, 10
predef Func_27d6b ; Prints the type (?)
ld hl, NamePointers2 ; $6a9d
call .unk_12a7e
ld d, h
ld e, l
FuncCoord 9,1
ld hl, Coord
hlCoord 9, 1
call PlaceString ; Pokémon name
ld hl, OTPointers ; $6a95
call .unk_12a7e
ld d, h
ld e, l
FuncCoord 12,16
ld hl, Coord
hlCoord 12, 16
call PlaceString ; OT
FuncCoord 12,14
ld hl, Coord
hlCoord 12, 14
ld de, wcfa4
ld bc, $8205 ; 5
call PrintNumber ; ID Number
@ -116,8 +103,7 @@ StatusScreen: ; 12953 (4:6953)
call PrintStatsBox
call Delay3
call GBPalNormal
FuncCoord 1, 0
ld hl, Coord
hlCoord 1, 0
call LoadFlippedFrontSpriteByMonIndex ; draw Pokémon picture
ld a, [wcf91]
call PlayCry ; play Pokémon cry
@ -195,23 +181,19 @@ PrintStatsBox: ; 12ae4 (4:6ae4)
ld a, d
and a ; a is 0 from the status screen
jr nz, .DifferentBox ; 0x12ae6 $12
FuncCoord 0,8
ld hl, Coord
hlCoord 0, 8
ld b, $8
ld c, $8
call TextBoxBorder ; Draws the box
FuncCoord 1,9 ; Start printing stats from here
ld hl, Coord
hlCoord 1, 9 ; Start printing stats from here
ld bc, $0019 ; Number offset
jr .PrintStats ; 0x12af8 $10
.DifferentBox
FuncCoord 9,2
ld hl, Coord
hlCoord 9, 2
ld b, $8
ld c, $9
call TextBoxBorder
FuncCoord 11, 3
ld hl, Coord
hlCoord 11, 3
ld bc, $0018
.PrintStats
push bc
@ -258,20 +240,16 @@ StatusScreen2: ; 12b57 (4:6b57)
ld bc, $0004
call CopyData
callab Func_39b87
FuncCoord 9,2
ld hl, Coord
hlCoord 9, 2
ld bc, $050a
call ClearScreenArea ; Clear under name
FuncCoord 19, 3
ld hl, Coord
hlCoord 19, 3
ld [hl], $78
FuncCoord 0,8
ld hl, Coord
hlCoord 0, 8
ld b, $8
ld c, $12
call TextBoxBorder ; Draw move container
FuncCoord 2,9
ld hl, Coord
hlCoord 2, 9
ld de, wd0e1
call PlaceString ; Print moves
ld a, [wcd6c]
@ -280,8 +258,7 @@ StatusScreen2: ; 12b57 (4:6b57)
ld a, $4
sub c
ld b, a ; Number of moves ?
FuncCoord 11,10
ld hl, Coord
hlCoord 11, 10
ld de, $0028
ld a, $72
call Func_12ccb ; Print "PP"
@ -293,8 +270,7 @@ StatusScreen2: ; 12b57 (4:6b57)
call Func_12ccb ; Fill the rest with --
.InitPP ; 12bbb
ld hl, wcfa0
FuncCoord 14,10
ld de, Coord
deCoord 14, 10
ld b, $0
.PrintPP ; 12bc3
ld a, [hli]
@ -344,8 +320,7 @@ StatusScreen2: ; 12b57 (4:6b57)
cp $4
jr nz, .PrintPP ; 0x12c0f $b2
.PPDone
FuncCoord 9,3
ld hl, Coord
hlCoord 9, 3
ld de, EXPPointsText
call PlaceString
ld a, [wcfb9] ; level
@ -355,8 +330,7 @@ StatusScreen2: ; 12b57 (4:6b57)
inc a
ld [wcfb9], a ; Increase temporarily if not 100
.Level100
FuncCoord 14,6
ld hl, Coord
hlCoord 14, 6
ld [hl], $70 ; 1-tile "to"
inc hl
inc hl
@ -364,27 +338,22 @@ StatusScreen2: ; 12b57 (4:6b57)
pop af
ld [wcfb9], a
ld de, wcfa6
FuncCoord 12,4
ld hl, Coord
hlCoord 12, 4
ld bc, $0307
call PrintNumber ; exp
call .asm_12c86
ld de, wcfa6
FuncCoord 7,6
ld hl, Coord
hlCoord 7, 6
ld bc, $0307
call PrintNumber
FuncCoord 9,0
ld hl, Coord
hlCoord 9, 0
call Func_12cc3
FuncCoord 9,1
ld hl, Coord
hlCoord 9, 1
call Func_12cc3
ld a, [W_MONHDEXNUM]
ld [wd11e], a
call GetMonName
FuncCoord 9,1
ld hl, Coord
hlCoord 9, 1
call PlaceString
ld a, $1
ld [$ffba], a

View file

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