Files
jak-project/test/decompiler/reference/engine/collide/collide-touch-h_REF.gc
T
Tyler Wilding 5f1ed7ab60 decomp: decompile *-obs files (#856)
* decomp: mostly finish `cam-master`

* decomp/scripts: lots of work in cam-states

* stash

* Merge remote-tracking branch 'water111/master' into decomp/camera-master

Updated submodule third-party/googletest

* decompiler: Add support for non power of 2 offsets for inline arr access

* decomp: mostly finish `cam-states` need to fix a macro issue

* blocked: `cam-master` decompiler crash when adding casts

* decomp: finish `cam-states-dbg`

* decomp: mostly finish `pov-camera` with the exception of joint-related code

* decomp: `cam-debug` finished decompiling, no way does this compile yet though

* decomp: considerable work done in `cam-layout`

* decomp: `cam-layout` almost done!

* decomp: `pov-camera` finished, TC tests will fail for now

* decomp: working on resolving issues

* decomp: cam-layout decompiling

* fixing more issues in cam-master...one event handler remains

* skip problematic function in `cam-master` for now

* gsrc: update res macros

* decomp: finish `cam-states`

* decomp: giving up on `cam-debug`

* tests: allow skipping state handlers in ref tests

* decomp: working through cam-layout bugs

* decomp: allow for shifting non-integers

* decomp: finalize `cam-layout` and `cam-master`

* decomp: finalize `cam-states`

* cleanup: bi-annual formatting of the casting files

* formatting

* decomp: start working on beach-obs

* blocked: `beach-obs` mostly finished, but handle cast issues and unknown `prebind` func signature

* blocked: `villagep-obs` done, `s6` not being referred to as `self`

* decomp: finish `citadel-obs`

* decomp: finish `darkcave-obs`

* blocked: need to allow `hud-h` to decompile properly (#f as static pointer)

* decomp: finish `jungle-obs`

* decomp: finish `village-obs`

* blocked: `misty-obs` handle cast issues

* decomp: finish `village2-obs`

* decomp: 1 function left in `swamp-obs`, particle related -- maybe we know now?

* decomp: finish `swamp-obs`

* blocked: `maincave-obs` handle casts

* decomp: finish `sunken-obs`

* blocked: `rolling-obs` handle casts and hud-parts

* decomp: finish `firecanyon-obs`

* decomp: finish `ogre-obs`

* blocked: `village3-obs` gives up type analysis!

* blocked: `snow-obs` has hud-parts and handle casts code

* decomp: finish `snow-flutflut-obs`

* blocked: `lavatube-obs` has s6-1 issue

* blocked: `title-obs` handle cast issues

* fixed post merge problems

* decomp: finish `jungleb-obs`

* blocked: `training-obs` has `s6-1` issue

* fix type consistency

* scripts: Extend update script to handle the game-text-id enum as well

* git: Update git attributes to effectively halve PR burden

* fixed `sound-play-by-name` signature

* fix particle definitions in firecanyon-obs

* fix func signature in racer-states

* update ref tests

* tests: update current ref tests

* tests: add `joint` to ref-tests

* tests: add `process-drawable` to ref-tests

* updated gsrc

* add back manual fix

* address most feedback, update source files

* get rid of forward declarations in `darkcave-obs`

Co-authored-by: ManDude <7569514+ManDude@users.noreply.github.com>
2021-11-05 21:29:32 -04:00

218 lines
7.2 KiB
Common Lisp
Vendored
Generated

;;-*-Lisp-*-
(in-package goal)
;; definition of type touching-prim
(deftype touching-prim (structure)
((cprim collide-shape-prim :offset-assert 0)
(has-tri? symbol :offset-assert 4)
(tri collide-tri-result :inline :offset-assert 16)
)
:method-count-assert 9
:size-assert #x64
:flag-assert #x900000064
)
;; definition for method 3 of type touching-prim
(defmethod inspect touching-prim ((obj touching-prim))
(format #t "[~8x] ~A~%" obj 'touching-prim)
(format #t "~Tcprim: ~A~%" (-> obj cprim))
(format #t "~Thas-tri?: ~A~%" (-> obj has-tri?))
(format #t "~Ttri: #<collide-tri-result @ #x~X>~%" (-> obj tri))
obj
)
;; definition of type touching-prims-entry
(deftype touching-prims-entry (structure)
((next touching-prims-entry :offset-assert 0)
(prev touching-prims-entry :offset-assert 4)
(allocated? symbol :offset-assert 8)
(u float :offset-assert 12)
(prim1 touching-prim :inline :offset-assert 16)
(prim2 touching-prim :inline :offset-assert 128)
)
:method-count-assert 13
:size-assert #xe4
:flag-assert #xd000000e4
(:methods
(touched-prim (_type_ collide-shape-moving touching-shapes-entry) collide-shape-prim 9)
(dummy-10 () none 10)
(dummy-11 (_type_ vector) vector 11)
(dummy-12 () none 12)
)
)
;; definition for method 3 of type touching-prims-entry
(defmethod inspect touching-prims-entry ((obj touching-prims-entry))
(format #t "[~8x] ~A~%" obj 'touching-prims-entry)
(format #t "~Tnext: #<touching-prims-entry @ #x~X>~%" (-> obj next))
(format #t "~Tprev: #<touching-prims-entry @ #x~X>~%" (-> obj prev))
(format #t "~Tallocated?: ~A~%" (-> obj allocated?))
(format #t "~Tu: ~f~%" (-> obj u))
(format #t "~Tprim1: #<touching-prim @ #x~X>~%" (-> obj prim1))
(format #t "~Tprim2: #<touching-prim @ #x~X>~%" (-> obj prim2))
obj
)
;; definition of type touching-prims-entry-pool
(deftype touching-prims-entry-pool (structure)
((head touching-prims-entry :offset-assert 0)
(nodes touching-prims-entry 64 :inline :offset-assert 16)
)
:method-count-assert 13
:size-assert #x3c10
:flag-assert #xd00003c10
(:methods
(new (symbol type) _type_ 0)
(dummy-9 () none 9)
(dummy-10 () none 10)
(init-list! (_type_) none 11)
(dummy-12 () none 12)
)
)
;; definition for method 3 of type touching-prims-entry-pool
(defmethod inspect touching-prims-entry-pool ((obj touching-prims-entry-pool))
(format #t "[~8x] ~A~%" obj 'touching-prims-entry-pool)
(format #t "~Thead: #<touching-prims-entry @ #x~X>~%" (-> obj head))
(format #t "~Tnodes[64] @ #x~X~%" (-> obj nodes))
obj
)
;; definition for method 11 of type touching-prims-entry-pool
;; INFO: Return type mismatch symbol vs none.
(defmethod init-list! touching-prims-entry-pool ((obj touching-prims-entry-pool))
(let ((prev (the-as touching-prims-entry #f)))
(let ((current (the-as touching-prims-entry (-> obj nodes))))
(set! (-> obj head) current)
(countdown (a0-1 64)
(set! (-> current prev) prev)
(let ((next (&+ current 240)))
(set! (-> current next) (the-as touching-prims-entry next))
(set! (-> current allocated?) #f)
(set! prev current)
(set! current (the-as touching-prims-entry next))
)
)
)
(set! (-> prev next) #f)
)
(none)
)
;; definition for method 0 of type touching-prims-entry-pool
;; INFO: Return type mismatch structure vs touching-prims-entry-pool.
(defmethod
new
touching-prims-entry-pool
((allocation symbol) (type-to-make type))
(let ((t9-0 (method-of-type structure new))
(v1-1 type-to-make)
)
(-> type-to-make size)
(let ((gp-0 (t9-0 allocation v1-1)))
((method-of-type touching-prims-entry-pool init-list!)
(the-as touching-prims-entry-pool gp-0)
)
(the-as touching-prims-entry-pool gp-0)
)
)
)
;; definition of type touching-shapes-entry
(deftype touching-shapes-entry (structure)
((cshape1 collide-shape :offset-assert 0)
(cshape2 collide-shape :offset-assert 4)
(resolve-u int8 :offset-assert 8)
(head touching-prims-entry :offset-assert 12)
)
:allow-misaligned :method-count-assert 18
:size-assert #x10
:flag-assert #x1200000010
(:methods
(dummy-9 () none 9)
(touched-shape (_type_ collide-shape-moving) collide-shape 10)
(dummy-11 () none 11)
(prims-touching? (_type_ collide-shape-moving uint) touching-prims-entry 12)
(dummy-13 () none 13)
(dummy-14 () none 14)
(dummy-15 () none 15)
(get-head (_type_) touching-prims-entry 16)
(unknown1 (_type_ (pointer uint32)) uint 17)
)
)
;; definition for method 3 of type touching-shapes-entry
(defmethod inspect touching-shapes-entry ((obj touching-shapes-entry))
(format #t "[~8x] ~A~%" obj 'touching-shapes-entry)
(format #t "~Tcshape1: ~A~%" (-> obj cshape1))
(format #t "~Tcshape2: ~A~%" (-> obj cshape2))
(format #t "~Tresolve-u: ~D~%" (-> obj resolve-u))
(format #t "~Thead: #<touching-prims-entry @ #x~X>~%" (-> obj head))
obj
)
;; definition of type touching-list
(deftype touching-list (structure)
((num-touching-shapes int32 :offset-assert 0)
(resolve-u int8 :offset-assert 4)
(touching-shapes touching-shapes-entry 32 :inline :offset-assert 8)
)
:method-count-assert 15
:size-assert #x208
:flag-assert #xf00000208
(:methods
(new (symbol type) _type_ 0)
(dummy-9 () none 9)
(dummy-10 () none 10)
(dummy-11 () none 11)
(dummy-12 () none 12)
(dummy-13 () none 13)
(dummy-14 (_type_) none 14)
)
)
;; definition for method 3 of type touching-list
(defmethod inspect touching-list ((obj touching-list))
(format #t "[~8x] ~A~%" obj 'touching-list)
(format #t "~Tnum-touching-shapes: ~D~%" (-> obj num-touching-shapes))
(format #t "~Tresolve-u: ~D~%" (-> obj resolve-u))
(format #t "~Ttouching-shapes[32] @ #x~X~%" (-> obj touching-shapes))
obj
)
;; definition for method 0 of type touching-list
;; INFO: Return type mismatch structure vs touching-list.
(defmethod new touching-list ((allocation symbol) (type-to-make type))
(let ((t9-0 (method-of-type structure new))
(v1-1 type-to-make)
)
(-> type-to-make size)
(let ((obj (the-as touching-list (t9-0 allocation v1-1))))
(set! (-> obj num-touching-shapes) 0)
(set! (-> obj resolve-u) 0)
obj
)
)
)
;; definition for method 16 of type touching-shapes-entry
(defmethod get-head touching-shapes-entry ((obj touching-shapes-entry))
(-> obj head)
)
;; definition for method 17 of type touching-shapes-entry
(defmethod
unknown1
touching-shapes-entry
((obj touching-shapes-entry) (arg0 (pointer uint32)))
(-> arg0 0)
)
;; definition (perm) for symbol *touching-prims-entry-pool*, type touching-prims-entry-pool
(define-perm *touching-prims-entry-pool* touching-prims-entry-pool
(new 'global 'touching-prims-entry-pool)
)
;; definition (perm) for symbol *touching-list*, type touching-list
(define-perm *touching-list* touching-list (new 'global 'touching-list))