peasant: acceptable fire animation

This commit is contained in:
Vince Weaver 2021-08-12 22:45:18 -04:00
parent 7ae0b31cbd
commit d25dc902da
9 changed files with 218 additions and 5 deletions

View File

@ -57,8 +57,10 @@ intro.o: intro.s decompress_fast_v2.s hgr_overlay.s \
TITLE: title.o
ld65 -o TITLE title.o -C $(LINKER_SCRIPTS)/apple2_6000.inc
title.o: title.s graphics_title/title_graphics.inc \
title.s directions.s
title.o: title.s \
graphics_title/title_graphics.inc \
graphics_title/altfire.inc \
directions.s
ca65 -o title.o title.s -l title.lst
###

View File

@ -1,3 +1,7 @@
238, to 280 (6)
50 to 135 (85) 6*85=510
280x192
*4
1120x768

View File

@ -10,8 +10,10 @@ all: title_graphics.inc
title_graphics.inc: \
peasant_title.lzsa \
peasant_title_trogfree.lzsa \
tips.lzsa
echo "title_lzsa: .incbin \"peasant_title.lzsa\"" > title_graphics.inc
echo "title_trogfree_lzsa: .incbin \"peasant_title_trogfree.lzsa\"" >> title_graphics.inc
echo "tips_lzsa: .incbin \"tips.lzsa\"" >> title_graphics.inc
###
@ -24,6 +26,15 @@ peasant_title.hgr: peasant_title.png
###
peasant_title_trogfree.lzsa: peasant_title_trogfree.hgr
$(LZSA) -r -f2 peasant_title_trogfree.hgr peasant_title_trogfree.lzsa
peasant_title_trogfree.hgr: peasant_title_trogfree.png
$(PNG2HGR) peasant_title_trogfree.png > peasant_title_trogfree.hgr
###
tips.lzsa: tips.hgr
$(LZSA) -r -f2 tips.hgr tips.lzsa

View File

@ -0,0 +1,87 @@
; 238 50 279 135
altfire_sprite:
.byte $00,$00,$00,$60,$01,$00
.byte $00,$00,$00,$3C,$00,$00
.byte $00,$30,$00,$7E,$00,$00
.byte $00,$00,$00,$7B,$00,$00
.byte $00,$09,$00,$1F,$00,$00
.byte $40,$0F,$00,$07,$00,$00
.byte $40,$1F,$00,$1B,$00,$00
.byte $40,$07,$00,$06,$00,$00
.byte $00,$1F,$00,$0F,$00,$00
.byte $60,$07,$00,$1B,$00,$00
.byte $40,$07,$00,$03,$00,$00
.byte $40,$07,$00,$23,$00,$00
.byte $40,$05,$00,$06,$00,$00
.byte $70,$17,$00,$06,$00,$00
.byte $70,$07,$00,$0F,$00,$00
.byte $60,$07,$60,$07,$70,$00
.byte $40,$07,$60,$07,$78,$03
.byte $00,$03,$70,$01,$74,$01
.byte $00,$06,$70,$03,$78,$01
.byte $00,$16,$60,$02,$70,$05
.byte $00,$1E,$40,$03,$68,$01
.byte $00,$07,$00,$16,$38,$02
.byte $00,$0D,$00,$02,$30,$00
.byte $00,$04,$00,$06,$70,$00
.byte $00,$06,$00,$04,$70,$01
.byte $00,$0E,$00,$04,$70,$01
.byte $00,$07,$00,$04,$50,$01
.byte $00,$03,$00,$00,$20,$01
.byte $00,$03,$00,$00,$60,$00
.byte $00,$07,$00,$00,$40,$01
.byte $00,$07,$00,$10,$40,$01
.byte $00,$03,$00,$18,$20,$01
.byte $00,$02,$00,$08,$60,$01
.byte $00,$00,$00,$00,$70,$01
.byte $00,$00,$00,$00,$70,$00
.byte $00,$00,$20,$01,$30,$00
.byte $00,$00,$20,$00,$30,$00
.byte $00,$00,$28,$00,$38,$00
.byte $00,$00,$28,$00,$28,$00
.byte $00,$00,$3A,$00,$38,$00
.byte $20,$00,$2A,$00,$1C,$00
.byte $00,$05,$2A,$00,$10,$00
.byte $00,$54,$2A,$00,$70,$00
.byte $00,$54,$2A,$00,$30,$00
.byte $00,$55,$2E,$00,$60,$00
.byte $00,$55,$2E,$00,$40,$00
.byte $00,$7D,$2E,$00,$40,$00
.byte $00,$5D,$2F,$00,$40,$00
.byte $00,$55,$2F,$00,$00,$00
.byte $20,$55,$2E,$01,$00,$01
.byte $20,$75,$2E,$01,$00,$01
.byte $28,$55,$3A,$01,$20,$01
.byte $28,$FF,$3A,$01,$A8,$00
.byte $28,$F7,$2A,$00,$28,$00
.byte $68,$D7,$3A,$04,$AC,$00
.byte $68,$D7,$3A,$05,$20,$00
.byte $78,$D7,$3A,$01,$00,$00
.byte $3A,$D7,$2A,$01,$00,$00
.byte $3A,$D7,$FA,$01,$00,$00
.byte $3A,$D7,$FA,$01,$00,$00
.byte $2A,$D7,$FA,$01,$00,$00
.byte $2E,$D5,$FA,$01,$00,$00
.byte $2A,$D5,$FA,$41,$00,$00
.byte $2E,$D5,$AA,$41,$00,$00
.byte $2E,$D5,$AA,$51,$00,$00
.byte $2A,$D5,$AA,$15,$00,$00
.byte $2A,$D5,$AA,$15,$00,$00
.byte $2A,$D5,$AA,$1F,$00,$00
.byte $2A,$D5,$AA,$17,$00,$00
.byte $2A,$D5,$AA,$17,$00,$00
.byte $BE,$D5,$AA,$5D,$00,$00
.byte $B8,$D5,$AA,$5D,$00,$00
.byte $B8,$D5,$AA,$5D,$00,$00
.byte $B8,$D5,$AA,$57,$00,$00
.byte $B9,$D5,$AA,$57,$00,$00
.byte $81,$D5,$AA,$17,$00,$00
.byte $85,$D5,$EA,$17,$00,$00
.byte $95,$D0,$EA,$07,$00,$00
.byte $94,$C0,$EA,$07,$00,$00
.byte $94,$C0,$FA,$07,$00,$00
.byte $91,$C0,$FA,$87,$00,$00
.byte $D1,$80,$FE,$05,$00,$00
.byte $D1,$80,$2A,$05,$00,$00
.byte $C5,$80,$2A,$05,$00,$00
.byte $C5,$82,$28,$01,$00,$00

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

