diff options
author | Astatin <[email protected]> | 2025-05-09 17:44:37 +0200 |
---|---|---|
committer | Astatin <[email protected]> | 2025-05-09 17:44:37 +0200 |
commit | b0f9e2e6d53983faa9d213b40d2bd6a23473e134 (patch) | |
tree | e8bf5eedd762203972afa10c6be79692767a3d2f /enemiesattacks/basic.gbasm | |
parent | 507a9876b85f47ff81cc9150bea858eec064ba05 (diff) |
Refactoring the animations/directions + entities turn function with macros + finishing froge
Diffstat (limited to 'enemiesattacks/basic.gbasm')
-rw-r--r-- | enemiesattacks/basic.gbasm | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/enemiesattacks/basic.gbasm b/enemiesattacks/basic.gbasm index 103ebc5..984029c 100644 --- a/enemiesattacks/basic.gbasm +++ b/enemiesattacks/basic.gbasm @@ -1,4 +1,8 @@ Basic_Enemy_Attack: ; Direction to face in E. Result in BC (XY), Direction in D + LD A, D + AND $f0 + SWAP A + LD D, A LD A, E DEC A DEC D @@ -10,12 +14,24 @@ Basic_Enemy_Attack: ; Direction to face in E. Result in BC (XY), Direction in D JR NZ, =.attack LD D, E + LD A, D + SWAP A + AND $70 + OR D + LD D, A RET .attack: LD A, E - OR $10 + SWAP A + AND $70 + OR E LD D, A + LD A, L + AND $f0 + OR $0a + LD L, A + LD (HL), $01 PUSH BC LD A, $mem_bunny_direction |