Fix inaccurate denotations to the concepts of tile, tile collision, and collision permission (#1078)
This commit is contained in:
16
home/map.asm
16
home/map.asm
@@ -1518,12 +1518,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
|
||||
@@ -1555,13 +1555,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
|
||||
@@ -1574,13 +1574,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
|
||||
@@ -1708,7 +1708,7 @@ GetFacingTileCoord::
|
||||
db 1, 0
|
||||
dw wTileRight
|
||||
|
||||
GetCoordTile::
|
||||
GetCoordTileCollision::
|
||||
; Get the collision byte for tile d, e
|
||||
call GetBlockLocation
|
||||
ld a, [hl]
|
||||
|
@@ -71,34 +71,34 @@ DoesSpriteHaveFacings::
|
||||
pop de
|
||||
ret
|
||||
|
||||
GetPlayerTile::
|
||||
ld a, [wPlayerTile]
|
||||
call GetTileCollision
|
||||
GetPlayerTilePermission::
|
||||
ld a, [wPlayerTileCollision]
|
||||
call GetTilePermission
|
||||
ld b, a
|
||||
ret
|
||||
|
||||
CheckOnWater::
|
||||
ld a, [wPlayerTile]
|
||||
call GetTileCollision
|
||||
ld a, [wPlayerTileCollision]
|
||||
call GetTilePermission
|
||||
sub WATER_TILE
|
||||
ret z
|
||||
and a
|
||||
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
|
||||
@@ -189,7 +189,7 @@ CheckWaterfallTile::
|
||||
ret
|
||||
|
||||
CheckStandingOnEntrance::
|
||||
ld a, [wPlayerTile]
|
||||
ld a, [wPlayerTileCollision]
|
||||
cp COLL_DOOR
|
||||
ret z
|
||||
cp COLL_DOOR_79
|
||||
|
Reference in New Issue
Block a user