peasant: can move rock in ned cottage now

This commit is contained in:
Vince Weaver 2021-10-25 00:22:42 -04:00
parent 47c0154e2b
commit 4c5d08d6e2
13 changed files with 222 additions and 33 deletions

View File

@ -318,6 +318,7 @@ PEASANT4: peasant4.o
peasant4.o: peasant4.s zp.inc inventory.inc \
parse_input.inc \
sprites/ned_sprites.inc \
peasant4_actions.s DIALOG_PEASANT4.LZSA dialog_peasant4.inc \
kerrek_actions.s \
graphics_peasantry/graphics_peasant4.inc sprites/peasant_sprites.inc \

View File

@ -72,7 +72,7 @@ $60-$AF Programs (roughly 22k available?) (we max at 20k on disk)
$B8-$BB Hi-res lookup tables
$BC temp area for load/save files
$BD-$BE temp area when saving game
$BF ???
$BF verb table
$C0-$CF I/O
$D0-$DF (Language Card BANK1) ?????
$D0-$DF (Language Card BANK2) Mockingboard music/PT3-routines
@ -80,7 +80,7 @@ $E0-$FF (Language Card) ?????
$D0-$DF (bank2) inventory
$D0-$ED (bank1) per-levelstrings
$EE-$FF common parser code
$EE-$FF common parser code (4.5k = 4608 bytes)
Disk1 Map (disk has 35 tracks, each 4k in size)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

View File

@ -562,7 +562,7 @@ game_over:
.include "wait.s"
.include "wait_a_bit.s"
.include "speaker_beeps.s"
;.include "speaker_beeps.s"
.include "graphics_end/ending_graphics.inc"

View File

@ -155,7 +155,7 @@ done_beep:
; jmp forever
.include "hgr_sprite.s"
.include "speaker_beeps.s"
;.include "speaker_beeps.s"
;.include "wait_keypress.s"

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.0 KiB

After

Width:  |  Height:  |  Size: 17 KiB

View File

@ -91,6 +91,36 @@ new_location:
jsr decompress_lzsa2_fast
;====================
; update ned cottage if necessary
lda MAP_LOCATION
cmp #LOCATION_OUTSIDE_NN
bne not_necessary_cottage
lda GAME_STATE_2
and #COTTAGE_ROCK_MOVED
beq not_necessary_cottage
; 161,117
lda #23
sta CURSOR_X
lda #117
sta CURSOR_Y
lda #<rock_moved_sprite
sta INL
lda #>rock_moved_sprite
sta INH
jsr hgr_draw_sprite
not_necessary_cottage:
; load priority
lda MAP_LOCATION
@ -268,3 +298,7 @@ peasant4_text_lzsa:
.incbin "DIALOG_PEASANT4.LZSA"
.include "peasant4_actions.s"
.include "sprites/ned_sprites.inc"
.include "hgr_sprite.s"

View File

@ -13,6 +13,8 @@ ned_cottage_verb_table:
.word ned_cottage_break-1
.byte VERB_CLIMB
.word ned_cottage_climb-1
.byte VERB_CUT
.word ned_cottage_cut-1
.byte VERB_DEPLOY
.word ned_cottage_deploy-1
.byte VERB_DROP
@ -39,6 +41,8 @@ ned_cottage_verb_table:
.word ned_cottage_punch-1
.byte VERB_USE
.word ned_cottage_use-1
.byte VERB_TRY
.word ned_cottage_try-1
.byte 0
;================
@ -151,8 +155,68 @@ ned_cottage_move:
jmp parse_common_get
ned_cottage_rock:
lda GAME_STATE_2
and #COTTAGE_ROCK_MOVED
bne ned_cottage_rock_moved
ned_cottage_rock_not_moved:
; move rock
lda PEASANT_X
sta CURSOR_X
lda PEASANT_Y
sta CURSOR_Y
jsr restore_bg_1x28
; 161,117
lda #23
sta CURSOR_X
lda #117
sta CURSOR_Y
lda #<rock_moved_sprite
sta INL
lda #>rock_moved_sprite
sta INH
jsr hgr_draw_sprite
lda PEASANT_X
sta CURSOR_X
lda PEASANT_Y
sta CURSOR_Y
jsr save_bg_1x28
jsr draw_peasant
; make rock moved
lda GAME_STATE_2
ora #COTTAGE_ROCK_MOVED
sta GAME_STATE_2
ldx #<ned_cottage_get_rock_message
ldy #>ned_cottage_get_rock_message
jsr finish_parse_message
; add 2 points to score
lda #2
jsr score_points
rts
ned_cottage_rock_moved:
ldx #<ned_cottage_get_rock_already_message
ldy #>ned_cottage_get_rock_already_message
jmp finish_parse_message
;================
@ -194,6 +258,45 @@ kick_cottage:
jmp finish_parse_message
;===================
; cut
;===================
ned_cottage_cut:
lda CURRENT_NOUN
cmp #NOUN_ARMS
beq cut_off_arms
jmp parse_common_unknown
cut_off_arms:
ldx #<ned_cottage_cut_arms_message
ldy #>ned_cottage_cut_arms_message
jmp finish_parse_message
;===================
; try
;===================
ned_cottage_try:
; lda CURRENT_NOUN
; cmp #NOUN_NONE
; you die
lda #LOAD_GAME_OVER
sta WHICH_LOAD
lda #1
sta GAME_OVER
ldx #<ned_cottage_try_message
ldy #>ned_cottage_try_message
jmp finish_parse_message
;=================
; look
;=================

