Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
shaymanjohn committed Dec 27, 2020
1 parent 436d5ae commit 23556da
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 23 deletions.
Binary file modified aticatac.dsk
Binary file not shown.
2 changes: 1 addition & 1 deletion boss.asm
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ init_boss

ld hl, dracula_room
cp (hl)
jr z, init_dracula
jr z, init_dracula

; Turn boss off if not in a boss room.
xor a
Expand Down
35 changes: 13 additions & 22 deletions weapon.asm
Original file line number Diff line number Diff line change
Expand Up @@ -411,36 +411,23 @@ check_weapon_hit
ld d, (ix + 0)
ld e, (ix + 1) ; d weapon width, e = weapon height

srl d
ld a, h
add d
ld h, a

srl e
ld a, l
add e
ld l, a

ld ix, sprite1
ld a, (ix + spr_state)
cp state_active
call z, check_weapon_hitting_sprite
call check_weapon_hitting_sprite

ld ix, sprite2
ld a, (ix + spr_state)
cp state_active
call z, check_weapon_hitting_sprite
call check_weapon_hitting_sprite

ld ix, sprite3
ld a, (ix + spr_state)
cp state_active
ret nz

check_weapon_hitting_sprite ; h = weapon x, l = weapon y, d = weapon width, e = weapon height, ix = sprite
ld a, (weapon_active)
and a
ret z

ld a, (ix + spr_state)
cp state_active
ret nz

push hl
push de

Expand All @@ -458,7 +445,9 @@ check_weapon_hitting_sprite ; h = weapon x, l = weapon y, d = weapon width,
neg

not_neg_x_weapon
cp 4
sla b
dec b
cp b
jr nc, end_weapon_hit_check

ld a, l
Expand All @@ -475,7 +464,9 @@ not_neg_x_weapon
neg

not_neg_y_weapon
cp 8
sla b
dec b
cp b
jr nc, end_weapon_hit_check

call kill_sprite
Expand Down Expand Up @@ -546,7 +537,7 @@ axe_data
defw axe_frame1, axe_frame0

sword_frame0
defb 0x02, 0x10 ; x, y
defb 0x02, 0x10 ; width, height
defb 0x01, 0x00 ; offset x, offset y
defw weapon_sword_0 ; graphics data
defw weapon2 ; draw routine
Expand Down

0 comments on commit 23556da

Please sign in to comment.