mirror of
https://github.com/deater/dos33fsprogs.git
synced 2024-08-02 04:29:08 +00:00
monkey: start hooking up new areas
This commit is contained in:
parent
7f7bd77a0e
commit
65682ccf05
@ -58,7 +58,9 @@ monkey.o: monkey.s zp.inc hardware.inc common_defines.inc \
|
||||
monkey_actions.s update_bottom.s \
|
||||
guy.brush \
|
||||
monkey_lookout.s monkey_poster.s monkey_dock.s monkey_bar.s \
|
||||
monkey_town.s monkey_map.s
|
||||
monkey_town.s monkey_map.s monkey_church.s monkey_mansion_path.s \
|
||||
monkey_mansion.s monkey_zipline.s \
|
||||
monkey_bar_inside1.s monkey_bar_inside2.s
|
||||
ca65 -o monkey.o monkey.s -l monkey.lst
|
||||
|
||||
graphics/graphics.inc:
|
||||
|
@ -1,7 +1,10 @@
|
||||
game:
|
||||
+ click on verbs
|
||||
+ actions for all the nouns
|
||||
overall:
|
||||
+ have big/small/tiny guybrush
|
||||
+ better bounds checking on paths
|
||||
|
||||
zipline:
|
||||
+ animate the sign
|
||||
+ if you use pole you climb the ladder
|
||||
|
||||
|
||||
bigger changes:
|
||||
|
@ -12,11 +12,6 @@ VERB_PUSH = 7
|
||||
VERB_PULL = 8
|
||||
VERB_WALK = 9
|
||||
|
||||
GUYBRUSH_BIG = 0
|
||||
GUYBRUSH_SMALL = 1
|
||||
GUYBRUSH_TINY = 2
|
||||
|
||||
|
||||
;===============================================
|
||||
; level data structure definitions
|
||||
;===============================================
|
||||
|
@ -428,40 +428,42 @@ destination_y_is_positive:
|
||||
and #$FE ; has to be even
|
||||
sta DESTINATION_Y
|
||||
|
||||
set_destination_smc:
|
||||
jsr $0000
|
||||
|
||||
; FIXME: this should be a jump table
|
||||
lda LOCATION
|
||||
cmp #MONKEY_LOOKOUT
|
||||
beq set_destination_lookout
|
||||
cmp #MONKEY_POSTER
|
||||
beq set_destination_poster
|
||||
cmp #MONKEY_DOCK
|
||||
beq set_destination_dock
|
||||
cmp #MONKEY_BAR
|
||||
beq set_destination_bar
|
||||
cmp #MONKEY_TOWN
|
||||
beq set_destination_town
|
||||
cmp #MONKEY_MAP
|
||||
beq set_destination_map
|
||||
; lda LOCATION
|
||||
; cmp #MONKEY_LOOKOUT
|
||||
; beq set_destination_lookout
|
||||
; cmp #MONKEY_POSTER
|
||||
; beq set_destination_poster
|
||||
; cmp #MONKEY_DOCK
|
||||
; beq set_destination_dock
|
||||
; cmp #MONKEY_BAR
|
||||
; beq set_destination_bar
|
||||
; cmp #MONKEY_TOWN
|
||||
; beq set_destination_town
|
||||
; cmp #MONKEY_MAP
|
||||
; beq set_destination_map
|
||||
|
||||
set_destination_lookout:
|
||||
jsr lookout_adjust_destination
|
||||
jmp done_set_destination
|
||||
set_destination_poster:
|
||||
jsr poster_adjust_destination
|
||||
jmp done_set_destination
|
||||
set_destination_dock:
|
||||
jsr dock_adjust_destination
|
||||
jmp done_set_destination
|
||||
set_destination_bar:
|
||||
jsr bar_adjust_destination
|
||||
jmp done_set_destination
|
||||
set_destination_town:
|
||||
jsr town_adjust_destination
|
||||
jmp done_set_destination
|
||||
set_destination_map:
|
||||
jsr map_adjust_destination
|
||||
jmp done_set_destination
|
||||
;set_destination_lookout:
|
||||
; jsr lookout_adjust_destination
|
||||
; jmp done_set_destination
|
||||
;set_destination_poster:
|
||||
; jsr poster_adjust_destination
|
||||
; jmp done_set_destination
|
||||
;set_destination_dock:
|
||||
; jsr dock_adjust_destination
|
||||
; jmp done_set_destination
|
||||
;set_destination_bar:
|
||||
; jsr bar_adjust_destination
|
||||
; jmp done_set_destination
|
||||
;set_destination_town:
|
||||
; jsr town_adjust_destination
|
||||
; jmp done_set_destination
|
||||
;set_destination_map:
|
||||
; jsr map_adjust_destination
|
||||
; jmp done_set_destination
|
||||
|
||||
|
||||
done_set_destination:
|
||||
@ -478,10 +480,12 @@ change_location:
|
||||
; reset graphics
|
||||
bit SET_GR
|
||||
|
||||
; reset pointer to not visible, centered
|
||||
; reset pointer to not visible
|
||||
lda #0
|
||||
sta ANIMATE_FRAME
|
||||
sta CURSOR_VISIBLE
|
||||
|
||||
; don't center?
|
||||
; lda #20
|
||||
; sta CURSOR_X
|
||||
; sta CURSOR_Y
|
||||
@ -500,10 +504,31 @@ change_location:
|
||||
sta LOCATION_STRUCT_H
|
||||
|
||||
|
||||
;==========================
|
||||
; update level info
|
||||
|
||||
ldy #LOCATION_DESTINATION
|
||||
lda (LOCATION_STRUCT_L),Y
|
||||
sta set_destination_smc+1
|
||||
iny
|
||||
lda (LOCATION_STRUCT_L),Y
|
||||
sta set_destination_smc+2
|
||||
|
||||
ldy #LOCATION_EXIT
|
||||
lda (LOCATION_STRUCT_L),Y
|
||||
sta check_exit_smc+1
|
||||
iny
|
||||
lda (LOCATION_STRUCT_L),Y
|
||||
sta check_exit_smc+2
|
||||
|
||||
ldy #LOCATION_SIZE
|
||||
lda (LOCATION_STRUCT_L),Y
|
||||
sta GUYBRUSH_SIZE
|
||||
|
||||
;==========================
|
||||
; load new background
|
||||
|
||||
ldy #0
|
||||
ldy #LOCATION_BACKGROUND
|
||||
|
||||
lda (LOCATION_STRUCT_L),Y
|
||||
sta LZSA_SRC_LO
|
||||
|
@ -11,8 +11,8 @@ locations:
|
||||
; MONKEY_LOOKOUT -- lookout tower
|
||||
location0:
|
||||
.word lookout_lzsa ; background
|
||||
.word set_destination_lookout-1 ; destination
|
||||
.word check_exit_lookout-1 ; exit
|
||||
.word lookout_adjust_destination ; destination
|
||||
.word lookout_check_exit ; exit
|
||||
.byte GUYBRUSH_BIG ; size
|
||||
.byte 3 ; num areas
|
||||
|
||||
@ -34,8 +34,8 @@ location0:
|
||||
; MONKEY_POSTER -- house with poster
|
||||
location1:
|
||||
.word poster_lzsa ; background
|
||||
.word set_destination_lookout-1 ; destination
|
||||
.word check_exit_lookout-1 ; exit
|
||||
.word poster_adjust_destination ; destination
|
||||
.word poster_check_exit ; exit
|
||||
.byte GUYBRUSH_BIG ; size
|
||||
.byte 2 ; num areas
|
||||
|
||||
@ -52,8 +52,8 @@ location1:
|
||||
; MONKEY_DOCK -- dock
|
||||
location2:
|
||||
.word dock_lzsa ; background
|
||||
.word set_destination_lookout-1 ; destination
|
||||
.word check_exit_lookout-1 ; exit
|
||||
.word dock_adjust_destination ; destination
|
||||
.word dock_check_exit ; exit
|
||||
.byte GUYBRUSH_BIG ; size
|
||||
.byte 1 ; num areas
|
||||
|
||||
@ -65,8 +65,8 @@ location2:
|
||||
; MONKEY_BAR -- scumm bar
|
||||
location3:
|
||||
.word bar_lzsa ; background
|
||||
.word set_destination_lookout-1 ; destination
|
||||
.word check_exit_lookout-1 ; exit
|
||||
.word bar_adjust_destination ; destination
|
||||
.word bar_check_exit ; exit
|
||||
.byte GUYBRUSH_BIG ; size
|
||||
.byte 1 ; num areas
|
||||
|
||||
@ -78,8 +78,8 @@ location3:
|
||||
; MONKEY_TOWN -- downtown
|
||||
location4:
|
||||
.word town_lzsa ; background
|
||||
.word set_destination_lookout-1 ; destination
|
||||
.word check_exit_lookout-1 ; exit
|
||||
.word town_adjust_destination ; destination
|
||||
.word town_check_exit ; exit
|
||||
.byte GUYBRUSH_BIG ; size
|
||||
.byte 8 ; num areas
|
||||
|
||||
@ -127,8 +127,8 @@ location4:
|
||||
; MONKEY_MAP -- melee map
|
||||
location5:
|
||||
.word map_lzsa ; background
|
||||
.word set_destination_lookout-1 ; destination
|
||||
.word check_exit_lookout-1 ; exit
|
||||
.word map_adjust_destination ; destination
|
||||
.word map_check_exit ; exit
|
||||
.byte GUYBRUSH_TINY ; size
|
||||
.byte 7 ; num areas
|
||||
|
||||
@ -171,8 +171,8 @@ location5:
|
||||
; MONKEY_BAR_INSIDE1 -- inside bar, lots going on
|
||||
location6:
|
||||
.word bar_inside1_lzsa ; background
|
||||
.word set_destination_lookout-1 ; destination
|
||||
.word check_exit_lookout-1 ; exit
|
||||
.word bar_inside1_adjust_destination ; destination
|
||||
.word bar_inside1_check_exit ; exit
|
||||
.byte GUYBRUSH_BIG ; size
|
||||
.byte 4 ; num areas
|
||||
|
||||
@ -200,8 +200,8 @@ location6:
|
||||
; MONKEY_BAR_INSIDE2 -- three pirates
|
||||
location7:
|
||||
.word bar_inside2_lzsa ; background
|
||||
.word set_destination_lookout-1 ; destination
|
||||
.word check_exit_lookout-1 ; exit
|
||||
.word bar_inside2_adjust_destination ; destination
|
||||
.word bar_inside2_check_exit ; exit
|
||||
.byte GUYBRUSH_BIG ; size
|
||||
.byte 4 ; num areas
|
||||
|
||||
@ -228,8 +228,8 @@ location7:
|
||||
; MONKEY_CHURCH -- outside the church
|
||||
location8:
|
||||
.word church_lzsa ; background
|
||||
.word set_destination_lookout-1 ; destination
|
||||
.word check_exit_lookout-1 ; exit
|
||||
.word church_adjust_destination ; destination
|
||||
.word church_check_exit ; exit
|
||||
.byte GUYBRUSH_BIG ; size
|
||||
.byte 1 ; num areas
|
||||
|
||||
@ -241,8 +241,8 @@ location8:
|
||||
; MONKEY_MANSION_PATH -- path to the mansion
|
||||
location9:
|
||||
.word mansion_path_lzsa ; background
|
||||
.word set_destination_lookout-1 ; destination
|
||||
.word check_exit_lookout-1 ; exit
|
||||
.word mansion_path_adjust_destination ; destination
|
||||
.word mansion_path_check_exit ; exit
|
||||
.byte GUYBRUSH_BIG ; size
|
||||
.byte 1 ; num areas
|
||||
|
||||
@ -254,8 +254,8 @@ location9:
|
||||
; MONKEY_MANSION -- governor's mansion
|
||||
location10:
|
||||
.word mansion_lzsa ; background
|
||||
.word set_destination_lookout-1 ; destination
|
||||
.word check_exit_lookout-1 ; exit
|
||||
.word mansion_adjust_destination ; destination
|
||||
.word mansion_check_exit ; exit
|
||||
.byte GUYBRUSH_BIG ; size
|
||||
.byte 1 ; num areas
|
||||
|
||||
@ -267,20 +267,46 @@ location10:
|
||||
; MONKEY_ZIPLINE -- hook's zipline
|
||||
location11:
|
||||
.word zipline_lzsa ; background
|
||||
.word set_destination_lookout-1 ; destination
|
||||
.word check_exit_lookout-1 ; exit
|
||||
.word zipline_adjust_destination ; destination
|
||||
.word zipline_check_exit ; exit
|
||||
.byte GUYBRUSH_BIG ; size
|
||||
.byte 1 ; num areas
|
||||
.byte 3 ; num areas
|
||||
|
||||
.byte 9,14 ; x
|
||||
.byte 20,32 ; y
|
||||
.word door_string ; name
|
||||
.word door_action-1 ; action
|
||||
.byte 30,36 ; x
|
||||
.byte 10,36 ; y
|
||||
.word pole_string ; name
|
||||
.word pole_action-1 ; action
|
||||
|
||||
.byte 19,30 ; x
|
||||
.byte 4,16 ; y
|
||||
.word cable_string ; name
|
||||
.word cable_action-1 ; action
|
||||
|
||||
.byte 0,15 ; x
|
||||
.byte 4,28 ; y
|
||||
.word sign_string ; name
|
||||
.word sign_action-1 ; action
|
||||
|
||||
; common strings
|
||||
|
||||
door_string: .byte 20,20,"DOOR",0
|
||||
|
||||
|
||||
; zipline strings
|
||||
pole_string: .byte 20,20,"POLE",0
|
||||
cable_string: .byte 20,20,"CABLE",0
|
||||
sign_string: .byte 20,20,"SIGN",0
|
||||
|
||||
|
||||
|
||||
; lookout strings
|
||||
|
||||
lookout_string: .byte 20,20,"LOOKOUT",0
|
||||
path_string: .byte 20,20,"PATH",0
|
||||
stairs_string: .byte 20,20,"STAIRS",0
|
||||
|
||||
; map strings
|
||||
|
||||
string_data:
|
||||
house_string: .byte 18,20,"HOUSE",0
|
||||
lights_string: .byte 17,20,"LIGHTS",0
|
||||
clearing_string:.byte 16,20,"CLEARING",0
|
||||
@ -289,21 +315,22 @@ shore_string: .byte 18,20,"SHORE",0
|
||||
lookout_point_string: .byte 13,20,"LOOKOUT POINT",0
|
||||
village_string: .byte 16,20,"VILLAGE",0
|
||||
|
||||
; inside_bar2 strings
|
||||
|
||||
curtain_string: .byte 20,20,"CURTAIN",0
|
||||
impt_pirate_string: .byte 20,20,"IMPORTANT PIRATES",0
|
||||
fireplace_string: .byte 20,20,"FIREPLACE",0
|
||||
|
||||
lookout_string: .byte 20,20,"LOOKOUT",0
|
||||
path_string: .byte 20,20,"PATH",0
|
||||
stairs_string: .byte 20,20,"STAIRS",0
|
||||
; poster strings
|
||||
|
||||
cliffside_string: .byte 20,20,"CLIFFSIDE",0
|
||||
poster_string: .byte 20,20,"POSTER",0
|
||||
poster_string: .byte 20,20,"POSTER",0
|
||||
|
||||
; dock strings
|
||||
|
||||
moon_string: .byte 20,20,"MOON",0
|
||||
|
||||
door_string: .byte 20,20,"DOOR",0
|
||||
; town strings
|
||||
|
||||
archway_string: .byte 20,20,"ARCHWAY",0
|
||||
clock_string: .byte 20,20,"CLOCK",0
|
||||
|
@ -50,8 +50,8 @@ monkey_start:
|
||||
|
||||
; set up initial location
|
||||
|
||||
lda #MONKEY_BAR_INSIDE2
|
||||
; lda #MONKEY_LOOKOUT
|
||||
; lda #MONKEY_BAR_INSIDE2
|
||||
lda #MONKEY_LOOKOUT
|
||||
sta LOCATION
|
||||
|
||||
jsr change_location
|
||||
@ -260,40 +260,41 @@ nothing_foreground:
|
||||
; check if exiting room
|
||||
;====================================
|
||||
|
||||
; FIXME: this should be a jump table
|
||||
check_exit_smc:
|
||||
jsr $0000
|
||||
|
||||
lda LOCATION
|
||||
cmp #MONKEY_LOOKOUT
|
||||
beq check_exit_lookout
|
||||
cmp #MONKEY_POSTER
|
||||
beq check_exit_poster
|
||||
cmp #MONKEY_DOCK
|
||||
beq check_exit_dock
|
||||
cmp #MONKEY_BAR
|
||||
beq check_exit_bar
|
||||
cmp #MONKEY_TOWN
|
||||
beq check_exit_town
|
||||
cmp #MONKEY_MAP
|
||||
beq check_exit_map
|
||||
; lda LOCATION
|
||||
; cmp #MONKEY_LOOKOUT
|
||||
; beq check_exit_lookout
|
||||
; cmp #MONKEY_POSTER
|
||||
; beq check_exit_poster
|
||||
; cmp #MONKEY_DOCK
|
||||
; beq check_exit_dock
|
||||
; cmp #MONKEY_BAR
|
||||
; beq check_exit_bar
|
||||
; cmp #MONKEY_TOWN
|
||||
; beq check_exit_town
|
||||
; cmp #MONKEY_MAP
|
||||
; beq check_exit_map
|
||||
|
||||
check_exit_lookout:
|
||||
jsr lookout_check_exit
|
||||
jmp done_check_exit
|
||||
check_exit_poster:
|
||||
jsr poster_check_exit
|
||||
jmp done_check_exit
|
||||
check_exit_dock:
|
||||
jsr dock_check_exit
|
||||
jmp done_check_exit
|
||||
check_exit_bar:
|
||||
jsr bar_check_exit
|
||||
jmp done_check_exit
|
||||
check_exit_town:
|
||||
jsr town_check_exit
|
||||
jmp done_check_exit
|
||||
check_exit_map:
|
||||
jsr map_check_exit
|
||||
jmp done_check_exit
|
||||
;check_exit_lookout:
|
||||
; jsr lookout_check_exit
|
||||
; jmp done_check_exit
|
||||
;check_exit_poster:
|
||||
; jsr poster_check_exit
|
||||
; jmp done_check_exit
|
||||
;check_exit_dock:
|
||||
; jsr dock_check_exit
|
||||
; jmp done_check_exit
|
||||
;check_exit_bar:
|
||||
; jsr bar_check_exit
|
||||
; jmp done_check_exit
|
||||
;check_exit_town:
|
||||
; jsr town_check_exit
|
||||
; jmp done_check_exit
|
||||
;check_exit_map:
|
||||
; jsr map_check_exit
|
||||
; jmp done_check_exit
|
||||
|
||||
done_check_exit:
|
||||
;====================================
|
||||
@ -343,12 +344,20 @@ really_exit:
|
||||
.include "common_sprites.inc"
|
||||
.include "guy.brush"
|
||||
|
||||
; Locations
|
||||
|
||||
.include "monkey_lookout.s"
|
||||
.include "monkey_poster.s"
|
||||
.include "monkey_dock.s"
|
||||
.include "monkey_bar.s"
|
||||
.include "monkey_town.s"
|
||||
.include "monkey_map.s"
|
||||
.include "monkey_church.s"
|
||||
.include "monkey_zipline.s"
|
||||
.include "monkey_mansion.s"
|
||||
.include "monkey_mansion_path.s"
|
||||
.include "monkey_bar_inside1.s"
|
||||
.include "monkey_bar_inside2.s"
|
||||
|
||||
.include "monkey_actions.s"
|
||||
.include "update_bottom.s"
|
||||
|
83
monkey/monkey_bar_inside1.s
Normal file
83
monkey/monkey_bar_inside1.s
Normal file
@ -0,0 +1,83 @@
|
||||
; stuff regarding 1st room in scumm bar
|
||||
|
||||
; if x<4 goto MONKEY_POSTER at 28,20
|
||||
; if x>35 goto MONKEY_BAR at 5,20
|
||||
|
||||
bar_inside1_check_exit:
|
||||
|
||||
lda GUYBRUSH_X
|
||||
cmp #4
|
||||
bcc bar_inside1_to_poster
|
||||
cmp #35
|
||||
bcs bar_inside1_to_bar
|
||||
bcc bar_inside1_no_exit
|
||||
|
||||
bar_inside1_to_poster:
|
||||
lda #MONKEY_POSTER
|
||||
sta LOCATION
|
||||
lda #34
|
||||
sta GUYBRUSH_X
|
||||
sta DESTINATION_X
|
||||
lda #20
|
||||
sta GUYBRUSH_Y
|
||||
sta DESTINATION_Y
|
||||
jsr change_location
|
||||
jmp bar_inside1_no_exit
|
||||
|
||||
bar_inside1_to_bar:
|
||||
lda #MONKEY_BAR
|
||||
sta LOCATION
|
||||
lda #5
|
||||
sta GUYBRUSH_X
|
||||
sta DESTINATION_X
|
||||
lda #20
|
||||
sta GUYBRUSH_Y
|
||||
sta DESTINATION_Y
|
||||
jsr change_location
|
||||
jmp bar_inside1_no_exit
|
||||
|
||||
bar_inside1_no_exit:
|
||||
rts
|
||||
|
||||
|
||||
|
||||
;==========================
|
||||
;==========================
|
||||
; bar_inside1 adjust destination
|
||||
;==========================
|
||||
;==========================
|
||||
bar_inside1_adjust_destination:
|
||||
; just make Y always 20
|
||||
|
||||
mb1_check_y:
|
||||
; if x < 28, Y must be between 16 and 18
|
||||
; if x < 35, Y must be between 8 and 28
|
||||
|
||||
mb1_y_too_small:
|
||||
lda #20
|
||||
sta DESTINATION_Y
|
||||
|
||||
done_mb1_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:
|
||||
|
83
monkey/monkey_bar_inside2.s
Normal file
83
monkey/monkey_bar_inside2.s
Normal file
@ -0,0 +1,83 @@
|
||||
; stuff regarding 2nd room of scumm bar
|
||||
|
||||
; if x<4 goto MONKEY_POSTER at 28,20
|
||||
; if x>35 goto MONKEY_BAR at 5,20
|
||||
|
||||
bar_inside2_check_exit:
|
||||
|
||||
lda GUYBRUSH_X
|
||||
cmp #4
|
||||
bcc bar_inside2_to_poster
|
||||
cmp #35
|
||||
bcs bar_inside2_to_bar
|
||||
bcc bar_inside2_no_exit
|
||||
|
||||
bar_inside2_to_poster:
|
||||
lda #MONKEY_POSTER
|
||||
sta LOCATION
|
||||
lda #34
|
||||
sta GUYBRUSH_X
|
||||
sta DESTINATION_X
|
||||
lda #20
|
||||
sta GUYBRUSH_Y
|
||||
sta DESTINATION_Y
|
||||
jsr change_location
|
||||
jmp bar_inside2_no_exit
|
||||
|
||||
bar_inside2_to_bar:
|
||||
lda #MONKEY_BAR
|
||||
sta LOCATION
|
||||
lda #5
|
||||
sta GUYBRUSH_X
|
||||
sta DESTINATION_X
|
||||
lda #20
|
||||
sta GUYBRUSH_Y
|
||||
sta DESTINATION_Y
|
||||
jsr change_location
|
||||
jmp bar_inside2_no_exit
|
||||
|
||||
bar_inside2_no_exit:
|
||||
rts
|
||||
|
||||
|
||||
|
||||
;==========================
|
||||
;==========================
|
||||
; bar_inside2 adjust destination
|
||||
;==========================
|
||||
;==========================
|
||||
bar_inside2_adjust_destination:
|
||||
; just make Y always 20
|
||||
|
||||
mb2_check_y:
|
||||
; if x < 28, Y must be between 16 and 18
|
||||
; if x < 35, Y must be between 8 and 28
|
||||
|
||||
mb2_y_too_small:
|
||||
lda #20
|
||||
sta DESTINATION_Y
|
||||
|
||||
done_mb2_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:
|
||||
|
84
monkey/monkey_church.s
Normal file
84
monkey/monkey_church.s
Normal file
@ -0,0 +1,84 @@
|
||||
; stuff regarding the church
|
||||
|
||||
|
||||
; if x<4 goto MONKEY_POSTER at 28,20
|
||||
; if x>35 goto MONKEY_BAR at 5,20
|
||||
|
||||
church_check_exit:
|
||||
|
||||
lda GUYBRUSH_X
|
||||
cmp #4
|
||||
bcc church_to_poster
|
||||
cmp #35
|
||||
bcs church_to_bar
|
||||
bcc church_no_exit
|
||||
|
||||
church_to_poster:
|
||||
lda #MONKEY_POSTER
|
||||
sta LOCATION
|
||||
lda #34
|
||||
sta GUYBRUSH_X
|
||||
sta DESTINATION_X
|
||||
lda #20
|
||||
sta GUYBRUSH_Y
|
||||
sta DESTINATION_Y
|
||||
jsr change_location
|
||||
jmp church_no_exit
|
||||
|
||||
church_to_bar:
|
||||
lda #MONKEY_BAR
|
||||
sta LOCATION
|
||||
lda #5
|
||||
sta GUYBRUSH_X
|
||||
sta DESTINATION_X
|
||||
lda #20
|
||||
sta GUYBRUSH_Y
|
||||
sta DESTINATION_Y
|
||||
jsr change_location
|
||||
jmp church_no_exit
|
||||
|
||||
church_no_exit:
|
||||
rts
|
||||
|
||||
|
||||
|
||||
;==========================
|
||||
;==========================
|
||||
; church adjust destination
|
||||
;==========================
|
||||
;==========================
|
||||
church_adjust_destination:
|
||||
; just make Y always 20
|
||||
|
||||
ch_check_y:
|
||||
; if x < 28, Y must be between 16 and 18
|
||||
; if x < 35, Y must be between 8 and 28
|
||||
|
||||
ch_y_too_small:
|
||||
lda #20
|
||||
sta DESTINATION_Y
|
||||
|
||||
done_ch_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:
|
||||
|
83
monkey/monkey_mansion.s
Normal file
83
monkey/monkey_mansion.s
Normal file
@ -0,0 +1,83 @@
|
||||
; stuff regarding the governor's mansion
|
||||
|
||||
; if x<4 goto MONKEY_POSTER at 28,20
|
||||
; if x>35 goto MONKEY_BAR at 5,20
|
||||
|
||||
mansion_check_exit:
|
||||
|
||||
lda GUYBRUSH_X
|
||||
cmp #4
|
||||
bcc mansion_to_poster
|
||||
cmp #35
|
||||
bcs mansion_to_bar
|
||||
bcc mansion_no_exit
|
||||
|
||||
mansion_to_poster:
|
||||
lda #MONKEY_POSTER
|
||||
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
|
||||
lda #5
|
||||
sta GUYBRUSH_X
|
||||
sta DESTINATION_X
|
||||
lda #20
|
||||
sta GUYBRUSH_Y
|
||||
sta DESTINATION_Y
|
||||
jsr change_location
|
||||
jmp mansion_no_exit
|
||||
|
||||
mansion_no_exit:
|
||||
rts
|
||||
|
||||
|
||||
|
||||
;==========================
|
||||
;==========================
|
||||
; mansion adjust destination
|
||||
;==========================
|
||||
;==========================
|
||||
mansion_adjust_destination:
|
||||
; just make Y always 20
|
||||
|
||||
mn_check_y:
|
||||
; if x < 28, Y must be between 16 and 18
|
||||
; if x < 35, Y must be between 8 and 28
|
||||
|
||||
mn_y_too_small:
|
||||
lda #20
|
||||
sta DESTINATION_Y
|
||||
|
||||
done_mn_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:
|
||||
|
84
monkey/monkey_mansion_path.s
Normal file
84
monkey/monkey_mansion_path.s
Normal file
@ -0,0 +1,84 @@
|
||||
; stuff regarding path to mansion
|
||||
|
||||
|
||||
; if x<4 goto MONKEY_POSTER at 28,20
|
||||
; if x>35 goto MONKEY_BAR at 5,20
|
||||
|
||||
mansion_path_check_exit:
|
||||
|
||||
lda GUYBRUSH_X
|
||||
cmp #4
|
||||
bcc mansion_path_to_poster
|
||||
cmp #35
|
||||
bcs mansion_path_to_bar
|
||||
bcc mansion_path_no_exit
|
||||
|
||||
mansion_path_to_poster:
|
||||
lda #MONKEY_POSTER
|
||||
sta LOCATION
|
||||
lda #34
|
||||
sta GUYBRUSH_X
|
||||
sta DESTINATION_X
|
||||
lda #20
|
||||
sta GUYBRUSH_Y
|
||||
sta DESTINATION_Y
|
||||
jsr change_location
|
||||
jmp mansion_path_no_exit
|
||||
|
||||
mansion_path_to_bar:
|
||||
lda #MONKEY_BAR
|
||||
sta LOCATION
|
||||
lda #5
|
||||
sta GUYBRUSH_X
|
||||
sta DESTINATION_X
|
||||
lda #20
|
||||
sta GUYBRUSH_Y
|
||||
sta DESTINATION_Y
|
||||
jsr change_location
|
||||
jmp mansion_path_no_exit
|
||||
|
||||
mansion_path_no_exit:
|
||||
rts
|
||||
|
||||
|
||||
|
||||
;==========================
|
||||
;==========================
|
||||
; mansion_path adjust destination
|
||||
;==========================
|
||||
;==========================
|
||||
mansion_path_adjust_destination:
|
||||
; just make Y always 20
|
||||
|
||||
mh_check_y:
|
||||
; if x < 28, Y must be between 16 and 18
|
||||
; if x < 35, Y must be between 8 and 28
|
||||
|
||||
mh_y_too_small:
|
||||
lda #20
|
||||
sta DESTINATION_Y
|
||||
|
||||
done_mh_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:
|
||||
|
@ -1,13 +1,22 @@
|
||||
; 11, 22 = lookout
|
||||
; 10, 24 = poster
|
||||
; 25, 4 = zipline
|
||||
|
||||
map_check_exit:
|
||||
lda GUYBRUSH_X
|
||||
cmp #11
|
||||
bne map_no_exit
|
||||
beq check_lookout
|
||||
cmp #10
|
||||
beq check_poster
|
||||
cmp #25
|
||||
beq check_zipline
|
||||
|
||||
rts
|
||||
|
||||
check_lookout:
|
||||
lda GUYBRUSH_Y
|
||||
cmp #22
|
||||
bne map_no_exit
|
||||
|
||||
map_to_lookout:
|
||||
lda #MONKEY_LOOKOUT
|
||||
sta LOCATION
|
||||
@ -22,9 +31,48 @@ map_to_lookout:
|
||||
sta GUYBRUSH_DIRECTION
|
||||
jsr change_location
|
||||
|
||||
check_poster:
|
||||
lda GUYBRUSH_Y
|
||||
cmp #24
|
||||
bne map_no_exit
|
||||
map_to_poster:
|
||||
lda #MONKEY_POSTER
|
||||
sta LOCATION
|
||||
lda #4
|
||||
sta GUYBRUSH_X
|
||||
sta DESTINATION_X
|
||||
lda #20
|
||||
sta GUYBRUSH_Y
|
||||
sta DESTINATION_Y
|
||||
lda #DIR_DOWN
|
||||
sta GUYBRUSH_DIRECTION
|
||||
jsr change_location
|
||||
|
||||
check_zipline:
|
||||
lda GUYBRUSH_Y
|
||||
cmp #4
|
||||
bne map_no_exit
|
||||
map_to_zipline:
|
||||
lda #MONKEY_ZIPLINE
|
||||
sta LOCATION
|
||||
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
|
||||
|
||||
map_no_exit:
|
||||
rts
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
map_adjust_destination:
|
||||
|
||||
; x between 6 and 30
|
||||
|
175
monkey/monkey_zipline.s
Normal file
175
monkey/monkey_zipline.s
Normal file
@ -0,0 +1,175 @@
|
||||
; stuff regarding the zipline
|
||||
|
||||
; if x<4 goto MONKEY_MAP at 23,4
|
||||
|
||||
zipline_check_exit:
|
||||
|
||||
lda GUYBRUSH_X
|
||||
cmp #4
|
||||
bcc zipline_to_map
|
||||
bcs zipline_no_exit
|
||||
|
||||
zipline_to_map:
|
||||
lda #MONKEY_MAP
|
||||
sta LOCATION
|
||||
lda #23
|
||||
sta GUYBRUSH_X
|
||||
sta DESTINATION_X
|
||||
lda #4
|
||||
sta GUYBRUSH_Y
|
||||
sta DESTINATION_Y
|
||||
jsr change_location
|
||||
|
||||
zipline_no_exit:
|
||||
rts
|
||||
|
||||
|
||||
|
||||
;==========================
|
||||
;==========================
|
||||
; zipline adjust destination
|
||||
;==========================
|
||||
;==========================
|
||||
zipline_adjust_destination:
|
||||
; just make Y always 26
|
||||
|
||||
zp_check_y:
|
||||
|
||||
zp_y_too_small:
|
||||
lda #26
|
||||
sta DESTINATION_Y
|
||||
|
||||
done_zp_adjust:
|
||||
rts
|
||||
|
||||
|
||||
|
||||
|
||||
;draw_sign:
|
||||
|
||||
; 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:
|
||||
|
||||
;=============================
|
||||
|
||||
sign_action:
|
||||
lda CURRENT_VERB
|
||||
asl
|
||||
tay
|
||||
|
||||
lda sign_actions,Y
|
||||
cmp #$ff
|
||||
beq sign_nothing
|
||||
|
||||
sta MESSAGE_L
|
||||
lda sign_actions+1,Y
|
||||
sta MESSAGE_H
|
||||
|
||||
jmp do_display_message
|
||||
|
||||
sign_nothing:
|
||||
lda #VERB_WALK
|
||||
sta CURRENT_VERB
|
||||
rts
|
||||
|
||||
|
||||
sign_actions:
|
||||
.word $FFFF ; give
|
||||
.word doesnt_open ; open
|
||||
.word doesnt_work ; close
|
||||
.word cant_pick_up ; pick_up
|
||||
.word sign_look ; look_at
|
||||
.word $FFFF ; talk_to
|
||||
.word doesnt_work ; use
|
||||
.word icant_move ; push
|
||||
.word icant_move ; pull
|
||||
|
||||
|
||||
|
||||
sign_look: .byte 2,21,"GAUDY BUT IN A CHEERFUL SORT OF WAY",0
|
||||
|
||||
;=============================
|
||||
|
||||
cable_action:
|
||||
lda CURRENT_VERB
|
||||
asl
|
||||
tay
|
||||
|
||||
lda cable_actions,Y
|
||||
cmp #$ff
|
||||
beq cable_nothing
|
||||
|
||||
sta MESSAGE_L
|
||||
lda cable_actions+1,Y
|
||||
sta MESSAGE_H
|
||||
|
||||
jmp do_display_message
|
||||
|
||||
cable_nothing:
|
||||
lda #VERB_WALK
|
||||
sta CURRENT_VERB
|
||||
rts
|
||||
|
||||
|
||||
cable_actions:
|
||||
.word $FFFF ; give
|
||||
.word doesnt_open ; open
|
||||
.word doesnt_work ; close
|
||||
.word cant_pick_up ; pick_up
|
||||
.word cable_look ; look_at
|
||||
.word $FFFF ; talk_to
|
||||
.word $FFFF ; use
|
||||
.word icant_move ; push
|
||||
.word icant_move ; pull
|
||||
|
||||
cable_look: .byte 1,21,"HMM I THINK IT COULD SUPPORT MY WEIGHT",0
|
||||
|
||||
;=============================
|
||||
|
||||
pole_action:
|
||||
lda CURRENT_VERB
|
||||
asl
|
||||
tay
|
||||
|
||||
lda pole_actions,Y
|
||||
cmp #$ff
|
||||
beq pole_nothing
|
||||
|
||||
sta MESSAGE_L
|
||||
lda pole_actions+1,Y
|
||||
sta MESSAGE_H
|
||||
|
||||
jmp do_display_message
|
||||
|
||||
pole_nothing:
|
||||
lda #VERB_WALK
|
||||
sta CURRENT_VERB
|
||||
rts
|
||||
|
||||
|
||||
pole_actions:
|
||||
.word $FFFF ; give
|
||||
.word doesnt_open ; open
|
||||
.word doesnt_work ; close
|
||||
.word cant_pick_up ; pick_up
|
||||
.word pole_look ; look_at
|
||||
.word $FFFF ; talk_to
|
||||
.word $FFFF ; use ; FIXME, use pool climbs ladder
|
||||
.word icant_move ; push
|
||||
.word icant_move ; pull
|
||||
|
||||
|
||||
pole_look: .byte 6,21,"IT'S JUST LIKE THE OTHER ONE",0
|
@ -110,6 +110,11 @@ DISPLAY_MESSAGE = $95
|
||||
MESSAGE_L = $96
|
||||
MESSAGE_H = $97
|
||||
|
||||
GUYBRUSH_SIZE = $98
|
||||
GUYBRUSH_BIG = 0
|
||||
GUYBRUSH_SMALL = 1
|
||||
GUYBRUSH_TINY = 2
|
||||
|
||||
; done game puzzle state
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user