jak-project/test/decompiler/reference/lights-h_REF.gc
Tyler Wilding 73a4f2c83e
decomp: lights.gc (#420)
* scripts: Hack script to quickly identify the next goal_src file that hasn't been decomp'd yet

* config: Delete old type_hints file

* decomp: Decompile lights.gc

* decomp-tests: Add offline tests and temporary forward defs

* vs: Rename / add new offline test run config

* decomp: Add formatted lights.gc source

* decomp: Temporary define stub in geometry,gc

* decomp: Cleanup `lights-group` handling
2021-05-07 20:54:20 -04:00

214 lines
6.1 KiB
Common Lisp

;;-*-Lisp-*-
(in-package goal)
;; definition of type vu-lights
(deftype vu-lights (structure)
((direction vector 3 :inline :offset-assert 0)
(color vector 3 :inline :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))
)