diff options
Diffstat (limited to 'enemiesattacks')
-rw-r--r-- | enemiesattacks/basic.gbasm | 4 | ||||
-rw-r--r-- | enemiesattacks/freeze.gbasm | 4 | ||||
-rw-r--r-- | enemiesattacks/laser.gbasm | 18 |
3 files changed, 3 insertions, 23 deletions
diff --git a/enemiesattacks/basic.gbasm b/enemiesattacks/basic.gbasm index 63bf3e4..103ebc5 100644 --- a/enemiesattacks/basic.gbasm +++ b/enemiesattacks/basic.gbasm @@ -9,9 +9,7 @@ Basic_Enemy_Attack: ; Direction to face in E. Result in BC (XY), Direction in D BIT 1, A JR NZ, =.attack - LD A, E - OR $00 - LD D, A + LD D, E RET .attack: diff --git a/enemiesattacks/freeze.gbasm b/enemiesattacks/freeze.gbasm index 35dadf3..057dec4 100644 --- a/enemiesattacks/freeze.gbasm +++ b/enemiesattacks/freeze.gbasm @@ -9,9 +9,7 @@ Freeze_Enemy_Attack: ; Direction to face in E. Result in BC (XY), Direction in D BIT 1, A JR NZ, =.attack - LD A, E - OR $00 - LD D, A + LD D, E RET .attack: 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 |