mirror of
https://github.com/deater/dos33fsprogs.git
synced 2024-12-27 17:29:49 +00:00
mist: can adjust clock
This commit is contained in:
parent
b0fc5b881b
commit
76e7f6554c
@ -5,7 +5,6 @@
|
||||
|
||||
draw_clock_face:
|
||||
|
||||
|
||||
lda CLOCK_HOUR
|
||||
asl
|
||||
tay
|
||||
@ -34,11 +33,65 @@ draw_clock_face:
|
||||
sta YPOS
|
||||
jsr put_sprite_crop
|
||||
|
||||
rts
|
||||
|
||||
|
||||
;======================
|
||||
; clock puzzle
|
||||
|
||||
clock_puzzle:
|
||||
lda CURSOR_X
|
||||
cmp #19
|
||||
bcc clock_puzzle_hours ; blt
|
||||
|
||||
cmp #24
|
||||
bcc clock_puzzle_minutes ; blt
|
||||
bcs clock_puzzle_button ; bge
|
||||
|
||||
clock_puzzle_hours:
|
||||
inc CLOCK_HOUR
|
||||
lda CLOCK_HOUR
|
||||
cmp #12
|
||||
bne clock_puzzle_done
|
||||
|
||||
lda #0
|
||||
sta CLOCK_HOUR
|
||||
beq clock_puzzle_done
|
||||
|
||||
clock_puzzle_minutes:
|
||||
inc CLOCK_MINUTE
|
||||
lda CLOCK_MINUTE
|
||||
cmp #12
|
||||
bne clock_puzzle_done
|
||||
|
||||
lda #0
|
||||
sta CLOCK_MINUTE
|
||||
beq clock_puzzle_done
|
||||
|
||||
clock_puzzle_button:
|
||||
|
||||
lda CLOCK_MINUTE
|
||||
cmp #8
|
||||
bne bridge_down
|
||||
|
||||
lda CLOCK_HOUR
|
||||
cmp #2
|
||||
bne bridge_down
|
||||
|
||||
lda #1
|
||||
jmp bridge_adjust
|
||||
|
||||
bridge_down:
|
||||
lda #0
|
||||
|
||||
bridge_adjust:
|
||||
sta CLOCK_BRIDGE
|
||||
|
||||
bit $C030 ; click speaker
|
||||
|
||||
clock_puzzle_done:
|
||||
|
||||
rts
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.include "clock_sprites.inc"
|
||||
|
@ -1,48 +1,18 @@
|
||||
|
||||
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
|
||||
.word hour12_sprite, hour1_sprite, hour2_sprite
|
||||
.word hour3_sprite, hour4_sprite, hour5_sprite
|
||||
.word hour6_sprite, hour7_sprite, hour8_sprite
|
||||
.word hour9_sprite,hour10_sprite,hour11_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
|
||||
.word minute12_sprite, minute1_sprite, minute2_sprite
|
||||
.word minute3_sprite, minute4_sprite, minute5_sprite
|
||||
.word minute6_sprite, minute7_sprite, minute8_sprite
|
||||
.word minute9_sprite,minute10_sprite,minute11_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,$0a,$aa
|
||||
.byte $aa,$00,$aa
|
||||
.byte $aa,$00,$aa
|
||||
.byte $aa,$aa,$aa
|
||||
@ -50,7 +20,7 @@ minute12_sprite:
|
||||
|
||||
minute1_sprite:
|
||||
.byte 3,5
|
||||
.byte $aa,$aa,$aa
|
||||
.byte $aa,$aa,$0a
|
||||
.byte $aa,$0a,$a0
|
||||
.byte $aa,$00,$aa
|
||||
.byte $aa,$aa,$aa
|
||||
@ -59,7 +29,7 @@ minute1_sprite:
|
||||
minute2_sprite:
|
||||
.byte 3,5
|
||||
.byte $aa,$aa,$aa
|
||||
.byte $aa,$aa,$5a
|
||||
.byte $aa,$aa,$0a
|
||||
.byte $aa,$00,$aa
|
||||
.byte $aa,$aa,$aa
|
||||
.byte $aa,$aa,$aa
|
||||
@ -68,8 +38,170 @@ minute3_sprite:
|
||||
.byte 3,5
|
||||
.byte $aa,$aa,$aa
|
||||
.byte $aa,$aa,$aa
|
||||
.byte $aa,$0a,$5a
|
||||
.byte $aa,$0a,$0a
|
||||
.byte $aa,$aa,$aa
|
||||
.byte $aa,$aa,$aa
|
||||
|
||||
minute4_sprite:
|
||||
.byte 3,5
|
||||
.byte $aa,$aa,$aa
|
||||
.byte $aa,$aa,$aa
|
||||
.byte $aa,$0a,$aa
|
||||
.byte $aa,$aa,$00
|
||||
.byte $aa,$aa,$aa
|
||||
|
||||
minute5_sprite:
|
||||
.byte 3,5
|
||||
.byte $aa,$aa,$aa
|
||||
.byte $aa,$aa,$aa
|
||||
.byte $aa,$0a,$aa
|
||||
.byte $aa,$00,$aa
|
||||
.byte $aa,$aa,$00
|
||||
|
||||
minute6_sprite:
|
||||
.byte 3,5
|
||||
.byte $aa,$aa,$aa
|
||||
.byte $aa,$aa,$aa
|
||||
.byte $aa,$0a,$aa
|
||||
.byte $aa,$00,$aa
|
||||
.byte $aa,$00,$aa
|
||||
|
||||
minute7_sprite:
|
||||
.byte 3,5
|
||||
.byte $aa,$aa,$aa
|
||||
.byte $aa,$aa,$aa
|
||||
.byte $aa,$0a,$aa
|
||||
.byte $aa,$00,$aa
|
||||
.byte $00,$aa,$aa
|
||||
|
||||
minute8_sprite:
|
||||
.byte 3,5
|
||||
.byte $aa,$aa,$aa
|
||||
.byte $aa,$aa,$aa
|
||||
.byte $aa,$0a,$aa
|
||||
.byte $00,$aa,$aa
|
||||
.byte $aa,$aa,$aa
|
||||
|
||||
minute9_sprite:
|
||||
.byte 3,5
|
||||
.byte $aa,$aa,$aa
|
||||
.byte $aa,$aa,$aa
|
||||
.byte $0a,$0a,$aa
|
||||
.byte $aa,$aa,$aa
|
||||
.byte $aa,$aa,$aa
|
||||
|
||||
minute10_sprite:
|
||||
.byte 3,5
|
||||
.byte $aa,$aa,$aa
|
||||
.byte $0a,$aa,$aa
|
||||
.byte $aa,$00,$aa
|
||||
.byte $aa,$aa,$aa
|
||||
.byte $aa,$aa,$aa
|
||||
|
||||
minute11_sprite:
|
||||
.byte 3,5
|
||||
.byte $00,$aa,$aa
|
||||
.byte $aa,$0a,$aa
|
||||
.byte $aa,$00,$aa
|
||||
.byte $aa,$aa,$aa
|
||||
.byte $aa,$aa,$aa
|
||||
|
||||
|
||||
|
||||
hour12_sprite:
|
||||
.byte 3,5
|
||||
.byte $fd,$fd,$fd
|
||||
.byte $ff,$55,$ff
|
||||
.byte $ff,$55,$ff
|
||||
.byte $ff,$ff,$ff
|
||||
.byte $ff,$ff,$ff
|
||||
|
||||
hour1_sprite:
|
||||
.byte 3,5
|
||||
.byte $fd,$fd,$fd
|
||||
.byte $ff,$5f,$f5
|
||||
.byte $ff,$55,$ff
|
||||
.byte $ff,$ff,$ff
|
||||
.byte $ff,$ff,$ff
|
||||
|
||||
hour2_sprite:
|
||||
.byte 3,5
|
||||
.byte $fd,$fd,$fd
|
||||
.byte $ff,$ff,$5f
|
||||
.byte $ff,$55,$ff
|
||||
.byte $ff,$ff,$ff
|
||||
.byte $ff,$ff,$ff
|
||||
|
||||
hour3_sprite:
|
||||
.byte 3,5
|
||||
.byte $fd,$fd,$fd
|
||||
.byte $ff,$ff,$ff
|
||||
.byte $ff,$5f,$5f
|
||||
.byte $ff,$ff,$ff
|
||||
.byte $ff,$ff,$ff
|
||||
|
||||
hour4_sprite:
|
||||
.byte 3,5
|
||||
.byte $fd,$fd,$fd
|
||||
.byte $ff,$ff,$ff
|
||||
.byte $ff,$5f,$ff
|
||||
.byte $ff,$ff,$55
|
||||
.byte $ff,$ff,$ff
|
||||
|
||||
hour5_sprite:
|
||||
.byte 3,5
|
||||
.byte $fd,$fd,$fd
|
||||
.byte $ff,$ff,$ff
|
||||
.byte $ff,$5f,$ff
|
||||
.byte $ff,$55,$ff
|
||||
.byte $ff,$ff,$f5
|
||||
|
||||
hour6_sprite:
|
||||
.byte 3,5
|
||||
.byte $fd,$fd,$fd
|
||||
.byte $ff,$ff,$ff
|
||||
.byte $ff,$5f,$ff
|
||||
.byte $ff,$55,$ff
|
||||
.byte $ff,$f5,$ff
|
||||
|
||||
|
||||
hour7_sprite:
|
||||
.byte 3,5
|
||||
.byte $fd,$fd,$fd
|
||||
.byte $ff,$ff,$ff
|
||||
.byte $ff,$5f,$ff
|
||||
.byte $ff,$55,$ff
|
||||
.byte $f5,$ff,$ff
|
||||
|
||||
hour8_sprite:
|
||||
.byte 3,5
|
||||
.byte $fd,$fd,$fd
|
||||
.byte $ff,$ff,$ff
|
||||
.byte $ff,$5f,$ff
|
||||
.byte $55,$ff,$ff
|
||||
.byte $ff,$ff,$ff
|
||||
|
||||
hour9_sprite:
|
||||
.byte 3,5
|
||||
.byte $fd,$fd,$fd
|
||||
.byte $ff,$ff,$ff
|
||||
.byte $5f,$5f,$ff
|
||||
.byte $ff,$ff,$ff
|
||||
.byte $ff,$ff,$ff
|
||||
|
||||
hour10_sprite:
|
||||
.byte 3,5
|
||||
.byte $fd,$fd,$fd
|
||||
.byte $5f,$ff,$ff
|
||||
.byte $ff,$55,$ff
|
||||
.byte $ff,$ff,$ff
|
||||
.byte $ff,$ff,$ff
|
||||
|
||||
hour11_sprite:
|
||||
.byte 3,5
|
||||
.byte $5d,$fd,$fd
|
||||
.byte $ff,$5f,$ff
|
||||
.byte $ff,$55,$ff
|
||||
.byte $ff,$ff,$ff
|
||||
.byte $ff,$ff,$ff
|
||||
|
||||
|
@ -508,7 +508,10 @@ location25:
|
||||
.word $0000 ; east bg
|
||||
.word $0000 ; west bg
|
||||
.byte BG_SOUTH
|
||||
.byte $ff ; special exit
|
||||
.byte DIRECTION_S ; special exit
|
||||
.byte 12,30 ; special x
|
||||
.byte 38,48 ; special y
|
||||
.word clock_puzzle-1 ; special function
|
||||
|
||||
; clock island
|
||||
location26:
|
||||
|
13
mist/mist.s
13
mist/mist.s
@ -78,6 +78,19 @@ game_loop:
|
||||
|
||||
jsr gr_copy_to_current
|
||||
|
||||
;====================================
|
||||
; handle special-case forground logic
|
||||
;====================================
|
||||
|
||||
lda LOCATION
|
||||
cmp #25 ; clock puzzle
|
||||
bne nothing_special
|
||||
|
||||
jsr draw_clock_face
|
||||
|
||||
|
||||
|
||||
nothing_special:
|
||||
;====================================
|
||||
; draw pointer
|
||||
;====================================
|
||||
|
Loading…
Reference in New Issue
Block a user