Use more *Coord

also town map code relabelling
YamaArashi just did town map relabelling but oh well
I aleady made the changes and don't feel like redoing it
This commit is contained in:
dannye 2015-07-14 00:21:03 -05:00
parent 822bb2bd21
commit b509b48a7f
32 changed files with 182 additions and 179 deletions

View file

@ -11,17 +11,17 @@ Func_213c8:: ; 213c8 (8:53c8)
ld a, [wd5a2]
and a
jr nz, .asm_213f3
ld hl, wTileMap
hlCoord 0, 0
ld b, $8
ld c, $e
jr .asm_213fa
.asm_213ea
ld hl, wTileMap
hlCoord 0, 0
ld b, $6
ld c, $e
jr .asm_213fa
.asm_213f3
ld hl, wTileMap
hlCoord 0, 0
ld b, $a
ld c, $e
.asm_213fa
@ -122,7 +122,7 @@ BillsPCMenu:
ld bc, (BANK(PokeballTileGraphics) << 8) + $01
call CopyVideoData
call LoadScreenTilesFromBuffer2DisableBGTransfer
ld hl, wTileMap
hlCoord 0, 0
ld b, $a
ld c, $c
call TextBoxBorder

View file

@ -12,7 +12,7 @@ DisplayDiploma: ; 566e2 (15:66e2)
ld bc, $0010
ld a, BANK(CircleTile)
call FarCopyData2
ld hl, wTileMap
hlCoord 0, 0
ld bc, $1012
predef Diploma_TextBoxBorder
ld hl, DiplomaTextPointersAndCoords
@ -77,15 +77,15 @@ Func_56777: ; 56777 (15:6777)
DiplomaTextPointersAndCoords: ; 56784 (15:6784)
dw DiplomaText
dw wTileMap + $2d
dwCoord 5, 2
dw DiplomaPlayer
dw wTileMap + $53
dwCoord 3, 4
dw DiplomaEmptyText
dw wTileMap + $5f
dwCoord 15, 4
dw DiplomaCongrats
dw wTileMap + $7a
dwCoord 2, 6
dw DiplomaGameFreak
dw wTileMap + $149
dwCoord 9, 16
DiplomaText:
db $70,"Diploma",$70,"@"

View file

@ -363,23 +363,23 @@ ContinueGame: ; 5db5 (1:5db5)
PrintSaveScreenText: ; 5def (1:5def)
xor a
ld [H_AUTOBGTRANSFERENABLED], a
ld hl, wTileMap + $4
hlCoord 4, 0
ld b, $8
ld c, $e
call TextBoxBorder
call LoadTextBoxTilePatterns
call UpdateSprites
ld hl, wTileMap + $2d
hlCoord 5, 2
ld de, SaveScreenInfoText
call PlaceString
ld hl, wTileMap + $34
hlCoord 12, 2
ld de, wPlayerName
call PlaceString
ld hl, wTileMap + $61
hlCoord 17, 4
call Func_5e2f
ld hl, wTileMap + $88
hlCoord 16, 6
call Func_5e42
ld hl, wTileMap + $ad
hlCoord 13, 8
call Func_5e55
ld a, $1
ld [H_AUTOBGTRANSFERENABLED], a

View file

@ -4,7 +4,7 @@ AskName: ; 64eb (1:64eb)
push hl
ld a, [W_ISINBATTLE]
dec a
ld hl, wTileMap
hlCoord 0, 0
ld b, $4
ld c, $b
call z, ClearScreenArea ; only if in wild batle

View file

@ -21,7 +21,7 @@ Func_790c: ; 790c (1:790c)
ld hl, wFlags_0xcd60
set 5, [hl]
call LoadScreenTilesFromBuffer2
ld hl, wTileMap
hlCoord 0, 0
ld b, $8
ld c, $e
call TextBoxBorder

View file

