mirror of
https://github.com/deater/dos33fsprogs.git
synced 2024-09-10 08:54:51 +00:00
ootw: add laser
This commit is contained in:
parent
10ac8d512b
commit
8f38e37de0
33
ootw/alien.s
33
ootw/alien.s
@ -54,6 +54,8 @@ move_alien:
|
||||
beq move_alien_running
|
||||
cmp #A_YELLING
|
||||
beq move_alien_yelling
|
||||
cmp #A_SHOOTING_UP
|
||||
beq move_alien_yelling
|
||||
done_move_alien:
|
||||
rts
|
||||
|
||||
@ -120,6 +122,7 @@ astate_table_lo:
|
||||
.byte <alien_crouching ; 03
|
||||
.byte <alien_turning ; 04
|
||||
.byte <alien_yelling ; 05
|
||||
.byte <alien_shooting_up; 06
|
||||
|
||||
astate_table_hi:
|
||||
.byte >alien_standing ; 00
|
||||
@ -128,6 +131,7 @@ astate_table_hi:
|
||||
.byte >alien_crouching ; 03
|
||||
.byte >alien_turning ; 04
|
||||
.byte >alien_yelling ; 05
|
||||
.byte >alien_shooting_up; 06
|
||||
|
||||
; Urgh, make sure this doesn't end up at $FF or you hit the
|
||||
; NMOS 6502 bug
|
||||
@ -298,7 +302,12 @@ alien_draw_turning:
|
||||
alien_yelling:
|
||||
lda alien_state+ALIEN_GAIT,X
|
||||
|
||||
and #$c0
|
||||
; 00
|
||||
; 01
|
||||
; 10
|
||||
; 11
|
||||
|
||||
and #$40
|
||||
bne alien_yelling_no_waving
|
||||
|
||||
lda alien_state+ALIEN_GAIT,X
|
||||
@ -327,11 +336,18 @@ alien_yelling_no_waving:
|
||||
|
||||
alien_shooting_up:
|
||||
lda alien_state+ALIEN_GAIT,X
|
||||
and #$10
|
||||
and #$30
|
||||
|
||||
; 000 000
|
||||
; 010 000
|
||||
; 100 000
|
||||
; 110 000
|
||||
|
||||
lsr
|
||||
lsr
|
||||
and #2
|
||||
lsr
|
||||
|
||||
and #6
|
||||
tay
|
||||
|
||||
lda alien_shoot_up_progression,Y
|
||||
@ -340,7 +356,16 @@ alien_shooting_up:
|
||||
lda alien_shoot_up_progression+1,Y
|
||||
sta INH
|
||||
|
||||
jmp finally_draw_alien
|
||||
cpy #0
|
||||
|
||||
lda alien_state+ALIEN_GAIT,X
|
||||
and #$3f
|
||||
bne finally_draw_alien
|
||||
|
||||
lda #30
|
||||
sta SHOOTING
|
||||
|
||||
; bne finally_draw_alien ; bra
|
||||
|
||||
|
||||
|
||||
|
@ -147,6 +147,7 @@ end_message:
|
||||
.include "gr_offsets_hl.s"
|
||||
.include "gr_run_sequence.s"
|
||||
.include "gr_overlay.s"
|
||||
.include "gr_vlin.s"
|
||||
.include "random16.s"
|
||||
.include "keyboard.s"
|
||||
|
||||
|
@ -40,6 +40,7 @@ ootw_cage:
|
||||
sta CAGE_AMPLITUDE
|
||||
sta CAGE_OFFSET
|
||||
sta CAGE_GUARD
|
||||
sta SHOOTING
|
||||
|
||||
bit KEYRESET ; clear keypress
|
||||
|
||||
@ -118,6 +119,33 @@ cage_amp_2:
|
||||
|
||||
done_drawing_cage:
|
||||
|
||||
;======================
|
||||
; draw laser
|
||||
;======================
|
||||
|
||||
lda SHOOTING
|
||||
beq done_draw_laser
|
||||
|
||||
lda #$11
|
||||
sta COLOR
|
||||
ldx SHOOTING
|
||||
stx V2
|
||||
|
||||
lda SHOOTING
|
||||
sec
|
||||
sbc #20
|
||||
bpl laser_not_offscreen
|
||||
lda #0
|
||||
laser_not_offscreen:
|
||||
tax
|
||||
ldy #21
|
||||
jsr vlin
|
||||
|
||||
dec SHOOTING
|
||||
dec SHOOTING
|
||||
dec SHOOTING
|
||||
|
||||
done_draw_laser:
|
||||
|
||||
;======================
|
||||
; draw guard
|
||||
@ -179,6 +207,7 @@ patrolling_move:
|
||||
lda CAGE_AMPLITUDE
|
||||
cmp #2
|
||||
beq guard_yelling
|
||||
|
||||
cmp #3
|
||||
beq guard_shooting
|
||||
|
||||
@ -198,14 +227,12 @@ guard_shooting:
|
||||
|
||||
; guard shooting
|
||||
|
||||
; lda alien0_x
|
||||
; cmp #21
|
||||
; bne guard_move_and_draw
|
||||
|
||||
; lda #A_SHOOTING_UP
|
||||
; sta alien0_state
|
||||
; jmp guard_move_and_draw
|
||||
lda alien0_x
|
||||
cmp #21
|
||||
bne guard_move_and_draw
|
||||
|
||||
lda #A_SHOOTING_UP
|
||||
sta alien0_state
|
||||
|
||||
|
||||
guard_move_and_draw:
|
||||
@ -345,27 +372,6 @@ no_move_cage_guard:
|
||||
cmp #$ff
|
||||
beq done_cage
|
||||
|
||||
; check if done this level
|
||||
; cmp #$2
|
||||
; bne not_to_right
|
||||
|
||||
; exit to right
|
||||
|
||||
; lda #0
|
||||
; sta PHYSICIST_X
|
||||
; sta WHICH_CAVE
|
||||
|
||||
; jmp ootw_cavern
|
||||
|
||||
;not_to_right:
|
||||
; cmp #$1
|
||||
; bne not_done_pool
|
||||
|
||||
; lda #37
|
||||
; sta PHYSICIST_X
|
||||
|
||||
; jmp ootw_rope
|
||||
|
||||
|
||||
|
||||
; loop forever
|
||||
@ -625,7 +631,7 @@ changing_guard11_sprite:
|
||||
changing_guard12_sprite:
|
||||
.byte 4,9
|
||||
.byte $22,$A2,$A2,$22
|
||||
.byte $72,$57,$75,$22
|
||||
.byte $72,$f7,$7f,$22
|
||||
.byte $77,$07,$00,$A2
|
||||
.byte $AA,$77,$00,$AA
|
||||
.byte $AA,$77,$10,$AA
|
||||
@ -637,7 +643,7 @@ changing_guard12_sprite:
|
||||
changing_guard13_sprite:
|
||||
.byte 4,9
|
||||
.byte $22,$A2,$A2,$22
|
||||
.byte $72,$57,$75,$22
|
||||
.byte $72,$f7,$7f,$22
|
||||
.byte $77,$07,$00,$A2
|
||||
.byte $AA,$00,$77,$AA
|
||||
.byte $AA,$77,$10,$AA
|
||||
|
@ -168,7 +168,8 @@ PHYSICIST_STATE = $EA
|
||||
|
||||
|
||||
BEFORE_SWING = $EB ; C1
|
||||
CART_OUT = $EB ; C2
|
||||
SHOOTING = $EB ; C2 cage
|
||||
CART_OUT = $EB ; C2 jail
|
||||
|
||||
CUTFRAME = $EC
|
||||
DISP_PAGE = $ED ; ALL
|
||||
|
Loading…
Reference in New Issue
Block a user