This commit is contained in:
4am 2018-04-17 16:25:38 -04:00
parent e82bbdf78a
commit bd0570fff2
3 changed files with 24 additions and 16 deletions

View File

@ -5,7 +5,16 @@
;
; Public functions
; - SetStartupPathToCurrentVersionOfCurrentGame
;
;------------------------------------------------------------------------------
; SetStartupPathToCurrentVersionOfCurrentGame
; gets path+filename of current version of current game and stores it in $2006
;
; in: current ProDOS prefix is the same as the ONBEYOND.SYSTEM file
; out: all other registers and flags clobbered
;------------------------------------------------------------------------------
!zone {
SetStartupPathToCurrentVersionOfCurrentGame
jsr ResetPath ; gPathname = ''
@ -28,3 +37,4 @@ SetStartupPathToCurrentVersionOfCurrentGame
+LDADDR gPathname
jmp SetStartupPath ; store gPathname at $2006 to pass it to interpreter
}

View File

@ -8,6 +8,7 @@
;
; Public variables
; - gSavedGamesStore
; - gSavedGamesSlotsInUse
;
; TODO move these to a ZINFO_MLI kind of separate file
@ -30,9 +31,10 @@ gSavedGamesSlotsInUse
; load ZINFO, call it with the current game, and parse the results
;
; in: current ProDOS prefix is the same as the PITCH.DARK file
; out: C set if something went wrong
; C clear otherwise
; out: none
;------------------------------------------------------------------------------
.error
jmp SoftBell
LoadSavedGameInfo
jsr okvs_init
!word gSavedGamesStore
@ -45,14 +47,8 @@ LoadSavedGameInfo
bcs .error
jsr SetStartupPathToCurrentVersionOfCurrentGame
jsr kSystemAddress
jsr zparse
clc
rts
.error
jmp SoftBell
jsr kSystemAddress ; call ZINFO (despite being a .SYSTEM program, it returns via RTS)
zparse
+LDADDR zinfo_base
+STAY ZPTR
ldx #0
@ -153,13 +149,14 @@ kLeftParen
!byte 2
!text " ("
kRightParen
!byte 1
!text ")"
kNullByte
!byte 1,0
kSlash
!byte 1
!text "/"
kRightParen
!byte 1
!text ")"
kNullByte
!byte 1,0
}

View File

@ -6,11 +6,11 @@
; Public functions
; - DisplayArtwork
;
kArtworkRootDirectory ; length-prefixed pathname of DHGR graphic files
!byte 8
!raw "ARTWORK/"
!zone {
;------------------------------------------------------------------------------
; DisplayArtwork
; load and display double hi-res artwork, then wait for key or mouse click
@ -18,6 +18,7 @@ kArtworkRootDirectory ; length-prefixed pathname of DHGR graphic
; in: WeeGUI initialized
; out: all registers and flags clobbered
;------------------------------------------------------------------------------
!zone {
DisplayArtwork
lda #0 ; set Z flag always
!cpu 65816