d/jak2: Decompile palace-ocean, ctysluma-part, nav-enemy-h and a bunch of work on enemy and nav-mesh related files (#1984)

Couldn't finish any of the enemy/nav-enemy related files for one reason
or another, but quite a bit of work that will be easier to merge and
iterate on instead of keeping track of the branch.

enemy/idle-control has some very weird focus related code.

nav-mesh/nav-control still has a bunch of CFG resolution problems that
need to be manually resolved.

Co-authored-by: water <awaterford111445@gmail.com>
This commit is contained in:
Tyler Wilding
2022-10-29 16:28:52 -04:00
committed by GitHub
parent b0e8cba6f1
commit d13155bfd0
41 changed files with 14399 additions and 1864 deletions
+34 -81
View File
@@ -1,7 +1,5 @@
;;-*-Lisp-*-
(in-package goal)
;; definition of type collide-rider
(deftype collide-rider (structure)
((rider-handle uint64 :offset-assert 0)
(sticky-prim basic :offset-assert 8)
@@ -13,7 +11,6 @@
:flag-assert #x900000020
)
;; definition for method 3 of type collide-rider
(defmethod inspect collide-rider ((obj collide-rider))
(when (not obj)
(set! obj obj)
@@ -28,7 +25,6 @@
obj
)
;; definition of type collide-rider-pool
(deftype collide-rider-pool (basic)
((alloc-count int32 :offset-assert 4)
(riders collide-rider 20 :inline :offset-assert 16)
@@ -42,7 +38,6 @@
)
)
;; definition for method 3 of type collide-rider-pool
(defmethod inspect collide-rider-pool ((obj collide-rider-pool))
(when (not obj)
(set! obj obj)
@@ -55,8 +50,6 @@
obj
)
;; definition for method 10 of type collide-rider-pool
;; WARN: Return type mismatch int vs none.
(defmethod prepare collide-rider-pool ((obj collide-rider-pool))
"Gets this pool ready to be used to allow allocations. This should be called once at the start of every frame."
(set! (-> obj alloc-count) 0)
@@ -64,7 +57,6 @@
(none)
)
;; definition of type pull-rider-info
(deftype pull-rider-info (structure)
((rider collide-rider :offset-assert 0)
(rider-cshape collide-shape-moving :offset-assert 4)
@@ -76,7 +68,6 @@
:flag-assert #x900000020
)
;; definition for method 3 of type pull-rider-info
(defmethod inspect pull-rider-info ((obj pull-rider-info))
(when (not obj)
(set! obj obj)
@@ -91,22 +82,16 @@
obj
)
;; failed to figure out what this is:
(kmemopen global "collide-lists")
;; definition for symbol *collide-hit-by-player-list*, type engine
(define *collide-hit-by-player-list* (new 'global 'engine 'collide-hit-by-player-list 640 connection))
;; definition for symbol *collide-hit-by-others-list*, type engine
(define *collide-hit-by-others-list* (new 'global 'engine 'collide-hit-by-others-list 768 connection))
;; definition for symbol *collide-player-list*, type engine
(define *collide-player-list* (new 'global 'engine 'collide-player-list 32 connection))
;; failed to figure out what this is:
(kmemclose)
;; definition of type overlaps-others-params
(deftype overlaps-others-params (structure)
((options overlaps-others-options :offset-assert 0)
(collide-with-filter collide-spec :offset-assert 4)
@@ -120,7 +105,6 @@
:flag-assert #x900000018
)
;; definition for method 3 of type overlaps-others-params
(defmethod inspect overlaps-others-params ((obj overlaps-others-params))
(when (not obj)
(set! obj obj)
@@ -137,26 +121,24 @@
obj
)
;; definition of type move-above-ground-params
(deftype move-above-ground-params (structure)
((gnd-collide-with collide-spec :offset-assert 0)
(popup float :offset-assert 4)
(dont-move-if-overlaps? basic :offset-assert 8)
(hover-if-no-ground? basic :offset-assert 12)
(dont-move-if-overlaps? symbol :offset-assert 8)
(hover-if-no-ground? symbol :offset-assert 12)
(overlaps-params overlaps-others-params :inline :offset-assert 16)
(new-pos vector :inline :offset-assert 48)
(old-gspot-pos vector :inline :offset-assert 64)
(old-gspot-normal vector :inline :offset-assert 80)
(pat pat-surface :offset-assert 96)
(on-ground? basic :offset-assert 100)
(do-move? basic :offset-assert 104)
(on-ground? symbol :offset-assert 100)
(do-move? symbol :offset-assert 104)
)
:method-count-assert 9
:size-assert #x6c
:flag-assert #x90000006c
)
;; definition for method 3 of type move-above-ground-params
(defmethod inspect move-above-ground-params ((obj move-above-ground-params))
(when (not obj)
(set! obj obj)
@@ -178,7 +160,6 @@
obj
)
;; definition of type collide-prim-core
(deftype collide-prim-core (structure)
((world-sphere vector :inline :offset-assert 0)
(collide-as collide-spec :offset-assert 16)
@@ -193,7 +174,6 @@
:flag-assert #x900000020
)
;; definition for method 3 of type collide-prim-core
(defmethod inspect collide-prim-core ((obj collide-prim-core))
(when (not obj)
(set! obj obj)
@@ -211,7 +191,6 @@
obj
)
;; definition of type collide-shape-prim
(deftype collide-shape-prim (basic)
((cshape collide-shape :offset-assert 4)
(prim-id uint32 :offset-assert 8)
@@ -246,7 +225,6 @@
)
)
;; definition for method 3 of type collide-shape-prim
(defmethod inspect collide-shape-prim ((obj collide-shape-prim))
(when (not obj)
(set! obj obj)
@@ -492,7 +470,6 @@
obj
)
;; definition of type collide-shape-prim-sphere
(deftype collide-shape-prim-sphere (collide-shape-prim)
((pat pat-surface :offset 64)
(nav-radius float :offset 68)
@@ -505,7 +482,6 @@
)
)
;; definition for method 3 of type collide-shape-prim-sphere
(defmethod inspect collide-shape-prim-sphere ((obj collide-shape-prim-sphere))
(when (not obj)
(set! obj obj)
@@ -753,7 +729,6 @@
obj
)
;; definition of type collide-shape-prim-mesh
(deftype collide-shape-prim-mesh (collide-shape-prim)
((mesh collide-mesh :offset 64)
(mesh-id int32 :offset 68)
@@ -768,7 +743,6 @@
)
)
;; definition for method 3 of type collide-shape-prim-mesh
(defmethod inspect collide-shape-prim-mesh ((obj collide-shape-prim-mesh))
(when (not obj)
(set! obj obj)
@@ -1018,7 +992,6 @@
obj
)
;; definition of type collide-shape-prim-group
(deftype collide-shape-prim-group (collide-shape-prim)
((num-children uint8 :offset 64)
(num-alloc-children uint8 :offset 65)
@@ -1032,7 +1005,6 @@
)
)
;; definition for method 3 of type collide-shape-prim-group
(defmethod inspect collide-shape-prim-group ((obj collide-shape-prim-group))
(when (not obj)
(set! obj obj)
@@ -1281,7 +1253,6 @@
obj
)
;; definition of type collide-shape
(deftype collide-shape (trsqv)
((actor-hash-index int16 :offset 12)
(process process-drawable :offset-assert 140)
@@ -1329,14 +1300,13 @@
(set-collide-as! (_type_ collide-spec) none 48)
(collide-shape-method-49 (_type_ int int int) none 49)
(collide-shape-method-50 (_type_ process object float float float) none 50)
(collide-shape-method-51 () none 51)
(collide-shape-method-51 (_type_) none 51)
(water-info-init! (_type_ water-info collide-action) water-info 52)
(collide-shape-method-53 (_type_) none 53)
(collide-shape-method-54 (_type_) none 54)
)
)
;; definition for method 3 of type collide-shape
(defmethod inspect collide-shape ((obj collide-shape))
(when (not obj)
(set! obj obj)
@@ -1580,34 +1550,35 @@
obj
)
;; definition of type collide-shape-moving
(deftype collide-shape-moving (collide-shape)
((rider-time time-frame :offset-assert 200)
(rider-last-move vector :inline :offset-assert 208)
(trans-old vector :inline :offset-assert 224)
(poly-pat pat-surface :offset 272)
(cur-pat pat-surface :offset-assert 276)
(ground-pat pat-surface :offset-assert 280)
(status cshape-moving-flags :offset-assert 288)
(old-status cshape-moving-flags :offset-assert 296)
(prev-status cshape-moving-flags :offset-assert 304)
(reaction-flag cshape-reaction-flags :offset-assert 312)
(reaction (function control-info collide-query vector vector cshape-moving-flags) :offset-assert 316)
(no-reaction function :offset-assert 320)
(local-normal vector :inline :offset-assert 336)
(surface-normal vector :inline :offset-assert 352)
(poly-normal vector :inline :offset-assert 368)
(ground-poly-normal vector :inline :offset-assert 384)
(gspot-pos vector :inline :offset-assert 400)
(gspot-normal vector :inline :offset-assert 416)
(grount-touch-point vector :inline :offset-assert 432)
(ground-impact-vel meters :offset-assert 448)
(surface-angle float :offset-assert 452)
(poly-angle float :offset-assert 456)
(touch-angle float :offset-assert 460)
(coverage float :offset-assert 464)
(dynam dynamics :offset-assert 468)
(surf surface :offset-assert 472)
((rider-time time-frame :offset-assert 200)
(rider-last-move vector :inline :offset-assert 208)
(trans-old vector :inline :offset-assert 224)
(csm-unk-vec-981i2u312 vector :inline :offset 240)
(csm-unk-vec-klj1n23 vector :inline :offset 256)
(poly-pat pat-surface :offset 272)
(cur-pat pat-surface :offset-assert 276)
(ground-pat pat-surface :offset-assert 280)
(status cshape-moving-flags :offset-assert 288)
(old-status cshape-moving-flags :offset-assert 296)
(prev-status cshape-moving-flags :offset-assert 304)
(reaction-flag cshape-reaction-flags :offset-assert 312)
(reaction (function control-info collide-query vector vector cshape-moving-flags) :offset-assert 316)
(no-reaction function :offset-assert 320)
(local-normal vector :inline :offset-assert 336)
(surface-normal vector :inline :offset-assert 352)
(poly-normal vector :inline :offset-assert 368)
(ground-poly-normal vector :inline :offset-assert 384)
(gspot-pos vector :inline :offset-assert 400)
(gspot-normal vector :inline :offset-assert 416)
(grount-touch-point vector :inline :offset-assert 432)
(ground-impact-vel meters :offset-assert 448)
(surface-angle float :offset-assert 452)
(poly-angle float :offset-assert 456)
(touch-angle float :offset-assert 460)
(coverage float :offset-assert 464)
(dynam dynamics :offset-assert 468)
(surf surface :offset-assert 472)
)
:method-count-assert 68
:size-assert #x1dc
@@ -1617,7 +1588,7 @@
(collide-shape-moving-method-55 (_type_ collide-query collide-spec float float float) symbol 55)
(collide-shape-moving-method-56 (_type_ pat-surface) none 56)
(collide-shape-moving-method-57 () none 57)
(collide-shape-moving-method-58 () none 58)
(collide-shape-moving-method-58 (_type_ vector overlaps-others-params) symbol 58)
(collide-shape-moving-method-59 () none 59)
(collide-shape-moving-method-60 () none 60)
(collide-shape-moving-method-61 () none 61)
@@ -1630,7 +1601,6 @@
)
)
;; definition for method 3 of type collide-shape-moving
(defmethod inspect collide-shape-moving ((obj collide-shape-moving))
(when (not obj)
(set! obj obj)
@@ -1900,7 +1870,6 @@
obj
)
;; definition for method 0 of type collide-shape-prim
(defmethod new collide-shape-prim ((allocation symbol) (type-to-make type) (arg0 collide-shape) (arg1 uint) (arg2 int))
(let ((v0-0 (object-new allocation type-to-make arg2)))
(set! (-> v0-0 cshape) arg0)
@@ -1914,8 +1883,6 @@
)
)
;; definition for method 0 of type collide-shape-prim-sphere
;; WARN: Return type mismatch collide-shape-prim vs collide-shape-prim-sphere.
(defmethod new collide-shape-prim-sphere ((allocation symbol) (type-to-make type) (arg0 collide-shape) (arg1 uint))
(let ((v0-0 ((method-of-type collide-shape-prim new) allocation type-to-make arg0 arg1 80)))
(set! (-> (the-as collide-shape-prim-sphere v0-0) pat)
@@ -1926,8 +1893,6 @@
)
)
;; definition for method 0 of type collide-shape-prim-mesh
;; WARN: Return type mismatch collide-shape-prim vs collide-shape-prim-mesh.
(defmethod new collide-shape-prim-mesh ((allocation symbol) (type-to-make type) (arg0 collide-shape) (arg1 uint) (arg2 uint))
(let ((v0-0 ((method-of-type collide-shape-prim new) allocation type-to-make arg0 arg2 80)))
(set! (-> (the-as collide-shape-prim-mesh v0-0) mesh) #f)
@@ -1938,8 +1903,6 @@
)
)
;; definition for method 0 of type collide-shape-prim-group
;; WARN: Return type mismatch collide-shape-prim vs collide-shape-prim-group.
(defmethod new collide-shape-prim-group ((allocation symbol) (type-to-make type) (arg0 collide-shape) (arg1 uint) (arg2 int))
(let ((v0-0 ((method-of-type collide-shape-prim new) allocation type-to-make arg0 (the-as uint arg2) 80)))
(set! (-> (the-as collide-shape-prim-group v0-0) num-children) arg1)
@@ -1952,13 +1915,10 @@
)
)
;; definition for method 4 of type collide-shape-prim-group
;; WARN: Return type mismatch uint8 vs int.
(defmethod length collide-shape-prim-group ((obj collide-shape-prim-group))
(the-as int (-> obj num-children))
)
;; definition for method 0 of type collide-shape
(defmethod new collide-shape ((allocation symbol) (type-to-make type) (arg0 process-drawable) (arg1 collide-list-enum))
(let ((s5-0 (object-new allocation type-to-make (the-as int (-> type-to-make size)))))
(set! (-> s5-0 actor-hash-index) -1)
@@ -2007,9 +1967,6 @@
)
)
;; definition for method 0 of type collide-shape-moving
;; INFO: Used lq/sq
;; WARN: Return type mismatch collide-shape vs collide-shape-moving.
(defmethod new collide-shape-moving ((allocation symbol) (type-to-make type) (arg0 process-drawable) (arg1 collide-list-enum))
(let ((v0-0 ((method-of-type collide-shape new) allocation type-to-make arg0 arg1)))
(set! (-> (the-as collide-shape-moving v0-0) gspot-pos y) -40959590.0)
@@ -2019,7 +1976,6 @@
)
)
;; definition for symbol *collide-shape-prim-backgnd*, type collide-shape-prim-mesh
(define *collide-shape-prim-backgnd* (new 'static 'collide-shape-prim-mesh
:cshape #f
:prim-core (new 'static 'collide-prim-core
@@ -2033,7 +1989,6 @@
)
)
;; definition for symbol *collide-shape-prim-water*, type collide-shape-prim-mesh
(define *collide-shape-prim-water* (new 'static 'collide-shape-prim-mesh
:cshape #f
:prim-core (new 'static 'collide-prim-core
@@ -2047,8 +2002,6 @@
)
)
;; definition (perm) for symbol *collide-rider-pool*, type collide-rider-pool
(define-perm *collide-rider-pool* collide-rider-pool (new 'global 'collide-rider-pool))
;; failed to figure out what this is:
0
+36 -19
View File
@@ -651,7 +651,7 @@
(vector+! (-> self draw origin) (-> self root-override2 trans) (-> self draw bounds))
(set! (-> self draw origin w) (-> self draw bounds w))
(logior! (-> self draw status) (draw-control-status no-draw))
(let ((v1-9 (-> self root-override2 root-prim)))
(let ((v1-9 (-> (the-as collide-shape-moving (-> self root-override2)) root-prim)))
(set! (-> v1-9 prim-core collide-as) (collide-spec))
(set! (-> v1-9 prim-core collide-with) (collide-spec))
)
@@ -670,9 +670,13 @@
(suspend)
)
(logclear! (-> self draw status) (draw-control-status no-draw))
(let ((v1-29 (-> self root-override2 root-prim)))
(set! (-> v1-29 prim-core collide-as) (-> self root-override2 backup-collide-as))
(set! (-> v1-29 prim-core collide-with) (-> self root-override2 backup-collide-with))
(let ((v1-29 (-> (the-as collide-shape-moving (-> self root-override2)) root-prim)))
(set! (-> v1-29 prim-core collide-as)
(-> (the-as collide-shape-moving (-> self root-override2)) backup-collide-as)
)
(set! (-> v1-29 prim-core collide-with)
(-> (the-as collide-shape-moving (-> self root-override2)) backup-collide-with)
)
)
(go-virtual idle)
(none)
@@ -684,7 +688,7 @@
:event crate-standard-event-handler
:code (behavior ()
(suspend)
(collide-shape-method-46 (-> self root-override2))
(collide-shape-method-46 (the-as collide-shape-moving (-> self root-override2)))
(carry-info-method-9 (-> self carry))
(logior! (-> self mask) (process-mask sleep))
(until #f
@@ -714,7 +718,7 @@
(ja-post)
(carry-info-method-9 (-> self carry))
(carry-info-method-13 (-> self carry))
(collide-shape-method-46 (-> self root-override2))
(collide-shape-method-46 (the-as collide-shape-moving (-> self root-override2)))
(none)
)
)
@@ -751,16 +755,22 @@
(none)
)
:trans (behavior ()
(when (and (logtest? (-> self root-override2 status) (cshape-moving-flags on-surface))
(< 0.8 (-> self root-override2 surface-angle))
(when (and (logtest? (-> (the-as collide-shape-moving (-> self root-override2)) status) (cshape-moving-flags on-surface))
(< 0.8 (-> (the-as collide-shape-moving (-> self root-override2)) surface-angle))
)
(vector-reset! (-> self root-override2 transv))
(when (= (vector-length (-> self root-override2 transv)) 0.0)
(set! (-> self root-override2 root-prim local-sphere w) (-> self carry backup-radius))
(set! (-> (the-as collide-shape-moving (-> self root-override2)) root-prim local-sphere w)
(-> self carry backup-radius)
)
(set! (-> self base quad) (-> self root-override2 trans quad))
(let ((v1-16 (-> self root-override2 root-prim)))
(set! (-> v1-16 prim-core collide-as) (-> self root-override2 backup-collide-as))
(set! (-> v1-16 prim-core collide-with) (-> self root-override2 backup-collide-with))
(let ((v1-16 (-> (the-as collide-shape-moving (-> self root-override2)) root-prim)))
(set! (-> v1-16 prim-core collide-as)
(-> (the-as collide-shape-moving (-> self root-override2)) backup-collide-as)
)
(set! (-> v1-16 prim-core collide-with)
(-> (the-as collide-shape-moving (-> self root-override2)) backup-collide-with)
)
)
(go-virtual idle)
)
@@ -773,8 +783,13 @@
(-> self root-override2 transv)
(compute-acc-due-to-gravity (-> self root-override2) (new-stack-vector0) 0.0)
)
(if (< (-> self root-override2 dynam gravity-max) (vector-length (-> self root-override2 transv)))
(vector-normalize! (-> self root-override2 transv) (-> self root-override2 dynam gravity-max))
(if (< (-> (the-as collide-shape-moving (-> self root-override2)) dynam gravity-max)
(vector-length (-> self root-override2 transv))
)
(vector-normalize!
(-> self root-override2 transv)
(-> (the-as collide-shape-moving (-> self root-override2)) dynam gravity-max)
)
)
(let ((gp-1 (-> self root-override2)))
(let ((a2-1 (new 'stack-no-clear 'collide-query)))
@@ -834,13 +849,13 @@
)
(when v1-3
(let* ((gp-1 (-> (the-as process-drawable v1-3) root))
(v1-4 (if (type? gp-1 collide-shape)
(v1-4 (if (type? (the-as collide-shape-moving gp-1) collide-shape)
gp-1
)
)
)
(when v1-4
(let* ((gp-2 (-> self root-override2 root-prim prim-core))
(let* ((gp-2 (-> (the-as collide-shape-moving (-> self root-override2)) root-prim prim-core))
(a1-3 (-> (the-as collide-shape-moving v1-4) root-prim prim-core))
(f30-0 (vector-vector-distance (the-as vector gp-2) (the-as vector a1-3)))
)
@@ -1162,7 +1177,7 @@
)
)
)
(let ((v1-20 (-> self root-override2 root-prim)))
(let ((v1-20 (-> (the-as collide-shape-moving (-> self root-override2)) root-prim)))
(set! (-> v1-20 prim-core collide-as) (collide-spec))
(set! (-> v1-20 prim-core collide-with) (collide-spec))
)
@@ -1302,7 +1317,7 @@
"Initialize the [[crate]]'s skeleton and other parameters based on the crate type."
(case (-> obj look)
(('iron)
(set! (-> obj root-override2 penetrated-by)
(set! (-> (the-as collide-shape-moving (-> obj root-override2)) penetrated-by)
(penetrate flop uppercut tube vehicle flut-attack board dark-skin explode)
)
(initialize-skeleton
@@ -1312,7 +1327,9 @@
)
)
(('steel)
(set! (-> obj root-override2 penetrated-by) (penetrate tube vehicle flut-attack board dark-skin explode))
(set! (-> (the-as collide-shape-moving (-> obj root-override2)) penetrated-by)
(penetrate tube vehicle flut-attack board dark-skin explode)
)
(initialize-skeleton
obj
(the-as skeleton-group (art-group-get-by-name *level* "skel-crate-krimson" (the-as (pointer uint32) #f)))
-18
View File
@@ -1,7 +1,5 @@
;;-*-Lisp-*-
(in-package goal)
;; definition of type tr-stat
(deftype tr-stat (structure)
((groups uint16 :offset-assert 0)
(fragments uint16 :offset-assert 2)
@@ -15,7 +13,6 @@
:flag-assert #x900000010
)
;; definition for method 3 of type tr-stat
(defmethod inspect tr-stat ((obj tr-stat))
(when (not obj)
(set! obj obj)
@@ -32,7 +29,6 @@
obj
)
;; definition of type merc-global-stats
(deftype merc-global-stats (structure)
((merc tr-stat :inline :offset-assert 0)
(emerc tr-stat :inline :offset-assert 16)
@@ -43,7 +39,6 @@
:flag-assert #x900000030
)
;; definition for method 3 of type merc-global-stats
(defmethod inspect merc-global-stats ((obj merc-global-stats))
(when (not obj)
(set! obj obj)
@@ -57,7 +52,6 @@
obj
)
;; definition of type perf-stat
(deftype perf-stat (structure)
((frame-number uint32 :offset-assert 0)
(count uint32 :offset-assert 4)
@@ -86,7 +80,6 @@
)
)
;; definition for method 3 of type perf-stat
(defmethod inspect perf-stat ((obj perf-stat))
(when (not obj)
(set! obj obj)
@@ -110,7 +103,6 @@
obj
)
;; definition (debug) for function perf-stat-bucket->string
(defun-debug perf-stat-bucket->string ((arg0 perf-stat-bucket))
(case arg0
(((perf-stat-bucket collide-fill))
@@ -272,7 +264,6 @@
)
)
;; definition of type perf-stat-array
(deftype perf-stat-array (inline-array-class)
((data perf-stat :inline :dynamic :offset-assert 16)
)
@@ -281,7 +272,6 @@
:flag-assert #x900000010
)
;; definition for method 3 of type perf-stat-array
(defmethod inspect perf-stat-array ((obj perf-stat-array))
(when (not obj)
(set! obj obj)
@@ -295,11 +285,8 @@
obj
)
;; failed to figure out what this is:
(set! (-> perf-stat-array heap-base) (the-as uint 52))
;; definition for method 11 of type perf-stat
;; WARN: Return type mismatch int vs none.
(defmethod reset! perf-stat ((obj perf-stat))
(let ((v1-0 (-> obj ctrl)))
(+! (-> obj count) 1)
@@ -320,8 +307,6 @@
(none)
)
;; definition for method 12 of type perf-stat
;; WARN: Return type mismatch int vs none.
(defmethod read! perf-stat ((obj perf-stat))
(local-vars (v1-1 int) (v1-3 int))
(b! (zero? (-> obj ctrl)) cfg-2 :delay (nop!))
@@ -337,8 +322,6 @@
(none)
)
;; definition for method 13 of type perf-stat
;; WARN: Return type mismatch int vs none.
(defmethod update-wait-stats perf-stat ((obj perf-stat) (arg0 uint) (arg1 uint) (arg2 uint))
(when (nonzero? (-> obj ctrl))
(+! (-> obj to-vu0-waits) arg0)
@@ -349,7 +332,6 @@
(none)
)
;; failed to figure out what this is:
(when (not *debug-segment*)
(set! (-> perf-stat method-table 11) nothing)
(set! (-> perf-stat method-table 12) nothing)
+1 -5
View File
@@ -1,7 +1,5 @@
;;-*-Lisp-*-
(in-package goal)
;; definition for symbol *entity-info*, type (array entity-info)
(define *entity-info* (new 'static 'boxed-array :type entity-info
(new 'static 'entity-info
:ptype (type-ref stadium-part :method-count 19)
@@ -179,7 +177,7 @@
:heap-size #x4000
)
(new 'static 'entity-info
:ptype (type-ref neon-baron :method-count 19)
:ptype (type-ref neon-baron :method-count 17)
:package "game"
:art-group '()
:pool '*16k-dead-pool*
@@ -188,8 +186,6 @@
)
)
;; definition for function entity-info-lookup
;; WARN: Return type mismatch basic vs entity-info.
(defun entity-info-lookup ((arg0 type))
"Given a type, return the [[entity-info]] from [[*entity-info*]] whos type
matches the `ptype` field. Set's `method 13` on said type that returns the `length`
-170
View File
@@ -1,17 +1,11 @@
;;-*-Lisp-*-
(in-package goal)
;; definition for symbol *spawn-actors*, type symbol
(define *spawn-actors* #t)
;; definition for symbol *compact-actors*, type symbol
(define *compact-actors* #t)
;; definition for symbol *vis-actors*, type symbol
(define *vis-actors* #t)
;; definition for method 8 of type drawable-actor
;; WARN: Return type mismatch int vs drawable-actor.
(defmethod mem-usage drawable-actor ((obj drawable-actor) (arg0 memory-usage-block) (arg1 int))
(set! (-> arg0 length) (max 44 (-> arg0 length)))
(set! (-> arg0 data 43 name) "entity")
@@ -24,8 +18,6 @@
(the-as drawable-actor 0)
)
;; definition for method 8 of type drawable-inline-array-actor
;; WARN: Return type mismatch int vs drawable-inline-array-actor.
(defmethod mem-usage drawable-inline-array-actor ((obj drawable-inline-array-actor) (arg0 memory-usage-block) (arg1 int))
(set! (-> arg0 length) (max 1 (-> arg0 length)))
(set! (-> arg0 data 0 name) (symbol->string 'drawable-group))
@@ -40,13 +32,11 @@
(the-as drawable-inline-array-actor 0)
)
;; definition for method 2 of type entity-links
(defmethod print entity-links ((obj entity-links))
(format #t "#<entity-links :process ~A @ #x~X>" (-> obj process) obj)
obj
)
;; definition for method 2 of type entity-perm
(defmethod print entity-perm ((obj entity-perm))
(format
#t
@@ -60,7 +50,6 @@
obj
)
;; definition for method 2 of type actor-group
(defmethod print actor-group ((obj actor-group))
(format #t "#<actor-group")
(dotimes (s5-0 (-> obj length))
@@ -70,8 +59,6 @@
obj
)
;; definition for method 3 of type actor-group
;; INFO: this function exists in multiple non-identical object files
(defmethod inspect actor-group ((obj actor-group))
(format #t "[~8x] ~A~%" obj (-> obj type))
(format #t "~Tlength: ~D~%" (-> obj length))
@@ -83,25 +70,21 @@
obj
)
;; definition for method 22 of type entity
(defmethod birth! entity ((obj entity))
(format #t "birth ~A~%" obj)
obj
)
;; definition for method 23 of type entity
(defmethod kill! entity ((obj entity))
(format #t "kill ~A~%" obj)
obj
)
;; definition for method 2 of type entity
(defmethod print entity ((obj entity))
(format #t "#<~A :name ~S @ #x~X>" (-> obj type) (res-lump-struct obj 'name structure) obj)
obj
)
;; definition for method 26 of type entity
(defmethod get-level entity ((obj entity))
(dotimes (v1-0 (-> *level* length))
(let ((a1-3 (-> *level* level v1-0)))
@@ -117,7 +100,6 @@
(-> *level* default-level)
)
;; definition for function entity-by-name
(defun entity-by-name ((arg0 string))
(dotimes (s5-0 (-> *level* length))
(let ((s4-0 (-> *level* level s5-0)))
@@ -172,7 +154,6 @@
(the-as entity #f)
)
;; definition for function entity-by-type
(defun entity-by-type ((arg0 type))
(dotimes (s5-0 (-> *level* length))
(let ((v1-3 (-> *level* level s5-0)))
@@ -194,7 +175,6 @@
(the-as entity-actor #f)
)
;; definition for function entity-by-aid
(defun entity-by-aid ((arg0 uint))
(dotimes (v1-0 (-> *level* length))
(let ((a1-3 (-> *level* level v1-0)))
@@ -232,8 +212,6 @@
(the-as entity #f)
)
;; definition for function entity-actor-from-level-name
;; WARN: Return type mismatch entity vs entity-actor.
(defun entity-actor-from-level-name ((arg0 level))
(let ((v0-0 (the-as entity #f)))
(dotimes (s5-0 (-> *level* length))
@@ -256,8 +234,6 @@
)
)
;; definition for method 18 of type level-group
;; WARN: Return type mismatch int vs none.
(defmethod level-group-method-18 level-group ((obj level-group))
(when (not (paused?))
(dotimes (s5-0 (-> obj length))
@@ -278,7 +254,6 @@
(none)
)
;; definition for function entity-nav-mesh-by-aid
(defun entity-nav-mesh-by-aid ((arg0 actor-id))
(dotimes (v1-0 (-> *level* length))
(let ((a1-3 (-> *level* level v1-0)))
@@ -316,7 +291,6 @@
(the-as entity-nav-mesh #f)
)
;; definition for function nav-mesh-from-res-tag
(defun nav-mesh-from-res-tag ((arg0 entity) (arg1 symbol) (arg2 int))
(let ((v1-1 (res-lump-data arg0 arg1 pointer))
(gp-0 (the-as nav-mesh #f))
@@ -337,7 +311,6 @@
)
)
;; definition for function entity-by-meters
(defun entity-by-meters ((arg0 float) (arg1 float) (arg2 float))
(dotimes (v1-0 (-> *level* length))
(let ((a3-3 (-> *level* level v1-0)))
@@ -364,7 +337,6 @@
(the-as entity-actor #f)
)
;; definition for function process-by-ename
(defun process-by-ename ((arg0 string))
(let ((v1-0 (entity-by-name arg0)))
(if v1-0
@@ -373,7 +345,6 @@
)
)
;; definition for function entity-process-count
(defun entity-process-count ((arg0 symbol))
(let ((gp-0 0))
(dotimes (s4-0 (-> *level* length))
@@ -404,7 +375,6 @@
)
)
;; definition for function entity-count
(defun entity-count ()
(let ((v0-0 0))
(dotimes (v1-0 (-> *level* length))
@@ -423,8 +393,6 @@
)
)
;; definition for function entity-remap-names
;; WARN: Return type mismatch int vs none.
(defun entity-remap-names ((arg0 pair))
(let ((s5-0 (car arg0)))
(while (not (null? arg0))
@@ -451,8 +419,6 @@
(none)
)
;; definition (debug) for function process-status-bits
;; WARN: Return type mismatch int vs none.
(defun-debug process-status-bits ((arg0 process) (arg1 symbol))
(let* ((s5-0 arg0)
(s3-0 (if (type? s5-0 process-drawable)
@@ -514,7 +480,6 @@
(none)
)
;; definition for function process-entity-set!
(defun process-entity-set! ((arg0 process) (arg1 entity-actor))
(set! (-> arg0 entity) arg1)
(if arg1
@@ -524,13 +489,10 @@
arg1
)
;; definition for function process-task-mask
(defun process-task-mask ((arg0 process))
(-> arg0 level task-mask)
)
;; definition for method 2 of type process
;; INFO: this function exists in multiple non-identical object files
(defmethod print process ((obj process))
(cond
((and (-> obj top-thread) (!= (-> obj status) 'dead))
@@ -566,7 +528,6 @@
obj
)
;; definition for method 3 of type entity
(defmethod inspect entity ((obj entity))
((the-as (function entity entity) (find-parent-method entity 3)) obj)
(format #t "~Ttrans: ~`vector`P~%" (-> obj trans))
@@ -574,7 +535,6 @@
obj
)
;; definition for method 3 of type entity-nav-mesh
(defmethod inspect entity-nav-mesh ((obj entity-nav-mesh))
((the-as (function object object) (find-parent-method entity-nav-mesh 3)) obj)
(format #t "~Tnav-mesh ~A~%" (-> obj nav-mesh))
@@ -584,7 +544,6 @@
obj
)
;; definition for method 3 of type entity-actor
(defmethod inspect entity-actor ((obj entity-actor))
((the-as (function entity entity) (find-parent-method entity-actor 3)) obj)
(format #t "~Tetype: ~A~%" (-> obj etype))
@@ -655,8 +614,6 @@
obj
)
;; definition for method 29 of type entity-actor
;; WARN: Return type mismatch entity-actor vs none.
(defmethod debug-print entity-actor ((obj entity-actor) (arg0 symbol) (arg1 type))
(let ((s4-0 (-> obj etype)))
(when (or (not arg1) (and s4-0 (valid? s4-0 type #f #f 0) (type-type? s4-0 arg1)))
@@ -729,8 +686,6 @@
(none)
)
;; definition for method 14 of type level-group
;; WARN: Return type mismatch int vs none.
(defmethod debug-print-entities level-group ((obj level-group) (arg0 symbol) (arg1 type))
(let ((t9-0 format)
(a0-1 #t)
@@ -768,9 +723,6 @@
(none)
)
;; definition for method 24 of type entity-actor
;; INFO: Used lq/sq
;; WARN: Return type mismatch entity-actor vs none.
(defmethod add-to-level! entity-actor ((obj entity-actor) (arg0 level-group) (arg1 level) (arg2 actor-id))
(let ((v1-4 (-> arg1 entity data (-> arg1 entity length))))
(+! (-> arg1 entity length) 1)
@@ -842,7 +794,6 @@
(none)
)
;; definition for method 25 of type entity
(defmethod remove-from-level! entity ((obj entity) (arg0 level-group))
(let ((v1-0 (-> obj extra)))
(cond
@@ -861,8 +812,6 @@
obj
)
;; definition for function update-actor-vis-box
;; WARN: Return type mismatch int vs none.
(defun update-actor-vis-box ((arg0 process-drawable) (arg1 vector) (arg2 vector))
(when (and arg0 (nonzero? (-> arg0 draw)) (zero? (logand (-> arg0 draw status) (draw-control-status no-draw))))
(let ((v1-5 (-> arg0 draw origin))
@@ -880,8 +829,6 @@
(none)
)
;; definition for method 25 of type level-group
;; WARN: Return type mismatch int vs none.
(defmethod update-vis-volumes level-group ((obj level-group))
(local-vars (sv-16 pointer) (sv-20 pointer) (sv-24 pointer) (sv-28 process))
(dotimes (s5-0 (-> obj length))
@@ -929,8 +876,6 @@
(none)
)
;; definition for function expand-bounding-box
;; WARN: Return type mismatch int vs none.
(defun expand-bounding-box ((arg0 vector) (arg1 vector) (arg2 vector) (arg3 vector))
(set! (-> arg0 x) (fmin (-> arg0 x) (-> arg2 x)))
(set! (-> arg0 y) (fmin (-> arg0 y) (-> arg2 y)))
@@ -942,45 +887,6 @@
(none)
)
;; definition for method 26 of type level-group
;; INFO: Used lq/sq
;; WARN: Stack slot offset 28 signed mismatch
;; WARN: Stack slot offset 28 signed mismatch
;; WARN: Stack slot offset 28 signed mismatch
;; WARN: Stack slot offset 32 signed mismatch
;; WARN: Stack slot offset 32 signed mismatch
;; WARN: Stack slot offset 32 signed mismatch
;; WARN: Stack slot offset 28 signed mismatch
;; WARN: Stack slot offset 28 signed mismatch
;; WARN: Stack slot offset 28 signed mismatch
;; WARN: Stack slot offset 32 signed mismatch
;; WARN: Stack slot offset 32 signed mismatch
;; WARN: Stack slot offset 32 signed mismatch
;; WARN: Stack slot offset 28 signed mismatch
;; WARN: Stack slot offset 28 signed mismatch
;; WARN: Stack slot offset 28 signed mismatch
;; WARN: Stack slot offset 32 signed mismatch
;; WARN: Stack slot offset 32 signed mismatch
;; WARN: Stack slot offset 32 signed mismatch
;; WARN: Stack slot offset 28 signed mismatch
;; WARN: Stack slot offset 28 signed mismatch
;; WARN: Stack slot offset 28 signed mismatch
;; WARN: Stack slot offset 32 signed mismatch
;; WARN: Stack slot offset 32 signed mismatch
;; WARN: Stack slot offset 32 signed mismatch
;; WARN: Stack slot offset 28 signed mismatch
;; WARN: Stack slot offset 28 signed mismatch
;; WARN: Stack slot offset 28 signed mismatch
;; WARN: Stack slot offset 32 signed mismatch
;; WARN: Stack slot offset 32 signed mismatch
;; WARN: Stack slot offset 32 signed mismatch
;; WARN: Stack slot offset 28 signed mismatch
;; WARN: Stack slot offset 28 signed mismatch
;; WARN: Stack slot offset 28 signed mismatch
;; WARN: Stack slot offset 32 signed mismatch
;; WARN: Stack slot offset 32 signed mismatch
;; WARN: Stack slot offset 32 signed mismatch
;; WARN: Return type mismatch int vs none.
(defmethod update-vis-volumes-from-nav-mesh level-group ((obj level-group))
(local-vars
(sv-16 pointer)
@@ -1078,15 +984,6 @@
(none)
)
;; definition for method 27 of type level-group
;; INFO: Used lq/sq
;; WARN: Stack slot offset 20 signed mismatch
;; WARN: Stack slot offset 20 signed mismatch
;; WARN: Stack slot offset 20 signed mismatch
;; WARN: Stack slot offset 20 signed mismatch
;; WARN: Stack slot offset 20 signed mismatch
;; WARN: Stack slot offset 20 signed mismatch
;; WARN: Return type mismatch int vs none.
(defmethod print-volume-sizes level-group ((obj level-group))
(local-vars
(sv-16 pointer)
@@ -1167,8 +1064,6 @@
(none)
)
;; definition for function expand-vis-box-with-point
;; WARN: Return type mismatch int vs none.
(defun expand-vis-box-with-point ((arg0 entity) (arg1 vector))
(let ((v1-1 (res-lump-data arg0 'visvol (inline-array vector))))
(when v1-1
@@ -1188,7 +1083,6 @@
(none)
)
;; definition of type debug-actor-info
(deftype debug-actor-info (basic)
((name basic :offset-assert 4)
(handle handle :offset-assert 8)
@@ -1200,7 +1094,6 @@
:flag-assert #x900000018
)
;; definition for method 3 of type debug-actor-info
(defmethod inspect debug-actor-info ((obj debug-actor-info))
(when (not obj)
(set! obj obj)
@@ -1215,14 +1108,10 @@
obj
)
;; definition for symbol *debug-actor-info*, type debug-actor-info
(define *debug-actor-info* (new 'static 'debug-actor-info :name #f))
;; definition for symbol *pid-string*, type string
(define *pid-string* (new 'global 'string 128 (the-as string #f)))
;; definition (debug) for function debug-actor
;; WARN: Return type mismatch int vs none.
(defun-debug debug-actor ((arg0 string))
(let ((gp-0 *debug-actor-info*))
(set! (-> gp-0 name) #f)
@@ -1259,8 +1148,6 @@
(none)
)
;; definition (debug) for function draw-actor-marks
;; WARN: Return type mismatch int vs none.
(defun-debug draw-actor-marks ((arg0 process))
(local-vars (sv-16 entity-actor) (sv-20 (pointer int32)))
(b!
@@ -1394,9 +1281,6 @@
(none)
)
;; definition for method 15 of type level-group
;; INFO: Used lq/sq
;; WARN: Return type mismatch int vs none.
(defmethod debug-draw-actors level-group ((obj level-group) (arg0 symbol))
(local-vars
(sv-16 symbol)
@@ -1775,20 +1659,16 @@
)
)
;; definition for method 22 of type entity-camera
(defmethod birth! entity-camera ((obj entity-camera))
(add-connection *camera-engine* *camera* nothing obj #f #f)
obj
)
;; definition for method 23 of type entity-camera
(defmethod kill! entity-camera ((obj entity-camera))
(remove-by-param1 *camera-engine* (the-as int obj))
obj
)
;; definition for function init-entity
;; WARN: Return type mismatch process vs none.
(defun init-entity ((arg0 process) (arg1 entity-actor) (arg2 process))
(activate arg0 *entity-pool* (res-lump-struct arg1 'name basic) (the-as pointer #x70004000))
(set! (-> arg0 entity) arg1)
@@ -1798,7 +1678,6 @@
(none)
)
;; definition for method 22 of type entity-actor
(defmethod birth! entity-actor ((obj entity-actor))
(let* ((s5-0 (-> obj etype))
(v1-0 (entity-info-lookup s5-0))
@@ -1829,8 +1708,6 @@
obj
)
;; definition for function entity-deactivate-handler
;; WARN: Return type mismatch symbol vs none.
(defun entity-deactivate-handler ((arg0 process) (arg1 entity-actor))
(when (= arg0 (-> arg1 extra process))
(logclear! (-> arg1 extra perm status) (entity-perm-status bit-1 no-kill))
@@ -1839,7 +1716,6 @@
(none)
)
;; definition for method 23 of type entity-actor
(defmethod kill! entity-actor ((obj entity-actor))
(let ((a0-1 (-> obj extra process)))
(if a0-1
@@ -1850,11 +1726,6 @@
obj
)
;; definition for method 17 of type bsp-header
;; INFO: Used lq/sq
;; WARN: Return type mismatch bsp-header vs none.
;; ERROR: Unsupported inline assembly instruction kind - [mfc0 s5, Count]
;; ERROR: Unsupported inline assembly instruction kind - [mfc0 v1, Count]
(defmethod birth bsp-header ((obj bsp-header))
(local-vars (v1-74 int) (s5-0 int) (sv-16 int))
(.mfc0 s5-0 Count)
@@ -1927,8 +1798,6 @@
(none)
)
;; definition for function check-for-rougue-process
;; WARN: Return type mismatch int vs none.
(defun check-for-rougue-process ((arg0 process) (arg1 int) (arg2 int) (arg3 level))
(cond
((-> arg0 entity)
@@ -2033,8 +1902,6 @@
(none)
)
;; definition for method 18 of type bsp-header
;; WARN: Return type mismatch bsp-header vs none.
(defmethod deactivate-entities bsp-header ((obj bsp-header))
(let ((v1-1 (-> obj level heap base))
(a0-2 (-> obj level heap top-base))
@@ -2121,9 +1988,6 @@
(none)
)
;; definition for function process-drawable-scale-from-entity!
;; INFO: Used lq/sq
;; WARN: Return type mismatch int vs none.
(defun process-drawable-scale-from-entity! ((arg0 process-drawable) (arg1 entity))
(let ((v1-1 (res-lump-struct arg1 'scale structure)))
(if v1-1
@@ -2135,9 +1999,6 @@
(none)
)
;; definition for function process-drawable-from-entity!
;; INFO: Used lq/sq
;; WARN: Return type mismatch process-drawable vs none.
(defun process-drawable-from-entity! ((arg0 process-drawable) (arg1 entity-actor))
(logior! (-> arg0 mask) (process-mask actor-pause))
(set! (-> arg0 root trans quad) (-> arg1 extra trans quad))
@@ -2146,7 +2007,6 @@
(none)
)
;; definition for method 9 of type entity-perm
(defmethod update entity-perm ((obj entity-perm) (arg0 symbol) (arg1 entity-perm-status))
(cond
((= arg0 'game)
@@ -2177,8 +2037,6 @@
obj
)
;; definition for function reset-actors
;; WARN: Return type mismatch int vs none.
(defun reset-actors ((arg0 symbol))
(let* ((v1-0 arg0)
(s5-0 (cond
@@ -2263,8 +2121,6 @@
(none)
)
;; definition for function reset-cameras
;; WARN: Return type mismatch int vs none.
(defun reset-cameras ()
(remove-all *camera-engine*)
(dotimes (gp-0 (-> *level* length))
@@ -2284,7 +2140,6 @@
(none)
)
;; definition for method 12 of type process-drawable
(defmethod run-logic? process-drawable ((obj process-drawable))
(or (not (logtest? (-> obj mask) (process-mask actor-pause)))
(or (>= (+ (-> *ACTOR-bank* pause-dist) (-> obj root pause-adjust-distance))
@@ -2296,21 +2151,12 @@
)
)
;; definition for method 9 of type entity-links
(defmethod birth? entity-links ((obj entity-links) (arg0 vector))
(and (not (logtest? (-> obj perm status) (entity-perm-status bit-0 dead)))
(< (vector-vector-distance (-> obj trans) arg0) (-> *ACTOR-bank* birth-dist))
)
)
;; definition for method 17 of type level-group
;; INFO: Used lq/sq
;; ERROR: Stack slot load at 96 mismatch: defined as size 4, got size 16
;; ERROR: Stack slot load at 96 mismatch: defined as size 4, got size 16
;; ERROR: Stack slot load at 96 mismatch: defined as size 4, got size 16
;; ERROR: Stack slot load at 96 mismatch: defined as size 4, got size 16
;; WARN: Return type mismatch int vs none.
;; WARN: Function (method 17 level-group) has a return type of none, but the expression builder found a return statement.
(defmethod actors-update level-group ((obj level-group))
(local-vars
(sv-16 vector)
@@ -2517,7 +2363,6 @@
)
)
;; definition for function entity-birth-no-kill
(defun entity-birth-no-kill ((arg0 entity))
(let ((gp-0 (-> arg0 extra)))
(logior! (-> gp-0 perm status) (entity-perm-status no-kill))
@@ -2528,8 +2373,6 @@
)
)
;; definition for function entity-task-complete-on
;; WARN: Return type mismatch int vs none.
(defun entity-task-complete-on ((arg0 entity))
(let ((v1-0 (-> arg0 extra)))
(if (nonzero? (-> v1-0 perm task))
@@ -2540,8 +2383,6 @@
(none)
)
;; definition for function entity-task-complete-off
;; WARN: Return type mismatch int vs none.
(defun entity-task-complete-off ((arg0 entity))
(let ((v1-0 (-> arg0 extra)))
(if (!= (-> v1-0 perm task) 1)
@@ -2552,8 +2393,6 @@
(none)
)
;; definition for method 30 of type entity-actor
;; WARN: Return type mismatch entity-perm-status vs none.
(defmethod toggle-status entity-actor ((obj entity-actor) (arg0 entity-perm-status) (arg1 symbol))
(let ((v1-0 (-> obj extra)))
(if arg1
@@ -2565,8 +2404,6 @@
(none)
)
;; definition for function process-entity-status!
;; WARN: Return type mismatch int vs entity-perm-status.
(defun process-entity-status! ((arg0 process) (arg1 entity-perm-status) (arg2 symbol))
(the-as entity-perm-status (cond
((and (-> arg0 entity) arg0 (= arg0 (-> arg0 entity extra process)))
@@ -2585,8 +2422,6 @@
)
)
;; definition for function find-nearest-entity
;; WARN: Return type mismatch entity-actor vs entity.
(defun find-nearest-entity ((arg0 vector) (arg1 type))
(local-vars (v1-9 object))
(let ((gp-0 (the-as entity-actor #f)))
@@ -2626,8 +2461,6 @@
)
)
;; definition (debug) for function entity-speed-test
;; ERROR: Unsupported inline assembly instruction kind - [mfc0 s4, Count]
(defun-debug entity-speed-test ((arg0 string))
(local-vars (s4-0 int))
(let ((gp-0 (entity-by-name arg0)))
@@ -2647,9 +2480,6 @@
)
)
;; definition (debug) for function dump-entity-remap
;; INFO: Used lq/sq
;; WARN: Return type mismatch int vs none.
(defun-debug dump-entity-remap ((arg0 object) (arg1 object))
(local-vars
(sv-16 symbol)
-56
View File
@@ -1,13 +1,10 @@
;;-*-Lisp-*-
(in-package goal)
;; definition for method 9 of type billboard
(defmethod login billboard ((obj billboard))
(adgif-shader-login (-> obj flat))
obj
)
;; definition for method 8 of type billboard
(defmethod mem-usage billboard ((obj billboard) (arg0 memory-usage-block) (arg1 int))
(set! (-> arg0 length) (max 34 (-> arg0 length)))
(set! (-> arg0 data 33 name) "billboard")
@@ -19,7 +16,6 @@
obj
)
;; definition for function mem-usage-shrub-walk
(defun mem-usage-shrub-walk ((arg0 draw-node) (arg1 int) (arg2 memory-usage-block) (arg3 int))
(set! (-> arg2 length) (max 64 (-> arg2 length)))
(set! (-> arg2 data 63 name) "draw-node")
@@ -52,7 +48,6 @@
arg0
)
;; definition for method 8 of type drawable-tree-instance-shrub
(defmethod mem-usage drawable-tree-instance-shrub ((obj drawable-tree-instance-shrub) (arg0 memory-usage-block) (arg1 int))
(set! (-> arg0 length) (max 1 (-> arg0 length)))
(set! (-> arg0 data 0 name) (symbol->string 'drawable-group))
@@ -80,7 +75,6 @@
obj
)
;; definition for method 9 of type generic-shrub-fragment
(defmethod login generic-shrub-fragment ((obj generic-shrub-fragment))
(let ((s5-0 (/ (-> obj cnt-qwc) (the-as uint 5))))
(dotimes (s4-0 (the-as int s5-0))
@@ -90,7 +84,6 @@
obj
)
;; definition for method 8 of type generic-shrub-fragment
(defmethod mem-usage generic-shrub-fragment ((obj generic-shrub-fragment) (arg0 memory-usage-block) (arg1 int))
(set! (-> arg0 length) (max 27 (-> arg0 length)))
(set! (-> arg0 data 25 name) "generic-shrub")
@@ -108,7 +101,6 @@
obj
)
;; definition for method 3 of type prototype-shrubbery
(defmethod inspect prototype-shrubbery ((obj prototype-shrubbery))
(format #t "[~8x] ~A~%" obj (-> obj type))
(format #t "~Tlength: ~D~%" (-> obj length))
@@ -119,7 +111,6 @@
obj
)
;; definition for method 8 of type prototype-shrubbery
(defmethod mem-usage prototype-shrubbery ((obj prototype-shrubbery) (arg0 memory-usage-block) (arg1 int))
(set! (-> arg0 length) (max 1 (-> arg0 length)))
(set! (-> arg0 data 0 name) (symbol->string 'drawable-group))
@@ -134,7 +125,6 @@
obj
)
;; definition for method 9 of type prototype-shrubbery
(defmethod login prototype-shrubbery ((obj prototype-shrubbery))
(dotimes (s5-0 (-> obj length))
(login (-> obj data s5-0))
@@ -142,13 +132,10 @@
obj
)
;; definition for method 5 of type prototype-shrubbery
;; WARN: Return type mismatch uint vs int.
(defmethod asize-of prototype-shrubbery ((obj prototype-shrubbery))
(the-as int (+ (-> prototype-shrubbery size) (* (+ (-> obj length) -1) 32)))
)
;; definition for method 9 of type prototype-generic-shrub
(defmethod login prototype-generic-shrub ((obj prototype-generic-shrub))
(dotimes (s5-0 (-> obj length))
(login (-> obj data s5-0))
@@ -156,7 +143,6 @@
obj
)
;; definition for method 9 of type shrubbery
(defmethod login shrubbery ((obj shrubbery))
(let ((s5-0 (* (-> obj header data 0) 2)))
(dotimes (s4-0 (the-as int s5-0))
@@ -182,7 +168,6 @@
obj
)
;; definition for method 8 of type shrubbery
(defmethod mem-usage shrubbery ((obj shrubbery) (arg0 memory-usage-block) (arg1 int))
(set! (-> arg0 length) (max 28 (-> arg0 length)))
(set! (-> arg0 data 27 name) "shrubbery")
@@ -222,7 +207,6 @@
obj
)
;; definition for method 9 of type drawable-tree-instance-shrub
(defmethod login drawable-tree-instance-shrub ((obj drawable-tree-instance-shrub))
(if (nonzero? (-> obj info prototype-inline-array-shrub))
(login (-> obj info prototype-inline-array-shrub))
@@ -230,17 +214,12 @@
obj
)
;; definition for symbol shrub-vu1-block, type vu-function
(define shrub-vu1-block (new 'static 'vu-function :length #x26a :qlength #x135))
;; definition for function shrub-num-tris
;; WARN: Return type mismatch uint32 vs uint.
(defun shrub-num-tris ((shrub shrubbery))
(the-as uint (- (-> shrub header data 2) (the-as uint (* (-> shrub header data 1) 2))))
)
;; definition for function shrub-make-perspective-matrix
;; INFO: Used lq/sq
(defun shrub-make-perspective-matrix ((out matrix) (camera-temp matrix))
(let* ((v1-0 out)
(t0-0 camera-temp)
@@ -275,7 +254,6 @@
out
)
;; definition for function shrub-init-view-data
(defun shrub-init-view-data ((view-data shrub-view-data))
(set! (-> view-data texture-giftag tag) (new 'static 'gif-tag64 :nloop #x1 :nreg #x4))
(set! (-> view-data texture-giftag regs) (new 'static 'gif-tag-regs
@@ -295,7 +273,6 @@
#f
)
;; definition for function shrub-upload-view-data
(defun shrub-upload-view-data ((dma-buff dma-buffer))
(let ((qwc 3))
(let* ((buf dma-buff)
@@ -312,12 +289,10 @@
#f
)
;; definition for function shrub-time
(defun shrub-time ((arg0 int) (arg1 int) (arg2 int) (arg3 int) (arg4 int))
(+ (* arg0 8) 29 (* 22 arg2) (* 11 arg1) (* (+ (* arg4 2) 15 (* 5 arg2) (* 13 arg0)) arg3) 53)
)
;; definition for function shrub-do-init-frame
(defun shrub-do-init-frame ((dma-buff dma-buffer))
(dma-buffer-add-vu-function dma-buff shrub-vu1-block 1)
(shrub-upload-view-data dma-buff)
@@ -356,7 +331,6 @@
#f
)
;; definition for function shrub-init-frame
(defun shrub-init-frame ((dma-buff dma-buffer) (test gs-test))
(shrub-do-init-frame dma-buff)
(let* ((v1-0 dma-buff)
@@ -382,7 +356,6 @@
#f
)
;; definition for function shrub-upload-model
(defun shrub-upload-model ((shrub shrubbery) (dma-buff dma-buffer) (arg2 int))
(let* ((v1-0 dma-buff)
(a3-0 (the-as dma-packet (-> v1-0 base)))
@@ -423,12 +396,7 @@
#f
)
;; definition for function draw-inline-array-instance-shrub
;; ERROR: function was not converted to expressions. Cannot decompile.
;; definition for function draw-prototype-inline-array-shrub
;; INFO: Used lq/sq
;; ERROR: Function may read a register that is not set: a2
(defun draw-prototype-inline-array-shrub ((proto-array-len int) (proto-array (inline-array prototype-bucket-shrub)))
(local-vars
(dma-ptr object)
@@ -997,9 +965,6 @@
)
)
;; definition for function draw-drawable-tree-instance-shrub
;; INFO: Used lq/sq
;; WARN: Return type mismatch int vs none.
(defun draw-drawable-tree-instance-shrub ((tree drawable-tree-instance-shrub) (level level))
(local-vars (a0-4 int) (a0-6 int) (a0-11 int) (a0-13 int))
(set! (-> *instance-shrub-work* texture-dists) (the-as uint (-> level bsp shrub-closest)))
@@ -1121,8 +1086,6 @@
(none)
)
;; definition for method 10 of type drawable-tree-instance-shrub
;; WARN: Return type mismatch int vs none.
(defmethod draw drawable-tree-instance-shrub ((obj drawable-tree-instance-shrub) (arg0 drawable-tree-instance-shrub) (arg1 display-frame))
(let ((v1-1 (-> *background-work* shrub-tree-count))
(a1-4 (-> *level* draw-level *draw-index*))
@@ -1135,13 +1098,10 @@
(none)
)
;; definition for method 15 of type drawable-tree-instance-shrub
(defmethod unpack-vis drawable-tree-instance-shrub ((obj drawable-tree-instance-shrub) (arg0 (pointer int8)) (arg1 (pointer int8)))
arg1
)
;; definition for method 13 of type drawable-tree-instance-shrub
;; WARN: Return type mismatch int vs none.
(defmethod collect-stats drawable-tree-instance-shrub ((obj drawable-tree-instance-shrub))
(when (logtest? (vu1-renderer-mask shrubbery shrub-near billboard shrubbery-vanish) (-> *display* vu1-enable-user))
(let* ((v1-4 (-> obj info prototype-inline-array-shrub))
@@ -1229,7 +1189,6 @@
(none)
)
;; definition of type dma-test
(deftype dma-test (structure)
((data qword 101 :inline :offset-assert 0)
)
@@ -1238,7 +1197,6 @@
:flag-assert #x900000650
)
;; definition for method 3 of type dma-test
(defmethod inspect dma-test ((obj dma-test))
(when (not obj)
(set! obj obj)
@@ -1250,10 +1208,8 @@
obj
)
;; definition for symbol *dma-test*, type dma-test
(define *dma-test* (new 'global 'dma-test))
;; definition of type dma-test-work
(deftype dma-test-work (structure)
((upload dma-packet :inline :offset-assert 0)
(end dma-packet :inline :offset-assert 16)
@@ -1263,7 +1219,6 @@
:flag-assert #x900000020
)
;; definition for method 3 of type dma-test-work
(defmethod inspect dma-test-work ((obj dma-test-work))
(when (not obj)
(set! obj obj)
@@ -1276,7 +1231,6 @@
obj
)
;; definition for symbol *dma-test-work*, type dma-test-work
(define *dma-test-work*
(new 'static 'dma-test-work
:upload (new 'static 'dma-packet :dma (new 'static 'dma-tag :qwc #x20 :id (dma-tag-id ref)))
@@ -1284,9 +1238,6 @@
)
)
;; definition for function init-dma-test
;; INFO: Used lq/sq
;; WARN: Return type mismatch uint128 vs none.
(defun init-dma-test ()
(let ((a0-0 *dma-test-work*)
(v1-0 (the-as object *dma-test*))
@@ -1303,11 +1254,4 @@
(none)
)
;; failed to figure out what this is:
(init-dma-test)
;; definition for function dma-test-func
;; ERROR: function was not converted to expressions. Cannot decompile.
;; definition for function move-test-func
;; ERROR: function was not converted to expressions. Cannot decompile.
+52 -66
View File
@@ -1,7 +1,5 @@
;;-*-Lisp-*-
(in-package goal)
;; definition of type check-vector-collision-with-nav-spheres-info
(deftype check-vector-collision-with-nav-spheres-info (structure)
((u float :offset-assert 0)
(intersect vector :inline :offset-assert 16)
@@ -12,7 +10,6 @@
:flag-assert #x900000030
)
;; definition for method 3 of type check-vector-collision-with-nav-spheres-info
(defmethod inspect check-vector-collision-with-nav-spheres-info ((obj check-vector-collision-with-nav-spheres-info))
(when (not obj)
(set! obj obj)
@@ -26,7 +23,6 @@
obj
)
;; definition of type nav-gap-info
(deftype nav-gap-info (structure)
((dest vector :inline :offset-assert 0)
(poly nav-poly :offset-assert 16)
@@ -36,7 +32,6 @@
:flag-assert #x900000014
)
;; definition for method 3 of type nav-gap-info
(defmethod inspect nav-gap-info ((obj nav-gap-info))
(when (not obj)
(set! obj obj)
@@ -49,21 +44,19 @@
obj
)
;; definition of type nav-avoid-spheres-params
(deftype nav-avoid-spheres-params (structure)
((current-pos vector :inline :offset-assert 0)
(travel vector :inline :offset-assert 16)
(pref-dir vector :inline :offset-assert 32)
(out-travel vector 2 :inline :offset-assert 48)
(closest-sphere-dist2 float :offset-assert 80)
(avoiding-sphere? basic :offset-assert 84)
(avoiding-sphere? symbol :offset-assert 84)
)
:method-count-assert 9
:size-assert #x58
:flag-assert #x900000058
)
;; definition for method 3 of type nav-avoid-spheres-params
(defmethod inspect nav-avoid-spheres-params ((obj nav-avoid-spheres-params))
(when (not obj)
(set! obj obj)
@@ -80,17 +73,15 @@
obj
)
;; definition of type nav-callback-info
(deftype nav-callback-info (structure)
((callback-count int32 :offset-assert 0)
(callback-array uint32 10 :offset-assert 4)
((callback-count int32 :offset-assert 0)
(callback-array (function object nav-control none) 10 :offset-assert 4)
)
:method-count-assert 9
:size-assert #x2c
:flag-assert #x90000002c
)
;; definition for method 3 of type nav-callback-info
(defmethod inspect nav-callback-info ((obj nav-callback-info))
(when (not obj)
(set! obj obj)
@@ -103,10 +94,9 @@
obj
)
;; definition of type nav-state
(deftype nav-state (structure)
((flags nav-state-flag :offset-assert 0)
(nav basic :offset-assert 4)
(nav nav-control :offset-assert 4)
(user-poly nav-poly :offset-assert 8)
(mesh nav-mesh :offset-assert 12)
(current-poly nav-poly :offset-assert 16)
@@ -131,56 +121,55 @@
:size-assert #xb0
:flag-assert #x37000000b0
(:methods
(nav-state-method-9 () none 9)
(nav-state-method-10 () none 10)
(nav-state-method-11 () none 11)
(nav-state-method-12 () none 12)
(nav-state-method-13 () none 13)
(nav-state-method-14 () none 14)
(nav-state-method-15 () none 15)
(nav-state-method-16 () none 16)
(nav-state-method-17 () none 17)
(nav-state-method-18 () none 18)
(nav-state-method-19 () none 19)
(nav-state-method-20 () none 20)
(debug-draw (_type_) none 9)
(nav-state-method-10 (_type_) none 10)
(nav-state-method-11 (_type_ nav-gap-info) symbol 11)
(nav-state-method-12 (_type_ vector) vector 12)
(nav-state-method-13 (_type_ vector) vector 13)
(nav-state-method-14 (_type_ vector) vector 14)
(nav-state-method-15 (_type_ vector) vector 15)
(get-speed (_type_) meters 16)
(get-rotation-rate (_type_) float 17)
(nav-state-method-18 (_type_ vector object vector) none 18)
(get-current-poly (_type_) nav-poly 19)
(copy-nav-state! (_type_ (pointer nav-state)) none 20)
(nav-state-method-21 () none 21)
(nav-state-method-22 () none 22)
(nav-state-method-23 () none 23)
(nav-state-method-24 () none 24)
(nav-state-method-25 () none 25)
(nav-state-method-26 () none 26)
(nav-state-method-27 () none 27)
(nav-state-method-28 () none 28)
(nav-state-method-29 () none 29)
(nav-state-method-30 () none 30)
(nav-state-method-31 () none 31)
(nav-state-method-32 () none 32)
(nav-state-method-33 () none 33)
(nav-state-method-34 () none 34)
(nav-state-method-35 () none 35)
(nav-state-method-36 () none 36)
(nav-state-method-37 () none 37)
(nav-state-method-38 () none 38)
(nav-state-method-24 (_type_) none 24)
(nav-state-method-25 (_type_) none 25)
(nav-state-method-26 (_type_) none 26)
(nav-state-method-27 (_type_) none 27)
(nav-state-method-28 (_type_) none 28)
(nav-state-method-29 (_type_) none 29)
(nav-state-method-30 (_type_) none 30)
(nav-state-method-31 (_type_) none 31)
(nav-state-method-32 (_type_) none 32)
(nav-state-method-33 (_type_) none 33)
(nav-state-method-34 (_type_) none 34)
(nav-state-method-35 (_type_) none 35)
(nav-state-method-36 (_type_ vector) none 36)
(nav-state-method-37 (_type_) none 37)
(set-current-poly! (_type_ nav-poly) none 38)
(nav-state-method-39 () none 39)
(nav-state-method-40 () none 40)
(nav-state-method-41 () none 41)
(nav-state-method-42 () none 42)
(nav-state-method-43 () none 43)
(nav-state-method-44 () none 44)
(nav-state-method-45 () none 45)
(nav-state-method-46 () none 46)
(nav-state-method-47 () none 47)
(nav-state-method-40 (_type_) none 40)
(nav-state-method-41 (_type_ vector) symbol 41)
(nav-state-method-42 (_type_ vector) none 42)
(nav-state-method-43 (_type_ vector) none 43)
(set-velocity! (_type_ vector) none 44)
(set-heading! (_type_ vector) none 45)
(set-speed! (_type_ meters) none 46)
(nav-state-method-47 (_type_ nav-control) none 47)
(nav-state-method-48 () none 48)
(nav-state-method-49 () none 49)
(nav-state-method-50 () none 50)
(nav-state-method-49 (_type_ clamp-travel-vector-to-mesh-return-info) none 49)
(nav-state-method-50 (_type_) none 50)
(nav-state-method-51 () none 51)
(nav-state-method-52 () none 52)
(nav-state-method-53 () none 53)
(nav-state-method-54 () none 54)
(nav-state-method-52 (_type_) none 52)
(nav-state-method-53 (_type_) none 53)
(nav-state-method-54 (_type_) none 54)
)
)
;; definition for method 3 of type nav-state
(defmethod inspect nav-state ((obj nav-state))
(when (not obj)
(set! obj obj)
@@ -260,7 +249,6 @@
obj
)
;; definition of type nav-control
(deftype nav-control (structure)
((flags nav-control-flag :offset-assert 0)
(callback-info nav-callback-info :offset-assert 4)
@@ -281,8 +269,8 @@
(sphere-mask uint8 :offset-assert 61)
(pad1 uint8 2 :offset-assert 62)
(sphere-id-array uint8 16 :offset-assert 64)
(extra-nav-sphere sphere :inline :offset-assert 80)
(root-nav-sphere sphere :inline :offset-assert 96)
(extra-nav-sphere vector :inline :offset-assert 80)
(root-nav-sphere vector :inline :offset-assert 96)
(state nav-state :inline :offset-assert 112)
)
:method-count-assert 47
@@ -292,7 +280,7 @@
(debug-draw (_type_) none 9)
(point-in-bounds? (_type_ vector) symbol 10)
(nav-control-method-11 (_type_ vector) vector 11)
(nav-control-method-12 () none 12)
(nav-control-method-12 (_type_ vector vector nav-poly) nav-poly 12)
(find-poly (_type_ vector) nav-poly 13)
(nav-control-method-14 (_type_ nav-poly vector object vector) none 14)
(nav-control-method-15 (_type_ vector) none 15)
@@ -300,11 +288,11 @@
(is-in-mesh? (_type_ vector float) symbol 17)
(nav-control-method-18 () none 18)
(nav-control-method-19 () none 19)
(nav-control-method-20 (_type_ vector vector vector int symbol symbol) none 20)
(nav-control-method-21 () none 21)
(nav-control-method-22 () none 22)
(nav-control-method-20 (_type_ vector nav-poly vector float symbol symbol) none 20)
(nav-control-method-21 (_type_) none 21)
(nav-control-method-22 (_type_ vector nav-avoid-spheres-params) float 22)
(nav-control-method-23 (_type_) none 23)
(nav-control-method-24 () none 24)
(nav-control-method-24 (_type_ vector int) none 24)
(get-max-rotation-rate (_type_) float 25)
(get-sphere-mask (_type_) none 26)
(get-target-speed (_type_) meters 27)
@@ -326,11 +314,10 @@
(display-marks? (_type_) symbol 43)
(nav-control-method-44 () none 44)
(nav-control-method-45 (_type_ vector vector vector) sphere 45)
(find-sphere (_type_) none 46)
(find-sphere (_type_ symbol) none 46)
)
)
;; definition for method 3 of type nav-control
(defmethod inspect nav-control ((obj nav-control))
(when (not obj)
(set! obj obj)
@@ -397,5 +384,4 @@
obj
)
;; failed to figure out what this is:
0
+254
View File
@@ -0,0 +1,254 @@
(in-package goal)
(deftype nav-enemy-info (enemy-info)
((callback-info nav-callback-info :offset-assert 384)
(use-momentum symbol :offset-assert 388)
(use-frustration basic :offset-assert 392)
(use-stop-chase basic :offset-assert 396)
(use-circling basic :offset-assert 400)
(use-pacing basic :offset-assert 404)
(walk-anim int32 :offset-assert 408)
(turn-anim int32 :offset-assert 412)
(run-anim int32 :offset-assert 416)
(taunt-anim int32 :offset-assert 420)
(run-travel-speed meters :offset-assert 424)
(run-acceleration meters :offset-assert 428)
(run-turning-acceleration meters :offset-assert 432)
(walk-travel-speed meters :offset-assert 436)
(walk-acceleration meters :offset-assert 440)
(walk-turning-acceleration meters :offset-assert 444)
(maximum-rotation-rate degrees :offset-assert 448)
(notice-nav-radius meters :offset-assert 452)
(frustration-distance meters :offset-assert 456)
(frustration-time time-frame :offset-assert 464)
(blocked-time time-frame :offset-assert 472)
(circle-dist-lo float :offset-assert 480)
(circle-dist-hi float :offset-assert 484)
(nav-mesh basic :offset-assert 488)
)
:method-count-assert 11
:size-assert #x1ec
:flag-assert #xb000001ec
(:methods
(copy-nav-enemy-info! (_type_ nav-enemy-info) none 10)
)
)
(defmethod inspect nav-enemy-info ((obj nav-enemy-info))
(when (not obj)
(set! obj obj)
(goto cfg-4)
)
(format #t "[~8x] ~A~%" obj (-> obj type))
(format #t "~1Tfact-defaults: ~A~%" (-> obj fact-defaults))
(format #t "~1Tuse-die-falling: ~A~%" (-> obj use-die-falling))
(format #t "~1Tuse-victory: ~A~%" (-> obj use-victory))
(format #t "~1Tuse-jump-blocked: ~A~%" (-> obj use-jump-blocked))
(format #t "~1Tdebug-draw-neck: ~A~%" (-> obj debug-draw-neck))
(format #t "~1Tjump-debug-draw: ~A~%" (-> obj jump-debug-draw))
(format #t "~1Tmove-to-ground: ~A~%" (-> obj move-to-ground))
(format #t "~1Thover-if-no-ground: ~A~%" (-> obj hover-if-no-ground))
(format #t "~1Tidle-anim-script: #x~X~%" (-> obj idle-anim-script))
(format #t "~1Tidle-anim: ~D~%" (-> obj idle-anim))
(format #t "~1Tnotice-anim: ~D~%" (-> obj notice-anim))
(format #t "~1Thostile-anim: ~D~%" (-> obj hostile-anim))
(format #t "~1Thit-anim: ~D~%" (-> obj hit-anim))
(format #t "~1Tknocked-anim: ~D~%" (-> obj knocked-anim))
(format #t "~1Tknocked-land-anim: ~D~%" (-> obj knocked-land-anim))
(format #t "~1Tdie-anim: ~D~%" (-> obj die-anim))
(format #t "~1Tdie-falling-anim: ~D~%" (-> obj die-falling-anim))
(format #t "~1Tvictory-anim: ~D~%" (-> obj victory-anim))
(format #t "~1Tjump-wind-up-anim: ~D~%" (-> obj jump-wind-up-anim))
(format #t "~1Tjump-in-air-anim: ~D~%" (-> obj jump-in-air-anim))
(format #t "~1Tjump-land-anim: ~D~%" (-> obj jump-land-anim))
(format #t "~1Tneck-joint: ~D~%" (-> obj neck-joint))
(format #t "~1Tlook-at-joint: ~D~%" (-> obj look-at-joint))
(format #t "~1Tbullseye-joint: ~D~%" (-> obj bullseye-joint))
(format #t "~1Tsound-hit: ~D~%" (-> obj sound-hit))
(format #t "~1Tsound-die: ~D~%" (-> obj sound-die))
(format #t "~1Tnotice-distance: (meters ~m)~%" (-> obj notice-distance))
(format #t "~1Tnotice-distance-delta: (meters ~m)~%" (-> obj notice-distance-delta))
(format #t "~1Tproximity-notice-distance: (meters ~m)~%" (-> obj proximity-notice-distance))
(format #t "~1Tdefault-hit-points: ~D~%" (-> obj default-hit-points))
(format #t "~1Tgnd-collide-with: ~D~%" (-> obj gnd-collide-with))
(format #t "~1Toverlaps-others-collide-with-filter: ~D~%" (-> obj overlaps-others-collide-with-filter))
(format #t "~1Tpenetrate-flinch: ~D~%" (-> obj penetrate-flinch))
(format #t "~1Tpenetrate-knocked: ~D~%" (-> obj penetrate-knocked))
(format #t "~1Tmovement-gravity: (meters ~m)~%" (-> obj movement-gravity))
(format #t "~1Tfriction: ~f~%" (-> obj friction))
(format #t "~1Tslip-factor: ~f~%" (-> obj slip-factor))
(format #t "~1Tattack-shove-back: (meters ~m)~%" (-> obj attack-shove-back))
(format #t "~1Tattack-shove-up: (meters ~m)~%" (-> obj attack-shove-up))
(format #t "~1Tattack-mode: ~A~%" (-> obj attack-mode))
(format #t "~1Tattack-damage: ~D~%" (-> obj attack-damage))
(format #t "~1Trecover-gnd-collide-with: ~D~%" (-> obj recover-gnd-collide-with))
(format #t "~1Tjump-height-min: (meters ~m)~%" (-> obj jump-height-min))
(format #t "~1Tjump-height-factor: ~f~%" (-> obj jump-height-factor))
(format #t "~1Tknocked-seek-ry-clamp: ~f~%" (-> obj knocked-seek-ry-clamp))
(format #t "~1Tknocked-soft-vxz-lo: ~f~%" (-> obj knocked-soft-vxz-lo))
(format #t "~1Tknocked-soft-vxz-hi: ~f~%" (-> obj knocked-soft-vxz-hi))
(format #t "~1Tknocked-soft-vy-lo: ~f~%" (-> obj knocked-soft-vy-lo))
(format #t "~1Tknocked-soft-vy-hi: ~f~%" (-> obj knocked-soft-vy-hi))
(format #t "~1Tknocked-medium-vxz-lo: ~f~%" (-> obj knocked-medium-vxz-lo))
(format #t "~1Tknocked-medium-vxz-hi: ~f~%" (-> obj knocked-medium-vxz-hi))
(format #t "~1Tknocked-medium-vy-lo: ~f~%" (-> obj knocked-medium-vy-lo))
(format #t "~1Tknocked-medium-vy-hi: ~f~%" (-> obj knocked-medium-vy-hi))
(format #t "~1Tknocked-hard-vxz-lo: ~f~%" (-> obj knocked-hard-vxz-lo))
(format #t "~1Tknocked-hard-vxz-hi: ~f~%" (-> obj knocked-hard-vxz-hi))
(format #t "~1Tknocked-hard-vy-lo: ~f~%" (-> obj knocked-hard-vy-lo))
(format #t "~1Tknocked-hard-vy-hi: ~f~%" (-> obj knocked-hard-vy-hi))
(format #t "~1Tknocked-huge-vxz-lo: ~f~%" (-> obj knocked-huge-vxz-lo))
(format #t "~1Tknocked-huge-vxz-hi: ~f~%" (-> obj knocked-huge-vxz-hi))
(format #t "~1Tknocked-huge-vy-lo: ~f~%" (-> obj knocked-huge-vy-lo))
(format #t "~1Tknocked-huge-vy-hi: ~f~%" (-> obj knocked-huge-vy-hi))
(format #t "~1Tknocked-yellow-vxz-lo: ~f~%" (-> obj knocked-yellow-vxz-lo))
(format #t "~1Tknocked-yellow-vxz-hi: ~f~%" (-> obj knocked-yellow-vxz-hi))
(format #t "~1Tknocked-yellow-vy-lo: ~f~%" (-> obj knocked-yellow-vy-lo))
(format #t "~1Tknocked-yellow-vy-hi: ~f~%" (-> obj knocked-yellow-vy-hi))
(format #t "~1Tknocked-red-vxz-lo: ~f~%" (-> obj knocked-red-vxz-lo))
(format #t "~1Tknocked-red-vxz-hi: ~f~%" (-> obj knocked-red-vxz-hi))
(format #t "~1Tknocked-red-vy-lo: ~f~%" (-> obj knocked-red-vy-lo))
(format #t "~1Tknocked-red-vy-hi: ~f~%" (-> obj knocked-red-vy-hi))
(format #t "~1Tknocked-blue-vxz-lo: ~f~%" (-> obj knocked-blue-vxz-lo))
(format #t "~1Tknocked-blue-vxz-hi: ~f~%" (-> obj knocked-blue-vxz-hi))
(format #t "~1Tknocked-blue-vy-lo: ~f~%" (-> obj knocked-blue-vy-lo))
(format #t "~1Tknocked-blue-vy-hi: ~f~%" (-> obj knocked-blue-vy-hi))
(format #t "~1Tshadow-size: (meters ~m)~%" (-> obj shadow-size))
(format #t "~1Tshadow-max-y: (meters ~m)~%" (-> obj shadow-max-y))
(format #t "~1Tshadow-min-y: (meters ~m)~%" (-> obj shadow-min-y))
(format #t "~1Tshadow-locus-dist: (meters ~m)~%" (-> obj shadow-locus-dist))
(format #t "~1Tgem-joint: ~D~%" (-> obj gem-joint))
(format #t "~1Tgem-seg: ~D~%" (-> obj gem-seg))
(format #t "~1Tgem-no-seg: ~D~%" (-> obj gem-no-seg))
(format #t "~1Tgem-offset: #<sphere @ #x~X>~%" (-> obj gem-offset))
(format #t "~1Tcallback-info: #<nav-callback-info @ #x~X>~%" (-> obj callback-info))
(format #t "~1Tuse-momentum: ~A~%" (-> obj use-momentum))
(format #t "~1Tuse-frustration: ~A~%" (-> obj use-frustration))
(format #t "~1Tuse-stop-chase: ~A~%" (-> obj use-stop-chase))
(format #t "~1Tuse-circling: ~A~%" (-> obj use-circling))
(format #t "~1Tuse-pacing: ~A~%" (-> obj use-pacing))
(format #t "~1Twalk-anim: ~D~%" (-> obj walk-anim))
(format #t "~1Tturn-anim: ~D~%" (-> obj turn-anim))
(format #t "~1Trun-anim: ~D~%" (-> obj run-anim))
(format #t "~1Ttaunt-anim: ~D~%" (-> obj taunt-anim))
(format #t "~1Trun-travel-speed: (meters ~m)~%" (-> obj run-travel-speed))
(format #t "~1Trun-acceleration: (meters ~m)~%" (-> obj run-acceleration))
(format #t "~1Trun-turning-acceleration: (meters ~m)~%" (-> obj run-turning-acceleration))
(format #t "~1Twalk-travel-speed: (meters ~m)~%" (-> obj walk-travel-speed))
(format #t "~1Twalk-acceleration: (meters ~m)~%" (-> obj walk-acceleration))
(format #t "~1Twalk-turning-acceleration: (meters ~m)~%" (-> obj walk-turning-acceleration))
(format #t "~1Tmaximum-rotation-rate: (deg ~r)~%" (-> obj maximum-rotation-rate))
(format #t "~1Tnotice-nav-radius: (meters ~m)~%" (-> obj notice-nav-radius))
(format #t "~1Tfrustration-distance: (meters ~m)~%" (-> obj frustration-distance))
(format #t "~1Tfrustration-time: ~D~%" (-> obj frustration-time))
(format #t "~1Tblocked-time: ~D~%" (-> obj blocked-time))
(format #t "~1Tcircle-dist-lo: ~f~%" (-> obj circle-dist-lo))
(format #t "~1Tcircle-dist-hi: ~f~%" (-> obj circle-dist-hi))
(format #t "~1Tnav-mesh: ~A~%" (-> obj nav-mesh))
(label cfg-4)
obj
)
(deftype nav-enemy (enemy)
((enemy-info-override nav-enemy-info :offset 216)
(frustration-point vector :inline :offset-assert 544)
(move-dest vector :inline :offset-assert 560)
(frustration-time time-frame :offset-assert 576)
(blocked-start-time time-frame :offset-assert 584)
(restore-nav-radius-time time-frame :offset-assert 592)
(nav-radius-backup float :offset-assert 600)
(circle-radial-dist float :offset 244)
)
:heap-base #x1e0
:method-count-assert 178
:size-assert #x25c
:flag-assert #xb201e0025c
(:methods
(enemy-method-113 (_type_ nav-enemy-info) none :replace 113)
(taunt () _type_ :state 137)
(pacing () _type_ :state 138)
(circling () _type_ :state 139)
(stop-chase () _type_ :state 140)
(debug-control () _type_ :state 141)
(nav-enemy-method-142 (_type_ nav-control) none 142)
(nav-enemy-method-143 (_type_ nav-control) none 143)
(nav-enemy-method-144 (_type_) time-frame :behavior nav-enemy 144)
(nav-enemy-method-145 (_type_ nav-control) none 145)
(nav-enemy-method-146 (_type_ nav-control) none 146)
(nav-enemy-method-147 (_type_ nav-control) none 147)
(nav-enemy-method-148 (_type_ nav-control) none 148)
(nav-enemy-method-149 (_type_ nav-control) none 149)
(nav-enemy-method-150 (_type_ nav-control) none 150)
(nav-enemy-method-151 (_type_ nav-control) none 151)
(nav-enemy-method-152 (_type_ nav-control) none 152)
(nav-enemy-method-153 (_type_ nav-control) none 153)
(nav-enemy-method-154 (_type_ nav-control) none 154)
(nav-enemy-method-155 (_type_) none 155)
(nav-enemy-method-156 (_type_) none 156)
(nav-enemy-method-157 (_type_ vector) nav-poly 157)
(nav-enemy-method-158 (_type_ vector) object 158)
(nav-enemy-method-159 (_type_ vector) symbol 159)
(nav-enemy-method-160 (_type_) none 160)
(nav-enemy-method-161 (_type_) none 161)
(nav-enemy-method-162 (_type_) none 162)
(nav-enemy-method-163 (_type_) none 163)
(nav-enemy-method-164 (_type_) none 164)
(nav-enemy-method-165 (_type_) none 165)
(nav-enemy-method-166 (_type_) none 166)
(nav-enemy-method-167 (_type_) none 167)
(nav-enemy-method-168 (_type_) float 168)
(nav-enemy-method-169 (_type_ float symbol) float 169)
(nav-enemy-method-170 (_type_) none 170)
(nav-enemy-method-171 (_type_) none 171)
(nav-enemy-method-172 (_type_) none 172)
(nav-enemy-method-173 (_type_) none 173)
(nav-enemy-method-174 (_type_) symbol 174)
(nav-enemy-method-175 (_type_) symbol 175)
(nav-enemy-method-176 (_type_) none :behavior nav-enemy 176)
(nav-enemy-method-177 (_type_) none 177)
)
)
(defmethod inspect nav-enemy ((obj nav-enemy))
(when (not obj)
(set! obj obj)
(goto cfg-4)
)
(let ((t9-0 (method-of-type enemy inspect)))
(t9-0 obj)
)
(format #t "~2Tfrustration-point: ~`vector`P~%" (-> obj frustration-point))
(format #t "~2Tmove-dest: ~`vector`P~%" (-> obj move-dest))
(format #t "~2Tfrustration-time: ~D~%" (-> obj frustration-time))
(format #t "~2Tblocked-start-time: ~D~%" (-> obj blocked-start-time))
(format #t "~2Trestore-nav-radius-time: ~D~%" (-> obj restore-nav-radius-time))
(format #t "~2Tnav-radius-backup: ~f~%" (-> obj nav-radius-backup))
(format #t "~2Tcircle-radial-dist: ~f~%" (-> obj desired-angle))
(label cfg-4)
obj
)
(deftype nav-enemy-debug-control-info (basic)
((enable basic :offset-assert 4)
(steering float :offset-assert 8)
(throttle float :offset-assert 12)
)
:method-count-assert 9
:size-assert #x10
:flag-assert #x900000010
)
(defmethod inspect nav-enemy-debug-control-info ((obj nav-enemy-debug-control-info))
(when (not obj)
(set! obj obj)
(goto cfg-4)
)
(format #t "[~8x] ~A~%" obj (-> obj type))
(format #t "~1Tenable: ~A~%" (-> obj enable))
(format #t "~1Tsteering: ~f~%" (-> obj steering))
(format #t "~1Tthrottle: ~f~%" (-> obj throttle))
(label cfg-4)
obj
)
0
+45 -144
View File
@@ -1,7 +1,5 @@
;;-*-Lisp-*-
(in-package goal)
;; definition of type nav-mesh-work-debug
(deftype nav-mesh-work-debug (structure)
((debug-vec1 vector :inline :offset-assert 0)
(debug-vec2 vector :inline :offset-assert 16)
@@ -22,7 +20,6 @@
:flag-assert #x9000001c0
)
;; definition for method 3 of type nav-mesh-work-debug
(defmethod inspect nav-mesh-work-debug ((obj nav-mesh-work-debug))
(when (not obj)
(set! obj obj)
@@ -46,7 +43,6 @@
obj
)
;; definition of type nav-mesh-work
(deftype nav-mesh-work (structure)
((vert0-table int8 4 :offset-assert 0)
(vert1-table int8 4 :offset-assert 4)
@@ -72,7 +68,6 @@
:flag-assert #x90000013c
)
;; definition for method 3 of type nav-mesh-work
(defmethod inspect nav-mesh-work ((obj nav-mesh-work))
(when (not obj)
(set! obj obj)
@@ -101,22 +96,20 @@
obj
)
;; definition of type nav-mesh-link
(deftype nav-mesh-link (structure)
((id uint32 :offset-assert 0)
(dest-mesh-id uint32 :offset-assert 4)
(src-link-poly-id uint8 :offset-assert 8)
(src-switch-poly-id uint8 :offset-assert 9)
(dest-link-poly-id uint8 :offset-assert 10)
(dest-switch-poly-id uint8 :offset-assert 11)
(dest-mesh basic :offset-assert 12)
((id uint32 :offset-assert 0)
(dest-mesh-id uint32 :offset-assert 4)
(src-link-poly-id uint8 :offset-assert 8)
(src-switch-poly-id uint8 :offset-assert 9)
(dest-link-poly-id uint8 :offset-assert 10)
(dest-switch-poly-id uint8 :offset-assert 11)
(dest-mesh nav-mesh :offset-assert 12)
)
:method-count-assert 9
:size-assert #x10
:flag-assert #x900000010
)
;; definition for method 3 of type nav-mesh-link
(defmethod inspect nav-mesh-link ((obj nav-mesh-link))
(when (not obj)
(set! obj obj)
@@ -134,7 +127,6 @@
obj
)
;; definition of type nav-poly
(deftype nav-poly (structure)
((data uint8 64 :offset-assert 0)
(vertex vector 4 :inline :offset 0)
@@ -159,16 +151,15 @@
:flag-assert #x900000040
)
;; definition for method 3 of type nav-poly
(defmethod inspect nav-poly ((obj nav-poly))
(when (not obj)
(set! obj obj)
(goto cfg-4)
)
(format #t "[~8x] ~A~%" obj 'nav-poly)
(format #t "~1Tdata[64] @ #x~X~%" (-> obj vertex0))
(format #t "~1Tvertex[4] @ #x~X~%" (-> obj vertex0))
(format #t "~1Tvertex0: ~`vector`P~%" (-> obj vertex0))
(format #t "~1Tdata[64] @ #x~X~%" (-> obj vertex))
(format #t "~1Tvertex[4] @ #x~X~%" (-> obj vertex))
(format #t "~1Tvertex0: ~`vector`P~%" (-> obj vertex))
(format #t "~1Tvertex1: ~`vector`P~%" (-> obj vertex1))
(format #t "~1Tvertex2: ~`vector`P~%" (-> obj vertex2))
(format #t "~1Tvertex3: ~`vector`P~%" (-> obj vertex3))
@@ -187,7 +178,6 @@
obj
)
;; definition of type nav-vertex
(deftype nav-vertex (vector)
"A typedef for `vector`, not used because our code looks nicer if everything is `vector`s anyway
and declared out of order (cannot use forward declared structures in inline arrays)"
@@ -197,8 +187,6 @@
:flag-assert #x900000010
)
;; definition for method 3 of type nav-vertex
;; INFO: Used lq/sq
(defmethod inspect nav-vertex ((obj nav-vertex))
(when (not obj)
(set! obj obj)
@@ -215,7 +203,6 @@
obj
)
;; definition of type nav-sphere
(deftype nav-sphere (structure)
((trans sphere :inline :offset-assert 0)
)
@@ -224,7 +211,6 @@
:flag-assert #x900000010
)
;; definition for method 3 of type nav-sphere
(defmethod inspect nav-sphere ((obj nav-sphere))
(when (not obj)
(set! obj obj)
@@ -236,7 +222,6 @@
obj
)
;; definition of type nav-ray
(deftype nav-ray (structure)
((current-pos vector :inline :offset-assert 0)
(dir vector :inline :offset-assert 16)
@@ -256,7 +241,6 @@
:flag-assert #x900000050
)
;; definition for method 3 of type nav-ray
(defmethod inspect nav-ray ((obj nav-ray))
(when (not obj)
(set! obj obj)
@@ -279,7 +263,6 @@
obj
)
;; definition of type nav-route-portal
(deftype nav-route-portal (structure)
((vertex nav-vertex 2 :inline :offset-assert 0)
(next-poly nav-poly :offset-assert 32)
@@ -290,7 +273,6 @@
:flag-assert #x900000025
)
;; definition for method 3 of type nav-route-portal
(defmethod inspect nav-route-portal ((obj nav-route-portal))
(when (not obj)
(set! obj obj)
@@ -304,7 +286,6 @@
obj
)
;; definition of type nav-find-poly-parms
(deftype nav-find-poly-parms (structure)
((point vector :inline :offset-assert 0)
(y-threshold float :offset-assert 16)
@@ -318,7 +299,6 @@
:flag-assert #x900000024
)
;; definition for method 3 of type nav-find-poly-parms
(defmethod inspect nav-find-poly-parms ((obj nav-find-poly-parms))
(when (not obj)
(set! obj obj)
@@ -335,7 +315,6 @@
obj
)
;; definition of type clamp-travel-vector-to-mesh-return-info
(deftype clamp-travel-vector-to-mesh-return-info (structure)
((found-boundary basic :offset-assert 0)
(intersection vector :inline :offset-assert 16)
@@ -356,7 +335,6 @@
:flag-assert #x9000000a0
)
;; definition for method 3 of type clamp-travel-vector-to-mesh-return-info
(defmethod inspect clamp-travel-vector-to-mesh-return-info ((obj clamp-travel-vector-to-mesh-return-info))
(when (not obj)
(set! obj obj)
@@ -380,32 +358,31 @@
obj
)
;; definition of type nav-mesh
(deftype nav-mesh (basic)
((work nav-mesh-work :offset-assert 4)
(poly-array (inline-array nav-poly) :offset-assert 8)
(static-sphere-count uint8 :offset-assert 12)
(poly-count uint8 :offset-assert 13)
(nav-control-count uint8 :offset-assert 14)
(max-nav-control-count uint8 :offset-assert 15)
(route uint32 :offset-assert 16)
(poly-hash grid-hash :offset-assert 20)
(nav-control-array (inline-array nav-control) :offset-assert 24)
(sphere-hash sphere-hash :offset-assert 28)
(static-sphere (inline-array sphere) :offset-assert 32)
(user-list engine :offset-assert 36)
(next-nav-mesh surface :offset-assert 40)
(prev-nav-mesh surface :offset-assert 44)
(bounds vector :inline :offset-assert 48)
(origin vector :inline :offset 48)
(entity entity :offset-assert 64)
(link-array (array nav-mesh-link) :offset-assert 68)
(link-count uint8 :offset-assert 72)
(flags nav-mesh-flag :offset-assert 73)
(pad1 uint8 2 :offset-assert 74)
(nearest-y-threshold meters :offset-assert 76)
(water-max-height meters :offset-assert 80)
(pad2 uint32 7 :offset-assert 84)
((work nav-mesh-work :offset-assert 4)
(poly-array (inline-array nav-poly) :offset-assert 8)
(static-sphere-count uint8 :offset-assert 12)
(poly-count uint8 :offset-assert 13)
(nav-control-count uint8 :offset-assert 14)
(max-nav-control-count uint8 :offset-assert 15)
(route (pointer nav-poly) :offset-assert 16)
(poly-hash grid-hash :offset-assert 20)
(nav-control-array (inline-array nav-control) :offset-assert 24)
(sphere-hash sphere-hash :offset-assert 28)
(static-sphere (inline-array sphere) :offset-assert 32)
(user-list engine :offset-assert 36)
(next-nav-mesh surface :offset-assert 40)
(prev-nav-mesh surface :offset-assert 44)
(bounds vector :inline :offset-assert 48)
(origin vector :inline :offset 48)
(entity entity :offset-assert 64)
(link-array (inline-array nav-mesh-link) :offset-assert 68)
(link-count uint8 :offset-assert 72)
(flags nav-mesh-flag :offset-assert 73)
(pad1 uint8 2 :offset-assert 74)
(nearest-y-threshold meters :offset-assert 76)
(water-max-height meters :offset-assert 80)
(pad2 uint32 7 :offset-assert 84)
)
:method-count-assert 47
:size-assert #x70
@@ -415,23 +392,23 @@
(nav-mesh-method-10 (_type_ vector vector nav-poly) nav-poly 10)
(nav-mesh-method-11 (_type_ nav-poly vector) vector 11)
(nav-mesh-method-12 (_type_ nav-poly vector) none 12)
(nav-mesh-method-13 (_type_ symbol symbol) none 13)
(get-route-portal (_type_ object object nav-find-poly-parms) none 14)
(nav-mesh-method-13 (_type_ nav-poly nav-poly) nav-poly 13)
(get-route-portal (_type_ nav-poly nav-poly nav-route-portal) (inline-array nav-vertex) 14)
(initialize-mesh! (_type_) none 15)
(move-along-nav-ray! (_type_ nav-ray) none 16)
(try-move-along-ray (_type_ nav-poly vector vector float) meters 17)
(nav-mesh-method-18 () none 18)
(nav-mesh-method-19 () none 19)
(nav-mesh-method-20 () none 20)
(nav-mesh-method-21 () none 21)
(nav-mesh-method-18 (_type_ vector nav-poly vector float symbol clamp-travel-vector-to-mesh-return-info) none 18)
(nav-mesh-method-19 (_type_) none 19)
(nav-mesh-method-20 (_type_ clamp-travel-vector-to-mesh-return-info) none 20)
(find-adjacent-bounds-one (_type_ vector nav-poly int int) none 21)
(nav-mesh-method-22 (_type_ vector vector) none 22)
(nav-mesh-method-23 (_type_ entity-nav-mesh) none 23)
(nav-mesh-method-24 (_type_) none 24)
(nav-mesh-method-25 (_type_) none 25)
(nav-mesh-method-26 (_type_) none 26)
(new-nav-control (_type_ vector int) nav-control 27)
(new-nav-control (_type_ process-drawable int) nav-control 27)
(nav-mesh-method-28 (_type_ object) none 28)
(nav-mesh-method-29 (_type_ object symbol) nav-control 29)
(nav-mesh-method-29 (_type_ process-drawable symbol) nav-control 29)
(nav-mesh-method-30 (_type_ process-drawable) none 30)
(change-to (_type_ process-drawable) none 31)
(nav-mesh-method-32 (_type_ uint32) none 32)
@@ -444,7 +421,7 @@
(closest-point-on-boundary (_type_ nav-poly vector vector) none 39)
(nav-mesh-method-40 (_type_ nav-poly vector object vector) none 40)
(project-point-into-poly-2d (_type_ nav-poly vector vector) none 41)
(nav-mesh-method-42 (_type_ nav-find-poly-parms) symbol 42)
(nav-mesh-method-42 (_type_ nav-find-poly-parms) nav-poly 42)
(nav-mesh-method-43 (_type_ nav-find-poly-parms) none 43)
(nav-mesh-method-44 (_type_ vector float float) symbol 44)
(nav-mesh-method-45 (_type_ entity-perm) none 45)
@@ -452,7 +429,6 @@
)
)
;; definition for method 3 of type nav-mesh
(defmethod inspect nav-mesh ((obj nav-mesh))
(when (not obj)
(set! obj obj)
@@ -493,7 +469,6 @@
obj
)
;; definition for function vector-normalize-unity!
(defun vector-normalize-unity! ((arg0 vector))
(rlet ((acc :class vf)
(Q :class vf)
@@ -526,8 +501,6 @@
)
)
;; definition for function vector-normalize-unity-copy!
;; INFO: Used lq/sq
(defun vector-normalize-unity-copy! ((arg0 vector) (arg1 vector))
(rlet ((acc :class vf)
(Q :class vf)
@@ -561,13 +534,10 @@
)
)
;; definition (debug) for function debug-validate-current-poly
(defun-debug debug-validate-current-poly ()
#f
)
;; definition for function init-ray
;; WARN: Return type mismatch int vs none.
(defun init-ray ((arg0 nav-ray))
(rlet ((acc :class vf)
(Q :class vf)
@@ -611,7 +581,6 @@
)
)
;; definition for function point-poly-intersection?
(defun point-poly-intersection? ((arg0 nav-mesh) (arg1 vector) (arg2 int) (arg3 (inline-array vector)))
(let ((v1-1 (-> arg0 work vert0-table))
(a0-2 (-> arg0 work vert1-table))
@@ -634,12 +603,11 @@
#t
)
;; definition for method 37 of type nav-mesh
(defmethod point-in-poly? nav-mesh ((obj nav-mesh) (arg0 nav-poly) (arg1 vector))
(let* ((a3-0 obj)
(v1-0 arg1)
(a0-1 (-> arg0 vertex-count))
(a1-1 (the-as (inline-array vector) (-> arg0 vertex0)))
(a1-1 (-> arg0 vertex))
(a2-2 (-> a3-0 work vert0-table))
(a3-2 (-> a3-0 work vert1-table))
)
@@ -661,13 +629,6 @@
#t
)
;; definition for method 39 of type nav-mesh
;; INFO: Used lq/sq
;; WARN: Stack slot offset 56 signed mismatch
;; WARN: Stack slot offset 56 signed mismatch
;; WARN: Stack slot offset 56 signed mismatch
;; WARN: Stack slot offset 56 signed mismatch
;; WARN: Return type mismatch vector vs none.
(defmethod closest-point-on-boundary nav-mesh ((obj nav-mesh) (arg0 nav-poly) (arg1 vector) (arg2 vector))
(local-vars (sv-48 vector) (sv-52 vector) (sv-56 float))
(set! sv-48 (new 'stack-no-clear 'vector))
@@ -690,13 +651,6 @@
(none)
)
;; definition for method 41 of type nav-mesh
;; INFO: Used lq/sq
;; WARN: Stack slot offset 56 signed mismatch
;; WARN: Stack slot offset 56 signed mismatch
;; WARN: Stack slot offset 56 signed mismatch
;; WARN: Stack slot offset 56 signed mismatch
;; WARN: Return type mismatch vector vs none.
(defmethod project-point-into-poly-2d nav-mesh ((obj nav-mesh) (arg0 nav-poly) (arg1 vector) (arg2 vector))
(local-vars (sv-48 vector) (sv-52 vector) (sv-56 float))
(cond
@@ -728,57 +682,6 @@
(none)
)
;; definition for method 16 of type nav-mesh
;; INFO: Used lq/sq
;; WARN: Stack slot offset 44 signed mismatch
;; WARN: Stack slot offset 48 signed mismatch
;; WARN: Stack slot offset 44 signed mismatch
;; WARN: Stack slot offset 48 signed mismatch
;; WARN: Stack slot offset 44 signed mismatch
;; WARN: Stack slot offset 60 signed mismatch
;; WARN: Stack slot offset 48 signed mismatch
;; WARN: Stack slot offset 64 signed mismatch
;; WARN: Stack slot offset 60 signed mismatch
;; WARN: Stack slot offset 64 signed mismatch
;; WARN: Stack slot offset 44 signed mismatch
;; WARN: Stack slot offset 48 signed mismatch
;; WARN: Stack slot offset 44 signed mismatch
;; WARN: Stack slot offset 48 signed mismatch
;; WARN: Stack slot offset 44 signed mismatch
;; WARN: Stack slot offset 48 signed mismatch
;; WARN: Stack slot offset 44 signed mismatch
;; WARN: Stack slot offset 60 signed mismatch
;; WARN: Stack slot offset 48 signed mismatch
;; WARN: Stack slot offset 64 signed mismatch
;; WARN: Stack slot offset 60 signed mismatch
;; WARN: Stack slot offset 64 signed mismatch
;; WARN: Stack slot offset 44 signed mismatch
;; WARN: Stack slot offset 48 signed mismatch
;; WARN: Stack slot offset 44 signed mismatch
;; WARN: Stack slot offset 48 signed mismatch
;; WARN: Stack slot offset 44 signed mismatch
;; WARN: Stack slot offset 48 signed mismatch
;; WARN: Stack slot offset 44 signed mismatch
;; WARN: Stack slot offset 60 signed mismatch
;; WARN: Stack slot offset 48 signed mismatch
;; WARN: Stack slot offset 64 signed mismatch
;; WARN: Stack slot offset 60 signed mismatch
;; WARN: Stack slot offset 64 signed mismatch
;; WARN: Stack slot offset 44 signed mismatch
;; WARN: Stack slot offset 48 signed mismatch
;; WARN: Stack slot offset 44 signed mismatch
;; WARN: Stack slot offset 48 signed mismatch
;; WARN: Stack slot offset 44 signed mismatch
;; WARN: Stack slot offset 48 signed mismatch
;; WARN: Stack slot offset 44 signed mismatch
;; WARN: Stack slot offset 60 signed mismatch
;; WARN: Stack slot offset 48 signed mismatch
;; WARN: Stack slot offset 64 signed mismatch
;; WARN: Stack slot offset 60 signed mismatch
;; WARN: Stack slot offset 64 signed mismatch
;; WARN: Stack slot offset 44 signed mismatch
;; WARN: Stack slot offset 48 signed mismatch
;; WARN: Return type mismatch int vs none.
(defmethod move-along-nav-ray! nav-mesh ((obj nav-mesh) (ray nav-ray))
(local-vars
(next-poly-idx int)
@@ -842,7 +745,7 @@
(+! (-> ray current-pos z) delta-z)
(set! sv-68 (-> current-poly adj-poly next-poly-idx))
(if (!= sv-68 255)
(set! (-> ray next-poly) (the-as nav-poly (-> obj poly-array sv-68 vertex0)))
(set! (-> ray next-poly) (-> obj poly-array sv-68))
)
(cond
((and (-> ray next-poly) (zero? (logand (-> ray next-poly pat) (-> ray ignore))))
@@ -863,8 +766,6 @@
(none)
)
;; definition (debug) for function nav-sphere-from-cam
;; WARN: Return type mismatch int vs none.
(defun-debug nav-sphere-from-cam ()
(let ((v1-0 (camera-pos)))
(format #t "SPHEREM(~4,,1M, ~4,,1M, ~4,,1M, 1.0)~%" (-> v1-0 x) (-> v1-0 y) (-> v1-0 z))
+9 -48
View File
@@ -1,29 +1,21 @@
;;-*-Lisp-*-
(in-package goal)
;; definition for method 9 of type trajectory
(defmethod compute-trans-at-time trajectory ((obj trajectory) (arg0 float) (arg1 vector))
(vector+float*! arg1 (-> obj initial-position) (-> obj initial-velocity) arg0)
(+! (-> arg1 y) (* 0.5 arg0 arg0 (-> obj gravity)))
arg1
)
;; definition for method 10 of type trajectory
;; INFO: Used lq/sq
(defmethod compute-transv-at-time trajectory ((obj trajectory) (arg0 float) (arg1 vector))
(set! (-> arg1 quad) (-> obj initial-velocity quad))
(+! (-> arg1 y) (* arg0 (-> obj gravity)))
arg1
)
;; definition for method 11 of type trajectory
(defmethod compute-time-until-apex trajectory ((obj trajectory))
(/ (- (-> obj initial-velocity y)) (-> obj gravity))
)
;; definition for method 12 of type trajectory
;; INFO: Used lq/sq
;; WARN: Return type mismatch int vs none.
(defmethod setup-from-to-duration! trajectory ((obj trajectory) (arg0 vector) (arg1 vector) (arg2 float) (arg3 float))
(set! (-> obj initial-position quad) (-> arg0 quad))
(set! (-> obj gravity) arg3)
@@ -37,8 +29,6 @@
(none)
)
;; definition for method 13 of type trajectory
;; WARN: Return type mismatch int vs none.
(defmethod setup-from-to-xz-vel! trajectory ((obj trajectory) (arg0 vector) (arg1 vector) (arg2 float) (arg3 float))
(let ((f0-1 (/ (vector-vector-xz-distance arg1 arg0) arg2)))
(setup-from-to-duration! obj arg0 arg1 f0-1 arg3)
@@ -47,8 +37,6 @@
(none)
)
;; definition for method 14 of type trajectory
;; WARN: Return type mismatch int vs none.
(defmethod setup-from-to-y-vel! trajectory ((obj trajectory) (arg0 vector) (arg1 vector) (arg2 float) (arg3 float))
(let* ((f0-0 arg2)
(f1-3 (- (* f0-0 f0-0) (* 2.0 (- (-> arg0 y) (-> arg1 y)) arg3)))
@@ -65,8 +53,6 @@
(none)
)
;; definition for method 15 of type trajectory
;; WARN: Return type mismatch int vs none.
(defmethod setup-from-to-height! trajectory ((obj trajectory) (arg0 vector) (arg1 vector) (arg2 float) (arg3 float))
(let* ((f0-1 (+ arg2 (fmax (-> arg0 y) (-> arg1 y))))
(f1-4 (* 2.0 (- (-> arg0 y) f0-1) arg3))
@@ -81,9 +67,6 @@
(none)
)
;; definition for method 16 of type trajectory
;; WARN: Return type mismatch int vs none.
;; WARN: Function (method 16 trajectory) has a return type of none, but the expression builder found a return statement.
(defmethod setup-from-to-duration-and-height! trajectory ((obj trajectory) (arg0 vector) (arg1 vector) (arg2 float) (arg3 float))
(let ((f0-1 (- (-> arg1 y) (-> arg0 y))))
(cond
@@ -116,9 +99,6 @@
(none)
)
;; definition for method 17 of type trajectory
;; INFO: Used lq/sq
;; WARN: Return type mismatch int vs none.
(defmethod debug-draw trajectory ((obj trajectory))
(let ((s5-0 (new 'stack-no-clear 'vector))
(s4-0 (new 'stack-no-clear 'vector))
@@ -145,8 +125,6 @@
(none)
)
;; definition for method 9 of type impact-control
;; INFO: Used lq/sq
(defmethod initialize impact-control ((obj impact-control) (arg0 process-drawable) (arg1 int) (arg2 float) (arg3 collide-spec))
(set! (-> obj start-time) (-> self clock frame-counter))
(set! (-> obj process) (the-as (pointer process-drawable) (process->ppointer arg0)))
@@ -158,9 +136,6 @@
obj
)
;; definition for method 10 of type impact-control
;; INFO: Used lq/sq
;; WARN: Return type mismatch int vs none.
(defmethod update-from-cspace impact-control ((obj impact-control))
(when (>= (-> obj joint) 0)
(set! (-> obj trans 1 quad) (-> obj trans 0 quad))
@@ -171,8 +146,6 @@
(none)
)
;; definition for method 11 of type impact-control
;; INFO: Used lq/sq
(defmethod impact-control-method-11 impact-control ((obj impact-control) (arg0 collide-query) (arg1 process) (arg2 pat-surface))
(set! (-> arg0 start-pos quad) (-> obj trans 1 quad))
(set! (-> arg0 move-dist quad) (-> obj dir quad))
@@ -220,16 +193,12 @@
)
)
;; definition for method 9 of type point-tracker
;; INFO: Used lq/sq
(defmethod initialize point-tracker ((obj point-tracker) (arg0 vector) (arg1 vector))
(set! (-> obj trans 0 quad) (-> arg0 quad))
(set! (-> obj trans 1 quad) (-> arg1 quad))
obj
)
;; definition for method 10 of type point-tracker
;; INFO: Used lq/sq
(defmethod point-tracker-method-10 point-tracker ((obj point-tracker) (arg0 vector) (arg1 vector) (arg2 vector) (arg3 float))
(cond
((>= 0.0 arg3)
@@ -247,7 +216,6 @@
arg0
)
;; definition for method 11 of type point-tracker
(defmethod point-tracker-method-11 point-tracker ((obj point-tracker) (arg0 vector) (arg1 vector) (arg2 vector) (arg3 float))
(with-pp
(let ((v1-1 (point-tracker-method-10 obj (new 'stack-no-clear 'vector) arg1 arg2 arg3)))
@@ -258,7 +226,6 @@
)
)
;; definition for method 13 of type combo-tracker
(defmethod combo-tracker-method-13 combo-tracker ((obj combo-tracker) (arg0 handle) (arg1 vector) (arg2 float) (arg3 vector) (arg4 float))
(cond
((send-event (handle->process arg0) 'combo)
@@ -310,7 +277,6 @@
)
)
;; definition for method 12 of type combo-tracker
(defmethod combo-tracker-method-12 combo-tracker ((obj combo-tracker) (arg0 vector) (arg1 vector) (arg2 process) (arg3 time-frame))
(initialize obj arg0 arg1)
(set! (-> obj target) (process->handle arg2))
@@ -318,8 +284,6 @@
obj
)
;; definition for method 11 of type combo-tracker
;; INFO: Used lq/sq
(defmethod point-tracker-method-11 combo-tracker ((obj combo-tracker) (arg0 vector) (arg1 vector) (arg2 vector) (arg3 float))
(local-vars (at-0 int))
(with-pp
@@ -344,7 +308,15 @@
(when s4-1
(let ((a2-3 ((method-of-type nav-control nav-control-method-11) (the-as nav-control s4-1) arg1)))
(if a2-3
((method-of-type nav-control nav-control-method-20) (the-as nav-control s4-1) arg1 a2-3 arg0 #x45000000 #f #f)
((method-of-type nav-control nav-control-method-20)
(the-as nav-control s4-1)
arg1
(the-as nav-poly a2-3)
arg0
2048.0
#f
#f
)
(set! (-> arg0 quad) (the-as uint128 0))
)
)
@@ -366,7 +338,6 @@
)
)
;; definition for function traj2d-calc-initial-speed-using-tilt
(defun traj2d-calc-initial-speed-using-tilt ((arg0 traj2d-params))
(let ((f0-4 (* (- (* (-> arg0 x) (tan (-> arg0 initial-tilt))) (-> arg0 y)) (/ 2.0 (-> arg0 gravity)))))
(cond
@@ -384,7 +355,6 @@
)
)
;; definition for function traj3d-calc-initial-velocity-using-tilt
(defun traj3d-calc-initial-velocity-using-tilt ((arg0 traj3d-params))
(vector-! (-> arg0 diff) (-> arg0 dest) (-> arg0 src))
(let ((s5-0 (new 'stack-no-clear 'traj2d-params)))
@@ -420,9 +390,6 @@
)
)
;; definition for method 9 of type cubic-curve
;; INFO: Used lq/sq
;; WARN: Return type mismatch int vs none.
(defmethod cubic-curve-method-9 cubic-curve ((obj cubic-curve) (arg0 vector) (arg1 vector) (arg2 vector) (arg3 vector))
(rlet ((acc :class vf)
(vf0 :class vf)
@@ -467,7 +434,6 @@
)
)
;; definition for method 10 of type cubic-curve
(defmethod cubic-curve-method-10 cubic-curve ((obj cubic-curve) (arg0 vector) (arg1 float))
(let ((v1-0 (new 'stack-no-clear 'trajectory)))
(let ((f0-1 (* arg1 arg1)))
@@ -479,7 +445,6 @@
arg0
)
;; definition for method 11 of type cubic-curve
(defmethod cubic-curve-method-11 cubic-curve ((obj cubic-curve) (arg0 vector) (arg1 float))
(let ((v1-0 (new 'stack-no-clear 'trajectory)))
(set-vector! (-> v1-0 initial-position) 0.0 1.0 (* 2.0 arg1) (* 3.0 arg1 arg1))
@@ -489,7 +454,6 @@
arg0
)
;; definition for method 12 of type cubic-curve
(defmethod cubic-curve-method-12 cubic-curve ((obj cubic-curve) (arg0 vector) (arg1 float))
(let ((v1-0 (new 'stack-no-clear 'trajectory)))
(set-vector! (-> v1-0 initial-position) 0.0 0.0 2.0 (* 6.0 arg1))
@@ -499,9 +463,6 @@
arg0
)
;; definition for method 13 of type cubic-curve
;; INFO: Used lq/sq
;; WARN: Return type mismatch int vs none.
(defmethod debug-draw-curve cubic-curve ((obj cubic-curve))
(let ((s5-0 (new 'stack-no-clear 'trajectory))
(s4-0 10)
@@ -1,7 +1,5 @@
;;-*-Lisp-*-
(in-package goal)
;; definition of type process-focusable
(deftype process-focusable (process-drawable)
((root-override collide-shape :offset 128)
(focus-status focus-status :offset-assert 200)
@@ -21,7 +19,6 @@
)
)
;; definition for method 3 of type process-focusable
(defmethod inspect process-focusable ((obj process-focusable))
(when (not obj)
(set! obj obj)
@@ -35,10 +32,8 @@
obj
)
;; definition for method 20 of type process-focusable
;; WARN: Return type mismatch structure vs vector.
(defmethod get-trans process-focusable ((obj process-focusable) (arg0 int))
"@returns the `trans` [[vector]] from the process's `root` (typically either a [[trsqv]] or a [[collide-shape]]"
"@returns the `trans` [[vector]] from the process's `root` (typically either a [[trsqv]] or a [[collide-shape]])"
(let ((gp-0 (-> obj root-override)))
(the-as vector (cond
((zero? arg0)
@@ -58,37 +53,28 @@
)
)
;; definition for method 22 of type process-focusable
(defmethod get-transv process-focusable ((obj process-focusable))
(-> obj root-override transv)
)
;; definition for method 21 of type process-focusable
(defmethod get-quat process-focusable ((obj process-focusable) (arg0 int))
(-> obj root-override quat)
)
;; definition for method 23 of type process-focusable
(defmethod process-focusable-method-23 process-focusable ((obj process-focusable) (arg0 int))
0
)
;; definition for method 24 of type process-focusable
;; WARN: Return type mismatch int vs meters.
(defmethod get-water-height process-focusable ((obj process-focusable))
(the-as meters 0)
)
;; definition for method 26 of type process-focusable
(defmethod process-focusable-method-26 process-focusable ((obj process-focusable))
0.0
)
;; definition for method 25 of type process-focusable
;; WARN: Return type mismatch int vs time-frame.
(defmethod process-focusable-method-25 process-focusable ((obj process-focusable))
(the-as time-frame 0)
)
;; failed to figure out what this is:
0
@@ -1,7 +1,5 @@
;;-*-Lisp-*-
(in-package goal)
;; definition of type simple-focus
(deftype simple-focus (process-focusable)
((first-time? symbol :offset-assert 204)
)
@@ -14,7 +12,6 @@
)
)
;; definition for method 3 of type simple-focus
(defmethod inspect simple-focus ((obj simple-focus))
(when (not obj)
(set! obj obj)
@@ -28,13 +25,11 @@
obj
)
;; definition for method 20 of type simple-focus
(defmethod get-trans simple-focus ((obj simple-focus) (arg0 int))
"@returns the `trans` [[vector]] from the process's `root` (typically either a [[trsqv]] or a [[collide-shape]]"
"@returns the `trans` [[vector]] from the process's `root` (typically either a [[trsqv]] or a [[collide-shape]])"
(-> obj root-override trans)
)
;; definition for method 12 of type simple-focus
(defmethod run-logic? simple-focus ((obj simple-focus))
(when (-> obj first-time?)
(set! (-> obj first-time?) #f)
@@ -42,7 +37,6 @@
)
)
;; failed to figure out what this is:
(defstate idle (simple-focus)
:virtual #t
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
@@ -59,8 +53,6 @@
:code (the-as (function none :behavior simple-focus) sleep-code)
)
;; definition for function simple-focus-init-by-other
;; WARN: Return type mismatch object vs none.
(defbehavior simple-focus-init-by-other simple-focus ()
"Initializes the new [[simple-focus]]. `first-time?` will be set to [[#t]]"
(let ((root (new 'process 'trsqv)))
+2 -17
View File
@@ -1,7 +1,5 @@
;;-*-Lisp-*-
(in-package goal)
;; definition of type grid-hash-word
(deftype grid-hash-word (uint8)
()
:method-count-assert 9
@@ -9,7 +7,6 @@
:flag-assert #x900000001
)
;; definition of type grid-hash-box
(deftype grid-hash-box (structure)
((min int8 3 :offset-assert 0)
(max int8 3 :offset-assert 3)
@@ -20,7 +17,6 @@
:flag-assert #x900000006
)
;; definition for method 3 of type grid-hash-box
(defmethod inspect grid-hash-box ((obj grid-hash-box))
(when (not obj)
(set! obj obj)
@@ -33,7 +29,6 @@
obj
)
;; definition of type grid-hash
(deftype grid-hash (basic)
((work grid-hash-work :offset-assert 4)
(search-box grid-hash-box :inline :offset-assert 8)
@@ -61,8 +56,8 @@
(grid-hash-method-9 (_type_ int (array float) int) none 9)
(grid-hash-method-10 (_type_) none 10)
(grid-hash-method-11 (_type_) none 11)
(grid-hash-method-12 (_type_) none 12)
(grid-hash-method-13 (_type_) none 13)
(grid-hash-method-12 (_type_ vector) grid-hash-box 12)
(grid-hash-method-13 (_type_ vector float) grid-hash-box 13)
(draw-grid (_type_ rgba) none 14)
(dump-grid-info (_type_) none 15)
(grid-hash-method-16 (_type_ grid-hash-box grid-hash-box) none 16)
@@ -77,7 +72,6 @@
)
)
;; definition for method 3 of type grid-hash
(defmethod inspect grid-hash ((obj grid-hash))
(when (not obj)
(set! obj obj)
@@ -105,7 +99,6 @@
obj
)
;; definition of type find-nav-sphere-ids-params
(deftype find-nav-sphere-ids-params (structure)
((bsphere sphere :inline :offset-assert 0)
(y-threshold float :offset-assert 16)
@@ -119,7 +112,6 @@
:flag-assert #x900000020
)
;; definition for method 3 of type find-nav-sphere-ids-params
(defmethod inspect find-nav-sphere-ids-params ((obj find-nav-sphere-ids-params))
(when (not obj)
(set! obj obj)
@@ -136,7 +128,6 @@
obj
)
;; definition of type sphere-hash
(deftype sphere-hash (grid-hash)
((sphere-array (inline-array sphere) :offset-assert 88)
(max-object-count int16 :offset-assert 92)
@@ -160,7 +151,6 @@
)
)
;; definition for method 3 of type sphere-hash
(defmethod inspect sphere-hash ((obj sphere-hash))
(when (not obj)
(set! obj obj)
@@ -193,7 +183,6 @@
obj
)
;; definition of type hash-object-info
(deftype hash-object-info (structure)
((object basic :offset-assert 0)
)
@@ -202,7 +191,6 @@
:flag-assert #x900000004
)
;; definition for method 3 of type hash-object-info
(defmethod inspect hash-object-info ((obj hash-object-info))
(when (not obj)
(set! obj obj)
@@ -214,7 +202,6 @@
obj
)
;; definition of type spatial-hash
(deftype spatial-hash (sphere-hash)
((object-array (pointer hash-object-info) :offset-assert 104)
(mem-object-array (pointer hash-object-info) :offset-assert 108)
@@ -234,7 +221,6 @@
)
)
;; definition for method 3 of type spatial-hash
(defmethod inspect spatial-hash ((obj spatial-hash))
(when (not obj)
(set! obj obj)
@@ -270,5 +256,4 @@
obj
)
;; failed to figure out what this is:
0
+1 -81
View File
@@ -1,7 +1,5 @@
;;-*-Lisp-*-
(in-package goal)
;; failed to figure out what this is:
(defskelgroup skel-jchar jakb 0 -1
((1 (meters 999999)))
:bounds (static-spherem 0 0 0 3.2)
@@ -13,7 +11,6 @@
:shadow-joint-index 3
)
;; definition for symbol *target-shadow-control*, type shadow-control
(define *target-shadow-control*
(new 'static 'shadow-control :settings (new 'static 'shadow-settings
:center (new 'static 'vector :w (the-as float #x2))
@@ -24,7 +21,6 @@
)
)
;; failed to figure out what this is:
(defskelgroup skel-jak-highres jak-highres 0 -1
((1 (meters 999999)))
:bounds (static-spherem 0 0 0 3.2)
@@ -35,7 +31,6 @@
:shadow-joint-index 3
)
;; failed to figure out what this is:
(defskelgroup skel-generic-blast collectables 10 12
((11 (meters 999999)))
:bounds (static-spherem 0 0 0 50)
@@ -43,7 +38,6 @@
:sort 4
)
;; failed to figure out what this is:
(defskelgroup skel-generic-ripples collectables 13 15
((14 (meters 999999)))
:bounds (static-spherem 0 0 0 6)
@@ -51,7 +45,6 @@
:sort 4
)
;; failed to figure out what this is:
(defskelgroup skel-bomb-blast collectables 0 2
((1 (meters 999999)))
:bounds (static-spherem 0 0 0 50)
@@ -59,7 +52,6 @@
:sort 4
)
;; definition of type target-bank
(deftype target-bank (basic)
((jump-collide-offset meters :offset-assert 4)
(jump-height-min meters :offset-assert 8)
@@ -170,7 +162,6 @@
:flag-assert #x9000002a8
)
;; definition for method 3 of type target-bank
(defmethod inspect target-bank ((obj target-bank))
(when (not obj)
(set! obj obj)
@@ -284,7 +275,6 @@
obj
)
;; definition for symbol *TARGET-bank*, type target-bank
(define *TARGET-bank* (new 'static 'target-bank
:jump-collide-offset (meters 0.7)
:jump-height-min (meters 1.01)
@@ -390,8 +380,6 @@
)
)
;; definition for function target-start-attack
;; WARN: Return type mismatch int vs none.
(defbehavior target-start-attack target ()
(let* ((v1-0 *game-info*)
(a0-1 (+ (-> v1-0 attack-id) 1))
@@ -406,9 +394,6 @@
(none)
)
;; definition for function target-danger-set!
;; INFO: Used lq/sq
;; WARN: Return type mismatch int vs none.
(defbehavior target-danger-set! target ((arg0 symbol) (arg1 symbol))
(let ((s4-0 (-> self control unknown-sphere-array00 6))
(s5-0 (-> self control unknown-sphere-array00 7))
@@ -765,7 +750,6 @@
(none)
)
;; definition for function target-collide-set!
(defbehavior target-collide-set! target ((arg0 symbol) (arg1 float))
(let ((gp-0 (-> self control)))
(if (and (= arg0 'normal)
@@ -1115,12 +1099,10 @@
0
)
;; definition for method 27 of type control-info
(defmethod get-quaternion control-info ((obj control-info))
(-> obj unknown-quaternion00)
)
;; definition for function debounce-speed
(defbehavior debounce-speed target ((arg0 float) (arg1 float) (arg2 vector) (arg3 vector))
(if (and (< 0.3 arg0) (< arg0 0.7) (< 0.0 arg1) (< (vector-dot arg2 arg3) 0.2))
(set! arg0 0.0)
@@ -1128,7 +1110,6 @@
arg0
)
;; definition for function target-align-vel-z-adjust
(defbehavior target-align-vel-z-adjust target ((arg0 float))
(let ((f1-0 (-> self control unknown-float17)))
(* arg0 (if (< 0.0 f1-0)
@@ -1139,7 +1120,6 @@
)
)
;; definition for method 26 of type target
(defmethod process-focusable-method-26 target ((obj target))
(if (or (and (logtest? (focus-status dark) (-> obj focus-status))
(nonzero? (-> obj darkjak))
@@ -1152,9 +1132,6 @@
)
)
;; definition for method 16 of type target
;; INFO: Used lq/sq
;; WARN: Return type mismatch control-info vs object.
(defmethod apply-alignment target ((obj target) (arg0 align-opts) (arg1 transformq) (arg2 vector))
(with-pp
(let ((s2-0 (new 'stack-no-clear 'vector)))
@@ -1208,7 +1185,6 @@
)
)
;; definition for function average-turn-angle
(defun average-turn-angle ((arg0 target))
(let ((f30-0 0.0))
(dotimes (s5-0 8)
@@ -1225,7 +1201,6 @@
)
)
;; definition for function can-play-stance-amibent?
(defbehavior can-play-stance-amibent? target ()
(and (or (and (= *kernel-boot-message* 'kiosk)
(>= (+ -300000 (-> *display* real-clock frame-counter)) (seconds 60))
@@ -1272,12 +1247,10 @@
)
)
;; definition for function target-height-above-ground
(defbehavior target-height-above-ground target ()
(- (-> self control trans y) (-> self control gspot-pos y))
)
;; definition for function can-jump?
(defbehavior can-jump? target ((arg0 symbol))
(and (or (logtest? (-> self control status) (cshape-moving-flags on-surface))
(< (- (-> self clock frame-counter) (-> self control unknown-time-frame06))
@@ -1305,19 +1278,15 @@
)
)
;; definition for function target-jump-go
;; WARN: Return type mismatch object vs none.
(defbehavior target-jump-go target ()
(go target-jump (-> *TARGET-bank* jump-height-min) (-> *TARGET-bank* jump-height-max) (the-as surface #f))
(none)
)
;; definition for function move-legs?
(defbehavior move-legs? target ()
(!= (-> *cpad-list* cpads (-> self control unknown-cpad-info00 number) stick0-speed) 0.0)
)
;; definition for function jump-hit-ground-stuck?
(defbehavior jump-hit-ground-stuck? target ()
(or (logtest? (-> self control status) (cshape-moving-flags on-surface))
(when (and (< (target-move-dist (-> *TARGET-bank* stuck-time)) (-> *TARGET-bank* stuck-distance))
@@ -1329,8 +1298,6 @@
)
)
;; definition for function target-time-to-ground
;; WARN: Return type mismatch int vs time-frame.
(defbehavior target-time-to-ground target ()
(let ((f0-0 (target-height-above-ground))
(f2-0 (vector-dot (-> self control dynam gravity-normal) (-> self control transv)))
@@ -1345,8 +1312,6 @@
)
)
;; definition for function fall-test
;; WARN: Return type mismatch object vs none.
(defbehavior fall-test target ((arg0 (state symbol target)) (arg1 float))
(when (and (not (logtest? (-> self control status) (cshape-moving-flags on-surface)))
(>= (- (-> self clock frame-counter) (-> self control unknown-time-frame06))
@@ -1365,8 +1330,6 @@
(none)
)
;; definition for function slide-down-test
;; WARN: Return type mismatch object vs none.
(defbehavior slide-down-test target ()
(if (and (not (logtest? (-> self control status) (cshape-moving-flags on-surface csmf07)))
(>= (- (-> self clock frame-counter) (-> self control unknown-time-frame06))
@@ -1380,7 +1343,6 @@
(none)
)
;; definition for function smack-surface?
(defbehavior smack-surface? target ((arg0 symbol))
(and (< 0.7 (-> self control touch-angle))
(and (< (-> self control surface-angle) 0.3)
@@ -1390,7 +1352,6 @@
)
)
;; definition for function can-roll?
(defbehavior can-roll? target ()
(and (logtest? (-> self control status) (cshape-moving-flags on-surface))
(or (not (logtest? (-> self control status) (cshape-moving-flags t-wall)))
@@ -1412,7 +1373,6 @@
)
)
;; definition for function can-duck?
(defbehavior can-duck? target ()
(and (logtest? (-> self control status) (cshape-moving-flags on-surface))
(>= (-> self control unknown-float0000) 0.7)
@@ -1424,8 +1384,6 @@
)
)
;; definition for function can-exit-duck?
;; INFO: Used lq/sq
(defun can-exit-duck? ((arg0 target))
(let ((gp-0 (new 'stack-no-clear 'collide-query)))
(let ((s4-0 (new 'stack-no-clear 'inline-array 'sphere 2)))
@@ -1460,7 +1418,6 @@
)
)
;; definition for function can-hands?
(defbehavior can-hands? target ((arg0 symbol))
(cond
((or (logtest? (-> self state-flags) (state-flags sf8))
@@ -1494,7 +1451,6 @@
)
)
;; definition for function can-feet?
(defbehavior can-feet? target ((arg0 symbol))
(cond
((or (logtest? (-> self state-flags) (state-flags sf8))
@@ -1514,15 +1470,12 @@
)
)
;; definition for function are-still?
(defbehavior are-still? target ()
(or (= (-> *cpad-list* cpads (-> self control unknown-cpad-info00 number) stick0-speed) 0.0)
(< (-> self control unknown-float05) 61440.0)
)
)
;; definition for function vector-local+!
;; INFO: Used lq/sq
(defbehavior vector-local+! target ((arg0 vector) (arg1 vector))
(let ((s5-0 (new-stack-vector0)))
(vector-matrix*! s5-0 arg1 (-> self control unknown-matrix01))
@@ -1530,8 +1483,6 @@
)
)
;; definition for function move-forward
;; INFO: Used lq/sq
(defbehavior move-forward target ((arg0 float))
(let ((a1-0 (new-stack-vector0))
(gp-0 (new-stack-vector0))
@@ -1542,8 +1493,6 @@
)
)
;; definition for function set-forward-vel
;; INFO: Used lq/sq
(defbehavior set-forward-vel target ((arg0 float))
(let ((gp-0 (new-stack-vector0)))
(vector-matrix*! gp-0 (-> self control transv) (-> self control unknown-matrix00))
@@ -1553,9 +1502,6 @@
)
)
;; definition for function delete-back-vel
;; INFO: Used lq/sq
;; WARN: Return type mismatch int vs none.
(defbehavior delete-back-vel target ()
(let ((gp-0 (new-stack-vector0)))
(vector-z-quaternion! gp-0 (-> self control dir-targ))
@@ -1582,8 +1528,6 @@
(none)
)
;; definition for function set-side-vel
;; INFO: Used lq/sq
(defbehavior set-side-vel target ((arg0 float))
(let ((gp-0 (new-stack-vector0)))
(vector-matrix*! gp-0 (-> self control transv) (-> self control unknown-matrix00))
@@ -1593,8 +1537,6 @@
)
)
;; definition for function target-timed-invulnerable
;; WARN: Return type mismatch int vs none.
(defun target-timed-invulnerable ((arg0 time-frame) (arg1 target) (arg2 int))
(with-pp
(case arg2
@@ -1616,8 +1558,6 @@
)
)
;; definition for function target-timed-invulnerable-off
;; WARN: Return type mismatch int vs none.
(defun target-timed-invulnerable-off ((arg0 target) (arg1 int))
(let ((v1-0 arg1))
(cond
@@ -1640,7 +1580,6 @@
(none)
)
;; definition for function target-log-attack
(defbehavior target-log-attack target ((arg0 attack-info) (arg1 symbol))
(if (and (= arg1 'background) (= (-> arg0 id) 2))
(return #t)
@@ -1679,9 +1618,6 @@
#t
)
;; definition for method 9 of type attack-info
;; INFO: Used lq/sq
;; WARN: Return type mismatch int vs none.
(defmethod attack-info-method-9 attack-info ((obj attack-info) (arg0 attack-info) (arg1 process-drawable) (arg2 process-drawable))
(local-vars (v1-14 float))
(rlet ((acc :class vf)
@@ -1753,7 +1689,6 @@
)
)
;; definition for method 10 of type attack-info
(defmethod attack-info-method-10 attack-info ((obj attack-info) (arg0 object) (arg1 process-drawable) (arg2 process) (arg3 touching-shapes-entry))
(when (and arg3 arg1)
(let ((a1-2 (prims-touching? arg3 (the-as collide-shape (-> arg1 root)) (the-as uint -1))))
@@ -1781,8 +1716,6 @@
obj
)
;; definition for method 11 of type attack-info
;; INFO: Used lq/sq
(defmethod combine! attack-info ((obj attack-info) (arg0 attack-info) (arg1 process-drawable))
(let ((s4-0 (-> arg0 mask)))
(set! (-> obj mask) (-> arg0 mask))
@@ -1887,7 +1820,6 @@
obj
)
;; definition for function ground-tween-initialize
(defbehavior ground-tween-initialize target ((arg0 ground-tween-info)
(arg1 uint)
(arg2 uint)
@@ -1916,8 +1848,6 @@
arg0
)
;; definition for function ground-tween-update
;; WARN: Return type mismatch int vs none.
(defbehavior ground-tween-update target ((arg0 ground-tween-info) (arg1 float) (arg2 float) (arg3 float))
(let ((f0-1 (fmax -1.0 (fmin 1.0 arg1)))
(f30-0 (fmax -1.0 (fmin 1.0 arg2)))
@@ -1973,7 +1903,6 @@
(none)
)
;; definition for function target-pos
(defun target-pos ((arg0 int))
(let ((a1-0 *target*))
(cond
@@ -1990,8 +1919,6 @@
)
)
;; definition for function target-cam-pos
;; INFO: Used lq/sq
(defun target-cam-pos ()
(let ((gp-0 *target*))
(cond
@@ -2046,7 +1973,6 @@
)
)
;; definition for function target-rot
(defun target-rot ()
(let ((v1-0 *target*))
(if v1-0
@@ -2056,10 +1982,8 @@
)
)
;; definition for method 20 of type target
;; INFO: Used lq/sq
(defmethod get-trans target ((obj target) (arg0 int))
"@returns the `trans` [[vector]] from the process's `root` (typically either a [[trsqv]] or a [[collide-shape]]"
"@returns the `trans` [[vector]] from the process's `root` (typically either a [[trsqv]] or a [[collide-shape]])"
(local-vars (v0-0 vector))
(let ((v1-0 (-> obj control)))
(cond
@@ -2131,7 +2055,6 @@
)
)
;; definition for method 23 of type target
(defmethod process-focusable-method-23 target ((obj target) (arg0 int))
(let ((v1-0 (-> obj control)))
(cond
@@ -2156,7 +2079,6 @@
)
)
;; definition for method 21 of type target
(defmethod get-quat target ((obj target) (arg0 int))
(let ((v1-0 arg0))
(cond
@@ -2186,12 +2108,10 @@
)
)
;; definition for method 24 of type target
(defmethod get-water-height target ((obj target))
(-> obj water surface-height)
)
;; definition for method 25 of type target
(defmethod process-focusable-method-25 target ((obj target))
(-> obj neck notice-time)
)
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+3 -1
View File
@@ -5,7 +5,9 @@
"CGO/COMMON.CGO",
"CGO/GAME.CGO",
"DGO/CWI.DGO",
"DGO/STD.DGO"
"DGO/STD.DGO",
"DGO/PALOUT.DGO",
"DGO/CTA.DGO"
],
"skip_compile_files": [],
+7
View File
@@ -471,6 +471,7 @@ int main(int argc, char* argv[]) {
int max_files = -1;
std::string single_file = "";
uint32_t num_threads = 1;
bool fail_on_cmp = false;
CLI::App app{"OpenGOAL - Offline Reference Test Runner"};
app.add_option("--iso_data_path", iso_data_path, "The path to the folder with the ISO data files")
@@ -487,6 +488,7 @@ int main(int argc, char* argv[]) {
app.add_option("-f,--file", single_file,
"Limit the offline test routine to a single file to decompile/compile -- useful "
"when you are just iterating on a single file");
app.add_flag("--fail-on-cmp", fail_on_cmp, "Fail the tests immediately if the comparison fails");
app.validate_positionals();
CLI11_PARSE(app, argc, argv);
@@ -550,8 +552,13 @@ int main(int argc, char* argv[]) {
result.compare = compare(decompiler, work_group, dump_current_output);
if (!result.compare.total_pass) {
result.exit_code = 1;
if (fail_on_cmp) {
return result;
}
}
// TODO - if anything has failed, skip compiling
Timer compile_timer;
result.compile = compile(decompiler, work_group, config.value(), game_name);
result.time_spent_compiling = compile_timer.getSeconds();