Works again.
[uxul-world.git] / elementary-classes.lisp
1 ;;; Copyright 2009-2011 Christoph Senjak
2
3 (in-package :uxul-world)
4
5 (defclass stone (game-object-with-animation)
6   ((animation :initarg :animation
7               :initform (make-animation 0 |gray_stone|)
8               :accessor animation)
9    (width :initarg :width
10           :accessor width
11           :initform 128)
12    (height :initarg :height
13            :accessor height
14            :initform 128)
15    (active :initarg :active
16            :accessor active
17            :initform NIL)
18    (redraw :accessor redraw
19            :initform t))
20   (:documentation
21 "Defines an object that cannot be passed by enemies or the player or
22   items per default."))
23
24 (defclass bottom (stone)
25   ((animation :initarg :animation
26               :initform (make-animation 0 |block|)
27               :accessor animation)
28    (width :initarg :width
29           :accessor width
30           :initform 64)
31    (height :initarg :height
32            :accessor height
33            :initform 64)
34    (active :initarg :active
35            :accessor active
36            :initform NIL)
37    (redraw :accessor redraw
38            :initform t))
39   (:documentation
40 "Defines an object that cannot be passed from the top side, but can be
41   passed from all other sides by the player, enemies and items per
42   default."))
43
44 (defclass moving-enemy (game-object-with-animation)
45   ((animation :initarg :animation
46               :initform (make-animation 0 |block|)
47               :accessor animation)
48    (width :initarg :width
49           :accessor width
50           :initform 64)
51    (height :initarg :height
52            :accessor height
53            :initform 64)
54    (active :initarg :active
55            :accessor active
56            :initform t)
57    (visible :initarg :visible
58             :accessor visible
59             :initform t)           
60    (redraw :accessor redraw
61            :initform t)
62    )
63   (:documentation
64 "The default class for moving enemies. This class cannot pass through
65 stones and bottoms, and listens to the player."))
66
67 (defclass standing-enemy (stone) () (:documentation
68 "The default class for standing enemies."))
69
70 (defclass standing-item (game-object-with-animation) () (:documentation
71 "The default class for standing items."))
72
73 (defclass moving-item () () (:documentation
74 "The default class for moving items."))