ootw: c4: action sequence hooked up

This commit is contained in:
Vince Weaver 2019-08-14 09:45:13 -04:00
parent e7d946a351
commit ea53b9f137
3 changed files with 55 additions and 53 deletions

View File

@ -7,14 +7,33 @@
; action sequence ; action sequence
;================= ;=================
;================= ;=================
; A has the sequence step+1
action_sequence: action_sequence:
tax ; it's actually one higher
dex
lda FRAMEL ; slow it down a bit
and #$3
bne not_done_action
inc ACTION_COUNT
lda ACTION_COUNT
cmp #69
bne not_done_action
lda #0
sta ACTION_COUNT
rts
not_done_action:
; draw both lines in the hlin ; draw both lines in the hlin
lda #$00 lda #$00
sta hlin_mask_smc+1 sta hlin_mask_smc+1
ldx #65 ; ldx #65
lda action_list_lo,x lda action_list_lo,x
sta ac_jump sta ac_jump
lda action_list_hi,x lda action_list_hi,x
@ -868,7 +887,7 @@ action_frame59:
ldy #28 ldy #28
jsr action_draw_alien2 jsr action_draw_alien2
ldx #254 ldx #250
ldy #24 ldy #24
jmp action_draw_alien1 jmp action_draw_alien1
@ -933,7 +952,7 @@ action_frame63:
; frame64: (125) ; frame64: (125)
; alien_eye@28,30 (-12,-4) ; alien_eye@28,30 (-12,-4)
action_frame64: action_frame64:
ldx #26 ldx #16
ldy #26 ldy #26
jmp action_draw_alien1 jmp action_draw_alien1

View File

@ -14,6 +14,14 @@ ootw_city_init:
sta LASER_OUT sta LASER_OUT
sta ALIEN_OUT sta ALIEN_OUT
sta ACTION_TRIGGERED
sta ACTION_COUNT
; lda #1
; sta ACTION_COUNT
;=============== ;===============
; set up aliens ; set up aliens
@ -94,6 +102,10 @@ alien_room_continue:
cpx #MAX_ALIENS cpx #MAX_ALIENS
bne alien_room_loop bne alien_room_loop
lda #0
sta FRAMEL ; reset frame count for action timer
sta FRAMEH
;============================== ;==============================
; setup per-room variables ; setup per-room variables
@ -672,63 +684,32 @@ c4_room4_cover:
c4_no_fg_cover: c4_no_fg_cover:
;========================
; handle cinematic action
;========================
;c2_draw_doorway: lda WHICH_ROOM ; only on causeway1
; cmp #2
; lda CART_X bne no_action_movie
; sta XPOS
; lda #36
; sta YPOS
; lda #<cart_sprite
; sta INL
; lda #>cart_sprite
; sta INH
; jsr put_sprite_crop
; jmp c2_no_fg_action
c4_no_fg_action: lda FRAMEH
cmp #1
bne action_no_trigger
;==================== lda ACTION_TRIGGERED ; already triggered
; activate fg objects bne action_no_trigger
;====================
;c2_fg_check_jail1:
; lda WHICH_JAIL
; cmp #1
; bne c2_fg_check_jail2
;
; lda CART_OUT
; bne c2_fg_check_jail2
;
; inc CART_OUT
action_trigger:
lda #1
sta ACTION_COUNT
sta ACTION_TRIGGERED
action_no_trigger:
;================ lda ACTION_COUNT
; move fg objects beq no_action_movie
;================
c4_move_fg_objects:
; lda CART_OUT
; cmp #1
; bne cart_not_out
; move cart
; lda FRAMEL
; and #$3
; bne cart_not_out
;
; inc CART_X
; lda CART_X
; cmp #39
; bne cart_not_out
; inc CART_OUT
;===============
; make pink (where applicable)
;===============
jsr action_sequence jsr action_sequence
no_action_movie:
;=============== ;===============
; page flip ; page flip

View File

@ -125,8 +125,10 @@ LASER_OUT = $DB ; 2+
GUN_CHARGE = $DC ; 2+ GUN_CHARGE = $DC ; 2+
MONSTER_AI = $DD ; C1 underwater MONSTER_AI = $DD ; C1 underwater
ACTION_COUNT = $DD ; C4
BG_BEAST = $DE ; C1 BG_BEAST = $DE ; C1
ACTION_TRIGGERED= $DE ; C4
ON_ELEVATOR = $DF ; ALL ON_ELEVATOR = $DF ; ALL