mirror of
https://github.com/deater/dos33fsprogs.git
synced 2025-02-05 21:34:30 +00:00
monkey: updating the screen
This commit is contained in:
parent
798c5229ca
commit
dd04a20ff4
@ -29,7 +29,9 @@ monkey.o: monkey.s zp.inc hardware.inc common_defines.inc \
|
||||
draw_pointer.s \
|
||||
common_sprites.inc \
|
||||
keyboard.s joystick.s \
|
||||
leveldata_monkey.inc
|
||||
leveldata_monkey.inc \
|
||||
monkey_actions.s \
|
||||
guy.brush
|
||||
ca65 -o monkey.o monkey.s -l monkey.lst
|
||||
|
||||
graphics/graphics.inc:
|
||||
|
@ -21,3 +21,6 @@ LOAD_MONKEY = 1
|
||||
; Monkey
|
||||
|
||||
MONKEY_LOOKOUT = 0
|
||||
MONKEY_POSTER = 1
|
||||
MONKEY_DOCK = 2
|
||||
MONKEY_BAR = 3
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 13 KiB |
BIN
monkey/graphics/sprites.png
Normal file
BIN
monkey/graphics/sprites.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 667 B |
@ -3,11 +3,105 @@
|
||||
;===============================================
|
||||
|
||||
locations:
|
||||
.word location0
|
||||
.word location0,location1,location2,location3
|
||||
|
||||
; MONKEY_LOOKOUT -- lookout tower
|
||||
location0:
|
||||
.word lookout_lzsa ; background
|
||||
.byte 18,40 ; walking range X
|
||||
.byte 16,48 ; walking range Y
|
||||
.byte 4 ; num areas
|
||||
.byte 3
|
||||
|
||||
.byte 12,15 ; x
|
||||
.byte 18,28 ; y
|
||||
.word lookout_string ; name
|
||||
.word lookout_action-1 ; action
|
||||
|
||||
.byte 32,40 ; x
|
||||
.byte 0,20 ; y
|
||||
.word path_string ; name
|
||||
.word path_action-1 ; action
|
||||
|
||||
.byte 28,36 ; x
|
||||
.byte 32,40 ; y
|
||||
.word stairs_string ; name
|
||||
.word stairs_action-1 ; action
|
||||
|
||||
; MONKEY_POSTER -- house with poster
|
||||
location1:
|
||||
.word lookout_lzsa ; background
|
||||
.byte 18,40 ; walking range X
|
||||
.byte 16,48 ; walking range Y
|
||||
.byte 4 ; num areas
|
||||
.byte 3
|
||||
|
||||
.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
|
||||
|
||||
; MONKEY_DOCK -- dock
|
||||
location2:
|
||||
.word lookout_lzsa ; background
|
||||
.byte 18,40 ; walking range X
|
||||
.byte 16,48 ; walking range Y
|
||||
.byte 4 ; num areas
|
||||
.byte 3
|
||||
|
||||
.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
|
||||
|
||||
; MONKEY_BAR -- scumm bar
|
||||
location3:
|
||||
.word lookout_lzsa ; background
|
||||
.byte 18,40 ; walking range X
|
||||
.byte 16,48 ; walking range Y
|
||||
.byte 4 ; num areas
|
||||
.byte 3
|
||||
|
||||
.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
|
||||
|
||||
|
||||
|
||||
|
||||
string_data:
|
||||
lookout_string: .byte "LOOKOUT",0
|
||||
path_string: .byte "PATH",0
|
||||
stairs_string: .byte "STAIRS",0
|
||||
|
||||
|
105
monkey/monkey.s
105
monkey/monkey.s
@ -28,6 +28,12 @@ monkey_start:
|
||||
lda #>locations
|
||||
sta LOCATIONS_H
|
||||
|
||||
lda #29
|
||||
sta GUYBRUSH_X
|
||||
lda #18
|
||||
sta GUYBRUSH_Y
|
||||
|
||||
|
||||
lda #0
|
||||
sta DRAW_PAGE
|
||||
sta LEVEL_OVER
|
||||
@ -42,8 +48,6 @@ monkey_start:
|
||||
|
||||
lda #MONKEY_LOOKOUT
|
||||
sta LOCATION
|
||||
lda #DIRECTION_E
|
||||
sta DIRECTION
|
||||
|
||||
jsr change_location
|
||||
|
||||
@ -70,7 +74,7 @@ game_loop:
|
||||
jsr gr_copy_to_current
|
||||
|
||||
;====================================
|
||||
; handle special-case forground logic
|
||||
; draw background sprites
|
||||
;====================================
|
||||
|
||||
lda LOCATION
|
||||
@ -171,6 +175,34 @@ viewer_done:
|
||||
|
||||
nothing_special:
|
||||
|
||||
;====================================
|
||||
; draw guybrush
|
||||
;====================================
|
||||
|
||||
lda GUYBRUSH_X
|
||||
sta XPOS
|
||||
lda GUYBRUSH_Y
|
||||
sta YPOS
|
||||
|
||||
lda #<guybrush_back_sprite
|
||||
sta INL
|
||||
lda #>guybrush_back_sprite
|
||||
sta INH
|
||||
|
||||
jsr put_sprite_crop
|
||||
|
||||
|
||||
;====================================
|
||||
; draw foreground sprites
|
||||
;====================================
|
||||
|
||||
|
||||
;====================================
|
||||
; update bottom bar
|
||||
;====================================
|
||||
|
||||
jsr update_bottom
|
||||
|
||||
;====================================
|
||||
; draw pointer
|
||||
;====================================
|
||||
@ -209,6 +241,70 @@ room_frame_no_oflo:
|
||||
really_exit:
|
||||
jmp end_level
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
;====================================
|
||||
;====================================
|
||||
; update bottom of screen
|
||||
;====================================
|
||||
;====================================
|
||||
update_bottom:
|
||||
|
||||
ldx #0
|
||||
|
||||
bottom_loop:
|
||||
lda bottom_strings,X
|
||||
sta OUTL
|
||||
lda bottom_strings+1,X
|
||||
sta OUTH
|
||||
|
||||
jsr move_and_print
|
||||
|
||||
inx
|
||||
inx
|
||||
|
||||
cpx #18
|
||||
bne bottom_loop
|
||||
|
||||
rts
|
||||
|
||||
;0123456789012345678901234567890123456789
|
||||
;
|
||||
;GIVE PICK UP USE
|
||||
;OPEN LOOK AT PUSH
|
||||
;CLOSE TALK TO PULL
|
||||
|
||||
bottom_strings:
|
||||
.word bottom_give
|
||||
.word bottom_open
|
||||
.word bottom_close
|
||||
.word bottom_pick_up
|
||||
.word bottom_look_at
|
||||
.word bottom_talk_to
|
||||
.word bottom_use
|
||||
.word bottom_push
|
||||
.word bottom_pull
|
||||
|
||||
bottom_give: .byte 0,21,"GIVE ",0
|
||||
bottom_open: .byte 0,22,"OPEN ",0
|
||||
bottom_close: .byte 0,23,"CLOSE",0
|
||||
bottom_pick_up: .byte 6,21,"PICK UP",0
|
||||
bottom_look_at: .byte 6,22,"LOOK AT",0
|
||||
bottom_talk_to: .byte 6,23,"TALK TO",0
|
||||
bottom_use: .byte 15,21,"USE ",0
|
||||
bottom_push: .byte 15,22,"PUSH",0
|
||||
bottom_pull: .byte 15,23,"PULL",0
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
;==========================
|
||||
; includes
|
||||
;==========================
|
||||
@ -232,3 +328,6 @@ really_exit:
|
||||
.include "decompress_fast_v2.s"
|
||||
.include "draw_pointer.s"
|
||||
.include "common_sprites.inc"
|
||||
.include "guy.brush"
|
||||
|
||||
.include "monkey_actions.s"
|
||||
|
8
monkey/monkey_actions.s
Normal file
8
monkey/monkey_actions.s
Normal file
@ -0,0 +1,8 @@
|
||||
lookout_action:
|
||||
rts
|
||||
|
||||
path_action:
|
||||
rts
|
||||
|
||||
stairs_action:
|
||||
rts
|
210
monkey/zp.inc
210
monkey/zp.inc
@ -72,214 +72,10 @@ PATTERN_H = $7F
|
||||
; when loading/storing from disk
|
||||
|
||||
WHICH_LOAD = $80 ; which file to load
|
||||
DIRECTION = $81 ; direction we are pointing
|
||||
DIRECTION_N = $1
|
||||
DIRECTION_S = $2
|
||||
DIRECTION_E = $4
|
||||
DIRECTION_W = $8
|
||||
DIRECTION_ANY=$f
|
||||
DIRECTION_ONLY_POINT = $40 ; do not change pointer to grab
|
||||
DIRECTION_SPLIT = $80 ; split text/graphics
|
||||
LOCATION = $81 ; location on the map
|
||||
|
||||
LOCATION = $82 ; location on the map
|
||||
|
||||
RED_PAGES_TAKEN = $83 ; red pages that have been picked up
|
||||
OCTAGON_PAGE = $01
|
||||
MECHE_PAGE = $02
|
||||
SELENA_PAGE = $04
|
||||
STONEY_PAGE = $08
|
||||
CHANNEL_PAGE = $10
|
||||
FINAL_PAGE = $20
|
||||
BLUE_PAGES_TAKEN= $84 ; blue pages that have been picked up
|
||||
CLOCK_BRIDGE = $85 ; is the clock island bridge raised
|
||||
GEAR_OPEN = $86 ; is the big gear open
|
||||
MARKER_SWITCHES = $87 ; state of the marker switches
|
||||
MARKER_DOCK = $01
|
||||
MARKER_GEARS = $02
|
||||
MARKER_SPACESHIP = $04
|
||||
MARKER_GENERATOR = $08
|
||||
MARKER_CLOCK = $10
|
||||
MARKER_TREE = $20
|
||||
MARKER_POOL = $40
|
||||
MARKER_DENTIST = $80
|
||||
|
||||
CLOCK_HOUR = $88 ; hour on the mist clock
|
||||
CLOCK_MINUTE = $89 ; minute on the mist clock
|
||||
|
||||
BOILER_LEVEL = $8A ; furnace in the cabin level
|
||||
|
||||
FIREPLACE_GRID0 = $8B ; fireplace grid puzzle state
|
||||
FIREPLACE_GRID1 = $8C
|
||||
FIREPLACE_GRID2 = $8D
|
||||
FIREPLACE_GRID3 = $8E
|
||||
FIREPLACE_GRID4 = $8F
|
||||
FIREPLACE_GRID5 = $90
|
||||
|
||||
CLOCK_COUNT = $91 ; clock puzzle (turns taken)
|
||||
CLOCK_TOP = $92 ; clock puzzle (top dial)
|
||||
CLOCK_MIDDLE = $93 ; clock puzzle (middle dial)
|
||||
CLOCK_BOTTOM = $94 ; clock puzzle (bottom dial)
|
||||
CLOCK_LAST = $95 ; clock puzzle (last dial turned)
|
||||
|
||||
BREAKER_TRIPPED = $96 ; generator (circuit breakers status)
|
||||
GENERATOR_VOLTS = $97 ; generator (total volts)
|
||||
ROCKET_VOLTS = $98 ; generator (rocket volts)
|
||||
SWITCH_TOP_ROW = $99 ; generator (switch top row)
|
||||
SWITCH_BOTTOM_ROW = $9A ; generator (switch bottom row)
|
||||
GENERATOR_VOLTS_DISP = $9B ; generator (total volts on display)
|
||||
ROCKET_VOLTS_DISP = $9C ; generator (rocket volts on display)
|
||||
|
||||
ROCKET_HANDLE_STEP = $9D ; organ (which knob is lit) [why zp?]
|
||||
ROCKET_NOTE1 = $9E ; organ (note slider 1)
|
||||
ROCKET_NOTE2 = $9F ; organ (note slider 2)
|
||||
ROCKET_NOTE3 = $A0 ; organ (note slider 3)
|
||||
ROCKET_NOTE4 = $A1 ; organ (note slider 4)
|
||||
|
||||
MECHE_ELEVATOR = $A2 ; fortress elevator state
|
||||
MECHE_ROTATION = $A3 ; fortress rotation state
|
||||
; 0..3 = S
|
||||
; 4..7 = E
|
||||
; 8..11 = N
|
||||
; 12..15 = W
|
||||
MECHE_LEVERS = $A4 ; fortress rotation levers
|
||||
LEFT_LEVER = 1
|
||||
RIGHT_LEVER = 2
|
||||
MECHE_LOCK1 = $A5 ; meche lock symbol1
|
||||
MECHE_LOCK2 = $A6 ; meche lock symbol2
|
||||
MECHE_LOCK3 = $A7 ; meche lock symbol3
|
||||
MECHE_LOCK4 = $A8 ; meche lock symbol4
|
||||
|
||||
HOLDING_PAGE = $A9 ; which page in hand
|
||||
HOLDING_RED_PAGE = $80
|
||||
HOLDING_BLUE_PAGE = $40
|
||||
HOLDING_WHITE_PAGE = $C0
|
||||
;FINAL_PAGE = $20
|
||||
;CHANNEL_PAGE = $10
|
||||
;STONEY_PAGE = $08
|
||||
;SELENA_PAGE = $04
|
||||
;MECHE_PAGE = $02
|
||||
;OCTAGON_PAGE = $01
|
||||
|
||||
RED_PAGE_COUNT = $AA ; # of red pages in book
|
||||
BLUE_PAGE_COUNT = $AB ; # of blue pages in book
|
||||
|
||||
VIEWER_CHANNEL = $AC ; viewer: current channel
|
||||
VIEWER_LATCHED = $AD ; viewer: latched channel
|
||||
|
||||
TOWER_ROTATION = $AE ; tower rotation: which
|
||||
ROTATION_GEARS = 2
|
||||
ROTATION_DOCK = 3
|
||||
ROTATION_TREE = 4
|
||||
ROTATION_SPACESHIP = 8
|
||||
|
||||
SHIP_RAISED = $AF ; ship raised or not
|
||||
|
||||
PUMP_STATE = $B0 ; stoneship pump state
|
||||
DRAINED_EXIT = $01
|
||||
DRAINED_TUNNELS = $02
|
||||
DRAINED_LIGHTHOUSE=$04
|
||||
|
||||
BATTERY_CHARGE = $B1 ; stoneship battery charge
|
||||
COMPASS_STATE = $B2 ; stoneship compass state
|
||||
COMPASS_DEFAULT = 0 ; cabin lights off
|
||||
COMPASS_LIGHT_ON= 1 ; proper angle selected
|
||||
CRANK_ANGLE = $B3 ; stoneship crank angle
|
||||
|
||||
WHITE_PAGE_TAKEN= $B4 ; white page taken
|
||||
|
||||
CHANNEL_SWITCHES= $B5 ; channelwood switches
|
||||
CHANNEL_SW_FAUCET = $80
|
||||
CHANNEL_SW_WINDMILL = $40
|
||||
CHANNEL_SW_GATE_BOTTOM = $20
|
||||
CHANNEL_ELEVATOR1_UP = $10
|
||||
CHANNEL_SW_GATE_TOP = $08
|
||||
CHANNEL_BOOK_ELEVATOR_UP= $04
|
||||
CHANNEL_PIPE_EXTENDED = $02
|
||||
CHANNEL_BRIDGE_UP = $01
|
||||
|
||||
CHANNEL_VALVES = $B6 ; channelwood valves
|
||||
CHANNEL_VALVE1 = $01 ; elevator2
|
||||
CHANNEL_VALVE2 = $02 ; big tree
|
||||
CHANNEL_VALVE3 = $04 ; broken
|
||||
CHANNEL_VALVE4 = $08 ; elevator1
|
||||
CHANNEL_VALVE5 = $10 ; entry
|
||||
CHANNEL_VALVE6 = $20 ; bridge
|
||||
|
||||
DENTIST_LIGHT = $B7 ; dentist lightswitch
|
||||
DENTIST_MONTH = $B8 ; dentist panel: month
|
||||
DENTIST_DAY = $B9 ; dentist panel: day
|
||||
DENTIST_CENTURY = $BA ; dentist panel: century
|
||||
DENTIST_YEAR = $BB ; dentist panel: year
|
||||
DENTIST_HOURS = $BC ; dentist panel: hours
|
||||
DENTIST_MINUTES = $BD ; dentist panel: minutes
|
||||
|
||||
PILLAR_ON = $BE ; pillars: which on/off
|
||||
PILLAR_EYE = $01
|
||||
PILLAR_SNAKE = $02
|
||||
PILLAR_BUG = $04
|
||||
PILLAR_ANCHOR = $08
|
||||
PILLAR_ARROW = $10
|
||||
PILLAR_LEAF = $20
|
||||
PILLAR_CROSS = $40
|
||||
PILLAR_EMU = $80
|
||||
|
||||
GREEN_BOOK_PROGRESS = $BF ; green book: what's ben seen
|
||||
|
||||
DNI_PROGRESS = $C0 ; dni: atrus status
|
||||
|
||||
COMPARTMENT_OPEN = $C1 ; dock marker switch compartment
|
||||
|
||||
GAME_COMPLETE = $C2 ; game has been completed
|
||||
|
||||
SAFE_HUNDREDS = $C3 ; safe combination, hundreds
|
||||
SAFE_TENS = $C4 ; safe combination, tens
|
||||
SAFE_ONES = $C5 ; safe combination, ones
|
||||
|
||||
TREE_LEVEL = $C6 ; how high is the tree hole
|
||||
|
||||
HOLDING_ITEM = $C7
|
||||
HOLDING_KEY = $04
|
||||
HOLDING_LIT_MATCH = $02
|
||||
HOLDING_MATCH = $01
|
||||
|
||||
BOILER_VALVE = $C8 ; how many turns of the boiler valve
|
||||
|
||||
TRUNK_STATE = $C9 ; trunk state in stonsehip
|
||||
TRUNK_VALVE_OPEN = $01
|
||||
TRUNK_WATER_DRAINED = $02
|
||||
TRUNK_KEY_TAKEN = $04
|
||||
TRUNK_LID_OPEN = $08
|
||||
TRUNK_HATCH_OPEN = $10
|
||||
TRUNK_KEY_ON_FLOOR = $20
|
||||
|
||||
SELENA_BUTTON_STATUS = $CA
|
||||
SELENA_BUTTON1 = $01 ; POOL (water)
|
||||
SELENA_BUTTON2 = $02 ; CHASM (fire)
|
||||
SELENA_BUTTON3 = $04 ; CLOCK (ticking)
|
||||
SELENA_BUTTON4 = $08 ; CRYSTALS (whistle)
|
||||
SELENA_BUTTON5 = $10 ; TUNNEL (wind)
|
||||
SELENA_LIGHTSWITCH= $80 ; light in the tunnel
|
||||
|
||||
SELENA_ANTENNA1 = $CB ; rotation angle for antenna1
|
||||
SELENA_ANTENNA2 = $CC ; rotation angle for antenna1
|
||||
SELENA_ANTENNA3 = $CD ; rotation angle for antenna1
|
||||
SELENA_ANTENNA4 = $CE ; rotation angle for antenna1
|
||||
SELENA_ANTENNA5 = $CF ; rotation angle for antenna1
|
||||
|
||||
SELENA_LOCK1 = $D0 ; antenna lock slider1
|
||||
SELENA_LOCK2 = $D1 ; antenna lock slider2
|
||||
SELENA_LOCK3 = $D2 ; antenna lock slider3
|
||||
SELENA_LOCK4 = $D3 ; antenna lock slider4
|
||||
SELENA_LOCK5 = $D4 ; antenna lock slider5
|
||||
|
||||
SELENA_ANTENNA_ACTIVE = $D5 ; which antenna currently selected
|
||||
|
||||
SUB_LOCATION = $D6
|
||||
SUB_DIRECTION = $D7
|
||||
|
||||
NIBEL_PROJECTOR = $D8 ; which button on projector in nibel
|
||||
|
||||
END_OF_SAVE = $D9
|
||||
GUYBRUSH_X = $82 ; location of protagonist
|
||||
GUYBRUSH_Y = $83
|
||||
|
||||
|
||||
; done game puzzle state
|
||||
|
Loading…
x
Reference in New Issue
Block a user