Apply e0c278a595bdd0b724607e14398a3c340860b449 from pokecrystal

This commit is contained in:
xCrystal
2024-02-11 00:25:25 +01:00
parent 5c4d982702
commit b1fd8f941a
17 changed files with 80 additions and 80 deletions

View File

@@ -1739,12 +1739,12 @@ GetMovementPermissions::
ld d, a
ld a, [wPlayerMapY]
ld e, a
call GetCoordTile
ld [wPlayerTile], a
call GetCoordTileCollision
ld [wPlayerTileCollision], a
call .CheckHiNybble
ret nz
ld a, [wPlayerTile]
ld a, [wPlayerTileCollision]
and 7
ld hl, .MovementPermissionsData
add l
@@ -1776,13 +1776,13 @@ GetMovementPermissions::
push de
inc e
call GetCoordTile
call GetCoordTileCollision
ld [wTileDown], a
call .Down
pop de
dec e
call GetCoordTile
call GetCoordTileCollision
ld [wTileUp], a
call .Up
ret
@@ -1795,13 +1795,13 @@ GetMovementPermissions::
push de
dec d
call GetCoordTile
call GetCoordTileCollision
ld [wTileLeft], a
call .Left
pop de
inc d
call GetCoordTile
call GetCoordTileCollision
ld [wTileRight], a
call .Right
ret
@@ -1929,7 +1929,7 @@ GetFacingTileCoord::
db 1, 0
dw wTileRight
GetCoordTile::
GetCoordTileCollision::
; Get the collision byte for tile d, e
call GetBlockLocation
ld a, [hl]

View File

@@ -71,9 +71,9 @@ DoesSpriteHaveFacings::
pop de
ret
GetPlayerTile::
ld a, [wPlayerTile]
call GetTileCollision
GetPlayerTilePermission::
ld a, [wPlayerTileCollision]
call GetTilePermission
ld b, a
ret
@@ -81,8 +81,8 @@ CheckOnWater::
; return z if on water, nz otherwise.
; if tile permission is SPACE_TILE, wPlayerState dictates whether player is on water or not.
; otherwise the current tile permission being LAND_TILE or WATER_TILE dictates it.
ld a, [wPlayerTile]
call GetTileCollision
ld a, [wPlayerTileCollision]
call GetTilePermission
cp SPACE_TILE
jr z, .check_player_state
sub WATER_TILE
@@ -97,20 +97,20 @@ CheckOnWater::
cp PLAYER_SURF_PIKA
ret
GetTileCollision::
; Get the collision type of tile a.
GetTilePermission::
; Get the permission of tile collision a.
push de
push hl
ld hl, TileCollisionTable
ld hl, CollisionPermissionTable
ld e, a
ld d, 0
add hl, de
ldh a, [hROMBank]
push af
ld a, BANK(TileCollisionTable)
ld a, BANK(CollisionPermissionTable)
rst Bankswitch
ld e, [hl]
pop af
@@ -201,7 +201,7 @@ CheckWaterfallTile::
ret
CheckStandingOnEntrance::
ld a, [wPlayerTile]
ld a, [wPlayerTileCollision]
cp COLL_DOOR
ret z
cp COLL_DOOR_79