mirror of
https://github.com/open-goal/jak-project
synced 2026-07-31 00:14:38 -04:00
support non-virtual gos in decompiler (#707)
This commit is contained in:
@@ -205,4 +205,11 @@
|
||||
(set! (-> vec y) ,yv)
|
||||
(set! (-> vec z) ,zv)
|
||||
(set! (-> vec w) ,wv)))
|
||||
)
|
||||
)
|
||||
|
||||
(defmacro go (next-state &rest args)
|
||||
`(with-pp
|
||||
(set! (-> pp next-state) ,next-state)
|
||||
((the (function _varargs_ object) enter-state) ,@args)
|
||||
)
|
||||
)
|
||||
@@ -53,12 +53,7 @@
|
||||
)
|
||||
)
|
||||
(when (zero? obj)
|
||||
(let ((t9-1 (the-as (function object object) enter-state))
|
||||
(a0-1 "memory")
|
||||
)
|
||||
(set! (-> self next-state) process-drawable-art-error)
|
||||
(t9-1 a0-1)
|
||||
)
|
||||
(go process-drawable-art-error "memory")
|
||||
(return (the-as align-control 0))
|
||||
)
|
||||
(set! (-> obj process) (the-as process-drawable arg0))
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
;; definition for method 9 of type drawable-tree-collide-fragment
|
||||
(defmethod
|
||||
dummy-9
|
||||
login
|
||||
drawable-tree-collide-fragment
|
||||
((obj drawable-tree-collide-fragment))
|
||||
obj
|
||||
@@ -11,12 +11,12 @@
|
||||
|
||||
;; definition for method 10 of type drawable-tree-collide-fragment
|
||||
(defmethod
|
||||
dummy-10
|
||||
draw
|
||||
drawable-tree-collide-fragment
|
||||
((obj drawable-tree-collide-fragment) (arg0 drawable) (arg1 display-frame))
|
||||
(when *display-render-collision*
|
||||
(dotimes (s4-0 (-> obj length))
|
||||
(dummy-10 (-> obj data s4-0) (-> obj data s4-0) arg1)
|
||||
(draw (-> obj data s4-0) (-> obj data s4-0) arg1)
|
||||
)
|
||||
)
|
||||
0
|
||||
@@ -102,7 +102,7 @@
|
||||
|
||||
;; definition for method 9 of type drawable-inline-array-collide-fragment
|
||||
(defmethod
|
||||
dummy-9
|
||||
login
|
||||
drawable-inline-array-collide-fragment
|
||||
((obj drawable-inline-array-collide-fragment))
|
||||
obj
|
||||
@@ -110,7 +110,7 @@
|
||||
|
||||
;; definition for method 10 of type collide-fragment
|
||||
(defmethod
|
||||
dummy-10
|
||||
draw
|
||||
collide-fragment
|
||||
((obj collide-fragment) (arg0 drawable) (arg1 display-frame))
|
||||
0
|
||||
@@ -118,7 +118,7 @@
|
||||
|
||||
;; definition for method 10 of type drawable-inline-array-collide-fragment
|
||||
(defmethod
|
||||
dummy-10
|
||||
draw
|
||||
drawable-inline-array-collide-fragment
|
||||
((obj drawable-inline-array-collide-fragment)
|
||||
(arg0 drawable)
|
||||
@@ -127,7 +127,7 @@
|
||||
(dotimes (s4-0 (-> obj length))
|
||||
(let ((s3-0 (-> obj data s4-0)))
|
||||
(if (sphere-cull (-> s3-0 bsphere))
|
||||
(dummy-10 s3-0 s3-0 arg1)
|
||||
(draw s3-0 s3-0 arg1)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -3,10 +3,10 @@
|
||||
|
||||
;; definition of type collide-tri-result
|
||||
(deftype collide-tri-result (structure)
|
||||
((vertex vector 3 :inline :offset-assert 0)
|
||||
(intersect vector :inline :offset-assert 48)
|
||||
(normal vector :inline :offset-assert 64)
|
||||
(pat uint32 :offset-assert 80)
|
||||
((vertex vector 3 :inline :offset-assert 0)
|
||||
(intersect vector :inline :offset-assert 48)
|
||||
(normal vector :inline :offset-assert 64)
|
||||
(pat pat-surface :offset-assert 80)
|
||||
)
|
||||
:method-count-assert 9
|
||||
:size-assert #x54
|
||||
@@ -25,9 +25,9 @@
|
||||
|
||||
;; definition of type collide-mesh-tri
|
||||
(deftype collide-mesh-tri (structure)
|
||||
((vertex-index uint8 3 :offset-assert 0)
|
||||
(unused uint8 :offset-assert 3)
|
||||
(pat uint32 :offset-assert 4)
|
||||
((vertex-index uint8 3 :offset-assert 0)
|
||||
(unused uint8 :offset-assert 3)
|
||||
(pat pat-surface :offset-assert 4)
|
||||
)
|
||||
:pack-me
|
||||
:method-count-assert 9
|
||||
@@ -117,7 +117,7 @@
|
||||
((vertex vector 3 :inline :offset-assert 0)
|
||||
(normal vector :inline :offset-assert 48)
|
||||
(bbox4w bounding-box4w :inline :offset-assert 64)
|
||||
(pat uint32 :offset 60)
|
||||
(pat pat-surface :offset 60)
|
||||
)
|
||||
:method-count-assert 9
|
||||
:size-assert #x60
|
||||
|
||||
@@ -283,7 +283,7 @@
|
||||
|
||||
;; definition of type collide-shape-prim-sphere
|
||||
(deftype collide-shape-prim-sphere (collide-shape-prim)
|
||||
((pat uint32 :offset-assert 72)
|
||||
((pat pat-surface :offset-assert 72)
|
||||
)
|
||||
:method-count-assert 28
|
||||
:size-assert #x4c
|
||||
@@ -389,17 +389,17 @@
|
||||
|
||||
;; definition of type collide-shape
|
||||
(deftype collide-shape (trsqv)
|
||||
((process process :offset-assert 140)
|
||||
(max-iteration-count uint8 :offset-assert 144)
|
||||
(nav-flags uint8 :offset-assert 145)
|
||||
(pad-byte uint8 2 :offset-assert 146)
|
||||
(pat-ignore-mask uint32 :offset-assert 148)
|
||||
(event-self basic :offset-assert 152)
|
||||
(event-other basic :offset-assert 156)
|
||||
(root-prim basic :offset-assert 160)
|
||||
(riders basic :offset-assert 164)
|
||||
(backup-collide-as uint64 :offset-assert 168)
|
||||
(backup-collide-with uint64 :offset-assert 176)
|
||||
((process process :offset-assert 140)
|
||||
(max-iteration-count uint8 :offset-assert 144)
|
||||
(nav-flags uint8 :offset-assert 145)
|
||||
(pad-byte uint8 2 :offset-assert 146)
|
||||
(pat-ignore-mask pat-surface :offset-assert 148)
|
||||
(event-self basic :offset-assert 152)
|
||||
(event-other basic :offset-assert 156)
|
||||
(root-prim basic :offset-assert 160)
|
||||
(riders basic :offset-assert 164)
|
||||
(backup-collide-as uint64 :offset-assert 168)
|
||||
(backup-collide-with uint64 :offset-assert 176)
|
||||
)
|
||||
:method-count-assert 56
|
||||
:size-assert #xb8
|
||||
@@ -472,31 +472,31 @@
|
||||
|
||||
;; definition of type collide-shape-moving
|
||||
(deftype collide-shape-moving (collide-shape)
|
||||
((rider-time uint64 :offset-assert 184)
|
||||
(rider-last-move vector :inline :offset-assert 192)
|
||||
(trans-old vector 3 :inline :offset-assert 208)
|
||||
(poly-pat uint32 :offset-assert 256)
|
||||
(cur-pat uint32 :offset-assert 260)
|
||||
(ground-pat uint32 :offset-assert 264)
|
||||
(status uint64 :offset-assert 272)
|
||||
(old-status uint64 :offset-assert 280)
|
||||
(prev-status uint64 :offset-assert 288)
|
||||
(reaction-flag uint32 :offset-assert 296)
|
||||
(reaction basic :offset-assert 300)
|
||||
(no-reaction basic :offset-assert 304)
|
||||
(local-normal vector :inline :offset-assert 320)
|
||||
(surface-normal vector :inline :offset-assert 336)
|
||||
(poly-normal vector :inline :offset-assert 352)
|
||||
(ground-poly-normal vector :inline :offset-assert 368)
|
||||
(ground-touch-point vector :inline :offset-assert 384)
|
||||
(shadow-pos vector :inline :offset-assert 400)
|
||||
(ground-impact-vel meters :offset-assert 416)
|
||||
(surface-angle float :offset-assert 420)
|
||||
(poly-angle float :offset-assert 424)
|
||||
(touch-angle float :offset-assert 428)
|
||||
(coverage float :offset-assert 432)
|
||||
(dynam basic :offset-assert 436)
|
||||
(surf basic :offset-assert 440)
|
||||
((rider-time uint64 :offset-assert 184)
|
||||
(rider-last-move vector :inline :offset-assert 192)
|
||||
(trans-old vector 3 :inline :offset-assert 208)
|
||||
(poly-pat pat-surface :offset-assert 256)
|
||||
(cur-pat pat-surface :offset-assert 260)
|
||||
(ground-pat pat-surface :offset-assert 264)
|
||||
(status uint64 :offset-assert 272)
|
||||
(old-status uint64 :offset-assert 280)
|
||||
(prev-status uint64 :offset-assert 288)
|
||||
(reaction-flag uint32 :offset-assert 296)
|
||||
(reaction basic :offset-assert 300)
|
||||
(no-reaction basic :offset-assert 304)
|
||||
(local-normal vector :inline :offset-assert 320)
|
||||
(surface-normal vector :inline :offset-assert 336)
|
||||
(poly-normal vector :inline :offset-assert 352)
|
||||
(ground-poly-normal vector :inline :offset-assert 368)
|
||||
(ground-touch-point vector :inline :offset-assert 384)
|
||||
(shadow-pos vector :inline :offset-assert 400)
|
||||
(ground-impact-vel meters :offset-assert 416)
|
||||
(surface-angle float :offset-assert 420)
|
||||
(poly-angle float :offset-assert 424)
|
||||
(touch-angle float :offset-assert 428)
|
||||
(coverage float :offset-assert 432)
|
||||
(dynam basic :offset-assert 436)
|
||||
(surf basic :offset-assert 440)
|
||||
)
|
||||
:method-count-assert 65
|
||||
:size-assert #x1bc
|
||||
@@ -615,7 +615,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> obj pat) (the-as uint 16))
|
||||
(set! (-> obj pat) (new 'static 'pat-surface :mode (pat-mode obstacle)))
|
||||
(set! (-> obj prim-core prim-type) -1)
|
||||
(the-as collide-shape-prim-sphere obj)
|
||||
)
|
||||
@@ -728,10 +728,16 @@
|
||||
(set! (-> obj root-prim) #f)
|
||||
(case (-> proc type symbol)
|
||||
(('camera)
|
||||
(set! (-> obj pat-ignore-mask) (the-as uint 2))
|
||||
(set!
|
||||
(-> obj pat-ignore-mask)
|
||||
(new 'static 'pat-surface :skip #x2 :nocamera #x1)
|
||||
)
|
||||
)
|
||||
(else
|
||||
(set! (-> obj pat-ignore-mask) (the-as uint 1))
|
||||
(set!
|
||||
(-> obj pat-ignore-mask)
|
||||
(new 'static 'pat-surface :skip #x1 :noentity #x1)
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> obj trans w) 1.0)
|
||||
|
||||
@@ -3,16 +3,16 @@
|
||||
|
||||
;; definition of type collide-history
|
||||
(deftype collide-history (structure)
|
||||
((intersect vector :inline :offset-assert 0)
|
||||
(trans vector :inline :offset-assert 16)
|
||||
(transv vector :inline :offset-assert 32)
|
||||
(transv-out vector :inline :offset-assert 48)
|
||||
(local-normal vector :inline :offset-assert 64)
|
||||
(surface-normal vector :inline :offset-assert 80)
|
||||
(time uint64 :offset-assert 96)
|
||||
(status uint64 :offset-assert 104)
|
||||
(pat uint32 :offset-assert 112)
|
||||
(reaction-flag uint32 :offset-assert 116)
|
||||
((intersect vector :inline :offset-assert 0)
|
||||
(trans vector :inline :offset-assert 16)
|
||||
(transv vector :inline :offset-assert 32)
|
||||
(transv-out vector :inline :offset-assert 48)
|
||||
(local-normal vector :inline :offset-assert 64)
|
||||
(surface-normal vector :inline :offset-assert 80)
|
||||
(time uint64 :offset-assert 96)
|
||||
(status uint64 :offset-assert 104)
|
||||
(pat pat-surface :offset-assert 112)
|
||||
(reaction-flag uint32 :offset-assert 116)
|
||||
)
|
||||
:method-count-assert 10
|
||||
:size-assert #x78
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
|
||||
;; definition for method 10 of type drawable-tree-actor
|
||||
(defmethod
|
||||
dummy-10
|
||||
draw
|
||||
drawable-tree-actor
|
||||
((obj drawable-tree-actor) (arg0 drawable) (arg1 display-frame))
|
||||
0
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
|
||||
;; definition for method 10 of type drawable-tree-ambient
|
||||
(defmethod
|
||||
dummy-10
|
||||
draw
|
||||
drawable-tree-ambient
|
||||
((obj drawable-tree-ambient) (arg0 drawable) (arg1 display-frame))
|
||||
0
|
||||
|
||||
@@ -10,8 +10,8 @@
|
||||
:size-assert #x20
|
||||
:flag-assert #x1200000020
|
||||
(:methods
|
||||
(dummy-9 (_type_) _type_ 9)
|
||||
(dummy-10 (_type_ drawable display-frame) int 10)
|
||||
(login (_type_) _type_ 9)
|
||||
(draw (_type_ drawable display-frame) int 10)
|
||||
(dummy-11 (_type_ int) none 11)
|
||||
(dummy-12 (_type_ int) none 12)
|
||||
(dummy-13 (_type_ int) none 13)
|
||||
|
||||
@@ -7,13 +7,13 @@
|
||||
)
|
||||
|
||||
;; definition for method 9 of type drawable-inline-array
|
||||
(defmethod dummy-9 drawable-inline-array ((obj drawable-inline-array))
|
||||
(defmethod login drawable-inline-array ((obj drawable-inline-array))
|
||||
obj
|
||||
)
|
||||
|
||||
;; definition for method 10 of type drawable-inline-array
|
||||
(defmethod
|
||||
dummy-10
|
||||
draw
|
||||
drawable-inline-array
|
||||
((obj drawable-inline-array) (arg0 drawable) (arg1 display-frame))
|
||||
0
|
||||
@@ -32,7 +32,3 @@
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -243,99 +243,92 @@
|
||||
(pkup-amount float)
|
||||
)
|
||||
(local-vars (tag res-tag))
|
||||
(with-pp
|
||||
(let
|
||||
((obj
|
||||
(object-new allocation type-to-make (the-as int (-> type-to-make size)))
|
||||
(let
|
||||
((obj
|
||||
(object-new allocation type-to-make (the-as int (-> type-to-make size)))
|
||||
)
|
||||
)
|
||||
(let ((ent (-> proc entity)))
|
||||
(when (zero? obj)
|
||||
(go process-drawable-art-error "memory")
|
||||
(set! obj (the-as fact-info 0))
|
||||
(goto cfg-10)
|
||||
)
|
||||
(set! (-> obj process) proc)
|
||||
(set! tag (new 'static 'res-tag))
|
||||
(let
|
||||
((v1-6
|
||||
(the-as
|
||||
(pointer int32)
|
||||
((method-of-type res-lump get-property-data)
|
||||
ent
|
||||
'eco-info
|
||||
'interp
|
||||
0.0
|
||||
(the-as pointer #f)
|
||||
(& tag)
|
||||
*res-static-buf*
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(cond
|
||||
(v1-6
|
||||
(let ((a0-6 (-> tag elt-count)))
|
||||
(set! (-> obj pickup-type) (the-as pickup-type (-> v1-6 0)))
|
||||
(set! pkup-amount (cond
|
||||
((< (the-as uint 1) a0-6)
|
||||
(the float (-> v1-6 1))
|
||||
)
|
||||
(else
|
||||
(empty)
|
||||
pkup-amount
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> obj pickup-amount) pkup-amount)
|
||||
)
|
||||
(else
|
||||
(set! (-> obj pickup-type) pkup-type)
|
||||
(set! (-> obj pickup-amount) pkup-amount)
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((ent (-> proc entity)))
|
||||
(when (zero? obj)
|
||||
(let ((go-func (the-as (function string none) enter-state))
|
||||
(a0-1 "memory")
|
||||
)
|
||||
(set! (-> pp next-state) process-drawable-art-error)
|
||||
(go-func a0-1)
|
||||
)
|
||||
(set! obj (the-as fact-info 0))
|
||||
(goto cfg-10)
|
||||
)
|
||||
(set! (-> obj process) proc)
|
||||
(set! tag (new 'static 'res-tag))
|
||||
(let
|
||||
((v1-6
|
||||
(the-as
|
||||
(pointer int32)
|
||||
((method-of-type res-lump get-property-data)
|
||||
ent
|
||||
'eco-info
|
||||
'interp
|
||||
0.0
|
||||
(the-as pointer #f)
|
||||
(& tag)
|
||||
*res-static-buf*
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(cond
|
||||
(v1-6
|
||||
(let ((a0-6 (-> tag elt-count)))
|
||||
(set! (-> obj pickup-type) (the-as pickup-type (-> v1-6 0)))
|
||||
(set! pkup-amount (cond
|
||||
((< (the-as uint 1) a0-6)
|
||||
(the float (-> v1-6 1))
|
||||
)
|
||||
(else
|
||||
(empty)
|
||||
pkup-amount
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> obj pickup-amount) pkup-amount)
|
||||
)
|
||||
(else
|
||||
(set! (-> obj pickup-type) pkup-type)
|
||||
(set! (-> obj pickup-amount) pkup-amount)
|
||||
)
|
||||
(set!
|
||||
(-> obj options)
|
||||
(the-as
|
||||
uint
|
||||
((method-of-type res-lump get-property-value)
|
||||
ent
|
||||
'options
|
||||
'interp
|
||||
-1000000000.0
|
||||
(the-as uint128 0)
|
||||
(the-as (pointer res-tag) #f)
|
||||
*res-static-buf*
|
||||
)
|
||||
)
|
||||
)
|
||||
(if (nonzero? (logand #x80200 (the-as int (-> obj options))))
|
||||
(set!
|
||||
(-> obj options)
|
||||
(-> obj fade-time)
|
||||
(the-as
|
||||
uint
|
||||
((method-of-type res-lump get-property-value)
|
||||
ent
|
||||
'options
|
||||
'interp
|
||||
-1000000000.0
|
||||
(the-as uint128 0)
|
||||
(the-as (pointer res-tag) #f)
|
||||
*res-static-buf*
|
||||
)
|
||||
)
|
||||
)
|
||||
(if (nonzero? (logand #x80200 (the-as int (-> obj options))))
|
||||
(set!
|
||||
(-> obj fade-time)
|
||||
(the-as
|
||||
uint
|
||||
(the
|
||||
int
|
||||
(*
|
||||
300.0
|
||||
(the-as
|
||||
float
|
||||
((method-of-type res-lump get-property-value-float)
|
||||
ent
|
||||
'timeout
|
||||
'interp
|
||||
-1000000000.0
|
||||
0.0
|
||||
(the-as (pointer res-tag) #f)
|
||||
*res-static-buf*
|
||||
)
|
||||
(the
|
||||
int
|
||||
(*
|
||||
300.0
|
||||
(the-as
|
||||
float
|
||||
((method-of-type res-lump get-property-value-float)
|
||||
ent
|
||||
'timeout
|
||||
'interp
|
||||
-1000000000.0
|
||||
0.0
|
||||
(the-as (pointer res-tag) #f)
|
||||
*res-static-buf*
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -343,9 +336,9 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(label cfg-10)
|
||||
obj
|
||||
)
|
||||
(label cfg-10)
|
||||
obj
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
@@ -78,103 +78,96 @@
|
||||
new
|
||||
vol-control
|
||||
((allocation symbol) (type-to-make type) (arg0 process-drawable))
|
||||
(with-pp
|
||||
(let
|
||||
((gp-0
|
||||
(the-as
|
||||
object
|
||||
(object-new allocation type-to-make (the-as int (-> type-to-make size)))
|
||||
)
|
||||
(let
|
||||
((gp-0
|
||||
(the-as
|
||||
object
|
||||
(object-new allocation type-to-make (the-as int (-> type-to-make size)))
|
||||
)
|
||||
)
|
||||
(when (zero? (the-as vol-control gp-0))
|
||||
(let ((t9-1 (the-as (function object object) enter-state))
|
||||
(a0-1 "memory")
|
||||
)
|
||||
(set! (-> pp next-state) process-drawable-art-error)
|
||||
(t9-1 a0-1)
|
||||
)
|
||||
(set! gp-0 0)
|
||||
(goto cfg-13)
|
||||
)
|
||||
(set! (-> (the-as vol-control gp-0) process) arg0)
|
||||
(let*
|
||||
((s5-1 (the-as res-lump (-> (the-as vol-control gp-0) process entity)))
|
||||
(s4-0 (-> (lookup-tag-idx (the-as entity s5-1) 'vol 'exact 0.0) lo))
|
||||
)
|
||||
(when (>= (the-as int s4-0) 0)
|
||||
(let ((s3-0 (the-as uint s4-0))
|
||||
(s2-0 (-> s5-1 tag s4-0))
|
||||
)
|
||||
0
|
||||
(while (= (-> s2-0 name) (-> s5-1 tag s4-0 name))
|
||||
(let
|
||||
((v1-12
|
||||
(make-property-data
|
||||
s5-1
|
||||
0.0
|
||||
(the-as res-tag-pair s3-0)
|
||||
(the-as pointer #f)
|
||||
)
|
||||
)
|
||||
(a0-8
|
||||
(->
|
||||
(the-as vol-control gp-0)
|
||||
pos-vol
|
||||
(-> (the-as vol-control gp-0) pos-vol-count)
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> a0-8 num-planes) (the-as int (-> s2-0 elt-count)))
|
||||
(set! (-> a0-8 plane) (the-as uint v1-12))
|
||||
)
|
||||
(+! (-> (the-as vol-control gp-0) pos-vol-count) 1)
|
||||
(+! s3-0 1)
|
||||
(set! s2-0 (-> s5-1 tag s3-0))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(let*
|
||||
((s5-2 (the-as res-lump (-> (the-as vol-control gp-0) process entity)))
|
||||
(s4-1 (-> (lookup-tag-idx (the-as entity s5-2) 'cutoutvol 'exact 0.0) lo))
|
||||
)
|
||||
(when (>= (the-as int s4-1) 0)
|
||||
(let ((s3-1 (the-as uint s4-1))
|
||||
(s2-1 (-> s5-2 tag s4-1))
|
||||
)
|
||||
0
|
||||
(while (= (-> s2-1 name) (-> s5-2 tag s4-1 name))
|
||||
(let
|
||||
((v1-31
|
||||
(make-property-data
|
||||
s5-2
|
||||
0.0
|
||||
(the-as res-tag-pair s3-1)
|
||||
(the-as pointer #f)
|
||||
)
|
||||
)
|
||||
(a0-19
|
||||
(->
|
||||
(the-as vol-control gp-0)
|
||||
neg-vol
|
||||
(-> (the-as vol-control gp-0) neg-vol-count)
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> a0-19 num-planes) (the-as int (-> s2-1 elt-count)))
|
||||
(set! (-> a0-19 plane) (the-as uint v1-31))
|
||||
)
|
||||
(+! (-> (the-as vol-control gp-0) neg-vol-count) 1)
|
||||
(+! s3-1 1)
|
||||
(set! s2-1 (-> s5-2 tag s3-1))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(label cfg-13)
|
||||
(the-as vol-control gp-0)
|
||||
)
|
||||
(when (zero? (the-as vol-control gp-0))
|
||||
(go process-drawable-art-error "memory")
|
||||
(set! gp-0 0)
|
||||
(goto cfg-13)
|
||||
)
|
||||
(set! (-> (the-as vol-control gp-0) process) arg0)
|
||||
(let* ((s5-1 (the-as res-lump (-> (the-as vol-control gp-0) process entity)))
|
||||
(s4-0 (-> (lookup-tag-idx (the-as entity s5-1) 'vol 'exact 0.0) lo))
|
||||
)
|
||||
(when (>= (the-as int s4-0) 0)
|
||||
(let ((s3-0 (the-as uint s4-0))
|
||||
(s2-0 (-> s5-1 tag s4-0))
|
||||
)
|
||||
0
|
||||
(while (= (-> s2-0 name) (-> s5-1 tag s4-0 name))
|
||||
(let
|
||||
((v1-12
|
||||
(make-property-data
|
||||
s5-1
|
||||
0.0
|
||||
(the-as res-tag-pair s3-0)
|
||||
(the-as pointer #f)
|
||||
)
|
||||
)
|
||||
(a0-8
|
||||
(->
|
||||
(the-as vol-control gp-0)
|
||||
pos-vol
|
||||
(-> (the-as vol-control gp-0) pos-vol-count)
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> a0-8 num-planes) (the-as int (-> s2-0 elt-count)))
|
||||
(set! (-> a0-8 plane) (the-as uint v1-12))
|
||||
)
|
||||
(+! (-> (the-as vol-control gp-0) pos-vol-count) 1)
|
||||
(+! s3-0 1)
|
||||
(set! s2-0 (-> s5-1 tag s3-0))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(let* ((s5-2 (the-as res-lump (-> (the-as vol-control gp-0) process entity)))
|
||||
(s4-1
|
||||
(-> (lookup-tag-idx (the-as entity s5-2) 'cutoutvol 'exact 0.0) lo)
|
||||
)
|
||||
)
|
||||
(when (>= (the-as int s4-1) 0)
|
||||
(let ((s3-1 (the-as uint s4-1))
|
||||
(s2-1 (-> s5-2 tag s4-1))
|
||||
)
|
||||
0
|
||||
(while (= (-> s2-1 name) (-> s5-2 tag s4-1 name))
|
||||
(let
|
||||
((v1-31
|
||||
(make-property-data
|
||||
s5-2
|
||||
0.0
|
||||
(the-as res-tag-pair s3-1)
|
||||
(the-as pointer #f)
|
||||
)
|
||||
)
|
||||
(a0-19
|
||||
(->
|
||||
(the-as vol-control gp-0)
|
||||
neg-vol
|
||||
(-> (the-as vol-control gp-0) neg-vol-count)
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> a0-19 num-planes) (the-as int (-> s2-1 elt-count)))
|
||||
(set! (-> a0-19 plane) (the-as uint v1-31))
|
||||
)
|
||||
(+! (-> (the-as vol-control gp-0) neg-vol-count) 1)
|
||||
(+! s3-1 1)
|
||||
(set! s2-1 (-> s5-2 tag s3-1))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(label cfg-13)
|
||||
(the-as vol-control gp-0)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
(dotimes (s3-0 4)
|
||||
(let ((a0-1 (-> s4-0 geometry s3-0)))
|
||||
(if (nonzero? a0-1)
|
||||
(dummy-9 a0-1)
|
||||
(login a0-1)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -33,7 +33,7 @@
|
||||
|
||||
;; definition for method 9 of type prototype-inline-array-shrub
|
||||
(defmethod
|
||||
dummy-9
|
||||
login
|
||||
prototype-inline-array-shrub
|
||||
((obj prototype-inline-array-shrub))
|
||||
(dotimes (s5-0 (-> obj length))
|
||||
@@ -41,7 +41,7 @@
|
||||
(dotimes (s3-0 4)
|
||||
(let ((a0-1 (-> s4-0 geometry s3-0)))
|
||||
(if (nonzero? a0-1)
|
||||
(dummy-9 a0-1)
|
||||
(login a0-1)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -548,56 +548,49 @@
|
||||
(sphere-count int)
|
||||
(nearest-y-threshold-default float)
|
||||
)
|
||||
(with-pp
|
||||
(let
|
||||
((obj
|
||||
(object-new
|
||||
allocation
|
||||
type-to-make
|
||||
(the-as int (+ (-> type-to-make size) (the-as uint (* sphere-count 16))))
|
||||
)
|
||||
(let
|
||||
((obj
|
||||
(object-new
|
||||
allocation
|
||||
type-to-make
|
||||
(the-as int (+ (-> type-to-make size) (the-as uint (* sphere-count 16))))
|
||||
)
|
||||
)
|
||||
(when (zero? obj)
|
||||
(let ((t9-1 (the-as function enter-state))
|
||||
(a0-1 "memory")
|
||||
)
|
||||
(set! (-> pp next-state) process-drawable-art-error)
|
||||
((the-as (function string none) t9-1) a0-1)
|
||||
)
|
||||
(set! obj (the-as nav-control 0))
|
||||
(goto cfg-4)
|
||||
)
|
||||
(set! (-> obj max-spheres) sphere-count)
|
||||
(set! (-> obj flags) (nav-control-flags bit8 bit13))
|
||||
(set! (-> obj mesh) (nav-mesh-connect (-> shape process) shape obj))
|
||||
(let ((ent (-> shape process entity)))
|
||||
(set!
|
||||
(-> obj nearest-y-threshold)
|
||||
((method-of-type res-lump get-property-value-float)
|
||||
ent
|
||||
'nearest-y-threshold
|
||||
'interp
|
||||
-1000000000.0
|
||||
nearest-y-threshold-default
|
||||
(the-as (pointer res-tag) #f)
|
||||
*res-static-buf*
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> obj shape) shape)
|
||||
(set! (-> obj process) (-> shape process))
|
||||
(set! (-> obj gap-event) #f)
|
||||
(set! (-> obj current-poly) #f)
|
||||
(set! (-> obj next-poly) #f)
|
||||
(set! (-> obj target-poly) #f)
|
||||
(set! (-> obj user-poly) #f)
|
||||
(set! (-> obj portal 0) #f)
|
||||
(set! (-> obj portal 1) #f)
|
||||
(set! (-> obj nav-cull-radius) 40960.0)
|
||||
(label cfg-4)
|
||||
(the-as nav-control obj)
|
||||
)
|
||||
(when (zero? obj)
|
||||
(go process-drawable-art-error "memory")
|
||||
(set! obj (the-as nav-control 0))
|
||||
(goto cfg-4)
|
||||
)
|
||||
(set! (-> obj max-spheres) sphere-count)
|
||||
(set! (-> obj flags) (nav-control-flags bit8 bit13))
|
||||
(set! (-> obj mesh) (nav-mesh-connect (-> shape process) shape obj))
|
||||
(let ((ent (-> shape process entity)))
|
||||
(set!
|
||||
(-> obj nearest-y-threshold)
|
||||
((method-of-type res-lump get-property-value-float)
|
||||
ent
|
||||
'nearest-y-threshold
|
||||
'interp
|
||||
-1000000000.0
|
||||
nearest-y-threshold-default
|
||||
(the-as (pointer res-tag) #f)
|
||||
*res-static-buf*
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> obj shape) shape)
|
||||
(set! (-> obj process) (-> shape process))
|
||||
(set! (-> obj gap-event) #f)
|
||||
(set! (-> obj current-poly) #f)
|
||||
(set! (-> obj next-poly) #f)
|
||||
(set! (-> obj target-poly) #f)
|
||||
(set! (-> obj user-poly) #f)
|
||||
(set! (-> obj portal 0) #f)
|
||||
(set! (-> obj portal 1) #f)
|
||||
(set! (-> obj nav-cull-radius) 40960.0)
|
||||
(label cfg-4)
|
||||
(the-as nav-control obj)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
@@ -78,66 +78,59 @@
|
||||
(time float)
|
||||
)
|
||||
(local-vars (tag res-tag))
|
||||
(with-pp
|
||||
(let
|
||||
((obj
|
||||
(object-new allocation type-to-make (the-as int (-> type-to-make size)))
|
||||
)
|
||||
(let
|
||||
((obj
|
||||
(object-new allocation type-to-make (the-as int (-> type-to-make size)))
|
||||
)
|
||||
(when (zero? obj)
|
||||
(let ((t9-1 (the-as function enter-state))
|
||||
(a0-1 "memory")
|
||||
)
|
||||
(set! (-> pp next-state) process-drawable-art-error)
|
||||
((the-as (function string none) t9-1) a0-1)
|
||||
)
|
||||
(set! obj (the-as path-control 0))
|
||||
(goto cfg-9)
|
||||
)
|
||||
(set! (-> obj process) (the-as process-drawable proc))
|
||||
(set! (-> obj name) name)
|
||||
(let ((ent (-> proc entity)))
|
||||
(when (= name 'path)
|
||||
(let ((lookup-entity (entity-actor-lookup ent 'path-actor 0)))
|
||||
(if lookup-entity
|
||||
(set! ent lookup-entity)
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! tag (new 'static 'res-tag))
|
||||
(let
|
||||
((data
|
||||
((method-of-type res-lump get-property-data)
|
||||
ent
|
||||
name
|
||||
'interp
|
||||
time
|
||||
(the-as pointer #f)
|
||||
(& tag)
|
||||
*res-static-buf*
|
||||
)
|
||||
)
|
||||
)
|
||||
(cond
|
||||
(data
|
||||
(set! (-> obj cverts) (the-as (inline-array vector) data))
|
||||
(set! (-> obj curve num-cverts) (the-as int (-> tag elt-count)))
|
||||
)
|
||||
(else
|
||||
(set!
|
||||
(-> obj flags)
|
||||
(logior (-> obj flags) (path-control-flag not-found))
|
||||
)
|
||||
(set! (-> obj cverts) (the-as (inline-array vector) #f))
|
||||
(set! (-> obj curve num-cverts) 0)
|
||||
0
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(label cfg-9)
|
||||
(the-as path-control obj)
|
||||
)
|
||||
(when (zero? obj)
|
||||
(go process-drawable-art-error "memory")
|
||||
(set! obj (the-as path-control 0))
|
||||
(goto cfg-9)
|
||||
)
|
||||
(set! (-> obj process) (the-as process-drawable proc))
|
||||
(set! (-> obj name) name)
|
||||
(let ((ent (-> proc entity)))
|
||||
(when (= name 'path)
|
||||
(let ((lookup-entity (entity-actor-lookup ent 'path-actor 0)))
|
||||
(if lookup-entity
|
||||
(set! ent lookup-entity)
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! tag (new 'static 'res-tag))
|
||||
(let
|
||||
((data
|
||||
((method-of-type res-lump get-property-data)
|
||||
ent
|
||||
name
|
||||
'interp
|
||||
time
|
||||
(the-as pointer #f)
|
||||
(& tag)
|
||||
*res-static-buf*
|
||||
)
|
||||
)
|
||||
)
|
||||
(cond
|
||||
(data
|
||||
(set! (-> obj cverts) (the-as (inline-array vector) data))
|
||||
(set! (-> obj curve num-cverts) (the-as int (-> tag elt-count)))
|
||||
)
|
||||
(else
|
||||
(set!
|
||||
(-> obj flags)
|
||||
(logior (-> obj flags) (path-control-flag not-found))
|
||||
)
|
||||
(set! (-> obj cverts) (the-as (inline-array vector) #f))
|
||||
(set! (-> obj curve num-cverts) 0)
|
||||
0
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(label cfg-9)
|
||||
(the-as path-control obj)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
@@ -295,18 +295,14 @@
|
||||
)
|
||||
)
|
||||
(set! (-> obj notice-time) (-> *display* base-frame-counter))
|
||||
(let ((ppointer (the-as (pointer process) (if proc
|
||||
(the-as
|
||||
(pointer process)
|
||||
(-> proc ppointer)
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((v1-12 (if proc
|
||||
(-> proc ppointer)
|
||||
)
|
||||
)
|
||||
)
|
||||
(set!
|
||||
(-> last-try-to-look-at-data who)
|
||||
(new 'static 'handle :process ppointer :pid (-> ppointer 0 pid))
|
||||
(new 'static 'handle :process v1-12 :pid (-> v1-12 0 pid))
|
||||
)
|
||||
)
|
||||
(if (< (-> last-try-to-look-at-data vert) (-> enemy-facts cam-vert))
|
||||
|
||||
@@ -311,7 +311,7 @@
|
||||
(set! (-> v0-0 brother) (the-as (pointer process-tree) #f))
|
||||
(set! (-> v0-0 child) (the-as (pointer process-tree) #f))
|
||||
(set! (-> v0-0 self) v0-0)
|
||||
(set! (-> v0-0 ppointer) (&-> v0-0 self))
|
||||
(set! (-> v0-0 ppointer) (the-as (pointer process) (&-> v0-0 self)))
|
||||
v0-0
|
||||
)
|
||||
)
|
||||
@@ -404,7 +404,10 @@
|
||||
(set! (-> (the-as process v0-0) brother) (the-as (pointer process-tree) #f))
|
||||
(set! (-> (the-as process v0-0) child) (the-as (pointer process-tree) #f))
|
||||
(set! (-> (the-as process v0-0) self) (the-as process v0-0))
|
||||
(set! (-> (the-as process v0-0) ppointer) (&-> (the-as process v0-0) self))
|
||||
(set!
|
||||
(-> (the-as process v0-0) ppointer)
|
||||
(the-as (pointer process) (&-> (the-as process v0-0) self))
|
||||
)
|
||||
(the-as process v0-0)
|
||||
)
|
||||
)
|
||||
@@ -545,7 +548,7 @@
|
||||
(set! (-> s3-0 brother) (the-as (pointer process-tree) #f))
|
||||
(set! (-> s3-0 child) (the-as (pointer process-tree) #f))
|
||||
(set! (-> s3-0 self) s3-0)
|
||||
(set! (-> s3-0 ppointer) (&-> s3-0 self))
|
||||
(set! (-> s3-0 ppointer) (the-as (pointer process) (&-> s3-0 self)))
|
||||
(dotimes (s2-1 arg0)
|
||||
(let ((s1-0 (-> s3-0 child))
|
||||
(v1-5 ((method-of-type process new) allocation process 'dead arg1))
|
||||
@@ -653,7 +656,7 @@
|
||||
(set! (-> obj brother) (the-as (pointer process-tree) #f))
|
||||
(set! (-> obj child) (the-as (pointer process-tree) #f))
|
||||
(set! (-> obj self) obj)
|
||||
(set! (-> obj ppointer) (&-> obj self))
|
||||
(set! (-> obj ppointer) (the-as (pointer process) (&-> obj self)))
|
||||
(countdown (v1-4 arg1)
|
||||
(let ((a0-4 (-> obj process-list v1-4)))
|
||||
(set! (-> a0-4 process) *null-process*)
|
||||
@@ -972,7 +975,7 @@
|
||||
(set! (-> s5-1 2 mask) (the-as process-mask (-> s5-1 1)))
|
||||
(set! (-> obj alive-list prev) (the-as dead-pool-heap-rec (-> s5-1 1)))
|
||||
)
|
||||
(set! (-> s5-1 2) (the-as process-tree (-> obj dead-list next)))
|
||||
(set! (-> s5-1 2) (the-as process (-> obj dead-list next)))
|
||||
(set! (-> obj dead-list next) (the-as dead-pool-heap-rec s5-1))
|
||||
(set! (-> s5-1 0) *null-process*)
|
||||
)
|
||||
|
||||
@@ -452,7 +452,7 @@ TEST_F(FormRegressionTest, RemoveMethod0ProcessTree) {
|
||||
" (set! (-> v0-0 brother) (the-as (pointer process-tree) #f))\n"
|
||||
" (set! (-> v0-0 child) (the-as (pointer process-tree) #f))\n"
|
||||
" (set! (-> v0-0 self) v0-0)\n"
|
||||
" (set! (-> v0-0 ppointer) (&-> v0-0 self))\n"
|
||||
" (set! (-> v0-0 ppointer) (the-as (pointer process) (&-> v0-0 self)))\n"
|
||||
" v0-0\n"
|
||||
" )";
|
||||
test_with_expr(func, type, expected, false, "process-tree");
|
||||
@@ -637,35 +637,35 @@ TEST_F(FormRegressionTest, ExprMethod0Process) {
|
||||
" daddiu sp, sp, 48";
|
||||
std::string type = "(function symbol type basic int process)";
|
||||
std::string expected =
|
||||
"(let\n"
|
||||
" ((v0-0\n"
|
||||
" (if\n"
|
||||
" (= (-> arg0 type) symbol)\n"
|
||||
" (object-new\n"
|
||||
" arg0\n"
|
||||
" arg1\n"
|
||||
" (the-as int (+ (-> process size) (the-as uint arg3)))\n"
|
||||
"(let ((v0-0 (if (= (-> arg0 type) symbol)\n"
|
||||
" (object-new\n"
|
||||
" arg0\n"
|
||||
" arg1\n"
|
||||
" (the-as int (+ (-> process size) (the-as uint arg3)))\n"
|
||||
" )\n"
|
||||
" (+ (the-as int arg0) 4)\n"
|
||||
" )\n"
|
||||
" )\n"
|
||||
" (+ (the-as int arg0) 4)\n"
|
||||
" )\n"
|
||||
" )\n"
|
||||
" )\n"
|
||||
" (set! (-> (the-as process v0-0) name) arg2)\n"
|
||||
" (set! (-> (the-as process v0-0) status) (quote dead))\n"
|
||||
" (set! (-> (the-as process v0-0) status) 'dead)\n"
|
||||
" (set! (-> (the-as process v0-0) pid) 0)\n"
|
||||
" (set! (-> (the-as process v0-0) pool) #f)\n"
|
||||
" (set! (-> (the-as process v0-0) allocated-length) arg3)\n"
|
||||
" (set! (-> (the-as process v0-0) top-thread) #f)\n"
|
||||
" (set! (-> (the-as process v0-0) main-thread) #f)\n"
|
||||
" (let\n"
|
||||
" ((v1-5 (-> (the-as process v0-0) stack)))\n"
|
||||
" (let ((v1-5 (-> (the-as process v0-0) stack)))\n"
|
||||
" (set! (-> (the-as process v0-0) heap-cur) v1-5)\n"
|
||||
" (set! (-> (the-as process v0-0) heap-base) v1-5)\n"
|
||||
" )\n"
|
||||
" (set! (-> (the-as process v0-0) heap-top) (&-> (the-as process v0-0) stack (-> (the-as "
|
||||
"process v0-0) allocated-length)))\n"
|
||||
" (set! (-> (the-as process v0-0) stack-frame-top) (the-as stack-frame (-> (the-as process "
|
||||
"v0-0) heap-top)))\n"
|
||||
" (set!\n"
|
||||
" (-> (the-as process v0-0) heap-top)\n"
|
||||
" (&-> (the-as process v0-0) stack (-> (the-as process v0-0) allocated-length))\n"
|
||||
" )\n"
|
||||
" (set!\n"
|
||||
" (-> (the-as process v0-0) stack-frame-top)\n"
|
||||
" (the-as stack-frame (-> (the-as process v0-0) heap-top))\n"
|
||||
" )\n"
|
||||
" (set! (-> (the-as process v0-0) stack-frame-top) #f)\n"
|
||||
" (set! (-> (the-as process v0-0) state) #f)\n"
|
||||
" (set! (-> (the-as process v0-0) next-state) #f)\n"
|
||||
@@ -677,7 +677,10 @@ TEST_F(FormRegressionTest, ExprMethod0Process) {
|
||||
" (set! (-> (the-as process v0-0) brother) (the-as (pointer process-tree) #f))\n"
|
||||
" (set! (-> (the-as process v0-0) child) (the-as (pointer process-tree) #f))\n"
|
||||
" (set! (-> (the-as process v0-0) self) (the-as process v0-0))\n"
|
||||
" (set! (-> (the-as process v0-0) ppointer) (&-> (the-as process v0-0) self))\n"
|
||||
" (set!\n"
|
||||
" (-> (the-as process v0-0) ppointer)\n"
|
||||
" (the-as (pointer process) (&-> (the-as process v0-0) self))\n"
|
||||
" )\n"
|
||||
" (the-as process v0-0)\n"
|
||||
" )";
|
||||
test_with_expr(func, type, expected, false, "process", {},
|
||||
@@ -948,7 +951,7 @@ TEST_F(FormRegressionTest, ExprMethod0DeadPool) {
|
||||
" (set! (-> s3-0 brother) (the-as (pointer process-tree) #f))\n"
|
||||
" (set! (-> s3-0 child) (the-as (pointer process-tree) #f))\n"
|
||||
" (set! (-> s3-0 self) s3-0)\n"
|
||||
" (set! (-> s3-0 ppointer) (&-> s3-0 self))\n"
|
||||
" (set! (-> s3-0 ppointer) (the-as (pointer process) (&-> s3-0 self)))\n"
|
||||
" (dotimes\n"
|
||||
" (s2-1 arg2)\n"
|
||||
" (let\n"
|
||||
@@ -1264,7 +1267,7 @@ TEST_F(FormRegressionTest, ExprMethod0DeadPoolHeap) {
|
||||
" (set! (-> obj brother) (the-as (pointer process-tree) #f))\n"
|
||||
" (set! (-> obj child) (the-as (pointer process-tree) #f))\n"
|
||||
" (set! (-> obj self) obj)\n"
|
||||
" (set! (-> obj ppointer) (&-> obj self))\n"
|
||||
" (set! (-> obj ppointer) (the-as (pointer process) (&-> obj self)))\n"
|
||||
" (countdown (v1-4 arg3)\n"
|
||||
" (let ((a0-4 (-> obj process-list v1-4)))\n"
|
||||
" (set! (-> a0-4 process) *null-process*)\n"
|
||||
@@ -2240,7 +2243,7 @@ TEST_F(FormRegressionTest, ExprMethod15DeadPoolHeap) {
|
||||
" (set! (-> s5-1 2 mask) (the-as process-mask (-> s5-1 1)))\n"
|
||||
" (set! (-> arg0 alive-list prev) (the-as dead-pool-heap-rec (-> s5-1 1)))\n"
|
||||
" )\n"
|
||||
" (set! (-> s5-1 2) (the-as process-tree (-> arg0 dead-list next)))\n"
|
||||
" (set! (-> s5-1 2) (the-as process (-> arg0 dead-list next)))\n"
|
||||
" (set! (-> arg0 dead-list next) (the-as dead-pool-heap-rec s5-1))\n"
|
||||
" (set! (-> s5-1 0) *null-process*)\n"
|
||||
" )\n"
|
||||
|
||||
Reference in New Issue
Block a user