
(defclass bob object
  ((-obj- (sprite)) sp)
  ((-flt-) mx my ma mx1 my1 ma1)
  ((-flt-) x y a vx vy va ax ay aa)
  ((-flt-) xmin xmax ymin ymax amin amax)
  ((-int-) boundmode)                   ; 0=none, 1=bounce, 2=wrap
  ((-flt-) age vis)
  ((-flt-) c ct))

(defmethod bob draw () 
  (when vis
    (==> set-frame ())
    (==> sp move (int x) (int y)) 
    (==> sp drawc)))

;; bounce on a wall at lx ly with normal lvx lvy
;; with efficacy eff
(defmethod bob bounce (lx ly lvx lvy eff)
  ((-flt-) lx ly lvx lvy eff)
  (let ((d (+ (* lvx (- x lx)) (* lvy (- y ly)))))
    (when (< d 0)
      
  ())

(defmethod bob update (fx fy fa dt)
  (setq ax (* mx1 fx)) (setq ay (* my1 fy)) (setq aa (* ma1 fa))
  (incr vx (* dt ax)) (incr vy (* dt ay)) (incr va (* dt aa))
  (incr x (* dt vx)) (incr y (* dt vy)) (incr y (* dt vy))
  (cond 
   ((= 1 boundmode) 
    (



(defmethod bob bob (lx ly lvx lvy lax lay lage lsp)
  (setq m 1) (setq m1 (/ 1 m))
  (setq sp lsp) (setq x lx) (setq y ly)
  (setq vx lvx) (setq vy lvy) 
  (setq ax lax) (setq ay lay) (setq age lage))
(defmethod bob update (dt)
  (incr vx (* dt ax)) (incr vy (* dt ay))
  (incr x (* dt vx)) (incr y (* dt vy))
  (incr life (- deltat)))
(defmethod bob draw () (==> sp move x y) (==> sp drawc))
  