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

@ -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