diff --git a/wh-engine/actor-macros.lisp b/wh-engine/actor-macros.lisp index e196e0c..7cfcf3a 100644 --- a/wh-engine/actor-macros.lisp +++ b/wh-engine/actor-macros.lisp @@ -36,7 +36,6 @@ nconc `(,key ,value) into make-params finally (return (values other-forms make-params)))) -#| (define-new!-impl component (class it params) (loop for (key value) on params by #'cddr if (eq key :actor) @@ -44,23 +43,3 @@ else nconc `(,key ,value) into make-params finally (return (values other-forms make-params)))) -|# - -#| -(defmacro actor! (class &rest params &key &allow-other-keys) - (let* ((cons-form `(make-instance ',class)) - (it (gensym)) - (other-forms - (loop for (key value) on params by #'cddr - if (eq key :component) - collect `(o! ,it (add-component ,value)) - else - if (eq key :child) - collect `(o! ,it (add-child ,value)) - else - do (nconc cons-form `(,key ,value))))) - `(let ((,it ,cons-form)) ,@other-forms ,it))) - -(defmacro component! (class &rest params &key &allow-other-keys) - `(make-instance ',class ,@params)) -|# diff --git a/wh-engine/actor.lisp b/wh-engine/actor.lisp index 2b76058..ac6d57a 100644 --- a/wh-engine/actor.lisp +++ b/wh-engine/actor.lisp @@ -120,7 +120,7 @@ (error "~S is already a child of ~S" child (o! child parent))) (unless (find-if (lambda (x) (etypecase x (actor (eq x child)) - (id-ref (eq (id-ref-actor x) (o! child id))))) + (id-ref (eql (id-ref-actor x) (o! child id))))) (o! this :slot children)) (push child (o! this :slot children))) (setf (o! child :slot parent) (make-weak-pointer this)) @@ -134,7 +134,7 @@ (setf (o! this :slot children) (delete-if (lambda (x) (etypecase x (actor (eq x child)) - (id-ref (eq (id-ref-actor x) (o! child id))))) + (id-ref (eql (id-ref-actor x) (o! child id))))) (o! this :slot children) :count 1)) (setf (o! child :slot parent) nil) (o! child (parent-changed)) diff --git a/wh-engine/global.lisp b/wh-engine/global.lisp index 1ba932b..e21a27e 100644 --- a/wh-engine/global.lisp +++ b/wh-engine/global.lisp @@ -154,4 +154,4 @@ (defun get-scene (scene-id) "Get a scene by its ID." - (find-if (lambda (scene) (eq (o! scene id) scene-id)) *world-scenes*)) + (find-if (lambda (scene) (eql (o! scene id) scene-id)) *world-scenes*)) diff --git a/wh-engine/main.lisp b/wh-engine/main.lisp index c4cc9c8..4fee741 100644 --- a/wh-engine/main.lisp +++ b/wh-engine/main.lisp @@ -159,7 +159,7 @@ for view = (ensure-live (weak-pointer-value view-ptr)) when (and (o! view active-p) (o! view actor tree-active-p)) do (progn - (unless (eq (o! view render-pass) render-pass) + (unless (eql (o! view render-pass) render-pass) (setf render-pass (o! view render-pass)) (gl:clear :depth-buffer)) (o! view (render-view *world-drawables*))))) diff --git a/wh-engine/scene.lisp b/wh-engine/scene.lisp index 3a203da..4051374 100644 --- a/wh-engine/scene.lisp +++ b/wh-engine/scene.lisp @@ -48,7 +48,7 @@ (defmethod get-actor ((this scene) actor-id) "Get the actor with the specified ID in this scene." - (find-if (lambda (actor) (eq (o! actor id) actor-id)) (o! this actors))) + (find-if (lambda (actor) (eql (o! actor id) actor-id)) (o! this actors))) (defmethod get-tagged-actors ((this scene) tags) "Get all actors tagged with the given set of tags."