monkey: add all the nouns

This commit is contained in:
Vince Weaver 2020-09-17 21:37:50 -04:00
parent 2317067e98
commit a893a41037
7 changed files with 207 additions and 51 deletions

View File

@ -56,7 +56,7 @@ monkey.o: monkey.s zp.inc hardware.inc common_defines.inc \
leveldata_monkey.inc \
monkey_actions.s update_bottom.s \
guy.brush \
monkey_lookout.s monkey_poster.s
monkey_lookout.s monkey_poster.s monkey_dock.s monkey_bar.s
ca65 -o monkey.o monkey.s -l monkey.lst
graphics/graphics.inc:

View File

@ -316,10 +316,10 @@ set_destination_poster:
jsr poster_adjust_destination
jmp done_set_destination
set_destination_dock:
; jsr dock_adjust_destination
jsr dock_adjust_destination
jmp done_set_destination
set_destination_bar:
; jsr bar_adjust_destination
jsr bar_adjust_destination
jmp done_set_destination

View File

@ -32,68 +32,41 @@ location1:
.word poster_lzsa ; background
.byte 18,40 ; walking range X
.byte 16,48 ; walking range Y
.byte 3 ; num areas
.byte 2 ; num areas
.byte 12,15 ; x
.byte 18,28 ; y
.word lookout_string ; name
.word lookout_action-1 ; action
.byte 0,5 ; x
.byte 0,40 ; y
.word cliffside_string ; name
.word cliffside_action-1 ; action
.byte 12,15 ; x
.byte 18,28 ; y
.word path_string ; name
.word path_action-1 ; action
.byte 12,15 ; x
.byte 18,28 ; y
.word stairs_string ; name
.word stairs_action-1 ; action
.byte 26,30 ; x
.byte 22,32 ; y
.word poster_string ; name
.word poster_action-1 ; action
; MONKEY_DOCK -- dock
location2:
.word dock_lzsa ; background
.byte 18,40 ; walking range X
.byte 16,48 ; walking range Y
.byte 3 ; num areas
.byte 1 ; num areas
.byte 12,15 ; x
.byte 18,28 ; y
.word lookout_string ; name
.word lookout_action-1 ; action
.byte 12,15 ; x
.byte 18,28 ; y
.word path_string ; name
.word path_action-1 ; action
.byte 12,15 ; x
.byte 18,28 ; y
.word stairs_string ; name
.word stairs_action-1 ; action
.byte 12,16 ; x
.byte 0,4 ; y
.word moon_string ; name
.word moon_action-1 ; action
; MONKEY_BAR -- scumm bar
location3:
.word bar_lzsa ; background
.byte 18,40 ; walking range X
.byte 16,48 ; walking range Y
.byte 3 ; num areas
.byte 12,15 ; x
.byte 18,28 ; y
.word lookout_string ; name
.word lookout_action-1 ; action
.byte 12,15 ; x
.byte 18,28 ; y
.word path_string ; name
.word path_action-1 ; action
.byte 12,15 ; x
.byte 18,28 ; y
.word stairs_string ; name
.word stairs_action-1 ; action
.byte 1 ; num areas
.byte 9,14 ; x
.byte 20,32 ; y
.word door_string ; name
.word door_action-1 ; action
string_data:
@ -101,3 +74,9 @@ lookout_string: .byte 20,20,"LOOKOUT",0
path_string: .byte 20,20,"PATH",0
stairs_string: .byte 20,20,"STAIRS",0
cliffside_string: .byte 20,20,"CLIFFSIDE",0
poster_string: .byte 20,20,"POSTER",0
moon_string: .byte 20,20,"MOON",0
door_string: .byte 20,20,"DOOR",0

View File

@ -256,10 +256,10 @@ check_exit_poster:
jsr poster_check_exit
jmp done_check_exit
check_exit_dock:
; jsr dock_check_exit
jsr dock_check_exit
jmp done_check_exit
check_exit_bar:
; jsr bar_check_exit
jsr bar_check_exit
jmp done_check_exit
done_check_exit:
@ -312,6 +312,8 @@ really_exit:
.include "monkey_lookout.s"
.include "monkey_poster.s"
.include "monkey_dock.s"
.include "monkey_bar.s"
.include "monkey_actions.s"
.include "update_bottom.s"

View File

@ -87,3 +87,15 @@ path_action:
stairs_action:
rts
door_action:
rts
moon_action:
rts
cliffside_action:
rts
poster_action:
rts

81
monkey/monkey_bar.s Normal file
View File

@ -0,0 +1,81 @@
bar_check_exit:
; lda DESTINATION_Y
; cmp #28
; bcc lookout_no_exit
; lda DESTINATION_X
; cmp #28
; bcc lookout_no_exit
; cmp #35
; bcs lookout_no_exit
; lda #MONKEY_POSTER
; sta LOCATION
; lda #2
; sta GUYBRUSH_X
; lda #22
; sta GUYBRUSH_Y
; jsr change_location
bar_no_exit:
rts
bar_adjust_destination:
br_check_x:
; lda DESTINATION_X
; cmp #19
; bcc ld_x_too_small
; cmp #35
; bcs ld_x_too_big
; jmp ld_check_y
br_x_too_big:
; lda #35
; sta DESTINATION_X
; bne ld_check_y
br_x_too_small:
; lda #18
; sta DESTINATION_X
br_check_y:
; if x < 28, Y must be between 16 and 18
; if x < 35, Y must be between 8 and 28
; lda DESTINATION_Y
; cmp #16
; bcc ld_y_too_small
rts
br_y_too_small:
; lda #16
; sta DESTINATION_Y
done_br_adjust:
rts
;draw_house:
; lda #<wall_sprite
; sta INL
; lda #>wall_sprite
; sta INH
; lda #18
; sta XPOS
; lda #22
; sta YPOS
; jsr put_sprite_crop
; rts
;house_sprite:

82
monkey/monkey_dock.s Normal file
View File

@ -0,0 +1,82 @@
; stuff regarding the dock
; guybrush is a friend without pier
dock_check_exit:
; lda DESTINATION_Y
; cmp #28
; bcc lookout_no_exit
; lda DESTINATION_X
; cmp #28
; bcc lookout_no_exit
; cmp #35
; bcs lookout_no_exit
; lda #MONKEY_POSTER
; sta LOCATION
; lda #2
; sta GUYBRUSH_X
; lda #22
; sta GUYBRUSH_Y
; jsr change_location
dock_no_exit:
rts
dock_adjust_destination:
dk_check_x:
; lda DESTINATION_X
; cmp #19
; bcc ld_x_too_small
; cmp #35
; bcs ld_x_too_big
; jmp ld_check_y
dk_x_too_big:
; lda #35
; sta DESTINATION_X
; bne ld_check_y
dk_x_too_small:
; lda #18
; sta DESTINATION_X
dk_check_y:
; if x < 28, Y must be between 16 and 18
; if x < 35, Y must be between 8 and 28
; lda DESTINATION_Y
; cmp #16
; bcc ld_y_too_small
rts
dk_y_too_small:
; lda #16
; sta DESTINATION_Y
done_dk_adjust:
rts
;draw_house:
; lda #<wall_sprite
; sta INL
; lda #>wall_sprite
; sta INH
; lda #18
; sta XPOS
; lda #22
; sta YPOS
; jsr put_sprite_crop
; rts
;house_sprite: