Fix inaccurate denotations to the concepts of tile, tile collision, and collision permission (#1078)

This commit is contained in:
xCrystal
2024-01-07 14:51:27 +01:00
parent 7f3b87950a
commit e0c278a595
17 changed files with 76 additions and 76 deletions

View File

@@ -70,11 +70,11 @@ WillObjectBumpIntoWater:
add hl, bc
bit OAM_PRIORITY, [hl]
jp nz, WillObjectRemainOnWater
ld hl, OBJECT_TILE
ld hl, OBJECT_TILE_COLLISION
add hl, bc
ld a, [hl]
ld d, a
call GetTileCollision
call GetTilePermission
and a ; LAND_TILE
jr z, WillObjectBumpIntoTile
scf
@@ -83,17 +83,17 @@ WillObjectBumpIntoWater:
WillObjectBumpIntoLand:
call CanObjectLeaveTile
ret c
ld hl, OBJECT_TILE
ld hl, OBJECT_TILE_COLLISION
add hl, bc
ld a, [hl]
call GetTileCollision
call GetTilePermission
cp WATER_TILE
jr z, WillObjectBumpIntoTile
scf
ret
WillObjectBumpIntoTile:
ld hl, OBJECT_TILE
ld hl, OBJECT_TILE_COLLISION
add hl, bc
ld a, [hl]
call GetSideWallDirectionMask
@@ -210,13 +210,13 @@ WillObjectRemainOnWater:
inc e
.continue
call GetCoordTile
call GetTileCollision
call GetCoordTileCollision
call GetTilePermission
pop de
and a ; LAND_TILE
jr nz, .not_land
call GetCoordTile
call GetTileCollision
call GetCoordTileCollision
call GetTilePermission
and a ; LAND_TILE
jr nz, .not_land
xor a