diff --git a/games/peasant/copy_check.s b/games/peasant/copy_check.s index 7e0ac136..7e3f9fe5 100644 --- a/games/peasant/copy_check.s +++ b/games/peasant/copy_check.s @@ -46,33 +46,36 @@ trogdor_question: jsr hgr_input + ; check for right results ("Doug the dino") + + lda input_buffer + cmp #'D' + bne wrong + + lda #correct_text + sta OUTH + + jsr hgr_text_box + + jsr wait_until_keypress + + lda #LOAD_PEASANT + sta WHICH_LOAD + rts + + ;============================= ; draw WRONG! box ;============================= - lda #0 - sta BOX_X1H - lda #97 - sta BOX_X1L - lda #69 - sta BOX_Y1 - - lda #0 - sta BOX_X2H - lda #184 - sta BOX_X2L - lda #109 - sta BOX_Y2 - - jsr draw_box - - ; print WRONG! at 16, 84 - +wrong: lda #wrong_text sta OUTH - jsr hgr_put_string + jsr hgr_text_box jsr wait_until_keypress @@ -116,6 +119,7 @@ forever: .include "hgr_rectangle.s" .include "hgr_input.s" .include "hgr_tables.s" +.include "hgr_text_box.s" .include "graphics_copy/copy_graphics.inc" @@ -126,8 +130,13 @@ score_text: .byte 0,2,"Score: 0 of 150",0 wrong_text: + .byte 0,97,69, 0,184,109 .byte 16,84,"WRONG!!!",0 +correct_text: + .byte 0,97,69, 0,184,109 + .byte 16,84,"CORRECT!",0 + ; 0123456789012345678901234567890123456789 copy_protection_text: .byte 0,160,"Before proceeding, don thy red glasses",0 diff --git a/games/peasant/graphics/Makefile b/games/peasant/graphics/Makefile index 6a1ad0d4..7efa3dab 100644 --- a/games/peasant/graphics/Makefile +++ b/games/peasant/graphics/Makefile @@ -30,6 +30,7 @@ graphics.inc: \ river.lzsa \ knight.lzsa \ waterfall.lzsa \ + inn.lzsa \ todo.lzsa echo "cottage_lzsa: .incbin \"cottage.lzsa\"" > graphics.inc echo "lake_w_lzsa: .incbin \"lake_w.lzsa\"" >> graphics.inc @@ -37,6 +38,7 @@ graphics.inc: \ echo "river_lzsa: .incbin \"river.lzsa\"" >> graphics.inc echo "knight_lzsa: .incbin \"knight.lzsa\"" >> graphics.inc echo "waterfall_lzsa: .incbin \"waterfall.lzsa\"" >> graphics.inc + echo "inn_lzsa: .incbin \"inn.lzsa\"" >> graphics.inc echo "todo_lzsa: .incbin \"todo.lzsa\"" >> graphics.inc @@ -114,6 +116,14 @@ waterfall.hgr: waterfall.png ### +inn.lzsa: inn.hgr + $(LZSA) -r -f2 inn.hgr inn.lzsa + +inn.hgr: inn.png + $(PNG2HGR) inn.png > inn.hgr + +### + todo.lzsa: todo.hgr $(LZSA) -r -f2 todo.hgr todo.lzsa diff --git a/games/peasant/graphics/inn.png b/games/peasant/graphics/inn.png new file mode 100644 index 00000000..da73c72b Binary files /dev/null and b/games/peasant/graphics/inn.png differ diff --git a/games/peasant/peasant.s b/games/peasant/peasant.s index d0ee55dc..89d1eb6f 100644 --- a/games/peasant/peasant.s +++ b/games/peasant/peasant.s @@ -98,7 +98,7 @@ new_location: ; draw rectangle on bottom - jsr clear_bottom +; jsr clear_bottom jsr hgr_save @@ -282,7 +282,7 @@ parse_input: parse_copy: cmp #'C' - bne parse_version + bne parse_look ; want copy lda #ENDING_COPY @@ -290,6 +290,26 @@ parse_copy: jmp done_parse_message +parse_look: + cmp #'L' + bne parse_talk + + lda #fake_error1 + jmp finish_parse_message + + +parse_talk: + cmp #'T' + bne parse_version + + lda #fake_error2 + jmp finish_parse_message + + parse_version: cmp #'V' bne parse_help @@ -352,6 +372,16 @@ version_message: .byte "version 0.2",0 +fake_error1: +.byte 0,43,24, 0,253,82 +.byte 8,41,"?SYNTAX ERROR IN 1020",13 +.byte "]",127,0 + +fake_error2: +.byte 0,43,24, 0,253,82 +.byte 8,41,"?UNDEF'D STATEMENT ERROR",13 +.byte "]",127,0 + clear_bottom: ; draw rectangle @@ -438,7 +468,7 @@ map_backgrounds_low: .byte cottage_lzsa ; 11 -- cottage .byte >lake_w_lzsa ; 12 -- lake west .byte >lake_e_lzsa ; 13 -- lake east - .byte >todo_lzsa ; 14 + .byte >inn_lzsa ; 14 -- inn .byte >todo_lzsa ; 15 .byte >todo_lzsa ; 16 .byte >todo_lzsa ; 17 .byte >todo_lzsa ; 18 .byte >todo_lzsa ; 19 - - -