1 ;;; Copyright 2009 Christoph Senjak
3 ;; This file declares the constants for loading different files and
6 (in-package :uxul-world)
9 (setf (symbol-value (intern var)) val))
11 (defun init-file (file)
12 "Load a file into a Variable. Access with |filename| (without .png
14 (si (pathname-name file)
15 (with-open-file (in file :element-type '(unsigned-byte 8))
16 (let* ((length (file-length in))
17 (content (make-array (list length)
18 :element-type '(unsigned-byte 8)
20 (read-sequence content in)
23 (defun file-relevant-p (file)
24 "Is the file relevant for initialization? So far only .png-files are
26 (string= (pathname-type file) "png"))
29 "Load the relevant files into variables"
30 (cl-fad:walk-directory
31 (asdf:component-pathname (asdf:find-system :uxul-world))
32 #'init-file :test #'file-relevant-p))