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 ; Public functions
; - SetStartupPathToCurrentVersionOfCurrentGame ; - 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 SetStartupPathToCurrentVersionOfCurrentGame
jsr ResetPath ; gPathname = '' jsr ResetPath ; gPathname = ''
@ -28,3 +37,4 @@ SetStartupPathToCurrentVersionOfCurrentGame
+LDADDR gPathname +LDADDR gPathname
jmp SetStartupPath ; store gPathname at $2006 to pass it to interpreter jmp SetStartupPath ; store gPathname at $2006 to pass it to interpreter
}

View File

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

View File

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