mirror of
https://github.com/deater/dos33fsprogs.git
synced 2024-12-27 17:29:49 +00:00
mist: start adding for load-game support
This commit is contained in:
parent
a1378405c8
commit
46e173ab8d
@ -44,7 +44,7 @@ LOADER: loader.o
|
||||
loader.o: loader.s \
|
||||
gr_copy.s gr_offsets.s gr_pageflip.s gr_putsprite_crop.s \
|
||||
text_print.s gr_fast_clear.s decompress_fast_v2.s \
|
||||
keyboard.s draw_pointer.s end_level.s audio.s
|
||||
keyboard.s draw_pointer.s end_level.s audio.s loadstore.s
|
||||
ca65 -o loader.o loader.s -l loader.lst
|
||||
|
||||
###
|
||||
|
@ -4,6 +4,7 @@ For release 1.0
|
||||
-- save/load games
|
||||
-- sound loader
|
||||
+ MIST (split off ship-up/ship-down?)
|
||||
-- fix catherine letter (bg, grab from other side)
|
||||
-- constellation puzzle/ship raising
|
||||
-- marker switches
|
||||
+ DENTIST
|
||||
|
@ -35,17 +35,17 @@ put_sprite_crop =$18a8
|
||||
|
||||
; keyboard.s
|
||||
handle_keypress =$19e4
|
||||
change_location =$1ab1
|
||||
change_location =$1ac5
|
||||
|
||||
; text_print.s
|
||||
move_and_print =$1b49
|
||||
move_and_print =$1b5d
|
||||
|
||||
; page_sprites.inc
|
||||
blue_page_sprite =$1c44
|
||||
red_page_sprite =$1c90
|
||||
white_page_sprite =$1ca6
|
||||
blue_page_small_sprite =$1cbc
|
||||
red_page_small_sprite =$1cc4
|
||||
blue_page_sprite =$1cf4
|
||||
red_page_sprite =$1d40
|
||||
white_page_sprite =$1d56
|
||||
blue_page_small_sprite =$1d6c
|
||||
red_page_small_sprite =$1d74
|
||||
|
||||
; audio files
|
||||
linking_noise = $9000
|
||||
|
@ -1,8 +1,12 @@
|
||||
5 HOME
|
||||
10 PRINT "LOADING MIST V0.86"
|
||||
20 PRINT:PRINT
|
||||
40 PRINT "CONTROLS: ARROWS OR WASD"
|
||||
50 PRINT " ENTER MOVES/ACTION"
|
||||
40 PRINT "CONTROLS: "
|
||||
42 PRINT " MOVE CURSOR : ARROWS OR WASD"
|
||||
44 PRINT " FORWARD/ACTION : ENTER"
|
||||
45 PRINT " ENABLE JOYSTICK: CONTROL-J"
|
||||
46 PRINT " LOAD GAME : CONTROL-L"
|
||||
48 PRINT " SAVE GAME : CONTROL-S"
|
||||
60 PRINT:PRINT
|
||||
70 PRINT "BASED ON MYST BY CYAN INC"
|
||||
80 PRINT "APPLE II PORT: VINCE WEAVER"
|
||||
|
@ -12,6 +12,20 @@ handle_keypress:
|
||||
keypress:
|
||||
and #$7f ; clear high bit
|
||||
|
||||
check_load:
|
||||
cmp #$C ; control-L
|
||||
bne check_save
|
||||
|
||||
jsr load_game
|
||||
jmp done_keypress
|
||||
|
||||
check_save:
|
||||
cmp #$13 ; control-S
|
||||
bne check_left
|
||||
|
||||
jsr save_game
|
||||
jmp done_keypress
|
||||
|
||||
check_left:
|
||||
cmp #'A'
|
||||
beq left_pressed
|
||||
|
@ -731,6 +731,7 @@ sectbl: .byte $00,$0d,$0b,$09,$07,$05,$03,$01,$0e,$0c,$0a,$08,$06,$04,$02,$0f
|
||||
.include "gr_putsprite_crop.s"
|
||||
.include "keyboard.s"
|
||||
.include "text_print.s"
|
||||
.include "loadstore.s"
|
||||
|
||||
.include "common_sprites.inc"
|
||||
.include "page_sprites.inc"
|
||||
|
88
mist/loadstore.s
Normal file
88
mist/loadstore.s
Normal file
@ -0,0 +1,88 @@
|
||||
|
||||
;===================================
|
||||
;===================================
|
||||
; load the game
|
||||
;===================================
|
||||
;===================================
|
||||
|
||||
load_game:
|
||||
bit KEYRESET ; clear keyboard buffer
|
||||
|
||||
bit SET_TEXT ; set text mode
|
||||
|
||||
jsr clear_all ; clear screen
|
||||
|
||||
lda #<load_message
|
||||
sta OUTL
|
||||
lda #>load_message
|
||||
sta OUTH
|
||||
jsr move_and_print
|
||||
|
||||
lda #<are_you_sure
|
||||
sta OUTL
|
||||
lda #>are_you_sure
|
||||
sta OUTH
|
||||
jsr move_and_print
|
||||
|
||||
jsr page_flip
|
||||
|
||||
wait_load_confirmation:
|
||||
lda KEYPRESS
|
||||
bpl wait_load_confirmation
|
||||
|
||||
bit KEYRESET ; clear keypress
|
||||
|
||||
bit SET_GR ; turn graphics back on
|
||||
|
||||
rts
|
||||
|
||||
;===================================
|
||||
;===================================
|
||||
; save the game
|
||||
;===================================
|
||||
;===================================
|
||||
|
||||
save_game:
|
||||
bit KEYRESET ; clear keyboard buffer
|
||||
|
||||
bit SET_TEXT ; set text mode
|
||||
|
||||
jsr clear_all ; clear screen
|
||||
|
||||
lda #<save_message
|
||||
sta OUTL
|
||||
lda #>save_message
|
||||
sta OUTH
|
||||
jsr move_and_print
|
||||
|
||||
lda #<are_you_sure
|
||||
sta OUTL
|
||||
lda #>are_you_sure
|
||||
sta OUTH
|
||||
jsr move_and_print
|
||||
|
||||
jsr page_flip
|
||||
|
||||
wait_save_confirmation:
|
||||
lda KEYPRESS
|
||||
bpl wait_save_confirmation
|
||||
|
||||
bit KEYRESET ; clear keypress
|
||||
|
||||
bit SET_GR ; turn graphics back on
|
||||
|
||||
rts
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
load_message:
|
||||
.byte 10,5,"LOAD GAME FROM DISK",0
|
||||
|
||||
save_message:
|
||||
.byte 11,5,"SAVE GAME TO DISK",0
|
||||
|
||||
are_you_sure:
|
||||
.byte 10,7,"ARE YOU SURE? (Y/N)",0
|
||||
|
@ -95,15 +95,6 @@ done_keyloop:
|
||||
bit LORES
|
||||
bit FULLGR
|
||||
|
||||
;=================
|
||||
; set up location
|
||||
;=================
|
||||
|
||||
lda #<locations
|
||||
sta LOCATIONS_L
|
||||
lda #>locations
|
||||
sta LOCATIONS_H
|
||||
|
||||
lda #0
|
||||
sta DRAW_PAGE
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user