mirror of
https://github.com/open-goal/jak-project
synced 2026-08-16 05:09:45 -04:00
f7bd0752f8
* wip * getting stuff set up so we can actually run test cases * better handle block entry stuff * types2 working on gstring * comments * math ref working * up to first stack stuff * stack fixes * bounding box * math stuff is working * float fixes * temp debug for (method 9 profile-array) * stupid stupid bug * debugging * everything is broken * some amount of type stuff works * bitfield * texture bitfields not working * temp * types * more stuff * type check * temp * float related fixes for light and res problems * revisit broken files, fix bugs * more types * vector debug * bug fixes for decompiler crashes in harder functions * update goal_src
235 lines
7.7 KiB
Common Lisp
Vendored
Generated
235 lines
7.7 KiB
Common Lisp
Vendored
Generated
;;-*-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))
|
|
(when (not obj)
|
|
(set! obj obj)
|
|
(goto cfg-4)
|
|
)
|
|
(format #t "[~8x] ~A~%" obj 'vu-lights)
|
|
(format #t "~1Tdirection[3] @ #x~X~%" (-> obj direction))
|
|
(format #t "~1Tcolor[3] @ #x~X~%" (-> obj color))
|
|
(format #t "~1Tambient: ~`vector`P~%" (-> obj ambient))
|
|
(label cfg-4)
|
|
obj
|
|
)
|
|
|
|
;; definition of type light
|
|
(deftype light (structure)
|
|
((direction vector :inline :offset-assert 0)
|
|
(color rgbaf :inline :offset-assert 16)
|
|
(extra vector :inline :offset-assert 32)
|
|
(level float :offset 32)
|
|
(luminance float :offset 40)
|
|
(priority float :offset 44)
|
|
(bytes uint8 4 :offset 36)
|
|
(mask uint16 :offset 36)
|
|
(palette-index int8 :offset 39)
|
|
)
|
|
:method-count-assert 9
|
|
:size-assert #x30
|
|
:flag-assert #x900000030
|
|
)
|
|
|
|
;; definition for method 3 of type light
|
|
(defmethod inspect light ((obj light))
|
|
(when (not obj)
|
|
(set! obj obj)
|
|
(goto cfg-4)
|
|
)
|
|
(format #t "[~8x] ~A~%" obj 'light)
|
|
(format #t "~1Tdirection: #<vector @ #x~X>~%" (-> obj direction))
|
|
(format #t "~1Tcolor: #<rgbaf @ #x~X>~%" (-> obj color))
|
|
(format #t "~1Textra: #<vector @ #x~X>~%" (-> obj extra))
|
|
(format #t "~1Tlevel: ~f~%" (-> obj extra x))
|
|
(format #t "~1Tluminance: ~f~%" (-> obj extra z))
|
|
(format #t "~1Tpriority: ~f~%" (-> obj extra w))
|
|
(format #t "~1Tbytes[4] @ #x~X~%" (&-> obj extra y))
|
|
(format #t "~1Tmask: ~D~%" (-> obj mask))
|
|
(format #t "~1Tpalette-index: ~D~%" (-> obj palette-index))
|
|
(label cfg-4)
|
|
obj
|
|
)
|
|
|
|
;; definition of type light-sphere
|
|
(deftype light-sphere (structure)
|
|
((name string :offset-assert 0)
|
|
(bsphere vector :inline :offset-assert 16)
|
|
(direction vector :inline :offset-assert 32)
|
|
(color vector :inline :offset-assert 48)
|
|
(decay-start float :offset 4)
|
|
(ambient-point-ratio float :offset 8)
|
|
(brightness float :offset 12)
|
|
(bytes uint8 4 :offset 60)
|
|
(mask uint16 :offset 60)
|
|
(palette-index int8 :offset 63)
|
|
)
|
|
:method-count-assert 9
|
|
:size-assert #x40
|
|
:flag-assert #x900000040
|
|
)
|
|
|
|
;; definition for method 3 of type light-sphere
|
|
(defmethod inspect light-sphere ((obj light-sphere))
|
|
(when (not obj)
|
|
(set! obj obj)
|
|
(goto cfg-4)
|
|
)
|
|
(format #t "[~8x] ~A~%" obj 'light-sphere)
|
|
(format #t "~1Tname: ~A~%" (-> obj name))
|
|
(format #t "~1Tbsphere: ~`vector`P~%" (-> obj bsphere))
|
|
(format #t "~1Tdirection: ~`vector`P~%" (-> obj direction))
|
|
(format #t "~1Tcolor: ~`vector`P~%" (-> obj color))
|
|
(format #t "~1Tdecay-start: ~f~%" (-> obj decay-start))
|
|
(format #t "~1Tambient-point-ratio: ~f~%" (-> obj ambient-point-ratio))
|
|
(format #t "~1Tbrightness: ~f~%" (-> obj brightness))
|
|
(format #t "~1Tbytes[4] @ #x~X~%" (&-> obj color w))
|
|
(format #t "~1Tmask: ~D~%" (-> obj mask))
|
|
(format #t "~1Tpalette-index: ~D~%" (-> obj palette-index))
|
|
(label cfg-4)
|
|
obj
|
|
)
|
|
|
|
;; definition of type light-hash-bucket
|
|
(deftype light-hash-bucket (structure)
|
|
((index uint16 :offset-assert 0)
|
|
(count uint16 :offset-assert 2)
|
|
)
|
|
:method-count-assert 9
|
|
:size-assert #x4
|
|
:flag-assert #x900000004
|
|
)
|
|
|
|
;; definition for method 3 of type light-hash-bucket
|
|
(defmethod inspect light-hash-bucket ((obj light-hash-bucket))
|
|
(when (not obj)
|
|
(set! obj obj)
|
|
(goto cfg-4)
|
|
)
|
|
(format #t "[~8x] ~A~%" obj 'light-hash-bucket)
|
|
(format #t "~1Tindex: ~D~%" (-> obj index))
|
|
(format #t "~1Tcount: ~D~%" (-> obj count))
|
|
(label cfg-4)
|
|
obj
|
|
)
|
|
|
|
;; definition of type light-hash
|
|
(deftype light-hash (basic)
|
|
((num-lights uint16 :offset-assert 4)
|
|
(num-indices uint16 :offset-assert 6)
|
|
(num-buckets uint16 :offset-assert 8)
|
|
(bucket-step uint8 2 :offset-assert 10)
|
|
(base-trans vector :inline :offset-assert 16)
|
|
(axis-scale vector :inline :offset-assert 32)
|
|
(dimension-array vector4w :inline :offset-assert 48)
|
|
(bucket-array pointer :offset-assert 64)
|
|
(index-array pointer :offset-assert 68)
|
|
(light-sphere-array (inline-array light-sphere) :offset-assert 72)
|
|
)
|
|
:method-count-assert 9
|
|
:size-assert #x4c
|
|
:flag-assert #x90000004c
|
|
)
|
|
|
|
;; definition for method 3 of type light-hash
|
|
(defmethod inspect light-hash ((obj light-hash))
|
|
(when (not obj)
|
|
(set! obj obj)
|
|
(goto cfg-4)
|
|
)
|
|
(format #t "[~8x] ~A~%" obj (-> obj type))
|
|
(format #t "~1Tnum-lights: ~D~%" (-> obj num-lights))
|
|
(format #t "~1Tnum-indices: ~D~%" (-> obj num-indices))
|
|
(format #t "~1Tnum-buckets: ~D~%" (-> obj num-buckets))
|
|
(format #t "~1Tbucket-step[2] @ #x~X~%" (-> obj bucket-step))
|
|
(format #t "~1Tbase-trans: #<vector @ #x~X>~%" (-> obj base-trans))
|
|
(format #t "~1Taxis-scale: #<vector @ #x~X>~%" (-> obj axis-scale))
|
|
(format #t "~1Tdimension-array: #<vector4w @ #x~X>~%" (-> obj dimension-array))
|
|
(format #t "~1Tbucket-array: #x~X~%" (-> obj bucket-array))
|
|
(format #t "~1Tindex-array: #x~X~%" (-> obj index-array))
|
|
(format #t "~1Tlight-sphere-array: #x~X~%" (-> obj light-sphere-array))
|
|
(label cfg-4)
|
|
obj
|
|
)
|
|
|
|
;; definition of type light-hash-work
|
|
(deftype light-hash-work (structure)
|
|
((ones vector4w :inline :offset-assert 0)
|
|
)
|
|
:method-count-assert 9
|
|
:size-assert #x10
|
|
:flag-assert #x900000010
|
|
)
|
|
|
|
;; definition for method 3 of type light-hash-work
|
|
(defmethod inspect light-hash-work ((obj light-hash-work))
|
|
(when (not obj)
|
|
(set! obj obj)
|
|
(goto cfg-4)
|
|
)
|
|
(format #t "[~8x] ~A~%" obj 'light-hash-work)
|
|
(format #t "~1Tones: #<vector4w @ #x~X>~%" (-> obj ones))
|
|
(label cfg-4)
|
|
obj
|
|
)
|
|
|
|
;; definition for symbol *light-hash*, type light-hash
|
|
(define *light-hash* (the-as light-hash #f))
|
|
|
|
;; definition for method 2 of type light
|
|
(defmethod print light ((obj light))
|
|
(format
|
|
#t
|
|
"#<light [~F] ~F ~F ~F "
|
|
(-> obj extra 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)
|
|
(lights light 4 :inline :offset 0)
|
|
)
|
|
: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))
|
|
(when (not obj)
|
|
(set! obj obj)
|
|
(goto cfg-4)
|
|
)
|
|
(format #t "[~8x] ~A~%" obj 'light-group)
|
|
(format #t "~1Tdir0: ~`light`P~%" (-> obj dir0))
|
|
(format #t "~1Tdir1: ~`light`P~%" (-> obj dir1))
|
|
(format #t "~1Tdir2: ~`light`P~%" (-> obj dir2))
|
|
(format #t "~1Tambi: ~`light`P~%" (-> obj ambi))
|
|
(label cfg-4)
|
|
obj
|
|
)
|
|
|
|
;; failed to figure out what this is:
|
|
0
|