monkey: hook up bar3

This commit is contained in:
Vince Weaver 2020-10-11 21:32:42 -04:00
parent 11544b0eb4
commit 92b8e58ae0
3 changed files with 127 additions and 59 deletions

View File

@ -60,7 +60,7 @@ monkey.o: monkey.s zp.inc hardware.inc common_defines.inc \
monkey_lookout.s monkey_poster.s monkey_dock.s monkey_bar.s \
monkey_town.s monkey_map.s monkey_church.s monkey_mansion_path.s \
monkey_mansion.s monkey_zipline.s \
monkey_bar_inside1.s monkey_bar_inside2.s \
monkey_bar_inside1.s monkey_bar_inside2.s monkey_bar_inside3.s \
monkey_voodoo1.s monkey_voodoo2.s \
cutscene_lechuck.s chapter1.s
ca65 -o monkey.o monkey.s -l monkey.lst

View File

@ -391,12 +391,38 @@ location14:
.word bar_inside3_check_exit ; exit
.word bar_inside3_check_bounds ; bounds check
.byte GUYBRUSH_BIG ; size
.byte 1 ; num areas
.byte 6 ; num areas
.byte 3,7 ; x
.byte 20,30 ; y
.word door_string ; name
.word bar3_door_action-1 ; action
.byte 1,5 ; x
.byte 32,40 ; y
.word barrel_string ; name
.word barrel_action-1 ; action
.byte 15,20 ; x
.byte 32,40 ; y
.word table_string ; name
.word table_action-1 ; action
.byte 21,23 ; x
.byte 24,28 ; y
.word stew_string ; name
.word stew_action-1 ; action
.byte 24,27 ; x
.byte 20,36 ; y
.word door_string ; name
.word bar3_door_action-1 ; action
.byte 10,14 ; x
.byte 26,30 ; y
.word meat_string ; name
.word meat_action-1 ; action
.byte 0,3 ; x
.byte 12,34 ; y
.word curtain_string ; name
.word curtain_action-1 ; action
; common strings
@ -404,6 +430,12 @@ door_string: .byte 20,20,"DOOR",0
pirate_string: .byte 20,20,"PIRATE",0
pirates_string: .byte 20,20,"PIRATES",0
; bar3 strings
stew_string: .byte 20,20,"POT O' STEW",0
table_string: .byte 20,20,"TABLE",0
barrel_string: .byte 20,20,"BARREL",0
meat_string: .byte 20,20,"HUNK OF MEAT",0
; voodoo2 strings
voodoo_lady_string: .byte 20,20,"VOODOO LADY",0

View File

@ -97,108 +97,144 @@ bar3_door_nothing:
sta CURRENT_VERB
rts
.if 0
;=============================
fireplace_action:
barrel_action:
lda CURRENT_VERB
asl
tay
lda fireplace_actions,Y
lda barrel_actions,Y
cmp #$ff
beq fireplace_nothing
beq barrel_nothing
sta MESSAGE_L
lda fireplace_actions+1,Y
lda barrel_actions+1,Y
sta MESSAGE_H
jmp do_display_message
fireplace_nothing:
barrel_nothing:
lda #VERB_WALK
sta CURRENT_VERB
rts
fireplace_actions:
barrel_actions:
.word $FFFF ; give
.word doesnt_open ; open
.word doesnt_work ; close
.word cant_pick_up ; pick_up
.word fireplace_look ; look_at
.word barrel_look ; look_at
.word $FFFF ; talk_to
.word for_what ; use
.word $FFFF ; use
.word icant_move ; push
.word icant_move ; pull
fireplace_look:
.byte 18,21,"COZY.",0
barrel_look:
.byte 1,21,"FULL OF THAT FOUL STUFF PIRATES DRINK",0
;=============================
impt_pirate_action:
lda CURRENT_VERB
asl
tay
lda impt_pirate_actions,Y
cmp #$ff
beq impt_pirate_nothing
sta MESSAGE_L
lda impt_pirate_actions+1,Y
sta MESSAGE_H
jmp do_display_message
impt_pirate_nothing:
lda #VERB_WALK
sta CURRENT_VERB
rts
impt_pirate_actions:
.word $FFFF ; give
.word $FFFF ; open
.word $FFFF ; close
.word $FFFF ; pick_up
.word impt_pirate_look ; look_at
.word impt_pirate_look ; talk_to
.word $FFFF ; use
.word $FFFF ; push
.word $FFFF ; pull
impt_pirate_look:
.byte 8,21,"WHAT BE YE WANTIN' BOY?",0
;=============================
curtain_action:
table_action:
lda CURRENT_VERB
asl
tay
lda curtain_actions,Y
lda table_actions,Y
cmp #$ff
beq curtain_nothing
beq table_nothing
sta MESSAGE_L
lda curtain_actions+1,Y
lda table_actions+1,Y
sta MESSAGE_H
jmp do_display_message
curtain_nothing:
table_nothing:
lda #VERB_WALK
sta CURRENT_VERB
rts
curtain_actions:
table_actions:
.word $FFFF ; give
.word doesnt_open ; open
.word doesnt_work ; close
.word cant_pick_up ; pick_up
.word not_special ; look_at
.word $FFFF ; talk_to
.word for_what ; use
.word $FFFF ; use
.word icant_move ; push
.word icant_move ; pull
.endif
;=============================
meat_action:
lda CURRENT_VERB
asl
tay
lda meat_actions,Y
cmp #$ff
beq meat_nothing
sta MESSAGE_L
lda meat_actions+1,Y
sta MESSAGE_H
jmp do_display_message
meat_nothing:
lda #VERB_WALK
sta CURRENT_VERB
rts
meat_actions:
.word $FFFF ; give
.word doesnt_open ; open
.word doesnt_work ; close
.word $FFFF ; pick_up
.word meat_look ; look_at
.word $FFFF ; talk_to
.word $FFFF ; use
.word icant_move ; push
.word icant_move ; pull
meat_look: .byte 0,21,"SOME SORT OF MEAT OR MEAT-LIKE SUBSTANCE",0
;=============================
stew_action:
lda CURRENT_VERB
asl
tay
lda stew_actions,Y
cmp #$ff
beq stew_nothing
sta MESSAGE_L
lda stew_actions+1,Y
sta MESSAGE_H
jmp do_display_message
stew_nothing:
lda #VERB_WALK
sta CURRENT_VERB
rts
stew_actions:
.word $FFFF ; give
.word doesnt_open ; open
.word doesnt_work ; close
.word stew_pick ; pick_up
.word stew_pick ; look_at
.word $FFFF ; talk_to
.word $FFFF ; use
.word stew_pick ; push
.word stew_pick ; pull
stew_pick: .byte 12,21,"IT'S BOILING HOT",0