[decompiler] as-type and font method support (#3855)

Add support for `as-type` macro, and detecting inline font methods. This
works in all three games but I've only updated jak 3's goal_src for now.
Eventually I will go back and work through the others, but I want to get
more decompiler features in first.


![image](https://github.com/user-attachments/assets/5c31bf85-97b4-437c-bc4b-dc054e60551e)

---------

Co-authored-by: water111 <awaterford1111445@gmail.com>
This commit is contained in:
water111
2025-02-01 21:23:11 -05:00
committed by GitHub
parent d5590ab638
commit 48cb9bb787
645 changed files with 5391 additions and 16694 deletions
+12 -27
View File
@@ -262,12 +262,7 @@
;; INFO: Used lq/sq
(defmethod bt-roboguard-method-46 ((this bt-roboguard))
(local-vars (s5-1 object))
(let* ((s5-0 (handle->process (-> this focus)))
(a0-5 (if (type? s5-0 process-focusable)
s5-0
)
)
)
(let ((a0-5 (as-type (handle->process (-> this focus)) process-focusable)))
(cond
(a0-5
(set! s5-1 (-> this focus-pos))
@@ -2517,12 +2512,7 @@
:virtual #t
:event blow-tower-enemy-handler
:enter (behavior ()
(let* ((gp-0 (handle->process (-> self target)))
(v1-3 (if (type? gp-0 process-focusable)
(the-as process-focusable gp-0)
)
)
)
(let ((v1-3 (as-type (handle->process (-> self target)) process-focusable)))
(when v1-3
(set! (-> self base-y) (-> v1-3 root trans y))
(quaternion-copy! (-> self last-parent-quat) (-> v1-3 root quat))
@@ -2580,13 +2570,9 @@
(set! (-> this local-xform root trans z) (- (lerp (-> this chase-start-dist) 16384.0 f30-0)))
(set! (-> this local-xform root trans y) (lerp (-> this preferred-height-offset) 0.0 f30-0))
(set! (-> this local-xform root trans w) 1.0)
(let* ((s5-1 (-> this xforms))
(s3-1 (handle->process (-> this target)))
(s4-2 (if (type? s3-1 process-focusable)
(the-as process-focusable s3-1)
)
)
)
(let ((s5-1 (-> this xforms))
(s4-2 (as-type (handle->process (-> this target)) process-focusable))
)
(when s4-2
(set! (-> s5-1 0 root trans quad) (-> (get-trans s4-2 3) quad))
(let ((s4-3 (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> s4-2 root quat))))
@@ -3159,14 +3145,13 @@
(vf7 :class vf)
)
(init-vf0-vector)
(let* ((s4-0
(handle->process (-> *blow-tower-targets* target-handles (logand (rand-uint31-gen *random-generator*) 1)))
)
(s5-0 (if (type? s4-0 process-focusable)
(the-as process-focusable s4-0)
)
)
)
(let ((s5-0
(as-type
(handle->process (-> *blow-tower-targets* target-handles (logand (rand-uint31-gen *random-generator*) 1)))
process-focusable
)
)
)
(cond
(s5-0
(vector-copy! (-> this target-pos) (get-trans s5-0 3))
+15 -76
View File
@@ -431,12 +431,7 @@
((-> this entity-pos)
(vector-copy! (-> this basetrans) (-> this entity-pos))
(vector-copy! (-> this root trans) (-> this entity-pos))
(let* ((s4-0 (handle->process (-> this focus)))
(s5-0 (if (type? s4-0 process-focusable)
(the-as process-focusable s4-0)
)
)
)
(let ((s5-0 (as-type (handle->process (-> this focus)) process-focusable)))
(when s5-0
(let ((a0-9 (new 'stack-no-clear 'vector)))
(vector-copy! a0-9 (vector-! (new 'stack-no-clear 'vector) (-> s5-0 root trans) (-> this root trans)))
@@ -491,12 +486,7 @@
(vector-copy! (-> this basetrans) s4-1)
)
(vector-copy! (-> this root trans) (-> this basetrans))
(let* ((s4-2 (handle->process (-> this focus)))
(a1-20 (if (type? s4-2 process-focusable)
(the-as process-focusable s4-2)
)
)
)
(let ((a1-20 (as-type (handle->process (-> this focus)) process-focusable)))
(if a1-20
(vector-! (-> this local-offset) (-> this basetrans) (-> a1-20 root trans))
)
@@ -583,16 +573,10 @@
(sound-stop (-> self charge-sound))
)
:trans (behavior ()
(let* ((gp-0 (handle->process (-> self focus)))
(a1-2 (-> (the-as process-focusable (if (type? gp-0 process-focusable)
(the-as process-focusable gp-0)
)
)
root
trans
)
)
)
(let ((a1-2
(-> (the-as process-focusable (as-type (handle->process (-> self focus)) process-focusable)) root trans)
)
)
(if (or (< 143360.0 (vector-vector-xz-distance (-> self root trans) a1-2))
(and (not (logtest? (-> self draw status) (draw-control-status on-screen)))
(let ((gp-1 sphere-in-view-frustum?)
@@ -638,12 +622,7 @@
(set! (-> gp-0 quad) (the-as uint128 0))
(quaternion-identity! s5-0)
(send-event (handle->process (-> self focus)) 'retrieve-spot (-> self surround-spot) gp-0 s5-0 #t)
(let* ((s4-0 (handle->process (-> self focus)))
(a1-3 (if (type? s4-0 process-focusable)
(the-as process-focusable s4-0)
)
)
)
(let ((a1-3 (as-type (handle->process (-> self focus)) process-focusable)))
(if a1-3
(vector+! gp-0 (-> self spot-base-pos) (-> a1-3 root trans))
)
@@ -1003,12 +982,7 @@
(set! (-> s5-0 quad) (the-as uint128 0))
(quaternion-identity! s4-0)
(send-event (handle->process (-> this focus)) 'retrieve-spot (-> this surround-spot) s5-0 s4-0 #t)
(let* ((s3-0 (handle->process (-> this focus)))
(a1-3 (if (type? s3-0 process-focusable)
s3-0
)
)
)
(let ((a1-3 (as-type (handle->process (-> this focus)) process-focusable)))
(if a1-3
(vector+! s5-0 (-> this spot-base-pos) (-> (the-as process-focusable a1-3) root trans))
)
@@ -1342,12 +1316,7 @@
)
)
:trans (behavior ()
(let* ((gp-0 (handle->process (-> self track-obj)))
(a0-4 (if (type? gp-0 process-focusable)
(the-as process-focusable gp-0)
)
)
)
(let ((a0-4 (as-type (handle->process (-> self track-obj)) process-focusable)))
(if a0-4
(vector-copy! (-> self track-pos) (get-trans a0-4 2))
)
@@ -1451,19 +1420,9 @@
(set! (-> s5-0 r) 131072.0)
(let ((s4-0 (new 'stack-no-clear 'array 'collide-shape 384)))
(countdown (s3-0 (fill-actor-list-for-box *actor-hash* s5-0 s4-0 384))
(let* ((s2-0 (-> s4-0 s3-0))
(v1-8 (if (type? s2-0 collide-shape)
s2-0
)
)
)
(let ((v1-8 (as-type (-> s4-0 s3-0) collide-shape)))
(when v1-8
(let* ((s2-1 (-> v1-8 process))
(a0-8 (if (type? s2-1 process-focusable)
s2-1
)
)
)
(let ((a0-8 (as-type (-> v1-8 process) process-focusable)))
(when a0-8
(when (and (= (-> a0-8 type) bt-barrel) (< (-> this num-nearby-barrels) 16) (!= a0-8 this))
(set! (-> this nearby-barrels (-> this num-nearby-barrels)) (process->handle a0-8))
@@ -1484,12 +1443,7 @@
)
)
)
(let* ((s3-1 *target*)
(s4-1 (if (type? s3-1 process-focusable)
s3-1
)
)
)
(let ((s4-1 (the-as target (as-type *target* process-focusable))))
(when (and s4-1 (< (vector-vector-distance (get-trans s4-1 0) s5-0) (-> s5-0 r)))
(when (and (= (-> s4-1 type) bt-barrel) (< (-> this num-nearby-barrels) 16) (!= s4-1 this))
(set! (-> this nearby-barrels (-> this num-nearby-barrels)) (process->handle s4-1))
@@ -1601,19 +1555,9 @@
(set! (-> s5-0 r) 131072.0)
(let ((s4-0 (new 'stack-no-clear 'array 'collide-shape 384)))
(countdown (s3-0 (fill-actor-list-for-box *actor-hash* s5-0 s4-0 384))
(let* ((s2-0 (-> s4-0 s3-0))
(v1-6 (if (type? s2-0 collide-shape)
s2-0
)
)
)
(let ((v1-6 (as-type (-> s4-0 s3-0) collide-shape)))
(when v1-6
(let* ((s1-0 (-> v1-6 process))
(s2-1 (if (type? s1-0 process-focusable)
s1-0
)
)
)
(let ((s2-1 (as-type (-> v1-6 process) process-focusable)))
(when s2-1
(when (or (type? s2-1 blow-tower-enemy) (type? s2-1 bombbot))
(let* ((s1-1 (get-trans (the-as process-focusable s2-1) 3))
@@ -1663,12 +1607,7 @@
)
)
)
(let* ((s3-1 *target*)
(s4-1 (if (type? s3-1 process-focusable)
s3-1
)
)
)
(let ((s4-1 (the-as target (as-type *target* process-focusable))))
(when (and s4-1 (< (vector-vector-distance (get-trans s4-1 0) s5-0) (-> s5-0 r)))
(when (or (type? s4-1 blow-tower-enemy) (type? s4-1 bombbot))
(let* ((s5-1 (get-trans s4-1 3))
+31 -101
View File
@@ -641,12 +641,7 @@
;; definition for method 37 of type bt-vehicle
(defmethod bt-vehicle-method-37 ((this bt-vehicle))
(dotimes (s5-0 (-> this rider-spots length))
(let* ((s3-0 (handle->process (-> this rider-spots data s5-0 rider)))
(s4-0 (if (type? s3-0 process-focusable)
(the-as process-focusable s3-0)
)
)
)
(let ((s4-0 (as-type (handle->process (-> this rider-spots data s5-0 rider)) process-focusable)))
(when s4-0
(let ((a2-0 (quaternion->matrix (new 'stack-no-clear 'matrix) (-> this root quat)))
(s3-1 (-> s4-0 root trans))
@@ -738,12 +733,7 @@
)
(send-event (handle->process (-> self task-man)) 'vehicle-explode)
(dotimes (gp-3 (-> self rider-spots length))
(let* ((s5-1 (handle->process (-> self rider-spots data gp-3 rider)))
(a0-26 (if (type? s5-1 process-focusable)
s5-1
)
)
)
(let ((a0-26 (as-type (handle->process (-> self rider-spots data gp-3 rider)) process-focusable)))
(if a0-26
(send-event a0-26 'die)
)
@@ -779,11 +769,7 @@
(attack-info-method-9 arg1 s2-0 arg2 this)
(vector-copy! sv-64 (-> s2-0 intersection))
)
(let ((a0-6 (if (type? arg2 process-focusable)
arg2
)
)
)
(let ((a0-6 (as-type arg2 process-focusable)))
(if a0-6
(vector-copy! sv-64 (get-trans a0-6 3))
)
@@ -1984,18 +1970,12 @@
)
(dotimes (s5-0 (-> this num-onscreen-targets))
(let ((s3-0 (new 'stack-no-clear 'vector)))
(let ((s2-0 transform-point-vector!)
(s1-0 s3-0)
(s0-0 (handle->process (-> this onscreen-targets s5-0 hand)))
)
(s2-0 s1-0 (get-trans
(the-as process-focusable (if (type? s0-0 process-focusable)
(the-as process-focusable s0-0)
)
)
3
)
)
(transform-point-vector!
s3-0
(get-trans
(the-as process-focusable (as-type (handle->process (-> this onscreen-targets s5-0 hand)) process-focusable))
3
)
)
(let ((s2-1 (+ s5-0 1))
(s1-1 (+ (-> this num-onscreen-targets) -1))
@@ -2053,16 +2033,12 @@
(!= (-> (handle->process (-> this onscreen-targets s5-1 hand)) type) bt-barrel)
)
(set! sv-96 (new 'stack-no-clear 'vector))
(let ((s4-1 (handle->process (-> this onscreen-targets s5-1 hand))))
(set! sv-100 (get-trans
(the-as process-focusable (if (type? s4-1 process-focusable)
(the-as process-focusable s4-1)
)
)
3
)
(set! sv-100
(get-trans
(the-as process-focusable (as-type (handle->process (-> this onscreen-targets s5-1 hand)) process-focusable))
3
)
)
)
(transform-point-vector! sv-96 sv-100)
(+! (-> sv-96 x) -1792.0)
(+! (-> sv-96 y) -1840.0)
@@ -2488,12 +2464,7 @@
(when v1-64
(cond
((= (-> this look-mode) 2)
(let* ((s4-4 (-> v1-64 extra process))
(a0-37 (if (type? s4-4 process-focusable)
s4-4
)
)
)
(let ((a0-37 (as-type (-> v1-64 extra process) process-focusable)))
(cond
((and a0-37
(not (logtest? (-> (the-as process-focusable a0-37) focus-status) (focus-status disable dead ignore inactive))
@@ -2516,12 +2487,7 @@
)
)
(when (= (-> this look-mode) 3)
(let* ((s4-8 (handle->process (-> this look-proc)))
(a0-43 (if (type? s4-8 process-focusable)
s4-8
)
)
)
(let ((a0-43 (as-type (handle->process (-> this look-proc)) process-focusable)))
(if (and a0-43
(not (logtest? (-> (the-as process-focusable a0-43) focus-status) (focus-status disable dead ignore inactive))
)
@@ -2978,12 +2944,7 @@
(s4-0 (-> v1-5 root-prim))
)
(when (logtest? (-> s4-0 prim-core collide-as) (collide-spec enemy obstacle hit-by-others-list))
(let ((s3-0 (-> v1-5 process)))
(set! sv-32 (if (type? s3-0 process-focusable)
s3-0
)
)
)
(set! sv-32 (as-type (-> v1-5 process) process-focusable))
(when (and sv-32
(< (-> this num-onscreen-targets) 32)
(not (logtest? (-> (the-as process-focusable sv-32) focus-status) (focus-status disable dead ignore inactive))
@@ -3071,12 +3032,7 @@
(s4-1 (-> v1-81 root-prim))
)
(when (logtest? (-> s4-1 prim-core collide-as) (collide-spec enemy obstacle hit-by-others-list))
(let ((s3-9 (-> v1-81 process)))
(set! sv-784 (if (type? s3-9 process-focusable)
s3-9
)
)
)
(set! sv-784 (as-type (-> v1-81 process) process-focusable))
(when (and sv-784
(< (-> this num-onscreen-targets) 32)
(not (logtest? (-> (the-as process-focusable sv-784) focus-status) (focus-status disable dead ignore inactive))
@@ -3163,12 +3119,7 @@
(s4-2 (-> v1-156 root-prim))
)
(when (logtest? (-> s4-2 prim-core collide-as) (collide-spec enemy obstacle hit-by-others-list))
(let ((s3-18 (-> v1-156 process)))
(set! sv-1536 (if (type? s3-18 process-focusable)
s3-18
)
)
)
(set! sv-1536 (as-type (-> v1-156 process) process-focusable))
(when (and sv-1536
(< (-> this num-onscreen-targets) 32)
(not (logtest? (-> (the-as process-focusable sv-1536) focus-status) (focus-status disable dead ignore inactive))
@@ -3289,12 +3240,7 @@
(new 'stack-no-clear 'vector)
491520.0
(quaternion->matrix (new 'stack-no-clear 'matrix) (-> this root quat))
(let* ((s4-0 (handle->process (-> this parent-vehicle)))
(v1-22 (if (type? s4-0 process-focusable)
(the-as process-focusable s4-0)
)
)
)
(let ((v1-22 (as-type (handle->process (-> this parent-vehicle)) process-focusable)))
(when v1-22
(vector<-cspace! s5-0 (-> v1-22 node-list data (-> *bt-hellcat-gun-nodes* (-> this fire-index))))
(send-event (handle->process (-> this parent-vehicle)) 'fire (-> this fire-index))
@@ -3344,22 +3290,16 @@
)
)
)
(when (and (-> s4-2 best-other-tri collide-ptr) (let ((s3-5 (-> s4-2 best-other-tri collide-ptr)))
(if (type? s3-5 collide-shape-prim-sphere)
s3-5
)
)
(when (and (-> s4-2 best-other-tri collide-ptr)
(as-type (-> s4-2 best-other-tri collide-ptr) collide-shape-prim-sphere)
)
(let* ((s3-6 (-> s4-2 best-other-tri collide-ptr))
(a0-50 (-> (the-as collide-shape-prim-sphere (if (type? s3-6 collide-shape-prim-sphere)
(the-as collide-shape-prim-sphere s3-6)
)
)
cshape
process
)
)
)
(let ((a0-50
(-> (the-as collide-shape-prim-sphere (as-type (-> s4-2 best-other-tri collide-ptr) collide-shape-prim-sphere))
cshape
process
)
)
)
(if a0-50
(send-event
a0-50
@@ -4620,12 +4560,7 @@
(set! (-> this dest-clock-scalar) (-> arg0 clock-scalar))
)
(((blow-tower-cmd-type play-sound))
(let* ((s3-9 (handle->process (-> this target-handles (-> arg0 target))))
(s4-7 (if (type? s3-9 process-focusable)
(the-as process-focusable s3-9)
)
)
)
(let ((s4-7 (as-type (handle->process (-> this target-handles (-> arg0 target))) process-focusable)))
(when s4-7
(send-event (handle->process (-> this target-handles (-> arg0 target))) 'boost-thruster (-> arg0 time-offset))
(sound-play "hc-whoosh" :position (-> s4-7 root trans))
@@ -4919,12 +4854,7 @@
((not (logtest? (-> arg1 mask) (attack-mask control)))
(let ((s2-1 (new 'stack-no-clear 'attack-info)))
(attack-info-method-9 arg1 s2-1 arg2 this)
(let* ((s1-1 arg2)
(a0-11 (if (type? s1-1 process-focusable)
s1-1
)
)
)
(let ((a0-11 (as-type arg2 process-focusable)))
(if a0-11
(vector-copy! (-> s2-1 intersection) (get-trans a0-11 3))
)
+27 -84
View File
@@ -512,15 +512,11 @@
(('attack)
(cond
((= (-> arg0 type) target)
(let* ((gp-0 (ppointer->process (-> self parent)))
(s3-0 (if (type? gp-0 process-focusable)
gp-0
)
)
(s5-0 (new 'stack-no-clear 'traj3d-params))
(gp-1 (new 'stack-no-clear 'vector))
(s4-0 (new 'stack-no-clear 'vector))
)
(let ((s3-0 (as-type (ppointer->process (-> self parent)) process-focusable))
(s5-0 (new 'stack-no-clear 'traj3d-params))
(gp-1 (new 'stack-no-clear 'vector))
(s4-0 (new 'stack-no-clear 'vector))
)
(when s3-0
(vector-rotate-around-y! gp-1 *x-vector* (* 182.04445 (rand-vu-float-range 0.0 360.0)))
(let ((s2-1 (-> s5-0 dest)))
@@ -598,12 +594,7 @@
:event (behavior ((proc process) (argc int) (message symbol) (block event-message-block))
(case message
(('touch)
(let* ((s4-0 proc)
(s3-0 (if (type? s4-0 process-drawable)
s4-0
)
)
)
(let ((s3-0 (as-type proc process-drawable)))
(when s3-0
(let ((a0-3 (-> (the-as process-focusable s3-0) root))
(a1-2 (new 'stack-no-clear 'collide-query))
@@ -1393,14 +1384,10 @@
(when (>= f0-4 0.0)
(vector+float*! s4-0 (-> s3-0 start-pos) (-> s3-0 move-dist) f0-4)
(vector-float*! s5-0 s5-0 f0-4)
(let* ((s1-1 (-> s3-0 best-other-tri collide-ptr))
(s2-1 (if (type? s1-1 collide-shape-prim)
s1-1
)
)
(v1-22 (vector-normalize! (vector-! (new 'stack-no-clear 'vector) (-> s3-0 start-pos) s4-0) 1638.4))
(s3-1 (new 'stack-no-clear 'vector))
)
(let ((s2-1 (as-type (-> s3-0 best-other-tri collide-ptr) collide-shape-prim))
(v1-22 (vector-normalize! (vector-! (new 'stack-no-clear 'vector) (-> s3-0 start-pos) s4-0) 1638.4))
(s3-1 (new 'stack-no-clear 'vector))
)
(vector-copy! s3-1 s4-0)
(vector+! s3-1 s3-1 v1-22)
(cond
@@ -2061,9 +2048,7 @@
(f30-0 (t9-0 this arg0 arg1))
)
(cond
((if (type? arg0 bombbot-bomb)
arg0
)
((as-type arg0 bombbot-bomb)
(set! *bombbot-hint* (new 'static 'sound-id))
(if (rand-vu-percent? 0.1)
(talker-spawn-func (-> *talker-speech* 169) *entity-pool* (target-pos 0) (the-as region #f))
@@ -2186,19 +2171,9 @@
(s3-0 (new 'stack-no-clear 'array 'collide-shape 64))
)
(countdown (s2-0 (fill-actor-list-for-box *actor-hash* arg0 s3-0 64))
(let* ((s1-0 (-> s3-0 s2-0))
(a0-3 (if (type? s1-0 collide-shape)
s1-0
)
)
)
(let ((a0-3 (as-type (-> s3-0 s2-0) collide-shape)))
(when a0-3
(let* ((s0-0 (-> a0-3 process))
(s1-1 (if (type? s0-0 process-focusable)
s0-0
)
)
)
(let ((s1-1 (as-type (-> a0-3 process) process-focusable)))
(when (and s1-1
(!= this s1-1)
(not (focus-test? this inactive))
@@ -4010,13 +3985,9 @@
(defmethod enemy-touched-handler ((this bombbot) (arg0 process) (arg1 event-message-block))
"General handler for when anything touches an enemy (automatic response)."
(when (!= (-> arg0 type) target)
(let* ((s3-0 (-> arg1 param 0))
(s2-0 arg0)
(v1-1 (if (type? s2-0 process-focusable)
s2-0
)
)
)
(let ((s3-0 (-> arg1 param 0))
(v1-1 (as-type arg0 process-focusable))
)
(cond
((and (focus-test? this dangerous)
(logtest? (process-mask guard vehicle civilian kg-robot metalhead) (-> arg0 mask))
@@ -4087,32 +4058,18 @@
(s4-0 (new 'stack-no-clear 'array 'collide-shape 64))
)
(countdown (s3-0 (fill-actor-list-for-box *actor-hash* arg0 s4-0 64))
(let* ((s2-0 (-> s4-0 s3-0))
(a0-3 (if (type? s2-0 collide-shape)
s2-0
)
)
)
(let ((a0-3 (as-type (-> s4-0 s3-0) collide-shape)))
(when a0-3
(let* ((s1-0 (-> a0-3 process))
(s2-1 (if (type? s1-0 process-focusable)
s1-0
)
)
)
(let ((s2-1 (as-type (-> a0-3 process) process-focusable)))
(when (and (the-as process-focusable s2-1)
(and (!= this (the-as process-focusable s2-1))
(not (focus-test? this inactive))
(not (focus-test? this disable))
(not (focus-test? this dead))
(let ((s1-1 (the-as process-focusable s2-1)))
(and (if (type? s1-1 bombbot)
s1-1
)
(the-as process-focusable s2-1)
(not (logtest? (-> (the-as process-focusable s2-1) focus-status) (focus-status disable dead ignore grabbed)))
)
)
(and (as-type (the-as process-focusable s2-1) bombbot)
(the-as process-focusable s2-1)
(not (logtest? (-> (the-as process-focusable s2-1) focus-status) (focus-status disable dead ignore grabbed)))
)
)
)
(let ((f0-0 (vector-vector-xz-distance (-> this root trans) (-> (the-as process-focusable s2-1) root trans))))
@@ -4544,20 +4501,11 @@
)
(set! sv-896 (fill-actor-list-for-sphere *actor-hash* sv-876 sv-872 40960.0 sv-884 64 -1))
(countdown (s5-3 sv-896)
(let* ((s4-0 (-> sv-884 s5-3))
(a0-19 (if (type? s4-0 collide-shape)
s4-0
)
)
)
(let ((a0-19 (as-type (-> sv-884 s5-3) collide-shape)))
(when a0-19
(let* ((s3-0 (-> a0-19 process))
(s4-1 (if (type? s3-0 process-focusable)
s3-0
)
)
(s3-1 (new 'stack-no-clear 'vector))
)
(let ((s4-1 (as-type (-> a0-19 process) process-focusable))
(s3-1 (new 'stack-no-clear 'vector))
)
(when (and s4-1
(valid-target? this (the-as process-focusable s4-1))
(not (logtest? (process-mask guard) (-> s4-1 mask)))
@@ -5294,12 +5242,7 @@
(let ((s4-2 10000))
(dotimes (s3-0 3)
(when (-> this bombbot-h s3-0)
(let* ((s1-0 (handle->process (-> this bombbot-h s3-0)))
(s2-0 (if (type? s1-0 bombbot)
(the-as bombbot s1-0)
)
)
)
(let ((s2-0 (as-type (handle->process (-> this bombbot-h s3-0)) bombbot)))
(when s2-0
(+! s5-2 1)
(let ((v1-114
@@ -366,22 +366,15 @@
(or (= v1-7 'moving) (= v1-7 'sitting))
)
)
(let* ((s4-1 (new 'stack-no-clear 'vector))
(s3-0 (handle->process (-> this owner-handle)))
(s4-2 (vector-!
s4-1
(get-trans
(the-as process-focusable (if (type? s3-0 process-focusable)
(the-as process-focusable s3-0)
)
)
0
)
(-> this root trans)
)
)
(s3-1 (new 'stack-no-clear 'vector))
)
(let ((s4-2
(vector-!
(new 'stack-no-clear 'vector)
(get-trans (the-as process-focusable (as-type (handle->process (-> this owner-handle)) process-focusable)) 0)
(-> this root trans)
)
)
(s3-1 (new 'stack-no-clear 'vector))
)
(set! (-> s3-1 quad) (the-as uint128 0))
(set! (-> s4-2 y) 0.0)
(let ((f28-0 1274.3112)
@@ -392,12 +385,7 @@
(set! f28-0 3276.8)
(set! f30-0 204800.0)
)
(let* ((s2-0 arg0)
(a0-16 (if (type? s2-0 process-focusable)
s2-0
)
)
)
(let ((a0-16 (as-type arg0 process-focusable)))
0.0
(let ((f26-0 -0.3)
(v1-22 a0-16)
+5 -31
View File
@@ -262,12 +262,7 @@
(while (!= v1-4 (-> *collide-player-list* alive-list-end))
(let ((v1-5 (the-as collide-shape (-> (the-as connection v1-4) param1))))
(when (logtest? arg1 (-> v1-5 root-prim prim-core collide-as))
(let* ((s1-0 (-> v1-5 process))
(s2-0 (if (type? s1-0 process-focusable)
s1-0
)
)
)
(let ((s2-0 (as-type (-> v1-5 process) process-focusable)))
(when (and s2-0 (not (focus-test? (the-as process-focusable s2-0) disable dead inactive)) (!= arg0 s2-0))
(let ((f0-0 (vector-vector-xz-distance (-> arg0 root trans) (-> (the-as process-focusable s2-0) root trans))))
(when (or (not gp-0) (< f0-0 f30-0))
@@ -294,12 +289,7 @@
(while (!= v1-22 (-> *collide-hit-by-player-list* alive-list-end))
(let ((v1-23 (the-as collide-shape (-> (the-as connection v1-22) param1))))
(when (logtest? arg1 (-> v1-23 root-prim prim-core collide-as))
(let* ((s1-1 (-> v1-23 process))
(s2-1 (if (type? s1-1 process-focusable)
s1-1
)
)
)
(let ((s2-1 (as-type (-> v1-23 process) process-focusable)))
(when (and s2-1 (not (focus-test? (the-as process-focusable s2-1) disable dead inactive)) (!= arg0 s2-1))
(let ((f0-1 (vector-vector-xz-distance (-> arg0 root trans) (-> s2-1 root trans))))
(when (or (not gp-0) (< f0-1 f30-0))
@@ -325,12 +315,7 @@
(while (!= v1-38 (-> *collide-hit-by-others-list* alive-list-end))
(let ((v1-39 (the-as collide-shape (-> (the-as connection v1-38) param1))))
(when (logtest? arg1 (-> v1-39 root-prim prim-core collide-as))
(let* ((s1-2 (-> v1-39 process))
(s2-2 (if (type? s1-2 process-focusable)
s1-2
)
)
)
(let ((s2-2 (as-type (-> v1-39 process) process-focusable)))
(when (and s2-2 (not (focus-test? (the-as process-focusable s2-2) disable dead inactive)) (!= arg0 s2-2))
(let ((f0-2 (vector-vector-xz-distance (-> arg0 root trans) (-> s2-2 root trans))))
(when (or (not gp-0) (< f0-2 f30-0))
@@ -663,20 +648,9 @@
;; definition for function set-ff-primary-target
;; WARN: Return type mismatch int vs none.
(defun set-ff-primary-target ((arg0 handle) (arg1 float))
(when *ff-squad-control*
(let* ((s5-0 *ff-squad-control*)
(s4-0 (method-of-object s5-0 squad-control-method-27))
(s3-0 (handle->process arg0))
)
(s4-0
s5-0
(if (type? s3-0 process-focusable)
s3-0
)
arg1
)
(if *ff-squad-control*
(squad-control-method-27 *ff-squad-control* (as-type (handle->process arg0) process-focusable) arg1)
)
)
0
(none)
)
+7 -16
View File
@@ -444,17 +444,10 @@
(go-hostile this)
)
(let* ((s4-0 (-> this target-status))
(s3-0 (handle->process (-> s4-0 handle)))
(s5-0 (if (type? s3-0 process-focusable)
s3-0
)
)
(s5-0 (as-type (handle->process (-> s4-0 handle)) process-focusable))
)
(if (and s5-0 (or (focus-test? (the-as process-focusable s5-0) inactive)
(focus-test? (the-as process-focusable s5-0) disable)
)
)
(set! s5-0 (the-as process #f))
(if (and s5-0 (or (focus-test? s5-0 inactive) (focus-test? s5-0 disable)))
(set! s5-0 (the-as process-focusable #f))
)
(cond
((not s5-0)
@@ -471,16 +464,16 @@
(not (logtest? (-> s5-0 mask) (process-mask target)))
)
(cond
((focus-test? (the-as process-focusable s5-0) arrestable)
((focus-test? s5-0 arrestable)
(if (and (< (-> this target-self-xz-dist) 28672.0)
(< (fabs (-> this target-y-angle)) 7281.778)
(>= 8192.0 (fabs (- (-> (get-trans (the-as process-focusable s5-0) 1) y) (-> this root trans y))))
(>= 8192.0 (fabs (- (-> (get-trans s5-0 1) y) (-> this root trans y))))
)
(go (method-of-object this arrest))
)
)
(else
(if (crimson-guard-method-269 this (the-as process-focusable s5-0))
(if (crimson-guard-method-269 this s5-0)
(go (method-of-object this close-attack))
)
)
@@ -488,9 +481,7 @@
)
(let ((f0-7 (* 2.0 (crimson-guard-method-283 this))))
(when (and (time-elapsed? (-> this state-time) (seconds 1))
(< (* f0-7 f0-7)
(vector-vector-xz-distance-squared (-> this root trans) (get-trans (the-as process-focusable s5-0) 0))
)
(< (* f0-7 f0-7) (vector-vector-xz-distance-squared (-> this root trans) (get-trans s5-0 0)))
)
(set-time! (-> this state-time))
(crimson-guard-method-289 this 0.0)
+3 -7
View File
@@ -251,13 +251,9 @@
(set-point! (-> this l-control) 1 s5-0)
(set! (-> this l-control spec) (-> *lightning-spec-id-table* 19))
(+! (-> this l-control state points-to-draw) 2)
(let* ((s1-6 (-> s3-0 best-other-tri collide-ptr))
(v1-91 (if (type? s1-6 collide-shape-prim)
s1-6
)
)
(s1-7 #t)
)
(let ((v1-91 (as-type (-> s3-0 best-other-tri collide-ptr) collide-shape-prim))
(s1-7 #t)
)
(when v1-91
(set! s1-7 #f)
(let ((s0-1 (new 'stack-no-clear 'projectile-init-by-other-params)))
+2 -13
View File
@@ -373,20 +373,9 @@
;; definition for function set-kg-primary-target
;; WARN: Return type mismatch int vs none.
(defun set-kg-primary-target ((arg0 handle) (arg1 float))
(when *kg-squad-control*
(let* ((s5-0 *kg-squad-control*)
(s4-0 (method-of-object s5-0 squad-control-method-27))
(s3-0 (handle->process arg0))
)
(s4-0
s5-0
(if (type? s3-0 process-focusable)
s3-0
)
arg1
)
(if *kg-squad-control*
(squad-control-method-27 *kg-squad-control* (as-type (handle->process arg0) process-focusable) arg1)
)
)
0
(none)
)
+3 -7
View File
@@ -188,13 +188,9 @@
)
(else
(when (!= (-> arg0 type) target)
(let* ((s3-0 (-> arg1 param 0))
(s2-0 arg0)
(v1-2 (if (type? s2-0 process-focusable)
s2-0
)
)
)
(let ((s3-0 (-> arg1 param 0))
(v1-2 (as-type arg0 process-focusable))
)
(cond
((and (focus-test? this dangerous)
(logtest? (process-mask enemy guard civilian metalhead) (-> arg0 mask))
+2 -13
View File
@@ -175,20 +175,9 @@
;; definition for function set-mh-primary-target
;; WARN: Return type mismatch int vs none.
(defun set-mh-primary-target ((arg0 handle) (arg1 float))
(when *mh-squad-control*
(let* ((s5-0 *mh-squad-control*)
(s4-0 (method-of-object s5-0 squad-control-method-27))
(s3-0 (handle->process arg0))
)
(s4-0
s5-0
(if (type? s3-0 process-focusable)
s3-0
)
arg1
)
(if *mh-squad-control*
(squad-control-method-27 *mh-squad-control* (as-type (handle->process arg0) process-focusable) arg1)
)
)
0
(none)
)
+9 -31
View File
@@ -147,13 +147,9 @@
)
(else
(when (!= (-> arg0 type) target)
(let* ((s3-0 (-> arg1 param 0))
(s2-0 arg0)
(v1-2 (if (type? s2-0 process-focusable)
s2-0
)
)
)
(let ((s3-0 (-> arg1 param 0))
(v1-2 (as-type arg0 process-focusable))
)
(cond
((and (focus-test? this dangerous)
(logtest? (process-mask enemy guard civilian kg-robot) (-> arg0 mask))
@@ -219,28 +215,15 @@
(set! (-> this attacker-info next-update-target-time) (+ (current-time) (seconds 3)))
(logclear! (-> this attacker-info flags) (city-attacker-info-flag cai2))
)
(let* ((s5-0 (handle->process (-> this current-enemy)))
(a0-18 (if (type? s5-0 process-focusable)
s5-0
)
)
)
(let ((a0-18 (as-type (handle->process (-> this current-enemy)) process-focusable)))
(cond
((and a0-18
(not (logtest? (-> (the-as process-focusable a0-18) focus-status) (focus-status disable dead inactive)))
)
(let* ((s5-1 this)
(s4-0 (method-of-object s5-1 set-focus!))
(s3-0 (handle->process (-> this current-enemy)))
)
(s4-0
s5-1
(the-as process-focusable (if (type? s3-0 process-focusable)
s3-0
)
)
(the-as enemy-aware #f)
)
(set-focus!
this
(the-as process-focusable (as-type (handle->process (-> this current-enemy)) process-focusable))
(the-as enemy-aware #f)
)
(update-focus this)
(let ((f0-0 (vector-vector-xz-distance-squared (-> this root trans) (-> this focus-pos)))
@@ -278,12 +261,7 @@
:virtual #t
:trans (behavior ()
(when (handle->process (-> self current-enemy))
(let* ((gp-0 (handle->process (-> self current-enemy)))
(v1-7 (if (type? gp-0 process-focusable)
(the-as process-focusable gp-0)
)
)
)
(let ((v1-7 (as-type (handle->process (-> self current-enemy)) process-focusable)))
(if (not (or (focus-test? v1-7 inactive) (focus-test? v1-7 disable)))
(go-virtual hostile)
)
+24 -90
View File
@@ -286,12 +286,7 @@
(let ((v1-5 (the-as attack-info (-> block param 1))))
(when (!= (-> v1-5 id) (-> self incoming-attack-id))
(set! (-> self incoming-attack-id) (-> v1-5 id))
(let* ((s5-0 proc)
(s3-0 (if (type? s5-0 process-drawable)
s5-0
)
)
)
(let ((s3-0 (as-type proc process-drawable)))
(when s3-0
(let ((s5-1 (process-spawn
manipy
@@ -390,18 +385,9 @@
(set! (-> self flash) 0.375)
)
(+! (-> self touch-count) 1)
(let ((v1-81 (if (type? proc process-focusable)
proc
)
)
)
(let ((v1-81 (as-type proc process-focusable)))
(when v1-81
(let* ((gp-1 (-> (the-as process-drawable v1-81) root))
(a0-45 (if (type? gp-1 collide-shape)
gp-1
)
)
)
(let ((a0-45 (as-type (-> (the-as process-drawable v1-81) root) collide-shape)))
(if (and a0-45 (logtest? (-> (the-as collide-shape a0-45) root-prim prim-core collide-as) (collide-spec jak)))
(play-speech self)
)
@@ -1374,12 +1360,7 @@
(gp-3 (new 'stack-no-clear 'matrix))
)
(when (and (nonzero? (-> self handle)) (handle->process (-> self handle)))
(let* ((s3-0 (handle->process (-> self handle)))
(a0-25 (if (type? s3-0 process-focusable)
s3-0
)
)
)
(let ((a0-25 (as-type (handle->process (-> self handle)) process-focusable)))
(when a0-25
(vector-! s4-0 (-> (the-as process-focusable a0-25) root trans) (-> self root trans))
(set! (-> self y-rot) (deg-seek
@@ -1406,19 +1387,9 @@
(s3-0 (new 'stack-no-clear 'array 'collide-shape 64))
)
(countdown (s2-0 (fill-actor-list-for-box *actor-hash* arg0 s3-0 64))
(let* ((s1-0 (-> s3-0 s2-0))
(a0-3 (if (type? s1-0 collide-shape)
s1-0
)
)
)
(let ((a0-3 (as-type (-> s3-0 s2-0) collide-shape)))
(when a0-3
(let* ((s0-0 (-> a0-3 process))
(s1-1 (if (type? s0-0 process-focusable)
s0-0
)
)
)
(let ((s1-1 (as-type (-> a0-3 process) process-focusable)))
(when (and s1-1
(!= this s1-1)
(not (focus-test? (the-as process-focusable s1-1) inactive))
@@ -1647,15 +1618,9 @@
(s5-1 (-> gp-0 tex))
)
(set! (-> s4-2 flags) (font-flags shadow kerning large))
(let ((v1-36 s4-2))
(set! (-> v1-36 width) (the float 340))
)
(let ((v1-37 s4-2))
(set! (-> v1-37 height) (the float 80))
)
(let ((v1-38 s4-2))
(set! (-> v1-38 scale) 0.6)
)
(set-width! s4-2 340)
(set-height! s4-2 80)
(set-scale! s4-2 0.6)
(let ((v1-41 (-> self entity extra perm)))
(logior! (-> v1-41 status) (entity-perm-status bit-5))
(set! (-> self bb-perm) v1-41)
@@ -1983,43 +1948,21 @@
)
)
(set! (-> v1-19 flags) (font-flags shadow kerning middle middle-vert large))
(let ((a0-17 v1-19))
(set! (-> a0-17 width) (the float 440))
)
(let ((a0-18 v1-19))
(set! (-> a0-18 height) (the float 50))
)
(let ((a0-19 v1-19))
(set! (-> a0-19 scale) 1.0)
)
(let ((a0-20 v1-19)
(a2-3 s3-2)
(a1-6 40)
)
(set! (-> a0-20 origin x) (the float a2-3))
(set! (-> a0-20 origin y) (the float a1-6))
)
(set-width! v1-19 440)
(set-height! v1-19 50)
(set-scale! v1-19 1.0)
(set-origin! v1-19 s3-2 40)
(let ((a1-7 v1-19))
(set! (-> a1-7 color) (font-color progress-old-yellow))
)
(let ((a0-22 v1-19))
(set! (-> a0-22 height) (the float s4-2))
)
(set-height! v1-19 s4-2)
(dotimes (a0-23 gp-0)
(let ((a1-9 v1-19)
(a3-3 s3-2)
(a2-4 s2-0)
)
(set! (-> a1-9 origin x) (the float a3-3))
(set! (-> a1-9 origin y) (the float a2-4))
)
(let ((a1-10 v1-19))
(set! (-> a1-10 scale) (if (= a0-23 s5-0)
0.8
0.6
)
)
)
(set-origin! v1-19 s3-2 s2-0)
(set-scale! v1-19 (if (= a0-23 s5-0)
0.8
0.6
)
)
(let ((a2-6 v1-19))
(set! (-> a2-6 color) (if (= a0-23 s5-0)
(font-color progress-old-selected)
@@ -3122,12 +3065,7 @@
(set-time! (-> self state-time))
(let ((gp-0 0))
(dotimes (s5-0 (-> self spawner records length))
(let* ((s4-0 (handle->process (-> self spawner records data s5-0 proc)))
(v1-11 (if (type? s4-0 process-focusable)
s4-0
)
)
)
(let ((v1-11 (as-type (handle->process (-> self spawner records data s5-0 proc)) process-focusable)))
(when v1-11
(if (not (focus-test? (the-as process-focusable v1-11) disable dead inactive))
(+! gp-0 1)
@@ -3169,13 +3107,9 @@
)
(check-inactive (-> self spawner))
(dotimes (gp-2 (-> self last-seen-times length))
(let* ((s4-3 (handle->process (-> self spawner records data gp-2 proc)))
(s5-2 (if (type? s4-3 process-focusable)
s4-3
)
)
(s4-4 (new 'stack 'sphere))
)
(let ((s5-2 (as-type (handle->process (-> self spawner records data gp-2 proc)) process-focusable))
(s4-4 (new 'stack 'sphere))
)
0.0
(when (the-as process-focusable s5-2)
(let ((f30-2 (vector-vector-distance (-> (the-as process-focusable s5-2) root trans) (target-pos 0))))
@@ -1254,13 +1254,9 @@
)
(else
(when (!= (-> arg0 type) target)
(let* ((s3-0 (-> arg1 param 0))
(s2-0 arg0)
(v1-6 (if (type? s2-0 process-focusable)
s2-0
)
)
)
(let ((s3-0 (-> arg1 param 0))
(v1-6 (as-type arg0 process-focusable))
)
(cond
((and (focus-test? this dangerous)
(logtest? (process-mask enemy) (-> arg0 mask))
@@ -1834,14 +1830,10 @@
)
)
)
(let ((s4-1 (entity-nav-mesh-by-aid (-> s5-0 nav-mesh-aid))))
(cond
((if (type? s4-1 entity-nav-mesh)
s4-1
)
)
(else
)
(cond
((as-type (entity-nav-mesh-by-aid (-> s5-0 nav-mesh-aid)) entity-nav-mesh)
)
(else
)
)
(when (= (+ (length (-> this actor-group 0)) 1) (-> this next-box))
+48 -126
View File
@@ -465,12 +465,7 @@
;; definition for method 46 of type cty-hijack-missile
;; INFO: Used lq/sq
(defmethod get-tracked-obj-pos ((this cty-hijack-missile) (arg0 vector))
(let* ((s5-0 (handle->process (-> this track-obj)))
(a0-5 (if (type? s5-0 process-focusable)
(the-as process-focusable s5-0)
)
)
)
(let ((a0-5 (as-type (handle->process (-> this track-obj)) process-focusable)))
(if a0-5
(vector-copy! arg0 (get-trans a0-5 3))
)
@@ -692,14 +687,10 @@
;; definition for method 47 of type cty-hijack-missile
;; INFO: Used lq/sq
(defmethod cty-hijack-missile-method-47 ((this cty-hijack-missile) (arg0 vector) (arg1 int))
(let* ((s3-0 (handle->process (-> this track-obj)))
(s2-0 (if (type? s3-0 process-focusable)
(the-as h-kg-pickup s3-0)
)
)
(s3-1 (get-tracked-obj-pos this (new 'stack-no-clear 'vector)))
(s5-1 (new 'stack-no-clear 'vector))
)
(let ((s2-0 (the-as h-kg-pickup (as-type (handle->process (-> this track-obj)) process-focusable)))
(s3-1 (get-tracked-obj-pos this (new 'stack-no-clear 'vector)))
(s5-1 (new 'stack-no-clear 'vector))
)
(let ((s0-0 (new 'stack-no-clear 'vector)))
(vector-copy! s0-0 (-> s2-0 root transv))
(let ((v1-8 (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> s2-0 root quat)))
@@ -748,12 +739,7 @@
;; definition for method 48 of type cty-hijack-missile
(defmethod cty-hijack-missile-method-48 ((this cty-hijack-missile) (arg0 vector))
(let* ((s5-0 (handle->process (-> this track-obj)))
(v1-3 (if (type? s5-0 process-focusable)
(the-as h-kg-pickup s5-0)
)
)
)
(let ((v1-3 (the-as h-kg-pickup (as-type (handle->process (-> this track-obj)) process-focusable))))
(when v1-3
(set! (-> arg0 x) (-> v1-3 root trans y))
(set! (-> arg0 y) (-> v1-3 turn-rate))
@@ -897,16 +883,7 @@
(('lure)
(when (-> this is-leader?)
(let ((s4-0 (new 'stack-no-clear 'vector)))
(let ((s3-0 arg0))
(vector-copy! s4-0 (get-trans
(the-as process-focusable (if (type? s3-0 process-focusable)
(the-as process-focusable s3-0)
)
)
3
)
)
)
(vector-copy! s4-0 (get-trans (the-as process-focusable (as-type arg0 process-focusable)) 3))
(let ((s3-1 (get-tracked-obj-pos this (new 'stack-no-clear 'vector))))
0.0
(let ((a0-17 (new 'stack-no-clear 'vector)))
@@ -914,63 +891,42 @@
(let ((f0-3 (vector-normalize-ret-len! a0-17 1.0)))
(when (and (< 192512.0 f0-3) (< f0-3 286720.0))
(format 0 "Player dist ~m~%" f0-3)
(let ((s2-0 (handle->process (-> this track-obj))))
(when (if (type? s2-0 process-focusable)
s2-0
)
(let ((s2-2 (vector-! (new 'stack-no-clear 'vector) s4-0 (-> this root trans))))
0.0
(let ((s1-0 (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> this root quat))))
(vector-normalize-ret-len! s2-2 1.0)
(when (< 0.707 (vector-dot s1-0 s2-2))
(let* ((s2-4 (vector-! (new 'stack-no-clear 'vector) s4-0 s3-1))
(s4-1 vector-z-quaternion!)
(s3-2 (new 'stack-no-clear 'vector))
(s1-1 (handle->process (-> this track-obj)))
(s4-2 (s4-1 s3-2 (-> (the-as process-focusable (if (type? s1-1 process-focusable)
(the-as process-focusable s1-1)
)
)
root
quat
)
)
)
)
(set! (-> s4-2 y) 0.0)
(vector-normalize! s4-2 1.0)
(set! (-> s2-4 y) 0.0)
(vector-normalize! s2-4 1.0)
(vector-cross! s2-4 s2-4 *up-vector*)
(let ((f0-10 (vector-dot s4-2 s2-4))
(f30-0 9102.223)
)
(if (< f0-10 0.0)
(set! f30-0 (* -1.0 f30-0))
)
(let ((s4-3 quaternion-rotate-y!)
(s3-3 (-> this original-quat))
(s2-5 (handle->process (-> this track-obj)))
)
(s4-3
s3-3
(-> (the-as process-focusable (if (type? s2-5 process-focusable)
(the-as process-focusable s2-5)
)
)
root
quat
)
f30-0
(when (as-type (handle->process (-> this track-obj)) process-focusable)
(let ((s2-2 (vector-! (new 'stack-no-clear 'vector) s4-0 (-> this root trans))))
0.0
(let ((s1-0 (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> this root quat))))
(vector-normalize-ret-len! s2-2 1.0)
(when (< 0.707 (vector-dot s1-0 s2-2))
(let ((s2-4 (vector-! (new 'stack-no-clear 'vector) s4-0 s3-1))
(s4-2
(vector-z-quaternion!
(new 'stack-no-clear 'vector)
(-> (the-as process-focusable (as-type (handle->process (-> this track-obj)) process-focusable)) root quat)
)
)
(set! (-> this rotate-deg) f30-0)
)
(set! (-> s4-2 y) 0.0)
(vector-normalize! s4-2 1.0)
(set! (-> s2-4 y) 0.0)
(vector-normalize! s2-4 1.0)
(vector-cross! s2-4 s2-4 *up-vector*)
(let ((f0-10 (vector-dot s4-2 s2-4))
(f30-0 9102.223)
)
(if (< f0-10 0.0)
(set! f30-0 (* -1.0 f30-0))
)
(quaternion-rotate-y!
(-> this original-quat)
(-> (the-as process-focusable (as-type (handle->process (-> this track-obj)) process-focusable)) root quat)
f30-0
)
(set! (-> this rotate-deg) f30-0)
)
(set! (-> this track-obj) (process->handle arg0))
(send-event arg0 'missile-attract)
(go (method-of-object this lure))
)
(set! (-> this track-obj) (process->handle arg0))
(send-event arg0 'missile-attract)
(go (method-of-object this lure))
)
)
)
@@ -1012,14 +968,10 @@
;; WARN: Function (method 51 cty-hijack-missile) has a return type of none, but the expression builder found a return statement.
(defmethod cty-hijack-missile-method-51 ((this cty-hijack-missile))
(local-vars (sv-64 float) (sv-68 float) (sv-72 float) (sv-76 vector) (sv-80 float))
(let* ((s4-0 (handle->process (-> this track-obj)))
(s5-0 (if (type? s4-0 process-focusable)
(the-as process-focusable s4-0)
)
)
(s4-1 (new 'stack-no-clear 'vector))
(a0-5 (new 'stack-no-clear 'vector))
)
(let ((s5-0 (as-type (handle->process (-> this track-obj)) process-focusable))
(s4-1 (new 'stack-no-clear 'vector))
(a0-5 (new 'stack-no-clear 'vector))
)
0.0
(if (not s5-0)
(return 0)
@@ -1264,7 +1216,6 @@
(cty-hijack-missile-method-53 self)
)
:trans (behavior ()
(local-vars (gp-4 symbol))
(if (< 40960.0 (-> self min-chase-speed))
(seek! (-> self min-chase-speed) 40960.0 (* 40960.0 (seconds-per-frame)))
)
@@ -1354,23 +1305,9 @@
(go-virtual explode)
)
(if (or (not (handle->process (-> self track-obj)))
(begin
(let* ((gp-5 #t)
(s5-3 (handle->process (-> self track-obj)))
(v1-94 (the-as focus-status (logand (-> (the-as process-focusable (if (type? s5-3 process-focusable)
(the-as process-focusable s5-3)
)
)
focus-status
)
(focus-status dead)
)
)
)
)
(cmove-#f-zero gp-4 v1-94 gp-5)
)
gp-4
(focus-test?
(the-as process-focusable (as-type (handle->process (-> self track-obj)) process-focusable))
dead
)
)
(go-virtual explode-tiny)
@@ -1394,7 +1331,6 @@
(cty-hijack-missile-method-53 self)
)
:trans (behavior ()
(local-vars (gp-0 symbol))
(seek! (-> self scale-factor) (-> self targ-scale-factor) (seconds-per-frame))
(let ((v1-2 (-> self root scale))
(a0-1 (new 'stack-no-clear 'vector))
@@ -1409,23 +1345,9 @@
(get-tracked-obj-pos self (-> self target-pos))
(cty-hijack-missile-method-51 self)
(if (or (not (handle->process (-> self track-obj)))
(begin
(let* ((gp-1 #t)
(s5-0 (handle->process (-> self track-obj)))
(v1-18 (the-as focus-status (logand (-> (the-as process-focusable (if (type? s5-0 process-focusable)
(the-as process-focusable s5-0)
)
)
focus-status
)
(focus-status dead)
)
)
)
)
(cmove-#f-zero gp-0 v1-18 gp-1)
)
gp-0
(focus-test?
(the-as process-focusable (as-type (handle->process (-> self track-obj)) process-focusable))
dead
)
)
(go-virtual explode-tiny)
+8 -87
View File
@@ -1115,12 +1115,7 @@
(while (!= v1-3 (-> *collide-player-list* alive-list-end))
(let ((v1-4 (the-as collide-shape (-> (the-as connection v1-3) param1))))
(when (logtest? (-> v1-4 root-prim prim-core collide-as) (collide-spec enemy hit-by-others-list))
(let* ((s5-0 (-> v1-4 process))
(a0-12 (if (type? s5-0 process-focusable)
s5-0
)
)
)
(let ((a0-12 (as-type (-> v1-4 process) process-focusable)))
(if (= (-> a0-12 type) cty-hijack-missile)
(send-event a0-12 'lure)
)
@@ -1142,12 +1137,7 @@
(while (!= v1-15 (-> *collide-hit-by-player-list* alive-list-end))
(let ((v1-16 (the-as collide-shape (-> (the-as connection v1-15) param1))))
(when (logtest? (-> v1-16 root-prim prim-core collide-as) (collide-spec enemy hit-by-others-list))
(let* ((s5-1 (-> v1-16 process))
(a0-24 (if (type? s5-1 process-focusable)
s5-1
)
)
)
(let ((a0-24 (as-type (-> v1-16 process) process-focusable)))
(if (= (-> a0-24 type) cty-hijack-missile)
(send-event a0-24 'lure)
)
@@ -1168,12 +1158,7 @@
(while (!= v1-26 (-> *collide-hit-by-others-list* alive-list-end))
(let ((v1-27 (the-as collide-shape (-> (the-as connection v1-26) param1))))
(when (logtest? (-> v1-27 root-prim prim-core collide-as) (collide-spec enemy hit-by-others-list))
(let* ((s5-2 (-> v1-27 process))
(a0-36 (if (type? s5-2 process-focusable)
s5-2
)
)
)
(let ((a0-36 (as-type (-> v1-27 process) process-focusable)))
(if (= (-> a0-36 type) cty-hijack-missile)
(send-event a0-36 'lure)
)
@@ -1514,14 +1499,8 @@
)
)
:trans (behavior ()
(local-vars (gp-1 symbol))
(when (not (-> self vehicle-is-visible?))
(let* ((s5-0 (handle->process (-> self hpickup)))
(gp-0 (if (type? s5-0 process-focusable)
(the-as process-focusable s5-0)
)
)
)
(let ((gp-0 (as-type (handle->process (-> self hpickup)) process-focusable)))
(when gp-0
(when (logtest? (-> gp-0 draw status) (draw-control-status on-screen))
(when (time-elapsed? (-> self last-check-vehicle-vis-time) (seconds 0.5))
@@ -1549,33 +1528,11 @@
)
)
(if (or (not (handle->process (-> self hpickup)))
(begin
(let* ((gp-2 #t)
(s5-2 (handle->process (-> self hpickup)))
(v1-34 (the-as focus-status (logand (-> (the-as process-focusable (if (type? s5-2 process-focusable)
(the-as process-focusable s5-2)
)
)
focus-status
)
(focus-status dead)
)
)
)
)
(cmove-#f-zero gp-1 v1-34 gp-2)
)
gp-1
)
(focus-test? (the-as process-focusable (as-type (handle->process (-> self hpickup)) process-focusable)) dead)
)
(send-event self 'fail)
)
(let* ((s5-3 (handle->process (-> self hpickup)))
(gp-3 (if (type? s5-3 process-focusable)
(the-as process-focusable s5-3)
)
)
)
(let ((gp-3 (as-type (handle->process (-> self hpickup)) process-focusable)))
(cond
((and gp-3 (and (< 184320.0 (vector-vector-xz-distance (target-pos 0) (get-trans gp-3 0)))
(> (get-alert-level1 *kg-squad-control*) 0)
@@ -1670,7 +1627,6 @@
(auto-save-user)
)
:trans (behavior ()
(local-vars (gp-1 symbol))
((-> (method-of-type task-manager active) trans))
(let ((v1-6 (handle->process (-> self missiles (-> self current-leader-missile)))))
(if v1-6
@@ -1752,24 +1708,7 @@
(send-event (handle->process (-> self missiles (-> self current-leader-missile))) 'explode)
)
(if (or (not (handle->process (-> self hpickup)))
(begin
(let* ((gp-2 #t)
(s5-0 (handle->process (-> self hpickup)))
(v1-164 (the-as focus-status (logand (-> (the-as process-focusable (if (type? s5-0 process-focusable)
(the-as process-focusable s5-0)
)
)
focus-status
)
(focus-status dead)
)
)
)
)
(cmove-#f-zero gp-1 v1-164 gp-2)
)
gp-1
)
(focus-test? (the-as process-focusable (as-type (handle->process (-> self hpickup)) process-focusable)) dead)
)
(send-event self 'fail)
)
@@ -1995,7 +1934,6 @@
(set-time! (-> self state-time))
)
:trans (behavior ()
(local-vars (gp-1 symbol))
(let ((v1-4 (handle->process (-> self missiles (-> self current-leader-missile)))))
(if v1-4
(sound-play
@@ -2025,24 +1963,7 @@
(go-virtual decoy-stage)
)
(if (or (not (handle->process (-> self hpickup)))
(begin
(let* ((gp-2 #t)
(s5-0 (handle->process (-> self hpickup)))
(v1-69 (the-as focus-status (logand (-> (the-as process-focusable (if (type? s5-0 process-focusable)
(the-as process-focusable s5-0)
)
)
focus-status
)
(focus-status dead)
)
)
)
)
(cmove-#f-zero gp-1 v1-69 gp-2)
)
gp-1
)
(focus-test? (the-as process-focusable (as-type (handle->process (-> self hpickup)) process-focusable)) dead)
)
(send-event self 'fail)
)
+1 -6
View File
@@ -610,12 +610,7 @@
)
(billiard-table-method-10 (-> this sled))
(dotimes (s5-2 (-> this barrels length))
(let* ((s3-2 (handle->process (-> this barrels data0 s5-2)))
(s4-2 (if (type? s3-2 process-focusable)
(the-as dark-barrel s3-2)
)
)
)
(let ((s4-2 (the-as dark-barrel (as-type (handle->process (-> this barrels data0 s5-2)) process-focusable))))
(quaternion-copy! (-> s4-2 root quat) (-> this root quat))
(-> this sled billiards data s5-2)
(let ((s3-3 (new 'stack-no-clear 'vector)))
+40 -95
View File
@@ -2431,15 +2431,9 @@
(new 'stack 'font-context *font-default-matrix* 32 320 0.0 (font-color default) (font-flags shadow kerning))
)
)
(let ((v1-1 gp-0))
(set! (-> v1-1 width) (the float 340))
)
(let ((v1-2 gp-0))
(set! (-> v1-2 height) (the float 80))
)
(let ((v1-3 gp-0))
(set! (-> v1-3 scale) 0.9)
)
(set-width! gp-0 340)
(set-height! gp-0 80)
(set-scale! gp-0 0.9)
(set! (-> gp-0 flags) (font-flags shadow kerning large))
(print-game-text
(lookup-text! *common-text* (text-id text-0086) #f)
@@ -2464,13 +2458,9 @@
(when (not (-> this passed-cutscene-trigger?))
(let ((f30-0 (vector-dot *cutscene-trigger-plane-normal* *cutscene-trigger-plane-pt*)))
(when (handle->process (-> this active-torpedo))
(let* ((s5-0 (handle->process (-> this active-torpedo)))
(a1-3 (if (type? s5-0 process-focusable)
s5-0
)
)
(a0-10 (new 'stack-no-clear 'vector))
)
(let ((a1-3 (as-type (handle->process (-> this active-torpedo)) process-focusable))
(a0-10 (new 'stack-no-clear 'vector))
)
(vector-copy! a0-10 (-> (the-as process-focusable a1-3) rbody position))
(if (and (< f30-0 (vector-dot *cutscene-trigger-plane-normal* a0-10))
(< (vector-vector-xz-distance a0-10 *cutscene-trigger-plane-pt*) 225280.0)
@@ -2548,23 +2538,18 @@
(if (< (vector-vector-xz-distance (target-pos 0) *port-attack-fail-sphere*) *port-attack-fail-radius*)
(send-event self 'fail)
)
(let ((gp-1 (handle->process (-> self active-torpedo))))
(cond
((focus-test?
(the-as process-focusable (if (type? gp-1 process-focusable)
(the-as process-focusable gp-1)
)
)
dead
)
(send-event self 'fail)
(cond
((focus-test?
(the-as process-focusable (as-type (handle->process (-> self active-torpedo)) process-focusable))
dead
)
((hit-cutscene-trigger? self)
(send-event (handle->process (-> self active-torpedo)) 'hide)
(send-event (handle->process (-> self rod-of-god)) 'leave)
(send-event self 'complete)
)
)
(send-event self 'fail)
)
((hit-cutscene-trigger? self)
(send-event (handle->process (-> self active-torpedo)) 'hide)
(send-event (handle->process (-> self rod-of-god)) 'leave)
(send-event self 'complete)
)
)
)
:code sleep-code
@@ -2598,7 +2583,6 @@
)
)
:trans (behavior ()
(local-vars (gp-1 symbol))
((-> (method-of-type task-manager active) trans))
(if (and (time-elapsed? (-> self state-time) (seconds 0.2))
(not (time-elapsed? (-> self state-time) (seconds 0.5)))
@@ -2635,23 +2619,9 @@
((< (-> self current-package-index) (-> self package-positions length))
(if (or (not *target*)
(not (handle->process (-> self active-torpedo)))
(begin
(let* ((gp-2 #t)
(s5-0 (handle->process (-> self active-torpedo)))
(v1-67 (the-as focus-status (logand (-> (the-as process-focusable (if (type? s5-0 process-focusable)
(the-as process-focusable s5-0)
)
)
focus-status
)
(focus-status dead)
)
)
)
)
(cmove-#f-zero gp-1 v1-67 gp-2)
)
gp-1
(focus-test?
(the-as process-focusable (as-type (handle->process (-> self active-torpedo)) process-focusable))
dead
)
)
(send-event self 'fail)
@@ -2762,27 +2732,22 @@
(set! (-> self rod-of-god) (process->handle (task-arrow-spawn gp-0 self)))
)
)
(when (and *target* (and (handle-command-list *gui-control* (gui-channel voicebox) (the-as gui-connection #f))
(not (focus-test? *target* pilot-riding))
(let ((gp-1 vector-vector-xz-distance)
(s5-1 (target-pos 0))
(s4-0 (handle->process (-> self active-torpedo)))
)
(and (< (gp-1 s5-1 (get-trans
(the-as process-focusable (if (type? s4-0 process-focusable)
(the-as process-focusable s4-0)
)
)
0
)
)
32768.0
)
(> (-> *port-attack-speech* 0 play-time) 0)
(time-elapsed? (-> *port-attack-speech* 0 play-time) (seconds 1))
)
)
)
(when (and *target*
(and (handle-command-list *gui-control* (gui-channel voicebox) (the-as gui-connection #f))
(not (focus-test? *target* pilot-riding))
(and (< (vector-vector-xz-distance
(target-pos 0)
(get-trans
(the-as process-focusable (as-type (handle->process (-> self active-torpedo)) process-focusable))
0
)
)
32768.0
)
(> (-> *port-attack-speech* 0 play-time) 0)
(time-elapsed? (-> *port-attack-speech* 0 play-time) (seconds 1))
)
)
)
(send-event (handle->process (-> self rod-of-god)) 'leave)
(go-virtual play-get-on-movie)
@@ -3069,12 +3034,7 @@
)
(let ((s5-0 (new 'stack-no-clear 'vector)))
(new 'stack-no-clear 'vector)
(let* ((s3-0 (handle->process (-> this active-torpedo)))
(s4-0 (if (type? s3-0 process-focusable)
s3-0
)
)
)
(let ((s4-0 (as-type (handle->process (-> this active-torpedo)) process-focusable)))
(when (the-as process-focusable s4-0)
(let ((s3-1 (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> (the-as process-focusable s4-0) root quat))))
(set! (-> s3-1 y) 0.0)
@@ -3097,19 +3057,9 @@
(let ((s3-4 0))
(let ((s2-0 (new 'stack-no-clear 'array 'collide-shape 384)))
(countdown (s1-0 (fill-actor-list-for-box *actor-hash* s5-0 s2-0 384))
(let* ((s0-0 (-> s2-0 s1-0))
(v1-52 (if (type? s0-0 collide-shape)
s0-0
)
)
)
(let ((v1-52 (as-type (-> s2-0 s1-0) collide-shape)))
(when v1-52
(let* ((s0-1 (-> v1-52 process))
(v1-53 (if (type? s0-1 process-focusable)
s0-1
)
)
)
(let ((v1-53 (as-type (-> v1-52 process) process-focusable)))
(when v1-53
(if (and (!= v1-53 *target*) (!= v1-53 s4-0) (logtest? (process-mask guard civilian) (-> v1-53 mask)))
(+! s3-4 1)
@@ -3120,12 +3070,7 @@
)
)
)
(let* ((s1-1 *target*)
(s2-1 (if (type? s1-1 process-focusable)
s1-1
)
)
)
(let ((s2-1 (the-as target (as-type *target* process-focusable))))
(when (and s2-1 (< (vector-vector-distance (get-trans s2-1 0) s5-0) (-> s5-0 w)))
(if (and (!= s2-1 *target*) (!= s2-1 s4-0) (logtest? (process-mask guard civilian) (-> s2-1 mask)))
(+! s3-4 1)
+21 -67
View File
@@ -913,12 +913,7 @@
(set-time! (-> self offscreen-time))
(until #f
(suspend)
(let* ((gp-1 (handle->process (-> self parent-hand)))
(v1-10 (if (type? gp-1 process-focusable)
(the-as process-focusable gp-1)
)
)
)
(let ((v1-10 (as-type (handle->process (-> self parent-hand)) process-focusable)))
(cond
((and v1-10 (not (logtest? (-> v1-10 focus-status) (focus-status disable dead inactive))))
(if (not (or (not (logtest? (-> v1-10 draw status) (draw-control-status on-screen)))
@@ -1071,13 +1066,9 @@
(set! (-> self already-shot) #f)
(set! (-> self attacker-info callback)
(lambda ((arg0 assault-crimson-guard) (arg1 city-attacker-info))
(let* ((s5-0 (handle->process (-> arg1 proc)))
(s4-0 (if (type? s5-0 process-focusable)
(the-as process-focusable s5-0)
)
)
(s5-1 (new 'stack 'sphere))
)
(let ((s4-0 (as-type (handle->process (-> arg1 proc)) process-focusable))
(s5-1 (new 'stack 'sphere))
)
(set! (-> s5-1 quad) (-> s4-0 root root-prim prim-core world-sphere quad))
(set! (-> s5-1 r) 409.6)
(the-as
@@ -1510,19 +1501,9 @@
(set! (-> gp-0 r) 409600.0)
(let ((s5-0 (new 'stack-no-clear 'array 'collide-shape 384)))
(countdown (s4-0 (fill-actor-list-for-box *actor-hash* gp-0 s5-0 384))
(let* ((s3-0 (-> s5-0 s4-0))
(v1-11 (if (type? s3-0 collide-shape)
s3-0
)
)
)
(let ((v1-11 (as-type (-> s5-0 s4-0) collide-shape)))
(when v1-11
(let* ((s3-1 (-> v1-11 process))
(a0-9 (if (type? s3-1 process-focusable)
s3-1
)
)
)
(let ((a0-9 (as-type (-> v1-11 process) process-focusable)))
(when a0-9
(if (and a0-9 (logtest? (process-mask guard) (-> a0-9 mask)) (not (logtest? (process-mask enemy) (-> a0-9 mask))))
(send-event
@@ -1541,12 +1522,7 @@
)
)
)
(let* ((s4-1 *target*)
(s5-1 (if (type? s4-1 process-focusable)
s4-1
)
)
)
(let ((s5-1 (the-as target (as-type *target* process-focusable))))
(when (and s5-1 (< (vector-vector-distance (get-trans s5-1 0) gp-0) (-> gp-0 r)))
(if (and s5-1 (logtest? (process-mask guard) (-> s5-1 mask)) (not (logtest? (process-mask enemy) (-> s5-1 mask))))
(send-event
@@ -2048,12 +2024,7 @@
(vf7 :class vf)
)
(init-vf0-vector)
(let* ((s4-0 *target*)
(gp-0 (if (type? s4-0 process-focusable)
s4-0
)
)
)
(let ((gp-0 (the-as target (as-type *target* process-focusable))))
(cond
(gp-0
(vector-copy! (-> this target-pos) (get-trans gp-0 3))
@@ -2087,7 +2058,6 @@
;; definition for method 209 of type assault-bombbot
(defmethod assault-bombbot-method-209 ((this assault-bombbot))
(local-vars (s4-1 object))
(let ((s5-0 (rand-vu-int-count-excluding
(the-as int (+ (-> this city-path node-count) -1))
(the-as int (-> this current-node))
@@ -2095,35 +2065,19 @@
)
)
(+! (-> this last-charge-player-count) 1)
(let ((s4-0 (handle->process (-> this focus handle))))
(when (or (not (and (if (type? s4-0 process-focusable)
s4-0
)
(begin
(let* ((s4-2 #t)
(s3-0 (handle->process (-> this focus handle)))
(v1-13 (the-as focus-status (logand (-> (the-as process-focusable (if (type? s3-0 process-focusable)
(the-as process-focusable s3-0)
)
)
focus-status
)
(focus-status disable dead ignore grabbed)
)
)
)
)
(cmove-#f-nonzero s4-1 v1-13 s4-2)
)
s4-1
)
)
)
(logtest? (-> this last-charge-player-count) 1)
)
(set! s5-0 s5-0)
(goto cfg-36)
)
(when (or (not (and (as-type (handle->process (-> this focus handle)) process-focusable)
(not (logtest? (-> (the-as process-focusable (as-type (handle->process (-> this focus handle)) process-focusable))
focus-status
)
(focus-status disable dead ignore grabbed)
)
)
)
)
(logtest? (-> this last-charge-player-count) 1)
)
(set! s5-0 s5-0)
(goto cfg-36)
)
(let ((s4-4 (vector-! (new 'stack-no-clear 'vector) (-> this target-pos) (-> this root trans))))
0.0
+7 -8
View File
@@ -569,14 +569,13 @@
)
)
)
(let* ((s4-1
(ppointer->process (process-spawn crate (-> this entity) s5-0 'blue s4-0 :name "crate" :to *entity-pool*))
)
(s5-1 (if (type? s4-1 process-focusable)
s4-1
)
)
)
(let ((s5-1
(as-type
(ppointer->process (process-spawn crate (-> this entity) s5-0 'blue s4-0 :name "crate" :to *entity-pool*))
process-focusable
)
)
)
(let ((a0-18 s5-1))
(if a0-18
(process-entity-set! a0-18 (-> this dummy-ent))
+35 -68
View File
@@ -325,13 +325,9 @@
(defmethod update-focus ((this flying-turret))
"Potentially update the focus, if there is something better to focus on."
(the-as process (when (handle->process (-> this focus handle))
(let* ((s5-1 (handle->process (-> this focus handle)))
(a0-9 (if (type? s5-1 process-focusable)
(the-as process-focusable s5-1)
)
)
(s5-0 (-> this focus-pos))
)
(let ((a0-9 (as-type (handle->process (-> this focus handle)) process-focusable))
(s5-0 (-> this focus-pos))
)
(vector-copy! s5-0 (get-trans a0-9 3))
s5-0
)
@@ -370,28 +366,15 @@
(if (time-elapsed? (-> this pursuit-start-time) (seconds 5))
(logclear! (-> this flags) (citizen-flag persistent in-pursuit))
)
(let* ((s5-0 (handle->process (-> this current-enemy)))
(a0-27 (if (type? s5-0 process-focusable)
s5-0
)
)
)
(let ((a0-27 (as-type (handle->process (-> this current-enemy)) process-focusable)))
(cond
((and a0-27
(not (logtest? (-> (the-as process-focusable a0-27) focus-status) (focus-status disable dead inactive)))
)
(let* ((s5-1 this)
(s4-0 (method-of-object s5-1 set-focus!))
(s3-0 (handle->process (-> this current-enemy)))
)
(s4-0
s5-1
(the-as process-focusable (if (type? s3-0 process-focusable)
s3-0
)
)
(the-as enemy-aware #f)
)
(set-focus!
this
(the-as process-focusable (as-type (handle->process (-> this current-enemy)) process-focusable))
(the-as enemy-aware #f)
)
(update-focus this)
(let ((f0-0 (vector-vector-xz-distance-squared (-> this root trans) (-> this focus-pos)))
@@ -1136,7 +1119,7 @@
(nav-enemy-method-181 self)
)
:trans (behavior ()
(local-vars (a0-34 city-attacker-info) (a0-39 city-attacker-info) (a0-48 city-attacker-info) (s4-1 object))
(local-vars (a0-34 city-attacker-info) (a0-39 city-attacker-info) (a0-48 city-attacker-info))
(when (not (handle->process (-> self focus handle)))
(flying-turret-method-226 self)
(if (not (handle->process (-> self focus handle)))
@@ -1228,50 +1211,34 @@
(begin (set! a0-48 (get-attacker-at-idx (-> self mission-squad) (-> self attacker-info enemy-index))) a0-48)
(logtest? (-> a0-48 flags) (city-attacker-info-flag cai4))
)
(let ((s4-0 (handle->process (-> self focus handle))))
(cond
((not (and (if (type? s4-0 process-focusable)
s4-0
)
(begin
(let* ((s4-2 #t)
(s3-0 (handle->process (-> self focus handle)))
(v1-106 (the-as focus-status (logand (-> (the-as process-focusable (if (type? s3-0 process-focusable)
(the-as process-focusable s3-0)
)
)
focus-status
)
(focus-status disable dead ignore grabbed)
)
)
(cond
((not (and (as-type (handle->process (-> self focus handle)) process-focusable)
(not (logtest? (-> (the-as process-focusable (as-type (handle->process (-> self focus handle)) process-focusable))
focus-status
)
)
(cmove-#f-nonzero s4-1 v1-106 s4-2)
)
s4-1
)
)
)
(set! s5-0 #f)
(focus-status disable dead ignore grabbed)
)
)
)
)
(set! s5-0 #f)
)
((>= (-> self num-shots-fired) 4)
(set! gp-0 #t)
)
((< (vector-vector-xz-distance (-> self root trans) (-> self focus-pos)) 40960.0)
(set! gp-0 #t)
)
((let ((a0-60 (new 'stack-no-clear 'sphere)))
(set! (-> a0-60 quad) (-> self root trans quad))
(set! (-> a0-60 r) (-> self root root-prim local-sphere w))
(or (not (sphere-in-view-frustum? a0-60))
(not (logtest? (-> self draw status) (draw-control-status on-screen)))
)
)
((>= (-> self num-shots-fired) 4)
(set! gp-0 #t)
)
((< (vector-vector-xz-distance (-> self root trans) (-> self focus-pos)) 40960.0)
(set! gp-0 #t)
)
((let ((a0-60 (new 'stack-no-clear 'sphere)))
(set! (-> a0-60 quad) (-> self root trans quad))
(set! (-> a0-60 r) (-> self root root-prim local-sphere w))
(or (not (sphere-in-view-frustum? a0-60))
(not (logtest? (-> self draw status) (draw-control-status on-screen)))
)
)
(+! (-> self num-shots-fired) 1)
(set! s5-0 #f)
)
)
(+! (-> self num-shots-fired) 1)
(set! s5-0 #f)
)
)
)
(cond
+12 -33
View File
@@ -2241,19 +2241,9 @@
(set! (-> gp-0 w) (* 2.0 f30-0))
(let ((s5-0 (new 'stack-no-clear 'array 'collide-shape 384)))
(countdown (s4-0 (fill-actor-list-for-box *actor-hash* gp-0 s5-0 384))
(let* ((s3-0 (-> s5-0 s4-0))
(v1-16 (if (type? s3-0 collide-shape)
s3-0
)
)
)
(let ((v1-16 (as-type (-> s5-0 s4-0) collide-shape)))
(when v1-16
(let* ((s2-0 (-> v1-16 process))
(s3-1 (if (type? s2-0 process-focusable)
s2-0
)
)
)
(let ((s3-1 (as-type (-> v1-16 process) process-focusable)))
(when s3-1
(if (and (logtest? (process-mask target crate enemy guard vehicle civilian) (-> s3-1 mask))
(not (focus-test? (the-as process-focusable s3-1) disable dead inactive))
@@ -2291,12 +2281,7 @@
)
)
)
(let* ((s4-1 *target*)
(s5-1 (if (type? s4-1 process-focusable)
s4-1
)
)
)
(let ((s5-1 (the-as target (as-type *target* process-focusable))))
(when (and s5-1 (< (vector-vector-distance (get-trans s5-1 0) gp-0) (-> gp-0 w)))
(if (and (logtest? (process-mask target crate enemy guard vehicle civilian) (-> s5-1 mask))
(not (focus-test? s5-1 disable dead inactive))
@@ -3534,22 +3519,16 @@
(set! (-> s5-0 best-other-tri collide-ptr) #f)
)
)
(when (and (-> s5-0 best-other-tri collide-ptr) (let ((s4-1 (-> s5-0 best-other-tri collide-ptr)))
(if (type? s4-1 collide-shape-prim-sphere)
s4-1
)
)
(when (and (-> s5-0 best-other-tri collide-ptr)
(as-type (-> s5-0 best-other-tri collide-ptr) collide-shape-prim-sphere)
)
(let* ((s5-1 (-> s5-0 best-other-tri collide-ptr))
(s5-2 (-> (the-as collide-shape-prim-sphere (if (type? s5-1 collide-shape-prim-sphere)
(the-as collide-shape-prim-sphere s5-1)
)
)
cshape
process
)
)
)
(let ((s5-2
(-> (the-as collide-shape-prim-sphere (as-type (-> s5-0 best-other-tri collide-ptr) collide-shape-prim-sphere))
cshape
process
)
)
)
(send-event
s5-2
'attack
+12 -48
View File
@@ -598,18 +598,10 @@
(call-parent-state-handler trans)
(let ((gp-0 (get-current-enemy self)))
(when gp-0
(let* ((s5-0 self)
(s4-0 (method-of-object s5-0 set-focus!))
(s3-0 (handle->process (-> self target-status handle)))
)
(s4-0
s5-0
(the-as process-focusable (if (type? s3-0 process-focusable)
s3-0
)
)
(the-as enemy-aware #f)
)
(set-focus!
self
(the-as process-focusable (as-type (handle->process (-> self target-status handle)) process-focusable))
(the-as enemy-aware #f)
)
(update-focus self)
(set! (-> self target-status handle) (process->handle gp-0))
@@ -1359,19 +1351,9 @@
(set! (-> gp-0 quad) (-> s5-0 prim-core world-sphere quad))
(let ((s5-1 (new 'stack-no-clear 'array 'collide-shape 384)))
(countdown (s4-0 (fill-actor-list-for-box *actor-hash* gp-0 s5-1 384))
(let* ((s3-0 (-> s5-1 s4-0))
(v1-12 (if (type? s3-0 collide-shape)
s3-0
)
)
)
(let ((v1-12 (as-type (-> s5-1 s4-0) collide-shape)))
(when v1-12
(let* ((s2-0 (-> v1-12 process))
(s3-1 (if (type? s2-0 process-focusable)
s2-0
)
)
)
(let ((s3-1 (as-type (-> v1-12 process) process-focusable)))
(when s3-1
(if (and (!= *target* s3-1)
(!= self s3-1)
@@ -1391,12 +1373,7 @@
)
)
)
(let* ((s4-1 *target*)
(s5-2 (if (type? s4-1 process-focusable)
s4-1
)
)
)
(let ((s5-2 (the-as target (as-type *target* process-focusable))))
(when (and s5-2 (< (vector-vector-distance (get-trans s5-2 0) gp-0) (-> gp-0 r)))
(if (and (!= *target* s5-2)
(!= self s5-2)
@@ -2337,28 +2314,15 @@
(vector-copy! v1-26 (-> this root trans))
(+! (-> v1-26 y) 8192.0)
)
(let* ((s5-0 (handle->process (-> this target-status handle)))
(a0-36 (if (type? s5-0 process-focusable)
s5-0
)
)
)
(let ((a0-36 (as-type (handle->process (-> this target-status handle)) process-focusable)))
(cond
((and a0-36
(not (logtest? (-> (the-as process-focusable a0-36) focus-status) (focus-status disable dead inactive)))
)
(let* ((s5-1 this)
(s4-0 (method-of-object s5-1 set-focus!))
(s3-0 (handle->process (-> this target-status handle)))
)
(s4-0
s5-1
(the-as process-focusable (if (type? s3-0 process-focusable)
s3-0
)
)
(the-as enemy-aware #f)
)
(set-focus!
this
(the-as process-focusable (as-type (handle->process (-> this target-status handle)) process-focusable))
(the-as enemy-aware #f)
)
(update-focus this)
(let ((f0-2 (vector-vector-xz-distance-squared (-> this root trans) (-> this focus-pos)))
+2 -12
View File
@@ -2652,12 +2652,7 @@
(vf3 :class vf)
)
(init-vf0-vector)
(let* ((gp-0 *target*)
(a1-1 (if (type? gp-0 process-focusable)
gp-0
)
)
)
(let ((a1-1 (the-as target (as-type *target* process-focusable))))
(cond
((and (logtest? (-> self flags) (cty-sniper-turret-flag cst0)) a1-1)
(if (logtest? (-> self flags) (cty-sniper-turret-flag cst9))
@@ -3068,12 +3063,7 @@
(go-virtual fire)
)
:post (behavior ()
(let* ((gp-0 *target*)
(a1-1 (if (type? gp-0 process-focusable)
gp-0
)
)
)
(let ((a1-1 (the-as target (as-type *target* process-focusable))))
(if a1-1
(los-control-method-9 (-> self los) a1-1 (the-as vector #f) 819.2 4096.0)
)
@@ -62,13 +62,9 @@
)
(else
(when (!= (-> arg0 type) target)
(let* ((s3-0 (-> arg1 param 0))
(s2-0 arg0)
(v1-6 (if (type? s2-0 process-focusable)
s2-0
)
)
)
(let ((s3-0 (-> arg1 param 0))
(v1-6 (as-type arg0 process-focusable))
)
(cond
((and (focus-test? this dangerous)
(logtest? (process-mask guard civilian) (-> arg0 mask))
@@ -180,19 +176,9 @@
(let ((f30-0 122880.0))
(let ((s3-0 (new 'stack-no-clear 'array 'collide-shape 64)))
(countdown (s2-0 (fill-actor-list-for-box *actor-hash* s5-0 s3-0 64))
(let* ((s1-0 (-> s3-0 s2-0))
(a0-6 (if (type? s1-0 collide-shape)
s1-0
)
)
)
(let ((a0-6 (as-type (-> s3-0 s2-0) collide-shape)))
(when a0-6
(let* ((s0-0 (-> a0-6 process))
(s1-1 (if (type? s0-0 process-focusable)
s0-0
)
)
)
(let ((s1-1 (as-type (-> a0-6 process) process-focusable)))
(when (and s1-1
(!= this s1-1)
(not (focus-test? (the-as process-focusable s1-1) inactive))
+1 -6
View File
@@ -351,12 +351,7 @@
)
)
(when v1-1
(let* ((s5-0 (handle->process (-> this incoming attacker-handle)))
(a2-5 (if (type? s5-0 process-focusable)
s5-0
)
)
)
(let ((a2-5 (as-type (handle->process (-> this incoming attacker-handle)) process-focusable)))
(if a2-5
(citizen-method-210 this 1 a2-5)
)
+14 -44
View File
@@ -532,14 +532,10 @@
(case (-> (the-as traffic-danger-info s5-1) danger-type)
((7)
(set! (-> this cp-factor) 20.0)
(let ((s4-1 (method-of-object this citizen-method-210))
(s3-1 1)
(s5-2 (handle->process (-> (the-as traffic-danger-info s5-1) handle)))
)
(s4-1 this s3-1 (if (type? s5-2 process-focusable)
s5-2
)
)
(citizen-method-210
this
1
(as-type (handle->process (-> (the-as traffic-danger-info s5-1) handle)) process-focusable)
)
)
((6)
@@ -807,18 +803,10 @@
(if (not (logtest? (-> this squad alert-state flags) (squad-alert-flag war)))
(logior! (-> this flags) (citizen-flag persistent))
)
(let ((s4-1 (-> this focus))
(s3-1 (method-of-type enemy-focus focus-on-with-awareness!))
(s5-1 (handle->process (-> arg0 handle)))
)
(s3-1
s4-1
(the-as process-focusable (if (type? s5-1 process-focusable)
s5-1
)
)
(enemy-aware hostile)
)
(focus-on-with-awareness!
(-> this focus)
(the-as process-focusable (as-type (handle->process (-> arg0 handle)) process-focusable))
(enemy-aware hostile)
)
(go (method-of-object this arrest))
)
@@ -984,12 +972,7 @@
0
)
(else
(let* ((s4-1 (-> s5-0 best-other-tri collide-ptr))
(v1-20 (if (type? s4-1 collide-shape-prim)
s4-1
)
)
)
(let ((v1-20 (as-type (-> s5-0 best-other-tri collide-ptr) collide-shape-prim)))
(cond
((and v1-20 (< (vector-dot
(-> s5-0 best-other-tri normal)
@@ -1068,18 +1051,10 @@
(vector-copy! a1-4 (-> this root trans))
(+! (-> a1-4 y) 8192.0)
(let ((s4-1 (squad-control-method-17 (-> this squad) a1-4 (-> this traffic-id) (-> this target-status))))
(let* ((s3-0 this)
(s2-0 (method-of-object s3-0 set-focus!))
(s1-0 (handle->process (-> this target-status handle)))
)
(s2-0
s3-0
(the-as process-focusable (if (type? s1-0 process-focusable)
s1-0
)
)
(the-as enemy-aware #f)
)
(set-focus!
this
(the-as process-focusable (as-type (handle->process (-> this target-status handle)) process-focusable))
(the-as enemy-aware #f)
)
(let ((v1-58 (handle->process (-> this focus handle))))
(b!
@@ -1459,12 +1434,7 @@
;; definition for method 265 of type crimson-guard
;; WARN: Return type mismatch int vs none.
(defmethod crimson-guard-method-265 ((this crimson-guard) (arg0 float))
(let* ((s3-0 (handle->process (-> this transport)))
(s4-0 (if (type? s3-0 process-focusable)
s3-0
)
)
)
(let ((s4-0 (as-type (handle->process (-> this transport)) process-focusable)))
(when s4-0
(let ((s2-0 (matrix<-transformq!
(new 'stack-no-clear 'matrix)
@@ -476,12 +476,7 @@
;; INFO: Used lq/sq
;; WARN: Return type mismatch int vs none.
(defmethod metalhead-flitter-method-224 ((this metalhead-flitter))
(let* ((s5-0 (handle->process (-> this focus handle)))
(s3-0 (if (type? s5-0 process-focusable)
(the-as process-focusable s5-0)
)
)
)
(let ((s3-0 (as-type (handle->process (-> this focus handle)) process-focusable)))
(when s3-0
(let* ((s5-1 (get-trans s3-0 0))
(s4-1 (vector-! (new 'stack-no-clear 'vector) s5-1 (-> this root trans)))
@@ -560,12 +555,8 @@
(local-vars (v1-29 symbol))
(stop-look-at! self)
(set! (-> self skel root-channel 0 frame-group) (the-as art-joint-anim arg0))
(let ((s4-1 (get-knockback-dir! self (new 'stack-no-clear 'vector)))
(s3-0 (-> self root))
)
(when (if (type? s3-0 collide-shape-moving)
s3-0
)
(let ((s4-1 (get-knockback-dir! self (new 'stack-no-clear 'vector))))
(when (as-type (-> self root) collide-shape-moving)
(set! (-> self root transv y) 33775.48)
(ja :num-func num-func-identity :frame-num 0.0)
(set-time! (-> self state-time))
@@ -745,12 +736,7 @@
)
:trans (behavior ()
(local-vars (s5-2 object))
(let* ((s5-0 (handle->process (-> self focus handle)))
(gp-0 (if (type? s5-0 process-focusable)
(the-as process-focusable s5-0)
)
)
)
(let ((gp-0 (as-type (handle->process (-> self focus handle)) process-focusable)))
(set! s5-2 (cond
((and gp-0
(not (time-elapsed? (-> self state-time) (seconds 1.5)))
@@ -899,18 +885,12 @@
(cond
((= v1-11 (enemy-aware hostile))
(cond
((when gp-0
(let* ((gp-1 self)
(s5-1 (method-of-object gp-1 metalhead-flitter-method-226))
(s4-0 (handle->process (-> self focus handle)))
)
(s5-1 gp-1 (the-as process-focusable (if (type? s4-0 process-focusable)
s4-0
)
)
)
((if gp-0
(metalhead-flitter-method-226
self
(the-as process-focusable (as-type (handle->process (-> self focus handle)) process-focusable))
)
)
)
(if (and (get-focus! self) (time-elapsed? (-> self off-screen-timer) (seconds 0.3)))
(go-hostile self)
)
@@ -809,12 +809,7 @@
)
)
)
(let* ((gp-1 *target*)
(a0-4 (if (type? gp-1 process-focusable)
gp-1
)
)
)
(let ((a0-4 (the-as target (as-type *target* process-focusable))))
(when a0-4
(let* ((gp-2 (-> self root))
(s3-0 (vector-normalize! (vector-! (new 'stack-no-clear 'vector) (get-trans a0-4 0) (-> gp-2 trans)) 1.0))
@@ -702,20 +702,16 @@
#t
)
(else
(let ((s4-1 (-> s5-0 best-other-tri collide-ptr)))
(if (and (if (type? s4-1 collide-shape-prim)
s4-1
)
(< (vector-dot
(-> s5-0 best-other-tri normal)
(vector-! (new 'stack-no-clear 'vector) arg2 (the-as vector (-> s5-0 best-other-tri)))
)
0.0
(if (and (as-type (-> s5-0 best-other-tri collide-ptr) collide-shape-prim)
(< (vector-dot
(-> s5-0 best-other-tri normal)
(vector-! (new 'stack-no-clear 'vector) arg2 (the-as vector (-> s5-0 best-other-tri)))
)
)
#f
)
)
0.0
)
)
#f
)
)
)
)
+3 -18
View File
@@ -1122,12 +1122,7 @@
)
)
(dotimes (s5-1 gp-1)
(let* ((s4-1 (-> s3-1 s5-1))
(a0-52 (if (type? s4-1 citizen)
s4-1
)
)
)
(let ((a0-52 (as-type (-> s3-1 s5-1) citizen)))
(if a0-52
(send-event (the-as process-tree a0-52) 'clear-path s2-1)
)
@@ -1159,12 +1154,7 @@
(set! (-> a1-0 w) (-> s4-0 notify-radius))
(let ((s2-0 (fill-actor-list-for-box (-> this object-hash) a1-0 s3-0 40)))
(dotimes (s1-0 s2-0)
(let* ((s0-0 (-> s3-0 s1-0))
(a0-6 (if (type? s0-0 citizen)
s0-0
)
)
)
(let ((a0-6 (as-type (-> s3-0 s1-0) citizen)))
(when a0-6
(if (= (-> s4-0 danger-type) 8)
(send-event (the-as process-tree a0-6) 'clear-path s4-0)
@@ -1243,12 +1233,7 @@
(defmethod kill-traffic-sphere ((this traffic-engine) (arg0 vector))
(let ((gp-0 (new 'stack-no-clear 'array 'collide-shape 64)))
(countdown (s5-0 (fill-actor-list-for-box *actor-hash* arg0 gp-0 64))
(let* ((s4-0 (-> gp-0 s5-0))
(v1-3 (if (type? s4-0 collide-shape)
s4-0
)
)
)
(let ((v1-3 (as-type (-> gp-0 s5-0) collide-shape)))
(if v1-3
(send-event (-> v1-3 process) 'traffic-off-force)
)
@@ -54,12 +54,7 @@
;; definition for method 34 of type vehicle-rider
;; WARN: Return type mismatch int vs none.
(defmethod setup ((this vehicle-rider))
(let* ((s4-0 (ppointer->process (-> this parent)))
(s5-0 (if (type? s4-0 vehicle)
s4-0
)
)
)
(let ((s5-0 (as-type (ppointer->process (-> this parent)) vehicle)))
(logclear! (-> this flags) (vehicle-rider-flag vr2))
(if (and s5-0 (nonzero? (vehicle-method-70 s5-0)))
(logior! (-> this flags) (vehicle-rider-flag vr2))
@@ -407,12 +407,8 @@
(new 'stack 'font-context *font-default-matrix* 22 320 0.0 (font-color default) (font-flags shadow kerning))
)
)
(let ((v1-1 gp-0))
(set! (-> v1-1 width) (the float 350))
)
(let ((v1-2 gp-0))
(set! (-> v1-2 height) (the float 80))
)
(set-width! gp-0 350)
(set-height! gp-0 80)
(let ((v1-3 gp-0)
(a0-5 (-> *setting-control* user-default language))
)
@@ -1405,12 +1401,7 @@
;; WARN: Return type mismatch int vs none.
(defmethod vehicle-method-116 ((this vehicle) (arg0 symbol))
(dotimes (s4-0 (-> this info rider seat-count))
(let* ((s3-0 (handle->process (-> this rider-array s4-0)))
(a0-5 (if (type? s3-0 process-focusable)
s3-0
)
)
)
(let ((a0-5 (as-type (handle->process (-> this rider-array s4-0)) process-focusable)))
(send-event
a0-5
'attack-invinc
+8 -20
View File
@@ -1076,20 +1076,12 @@
((logtest? (attack-mask attacker-velocity) (-> arg1 mask))
(vector-copy! (-> s5-0 0 velocity) (-> arg1 attacker-velocity))
)
((as-type arg0 process-focusable)
(set! (-> s5-0 1 point quad) (-> (get-trans (the-as process-focusable arg0) 3) quad))
(vector-! (-> s5-0 0 velocity) (-> s5-0 0 point) (-> s5-0 1 point))
)
(else
(let ((s0-0 arg0))
(cond
((if (type? s0-0 process-focusable)
s0-0
)
(set! (-> s5-0 1 point quad) (-> (get-trans (the-as process-focusable arg0) 3) quad))
(vector-! (-> s5-0 0 velocity) (-> s5-0 0 point) (-> s5-0 1 point))
)
(else
(vector-! (-> s5-0 0 velocity) (-> s5-0 0 point) (-> arg0 root trans))
)
)
)
(vector-! (-> s5-0 0 velocity) (-> s5-0 0 point) (-> arg0 root trans))
)
)
(let ((f28-0 0.0))
@@ -1255,13 +1247,9 @@
)
)
(('pilot-on)
(let* ((s3-2 (-> arg3 param 0))
(s2-2 arg0)
(s5-1 (if (type? s2-2 process-focusable)
s2-2
)
)
)
(let ((s3-2 (-> arg3 param 0))
(s5-1 (as-type arg0 process-focusable))
)
(when s5-1
(format #t "vehicle::event-handler: pilot-on (pid ~d) from pid ~d~%" (-> this pid) (-> arg0 pid))
(logior! (-> this v-flags) (vehicle-flag riding))
+11 -38
View File
@@ -2373,13 +2373,9 @@
(defstate active (power-game-chaser)
:virtual #t
:trans (behavior ()
(let* ((s5-0 (handle->process (-> self target)))
(gp-0 (if (type? s5-0 power-game-object)
(the-as power-game-object s5-0)
)
)
(s5-1 (ppointer->process (-> self parent)))
)
(let ((gp-0 (as-type (handle->process (-> self target)) power-game-object))
(s5-1 (ppointer->process (-> self parent)))
)
(when (and gp-0 (not (logtest? (-> gp-0 focus-status) (focus-status dead))))
(let ((s3-0 (power-game-method-32 s5-1 (-> gp-0 local x) (-> gp-0 local z)))
(s2-0 (power-game-method-32 s5-1 (-> self local x) (-> self local z)))
@@ -2560,12 +2556,7 @@
(if (time-elapsed? (-> self state-time) (seconds 4))
(go-virtual active)
)
(let* ((gp-0 (handle->process (-> self target)))
(v1-10 (if (type? gp-0 power-game-object)
(the-as power-game-object gp-0)
)
)
)
(let ((v1-10 (as-type (handle->process (-> self target)) power-game-object)))
(when (and v1-10 (not (logtest? (-> v1-10 focus-status) (focus-status dead))))
(if (< (vector-vector-xz-distance (-> self local) (-> v1-10 local)) 1.0)
(go-virtual die)
@@ -2674,12 +2665,7 @@
)
)
)
(let* ((s5-2 (handle->process (-> self target)))
(v1-53 (if (type? s5-2 power-game-object)
(the-as power-game-object s5-2)
)
)
)
(let ((v1-53 (as-type (handle->process (-> self target)) power-game-object)))
(when (and v1-53 (not (logtest? (-> v1-53 focus-status) (focus-status dead))))
(if (< (vector-vector-xz-distance (-> self local) (-> v1-53 local)) 1.0)
(go-virtual die)
@@ -2883,13 +2869,9 @@
)
)
:trans (behavior ()
(let* ((s5-0 (handle->process (-> self target)))
(gp-0 (if (type? s5-0 power-game-object)
(the-as power-game-zapper s5-0)
)
)
(s4-0 (ppointer->process (-> self parent)))
)
(let ((gp-0 (the-as power-game-zapper (as-type (handle->process (-> self target)) power-game-object)))
(s4-0 (ppointer->process (-> self parent)))
)
(when (and gp-0 (not (logtest? (-> gp-0 focus-status) (focus-status dead))))
(let ((s5-1 (power-game-method-32 s4-0 (-> self local x) (-> self local z))))
(let ((s3-0 (power-game-method-35 s4-0 (-> self local x) (-> self local z) (-> self dir))))
@@ -3186,12 +3168,7 @@
(set-time! (-> self state-time))
)
:trans (behavior ()
(let* ((gp-0 (handle->process (-> self target)))
(v1-3 (if (type? gp-0 power-game-object)
(the-as power-game-object gp-0)
)
)
)
(let ((v1-3 (as-type (handle->process (-> self target)) power-game-object)))
(when (and v1-3 (not (logtest? (-> v1-3 focus-status) (focus-status dead))))
(if (< (vector-vector-xz-distance (-> self local) (-> v1-3 local)) 1.0)
(go-virtual die)
@@ -3323,12 +3300,8 @@
(new 'stack 'font-context *font-default-matrix* 32 320 0.0 (font-color default) (font-flags shadow kerning))
)
)
(let ((v1-22 gp-0))
(set! (-> v1-22 width) (the float 340))
)
(let ((v1-23 gp-0))
(set! (-> v1-23 height) (the float 80))
)
(set-width! gp-0 340)
(set-height! gp-0 80)
(let ((v1-24 gp-0)
(a0-15 (-> *setting-control* user-default language))
)
+3 -18
View File
@@ -130,12 +130,7 @@
(let ((v1-5 (the-as attack-info (-> block param 1))))
(when (!= (-> v1-5 id) (-> self incoming-attack-id))
(set! (-> self incoming-attack-id) (-> v1-5 id))
(let* ((gp-0 proc)
(s4-0 (if (type? gp-0 process-drawable)
gp-0
)
)
)
(let ((s4-0 (as-type proc process-drawable)))
(when s4-0
(let ((gp-1 (process-spawn
manipy
@@ -231,19 +226,9 @@
(set! (-> self flash) 0.375)
)
(+! (-> self touch-count) 1)
(let* ((gp-3 proc)
(v1-75 (if (type? gp-3 process-focusable)
gp-3
)
)
)
(let ((v1-75 (as-type proc process-focusable)))
(when v1-75
(let* ((s5-1 (-> (the-as process-drawable v1-75) root))
(gp-4 (if (type? s5-1 collide-shape)
s5-1
)
)
)
(let ((gp-4 (as-type (-> (the-as process-drawable v1-75) root) collide-shape)))
(when gp-4
(if (logtest? (-> (the-as collide-shape gp-4) root-prim prim-core collide-as) (collide-spec jak))
(on-jak-touch self)
+9 -21
View File
@@ -1153,18 +1153,12 @@
:event (behavior ((proc process) (argc int) (message symbol) (block event-message-block))
(format #t "comb-turbo: got event ~s from ~s~%" message proc)
(when (= message 'touched)
(let ((s5-1 proc))
(when (and (if (type? s5-1 vehicle)
s5-1
)
(not (-> self player-got))
)
(set! (-> self player-got) #t)
(send-event proc 'turbo-pad (-> self boost))
(let ((v0-1 (current-time)))
(set! (-> self touch-time) v0-1)
v0-1
)
(when (and (as-type proc vehicle) (not (-> self player-got)))
(set! (-> self player-got) #t)
(send-event proc 'turbo-pad (-> self boost))
(let ((v0-1 (current-time)))
(set! (-> self touch-time) v0-1)
v0-1
)
)
)
@@ -1280,15 +1274,9 @@
)
)
(set! (-> s5-1 flags) (font-flags shadow kerning middle middle-vert large))
(let ((v1-4 s5-1))
(set! (-> v1-4 width) (the float 440))
)
(let ((v1-5 s5-1))
(set! (-> v1-5 height) (the float 80))
)
(let ((v1-6 s5-1))
(set! (-> v1-6 scale) 0.8)
)
(set-width! s5-1 440)
(set-height! s5-1 80)
(set-scale! s5-1 0.8)
(let ((s4-0 print-game-text))
(format (clear *temp-string*) (lookup-text! *common-text* arg0 #f))
(s4-0 *temp-string* s5-1 #f 44 (bucket-id hud-draw-hud-alpha))
+5 -30
View File
@@ -54,12 +54,7 @@
(let ((t9-0 (method-of-type task-manager task-manager-method-26)))
(t9-0 this)
)
(let* ((s4-0 (handle->process (-> this player-vehicle)))
(s5-0 (if (type? s4-0 process-focusable)
(the-as process-focusable s4-0)
)
)
)
(let ((s5-0 (as-type (handle->process (-> this player-vehicle)) process-focusable)))
(when s5-0
(if (focus-test? s5-0 dead)
(send-event this 'fail)
@@ -168,12 +163,7 @@
(send-event (handle->process (-> self player-vehicle)) 'ai-set-target-speed 0)
(send-event (handle->process (-> self player-vehicle)) 'ai-set-target-position (-> self intro-target))
(until #f
(let* ((s5-0 (handle->process (-> self player-vehicle)))
(gp-0 (if (type? s5-0 process-focusable)
(the-as process-focusable s5-0)
)
)
)
(let ((gp-0 (as-type (handle->process (-> self player-vehicle)) process-focusable)))
(when gp-0
(send-event gp-0 'set-control-hook-ai)
(if (< (vector-vector-distance (-> gp-0 root trans) (-> self intro-sphere)) (-> self intro-sphere r))
@@ -201,12 +191,7 @@
(send-event (handle->process (-> self player-vehicle)) 'ignore-damage #f)
(when (-> self outro-sequence)
(until #f
(let* ((gp-1 (handle->process (-> self player-vehicle)))
(v1-134 (if (type? gp-1 process-focusable)
gp-1
)
)
)
(let ((v1-134 (as-type (handle->process (-> self player-vehicle)) process-focusable)))
(when v1-134
(if (< (vector-vector-distance (-> (the-as process-focusable v1-134) root trans) (-> self outro-sphere))
(-> self outro-sphere r)
@@ -222,12 +207,7 @@
(send-event (handle->process (-> self player-vehicle)) 'ai-set-target-position (-> self outro-target))
(send-event (handle->process (-> self player-vehicle)) 'set-control-hook-ai)
(until #f
(let* ((gp-2 (handle->process (-> self player-vehicle)))
(v1-156 (if (type? gp-2 process-focusable)
gp-2
)
)
)
(let ((v1-156 (as-type (handle->process (-> self player-vehicle)) process-focusable)))
(when v1-156
(if (< 0.0 (vector4-dot (-> (the-as process-focusable v1-156) root trans) (-> self outro-plane2)))
(goto cfg-166)
@@ -242,12 +222,7 @@
(send-event (handle->process (-> self player-vehicle)) 'ai-set-target-position (-> self outro-target2))
)
(until #f
(let* ((s5-1 (handle->process (-> self player-vehicle)))
(gp-3 (if (type? s5-1 process-focusable)
(the-as process-focusable s5-1)
)
)
)
(let ((gp-3 (as-type (handle->process (-> self player-vehicle)) process-focusable)))
(when gp-3
(if (and (< (vector-vector-distance (-> gp-3 root trans) (-> self end-sphere)) (-> self end-sphere r))
(< 0.0 (vector4-dot (-> gp-3 root trans) (-> self end-plane)))
+4 -13
View File
@@ -57,12 +57,7 @@
:event (behavior ((proc process) (argc int) (message symbol) (block event-message-block))
(case message
(('touch 'attack)
(let* ((s4-0 proc)
(s2-0 (if (type? s4-0 process-focusable)
s4-0
)
)
)
(let ((s2-0 (as-type proc process-focusable)))
(when s2-0
(let ((s4-1 (ladder-method-25 self (new 'stack-no-clear 'matrix) 0.0))
(s3-0 (ladder-method-25 self (new 'stack-no-clear 'matrix) 1.0))
@@ -140,13 +135,9 @@
)
:code (behavior ((arg0 handle))
(set-time! (-> self rider-time))
(while (let ((s5-0 (handle->process arg0)))
(and (if (type? s5-0 process-focusable)
s5-0
)
(not (time-elapsed? (-> self rider-time) (seconds 0.1)))
)
)
(while (and (as-type (handle->process arg0) process-focusable)
(not (time-elapsed? (-> self rider-time) (seconds 0.1)))
)
(nop self)
(suspend)
)
+5 -20
View File
@@ -326,12 +326,7 @@
;; definition for method 106 of type ashelin
(defmethod find-best-focus ((this ashelin))
"Search for the best thing to focus on."
(let* ((s5-0 (handle->process (-> this attacker-handle)))
(v1-3 (if (type? s5-0 process-focusable)
s5-0
)
)
)
(let ((v1-3 (as-type (handle->process (-> this attacker-handle)) process-focusable)))
(when v1-3
(cond
((= (-> v1-3 type) target)
@@ -341,13 +336,13 @@
(if (logtest? (-> this bot-flags) (bot-flag attacked))
(bot-method-199 this)
)
(set! v1-3 (the-as process #f))
(set! v1-3 (the-as process-focusable #f))
(set! (-> this attacker-handle) (the-as handle #f))
)
)
(else
(when (time-elapsed? (-> this attacker-time) (seconds 2.5))
(set! v1-3 (the-as process #f))
(set! v1-3 (the-as process-focusable #f))
(set! (-> this attacker-handle) (the-as handle #f))
)
)
@@ -366,12 +361,7 @@
(empty)
)
(else
(let ((s4-0 (handle->process (-> this poi-handle))))
(set! s5-1 (if (type? s4-0 process-focusable)
s4-0
)
)
)
(set! s5-1 (as-type (handle->process (-> this poi-handle)) process-focusable))
(if s5-1
(empty)
(set! s5-1 *target*)
@@ -385,12 +375,7 @@
(set! s5-1 v1-3)
)
(else
(let ((s4-1 (handle->process (-> this poi-handle))))
(set! s5-1 (if (type? s4-1 process-focusable)
s4-1
)
)
)
(set! s5-1 (as-type (handle->process (-> this poi-handle)) process-focusable))
(cond
(s5-1
(empty)
+19 -73
View File
@@ -120,12 +120,7 @@
;; WARN: Return type mismatch symbol vs none.
(defmethod bot-method-199 ((this bot))
(logclear! (-> this bot-flags) (bot-flag attacked))
(let* ((s5-0 (handle->process (-> this attacker-handle)))
(v1-5 (if (type? s5-0 process-focusable)
s5-0
)
)
)
(let ((v1-5 (as-type (handle->process (-> this attacker-handle)) process-focusable)))
(if (and v1-5 (= (-> v1-5 type) target))
(set! (-> this attacker-handle) (the-as handle #f))
)
@@ -274,12 +269,7 @@
(dotimes (s3-0 *actor-list-length*)
(let ((v1-26 (-> *actor-list* s3-0)))
(when (logtest? (the-as int cspec) (-> v1-26 root-prim prim-core collide-as))
(let* ((s2-0 (-> v1-26 process))
(a1-26 (if (type? s2-0 process-focusable)
s2-0
)
)
)
(let ((a1-26 (as-type (-> v1-26 process) process-focusable)))
(when a1-26
(set-next-focus! this (the-as enemy a1-26) (the-as enemy-best-focus (&-> s5-0 next)))
(if (-> s5-0 next)
@@ -314,12 +304,7 @@
(t9-0 this arg0 arg1 arg2 arg3 arg4)
)
(logclear! (-> this bot-flags) (bot-flag bf03 bf04))
(let* ((s3-0 (handle->process (-> this incoming attacker-handle)))
(s5-0 (if (type? s3-0 process-focusable)
s3-0
)
)
)
(let ((s5-0 (as-type (handle->process (-> this incoming attacker-handle)) process-focusable)))
(when s5-0
(cond
((= (-> s5-0 type) target)
@@ -400,23 +385,12 @@
;; definition for method 192 of type bot
(defmethod clear-poi ((this bot))
(let* ((s4-0 (handle->process (-> this poi-handle)))
(s5-0 (if (type? s4-0 process-focusable)
s4-0
)
)
)
(let ((s5-0 (as-type (handle->process (-> this poi-handle)) process-focusable)))
(when s5-0
(set! (-> this poi-handle) (the-as handle #f))
(let ((s4-1 (handle->process (-> this focus handle))))
(if (= (if (type? s4-1 process-focusable)
s4-1
)
s5-0
)
(clear-focused (-> this focus))
)
)
(if (= (as-type (handle->process (-> this focus handle)) process-focusable) s5-0)
(clear-focused (-> this focus))
)
)
)
(none)
@@ -483,12 +457,7 @@
;; definition for method 106 of type bot
(defmethod find-best-focus ((this bot))
"Search for the best thing to focus on."
(let* ((s5-0 (handle->process (-> this attacker-handle)))
(v1-3 (if (type? s5-0 process-focusable)
s5-0
)
)
)
(let ((v1-3 (as-type (handle->process (-> this attacker-handle)) process-focusable)))
(when v1-3
(cond
((= (-> v1-3 type) target)
@@ -498,13 +467,13 @@
(if (logtest? (-> this bot-flags) (bot-flag attacked))
(bot-method-199 this)
)
(set! v1-3 (the-as process #f))
(set! v1-3 (the-as process-focusable #f))
(set! (-> this attacker-handle) (the-as handle #f))
)
)
(else
(when (time-elapsed? (-> this attacker-time) (seconds 6))
(set! v1-3 (the-as process #f))
(set! v1-3 (the-as process-focusable #f))
(set! (-> this attacker-handle) (the-as handle #f))
)
)
@@ -523,12 +492,7 @@
(empty)
)
(else
(let ((s4-0 (handle->process (-> this poi-handle))))
(set! s5-1 (if (type? s4-0 process-focusable)
s4-0
)
)
)
(set! s5-1 (as-type (handle->process (-> this poi-handle)) process-focusable))
(if s5-1
(empty)
(set! s5-1 *target*)
@@ -542,12 +506,7 @@
(set! s5-1 v1-3)
)
(else
(let ((s4-1 (handle->process (-> this poi-handle))))
(set! s5-1 (if (type? s4-1 process-focusable)
s4-1
)
)
)
(set! s5-1 (as-type (handle->process (-> this poi-handle)) process-focusable))
(cond
(s5-1
(empty)
@@ -689,12 +648,7 @@
(dotimes (s3-1 *actor-list-length*)
(let ((v1-27 (-> *actor-list* s3-1)))
(when (logtest? (the-as collide-spec s4-0) (-> v1-27 root-prim prim-core collide-as))
(let* ((s2-0 (-> v1-27 process))
(a1-26 (if (type? s2-0 process-focusable)
s2-0
)
)
)
(let ((a1-26 (as-type (-> v1-27 process) process-focusable)))
(if (and a1-26
a1-26
(not (logtest? (-> (the-as process-focusable a1-26) focus-status) (focus-status disable dead)))
@@ -853,13 +807,9 @@
(('notify)
(case (-> arg3 param 0)
(('attack)
(let ((s5-2 (-> arg3 param 1)))
(when (if (type? s5-2 process-focusable)
s5-2
)
(logior! (-> this enemy-flags) (enemy-flag victory))
(set-time! (-> this hit-focus-time))
)
(when (as-type (-> arg3 param 1) process-focusable)
(logior! (-> this enemy-flags) (enemy-flag victory))
(set-time! (-> this hit-focus-time))
)
#t
)
@@ -995,13 +945,9 @@
)
(else
(when (!= (-> arg0 type) target)
(let* ((s3-0 (-> arg1 param 0))
(s2-0 arg0)
(v1-6 (if (type? s2-0 process-focusable)
s2-0
)
)
)
(let ((s3-0 (-> arg1 param 0))
(v1-6 (as-type arg0 process-focusable))
)
(cond
((and (focus-test? this dangerous)
(logtest? (process-mask enemy) (-> arg0 mask))
+1 -5
View File
@@ -1063,11 +1063,7 @@
;; definition for method 30 of type battle
(defmethod get-spawner-for-enemy ((this battle) (arg0 process))
(let ((v1-0 (if (type? arg0 nav-enemy)
(the-as nav-enemy arg0)
)
)
)
(let ((v1-0 (as-type arg0 nav-enemy)))
(when v1-0
(dotimes (a0-3 (-> this spawners length))
(let* ((a1-5 (-> this spawners data a0-3))
@@ -68,12 +68,7 @@
:event (behavior ((proc process) (argc int) (message symbol) (block event-message-block))
(case message
(('touched)
(let* ((s4-0 proc)
(v1-1 (if (type? s4-0 process-drawable)
s4-0
)
)
)
(let ((v1-1 (as-type proc process-drawable)))
(when v1-1
(let ((s4-1 (-> (the-as process-drawable v1-1) root))
(a1-3 (new 'stack 'collide-query))
@@ -54,12 +54,7 @@
(if (= (-> this shield-type) (shield-type shield-type-0))
(seek! (-> this heat-info current-heat-value) 0.0 (* 0.2 (seconds-per-frame)))
)
(let* ((s4-0 (handle->process (-> this owner)))
(s5-0 (if (type? s4-0 process-focusable)
s4-0
)
)
)
(let ((s5-0 (as-type (handle->process (-> this owner)) process-focusable)))
(cond
(s5-0
(quaternion-copy! (-> this root quat) (-> (the-as process-focusable s5-0) root quat))
+9 -29
View File
@@ -867,12 +867,7 @@
;; INFO: Used lq/sq
;; WARN: Return type mismatch int vs none.
(defmethod flitter-method-192 ((this flitter))
(let* ((s5-0 (handle->process (-> this focus handle)))
(s3-0 (if (type? s5-0 process-focusable)
s5-0
)
)
)
(let ((s3-0 (as-type (handle->process (-> this focus handle)) process-focusable)))
(when s3-0
(let* ((s5-1 (get-trans (the-as process-focusable s3-0) 0))
(s4-1 (vector-! (new 'stack-no-clear 'vector) s5-1 (-> this root trans)))
@@ -951,12 +946,8 @@
(local-vars (v1-29 symbol))
(stop-look-at! self)
(set! (-> self skel root-channel 0 frame-group) arg0)
(let ((s4-1 (get-knockback-dir! self (new 'stack-no-clear 'vector)))
(s3-0 (-> self root))
)
(when (if (type? s3-0 collide-shape-moving)
s3-0
)
(let ((s4-1 (get-knockback-dir! self (new 'stack-no-clear 'vector))))
(when (as-type (-> self root) collide-shape-moving)
(set! (-> self root transv y) 33775.48)
(ja :num-func num-func-identity :frame-num 0.0)
(set-time! (-> self state-time))
@@ -1063,18 +1054,12 @@
(cond
((= v1-11 (enemy-aware hostile))
(cond
((when gp-0
(let* ((gp-1 self)
(s5-1 (method-of-object gp-1 flitter-method-194))
(s4-0 (handle->process (-> self focus handle)))
)
(s5-1 gp-1 (the-as process-focusable (if (type? s4-0 process-focusable)
s4-0
)
)
)
((if gp-0
(flitter-method-194
self
(the-as process-focusable (as-type (handle->process (-> self focus handle)) process-focusable))
)
)
)
(if (and (get-focus! self) (time-elapsed? (-> self off-screen-timer) (seconds 0.3)))
(go-hostile self)
)
@@ -1209,12 +1194,7 @@
)
:trans (behavior ()
(local-vars (s5-2 object))
(let* ((s5-0 (handle->process (-> self focus handle)))
(gp-0 (if (type? s5-0 process-focusable)
s5-0
)
)
)
(let ((gp-0 (as-type (handle->process (-> self focus handle)) process-focusable)))
(set! s5-2
(cond
((and gp-0
+1 -6
View File
@@ -995,12 +995,7 @@
)
)
)
(let* ((gp-1 *target*)
(a0-4 (if (type? gp-1 process-focusable)
gp-1
)
)
)
(let ((a0-4 (the-as target (as-type *target* process-focusable))))
(when a0-4
(let* ((gp-2 (-> self root))
(s3-0 (vector-normalize! (vector-! (new 'stack-no-clear 'vector) (get-trans a0-4 0) (-> gp-2 trans)) 1.0))
+14 -26
View File
@@ -168,23 +168,15 @@
(a0-2
(hover-formation-method-15 a0-2 gp-0 (-> self offset))
)
(else
(let ((s5-0 (handle->process (-> self focus handle))))
(cond
((if (type? s5-0 process-focusable)
s5-0
)
(let* ((s5-1 (-> self focus-pos))
(a0-8 (vector-! (new 'stack-no-clear 'vector) (-> self root trans) s5-1))
)
(vector+! gp-0 s5-1 (vector-rotate-y! (new 'stack-no-clear 'vector) (-> self offset) (vector-y-angle a0-8)))
)
)
(else
(vector-copy! gp-0 (-> self root trans))
((as-type (handle->process (-> self focus handle)) process-focusable)
(let* ((s5-1 (-> self focus-pos))
(a0-8 (vector-! (new 'stack-no-clear 'vector) (-> self root trans) s5-1))
)
)
)
(vector+! gp-0 s5-1 (vector-rotate-y! (new 'stack-no-clear 'vector) (-> self offset) (vector-y-angle a0-8)))
)
)
(else
(vector-copy! gp-0 (-> self root trans))
)
)
(hover-nav-control-method-12 (-> self hover) gp-0)
@@ -505,16 +497,12 @@
(go process-drawable-art-error "no path")
)
(set-time! (-> self scale-timer))
(let* ((gp-0 *target*)
(s1-0 (if (type? gp-0 process-focusable)
gp-0
)
)
(gp-1 (new 'stack-no-clear 'vector))
(s2-0 (new 'stack-no-clear 'vector))
(s4-0 (-> self root))
(s5-0 (get-point-at-percent-along-path! (-> self path) (new 'stack-no-clear 'vector) 0.0 'interp))
)
(let ((s1-0 (the-as target (as-type *target* process-focusable)))
(gp-1 (new 'stack-no-clear 'vector))
(s2-0 (new 'stack-no-clear 'vector))
(s4-0 (-> self root))
(s5-0 (get-point-at-percent-along-path! (-> self path) (new 'stack-no-clear 'vector) 0.0 'interp))
)
(let ((s0-0 (get-point-at-percent-along-path! (-> self path) (new 'stack-no-clear 'vector) 1.0 'interp))
(s3-1
(-> (the-as collide-shape-prim-group (-> self root root-prim))
@@ -16,18 +16,10 @@
;; definition for method 16 of type hover-formation-control
(defmethod hover-formation-control-method-16 ((this hover-formation-control))
(let ((gp-0 (hover-formation-control-method-13 this (new 'stack-no-clear 'vector)))
(s4-0 (cond
((-> this anchor-proc)
(let ((s3-0 (handle->process (-> this anchor-proc))))
(if (type? s3-0 process-focusable)
s3-0
)
)
)
(else
(s4-0 (if (-> this anchor-proc)
(as-type (handle->process (-> this anchor-proc)) process-focusable)
*target*
)
)
)
)
(and s4-0
@@ -63,18 +55,10 @@
)
)
)
(s1-0 (cond
((-> this anchor-proc)
(let ((s3-0 (handle->process (-> this anchor-proc))))
(if (type? s3-0 process-focusable)
s3-0
)
)
)
(else
(s1-0 (if (-> this anchor-proc)
(as-type (handle->process (-> this anchor-proc)) process-focusable)
*target*
)
)
)
)
(cond
@@ -139,18 +123,10 @@
)
)
)
(a0-7 (cond
((-> this anchor-proc)
(let ((s4-0 (handle->process (-> this anchor-proc))))
(if (type? s4-0 process-focusable)
s4-0
)
)
)
(else
(a0-7 (if (-> this anchor-proc)
(as-type (handle->process (-> this anchor-proc)) process-focusable)
*target*
)
)
)
)
(cond
@@ -437,12 +413,7 @@
(set! (-> s5-0 best-cost) -1.0)
(set! (-> s5-0 count) 0)
(dotimes (s4-0 16)
(let* ((s3-0 (handle->process (-> this actor-table s4-0)))
(a0-8 (if (type? s3-0 process-focusable)
s3-0
)
)
)
(let ((a0-8 (as-type (handle->process (-> this actor-table s4-0)) process-focusable)))
(cond
(a0-8
(vector-copy! (-> s5-0 actor-position s4-0) (get-trans (the-as process-focusable a0-8) 3))
@@ -833,7 +804,6 @@
)
;; definition for method 3 of type flying-formation
;; INFO: this function exists in multiple non-identical object files
(defmethod inspect ((this flying-formation))
(when (not this)
(set! this this)
@@ -929,12 +929,7 @@
)
)
(let ((gp-0 (-> self dest-pos)))
(let* ((s5-0 (handle->process (-> self focus handle)))
(a0-6 (if (type? s5-0 process-focusable)
s5-0
)
)
)
(let ((a0-6 (as-type (handle->process (-> self focus handle)) process-focusable)))
(vector-copy! gp-0 (get-trans (the-as process-focusable a0-6) 0))
)
(+! (-> gp-0 y) -20480.0)
+1 -6
View File
@@ -875,12 +875,7 @@
)
)
)
(let* ((gp-1 *target*)
(a0-4 (if (type? gp-1 process-focusable)
gp-1
)
)
)
(let ((a0-4 (the-as target (as-type *target* process-focusable))))
(when a0-4
(let* ((gp-2 (-> self root))
(s3-0 (vector-normalize! (vector-! (new 'stack-no-clear 'vector) (get-trans a0-4 0) (-> gp-2 trans)) 1.0))
+1 -6
View File
@@ -772,12 +772,7 @@
(set! (-> v1-12 prim-core collide-with) (collide-spec))
)
0
(let* ((gp-1 *target*)
(a0-4 (if (type? gp-1 process-focusable)
gp-1
)
)
)
(let ((a0-4 (the-as target (as-type *target* process-focusable))))
(when a0-4
(let* ((gp-2 (-> self root))
(s3-0 (vector-normalize! (vector-! (new 'stack-no-clear 'vector) (get-trans a0-4 0) (-> gp-2 trans)) 1.0))
+1 -6
View File
@@ -866,12 +866,7 @@
(cond
((logtest? (-> this flags) (spydroid-orig-flag sof0))
(set! sv-144 (the-as vector (send-event (ppointer->process (-> this parent)) 'widow-get-center)))
(let* ((s1-0 arg0)
(s0-0 (if (type? s1-0 process-drawable)
s1-0
)
)
)
(let ((s0-0 (as-type arg0 process-drawable)))
(let ((v1-7 sv-144))
(b! (not v1-7) cfg-16 :likely-delay (set! v1-8 sv-144))
)
+5 -18
View File
@@ -1513,28 +1513,15 @@
(set! (-> this attacker-info next-update-target-time) (+ (current-time) (seconds 3)))
(logclear! (-> this attacker-info flags) (city-attacker-info-flag cai2))
)
(let* ((s5-0 (handle->process (-> this current-enemy)))
(a0-18 (if (type? s5-0 process-focusable)
s5-0
)
)
)
(let ((a0-18 (as-type (handle->process (-> this current-enemy)) process-focusable)))
(cond
((and a0-18
(not (logtest? (-> (the-as process-focusable a0-18) focus-status) (focus-status disable dead inactive)))
)
(let* ((s5-1 this)
(s4-0 (method-of-object s5-1 set-focus!))
(s3-0 (handle->process (-> this current-enemy)))
)
(s4-0
s5-1
(the-as process-focusable (if (type? s3-0 process-focusable)
s3-0
)
)
(the-as enemy-aware #f)
)
(set-focus!
this
(the-as process-focusable (as-type (handle->process (-> this current-enemy)) process-focusable))
(the-as enemy-aware #f)
)
(update-focus this)
(let ((f0-0 (vector-vector-xz-distance-squared (-> this root trans) (-> this focus-pos)))
+7 -29
View File
@@ -264,12 +264,7 @@
(if (not (handle->process (-> this alert-state target-status handle)))
(return 0)
)
(let* ((s5-0 (handle->process (-> this alert-state target-status handle)))
(s4-0 (if (type? s5-0 process-focusable)
s5-0
)
)
)
(let ((s4-0 (as-type (handle->process (-> this alert-state target-status handle)) process-focusable)))
(when s4-0
(let ((s5-1 (new 'stack-no-clear 'primary-target-pos-vel)))
(vector-copy! (-> s5-1 position) (get-trans (the-as process-focusable s4-0) 3))
@@ -334,12 +329,7 @@
;; definition for method 26 of type squad-control
;; INFO: Used lq/sq
(defmethod set-pos-vel ((this squad-control) (arg0 primary-target-pos-vel))
(let* ((s4-0 (handle->process (-> this alert-state target-status handle)))
(s5-0 (if (type? s4-0 process-focusable)
s4-0
)
)
)
(let ((s5-0 (as-type (handle->process (-> this alert-state target-status handle)) process-focusable)))
(when s5-0
(vector-copy! (-> arg0 position) (get-trans (the-as process-focusable s5-0) 3))
(vector-copy! (-> arg0 velocity) (get-transv (the-as process-focusable s5-0)))
@@ -381,11 +371,9 @@
;; definition for method 30 of type squad-control
;; WARN: Return type mismatch process vs process-focusable.
(defmethod get-target-focus ((this squad-control))
(let ((gp-0 (handle->process (-> this alert-state target-status handle))))
(the-as process-focusable (if (type? gp-0 process-focusable)
gp-0
)
)
(the-as
process-focusable
(as-type (handle->process (-> this alert-state target-status handle)) process-focusable)
)
)
@@ -397,12 +385,7 @@
(s4-0 (the-as process #f))
)
(dotimes (s3-0 3)
(let* ((s1-0 (handle->process (-> this alert-state target-status-array s3-0 handle)))
(s2-0 (if (type? s1-0 process-focusable)
s1-0
)
)
)
(let ((s2-0 (as-type (handle->process (-> this alert-state target-status-array s3-0 handle)) process-focusable)))
(when s2-0
(let ((f0-2 (vector-vector-xz-distance-squared (-> arg0 root trans) (get-trans (the-as process-focusable s2-0) 0)))
)
@@ -534,12 +517,7 @@
;; definition for method 32 of type squad-control
;; INFO: Used lq/sq
(defmethod get-handle-pos ((this squad-control) (arg0 handle) (arg1 vector))
(let* ((s5-0 (handle->process arg0))
(a0-5 (if (type? s5-0 process-focusable)
s5-0
)
)
)
(let ((a0-5 (as-type (handle->process arg0) process-focusable)))
(new 'stack-no-clear 'vector)
(if a0-5
(vector-copy! arg1 (get-trans (the-as process-focusable a0-5) 0))
@@ -435,12 +435,7 @@
(vector+! (-> gp-0 vec-2) (-> s3-2 start-pos) (-> s3-2 move-dist))
)
(else
(let* ((s4-1 (-> s3-2 best-other-tri collide-ptr))
(a0-43 (if (type? s4-1 collide-shape-prim)
s4-1
)
)
)
(let ((a0-43 (as-type (-> s3-2 best-other-tri collide-ptr) collide-shape-prim)))
(if (and a0-43 (logtest? (-> (the-as collide-shape-prim a0-43) prim-core collide-as) (collide-spec jak)))
(set! s5-1 #t)
)
+5 -13
View File
@@ -316,12 +316,8 @@
(set! (-> this strings 0 scale) 0.0)
(set! (-> sv-112 origin x) 45.0)
(set! (-> sv-112 origin y) 20.0)
(let ((v1-11 sv-112))
(set! (-> v1-11 width) (the float 422))
)
(let ((v1-12 sv-112))
(set! (-> v1-12 height) (the float 80))
)
(set-width! sv-112 422)
(set-height! sv-112 80)
(let ((a0-6 sv-112))
(set! (-> a0-6 color) (font-color red))
)
@@ -329,14 +325,10 @@
(set! (-> a0-7 flags) (font-flags kerning middle middle-vert large))
)
(let ((s0-0 80))
(let ((v1-15 sv-112))
(set! (-> v1-15 scale) 1.6)
)
(when (= (-> *setting-control* user-default language) (language-enum german))
(let ((v1-18 sv-112))
(set! (-> v1-18 scale) 1.0)
(set-scale! sv-112 1.6)
(if (= (-> *setting-control* user-default language) (language-enum german))
(set-scale! sv-112 1.0)
)
)
(cond
((-> s1-0 player-win?)
(let ((s1-1 print-game-text)
+13 -38
View File
@@ -391,13 +391,9 @@
(defmethod get-racer-count ((this race-state))
(let ((gp-0 0))
(dotimes (s4-0 (-> this racer-count))
(let ((s3-0 (handle->process (-> this racer-array s4-0 racer))))
(if (if (type? s3-0 process-focusable)
s3-0
)
(+! gp-0 1)
)
)
(if (as-type (handle->process (-> this racer-array s4-0 racer)) process-focusable)
(+! gp-0 1)
)
)
gp-0
)
@@ -630,13 +626,9 @@
)
)
(((race-state-enum rs1))
(let* ((f30-0 (* 0.0033333334 (the float (- (-> this current-time) (-> this countdown-start-time)))))
(s4-0 (handle->process (-> this racer-array (-> this i-player) racer)))
(s5-1 (if (type? s4-0 process-focusable)
s4-0
)
)
)
(let ((f30-0 (* 0.0033333334 (the float (- (-> this current-time) (-> this countdown-start-time)))))
(s5-1 (as-type (handle->process (-> this racer-array (-> this i-player) racer)) process-focusable))
)
(cond
((< f30-0 1.0)
(when s5-1
@@ -656,12 +648,7 @@
)
)
(((race-state-enum rs2))
(let* ((s4-1 (handle->process (-> this racer-array (-> this i-player) racer)))
(s5-2 (if (type? s4-1 process-focusable)
s4-1
)
)
)
(let ((s5-2 (as-type (handle->process (-> this racer-array (-> this i-player) racer)) process-focusable)))
(when s5-2
(cubic-curve-method-10 (-> this player-intro-curve) (-> (the-as process-drawable s5-2) root trans) 1.0)
(vector-reset! (-> (the-as process-drawable s5-2) root transv))
@@ -1231,15 +1218,9 @@
(new 'stack 'font-context *font-default-matrix* 70 20 0.0 (font-color orange) (font-flags shadow kerning))
)
)
(let ((v1-10 gp-1))
(set! (-> v1-10 scale) 0.7)
)
(let ((v1-11 gp-1))
(set! (-> v1-11 width) (the float 225))
)
(let ((v1-12 gp-1))
(set! (-> v1-12 height) (the float 70))
)
(set-scale! gp-1 0.7)
(set-width! gp-1 225)
(set-height! gp-1 70)
(set! (-> gp-1 origin x) (the float (- 256 (the int (/ (-> gp-1 width) 2)))))
(set! (-> gp-1 origin y) 320.0)
(set! (-> gp-1 flags) (font-flags shadow kerning middle middle-vert large))
@@ -1289,15 +1270,9 @@
(new 'stack 'font-context *font-default-matrix* 70 20 0.0 (font-color orange) (font-flags shadow kerning))
)
)
(let ((v1-10 gp-1))
(set! (-> v1-10 scale) 0.7)
)
(let ((v1-11 gp-1))
(set! (-> v1-11 width) (the float 240))
)
(let ((v1-12 gp-1))
(set! (-> v1-12 height) (the float 35))
)
(set-scale! gp-1 0.7)
(set-width! gp-1 240)
(set-height! gp-1 35)
(set! (-> gp-1 origin x) (the float (- 256 (the int (/ (-> gp-1 width) 2)))))
(set! (-> gp-1 origin y) 320.0)
(set! (-> gp-1 flags) (font-flags shadow kerning middle middle-vert large))
+20 -77
View File
@@ -559,12 +559,7 @@
)
(suspend)
(dotimes (gp-3 4)
(let* ((s4-0 (handle->process (-> self vehicle gp-3 handle)))
(s5-1 (if (type? s4-0 process-focusable)
s4-0
)
)
)
(let ((s5-1 (as-type (handle->process (-> self vehicle gp-3 handle)) process-focusable)))
(when s5-1
(send-event s5-1 'ai-ignore-nav-mesh)
(send-event s5-1 'ai-set-mode 0)
@@ -760,19 +755,15 @@
(dotimes (s5-0 5)
(let ((v1-2 (-> this marauder s5-0)))
(when (!= v1-2 #f)
(let ((s4-0 (handle->process v1-2)))
(cond
((if (type? s4-0 process-focusable)
s4-0
)
)
(else
(set! (-> this marauder s5-0) (the-as handle #f))
(+! (-> this marauder-count) -1)
(let ((s4-1 (-> this m-free-list)))
(set! (-> s4-1 (length s4-1)) (the-as uint s5-0))
(+! (-> s4-1 length) 1)
)
(cond
((as-type (handle->process v1-2) process-focusable)
)
(else
(set! (-> this marauder s5-0) (the-as handle #f))
(+! (-> this marauder-count) -1)
(let ((s4-1 (-> this m-free-list)))
(set! (-> s4-1 (length s4-1)) (the-as uint s5-0))
(+! (-> s4-1 length) 1)
)
)
)
@@ -791,12 +782,7 @@
(v1-2 (-> gp-0 handle))
)
(when (!= v1-2 #f)
(let* ((s2-0 (handle->process v1-2))
(s4-0 (if (type? s2-0 process-focusable)
s2-0
)
)
)
(let ((s4-0 (as-type (handle->process v1-2) process-focusable)))
(when s4-0
(let ((s3-1 (-> this target-point arg0)))
(vector-copy! s3-1 *stronghold-inside-point*)
@@ -1308,12 +1294,7 @@
;; definition for method 10 of type deschase-vehicle-control
;; WARN: Return type mismatch int vs none.
(defmethod deschase-vehicle-control-method-10 ((this deschase-vehicle-control))
(let* ((s5-0 (handle->process (-> this vehicle)))
(v1-3 (if (type? s5-0 process-focusable)
(the-as process-focusable s5-0)
)
)
)
(let ((v1-3 (as-type (handle->process (-> this vehicle)) process-focusable)))
(when v1-3
(let* ((s5-1 (-> this path node (-> this i-node)))
(f0-0 (vector-vector-distance-squared (-> v1-3 root trans) (-> s5-1 position)))
@@ -1338,12 +1319,7 @@
;; INFO: Used lq/sq
;; WARN: Return type mismatch int vs none.
(defmethod deschase-vehicle-control-method-12 ((this deschase-vehicle-control))
(let* ((s5-0 (handle->process (-> this vehicle)))
(gp-0 (if (type? s5-0 process-focusable)
s5-0
)
)
)
(let ((gp-0 (as-type (handle->process (-> this vehicle)) process-focusable)))
(when (and (the-as process-focusable gp-0)
(not (logtest? (-> (the-as process-focusable gp-0) focus-status) (focus-status dead)))
)
@@ -1371,12 +1347,7 @@
)
)
(dotimes (s4-1 (-> s5-1 length))
(let* ((s3-0 (-> s5-1 s4-1 process))
(a0-15 (if (type? s3-0 v-marauder)
s3-0
)
)
)
(let ((a0-15 (as-type (-> s5-1 s4-1 process) v-marauder)))
(if (and a0-15 (!= a0-15 gp-0))
(send-event
a0-15
@@ -1503,12 +1474,7 @@
;; definition for method 26 of type desert-chase-chase-manager
(defmethod task-manager-method-26 ((this desert-chase-chase-manager))
(when (!= (-> this player-vehicle) #f)
(let* ((s5-0 (handle->process (-> this player-vehicle)))
(a0-5 (if (type? s5-0 process-focusable)
(the-as process-focusable s5-0)
)
)
)
(let ((a0-5 (as-type (handle->process (-> this player-vehicle)) process-focusable)))
(if (or (not a0-5) (focus-test? a0-5 dead))
(send-event this 'fail)
)
@@ -1517,12 +1483,7 @@
(let ((s5-1 0))
(dotimes (s4-0 4)
(let ((s3-0 (-> this control-array s4-0)))
(let* ((s2-0 (handle->process (-> s3-0 vehicle)))
(a0-14 (if (type? s2-0 process-focusable)
s2-0
)
)
)
(let ((a0-14 (as-type (handle->process (-> s3-0 vehicle)) process-focusable)))
(if (and a0-14 (not (logtest? (-> (the-as process-focusable a0-14) focus-status) (focus-status dead))))
(+! s5-1 1)
)
@@ -1582,12 +1543,7 @@
(s2-0 3)
)
(until #f
(let* ((s1-0 (handle->process (-> this control-array s2-0 vehicle)))
(a0-5 (if (type? s1-0 process-focusable)
s1-0
)
)
)
(let ((a0-5 (as-type (handle->process (-> this control-array s2-0 vehicle)) process-focusable)))
(cond
((or (not a0-5) (focus-test? (the-as process-focusable a0-5) dead))
(if s3-0
@@ -1940,16 +1896,8 @@
(dotimes (s5-3 gp-6)
(let* ((s4-2 (-> self control-array s5-3))
(s2-0 (-> self control-array (+ s5-3 1)))
(s1-0 (handle->process (-> s4-2 vehicle)))
(s3-0 (if (type? s1-0 process-focusable)
s1-0
)
)
(s2-1 (handle->process (-> s2-0 vehicle)))
(v1-101 (if (type? s2-1 process-focusable)
s2-1
)
)
(s3-0 (as-type (handle->process (-> s4-2 vehicle)) process-focusable))
(v1-101 (as-type (handle->process (-> s2-0 vehicle)) process-focusable))
)
(when (and s3-0 v1-101)
(let ((f0-8 (vector-vector-distance
@@ -1968,12 +1916,7 @@
)
(let ((v1-109 (-> self control-array gp-6)))
(set! (-> v1-109 speed-factor) 1.0)
(let* ((s4-3 (handle->process (-> v1-109 vehicle)))
(s5-4 (if (type? s4-3 process-focusable)
s4-3
)
)
)
(let ((s5-4 (as-type (handle->process (-> v1-109 vehicle)) process-focusable)))
(when (the-as process-focusable s5-4)
(if (not (-> self minimap))
(set! (-> self minimap)
+4 -23
View File
@@ -789,11 +789,7 @@
(case arg2
(('notify)
(when (= (-> arg3 param 0) 'attack)
(let ((v1-2 (if (type? arg0 projectile)
(the-as projectile arg0)
)
)
)
(let ((v1-2 (as-type arg0 projectile)))
(if (and v1-2 (let ((f0-0 (vector-vector-distance-squared (-> v1-2 root trans) *desjump-wasdoors-pos*))
(f1-0 20480.0)
)
@@ -961,12 +957,7 @@
(dotimes (gp-5 4)
(let ((s5-3 (-> self interceptor gp-5)))
(when (!= (-> s5-3 handle) #f)
(let* ((s4-2 (handle->process (-> s5-3 handle)))
(a0-63 (if (type? s4-2 process-focusable)
s4-2
)
)
)
(let ((a0-63 (as-type (handle->process (-> s5-3 handle)) process-focusable)))
(when a0-63
(cond
((-> s5-3 kamikaze?)
@@ -1063,12 +1054,7 @@
(v1-17 (-> s4-1 handle))
)
(when (!= v1-17 #f)
(let* ((s2-0 (handle->process v1-17))
(s3-0 (if (type? s2-0 process-focusable)
(the-as process-focusable s2-0)
)
)
)
(let ((s3-0 (as-type (handle->process v1-17) process-focusable)))
(cond
((and s3-0 (not (logtest? (-> s3-0 focus-status) (focus-status dead))))
(vector-copy! (-> this last-catapult-pos) (-> s3-0 root trans))
@@ -1143,12 +1129,7 @@
(v1-119 (-> s3-1 handle))
)
(when (!= v1-119 #f)
(let* ((s2-2 (handle->process v1-119))
(s4-3 (if (type? s2-2 process-focusable)
s2-2
)
)
)
(let ((s4-3 (as-type (handle->process v1-119) process-focusable)))
(cond
((and (the-as process-focusable s4-3)
(not (logtest? (-> (the-as process-focusable s4-3) focus-status) (focus-status dead)))
+9 -32
View File
@@ -620,12 +620,7 @@
)
)
(('hit 'hit-flinch 'hit-knocked)
(let* ((s1-0 (handle->process (-> this incoming attacker-handle)))
(v1-5 (if (type? s1-0 process-focusable)
s1-0
)
)
)
(let ((v1-5 (as-type (handle->process (-> this incoming attacker-handle)) process-focusable)))
(if (and v1-5 (= (-> v1-5 type) target))
(set! (-> this target-last-attacker?) #t)
(set! (-> this target-last-attacker?) #f)
@@ -689,13 +684,9 @@
(defmethod enemy-touched-handler ((this marauder) (arg0 process) (arg1 event-message-block))
"General handler for when anything touches an enemy (automatic response)."
(when (!= (-> arg0 type) target)
(let* ((s3-0 (-> arg1 param 0))
(s2-0 arg0)
(v1-1 (if (type? s2-0 process-focusable)
s2-0
)
)
)
(let ((s3-0 (-> arg1 param 0))
(v1-1 (as-type arg0 process-focusable))
)
(cond
((and (focus-test? this dangerous)
(logtest? (process-mask enemy) (-> arg0 mask))
@@ -1090,12 +1081,7 @@
'()
)
:trans (behavior ()
(let* ((gp-0 (handle->process (-> self focus handle)))
(a0-4 (if (type? gp-0 process-focusable)
gp-0
)
)
)
(let ((a0-4 (as-type (handle->process (-> self focus handle)) process-focusable)))
(when a0-4
(let ((v1-5 (get-trans (the-as process-focusable a0-4) 0)))
(when (< (vector-length (vector-! (new 'stack-no-clear 'vector) v1-5 (-> self root trans))) 32768.0)
@@ -1176,12 +1162,7 @@
(go-virtual save)
)
(when (and (time-elapsed? (-> self state-time) (-> self reaction-time)) (not (-> self jump-attack)))
(let* ((s5-0 (handle->process (-> self focus handle)))
(gp-0 (if (type? s5-0 process-focusable)
s5-0
)
)
)
(let ((gp-0 (as-type (handle->process (-> self focus handle)) process-focusable)))
(when gp-0
(los-control-method-9
(-> self los)
@@ -1293,13 +1274,9 @@
(vf7 :class vf)
)
(init-vf0-vector)
(let* ((s5-0 (handle->process (-> this focus handle)))
(s4-0 (if (type? s5-0 process-focusable)
s5-0
)
)
(s5-1 (new 'stack-no-clear 'vector))
)
(let ((s4-0 (as-type (handle->process (-> this focus handle)) process-focusable))
(s5-1 (new 'stack-no-clear 'vector))
)
(when s4-0
(vector-! s5-1 (-> this root trans) (get-trans (the-as process-focusable s4-0) 0))
(set! (-> s5-1 y) 0.0)
+4 -13
View File
@@ -440,12 +440,7 @@
(defmethod task-manager-method-26 ((this task-manager-vehicle-bbush))
(when (= (-> this player-vehicle) #f)
(when (and *target* (focus-test? *target* pilot-riding))
(let* ((s5-0 (handle->process (-> *target* pilot vehicle)))
(v1-10 (if (type? s5-0 process-focusable)
s5-0
)
)
)
(let ((v1-10 (as-type (handle->process (-> *target* pilot vehicle)) process-focusable)))
(when v1-10
(set! (-> this player-vehicle) (-> *target* pilot vehicle))
(vector-copy! (-> this ground-pos) (-> (the-as process-focusable v1-10) root trans))
@@ -612,13 +607,9 @@
(not (handle->process (-> self player-vehicle)))
)
(when (and *target* (focus-test? *target* pilot-riding))
(let ((gp-3 (handle->process (-> *target* pilot vehicle))))
(if (if (type? gp-3 process-focusable)
gp-3
)
(set! (-> self player-vehicle) (-> *target* pilot vehicle))
)
)
(if (as-type (handle->process (-> *target* pilot vehicle)) process-focusable)
(set! (-> self player-vehicle) (-> *target* pilot vehicle))
)
)
(suspend)
)
+24 -82
View File
@@ -299,12 +299,8 @@
(gp-1 (-> gp-0 tex))
)
(set! (-> s5-1 flags) (font-flags shadow kerning large))
(let ((v1-28 s5-1))
(set! (-> v1-28 width) (the float 340))
)
(let ((v1-29 s5-1))
(set! (-> v1-29 height) (the float 80))
)
(set-width! s5-1 340)
(set-height! s5-1 80)
(let ((v1-30 s5-1)
(a0-16 (-> *setting-control* user-default language))
)
@@ -687,22 +683,10 @@
(set! (-> s5-0 fnt-origin-x) 36)
(set! (-> s5-0 fnt-origin-y) (- 228 (* (-> s5-0 cur) (/ (-> s5-0 fnt-height) 2))))
(set! (-> s4-4 flags) (font-flags shadow kerning middle middle-vert large))
(let ((v1-74 s4-4))
(set! (-> v1-74 width) (the float 440))
)
(let ((v1-75 s4-4))
(set! (-> v1-75 height) (the float 50))
)
(let ((v1-76 s4-4))
(set! (-> v1-76 scale) (* 0.8 f30-0))
)
(let ((v1-77 s4-4)
(a1-7 (-> s5-0 fnt-origin-x))
(a0-61 40)
)
(set! (-> v1-77 origin x) (the float a1-7))
(set! (-> v1-77 origin y) (the float a0-61))
)
(set-width! s4-4 440)
(set-height! s4-4 50)
(set-scale! s4-4 (* 0.8 f30-0))
(set-origin! s4-4 (-> s5-0 fnt-origin-x) 40)
(let ((a0-62 s4-4))
(set! (-> a0-62 color) (font-color progress-old-yellow))
)
@@ -710,25 +694,15 @@
(format (clear *temp-string*) (lookup-text! *common-text* (-> this menu title-text) #f))
(s3-3 *temp-string* s4-4 #f 44 (bucket-id hud-draw-hud-alpha))
)
(let ((v1-81 s4-4))
(set! (-> v1-81 height) (the float (-> s5-0 fnt-height)))
)
(set-height! s4-4 (-> s5-0 fnt-height))
(dotimes (s3-4 (-> s5-0 cur))
(let ((v1-82 s4-4)
(a1-11 (-> s5-0 fnt-origin-x))
(a0-68 (-> s5-0 fnt-origin-y))
)
(set! (-> v1-82 origin x) (the float a1-11))
(set! (-> v1-82 origin y) (the float a0-68))
)
(let ((v1-83 s4-4))
(set! (-> v1-83 scale) (* f30-0 (if (= s3-4 (-> s5-0 idx))
0.45
0.4
)
)
)
)
(set-origin! s4-4 (-> s5-0 fnt-origin-x) (-> s5-0 fnt-origin-y))
(set-scale! s4-4 (* f30-0 (if (= s3-4 (-> s5-0 idx))
0.45
0.4
)
)
)
(let ((v1-84 s4-4))
(set! (-> v1-84 color) (if (= s3-4 (-> s5-0 idx))
(font-color progress-old-selected)
@@ -773,22 +747,10 @@
)
)
(set! (-> s5-0 flags) (font-flags shadow kerning middle middle-vert large))
(let ((v1-18 s5-0)
(a1-2 (-> s4-0 fnt-origin-x))
(a0-21 40)
)
(set! (-> v1-18 origin x) (the float a1-2))
(set! (-> v1-18 origin y) (the float a0-21))
)
(let ((v1-19 s5-0))
(set! (-> v1-19 width) (the float 440))
)
(let ((v1-20 s5-0))
(set! (-> v1-20 height) (the float 50))
)
(let ((v1-21 s5-0))
(set! (-> v1-21 scale) 1.0)
)
(set-origin! s5-0 (-> s4-0 fnt-origin-x) 40)
(set-width! s5-0 440)
(set-height! s5-0 50)
(set-scale! s5-0 1.0)
(let ((a0-25 s5-0))
(set! (-> a0-25 color) (font-color progress-old-yellow))
)
@@ -796,19 +758,9 @@
(format (clear *temp-string*) (lookup-text! *common-text* (-> this menu title-text) #f))
(s3-0 *temp-string* s5-0 #f 44 (bucket-id hud-draw-hud-alpha))
)
(let ((v1-25 s5-0))
(set! (-> v1-25 height) (the float 230))
)
(let ((v1-26 s5-0)
(a1-6 (-> s4-0 fnt-origin-x))
(a0-31 98)
)
(set! (-> v1-26 origin x) (the float a1-6))
(set! (-> v1-26 origin y) (the float a0-31))
)
(let ((v1-27 s5-0))
(set! (-> v1-27 scale) (-> s4-0 scale))
)
(set-height! s5-0 230)
(set-origin! s5-0 (-> s4-0 fnt-origin-x) 98)
(set-scale! s5-0 (-> s4-0 scale))
(let ((a0-32 s5-0))
(set! (-> a0-32 color) (font-color default))
)
@@ -816,19 +768,9 @@
(format (clear *temp-string*) (lookup-text! *common-text* (-> this menu req-text) #f))
(s3-1 *temp-string* s5-0 #f 44 (bucket-id hud-draw-hud-alpha))
)
(let ((v1-31 s5-0)
(a1-10 (-> s4-0 fnt-origin-x))
(a0-37 328)
)
(set! (-> v1-31 origin x) (the float a1-10))
(set! (-> v1-31 origin y) (the float a0-37))
)
(let ((v1-32 s5-0))
(set! (-> v1-32 height) (the float 50))
)
(let ((v1-33 s5-0))
(set! (-> v1-33 scale) (-> s4-0 scale))
)
(set-origin! s5-0 (-> s4-0 fnt-origin-x) 328)
(set-height! s5-0 50)
(set-scale! s5-0 (-> s4-0 scale))
)
(let ((a0-39 s5-0))
(set! (-> a0-39 color) (font-color default))
+16 -19
View File
@@ -1188,27 +1188,24 @@
:art-group "scenecamera"
:anim "nest-hunt-intro"
:parts 5
:command-list '((0 (apply ,(lambda :behavior scene-player
()
(let ((gp-0 12))
(while (>= 19 gp-0)
(let* ((s5-0 (handle->process (-> *vehicle-info* handle-by-vehicle-type gp-0)))
(a0-5 (if (type? s5-0 process-focusable)
s5-0
)
)
)
(if a0-5
(send-event a0-5 'go-die)
)
)
(+! gp-0 1)
:command-list '((0
(apply
,(lambda :behavior scene-player
()
(let ((gp-0 12))
(while (>= 19 gp-0)
(let ((a0-5 (as-type (handle->process (-> *vehicle-info* handle-by-vehicle-type gp-0)) process-focusable)))
(if a0-5
(send-event a0-5 'go-die)
)
)
#f
)
)
)
(+! gp-0 1)
)
)
#f
)
)
)
(4 (send-event *target* 'draw #f))
(590 (fadeout (frame-time-30 10)))
(10000 (task-close! "nest-hunt-sig") (want-vehicle "scorpion"))
+4 -8
View File
@@ -198,14 +198,10 @@
(des-draw-bridge-method-25 self)
(when (and *target*
(focus-test? *target* pilot-riding)
(let ((gp-0 (handle->process (-> *target* pilot vehicle))))
(and (if (type? gp-0 v-toad)
gp-0
)
(< (vector-vector-distance (-> self root trans) (target-pos 0)) 327680.0)
(< 0.0 (vector4-dot (-> self plane) (target-pos 0)))
)
)
(and (as-type (handle->process (-> *target* pilot vehicle)) v-toad)
(< (vector-vector-distance (-> self root trans) (target-pos 0)) 327680.0)
(< 0.0 (vector4-dot (-> self plane) (target-pos 0)))
)
)
(if (and *target* (not (logtest? (-> *target* focus-status) (focus-status grabbed))))
(process-grab? *target* #f)
+1 -5
View File
@@ -249,11 +249,7 @@
:event (behavior ((proc process) (argc int) (message symbol) (block event-message-block))
(case message
(('attack 'touched)
(let* ((s3-0 proc)
(s2-0 (if (type? s3-0 process-focusable)
s3-0
)
)
(let* ((s2-0 (as-type proc process-focusable))
(s3-1 (and s2-0 (focus-test? (the-as process-focusable s2-0) flut)))
)
(cond
+2 -12
View File
@@ -458,12 +458,7 @@
(set! (-> this move)
(lambda ((arg0 projectile))
(when (< (-> arg0 root transv y) 0.0)
(let* ((s5-0 (handle->process (-> arg0 desired-target)))
(a0-5 (if (type? s5-0 process-focusable)
s5-0
)
)
)
(let ((a0-5 (as-type (handle->process (-> arg0 desired-target)) process-focusable)))
(when a0-5
(let ((s5-2
(vector-! (new 'stack-no-clear 'vector) (get-trans (the-as process-focusable a0-5) 0) (-> arg0 root trans))
@@ -989,12 +984,7 @@
(if (not (-> this vehicle-handle))
(set! (-> this vehicle-handle) (-> *vehicle-info* handle-by-vehicle-type 14))
)
(let* ((s4-0 (handle->process (-> this vehicle-handle)))
(s5-0 (if (type? s4-0 process-focusable)
s4-0
)
)
)
(let ((s5-0 (as-type (handle->process (-> this vehicle-handle)) process-focusable)))
(when s5-0
(set-focus! this (the-as process-focusable s5-0) (modify-awareness this (enemy-aware hostile)))
s5-0
+9 -33
View File
@@ -1377,12 +1377,7 @@
'()
)
:trans (behavior ()
(let* ((gp-0 (ppointer->process (-> self parent)))
(v1-2 (if (type? gp-0 process-focusable)
gp-0
)
)
)
(let ((v1-2 (as-type (ppointer->process (-> self parent)) process-focusable)))
(when v1-2
(let ((t9-1 vector-matrix*!)
(a0-2 (-> self root trans))
@@ -2014,27 +2009,12 @@
(set! (-> s5-0 y) 0.0)
(let ((s4-0 (new 'stack-no-clear 'array 'collide-shape 64)))
(countdown (s3-1 (fill-actor-list-for-box *actor-hash* arg0 s4-0 64))
(let* ((s2-0 (-> s4-0 s3-1))
(a0-4 (if (type? s2-0 collide-shape)
s2-0
)
)
)
(let ((a0-4 (as-type (-> s4-0 s3-1) collide-shape)))
(when a0-4
(let* ((s2-1 (-> a0-4 process))
(s1-0 (if (type? s2-1 process-focusable)
s2-1
)
)
(s2-2 (new 'stack-no-clear 'vector))
)
(when (and s1-0 (and (!= this s1-0) (let ((s0-0 s1-0))
(if (type? s0-0 des-beast)
s0-0
)
)
)
)
(let ((s1-0 (as-type (-> a0-4 process) process-focusable))
(s2-2 (new 'stack-no-clear 'vector))
)
(when (and s1-0 (and (!= this s1-0) (as-type s1-0 des-beast)))
(vector-! s2-2 (-> s1-0 root trans) (-> this root trans))
(set! (-> s2-2 y) 0.0)
(if (< 0.0 (vector-dot s2-2 s5-0))
@@ -2082,13 +2062,9 @@
)
)
(else
(let* ((s4-1 (the-as object (-> arg1 param 0)))
(s2-0 arg0)
(s1-0 (if (type? s2-0 process-drawable)
s2-0
)
)
)
(let ((s4-1 (the-as object (-> arg1 param 0)))
(s1-0 (as-type arg0 process-drawable))
)
(when s1-0
(cond
((and (nonzero? (-> this attack-id))
+1 -6
View File
@@ -152,12 +152,7 @@
)
(set! (-> this vehicle-h) (-> *target* pilot vehicle))
)
(let* ((s5-0 (handle->process (-> *vehicle-info* handle-by-vehicle-type 13)))
(a0-12 (if (type? s5-0 process-focusable)
s5-0
)
)
)
(let ((a0-12 (as-type (handle->process (-> *vehicle-info* handle-by-vehicle-type 13)) process-focusable)))
(if (and a0-12 (focus-test? (the-as process-focusable a0-12) dead))
(send-event this 'fail)
)
+3 -18
View File
@@ -364,12 +364,7 @@
;; WARN: Return type mismatch int vs none.
(defun mh-flyer-shot-move ((arg0 mh-flyer-shot))
(let ((s5-0 (-> arg0 root)))
(let* ((s4-0 (handle->process (-> arg0 desired-target)))
(s2-0 (if (type? s4-0 process-focusable)
s4-0
)
)
)
(let ((s2-0 (as-type (handle->process (-> arg0 desired-target)) process-focusable)))
(if s2-0
(vector+float*!
(-> arg0 desired-target-pos)
@@ -509,12 +504,7 @@
(new 'process 'sparticle-subsampler *sp-particle-system-2d* (-> *part-id-table* 1715) 8.0)
)
(set! (-> this desired-target) (-> *vehicle-info* handle-by-vehicle-type 14))
(let* ((s5-1 (handle->process (-> this desired-target)))
(s3-0 (if (type? s5-1 process-focusable)
s5-1
)
)
)
(let ((s3-0 (as-type (handle->process (-> this desired-target)) process-focusable)))
(if s3-0
(vector+float*!
(-> this desired-target-pos)
@@ -1331,12 +1321,7 @@
(let ((t9-0 (method-of-type enemy update-focus)))
(t9-0 this)
)
(let* ((s4-0 *target*)
(s5-0 (if (type? s4-0 process-focusable)
s4-0
)
)
)
(let ((s5-0 (the-as target (as-type *target* process-focusable))))
(when s5-0
(vector-copy! (-> this focus-bullseye-pos) (get-trans s5-0 3))
(vector-copy! (-> this focus-pos) (get-trans s5-0 3))
+4 -18
View File
@@ -1201,18 +1201,8 @@
(let ((gp-1 (-> self node-list data 7 bone transform)))
(vector-copy! (-> self aim-dir) (-> gp-1 fvec))
(when (-> self target-handle)
(let* ((s5-1 (handle->process (-> self target-handle)))
(s4-2 (if (type? s5-1 process-drawable)
s5-1
)
)
)
(when (and s4-2 (let ((s5-2 (-> (the-as process-drawable s4-2) root)))
(if (type? s5-2 collide-shape)
s5-2
)
)
)
(let ((s4-2 (as-type (handle->process (-> self target-handle)) process-drawable)))
(when (and s4-2 (as-type (-> (the-as process-drawable s4-2) root) collide-shape))
(let ((s5-4 (vector-!
(new 'stack-no-clear 'vector)
(-> (the-as process-focusable s4-2) root root-prim prim-core world-sphere)
@@ -1899,12 +1889,8 @@
(new 'stack 'font-context *font-default-matrix* 32 320 0.0 (font-color default) (font-flags shadow kerning))
)
)
(let ((v1-21 gp-1))
(set! (-> v1-21 width) (the float 340))
)
(let ((v1-22 gp-1))
(set! (-> v1-22 height) (the float 80))
)
(set-width! gp-1 340)
(set-height! gp-1 80)
(let ((v1-23 gp-1)
(a0-15 (-> *setting-control* user-default language))
)
@@ -724,15 +724,9 @@
(new 'stack 'font-context *font-default-matrix* 40 300 0.0 (font-color default) (font-flags shadow kerning))
)
)
(let ((v1-26 s5-0))
(set! (-> v1-26 width) (the float 340))
)
(let ((v1-27 s5-0))
(set! (-> v1-27 height) (the float 60))
)
(let ((v1-28 s5-0))
(set! (-> v1-28 scale) 0.6)
)
(set-width! s5-0 340)
(set-height! s5-0 60)
(set-scale! s5-0 0.6)
(set! (-> s5-0 flags) (font-flags shadow kerning middle-vert large))
(if (and *target* (focus-test? *target* flut))
(print-game-text
+8 -16
View File
@@ -614,12 +614,7 @@
(v1-129 (-> s3-3 handle))
)
(when (!= v1-129 #f)
(let* ((s2-2 (handle->process v1-129))
(s4-3 (if (type? s2-2 process-focusable)
s2-2
)
)
)
(let ((s4-3 (as-type (handle->process v1-129) process-focusable)))
(cond
(s4-3
(cond
@@ -687,16 +682,13 @@
(set! (-> s0-0 no-initial-move-to-ground?) #t)
(set! (-> s0-0 multi-focus) #t)
(set! (-> s0-0 skip-jump) #f)
(let* ((s1-2 (ppointer->process (process-spawn marauder this s0-0 :name "marauder" :to this)))
(s0-1 (if (type? s1-2 process-focusable)
s1-2
)
)
(s1-3 (if (type? s0-1 marauder)
(the-as marauder s0-1)
)
)
)
(let ((s1-3
(as-type
(as-type (ppointer->process (process-spawn marauder this s0-0 :name "marauder" :to this)) process-focusable)
marauder
)
)
)
(when s1-3
(change-to (-> this nav-mesh) s1-3)
(let ((v1-38 (-> s1-3 nav state)))
+9 -34
View File
@@ -136,16 +136,11 @@
(let ((t9-0 (method-of-type task-manager task-manager-method-26)))
(t9-0 this)
)
(let ((s5-0 (handle->process (-> this player-vehicle))))
(when (not (if (type? s5-0 process-focusable)
s5-0
)
)
(let ((v1-5 *target*))
(if (and v1-5 (focus-test? v1-5 pilot-riding))
(set! (-> this player-vehicle) (-> v1-5 pilot vehicle))
)
)
(when (not (as-type (handle->process (-> this player-vehicle)) process-focusable))
(let ((v1-5 *target*))
(if (and v1-5 (focus-test? v1-5 pilot-riding))
(set! (-> this player-vehicle) (-> v1-5 pilot vehicle))
)
)
)
0
@@ -514,12 +509,7 @@
)
(set-setting! 'turbo #f 0.0 0)
(until #f
(let* ((gp-1 (handle->process (-> self player-vehicle)))
(v1-11 (if (type? gp-1 process-focusable)
gp-1
)
)
)
(let ((v1-11 (as-type (handle->process (-> self player-vehicle)) process-focusable)))
(when (and v1-11 (not (logtest? (-> (the-as process-focusable v1-11) focus-status) (focus-status dead))))
(if (< (vector-vector-xz-distance (-> self start-pos) (-> (the-as process-focusable v1-11) root trans)) 245760.0)
(goto cfg-21)
@@ -547,12 +537,7 @@
#f
(until #f
(label cfg-48)
(let* ((gp-4 (handle->process (-> self player-vehicle)))
(a0-37 (if (type? gp-4 process-focusable)
gp-4
)
)
)
(let ((a0-37 (as-type (handle->process (-> self player-vehicle)) process-focusable)))
(if (and a0-37 (not (logtest? (-> (the-as process-focusable a0-37) focus-status) (focus-status dead))))
(goto cfg-62)
)
@@ -566,12 +551,7 @@
(send-event (handle->process (-> self player-vehicle)) 'ai-set-target-speed #x47c80000)
(send-event (handle->process (-> self player-vehicle)) 'ai-ignore-nav-mesh #t)
(until #f
(let* ((gp-5 (handle->process (-> self player-vehicle)))
(v1-90 (if (type? gp-5 process-focusable)
gp-5
)
)
)
(let ((v1-90 (as-type (handle->process (-> self player-vehicle)) process-focusable)))
(when v1-90
(if (< (vector-vector-xz-distance (-> (the-as process-focusable v1-90) root trans) (-> self start-pos)) 73728.0)
(goto cfg-103)
@@ -584,12 +564,7 @@
(label cfg-103)
(send-event (handle->process (-> self player-vehicle)) 'ai-set-target-speed 0)
(until #f
(let* ((gp-6 (handle->process (-> self player-vehicle)))
(v1-107 (if (type? gp-6 process-focusable)
gp-6
)
)
)
(let ((v1-107 (as-type (handle->process (-> self player-vehicle)) process-focusable)))
(when v1-107
(if (< (vector-length (-> (the-as process-focusable v1-107) root transv)) 4096.0)
(goto cfg-123)
+3 -9
View File
@@ -304,15 +304,9 @@
(new 'stack 'font-context *font-default-matrix* 70 20 0.0 (font-color orange) (font-flags shadow kerning))
)
)
(let ((v1-1 s5-0))
(set! (-> v1-1 scale) 0.7)
)
(let ((v1-2 s5-0))
(set! (-> v1-2 width) (the float 370))
)
(let ((v1-3 s5-0))
(set! (-> v1-3 height) (the float 70))
)
(set-scale! s5-0 0.7)
(set-width! s5-0 370)
(set-height! s5-0 70)
(set! (-> s5-0 origin x) (the float (- 201 (the int (/ (-> s5-0 width) 2)))))
(set! (-> s5-0 origin y) 290.0)
(set! (-> s5-0 flags) (font-flags shadow kerning middle-vert large))
+16 -89
View File
@@ -2177,30 +2177,15 @@
)
)
:trans (behavior ()
(local-vars (gp-1 symbol))
((-> (method-of-type task-manager active) trans))
(task-manager-desert-rescue-method-44 self)
(if (< (vector-vector-xz-distance (target-pos 0) *home-pos*) 61440.0)
(go-virtual finish-task)
)
(if (or (not (handle->process (-> self jak-vehicle)))
(begin
(let* ((gp-2 #t)
(s5-0 (handle->process (-> self jak-vehicle)))
(v1-17 (the-as focus-status (logand (-> (the-as process-focusable (if (type? s5-0 process-focusable)
(the-as process-focusable s5-0)
)
)
focus-status
)
(focus-status dead)
)
)
)
)
(cmove-#f-zero gp-1 v1-17 gp-2)
)
gp-1
(focus-test?
(the-as process-focusable (as-type (handle->process (-> self jak-vehicle)) process-focusable))
dead
)
)
(send-event self 'fail)
@@ -2317,17 +2302,9 @@
:enter (behavior ()
(set-setting! 'music 'desres3 0.0 0)
(let ((gp-0 (new 'stack-no-clear 'task-arrow-params)))
(let ((s5-0 (-> gp-0 pos))
(s4-0 (handle->process (-> self jak-vehicle)))
)
(vector-copy! s5-0 (get-trans
(the-as process-focusable (if (type? s4-0 process-focusable)
(the-as process-focusable s4-0)
)
)
0
)
)
(vector-copy!
(-> gp-0 pos)
(get-trans (the-as process-focusable (as-type (handle->process (-> self jak-vehicle)) process-focusable)) 0)
)
(quaternion-identity! (-> gp-0 quat))
(set! (-> gp-0 flags) (task-arrow-flags))
@@ -2417,7 +2394,6 @@
(remove-setting! 'pilot)
)
:trans (behavior ()
(local-vars (gp-0 symbol))
((-> (method-of-type task-manager active) trans))
(task-manager-desert-rescue-method-44 self)
(set! (-> *game-info* timer)
@@ -2427,23 +2403,9 @@
(send-event self 'fail)
)
(if (or (not (handle->process (-> self jak-vehicle)))
(begin
(let* ((gp-1 #t)
(s5-0 (handle->process (-> self jak-vehicle)))
(v1-21 (the-as focus-status (logand (-> (the-as process-focusable (if (type? s5-0 process-focusable)
(the-as process-focusable s5-0)
)
)
focus-status
)
(focus-status dead)
)
)
)
)
(cmove-#f-zero gp-0 v1-21 gp-1)
)
gp-0
(focus-test?
(the-as process-focusable (as-type (handle->process (-> self jak-vehicle)) process-focusable))
dead
)
)
(send-event self 'fail)
@@ -2513,7 +2475,6 @@
)
)
:trans (behavior ()
(local-vars (gp-3 symbol))
((-> (method-of-type task-manager active) trans))
(task-manager-desert-rescue-method-44 self)
(let ((gp-0 (the-as wland-passenger (handle->process (-> self current-passenger)))))
@@ -2528,12 +2489,7 @@
)
)
(when (time-elapsed? (-> self state-time) (seconds 1))
(let* ((gp-1 (handle->process (-> self current-passenger)))
(a0-16 (if (type? gp-1 process-focusable)
(the-as process-focusable gp-1)
)
)
)
(let ((a0-16 (as-type (handle->process (-> self current-passenger)) process-focusable)))
(if (or (not a0-16) (focus-test? a0-16 disable dead inactive))
(send-event self 'fail-delay)
)
@@ -2554,23 +2510,9 @@
(send-event self 'fail)
)
(if (or (not (handle->process (-> self jak-vehicle)))
(begin
(let* ((gp-4 #t)
(s5-1 (handle->process (-> self jak-vehicle)))
(v1-70 (the-as focus-status (logand (-> (the-as process-focusable (if (type? s5-1 process-focusable)
(the-as process-focusable s5-1)
)
)
focus-status
)
(focus-status dead)
)
)
)
)
(cmove-#f-zero gp-3 v1-70 gp-4)
)
gp-3
(focus-test?
(the-as process-focusable (as-type (handle->process (-> self jak-vehicle)) process-focusable))
dead
)
)
(send-event self 'fail)
@@ -2611,7 +2553,6 @@
)
)
:trans (behavior ()
(local-vars (gp-0 symbol))
((-> (method-of-type task-manager active) trans))
(task-manager-desert-rescue-method-44 self)
(set! (-> *game-info* timer)
@@ -2621,23 +2562,9 @@
(send-event self 'fail)
)
(if (or (not (handle->process (-> self jak-vehicle)))
(begin
(let* ((gp-1 #t)
(s5-0 (handle->process (-> self jak-vehicle)))
(v1-21 (the-as focus-status (logand (-> (the-as process-focusable (if (type? s5-0 process-focusable)
(the-as process-focusable s5-0)
)
)
focus-status
)
(focus-status dead)
)
)
)
)
(cmove-#f-zero gp-0 v1-21 gp-1)
)
gp-0
(focus-test?
(the-as process-focusable (as-type (handle->process (-> self jak-vehicle)) process-focusable))
dead
)
)
(send-event self 'fail)
+38 -82
View File
@@ -2699,7 +2699,6 @@
;; definition for method 210 of type neo-sat
(defmethod neo-sat-method-210 ((this neo-sat))
(local-vars (s5-1 object))
(let ((f0-0 143360.0))
(if (< (* f0-0 f0-0) (vector-vector-xz-distance-squared (-> this root trans) (-> this focus-pos)))
(go (method-of-object this ground-burst))
@@ -2746,39 +2745,23 @@
(-> this disc-joint rotation)
(* (-> this spin-speed) (seconds-per-frame))
)
(let ((s5-0 (handle->process (-> this focus handle))))
(cond
((and (if (type? s5-0 process-focusable)
s5-0
)
(begin
(let* ((s5-2 #t)
(s4-0 (handle->process (-> this focus handle)))
(v1-33 (the-as focus-status (logand (-> (the-as process-focusable (if (type? s4-0 process-focusable)
(the-as process-focusable s4-0)
)
)
focus-status
)
(focus-status disable dead ignore grabbed)
)
)
)
)
(cmove-#f-nonzero s5-1 v1-33 s5-2)
)
s5-1
)
)
(if (or (time-elapsed? (-> this new-spin-time) (seconds 3))
(and (< (-> this spin-speed) 910.2222) (< (fabs (- (-> this spin-current) (-> this spin-dest))) 546.13336))
(cond
((and (as-type (handle->process (-> this focus handle)) process-focusable)
(not (logtest? (-> (the-as process-focusable (as-type (handle->process (-> this focus handle)) process-focusable))
focus-status
)
(focus-status disable dead ignore grabbed)
)
)
(neo-sat-method-209 this)
)
)
(else
(set! (-> this spin-dest) (-> this spin-current))
)
)
(if (or (time-elapsed? (-> this new-spin-time) (seconds 3))
(and (< (-> this spin-speed) 910.2222) (< (fabs (- (-> this spin-current) (-> this spin-dest))) 546.13336))
)
(neo-sat-method-209 this)
)
)
(else
(set! (-> this spin-dest) (-> this spin-current))
)
)
(vector-rotate-around-y! (new 'stack-no-clear 'vector) *z-vector* (-> this spin-dest))
@@ -3038,12 +3021,7 @@
(let ((f28-2 (vector-vector-xz-distance (-> this root trans) (-> this focus-pos)))
(s4-2 (the-as object #f))
)
(let* ((s3-4 (handle->process (-> this focus handle)))
(v1-98 (if (type? s3-4 process-focusable)
(the-as process-focusable s3-4)
)
)
)
(let ((v1-98 (as-type (handle->process (-> this focus handle)) process-focusable)))
(when v1-98
(let ((v1-99 (-> v1-98 root)))
(set! s4-2 (and v1-99 (logtest? (-> (the-as collide-shape-moving v1-99) status) (collide-status on-surface))))
@@ -3812,29 +3790,18 @@
)
)
(cond
((and (-> s3-0 best-other-tri collide-ptr) (let ((s2-0 (-> s3-0 best-other-tri collide-ptr)))
(if (type? s2-0 collide-shape-prim-sphere)
s2-0
)
)
((and (-> s3-0 best-other-tri collide-ptr)
(as-type (-> s3-0 best-other-tri collide-ptr) collide-shape-prim-sphere)
)
(let* ((s2-1 (-> s3-0 best-other-tri collide-ptr))
(s2-2 (-> (the-as collide-shape-prim-sphere (if (type? s2-1 collide-shape-prim-sphere)
(the-as collide-shape-prim-sphere s2-1)
)
)
cshape
process
)
)
(s1-0 (the-as object #f))
)
(let* ((s0-0 s2-2)
(v1-29 (if (type? s0-0 process-focusable)
s0-0
)
)
)
(let ((s2-2
(-> (the-as collide-shape-prim-sphere (as-type (-> s3-0 best-other-tri collide-ptr) collide-shape-prim-sphere))
cshape
process
)
)
(s1-0 (the-as object #f))
)
(let ((v1-29 (as-type s2-2 process-focusable)))
(when v1-29
(let ((v1-30 (-> v1-29 root)))
(set! s1-0 (and v1-30 (logtest? (-> (the-as collide-shape-moving v1-30) status) (collide-status on-surface))))
@@ -3908,22 +3875,16 @@
)
)
(cond
((and (-> s3-1 best-other-tri collide-ptr) (let ((s2-2 (-> s3-1 best-other-tri collide-ptr)))
(if (type? s2-2 collide-shape-prim-sphere)
s2-2
)
)
((and (-> s3-1 best-other-tri collide-ptr)
(as-type (-> s3-1 best-other-tri collide-ptr) collide-shape-prim-sphere)
)
(let* ((s2-3 (-> s3-1 best-other-tri collide-ptr))
(s2-4 (-> (the-as collide-shape-prim-sphere (if (type? s2-3 collide-shape-prim-sphere)
(the-as collide-shape-prim-sphere s2-3)
)
)
cshape
process
)
)
)
(let ((s2-4
(-> (the-as collide-shape-prim-sphere (as-type (-> s3-1 best-other-tri collide-ptr) collide-shape-prim-sphere))
cshape
process
)
)
)
(send-event
s2-4
'attack
@@ -4245,12 +4206,7 @@
;; INFO: Used lq/sq
;; WARN: Return type mismatch quaternion vs none.
(defmethod neo-sat-shield-method-25 ((this neo-sat-shield))
(let* ((s5-0 (ppointer->process (-> this parent)))
(a0-2 (if (type? s5-0 process-focusable)
s5-0
)
)
)
(let ((a0-2 (as-type (ppointer->process (-> this parent)) process-focusable)))
(vector-copy! (-> this root trans) (-> (the-as process-focusable a0-2) root trans))
)
(quaternion-identity! (-> this root quat))
+15 -41
View File
@@ -262,17 +262,9 @@
(set! (-> v1-0 nav callback-info) (-> v1-0 enemy-info callback-info))
)
0
(let* ((gp-0 (-> self nav state))
(s5-0 (handle->process (-> self transport)))
(v1-8 (get-trans
(the-as vehicle (if (type? s5-0 process-focusable)
(the-as vehicle s5-0)
)
)
0
)
)
)
(let ((gp-0 (-> self nav state))
(v1-8 (get-trans (the-as vehicle (as-type (handle->process (-> self transport)) process-focusable)) 0))
)
(logclear! (-> gp-0 flags) (nav-state-flag directional-mode))
(logior! (-> gp-0 flags) (nav-state-flag target-poly-dirty))
(vector-copy! (-> gp-0 target-pos) v1-8)
@@ -280,12 +272,7 @@
0
)
:trans (behavior ()
(let* ((gp-0 (handle->process (-> self transport)))
(a0-4 (if (type? gp-0 process-focusable)
gp-0
)
)
)
(let ((a0-4 (as-type (handle->process (-> self transport)) process-focusable)))
(cond
(a0-4
(set! (-> self root trans y) (compute-y-height (the-as process-focusable a0-4) (-> self root trans)))
@@ -398,18 +385,13 @@
(set! (-> v1-0 nav callback-info) (-> v1-0 enemy-info callback-info))
)
0
(let* ((gp-0 (-> self nav state))
(s5-0 compute-transport-approach-pt)
(s4-0 (handle->process (-> self transport)))
(v1-7 (s5-0
(the-as process-focusable (if (type? s4-0 process-focusable)
s4-0
)
)
(new 'stack-no-clear 'vector)
)
)
)
(let ((gp-0 (-> self nav state))
(v1-7 (compute-transport-approach-pt
(the-as process-focusable (as-type (handle->process (-> self transport)) process-focusable))
(new 'stack-no-clear 'vector)
)
)
)
(logclear! (-> gp-0 flags) (nav-state-flag directional-mode))
(logior! (-> gp-0 flags) (nav-state-flag target-poly-dirty))
(vector-copy! (-> gp-0 target-pos) v1-7)
@@ -431,18 +413,10 @@
(send-event (handle->process (-> self nav-sphere-handle)) 'die-fast)
)
:trans (behavior ()
(let ((gp-0 update-nav-sphere)
(s5-0 (-> self nav-sphere-handle))
(s4-0 (handle->process (-> self transport)))
)
(gp-0
s5-0
(the-as process-focusable (if (type? s4-0 process-focusable)
s4-0
)
)
(-> self root trans)
)
(update-nav-sphere
(-> self nav-sphere-handle)
(the-as process-focusable (as-type (handle->process (-> self transport)) process-focusable))
(-> self root trans)
)
(let ((t9-2 vector-vector-xz-distance)
(a0-5 (-> self root trans))
@@ -108,15 +108,7 @@
(let ((s5-0 0))
(b! #t cfg-16 :delay (nop!))
(label cfg-1)
(let ((s3-0 (handle->process (-> this units s5-0))))
(b!
(if (type? s3-0 process-focusable)
s3-0
)
cfg-15
:delay (empty-form)
)
)
(b! (as-type (handle->process (-> this units s5-0)) process-focusable) cfg-15 :delay (empty-form))
(format #t "was-squad-control::add-unit succeded~%")
(set! (-> this units s5-0) (process->handle arg0))
(b! #t cfg-18 :delay (nop!))
@@ -203,12 +195,7 @@
;; INFO: Used lq/sq
;; WARN: Return type mismatch int vs none.
(defmethod spawn-unit-offscreen ((this was-squad-control))
(let* ((s5-0 (handle->process (-> this alert-state target-status handle)))
(s4-0 (if (type? s5-0 process-focusable)
s5-0
)
)
)
(let ((s4-0 (as-type (handle->process (-> this alert-state target-status handle)) process-focusable)))
(when s4-0
(let ((s5-1 (new 'stack-no-clear 'inline-array 'matrix 4)))
(matrix-copy! (-> s5-1 0) (camera-matrix))
@@ -339,13 +326,9 @@
(if (not (-> this nav-mesh))
(set! (-> this nav-mesh) (get-nav-mesh (the-as actor-id #xa7d6)))
)
(let* ((s5-1 (new 'stack-no-clear 'inline-array 'matrix 2))
(s4-0 (handle->process (-> this alert-state target-status handle)))
(v1-8 (if (type? s4-0 process-focusable)
s4-0
)
)
)
(let ((s5-1 (new 'stack-no-clear 'inline-array 'matrix 2))
(v1-8 (as-type (handle->process (-> this alert-state target-status handle)) process-focusable))
)
(when v1-8
(vector-copy! (-> s5-1 0 uvec) (-> (the-as process-focusable v1-8) root trans))
(vector-copy! (-> s5-1 0 fvec) (-> (the-as process-focusable v1-8) root transv))
@@ -369,12 +352,7 @@
(set! (-> s5-1 1 rvec w) (- (vector-dot (-> s5-1 1 rvec) (-> s5-1 0 uvec))))
(set! (-> s5-1 1 uvec w) (- (vector-dot (-> s5-1 1 uvec) (-> s5-1 0 uvec))))
(dotimes (s4-1 10)
(let* ((s2-0 (handle->process (-> this units s4-1)))
(s3-0 (if (type? s2-0 process-focusable)
s2-0
)
)
)
(let ((s3-0 (as-type (handle->process (-> this units s4-1)) process-focusable)))
(when (and s3-0
(not (focus-test? (the-as process-focusable s3-0) dead))
(time-elapsed? (-> (the-as process-focusable s3-0) state-time) (seconds 2))
@@ -405,12 +383,7 @@
(s4-2 0)
)
(dotimes (s3-1 10)
(let* ((s2-1 (handle->process (-> this units s3-1)))
(v1-62 (if (type? s2-1 process-focusable)
s2-1
)
)
)
(let ((v1-62 (as-type (handle->process (-> this units s3-1)) process-focusable)))
(when v1-62
(+! s5-2 1)
(if (not (focus-test? (the-as process-focusable v1-62) dead))
@@ -423,12 +396,7 @@
(set! (-> this active-count) s4-2)
)
0
(let* ((s5-3 (handle->process (-> this alert-state target-status handle)))
(a1-20 (if (type? s5-3 process-focusable)
s5-3
)
)
)
(let ((a1-20 (as-type (handle->process (-> this alert-state target-status handle)) process-focusable)))
(cond
(a1-20
(let ((v1-71 (new 'stack-no-clear 'matrix)))
@@ -583,11 +551,7 @@
(defun-debug wvh ()
(execute-process-tree
*active-pool*
(lambda ((arg0 object)) (let ((a0-2 (if (type? arg0 wvehicle)
arg0
)
)
)
(lambda ((arg0 object)) (let ((a0-2 (as-type arg0 wvehicle)))
(if a0-2
(send-event (the-as process-tree a0-2) 'go-hostile *target*)
)
@@ -148,13 +148,9 @@
(move-by-vector! arg0 a1-1)
)
(vector-copy! (-> (the-as v-scorp-shot (-> arg0 process)) collide-normal) (-> arg1 best-other-tri normal))
(let* ((s5-1 (-> arg1 best-other-tri collide-ptr))
(v1-7 (if (type? s5-1 collide-shape-prim)
s5-1
)
)
(v0-2 4)
)
(let ((v1-7 (as-type (-> arg1 best-other-tri collide-ptr) collide-shape-prim))
(v0-2 4)
)
(cond
(v1-7
(set! v0-2 32)
+2 -12
View File
@@ -10,12 +10,7 @@
)
(set! (-> this camera-dist2) (vector-vector-distance-squared (-> this root trans) (camera-pos)))
(set! (-> this player-dist2) (vector-vector-distance-squared (-> this root trans) (target-pos 0)))
(let* ((s4-2 (handle->process (-> this target-status handle)))
(s5-2 (if (type? s4-2 process-focusable)
s4-2
)
)
)
(let ((s5-2 (as-type (handle->process (-> this target-status handle)) process-focusable)))
(when s5-2
(vector-copy! (-> this target-status position) (get-trans (the-as process-focusable s5-2) 3))
(vector-copy! (-> this target-status velocity) (get-transv (the-as process-focusable s5-2)))
@@ -109,12 +104,7 @@
(set! (-> gp-0 wheel-axis x) 0.0)
(let ((v1-38 (-> this ai-state)))
(b! (!= v1-38 1) cfg-45 :delay (empty-form))
(let* ((s4-0 (handle->process (-> this target-status handle)))
(a0-32 (if (type? s4-0 process-focusable)
s4-0
)
)
)
(let ((a0-32 (as-type (handle->process (-> this target-status handle)) process-focusable)))
(b! a0-32 cfg-39 :delay (empty-form))
(set! (-> gp-0 side-dir x) 1.0)
(b! #t cfg-64 :delay (nop!))
+1 -6
View File
@@ -400,12 +400,7 @@
:virtual #t
:code (behavior ()
(set-time! (-> self state-time))
(let* ((s5-0 (handle->process (-> self collector)))
(gp-0 (if (type? s5-0 process-focusable)
s5-0
)
)
)
(let ((gp-0 (as-type (handle->process (-> self collector)) process-focusable)))
(when gp-0
(if (logtest? (-> *part-group-id-table* 232 flags) (sp-group-flag sp13))
(part-tracker-spawn
+17 -53
View File
@@ -232,15 +232,9 @@
)
)
)
(let ((v1-11 gp-0))
(set! (-> v1-11 width) (the float 350))
)
(let ((v1-12 gp-0))
(set! (-> v1-12 height) (the float 80))
)
(let ((v1-13 gp-0))
(set! (-> v1-13 scale) (* 0.7 f30-0))
)
(set-width! gp-0 350)
(set-height! gp-0 80)
(set-scale! gp-0 (* 0.7 f30-0))
(set! (-> gp-0 flags) (font-flags shadow kerning large))
(print-game-text
(lookup-text! *common-text* (text-id press-to-use) #f)
@@ -255,9 +249,7 @@
(set! (-> a0-11 color) (font-color cyan))
)
(+! (-> gp-0 origin y) (the float (the int (* 30.0 f30-0))))
(let ((v1-20 gp-0))
(set! (-> v1-20 scale) (* 0.6 f30-0))
)
(set-scale! gp-0 (* 0.6 f30-0))
(print-game-text (lookup-text! *common-text* a1-4 #f) gp-0 #f 44 (bucket-id hud-draw-hud-alpha))
)
)
@@ -290,24 +282,16 @@
)
)
)
(let ((v1-7 gp-0))
(set! (-> v1-7 width) (the float 350))
)
(let ((v1-8 gp-0))
(set! (-> v1-8 height) (the float 80))
)
(let ((v1-9 gp-0))
(set! (-> v1-9 scale) (* 0.7 f30-0))
)
(set-width! gp-0 350)
(set-height! gp-0 80)
(set-scale! gp-0 (* 0.7 f30-0))
(set! (-> gp-0 flags) (font-flags shadow kerning large))
(let ((a1-1 (-> this info name-text)))
(when (nonzero? a1-1)
(let ((a0-8 gp-0))
(set! (-> a0-8 color) (font-color cyan))
)
(let ((v1-14 gp-0))
(set! (-> v1-14 scale) (* 0.6 f30-0))
)
(set-scale! gp-0 (* 0.6 f30-0))
(print-game-text (lookup-text! *common-text* a1-1 #f) gp-0 #f 44 (bucket-id hud-draw-hud-alpha))
)
)
@@ -355,17 +339,12 @@
(set! (-> gp-0 float00) (the-as float #x7f800000))
(set! (-> gp-0 byte00) -1)
(dotimes (s3-0 (-> this info rider attach-point-count))
(let ((s2-0 (handle->process (-> this attached-array s3-0))))
(when (not (if (type? s2-0 process-focusable)
s2-0
)
)
(wvehicle-method-171 this (-> gp-0 vec00) s3-0)
(set! (-> gp-0 float01) (vector-vector-distance-squared arg0 (-> gp-0 vec00)))
(when (< (-> gp-0 float01) (-> gp-0 float00))
(set! (-> gp-0 float00) (-> gp-0 float01))
(set! (-> gp-0 byte00) s3-0)
)
(when (not (as-type (handle->process (-> this attached-array s3-0)) process-focusable))
(wvehicle-method-171 this (-> gp-0 vec00) s3-0)
(set! (-> gp-0 float01) (vector-vector-distance-squared arg0 (-> gp-0 vec00)))
(when (< (-> gp-0 float01) (-> gp-0 float00))
(set! (-> gp-0 float00) (-> gp-0 float01))
(set! (-> gp-0 byte00) s3-0)
)
)
)
@@ -376,12 +355,7 @@
;; definition for method 174 of type wvehicle
;; WARN: Return type mismatch process vs process-focusable.
(defmethod get-attached-by-idx ((this wvehicle) (arg0 int))
(let ((gp-0 (handle->process (-> this attached-array arg0))))
(the-as process-focusable (if (type? gp-0 process-focusable)
gp-0
)
)
)
(the-as process-focusable (as-type (handle->process (-> this attached-array arg0)) process-focusable))
)
;; definition for method 175 of type wvehicle
@@ -940,12 +914,7 @@
(defstate idle (kill-player-process)
:virtual #t
:trans (behavior ()
(let* ((s5-0 (handle->process (-> self player)))
(gp-0 (if (type? s5-0 process-focusable)
s5-0
)
)
)
(let ((gp-0 (as-type (handle->process (-> self player)) process-focusable)))
(if (not gp-0)
(go-virtual die)
)
@@ -1005,12 +974,7 @@
;; WARN: Return type mismatch int vs none.
(defmethod vehicle-method-116 ((this wvehicle) (arg0 symbol))
(dotimes (s4-0 (-> this info rider seat-count))
(let* ((s3-0 (handle->process (-> this rider-array s4-0)))
(a1-3 (if (type? s3-0 process-focusable)
s3-0
)
)
)
(let ((a1-3 (as-type (handle->process (-> this rider-array s4-0)) process-focusable)))
(when (and a1-3 (logtest? (-> a1-3 mask) (process-mask target)))
(set! (-> this v-flags) (the-as vehicle-flag (logior (vehicle-flag player-killed) (-> this v-flags))))
(kill-player-process-spawn a1-3 a1-3 arg0)
+3 -18
View File
@@ -291,12 +291,7 @@
)
(new 'stack-no-clear 'vector)
(dotimes (s5-0 (-> this info rider attach-point-count))
(let* ((s3-0 (handle->process (-> this attached-array s5-0)))
(s4-0 (if (type? s3-0 process-focusable)
s3-0
)
)
)
(let ((s4-0 (as-type (handle->process (-> this attached-array s5-0)) process-focusable)))
(when (and s4-0 (focus-test? (the-as process-focusable s4-0) pilot-riding))
(wvehicle-method-171 this (-> (the-as process-focusable s4-0) root trans) s5-0)
(wvehicle-method-172 this (-> (the-as process-focusable s4-0) root quat) s5-0)
@@ -1022,12 +1017,7 @@
)
(('touched)
(when (zero? (-> (the-as process-drawable arg0) rbody))
(let* ((s5-0 arg0)
(v1-10 (if (type? s5-0 process-focusable)
s5-0
)
)
)
(let ((v1-10 (as-type arg0 process-focusable)))
(when (and v1-10
(logtest? (-> v1-10 mask) (process-mask target))
(logtest? (vehicle-flag waiting-for-player) (-> this v-flags))
@@ -1184,12 +1174,7 @@
)
)
(('ai-set-target-process)
(let* ((s5-7 (-> arg3 param 0))
(a0-77 (if (type? s5-7 process-drawable)
s5-7
)
)
)
(let ((a0-77 (as-type (-> arg3 param 0) process-drawable)))
(cond
((the-as uint a0-77)
(set! v0-0 (process->handle (the-as uint a0-77)))
+1 -6
View File
@@ -125,12 +125,7 @@
(-> arg2 traffic-hash-id)
)
)
(let* ((s2-0 (-> s3-1 s4-1))
(v1-70 (if (type? s2-0 hvehicle)
(the-as hvehicle s2-0)
)
)
)
(let ((v1-70 (as-type (-> s3-1 s4-1) hvehicle)))
(when (and v1-70 (not (logtest? (-> v1-70 v-flags) (vehicle-flag dead))) (nonzero? (-> v1-70 flight-level-index)))
(vector-copy! (-> gp-0 lift-dir) (-> v1-70 root trans))
(vector-copy! (-> gp-0 normal) (-> v1-70 root transv))
+1 -5
View File
@@ -323,11 +323,7 @@
(.mov a0-10 vf3)
(let ((s4-0 (-> v1-23 process)))
(b! (< f0-2 a0-10) cfg-27)
(let ((a1-29 (if (type? s4-0 process-focusable)
s4-0
)
)
)
(let ((a1-29 (as-type s4-0 process-focusable)))
(if a1-29
(push-focus this (the-as process-focusable a1-29))
)
+20 -43
View File
@@ -572,13 +572,9 @@
)
)
(vector+float*! s4-1 (-> s5-0 start-pos) (-> s5-0 move-dist) f28-0)
(let* ((s5-1 (-> s5-0 best-other-tri collide-ptr))
(s3-0 (if (type? s5-1 collide-shape-prim)
s5-1
)
)
(s5-2 (new 'stack-no-clear 'vector))
)
(let ((s3-0 (as-type (-> s5-0 best-other-tri collide-ptr) collide-shape-prim))
(s5-2 (new 'stack-no-clear 'vector))
)
(vector-copy! s5-2 s4-1)
(vector+float*! s5-2 s5-2 (-> (math-camera-matrix) fvec) -2048.0)
(if (and s3-0
@@ -609,12 +605,7 @@
;; INFO: Used lq/sq
;; WARN: Return type mismatch int vs none.
(defbehavior turret-post fac-robotank-turret ()
(let* ((s5-0 *target*)
(gp-0 (if (type? s5-0 process-focusable)
s5-0
)
)
)
(let ((gp-0 (the-as target (as-type *target* process-focusable))))
(cond
((and (logtest? (-> self flags) (fac-robotank-turret-flag frt0)) gp-0)
(if (logtest? (-> self flags) (fac-robotank-turret-flag frt9))
@@ -858,16 +849,12 @@
(if (logtest? (-> self flags) (fac-robotank-turret-flag frt4))
(set-time! (-> self gun-timer))
)
(let ((gp-0 *target*))
(if (and (if (type? gp-0 process-focusable)
gp-0
)
(or (not (logtest? (-> self flags) (fac-robotank-turret-flag frt9))) (should-check-los? (-> self los) 0))
(time-elapsed? (-> self gun-timer) (seconds 1))
)
(go-virtual fire)
)
)
(if (and (the-as target (as-type *target* process-focusable))
(or (not (logtest? (-> self flags) (fac-robotank-turret-flag frt9))) (should-check-los? (-> self los) 0))
(time-elapsed? (-> self gun-timer) (seconds 1))
)
(go-virtual fire)
)
)
:code (behavior ()
(until #f
@@ -888,12 +875,7 @@
:event robotank-turret-handler
:enter (behavior ()
(logior! (-> self flags) (fac-robotank-turret-flag frt8))
(let* ((gp-0 *target*)
(a0-1 (if (type? gp-0 process-focusable)
gp-0
)
)
)
(let ((a0-1 (the-as target (as-type *target* process-focusable))))
(when a0-1
(set! (-> self aim-pos 0 quad) (-> (get-trans a0-1 0) quad))
(vector-copy! (-> self aim-pos 1) (-> self aim-pos 0))
@@ -902,20 +884,15 @@
)
)
:trans (behavior ()
(let ((gp-0 *target*))
(when (or (not (if (type? gp-0 process-focusable)
gp-0
)
)
(and (logtest? (-> self flags) (fac-robotank-turret-flag frt9))
(not (logtest? (-> self flags) (fac-robotank-turret-flag frt3)))
(los-control-method-11 (-> self los) 0)
)
(logtest? (-> self flags) (fac-robotank-turret-flag frt4))
)
(logclear! (-> self flags) (fac-robotank-turret-flag frt8))
(go-virtual ready)
)
(when (or (not (the-as target (as-type *target* process-focusable)))
(and (logtest? (-> self flags) (fac-robotank-turret-flag frt9))
(not (logtest? (-> self flags) (fac-robotank-turret-flag frt3)))
(los-control-method-11 (-> self los) 0)
)
(logtest? (-> self flags) (fac-robotank-turret-flag frt4))
)
(logclear! (-> self flags) (fac-robotank-turret-flag frt8))
(go-virtual ready)
)
)
:code (behavior ()
+3 -18
View File
@@ -420,12 +420,7 @@
)
0.0
(when (and (or (< f0-32 f26-0) (< f26-0 f1-13)) (time-elapsed? (-> self buzz-timer) (the int (/ f28-1 2))))
(let* ((gp-1 *target*)
(a0-37 (if (type? gp-1 process-focusable)
gp-1
)
)
)
(let ((a0-37 (the-as target (as-type *target* process-focusable))))
(if a0-37
(lerp-scale 1.0 0.0 (vector-vector-distance (-> self root trans) (get-trans a0-37 0)) 81920.0 327680.0)
)
@@ -585,12 +580,7 @@
(if (not *target*)
(go-virtual die)
)
(let* ((gp-0 *target*)
(a0-1 (if (type? gp-0 process-focusable)
gp-0
)
)
)
(let ((a0-1 (the-as target (as-type *target* process-focusable))))
(when a0-1
(if (< (-> (get-trans a0-1 0) y) (+ -18432.0 (-> self root trans y)))
(go-virtual die)
@@ -611,12 +601,7 @@
)
:post (behavior ()
(when (logtest? (-> self flags) (robotank-flag r2))
(let* ((gp-0 *target*)
(a0-1 (if (type? gp-0 process-focusable)
gp-0
)
)
)
(let ((a0-1 (the-as target (as-type *target* process-focusable))))
(cond
(a0-1
(get-trans a0-1 0)
+3 -18
View File
@@ -734,19 +734,9 @@
(set! (-> s5-0 w) 409600.0)
(let ((s4-0 (new 'stack-no-clear 'array 'collide-shape 384)))
(countdown (s3-0 (fill-actor-list-for-box *actor-hash* s5-0 s4-0 384))
(let* ((s2-0 (-> s4-0 s3-0))
(v1-5 (if (type? s2-0 collide-shape)
s2-0
)
)
)
(let ((v1-5 (as-type (-> s4-0 s3-0) collide-shape)))
(when v1-5
(let* ((s1-0 (-> v1-5 process))
(s2-1 (if (type? s1-0 process-focusable)
s1-0
)
)
)
(let ((s2-1 (as-type (-> v1-5 process) process-focusable)))
(when s2-1
(if (and (!= *target* s2-1)
(!= this s2-1)
@@ -761,12 +751,7 @@
)
)
)
(let* ((s3-1 *target*)
(s4-1 (if (type? s3-1 process-focusable)
s3-1
)
)
)
(let ((s4-1 (the-as target (as-type *target* process-focusable))))
(when (and s4-1 (< (vector-vector-distance (get-trans s4-1 0) s5-0) (-> s5-0 w)))
(if (and (!= *target* s4-1)
(!= this s4-1)
+2 -12
View File
@@ -874,12 +874,7 @@
(local-vars (v0-1 object))
(case arg2
(('child-jumped)
(let* ((gp-0 arg0)
(v1-1 (if (type? gp-0 nav-enemy)
gp-0
)
)
)
(let ((v1-1 (as-type arg0 nav-enemy)))
(when v1-1
(set! v0-1 (logclear (-> (the-as nav-enemy v1-1) enemy-flags) (enemy-flag directed)))
(set! (-> (the-as nav-enemy v1-1) enemy-flags) (the-as enemy-flag v0-1))
@@ -1488,12 +1483,7 @@
:enter (behavior ()
(logior! (-> self draw status) (draw-control-status no-draw))
(dotimes (gp-0 8)
(let* ((s5-0 (handle->process (-> self critter gp-0 handle)))
(a0-5 (if (type? s5-0 process-focusable)
s5-0
)
)
)
(let ((a0-5 (as-type (handle->process (-> self critter gp-0 handle)) process-focusable)))
(if a0-5
(send-event a0-5 'die-fast)
)
+4 -12
View File
@@ -1469,13 +1469,9 @@
(go-virtual die-fast)
)
(('touched)
(let ((gp-0 arg0))
(when (if (type? gp-0 vehicle)
gp-0
)
(sound-play "light-explode" :position (-> self root trans))
(go-virtual retract)
)
(when (as-type arg0 vehicle)
(sound-play "light-explode" :position (-> self root trans))
(go-virtual retract)
)
)
(('attack)
@@ -1483,11 +1479,7 @@
(when (or (and (logtest? (-> v1-8 mask) (attack-mask attacker))
(= (-> (handle->process (-> v1-8 attacker)) type) target)
)
(let ((gp-2 arg0))
(if (type? gp-2 warf-projectile)
gp-2
)
)
(as-type arg0 warf-projectile)
)
(sound-play "light-explode" :position (-> self root trans))
(go-virtual retract)
+2 -16
View File
@@ -40,12 +40,7 @@
;; WARN: Return type mismatch object vs none.
(defmethod task-manager-method-26 ((this task-manager-factory-assault))
(when (< -1 (-> this explode-car-time))
(let* ((s4-0 (handle->process (-> *vehicle-info* handle-by-vehicle-type 21)))
(s5-0 (if (type? s4-0 process-focusable)
(the-as process-focusable s4-0)
)
)
)
(let ((s5-0 (as-type (handle->process (-> *vehicle-info* handle-by-vehicle-type 21)) process-focusable)))
(when s5-0
(cond
((and (or (focus-test? s5-0 dead) (< 245760.0 (- (-> (target-pos 0) y) (-> s5-0 root trans y))))
@@ -86,12 +81,7 @@
(task-close! "factory-assault-get-vehicle")
)
(when (and (> (-> this explode-car-time) 0) (< (-> this explode-car-time) (current-time)))
(let* ((s4-1 (handle->process (-> *vehicle-info* handle-by-vehicle-type 21)))
(s5-1 (if (type? s4-1 process-focusable)
s4-1
)
)
)
(let ((s5-1 (as-type (handle->process (-> *vehicle-info* handle-by-vehicle-type 21)) process-focusable)))
(when s5-1
(cond
((-> this region-hack)
@@ -169,7 +159,3 @@
((method-of-type task-manager set-time-limit) this)
(none)
)
+5 -30
View File
@@ -126,12 +126,7 @@
)
)
(let ((gp-2 (new 'stack 'joint-exploder-tuning (the-as uint 1))))
(let* ((s5-0 *target*)
(a0-14 (if (type? s5-0 process-focusable)
s5-0
)
)
)
(let ((a0-14 (the-as target (as-type *target* process-focusable))))
(when a0-14
(vector-copy! (-> gp-2 fountain-rand-transv-lo) (get-trans a0-14 0))
(+! (-> gp-2 fountain-rand-transv-lo y) 16384.0)
@@ -337,12 +332,7 @@
)
0
(let ((gp-0 (new 'stack 'joint-exploder-tuning (the-as uint 1))))
(let* ((s5-0 *target*)
(s4-0 (if (type? s5-0 process-focusable)
s5-0
)
)
)
(let ((s4-0 (the-as target (as-type *target* process-focusable))))
(when s4-0
(let ((s5-1 (get-trans s4-0 0))
(s3-1 (vector-! (new 'stack-no-clear 'vector) (get-trans s4-0 0) (-> self root trans)))
@@ -509,12 +499,7 @@
)
0
(let ((gp-0 (new 'stack 'joint-exploder-tuning (the-as uint 1))))
(let* ((s5-0 *target*)
(s4-0 (if (type? s5-0 process-focusable)
s5-0
)
)
)
(let ((s4-0 (the-as target (as-type *target* process-focusable))))
(when s4-0
(let ((s5-1 (get-trans s4-0 0))
(s3-1 (vector-! (new 'stack-no-clear 'vector) (get-trans s4-0 0) (-> self root trans)))
@@ -730,12 +715,7 @@
)
0
(let ((gp-0 (new 'stack 'joint-exploder-tuning (the-as uint 1))))
(let* ((s5-0 *target*)
(s4-0 (if (type? s5-0 process-focusable)
s5-0
)
)
)
(let ((s4-0 (the-as target (as-type *target* process-focusable))))
(when s4-0
(let ((s5-1 (get-trans s4-0 0))
(s3-1 (vector-! (new 'stack-no-clear 'vector) (get-trans s4-0 0) (-> self root trans)))
@@ -1444,12 +1424,7 @@
(go-virtual spindown)
)
(('touch)
(let* ((s4-0 proc)
(gp-0 (if (type? s4-0 process-focusable)
s4-0
)
)
)
(let ((gp-0 (as-type proc process-focusable)))
(when (and gp-0 (= (-> gp-0 type) target) ((method-of-type touching-shapes-entry prims-touching?)
(the-as touching-shapes-entry (-> block param 0))
(-> self root)
+3 -7
View File
@@ -947,13 +947,9 @@
:virtual #t
:enter (behavior ()
(process-entity-status! self (entity-perm-status subtask-complete) #t)
(let* ((gp-0 (new 'stack 'joint-exploder-tuning (the-as uint 1)))
(s5-0 *target*)
(a0-3 (if (type? s5-0 process-focusable)
s5-0
)
)
)
(let ((gp-0 (new 'stack 'joint-exploder-tuning (the-as uint 1)))
(a0-3 (the-as target (as-type *target* process-focusable)))
)
(when a0-3
(get-trans a0-3 0)
(let ((s5-1 (-> *target* control transv)))
+7 -16
View File
@@ -353,16 +353,12 @@
(init-vf0-vector)
(let ((s4-0 (vector<-cspace! (new 'stack-no-clear 'vector) (joint-node missile-bot-lod0-jg main))))
(vector-copy! arg0 s4-0)
(let* ((s5-1 (vector-! (new 'stack-no-clear 'vector) s4-0 (target-pos 0)))
(s2-0 (ppointer->process (-> self parent)))
(s3-1 (if (type? s2-0 factory-boss)
s2-0
)
)
(s0-0 (new 'stack-no-clear 'vector))
(s2-1 (new 'stack-no-clear 'vector))
(s1-0 (new 'stack-no-clear 'vector))
)
(let ((s5-1 (vector-! (new 'stack-no-clear 'vector) s4-0 (target-pos 0)))
(s3-1 (as-type (ppointer->process (-> self parent)) factory-boss))
(s0-0 (new 'stack-no-clear 'vector))
(s2-1 (new 'stack-no-clear 'vector))
(s1-0 (new 'stack-no-clear 'vector))
)
(when s3-1
(set! (-> s5-1 y) 0.0)
(vector-normalize! s5-1 1.0)
@@ -747,12 +743,7 @@
(set! (-> self initial-y) (-> self root trans y))
(set! (-> self explosion-sound-index) 0)
(set! (-> self will-hit-errol) #f)
(let* ((gp-0 (ppointer->process (-> self parent)))
(v1-3 (if (type? gp-0 factory-boss)
gp-0
)
)
)
(let ((v1-3 (as-type (ppointer->process (-> self parent)) factory-boss)))
(when v1-3
(let ((f0-2 (vector-vector-xz-distance-squared (-> self root trans) (-> v1-3 root trans)))
(f1-0 20480.0)
+3 -18
View File
@@ -640,19 +640,9 @@
(defmethod warf-projectile-method-43 ((this warf-projectile))
(let ((s5-0 (new 'stack-no-clear 'array 'collide-shape 384)))
(countdown (s4-0 (fill-actor-list-for-box *actor-hash* (-> this hit-pos) s5-0 384))
(let* ((s3-0 (-> s5-0 s4-0))
(v1-3 (if (type? s3-0 collide-shape)
s3-0
)
)
)
(let ((v1-3 (as-type (-> s5-0 s4-0) collide-shape)))
(when v1-3
(let* ((s3-1 (-> v1-3 process))
(a1-3 (if (type? s3-1 process-focusable)
s3-1
)
)
)
(let ((a1-3 (as-type (-> v1-3 process) process-focusable)))
(when a1-3
(if (and (!= *target* a1-3)
(not (logtest? (-> (the-as process-focusable a1-3) focus-status) (focus-status disable dead inactive)))
@@ -665,12 +655,7 @@
)
)
)
(let* ((s4-1 *target*)
(s5-1 (if (type? s4-1 process-focusable)
s4-1
)
)
)
(let ((s5-1 (the-as target (as-type *target* process-focusable))))
(when (and s5-1 (< (vector-vector-distance (get-trans s5-1 0) (-> this hit-pos)) (-> this hit-pos w)))
(if (and (!= *target* s5-1) (not (logtest? (-> s5-1 focus-status) (focus-status disable dead inactive))))
(send-attack this s5-1)
+2 -12
View File
@@ -233,12 +233,7 @@
)
(let ((s3-2 (-> *minimap* engine alive-list)))
(while s3-2
(let ((s2-1 (handle->process (-> s3-2 handle))))
(set! sv-100 (if (type? s2-1 process-focusable)
(the-as process-focusable s2-1)
)
)
)
(set! sv-100 (as-type (handle->process (-> s3-2 handle)) process-focusable))
(when (and sv-100
(logtest? (process-mask enemy) (-> sv-100 mask))
(not (focus-test? sv-100 disable dead ignore inactive turret))
@@ -922,12 +917,7 @@
:code sleep-code
:post (behavior ()
(vector<-cspace! (-> self muzzle-pos) (joint-node for-turret-lod0-jg rightbarrel))
(let* ((s5-0 (handle->process (-> self focus-handle)))
(gp-0 (if (type? s5-0 process-focusable)
s5-0
)
)
)
(let ((gp-0 (as-type (handle->process (-> self focus-handle)) process-focusable)))
(when gp-0
(let ((s5-1 (new 'stack-no-clear 'vector)))
(vector-copy! s5-1 (get-trans (the-as process-focusable gp-0) 0))
+2 -12
View File
@@ -416,24 +416,14 @@
(when a0-9
(cond
((focus-test? a0-9 board)
(let* ((s4-0 (handle->process (-> this hud-green-eco)))
(s5-0 (if (type? s4-0 hud)
s4-0
)
)
)
(let ((s5-0 (as-type (handle->process (-> this hud-green-eco)) hud)))
(if (and s5-0 (hidden? (the-as hud s5-0)))
(send-event s5-0 'force-show)
)
)
)
(else
(let* ((s4-1 (handle->process (-> this hud-green-eco)))
(s5-1 (if (type? s4-1 hud)
s4-1
)
)
)
(let ((s5-1 (as-type (handle->process (-> this hud-green-eco)) hud)))
(if (and s5-1 (not (hidden? (the-as hud s5-1))))
(send-event s5-1 'force-hide)
)
+4 -15
View File
@@ -35,15 +35,9 @@
(new 'stack 'font-context *font-default-matrix* 20 320 0.0 (font-color default) (font-flags shadow kerning))
)
)
(let ((v1-1 gp-0))
(set! (-> v1-1 width) (the float 500))
)
(let ((v1-2 gp-0))
(set! (-> v1-2 height) (the float 80))
)
(let ((v1-3 gp-0))
(set! (-> v1-3 scale) 0.7)
)
(set-width! gp-0 500)
(set-height! gp-0 80)
(set-scale! gp-0 0.7)
(set! (-> gp-0 flags) (font-flags shadow kerning large))
(print-game-text
(lookup-text! *common-text* (text-id text-044f) #f)
@@ -130,12 +124,7 @@
)
)
)
(let* ((s5-0 arg0)
(a0-2 (if (type? s5-0 process-focusable)
s5-0
)
)
)
(let ((a0-2 (as-type arg0 process-focusable)))
(if a0-2
(send-event
a0-2
+8 -32
View File
@@ -1060,12 +1060,7 @@
(when (and *target* (focus-test? *target* pilot) (cpad-hold? 0 triangle) (cpad-pressed? 0 r1))
(set! (-> this editing?) #t)
(let ((s5-0 (new 'stack 'glider-ring-info)))
(let* ((s3-0 (handle->process (-> *target* pilot vehicle)))
(s4-0 (if (type? s3-0 hvehicle)
(the-as hvehicle s3-0)
)
)
)
(let ((s4-0 (as-type (handle->process (-> *target* pilot vehicle)) hvehicle)))
(b! (not s4-0) cfg-86 :delay (nop!))
(vector-copy! (-> s5-0 pos) (-> s4-0 rbody matrix trans))
(vector-copy! (-> s5-0 forw) (-> s4-0 rbody matrix fvec))
@@ -1103,12 +1098,7 @@
)
(set! (-> this editing?) #t)
(let ((s5-1 (new 'stack 'glider-thermal-info)))
(let* ((s4-1 (handle->process (-> *target* pilot vehicle)))
(v1-85 (if (type? s4-1 hvehicle)
(the-as hvehicle s4-1)
)
)
)
(let ((v1-85 (as-type (handle->process (-> *target* pilot vehicle)) hvehicle)))
(b! (not v1-85) cfg-86 :delay (nop!))
(vector-copy! (-> s5-1 pos) (-> v1-85 rbody matrix trans))
(set! (-> s5-1 pos w) 40960.0)
@@ -1142,14 +1132,10 @@
(set! *desert-glide-num-thermals* (+ *desert-glide-num-thermals* 1))
)
(when (-> this creating-thermal?)
(let* ((s5-2 (-> *desert-glide-thermals-tmp* (+ *thermal-spawn-id* -1)))
(s4-2 (handle->process (-> *target* pilot vehicle)))
(s3-1 (if (type? s4-2 hvehicle)
(the-as hvehicle s4-2)
)
)
(s4-3 (new 'stack-no-clear 'vector))
)
(let ((s5-2 (-> *desert-glide-thermals-tmp* (+ *thermal-spawn-id* -1)))
(s3-1 (as-type (handle->process (-> *target* pilot vehicle)) hvehicle))
(s4-3 (new 'stack-no-clear 'vector))
)
0.0
0.0
(b! (not s3-1) cfg-86 :delay (nop!))
@@ -1248,12 +1234,7 @@
;; WARN: Return type mismatch int vs none.
(defmethod task-manager-desert-glide-method-37 ((this task-manager-desert-glide) (arg0 h-glider))
(when (and *target* (focus-test? *target* pilot))
(let* ((s4-0 (handle->process (-> *target* pilot vehicle)))
(v1-8 (if (type? s4-0 hvehicle)
s4-0
)
)
)
(let ((v1-8 (as-type (handle->process (-> *target* pilot vehicle)) hvehicle)))
0.0
(let* ((f0-1 81920000.0)
(f30-0 (* f0-1 f0-1))
@@ -1432,12 +1413,7 @@
)
(set! (-> this reset-too-low?) #f)
(when (and *target* (focus-test? *target* pilot))
(let* ((s4-0 (handle->process (-> *target* pilot vehicle)))
(s5-1 (if (type? s4-0 hvehicle)
s4-0
)
)
)
(let ((s5-1 (as-type (handle->process (-> *target* pilot vehicle)) hvehicle)))
(when (and s5-1
(let ((f0-0
(vector-vector-distance-squared (-> (the-as hvehicle s5-1) rbody matrix trans) *desert-glide-finish-sphere*)
+1 -6
View File
@@ -383,12 +383,7 @@
)
)
(('touched)
(let* ((s4-0 (-> (the-as process-drawable arg0) root))
(gp-2 (if (type? s4-0 collide-shape-moving)
(the-as collide-shape-moving s4-0)
)
)
)
(let ((gp-2 (as-type (-> (the-as process-drawable arg0) root) collide-shape-moving)))
(when gp-2
(let ((s4-1 (new 'stack-no-clear 'inline-array 'vector 2)))
(vector-copy! (-> s4-1 0) (-> gp-2 trans))

Some files were not shown because too many files have changed in this diff Show More