ootw: can now shoot while crouching

This commit is contained in:
Vince Weaver
2019-08-16 13:53:37 -04:00
parent f5437230e7
commit fe2e5f3959
4 changed files with 30 additions and 5 deletions

View File

@@ -37,6 +37,16 @@ fire_blast:
lda PHYSICIST_Y lda PHYSICIST_Y
clc clc
adc #4 adc #4
ldx PHYSICIST_STATE
cpx #P_CROUCH_SHOOTING
bne blast_ypos_done
blast_crouch:
clc
adc #4
blast_ypos_done:
sta blast0_y sta blast0_y
; set direction ; set direction

View File

@@ -11,9 +11,9 @@
handle_gun: handle_gun:
;=================== ;===================
; ??? ; check_gun_firing
;=================== ;===================
jsr handle_gun2 jsr check_gun_firing
;======================= ;=======================
; draw gun charge effect ; draw gun charge effect
@@ -54,7 +54,13 @@ handle_gun:
; rts ; rts
handle_gun2: ;====================
;====================
; check gun firing
;====================
;====================
check_gun_firing:
lda HAVE_GUN ; no gun, do nothing lda HAVE_GUN ; no gun, do nothing
beq no_have_gun beq no_have_gun
@@ -168,7 +174,8 @@ done_zap:
ldy PHYSICIST_STATE ldy PHYSICIST_STATE
cpy #P_CROUCH_SHOOTING cpy #P_CROUCH_SHOOTING
bne done_zap_ypos bne done_zap_ypos
adc #2 clc
adc #4
done_zap_ypos: done_zap_ypos:
sta YPOS sta YPOS

View File

@@ -319,7 +319,7 @@ not_already_firing:
lda PHYSICIST_STATE lda PHYSICIST_STATE
and #STATE_CROUCHING and #STATE_CROUCHING
bne crouch_charge beq crouch_charge
ldy #P_CROUCH_SHOOTING ldy #P_CROUCH_SHOOTING
bne crouch_charge_go ; bra bne crouch_charge_go ; bra
crouch_charge: crouch_charge:

View File

@@ -43,6 +43,14 @@ fire_laser:
lda PHYSICIST_Y lda PHYSICIST_Y
clc clc
adc #4 adc #4
ldx PHYSICIST_STATE
cpx #P_CROUCH_SHOOTING
bne laser_crouch_done
laser_crouch:
clc
adc #4
laser_crouch_done:
sta laser0_y sta laser0_y
; set direction ; set direction