1 ;;; Copyright 2009-2011 Christoph Senjak
3 (in-package :uxul-world)
7 (defmethod (setf x) (new-value (obj T)))
8 (defmethod (setf y) (new-value (obj T)))
9 (defmethod (setf visible) (new-value (obj T)))
12 (defun make-testing-room ()
13 "Create a simple room for testing. Shouldnt be used anymore. Use the
14 level-editor instead!"
15 (let* ((player (make-instance 'player
21 (ret (make-instance 'room
25 :graphic-centralizer player
27 #'(lambda (key) (on-key-up player key))
29 #'(lambda (key) (on-key-down player key))
31 (add-object player ret)
33 (add-object (make-instance 'burning-marshmallow
36 :inner-rectangle (list (* 40 128) (* 5 128) (* 65 128) (* 9 128))
41 ;;***************************
42 (add-object (make-instance 'key
45 :dungeon :testing-room
50 (add-object (make-instance 'burning-marshmallow
53 :inner-rectangle (list (* 40 128) (* 5 128) (* 65 128) (* 9 128))
58 (add-object (make-instance 'burning-marshmallow
61 :inner-rectangle (list (* 40 128) (* 5 128) (* 65 128) (* 9 128))
66 (add-object (make-instance 'burning-marshmallow
69 :inner-rectangle (list (* 30 128) (* 5 128) (* 41 128) (* 9 128))
74 (add-object (make-instance 'simple-enemy
80 (add-object (make-instance 'simple-enemy
86 (add-object (make-instance 'simple-enemy
92 (add-object (make-instance 'simple-enemy
98 (add-object (make-instance 'simple-enemy
104 (add-object (make-instance 'simple-enemy
110 (add-object (make-instance 'simple-enemy
119 (make-instance 'stone
127 (make-instance 'stone
135 (make-instance 'stone
144 (add-object (make-instance 'stone
152 (add-object (make-instance 'leaf
156 (add-object (make-instance 'leaf
160 (add-object (make-instance 'leaf
166 (add-object (make-instance 'stone
173 (add-object (make-instance 'stone
179 (add-object (make-instance 'stone
185 (add-object (make-instance 'stone
191 (add-object (make-instance 'stone
197 (add-object (make-instance 'stone
203 (add-object (make-instance 'stone
209 (add-object (make-instance 'stone
217 (add-object (make-instance 'stone
227 (add-object (make-instance 'stone
229 :y (* (+ (- 4 i) j 4) 128)
237 (add-object (make-instance 'stone
247 (add-object (make-instance 'stone
248 :x (* (+ i j 72) 128)
256 ((member j '(0 1 2)) '(83))
257 ((member j '(3 4 5)) '(83 84 85 86))
258 (T '(79 80 81 82 83 84 85 86))))
259 (add-object (make-instance 'stone
268 (dolist (j '((0 0 0 0 0 1 1 1 2)
272 (0 0 0 1 1 1 1 1 2)))
273 (let ((x (* 128 87)))
276 (add-object (make-instance 'stone
284 (add-object (make-instance 'leaf
290 (add-object (make-instance 'flying-nasobem
293 ;;*******************************
294 (add-object (make-instance 'door
297 :dungeon :testing-room
300 (add-object (make-instance 'door
303 :dungeon :testing-room
307 (add-object (make-instance 'flying-nasobem