minor change: init the files in level-editor.
[uxul-world.git] / small-classes.lisp
1 ;;; Copyright 2009 Christoph Senjak
2
3 (in-package :uxul-world)
4
5 (defclass anchor (game-object)
6   ((dungeon :initform nil
7             :initarg :dungeon
8             :accessor dungeon))
9    (:documentation "This object ist just to make it easier to handle
10    positions in the game, i.e. for bounding-rects for
11    burning-marshmallows, etc."))
12
13 (defclass leaf (bottom)
14   ((animation :initarg :animation
15               :accessor animation
16               :initform (make-animation 0 |leaf|))
17    (width :initarg :width
18           :accessor :width
19           :initform 128)
20    (height :initarg :height
21            :accessor :height
22            :initform 3)
23    (animation-translation :initarg :animation-translation
24                           :accessor animation-translation
25                           :initform (make-xy -7 -30))
26    ))
27
28 (defclass tulip (standing-item)
29   ((animation :initarg :animation
30               :accessor animation
31               :initform (make-animation 10 |tulip| |tulip2| |tulip| |tulip3|))
32    (width :initarg :width
33           :accessor :width
34           :initform 128)
35    (height :initarg :height
36            :accessor :height
37            :initform 128)))
38
39 (defclass key (standing-item)
40   ((animation :initarg :animation
41               :accessor animation
42               :initform (make-animation 0 |key|))
43    (width :initarg :width
44           :accessor width
45           :initform 128)
46    (height :initarg :height
47            :accessor height
48            :initform 128)
49    (dungeon :initarg :dungeon
50             :accessor dungeon
51             :initform nil
52             :documentation "To provide information in which rooms this key can be used.")))
53
54 (defclass door (stone)
55   ((animation :initarg :animation
56               :accessor animation
57               :initform (make-animation 0 |door|))
58    (width :initarg :width
59           :accessor width
60           :initform 128)
61    (height :initarg :height
62            :accessor height
63            :initform 128)
64    (dungeon :initarg :dungeon
65             :accessor dungeon
66             :initform nil
67             :documentation "To provide information in which room this door is.")))