diff --git a/games/peasant/Makefile b/games/peasant/Makefile index ae1de2d9..5fd141a3 100644 --- a/games/peasant/Makefile +++ b/games/peasant/Makefile @@ -62,7 +62,7 @@ qload.o: qload.s qboot.inc \ hgr_font.s \ draw_box.s \ hgr_rectangle.s \ - hgr_7x28_sprite_mask.s \ + hgr_1x28_sprite_mask.s \ hgr_1x5_sprite.s \ hgr_partial_save.s \ hgr_input.s \ @@ -101,9 +101,9 @@ qload.inc: generate_common QLOAD ./generate_common -a 0xb00 -s hgr2 qload.lst >> qload.inc ./generate_common -a 0xb00 -s hgr_make_tables qload.lst >> qload.inc ./generate_common -a 0xb00 -s hgr_put_string qload.lst >> qload.inc - ./generate_common -a 0xb00 -s save_bg_7x28 qload.lst >> qload.inc - ./generate_common -a 0xb00 -s restore_bg_7x28 qload.lst >> qload.inc - ./generate_common -a 0xb00 -s hgr_draw_sprite_7x28 qload.lst >> qload.inc + ./generate_common -a 0xb00 -s save_bg_1x28 qload.lst >> qload.inc + ./generate_common -a 0xb00 -s restore_bg_1x28 qload.lst >> qload.inc + ./generate_common -a 0xb00 -s hgr_draw_sprite_1x28 qload.lst >> qload.inc ./generate_common -a 0xb00 -s input_buffer qload.lst >> qload.inc ./generate_common -a 0xb00 -s hgr_text_box qload.lst >> qload.inc ./generate_common -a 0xb00 -s hgr_text_box_nosave qload.lst >> qload.inc @@ -167,7 +167,7 @@ intro.o: intro.s zp.inc qload.inc music.inc \ graphics/graphics_intro.inc sprites/peasant_sprite.inc \ graphics/priority_intro.inc \ draw_box.s hgr_rectangle.s hgr_font.s hgr_input.s \ - hgr_7x28_sprite.s hgr_1x5_sprite.s hgr_save_restore.s \ + hgr_1x28_sprite_mask.s hgr_1x5_sprite.s hgr_save_restore.s \ hgr_partial_save.s \ wait_a_bit.s draw_peasant.s hgr_text_box.s \ title.s directions.s \ @@ -202,7 +202,7 @@ cliff.o: cliff.s zp.inc \ graphics_cliff/cliff_graphics.inc sprites/peasant_sprite.inc \ graphics_cliff/priority_cliff.inc \ draw_box.s hgr_rectangle.s hgr_font.s hgr_input.s \ - hgr_7x28_sprite_mask.s hgr_1x5_sprite.s hgr_save_restore.s \ + hgr_1x28_sprite_mask.s hgr_1x5_sprite.s hgr_save_restore.s \ wait_a_bit.s draw_peasant.s hgr_text_box.s \ keyboard.s parse_input.s new_map_location.s \ peasant_move.s score.s @@ -219,7 +219,7 @@ peasant1.o: peasant1.s zp.inc \ graphics/graphics_peasant1.inc sprites/peasant_sprite.inc \ graphics/priority_peasant1.inc \ draw_box.s hgr_rectangle.s hgr_font.s hgr_input.s \ - hgr_7x28_sprite_mask.s hgr_1x5_sprite.s hgr_save_restore.s \ + hgr_1x28_sprite_mask.s hgr_1x5_sprite.s hgr_save_restore.s \ wait_a_bit.s draw_peasant.s hgr_text_box.s \ keyboard.s parse_input.s new_map_location.s \ peasant_move.s score.s @@ -235,7 +235,7 @@ peasant2.o: peasant2.s zp.inc \ graphics/priority_peasant2.inc \ sprites/inventory_sprites.inc \ draw_box.s hgr_rectangle.s hgr_font.s hgr_input.s \ - hgr_7x28_sprite_mask.s hgr_1x5_sprite.s hgr_save_restore.s \ + hgr_1x28_sprite_mask.s hgr_1x5_sprite.s hgr_save_restore.s \ wait_a_bit.s draw_peasant.s hgr_text_box.s \ keyboard.s parse_input.s new_map_location.s \ peasant_move.s score.s inventory.s loadsave_menu.s @@ -250,7 +250,7 @@ peasant3.o: peasant3.s zp.inc \ graphics/graphics_peasant3.inc sprites/peasant_sprite.inc \ graphics/priority_peasant3.inc \ draw_box.s hgr_rectangle.s hgr_font.s hgr_input.s \ - hgr_7x28_sprite_mask.s hgr_1x5_sprite.s hgr_save_restore.s \ + hgr_1x28_sprite_mask.s hgr_1x5_sprite.s hgr_save_restore.s \ wait_a_bit.s draw_peasant.s hgr_text_box.s \ keyboard.s parse_input.s new_map_location.s \ peasant_move.s score.s @@ -265,7 +265,7 @@ peasant4.o: peasant4.s zp.inc \ graphics/graphics_peasant4.inc sprites/peasant_sprite.inc \ graphics/priority_peasant4.inc \ draw_box.s hgr_rectangle.s hgr_font.s hgr_input.s \ - hgr_7x28_sprite_mask.s hgr_1x5_sprite.s hgr_save_restore.s \ + hgr_1x28_sprite_mask.s hgr_1x5_sprite.s hgr_save_restore.s \ wait_a_bit.s draw_peasant.s hgr_text_box.s \ keyboard.s parse_input.s new_map_location.s \ peasant_move.s score.s @@ -281,7 +281,7 @@ trogdor.o: trogdor.s zp.inc \ sprites/inventory_sprites.inc \ ssi263_simple_speech.s \ draw_box.s hgr_rectangle.s hgr_font.s hgr_input.s \ - hgr_7x28_sprite_mask.s hgr_1x5_sprite.s hgr_save_restore.s \ + hgr_1x28_sprite_mask.s hgr_1x5_sprite.s hgr_save_restore.s \ wait_a_bit.s draw_peasant.s hgr_text_box.s \ keyboard.s parse_input.s new_map_location.s \ peasant_move.s score.s inventory.s @@ -297,7 +297,7 @@ ending.o: ending.s zp.inc qload.inc music.inc \ graphics_end/ending_graphics.inc sprites/peasant_sprite.inc \ sprites/ending_sprites.inc \ draw_box.s hgr_rectangle.s hgr_font.s hgr_input.s \ - hgr_14x14_sprite_mask.s hgr_1x5_sprite.s \ + hgr_2x14_sprite_mask.s hgr_1x5_sprite.s \ hgr_sprite.s hgr_save_restore.s \ wait_a_bit.s draw_peasant.s hgr_text_box.s \ keyboard.s parse_input.s new_map_location.s \ diff --git a/games/peasant/NOTES b/games/peasant/NOTES index fd105280..7e7f52d7 100644 --- a/games/peasant/NOTES +++ b/games/peasant/NOTES @@ -4,6 +4,23 @@ peasant2 18302 16653 (work on load/save support) 17191 (more work on priorities) 19326 (include common text) + 19577 -- at release 0.75 + + +partial save, can we fit in 4k? + 102 lines ; inventory was 115? + only 2-38 36 => 113 lines + + +sprite routines: + 14x14 sprite mask -> for drawing baby in ending + 1x5 sprite -> intro, lake bubbles + 1x8 sprite -> draw font + 2x16 sprite -> inventory + 7x28 sprite -> unused + 7x28 sprite mask -> draw peasant + hgr_sprite -> generic + Notes ~~~~~ Some people would like actual S.A.M. support like the original game, diff --git a/games/peasant/cliff.s b/games/peasant/cliff.s index aeec6dfd..ed46bb26 100644 --- a/games/peasant/cliff.s +++ b/games/peasant/cliff.s @@ -102,7 +102,7 @@ new_location: ;======================= ; draw initial peasant - jsr save_bg_7x28 + jsr save_bg_1x28 jsr draw_peasant @@ -169,7 +169,7 @@ game_over: ;.include "hgr_font.s" ;.include "draw_box.s" ;.include "hgr_rectangle.s" -;.include "hgr_7x28_sprite_mask.s" +;.include "hgr_1x28_sprite_mask.s" ;.include "hgr_1x5_sprite.s" ;.include "hgr_partial_save.s" ;.include "hgr_input.s" diff --git a/games/peasant/draw_peasant.s b/games/peasant/draw_peasant.s index 0daeeb25..b5d05d47 100644 --- a/games/peasant/draw_peasant.s +++ b/games/peasant/draw_peasant.s @@ -100,7 +100,7 @@ draw_right1: done_pick_draw: sta INH - jsr hgr_draw_sprite_7x28 + jsr hgr_draw_sprite_1x28 rts diff --git a/games/peasant/ending.s b/games/peasant/ending.s index 29172b7c..4735c47a 100644 --- a/games/peasant/ending.s +++ b/games/peasant/ending.s @@ -550,7 +550,7 @@ game_over: ;.include "hgr_tables.s" ;.include "hgr_text_box.s" -.include "hgr_14x14_sprite_mask.s" +.include "hgr_2x14_sprite_mask.s" .include "hgr_sprite.s" ;.include "hgr_hgr2.s" diff --git a/games/peasant/hgr_7x28_sprite_mask.s b/games/peasant/hgr_1x28_sprite_mask.s similarity index 91% rename from games/peasant/hgr_7x28_sprite_mask.s rename to games/peasant/hgr_1x28_sprite_mask.s index 918aaed5..35f2b12a 100644 --- a/games/peasant/hgr_7x28_sprite_mask.s +++ b/games/peasant/hgr_1x28_sprite_mask.s @@ -1,7 +1,9 @@ - ;=============================================== - ; hgr 7x28 draw sprite, with bg mask in GR $400 + ; hgr 1x28 draw sprite, with bg mask in GR $400 ;=============================================== + ; used primarily to draw Rather Dashing + ;=============================================== + ; ; SPRITE in INL/INH ; Location at CURSOR_X CURSOR_Y @@ -11,7 +13,7 @@ ; sprite AT INL/INH ; mask at INL/INH + 28 -hgr_draw_sprite_7x28: +hgr_draw_sprite_1x28: lda #0 sta MASK_COUNTDOWN @@ -45,7 +47,7 @@ hgr_draw_sprite_7x28: sta h728_smc3+2 ldx #0 ; X is row counter -hgr_7x28_sprite_yloop: +hgr_1x28_sprite_yloop: lda MASK_COUNTDOWN and #$3 ; only update every 4th bne mask_good @@ -99,16 +101,16 @@ draw_sprite_skip: inx cpx #28 - bne hgr_7x28_sprite_yloop + bne hgr_1x28_sprite_yloop rts ;====================== - ; save bg 7x28 + ; save bg 1x28 ;====================== -save_bg_7x28: +save_bg_1x28: ldx #0 save_yloop: @@ -133,7 +135,7 @@ save_yloop: ldy CURSOR_X lda (GBASL),Y - sta save_sprite_7x28,X + sta save_sprite_1x28,X inx cpx #28 @@ -142,10 +144,10 @@ save_yloop: rts ;====================== - ; restore bg 7x28 + ; restore bg 1x28 ;====================== -restore_bg_7x28: +restore_bg_1x28: ldx #0 restore_yloop: @@ -163,7 +165,7 @@ restore_yloop: ldy CURSOR_X - lda save_sprite_7x28,X + lda save_sprite_1x28,X sta (GBASL),Y inx @@ -283,7 +285,7 @@ mask_false: ; save area ;==================== -save_sprite_7x28: +save_sprite_1x28: .byte $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00 .byte $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00 diff --git a/games/peasant/hgr_14x14_sprite_mask.s b/games/peasant/hgr_2x14_sprite_mask.s similarity index 100% rename from games/peasant/hgr_14x14_sprite_mask.s rename to games/peasant/hgr_2x14_sprite_mask.s diff --git a/games/peasant/intro.s b/games/peasant/intro.s index 7870fbd6..2dbd83b9 100644 --- a/games/peasant/intro.s +++ b/games/peasant/intro.s @@ -178,7 +178,7 @@ start_new_game: ;.include "hgr_font.s" ;.include "draw_box.s" ;.include "hgr_rectangle.s" -;.include "hgr_7x28_sprite.s" +;.include "hgr_1x28_sprite.s" ;.include "hgr_partial_save.s" ;.include "hgr_input.s" ;.include "hgr_tables.s" diff --git a/games/peasant/intro_cottage.s b/games/peasant/intro_cottage.s index f68bee56..065cbd7f 100644 --- a/games/peasant/intro_cottage.s +++ b/games/peasant/intro_cottage.s @@ -75,7 +75,7 @@ cottage: ;======================= ; walking - jsr save_bg_7x28 + jsr save_bg_1x28 cottage_walk_loop: @@ -84,7 +84,7 @@ cottage_walk_loop: lda PEASANT_Y sta CURSOR_Y - jsr restore_bg_7x28 + jsr restore_bg_1x28 ;======================= @@ -105,7 +105,7 @@ cottage_walk_loop: sta PEASANT_Y sta CURSOR_Y - jsr save_bg_7x28 + jsr save_bg_1x28 jsr draw_peasant diff --git a/games/peasant/intro_knight.s b/games/peasant/intro_knight.s index 3422068c..5c7f7531 100644 --- a/games/peasant/intro_knight.s +++ b/games/peasant/intro_knight.s @@ -70,7 +70,7 @@ knight: ;======================= ; walking - jsr save_bg_7x28 + jsr save_bg_1x28 knight_walk_loop: @@ -79,7 +79,7 @@ knight_walk_loop: lda PEASANT_Y sta CURSOR_Y - jsr restore_bg_7x28 + jsr restore_bg_1x28 ; draw peasant @@ -97,7 +97,7 @@ knight_walk_loop: sta PEASANT_Y sta CURSOR_Y - jsr save_bg_7x28 + jsr save_bg_1x28 jsr draw_peasant diff --git a/games/peasant/intro_lake_e.s b/games/peasant/intro_lake_e.s index b269cd08..a2957825 100644 --- a/games/peasant/intro_lake_e.s +++ b/games/peasant/intro_lake_e.s @@ -69,7 +69,7 @@ lake_east: ;======================= ; walking - jsr save_bg_7x28 + jsr save_bg_1x28 lake_e_walk_loop: @@ -78,7 +78,7 @@ lake_e_walk_loop: lda PEASANT_Y sta CURSOR_Y - jsr restore_bg_7x28 + jsr restore_bg_1x28 ; draw peasant @@ -96,7 +96,7 @@ lake_e_walk_loop: sta PEASANT_Y sta CURSOR_Y - jsr save_bg_7x28 + jsr save_bg_1x28 jsr draw_peasant diff --git a/games/peasant/intro_lake_w.s b/games/peasant/intro_lake_w.s index 3d0c1043..c6b7bd80 100644 --- a/games/peasant/intro_lake_w.s +++ b/games/peasant/intro_lake_w.s @@ -68,7 +68,7 @@ lake_west: ;======================= ; walking - jsr save_bg_7x28 + jsr save_bg_1x28 lake_w_walk_loop: @@ -77,7 +77,7 @@ lake_w_walk_loop: lda PEASANT_Y sta CURSOR_Y - jsr restore_bg_7x28 + jsr restore_bg_1x28 ; draw peasant @@ -95,7 +95,7 @@ lake_w_walk_loop: sta PEASANT_Y sta CURSOR_Y - jsr save_bg_7x28 + jsr save_bg_1x28 jsr draw_peasant diff --git a/games/peasant/intro_river.s b/games/peasant/intro_river.s index 1ccbcf1f..0ff94ef8 100644 --- a/games/peasant/intro_river.s +++ b/games/peasant/intro_river.s @@ -70,7 +70,7 @@ river: ;======================= ; walking - jsr save_bg_7x28 + jsr save_bg_1x28 river_walk_loop: @@ -79,7 +79,7 @@ river_walk_loop: lda PEASANT_Y sta CURSOR_Y - jsr restore_bg_7x28 + jsr restore_bg_1x28 ; draw peasant @@ -97,7 +97,7 @@ river_walk_loop: sta PEASANT_Y sta CURSOR_Y - jsr save_bg_7x28 + jsr save_bg_1x28 jsr draw_peasant diff --git a/games/peasant/peasant1.s b/games/peasant/peasant1.s index e79c0063..8dd38861 100644 --- a/games/peasant/peasant1.s +++ b/games/peasant/peasant1.s @@ -105,7 +105,7 @@ new_location: ;======================= ; draw initial peasant - jsr save_bg_7x28 + jsr save_bg_1x28 jsr draw_peasant @@ -172,7 +172,7 @@ game_over: ;.include "hgr_font.s" ;.include "draw_box.s" ;.include "hgr_rectangle.s" -;.include "hgr_7x28_sprite_mask.s" +;.include "hgr_1x28_sprite_mask.s" ;.include "hgr_1x5_sprite.s" ;.include "hgr_partial_save.s" ;.include "hgr_input.s" diff --git a/games/peasant/peasant2.s b/games/peasant/peasant2.s index 13d151a9..4073df9c 100644 --- a/games/peasant/peasant2.s +++ b/games/peasant/peasant2.s @@ -107,7 +107,7 @@ new_location: ;======================= ; draw initial peasant - jsr save_bg_7x28 + jsr save_bg_1x28 jsr draw_peasant @@ -179,7 +179,7 @@ game_over: ;.include "hgr_font.s" ;.include "draw_box.s" ;.include "hgr_rectangle.s" -;.include "hgr_7x28_sprite_mask.s" +;.include "hgr_1x28_sprite_mask.s" ;.include "hgr_1x5_sprite.s" ;.include "hgr_partial_save.s" ;.include "hgr_input.s" diff --git a/games/peasant/peasant3.s b/games/peasant/peasant3.s index 007b8d92..7f9a6a74 100644 --- a/games/peasant/peasant3.s +++ b/games/peasant/peasant3.s @@ -105,7 +105,7 @@ new_location: ;======================= ; draw initial peasant - jsr save_bg_7x28 + jsr save_bg_1x28 jsr draw_peasant @@ -148,7 +148,7 @@ game_over: ;.include "hgr_font.s" ;.include "draw_box.s" ;.include "hgr_rectangle.s" -;.include "hgr_7x28_sprite_mask.s" +;.include "hgr_1x28_sprite_mask.s" ;.include "hgr_1x5_sprite.s" ;.include "hgr_partial_save.s" ;.include "hgr_input.s" diff --git a/games/peasant/peasant4.s b/games/peasant/peasant4.s index b16e92b9..e7b71fb0 100644 --- a/games/peasant/peasant4.s +++ b/games/peasant/peasant4.s @@ -109,7 +109,7 @@ new_location: ;======================= ; draw initial peasant - jsr save_bg_7x28 + jsr save_bg_1x28 jsr draw_peasant @@ -155,7 +155,7 @@ game_over: ;.include "hgr_font.s" ;.include "draw_box.s" ;.include "hgr_rectangle.s" -;.include "hgr_7x28_sprite_mask.s" +;.include "hgr_1x28_sprite_mask.s" ;.include "hgr_1x5_sprite.s" ;.include "hgr_partial_save.s" ;.include "hgr_input.s" diff --git a/games/peasant/peasant_move.s b/games/peasant/peasant_move.s index 24145e97..1d1a300d 100644 --- a/games/peasant/peasant_move.s +++ b/games/peasant/peasant_move.s @@ -20,7 +20,7 @@ really_move_peasant: lda PEASANT_Y sta CURSOR_Y - jsr restore_bg_7x28 + jsr restore_bg_1x28 ; move peasant @@ -147,7 +147,7 @@ done_movey: lda PEASANT_Y sta CURSOR_Y - jsr save_bg_7x28 + jsr save_bg_1x28 ; draw peasant diff --git a/games/peasant/qload.inc b/games/peasant/qload.inc index 7d4d8f6f..4361442b 100644 --- a/games/peasant/qload.inc +++ b/games/peasant/qload.inc @@ -6,9 +6,9 @@ getsrc_smc =$0edc hgr2 =$1700 hgr_make_tables =$15dd hgr_put_string =$0ee9 -save_bg_7x28 =$1424 -restore_bg_7x28 =$1445 -hgr_draw_sprite_7x28 =$13bd +save_bg_1x28 =$1424 +restore_bg_1x28 =$1445 +hgr_draw_sprite_1x28 =$13bd input_buffer =$15b5 hgr_text_box =$1653 hgr_text_box_nosave =$16c7 diff --git a/games/peasant/qload.s b/games/peasant/qload.s index a83b8e93..c930e81a 100644 --- a/games/peasant/qload.s +++ b/games/peasant/qload.s @@ -245,7 +245,7 @@ length_array: .include "hgr_font.s" .include "draw_box.s" .include "hgr_rectangle.s" -.include "hgr_7x28_sprite_mask.s" +.include "hgr_1x28_sprite_mask.s" .include "hgr_1x5_sprite.s" .include "hgr_partial_save.s" .include "hgr_input.s" diff --git a/games/peasant/hgr_7x28_sprite.s b/games/peasant/unused/hgr_1x28_sprite.s similarity index 100% rename from games/peasant/hgr_7x28_sprite.s rename to games/peasant/unused/hgr_1x28_sprite.s