monkey: can go inside scumm bar

This commit is contained in:
Vince Weaver 2020-09-29 15:14:21 -04:00
parent b604a46110
commit c4e5c1f8e5
6 changed files with 319 additions and 137 deletions

View File

@ -2,8 +2,26 @@ overall:
+ have big/small/tiny guybrush
+ better bounds checking on paths
hook up actions:
+ scumm bar1
animations:
+ fire in scumm bar
+ impt pirate drinking
+ guy on chandelier
+ dog?
hookup rooms:
+ church
+ path to mansion
+ mansion
+ voodoo lady
cutscenes:
+ chapter intro
+ lechuck
zipline:
+ animate the sign
+ if you use pole you climb the ladder

View File

@ -187,27 +187,44 @@ location6:
.word bar_inside1_check_exit ; exit
.word lookout_check_bounds ; bounds check
.byte GUYBRUSH_BIG ; size
.byte 4 ; num areas
.byte 7 ; num areas
.byte 0,3 ; x
.byte 12,34 ; y
.byte 0,10 ; x
.byte 34,40 ; y
.word pirate_string ; name
.word bar1_pirate_action-1 ; action
.byte 4,9 ; x
.byte 16,32 ; y
.word door_string ; name
.word bar1_door_action-1 ; action
.byte 10,15 ; x
.byte 22,32 ; y
.word pirate_string ; name
.word bar1_pirate_action-1 ; action
.byte 16,20 ; x
.byte 22,34 ; y
.word pirates_string ; name
.word bar1_pirate_action-1 ; action
.byte 21,35 ; x
.byte 22,38 ; y
.word pirate_string ; name
.word bar1_pirate_action-1 ; action
.byte 37,40 ; x
.byte 14,30 ; y
.word curtain_string ; name
.word curtain_action-1 ; action
.byte 7,20 ; x
.byte 22,32 ; y
.word impt_pirate_string ; name
.word impt_pirate_action-1 ; action
.byte 35,40 ; x
.byte 30,38 ; y
.word dog_string ; name
.word bar1_dog_action-1 ; action
.byte 23,28 ; x
.byte 20,28 ; y
.word fireplace_string ; name
.word fireplace_action-1 ; action
.byte 34,38 ; x
.byte 18,36 ; y
.word door_string ; name
.word bar2_door_action-1 ; action
; MONKEY_BAR_INSIDE2 -- three pirates
@ -215,7 +232,7 @@ location7:
.word bar_inside2_lzsa ; background
.word bar_inside2_adjust_destination ; destination
.word bar_inside2_check_exit ; exit
.word lookout_check_bounds ; bounds check
.word bar_inside2_check_bounds ; bounds check
.byte GUYBRUSH_BIG ; size
.byte 4 ; num areas
@ -308,7 +325,8 @@ location11:
; common strings
door_string: .byte 20,20,"DOOR",0
pirate_string: .byte 20,20,"PIRATE",0
pirates_string: .byte 20,20,"PIRATES",0
; zipline strings
pole_string: .byte 20,20,"POLE",0
@ -333,6 +351,9 @@ shore_string: .byte 18,20,"SHORE",0
lookout_point_string: .byte 13,20,"LOOKOUT POINT",0
village_string: .byte 16,20,"VILLAGE",0
; inside_bar2 strings
dog_string: .byte 20,20,"DOG",0
; inside_bar2 strings
curtain_string: .byte 20,20,"CURTAIN",0

View File

@ -126,6 +126,8 @@ cant_pick_up:
.byte 10,21,"I CAN'T PICK THAT UP.",0
not_special:
.byte 1,21,"I DON'T SEE ANYTHING SPECIAL ABOUT IT.",0
for_what:
.byte 15,21,"FOR WHAT?",0
;=============================
; can't do anything with path
@ -368,37 +370,6 @@ town_door_nothing:
sta CURRENT_VERB
rts
;=============================
bar2_door_action:
bar2_door_nothing:
lda #VERB_WALK
sta CURRENT_VERB
rts
;=============================
curtain_action:
curtain_nothing:
lda #VERB_WALK
sta CURRENT_VERB
rts
;=============================
fireplace_action:
fireplace_nothing:
lda #VERB_WALK
sta CURRENT_VERB
rts
;=============================
impt_pirate_action:
impte_pirate_nothing:
lda #VERB_WALK
sta CURRENT_VERB
rts
;=============================
map_action:
map_nothing:

View File

