anchor.diff:  	(vector-push-extend name (keys-in-order seq-hash-table))))
       (setf (gethash name rectangles-container) rectangle)))
   
  +
  +;;Rectangle---------------------------------------------------------------------
  +
  +(defclass animation ()
  +  ((start-time :initarg :start-time :initform 0)
  +   ;; hm this is the global-texture, so there should also be a global sprite sheet
  +   ;; (spritesheet :type TEXATL.CL:TEXATL-SPRITESHEET :initarg :spritesheet)
  +   (frame :type integer :initform 0)
  +   ;; idea is to pass those as arguments like so:
  +   ;; (texatl.cl:sprite <spritesheet> '(<sprite-name> <mode> <direction>) 0)
  +   ;; though it forces a particular kind of format for our spritesheet
  +   (sprite-name :type keyword :initarg :sprite-name :initform :default-name)
  +   (mode :type keyword)
  +   (direction :type keyword)
  +   (default-animation :type keyword :initform :walk)))
  +
  +(defmethod :after initialize-instance ((animation animation) &key)
  +  
  +  )
   
   
   ;; TODO: give nice print representation
  
positive.code: 		      #(1.0 0.0   1.0 1.0   0.0 1.0
  			0.0 1.0   0.0 0.0   1.0 0.0)))
  
  ;; TODO: remove this test data
  (when (< (hash-table-count (the-table *dynamic-rectangles*)) 1)
    (add-rectangle-as :hero (make-rectangle)))
  
  ;;Texture-----------------------------------------------------------------------
  
  ;; TODO: integrate "texatl"
  
negative.code:   (let ((rectangle (gethash name (the-table *dynamic-rectangles*))))
      (move-rectangle rectangle direction-vec2)))
  
  
  
  ;;;Animation
  
  
  (defun make-animation ()
    (make-instance 'animation))
  
  (defun change-animation (rectangle new-mode new-direction &optional new-sprite-name)
    (let ((animation-state (animation-state rectangle)))
      (with-slots (sprite-name mode direction) animation-state
        (setf mode new-mode
  	    direction new-direction)
        (when new-sprite-name
  	(setf sprite-name new-sprite-name)))))
  
  ;; (defmethod apply-animation-state ((rectangle rectangle))
  ;;   (let ((animation-state (animation-state rectangle)))
  ;;     (with-slots (sprite-name))
  ;;     (texatl.cl:with-sprite (x0 y0 x1 y1)
  ;; 	*global-spritesheet*)))
  
  (defmethod animate ((rectangle rectangle))
    (when (slot-boundp (slot-value rectangle 'animation-state) 'spritesheet)
      (apply-animation-state rectangle)))
  
  (defun print-animation-state (rectangle)
    (let ((animation-state (slot-value rectangle 'animation-state)))
      (with-slots (start-time frame sprite-name mode direction default-animation)
  	animation-state
        ;; TODO: make a neat table
        (format t "~&start-time:~a ~&frame:~a ~&sprite:~a ~&mode~a ~&direction:~a ~&default:~a~%"
  	      start-time frame sprite-name mode direction default-animation))))
  
  ;; TODO: delete
  (defun tex (rectangle)
    (with-slots (tex-x1 tex-x2 tex-y1 tex-y2) rectangle
      (list tex-x1 tex-x2 tex-y1 tex-y2)))
  
  ;;Test data---------------------------------------------------------------------
  
  ;; TODO: remove this test data
  (when (< (hash-table-count (the-table *dynamic-rectangles*)) 1)
    (add-rectangle-as :hero (make-rectangle)))
  
  