View File

@ -233,7 +233,7 @@ length_array:
.byte 32, 50, 60, 20 ; VID_LOGO, TITLE, INTRO, COPY_CHECK
.byte 80, 88, 88, 80 ; PEASANT1, PEASANT2, PEASANT3, PEASANT4
.byte 80, 80, 16, 80 ; TROGDOR, ENDING, MUSIC, CLIFF
.byte 16, 16, 16, 78 ; GAME_OVER, INVENTORY, PARSE_INPUT
.byte 16, 16, 18, 78 ; GAME_OVER, INVENTORY, PARSE_INPUT
.byte 3 ;
.byte 1,1,1,1,1 ; SAVE1, SAVE2, SAVE3
.byte 1 ; disk detect

View File

@ -73,7 +73,73 @@ done_copy_tail_loop:
cld ; clear decimal mode
rts
;========================
; score points
;========================
; value to add in A
; plays tone
; clears old
; updates new
score_points:
; update score
sed ; set BCD mode
clc
adc SCORE_TENSONES
sta SCORE_TENSONES
lda #0
adc SCORE_HUNDREDS
sta SCORE_HUNDREDS
cld ; clear BCD mode
; update score string
jsr update_score
; clear top
clear_top:
; draw rectangle
lda #$3 ; color is white1
sta VGI_RCOLOR
lda #0
sta VGI_RX1
lda #0
sta VGI_RY1
lda #140
sta VGI_RXRUN
lda #12
sta VGI_RYRUN
jsr vgi_simple_rectangle
; print score
jsr print_score
; play tone
;===========================
; weep-boom sound
lda #32
sta speaker_duration
lda #NOTE_E4
sta speaker_frequency
jsr speaker_beep
lda #64
sta speaker_duration
lda #NOTE_F4
sta speaker_frequency
jsr speaker_beep
lda #128
sta speaker_duration
lda #NOTE_F3
sta speaker_frequency
jsr speaker_beep
rts
@ -83,3 +149,5 @@ score_text:
score_tail:
.byte " of 150",0
.include "speaker_beeps.s"

View File

@ -1,7 +1,7 @@
HGR_SPRITE = ../../../utils/hgr-utils/hgr_make_sprite
all: inventory_sprites.inc ending_sprites.inc trogdor_sprites.inc \
boat_sprites.inc peasant_sprites.inc
boat_sprites.inc peasant_sprites.inc ned_sprites.inc
peasant_sprites.inc: peasant_sprites.png
$(HGR_SPRITE) -l peasant_right1_sprite peasant_sprites.png 35 1 35 29 > peasant_sprites.inc
@ -33,6 +33,9 @@ boat_sprites.inc: boat_sprites.png
$(HGR_SPRITE) -s -l boat6 boat_sprites.png 91 93 165 137 >> boat_sprites.inc
$(HGR_SPRITE) -s -l boat7 boat_sprites.png 91 139 165 183 >> boat_sprites.inc
ned_sprites.inc: ned_sprites.png
$(HGR_SPRITE) -s -l rock_moved_sprite ned_sprites.png 7 1 27 12 > ned_sprites.inc
inventory_sprites.inc: inventory.png
$(HGR_SPRITE) -l arrow_sprite inventory.png 14 3 27 19 > inventory_sprites.inc
@ -105,4 +108,4 @@ trogdor_sprites.inc: trogdor_sprites.png
clean:
rm -f *~ peasant_sprites.inc inventory_sprites.inc \
ending_sprites.inc trogdor_sprites.inc
ending_sprites.inc trogdor_sprites.inc ned_sprites.inc

Binary file not shown.

After

Width:  |  Height:  |  Size: 681 B

View File

@ -95,12 +95,14 @@ ned_cottage_get_rock_message:
.byte "through!",0
; + get rock (after moving it)
ned_cottage_get_rock_already_message:
.byte "You've already moved the",13
.byte "stone out of the way to",13
.byte "reveal a less-than",13
.byte "peasant-sized hole.",0
; cut off arms, legs, and head (possibly just "cut off arms")
ned_cottage_cut_arms_message:
.byte "Very funny. You have",13
.byte "trouble cutting out",13
.byte "coupons in the weekly",13
@ -109,6 +111,7 @@ ned_cottage_get_rock_message:
.byte "you try.",0
; + try (Warning: You die.)
ned_cottage_try_message:
.byte "Okay, fine. You try to cut",13
.byte "off your hard-earned",13
.byte "extremities. It doesn't",13

View File

@ -117,31 +117,8 @@ done_speech:
; UPDATE SCORE
lda #$43
sta SCORE_TENSONES
jsr update_score
; jsr update_top
;===========================
; weep-boom sound
lda #32
sta speaker_duration
lda #NOTE_E4
sta speaker_frequency
jsr speaker_beep
lda #64
sta speaker_duration
lda #NOTE_F4
sta speaker_frequency
jsr speaker_beep
lda #128
sta speaker_duration
lda #NOTE_F3
sta speaker_frequency
jsr speaker_beep
lda #10
jsr score_points
trogdor_open:
@ -344,7 +321,7 @@ game_over:
.include "version.inc"
.include "speaker_beeps.s"
;.include "speaker_beeps.s"
.include "hgr_sprite.s"