X-Git-Url: http://uxul.de/gitweb/?p=uxul-world.git;a=blobdiff_plain;f=draw.lisp;fp=draw.lisp;h=82a32c9176906f4958ca646f24455a95250b5fb0;hp=1b058e6dba20970021dfe64d909f859825bbc468;hb=3a5b6fe5b066ace9e3d03ec20c96c224cdbeb0b8;hpb=bf3029cdab22e72b60b26e1fa23c1568dc78041d diff --git a/draw.lisp b/draw.lisp index 1b058e6..82a32c9 100755 --- a/draw.lisp +++ b/draw.lisp @@ -5,25 +5,26 @@ (in-package :uxul-world) (defun draw-background (x-trans y-trans) - (let ((ani3 (car (images (make-animation 0 |background_test_layer_3|)))) - (ani2 (car (images (make-animation 0 |background_test_layer_2|))))) + ;; (let ((ani3 (car (images (make-animation 0 |background_test_layer_3|)))) +;; (ani2 (car (images (make-animation 0 |background_test_layer_2|))))) - (loop for i from -1 to 16 - do (loop for j from -1 to 12 - do (progn - (sdl:draw-surface-at-* ani2 - (+ (* i 64) (round - (mod (/ x-trans 4) 64))) - (+ (* j 64) (round - (mod (/ y-trans 4) 64))))))) - (loop for i from -1 to 16 - do (loop for j from -1 to 12 - do - (sdl:draw-surface-at-* ani3 - (+ (* 64 i) (round - (mod (/ x-trans 2) 64))) - (+ (* 64 j) (round - (mod (/ y-trans 2) 64)))))))) +;; (loop for i from -1 to 16 +;; do (loop for j from -1 to 12 +;; do (progn +;; (sdl:draw-surface-at-* ani2 +;; (+ (* i 64) (round +;; (mod (/ x-trans 4) 64))) +;; (+ (* j 64) (round +;; (mod (/ y-trans 4) 64))))))) +;; (loop for i from -1 to 16 +;; do (loop for j from -1 to 12 +;; do +;; (sdl:draw-surface-at-* ani3 +;; (+ (* 64 i) (round +;; (mod (/ x-trans 2) 64))) +;; (+ (* 64 j) (round +;; (mod (/ y-trans 2) 64))))))) + ) (defmethod draw ((obj room)) (let ((*current-translation-x* @@ -33,7 +34,7 @@ (- 800 (width obj))) (T (- 400 (x (graphic-centralizer obj)))))|# - (- 400 (x (graphic-centralizer obj))) + (- (ash 400 (- *zoom-ash*)) (x (graphic-centralizer obj))) ) (*current-translation-y* #|(cond @@ -42,7 +43,7 @@ (- 600 (height obj))) (T (- 300 (y (graphic-centralizer obj)))))|# - (- 300 (y (graphic-centralizer obj))) + (- (ash 300 (- *zoom-ash*)) (y (graphic-centralizer obj))) )) (draw-background *current-translation-x* *current-translation-y*) (dolist (image (get-objects obj 'uxul-world::game-object))