##// END OF EJS Templates
Use Parenscript's minifier and obfuscator... and namespaces. SAVES CURRENTLY BROKEN
Use Parenscript's minifier and obfuscator... and namespaces. SAVES CURRENTLY BROKEN

File last commit:

r25:4adc2646 default
r25:4adc2646 default
Show More
main.ps
43 lines | 1.1 KiB | application/postscript | PostScriptLexer
(in-package sugar-qsp.main)
(setf (root)
(create
;;; Game session state
;; Variables
vars (create)
;; Inventory (objects)
objs (list)
current-location nil
;; Game time
started-at (chain *date (now))
;; Timers
timer-interval 500
timer-obj nil
;;; Transient state
;; Savegame data
state-stash (create)
;; List of audio files being played
playing (create)
;; Local variables stack (starts with an empty frame)
locals (list)
;;; Game data
;; ACTions
acts (create)
;; Locations
locs (create)))
;; Launch the game from the first location
(setf (@ window onload)
(lambda ()
(#.(intern "INIT-DOM" "SUGAR-QSP.API"))
;; For MSECCOUNT
(setf (root started-at) (chain *date (now)))
;; For $COUNTER and SETTIMER
(#.(intern "SET-TIMER" "SUGAR-QSP.API")
(root timer-interval))
(funcall (getprop (root locs)
(chain *object (keys (root locs)) 0))
(list))
(values)))