;;-*-Lisp-*-
(in-package goal)

;; name: height-map-h.gc
;; name in dgo: height-map-h
;; dgos: DESRESC, HGA, WWD, CWI, LFACTORY

;; DECOMP BEGINS

(deftype xz-height-map (structure)
  ((offset         float  3)
   (x-offset       float  :overlay-at (-> offset 0))
   (y-offset       float  :overlay-at (-> offset 1))
   (z-offset       float  :overlay-at (-> offset 2))
   (x-inv-spacing  float)
   (z-inv-spacing  float)
   (y-scale        float)
   (dim            int16  2)
   (x-dim          int16  :overlay-at (-> dim 0))
   (z-dim          int16  :overlay-at (-> dim 1))
   (data           (pointer int8))
   )
  (:methods
    (get-height-at-point (_type_ vector) float)
    (debug-draw-mesh (_type_ vector) none)
    (debug-print (_type_) none)
    (debug-draw-at-point (_type_ vector) none)
    (debug-draw (_type_ vector) none)
    (debug-add-offset (_type_ vector int) none)
    )
  )

(define-extern *traffic-height-map* xz-height-map)

(defun get-traffic-height ((arg0 vector))
  (get-height-at-point *traffic-height-map* arg0)
  )
