mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2024-11-16 11:27:33 -08:00
Fix WATERTILE/WALLTILE constants
WATRTILE was wrongly defined as 15, and WALLTILE as 1. Those had to be flipped around. This has allowed for us to replace inmediate values with these constants in several places to improve readability. WATRTILE was renamed to WATERTILE in the name of readability.
This commit is contained in:
parent
4e4e792474
commit
7c9a156133
@ -1,6 +1,6 @@
|
||||
LANDTILE EQU 0
|
||||
WALLTILE EQU 1
|
||||
WATRTILE EQU 15
|
||||
WALLTILE EQU $f
|
||||
WATERTILE EQU 1
|
||||
|
||||
TALK EQU 1 << 4
|
||||
|
||||
|
@ -76,7 +76,7 @@ Function6f07: ; 6f07
|
||||
ld a, [hl]
|
||||
ld d, a
|
||||
call GetTileCollision
|
||||
and a
|
||||
and a ; land
|
||||
jr z, Function6f3e
|
||||
scf
|
||||
ret
|
||||
@ -89,7 +89,7 @@ Function6f2c: ; 6f2c
|
||||
add hl, bc
|
||||
ld a, [hl]
|
||||
call GetTileCollision
|
||||
cp $1
|
||||
cp WATERTILE
|
||||
jr z, Function6f3e
|
||||
scf
|
||||
ret
|
||||
@ -210,11 +210,11 @@ Function6fa1: ; 6fa1
|
||||
call GetCoordTile
|
||||
call GetTileCollision
|
||||
pop de
|
||||
and a
|
||||
and a ; land
|
||||
jr nz, .asm_6fd7
|
||||
call GetCoordTile
|
||||
call GetTileCollision
|
||||
and a
|
||||
and a ; land
|
||||
jr nz, .asm_6fd7
|
||||
xor a
|
||||
ret
|
||||
|
@ -770,7 +770,7 @@ DoPlayerMovement:: ; 80000
|
||||
; Otherwise, return carry.
|
||||
|
||||
call GetTileCollision
|
||||
cp 1
|
||||
cp WATERTILE
|
||||
jr z, .Water
|
||||
|
||||
; Can walk back onto land from water.
|
||||
|
@ -412,7 +412,7 @@ SurfFunction: ; c909
|
||||
jr z, .alreadyfail
|
||||
call GetFacingTileCoord
|
||||
call GetTileCollision
|
||||
cp $1
|
||||
cp WATERTILE
|
||||
jr nz, .cannotsurf
|
||||
call CheckDirection
|
||||
jr c, .cannotsurf
|
||||
@ -549,7 +549,7 @@ TrySurfOW:: ; c9e7
|
||||
; Must be facing water.
|
||||
ld a, [EngineBuffer1]
|
||||
call GetTileCollision
|
||||
cp 1 ; surfable
|
||||
cp WATERTILE
|
||||
jr nz, .quit
|
||||
|
||||
; Check tile permissions.
|
||||
@ -1522,7 +1522,7 @@ FishFunction: ; cf8e
|
||||
jr z, .fail
|
||||
call GetFacingTileCoord
|
||||
call GetTileCollision
|
||||
cp $1
|
||||
cp WATERTILE
|
||||
jr z, .facingwater
|
||||
.fail
|
||||
ld a, $3
|
||||
@ -1769,7 +1769,7 @@ BikeFunction: ; d0b3
|
||||
|
||||
.ok
|
||||
call GetPlayerStandingTile
|
||||
and $f ; can't use our bike in a wall or on water
|
||||
and WALLTILE | WATERTILE ; can't use our bike in a wall or on water
|
||||
jr nz, .nope
|
||||
xor a
|
||||
ret
|
||||
|
@ -84,7 +84,7 @@ GetPlayerStandingTile:: ; 184a
|
||||
CheckOnWater:: ; 1852
|
||||
ld a, [PlayerStandingTile]
|
||||
call GetTileCollision
|
||||
sub 1
|
||||
sub WATERTILE
|
||||
ret z
|
||||
and a
|
||||
ret
|
||||
|
@ -13,7 +13,7 @@ TALKABLE EQUS "db TALK +"
|
||||
NONTALKABLE LANDTILE ; 04
|
||||
NONTALKABLE LANDTILE ; 05
|
||||
NONTALKABLE LANDTILE ; 06
|
||||
NONTALKABLE WATRTILE ; 07
|
||||
NONTALKABLE WALLTILE ; 07
|
||||
NONTALKABLE LANDTILE ; 08
|
||||
NONTALKABLE LANDTILE ; 09
|
||||
NONTALKABLE LANDTILE ; 0a
|
||||
@ -21,55 +21,55 @@ TALKABLE EQUS "db TALK +"
|
||||
NONTALKABLE LANDTILE ; 0c
|
||||
NONTALKABLE LANDTILE ; 0d
|
||||
NONTALKABLE LANDTILE ; 0e
|
||||
NONTALKABLE WATRTILE ; 0f
|
||||
NONTALKABLE WALLTILE ; 0f
|
||||
NONTALKABLE LANDTILE ; 10
|
||||
NONTALKABLE LANDTILE ; 11
|
||||
TALKABLE WATRTILE ; 12
|
||||
TALKABLE WALLTILE ; 12
|
||||
NONTALKABLE LANDTILE ; 13
|
||||
NONTALKABLE LANDTILE ; 14
|
||||
TALKABLE WATRTILE ; 15
|
||||
TALKABLE WALLTILE ; 15
|
||||
NONTALKABLE LANDTILE ; 16
|
||||
NONTALKABLE LANDTILE ; 17
|
||||
NONTALKABLE LANDTILE ; 18
|
||||
NONTALKABLE LANDTILE ; 19
|
||||
TALKABLE WATRTILE ; 1a
|
||||
TALKABLE WALLTILE ; 1a
|
||||
NONTALKABLE LANDTILE ; 1b
|
||||
NONTALKABLE LANDTILE ; 1c
|
||||
TALKABLE WATRTILE ; 1d
|
||||
TALKABLE WALLTILE ; 1d
|
||||
NONTALKABLE LANDTILE ; 1e
|
||||
NONTALKABLE LANDTILE ; 1f
|
||||
NONTALKABLE WALLTILE ; 20
|
||||
NONTALKABLE WALLTILE ; 21
|
||||
TALKABLE WALLTILE ; 22
|
||||
NONTALKABLE WATERTILE ; 20
|
||||
NONTALKABLE WATERTILE ; 21
|
||||
TALKABLE WATERTILE ; 22
|
||||
NONTALKABLE LANDTILE ; 23
|
||||
TALKABLE WALLTILE ; 24
|
||||
NONTALKABLE WALLTILE ; 25
|
||||
NONTALKABLE WALLTILE ; 26
|
||||
NONTALKABLE WATRTILE ; 27
|
||||
NONTALKABLE WALLTILE ; 28
|
||||
NONTALKABLE WALLTILE ; 29
|
||||
TALKABLE WALLTILE ; 2a
|
||||
TALKABLE WATERTILE ; 24
|
||||
NONTALKABLE WATERTILE ; 25
|
||||
NONTALKABLE WATERTILE ; 26
|
||||
NONTALKABLE WALLTILE ; 27
|
||||
NONTALKABLE WATERTILE ; 28
|
||||
NONTALKABLE WATERTILE ; 29
|
||||
TALKABLE WATERTILE ; 2a
|
||||
NONTALKABLE LANDTILE ; 2b
|
||||
TALKABLE WALLTILE ; 2c
|
||||
NONTALKABLE WALLTILE ; 2d
|
||||
NONTALKABLE WALLTILE ; 2e
|
||||
NONTALKABLE WATRTILE ; 2f
|
||||
NONTALKABLE WALLTILE ; 30
|
||||
NONTALKABLE WALLTILE ; 31
|
||||
NONTALKABLE WALLTILE ; 32
|
||||
NONTALKABLE WALLTILE ; 33
|
||||
NONTALKABLE WALLTILE ; 34
|
||||
NONTALKABLE WALLTILE ; 35
|
||||
NONTALKABLE WALLTILE ; 36
|
||||
NONTALKABLE WALLTILE ; 37
|
||||
NONTALKABLE WALLTILE ; 38
|
||||
NONTALKABLE WALLTILE ; 39
|
||||
NONTALKABLE WALLTILE ; 3a
|
||||
NONTALKABLE WALLTILE ; 3b
|
||||
NONTALKABLE WALLTILE ; 3c
|
||||
NONTALKABLE WALLTILE ; 3d
|
||||
NONTALKABLE WALLTILE ; 3e
|
||||
NONTALKABLE WALLTILE ; 3f
|
||||
TALKABLE WATERTILE ; 2c
|
||||
NONTALKABLE WATERTILE ; 2d
|
||||
NONTALKABLE WATERTILE ; 2e
|
||||
NONTALKABLE WALLTILE ; 2f
|
||||
NONTALKABLE WATERTILE ; 30
|
||||
NONTALKABLE WATERTILE ; 31
|
||||
NONTALKABLE WATERTILE ; 32
|
||||
NONTALKABLE WATERTILE ; 33
|
||||
NONTALKABLE WATERTILE ; 34
|
||||
NONTALKABLE WATERTILE ; 35
|
||||
NONTALKABLE WATERTILE ; 36
|
||||
NONTALKABLE WATERTILE ; 37
|
||||
NONTALKABLE WATERTILE ; 38
|
||||
NONTALKABLE WATERTILE ; 39
|
||||
NONTALKABLE WATERTILE ; 3a
|
||||
NONTALKABLE WATERTILE ; 3b
|
||||
NONTALKABLE WATERTILE ; 3c
|
||||
NONTALKABLE WATERTILE ; 3d
|
||||
NONTALKABLE WATERTILE ; 3e
|
||||
NONTALKABLE WATERTILE ; 3f
|
||||
NONTALKABLE LANDTILE ; 40
|
||||
NONTALKABLE LANDTILE ; 41
|
||||
NONTALKABLE LANDTILE ; 42
|
||||
@ -104,7 +104,7 @@ TALKABLE EQUS "db TALK +"
|
||||
NONTALKABLE LANDTILE ; 5f
|
||||
NONTALKABLE LANDTILE ; 60
|
||||
NONTALKABLE LANDTILE ; 61
|
||||
NONTALKABLE WATRTILE ; 62
|
||||
NONTALKABLE WALLTILE ; 62
|
||||
NONTALKABLE LANDTILE ; 63
|
||||
NONTALKABLE LANDTILE ; 64
|
||||
NONTALKABLE LANDTILE ; 65
|
||||
@ -112,7 +112,7 @@ TALKABLE EQUS "db TALK +"
|
||||
NONTALKABLE LANDTILE ; 67
|
||||
NONTALKABLE LANDTILE ; 68
|
||||
NONTALKABLE LANDTILE ; 69
|
||||
NONTALKABLE WATRTILE ; 6a
|
||||
NONTALKABLE WALLTILE ; 6a
|
||||
NONTALKABLE LANDTILE ; 6b
|
||||
NONTALKABLE LANDTILE ; 6c
|
||||
NONTALKABLE LANDTILE ; 6d
|
||||
@ -134,38 +134,38 @@ TALKABLE EQUS "db TALK +"
|
||||
NONTALKABLE LANDTILE ; 7d
|
||||
NONTALKABLE LANDTILE ; 7e
|
||||
NONTALKABLE LANDTILE ; 7f
|
||||
NONTALKABLE WATRTILE ; 80
|
||||
NONTALKABLE WATRTILE ; 81
|
||||
NONTALKABLE WATRTILE ; 82
|
||||
NONTALKABLE WATRTILE ; 83
|
||||
NONTALKABLE WATRTILE ; 84
|
||||
NONTALKABLE WALLTILE ; 80
|
||||
NONTALKABLE WALLTILE ; 81
|
||||
NONTALKABLE WALLTILE ; 82
|
||||
NONTALKABLE WALLTILE ; 83
|
||||
NONTALKABLE WALLTILE ; 84
|
||||
NONTALKABLE LANDTILE ; 85
|
||||
NONTALKABLE LANDTILE ; 86
|
||||
NONTALKABLE LANDTILE ; 87
|
||||
NONTALKABLE WATRTILE ; 88
|
||||
NONTALKABLE WATRTILE ; 89
|
||||
NONTALKABLE WATRTILE ; 8a
|
||||
NONTALKABLE WATRTILE ; 8b
|
||||
NONTALKABLE WATRTILE ; 8c
|
||||
NONTALKABLE WALLTILE ; 88
|
||||
NONTALKABLE WALLTILE ; 89
|
||||
NONTALKABLE WALLTILE ; 8a
|
||||
NONTALKABLE WALLTILE ; 8b
|
||||
NONTALKABLE WALLTILE ; 8c
|
||||
NONTALKABLE LANDTILE ; 8d
|
||||
NONTALKABLE LANDTILE ; 8e
|
||||
NONTALKABLE LANDTILE ; 8f
|
||||
NONTALKABLE WATRTILE ; 90
|
||||
NONTALKABLE WATRTILE ; 91
|
||||
NONTALKABLE WATRTILE ; 92
|
||||
NONTALKABLE WATRTILE ; 93
|
||||
NONTALKABLE WATRTILE ; 94
|
||||
NONTALKABLE WATRTILE ; 95
|
||||
NONTALKABLE WATRTILE ; 96
|
||||
NONTALKABLE WATRTILE ; 97
|
||||
NONTALKABLE WATRTILE ; 98
|
||||
NONTALKABLE WATRTILE ; 99
|
||||
NONTALKABLE WATRTILE ; 9a
|
||||
NONTALKABLE WATRTILE ; 9b
|
||||
NONTALKABLE WATRTILE ; 9c
|
||||
NONTALKABLE WATRTILE ; 9d
|
||||
NONTALKABLE WATRTILE ; 9e
|
||||
NONTALKABLE WATRTILE ; 9f
|
||||
NONTALKABLE WALLTILE ; 90
|
||||
NONTALKABLE WALLTILE ; 91
|
||||
NONTALKABLE WALLTILE ; 92
|
||||
NONTALKABLE WALLTILE ; 93
|
||||
NONTALKABLE WALLTILE ; 94
|
||||
NONTALKABLE WALLTILE ; 95
|
||||
NONTALKABLE WALLTILE ; 96
|
||||
NONTALKABLE WALLTILE ; 97
|
||||
NONTALKABLE WALLTILE ; 98
|
||||
NONTALKABLE WALLTILE ; 99
|
||||
NONTALKABLE WALLTILE ; 9a
|
||||
NONTALKABLE WALLTILE ; 9b
|
||||
NONTALKABLE WALLTILE ; 9c
|
||||
NONTALKABLE WALLTILE ; 9d
|
||||
NONTALKABLE WALLTILE ; 9e
|
||||
NONTALKABLE WALLTILE ; 9f
|
||||
NONTALKABLE LANDTILE ; a0
|
||||
NONTALKABLE LANDTILE ; a1
|
||||
NONTALKABLE LANDTILE ; a2
|
||||
@ -198,22 +198,22 @@ TALKABLE EQUS "db TALK +"
|
||||
NONTALKABLE LANDTILE ; bd
|
||||
NONTALKABLE LANDTILE ; be
|
||||
NONTALKABLE LANDTILE ; bf
|
||||
NONTALKABLE WALLTILE ; c0
|
||||
NONTALKABLE WALLTILE ; c1
|
||||
NONTALKABLE WALLTILE ; c2
|
||||
NONTALKABLE WALLTILE ; c3
|
||||
NONTALKABLE WALLTILE ; c4
|
||||
NONTALKABLE WALLTILE ; c5
|
||||
NONTALKABLE WALLTILE ; c6
|
||||
NONTALKABLE WALLTILE ; c7
|
||||
NONTALKABLE WALLTILE ; c8
|
||||
NONTALKABLE WALLTILE ; c9
|
||||
NONTALKABLE WALLTILE ; ca
|
||||
NONTALKABLE WALLTILE ; cb
|
||||
NONTALKABLE WALLTILE ; cc
|
||||
NONTALKABLE WALLTILE ; cd
|
||||
NONTALKABLE WALLTILE ; ce
|
||||
NONTALKABLE WALLTILE ; cf
|
||||
NONTALKABLE WATERTILE ; c0
|
||||
NONTALKABLE WATERTILE ; c1
|
||||
NONTALKABLE WATERTILE ; c2
|
||||
NONTALKABLE WATERTILE ; c3
|
||||
NONTALKABLE WATERTILE ; c4
|
||||
NONTALKABLE WATERTILE ; c5
|
||||
NONTALKABLE WATERTILE ; c6
|
||||
NONTALKABLE WATERTILE ; c7
|
||||
NONTALKABLE WATERTILE ; c8
|
||||
NONTALKABLE WATERTILE ; c9
|
||||
NONTALKABLE WATERTILE ; ca
|
||||
NONTALKABLE WATERTILE ; cb
|
||||
NONTALKABLE WATERTILE ; cc
|
||||
NONTALKABLE WATERTILE ; cd
|
||||
NONTALKABLE WATERTILE ; ce
|
||||
NONTALKABLE WATERTILE ; cf
|
||||
NONTALKABLE LANDTILE ; d0
|
||||
NONTALKABLE LANDTILE ; d1
|
||||
NONTALKABLE LANDTILE ; d2
|
||||
@ -261,4 +261,4 @@ TALKABLE EQUS "db TALK +"
|
||||
NONTALKABLE LANDTILE ; fc
|
||||
NONTALKABLE LANDTILE ; fd
|
||||
NONTALKABLE LANDTILE ; fe
|
||||
NONTALKABLE WATRTILE ; ff
|
||||
NONTALKABLE WALLTILE ; ff
|
||||
|
Loading…
Reference in New Issue
Block a user