ootw: that last commit missed a few files

This commit is contained in:
Vince Weaver 2019-01-20 00:52:07 -05:00
parent 9710dbebf8
commit 95301329cb
5 changed files with 90 additions and 18 deletions

View File

@ -21,7 +21,7 @@ ootw.o: ootw.s \
ootw_rope.s \
ootw_pool.s ootw_cavern.s physicist.s random16.s slug_cutscene.s \
ootw_pool.inc \
ootw_cavern.inc ootw_cavern2.inc ootw_cavern3.inc ootw_quake.inc \
ootw_cavern.inc ootw_cavern2.inc ootw_cavern3.inc \
ootw_rope.inc ootw_sprites.inc
ca65 -o ootw.o ootw.s -l ootw.lst
####
@ -44,9 +44,6 @@ ootw_cavern2.inc: $(PNG2RLE) another_cave2.png
ootw_cavern3.inc: $(PNG2RLE) another_cave3.png
$(PNG2RLE) asm another_cave3.png cavern3_rle > ootw_cavern3.inc
ootw_quake.inc: $(PNG2RLE) another_cave_shake.png
$(PNG2RLE) asm another_cave_shake.png quake_rle > ootw_quake.inc
ootw_rope.inc: $(PNG2RLE) another_rope.png
$(PNG2RLE) asm another_rope.png rope_rle > ootw_rope.inc

View File

@ -63,7 +63,7 @@ gr_copy_line:
;=========================================================
; copy 0x1000 to DRAW_PAGE
gr_copy_to_current_40:
gr_copy_to_current_1000:
lda DRAW_PAGE ; 3
clc ; 2
@ -114,3 +114,87 @@ gr_copy_line_40:
rts ; 6
;=========================================================
; gr_make_quake
;=========================================================
; Take image in 0xc00
; Copy to 0x1000
; Actually copy lines 2..41 to 0..39
gr_make_quake:
ldx #0
make_quake_loop:
lda gr_offsets,x
sta OUTL
lda gr_offsets+1,x
clc
adc #$C
sta OUTH
inx
inx
lda gr_offsets,x
sta INL
lda gr_offsets+1,x
clc
adc #$8
sta INH
ldy #39
quake_inner:
lda (INL),Y
sta (OUTL),Y
dey
bpl quake_inner
cpx #40
bne make_quake_loop
; write zeros to the rest
quake_clear_bottom:
lda gr_offsets,x
sta OUTL
lda gr_offsets+1,x
clc
adc #$C
sta OUTH
inx
inx
ldy #39
lda #0
quake_clear_inner:
sta (OUTL),Y
dey
bpl quake_clear_inner
cpx #48
bne quake_clear_bottom
; clear the extra two lines from the original
quake_clear_extra:
ldx #40
lda gr_offsets,x
sta OUTL
lda gr_offsets+1,x
clc
adc #$8
sta OUTH
ldy #39
lda #0
quake_clear_extra_inner:
sta (OUTL),Y
dey
bpl quake_clear_extra_inner
rts ; 6

View File

@ -133,7 +133,6 @@ end_message:
.include "ootw_cavern.inc"
.include "ootw_cavern2.inc"
.include "ootw_cavern3.inc"
.include "ootw_quake.inc"
.include "ootw_rope.inc"
.include "ootw_sprites.inc"
.include "slug_cutscene.s"

View File

@ -39,5 +39,6 @@ cavern_rle: .byte $28 ; ysize=48
.byte $25, $85, $22,$22, $85,$85, $A3,$82, $A5,$88, $82
.byte $88,$88, $28, $88,$88, $28, $88,$88, $28, $88
.byte $28, $A3,$88, $82, $A5,$88, $82,$82, $AC,$88, $A8,$28
.byte $A0,$1B,$88, $28,$28, $A3,$88, $A0,$A0,$00
.byte $A0,$1B,$88, $28,$28, $A6,$88, $28, $22, $28, $88
.byte $A3,$82, $A0,$1E,$88, $A0,$78,$00
.byte $A1

View File

@ -42,16 +42,7 @@ ootw_cavern:
;=============================
; Load quake background to $1000
lda #$10
sta BASH
lda #$00
sta BASL ; load image off-screen $c00
lda #>(quake_rle)
sta GBASH
lda #<(quake_rle)
sta GBASL
jsr load_rle_gr
jsr gr_make_quake
;=================================
@ -131,7 +122,7 @@ no_shake:
jsr gr_copy_to_current
jmp done_shake
shake_shake:
jsr gr_copy_to_current_40
jsr gr_copy_to_current_1000
done_shake: