diff --git a/games/peasant/Makefile b/games/peasant/Makefile index de0ac417..35fcfb53 100644 --- a/games/peasant/Makefile +++ b/games/peasant/Makefile @@ -143,6 +143,12 @@ qload.inc: generate_common QLOAD ./generate_common -a 0xb00 -s location_names_h qload.lst >> qload.inc ./generate_common -a 0xb00 -s wait_until_keypress qload.lst >> qload.inc ./generate_common -a 0xb00 -s random16 qload.lst >> qload.inc + ./generate_common -a 0xb00 -s score_points qload.lst >> qload.inc + ./generate_common -a 0xb00 -s print_score qload.lst >> qload.inc + ./generate_common -a 0xb00 -s update_score qload.lst >> qload.inc + ./generate_common -a 0xb00 -s speaker_beep qload.lst >> qload.inc + ./generate_common -a 0xb00 -s speaker_duration qload.lst >> qload.inc + ./generate_common -a 0xb00 -s speaker_frequency qload.lst >> qload.inc echo "hposn_high = \$$BA00" >> qload.inc echo "hposn_low = \$$BB00" >> qload.inc echo "driveoff = \$$A22" >> qload.inc diff --git a/games/peasant/cliff.s b/games/peasant/cliff.s index 8da6abfa..4fb3e7e4 100644 --- a/games/peasant/cliff.s +++ b/games/peasant/cliff.s @@ -193,7 +193,7 @@ game_over: ;.include "inventory.s" -.include "score.s" +;.include "score.s" .include "keyboard.s" diff --git a/games/peasant/ending.s b/games/peasant/ending.s index 8ff44b51..5c03b2e6 100644 --- a/games/peasant/ending.s +++ b/games/peasant/ending.s @@ -557,12 +557,12 @@ game_over: .include "hgr_sprite.s" -.include "score.s" +;.include "score.s" .include "wait.s" .include "wait_a_bit.s" -;.include "speaker_beeps.s" +.include "speaker_beeps.inc" .include "graphics_end/ending_graphics.inc" diff --git a/games/peasant/game_over.s b/games/peasant/game_over.s index f7cc4665..95a4e5ca 100644 --- a/games/peasant/game_over.s +++ b/games/peasant/game_over.s @@ -155,11 +155,11 @@ done_beep: ; jmp forever .include "hgr_sprite.s" -;.include "speaker_beeps.s" +.include "speaker_beeps.inc" ;.include "wait_keypress.s" -.include "score.s" +;.include "score.s" .include "wait.s" .include "wait_a_bit.s" diff --git a/games/peasant/inn.s b/games/peasant/inn.s index ca07dc5b..359afc6f 100644 --- a/games/peasant/inn.s +++ b/games/peasant/inn.s @@ -241,7 +241,6 @@ level_over: .include "new_map_location.s" .include "peasant_move.s" -.include "score.s" ;.include "parse_input.s" @@ -276,6 +275,7 @@ level_over: ;.include "hgr_hgr2.s" ;.include "wait_keypress.s" ;.include "loadsave_menu.s" +;.include "score.s" diff --git a/games/peasant/inside.s b/games/peasant/inside.s index a8d56d01..5a0bde09 100644 --- a/games/peasant/inside.s +++ b/games/peasant/inside.s @@ -338,7 +338,7 @@ to_left: .include "new_map_location.s" .include "peasant_move.s" -.include "score.s" + ;.include "parse_input.s" @@ -373,7 +373,7 @@ to_left: ;.include "hgr_hgr2.s" ;.include "wait_keypress.s" ;.include "loadsave_menu.s" - +;.include "score.s" map_backgrounds_low: diff --git a/games/peasant/parse_input.s b/games/peasant/parse_input.s index dea28a18..b76dadd4 100644 --- a/games/peasant/parse_input.s +++ b/games/peasant/parse_input.s @@ -480,9 +480,73 @@ parse_common_version: parse_common_wear: lda CURRENT_NOUN + cmp #NOUN_ROBE + beq parse_common_wear_robe + cmp #NOUN_BELT + beq parse_common_wear_belt + cmp #NOUN_MASK + beq parse_common_wear_mask + bne wear_unknown +parse_common_wear_belt: + ; first see if have it + + lda INVENTORY_1 + and #INV1_KERREK_BELT + beq wear_unknown + + ldx #wear_belt_message + jmp finish_parse_message + +parse_common_wear_mask: + ; first see if have it + + lda INVENTORY_1 + and #INV1_MONSTER_MASK + beq wear_unknown + + ldx #wear_mask_message + jmp finish_parse_message + + +parse_common_wear_robe: + ; first check if have it + + lda INVENTORY_2 + and #INV2_ROBE + beq parse_common_wear_robe_no_have + + ; next check if already wearing + + lda GAME_STATE_1 + and #WEARING_ROBE + beq parse_common_wear_robe_no_have + +parse_common_wear_robe_do_have: + ; wear the robe + + lda GAME_STATE_1 + ora #WEARING_ROBE + sta GAME_STATE_1 + + ; get 3 points + + lda #3 + jsr score_points + + ldx #wear_robe_message + jsr partial_message_step + jmp finish_parse_message + + + + +parse_common_wear_robe_no_have: ldx #wear_robe_none_message jsr partial_message_step diff --git a/games/peasant/peasant1.s b/games/peasant/peasant1.s index 1b6af4f9..a65ea401 100644 --- a/games/peasant/peasant1.s +++ b/games/peasant/peasant1.s @@ -227,7 +227,7 @@ game_over: ;.include "parse_input.s" -.include "score.s" +;.include "score.s" .include "keyboard.s" diff --git a/games/peasant/peasant2.s b/games/peasant/peasant2.s index 02b4ceca..cae51f93 100644 --- a/games/peasant/peasant2.s +++ b/games/peasant/peasant2.s @@ -347,7 +347,7 @@ to_left: .include "new_map_location.s" .include "peasant_move.s" -.include "score.s" + ;.include "parse_input.s" @@ -382,7 +382,7 @@ to_left: ;.include "hgr_hgr2.s" ;.include "wait_keypress.s" ;.include "loadsave_menu.s" - +;.include "score.s" map_backgrounds_low: diff --git a/games/peasant/peasant3.s b/games/peasant/peasant3.s index b837de3d..db831f88 100644 --- a/games/peasant/peasant3.s +++ b/games/peasant/peasant3.s @@ -214,13 +214,14 @@ game_over: ;.include "hgr_hgr2.s" ;.include "loadsave_menu.s" ;.include "wait_keypress.s" +;.include "score.s" .include "gr_copy.s" .include "new_map_location.s" .include "peasant_move.s" -.include "score.s" + ;.include "parse_input.s" diff --git a/games/peasant/peasant4.s b/games/peasant/peasant4.s index df82be84..7e62ab45 100644 --- a/games/peasant/peasant4.s +++ b/games/peasant/peasant4.s @@ -212,7 +212,7 @@ game_loop: ; at cottage, door open, check our co-ords lda PEASANT_Y ; #$68 - cmp #$67 + cmp #$64 bcc not_ned_cottage cmp #$71 bcs not_ned_cottage @@ -287,13 +287,13 @@ game_over: ;.include "hgr_hgr2.s" ;.include "wait_keypress.s" ;.include "loadsave_menu.s" +;.include "score.s" + .include "gr_copy.s" .include "peasant_move.s" -.include "score.s" - .include "new_map_location.s" ;.include "parse_input.s" diff --git a/games/peasant/qload.inc b/games/peasant/qload.inc index 37277742..44909bdf 100644 --- a/games/peasant/qload.inc +++ b/games/peasant/qload.inc @@ -23,13 +23,19 @@ invert_smc1 =$0f61 disp_put_string_cursor =$1696 hgr_put_char_cursor =$0f15 vgi_simple_rectangle =$12ec -peasant_text =$1ebd +peasant_text =$1f94 save_menu =$1914 load_menu =$1909 location_names_l =$1c40 location_names_h =$1c5f wait_until_keypress =$1e7f random16 =$1e88 +score_points =$1f0d +print_score =$1ebd +update_score =$1ec8 +speaker_beep =$1f7b +speaker_duration =$1f92 +speaker_frequency =$1f93 hposn_high = $BA00 hposn_low = $BB00 driveoff = $A22 diff --git a/games/peasant/qload.s b/games/peasant/qload.s index 5c067f3b..e27b835b 100644 --- a/games/peasant/qload.s +++ b/games/peasant/qload.s @@ -256,6 +256,8 @@ length_array: .include "loadsave_menu.s" .include "wait_keypress.s" .include "random16.s" +.include "score.s" +.include "speaker_beeps.s" peasant_text: .byte 25,2,"Peasant's Quest",0 diff --git a/games/peasant/score.s b/games/peasant/score.s index 40131945..0c984daf 100644 --- a/games/peasant/score.s +++ b/games/peasant/score.s @@ -150,4 +150,3 @@ score_text: score_tail: .byte " of 150",0 -.include "speaker_beeps.s" diff --git a/games/peasant/text/common.inc b/games/peasant/text/common.inc index 6607665d..22d372cf 100644 --- a/games/peasant/text/common.inc +++ b/games/peasant/text/common.inc @@ -3,12 +3,14 @@ ;================== ; + get/wear belt (after getting it) +wear_belt_message: .byte "You're already wearing it.",13 .byte "Too bad you smell like the",13 .byte "trash barge off Peasant",13 .byte "Isle.",0 ; + wear mask (after getting it) +wear_mask_message: .byte "Not on this screen. You've",13 .byte "got your image to think",13 .byte "about. Actually, you might",13 @@ -17,7 +19,17 @@ ; +3 points ; + wear robe (after getting it) -.byte "You slip into the vintage robe. It smells like grampa's lap. Now you're lookin like a serious peasant.",0 +wear_robe_message: +.byte "You slip into the vintage",13 +.byte "robe. It smells like",13 +.byte "grampa's lap. Now you're",13 +.byte "lookin like a serious",13 +.byte "peasant.",0 + +; + wear robe (already wearing) +wear_robe_already_message: +.byte "You're already in the old",13 +.byte "skool robe. Represent.",0 ; + wear robe (not in inventory) wear_robe_none_message: @@ -29,9 +41,6 @@ wear_robe_none_message2: .byte "And pants. Forgot to",13 .byte "mention the pants.",0 -; + wear robe (already wearing) -.byte "You're already in the old skool robe. Represent.",0 - ; + look (when in hay disguise) .byte "Right now, you see a bunch of hay.",0 diff --git a/games/peasant/trogdor.s b/games/peasant/trogdor.s index 25721fcf..1b8126ce 100644 --- a/games/peasant/trogdor.s +++ b/games/peasant/trogdor.s @@ -311,17 +311,16 @@ game_over: ;.include "clear_bottom.s" ;.include "gr_offsets.s" ;.include "hgr_hgr2.s" +;.include "score.s" .include "gr_copy.s" -.include "score.s" - .include "wait.s" .include "wait_a_bit.s" .include "version.inc" -;.include "speaker_beeps.s" +.include "speaker_beeps.inc" .include "hgr_sprite.s" diff --git a/games/peasant/vid_logo.s b/games/peasant/vid_logo.s index c4ece5a4..1de61cb9 100644 --- a/games/peasant/vid_logo.s +++ b/games/peasant/vid_logo.s @@ -423,7 +423,7 @@ delays: ;.include "decompress_fast_v2.s" .include "hgr_overlay.s" -.include "speaker_beeps.s" +.include "speaker_beeps.inc" .include "text_print.s" .include "gr_offsets.s"