ootw: c1: merge cut scenes into relevant location

This commit is contained in:
Vince Weaver 2019-08-17 18:04:23 -04:00
parent 7a5ee9fb28
commit 77c905dbbd
4 changed files with 176 additions and 176 deletions

View File

@ -31,10 +31,9 @@ ootw_c1.o: ootw_c1.s \
gr_putsprite.s gr_putsprite_flipped.s gr_putsprite_crop.s \
gr_make_quake.s gr_overlay.s zp.inc keyboard.s \
collision.s \
ootw_sluggy.s ootw_c1_beast.s \
ootw_c1_sluggy.s ootw_c1_beast.s \
ootw_c1_arrival.s ootw_c1_rope.s earthquake.s ootw_c1_mesa.s \
ootw_c1_pool.s ootw_c1_cavern.s physicist.s random16.s \
ootw_cut_slug.s \
ootw_graphics/l1pool/ootw_pool.inc \
ootw_graphics/l1underwater/ootw_underwater.inc \
ootw_graphics/l1caves/ootw_cavern.inc \

View File

@ -73,9 +73,8 @@ ootw:
; Enter the game
;=======================
; jsr ootw_pool
jsr ootw_pool
jsr ootw_mesa
;===========================
; quit_level
@ -133,7 +132,7 @@ end_message:
; movement
.include "physicist.s"
.include "ootw_sluggy.s"
.include "ootw_c1_sluggy.s"
.include "ootw_c1_beast.s"
.include "earthquake.s"
.include "text_print.s"
@ -150,9 +149,6 @@ end_message:
.include "gr_overlay.s"
.include "gr_putsprite_crop.s"
; cutscenes
.include "ootw_cut_slug.s"
; room backgrounds
.include "ootw_graphics/l1pool/ootw_pool.inc"
.include "ootw_graphics/l1caves/ootw_cavern.inc"

View File

@ -438,3 +438,176 @@ remove_slug:
sta slugg0_out,X
jmp slug_done
slug_cutscene:
;====================
; First the slug part
lda #$8
sta DRAW_PAGE
jsr clear_top
lda #<slug_background
sta INL
lda #>slug_background
sta INH
lda #15
sta XPOS
lda #10
sta YPOS
jsr put_sprite
lda #$0
sta DRAW_PAGE
jsr gr_copy_to_current
jsr page_flip
jsr gr_copy_to_current
jsr page_flip
ldx #0
stx CUTFRAME
sluggy_loop:
jsr gr_copy_to_current
ldx CUTFRAME
lda slug_frames,X
sta INL
lda slug_frames+1,X
sta INH
lda #15
sta XPOS
lda #18
sta YPOS
jsr put_sprite
jsr page_flip
ldx #2
long_delay:
lda #250
jsr WAIT
dex
bne long_delay
ldx CUTFRAME
inx
inx
stx CUTFRAME
cpx #12
beq sluggy_end
jmp sluggy_loop
sluggy_end:
;====================
; Then the leg part
lda #$8
sta DRAW_PAGE
jsr clear_top
lda #<leg_background
sta INL
lda #>leg_background
sta INH
lda #15
sta XPOS
lda #10
sta YPOS
jsr put_sprite
lda #$0
sta DRAW_PAGE
jsr gr_copy_to_current
jsr page_flip
jsr gr_copy_to_current
jsr page_flip
ldx #0
stx CUTFRAME
leg_loop:
jsr gr_copy_to_current
ldx CUTFRAME
lda leg_frames,X
sta INL
lda leg_frames+1,X
sta INH
lda #18
sta XPOS
lda #18
sta YPOS
jsr put_sprite
jsr page_flip
ldx #4
long_delay2:
lda #250
jsr WAIT
dex
bne long_delay2
ldx CUTFRAME
inx
inx
stx CUTFRAME
cpx #12
beq leg_end
jmp leg_loop
leg_end:
;=============================
; Restore background to $c00
jmp cavern_load_background
; rts ; tail call?
; sluggy freelance
slug_frames:
.word sluggy1
.word sluggy2
.word sluggy3
.word sluggy4
.word sluggy5
.word sluggy6
leg_frames:
.word leg1
.word leg2
.word leg3
.word leg4
.word leg5
.word leg5

View File

@ -1,168 +0,0 @@
slug_cutscene:
;====================
; First the slug part
lda #$8
sta DRAW_PAGE
jsr clear_top
lda #<slug_background
sta INL
lda #>slug_background
sta INH
lda #15
sta XPOS
lda #10
sta YPOS
jsr put_sprite
lda #$0
sta DRAW_PAGE
jsr gr_copy_to_current
jsr page_flip
jsr gr_copy_to_current
jsr page_flip
ldx #0
stx CUTFRAME
sluggy_loop:
jsr gr_copy_to_current
ldx CUTFRAME
lda slug_frames,X
sta INL
lda slug_frames+1,X
sta INH
lda #15
sta XPOS
lda #18
sta YPOS
jsr put_sprite
jsr page_flip
ldx #2
long_delay:
lda #250
jsr WAIT
dex
bne long_delay
ldx CUTFRAME
inx
inx
stx CUTFRAME
cpx #12
beq sluggy_end
jmp sluggy_loop
sluggy_end:
;====================
; Then the leg part
lda #$8
sta DRAW_PAGE
jsr clear_top
lda #<leg_background
sta INL
lda #>leg_background
sta INH
lda #15
sta XPOS
lda #10
sta YPOS
jsr put_sprite
lda #$0
sta DRAW_PAGE
jsr gr_copy_to_current
jsr page_flip
jsr gr_copy_to_current
jsr page_flip
ldx #0
stx CUTFRAME
leg_loop:
jsr gr_copy_to_current
ldx CUTFRAME
lda leg_frames,X
sta INL
lda leg_frames+1,X
sta INH
lda #18
sta XPOS
lda #18
sta YPOS
jsr put_sprite
jsr page_flip
ldx #4
long_delay2:
lda #250
jsr WAIT
dex
bne long_delay2
ldx CUTFRAME
inx
inx
stx CUTFRAME
cpx #12
beq leg_end
jmp leg_loop
leg_end:
;=============================
; Restore background to $c00
jmp cavern_load_background
; rts ; tail call?
; sluggy freelance
slug_frames:
.word sluggy1
.word sluggy2
.word sluggy3
.word sluggy4
.word sluggy5
.word sluggy6
leg_frames:
.word leg1
.word leg2
.word leg3
.word leg4
.word leg5
.word leg5