Update documentation; fix some bugs on first run

This commit is contained in:
Simponic 2022-05-29 21:57:21 -07:00
parent edeab2d094
commit ffa83bc8b0
5 changed files with 7 additions and 23 deletions

View File

@ -3,8 +3,3 @@ This is a complete rewrite of my first Lisp project: a speedrun timer. It uses n
** Requirements ** Requirements
+ [[https://www.quicklisp.org/beta/][Quicklisp]] + [[https://www.quicklisp.org/beta/][Quicklisp]]
+ [[http://www.sbcl.org/platform-table.html][SBCL]] + [[http://www.sbcl.org/platform-table.html][SBCL]]
** Usage
*** Importing categories
Config files are documented by the examples in ~configs~. Once a config file is written, import that category and its splits by running ~sbcl --load main.lisp -i <path-to-config>~. This will add the category and its splits to the timer's SQLite database.
*** Running
Simply ~sbcl --load main.lisp~

View File

@ -1,8 +0,0 @@
(mito:create-dao 'category :name "Super Metroid" :percentage "Any%"))
(mito:create-dao 'category :name "Portal 1" :percentage "Any%"))
(mito:create-dao 'category :name "Super Mario 64" :percentage "16 Stars"))
(mito:create-dao 'category :name "Minecraft" :percentage "Any% RSG"))
(mito:create-dao 'category :name "Minecraft" :percentage "Any% SSG"))

View File

@ -17,9 +17,9 @@
(:file "speedrun" :depends-on ("util")) ;; The actual timer logic (:file "speedrun" :depends-on ("util")) ;; The actual timer logic
(:file "database/category") ;; Category DAO (:file "database/category") ;; Category DAO
(:file "database/run") ;; Run DAO (:file "database/run") ;; Run DAO
(:file "main" :depends-on ("util" (:file "main" :depends-on ("database/category"
"database/run"
"util"
"config" "config"
"ui" "ui"
"speedrun" "speedrun"))))
"database/category"
"database/run"))))

View File

@ -11,10 +11,7 @@
:arg-parser #'identity)) :arg-parser #'identity))
(defun main () (defun main ()
(let ((options (opts:get-opts)) (let ((options (opts:get-opts)))
(category (car (mito:select-dao 'category))))
(when-option (options :import) (when-option (options :import)
(import-config (getf options :import))) (import-config (getf options :import)))
(run-ui category))) (run-ui (car (mito:select-dao 'category)))))
(main)

View File

@ -104,7 +104,7 @@
(start-speedrun speedrun) (start-speedrun speedrun)
(setf state 'RUNNING)) (setf state 'RUNNING))
('RUNNING (next-split speedrun)))) ('RUNNING (next-split speedrun))))
(:resize (nil)) (:resize nil)
((nil) ((nil)
(case state (case state
('TITLE ('TITLE