mirror of
https://github.com/a2-4am/pitch-dark.git
synced 2024-09-29 02:04:50 +00:00
31 lines
1001 B
Plaintext
31 lines
1001 B
Plaintext
|
;license:MIT
|
||
|
;(c) 2018 by 4am
|
||
|
;
|
||
|
; Common functions across glue code
|
||
|
;
|
||
|
; Public functions
|
||
|
; - SetStartupPathToCurrentVersionOfCurrentGame
|
||
|
|
||
|
SetStartupPathToCurrentVersionOfCurrentGame
|
||
|
jsr ResetPath ; gPathname = ''
|
||
|
|
||
|
+LDADDR kGameRootDirectory ; gPathname = game root directory + '/'
|
||
|
jsr AddToPath
|
||
|
|
||
|
jsr okvs_get
|
||
|
!word gGlobalPrefsStore
|
||
|
!word kLastPlayed
|
||
|
+STAY + ; A/Y contains address
|
||
|
jsr AddToPath ; gPathname = root + '/' + game shortname
|
||
|
|
||
|
+LDADDR kPathSeparator
|
||
|
jsr AddToPath ; gPathname = root + '/' + game shortname + '/'
|
||
|
|
||
|
jsr okvs_get
|
||
|
!word gGlobalPrefsStore
|
||
|
+ !word $FDFD ; SMC
|
||
|
jsr AddToPath ; gPathname = root + '/' + game shortname + '/' + game filename
|
||
|
|
||
|
+LDADDR gPathname
|
||
|
jmp SetStartupPath ; store gPathname at $2006 to pass it to interpreter
|