active-objects))
-(defmacro make-object (&key name class attr bhv look)
- `(let ((object
- '(:name ,name :class ,class :attr ,(make-object-attributes attr) :bhv ,(make-object-behaviour bhv) :look ,look)))
- (add-object object)
- object))
+(defun make-object-old (name &key attr bhv look)
+ (let ((object
+ `(:name ,name :attr ,(make-object-attributes attr) :bhv ,(make-object-behaviour bhv) :look ,look)))
+ (add-object object)
+ object))
+
+(defmacro make-object (name attr bhv &body look)
+ `(let ((attr ,(make-object-attributes attr) bhv ,(make-object-behaviour bhv)))
+ (defun ,name (option) ,@look)
+ ))
(defun make-object-attributes (attr)
(cond ((or (null attr) (atom attr)) nil)
`(,pname ,value)))
(defun make-object-behaviour (bhv)
- (cond ((consp bhv) bhv)
- (t (list bhv))))
+ (cond ((null bhv) nil)
+ ((atom bhv) (list bhv))
+ (t bhv)))