mirror of
https://github.com/open-goal/jak-project
synced 2026-08-08 18:44:15 -04:00
[decompile] decomp time-of-day-h, fix mood-h, update sky-h, make art-h almost work (#415)
* [decompiler] make certain floats decompile to constants * update various types in `mood-h`, `time-of-day-h` and `art-h` * fix `time-of-day-context` * add some offline tests * make `new-dynamic-structure` decompile at least * formatting * Update all-types.gc * Update all-types.gc
This commit is contained in:
@@ -138,6 +138,12 @@
|
||||
(define-extern quaternion-from-two-vectors-max-angle! (function quaternion vector vector float quaternion))
|
||||
(define-extern vector-xz-length (function vector float))
|
||||
|
||||
;; trigonometry
|
||||
(defconstant PI (the-as float #x40490fda))
|
||||
(defconstant MINUS_PI (the-as float #xc0490fda))
|
||||
(define-extern sin-rad (function float float))
|
||||
(define-extern cos-rad (function float float))
|
||||
|
||||
(defmacro .sync.l ()
|
||||
`(none))
|
||||
|
||||
|
||||
@@ -0,0 +1,213 @@
|
||||
;;-*-Lisp-*-
|
||||
(in-package goal)
|
||||
|
||||
;; definition of type vu-lights
|
||||
(deftype vu-lights (structure)
|
||||
((direction uint128 3 :offset-assert 0)
|
||||
(color uint128 3 :offset-assert 48)
|
||||
(ambient vector :inline :offset-assert 96)
|
||||
)
|
||||
:method-count-assert 9
|
||||
:size-assert #x70
|
||||
:flag-assert #x900000070
|
||||
)
|
||||
|
||||
;; definition for method 3 of type vu-lights
|
||||
(defmethod inspect vu-lights ((obj vu-lights))
|
||||
(format #t "[~8x] ~A~%" obj 'vu-lights)
|
||||
(format #t "~Tdirection[3] @ #x~X~%" (-> obj direction))
|
||||
(format #t "~Tcolor[3] @ #x~X~%" (-> obj color))
|
||||
(format #t "~Tambient: ~`vector`P~%" (-> obj ambient))
|
||||
obj
|
||||
)
|
||||
|
||||
;; definition of type light
|
||||
(deftype light (structure)
|
||||
((direction vector :inline :offset-assert 0)
|
||||
(color rgbaf :inline :offset-assert 16)
|
||||
(levels vector :inline :offset-assert 32)
|
||||
(level float :offset 32)
|
||||
(sort-level float :offset 36)
|
||||
)
|
||||
:method-count-assert 9
|
||||
:size-assert #x30
|
||||
:flag-assert #x900000030
|
||||
)
|
||||
|
||||
;; definition for method 3 of type light
|
||||
(defmethod inspect light ((obj light))
|
||||
(format #t "[~8x] ~A~%" obj 'light)
|
||||
(format #t "~Tdirection: #<vector @ #x~X>~%" (-> obj direction))
|
||||
(format #t "~Tcolor: #<rgbaf @ #x~X>~%" (-> obj color))
|
||||
(format #t "~Tlevels: #<vector @ #x~X>~%" (-> obj levels))
|
||||
(format #t "~Tlevel: ~f~%" (-> obj levels x))
|
||||
(format #t "~Tsort-level: ~f~%" (-> obj levels y))
|
||||
obj
|
||||
)
|
||||
|
||||
;; definition of type light-ellipse
|
||||
(deftype light-ellipse (structure)
|
||||
((matrix matrix :inline :offset-assert 0)
|
||||
(color rgbaf :inline :offset-assert 64)
|
||||
(name basic :offset 12)
|
||||
(decay-start float :offset 28)
|
||||
(ambient-point-ratio float :offset 44)
|
||||
(level float :offset 60)
|
||||
(func-symbol basic :offset 76)
|
||||
(func basic :offset 76)
|
||||
)
|
||||
:method-count-assert 9
|
||||
:size-assert #x50
|
||||
:flag-assert #x900000050
|
||||
)
|
||||
|
||||
;; definition for method 3 of type light-ellipse
|
||||
(defmethod inspect light-ellipse ((obj light-ellipse))
|
||||
(format #t "[~8x] ~A~%" obj 'light-ellipse)
|
||||
(format #t "~Tmatrix: #<matrix @ #x~X>~%" (-> obj matrix))
|
||||
(format #t "~Tcolor: #<rgbaf @ #x~X>~%" (-> obj color))
|
||||
(format #t "~Tname: ~A~%" (-> obj matrix data 3))
|
||||
(format #t "~Tdecay-start: ~f~%" (-> obj matrix data 7))
|
||||
(format #t "~Tambient-point-ratio: ~f~%" (-> obj matrix data 11))
|
||||
(format #t "~Tlevel: ~f~%" (-> obj matrix data 15))
|
||||
(format #t "~Tfunc-symbol: ~A~%" (-> obj color w))
|
||||
(format #t "~Tfunc: ~A~%" (-> obj color w))
|
||||
obj
|
||||
)
|
||||
|
||||
;; definition of type light-array
|
||||
(deftype light-array (array)
|
||||
()
|
||||
:method-count-assert 9
|
||||
:size-assert #x10
|
||||
:flag-assert #x900000010
|
||||
)
|
||||
|
||||
;; definition for method 3 of type light-array
|
||||
(defmethod inspect light-array ((obj light-array))
|
||||
(format #t "[~8x] ~A~%" obj (-> obj type))
|
||||
(format #t "~Ttype: ~A~%" (-> obj type))
|
||||
(format #t "~Tlength: ~D~%" (-> obj length))
|
||||
(format #t "~Tallocated-length: ~D~%" (-> obj allocated-length))
|
||||
(format #t "~Tcontent-type: ~A~%" (-> obj content-type))
|
||||
obj
|
||||
)
|
||||
|
||||
;; definition of type light-volume
|
||||
(deftype light-volume (basic)
|
||||
((light-array basic :offset-assert 4)
|
||||
)
|
||||
:method-count-assert 9
|
||||
:size-assert #x8
|
||||
:flag-assert #x900000008
|
||||
)
|
||||
|
||||
;; definition for method 3 of type light-volume
|
||||
(defmethod inspect light-volume ((obj light-volume))
|
||||
(format #t "[~8x] ~A~%" obj (-> obj type))
|
||||
(format #t "~Tlight-array: ~A~%" (-> obj light-array))
|
||||
obj
|
||||
)
|
||||
|
||||
;; definition of type light-volume-sphere
|
||||
(deftype light-volume-sphere (light-volume)
|
||||
((bsphere sphere :inline :offset-assert 16)
|
||||
)
|
||||
:method-count-assert 9
|
||||
:size-assert #x20
|
||||
:flag-assert #x900000020
|
||||
)
|
||||
|
||||
;; definition for method 3 of type light-volume-sphere
|
||||
(defmethod inspect light-volume-sphere ((obj light-volume-sphere))
|
||||
(format #t "[~8x] ~A~%" obj (-> obj type))
|
||||
(format #t "~Tlight-array: ~A~%" (-> obj light-array))
|
||||
(format #t "~Tbsphere: #<sphere @ #x~X>~%" (-> obj bsphere))
|
||||
obj
|
||||
)
|
||||
|
||||
;; definition of type light-volume-planes
|
||||
(deftype light-volume-planes (light-volume)
|
||||
((planes vertical-planes :offset-assert 8)
|
||||
)
|
||||
:method-count-assert 9
|
||||
:size-assert #xc
|
||||
:flag-assert #x90000000c
|
||||
)
|
||||
|
||||
;; definition for method 3 of type light-volume-planes
|
||||
(defmethod inspect light-volume-planes ((obj light-volume-planes))
|
||||
(format #t "[~8x] ~A~%" obj (-> obj type))
|
||||
(format #t "~Tlight-array: ~A~%" (-> obj light-array))
|
||||
(format #t "~Tplanes: #<vertical-planes @ #x~X>~%" (-> obj planes))
|
||||
obj
|
||||
)
|
||||
|
||||
;; definition of type light-volume-array
|
||||
(deftype light-volume-array (array)
|
||||
()
|
||||
:method-count-assert 9
|
||||
:size-assert #x10
|
||||
:flag-assert #x900000010
|
||||
)
|
||||
|
||||
;; definition for method 3 of type light-volume-array
|
||||
(defmethod inspect light-volume-array ((obj light-volume-array))
|
||||
(format #t "[~8x] ~A~%" obj (-> obj type))
|
||||
(format #t "~Ttype: ~A~%" (-> obj type))
|
||||
(format #t "~Tlength: ~D~%" (-> obj length))
|
||||
(format #t "~Tallocated-length: ~D~%" (-> obj allocated-length))
|
||||
(format #t "~Tcontent-type: ~A~%" (-> obj content-type))
|
||||
obj
|
||||
)
|
||||
|
||||
;; definition for method 2 of type light
|
||||
(defmethod print light ((obj light))
|
||||
(format
|
||||
#t
|
||||
"#<light [~F] ~F ~F ~F "
|
||||
(-> obj levels x)
|
||||
(-> obj direction x)
|
||||
(-> obj direction y)
|
||||
(-> obj direction z)
|
||||
)
|
||||
(format
|
||||
#t
|
||||
"~F ~F ~F @ #x~X>"
|
||||
(-> obj color x)
|
||||
(-> obj color y)
|
||||
(-> obj color z)
|
||||
obj
|
||||
)
|
||||
obj
|
||||
)
|
||||
|
||||
;; definition of type light-group
|
||||
(deftype light-group (structure)
|
||||
((dir0 light :inline :offset-assert 0)
|
||||
(dir1 light :inline :offset-assert 48)
|
||||
(dir2 light :inline :offset-assert 96)
|
||||
(ambi light :inline :offset-assert 144)
|
||||
)
|
||||
:method-count-assert 9
|
||||
:size-assert #xc0
|
||||
:flag-assert #x9000000c0
|
||||
)
|
||||
|
||||
;; definition for method 3 of type light-group
|
||||
(defmethod inspect light-group ((obj light-group))
|
||||
(format #t "[~8x] ~A~%" obj 'light-group)
|
||||
(format #t "~Tdir0: ~`light`P~%" (-> obj dir0))
|
||||
(format #t "~Tdir1: ~`light`P~%" (-> obj dir1))
|
||||
(format #t "~Tdir2: ~`light`P~%" (-> obj dir2))
|
||||
(format #t "~Tambi: ~`light`P~%" (-> obj ambi))
|
||||
obj
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(let ((v0-9 0))
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,266 @@
|
||||
;;-*-Lisp-*-
|
||||
(in-package goal)
|
||||
|
||||
;; definition of type mood-fog
|
||||
(deftype mood-fog (structure)
|
||||
((fog-color vector :inline :offset-assert 0)
|
||||
(fog-dists vector :inline :offset-assert 16)
|
||||
(fog-start float :offset 16)
|
||||
(fog-end float :offset 20)
|
||||
(fog-max float :offset 24)
|
||||
(fog-min float :offset 28)
|
||||
(erase-color vector :inline :offset-assert 32)
|
||||
)
|
||||
:method-count-assert 9
|
||||
:size-assert #x30
|
||||
:flag-assert #x900000030
|
||||
)
|
||||
|
||||
;; definition for method 3 of type mood-fog
|
||||
(defmethod inspect mood-fog ((obj mood-fog))
|
||||
(format #t "[~8x] ~A~%" obj 'mood-fog)
|
||||
(format #t "~Tfog-color: #<vector @ #x~X>~%" (-> obj fog-color))
|
||||
(format #t "~Tfog-dists: #<vector @ #x~X>~%" (-> obj fog-dists))
|
||||
(format #t "~Tfog-start: (meters ~m)~%" (-> obj fog-dists x))
|
||||
(format #t "~Tfog-end: (meters ~m)~%" (-> obj fog-dists y))
|
||||
(format #t "~Tfog-max: ~f~%" (-> obj fog-dists z))
|
||||
(format #t "~Tfog-min: ~f~%" (-> obj fog-dists w))
|
||||
(format #t "~Terase-color: #<vector @ #x~X>~%" (-> obj erase-color))
|
||||
obj
|
||||
)
|
||||
|
||||
;; definition of type mood-fog-table
|
||||
(deftype mood-fog-table (structure)
|
||||
((data mood-fog 8 :inline :offset-assert 0)
|
||||
)
|
||||
:method-count-assert 9
|
||||
:size-assert #x180
|
||||
:flag-assert #x900000180
|
||||
)
|
||||
|
||||
;; definition for method 3 of type mood-fog-table
|
||||
(defmethod inspect mood-fog-table ((obj mood-fog-table))
|
||||
(format #t "[~8x] ~A~%" obj 'mood-fog-table)
|
||||
(format #t "~Tdata[8] @ #x~X~%" (-> obj data))
|
||||
obj
|
||||
)
|
||||
|
||||
;; definition of type mood-lights
|
||||
(deftype mood-lights (structure)
|
||||
((direction vector :inline :offset-assert 0)
|
||||
(lgt-color vector :inline :offset-assert 16)
|
||||
(prt-color vector :inline :offset-assert 32)
|
||||
(amb-color vector :inline :offset-assert 48)
|
||||
(shadow vector :inline :offset-assert 64)
|
||||
)
|
||||
:method-count-assert 9
|
||||
:size-assert #x50
|
||||
:flag-assert #x900000050
|
||||
)
|
||||
|
||||
;; definition for method 3 of type mood-lights
|
||||
(defmethod inspect mood-lights ((obj mood-lights))
|
||||
(format #t "[~8x] ~A~%" obj 'mood-lights)
|
||||
(format #t "~Tdirection: #<vector @ #x~X>~%" (-> obj direction))
|
||||
(format #t "~Tlgt-color: #<vector @ #x~X>~%" (-> obj lgt-color))
|
||||
(format #t "~Tprt-color: #<vector @ #x~X>~%" (-> obj prt-color))
|
||||
(format #t "~Tamb-color: #<vector @ #x~X>~%" (-> obj amb-color))
|
||||
(format #t "~Tshadow: #<vector @ #x~X>~%" (-> obj shadow))
|
||||
obj
|
||||
)
|
||||
|
||||
;; definition of type mood-lights-table
|
||||
(deftype mood-lights-table (structure)
|
||||
((data mood-lights 8 :inline :offset-assert 0)
|
||||
)
|
||||
:method-count-assert 9
|
||||
:size-assert #x280
|
||||
:flag-assert #x900000280
|
||||
)
|
||||
|
||||
;; definition for method 3 of type mood-lights-table
|
||||
(defmethod inspect mood-lights-table ((obj mood-lights-table))
|
||||
(format #t "[~8x] ~A~%" obj 'mood-lights-table)
|
||||
(format #t "~Tdata[8] @ #x~X~%" (-> obj data))
|
||||
obj
|
||||
)
|
||||
|
||||
;; definition of type mood-sun
|
||||
(deftype mood-sun (structure)
|
||||
((sun-color vector :inline :offset-assert 0)
|
||||
(env-color vector :inline :offset-assert 16)
|
||||
)
|
||||
:method-count-assert 9
|
||||
:size-assert #x20
|
||||
:flag-assert #x900000020
|
||||
)
|
||||
|
||||
;; definition for method 3 of type mood-sun
|
||||
(defmethod inspect mood-sun ((obj mood-sun))
|
||||
(format #t "[~8x] ~A~%" obj 'mood-sun)
|
||||
(format #t "~Tsun-color: #<vector @ #x~X>~%" (-> obj sun-color))
|
||||
(format #t "~Tenv-color: #<vector @ #x~X>~%" (-> obj env-color))
|
||||
obj
|
||||
)
|
||||
|
||||
;; definition of type mood-sun-table
|
||||
(deftype mood-sun-table (structure)
|
||||
((data mood-sun 8 :inline :offset-assert 0)
|
||||
)
|
||||
:method-count-assert 9
|
||||
:size-assert #x100
|
||||
:flag-assert #x900000100
|
||||
)
|
||||
|
||||
;; definition for method 3 of type mood-sun-table
|
||||
(defmethod inspect mood-sun-table ((obj mood-sun-table))
|
||||
(format #t "[~8x] ~A~%" obj 'mood-sun-table)
|
||||
(format #t "~Tdata[8] @ #x~X~%" (-> obj data))
|
||||
obj
|
||||
)
|
||||
|
||||
;; definition of type mood-context
|
||||
(deftype mood-context (basic)
|
||||
((mood-fog-table mood-fog-table :offset-assert 4)
|
||||
(mood-lights-table mood-lights-table :offset-assert 8)
|
||||
(mood-sun-table mood-sun-table :offset-assert 12)
|
||||
(fog-interp sky-color-day :offset-assert 16)
|
||||
(palette-interp sky-color-day :offset-assert 20)
|
||||
(sky-texture-interp sky-color-day :offset-assert 24)
|
||||
(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 8 :inline :offset-assert 160)
|
||||
(times vector 8 :inline :offset-assert 1696)
|
||||
(sky-times float 8 :offset-assert 1824)
|
||||
(itimes vector4w 4 :inline :offset-assert 1856)
|
||||
(state uint8 16 :offset-assert 1920)
|
||||
(num-stars float :offset-assert 1936)
|
||||
)
|
||||
:method-count-assert 9
|
||||
:size-assert #x794
|
||||
:flag-assert #x900000794
|
||||
(:methods
|
||||
(new (symbol type) _type_ 0)
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 3 of type mood-context
|
||||
(defmethod inspect mood-context ((obj mood-context))
|
||||
(format #t "[~8x] ~A~%" obj (-> obj type))
|
||||
(format
|
||||
#t
|
||||
"~Tmood-fog-table: #<mood-fog-table @ #x~X>~%"
|
||||
(-> obj mood-fog-table)
|
||||
)
|
||||
(format
|
||||
#t
|
||||
"~Tmood-lights-table: #<mood-lights-table @ #x~X>~%"
|
||||
(-> obj mood-lights-table)
|
||||
)
|
||||
(format
|
||||
#t
|
||||
"~Tmood-sun-table: #<mood-sun-table @ #x~X>~%"
|
||||
(-> obj mood-sun-table)
|
||||
)
|
||||
(format #t "~Tfog-interp: #<sky-color-day @ #x~X>~%" (-> obj fog-interp))
|
||||
(format
|
||||
#t
|
||||
"~Tpalette-interp: #<sky-color-day @ #x~X>~%"
|
||||
(-> obj palette-interp)
|
||||
)
|
||||
(format
|
||||
#t
|
||||
"~Tsky-texture-interp: #<sky-color-day @ #x~X>~%"
|
||||
(-> obj sky-texture-interp)
|
||||
)
|
||||
(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[8] @ #x~X~%" (-> obj light-group))
|
||||
(format #t "~Ttimes[8] @ #x~X~%" (-> obj times))
|
||||
(format #t "~Tsky-times[8] @ #x~X~%" (-> obj sky-times))
|
||||
(format #t "~Titimes[4] @ #x~X~%" (-> obj itimes))
|
||||
(format #t "~Tstate[16] @ #x~X~%" (-> obj state))
|
||||
(format #t "~Tnum-stars: ~f~%" (-> obj num-stars))
|
||||
obj
|
||||
)
|
||||
|
||||
;; definition for method 0 of type mood-context
|
||||
(defmethod new mood-context ((allocation symbol) (type-to-make type))
|
||||
(let
|
||||
((v0-0
|
||||
(object-new allocation type-to-make (the-as int (-> type-to-make size)))
|
||||
)
|
||||
)
|
||||
(let ((v1-2 (-> v0-0 times)))
|
||||
(set! (-> v1-2 0 x) 1.0)
|
||||
(set! (-> v1-2 0 y) 1.0)
|
||||
(set! (-> v1-2 0 z) 1.0)
|
||||
(set! (-> v1-2 0 w) 0.0)
|
||||
)
|
||||
(let ((v1-3 (-> v0-0 times 1)))
|
||||
(set! (-> v1-3 x) 1.0)
|
||||
(set! (-> v1-3 y) 1.0)
|
||||
(set! (-> v1-3 z) 1.0)
|
||||
(set! (-> v1-3 w) 0.0)
|
||||
)
|
||||
(let ((v1-4 (-> v0-0 times 2)))
|
||||
(set! (-> v1-4 x) 1.0)
|
||||
(set! (-> v1-4 y) 1.0)
|
||||
(set! (-> v1-4 z) 1.0)
|
||||
(set! (-> v1-4 w) 0.0)
|
||||
)
|
||||
(let ((v1-5 (-> v0-0 times 3)))
|
||||
(set! (-> v1-5 x) 1.0)
|
||||
(set! (-> v1-5 y) 1.0)
|
||||
(set! (-> v1-5 z) 1.0)
|
||||
(set! (-> v1-5 w) 0.0)
|
||||
)
|
||||
(let ((v1-6 (-> v0-0 times 4)))
|
||||
(set! (-> v1-6 x) 1.0)
|
||||
(set! (-> v1-6 y) 1.0)
|
||||
(set! (-> v1-6 z) 1.0)
|
||||
(set! (-> v1-6 w) 0.0)
|
||||
)
|
||||
(let ((v1-7 (-> v0-0 times 5)))
|
||||
(set! (-> v1-7 x) 1.0)
|
||||
(set! (-> v1-7 y) 1.0)
|
||||
(set! (-> v1-7 z) 1.0)
|
||||
(set! (-> v1-7 w) 0.0)
|
||||
)
|
||||
(let ((v1-8 (-> v0-0 times 6)))
|
||||
(set! (-> v1-8 x) 1.0)
|
||||
(set! (-> v1-8 y) 1.0)
|
||||
(set! (-> v1-8 z) 1.0)
|
||||
(set! (-> v1-8 w) 0.0)
|
||||
)
|
||||
(let ((v1-9 (-> v0-0 times 7)))
|
||||
(set! (-> v1-9 x) 1.0)
|
||||
(set! (-> v1-9 y) 1.0)
|
||||
(set! (-> v1-9 z) 1.0)
|
||||
(set! (-> v1-9 w) 0.0)
|
||||
)
|
||||
v0-0
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(let ((v0-7 0))
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,326 @@
|
||||
;;-*-Lisp-*-
|
||||
(in-package goal)
|
||||
|
||||
;; definition of type sky-color-hour
|
||||
(deftype sky-color-hour (structure)
|
||||
((snapshot1 int32 :offset-assert 0)
|
||||
(snapshot2 int32 :offset-assert 4)
|
||||
(morph-start float :offset-assert 8)
|
||||
(morph-end float :offset-assert 12)
|
||||
)
|
||||
:method-count-assert 9
|
||||
:size-assert #x10
|
||||
:flag-assert #x900000010
|
||||
)
|
||||
|
||||
;; definition for method 3 of type sky-color-hour
|
||||
(defmethod inspect sky-color-hour ((obj sky-color-hour))
|
||||
(format #t "[~8x] ~A~%" obj 'sky-color-hour)
|
||||
(format #t "~Tsnapshot1: ~D~%" (-> obj snapshot1))
|
||||
(format #t "~Tsnapshot2: ~D~%" (-> obj snapshot2))
|
||||
(format #t "~Tmorph-start: ~f~%" (-> obj morph-start))
|
||||
(format #t "~Tmorph-end: ~f~%" (-> obj morph-end))
|
||||
obj
|
||||
)
|
||||
|
||||
;; definition of type sky-color-day
|
||||
(deftype sky-color-day (structure)
|
||||
((hour sky-color-hour 24 :inline :offset-assert 0)
|
||||
)
|
||||
:method-count-assert 9
|
||||
:size-assert #x180
|
||||
:flag-assert #x900000180
|
||||
)
|
||||
|
||||
;; definition for method 3 of type sky-color-day
|
||||
(defmethod inspect sky-color-day ((obj sky-color-day))
|
||||
(format #t "[~8x] ~A~%" obj 'sky-color-day)
|
||||
(format #t "~Thour[24] @ #x~X~%" (-> obj hour))
|
||||
obj
|
||||
)
|
||||
|
||||
;; definition of type sky-circle-data
|
||||
(deftype sky-circle-data (structure)
|
||||
((data vector 17 :inline :offset-assert 0)
|
||||
)
|
||||
:method-count-assert 9
|
||||
:size-assert #x110
|
||||
:flag-assert #x900000110
|
||||
)
|
||||
|
||||
;; definition for method 3 of type sky-circle-data
|
||||
(defmethod inspect sky-circle-data ((obj sky-circle-data))
|
||||
(format #t "[~8x] ~A~%" obj 'sky-circle-data)
|
||||
(format #t "~Tdata[17] @ #x~X~%" (-> obj data))
|
||||
obj
|
||||
)
|
||||
|
||||
;; definition of type sky-sun-data
|
||||
(deftype sky-sun-data (structure)
|
||||
((data uint128 4 :offset-assert 0)
|
||||
(pos vector :inline :offset 0)
|
||||
(r-sun float :offset 16)
|
||||
(r-halo float :offset 20)
|
||||
(r-aurora float :offset 24)
|
||||
(c-sun-start uint32 :offset 32)
|
||||
(c-sun-end uint32 :offset 48)
|
||||
(c-halo-start uint32 :offset 36)
|
||||
(c-halo-end uint32 :offset 52)
|
||||
(c-aurora-start uint32 :offset 40)
|
||||
(c-aurora-end uint32 :offset 56)
|
||||
)
|
||||
:method-count-assert 9
|
||||
:size-assert #x40
|
||||
:flag-assert #x900000040
|
||||
)
|
||||
|
||||
;; definition for method 3 of type sky-sun-data
|
||||
(defmethod inspect sky-sun-data ((obj sky-sun-data))
|
||||
(format #t "[~8x] ~A~%" obj 'sky-sun-data)
|
||||
(format #t "~Tdata[4] @ #x~X~%" (-> obj data))
|
||||
(format #t "~Tpos: #<vector @ #x~X>~%" (-> obj data))
|
||||
(format #t "~Tr-sun: ~f~%" (-> obj r-sun))
|
||||
(format #t "~Tr-halo: ~f~%" (-> obj r-halo))
|
||||
(format #t "~Tr-aurora: ~f~%" (-> obj r-aurora))
|
||||
(format #t "~Tc-sun-start: ~D~%" (-> obj c-sun-start))
|
||||
(format #t "~Tc-sun-end: ~D~%" (-> obj c-sun-end))
|
||||
(format #t "~Tc-halo-start: ~D~%" (-> obj c-halo-start))
|
||||
(format #t "~Tc-halo-end: ~D~%" (-> obj c-halo-end))
|
||||
(format #t "~Tc-aurora-start: ~D~%" (-> obj c-aurora-start))
|
||||
(format #t "~Tc-aurora-end: ~D~%" (-> obj c-aurora-end))
|
||||
obj
|
||||
)
|
||||
|
||||
;; definition of type sky-moon-data
|
||||
(deftype sky-moon-data (structure)
|
||||
((data uint128 2 :offset-assert 0)
|
||||
(pos vector :inline :offset 0)
|
||||
(scale vector :inline :offset 16)
|
||||
)
|
||||
:method-count-assert 9
|
||||
:size-assert #x20
|
||||
:flag-assert #x900000020
|
||||
)
|
||||
|
||||
;; definition for method 3 of type sky-moon-data
|
||||
(defmethod inspect sky-moon-data ((obj sky-moon-data))
|
||||
(format #t "[~8x] ~A~%" obj 'sky-moon-data)
|
||||
(format #t "~Tdata[2] @ #x~X~%" (-> obj data))
|
||||
(format #t "~Tpos: #<vector @ #x~X>~%" (-> obj data))
|
||||
(format #t "~Tscale: #<vector @ #x~X>~%" (&-> obj data 1))
|
||||
obj
|
||||
)
|
||||
|
||||
;; definition of type sky-orbit
|
||||
(deftype sky-orbit (structure)
|
||||
((high-noon float :offset-assert 0)
|
||||
(tilt float :offset-assert 4)
|
||||
(rise float :offset-assert 8)
|
||||
(dist float :offset-assert 12)
|
||||
(min-halo float :offset-assert 16)
|
||||
(max-halo float :offset-assert 20)
|
||||
)
|
||||
:allow-misaligned :method-count-assert 9
|
||||
:size-assert #x18
|
||||
:flag-assert #x900000018
|
||||
)
|
||||
|
||||
;; definition for method 3 of type sky-orbit
|
||||
(defmethod inspect sky-orbit ((obj sky-orbit))
|
||||
(format #t "[~8x] ~A~%" obj 'sky-orbit)
|
||||
(format #t "~Thigh-noon: ~f~%" (-> obj high-noon))
|
||||
(format #t "~Ttilt: ~f~%" (-> obj tilt))
|
||||
(format #t "~Trise: ~f~%" (-> obj rise))
|
||||
(format #t "~Tdist: ~f~%" (-> obj dist))
|
||||
(format #t "~Tmin-halo: ~f~%" (-> obj min-halo))
|
||||
(format #t "~Tmax-halo: ~f~%" (-> obj max-halo))
|
||||
obj
|
||||
)
|
||||
|
||||
;; definition of type sky-upload-data
|
||||
(deftype sky-upload-data (basic)
|
||||
((circle sky-circle-data :inline :offset-assert 16)
|
||||
(sun sky-sun-data 2 :inline :offset-assert 288)
|
||||
(moon sky-moon-data :inline :offset-assert 416)
|
||||
(data uint128 27 :offset 16)
|
||||
)
|
||||
:method-count-assert 9
|
||||
:size-assert #x1c0
|
||||
:flag-assert #x9000001c0
|
||||
)
|
||||
|
||||
;; definition for method 3 of type sky-upload-data
|
||||
(defmethod inspect sky-upload-data ((obj sky-upload-data))
|
||||
(format #t "[~8x] ~A~%" obj (-> obj type))
|
||||
(format #t "~Tdata[27] @ #x~X~%" (-> obj circle))
|
||||
(format #t "~Tcircle: #<sky-circle-data @ #x~X>~%" (-> obj circle))
|
||||
(format #t "~Tsun[2] @ #x~X~%" (-> obj sun))
|
||||
(format #t "~Tmoon: #<sky-moon-data @ #x~X>~%" (-> obj moon))
|
||||
obj
|
||||
)
|
||||
|
||||
;; definition of type sky-parms
|
||||
(deftype sky-parms (basic)
|
||||
((orbit sky-orbit 3 :inline :offset-assert 4)
|
||||
(upload-data sky-upload-data :inline :offset-assert 112)
|
||||
(sun-lights light-group :inline :offset-assert 560)
|
||||
(moon-lights light-group :inline :offset-assert 752)
|
||||
(default-lights light-group :inline :offset-assert 944)
|
||||
(default-vu-lights vu-lights :inline :offset-assert 1136)
|
||||
)
|
||||
:method-count-assert 9
|
||||
:size-assert #x4e0
|
||||
:flag-assert #x9000004e0
|
||||
(:methods
|
||||
(new (symbol type) _type_ 0)
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 3 of type sky-parms
|
||||
(defmethod inspect sky-parms ((obj sky-parms))
|
||||
(format #t "[~8x] ~A~%" obj (-> obj type))
|
||||
(format #t "~Torbit[3] @ #x~X~%" (-> obj orbit))
|
||||
(format #t "~Tupload-data: #<sky-upload-data @ #x~X>~%" (-> obj upload-data))
|
||||
(format #t "~Tsun-lights: #<light-group @ #x~X>~%" (-> obj sun-lights))
|
||||
(format #t "~Tmoon-lights: #<light-group @ #x~X>~%" (-> obj moon-lights))
|
||||
(format
|
||||
#t
|
||||
"~Tdefault-lights: #<light-group @ #x~X>~%"
|
||||
(-> obj default-lights)
|
||||
)
|
||||
(format
|
||||
#t
|
||||
"~Tdefault-vu-lights: #<vu-lights @ #x~X>~%"
|
||||
(-> obj default-vu-lights)
|
||||
)
|
||||
obj
|
||||
)
|
||||
|
||||
;; definition for method 0 of type sky-parms
|
||||
(defmethod new sky-parms ((allocation symbol) (type-to-make type))
|
||||
(let
|
||||
((v0-0
|
||||
(object-new allocation type-to-make (the-as int (-> type-to-make size)))
|
||||
)
|
||||
)
|
||||
(set! (-> v0-0 upload-data type) sky-upload-data)
|
||||
v0-0
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for symbol *sky-parms*, type sky-parms
|
||||
(define *sky-parms* (new 'global 'sky-parms))
|
||||
|
||||
;; definition for symbol *sky-upload-data*, type sky-upload-data
|
||||
(define
|
||||
*sky-upload-data*
|
||||
(the-as sky-upload-data (new 'global 'sky-upload-data))
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(dotimes (gp-0 17)
|
||||
(let ((f30-0 (+ MINUS_PI (* 0.39269906 (the float (logand gp-0 15))))))
|
||||
(set! (-> *sky-upload-data* circle data gp-0 x) (* 2.2 (sin-rad f30-0)))
|
||||
(set! (-> *sky-upload-data* circle data gp-0 y) (cos-rad f30-0))
|
||||
)
|
||||
(set! (-> *sky-upload-data* circle data gp-0 z) 0.0)
|
||||
(set! (-> *sky-upload-data* circle data gp-0 w) 0.0)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(empty-form)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(empty-form)
|
||||
|
||||
;; definition of type sky-tng-data
|
||||
(deftype sky-tng-data (basic)
|
||||
((giftag-base qword :inline :offset-assert 16)
|
||||
(giftag-roof qword :inline :offset-assert 32)
|
||||
(giftag-ocean qword :inline :offset-assert 48)
|
||||
(fog vector :inline :offset-assert 64)
|
||||
(sky uint32 8 :offset-assert 80)
|
||||
(time float :offset-assert 112)
|
||||
(off-s-0 uint16 :offset-assert 116)
|
||||
(off-t-0 uint16 :offset-assert 118)
|
||||
(off-s-1 uint16 :offset-assert 120)
|
||||
(off-t-1 uint16 :offset-assert 122)
|
||||
)
|
||||
:method-count-assert 9
|
||||
:size-assert #x7c
|
||||
:flag-assert #x90000007c
|
||||
)
|
||||
|
||||
;; definition for method 3 of type sky-tng-data
|
||||
(defmethod inspect sky-tng-data ((obj sky-tng-data))
|
||||
(format #t "[~8x] ~A~%" obj (-> obj type))
|
||||
(format #t "~Tgiftag-base: #<qword @ #x~X>~%" (-> obj giftag-base))
|
||||
(format #t "~Tgiftag-roof: #<qword @ #x~X>~%" (-> obj giftag-roof))
|
||||
(format #t "~Tgiftag-ocean: #<qword @ #x~X>~%" (-> obj giftag-ocean))
|
||||
(format #t "~Tfog: #<vector @ #x~X>~%" (-> obj fog))
|
||||
(format #t "~Tsky[8] @ #x~X~%" (-> obj sky))
|
||||
(format #t "~Ttime: ~f~%" (-> obj time))
|
||||
(format #t "~Toff-s-0: ~D~%" (-> obj off-s-0))
|
||||
(format #t "~Toff-t-0: ~D~%" (-> obj off-t-0))
|
||||
(format #t "~Toff-s-1: ~D~%" (-> obj off-s-1))
|
||||
(format #t "~Toff-t-1: ~D~%" (-> obj off-t-1))
|
||||
obj
|
||||
)
|
||||
|
||||
;; definition of type sky-work
|
||||
(deftype sky-work (structure)
|
||||
((adgif-tmpl dma-gif-packet :inline :offset-assert 0)
|
||||
(draw-tmpl dma-gif-packet :inline :offset-assert 32)
|
||||
(blend-tmpl dma-gif-packet :inline :offset-assert 64)
|
||||
(sky-data uint128 5 :offset-assert 96)
|
||||
(cloud-data uint128 5 :offset-assert 176)
|
||||
)
|
||||
:method-count-assert 9
|
||||
:size-assert #x100
|
||||
:flag-assert #x900000100
|
||||
)
|
||||
|
||||
;; definition for method 3 of type sky-work
|
||||
(defmethod inspect sky-work ((obj sky-work))
|
||||
(format #t "[~8x] ~A~%" obj 'sky-work)
|
||||
(format #t "~Tadgif-tmpl: #<dma-gif-packet @ #x~X>~%" (-> obj adgif-tmpl))
|
||||
(format #t "~Tdraw-tmpl: #<dma-gif-packet @ #x~X>~%" (-> obj draw-tmpl))
|
||||
(format #t "~Tblend-tmpl: #<dma-gif-packet @ #x~X>~%" (-> obj blend-tmpl))
|
||||
(format #t "~Tsky-data[5] @ #x~X~%" (-> obj sky-data))
|
||||
(format #t "~Tcloud-data[5] @ #x~X~%" (-> obj cloud-data))
|
||||
obj
|
||||
)
|
||||
|
||||
;; definition of type sky-vertex
|
||||
(deftype sky-vertex (structure)
|
||||
((pos vector :inline :offset-assert 0)
|
||||
(stq vector :inline :offset-assert 16)
|
||||
(col vector :inline :offset-assert 32)
|
||||
)
|
||||
:method-count-assert 9
|
||||
:size-assert #x30
|
||||
:flag-assert #x900000030
|
||||
)
|
||||
|
||||
;; definition for method 3 of type sky-vertex
|
||||
(defmethod inspect sky-vertex ((obj sky-vertex))
|
||||
(format #t "[~8x] ~A~%" obj 'sky-vertex)
|
||||
(format #t "~Tpos: #<vector @ #x~X>~%" (-> obj pos))
|
||||
(format #t "~Tstq: #<vector @ #x~X>~%" (-> obj stq))
|
||||
(format #t "~Tcol: #<vector @ #x~X>~%" (-> obj col))
|
||||
obj
|
||||
)
|
||||
|
||||
;; definition for symbol *sky-drawn*, type symbol
|
||||
(define *sky-drawn* #f)
|
||||
|
||||
;; definition for symbol *cloud-drawn*, type symbol
|
||||
(define *cloud-drawn* #f)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(let ((v0-15 0))
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -22,6 +22,10 @@ const std::unordered_set<std::string> g_object_files_to_decompile = {
|
||||
/* gap */
|
||||
"mspace-h", "drawable-h", "drawable-group-h",
|
||||
/* gap */
|
||||
"lights-h",
|
||||
/* gap */
|
||||
"sky-h", "mood-h", /* "time-of-day-h", */
|
||||
/* gap */
|
||||
"bounding-box",
|
||||
/* gap */
|
||||
"sync-info-h", "sync-info"};
|
||||
@@ -40,6 +44,10 @@ const std::vector<std::string> g_object_files_to_check_against_reference = {
|
||||
"display",
|
||||
/* gap */
|
||||
"mspace-h", "drawable-h", "drawable-group-h",
|
||||
/* gap */
|
||||
"lights-h",
|
||||
/* gap */
|
||||
"sky-h", "mood-h", /* "time-of-day-h", */
|
||||
/* gap */ "bounding-box",
|
||||
/* gap */
|
||||
"sync-info-h", "sync-info"};
|
||||
|
||||
Reference in New Issue
Block a user