monkey: hook up some more locations

This commit is contained in:
Vince Weaver 2020-09-29 19:30:34 -04:00
parent cd901c11b8
commit 1f3d5e0e50
4 changed files with 53 additions and 35 deletions

View File

@ -1,20 +1,20 @@
; stuff regarding the church ; stuff regarding the church
; if x<4 goto MONKEY_POSTER at 28,20 ; if x<4 goto MONKEY_MANSION_PATH at
; if x>35 goto MONKEY_BAR at 5,20 ; if x>35 goto MONKEY_CHURCH at
church_check_exit: church_check_exit:
lda GUYBRUSH_X lda GUYBRUSH_X
cmp #4 cmp #4
bcc church_to_poster bcc church_to_mansion_path
cmp #35 cmp #35
bcs church_to_bar bcs church_to_town
bcc church_no_exit bcc church_no_exit
church_to_poster: church_to_mansion_path:
lda #MONKEY_POSTER lda #MONKEY_MANSION_PATH
sta LOCATION sta LOCATION
lda #34 lda #34
sta GUYBRUSH_X sta GUYBRUSH_X
@ -25,8 +25,8 @@ church_to_poster:
jsr change_location jsr change_location
jmp church_no_exit jmp church_no_exit
church_to_bar: church_to_town:
lda #MONKEY_BAR lda #MONKEY_TOWN
sta LOCATION sta LOCATION
lda #5 lda #5
sta GUYBRUSH_X sta GUYBRUSH_X

View File

@ -1,31 +1,16 @@
; stuff regarding the governor's mansion ; stuff regarding the governor's mansion
; if x<4 goto MONKEY_POSTER at 28,20 ; if x>35 goto MONKEY_MANSION_PATH at
; if x>35 goto MONKEY_BAR at 5,20
mansion_check_exit: mansion_check_exit:
lda GUYBRUSH_X lda GUYBRUSH_X
cmp #4
bcc mansion_to_poster
cmp #35 cmp #35
bcs mansion_to_bar bcs mansion_to_mansion_path
bcc mansion_no_exit bcc mansion_no_exit
mansion_to_poster: mansion_to_mansion_path:
lda #MONKEY_POSTER lda #MONKEY_MANSION_PATH
sta LOCATION
lda #34
sta GUYBRUSH_X
sta DESTINATION_X
lda #20
sta GUYBRUSH_Y
sta DESTINATION_Y
jsr change_location
jmp mansion_no_exit
mansion_to_bar:
lda #MONKEY_BAR
sta LOCATION sta LOCATION
lda #5 lda #5
sta GUYBRUSH_X sta GUYBRUSH_X

View File

@ -1,20 +1,20 @@
; stuff regarding path to mansion ; stuff regarding path to mansion
; if x<4 goto MONKEY_POSTER at 28,20 ; if x<4 goto MONKEY_MANSION
; if x>35 goto MONKEY_BAR at 5,20 ; if x>35 goto MONKEY_CHURCH
mansion_path_check_exit: mansion_path_check_exit:
lda GUYBRUSH_X lda GUYBRUSH_X
cmp #4 cmp #4
bcc mansion_path_to_poster bcc mansion_path_to_mansion
cmp #35 cmp #35
bcs mansion_path_to_bar bcs mansion_path_to_church
bcc mansion_path_no_exit bcc mansion_path_no_exit
mansion_path_to_poster: mansion_path_to_mansion:
lda #MONKEY_POSTER lda #MONKEY_MANSION
sta LOCATION sta LOCATION
lda #34 lda #34
sta GUYBRUSH_X sta GUYBRUSH_X
@ -25,8 +25,8 @@ mansion_path_to_poster:
jsr change_location jsr change_location
jmp mansion_path_no_exit jmp mansion_path_no_exit
mansion_path_to_bar: mansion_path_to_church:
lda #MONKEY_BAR lda #MONKEY_CHURCH
sta LOCATION sta LOCATION
lda #5 lda #5
sta GUYBRUSH_X sta GUYBRUSH_X

View File

@ -1,7 +1,16 @@
; right side of downtown village
;=======================
; check exit
;=======================
;
town_check_exit: town_check_exit:
lda GUYBRUSH_X lda GUYBRUSH_X
cmp #5 ; temporary
bcc town_to_church
cmp #32 cmp #32
bcc town_no_exit bcc town_no_exit
@ -26,10 +35,29 @@ town_to_bar:
lda #DIR_LEFT lda #DIR_LEFT
sta GUYBRUSH_DIRECTION sta GUYBRUSH_DIRECTION
jsr change_location jsr change_location
jmp town_no_exit
town_to_church:
lda #MONKEY_CHURCH
sta LOCATION
lda #34
sta GUYBRUSH_X
sta DESTINATION_X
lda #20
sta GUYBRUSH_Y
sta DESTINATION_Y
lda #DIR_LEFT
sta GUYBRUSH_DIRECTION
jsr change_location
town_no_exit: town_no_exit:
rts rts
;=======================
; adjust destination
;=======================
town_adjust_destination: town_adjust_destination:
; if x<32, y must be >22 ; if x<32, y must be >22
@ -62,6 +90,11 @@ done_tn_adjust:
rts rts
;=======================
; adjust bounds
;=======================
town_check_bounds:
rts
;draw_town_door: ;draw_town_door: