From 398e1e0ff8a79900f58d4ce42f64a8a68f70b19b Mon Sep 17 00:00:00 2001 From: Vince Weaver Date: Tue, 20 Oct 2020 13:05:42 -0400 Subject: [PATCH] monkey: finally hook up bar --- monkey/leveldata_monkey.inc | 26 ++-- monkey/monkey_bar_inside1.s | 261 +++++++++++++++++++++++++++++++++++- 2 files changed, 272 insertions(+), 15 deletions(-) diff --git a/monkey/leveldata_monkey.inc b/monkey/leveldata_monkey.inc index cf4ba141..f61cdde1 100644 --- a/monkey/leveldata_monkey.inc +++ b/monkey/leveldata_monkey.inc @@ -187,12 +187,12 @@ location6: .word bar_inside1_check_exit ; exit .word bar_inside1_check_bounds ; bounds check .byte GUYBRUSH_BIG ; size - .byte 7 ; num areas + .byte 9 ; num areas .byte 0,10 ; x .byte 34,40 ; y .word pirate_string ; name - .word bar1_pirate_action-1 ; action + .word bar1_left_pirate_action-1 ; action .byte 4,9 ; x .byte 16,32 ; y @@ -202,24 +202,34 @@ location6: .byte 10,15 ; x .byte 22,32 ; y .word pirate_string ; name - .word bar1_pirate_action-1 ; action + .word bar1_red_pirate_action-1 ; action .byte 16,20 ; x .byte 22,34 ; y .word pirates_string ; name - .word bar1_pirate_action-1 ; action + .word bar1_right_pirate_action-1 ; action - .byte 21,35 ; x - .byte 22,38 ; y + .byte 21,25 ; x + .byte 26,35 ; y .word pirate_string ; name - .word bar1_pirate_action-1 ; action + .word bar1_fg_left_pirate_action-1 ; action + + .byte 27,32 ; x + .byte 26,35 ; y + .word pirate_string ; name + .word bar1_fg_busy_pirate_action-1 ; action + + .byte 33,36 ; x + .byte 26,33 ; y + .word pirate_string ; name + .word bar1_loom_pirate_action-1 ; action .byte 37,40 ; x .byte 14,30 ; y .word curtain_string ; name .word curtain_action-1 ; action - .byte 35,40 ; x + .byte 36,40 ; x .byte 30,38 ; y .word dog_string ; name .word bar1_dog_action-1 ; action diff --git a/monkey/monkey_bar_inside1.s b/monkey/monkey_bar_inside1.s index 20cad576..ceb64ce1 100644 --- a/monkey/monkey_bar_inside1.s +++ b/monkey/monkey_bar_inside1.s @@ -197,24 +197,271 @@ ceiling4_sprite: ;=================================== ;=================================== + ;============================= -bar1_pirate_action: +bar1_left_pirate_action: + lda CURRENT_VERB + asl + tay + + lda left_pirate_actions,Y + cmp #$ff + beq left_pirate_nothing + + sta MESSAGE_L + lda left_pirate_actions+1,Y + sta MESSAGE_H + + jmp do_display_message + +left_pirate_nothing: lda #VERB_WALK sta CURRENT_VERB rts +left_pirate_actions: + .word $FFFF ; give + .word doesnt_open ; open + .word doesnt_work ; close + .word cant_pick_up ; pick_up + .word left_pirate_look; look_at + .word left_pirate_look; talk_to + .word doesnt_work ; use + .word icant_move ; push + .word icant_move ; pull + +; 01234567890123456789012345678901234567890 +left_pirate_look: .byte 00,21,"IT'S NOT WISE TO WAKE A SLEEPING PIRATE",0 + +; red pirate +; fancy graphic?? + +;============================= +bar1_red_pirate_action: + lda CURRENT_VERB + asl + tay + + lda red_pirate_actions,Y + cmp #$ff + beq red_pirate_nothing + + sta MESSAGE_L + lda red_pirate_actions+1,Y + sta MESSAGE_H + + jmp do_display_message + +red_pirate_nothing: + lda #VERB_WALK + sta CURRENT_VERB + rts + +red_pirate_actions: + .word $FFFF ; give + .word doesnt_open ; open + .word doesnt_work ; close + .word cant_pick_up ; pick_up + .word red_pirate_look ; look_at + .word red_pirate_look ; talk_to + .word doesnt_work ; use + .word icant_move ; push + .word icant_move ; pull + + +red_pirate_look: .byte 03,21,"AHOY THERE STRANGER, NEW IN TOWN?",0 + +; pirates at table with red +;============================= +bar1_right_pirate_action: + lda CURRENT_VERB + asl + tay + + lda right_pirate_actions,Y + cmp #$ff + beq right_pirate_nothing + + sta MESSAGE_L + lda right_pirate_actions+1,Y + sta MESSAGE_H + + jmp do_display_message + +right_pirate_nothing: + lda #VERB_WALK + sta CURRENT_VERB + rts + +right_pirate_actions: + .word $FFFF ; give + .word doesnt_open ; open + .word doesnt_work ; close + .word cant_pick_up ; pick_up + .word right_pirate_look ; look_at + .word right_pirate_look ; talk_to + .word doesnt_work ; use + .word icant_move ; push + .word icant_move ; pull + +right_pirate_look: .byte 03,21,"THEY'RE BUSY TALKING TO GUY ON LEFT",0 + +; black foreground +; zooms in + +; pirates at left of fg table +;============================= +bar1_fg_left_pirate_action: + lda CURRENT_VERB + asl + tay + + lda fg_left_pirate_actions,Y + cmp #$ff + beq fg_left_pirate_nothing + + sta MESSAGE_L + lda fg_left_pirate_actions+1,Y + sta MESSAGE_H + + jmp do_display_message + +fg_left_pirate_nothing: + lda #VERB_WALK + sta CURRENT_VERB + rts + +fg_left_pirate_actions: + .word $FFFF ; give + .word doesnt_open ; open + .word doesnt_work ; close + .word cant_pick_up ; pick_up + .word fg_left_pirate_look ; look_at + .word fg_left_pirate_look ; talk_to + .word doesnt_work ; use + .word icant_move ; push + .word icant_move ; pull + +fg_left_pirate_look: .byte 05,21,"WHAT'RE YOU LOOKING AT ME FOR?",0 + +; guy with girl +;============================= +bar1_fg_busy_pirate_action: + lda CURRENT_VERB + asl + tay + + lda fg_busy_pirate_actions,Y + cmp #$ff + beq fg_busy_pirate_nothing + + sta MESSAGE_L + lda fg_busy_pirate_actions+1,Y + sta MESSAGE_H + + jmp do_display_message + +fg_busy_pirate_nothing: + lda #VERB_WALK + sta CURRENT_VERB + rts + +fg_busy_pirate_actions: + .word $FFFF ; give + .word doesnt_open ; open + .word doesnt_work ; close + .word cant_pick_up ; pick_up + .word fg_busy_pirate_look ; look_at + .word fg_busy_pirate_look ; talk_to + .word doesnt_work ; use + .word icant_move ; push + .word icant_move ; pull + +fg_busy_pirate_look: .byte 10,21,"I THINK THEY'RE BUSY.",0 + +; skinny loom guy +;============================= +bar1_loom_pirate_action: + lda CURRENT_VERB + asl + tay + + lda loom_pirate_actions,Y + cmp #$ff + beq loom_pirate_nothing + + sta MESSAGE_L + lda loom_pirate_actions+1,Y + sta MESSAGE_H + + jmp do_display_message + +loom_pirate_nothing: + lda #VERB_WALK + sta CURRENT_VERB + rts + +loom_pirate_actions: + .word $FFFF ; give + .word doesnt_open ; open + .word doesnt_work ; close + .word cant_pick_up ; pick_up + .word loom_pirate_look ; look_at + .word loom_pirate_look ; talk_to + .word doesnt_work ; use + .word icant_move ; push + .word icant_move ; pull + +loom_pirate_look: .byte 10,21,"ASK ME ABOUT LOOM",0 + +; dog +;============================= +bar1_dog_action: + lda CURRENT_VERB + asl + tay + + lda dog_pirate_actions,Y + cmp #$ff + beq dog_pirate_nothing + + sta MESSAGE_L + lda dog_pirate_actions+1,Y + sta MESSAGE_H + + jmp do_display_message + +dog_pirate_nothing: + lda #VERB_WALK + sta CURRENT_VERB + rts + +dog_pirate_actions: + .word $FFFF ; give + .word doesnt_open ; open + .word doesnt_work ; close + .word cant_pick_up ; pick_up + .word dog_look ; look_at + .word dog_look ; talk_to + .word doesnt_work ; use + .word icant_move ; push + .word icant_move ; pull + +dog_look: .byte 18,21,"GRRRRR",0 + + + ;============================= bar1_door_action: lda #VERB_WALK sta CURRENT_VERB rts -;============================= -bar1_dog_action: - lda #VERB_WALK - sta CURRENT_VERB - rts - + ;============================ + ;============================ + ; check bounds + ;============================ + ;============================ bar_inside1_check_bounds: rts