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

;; definition of type sprite-vec-data-2d
(deftype sprite-vec-data-2d (structure)
  ((x-y-z-sx    vector   :inline :offset-assert   0)
   (flag-rot-sy vector   :inline :offset-assert  16)
   (r-g-b-a     vector   :inline :offset-assert  32)
   (x           float            :offset          0)
   (y           float            :offset          4)
   (z           float            :offset          8)
   (sx          float            :offset         12)
   (sy          float            :offset         28)
   (rot         float            :offset         24)
   (flag        int32            :offset         16)
   (matrix      int32            :offset         20)
   (warp-turns  int32            :offset         16)
   (r           float            :offset         32)
   (g           float            :offset         36)
   (b           float            :offset         40)
   (a           float            :offset         44)
   (trans       vector3s :inline :offset          0)
   (color       rgbaf    :inline :offset         32)
   (data        uint128  1       :offset          0)
   (data64      uint64   6       :offset          0)
   )
  :method-count-assert 9
  :size-assert         #x30
  :flag-assert         #x900000030
  )

;; definition for method 3 of type sprite-vec-data-2d
(defmethod inspect sprite-vec-data-2d ((obj sprite-vec-data-2d))
  (format #t "[~8x] ~A~%" obj 'sprite-vec-data-2d)
  (format #t "~Tx-y-z-sx: #<vector @ #x~X>~%" (&-> obj x))
  (format #t "~Tflag-rot-sy: #<vector @ #x~X>~%" (&-> obj flag))
  (format #t "~Tr-g-b-a: #<vector @ #x~X>~%" (&-> obj r))
  (format #t "~Tx: ~f~%" (-> obj x))
  (format #t "~Ty: ~f~%" (-> obj y))
  (format #t "~Tz: ~f~%" (-> obj z))
  (format #t "~Tsx: ~f~%" (-> obj sx))
  (format #t "~Tsy: ~f~%" (-> obj sy))
  (format #t "~Trot: ~f~%" (-> obj rot))
  (format #t "~Tflag: ~D~%" (-> obj flag))
  (format #t "~Tmatrix: ~D~%" (-> obj matrix))
  (format #t "~Twarp-turns: ~D~%" (-> obj flag))
  (format #t "~Tr: ~f~%" (-> obj r))
  (format #t "~Tg: ~f~%" (-> obj g))
  (format #t "~Tb: ~f~%" (-> obj b))
  (format #t "~Ta: ~f~%" (-> obj a))
  (format #t "~Ttrans: #<vector3s @ #x~X>~%" (&-> obj x))
  (format #t "~Tcolor: #<rgbaf @ #x~X>~%" (&-> obj r))
  (format #t "~Tdata[1] @ #x~X~%" (&-> obj x))
  (format #t "~Tdata64[6] @ #x~X~%" (&-> obj x))
  obj
  )

;; definition of type sprite-array-2d
(deftype sprite-array-2d (basic)
  ((num-sprites int32                       2 :offset-assert   4)
   (num-valid   int32                       2 :offset-assert  12)
   (vec-data    pointer                       :offset-assert  20)
   (adgif-data  (inline-array adgif-shader)   :offset-assert  24)
   (pad         uint128                     4 :offset-assert  32)
   (data        uint128                     1 :offset-assert  96)
   )
  :method-count-assert 9
  :size-assert         #x70
  :flag-assert         #x900000070
  (:methods
    (new (symbol type int int) _type_ 0)
    )
  )

;; definition for method 3 of type sprite-array-2d
(defmethod inspect sprite-array-2d ((obj sprite-array-2d))
  (format #t "[~8x] ~A~%" obj (-> obj type))
  (format #t "~Tnum-sprites[2] @ #x~X~%" (-> obj num-sprites))
  (format #t "~Tnum-valid[2] @ #x~X~%" (-> obj num-valid))
  (format #t "~Tvec-data: #x~X~%" (-> obj vec-data))
  (format #t "~Tadgif-data: #x~X~%" (-> obj adgif-data))
  (format #t "~Tpad[4] @ #x~X~%" (-> obj pad))
  (format #t "~Tdata[1] @ #x~X~%" (-> obj data))
  obj
  )

;; definition of type sprite-vec-data-3d
(deftype sprite-vec-data-3d (structure)
  ((x-y-z-sx    vector   :inline :offset-assert   0)
   (qx-qy-qz-sy vector   :inline :offset-assert  16)
   (r-g-b-a     vector   :inline :offset-assert  32)
   (x           float            :offset          0)
   (y           float            :offset          4)
   (z           float            :offset          8)
   (sx          float            :offset         12)
   (sy          float            :offset         28)
   (qx          float            :offset         16)
   (qy          float            :offset         20)
   (qz          float            :offset         24)
   (r           float            :offset         32)
   (g           float            :offset         36)
   (b           float            :offset         40)
   (a           float            :offset         44)
   (trans       vector3s :inline :offset          0)
   (rot         vector3s :inline :offset         16)
   (color       rgbaf    :inline :offset         32)
   (data        uint128  1       :offset          0)
   )
  :method-count-assert 9
  :size-assert         #x30
  :flag-assert         #x900000030
  )

;; definition for method 3 of type sprite-vec-data-3d
(defmethod inspect sprite-vec-data-3d ((obj sprite-vec-data-3d))
  (format #t "[~8x] ~A~%" obj 'sprite-vec-data-3d)
  (format #t "~Tx-y-z-sx: #<vector @ #x~X>~%" (-> obj x-y-z-sx))
  (format #t "~Tqx-qy-qz-sy: #<vector @ #x~X>~%" (-> obj qx-qy-qz-sy))
  (format #t "~Tr-g-b-a: #<vector @ #x~X>~%" (-> obj r-g-b-a))
  (format #t "~Tx: ~f~%" (-> obj x-y-z-sx x))
  (format #t "~Ty: ~f~%" (-> obj x-y-z-sx y))
  (format #t "~Tz: ~f~%" (-> obj x-y-z-sx z))
  (format #t "~Tsx: ~f~%" (-> obj x-y-z-sx w))
  (format #t "~Tsy: ~f~%" (-> obj qx-qy-qz-sy w))
  (format #t "~Tqx: ~f~%" (-> obj qx-qy-qz-sy x))
  (format #t "~Tqy: ~f~%" (-> obj qx-qy-qz-sy y))
  (format #t "~Tqz: ~f~%" (-> obj qx-qy-qz-sy z))
  (format #t "~Tr: ~f~%" (-> obj r-g-b-a x))
  (format #t "~Tg: ~f~%" (-> obj r-g-b-a y))
  (format #t "~Tb: ~f~%" (-> obj r-g-b-a z))
  (format #t "~Ta: ~f~%" (-> obj r-g-b-a w))
  (format #t "~Ttrans: #<vector3s @ #x~X>~%" (-> obj x-y-z-sx))
  (format #t "~Trot: #<vector3s @ #x~X>~%" (-> obj qx-qy-qz-sy))
  (format #t "~Tcolor: #<rgbaf @ #x~X>~%" (-> obj r-g-b-a))
  (format #t "~Tdata[1] @ #x~X~%" (-> obj x-y-z-sx))
  obj
  )

;; definition of type sprite-array-3d
(deftype sprite-array-3d (basic)
  ((num-sprites int32                       2 :offset-assert   4)
   (num-valid   int32                       2 :offset-assert  12)
   (vec-data    pointer                       :offset-assert  20)
   (adgif-data  (inline-array adgif-shader)   :offset-assert  24)
   (data        uint128                     1 :offset-assert  32)
   )
  :method-count-assert 9
  :size-assert         #x30
  :flag-assert         #x900000030
  (:methods
    (new (symbol type int int) _type_ 0)
    )
  )

;; definition for method 3 of type sprite-array-3d
(defmethod inspect sprite-array-3d ((obj sprite-array-3d))
  (format #t "[~8x] ~A~%" obj (-> obj type))
  (format #t "~Tnum-sprites[2] @ #x~X~%" (-> obj num-sprites))
  (format #t "~Tnum-valid[2] @ #x~X~%" (-> obj num-valid))
  (format #t "~Tvec-data: #x~X~%" (-> obj vec-data))
  (format #t "~Tadgif-data: #x~X~%" (-> obj adgif-data))
  (format #t "~Tdata[1] @ #x~X~%" (-> obj data))
  obj
  )

;; failed to figure out what this is:
0
