g/j1: remove redundant type name in defmethods that were missed

`defmethod\s(?!new\b)[^\s]+\s[^(]`
This commit is contained in:
Tyler Wilding
2024-05-18 15:23:45 -04:00
parent 44c08d23a5
commit 588b27cbcf
40 changed files with 258 additions and 258 deletions
+3 -3
View File
@@ -413,7 +413,7 @@
(defmethod length ((this joint-anim))
(-> this length))
(defmethod inspect joint-anim-matrix
(defmethod inspect
((this joint-anim-matrix))
(format #t "[~8x] ~A~%" this (-> this type))
(format #t "~Tname: ~A~%" (-> this name))
@@ -424,7 +424,7 @@
(defmethod asize-of ((this joint-anim-matrix))
(the-as int (+ (-> joint-anim-matrix size) (* (-> this length) 64))))
(defmethod inspect joint-anim-transformq
(defmethod inspect
((this joint-anim-transformq))
(format #t "[~8x] ~A~%" this (-> this type))
(format #t "~Tname: ~A~%" (-> this name))
@@ -611,7 +611,7 @@
(defmethod asize-of ((this art-joint-anim))
(the-as int (+ (-> art size) (* (-> this length) 4))))
(defmethod inspect art-group
(defmethod inspect
((this art-group))
"Print the arts in an art-group"
(format #t "[~8x] ~A~%" this (-> this type))
+5 -5
View File
@@ -68,7 +68,7 @@
:flag-assert #x9000001d0)
;; definition for method 3 of type cam-dbg-scratch
(defmethod inspect cam-dbg-scratch
(defmethod inspect
((obj cam-dbg-scratch))
(format #t "[~8x] ~A~%" obj 'cam-dbg-scratch)
(format #t "~Tlinevec4w[2] @ #x~X~%" (-> obj linevec4w))
@@ -408,7 +408,7 @@
:flag-assert #x900000044)
;; definition for method 3 of type cam-debug-tri
(defmethod inspect cam-debug-tri
(defmethod inspect
((obj cam-debug-tri))
(format #t "[~8x] ~A~%" obj 'cam-debug-tri)
(format #t "~Tvertex[3] @ #x~X~%" (-> obj vertex))
@@ -568,7 +568,7 @@
;; definition for method 11 of type tracking-spline
;; INFO: Return type mismatch int vs none.
(defmethod print-nth-point tracking-spline
(defmethod print-nth-point
((obj tracking-spline) (arg0 int))
(if (= arg0 (-> obj used-point)) (format 0 "u") (format 0 " "))
(if (= arg0 (-> obj next-to-last-point)) (format 0 "n") (format 0 " "))
@@ -584,7 +584,7 @@
0
(none))
(defmethod tracking-spline-method-12 tracking-spline
(defmethod tracking-spline-method-12
((obj tracking-spline))
(let ((s5-0 (-> obj used-point)))
(while (!= s5-0 -134250495)
@@ -594,7 +594,7 @@
0
(none))
(defmethod tracking-spline-method-23 tracking-spline
(defmethod tracking-spline-method-23
((obj tracking-spline))
(let ((s5-0 (-> obj used-point))
(s4-0 (-> obj point (-> obj used-point) next)))
+33 -33
View File
@@ -19,7 +19,7 @@
;; DECOMP BEGINS
(defmethod debug-draw collide-cache ((obj collide-cache))
(defmethod debug-draw ((obj collide-cache))
"Debug draw all the things in the collide cache!"
(let ((gp-0 (the-as collide-cache-tri (-> obj tris))))
(countdown (s4-0 (-> obj num-tris))
@@ -74,7 +74,7 @@
(define *already-printed-exeeded-max-cache-tris* #f)
(defmethod initialize collide-cache ((obj collide-cache))
(defmethod initialize ((obj collide-cache))
"Clear the collide-cache."
(set! (-> obj num-tris) 0)
(set! (-> obj num-prims) 0)
@@ -111,7 +111,7 @@
(def-mips2c __pc-upload-collide-frag (function object object object none))
(defmethod fill-from-background collide-cache ((obj collide-cache)
(defmethod fill-from-background ((obj collide-cache)
(bsp-find-mesh-func (function bsp-header int collide-list none))
(import-mesh-func (function collide-cache object none))
)
@@ -200,7 +200,7 @@
(none)
)
(defmethod fill-from-water collide-cache ((obj collide-cache) (arg0 water-control))
(defmethod fill-from-water ((obj collide-cache) (arg0 water-control))
(rlet ((vf0 :class vf)
(vf1 :class vf)
(vf2 :class vf)
@@ -284,7 +284,7 @@
)
)
(defmethod fill-using-bounding-box collide-cache ((obj collide-cache) (arg0 bounding-box) (arg1 collide-kind) (arg2 process-drawable) (arg3 pat-surface))
(defmethod fill-using-bounding-box ((obj collide-cache) (arg0 bounding-box) (arg1 collide-kind) (arg2 process-drawable) (arg3 pat-surface))
(rlet ((Q :class vf)
(vf0 :class vf)
(vf1 :class vf)
@@ -388,7 +388,7 @@
)
)
(defmethod collide-with-box collide-fragment ((obj collide-fragment) (arg0 int) (arg1 collide-list))
(defmethod collide-with-box ((obj collide-fragment) (arg0 int) (arg1 collide-list))
(let ((s3-0 *collide-work*))
(dotimes (s2-0 arg0)
(when (and (collide-cache-using-box-test (-> obj bsphere))
@@ -409,7 +409,7 @@
(none)
)
(defmethod collide-with-box instance-tie ((obj instance-tie) (arg0 int) (arg1 collide-list))
(defmethod collide-with-box ((obj instance-tie) (arg0 int) (arg1 collide-list))
(dotimes (s3-0 arg0)
(when (and (zero? (logand (-> obj flags) 1))
(collide-cache-using-box-test (-> obj bsphere))
@@ -443,7 +443,7 @@
;; Y PROBE
;;;;;;;;;;;;;;;;;;;;;;;;;;
(defmethod fill-using-y-probe collide-cache ((obj collide-cache) (arg0 vector) (arg1 float) (arg2 collide-kind) (arg3 process-drawable) (arg4 pat-surface))
(defmethod fill-using-y-probe ((obj collide-cache) (arg0 vector) (arg1 float) (arg2 collide-kind) (arg3 process-drawable) (arg4 pat-surface))
(rlet ((vf1 :class vf)
(vf2 :class vf)
(vf3 :class vf)
@@ -548,7 +548,7 @@
;; definition for method 12 of type collide-fragment
;; INFO: Return type mismatch int vs none.
(defmethod collide-y-probe collide-fragment ((obj collide-fragment) (arg0 int) (arg1 collide-list))
(defmethod collide-y-probe ((obj collide-fragment) (arg0 int) (arg1 collide-list))
*collide-work*
(dotimes (s3-0 arg0)
(when (collide-cache-using-y-probe-test (-> obj bsphere))
@@ -566,7 +566,7 @@
;; definition for method 12 of type instance-tie
;; INFO: Return type mismatch int vs none.
(defmethod collide-y-probe instance-tie ((obj instance-tie) (arg0 int) (arg1 collide-list))
(defmethod collide-y-probe ((obj instance-tie) (arg0 int) (arg1 collide-list))
(dotimes (s3-0 arg0)
(when (and (zero? (logand (-> obj flags) 1)) (collide-cache-using-y-probe-test (-> obj bsphere)))
(let ((s2-0 (-> obj bucket-ptr collide-frag)))
@@ -612,7 +612,7 @@
)
(defmethod fill-using-line-sphere collide-cache ((obj collide-cache)
(defmethod fill-using-line-sphere ((obj collide-cache)
(arg0 vector)
(arg1 vector)
(arg2 float)
@@ -909,7 +909,7 @@
)
(defmethod collide-ray collide-fragment ((obj collide-fragment) (arg0 int) (arg1 collide-list))
(defmethod collide-ray ((obj collide-fragment) (arg0 int) (arg1 collide-list))
"Inline-array function to do line-sphere with non-instanced fragments.
If the bsphere of the mesh is in the non-aligned bounding box, the mesh will be added
to the given collide-list.
@@ -932,7 +932,7 @@
)
(defmethod collide-ray instance-tie ((obj instance-tie) (arg0 int) (arg1 collide-list))
(defmethod collide-ray ((obj instance-tie) (arg0 int) (arg1 collide-list))
"Inline-array function to do line-sphere with TIE instances.
If the bsphere of the mesh is in the non-aligned bounding box, the mesh will be added
to the given collide-list.
@@ -974,7 +974,7 @@
;; for an unknown reason, the goal compiler went insane on this function
(defmethod fill-from-foreground-using-box collide-cache ((obj collide-cache))
(defmethod fill-from-foreground-using-box ((obj collide-cache))
(local-vars
(zero uint128)
(v1-2 uint128)
@@ -1243,12 +1243,12 @@
)
)
(defmethod add-fg-prim-using-box collide-shape-prim ((obj collide-shape-prim) (arg0 collide-cache))
(defmethod add-fg-prim-using-box ((obj collide-shape-prim) (arg0 collide-cache))
(format 0 "ERROR: Illegal collide-shape-prim type passed to collide-shape-prim::add-fg-prim-using-box!~%")
(none)
)
(defmethod add-fg-prim-using-box collide-shape-prim-sphere ((obj collide-shape-prim-sphere) (arg0 collide-cache))
(defmethod add-fg-prim-using-box ((obj collide-shape-prim-sphere) (arg0 collide-cache))
(local-vars (t1-1 uint))
(nop!)
(let* ((t0-0 (-> arg0 prims))
@@ -1282,7 +1282,7 @@
(none)
)
(defmethod add-fg-prim-using-box collide-shape-prim-group ((obj collide-shape-prim-group) (arg0 collide-cache))
(defmethod add-fg-prim-using-box ((obj collide-shape-prim-group) (arg0 collide-cache))
(local-vars
(zero uint128)
(v1-2 uint128)
@@ -1362,7 +1362,7 @@
;; Foreground Y PROBE
;;;;;;;;;;;;;;;;;;;;;;;;;
(defmethod fill-from-foreground-using-y-probe collide-cache ((obj collide-cache))
(defmethod fill-from-foreground-using-y-probe ((obj collide-cache))
(local-vars
(zero uint128)
(v1-2 uint128)
@@ -1625,12 +1625,12 @@
)
)
(defmethod add-fg-prim-using-y-probe collide-shape-prim ((obj collide-shape-prim) (arg0 collide-cache))
(defmethod add-fg-prim-using-y-probe ((obj collide-shape-prim) (arg0 collide-cache))
(format 0 "ERROR: Illegal collide-shape-prim type passed to collide-shape-prim::add-fg-prim-using-y-probe!~%")
(none)
)
(defmethod add-fg-prim-using-y-probe collide-shape-prim-sphere ((obj collide-shape-prim-sphere) (arg0 collide-cache))
(defmethod add-fg-prim-using-y-probe ((obj collide-shape-prim-sphere) (arg0 collide-cache))
(local-vars (t1-1 uint))
(nop!)
(let* ((t0-0 (-> arg0 prims))
@@ -1665,7 +1665,7 @@
)
(defmethod add-fg-prim-using-y-probe collide-shape-prim-group ((obj collide-shape-prim-group) (arg0 collide-cache))
(defmethod add-fg-prim-using-y-probe ((obj collide-shape-prim-group) (arg0 collide-cache))
(local-vars
(r0-0 int)
(r0-1 int)
@@ -1782,7 +1782,7 @@
)
)
(defmethod fill-from-foreground-using-line-sphere collide-cache ((obj collide-cache))
(defmethod fill-from-foreground-using-line-sphere ((obj collide-cache))
(local-vars
(zero uint128)
(v1-1 float)
@@ -2091,7 +2091,7 @@
)
)
(defmethod add-fg-prim-using-line-sphere collide-shape-prim ((obj collide-shape-prim) (arg0 collide-cache))
(defmethod add-fg-prim-using-line-sphere ((obj collide-shape-prim) (arg0 collide-cache))
(format
0
"ERROR: Illegal collide-shape-prim type passed to collide-shape-prim::add-fg-prim-using-line-sphere!~%"
@@ -2099,7 +2099,7 @@
(none)
)
(defmethod add-fg-prim-using-line-sphere collide-shape-prim-sphere ((obj collide-shape-prim-sphere) (arg0 collide-cache))
(defmethod add-fg-prim-using-line-sphere ((obj collide-shape-prim-sphere) (arg0 collide-cache))
(local-vars (t1-1 uint))
(nop!)
(let* ((t0-0 (-> arg0 prims))
@@ -2133,7 +2133,7 @@
(none)
)
(defmethod add-fg-prim-using-line-sphere collide-shape-prim-group ((obj collide-shape-prim-group) (arg0 collide-cache))
(defmethod add-fg-prim-using-line-sphere ((obj collide-shape-prim-group) (arg0 collide-cache))
(local-vars
(zero uint128)
(v1-3 uint128)
@@ -2226,7 +2226,7 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defmethod fill-and-probe-using-y-probe collide-cache ((obj collide-cache)
(defmethod fill-and-probe-using-y-probe ((obj collide-cache)
(arg0 vector)
(arg1 float)
(arg2 collide-kind)
@@ -2238,7 +2238,7 @@
(probe-using-y-probe obj arg0 arg1 arg2 arg4 arg5)
)
(defmethod probe-using-y-probe collide-cache ((obj collide-cache) (arg0 vector) (arg1 float) (arg2 collide-kind) (arg3 collide-tri-result) (arg4 pat-surface))
(defmethod probe-using-y-probe ((obj collide-cache) (arg0 vector) (arg1 float) (arg2 collide-kind) (arg3 collide-tri-result) (arg4 pat-surface))
(rlet ((vf0 :class vf)
(vf1 :class vf)
(vf3 :class vf)
@@ -2284,7 +2284,7 @@
)
(defmethod puyp-sphere collide-cache ((obj collide-cache) (arg0 collide-puyp-work) (arg1 collide-cache-prim))
(defmethod puyp-sphere ((obj collide-cache) (arg0 collide-puyp-work) (arg1 collide-cache-prim))
(let ((f0-1 (ray-sphere-intersect
(-> arg0 start-pos)
(-> arg0 move-dist)
@@ -2316,7 +2316,7 @@
)
)
(defmethod fill-and-probe-using-line-sphere collide-cache ((obj collide-cache)
(defmethod fill-and-probe-using-line-sphere ((obj collide-cache)
(arg0 vector)
(arg1 vector)
(arg2 float)
@@ -2341,7 +2341,7 @@
)
(defmethod probe-using-line-sphere collide-cache ((obj collide-cache)
(defmethod probe-using-line-sphere ((obj collide-cache)
(arg0 vector)
(arg1 vector)
(arg2 float)
@@ -2419,12 +2419,12 @@
)
)
(defmethod fill-and-probe-using-spheres collide-cache ((obj collide-cache) (arg0 collide-using-spheres-params))
(defmethod fill-and-probe-using-spheres ((obj collide-cache) (arg0 collide-using-spheres-params))
(fill-using-spheres obj arg0)
(probe-using-spheres obj arg0)
)
(defmethod fill-using-spheres collide-cache ((obj collide-cache) (arg0 collide-using-spheres-params))
(defmethod fill-using-spheres ((obj collide-cache) (arg0 collide-using-spheres-params))
(let ((s4-0 (new 'stack-no-clear 'bounding-box)))
(set-from-spheres! s4-0 (-> arg0 spheres) (the-as int (-> arg0 num-spheres)))
;; this box looks correct
@@ -2439,7 +2439,7 @@
(none)
)
(defmethod probe-using-spheres collide-cache ((obj collide-cache) (arg0 collide-using-spheres-params))
(defmethod probe-using-spheres ((obj collide-cache) (arg0 collide-using-spheres-params))
(local-vars (v1-12 symbol))
(rlet ((vf1 :class vf)
(vf2 :class vf)
@@ -395,7 +395,7 @@
)
;; 17 cew
(defmethod should-add-to-list? collide-edge-work ((this collide-edge-work) (arg0 collide-edge-hold-item) (arg1 collide-edge-edge))
(defmethod should-add-to-list? ((this collide-edge-work) (arg0 collide-edge-hold-item) (arg1 collide-edge-edge))
(local-vars
(r0-0 uint128)
(v1-1 uint128)
@@ -90,7 +90,7 @@
)
)
(defmethod next-id! collide-mesh-cache ((obj collide-mesh-cache))
(defmethod next-id! ((obj collide-mesh-cache))
"Reset all used entries in the cache and increment the id.
If the id is zero, set it to 1"
;; ld v1, 12(a0)
+74 -74
View File
@@ -33,7 +33,7 @@
;; so there's some weirdness to get all the method dispatch stuff to work around (you can only dispatch on one type)
(defmethod should-push-away collide-shape ((obj collide-shape) (arg0 collide-shape) (arg1 collide-overlap-result))
(defmethod should-push-away ((obj collide-shape) (arg0 collide-shape) (arg1 collide-overlap-result))
"Find the overlap between two collide shapes. This is the main entry point for the overlap algorithm.
The result is returned in arg1. The obj is collided _with_ arg0 (meaning obj uses its collide-with, arg0 uses colide-as).
The best-dist is only valid if the result is #t (it should be negative then)"
@@ -115,13 +115,13 @@
;; the should-push-away-test will update the collide-overlap-result. The best-dist will be negative if they overlap.
;; it works on collide prims.
(defmethod should-push-away-test collide-shape-prim ((obj collide-shape-prim) (arg0 collide-shape-prim) (arg1 collide-overlap-result))
(defmethod should-push-away-test ((obj collide-shape-prim) (arg0 collide-shape-prim) (arg1 collide-overlap-result))
"Should be impossible to call - collide-shape-prim is abstract."
(format 0 "ERROR: collide-shape-prim::should-push-away-test was called illegally!~%")
(none)
)
(defmethod should-push-away-test collide-shape-prim-group ((obj collide-shape-prim-group) (arg0 collide-shape-prim) (arg1 collide-overlap-result))
(defmethod should-push-away-test ((obj collide-shape-prim-group) (arg0 collide-shape-prim) (arg1 collide-overlap-result))
"Update test for a group against an unknown prim.
The grouip prims use their collide with "
(local-vars (a1-3 float))
@@ -186,7 +186,7 @@
)
)
(defmethod should-push-away-reverse-test collide-shape-prim ((obj collide-shape-prim) (arg0 collide-shape-prim-group) (arg1 collide-overlap-result))
(defmethod should-push-away-reverse-test ((obj collide-shape-prim) (arg0 collide-shape-prim-group) (arg1 collide-overlap-result))
"This is a flipped version of should-push-away-test.
the group uses their collide-as"
(local-vars (a0-3 float))
@@ -246,7 +246,7 @@
)
)
(defmethod should-push-away-test collide-shape-prim-mesh ((obj collide-shape-prim-mesh) (arg0 collide-shape-prim) (arg1 collide-overlap-result))
(defmethod should-push-away-test ((obj collide-shape-prim-mesh) (arg0 collide-shape-prim) (arg1 collide-overlap-result))
"Collide a prim with a mesh. The prim must be a sphere or group of spheres"
;; first, check the prim type
@@ -329,7 +329,7 @@
(none)
)
(defmethod should-push-away-test collide-shape-prim-sphere ((obj collide-shape-prim-sphere) (arg0 collide-shape-prim) (arg1 collide-overlap-result))
(defmethod should-push-away-test ((obj collide-shape-prim-sphere) (arg0 collide-shape-prim) (arg1 collide-overlap-result))
"The push away where we manually dispatch on the type of the second."
(local-vars (v1-3 float))
(rlet ((acc :class vf)
@@ -501,14 +501,14 @@
;; these use the "offense". The offense of the thing in the cache must be higher. If the cache has 0, we reject always.
;; these use the "solid" bit of action. This must be set on both.
(defmethod collide-with-collide-cache-prim-mesh collide-shape-prim ((obj collide-shape-prim) (arg0 collide-shape-intersect) (arg1 collide-cache-prim))
(defmethod collide-with-collide-cache-prim-mesh ((obj collide-shape-prim) (arg0 collide-shape-intersect) (arg1 collide-cache-prim))
"abstract base class version."
(format 0 "ERROR: Unsupported prim type in collide-shape-prim::collide-with-collide-cache-prim-mesh!~%")
(none)
)
(defmethod collide-with-collide-cache-prim-mesh collide-shape-prim-sphere ((obj collide-shape-prim-sphere) (arg0 collide-shape-intersect) (arg1 collide-cache-prim))
(defmethod collide-with-collide-cache-prim-mesh ((obj collide-shape-prim-sphere) (arg0 collide-shape-intersect) (arg1 collide-cache-prim))
"Collide this sphere with the mesh in the real collide cache."
(local-vars (v1-4 collide-offense))
(rlet ((vf1 :class vf)
@@ -590,12 +590,12 @@
)
)
(defmethod collide-with-collide-cache-prim-mesh collide-shape-prim-mesh ((obj collide-shape-prim-mesh) (arg0 collide-shape-intersect) (arg1 collide-cache-prim))
(defmethod collide-with-collide-cache-prim-mesh ((obj collide-shape-prim-mesh) (arg0 collide-shape-intersect) (arg1 collide-cache-prim))
(format 0 "ERROR: collide-shape-prim-mesh vs. collide-cache-prim mesh is not currently supported!~%")
(none)
)
(defmethod collide-with-collide-cache-prim-mesh collide-shape-prim-group ((obj collide-shape-prim-group) (arg0 collide-shape-intersect) (arg1 collide-cache-prim))
(defmethod collide-with-collide-cache-prim-mesh ((obj collide-shape-prim-group) (arg0 collide-shape-intersect) (arg1 collide-cache-prim))
(let ((s3-0 (-> arg1 prim-core collide-as)))
(dotimes (s2-0 (-> obj num-prims))
(let ((a0-1 (-> obj prims s2-0)))
@@ -608,12 +608,12 @@
(none)
)
(defmethod collide-with-collide-cache-prim-sphere collide-shape-prim ((obj collide-shape-prim) (arg0 collide-shape-intersect) (arg1 collide-cache-prim))
(defmethod collide-with-collide-cache-prim-sphere ((obj collide-shape-prim) (arg0 collide-shape-intersect) (arg1 collide-cache-prim))
(format 0 "ERROR: Unsupported prim type in collide-shape-prim::collide-with-collide-cache-prim-sphere!~%")
(none)
)
(defmethod collide-with-collide-cache-prim-sphere collide-shape-prim-sphere ((obj collide-shape-prim-sphere) (arg0 collide-shape-intersect) (arg1 collide-cache-prim))
(defmethod collide-with-collide-cache-prim-sphere ((obj collide-shape-prim-sphere) (arg0 collide-shape-intersect) (arg1 collide-cache-prim))
(local-vars (v1-4 collide-offense) (a3-2 pat-surface))
(rlet ((vf1 :class vf)
(vf2 :class vf)
@@ -675,12 +675,12 @@
)
)
(defmethod collide-with-collide-cache-prim-sphere collide-shape-prim-mesh ((obj collide-shape-prim-mesh) (arg0 collide-shape-intersect) (arg1 collide-cache-prim))
(defmethod collide-with-collide-cache-prim-sphere ((obj collide-shape-prim-mesh) (arg0 collide-shape-intersect) (arg1 collide-cache-prim))
(format 0 "ERROR: collide-shape-prim-mesh vs. collide-cache-prim sphere is not currently supported!~%")
(none)
)
(defmethod collide-with-collide-cache-prim-sphere collide-shape-prim-group ((obj collide-shape-prim-group) (arg0 collide-shape-intersect) (arg1 collide-cache-prim))
(defmethod collide-with-collide-cache-prim-sphere ((obj collide-shape-prim-group) (arg0 collide-shape-intersect) (arg1 collide-cache-prim))
(let ((s3-0 (-> arg1 prim-core collide-as)))
(dotimes (s2-0 (-> obj num-prims))
(let ((a0-1 (-> obj prims s2-0)))
@@ -901,7 +901,7 @@
(none)
)
(defmethod set-and-handle-pat! collide-shape-moving ((obj collide-shape-moving) (arg0 pat-surface))
(defmethod set-and-handle-pat! ((obj collide-shape-moving) (arg0 pat-surface))
"Handle landing on the given pat-surface. This is likely target-specific."
;; set our pat
(set! (-> obj cur-pat) arg0)
@@ -1085,7 +1085,7 @@
)
)
(defmethod step-collison! collide-shape-moving ((obj collide-shape-moving) (arg0 vector) (arg1 vector) (arg2 float))
(defmethod step-collison! ((obj collide-shape-moving) (arg0 vector) (arg1 vector) (arg2 float))
"Take 1 step in the collision. Attempt to move at velocity of arg1, for arg2 of a step.
The resulting velocity is stored in arg0. The amount of a step actually taken is returned."
@@ -1197,7 +1197,7 @@
1.0
)
(defmethod integrate-and-collide! collide-shape ((obj collide-shape) (arg0 vector))
(defmethod integrate-and-collide! ((obj collide-shape) (arg0 vector))
"For a non-moving collide shape, we just move ourself. We have no reaction to anything we hit."
(local-vars (at-0 int))
(rlet ((vf0 :class vf)
@@ -1222,7 +1222,7 @@
)
)
(defmethod integrate-and-collide! collide-shape-moving ((obj collide-shape-moving) (arg0 vector))
(defmethod integrate-and-collide! ((obj collide-shape-moving) (arg0 vector))
"Integrate forward, with collisions and collision responses.
This will adjust our velocity based on collision.
It will process updates from hitting triangles with pat-surfaces
@@ -1283,7 +1283,7 @@
(none)
)
(defmethod integrate-and-collide! control-info ((obj control-info) (arg0 vector))
(defmethod integrate-and-collide! ((obj control-info) (arg0 vector))
"Specialization of integrate and collide for the target"
;; time it
(stopwatch-start (-> *collide-stats* total-target))
@@ -1400,7 +1400,7 @@
)
(defmethod move-to-ground-point! collide-shape-moving ((obj collide-shape-moving) (arg0 vector) (arg1 vector) (arg2 vector))
(defmethod move-to-ground-point! ((obj collide-shape-moving) (arg0 vector) (arg1 vector) (arg2 vector))
"Move the collide shape to the ground immediately:
arg0: ground point
arg1: velocity (will be modified)
@@ -1419,7 +1419,7 @@
(none)
)
(defmethod integrate-no-collide! collide-shape-moving ((obj collide-shape-moving) (arg0 vector))
(defmethod integrate-no-collide! ((obj collide-shape-moving) (arg0 vector))
"Integrate, but ignore all collisions.
Will set both trans and shadow-pos"
(local-vars (at-0 int))
@@ -1474,7 +1474,7 @@
)
)
(defmethod collide-shape-moving-method-58 collide-shape-moving ((obj collide-shape-moving) (arg0 vector))
(defmethod collide-shape-moving-method-58 ((obj collide-shape-moving) (arg0 vector))
;; not sure yet. moves shadow-pos, but possibly not trans.
(integrate-no-collide! obj arg0)
(let ((a1-1 (new 'stack-no-clear 'overlaps-others-params)))
@@ -1488,7 +1488,7 @@
#f
)
(defmethod move-to-tri! collide-shape-moving ((obj collide-shape-moving) (arg0 collide-tri-result) (arg1 vector))
(defmethod move-to-tri! ((obj collide-shape-moving) (arg0 collide-tri-result) (arg1 vector))
"Move us to tri arg0, at point arg1."
(move-to-point! obj arg1)
(logior! (-> obj status) (cshape-moving-flags onsurf onground tsurf))
@@ -1506,7 +1506,7 @@
(none)
)
(defmethod integrate-for-enemy-with-move-to-ground! collide-shape-moving ((obj collide-shape-moving)
(defmethod integrate-for-enemy-with-move-to-ground! ((obj collide-shape-moving)
(arg0 vector)
(arg1 collide-kind)
(arg2 float)
@@ -1610,7 +1610,7 @@
(none)
)
(defmethod move-to-ground collide-shape-moving ((obj collide-shape-moving) (arg0 float) (arg1 float) (arg2 symbol) (arg3 collide-kind))
(defmethod move-to-ground ((obj collide-shape-moving) (arg0 float) (arg1 float) (arg2 symbol) (arg3 collide-kind))
"Move to the ground now."
(if *debug-segment*
(add-frame
@@ -1658,7 +1658,7 @@
#t
)
(defmethod compute-acc-due-to-gravity collide-shape-moving ((obj collide-shape-moving) (arg0 vector) (arg1 float))
(defmethod compute-acc-due-to-gravity ((obj collide-shape-moving) (arg0 vector) (arg1 float))
"Compute the acceleration due to gravity."
(let* ((s4-0 (vector-negate! (new-stack-vector0) (-> obj dynam gravity))) ;; this is the acceleration from gravity.
(a2-1 (-> obj local-normal))
@@ -1680,7 +1680,7 @@
arg0
)
(defmethod fill-cache-integrate-and-collide! collide-shape ((obj collide-shape) (arg0 vector) (arg1 collide-kind))
(defmethod fill-cache-integrate-and-collide! ((obj collide-shape) (arg0 vector) (arg1 collide-kind))
"Fill the collide cache for the object, integrate, and handle collisions!"
(local-vars (at-0 int))
(rlet ((vf0 :class vf)
@@ -1721,7 +1721,7 @@
)
)
(defmethod fill-cache-for-shape! collide-shape ((obj collide-shape) (arg0 float) (arg1 collide-kind))
(defmethod fill-cache-for-shape! ((obj collide-shape) (arg0 float) (arg1 collide-kind))
"Fill cache for a box."
(let ((s5-0 (new 'stack-no-clear 'bounding-box)))
(cond
@@ -1774,7 +1774,7 @@
)
)
(defmethod build-bounding-box-for-shape collide-shape ((obj collide-shape) (arg0 bounding-box) (arg1 float) (arg2 collide-kind))
(defmethod build-bounding-box-for-shape ((obj collide-shape) (arg0 bounding-box) (arg1 float) (arg2 collide-kind))
"Build a bounding box containing the whole shape.
If the box is empty, returns #f."
(rlet ((vf0 :class vf)
@@ -1819,7 +1819,7 @@
)
;; ERROR: Bad vector register dependency: vf31
(defmethod add-to-bounding-box collide-shape-prim ((obj collide-shape-prim) (arg0 collide-kind))
(defmethod add-to-bounding-box ((obj collide-shape-prim) (arg0 collide-kind))
"Add a single prim to the bounding box. (just adds the bsphere)"
(rlet ((vf1 :class vf)
(vf2 :class vf)
@@ -1837,7 +1837,7 @@
)
)
(defmethod add-to-bounding-box collide-shape-prim-group ((obj collide-shape-prim-group) (arg0 collide-kind))
(defmethod add-to-bounding-box ((obj collide-shape-prim-group) (arg0 collide-kind))
"Add a group of prims."
(local-vars (v1-0 int) (v1-10 none) (v1-11 int) (v1-19 float))
(rlet ((vf1 :class vf)
@@ -1919,7 +1919,7 @@
)
)
(defmethod add-to-non-empty-bounding-box collide-shape-prim-group ((obj collide-shape-prim-group) (arg0 collide-kind))
(defmethod add-to-non-empty-bounding-box ((obj collide-shape-prim-group) (arg0 collide-kind))
(local-vars (v1-0 int) (v1-8 float))
(rlet ((vf1 :class vf)
(vf2 :class vf)
@@ -1968,12 +1968,12 @@
;; prim lookup
;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defmethod find-prim-by-id collide-shape ((obj collide-shape) (arg0 uint))
(defmethod find-prim-by-id ((obj collide-shape) (arg0 uint))
"Find a prim in this shape with the given id."
(find-prim-by-id (-> obj root-prim) arg0)
)
(defmethod find-prim-by-id collide-shape-prim ((obj collide-shape-prim) (arg0 uint))
(defmethod find-prim-by-id ((obj collide-shape-prim) (arg0 uint))
"Find a prim in this shape or its children with the given id."
(if (= (-> obj prim-id) arg0) ;; it's us!
(return obj)
@@ -1981,7 +1981,7 @@
(the-as collide-shape-prim #f)
)
(defmethod find-prim-by-id collide-shape-prim-group ((obj collide-shape-prim-group) (arg0 uint))
(defmethod find-prim-by-id ((obj collide-shape-prim-group) (arg0 uint))
"Find a prim in this shape or its children with the given id."
(if (= (-> obj prim-id) arg0) ;; it's us
(return obj)
@@ -2108,7 +2108,7 @@
)
(defmethod debug-draw collide-shape ((obj collide-shape))
(defmethod debug-draw ((obj collide-shape))
"Draw a collide shape"
(if (sphere-in-view-frustum? (the-as sphere (-> obj root-prim prim-core)))
(debug-draw-world-sphere (-> obj root-prim))
@@ -2138,14 +2138,14 @@
;; transform spheres by joints
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defmethod update-transforms! collide-shape ((obj collide-shape))
(defmethod update-transforms! ((obj collide-shape))
"Update all transforms for this shape. After this is called, you can use the
world-spheres."
(update-transforms! (-> obj root-prim) (-> obj process))
#f
)
(defmethod update-transforms! collide-shape-prim ((obj collide-shape-prim) (arg0 process-drawable))
(defmethod update-transforms! ((obj collide-shape-prim) (arg0 process-drawable))
"Update our world sphere, and our children's world sphere's too."
(local-vars (a0-2 float) (a0-4 float) (a0-6 float))
(rlet ((acc :class vf)
@@ -2218,21 +2218,21 @@
;; move by vector, move to point
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defmethod move-by-vector! collide-shape ((obj collide-shape) (arg0 vector))
(defmethod move-by-vector! ((obj collide-shape) (arg0 vector))
"Adjust our position by the given vector"
(vector+! (-> obj trans) (-> obj trans) arg0)
(move-by-vector! (-> obj root-prim) arg0)
(none)
)
(defmethod move-by-vector! collide-shape-prim ((obj collide-shape-prim) (arg0 vector))
(defmethod move-by-vector! ((obj collide-shape-prim) (arg0 vector))
"Adjust our position by the given vector"
(vector+! (the-as vector (-> obj prim-core)) (the-as vector (-> obj prim-core)) arg0)
(set! (-> obj prim-core world-sphere w) (-> obj local-sphere w))
(none)
)
(defmethod move-by-vector! collide-shape-prim-group ((obj collide-shape-prim-group) (arg0 vector))
(defmethod move-by-vector! ((obj collide-shape-prim-group) (arg0 vector))
"Adjust our position by the given vector"
(vector+! (the-as vector (-> obj prim-core)) (the-as vector (-> obj prim-core)) arg0)
(set! (-> obj prim-core world-sphere w) (-> obj local-sphere w))
@@ -2252,7 +2252,7 @@
(none)
)
(defmethod move-to-point! collide-shape ((obj collide-shape) (arg0 vector))
(defmethod move-to-point! ((obj collide-shape) (arg0 vector))
"Move us to exactly the given position."
(let ((v1-0 (new 'stack-no-clear 'vector)))
(vector-! v1-0 arg0 (-> obj trans))
@@ -2265,18 +2265,18 @@
;; construction functions
;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defmethod set-root-prim! collide-shape ((obj collide-shape) (arg0 collide-shape-prim))
(defmethod set-root-prim! ((obj collide-shape) (arg0 collide-shape-prim))
(set! (-> obj root-prim) arg0)
arg0
)
(defmethod set-collide-with! collide-shape-prim ((obj collide-shape-prim) (arg0 collide-kind))
(defmethod set-collide-with! ((obj collide-shape-prim) (arg0 collide-kind))
(set! (-> obj collide-with) arg0)
0
(none)
)
(defmethod set-collide-with! collide-shape-prim-group ((obj collide-shape-prim-group) (arg0 collide-kind))
(defmethod set-collide-with! ((obj collide-shape-prim-group) (arg0 collide-kind))
(set! (-> obj collide-with) arg0)
(dotimes (s4-0 (-> obj num-prims))
(set-collide-with! (-> obj prims s4-0) arg0)
@@ -2285,13 +2285,13 @@
(none)
)
(defmethod set-collide-as! collide-shape-prim ((obj collide-shape-prim) (arg0 collide-kind))
(defmethod set-collide-as! ((obj collide-shape-prim) (arg0 collide-kind))
(set! (-> obj prim-core collide-as) arg0)
0
(none)
)
(defmethod set-collide-as! collide-shape-prim-group ((obj collide-shape-prim-group) (arg0 collide-kind))
(defmethod set-collide-as! ((obj collide-shape-prim-group) (arg0 collide-kind))
(set! (-> obj prim-core collide-as) arg0)
(dotimes (s4-0 (-> obj num-prims))
(set-collide-as! (-> obj prims s4-0) arg0)
@@ -2300,19 +2300,19 @@
(none)
)
(defmethod set-root-prim-collide-with! collide-shape ((obj collide-shape) (arg0 collide-kind))
(defmethod set-root-prim-collide-with! ((obj collide-shape) (arg0 collide-kind))
(set-collide-with! (-> obj root-prim) arg0)
0
(none)
)
(defmethod set-root-prim-collide-as! collide-shape ((obj collide-shape) (arg0 collide-kind))
(defmethod set-root-prim-collide-as! ((obj collide-shape) (arg0 collide-kind))
(set-collide-as! (-> obj root-prim) arg0)
0
(none)
)
(defmethod append-prim collide-shape-prim-group ((obj collide-shape-prim-group) (arg0 collide-shape-prim))
(defmethod append-prim ((obj collide-shape-prim-group) (arg0 collide-shape-prim))
(let ((v1-0 (-> obj num-prims)))
(cond
((>= v1-0 (-> obj allocated-prims))
@@ -2327,7 +2327,7 @@
(none)
)
(defmethod find-collision-meshes collide-shape ((obj collide-shape))
(defmethod find-collision-meshes ((obj collide-shape))
(let ((s5-0 0))
(let ((v1-1 (-> obj process draw)))
(when (and (nonzero? v1-1) (-> v1-1 jgeo))
@@ -2345,13 +2345,13 @@
(update-transforms! obj)
)
(defmethod num-mesh collide-shape-prim ((obj collide-shape-prim) (arg0 collide-shape-prim))
(defmethod num-mesh ((obj collide-shape-prim) (arg0 collide-shape-prim))
(local-vars (v0-0 int))
(return 0)
v0-0
)
(defmethod num-mesh collide-shape-prim-mesh ((obj collide-shape-prim-mesh) (arg0 collide-shape-prim))
(defmethod num-mesh ((obj collide-shape-prim-mesh) (arg0 collide-shape-prim))
(let ((s4-0 (-> obj mesh-id)))
(cond
((and (>= s4-0 0) (< s4-0 (length arg0)))
@@ -2367,7 +2367,7 @@
(the-as int 0)
)
(defmethod num-mesh collide-shape-prim-group ((obj collide-shape-prim-group) (arg0 collide-shape-prim))
(defmethod num-mesh ((obj collide-shape-prim-group) (arg0 collide-shape-prim))
(let ((gp-0 0))
(countdown (s3-0 (-> obj num-prims))
(+! gp-0 (num-mesh (-> obj prims s3-0) arg0))
@@ -2376,7 +2376,7 @@
)
)
(defmethod change-mesh collide-shape-prim-mesh ((obj collide-shape-prim-mesh) (arg0 int))
(defmethod change-mesh ((obj collide-shape-prim-mesh) (arg0 int))
"Change our mesh to the given mesh ID."
(when (!= (-> obj mesh-id) arg0) ;; only if we don't have the right one.
(let ((v1-3 (-> obj cshape process draw)))
@@ -2412,7 +2412,7 @@
(none)
)
(defmethod init! collide-shape-intersect ((obj collide-shape-intersect) (arg0 vector))
(defmethod init! ((obj collide-shape-intersect) (arg0 vector))
"Initialize the intersection in the given direction."
(set! (-> obj move-vec quad) (-> arg0 quad))
(set! (-> obj best-u) -100000000.0)
@@ -2421,7 +2421,7 @@
#f
)
(defmethod debug-draw-world-sphere collide-shape-prim ((obj collide-shape-prim))
(defmethod debug-draw-world-sphere ((obj collide-shape-prim))
"Draw our sphere"
(add-debug-sphere
#t
@@ -2432,7 +2432,7 @@
)
)
(defmethod debug-draw-world-sphere collide-shape-prim-sphere ((obj collide-shape-prim-sphere))
(defmethod debug-draw-world-sphere ((obj collide-shape-prim-sphere))
"Draw our sphere"
(add-debug-sphere
#t
@@ -2453,7 +2453,7 @@
)
)
(defmethod debug-draw-world-sphere collide-shape-prim-mesh ((obj collide-shape-prim-mesh))
(defmethod debug-draw-world-sphere ((obj collide-shape-prim-mesh))
"Draw our sphere"
(add-debug-sphere
#t
@@ -2464,7 +2464,7 @@
)
)
(defmethod debug-draw-world-sphere collide-shape-prim-group ((obj collide-shape-prim-group))
(defmethod debug-draw-world-sphere ((obj collide-shape-prim-group))
"Draw our sphere"
(add-debug-sphere
#t
@@ -2479,7 +2479,7 @@
#f
)
(defmethod do-push-aways! collide-shape ((obj collide-shape))
(defmethod do-push-aways! ((obj collide-shape))
"This is the main function to call to respond"
(local-vars
(at-0 int)
@@ -2841,7 +2841,7 @@
;; overlap test
;;;;;;;;;;;;;;;;;;;;;;;
(defmethod find-overlapping-shapes collide-shape ((obj collide-shape) (arg0 overlaps-others-params))
(defmethod find-overlapping-shapes ((obj collide-shape) (arg0 overlaps-others-params))
(local-vars
(v1-2 symbol)
(v1-7 symbol)
@@ -3100,13 +3100,13 @@
)
)
(defmethod overlaps-others-test collide-shape-prim ((obj collide-shape-prim) (arg0 overlaps-others-params) (arg1 collide-shape-prim))
(defmethod overlaps-others-test ((obj collide-shape-prim) (arg0 overlaps-others-params) (arg1 collide-shape-prim))
(format 0 "ERROR: Unsupported call to collide-shape-prim::overlaps-others-test!~%")
#f
)
(defmethod overlaps-others-test collide-shape-prim-group ((obj collide-shape-prim-group) (arg0 overlaps-others-params) (arg1 collide-shape-prim))
(defmethod overlaps-others-test ((obj collide-shape-prim-group) (arg0 overlaps-others-params) (arg1 collide-shape-prim))
(local-vars (a1-3 float))
(rlet ((acc :class vf)
(vf0 :class vf)
@@ -3161,7 +3161,7 @@
)
(defmethod overlaps-others-group collide-shape-prim ((obj collide-shape-prim) (arg0 overlaps-others-params) (arg1 collide-shape-prim-group))
(defmethod overlaps-others-group ((obj collide-shape-prim) (arg0 overlaps-others-params) (arg1 collide-shape-prim-group))
"Overlap, from group."
(local-vars (a0-3 float))
(rlet ((acc :class vf)
@@ -3216,7 +3216,7 @@
)
)
(defmethod overlaps-others-test collide-shape-prim-sphere ((obj collide-shape-prim-sphere) (arg0 overlaps-others-params) (arg1 collide-shape-prim))
(defmethod overlaps-others-test ((obj collide-shape-prim-sphere) (arg0 overlaps-others-params) (arg1 collide-shape-prim))
(local-vars (v1-26 collide-action))
(let ((v1-0 (-> arg1 prim-core prim-type)))
(b! (nonzero? v1-0) cfg-2 :delay (nop!))
@@ -3294,7 +3294,7 @@
)
)
(defmethod overlaps-others-test collide-shape-prim-mesh ((obj collide-shape-prim-mesh) (arg0 overlaps-others-params) (arg1 collide-shape-prim))
(defmethod overlaps-others-test ((obj collide-shape-prim-mesh) (arg0 overlaps-others-params) (arg1 collide-shape-prim))
(local-vars (v1-26 collide-action))
(let ((v1-0 (-> arg1 prim-core prim-type)))
(b! (nonzero? v1-0) cfg-2 :delay (nop!))
@@ -3367,28 +3367,28 @@
)
)
(defmethod clear-collide-with-as collide-shape ((obj collide-shape))
(defmethod clear-collide-with-as ((obj collide-shape))
(set! (-> obj root-prim collide-with) (collide-kind))
(set! (-> obj root-prim prim-core collide-as) (collide-kind))
0
(none)
)
(defmethod backup-collide-with-as collide-shape ((obj collide-shape))
(defmethod backup-collide-with-as ((obj collide-shape))
(set! (-> obj backup-collide-with) (-> obj root-prim collide-with))
(set! (-> obj backup-collide-as) (-> obj root-prim prim-core collide-as))
0
(none)
)
(defmethod restore-collide-with-as collide-shape ((obj collide-shape))
(defmethod restore-collide-with-as ((obj collide-shape))
(set! (-> obj root-prim collide-with) (-> obj backup-collide-with))
(set! (-> obj root-prim prim-core collide-as) (-> obj backup-collide-as))
0
(none)
)
(defmethod set-collide-kinds collide-shape ((obj collide-shape) (arg0 int) (arg1 collide-kind) (arg2 collide-kind))
(defmethod set-collide-kinds ((obj collide-shape) (arg0 int) (arg1 collide-kind) (arg2 collide-kind))
(let ((s3-0 (-> obj root-prim)))
(if (logtest? (-> s3-0 prim-id) arg0)
(set! (-> s3-0 prim-core collide-as) (logior (logclear (-> s3-0 prim-core collide-as) arg1) arg2))
@@ -3413,7 +3413,7 @@
(none)
)
(defmethod set-collide-offense collide-shape ((obj collide-shape) (arg0 int) (arg1 collide-offense))
(defmethod set-collide-offense ((obj collide-shape) (arg0 int) (arg1 collide-offense))
(let ((s4-0 (-> obj root-prim)))
(if (logtest? (-> s4-0 prim-id) arg0)
(set! (-> s4-0 prim-core offense) arg1)
@@ -3438,7 +3438,7 @@
(none)
)
(defmethod send-shove-back collide-shape ((obj collide-shape) (arg0 process) (arg1 touching-shapes-entry) (arg2 float) (arg3 float) (arg4 float))
(defmethod send-shove-back ((obj collide-shape) (arg0 process) (arg1 touching-shapes-entry) (arg2 float) (arg3 float) (arg4 float))
(local-vars (sv-144 process))
(with-pp
(when arg1
@@ -3490,7 +3490,7 @@
)
)
(defmethod calc-shove-up collide-shape ((obj collide-shape) (arg0 attack-info) (arg1 float))
(defmethod calc-shove-up ((obj collide-shape) (arg0 attack-info) (arg1 float))
(set! (-> arg0 shove-up) arg1)
(let* ((s3-0 (-> obj process path))
(s2-0 (-> s3-0 curve num-cverts))
@@ -514,7 +514,7 @@
(none)
)
(defmethod prims-touching? touching-shapes-entry ((this touching-shapes-entry) (arg0 collide-shape-moving) (arg1 uint))
(defmethod prims-touching? ((this touching-shapes-entry) (arg0 collide-shape-moving) (arg1 uint))
"In a pair of collide shapes, is a prim from the given collide shape with the given prim-id mask touching the other shape?"
(cond
((= (-> this cshape1) arg0)
@@ -544,7 +544,7 @@
(the-as touching-prims-entry #f)
)
(defmethod prims-touching-action? touching-shapes-entry ((this touching-shapes-entry) (arg0 collide-shape) (arg1 collide-action) (arg2 collide-action))
(defmethod prims-touching-action? ((this touching-shapes-entry) (arg0 collide-shape) (arg1 collide-action) (arg2 collide-action))
"In a pair of collide shapes, find a pair of colliding prims where the prim from the given collide shape has at least one of the actions in arg1
and none of the actions in arg2."
(cond
@@ -107,7 +107,7 @@
)
)
(defmethod lod-set! draw-control ((obj draw-control) (arg0 int))
(defmethod lod-set! ((obj draw-control) (arg0 int))
(let ((v1-1 (max 0 (min arg0 (-> obj lod-set max-lod)))))
(set! (-> obj desired-lod) v1-1)
(when (!= (-> obj cur-lod) v1-1)
@@ -119,7 +119,7 @@
(none)
)
(defmethod lods-assign! draw-control ((obj draw-control) (arg0 lod-set))
(defmethod lods-assign! ((obj draw-control) (arg0 lod-set))
(mem-copy! (the-as pointer (-> obj lod-set)) (the-as pointer arg0) 33)
(let ((a1-2 (min (-> obj cur-lod) (-> obj lod-set max-lod))))
(set! (-> obj cur-lod) -1)
@@ -129,7 +129,7 @@
(none)
)
(defmethod setup-lods! lod-set ((obj lod-set) (arg0 skeleton-group) (arg1 art-group) (arg2 entity))
(defmethod setup-lods! ((obj lod-set) (arg0 skeleton-group) (arg1 art-group) (arg2 entity))
(local-vars (sv-16 res-tag))
(let ((s4-0 arg0)
(s5-0 arg1)
@@ -323,7 +323,7 @@
)
))
(defmethod do-joint-math! process-drawable ((obj process-drawable))
(defmethod do-joint-math! ((obj process-drawable))
(cond
((logtest? (-> obj draw status) (draw-status hidden no-anim))
)
@@ -409,7 +409,7 @@
(none)
)
(defmethod cleanup-for-death process-drawable ((obj process-drawable))
(defmethod cleanup-for-death ((obj process-drawable))
(if (type-type? (-> obj root type) collide-shape)
(clear-collide-with-as (the-as collide-shape (-> obj root)))
)
@@ -431,7 +431,7 @@
#f
)
(defmethod deactivate process-drawable ((obj process-drawable))
(defmethod deactivate ((obj process-drawable))
(if (nonzero? (-> obj part))
(kill-and-free-particles (-> obj part))
)
@@ -478,7 +478,7 @@
;; WARN: Stack slot offset 20 signed mismatch
;; WARN: Stack slot offset 20 signed mismatch
;; WARN: Stack slot offset 20 signed mismatch
(defmethod initialize-skeleton process-drawable ((obj process-drawable) (arg0 skeleton-group) (arg1 pair))
(defmethod initialize-skeleton ((obj process-drawable) (arg0 skeleton-group) (arg1 pair))
(local-vars (s3-0 draw-control) (sv-16 art-element) (sv-20 int))
(let ((s1-0 (cond
((= (-> arg0 texture-level) 2)
@@ -629,7 +629,7 @@
(none)
)
(defmethod initialize-skeleton-by-name process-drawable ((obj process-drawable) (arg0 string) (arg1 object))
(defmethod initialize-skeleton-by-name ((obj process-drawable) (arg0 string) (arg1 object))
(let ((s3-0 string->symbol))
(format (clear *temp-string*) "*~S-sg*" arg0)
(let ((s3-1 (-> (s3-0 *temp-string*) value)))
@@ -642,7 +642,7 @@
obj
)
(defmethod apply-alignment process-drawable ((obj process-drawable) (arg0 align-opts) (arg1 transformq) (arg2 vector))
(defmethod apply-alignment ((obj process-drawable) (arg0 align-opts) (arg1 transformq) (arg2 vector))
(when (logtest? arg0 (align-opts adjust-x-vel adjust-y-vel adjust-xz-vel))
(let* ((body-T-world (quaternion->matrix (new 'stack-no-clear 'matrix) (-> obj root quat)))
(world-T-body (matrix-transpose! (new 'stack-no-clear 'matrix) body-T-world))
@@ -935,7 +935,7 @@
;; ERROR: Unsupported inline assembly instruction kind - [lw ra, return-from-thread(s7)]
;; ERROR: Unsupported inline assembly instruction kind - [jr ra]
(defmethod evaluate-joint-control process-drawable ((obj process-drawable))
(defmethod evaluate-joint-control ((obj process-drawable))
(local-vars (s7-0 none) (ra-0 int))
(let ((gp-0 (-> obj skel)))
(label cfg-1)
@@ -1028,7 +1028,7 @@
(none)
)
(defmethod current-cycle-distance joint-control ((obj joint-control))
(defmethod current-cycle-distance ((obj joint-control))
(cond
((< (the-as int (-> obj root-channel)) (the-as int (-> obj channel (-> obj active-channels))))
(let ((s5-0 (-> obj root-channel (-> obj root-channel 0 group-size)))
+1 -1
View File
@@ -966,7 +966,7 @@
)
)
(defmethod inspect debug-vertex-stats ((obj debug-vertex-stats))
(defmethod inspect ((obj debug-vertex-stats))
(format #t "[~8x] ~A~%" obj (-> obj type))
(format #t "~Tlength: ~D~%" (-> obj length))
(format #t "~Tpos-count: ~D~%" (-> obj pos-count))
+2 -2
View File
@@ -42,7 +42,7 @@
)
)
(defmethod inspect dma-chcr ((obj dma-chcr))
(defmethod inspect ((obj dma-chcr))
(format #t "~Tdir: ~D~%" (-> obj dir))
(format #t "~Tmod: ~D~%" (-> obj mod))
(format #t "~Tasp: ~D~%" (-> obj asp))
@@ -391,7 +391,7 @@
)
)
(defmethod inspect vif-tag ((obj vif-tag))
(defmethod inspect ((obj vif-tag))
(format #t "~Timm: #x~X~%" (-> obj imm))
(format #t "~Tnum: ~D~%" (-> obj num))
(format #t "~Tcmd: ~D~%" (-> obj cmd))
+1 -1
View File
@@ -79,7 +79,7 @@
;; This class is a convenient wrapper around an inline-array of draw-nodes.
;; It lets you treat this array like a normal drawable (at least for collisions).
(defmethod inspect drawable-inline-array-node ((this drawable-inline-array-node))
(defmethod inspect ((this drawable-inline-array-node))
"Custom inspect for drawable-inline-array-node to print our nodes."
(format #t "[~8x] ~A~%" this (-> this type))
(format #t "~Tlength: ~D~%" (-> this length))
+1 -1
View File
@@ -18,7 +18,7 @@
)
)
(defmethod inspect drawable-group ((this drawable-group))
(defmethod inspect ((this drawable-group))
(format #t "[~8x] ~A~%" this (-> this type))
(format #t "~Tid: ~D~%" (-> this id))
(format #t "~Tlength: ~D~%" (-> this length))
+1 -1
View File
@@ -408,7 +408,7 @@
)
(defmethod add-connection engine
(defmethod add-connection
((this engine)
(proc process)
(func object) ;; not always a function, you can technically put whatever
+2 -2
View File
@@ -156,7 +156,7 @@
)
(defmethod apply-function-forward actor-link-info
(defmethod apply-function-forward
((this actor-link-info) (arg0 (function entity-actor object object)) (arg1 object))
"Iterate forward through actors, and apply this function. Starts at (-> this next)
If the function returns truthy, stop iterating."
@@ -171,7 +171,7 @@
0
)
(defmethod apply-function-reverse actor-link-info
(defmethod apply-function-reverse
((this actor-link-info) (arg0 (function entity-actor object object)) (arg1 object))
"Iterate backward through actors and apply function.
If the function returns truth, stop iterating."
@@ -144,7 +144,7 @@
;; these are used in the collision system to build bounding boxes around collision geometries, so they are quite optimized.
(defmethod add-spheres! bounding-box ((this bounding-box) (spheres (inline-array sphere)) (count int))
(defmethod add-spheres! ((this bounding-box) (spheres (inline-array sphere)) (count int))
"Add count spheres."
;; the PS2 implementation is very optimized
;; It is unrolled and 'software pipelined' to do 4 at a time.
@@ -175,7 +175,7 @@
0
)
(defmethod set-from-spheres! bounding-box ((this bounding-box) (spheres (inline-array sphere)) (count int))
(defmethod set-from-spheres! ((this bounding-box) (spheres (inline-array sphere)) (count int))
"Reset box to hold the given spheres. Note: this implementation could be optimized."
;; This is also unrolled, but does 7 at a time.
(rlet ((vf0 :class vf)
+1 -1
View File
@@ -827,7 +827,7 @@
:flag-assert #x900000010
)
(defmethod inspect gif-tag ((this gif-tag))
(defmethod inspect ((this gif-tag))
(format #t "[~8x] gif-tag~%" this)
(format #t "~Tnloop: ~4d~%" (-> this nloop))
(format #t "~Teop : ~4d~%" (-> this eop))
+2 -2
View File
@@ -95,7 +95,7 @@
(the-as int (+ (* (-> this mat-xfer-count) 2) 4))
)
(defmethod inspect merc-fragment-control ((this merc-fragment-control))
(defmethod inspect ((this merc-fragment-control))
"Debug print a merc-fragment-control"
(format #t "[~8x] ~A~%" this 'merc-fragment-control)
(format #t "~Tunsigned-four-count: ~D~%" (-> this unsigned-four-count))
@@ -145,7 +145,7 @@
(none)
)
(defmethod inspect merc-ctrl ((this merc-ctrl))
(defmethod inspect ((this merc-ctrl))
"Print a merc-ctrl"
(format #t "[~8x] ~A~%" this (-> this type))
(format #t "~Tname: ~A~%" (-> this name))
@@ -57,7 +57,7 @@
)
)
(defmethod clear-offset-bit shadow-control ((obj shadow-control))
(defmethod clear-offset-bit ((obj shadow-control))
"Clear a bit in w for the center of the shadow."
(set! (-> obj settings center w)
(the-as float (logand (lognot #x20)
@@ -66,7 +66,7 @@
0
)
(defmethod set-offset-bit shadow-control ((obj shadow-control))
(defmethod set-offset-bit ((obj shadow-control))
"Set a bit in w for the center position of the shadow"
(set! (-> obj settings center w)
(the-as float (logior (the-as int (-> obj settings center w))
@@ -76,12 +76,12 @@
)
(defmethod set-bottom-plane-offset shadow-control ((obj shadow-control) (arg0 float))
(defmethod set-bottom-plane-offset ((obj shadow-control) (arg0 float))
(set! (-> obj settings bot-plane d) (- arg0))
0
)
(defmethod set-top-plane-offset shadow-control ((obj shadow-control) (arg0 float))
(defmethod set-top-plane-offset ((obj shadow-control) (arg0 float))
(set! (-> obj settings top-plane d) (- arg0))
0
)
@@ -16,11 +16,11 @@
;; DECOMP BEGINS
(defmethod asize-of shadow-geo ((obj shadow-geo))
(defmethod asize-of ((obj shadow-geo))
(the-as int (-> obj total-size))
)
(defmethod mem-usage shadow-geo ((obj shadow-geo) (arg0 memory-usage-block) (arg1 int))
(defmethod mem-usage ((obj shadow-geo) (arg0 memory-usage-block) (arg1 int))
(set! (-> arg0 length) (max 108 (-> arg0 length)))
(set! (-> arg0 data 107 name) "shadow-geo")
(+! (-> arg0 data 107 count) 1)
@@ -579,7 +579,7 @@
(none)
)
(defmethod update-direction-from-time-of-day shadow-control ((obj shadow-control))
(defmethod update-direction-from-time-of-day ((obj shadow-control))
(let ((v1-1 (-> *time-of-day-context* current-shadow)))
(set! (-> obj settings shadow-dir x) (-> v1-1 x))
(set! (-> obj settings shadow-dir y) (-> v1-1 y))
@@ -589,7 +589,7 @@
(none)
)
(defmethod collide-to-find-planes shadow-control ((obj shadow-control) (arg0 vector) (arg1 float) (arg2 float) (arg3 float))
(defmethod collide-to-find-planes ((obj shadow-control) (arg0 vector) (arg1 float) (arg2 float) (arg3 float))
(with-pp
(let ((s4-0 (new 'stack-no-clear 'collide-tri-result))
(v1-0 (new 'stack-no-clear 'vector))
+16 -16
View File
@@ -12,13 +12,13 @@
;; name in dgo: shrubbery
;; dgos: GAME, ENGINE
(defmethod login billboard ((obj billboard))
(defmethod login ((obj billboard))
"Set up the billboard adgif shader"
(adgif-shader-login (-> obj flat))
obj
)
(defmethod mem-usage billboard ((obj billboard) (arg0 memory-usage-block) (arg1 int))
(defmethod mem-usage ((obj billboard) (arg0 memory-usage-block) (arg1 int))
"Compute the memory used for the billboard."
(set! (-> arg0 length) (max 34 (-> arg0 length)))
(set! (-> arg0 data 33 name) "billboard")
@@ -63,7 +63,7 @@
arg0
)
(defmethod mem-usage drawable-tree-instance-shrub ((obj drawable-tree-instance-shrub) (arg0 memory-usage-block) (arg1 int))
(defmethod mem-usage ((obj drawable-tree-instance-shrub) (arg0 memory-usage-block) (arg1 int))
"Compute memory usage for an entire shrub tree"
(set! (-> arg0 length) (max 1 (-> arg0 length)))
(set! (-> arg0 data 0 name) (symbol->string 'drawable-group))
@@ -94,7 +94,7 @@
obj
)
(defmethod login generic-shrub-fragment ((obj generic-shrub-fragment))
(defmethod login ((obj generic-shrub-fragment))
"Set up shaders in a generic shrub fragment"
(let ((s5-0 (/ (-> obj cnt-qwc) (the-as uint 5))))
(dotimes (s4-0 (the-as int s5-0))
@@ -104,7 +104,7 @@
obj
)
(defmethod mem-usage generic-shrub-fragment ((obj generic-shrub-fragment) (arg0 memory-usage-block) (arg1 int))
(defmethod mem-usage ((obj generic-shrub-fragment) (arg0 memory-usage-block) (arg1 int))
"Compute memory usage of generic shrub fragment"
(set! (-> arg0 length) (max 27 (-> arg0 length)))
(set! (-> arg0 data 25 name) "generic-shrub")
@@ -124,7 +124,7 @@
obj
)
(defmethod inspect prototype-shrubbery ((obj prototype-shrubbery))
(defmethod inspect ((obj prototype-shrubbery))
"Inspect all prototypes in a prototype array."
(format #t "[~8x] ~A~%" obj (-> obj type))
(format #t "~Tlength: ~D~%" (-> obj length))
@@ -135,7 +135,7 @@
obj
)
(defmethod mem-usage prototype-shrubbery ((obj prototype-shrubbery) (arg0 memory-usage-block) (arg1 int))
(defmethod mem-usage ((obj prototype-shrubbery) (arg0 memory-usage-block) (arg1 int))
"Compute memory usage of all prototypes in a prototype array."
(set! (-> arg0 length) (max 1 (-> arg0 length)))
(set! (-> arg0 data 0 name) (symbol->string 'drawable-group))
@@ -150,7 +150,7 @@
obj
)
(defmethod login prototype-shrubbery ((obj prototype-shrubbery))
(defmethod login ((obj prototype-shrubbery))
"Login all prototypes in a prototype array"
(dotimes (s5-0 (-> obj length))
(login (-> obj data s5-0))
@@ -158,12 +158,12 @@
obj
)
(defmethod asize-of prototype-shrubbery ((obj prototype-shrubbery))
(defmethod asize-of ((obj prototype-shrubbery))
"Compute the allocation size of a prototype shrubbery array (dynamically sized)"
(the-as int (+ (-> prototype-shrubbery size) (* (+ (-> obj length) -1) 32)))
)
(defmethod login prototype-generic-shrub ((obj prototype-generic-shrub))
(defmethod login ((obj prototype-generic-shrub))
"Initialize all fragments in a generic prototype."
(dotimes (s5-0 (-> obj length))
(login (-> obj data s5-0))
@@ -171,7 +171,7 @@
obj
)
(defmethod login shrubbery ((obj shrubbery))
(defmethod login ((obj shrubbery))
"Initialize a shrubbery fragment."
(let ((s5-0 (* (-> obj header data 0) 2)))
(dotimes (s4-0 (the-as int s5-0))
@@ -182,7 +182,7 @@
obj
)
(defmethod mem-usage shrubbery ((obj shrubbery) (arg0 memory-usage-block) (arg1 int))
(defmethod mem-usage ((obj shrubbery) (arg0 memory-usage-block) (arg1 int))
"Compute the memory usage of a shrubbery fragment."
(set! (-> arg0 length) (max 28 (-> arg0 length)))
(set! (-> arg0 data 27 name) "shrubbery")
@@ -222,7 +222,7 @@
obj
)
(defmethod login drawable-tree-instance-shrub ((obj drawable-tree-instance-shrub))
(defmethod login ((obj drawable-tree-instance-shrub))
"Initialize a shrubbery tree."
(if (nonzero? (-> obj info prototype-inline-array-shrub))
(login (-> obj info prototype-inline-array-shrub))
@@ -544,7 +544,7 @@
(none)
)
(defmethod draw drawable-tree-instance-shrub ((obj drawable-tree-instance-shrub) (arg0 drawable-tree-instance-shrub) (arg1 display-frame))
(defmethod draw ((obj drawable-tree-instance-shrub) (arg0 drawable-tree-instance-shrub) (arg1 display-frame))
(let* ((v1-1 (-> *background-work* shrub-tree-count))
(a1-2 (-> (scratchpad-object terrain-context) bsp lev-index))
(a1-5 (-> *level* level a1-2))
@@ -556,11 +556,11 @@
(none)
)
(defmethod unpack-vis drawable-tree-instance-shrub ((obj drawable-tree-instance-shrub) (arg0 (pointer int8)) (arg1 (pointer int8)))
(defmethod unpack-vis ((obj drawable-tree-instance-shrub) (arg0 (pointer int8)) (arg1 (pointer int8)))
arg1
)
(defmethod collect-stats drawable-tree-instance-shrub ((obj drawable-tree-instance-shrub))
(defmethod collect-stats ((obj drawable-tree-instance-shrub))
(when (logtest? *vu1-enable-user* (vu1-renderer-mask shrubbery shrub-near billboard trans-shrubbery))
(let* ((v1-3 (-> obj info prototype-inline-array-shrub))
(gp-0 (the-as object (-> v1-3 data)))
+1 -1
View File
@@ -141,7 +141,7 @@
;; tree/array methods
;;;;;;;;;;;;;;;;;;;;;;;
(defmethod inspect drawable-inline-array-tfrag ((this drawable-inline-array-tfrag))
(defmethod inspect ((this drawable-inline-array-tfrag))
"Inspect an array of tfragments."
(format #t "[~8x] ~A~%" this (-> this type))
(format #t "~Tlength: ~D~%" (-> this length))
+1 -1
View File
@@ -276,7 +276,7 @@
;; draw-inline-array-prototype-tie-near-asm
(defmethod login drawable-tree-instance-tie ((this drawable-tree-instance-tie))
(defmethod login ((this drawable-tree-instance-tie))
(if (nonzero? (-> this prototypes prototype-array-tie))
(login (-> this prototypes prototype-array-tie))
)
+3 -3
View File
@@ -47,7 +47,7 @@
this
)
(defmethod inspect drawable-inline-array-instance-tie ((this drawable-inline-array-instance-tie))
(defmethod inspect ((this drawable-inline-array-instance-tie))
"Inspect an array of instances"
(format #t "[~8x] ~A~%" this (-> this type))
(format #t "~Tlength: ~D~%" (-> this length))
@@ -65,7 +65,7 @@
#|
;; for some reason, this showed up twice.
(defmethod login drawable-tree-instance-tie ((this drawable-tree-instance-tie))
(defmethod login ((this drawable-tree-instance-tie))
this
)
|#
@@ -79,7 +79,7 @@ this
(the-as drawable-tree-instance-tie #f)
)
(defmethod inspect prototype-tie ((this prototype-tie))
(defmethod inspect ((this prototype-tie))
"Inspect the inline-array of tie"
(format #t "[~8x] ~A~%" this (-> this type))
(format #t "~Tlength: ~D~%" (-> this length))
+1 -1
View File
@@ -81,7 +81,7 @@
)
)
(defmethod print file-info ((this file-info))
(defmethod print ((this file-info))
"Print information about a file"
(format #t "#<~A ~A :version ~D.~D @ #x~X>"
(-> this type) (-> this file-name) (-> this major-version) (-> this minor-version) this)
+1 -1
View File
@@ -1670,7 +1670,7 @@
)
(defmethod transform-vectors! matrix ((this _type_) (dst (inline-array vector)) (src (inline-array vector)) (count int))
(defmethod transform-vectors! ((this matrix) (dst (inline-array vector)) (src (inline-array vector)) (count int))
"Transform many vectors. This acts like w = 1, even if it isn't. The value of w is copied."
(rlet ((vf0 :class vf)
(vf1 :class vf)
+1 -1
View File
@@ -11,7 +11,7 @@
;; DECOMP BEGINS
(defmethod inspect quaternion ((this quaternion))
(defmethod inspect ((this quaternion))
"Print a quaternion. Prints the values and axis-angle"
(format #t "[~8x] quaternion~%" this)
(format #t "~T[~F] [~F] [~F] [~F]~%" (-> this x) (-> this y) (-> this z)(-> this w))
+1 -1
View File
@@ -157,7 +157,7 @@
)
;; tentative name
(defmethod get-last-frame-time-stamp profile-bar ((this profile-bar))
(defmethod get-last-frame-time-stamp ((this profile-bar))
"Returns the timestamp of the last (non-remaining) frame on the profiler bar."
(-> this data (+ (-> this profile-frame-count) -2) time-stamp)
)
@@ -1496,7 +1496,7 @@
arg1
)
(defmethod draw-options progress ((this progress) (arg0 int) (arg1 int) (arg2 float))
(defmethod draw-options ((this progress) (arg0 int) (arg1 int) (arg2 float))
(let ((s3-0 (-> *options-remap* (-> this display-state))))
(when s3-0
(let ((s2-1 (- arg0 (/ (* arg1 (length s3-0)) 2)))
+1 -1
View File
@@ -341,7 +341,7 @@
)
)
(defmethod inspect process-tree ((this process-tree))
(defmethod inspect ((this process-tree))
"Inspect a process-tree node."
(format #t "[~8x] ~A~%" this (-> this type))
(format #t "~Tname: ~S~%" (-> this name))
+2 -2
View File
@@ -491,7 +491,7 @@
)
)
(defmethod inspect evilplant ((obj evilplant))
(defmethod inspect ((obj evilplant))
(let ((t9-0 (method-of-type process-drawable inspect)))
(t9-0 obj)
)
@@ -517,7 +517,7 @@
:post ja-post
)
(defmethod init-from-entity! evilplant ((obj evilplant) (arg0 entity-actor))
(defmethod init-from-entity! ((obj evilplant) (arg0 entity-actor))
(set! (-> obj root) (new 'process 'trsqv))
(process-drawable-from-entity! obj arg0)
(initialize-skeleton obj *evilplant-sg* '())
+7 -7
View File
@@ -30,7 +30,7 @@ This file is only found in early demos.
)
;; definition for method 3 of type cavegeyserrock-control-pt
(defmethod inspect cavegeyserrock-control-pt ((obj cavegeyserrock-control-pt))
(defmethod inspect ((obj cavegeyserrock-control-pt))
(format #t "[~8x] ~A~%" obj 'cavegeyserrock-control-pt)
(format #t "~Ttrans: #<vector @ #x~X>~%" (-> obj trans))
(format #t "~Ttransv: #<vector @ #x~X>~%" (-> obj transv))
@@ -65,7 +65,7 @@ This file is only found in early demos.
)
;; definition for method 3 of type cavegeyserrock
(defmethod inspect cavegeyserrock ((obj cavegeyserrock))
(defmethod inspect ((obj cavegeyserrock))
(let ((t9-0 (method-of-type process-drawable inspect)))
(t9-0 obj)
)
@@ -632,7 +632,7 @@ This file is only found in early demos.
;; definition for method 7 of type cavegeyserrock
;; INFO: Return type mismatch process-drawable vs cavegeyserrock.
(defmethod relocate cavegeyserrock ((obj cavegeyserrock) (arg0 int))
(defmethod relocate ((obj cavegeyserrock) (arg0 int))
(if (nonzero? (-> obj part2))
(&+! (-> obj part2) arg0)
)
@@ -650,7 +650,7 @@ This file is only found in early demos.
;; definition for method 20 of type cavegeyserrock
;; INFO: Return type mismatch object vs none.
(defmethod dummy-20 cavegeyserrock ((obj cavegeyserrock))
(defmethod dummy-20 ((obj cavegeyserrock))
(with-pp
(when *target*
(let* ((a1-0 (target-pos 0))
@@ -705,7 +705,7 @@ This file is only found in early demos.
;; definition for method 21 of type cavegeyserrock
;; INFO: Return type mismatch quaternion vs none.
;; Used lq/sq
(defmethod dummy-21 cavegeyserrock ((obj cavegeyserrock))
(defmethod dummy-21 ((obj cavegeyserrock))
(local-vars (at-0 int) (at-1 int) (s5-0 symbol))
(rlet ((vf0 :class vf)
(vf1 :class vf)
@@ -948,7 +948,7 @@ This file is only found in early demos.
)
;; definition for method 10 of type cavegeyserrock
(defmethod deactivate cavegeyserrock ((obj cavegeyserrock))
(defmethod deactivate ((obj cavegeyserrock))
(if (nonzero? (-> obj part2))
(kill-and-free-particles (-> obj part2))
)
@@ -990,7 +990,7 @@ This file is only found in early demos.
;; definition for method 11 of type cavegeyserrock
;; INFO: Return type mismatch object vs none.
;; Used lq/sq
(defmethod copy-defaults! cavegeyserrock ((obj cavegeyserrock) (arg0 res-lump))
(defmethod copy-defaults! ((obj cavegeyserrock) (arg0 res-lump))
(local-vars (sv-16 int) (sv-32 int))
(set! (-> obj mask) (logior (process-mask platform) (-> obj mask)))
(let
+1 -1
View File
@@ -18,7 +18,7 @@
(define *debug-temp-string* (new 'debug 'string 4096 (the string #f)))
(defmethod set-entity! entity-debug-inspect ((obj entity-debug-inspect) (e entity))
(defmethod set-entity! ((obj entity-debug-inspect) (e entity))
"set the entity to inspect"
(set! (-> obj entity) e)
+2 -2
View File
@@ -15,7 +15,7 @@
(declare-file (debug))
(defmethod print-debug-misc pc-settings-jak1 ((obj pc-settings-jak1))
(defmethod print-debug-misc ((obj pc-settings-jak1))
"prints various miscellaneous debug text to the game console, according to what's enabled in this object."
(when *display-bug-report*
@@ -42,7 +42,7 @@
(defconstant MEM_BAR_NUM 7) ;; amount of memory usage bars (override later if wanted)
(defmethod draw-memory pc-settings ((obj pc-settings) (buf dma-buffer))
(defmethod draw-memory ((obj pc-settings) (buf dma-buffer))
"draw the memory heap status in the bottom right corner"
(when *display-heap-status*
+8 -8
View File
@@ -210,7 +210,7 @@
(defmethod deactivate hud-pc ((obj hud-pc))
(defmethod deactivate ((obj hud-pc))
(dotimes (i HUD_PART_PC_AMOUNT)
(if (and (-> *hud-parts-pc* parts i) (= (ppointer->process (-> *hud-parts-pc* parts i)) obj))
(set! (-> *hud-parts-pc* parts i) (the (pointer hud-pc) #f))
@@ -221,7 +221,7 @@
)
(defmethod kill-icon hud-battle-enemy ((obj hud-battle-enemy) (idx int))
(defmethod kill-icon ((obj hud-battle-enemy) (idx int))
"kill a hud icon"
(when (and (nonzero? (-> obj icons idx)) (nonzero? (-> obj icons idx icon)) (-> obj icons idx icon))
@@ -230,7 +230,7 @@
)
0)
(defmethod kill-all-icons hud-battle-enemy ((obj hud-battle-enemy))
(defmethod kill-all-icons ((obj hud-battle-enemy))
"kill all hud icons"
(dotimes (i (-> obj nb-of-icons))
@@ -238,7 +238,7 @@
)
0)
(defmethod make-enemy-icon hud-battle-enemy ((obj hud-battle-enemy) (idx int) (skel-sym symbol) (enemy-ent entity))
(defmethod make-enemy-icon ((obj hud-battle-enemy) (idx int) (skel-sym symbol) (enemy-ent entity))
"make a new icon for the hud"
;; make new manipy
@@ -247,7 +247,7 @@
0)
(defmethod update-display-status hud-battle-enemy ((obj hud-battle-enemy) (skel symbol) (ent entity) (icon-idx int) (trigger-force symbol))
(defmethod update-display-status ((obj hud-battle-enemy) (skel symbol) (ent entity) (icon-idx int) (trigger-force symbol))
"logic for displaying or hiding the hud, and drawing the icons."
@@ -350,7 +350,7 @@
)
)
(defmethod hud-update hud-battle-enemy ((obj hud-battle-enemy))
(defmethod hud-update ((obj hud-battle-enemy))
"hud logic."
(when (not (-> *pc-settings* extra-hud?))
@@ -538,7 +538,7 @@
)
(defmethod draw-hud hud-battle-enemy ((obj hud-battle-enemy))
(defmethod draw-hud ((obj hud-battle-enemy))
(let ((t9-0 (method-of-type hud draw-hud)))
(t9-0 obj)
)
@@ -571,7 +571,7 @@
)
(defmethod init-particles! hud-battle-enemy ((obj hud-battle-enemy) (arg0 int))
(defmethod init-particles! ((obj hud-battle-enemy) (arg0 int))
(hud-pc-make-icon obj HUD_ICON_COUNT :skel *fuelcell-naked-sg*
:x (the int (* 0.84 512)) :y (the int (* 0.51 448)) :z (meters 0.5)
:scale-x 0.004 :scale-y (* -0.004 (/ 512.0 448.0)))
+27 -27
View File
@@ -37,7 +37,7 @@
;;;; updates
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defmethod set-display-mode! pc-settings ((obj pc-settings) (mode symbol) (call-handlers symbol))
(defmethod set-display-mode! ((obj pc-settings) (mode symbol) (call-handlers symbol))
"sets the game's display mode"
;; no-op if the display mode hasn't actually changed
(when (!= mode (-> obj display-mode))
@@ -53,7 +53,7 @@
(pc-set-window-size (max PC_MIN_WIDTH (-> obj window-width)) (max PC_MIN_HEIGHT (-> obj window-height))))))
0)
(defmethod set-size! pc-settings ((obj pc-settings) (width int) (height int) (call-handlers symbol))
(defmethod set-size! ((obj pc-settings) (width int) (height int) (call-handlers symbol))
"sets the size of the display window"
(format 0 "Setting ~A size to ~D x ~D~%" (-> obj display-mode) width height)
(cond
@@ -70,7 +70,7 @@
)
(none))
(defmethod set-aspect! pc-settings ((obj pc-settings) (aw int) (ah int))
(defmethod set-aspect! ((obj pc-settings) (aw int) (ah int))
"set the aspect ratio used for rendering. this forces native widescreen and takes width and height ratios."
(let ((aspect (/ (the float aw) (the float ah))))
(set-aspect-ratio! obj aspect)
@@ -81,14 +81,14 @@
)
(none))
(defmethod set-aspect-ratio! pc-settings ((obj pc-settings) (aspect float))
(defmethod set-aspect-ratio! ((obj pc-settings) (aspect float))
"set the aspect ratio used for rendering."
(set! (-> obj aspect-ratio) aspect)
(set! (-> obj aspect-ratio-scale) (/ aspect ASPECT_4X3))
(set! (-> obj aspect-ratio-reciprocal) (/ ASPECT_4X3 aspect))
(none))
(defmethod set-frame-rate! pc-settings ((obj pc-settings) (rate int) (call-handlers symbol))
(defmethod set-frame-rate! ((obj pc-settings) (rate int) (call-handlers symbol))
"set the target framerate."
(if call-handlers
(pc-set-frame-rate rate))
@@ -110,7 +110,7 @@
rate)
(defmethod set-monitor! pc-settings ((obj pc-settings) (monitor int))
(defmethod set-monitor! ((obj pc-settings) (monitor int))
"set the monitor to use when in fullscreen/borderless"
;; if monitor selection is out of bounds (e.g. if a monitor got disconnected),
;; then default to the primary monitor
@@ -123,14 +123,14 @@
(pc-set-fullscreen-display (-> obj monitor))
(none))
(defmethod commit-to-file pc-settings ((obj pc-settings))
(defmethod commit-to-file ((obj pc-settings))
"commits the current settings to the file"
(format (clear *pc-temp-string-1*) "~S/pc-settings.gc" *pc-settings-folder*)
(pc-mkdir-file-path *pc-temp-string-1*)
(write-to-file obj *pc-temp-string-1*)
(none))
(defmethod update-from-os pc-settings ((obj pc-settings))
(defmethod update-from-os ((obj pc-settings))
"Update settings from the C kernel to GOAL."
(pc-get-window-size (&-> obj framebuffer-width) (&-> obj framebuffer-height))
@@ -173,7 +173,7 @@
(none))
(defmethod update-to-os pc-settings ((obj pc-settings))
(defmethod update-to-os ((obj pc-settings))
"Update settings from GOAL to the C kernel."
;; TODO - move the below out of this function that runs every frame
@@ -261,7 +261,7 @@
"are we in an actual cutscene and should letterbox the view?"
(and (nonzero? movie?) (movie?)))
(defmethod update pc-settings ((obj pc-settings))
(defmethod update ((obj pc-settings))
"Update settings to/from PC kernel. Call this at the start of every frame.
This will update things like the aspect-ratio, which will be used for graphics code later."
@@ -295,22 +295,22 @@
(none))
(defmethod update-cheats pc-settings ((obj pc-settings))
(defmethod update-cheats ((obj pc-settings))
"run cheats."
0)
(defmethod update-music-log pc-settings ((obj pc-settings))
(defmethod update-music-log ((obj pc-settings))
"update music log settings."
0)
(defmethod update-led pc-settings ((obj pc-settings))
(defmethod update-led ((obj pc-settings))
"set the controller led color by modifying the controller-led-color vector"
;; random colors for fun lol
(set-vector! (-> obj controller-led-color) (rand-vu) (rand-vu) (rand-vu) 1.0)
;(set-vector! (-> obj controller-led-color) 0.0 0.0 1.0 1.0)
#t)
(defmethod led-enabled? pc-settings ((obj pc-settings))
(defmethod led-enabled? ((obj pc-settings))
"should the controller led be set?"
#f)
@@ -321,7 +321,7 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defmethod get-current-game-width pc-settings ((obj pc-settings))
(defmethod get-current-game-width ((obj pc-settings))
"return the current width in pixels of the visible portion of the game"
(cond
@@ -333,7 +333,7 @@
(-> obj width))
)
)
(defmethod get-current-game-height pc-settings ((obj pc-settings))
(defmethod get-current-game-height ((obj pc-settings))
"return the current height in pixels of the visible portion of the game"
(cond
@@ -348,7 +348,7 @@
(when *debug-segment*
(defmethod draw pc-settings ((obj pc-settings) (buf dma-buffer))
(defmethod draw ((obj pc-settings) (buf dma-buffer))
"debug draw some things on-screen"
(when (-> obj debug?)
@@ -367,13 +367,13 @@
)
(defmethod set-ignore-controller-in-bg! pc-settings ((obj pc-settings) (val symbol))
(defmethod set-ignore-controller-in-bg! ((obj pc-settings) (val symbol))
"sets whether or not to ignore controller inputs if the window is in the background"
(set! (-> obj ignore-controller-win-unfocused?) val)
(pc-ignore-background-controller-events! val)
(none))
(defmethod update-mouse-controls! pc-settings ((obj pc-settings))
(defmethod update-mouse-controls! ((obj pc-settings))
"Uses whatever is set on the [[pc-settings]] to update the runtime on how it should interpret mouse events"
(pc-set-mouse-options! (-> obj mouse-enabled?) (-> obj mouse-camera?) (-> obj mouse-movement?))
(pc-set-mouse-camera-sens! (-> obj mouse-xsens) (-> obj mouse-ysens))
@@ -381,7 +381,7 @@
(none))
(defmethod debug-font-scale-factor pc-settings ((this pc-settings))
(defmethod debug-font-scale-factor ((this pc-settings))
"return the debug font scale factor to be used."
(declare (inline))
(if (-> this debug-font-scale-auto?)
@@ -545,7 +545,7 @@
)
)
(defmethod read-from-file pc-settings ((obj pc-settings) (filename string))
(defmethod read-from-file ((obj pc-settings) (filename string))
"read settings from a file"
(if (not filename)
@@ -602,7 +602,7 @@
#t
)
(defmethod handle-input-settings pc-settings ((obj pc-settings) (file file-stream))
(defmethod handle-input-settings ((obj pc-settings) (file file-stream))
"handle the text parsing input for the 'settings' group"
(case-str *pc-temp-string*
@@ -707,7 +707,7 @@
)
0)
(defmethod handle-output-settings pc-settings ((obj pc-settings) (file file-stream))
(defmethod handle-output-settings ((obj pc-settings) (file file-stream))
"handle the text writing output for the 'settings' group"
(format file " (fps ~D)~%" (-> obj target-fps))
@@ -779,7 +779,7 @@
(format file " (territory ~D)~%" (-> obj territory))
0)
(defmethod write-to-file pc-settings ((obj pc-settings) (filename string))
(defmethod write-to-file ((obj pc-settings) (filename string))
"write settings to a file"
(if (not filename)
@@ -802,7 +802,7 @@
#t
)
(defmethod load-settings pc-settings ((obj pc-settings))
(defmethod load-settings ((obj pc-settings))
"load"
(format (clear *pc-temp-string-1*) "~S/pc-settings.gc" *pc-settings-folder*)
(cond
@@ -820,7 +820,7 @@
)
0)
(defmethod initialize pc-settings ((obj pc-settings))
(defmethod initialize ((obj pc-settings))
"initial initialize method to be run after allocating"
;; load defaults not covered by the file
(reset obj #f)
@@ -844,7 +844,7 @@
(when *debug-segment*
(defmethod update-pad entity-debug-inspect ((obj entity-debug-inspect) (pad-idx int))
(defmethod update-pad ((obj entity-debug-inspect) (pad-idx int))
"respond to pad inputs"
;; scroll up
+8 -8
View File
@@ -292,7 +292,7 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defmethod reset pc-settings ((obj pc-settings) (call-handlers symbol))
(defmethod reset ((obj pc-settings) (call-handlers symbol))
"Reset everything back to default settings
If call-handlers = #t then events will be sent to the runtime kernel to update OS settings
@@ -325,7 +325,7 @@
0)
(defmethod reset-gfx pc-settings ((obj pc-settings) (call-handlers symbol))
(defmethod reset-gfx ((obj pc-settings) (call-handlers symbol))
"Set the default graphics settings"
;; temporarily "set" to windowed so we can change window size
@@ -362,7 +362,7 @@
(set! (-> obj gfx-msaa) PC_DEFAULT_MSAA) ;; default msaa
0)
(defmethod reset-audio pc-settings ((obj pc-settings) (call-handlers symbol))
(defmethod reset-audio ((obj pc-settings) (call-handlers symbol))
"Set the default audio settings"
(set! (-> obj audio-latency-ms) 80)
@@ -374,7 +374,7 @@
(set! (-> obj music-fadein?) #t)
0)
(defmethod reset-input pc-settings ((obj pc-settings) (device symbol) (call-handlers symbol))
(defmethod reset-input ((obj pc-settings) (device symbol) (call-handlers symbol))
"Set the default input settings"
(when (or (= device 'all) (= device 'controller))
@@ -402,7 +402,7 @@
)
0)
(defmethod reset-ps2 pc-settings ((obj pc-settings) (call-handlers symbol))
(defmethod reset-ps2 ((obj pc-settings) (call-handlers symbol))
"Set the default ps2 settings"
(set! (-> obj ps2-read-speed?) #f)
@@ -422,7 +422,7 @@
(set! (-> obj lod-force-actor) 0)
0)
(defmethod reset-misc pc-settings ((obj pc-settings) (call-handlers symbol))
(defmethod reset-misc ((obj pc-settings) (call-handlers symbol))
"Set the default misc settings"
(set! (-> obj ps2-actor-vis?) #t)
@@ -433,7 +433,7 @@
(set! (-> obj territory) -1) ;; auto
0)
(defmethod reset-camera pc-settings ((obj pc-settings) (call-handlers symbol))
(defmethod reset-camera ((obj pc-settings) (call-handlers symbol))
"Set the original game's camera controls"
(set! (-> obj first-camera-h-inverted?) #f) ;; first-person horizontal is NOT inverted in original game
@@ -442,7 +442,7 @@
(set! (-> obj third-camera-v-inverted?) #t) ;; third-person vertical IS inverted in original game
0)
(defmethod reset-extra pc-settings ((obj pc-settings) (call-handlers symbol))
(defmethod reset-extra ((obj pc-settings) (call-handlers symbol))
"Set the default goodies settings"
0)
+2 -2
View File
@@ -131,7 +131,7 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defmethod reset-misc pc-settings-jak1 ((obj pc-settings-jak1) (call-handlers symbol))
(defmethod reset-misc ((obj pc-settings-jak1) (call-handlers symbol))
"Set the default misc settings"
((method-of-type pc-settings reset-misc) obj call-handlers)
@@ -154,7 +154,7 @@
(set! (-> obj extra-hud?) #f)
0)
(defmethod reset-extra pc-settings-jak1 ((obj pc-settings-jak1) (call-handlers symbol))
(defmethod reset-extra ((obj pc-settings-jak1) (call-handlers symbol))
"Set the default goodies settings"
((method-of-type pc-settings reset-extra) obj call-handlers)
+14 -14
View File
@@ -21,7 +21,7 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defmethod set-game-setting! pc-settings-jak1 ((obj pc-settings-jak1) (setting symbol) (value symbol))
(defmethod set-game-setting! ((obj pc-settings-jak1) (setting symbol) (value symbol))
(case setting
(('video-mode)
(set! (-> *setting-control* current video-mode) #f)
@@ -35,7 +35,7 @@
)
)
(defmethod get-game-setting pc-settings-jak1 ((obj pc-settings-jak1) (setting symbol))
(defmethod get-game-setting ((obj pc-settings-jak1) (setting symbol))
(case setting
(('video-mode)
(-> *setting-control* default video-mode)
@@ -49,18 +49,18 @@
)
)
(defmethod set-game-language! pc-settings-jak1 ((obj pc-settings-jak1) (lang language-enum))
(defmethod set-game-language! ((obj pc-settings-jak1) (lang language-enum))
(set! (-> *setting-control* default language) lang)
)
(defmethod get-game-language pc-settings-jak1 ((obj pc-settings-jak1))
(defmethod get-game-language ((obj pc-settings-jak1))
(-> *setting-control* default language)
)
;; where we store the input progress for the cheat codes. make sure there's enough space for all cheats.
(define *pc-cheat-temp* (new 'global 'inline-array 'uint8 PC_CHEAT_MAX))
(defmethod update-cheats pc-settings-jak1 ((obj pc-settings-jak1))
(defmethod update-cheats ((obj pc-settings-jak1))
"run cheats."
;; first check for cheat inputs.
@@ -184,7 +184,7 @@
(logior! (-> obj cheats-known) (-> obj cheats))
0)
(defmethod update-music-log pc-settings-jak1 ((obj pc-settings-jak1))
(defmethod update-music-log ((obj pc-settings-jak1))
"update music log settings."
;; add whatever is playing to the music log.
@@ -245,7 +245,7 @@
0)
(defmethod update-discord-rpc pc-settings-jak1 ((obj pc-settings-jak1))
(defmethod update-discord-rpc ((obj pc-settings-jak1))
"update discord rpc module"
(let ((info (new 'stack 'discord-info)))
(set! (-> info fuel) (&-> *game-info* fuel))
@@ -299,13 +299,13 @@
(with-profiler "discord-update" (pc-discord-rpc-update info)))
(none))
(defmethod update-speedrun pc-settings-jak1 ((obj pc-settings-jak1))
(defmethod update-speedrun ((obj pc-settings-jak1))
"update speedrun module"
(with-profiler "speedrun-update"
(speedrun-mode-update))
(none))
(defmethod update-video-hacks pc-settings-jak1 ((obj pc-settings-jak1))
(defmethod update-video-hacks ((obj pc-settings-jak1))
"update the graphics hacks used for sprites and other things. ugh."
(set! (-> (get-video-params) relative-x-scale) (-> obj aspect-ratio-reciprocal))
@@ -330,13 +330,13 @@
)
)
(defmethod led-enabled? pc-settings-jak1 ((obj pc-settings-jak1))
(defmethod led-enabled? ((obj pc-settings-jak1))
"should the controller led be set?"
(or (-> obj controller-led-hp?)
(-> obj controller-led-eco?)
(-> obj controller-led-heat?)))
(defmethod update-led pc-settings-jak1 ((obj pc-settings-jak1))
(defmethod update-led ((obj pc-settings-jak1))
"set the controller led color by modifying the controller-led-color vector"
;; default color is just blue.
@@ -487,7 +487,7 @@
)
)
(defmethod add-to-music-log pc-settings-jak1 ((obj pc-settings-jak1) (music symbol) (flava int))
(defmethod add-to-music-log ((obj pc-settings-jak1) (music symbol) (flava int))
"add music and flava information to the music log.
if music already exists, adds flava. if flava already exists, nothing happens."
@@ -518,7 +518,7 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defmethod handle-input-settings pc-settings-jak1 ((obj pc-settings-jak1) (file file-stream))
(defmethod handle-input-settings ((obj pc-settings-jak1) (file file-stream))
"handle the text parsing input for the 'settings' group"
((method-of-type pc-settings handle-input-settings) obj file)
@@ -567,7 +567,7 @@
)
0)
(defmethod handle-output-settings pc-settings-jak1 ((obj pc-settings-jak1) (file file-stream))
(defmethod handle-output-settings ((obj pc-settings-jak1) (file file-stream))
"handle the text writing output for the 'settings' group"
((method-of-type pc-settings handle-output-settings) obj file)
+4 -4
View File
@@ -1015,7 +1015,7 @@
(defmethod respond-common progress ((obj progress))
(defmethod respond-common ((obj progress))
"common logic for navigating the progress menu.
this is the overriden version, purged of no longer necessary code and with additional new code."
@@ -1880,7 +1880,7 @@
(none)
)
(defmethod respond-memcard progress ((obj progress))
(defmethod respond-memcard ((obj progress))
"logic for handling input in memcard screens."
(let ((s5-0 (-> obj card-info)))
@@ -2119,7 +2119,7 @@
)
(defmethod draw-options progress ((obj progress) (arg0 int) (arg1 int) (arg2 float))
(defmethod draw-options ((obj progress) (arg0 int) (arg1 int) (arg2 float))
"common logic for drawing options menus."
(let ((options (-> *options-remap* (-> obj display-state))))
@@ -2628,7 +2628,7 @@
0)
(defmethod draw-notice-screen progress ((obj progress))
(defmethod draw-notice-screen ((obj progress))
(hide-progress-icons)
(when *common-text*
(let ((a1-1 (new 'stack 'font-context *font-default-matrix* (- 70 (-> obj left-x-offset)) 10 0.0
+5 -5
View File
@@ -192,7 +192,7 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defmethod get-scene-by-name subtitle-text-info ((obj subtitle-text-info) (kind pc-subtitle-channel) (name string))
(defmethod get-scene-by-name ((obj subtitle-text-info) (kind pc-subtitle-channel) (name string))
"get a subtitle scene info with the corresponding name. #f = none found"
;; invalid name so return invalid scene.
@@ -209,7 +209,7 @@
(the subtitle-text #f))
(defmethod get-scene-by-text-id subtitle-text-info ((obj subtitle-text-info) (kind pc-subtitle-channel) (id text-id))
(defmethod get-scene-by-text-id ((obj subtitle-text-info) (kind pc-subtitle-channel) (id text-id))
"get a subtitle scene info with the corresponding name. #f = none found"
(dotimes (i (-> obj length))
@@ -530,7 +530,7 @@
(defmethod subtitle-format subtitle ((obj subtitle) (keyframe subtitle-keyframe))
(defmethod subtitle-format ((obj subtitle) (keyframe subtitle-keyframe))
"check settings and format subtitle accordingly."
(cond
@@ -963,12 +963,12 @@
(defmethod length subtitle-text-info ((obj subtitle-text-info))
(defmethod length ((obj subtitle-text-info))
"Get the length (number of subtitle scenes) in a subtitle-text-info."
(-> obj length)
)
(defmethod length subtitle-text ((obj subtitle-text))
(defmethod length ((obj subtitle-text))
"Get the length (number of subtitle lines) in a subtitle-text."
(-> obj length)
)