Newer
Older
naledi / naledi.lisp
;;;;
;;;; Naledi ya Africa ("Star of Africa") is an ncurses-based survival game
;;;; set in Africa.
;;;;
;;;; This is the main program file with the user interface.
;;;;
;;;; (c) 2018 Daniel Vedder, MIT license
;;;;

;;XXX change this as needed
(declaim (optimize (debug 3) (speed 1) (space 1) (safety 1)))

;;XXX convenience functions during development, remove later
(defun start () (nya:start-game))

(defun dt (&optional (n 0))
	(bt:destroy-thread (nth n (bt:all-threads))))

(in-package :naledi-ya-africa)

(defmacro logf (level str &rest format-args)
	"Write an entry to *logfile* if *loglevel* is high enough"
	;; cf. `param.lisp'
	;;FIXME gives error if cwd != file directory
	`(when (and (plusp ,level) (>= *loglevel* ,level))
		 (write-to-file (format NIL ,str ,@format-args) *logfile* T)))