@ -21,12 +21,12 @@ CeladonPrizeMenu: ; 5271b (14:671b)
ld [wTopMenuItemY],a
ld a,$01
ld [wTopMenuItemX],a
call PrintPrizePrice ; 687A
call PrintPrizePrice
hlCoord 0, 2
ld b,$08
ld c,$10
call TextBoxBorder
call GetPrizeMenuId ;678E
call GetPrizeMenuId
call UpdateSprites
ld hl,WhichPrizeTextPtr
call PrintText
@ -36,7 +36,7 @@ CeladonPrizeMenu: ; 5271b (14:671b)
ld a,[wCurrentMenuItem]
cp a,$03 ; "NO,THANKS" choice
jr z,.NoChoice
call HandlePrizeChoice ; 14:68C6
call HandlePrizeChoice
.NoChoice
ld hl,wd730
res 6,[hl]
@ -106,7 +106,7 @@ GetPrizeMenuId: ; 5278e (14:678e)
hlCoord 2, 8
call PlaceString
jr .putNoThanksText
.putMonName ; 14:67EC
.putMonName
ld a,[W_PRIZE1]
ld [wd11e],a
call GetMonName
@ -122,7 +122,7 @@ GetPrizeMenuId: ; 5278e (14:678e)
call GetMonName
hlCoord 2, 8
call PlaceString
.putNoThanksText ; 14:6819
.putNoThanksText
hlCoord 2, 10
ld de,NoThanksText
call PlaceString
@ -135,7 +135,7 @@ GetPrizeMenuId: ; 5278e (14:678e)
ld c,(1 << 7 | 2)
; Function $15CD displays BCD value (same routine
; used by text-command $02)
call PrintBCDNumber ; Print_BCD
call PrintBCDNumber
ld de,wd143
hlCoord 13, 7
ld c,(%1 << 7 | 2)
@ -165,10 +165,10 @@ PrintPrizePrice: ; 5287a (14:687a)
call PrintBCDNumber
ret
.CoinText ; 14:68A5
.CoinText
db "COIN@"
.SixSpacesText ; 14:68AA
.SixSpacesText
db " @"
LoadCoinsToSubtract: ; 528b1 (14:68b1)
@ -200,9 +200,9 @@ HandlePrizeChoice: ; 528c6 (14:68c6)
jr nz,.GetMonName
call GetItemName
jr .GivePrize
.GetMonName ; 14:68E3
.GetMonName
call GetMonName
.GivePrize ; 14:68E6
.GivePrize
ld hl,SoYouWantPrizeTextPtr
call PrintText
call YesNoChoice ; yes/no textbox
@ -219,14 +219,14 @@ HandlePrizeChoice: ; 528c6 (14:68c6)
ld b,a
ld a,1
ld c,a
call GiveItem ; GiveItem
call GiveItem
jr nc,.BagFull
jr .SubtractCoins
.GiveMon ; 14:6912
.GiveMon
ld a,[wd11e]
ld [wcf91],a
push af
call GetPrizeMonLevel ; 14:6977
call GetPrizeMonLevel
ld c,a
pop af
ld b,a
@ -237,7 +237,7 @@ HandlePrizeChoice: ; 528c6 (14:68c6)
call z,WaitForTextScrollButtonPress
pop af
ret nc
.SubtractCoins ; 14:692C
.SubtractCoins
call LoadCoinsToSubtract
ld hl,$FFA1
ld de,wPlayerCoins + 1
@ -247,10 +247,10 @@ HandlePrizeChoice: ; 528c6 (14:68c6)
.BagFull
ld hl,PrizeRoomBagIsFullTextPtr
jp PrintText
.NotEnoughCoins ; 14:6945
.NotEnoughCoins
ld hl,SorryNeedMoreCoinsText
jp PrintText
.PrintOhFineThen ; 14:694B
.PrintOhFineThen
ld hl,OhFineThenTextPtr
jp PrintText
@ -286,13 +286,13 @@ GetPrizeMonLevel: ; 52977 (14:6977)
ld a,[wcf91]
ld b,a
ld hl,PrizeMonLevelDictionary
.loop ; 14:697E
.loop
ld a,[hli]
cp b
jr z,.matchFound
inc hl
jr .loop
.matchFound ; 14:6985
.matchFound
ld a,[hl]
ld [W_CURENEMYLVL],a
ret

View file

@ -713,7 +713,7 @@ SwitchPartyMon: ; 13613 (4:7613)
SwitchPartyMon_OAM: ; 13625 (4:7625)
push af
ld hl, wTileMap
hlCoord 0, 0
ld bc, $28
call AddNTimes
ld c, $28