dos33fsprogs/games/monkey/monkey_bar_inside3.s

278 lines
4.3 KiB
ArmAsm
Raw Normal View History

2020-10-11 14:35:06 +00:00
; stuff regarding 3d room of scumm bar
; if x<4 goto MONKEY_BAR_INSIDE2 at 34,24
bar_inside3_check_exit:
lda GUYBRUSH_X
cmp #4
bcc bar_inside3_to_bar_inside2
; cmp #35
; bcs bar_inside3_to_bar
bcs bar_inside3_no_exit
bar_inside3_to_bar_inside2:
lda GUYBRUSH_DIRECTION
cmp #DIR_LEFT
bne bar_inside3_no_exit
lda #MONKEY_BAR_INSIDE2
sta LOCATION
lda #34
sta GUYBRUSH_X
sta DESTINATION_X
lda #24
sta GUYBRUSH_Y
sta DESTINATION_Y
jsr change_location
jmp bar_inside3_no_exit
bar_inside3_no_exit:
rts
;================================
;================================
; bar_inside3 adjust destination
;================================
;================================
bar_inside3_adjust_destination:
; just make Y always 24
lda #24
sta DESTINATION_Y
lda DESTINATION_X
cmp #33
bcc done_mb3_adjust
lda #33
sta DESTINATION_X
done_mb3_adjust:
rts
;================================
;================================
; bar_inside3 check bounds
;================================
;================================
bar_inside3_check_bounds:
; just make Y always 20
rts
;================================
;================================
; draw meat
;================================
;================================
draw_meat:
lda ITEMS_PICKED_UP
and #IPU_ITEM_MEAT
bne done_draw_meat
lda #<meat_sprite
sta INL
lda #>meat_sprite
sta INH
lda #9
sta XPOS
lda #26
sta YPOS
jsr put_sprite_crop
done_draw_meat:
rts
2020-10-11 14:35:06 +00:00
meat_sprite:
.byte 3,2
.byte $3A,$8A,$AA
.byte $A3,$A8,$Af
2020-10-11 14:35:06 +00:00
;===================================
;===================================
; actions
;===================================
;===================================
;=============================
bar3_door_action:
bar3_door_nothing:
lda #VERB_WALK
sta CURRENT_VERB
rts
2020-10-12 01:32:42 +00:00
2020-10-11 14:35:06 +00:00
;=============================
2020-10-12 01:32:42 +00:00
barrel_action:
2020-10-11 14:35:06 +00:00
lda CURRENT_VERB
asl
tay
2020-10-12 01:32:42 +00:00
lda barrel_actions,Y
2020-10-11 14:35:06 +00:00
cmp #$ff
2020-10-12 01:32:42 +00:00
beq barrel_nothing
2020-10-11 14:35:06 +00:00
sta MESSAGE_L
2020-10-12 01:32:42 +00:00
lda barrel_actions+1,Y
2020-10-11 14:35:06 +00:00
sta MESSAGE_H
jmp do_display_message
2020-10-12 01:32:42 +00:00
barrel_nothing:
2020-10-11 14:35:06 +00:00
lda #VERB_WALK
sta CURRENT_VERB
rts
2020-10-12 01:32:42 +00:00
barrel_actions:
2020-10-11 14:35:06 +00:00
.word $FFFF ; give
.word doesnt_open ; open
.word doesnt_work ; close
.word cant_pick_up ; pick_up
2020-10-12 01:32:42 +00:00
.word barrel_look ; look_at
2020-10-11 14:35:06 +00:00
.word $FFFF ; talk_to
2020-10-12 01:32:42 +00:00
.word $FFFF ; use
2020-10-11 14:35:06 +00:00
.word icant_move ; push
.word icant_move ; pull
2020-10-12 01:32:42 +00:00
barrel_look:
.byte 1,21,"FULL OF THAT FOUL STUFF PIRATES DRINK",0
2020-10-11 14:35:06 +00:00
2020-10-12 01:32:42 +00:00
;=============================
table_action:
2020-10-11 14:35:06 +00:00
lda CURRENT_VERB
asl
tay
2020-10-12 01:32:42 +00:00
lda table_actions,Y
2020-10-11 14:35:06 +00:00
cmp #$ff
2020-10-12 01:32:42 +00:00
beq table_nothing
2020-10-11 14:35:06 +00:00
sta MESSAGE_L
2020-10-12 01:32:42 +00:00
lda table_actions+1,Y
2020-10-11 14:35:06 +00:00
sta MESSAGE_H
jmp do_display_message
2020-10-12 01:32:42 +00:00
table_nothing:
2020-10-11 14:35:06 +00:00
lda #VERB_WALK
sta CURRENT_VERB
rts
2020-10-12 01:32:42 +00:00
table_actions:
2020-10-11 14:35:06 +00:00
.word $FFFF ; give
2020-10-12 01:32:42 +00:00
.word doesnt_open ; open
.word doesnt_work ; close
.word cant_pick_up ; pick_up
.word not_special ; look_at
.word $FFFF ; talk_to
2020-10-11 14:35:06 +00:00
.word $FFFF ; use
2020-10-12 01:32:42 +00:00
.word icant_move ; push
.word icant_move ; pull
2020-10-11 14:35:06 +00:00
;=============================
2020-10-12 01:32:42 +00:00
meat_action:
2020-10-11 14:35:06 +00:00
lda CURRENT_VERB
cmp #VERB_PICK_UP
bne meat_not_pickup
; pick up the meat
lda ITEMS_PICKED_UP
ora #IPU_ITEM_MEAT
sta ITEMS_PICKED_UP
; add to inventory
lda #INV_ITEM_MEAT
ldx INVENTORY_NEXT_SLOT
sta INVENTORY,X
inc INVENTORY_NEXT_SLOT
; decrement object count in room
ldy #LOCATION_NUM_AREAS
lda location14,Y
sec
sbc #1
sta location14,Y
rts
meat_not_pickup:
2020-10-11 14:35:06 +00:00
asl
tay
2020-10-12 01:32:42 +00:00
lda meat_actions,Y
2020-10-11 14:35:06 +00:00
cmp #$ff
2020-10-12 01:32:42 +00:00
beq meat_nothing
2020-10-11 14:35:06 +00:00
sta MESSAGE_L
2020-10-12 01:32:42 +00:00
lda meat_actions+1,Y
2020-10-11 14:35:06 +00:00
sta MESSAGE_H
jmp do_display_message
2020-10-12 01:32:42 +00:00
meat_nothing:
2020-10-11 14:35:06 +00:00
lda #VERB_WALK
sta CURRENT_VERB
rts
2020-10-12 01:32:42 +00:00
meat_actions:
2020-10-11 14:35:06 +00:00
.word $FFFF ; give
.word doesnt_open ; open
.word doesnt_work ; close
2020-10-12 01:32:42 +00:00
.word $FFFF ; pick_up
.word meat_look ; look_at
2020-10-11 14:35:06 +00:00
.word $FFFF ; talk_to
2020-10-12 01:32:42 +00:00
.word $FFFF ; use
2020-10-11 14:35:06 +00:00
.word icant_move ; push
.word icant_move ; pull
2020-10-12 01:32:42 +00:00
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