Consolidate coord macros

This commit is contained in:
dannye 2015-07-18 15:52:03 -05:00
parent 0ad1153f16
commit 148d3f3cf2
58 changed files with 528 additions and 539 deletions

View file

@ -184,17 +184,17 @@ CopyScreenTileBufferToVRAM::
ld c, 6
ld hl, $600 * 0
deCoord 0, 6 * 0
coord de, 0, 6 * 0
call .setup
call DelayFrame
ld hl, $600 * 1
deCoord 0, 6 * 1
coord de, 0, 6 * 1
call .setup
call DelayFrame
ld hl, $600 * 2
deCoord 0, 6 * 2
coord de, 0, 6 * 2
call .setup
jp DelayFrame
@ -217,7 +217,7 @@ ClearScreen::
; for the bg map to update.
ld bc, 20 * 18
inc b
hlCoord 0, 0
coord hl, 0, 0
ld a, $7f
.loop
ld [hli], a

View file

@ -1420,7 +1420,7 @@ LoadCurrentMapView:: ; 0caa (0:0caa)
ld bc,$0002
add hl,bc
.copyToVisibleAreaBuffer
deCoord 0, 0 ; base address for the tiles that are directly transfered to VRAM during V-blank
coord de, 0, 0 ; base address for the tiles that are directly transfered to VRAM during V-blank
ld b, SCREEN_HEIGHT
.rowLoop2
ld c, SCREEN_WIDTH
@ -1693,7 +1693,7 @@ MoveTileBlockMapPointerNorth:: ; 0e85 (0:0e85)
; the portion of the map that was newly exposed due to the player's movement
ScheduleNorthRowRedraw:: ; 0e91 (0:0e91)
hlCoord 0, 0
coord hl, 0, 0
call CopyToScreenEdgeTiles
ld a,[wMapViewVRAMPointer]
ld [H_SCREENEDGEREDRAWADDR],a
@ -1715,7 +1715,7 @@ CopyToScreenEdgeTiles:: ; 0ea6 (0:0ea6)
ret
ScheduleSouthRowRedraw:: ; 0eb2 (0:0eb2)
hlCoord 0, 16
coord hl, 0, 16
call CopyToScreenEdgeTiles
ld a,[wMapViewVRAMPointer]
ld l,a
@ -1734,7 +1734,7 @@ ScheduleSouthRowRedraw:: ; 0eb2 (0:0eb2)
ret
ScheduleEastColumnRedraw:: ; 0ed3 (0:0ed3)
hlCoord 18, 0
coord hl, 18, 0
call ScheduleColumnRedrawHelper
ld a,[wMapViewVRAMPointer]
ld c,a
@ -1772,7 +1772,7 @@ ScheduleColumnRedrawHelper:: ; 0ef2 (0:0ef2)
ret
ScheduleWestColumnRedraw:: ; 0f08 (0:0f08)
hlCoord 0, 0
coord hl, 0, 0
call ScheduleColumnRedrawHelper
ld a,[wMapViewVRAMPointer]
ld [H_SCREENEDGEREDRAWADDR],a
@ -2323,7 +2323,7 @@ LoadMapData:: ; 1241 (0:1241)
call LoadTilesetTilePatternData
call LoadCurrentMapView
; copy current map view to VRAM
hlCoord 0, 0
coord hl, 0, 0
ld de,vBGMap0
ld b,18
.vramCopyLoop

View file

@ -76,7 +76,7 @@ PlaceNextChar:: ; 1956 (0:1956)
cp $4F
jr nz,.next3
pop hl
hlCoord 1, 16
coord hl, 1, 16
push hl
jp PlaceNextChar_inc
@ -290,13 +290,13 @@ Char51:: ; 1ab4 (0:1ab4)
Coorda 18, 16
call ProtectedDelay3
call ManualTextScroll
hlCoord 1, 13
coord hl, 1, 13
ld bc,$0412
call ClearScreenArea
ld c,20
call DelayFrames
pop de
hlCoord 1, 14
coord hl, 1, 14
jp PlaceNextChar_inc
Char49:: ; 1ad5 (0:1ad5)
@ -305,14 +305,14 @@ Char49:: ; 1ad5 (0:1ad5)
Coorda 18, 16
call ProtectedDelay3
call ManualTextScroll
hlCoord 1, 10
coord hl, 1, 10
ld bc,$0712
call ClearScreenArea
ld c,20
call DelayFrames
pop de
pop hl
hlCoord 1, 11
coord hl, 1, 11
push hl
jp PlaceNextChar_inc
@ -330,13 +330,13 @@ Char4C:: ; 1b0a (0:1b0a)
push de
call Next1B18
call Next1B18
hlCoord 1, 16
coord hl, 1, 16
pop de
jp PlaceNextChar_inc
Next1B18:: ; 1b18 (0:1b18)
hlCoord 0, 14
deCoord 0, 13
coord hl, 0, 14
coord de, 0, 13
ld b,60
.next
ld a,[hli]
@ -344,7 +344,7 @@ Next1B18:: ; 1b18 (0:1b18)
inc de
dec b
jr nz,.next
hlCoord 1, 16
coord hl, 1, 16
ld a, " "
ld b,SCREEN_WIDTH - 2
.next2
@ -499,7 +499,7 @@ TextCommand03:: ; 1bb7 (0:1bb7)
; (no arguments)
TextCommand05:: ; 1bc5 (0:1bc5)
pop hl
bcCoord 1, 16 ; address of second line of dialogue text box
coord bc, 1, 16 ; address of second line of dialogue text box
jp NextTextCommand
; blink arrow and wait for A or B to be pressed
@ -528,7 +528,7 @@ TextCommand07:: ; 1be7 (0:1be7)
call Next1B18 ; scroll up text
call Next1B18
pop hl
bcCoord 1, 16 ; address of second line of dialogue text box
coord bc, 1, 16 ; address of second line of dialogue text box
jp NextTextCommand
; execute asm inline

View file

@ -130,7 +130,7 @@ AutoBgMapTransfer:: ; 1d57 (0:1d57)
dec a
jr z,.transferMiddleThird
.transferBottomThird
hlCoord 0, 12
coord hl, 0, 12
ld sp,hl
ld a,[H_AUTOBGTRANSFERDEST + 1]
ld h,a
@ -141,7 +141,7 @@ AutoBgMapTransfer:: ; 1d57 (0:1d57)
xor a ; TRANSFERTOP
jr .doTransfer
.transferTopThird
hlCoord 0, 0
coord hl, 0, 0
ld sp,hl
ld a,[H_AUTOBGTRANSFERDEST + 1]
ld h,a
@ -150,7 +150,7 @@ AutoBgMapTransfer:: ; 1d57 (0:1d57)
ld a,TRANSFERMIDDLE
jr .doTransfer
.transferMiddleThird
hlCoord 0, 6
coord hl, 0, 6
ld sp,hl
ld a,[H_AUTOBGTRANSFERDEST + 1]
ld h,a