aboutsummaryrefslogtreecommitdiff
path: root/enemiesattacks/laser.gbasm
diff options
context:
space:
mode:
Diffstat (limited to 'enemiesattacks/laser.gbasm')
-rw-r--r--enemiesattacks/laser.gbasm18
1 files changed, 1 insertions, 17 deletions
diff --git a/enemiesattacks/laser.gbasm b/enemiesattacks/laser.gbasm
index 9e2f67d..648c5f7 100644
--- a/enemiesattacks/laser.gbasm
+++ b/enemiesattacks/laser.gbasm
@@ -1,4 +1,4 @@
-Laser_sight_check: ; BC = XY of the enemy. D is unchanged. Direction to face in E (or 0 if not)
+Laser_sight_check: ; BC = XY of the enemy. D = direction (must be unchanged). Direction to face in E (or 0 if not)
LD E, $00
; straight line + distance <= 4
@@ -49,22 +49,6 @@ Laser_sight_check: ; BC = XY of the enemy. D is unchanged. Direction to face in
RET
Laser_Enemy_Attack: ; Direction to face in E. Result in BC (XY), Direction in D
- LD A, E
- DEC A
- DEC D
- XOR D
- INC D
- CP $00
- JR Z, =.attack
- BIT 1, A
- JR NZ, =.attack
-
- LD A, E
- OR $00
- LD D, A
- RET
-
- .attack:
PUSH DE
PUSH BC