Sync coordinate macros with pokecrystal

This commit is contained in:
Rangi 2020-07-07 11:30:10 -04:00
parent 45ed05decf
commit 13129459f1
75 changed files with 675 additions and 661 deletions

View file

@ -11,7 +11,7 @@ IsPlayerStandingOnDoorTile:
ld a, [hli]
ld h, [hl]
ld l, a
aCoord 8, 9 ; a = lower left background tile under player's sprite
lda_coord 8, 9 ; a = lower left background tile under player's sprite
ld b, a
.loop
ld a, [hli]

View file

@ -8,7 +8,7 @@ HandleLedges::
predef GetTileAndCoordsInFrontOfPlayer
ld a, [wSpritePlayerStateData1FacingDirection]
ld b, a
aCoord 8, 9
lda_coord 8, 9
ld c, a
ld a, [wTileInFrontOfPlayer]
ld d, a

View file

@ -13,7 +13,7 @@ UpdatePlayerSprite:
; background tile the sprite is standing on is greater than $5F, which is
; the maximum number for map tiles
.checkIfTextBoxInFrontOfSprite
aCoord 8, 9
lda_coord 8, 9
ldh [hTilePlayerStandingOn], a
cp MAP_TILESET_SIZE
jr c, .lowerLeftTileIsMapTile
@ -709,7 +709,7 @@ GetTileSpriteStandsOn:
add SCREEN_WIDTH ; screen X tile + 20
ld d, $0
ld e, a
coord hl, 0, 0
hlcoord 0, 0
add hl, bc
add hl, bc
add hl, bc

View file

@ -358,7 +358,7 @@ IsPlayerStandingOnWarpPadOrHole::
jr z, .done
cp c
jr nz, .nextEntry
aCoord 8, 9
lda_coord 8, 9
cp [hl]
jr z, .foundMatch
.nextEntry

View file

@ -204,7 +204,7 @@ IsPlayerStandingOnDoorTileOrWarpTile::
ld h, [hl]
ld l, a
ld de, $1
aCoord 8, 9
lda_coord 8, 9
call IsInArray
jr nc, .done
ld hl, wd736
@ -223,28 +223,28 @@ PrintSafariZoneSteps::
ret c
cp CERULEAN_CAVE_2F
ret nc
coord hl, 0, 0
hlcoord 0, 0
ld b, 3
ld c, 7
call TextBoxBorder
coord hl, 1, 1
hlcoord 1, 1
ld de, wSafariSteps
lb bc, 2, 3
call PrintNumber
coord hl, 4, 1
hlcoord 4, 1
ld de, SafariSteps
call PlaceString
coord hl, 1, 3
hlcoord 1, 3
ld de, SafariBallText
call PlaceString
ld a, [wNumSafariBalls]
cp 10
jr nc, .asm_c56d
coord hl, 5, 3
hlcoord 5, 3
ld a, " "
ld [hl], a
.asm_c56d
coord hl, 6, 3
hlcoord 6, 3
ld de, wNumSafariBalls
lb bc, 1, 2
jp PrintNumber
@ -267,28 +267,28 @@ _GetTileAndCoordsInFrontOfPlayer:
and a ; cp SPRITE_FACING_DOWN
jr nz, .notFacingDown
; facing down
aCoord 8, 11
lda_coord 8, 11
inc d
jr .storeTile
.notFacingDown
cp SPRITE_FACING_UP
jr nz, .notFacingUp
; facing up
aCoord 8, 7
lda_coord 8, 7
dec d
jr .storeTile
.notFacingUp
cp SPRITE_FACING_LEFT
jr nz, .notFacingLeft
; facing left
aCoord 6, 9
lda_coord 6, 9
dec e
jr .storeTile
.notFacingLeft
cp SPRITE_FACING_RIGHT
jr nz, .storeTile
; facing right
aCoord 10, 9
lda_coord 10, 9
inc e
.storeTile
ld c, a
@ -308,7 +308,7 @@ GetTileTwoStepsInFrontOfPlayer:
; facing down
ld hl, hPlayerFacing
set 0, [hl]
aCoord 8, 13
lda_coord 8, 13
inc d
jr .storeTile
.notFacingDown
@ -317,7 +317,7 @@ GetTileTwoStepsInFrontOfPlayer:
; facing up
ld hl, hPlayerFacing
set 1, [hl]
aCoord 8, 5
lda_coord 8, 5
dec d
jr .storeTile
.notFacingUp
@ -326,7 +326,7 @@ GetTileTwoStepsInFrontOfPlayer:
; facing left
ld hl, hPlayerFacing
set 2, [hl]
aCoord 4, 9
lda_coord 4, 9
dec e
jr .storeTile
.notFacingLeft
@ -335,7 +335,7 @@ GetTileTwoStepsInFrontOfPlayer:
; facing right
ld hl, hPlayerFacing
set 3, [hl]
aCoord 12, 9
lda_coord 12, 9
inc e
.storeTile
ld c, a