@ -5,6 +5,7 @@
;===========================
; if x<5 goto DOCK at 34,20
; if x>35 goto TOWN
; if 9<x<14 and y<20 and door open, BAR_INSIDE1
bar_check_exit:
@ -13,7 +14,30 @@ bar_check_exit:
bcc bar_to_dock
cmp #35
bcs bar_to_town
cmp #9
bcc bar_no_exit
cmp #14
bcs bar_no_exit
bar_to_inside:
lda GUYBRUSH_Y
cmp #20
bcs bar_no_exit
lda BAR_DOOR_OPEN
beq bar_no_exit
lda #MONKEY_BAR_INSIDE1
sta LOCATION
lda #5
sta GUYBRUSH_X
sta DESTINATION_X
lda #20
sta GUYBRUSH_Y
sta DESTINATION_Y
jsr change_location
jmp bar_no_exit
bar_to_dock:
lda #MONKEY_DOCK
@ -47,36 +71,42 @@ bar_no_exit:
;===========================
; adjust walking destination
; adjust bounds
;===========================
bar_keep_in_bounds:
br_force_x:
lda GUYBRUSH_X
cmp #25
bcs br_gb_x_too_big
bcs br_gb_x_far_right
cmp #21
bcc br_gb_x_small
bcs br_gb_x_medium
bcs br_gb_x_right
cmp #9
bcc br_gb_x_left
cmp #14
bcc br_gb_doorway
bcs br_gb_x_left
br_gb_x_too_big:
br_gb_doorway:
lda GUYBRUSH_Y
cmp #20
bcc br_gb_x_right
bcs br_gb_x_left
br_gb_x_far_right:
lda #16
sta GUYBRUSH_Y
sta DESTINATION_Y
bne done_br_gb_adjust
br_gb_x_medium:
br_gb_x_right:
lda #18
sta GUYBRUSH_Y
sta DESTINATION_Y
bne done_br_gb_adjust
br_gb_x_small:
br_gb_x_left:
lda #20
sta GUYBRUSH_Y
sta DESTINATION_Y
done_br_gb_adjust:
sta GUYBRUSH_Y
sta DESTINATION_Y
rts
@ -87,36 +117,28 @@ done_br_gb_adjust:
bar_adjust_destination:
; if x<21, y=20
; if x<25, y=18
; else y=16
; just keep Y whatever is in bounds
; *except* in doorway 9<x<14
; then allow it to be 18
; also adjust actual Y
lda GUYBRUSH_X
cmp #9
bcc bar_adjust_force_y
cmp #14
bcs bar_adjust_force_y
lda CURSOR_Y
cmp #28
bcs done_br_adjust
lda #18
sta GUYBRUSH_Y
sta DESTINATION_Y
bar_adjust_force_y:
lda GUYBRUSH_Y
sta DESTINATION_Y
br_check_x:
; lda DESTINATION_X
; cmp #25
; bcs br_x_too_big
; cmp #21
; bcc br_x_small
; bcs br_x_medium
br_x_too_big:
; lda #16
; sta DESTINATION_Y
; bne done_br_adjust
br_x_medium:
; lda #18
; sta DESTINATION_Y
; bne done_br_adjust
br_x_small:
; lda #20
; sta DESTINATION_Y
done_br_adjust:
rts
@ -125,8 +147,9 @@ done_br_adjust:
;=====================
; draw bar door
;=====================
draw_bar_door:
lda BAR_DOOR_OPEN

View File

@ -1,37 +1,40 @@
; stuff regarding 1st room in scumm bar
; if x<4 goto MONKEY_POSTER at 28,20
; if x>35 goto MONKEY_BAR at 5,20
; if x<5 goto MONKEY_BAR at 10,20
; if x>35 goto MONKEY_BAR_INSIDE2 at 5,20
bar_inside1_check_exit:
lda GUYBRUSH_X
cmp #4
bcc bar_inside1_to_poster
cmp #5
bcc bar_inside1_to_bar
cmp #35
bcs bar_inside1_to_bar
bcs bar_inside1_to_bar_inside2
bcc bar_inside1_no_exit
bar_inside1_to_poster:
lda #MONKEY_POSTER
bar_inside1_to_bar:
lda #MONKEY_BAR
sta LOCATION
lda #34
lda #10
sta GUYBRUSH_X
sta DESTINATION_X
lda #20
sta GUYBRUSH_Y
sta DESTINATION_Y
lda #DIR_DOWN
sta GUYBRUSH_DIRECTION
jsr change_location
jmp bar_inside1_no_exit
bar_inside1_to_bar:
lda #MONKEY_BAR
bar_inside1_to_bar_inside2:
lda #MONKEY_BAR_INSIDE2
sta LOCATION
lda #5
lda #3
sta GUYBRUSH_X
sta DESTINATION_X
lda #20
sta GUYBRUSH_Y
lda #24
sta DESTINATION_Y
jsr change_location
jmp bar_inside1_no_exit
@ -41,11 +44,11 @@ bar_inside1_no_exit:
;==========================
;==========================
;=================================
;=================================
; bar_inside1 adjust destination
;==========================
;==========================
;=================================
;=================================
bar_inside1_adjust_destination:
; just make Y always 20
@ -81,3 +84,29 @@ done_mb1_adjust:
;house_sprite:
;===================================
;===================================
; actions
;===================================
;===================================
;=============================
bar1_pirate_action:
lda #VERB_WALK
sta CURRENT_VERB
rts
;=============================
bar1_door_action:
lda #VERB_WALK
sta CURRENT_VERB
rts
;=============================
bar1_dog_action:
lda #VERB_WALK
sta CURRENT_VERB
rts

