ds: fine tune the timing a bit

This commit is contained in:
Vince Weaver 2019-11-05 16:48:44 -05:00
parent 89a29693e9
commit 69b7bc1b22
2 changed files with 80 additions and 36 deletions

View File

@ -451,12 +451,12 @@ change_state_clear_gait:
starbase_keypresses: starbase_keypresses:
; in room 0 ; in room 0
.byte 'L',180 ; start charging laser .byte 'L',180 ; start charging laser, wait 180
.byte 'L',2 ; release, blasting door .byte 'L',2 ; release, blasting door, wait 2
.byte 'D',200 ; walk right .byte 'D',20 ; walk right
.byte 'D',50 ; walk right ; into door .byte 'D',180 ; run right
.byte 'A',2 ; walk right ; turn .byte 'A',2 ; walk left ; turn
.byte 'A',50 ; walk right ; walk left .byte 'A',50 ; walk left ; walk left
.byte 'D',2 ; stop .byte 'D',2 ; stop
.byte 'D',2 ; turn right .byte 'D',2 ; turn right
.byte 'S',20 ; duck .byte 'S',20 ; duck
@ -464,7 +464,8 @@ starbase_keypresses:
.byte 'L',20 ; shoot ;blow up door .byte 'L',20 ; shoot ;blow up door
.byte 'D',2 ; stand .byte 'D',2 ; stand
; in room 1 ; in room 1
.byte 'D',150 ; walk right .byte 'D',10 ; walk right
.byte 'D',64 ; run right
.byte 'S',20 ; duck .byte 'S',20 ; duck
.byte 'L',50 ; start charging .byte 'L',50 ; start charging
.byte 'L',20 ; make shield .byte 'L',20 ; make shield

View File

@ -10,9 +10,9 @@ starbase_init:
lda #0 lda #0
sta WHICH_ROOM sta WHICH_ROOM
sta BG_SCROLL sta BG_SCROLL
sta CART_OUT
sta LASER_OUT sta LASER_OUT
sta BLAST_OUT sta BLAST_OUT
sta CHARGER_COUNT
sta GUN_STATE sta GUN_STATE
sta GUN_FIRE sta GUN_FIRE
sta NUM_DOORS sta NUM_DOORS
@ -26,6 +26,9 @@ starbase_init:
lda #100 lda #100
sta GUN_CHARGE sta GUN_CHARGE
lda #$40
sta CART_X
;==================== ;====================
; reset doors ; reset doors
lda #DOOR_STATUS_LOCKED lda #DOOR_STATUS_LOCKED
@ -496,8 +499,8 @@ no_draw_alien:
lda WHICH_ROOM lda WHICH_ROOM
beq c4_room0_cover beq c4_room0_cover
; cmp #4 cmp #2
; beq c4_room4_cover beq room2_robot
jmp c4_no_fg_cover jmp c4_no_fg_cover
@ -513,38 +516,72 @@ c4_room0_cover:
lda #>causeway_door_cover lda #>causeway_door_cover
sta INH sta INH
; jsr put_sprite jsr put_sprite
jmp c4_no_fg_cover
room2_robot:
; 0 is never seen, 2 is all done
lda CART_OUT
cmp #1
bne c4_no_fg_cover
c2_draw_cart:
lda CART_X
sta XPOS
lda #42
sta YPOS
lda #<robot_sprite
sta INL
lda #>robot_sprite
sta INH
jsr put_sprite_crop
c4_no_fg_cover: c4_no_fg_cover:
;======================== ;========================
; handle cinematic action ; activate fg actions
;======================== ;========================
lda WHICH_ROOM ; only on causeway1 lda WHICH_ROOM
cmp #2 cmp #2
bne no_action_movie bne no_fg_action
lda FRAMEH lda CART_OUT
bne no_fg_action ; if 0 activate
inc CART_OUT
no_fg_action:
;================
; move fg objects
;================
move_fg_objects:
lda CART_OUT
cmp #1 cmp #1
bne action_no_trigger bne cart_not_out
lda ACTION_TRIGGERED ; already triggered ; move cart
bne action_no_trigger
action_trigger: lda FRAMEL
lda #1 and #$3
sta ACTION_COUNT bne cart_not_out
sta ACTION_TRIGGERED
action_no_trigger:
lda ACTION_COUNT dec CART_X
beq no_action_movie dec CART_X
lda CART_X
cmp #$fc
bne cart_not_out
inc CART_OUT
cart_not_out:
; jsr action_sequence
no_action_movie:
;=============== ;===============
; page flip ; page flip
@ -892,21 +929,27 @@ flame_sequence:
.byte 0 .byte 0
STAR_SPEED = 16
star_sequence: star_sequence:
.byte 20 .byte STAR_SPEED
.word star_wipe1_rle .word star_wipe1_rle
.byte 20 .byte STAR_SPEED
.word star_wipe2_rle .word star_wipe2_rle
.byte 20 .byte STAR_SPEED
.word star_wipe3_rle .word star_wipe3_rle
.byte 20 .byte STAR_SPEED
.word star_wipe4_rle .word star_wipe4_rle
.byte 20 .byte STAR_SPEED
.word star_wipe5_rle .word star_wipe5_rle
.byte 20 .byte STAR_SPEED
.word empty_rle .word empty_rle
.byte 20 .byte STAR_SPEED
.word empty_rle .word empty_rle
.byte 0 .byte 0
robot_sprite:
.byte 5,3
.byte $aa,$0a,$00,$0a,$aa
.byte $0a,$90,$00,$00,$aa
.byte $00,$00,$00,$00,$00