mirror of
https://github.com/deater/dos33fsprogs.git
synced 2024-08-28 12:29:35 +00:00
ootw: c2: can now blast shields away
also fix issue where doors needed to be cropped
This commit is contained in:
parent
c95f92cdea
commit
2242476aa4
116
ootw/blast.s
116
ootw/blast.s
@ -241,81 +241,43 @@ done_move_blast:
|
||||
; hit something, left
|
||||
;=====================
|
||||
disable_blast_left:
|
||||
lda #0
|
||||
sta blast0_out
|
||||
|
||||
lda LEFT_SHOOT_TARGET
|
||||
beq done_disable_blast_left
|
||||
|
||||
tax
|
||||
and #$f0
|
||||
|
||||
cmp #TARGET_DOOR
|
||||
beq blast_door_left
|
||||
|
||||
cmp #TARGET_ALIEN
|
||||
beq blast_alien_left
|
||||
|
||||
jmp done_disable_blast_left
|
||||
|
||||
|
||||
blast_alien_left:
|
||||
txa
|
||||
and #$f
|
||||
tax
|
||||
|
||||
lda #A_DISINTEGRATING
|
||||
sta alien_state,X
|
||||
|
||||
lda #0
|
||||
sta alien_gait,X
|
||||
|
||||
jmp done_blasting_left
|
||||
|
||||
|
||||
blast_door_left:
|
||||
txa
|
||||
and #$f0
|
||||
cmp #TARGET_DOOR
|
||||
bne done_disable_blast_left
|
||||
|
||||
txa
|
||||
and #$f
|
||||
tay
|
||||
|
||||
lda #DOOR_STATUS_EXPLODING1
|
||||
sta (DOOR_STATUS),Y
|
||||
|
||||
jsr recalc_walk_collision
|
||||
|
||||
done_blasting_left:
|
||||
|
||||
done_disable_blast_left:
|
||||
rts
|
||||
|
||||
jmp blast_something_common
|
||||
|
||||
;==================
|
||||
; hit something, right
|
||||
;==================
|
||||
disable_blast_right:
|
||||
lda #0
|
||||
sta blast0_out
|
||||
|
||||
lda RIGHT_SHOOT_TARGET
|
||||
beq done_disable_blast_right
|
||||
|
||||
|
||||
;=========================
|
||||
; blash something, common
|
||||
;=========================
|
||||
blast_something_common:
|
||||
|
||||
ldx #0
|
||||
stx blast0_out
|
||||
tax
|
||||
and #$f0
|
||||
|
||||
cmp #TARGET_DOOR
|
||||
beq blast_door_right
|
||||
beq blast_door
|
||||
|
||||
cmp #TARGET_ALIEN
|
||||
beq blast_alien_right
|
||||
beq blast_alien
|
||||
|
||||
jmp done_disable_blast_right
|
||||
cmp #TARGET_FRIEND
|
||||
beq blast_friend
|
||||
|
||||
blast_alien_right:
|
||||
cmp #TARGET_SHIELD
|
||||
beq blast_shield
|
||||
|
||||
jmp done_blasting_common
|
||||
|
||||
|
||||
blast_alien:
|
||||
txa
|
||||
and #$f
|
||||
tax
|
||||
@ -326,9 +288,39 @@ blast_alien_right:
|
||||
lda #0
|
||||
sta alien_gait,X
|
||||
|
||||
jmp done_blasting_right
|
||||
jmp done_blasting_common
|
||||
|
||||
blast_door_right:
|
||||
blast_friend:
|
||||
|
||||
lda #F_DISINTEGRATING
|
||||
sta friend_state
|
||||
|
||||
lda #FAI_DISINTEGRATING
|
||||
sta friend_ai_state
|
||||
|
||||
lda #0
|
||||
sta friend_gait
|
||||
|
||||
jmp done_blasting_common
|
||||
|
||||
blast_shield:
|
||||
|
||||
; FIXME: need animation for this
|
||||
|
||||
txa
|
||||
and #$f
|
||||
tax
|
||||
|
||||
lda #0
|
||||
sta shield_out,X
|
||||
|
||||
dec SHIELD_OUT
|
||||
|
||||
jmp done_blasting_common
|
||||
|
||||
blast_door:
|
||||
|
||||
; FIXME: change direction based on blast
|
||||
txa
|
||||
and #$f
|
||||
tay
|
||||
@ -338,9 +330,9 @@ blast_door_right:
|
||||
|
||||
jsr recalc_walk_collision
|
||||
|
||||
done_blasting_right:
|
||||
|
||||
done_blasting_common:
|
||||
|
||||
done_disable_blast_right:
|
||||
rts
|
||||
|
||||
|
||||
|
@ -48,7 +48,7 @@ actually_draw_door:
|
||||
cmp #DOOR_STATUS_EXPLODING1
|
||||
bcs draw_exploding_door
|
||||
|
||||
jsr put_sprite
|
||||
jsr put_sprite_crop
|
||||
|
||||
after_door_put_sprite:
|
||||
|
||||
@ -84,7 +84,7 @@ draw_exploding_door:
|
||||
not_done_exploding_door:
|
||||
dec XPOS
|
||||
|
||||
jsr put_sprite
|
||||
jsr put_sprite_crop
|
||||
|
||||
jmp after_door_put_sprite
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user