mirror of
https://github.com/deater/dos33fsprogs.git
synced 2024-09-29 08:55:10 +00:00
peasant: add priority graphic loading
This commit is contained in:
parent
285be13597
commit
814d465eaa
39
games/peasant/gr_copy.s
Normal file
39
games/peasant/gr_copy.s
Normal file
@ -0,0 +1,39 @@
|
||||
;=========================================================
|
||||
; gr_copy_to_page1, 40x48 version
|
||||
;=========================================================
|
||||
; copy $2000 to $400, careful to avoid screen holes
|
||||
|
||||
gr_copy_to_page1:
|
||||
|
||||
ldy #119 ; for early ones, copy 120 bytes ; 2
|
||||
|
||||
gr_copy_line:
|
||||
lda $2000,Y ; load a byte (self modified) ; 4
|
||||
sta $400,Y ; store a byte (self modified) ; 5
|
||||
|
||||
lda $2080,Y ; load a byte (self modified) ; 4
|
||||
sta $480,Y ; store a byte (self modified) ; 5
|
||||
|
||||
lda $2100,Y ; load a byte (self modified) ; 4
|
||||
sta $500,Y ; store a byte (self modified) ; 5
|
||||
|
||||
lda $2180,Y ; load a byte (self modified) ; 4
|
||||
sta $580,Y ; store a byte (self modified) ; 5
|
||||
|
||||
lda $2200,Y ; load a byte (self modified) ; 4
|
||||
sta $600,Y ; store a byte (self modified) ; 5
|
||||
|
||||
lda $2280,Y ; load a byte (self modified) ; 4
|
||||
sta $680,Y ; store a byte (self modified) ; 5
|
||||
|
||||
lda $2300,Y ; load a byte (self modified) ; 4
|
||||
sta $700,Y ; store a byte (self modified) ; 5
|
||||
|
||||
lda $2380,Y ; load a byte (self modified) ; 4
|
||||
sta $780,Y ; store a byte (self modified) ; 5
|
||||
|
||||
dey ; decrement pointer ; 2
|
||||
bpl gr_copy_line ; ; 2nt/3
|
||||
|
||||
rts ; 6
|
||||
|
@ -6,10 +6,18 @@ LZSA = ~/research/lzsa/lzsa/lzsa
|
||||
B2D = ../../../utils/bmp2dhr/b2d
|
||||
|
||||
all: graphics_intro.inc \
|
||||
graphics_peasant1.inc graphics_peasant2.inc graphics_peasant3.inc \
|
||||
graphics_peasant4.inc
|
||||
graphics_peasant1.inc \
|
||||
graphics_peasant2.inc \
|
||||
graphics_peasant3.inc \
|
||||
graphics_peasant4.inc \
|
||||
priority_peasant1.inc \
|
||||
priority_peasant2.inc \
|
||||
priority_peasant3.inc \
|
||||
priority_peasant4.inc
|
||||
|
||||
|
||||
###
|
||||
|
||||
graphics_intro.inc: \
|
||||
cottage.lzsa \
|
||||
lake_e.lzsa \
|
||||
@ -81,6 +89,50 @@ graphics_peasant4.inc: \
|
||||
echo "lady_cottage_lzsa: .incbin \"lady_cottage.lzsa\"" >> graphics_peasant4.inc
|
||||
echo "crooked_tree_lzsa: .incbin \"crooked_tree.lzsa\"" >> graphics_peasant4.inc
|
||||
|
||||
###########
|
||||
###########
|
||||
|
||||
priority_peasant1.inc: \
|
||||
todo_priority.lzsa
|
||||
echo "gary_priority_lzsa: .incbin \"todo_priority.lzsa\"" > priority_peasant1.inc
|
||||
echo "top_prints_priority_lzsa: .incbin \"todo_priority.lzsa\"" >> priority_peasant1.inc
|
||||
echo "wishing_well_priority_lzsa: .incbin \"todo_priority.lzsa\"" >> priority_peasant1.inc
|
||||
echo "leaning_tree_priority_lzsa: .incbin \"todo_priority.lzsa\"" >> priority_peasant1.inc
|
||||
echo "waterfall_priority_lzsa: .incbin \"todo_priority.lzsa\"" >> priority_peasant1.inc
|
||||
|
||||
|
||||
###
|
||||
|
||||
priority_peasant2.inc: \
|
||||
todo_priority.lzsa
|
||||
echo "haystack_priority_lzsa: .incbin \"todo_priority.lzsa\"" > priority_peasant2.inc
|
||||
echo "puddle_priority_lzsa: .incbin \"todo_priority.lzsa\"" >> priority_peasant2.inc
|
||||
echo "archery_priority_lzsa: .incbin \"todo_priority.lzsa\"" >> priority_peasant2.inc
|
||||
echo "river_priority_lzsa: .incbin \"todo_priority.lzsa\"" >> priority_peasant2.inc
|
||||
echo "knight_priority_lzsa: .incbin \"todo_priority.lzsa\"" >> priority_peasant2.inc
|
||||
|
||||
###
|
||||
|
||||
priority_peasant3.inc: \
|
||||
todo_priority.lzsa
|
||||
echo "jhonka_priority_lzsa: .incbin \"todo_priority.lzsa\"" > priority_peasant3.inc
|
||||
echo "cottage_priority_lzsa: .incbin \"todo_priority.lzsa\"" >> priority_peasant3.inc
|
||||
echo "lake_w_priority_lzsa: .incbin \"todo_priority.lzsa\"" >> priority_peasant3.inc
|
||||
echo "lake_e_priority_lzsa: .incbin \"todo_priority.lzsa\"" >> priority_peasant3.inc
|
||||
echo "inn_priority_lzsa: .incbin \"todo_priority.lzsa\"" >> priority_peasant3.inc
|
||||
|
||||
###
|
||||
|
||||
priority_peasant4.inc: \
|
||||
todo_priority.lzsa \
|
||||
lady_cottage_priority.lzsa
|
||||
echo "empty_hut_priority_lzsa: .incbin \"todo_priority.lzsa\"" > priority_peasant4.inc
|
||||
echo "ned_priority_lzsa: .incbin \"todo_priority.lzsa\"" >> priority_peasant4.inc
|
||||
echo "bottom_prints_priority_lzsa: .incbin \"todo_priority.lzsa\"" >> priority_peasant4.inc
|
||||
echo "lady_cottage_priority_lzsa: .incbin \"lady_cottage_priority.lzsa\"" >> priority_peasant4.inc
|
||||
echo "crooked_tree_priority_lzsa: .incbin \"todo_priority.lzsa\"" >> priority_peasant4.inc
|
||||
|
||||
|
||||
###
|
||||
|
||||
archery.lzsa: archery.hgr
|
||||
@ -264,6 +316,26 @@ todo.hgr: todo.png
|
||||
$(PNG2HGR) todo.png > todo.hgr
|
||||
|
||||
|
||||
###########################################
|
||||
###########################################
|
||||
|
||||
|
||||
###
|
||||
|
||||
lady_cottage_priority.lzsa: lady_cottage_priority.hgr
|
||||
$(LZSA) -r -f2 lady_cottage_priority.hgr lady_cottage_priority.lzsa
|
||||
|
||||
lady_cottage_priority.hgr: lady_cottage_priority.png
|
||||
$(PNG2GR) lady_cottage_priority.png lady_cottage_priority.hgr
|
||||
|
||||
####
|
||||
|
||||
todo_priority.lzsa: todo_priority.gr
|
||||
$(LZSA) -r -f2 todo_priority.gr todo_priority.lzsa
|
||||
|
||||
todo_priority.gr: todo_priority.png
|
||||
$(PNG2GR) todo_priority.png todo_priority.gr
|
||||
|
||||
###
|
||||
|
||||
|
||||
|
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 1.0 KiB |
BIN
games/peasant/graphics/todo_priority.png
Normal file
BIN
games/peasant/graphics/todo_priority.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 4.8 KiB |
@ -32,13 +32,26 @@ parse_look:
|
||||
|
||||
parse_talk:
|
||||
cmp #'T'
|
||||
bne parse_version
|
||||
bne parse_show
|
||||
|
||||
lda #<fake_error2
|
||||
sta OUTL
|
||||
lda #>fake_error2
|
||||
jmp finish_parse_message
|
||||
|
||||
parse_show:
|
||||
cmp #'S'
|
||||
bne parse_version
|
||||
|
||||
bit LORES
|
||||
bit PAGE1
|
||||
|
||||
jsr wait_until_keypress
|
||||
|
||||
bit PAGE2
|
||||
bit HIRES
|
||||
|
||||
jmp done_parse_message
|
||||
|
||||
parse_version:
|
||||
cmp #'V'
|
||||
@ -60,10 +73,9 @@ finish_parse_message:
|
||||
|
||||
jsr wait_until_keypress
|
||||
|
||||
done_parse_message:
|
||||
jsr hgr_partial_restore
|
||||
|
||||
done_parse_message:
|
||||
|
||||
|
||||
rts
|
||||
|
||||
|
||||
|
||||
|
@ -62,6 +62,27 @@ new_location:
|
||||
|
||||
jsr decompress_lzsa2_fast
|
||||
|
||||
; load priority to $400
|
||||
; indirectly as we can't trash screen holes
|
||||
|
||||
|
||||
ldx MAP_LOCATION
|
||||
|
||||
lda map_priority_low,X
|
||||
sta getsrc_smc+1
|
||||
lda map_priority_hi,X
|
||||
sta getsrc_smc+2
|
||||
|
||||
lda #$20 ; temporarily load to $2000
|
||||
|
||||
jsr decompress_lzsa2_fast
|
||||
|
||||
; copy to $400
|
||||
|
||||
jsr gr_copy_to_page1
|
||||
|
||||
|
||||
|
||||
; put peasant text
|
||||
|
||||
lda #<peasant_text
|
||||
@ -267,6 +288,8 @@ score_text:
|
||||
.include "hgr_text_box.s"
|
||||
.include "clear_bottom.s"
|
||||
|
||||
.include "gr_copy.s"
|
||||
|
||||
.include "new_map_location.s"
|
||||
|
||||
.include "parse_input.s"
|
||||
@ -276,6 +299,7 @@ score_text:
|
||||
.include "wait_a_bit.s"
|
||||
|
||||
.include "graphics/graphics_peasant1.inc"
|
||||
.include "graphics/priority_peasant1.inc"
|
||||
|
||||
.include "version.inc"
|
||||
|
||||
@ -341,3 +365,18 @@ map_backgrounds_hi:
|
||||
; .byte >lady_cottage_lzsa ; 18 -- cottage lady
|
||||
; .byte >crooked_tree_lzsa ; 19 -- crooked tree
|
||||
|
||||
|
||||
|
||||
map_priority_low:
|
||||
.byte <gary_priority_lzsa ; 0 -- gary the horse
|
||||
.byte <top_prints_priority_lzsa ; 1 -- top footprints
|
||||
.byte <wishing_well_priority_lzsa ; 2 -- wishing well
|
||||
.byte <leaning_tree_priority_lzsa ; 3 -- leaning tree
|
||||
.byte <waterfall_priority_lzsa ; 4 -- waterfall
|
||||
|
||||
map_priority_hi:
|
||||
.byte >gary_priority_lzsa ; 0 -- gary the horse
|
||||
.byte >top_prints_priority_lzsa ; 1 -- top footprints
|
||||
.byte >wishing_well_priority_lzsa ; 2 -- wishing well
|
||||
.byte >leaning_tree_priority_lzsa ; 3 -- leaning tree
|
||||
.byte >waterfall_priority_lzsa ; 4 -- waterfall
|
||||
|
@ -64,6 +64,25 @@ new_location:
|
||||
|
||||
jsr decompress_lzsa2_fast
|
||||
|
||||
|
||||
; we are PEASANT2 so locations 5...9 map to 0...4
|
||||
|
||||
lda MAP_LOCATION
|
||||
sec
|
||||
sbc #5
|
||||
tax
|
||||
|
||||
lda map_priority_low,X
|
||||
sta getsrc_smc+1
|
||||
lda map_priority_hi,X
|
||||
sta getsrc_smc+2
|
||||
|
||||
lda #$20
|
||||
|
||||
jsr decompress_lzsa2_fast
|
||||
|
||||
jsr gr_copy_to_page1
|
||||
|
||||
; put peasant text
|
||||
|
||||
lda #<peasant_text
|
||||
@ -269,6 +288,8 @@ score_text:
|
||||
.include "hgr_text_box.s"
|
||||
.include "clear_bottom.s"
|
||||
|
||||
.include "gr_copy.s"
|
||||
|
||||
.include "new_map_location.s"
|
||||
|
||||
.include "parse_input.s"
|
||||
@ -278,6 +299,7 @@ score_text:
|
||||
.include "wait_a_bit.s"
|
||||
|
||||
.include "graphics/graphics_peasant2.inc"
|
||||
.include "graphics/priority_peasant2.inc"
|
||||
|
||||
.include "version.inc"
|
||||
|
||||
@ -342,3 +364,17 @@ map_backgrounds_hi:
|
||||
; .byte >lady_cottage_lzsa ; 18 -- cottage lady
|
||||
; .byte >crooked_tree_lzsa ; 19 -- crooked tree
|
||||
|
||||
|
||||
map_priority_low:
|
||||
.byte <haystack_priority_lzsa ; 5 -- haystack
|
||||
.byte <puddle_priority_lzsa ; 6 -- puddle
|
||||
.byte <archery_priority_lzsa ; 7 -- archery
|
||||
.byte <river_priority_lzsa ; 8 -- river
|
||||
.byte <knight_priority_lzsa ; 9 -- knight
|
||||
|
||||
map_priority_hi:
|
||||
.byte >haystack_priority_lzsa ; 5 -- haystack
|
||||
.byte >puddle_priority_lzsa ; 6 -- puddle
|
||||
.byte >archery_priority_lzsa ; 7 -- archery
|
||||
.byte >river_priority_lzsa ; 8 -- river
|
||||
.byte >knight_priority_lzsa ; 9 -- knight
|
||||
|
@ -64,6 +64,24 @@ new_location:
|
||||
|
||||
jsr decompress_lzsa2_fast
|
||||
|
||||
; Load priority
|
||||
|
||||
lda MAP_LOCATION
|
||||
sec
|
||||
sbc #10
|
||||
tax
|
||||
|
||||
lda map_priority_low,X
|
||||
sta getsrc_smc+1
|
||||
lda map_priority_hi,X
|
||||
sta getsrc_smc+2
|
||||
|
||||
lda #$20
|
||||
|
||||
jsr decompress_lzsa2_fast
|
||||
|
||||
jsr gr_copy_to_page1
|
||||
|
||||
; put peasant text
|
||||
|
||||
lda #<peasant_text
|
||||
@ -269,6 +287,8 @@ score_text:
|
||||
.include "hgr_text_box.s"
|
||||
.include "clear_bottom.s"
|
||||
|
||||
.include "gr_copy.s"
|
||||
|
||||
.include "new_map_location.s"
|
||||
|
||||
.include "parse_input.s"
|
||||
@ -278,6 +298,7 @@ score_text:
|
||||
.include "wait_a_bit.s"
|
||||
|
||||
.include "graphics/graphics_peasant3.inc"
|
||||
.include "graphics/priority_peasant3.inc"
|
||||
|
||||
.include "version.inc"
|
||||
|
||||
@ -342,3 +363,17 @@ map_backgrounds_hi:
|
||||
; .byte >lady_cottage_lzsa ; 18 -- cottage lady
|
||||
; .byte >crooked_tree_lzsa ; 19 -- crooked tree
|
||||
|
||||
|
||||
map_priority_low:
|
||||
.byte <jhonka_priority_lzsa ; 10 -- jhonka
|
||||
.byte <cottage_priority_lzsa ; 11 -- cottage
|
||||
.byte <lake_w_priority_lzsa ; 12 -- lake west
|
||||
.byte <lake_e_priority_lzsa ; 13 -- lake east
|
||||
.byte <inn_priority_lzsa ; 14 -- inn
|
||||
|
||||
map_priority_hi:
|
||||
.byte >jhonka_priority_lzsa ; 10 -- jhonka
|
||||
.byte >cottage_priority_lzsa ; 11 -- cottage
|
||||
.byte >lake_w_priority_lzsa ; 12 -- lake west
|
||||
.byte >lake_e_priority_lzsa ; 13 -- lake east
|
||||
.byte >inn_priority_lzsa ; 14 -- inn
|
||||
|
@ -64,6 +64,24 @@ new_location:
|
||||
|
||||
jsr decompress_lzsa2_fast
|
||||
|
||||
; load priority
|
||||
|
||||
lda MAP_LOCATION
|
||||
sec
|
||||
sbc #15
|
||||
tax
|
||||
|
||||
lda map_priority_low,X
|
||||
sta getsrc_smc+1
|
||||
lda map_priority_hi,X
|
||||
sta getsrc_smc+2
|
||||
|
||||
lda #$20
|
||||
|
||||
jsr decompress_lzsa2_fast
|
||||
|
||||
jsr gr_copy_to_page1
|
||||
|
||||
; put peasant text
|
||||
|
||||
lda #<peasant_text
|
||||
@ -271,6 +289,8 @@ score_text:
|
||||
.include "hgr_text_box.s"
|
||||
.include "clear_bottom.s"
|
||||
|
||||
.include "gr_copy.s"
|
||||
|
||||
.include "new_map_location.s"
|
||||
|
||||
.include "parse_input.s"
|
||||
@ -280,6 +300,7 @@ score_text:
|
||||
.include "wait_a_bit.s"
|
||||
|
||||
.include "graphics/graphics_peasant4.inc"
|
||||
.include "graphics/priority_peasant4.inc"
|
||||
|
||||
.include "version.inc"
|
||||
|
||||
@ -343,3 +364,20 @@ map_backgrounds_hi:
|
||||
.byte >lady_cottage_lzsa ; 18 -- cottage lady
|
||||
.byte >crooked_tree_lzsa ; 19 -- crooked tree
|
||||
|
||||
|
||||
|
||||
map_priority_low:
|
||||
.byte <empty_hut_priority_lzsa ; 15 -- empty hut
|
||||
.byte <ned_priority_lzsa ; 16 -- ned
|
||||
.byte <bottom_prints_priority_lzsa ; 17 -- bottom footprints
|
||||
.byte <lady_cottage_priority_lzsa ; 18 -- cottage lady
|
||||
.byte <crooked_tree_priority_lzsa ; 19 -- crooked tree
|
||||
|
||||
map_priority_hi:
|
||||
.byte >empty_hut_priority_lzsa ; 15 -- empty hut
|
||||
.byte >ned_priority_lzsa ; 16 -- ned
|
||||
.byte >bottom_prints_priority_lzsa ; 17 -- bottom footprints
|
||||
.byte >lady_cottage_priority_lzsa ; 18 -- cottage lady
|
||||
.byte >crooked_tree_priority_lzsa ; 19 -- crooked tree
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user