mirror of
https://github.com/deater/dos33fsprogs.git
synced 2025-08-10 06:25:04 +00:00
mist: start adding clock puzzle
This commit is contained in:
@@ -49,6 +49,7 @@ mist.o: mist.s zp.inc hardware.inc \
|
|||||||
graphics_island/mist_graphics.inc \
|
graphics_island/mist_graphics.inc \
|
||||||
common_sprites.inc \
|
common_sprites.inc \
|
||||||
leveldata_island.inc \
|
leveldata_island.inc \
|
||||||
|
clock_bridge_puzzle.s clock_sprites.inc \
|
||||||
gr_copy.s audio.s text_print.s decompress_fast_v2.s
|
gr_copy.s audio.s text_print.s decompress_fast_v2.s
|
||||||
ca65 -o mist.o mist.s -l mist.lst
|
ca65 -o mist.o mist.s -l mist.lst
|
||||||
|
|
||||||
|
44
mist/clock_bridge_puzzle.s
Normal file
44
mist/clock_bridge_puzzle.s
Normal file
@@ -0,0 +1,44 @@
|
|||||||
|
|
||||||
|
|
||||||
|
;======================
|
||||||
|
; draw the clock face
|
||||||
|
|
||||||
|
draw_clock_face:
|
||||||
|
|
||||||
|
|
||||||
|
lda CLOCK_HOUR
|
||||||
|
asl
|
||||||
|
tay
|
||||||
|
lda clock_hour_sprites,Y
|
||||||
|
sta INL
|
||||||
|
lda clock_hour_sprites+1,Y
|
||||||
|
sta INH
|
||||||
|
|
||||||
|
lda #20
|
||||||
|
sta XPOS
|
||||||
|
lda #6
|
||||||
|
sta YPOS
|
||||||
|
jsr put_sprite_crop
|
||||||
|
|
||||||
|
lda CLOCK_MINUTE
|
||||||
|
asl
|
||||||
|
tay
|
||||||
|
lda clock_minute_sprites,Y
|
||||||
|
sta INL
|
||||||
|
lda clock_minute_sprites+1,Y
|
||||||
|
sta INH
|
||||||
|
|
||||||
|
lda #20
|
||||||
|
sta XPOS
|
||||||
|
lda #6
|
||||||
|
sta YPOS
|
||||||
|
jsr put_sprite_crop
|
||||||
|
|
||||||
|
|
||||||
|
rts
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
.include "clock_sprites.inc"
|
75
mist/clock_sprites.inc
Normal file
75
mist/clock_sprites.inc
Normal file
@@ -0,0 +1,75 @@
|
|||||||
|
|
||||||
|
clock_hour_sprites:
|
||||||
|
.word hour12_sprite,hour1_sprite,hour2_sprite,hour3_sprite
|
||||||
|
.word hour12_sprite,hour1_sprite,hour2_sprite,hour3_sprite
|
||||||
|
.word hour12_sprite,hour1_sprite,hour2_sprite,hour3_sprite
|
||||||
|
clock_minute_sprites:
|
||||||
|
.word minute12_sprite,minute1_sprite,minute2_sprite,minute3_sprite
|
||||||
|
.word minute12_sprite,minute1_sprite,minute2_sprite,minute3_sprite
|
||||||
|
.word minute12_sprite,minute1_sprite,minute2_sprite,minute3_sprite
|
||||||
|
|
||||||
|
hour12_sprite:
|
||||||
|
.byte 3,5
|
||||||
|
.byte $fd,$0d,$fd
|
||||||
|
.byte $ff,$00,$ff
|
||||||
|
.byte $ff,$00,$ff
|
||||||
|
.byte $ff,$ff,$ff
|
||||||
|
.byte $ff,$ff,$ff
|
||||||
|
|
||||||
|
hour1_sprite:
|
||||||
|
.byte 3,5
|
||||||
|
.byte $fd,$fd,$0d
|
||||||
|
.byte $ff,$0f,$f0
|
||||||
|
.byte $ff,$00,$ff
|
||||||
|
.byte $ff,$ff,$ff
|
||||||
|
.byte $ff,$ff,$ff
|
||||||
|
|
||||||
|
hour2_sprite:
|
||||||
|
.byte 3,5
|
||||||
|
.byte $fd,$fd,$fd
|
||||||
|
.byte $ff,$ff,$0f
|
||||||
|
.byte $ff,$00,$ff
|
||||||
|
.byte $ff,$ff,$ff
|
||||||
|
.byte $ff,$ff,$ff
|
||||||
|
|
||||||
|
hour3_sprite:
|
||||||
|
.byte 3,5
|
||||||
|
.byte $fd,$fd,$fd
|
||||||
|
.byte $ff,$ff,$ff
|
||||||
|
.byte $ff,$0f,$0f
|
||||||
|
.byte $ff,$ff,$ff
|
||||||
|
.byte $ff,$ff,$ff
|
||||||
|
|
||||||
|
minute12_sprite:
|
||||||
|
.byte 3,5
|
||||||
|
.byte $aa,$aa,$aa
|
||||||
|
.byte $aa,$00,$aa
|
||||||
|
.byte $aa,$00,$aa
|
||||||
|
.byte $aa,$aa,$aa
|
||||||
|
.byte $aa,$aa,$aa
|
||||||
|
|
||||||
|
minute1_sprite:
|
||||||
|
.byte 3,5
|
||||||
|
.byte $aa,$aa,$aa
|
||||||
|
.byte $aa,$0a,$a0
|
||||||
|
.byte $aa,$00,$aa
|
||||||
|
.byte $aa,$aa,$aa
|
||||||
|
.byte $aa,$aa,$aa
|
||||||
|
|
||||||
|
minute2_sprite:
|
||||||
|
.byte 3,5
|
||||||
|
.byte $aa,$aa,$aa
|
||||||
|
.byte $aa,$aa,$5a
|
||||||
|
.byte $aa,$00,$aa
|
||||||
|
.byte $aa,$aa,$aa
|
||||||
|
.byte $aa,$aa,$aa
|
||||||
|
|
||||||
|
minute3_sprite:
|
||||||
|
.byte 3,5
|
||||||
|
.byte $aa,$aa,$aa
|
||||||
|
.byte $aa,$aa,$aa
|
||||||
|
.byte $aa,$0a,$5a
|
||||||
|
.byte $aa,$aa,$aa
|
||||||
|
.byte $aa,$aa,$aa
|
||||||
|
|
||||||
|
|
21
mist/mist.s
21
mist/mist.s
@@ -31,13 +31,28 @@ mist_start:
|
|||||||
sta CURSOR_X
|
sta CURSOR_X
|
||||||
sta CURSOR_Y
|
sta CURSOR_Y
|
||||||
|
|
||||||
; init location
|
;=================
|
||||||
|
; init vars
|
||||||
|
; FIXME: we could be re-called from other books
|
||||||
|
; so don't set location here
|
||||||
|
|
||||||
lda #0
|
lda #0
|
||||||
sta LOCATION
|
sta LOCATION
|
||||||
lda #0
|
lda #0
|
||||||
sta DIRECTION
|
sta DIRECTION
|
||||||
|
|
||||||
|
|
||||||
|
lda LOCATION
|
||||||
|
bne not_first_time
|
||||||
|
|
||||||
|
; first time init
|
||||||
|
lda #0
|
||||||
|
sta CLOCK_MINUTE
|
||||||
|
sta CLOCK_HOUR
|
||||||
|
|
||||||
|
not_first_time:
|
||||||
|
|
||||||
|
|
||||||
; set up initial location
|
; set up initial location
|
||||||
|
|
||||||
jsr change_location
|
jsr change_location
|
||||||
@@ -747,6 +762,10 @@ red_book_done:
|
|||||||
.include "graphics_island/mist_graphics.inc"
|
.include "graphics_island/mist_graphics.inc"
|
||||||
|
|
||||||
|
|
||||||
|
; puzzles
|
||||||
|
|
||||||
|
.include "clock_bridge_puzzle.s"
|
||||||
|
|
||||||
.include "common_sprites.inc"
|
.include "common_sprites.inc"
|
||||||
|
|
||||||
.include "leveldata_island.inc"
|
.include "leveldata_island.inc"
|
||||||
|
@@ -53,8 +53,8 @@ HOLDING_PAGE = $70
|
|||||||
CLOCK_BRIDGE = $71
|
CLOCK_BRIDGE = $71
|
||||||
GEAR_OPEN = $72
|
GEAR_OPEN = $72
|
||||||
MARKER_SWITCHES = $73
|
MARKER_SWITCHES = $73
|
||||||
CLOCK_H = $74
|
CLOCK_HOUR = $74
|
||||||
CLOCK_M = $75
|
CLOCK_MINUTE = $75
|
||||||
GENERATOR_ON = $76
|
GENERATOR_ON = $76
|
||||||
TREE_FURNACE_ON = $77
|
TREE_FURNACE_ON = $77
|
||||||
FIREPLACE_GRID0 = $78
|
FIREPLACE_GRID0 = $78
|
||||||
|
Reference in New Issue
Block a user