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

;; definition of type palette-fade-control
(deftype palette-fade-control (structure)
  ((trans      vector :inline :offset-assert   0)
   (fade       float          :offset-assert  16)
   (actor-dist float          :offset-assert  20)
   )
  :method-count-assert 9
  :size-assert         #x18
  :flag-assert         #x900000018
  )

;; definition for method 3 of type palette-fade-control
(defmethod inspect palette-fade-control ((obj palette-fade-control))
  (format #t "[~8x] ~A~%" obj 'palette-fade-control)
  (format #t "~Ttrans: #<vector @ #x~X>~%" (-> obj trans))
  (format #t "~Tfade: ~f~%" (-> obj fade))
  (format #t "~Tactor-dist: ~f~%" (-> obj actor-dist))
  obj
  )

;; definition of type palette-fade-controls
(deftype palette-fade-controls (basic)
  ((control palette-fade-control 8 :inline :offset-assert  16)
   )
  :method-count-assert 11
  :size-assert         #x110
  :flag-assert         #xb00000110
  (:methods
    (reset! (_type_) symbol 9)
    (set-fade! (_type_ int float float vector) object 10)
    )
  )

;; definition for method 3 of type palette-fade-controls
(defmethod inspect palette-fade-controls ((obj palette-fade-controls))
  (format #t "[~8x] ~A~%" obj (-> obj type))
  (format #t "~Tcontrol[8] @ #x~X~%" (-> obj control))
  obj
  )

;; definition (perm) for symbol *palette-fade-controls*, type palette-fade-controls
(define-perm *palette-fade-controls* palette-fade-controls (new 'global 'palette-fade-controls))

;; definition of type time-of-day-proc
(deftype time-of-day-proc (process)
  ((year            int32                     :offset-assert 112)
   (month           int32                     :offset-assert 116)
   (week            int32                     :offset-assert 120)
   (day             int32                     :offset-assert 124)
   (hour            int32                     :offset-assert 128)
   (minute          int32                     :offset-assert 132)
   (second          int32                     :offset-assert 136)
   (frame           int32                     :offset-assert 140)
   (time-of-day     float                     :offset-assert 144)
   (time-ratio      float                     :offset-assert 148)
   (star-count      int32                     :offset-assert 152)
   (stars           sparticle-launch-control  :offset-assert 156)
   (sun-count       int32                     :offset-assert 160)
   (sun             sparticle-launch-control  :offset-assert 164)
   (green-sun-count int32                     :offset-assert 168)
   (green-sun       sparticle-launch-control  :offset-assert 172)
   (moon-count      int32                     :offset-assert 176)
   (moon            sparticle-launch-control  :offset-assert 180)
   )
  :heap-base #x50
  :method-count-assert 14
  :size-assert         #xb8
  :flag-assert         #xe005000b8
  (:states
    time-of-day-tick
    )
  )

;; definition for method 3 of type time-of-day-proc
(defmethod inspect time-of-day-proc ((obj time-of-day-proc))
  (let ((t9-0 (method-of-type process inspect)))
    (t9-0 obj)
    )
  (format #t "~T~Tyear: ~D~%" (-> obj year))
  (format #t "~T~Tmonth: ~D~%" (-> obj month))
  (format #t "~T~Tweek: ~D~%" (-> obj week))
  (format #t "~T~Tday: ~D~%" (-> obj day))
  (format #t "~T~Thour: ~D~%" (-> obj hour))
  (format #t "~T~Tminute: ~D~%" (-> obj minute))
  (format #t "~T~Tsecond: ~D~%" (-> obj second))
  (format #t "~T~Tframe: ~D~%" (-> obj frame))
  (format #t "~T~Ttime-of-day: ~f~%" (-> obj time-of-day))
  (format #t "~T~Ttime-ratio: ~f~%" (-> obj time-ratio))
  (format #t "~T~Tstar-count: ~D~%" (-> obj star-count))
  (format #t "~T~Tstars: ~A~%" (-> obj stars))
  (format #t "~T~Tsun-count: ~D~%" (-> obj sun-count))
  (format #t "~T~Tsun: ~A~%" (-> obj sun))
  (format #t "~T~Tgreen-sun-count: ~D~%" (-> obj green-sun-count))
  (format #t "~T~Tgreen-sun: ~A~%" (-> obj green-sun))
  (format #t "~T~Tmoon-count: ~D~%" (-> obj moon-count))
  (format #t "~T~Tmoon: ~A~%" (-> obj moon))
  obj
  )

;; definition of type time-of-day-palette
(deftype time-of-day-palette (basic)
  ((width  int32   :offset-assert   4)
   (height int32   :offset-assert   8)
   (pad    int32   :offset-assert  12)
   (data   int32 1 :offset-assert  16)
   )
  :method-count-assert 9
  :size-assert         #x14
  :flag-assert         #x900000014
  )

;; definition for method 3 of type time-of-day-palette
(defmethod inspect time-of-day-palette ((obj time-of-day-palette))
  (format #t "[~8x] ~A~%" obj (-> obj type))
  (format #t "~Twidth: ~D~%" (-> obj width))
  (format #t "~Theight: ~D~%" (-> obj height))
  (format #t "~Tpad: ~D~%" (-> obj pad))
  (format #t "~Tdata[1] @ #x~X~%" (-> obj data))
  obj
  )

;; definition of type time-of-day-context
(deftype time-of-day-context (basic)
  ((active-count         uint32                 :offset-assert   4)
   (interp               float                  :offset-assert   8)
   (current-interp       float                  :offset-assert  12)
   (moods                mood-context 2         :offset-assert  16)
   (current-fog          mood-fog     :inline   :offset-assert  32)
   (current-sun          mood-sun     :inline   :offset-assert  80)
   (current-prt-color    vector       :inline   :offset-assert 112)
   (current-shadow       vector       :inline   :offset-assert 128)
   (current-shadow-color vector       :inline   :offset-assert 144)
   (light-group          light-group  9 :inline :offset-assert 160)
   (title-light-group    light-group  :inline   :offset-assert 1888)
   (time                 float                  :offset-assert 2080)
   (target-interp        float                  :offset-assert 2084)
   (erase-color          rgba                   :offset-assert 2088)
   (num-stars            float                  :offset-assert 2092)
   (light-masks-0        uint8        2         :offset-assert 2096)
   (light-masks-1        uint8        2         :offset-assert 2098)
   (light-interp         float        2         :offset-assert 2100)
   (sky                  symbol                 :offset-assert 2108)
   (sun-fade             float                  :offset-assert 2112)
   (title-updated        symbol                 :offset-assert 2116)
   )
  :method-count-assert 9
  :size-assert         #x848
  :flag-assert         #x900000848
  )

;; definition for method 3 of type time-of-day-context
(defmethod inspect time-of-day-context ((obj time-of-day-context))
  (format #t "[~8x] ~A~%" obj (-> obj type))
  (format #t "~Tactive-count: ~D~%" (-> obj active-count))
  (format #t "~Tinterp: ~f~%" (-> obj interp))
  (format #t "~Tcurrent-interp: ~f~%" (-> obj current-interp))
  (format #t "~Tmoods[2] @ #x~X~%" (-> obj moods))
  (format #t "~Tcurrent-fog: #<mood-fog @ #x~X>~%" (-> obj current-fog))
  (format #t "~Tcurrent-sun: #<mood-sun @ #x~X>~%" (-> obj current-sun))
  (format #t "~Tcurrent-prt-color: #<vector @ #x~X>~%" (-> obj current-prt-color))
  (format #t "~Tcurrent-shadow: #<vector @ #x~X>~%" (-> obj current-shadow))
  (format #t "~Tcurrent-shadow-color: #<vector @ #x~X>~%" (-> obj current-shadow-color))
  (format #t "~Tlight-group[9] @ #x~X~%" (-> obj light-group))
  (format #t "~Ttitle-light-group: #<light-group @ #x~X>~%" (-> obj title-light-group))
  (format #t "~Ttime: ~f~%" (-> obj time))
  (format #t "~Ttarget-interp: ~f~%" (-> obj target-interp))
  (format #t "~Terase-color: ~D~%" (-> obj erase-color))
  (format #t "~Tnum-stars: ~f~%" (-> obj num-stars))
  (format #t "~Tlight-masks-0[2] @ #x~X~%" (-> obj light-masks-0))
  (format #t "~Tlight-masks-1[2] @ #x~X~%" (-> obj light-masks-1))
  (format #t "~Tlight-interp[2] @ #x~X~%" (-> obj light-interp))
  (format #t "~Tsky: ~A~%" (-> obj sky))
  (format #t "~Tsun-fade: ~f~%" (-> obj sun-fade))
  (format #t "~Ttitle-updated: ~A~%" (-> obj title-updated))
  obj
  )

;; definition of type time-of-day-dma
(deftype time-of-day-dma (structure)
  ((outa  uint32 256 :offset-assert   0)
   (outb  uint32 256 :offset-assert 1024)
   (banka uint32 256 :offset-assert 2048)
   (bankb uint32 256 :offset-assert 3072)
   )
  :method-count-assert 9
  :size-assert         #x1000
  :flag-assert         #x900001000
  )

;; definition for method 3 of type time-of-day-dma
(defmethod inspect time-of-day-dma ((obj time-of-day-dma))
  (format #t "[~8x] ~A~%" obj 'time-of-day-dma)
  (format #t "~Touta[256] @ #x~X~%" (-> obj outa))
  (format #t "~Toutb[256] @ #x~X~%" (-> obj outb))
  (format #t "~Tbanka[256] @ #x~X~%" (-> obj banka))
  (format #t "~Tbankb[256] @ #x~X~%" (-> obj bankb))
  obj
  )

;; definition for symbol *time-of-day-mode*, type int
(define *time-of-day-mode* 8)

;; definition for symbol *time-of-day-context*, type time-of-day-context
(define *time-of-day-context* (new 'static 'time-of-day-context))

;; failed to figure out what this is:
0