View File

@ -96,16 +96,120 @@ mockingboard_notfound:
;************************
do_title:
lda #<(title_lzsa)
lda #0
sta FRAME
;======================
; load regular to $40
lda #<(title_trogfree_lzsa)
sta getsrc_smc+1
lda #>(title_lzsa)
lda #>(title_trogfree_lzsa)
sta getsrc_smc+2
lda #$40
jsr decompress_lzsa2_fast
jsr wait_until_keypress
;======================
; load trogdor to $20
lda #<(title_lzsa)
sta getsrc_smc+1
lda #>(title_lzsa)
sta getsrc_smc+2
lda #$20
jsr decompress_lzsa2_fast
;=====================
; main loop
; we're supposed to animate flame, flash the "CLICK ANYWHERE" sign
; and show trogdor when his music plays
reset_altfire:
lda #50
sta ALTFIRE
lda #<altfire_sprite
sta alt_smc1+1
sta alt_smc2+1
lda #>altfire_sprite
sta alt_smc1+2
sta alt_smc2+2
title_loop:
lda C_VOLUME ; see if volume on trogdor channel
beq no_trog
bit PAGE1
jmp done_trog
no_trog:
bit PAGE2
done_trog:
lda FRAME ; skip most of time
and #$3f
bne altfire_good
; do altfire loop
ldx ALTFIRE
lda hposn_high,X
sta GBASH
lda hposn_low,X
sta GBASL
ldy #34
inner_altfire:
lda (GBASL),Y
pha
alt_smc1:
lda $d000
sta (GBASL),Y
pla
alt_smc2:
sta $d000
inc alt_smc1+1
inc alt_smc2+1
bne alt_noflo
inc alt_smc1+2
inc alt_smc2+2
alt_noflo:
iny
cpy #40
bne inner_altfire
inc ALTFIRE
lda ALTFIRE
cmp #135
beq reset_altfire
altfire_good:
inc FRAME
lda KEYPRESS ; 4
bpl title_loop ; 3
bit KEYRESET ; clear the keyboard buffer
bit PAGE2 ; return to viewing PAGE2
sei ; disable music
@ -137,3 +241,5 @@ do_title:
.include "hgr_tables.s"
.include "graphics_title/title_graphics.inc"
altfire:
.include "graphics_title/altfire.inc"

View File

@ -22,6 +22,9 @@ PEASANT_DIR = $62
CURSOR_X = $63
CURSOR_Y = $64
FRAME = $65
ALTFIRE = $66
ALTL = $67
ALTH = $68
; pt3 player registers
AY_REGISTERS = $70