mirror of
https://github.com/open-goal/jak-project
synced 2026-08-27 16:37:36 -04:00
111af1ec19
* decomp: finish `sidekick` * decomp: got a lot of `target` done * decompiler: Add support for non power of 2 offsets for inline arr access * decomp: finish `target` mostly * decomp: finish `water` * decomp: finished `robotboss-weapon` * decomp: finish `robotboss-misc` * decomp: finish the majority of `robotboss` * blocked: `racer` has an issue around entering a state * blocked: `target-racer` done mostly, but NYI case in one function * blocked: `racer-states` mostly finished, but bitfield issue * blocked: `billy` on state decomping * blocked: `bully` on state decomping * waiting: `rolling-lightning-mole` waiting on navigate for 2 funcs * blocked: `rolling-robber` finished but `s6-1` issue * blocked: `ogreboss` uint64's for types cant label load em! * blocked: `mother-spider` state decompilation * half-done `target-flut` * blocked: `target-flut` some sort of new bitfield state * some improvements in `racer-states` with my new-found knowledge * progress: started on `target-death` * blocked: `target-death` handle casts * decomp: finish `collide-reaction-racer` * blocked: `target-handler` handler forced to return `none` * decomp: 99% of `target2` finished * decomp: finish `target2` * gsrc: update * update post merge * address feedback * scripts: add script to detect decomp issues * fix wide-spread `collide-shape` method missing arg * some small things i changed from master * address feedback * fix typeconsistency issue
196 lines
5.6 KiB
Common Lisp
Vendored
Generated
196 lines
5.6 KiB
Common Lisp
Vendored
Generated
;;-*-Lisp-*-
|
|
(in-package goal)
|
|
|
|
;; definition of type plane-volume
|
|
(deftype plane-volume (structure)
|
|
((volume-type symbol :offset-assert 0)
|
|
(point-count int16 :offset-assert 4)
|
|
(normal-count int16 :offset-assert 6)
|
|
(first-point vector :offset-assert 8)
|
|
(first-normal vector :offset-assert 12)
|
|
(num-planes int32 :offset-assert 16)
|
|
(plane uint32 :offset-assert 20)
|
|
)
|
|
:pack-me
|
|
:method-count-assert 12
|
|
:size-assert #x18
|
|
:flag-assert #xc00000018
|
|
(:methods
|
|
(dummy-9 () none 9)
|
|
(dummy-10 () none 10)
|
|
(dummy-11 () none 11)
|
|
)
|
|
)
|
|
|
|
;; definition for method 3 of type plane-volume
|
|
(defmethod inspect plane-volume ((obj plane-volume))
|
|
(format #t "[~8x] ~A~%" obj 'plane-volume)
|
|
(format #t "~Tvolume-type: ~A~%" (-> obj volume-type))
|
|
(format #t "~Tpoint-count: ~D~%" (-> obj point-count))
|
|
(format #t "~Tnormal-count: ~D~%" (-> obj normal-count))
|
|
(format #t "~Tfirst-point: #<vector @ #x~X>~%" (-> obj first-point))
|
|
(format #t "~Tfirst-normal: #<vector @ #x~X>~%" (-> obj first-normal))
|
|
(format #t "~Tnum-planes: ~D~%" (-> obj num-planes))
|
|
(format #t "~Tplane: #x~X~%" (-> obj plane))
|
|
obj
|
|
)
|
|
|
|
;; definition of type vol-control
|
|
(deftype vol-control (basic)
|
|
((flags uint32 :offset-assert 4)
|
|
(process process-drawable :offset-assert 8)
|
|
(pos-vol-count int32 :offset-assert 12)
|
|
(pos-vol plane-volume 32 :inline :offset-assert 16)
|
|
(neg-vol-count int32 :offset-assert 784)
|
|
(neg-vol plane-volume 32 :inline :offset-assert 788)
|
|
(debug-point basic :offset-assert 1556)
|
|
(debug-normal basic :offset-assert 1560)
|
|
)
|
|
:method-count-assert 12
|
|
:size-assert #x61c
|
|
:flag-assert #xc0000061c
|
|
(:methods
|
|
(new (symbol type process-drawable) _type_ 0)
|
|
(dummy-9 (_type_) none 9)
|
|
(dummy-10 (_type_ vector) none 10)
|
|
(TODO-RENAME-11 (_type_) symbol 11)
|
|
)
|
|
)
|
|
|
|
;; definition for method 3 of type vol-control
|
|
(defmethod inspect vol-control ((obj vol-control))
|
|
(format #t "[~8x] ~A~%" obj (-> obj type))
|
|
(format #t "~Tflags: #x~X~%" (-> obj flags))
|
|
(format #t "~Tprocess: ~A~%" (-> obj process))
|
|
(format #t "~Tpos-vol-count: ~D~%" (-> obj pos-vol-count))
|
|
(format #t "~Tpos-vol[32] @ #x~X~%" (-> obj pos-vol))
|
|
(format #t "~Tneg-vol-count: ~D~%" (-> obj neg-vol-count))
|
|
(format #t "~Tneg-vol[32] @ #x~X~%" (-> obj neg-vol))
|
|
(format #t "~Tdebug-point: ~A~%" (-> obj debug-point))
|
|
(format #t "~Tdebug-normal: ~A~%" (-> obj debug-normal))
|
|
obj
|
|
)
|
|
|
|
;; definition for method 0 of type vol-control
|
|
;; INFO: Return type mismatch object vs vol-control.
|
|
;; Used lq/sq
|
|
(defmethod
|
|
new
|
|
vol-control
|
|
((allocation symbol) (type-to-make type) (arg0 process-drawable))
|
|
(let
|
|
((gp-0
|
|
(the-as
|
|
object
|
|
(object-new allocation type-to-make (the-as int (-> type-to-make size)))
|
|
)
|
|
)
|
|
)
|
|
(when (zero? (the-as vol-control gp-0))
|
|
(go process-drawable-art-error "memory")
|
|
(set! gp-0 0)
|
|
(goto cfg-13)
|
|
)
|
|
(set! (-> (the-as vol-control gp-0) process) arg0)
|
|
(let* ((s5-1 (the-as res-lump (-> (the-as vol-control gp-0) process entity)))
|
|
(s4-0
|
|
(->
|
|
((method-of-type res-lump lookup-tag-idx)
|
|
(the-as entity s5-1)
|
|
'vol
|
|
'exact
|
|
0.0
|
|
)
|
|
lo
|
|
)
|
|
)
|
|
)
|
|
(when (>= (the-as int s4-0) 0)
|
|
(let ((s3-0 (the-as uint s4-0))
|
|
(s2-0 (-> s5-1 tag s4-0))
|
|
)
|
|
0
|
|
(while (= (-> s2-0 name) (-> s5-1 tag s4-0 name))
|
|
(let
|
|
((v1-12
|
|
(make-property-data
|
|
s5-1
|
|
0.0
|
|
(the-as res-tag-pair s3-0)
|
|
(the-as pointer #f)
|
|
)
|
|
)
|
|
(a0-8
|
|
(->
|
|
(the-as vol-control gp-0)
|
|
pos-vol
|
|
(-> (the-as vol-control gp-0) pos-vol-count)
|
|
)
|
|
)
|
|
)
|
|
(set! (-> a0-8 num-planes) (the-as int (-> s2-0 elt-count)))
|
|
(set! (-> a0-8 plane) (the-as uint v1-12))
|
|
)
|
|
(+! (-> (the-as vol-control gp-0) pos-vol-count) 1)
|
|
(+! s3-0 1)
|
|
(set! s2-0 (-> s5-1 tag s3-0))
|
|
)
|
|
)
|
|
)
|
|
)
|
|
(let* ((s5-2 (the-as res-lump (-> (the-as vol-control gp-0) process entity)))
|
|
(s4-1
|
|
(->
|
|
((method-of-type res-lump lookup-tag-idx)
|
|
(the-as entity s5-2)
|
|
'cutoutvol
|
|
'exact
|
|
0.0
|
|
)
|
|
lo
|
|
)
|
|
)
|
|
)
|
|
(when (>= (the-as int s4-1) 0)
|
|
(let ((s3-1 (the-as uint s4-1))
|
|
(s2-1 (-> s5-2 tag s4-1))
|
|
)
|
|
0
|
|
(while (= (-> s2-1 name) (-> s5-2 tag s4-1 name))
|
|
(let
|
|
((v1-31
|
|
(make-property-data
|
|
s5-2
|
|
0.0
|
|
(the-as res-tag-pair s3-1)
|
|
(the-as pointer #f)
|
|
)
|
|
)
|
|
(a0-19
|
|
(->
|
|
(the-as vol-control gp-0)
|
|
neg-vol
|
|
(-> (the-as vol-control gp-0) neg-vol-count)
|
|
)
|
|
)
|
|
)
|
|
(set! (-> a0-19 num-planes) (the-as int (-> s2-1 elt-count)))
|
|
(set! (-> a0-19 plane) (the-as uint v1-31))
|
|
)
|
|
(+! (-> (the-as vol-control gp-0) neg-vol-count) 1)
|
|
(+! s3-1 1)
|
|
(set! s2-1 (-> s5-2 tag s3-1))
|
|
)
|
|
)
|
|
)
|
|
)
|
|
(label cfg-13)
|
|
(the-as vol-control gp-0)
|
|
)
|
|
)
|
|
|
|
;; definition for method 11 of type vol-control
|
|
(defmethod TODO-RENAME-11 vol-control ((obj vol-control))
|
|
(and *display-vol-marks* (logtest? (-> obj flags) 1))
|
|
)
|