2020-09-25 03:33:59 +00:00
|
|
|
; 11, 22 = lookout
|
|
|
|
; 10, 24 = poster
|
|
|
|
; 25, 4 = zipline
|
2020-09-19 05:36:48 +00:00
|
|
|
|
|
|
|
map_check_exit:
|
|
|
|
lda GUYBRUSH_X
|
2020-09-19 16:07:45 +00:00
|
|
|
cmp #11
|
2020-09-25 03:33:59 +00:00
|
|
|
beq check_lookout
|
|
|
|
cmp #10
|
|
|
|
beq check_poster
|
2020-10-20 23:48:50 +00:00
|
|
|
|
|
|
|
cmp #24
|
|
|
|
beq check_zipline
|
2020-09-25 03:33:59 +00:00
|
|
|
cmp #25
|
|
|
|
beq check_zipline
|
|
|
|
|
|
|
|
rts
|
2020-09-19 05:36:48 +00:00
|
|
|
|
2020-09-25 03:33:59 +00:00
|
|
|
check_lookout:
|
2020-09-19 16:07:45 +00:00
|
|
|
lda GUYBRUSH_Y
|
|
|
|
cmp #22
|
2020-10-20 23:48:50 +00:00
|
|
|
beq map_to_lookout
|
|
|
|
cmp #24
|
|
|
|
beq map_to_lookout
|
|
|
|
jmp map_no_exit
|
2020-09-19 16:07:45 +00:00
|
|
|
map_to_lookout:
|
|
|
|
lda #MONKEY_LOOKOUT
|
2020-09-19 05:36:48 +00:00
|
|
|
sta LOCATION
|
2020-10-20 23:48:50 +00:00
|
|
|
|
|
|
|
lda #GUYBRUSH_BIG
|
|
|
|
sta GUYBRUSH_SIZE
|
|
|
|
|
2020-09-19 16:07:45 +00:00
|
|
|
lda #30
|
2020-09-19 05:36:48 +00:00
|
|
|
sta GUYBRUSH_X
|
|
|
|
sta DESTINATION_X
|
2020-09-19 16:07:45 +00:00
|
|
|
lda #14
|
2020-09-19 05:36:48 +00:00
|
|
|
sta GUYBRUSH_Y
|
2020-09-19 16:07:45 +00:00
|
|
|
lda #22
|
2020-09-19 05:36:48 +00:00
|
|
|
sta DESTINATION_Y
|
2020-09-19 16:07:45 +00:00
|
|
|
lda #DIR_DOWN
|
|
|
|
sta GUYBRUSH_DIRECTION
|
2020-09-19 05:36:48 +00:00
|
|
|
jsr change_location
|
|
|
|
|
2020-09-25 03:33:59 +00:00
|
|
|
check_poster:
|
|
|
|
lda GUYBRUSH_Y
|
|
|
|
cmp #24
|
2020-10-20 23:48:50 +00:00
|
|
|
beq map_to_poster
|
|
|
|
cmp #26
|
|
|
|
beq map_to_poster
|
|
|
|
jmp map_no_exit
|
2020-09-25 03:33:59 +00:00
|
|
|
map_to_poster:
|
|
|
|
lda #MONKEY_POSTER
|
|
|
|
sta LOCATION
|
2020-10-20 23:48:50 +00:00
|
|
|
|
|
|
|
lda #2
|
2020-09-25 03:33:59 +00:00
|
|
|
sta GUYBRUSH_X
|
|
|
|
sta DESTINATION_X
|
2020-10-20 23:48:50 +00:00
|
|
|
|
2020-09-25 03:33:59 +00:00
|
|
|
lda #20
|
|
|
|
sta GUYBRUSH_Y
|
2020-10-20 23:48:50 +00:00
|
|
|
|
|
|
|
lda #GUYBRUSH_TINY
|
|
|
|
sta GUYBRUSH_SIZE
|
|
|
|
|
|
|
|
lda #34
|
2020-09-25 03:33:59 +00:00
|
|
|
sta DESTINATION_Y
|
|
|
|
lda #DIR_DOWN
|
|
|
|
sta GUYBRUSH_DIRECTION
|
|
|
|
jsr change_location
|
|
|
|
|
|
|
|
check_zipline:
|
|
|
|
lda GUYBRUSH_Y
|
|
|
|
cmp #4
|
2020-10-20 23:48:50 +00:00
|
|
|
beq map_to_zipline
|
|
|
|
cmp #6
|
|
|
|
beq map_to_zipline
|
|
|
|
jmp map_no_exit
|
2020-09-25 03:33:59 +00:00
|
|
|
map_to_zipline:
|
|
|
|
lda #MONKEY_ZIPLINE
|
|
|
|
sta LOCATION
|
2020-10-20 23:48:50 +00:00
|
|
|
|
|
|
|
lda #GUYBRUSH_BIG
|
|
|
|
sta GUYBRUSH_SIZE
|
|
|
|
|
2020-09-25 03:33:59 +00:00
|
|
|
lda #4
|
|
|
|
sta GUYBRUSH_X
|
|
|
|
sta DESTINATION_X
|
|
|
|
lda #26
|
|
|
|
sta GUYBRUSH_Y
|
|
|
|
sta DESTINATION_Y
|
|
|
|
lda #DIR_RIGHT
|
|
|
|
sta GUYBRUSH_DIRECTION
|
|
|
|
jsr change_location
|
|
|
|
|
2020-09-19 05:36:48 +00:00
|
|
|
map_no_exit:
|
|
|
|
rts
|
|
|
|
|
2020-09-25 03:33:59 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-09-19 05:36:48 +00:00
|
|
|
map_adjust_destination:
|
|
|
|
|
2020-09-19 16:07:45 +00:00
|
|
|
; x between 6 and 30
|
|
|
|
|
|
|
|
; y between 2 and 32
|
2020-09-19 05:36:48 +00:00
|
|
|
|
|
|
|
mp_check_x:
|
|
|
|
lda DESTINATION_X
|
2020-09-19 16:07:45 +00:00
|
|
|
cmp #6
|
|
|
|
bcc mp_too_left
|
2020-09-19 05:36:48 +00:00
|
|
|
cmp #30
|
2020-09-19 16:07:45 +00:00
|
|
|
bcc mp_check_y
|
|
|
|
|
2020-09-19 05:36:48 +00:00
|
|
|
lda #30
|
2020-09-19 16:07:45 +00:00
|
|
|
sta DESTINATION_X
|
|
|
|
jmp mp_check_y
|
|
|
|
mp_too_left:
|
|
|
|
lda #6
|
|
|
|
sta DESTINATION_X
|
|
|
|
|
|
|
|
mp_check_y:
|
|
|
|
|
2020-09-19 05:36:48 +00:00
|
|
|
lda DESTINATION_Y
|
2020-09-19 16:07:45 +00:00
|
|
|
cmp #2
|
|
|
|
bcc mp_too_up
|
|
|
|
cmp #32
|
|
|
|
bcc done_mp_adjust
|
|
|
|
|
|
|
|
lda #32
|
2020-09-19 05:36:48 +00:00
|
|
|
sta DESTINATION_Y
|
|
|
|
jmp done_mp_adjust
|
2020-09-19 16:07:45 +00:00
|
|
|
mp_too_up:
|
|
|
|
lda #2
|
|
|
|
sta DESTINATION_Y
|
2020-09-19 05:36:48 +00:00
|
|
|
|
|
|
|
done_mp_adjust:
|
|
|
|
rts
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;draw_map_door:
|
|
|
|
;
|
|
|
|
; lda BAR_DOOR_OPEN
|
|
|
|
; beq done_draw_map_door
|
|
|
|
|
|
|
|
; lda #<door_sprite
|
|
|
|
; sta INL
|
|
|
|
; lda #>door_sprite
|
|
|
|
; sta INH
|
|
|
|
|
|
|
|
; lda #11
|
|
|
|
; sta XPOS
|
|
|
|
; lda #22
|
|
|
|
; sta YPOS
|
|
|
|
|
|
|
|
; jsr put_sprite_crop
|
|
|
|
;done_draw_map_door:
|
|
|
|
; rts
|
|
|
|
|
2020-10-01 19:07:02 +00:00
|
|
|
map_check_bounds:
|
|
|
|
rts
|