Files
jak-project/test/decompiler/reference/jak1/engine/geometry/bounding-box_REF.gc
T
Hat Kid da5aef8d60 decomp: finish target-[util|darkjak|swim|gun] | water | water-anim | crates | dark-eco-pool, fix skelgroup detection, add failed store/load warnings and clean up jak 3 config (#1958)
Almost done:
- `target-handler` (`(none)` event handler casts and CFG error)
- `target2` (`(none)` event handler casts)
- `powerups` (`cloud-track` does some weird stuff with `handle`s)
- `gun-states` (CFG error)

Some progress in:
- `water-flow`

Additionally:

- Clean up the two year old Jak 3 config file and add a config skeleton
(disassembling seems to not have worked, but I was able to dump obj
files and the `all_scripts` file)
- Fix automatic skelgroup detection and `defskelgroup` macro for Jak 2
(closes #1950)
- When a function decompiles without any major errors, a warning is
generated with the op id for each unresolved load and store that will
likely fail to compile (closes #1933)
2022-10-14 19:35:57 -04:00

141 lines
3.9 KiB
Common Lisp
Vendored
Generated

;;-*-Lisp-*-
(in-package goal)
;; definition for function box-vector-enside?
(defun box-vector-enside? ((box bounding-box) (pt vector))
(and (< (-> box min x) (-> pt x))
(< (-> box min y) (-> pt y))
(< (-> box min z) (-> pt z))
(< (-> pt x) (-> box max x))
(< (-> pt y) (-> box max y))
(< (-> pt z) (-> box max z))
)
)
;; definition for function box-vector-inside?
(defun box-vector-inside? ((box bounding-box) (pt vector))
(and (>= (-> pt x) (-> box min x))
(>= (-> pt y) (-> box min y))
(>= (-> pt z) (-> box min z))
(>= (-> box max x) (-> pt x))
(>= (-> box max y) (-> pt y))
(>= (-> box max z) (-> pt z))
)
)
;; definition for method 11 of type bounding-box
;; WARN: Failed load: (set! vf3 (l.vf a2-0)) at op 0
;; WARN: Failed load: (set! vf4 (l.vf a1-0)) at op 1
(defmethod set-from-point-offset! bounding-box ((obj bounding-box) (arg0 vector3s) (arg1 vector3s))
(rlet ((vf0 :class vf)
(vf1 :class vf)
(vf2 :class vf)
(vf3 :class vf)
(vf4 :class vf)
(vf5 :class vf)
)
(init-vf0-vector)
(.lvf vf3 arg1)
(.lvf vf4 arg0)
(.add.vf vf5 vf4 vf3)
(.min.vf vf1 vf4 vf5)
(.max.vf vf2 vf4 vf5)
(.mov.vf vf1 vf0 :mask #b1000)
(.mov.vf vf2 vf0 :mask #b1000)
(.svf (&-> obj min quad) vf1)
(.svf (&-> obj max quad) vf2)
0
)
)
;; definition for method 10 of type bounding-box
;; WARN: Failed load: (set! vf3 (l.vf a1-0)) at op 2
(defmethod add-point! bounding-box ((obj bounding-box) (arg0 vector3s))
(rlet ((vf1 :class vf)
(vf2 :class vf)
(vf3 :class vf)
)
(.lvf vf1 (&-> obj min quad))
(.lvf vf2 (&-> obj max quad))
(.lvf vf3 arg0)
(.min.vf vf1 vf1 vf3)
(.max.vf vf2 vf2 vf3)
(.svf (&-> obj min quad) vf1)
(.svf (&-> obj max quad) vf2)
0
)
)
;; definition for method 15 of type bounding-box
(defmethod add-box! bounding-box ((obj bounding-box) (arg0 bounding-box))
(rlet ((vf1 :class vf)
(vf2 :class vf)
(vf3 :class vf)
(vf4 :class vf)
)
(.lvf vf1 (&-> obj min quad))
(.lvf vf2 (&-> obj max quad))
(.lvf vf3 (&-> arg0 min quad))
(.lvf vf4 (&-> arg0 max quad))
(.min.vf vf1 vf1 vf3)
(.max.vf vf2 vf2 vf4)
(.svf (&-> obj min quad) vf1)
(.svf (&-> obj max quad) vf2)
0
)
)
;; definition for method 12 of type bounding-box
;; WARN: Failed load: (set! vf4 (l.vf a2-0)) at op 0
;; WARN: Failed load: (set! vf5 (l.vf a1-0)) at op 1
(defmethod set-from-point-offset-pad! bounding-box ((obj bounding-box) (arg0 vector3s) (arg1 vector3s) (arg2 float))
(rlet ((vf0 :class vf)
(vf1 :class vf)
(vf2 :class vf)
(vf3 :class vf)
(vf4 :class vf)
(vf5 :class vf)
(vf6 :class vf)
)
(init-vf0-vector)
(.lvf vf4 arg1)
(.lvf vf5 arg0)
(.mov vf1 arg2)
(.add.vf vf6 vf5 vf4)
(.min.vf vf2 vf5 vf6)
(.max.vf vf3 vf5 vf6)
(.add.x.vf vf3 vf3 vf1 :mask #b111)
(.sub.x.vf vf2 vf2 vf1 :mask #b111)
(.mov.vf vf2 vf0 :mask #b1000)
(.mov.vf vf3 vf0 :mask #b1000)
(.svf (&-> obj min quad) vf2)
(.svf (&-> obj max quad) vf3)
0
)
)
;; definition for method 13 of type bounding-box
(defmethod set-from-sphere! bounding-box ((obj bounding-box) (arg0 sphere))
(rlet ((vf0 :class vf)
(vf1 :class vf)
(vf2 :class vf)
(vf3 :class vf)
)
(init-vf0-vector)
(.lvf vf1 (&-> arg0 quad))
(.sub.w.vf vf2 vf1 vf1 :mask #b111)
(.add.w.vf vf3 vf1 vf1 :mask #b111)
(.mov.vf vf2 vf0 :mask #b1000)
(.mov.vf vf3 vf0 :mask #b1000)
(.svf (&-> obj min quad) vf2)
(.svf (&-> obj max quad) vf3)
0
)
)
;; definition for method 14 of type bounding-box
;; ERROR: function was not converted to expressions. Cannot decompile.
;; definition for method 9 of type bounding-box
;; ERROR: function was not converted to expressions. Cannot decompile.