diff options
author | pfero <ohpee@loves.dicksinhisan.us> | 2017-10-28 23:47:52 +0200 |
---|---|---|
committer | yenatch <yenatch@gmail.com> | 2017-10-28 18:08:24 -0400 |
commit | 7c9a1561332d3ac9522b6c2dfa74e40835ab790b (patch) | |
tree | 428daed38d0319a5e5bda06850733eec786e54cd /engine | |
parent | 4e4e7924747b7eeeb898181ccdfb5339d60b1abb (diff) |
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.
Diffstat (limited to 'engine')
-rwxr-xr-x | engine/npc_movement.asm | 8 | ||||
-rwxr-xr-x | engine/player_movement.asm | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/engine/npc_movement.asm b/engine/npc_movement.asm index f9ce7b04e..bc36e3ee9 100755 --- a/engine/npc_movement.asm +++ b/engine/npc_movement.asm @@ -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 diff --git a/engine/player_movement.asm b/engine/player_movement.asm index 2f6660135..89593da5d 100755 --- a/engine/player_movement.asm +++ b/engine/player_movement.asm @@ -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. |