From 6b83cd89b15b9968da2d8309e6e1364caf46f196 Mon Sep 17 00:00:00 2001 From: Vince Weaver Date: Sat, 30 Mar 2019 22:24:19 -0400 Subject: [PATCH] ootw: move some files around to make it more consistent --- ootw/Makefile | 7 +- ootw/TODO | 4 +- ootw/ootw.s | 11 +- ootw/ootw_cut_beast.s | 100 +++++++++++ ootw/ootw_cut_slug.s | 168 ++++++++++++++++++ ootw/ootw_graphics/end_scenes/Makefile | 2 +- .../end_scenes/ootw_beast_intro.inc} | 101 ----------- .../end_scenes/ootw_slug_end.inc} | 166 ----------------- 8 files changed, 284 insertions(+), 275 deletions(-) create mode 100644 ootw/ootw_cut_beast.s create mode 100644 ootw/ootw_cut_slug.s rename ootw/{cutscene_beast.s => ootw_graphics/end_scenes/ootw_beast_intro.inc} (79%) rename ootw/{cutscene_slug.s => ootw_graphics/end_scenes/ootw_slug_end.inc} (66%) diff --git a/ootw/Makefile b/ootw/Makefile index 518a3925..00754489 100644 --- a/ootw/Makefile +++ b/ootw/Makefile @@ -28,7 +28,7 @@ ootw.o: ootw.s \ keyboard.s sluggy.s beast.s \ ootw_rope.s earthquake.s ootw_mesa.s \ ootw_pool.s ootw_cavern.s physicist.s random16.s \ - cutscene_slug.s cutscene_beast.s \ + ootw_cut_slug.s ootw_cut_beast.s \ ootw_graphics/pool/ootw_pool.inc \ ootw_graphics/underwater/ootw_underwater.inc \ ootw_graphics/caves/ootw_cavern.inc \ @@ -40,7 +40,10 @@ ootw.o: ootw.s \ ootw_graphics/sprites/sprites_physicist.inc \ ootw_graphics/sprites/sprites_slugs.inc \ ootw_graphics/sprites/sprites_ootw.inc \ - ootw_graphics/sprites/sprites_beast.inc + ootw_graphics/sprites/sprites_beast.inc \ + ootw_graphics/end_scenes/ootw_beast_end.inc \ + ootw_graphics/end_scenes/ootw_beast_intro.inc \ + ootw_graphics/end_scenes/ootw_slug_end.inc ca65 -o ootw.o ootw.s -l ootw.lst #### diff --git a/ootw/TODO b/ootw/TODO index a5188575..5c531d39 100644 --- a/ootw/TODO +++ b/ootw/TODO @@ -4,7 +4,6 @@ KNOWN BUGS: TODO: -+ sprites that don't draw off edge of screen Movement: + running: Missing one running frame (?) @@ -40,7 +39,8 @@ underwater: + ripples in water beast: -+ add beast death cutscene ++ hook up beast ending cutscene ++ compress/transparency beast ending cutscene + add beast tripping rope_room: diff --git a/ootw/ootw.s b/ootw/ootw.s index 976b40e9..c3902649 100644 --- a/ootw/ootw.s +++ b/ootw/ootw.s @@ -112,6 +112,10 @@ end_message: .include "gr_overlay.s" .include "gr_putsprite_crop.s" +; cutscenes +.include "ootw_cut_slug.s" +.include "ootw_cut_beast.s" + ; room backgrounds .include "ootw_graphics/pool/ootw_pool.inc" .include "ootw_graphics/caves/ootw_cavern.inc" @@ -125,7 +129,8 @@ end_message: .include "ootw_graphics/sprites/sprites_physicist.inc" .include "ootw_graphics/sprites/sprites_slugs.inc" .include "ootw_graphics/sprites/sprites_beast.inc" -; cutscenes -.include "cutscene_slug.s" -.include "cutscene_beast.s" +; cutscene data .include "ootw_graphics/endl1/ootw_l1end.inc" +.include "ootw_graphics/end_scenes/ootw_beast_end.inc" +.include "ootw_graphics/end_scenes/ootw_slug_end.inc" +.include "ootw_graphics/end_scenes/ootw_beast_intro.inc" diff --git a/ootw/ootw_cut_beast.s b/ootw/ootw_cut_beast.s new file mode 100644 index 00000000..86c972c1 --- /dev/null +++ b/ootw/ootw_cut_beast.s @@ -0,0 +1,100 @@ + +beast_cutscene: + + ;==================== + ; beast dropping in + + lda #$8 + sta DRAW_PAGE + jsr clear_top + + lda #beast_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 +beast_loop: + jsr gr_copy_to_current + + ldx CUTFRAME + + lda beast_frames,X + sta INL + lda beast_frames+1,X + sta INH + + lda #15 + sta XPOS + + lda #10 + sta YPOS + + jsr put_sprite + + jsr page_flip + + ldx #2 +beast_long_delay: + lda #250 + jsr WAIT + dex + bne beast_long_delay + + + ldx CUTFRAME + inx + inx + stx CUTFRAME + + cpx #28 + beq beast_end + + jmp beast_loop + +beast_end: + + ;============================= + ; Restore background to $c00 + + lda #>(cavern3_rle) + sta GBASH + lda #<(cavern3_rle) + sta GBASL + lda #$c ; load image off-screen $c00 + jmp load_rle_gr + +beast_frames: + .word beast_frame1 ; 0 + .word beast_frame2 ; 1 + .word beast_frame3 ; 2 + .word beast_frame4 ; 3 + .word beast_frame5 ; 4 + .word beast_frame6 ; 5 + .word beast_frame7 ; 6 + .word beast_frame8 ; 7 + .word beast_frame9 ; 8 + .word beast_frame10 ; 9 + .word beast_frame11 ; 10 + .word beast_frame12 ; 11 + .word beast_frame8 ; 12 + .word beast_frame8 ; 13 + + diff --git a/ootw/ootw_cut_slug.s b/ootw/ootw_cut_slug.s new file mode 100644 index 00000000..7acb7c6f --- /dev/null +++ b/ootw/ootw_cut_slug.s @@ -0,0 +1,168 @@ + +slug_cutscene: + + ;==================== + ; First the slug part + + lda #$8 + sta DRAW_PAGE + jsr clear_top + + 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 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 + diff --git a/ootw/ootw_graphics/end_scenes/Makefile b/ootw/ootw_graphics/end_scenes/Makefile index 7efc7b86..bc9cecad 100644 --- a/ootw/ootw_graphics/end_scenes/Makefile +++ b/ootw/ootw_graphics/end_scenes/Makefile @@ -32,5 +32,5 @@ ootw_beast_end.inc: $(PNG2RLE) \ ##### clean: - rm -f *~ *.o *.lst *.lzz *.inc + rm -f *~ *.o *.lst *.lzz ootw_beast_end.inc diff --git a/ootw/cutscene_beast.s b/ootw/ootw_graphics/end_scenes/ootw_beast_intro.inc similarity index 79% rename from ootw/cutscene_beast.s rename to ootw/ootw_graphics/end_scenes/ootw_beast_intro.inc index b391d10e..2cc97813 100644 --- a/ootw/cutscene_beast.s +++ b/ootw/ootw_graphics/end_scenes/ootw_beast_intro.inc @@ -1,87 +1,4 @@ -beast_cutscene: - - ;==================== - ; beast dropping in - - lda #$8 - sta DRAW_PAGE - jsr clear_top - - lda #beast_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 -beast_loop: - jsr gr_copy_to_current - - ldx CUTFRAME - - lda beast_frames,X - sta INL - lda beast_frames+1,X - sta INH - - lda #15 - sta XPOS - - lda #10 - sta YPOS - - jsr put_sprite - - jsr page_flip - - ldx #2 -beast_long_delay: - lda #250 - jsr WAIT - dex - bne beast_long_delay - - - ldx CUTFRAME - inx - inx - stx CUTFRAME - - cpx #28 - beq beast_end - - jmp beast_loop - -beast_end: - - ;============================= - ; Restore background to $c00 - - lda #>(cavern3_rle) - sta GBASH - lda #<(cavern3_rle) - sta GBASL - lda #$c ; load image off-screen $c00 - jmp load_rle_gr - - beast_background: .byte 10,10 .byte $22,$82,$55,$66,$66,$66,$66,$55,$55,$88 @@ -95,24 +12,6 @@ beast_background: .byte $28,$22,$22,$28,$28,$28,$28,$28,$22,$22 .byte $22,$22,$22,$22,$22,$22,$22,$22,$22,$22 - -beast_frames: - .word beast_frame1 ; 0 - .word beast_frame2 ; 1 - .word beast_frame3 ; 2 - .word beast_frame4 ; 3 - .word beast_frame5 ; 4 - .word beast_frame6 ; 5 - .word beast_frame7 ; 6 - .word beast_frame8 ; 7 - .word beast_frame9 ; 8 - .word beast_frame10 ; 9 - .word beast_frame11 ; 10 - .word beast_frame12 ; 11 - .word beast_frame8 ; 12 - .word beast_frame8 ; 13 - - beast_frame1: ; piskel2 .byte 9,2 .byte $AA,$00,$00,$AA,$AA,$AA,$AA,$00,$00 diff --git a/ootw/cutscene_slug.s b/ootw/ootw_graphics/end_scenes/ootw_slug_end.inc similarity index 66% rename from ootw/cutscene_slug.s rename to ootw/ootw_graphics/end_scenes/ootw_slug_end.inc index 6bb052bd..ee487e4d 100644 --- a/ootw/cutscene_slug.s +++ b/ootw/ootw_graphics/end_scenes/ootw_slug_end.inc @@ -1,154 +1,4 @@ -slug_cutscene: - - ;==================== - ; First the slug part - - lda #$8 - sta DRAW_PAGE - jsr clear_top - - 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 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? - - slug_background: .byte 10,10 .byte $22,$22,$22,$22,$22,$22,$22,$22,$22,$22 @@ -165,14 +15,6 @@ slug_background: ; sluggy freelance -slug_frames: - .word sluggy1 - .word sluggy2 - .word sluggy3 - .word sluggy4 - .word sluggy5 - .word sluggy6 - sluggy1: .byte 10,6 .byte $AA,$AA,$AA,$AA,$AA,$AA,$AA,$AA,$AA,$AA @@ -241,14 +83,6 @@ leg_background: .byte $22,$44,$cc,$cc,$c4,$44,$22,$22,$22,$22 .byte $22,$44,$cc,$cc,$cc,$44,$22,$22,$22,$22 -leg_frames: - .word leg1 - .word leg2 - .word leg3 - .word leg4 - .word leg5 - .word leg5 - leg1: .byte $5,$6 .byte $AA,$AA,$AA,$AA,$AA