View File

@ -1,19 +1,23 @@
; stuff regarding 2nd room of scumm bar
; if x<4 goto MONKEY_POSTER at 28,20
; if x>35 goto MONKEY_BAR at 5,20
; if x<4 goto MONKEY_BAR_INSIDE1 at 34,20
bar_inside2_check_exit:
lda GUYBRUSH_X
cmp #4
bcc bar_inside2_to_poster
cmp #35
bcs bar_inside2_to_bar
bcc bar_inside2_no_exit
bcc bar_inside2_to_bar_inside1
; cmp #35
; bcs bar_inside2_to_bar
bcs bar_inside2_no_exit
bar_inside2_to_poster:
lda #MONKEY_POSTER
bar_inside2_to_bar_inside1:
lda GUYBRUSH_DIRECTION
cmp #DIR_LEFT
bne bar_inside2_no_exit
lda #MONKEY_BAR_INSIDE1
sta LOCATION
lda #34
sta GUYBRUSH_X
@ -24,44 +28,41 @@ bar_inside2_to_poster:
jsr change_location
jmp bar_inside2_no_exit
bar_inside2_to_bar:
lda #MONKEY_BAR
sta LOCATION
lda #5
sta GUYBRUSH_X
sta DESTINATION_X
lda #20
sta GUYBRUSH_Y
sta DESTINATION_Y
jsr change_location
jmp bar_inside2_no_exit
bar_inside2_no_exit:
rts
;==========================
;==========================
;================================
;================================
; bar_inside2 adjust destination
;==========================
;==========================
;================================
;================================
bar_inside2_adjust_destination:
; just make Y always 20
; just make Y always 24
mb2_check_y:
; if x < 28, Y must be between 16 and 18
; if x < 35, Y must be between 8 and 28
mb2_y_too_small:
lda #20
lda #24
sta DESTINATION_Y
lda DESTINATION_X
cmp #33
bcc done_mb2_adjust
lda #33
sta DESTINATION_X
done_mb2_adjust:
rts
;================================
;================================
; bar_inside2 check bounds
;================================
;================================
bar_inside2_check_bounds:
; just make Y always 20
rts
;draw_house:
@ -81,3 +82,122 @@ done_mb2_adjust:
;house_sprite:
;===================================
;===================================
; actions
;===================================
;===================================
;=============================
bar2_door_action:
bar2_door_nothing:
lda #VERB_WALK
sta CURRENT_VERB
rts
;=============================
fireplace_action:
lda CURRENT_VERB
asl
tay
lda fireplace_actions,Y
cmp #$ff
beq fireplace_nothing
sta MESSAGE_L
lda fireplace_actions+1,Y
sta MESSAGE_H
jmp do_display_message
fireplace_nothing:
lda #VERB_WALK
sta CURRENT_VERB
rts
fireplace_actions:
.word $FFFF ; give
.word doesnt_open ; open
.word doesnt_work ; close
.word cant_pick_up ; pick_up
.word fireplace_look ; look_at
.word $FFFF ; talk_to
.word for_what ; use
.word icant_move ; push
.word icant_move ; pull
fireplace_look:
.byte 18,21,"COZY.",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:
lda CURRENT_VERB
asl
tay
lda curtain_actions,Y
cmp #$ff
beq curtain_nothing
sta MESSAGE_L
lda curtain_actions+1,Y
sta MESSAGE_H
jmp do_display_message
curtain_nothing:
lda #VERB_WALK
sta CURRENT_VERB
rts
curtain_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 icant_move ; push
.word icant_move ; pull