Corrected the dependencies. Level Editor works again using Skippy.
[uxul-world.git] / constants.lisp
index c5527e1..40c5204 100755 (executable)
@@ -2,12 +2,21 @@
 
 (in-package :uxul-world)
 
-(defconstant +screen-width+ 1024)
-(defconstant +screen-height+ 768)
+(defmacro mydefconst (x y)
+  `(eval-when (:compile-toplevel :load-toplevel)
+     (when (or (not (boundp ',x))
+              (not (equal ,y
+                          (symbol-value ',x))))
+       (defconstant ,x ,y))))
 
-(defconstant +class-indices+ '(t uxul-world::animation
+
+(mydefconst +screen-width+ 1024)
+(mydefconst +screen-height+ 768)
+
+(mydefconst +class-indices+ '(t uxul-world::animation
   uxul-world::collision uxul-world::game-object uxul-world::player
   uxul-world::room uxul-world::stone uxul-world::xy-coordinates
   uxul-world::bottom uxul-world::moving-enemy
   uxul-world::standing-enemy uxul-world::moving-item
-  uxul-world::standing-item uxul-world::game-object-with-animation))
\ No newline at end of file
+  uxul-world::standing-item uxul-world::game-object-with-animation
+  uxul-world::teleporter))
\ No newline at end of file