# HG changeset patch # User Steve Losh # Date 1473343968 0 # Node ID d337c4b0c1652ae816d0fba82e2de76d7f9241de # Parent c79e1317527e5be686411cbec60a15e6c28b3c6c Fix compilation warnings everywhere diff -r c79e1317527e -r d337c4b0c165 beast.asd --- a/beast.asd Thu Sep 08 14:01:17 2016 +0000 +++ b/beast.asd Thu Sep 08 14:12:48 2016 +0000 @@ -12,7 +12,8 @@ :serial t :components ((:module "vendor" :serial t - :components ((:file "quickutils"))) + :components ((:file "quickutils-package") + (:file "quickutils"))) (:file "package") (:module "src" :serial t diff -r c79e1317527e -r d337c4b0c165 src/beast.lisp --- a/src/beast.lisp Thu Sep 08 14:01:17 2016 +0000 +++ b/src/beast.lisp Thu Sep 08 14:12:48 2016 +0000 @@ -1,5 +1,6 @@ (in-package #:beast) + ;;;; Notes ;;; Entities are stored in an {id -> entity} hash table. ;;; @@ -21,11 +22,15 @@ ;;; TODO: Figure out the distinct problem. -;;;; Entities +;;;; Global Data Structures --------------------------------------------------- (defvar *entity-id-counter* 0) (defvar *entity-index* (make-hash-table)) +(defvar *aspect-index* (make-hash-table)) +(defvar *system-index* (make-hash-table)) +(defvar *systems* (make-hash-table)) +;;;; Entities ----------------------------------------------------------------- (defclass entity () ((id :reader entity-id :initform (incf *entity-id-counter*) @@ -62,7 +67,7 @@ (loop :with id = (entity-id entity) :for system :being :the hash-keys :of *systems* - :using (hash-value (function arity type-specifiers)) + :using (hash-value (nil nil type-specifiers)) :do (loop :for argument-index :in (gethash system *system-index*) :for specifier :in type-specifiers :when (entity-satisfies-system-type-specifier-p entity specifier) @@ -195,9 +200,7 @@ (find-class ',name))) -;;;; Aspects -(defvar *aspect-index* (make-hash-table)) - +;;;; Aspects ------------------------------------------------------------------ (defun initialize-aspect-index (name) (when (not (hash-table-key-exists-p *aspect-index* name)) (setf (gethash name *aspect-index*) (make-hash-table)))) @@ -251,14 +254,10 @@ (find-class ',name)))) -;;;; Systems -(defvar *system-index* (make-hash-table)) -(defvar *systems* (make-hash-table)) - - +;;;; Systems ------------------------------------------------------------------ (defun rebuild-system-index (arglist) (loop - :for (argument-name . type-specifier) :in arglist + :for (nil . type-specifier) :in arglist :for index = (make-hash-table) :do (loop :for entity :being :the hash-values :of *entity-index* diff -r c79e1317527e -r d337c4b0c165 vendor/quickutils-package.lisp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/vendor/quickutils-package.lisp Thu Sep 08 14:12:48 2016 +0000 @@ -0,0 +1,12 @@ +(eval-when (:compile-toplevel :load-toplevel :execute) + (unless (find-package "BEAST.QUICKUTILS") + (defpackage "BEAST.QUICKUTILS" + (:documentation "Package that contains Quickutil utility functions.") + (:use #:cl)))) + +(in-package "BEAST.QUICKUTILS") + +;; need to define this here so sbcl will shut the hell up about it being +;; undefined when compiling quickutils.lisp. computers are trash. +(defparameter *utilities* nil) +