ootw: use overlays for rope swinging

This commit is contained in:
Vince Weaver 2019-03-19 00:31:18 -04:00
parent e1b13a9526
commit eadc97a3e2
5 changed files with 73 additions and 5 deletions

View File

@ -23,7 +23,7 @@ OOTW: ootw.o
ootw.o: ootw.s \
gr_copy.s gr_fast_clear.s gr_pageflip.s gr_unrle.s gr_putsprite.s \
gr_make_quake.s zp.inc \
gr_make_quake.s gr_overlay.s zp.inc \
keyboard.s sluggy.s \
ootw_rope.s earthquake.s ootw_mesa.s \
ootw_pool.s ootw_cavern.s physicist.s random16.s \

View File

@ -95,6 +95,9 @@ end_message:
.include "gr_offsets.s"
.include "random16.s"
.include "keyboard.s"
.include "gr_overlay.s"
; room backgrounds
.include "ootw_graphics/pool/ootw_pool.inc"
.include "ootw_graphics/caves/ootw_cavern.inc"

View File

@ -9,7 +9,8 @@ all: ootw_rope.inc ootw_swing.inc
ootw_rope.inc: $(PNG2RLE) another_rope.png another_norope.png
$(PNG2RLE) asm another_rope.png rope_rle > ootw_rope.inc
$(PNG2RLE) asm another_norope.png broke_rope_rle >> ootw_rope.inc
$(PNG2RLE) asm another_norope.png no_rope_rle >> ootw_rope.inc
$(PNG2RLE) asm another_brokerope.png broke_rope_rle >> ootw_rope.inc
#####

View File

@ -45,7 +45,7 @@ rope_rle: .byte $28 ; ysize=48
.byte $AC,$55, $A4,$00, $AA,$22, $AF,$00, $05, $A6,$55, $A4,$05
.byte $A4,$00, $AA,$22, $A0,$92,$00
.byte $A1
broke_rope_rle: .byte $28 ; ysize=48
no_rope_rle: .byte $28 ; ysize=48
.byte $A3,$00, $A7,$22, $A3,$00, $55, $A9,$00, $22, $A4,$00
.byte $22, $52, $22, $00,$00, $22, $06, $A5,$66
.byte $A3,$00, $A7,$22, $A3,$00, $55, $A6,$00, $05, $00
@ -88,3 +88,47 @@ broke_rope_rle: .byte $28 ; ysize=48
.byte $05,$05, $AC,$55, $A4,$00, $AA,$22, $AF,$00, $05, $A6,$55
.byte $A4,$05, $A4,$00, $AA,$22, $A0,$92,$00
.byte $A1
broke_rope_rle: .byte $28 ; ysize=48
.byte $A3,$00, $22,$22, $00, $A4,$22, $A3,$00, $55, $A9,$00
.byte $22, $A4,$00, $22, $52, $22, $00,$00, $22
.byte $06, $A5,$66, $A3,$00, $22,$22, $00, $A4,$22, $A3,$00
.byte $55, $A6,$00, $05, $00, $55, $22, $A5,$00
.byte $55, $22, $00,$00, $22, $00, $A5,$66, $00,$00
.byte $55, $22,$22, $00, $A4,$22, $20, $00,$00, $55
.byte $A6,$00, $55, $00, $55, $22, $A5,$00, $55
.byte $22, $00,$00, $02, $20, $A4,$66, $26, $00,$00
.byte $77, $55, $02, $00, $A5,$22, $00,$00, $55
.byte $A8,$00, $55, $22, $A5,$00, $55, $22, $00,$00
.byte $20, $22, $06, $A3,$66, $22, $00,$00, $77
.byte $55, $00, $A6,$22, $AB,$00, $55, $22, $A5,$00
.byte $55, $22, $00,$00, $22, $00,$00, $55, $66,$66
.byte $22, $00,$00, $77, $55, $20, $A5,$22, $A3,$00
.byte $55, $A8,$00, $55, $22, $00,$00, $55, $22
.byte $00, $55, $22, $00,$00, $02, $00,$00, $55
.byte $66,$66, $22, $00,$00, $77, $55, $A6,$22, $20
.byte $00,$00, $55, $A8,$00, $55, $22, $00,$00, $55
.byte $22, $00, $55, $22, $A5,$00, $55, $26
.byte $66, $22, $00,$00, $77, $55, $A7,$22, $A9,$00
.byte $50, $00, $55, $22, $00,$00, $55, $22
.byte $00, $55, $22, $A5,$00, $55, $22, $26
.byte $22, $A3,$00, $55, $A7,$22, $A9,$00, $55, $00
.byte $55, $22, $00,$00, $25, $22, $00, $05
.byte $22, $A5,$00, $55, $02, $00, $22, $A3,$00
.byte $77, $55, $A6,$22, $AB,$00, $55, $22, $00,$00
.byte $22, $A3,$00, $22, $A5,$00, $55, $00,$00, $22
.byte $A4,$00, $55, $A6,$22, $05, $AA,$00, $55, $22
.byte $00,$00, $22, $A3,$00, $22,$22, $A5,$00, $55, $22,$22
.byte $A4,$00, $55, $A6,$22, $AB,$00, $05, $22, $00,$00
.byte $22, $A3,$00, $02, $22, $A5,$00, $55, $22,$22
.byte $A4,$00, $A7,$22, $AC,$00, $22, $00,$00, $02, $A4,$00
.byte $22, $A5,$00, $55, $02,$02, $A4,$00, $A6,$22, $02
.byte $22, $00, $70,$70, $A8,$00, $22, $A7,$00, $22
.byte $A5,$00, $55, $A6,$00, $A6,$22, $20, $52, $A4,$55
.byte $50,$50, $A5,$00, $22, $A7,$00, $22, $AC,$00, $02
.byte $52, $72, $52, $A3,$22, $A5,$00, $A3,$05, $55
.byte $A3,$50, $22, $A0,$15,$00, $20,$20, $A3,$22, $00, $22
.byte $20, $A8,$00, $05, $55,$55, $50, $A0,$13,$00, $A6,$22
.byte $20, $22,$22, $AB,$00, $05, $55,$55, $AD,$50, $A4,$00
.byte $A9,$22, $20, $AC,$00, $05,$05, $AC,$55, $A4,$00, $AA,$22
.byte $AF,$00, $05, $A6,$55, $A4,$05, $A4,$00, $AA,$22, $A0,$92,$00
.byte $A1

View File

@ -81,6 +81,18 @@ rope_loop:
lda SWING_PROGRESS
beq no_swing
cmp #80 ; only load background on first frame
bne swing_not_first
lda #<no_rope_rle
sta GBASL
lda #>no_rope_rle
sta GBASH
lda #$C ; load image off-screen $C00
jsr load_rle_gr
swing_not_first:
dec SWING_PROGRESS
dec SWING_PROGRESS
@ -89,11 +101,16 @@ rope_loop:
sta GBASL
lda swing_progression+1,X
sta GBASH
lda #$c ; load image off-screen $c00
lda #$10 ; load image off-screen $1000
jsr load_rle_gr
jsr gr_make_quake ; make quake
jsr gr_overlay_40x40
; FIXME
; jsr gr_make_quake ; make quake
jmp beyond_quake
no_swing:
@ -102,6 +119,7 @@ no_swing:
jsr earthquake_handler
beyond_quake:
;===============================
; check keyboard
@ -128,6 +146,8 @@ no_swing:
lda #5
sta GAME_OVER
done_swing_check:
;===============
; draw physicist