;; This file is part of Menace of the Mines.
;; Menace of the Mines is free software: you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation, either version 3 of the License, or
;; (at your option) any later version.
;; Menace of the Mines is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.
;; You should have received a copy of the GNU General Public License
;; along with Menace of the Mines in the file COPYING. If not, see <http://www.gnu.org/licenses/>.
(in-package :motm)
(setf *default-backend* (find-backend 'cl-store))
(defun init () t)
(defun real-quit ()
(endwin)
#+clisp (ext:quit)
#+sbcl (sb-ext:quit)
#-(or sbcl clisp) (error "Your implementation is now supported by quit in init.lisp right now, please fix that"))
(defun unsave ()
(with-open-file (save-file "saves/dungeon.store" :direction :input :if-does-not-exist nil :element-type '(unsigned-byte 8))
(if save-file (restore save-file) (make-instance 'dungeon))))
(defun motm-quit ()
(delete-file "saves/dungeon.store")
(real-quit))