mirror of
https://github.com/open-goal/jak-project
synced 2026-08-06 18:03:30 -04:00
jak1: clean up all dummy methods (#2457)
Cleans up every `dummy-*` and `TODO-RENAME-*` method up with either proper names or by renaming them to `[type-name]-method-[method-id]` similar to Jak 2's `all-types`. Also fixes the bad format string in `collide-cache` and adds the event handler hack to Jak 1. The game boots and runs fine, but I might have missed a PAL patch or other manual patches here and there, please double-check if possible.
This commit is contained in:
@@ -746,6 +746,11 @@ void SSA::make_vars(const Function& function, const DecompilerTypeSystem& dts) {
|
||||
function.guessed_name.to_string() == "(method 74 crimson-guard)";
|
||||
}
|
||||
|
||||
if (function.ir2.env.version == GameVersion::Jak1) {
|
||||
event_handler_hack = function.guessed_name.is_event_handler() ||
|
||||
function.guessed_name.to_string() == "target-generic-event-handler";
|
||||
}
|
||||
|
||||
for (int block_id = 0; block_id < int(blocks.size()); block_id++) {
|
||||
const auto& block = blocks.at(block_id);
|
||||
const TypeState* init_types = &function.ir2.env.get_types_at_block_entry(block_id);
|
||||
|
||||
+379
-379
File diff suppressed because it is too large
Load Diff
@@ -337,7 +337,8 @@
|
||||
"~0k~5d/~d ~6d/~d ~6d/~d ": 6,
|
||||
"~0k~s~%": 1,
|
||||
"money ~A was killed in pickup~%": 0,
|
||||
" id address name aid tsk lev status x y z address name state heap flags~%": 3
|
||||
" id address name aid tsk lev status x y z address name state heap flags~%": 3,
|
||||
"ERROR: Exceeded max # of spheres in collide-cache::probe-using-spheres!~": 0
|
||||
},
|
||||
|
||||
"blocks_ending_in_asm_branch": {
|
||||
|
||||
@@ -105,15 +105,15 @@
|
||||
:size-assert #x210
|
||||
:flag-assert #x1d01a00210
|
||||
(:methods
|
||||
(TODO-RENAME-20 (_type_ joint-exploder-list int) int 20)
|
||||
(TODO-RENAME-21 (_type_ joint-exploder-list joint-exploder-joint) none 21)
|
||||
(TODO-RENAME-22 (_type_ joint-exploder-list) symbol 22)
|
||||
(TODO-RENAME-23 (_type_) symbol 23)
|
||||
(TODO-RENAME-24 (_type_ joint-exploder-list int) int 24)
|
||||
(TODO-RENAME-25 (_type_ joint-exploder-list) symbol 25)
|
||||
(TODO-RENAME-26 (_type_ joint-exploder-list int) int 26)
|
||||
(TODO-RENAME-27 (_type_ joint-exploder-list int) joint-exploder-list 27)
|
||||
(TODO-RENAME-28 (_type_ joint-exploder-list) none 28)
|
||||
(joint-exploder-method-20 (_type_ joint-exploder-list int) int 20)
|
||||
(joint-exploder-method-21 (_type_ joint-exploder-list joint-exploder-joint) none 21)
|
||||
(joint-exploder-method-22 (_type_ joint-exploder-list) symbol 22)
|
||||
(joint-exploder-method-23 (_type_) symbol 23)
|
||||
(joint-exploder-method-24 (_type_ joint-exploder-list int) int 24)
|
||||
(joint-exploder-method-25 (_type_ joint-exploder-list) symbol 25)
|
||||
(joint-exploder-method-26 (_type_ joint-exploder-list int) int 26)
|
||||
(joint-exploder-method-27 (_type_ joint-exploder-list int) joint-exploder-list 27)
|
||||
(joint-exploder-method-28 (_type_ joint-exploder-list) none 28)
|
||||
)
|
||||
(:states
|
||||
joint-exploder-shatter
|
||||
@@ -157,8 +157,8 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod TODO-RENAME-24 joint-exploder ((obj joint-exploder) (arg0 joint-exploder-list) (arg1 int))
|
||||
(let ((v0-0 (TODO-RENAME-26 obj arg0 arg1)))
|
||||
(defmethod joint-exploder-method-24 joint-exploder ((obj joint-exploder) (arg0 joint-exploder-list) (arg1 int))
|
||||
(let ((v0-0 (joint-exploder-method-26 obj arg0 arg1)))
|
||||
(let* ((v1-1 (-> obj joints))
|
||||
(v1-2 (-> v1-1 joint arg1))
|
||||
)
|
||||
@@ -171,7 +171,7 @@
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod TODO-RENAME-26 joint-exploder ((obj joint-exploder) (arg0 joint-exploder-list) (arg1 int))
|
||||
(defmethod joint-exploder-method-26 joint-exploder ((obj joint-exploder) (arg0 joint-exploder-list) (arg1 int))
|
||||
(let* ((v1-0 (-> obj joints))
|
||||
(a2-1 (-> v1-0 joint arg1))
|
||||
(a0-4 (-> a2-1 prev))
|
||||
@@ -202,7 +202,7 @@
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod TODO-RENAME-20 joint-exploder ((obj joint-exploder) (arg0 joint-exploder-list) (arg1 int))
|
||||
(defmethod joint-exploder-method-20 joint-exploder ((obj joint-exploder) (arg0 joint-exploder-list) (arg1 int))
|
||||
(let* ((v1-0 (-> obj joints))
|
||||
(a3-0 (-> v1-0 joint arg1))
|
||||
(a0-4 (-> arg0 head))
|
||||
@@ -217,7 +217,7 @@
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod TODO-RENAME-21 joint-exploder ((obj joint-exploder) (arg0 joint-exploder-list) (arg1 joint-exploder-joint))
|
||||
(defmethod joint-exploder-method-21 joint-exploder ((obj joint-exploder) (arg0 joint-exploder-list) (arg1 joint-exploder-joint))
|
||||
(let ((a1-1 (-> arg1 mat vector 3)))
|
||||
(cond
|
||||
((-> arg0 bbox-valid?)
|
||||
@@ -234,7 +234,7 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod TODO-RENAME-27 joint-exploder ((obj joint-exploder) (arg0 joint-exploder-list) (arg1 int))
|
||||
(defmethod joint-exploder-method-27 joint-exploder ((obj joint-exploder) (arg0 joint-exploder-list) (arg1 int))
|
||||
(local-vars (sv-16 int) (sv-32 int) (sv-48 int))
|
||||
(let ((s4-0 (the-as joint-exploder-list #f)))
|
||||
(let ((v1-0 1))
|
||||
@@ -270,13 +270,13 @@
|
||||
(let ((s0-0 (-> s2-0 joint s1-0)))
|
||||
(cond
|
||||
((>= (-> s0-0 mat vector 3 x) f30-0)
|
||||
(set! sv-16 (TODO-RENAME-26 obj arg0 s1-0))
|
||||
(TODO-RENAME-20 obj (the-as joint-exploder-list s3-0) s1-0)
|
||||
(set! sv-16 (joint-exploder-method-26 obj arg0 s1-0))
|
||||
(joint-exploder-method-20 obj (the-as joint-exploder-list s3-0) s1-0)
|
||||
(set! s1-0 sv-16)
|
||||
(TODO-RENAME-21 obj (the-as joint-exploder-list s3-0) s0-0)
|
||||
(joint-exploder-method-21 obj (the-as joint-exploder-list s3-0) s0-0)
|
||||
)
|
||||
(else
|
||||
(TODO-RENAME-21 obj arg0 s0-0)
|
||||
(joint-exploder-method-21 obj arg0 s0-0)
|
||||
(set! s1-0 (-> s0-0 next))
|
||||
)
|
||||
)
|
||||
@@ -290,13 +290,13 @@
|
||||
(let ((s0-1 (-> s2-0 joint s1-0)))
|
||||
(cond
|
||||
((>= (-> s0-1 mat vector 3 y) f30-1)
|
||||
(set! sv-32 (TODO-RENAME-26 obj arg0 s1-0))
|
||||
(TODO-RENAME-20 obj (the-as joint-exploder-list s3-0) s1-0)
|
||||
(set! sv-32 (joint-exploder-method-26 obj arg0 s1-0))
|
||||
(joint-exploder-method-20 obj (the-as joint-exploder-list s3-0) s1-0)
|
||||
(set! s1-0 sv-32)
|
||||
(TODO-RENAME-21 obj (the-as joint-exploder-list s3-0) s0-1)
|
||||
(joint-exploder-method-21 obj (the-as joint-exploder-list s3-0) s0-1)
|
||||
)
|
||||
(else
|
||||
(TODO-RENAME-21 obj arg0 s0-1)
|
||||
(joint-exploder-method-21 obj arg0 s0-1)
|
||||
(set! s1-0 (-> s0-1 next))
|
||||
)
|
||||
)
|
||||
@@ -310,13 +310,13 @@
|
||||
(let ((s0-2 (-> s2-0 joint s1-0)))
|
||||
(cond
|
||||
((>= (-> s0-2 mat vector 3 z) f30-2)
|
||||
(set! sv-48 (TODO-RENAME-26 obj arg0 s1-0))
|
||||
(TODO-RENAME-20 obj (the-as joint-exploder-list s3-0) s1-0)
|
||||
(set! sv-48 (joint-exploder-method-26 obj arg0 s1-0))
|
||||
(joint-exploder-method-20 obj (the-as joint-exploder-list s3-0) s1-0)
|
||||
(set! s1-0 sv-48)
|
||||
(TODO-RENAME-21 obj (the-as joint-exploder-list s3-0) s0-2)
|
||||
(joint-exploder-method-21 obj (the-as joint-exploder-list s3-0) s0-2)
|
||||
)
|
||||
(else
|
||||
(TODO-RENAME-21 obj arg0 s0-2)
|
||||
(joint-exploder-method-21 obj arg0 s0-2)
|
||||
(set! s1-0 (-> s0-2 next))
|
||||
)
|
||||
)
|
||||
@@ -331,39 +331,39 @@
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod TODO-RENAME-28 joint-exploder ((obj joint-exploder) (arg0 joint-exploder-list))
|
||||
(defmethod joint-exploder-method-28 joint-exploder ((obj joint-exploder) (arg0 joint-exploder-list))
|
||||
(when (and (-> arg0 bbox-valid?) (>= (-> arg0 head) 0))
|
||||
(cond
|
||||
((< 20480.0 (- (-> arg0 bbox max x) (-> arg0 bbox min x)))
|
||||
(let ((a1-2 (TODO-RENAME-27 obj arg0 0)))
|
||||
(let ((a1-2 (joint-exploder-method-27 obj arg0 0)))
|
||||
(if a1-2
|
||||
(TODO-RENAME-28 obj a1-2)
|
||||
(joint-exploder-method-28 obj a1-2)
|
||||
)
|
||||
)
|
||||
(TODO-RENAME-28 obj arg0)
|
||||
(joint-exploder-method-28 obj arg0)
|
||||
)
|
||||
((< 20480.0 (- (-> arg0 bbox max y) (-> arg0 bbox min y)))
|
||||
(let ((a1-5 (TODO-RENAME-27 obj arg0 1)))
|
||||
(let ((a1-5 (joint-exploder-method-27 obj arg0 1)))
|
||||
(if a1-5
|
||||
(TODO-RENAME-28 obj a1-5)
|
||||
(joint-exploder-method-28 obj a1-5)
|
||||
)
|
||||
)
|
||||
(TODO-RENAME-28 obj arg0)
|
||||
(joint-exploder-method-28 obj arg0)
|
||||
)
|
||||
((< 20480.0 (- (-> arg0 bbox max z) (-> arg0 bbox min z)))
|
||||
(let ((a1-8 (TODO-RENAME-27 obj arg0 2)))
|
||||
(let ((a1-8 (joint-exploder-method-27 obj arg0 2)))
|
||||
(if a1-8
|
||||
(TODO-RENAME-28 obj a1-8)
|
||||
(joint-exploder-method-28 obj a1-8)
|
||||
)
|
||||
)
|
||||
(TODO-RENAME-28 obj arg0)
|
||||
(joint-exploder-method-28 obj arg0)
|
||||
)
|
||||
)
|
||||
)
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod TODO-RENAME-25 joint-exploder ((obj joint-exploder) (arg0 joint-exploder-list))
|
||||
(defmethod joint-exploder-method-25 joint-exploder ((obj joint-exploder) (arg0 joint-exploder-list))
|
||||
(set! (-> arg0 bbox-valid?) #f)
|
||||
(set! (-> arg0 pre-moved?) #t)
|
||||
(let ((s4-0 (-> obj joints))
|
||||
@@ -393,10 +393,10 @@
|
||||
((or (< (-> s1-0 y) (-> obj die-if-below-y))
|
||||
(< (-> obj die-if-beyond-xz-dist-sqrd) (vector-vector-xz-distance s1-0 (-> obj root trans)))
|
||||
)
|
||||
(set! s3-0 (TODO-RENAME-24 obj arg0 s3-0))
|
||||
(set! s3-0 (joint-exploder-method-24 obj arg0 s3-0))
|
||||
)
|
||||
(else
|
||||
(TODO-RENAME-21 obj arg0 s2-0)
|
||||
(joint-exploder-method-21 obj arg0 s2-0)
|
||||
(set! s3-0 (-> s2-0 next))
|
||||
)
|
||||
)
|
||||
@@ -406,7 +406,7 @@
|
||||
#f
|
||||
)
|
||||
|
||||
(defmethod TODO-RENAME-22 joint-exploder ((obj joint-exploder) (arg0 joint-exploder-list))
|
||||
(defmethod joint-exploder-method-22 joint-exploder ((obj joint-exploder) (arg0 joint-exploder-list))
|
||||
(fill-using-bounding-box
|
||||
*collide-cache*
|
||||
(-> arg0 bbox)
|
||||
@@ -424,7 +424,15 @@
|
||||
(s3-0 (new 'stack-no-clear 'collide-tri-result))
|
||||
)
|
||||
(vector-! a2-1 s4-0 (-> s5-1 prev-pos))
|
||||
(when (>= (probe-using-line-sphere *collide-cache* (-> s5-1 prev-pos) a2-1 40.96 (collide-kind background) s3-0 (new 'static 'pat-surface :noentity #x1))
|
||||
(when (>= (probe-using-line-sphere
|
||||
*collide-cache*
|
||||
(-> s5-1 prev-pos)
|
||||
a2-1
|
||||
40.96
|
||||
(collide-kind background)
|
||||
s3-0
|
||||
(new 'static 'pat-surface :noentity #x1)
|
||||
)
|
||||
0.0
|
||||
)
|
||||
(set! (-> s4-0 quad) (-> s3-0 intersect quad))
|
||||
@@ -470,9 +478,9 @@
|
||||
(let ((s5-0 (-> self lists gp-0)))
|
||||
(when (>= (-> s5-0 head) 0)
|
||||
(when (not (-> s5-0 pre-moved?))
|
||||
(TODO-RENAME-25 self s5-0)
|
||||
(joint-exploder-method-25 self s5-0)
|
||||
(if (nonzero? gp-0)
|
||||
(TODO-RENAME-28 self s5-0)
|
||||
(joint-exploder-method-28 self s5-0)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -489,7 +497,7 @@
|
||||
(add-box! gp-1 (-> s4-0 bbox))
|
||||
)
|
||||
(if (nonzero? s5-1)
|
||||
(TODO-RENAME-22 self s4-0)
|
||||
(joint-exploder-method-22 self s4-0)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -521,7 +529,7 @@
|
||||
:post (the-as (function none :behavior joint-exploder) ja-post)
|
||||
)
|
||||
|
||||
(defmethod TODO-RENAME-23 joint-exploder ((obj joint-exploder))
|
||||
(defmethod joint-exploder-method-23 joint-exploder ((obj joint-exploder))
|
||||
(let ((gp-0 (-> obj joints)))
|
||||
(dotimes (s4-0 (-> gp-0 num-joints))
|
||||
(let ((v1-2 (-> obj static-params joints s4-0))
|
||||
@@ -647,7 +655,7 @@
|
||||
(ja-channel-set! 1)
|
||||
(ja :group! (-> self anim) :num! min)
|
||||
(ja-post)
|
||||
(TODO-RENAME-23 self)
|
||||
(joint-exploder-method-23 self)
|
||||
(set! (-> self die-if-below-y) (+ -102400.0 (-> self root trans y)))
|
||||
(set! (-> self skel postbind-function) joint-exploder-joint-callback)
|
||||
(go joint-exploder-shatter)
|
||||
@@ -681,7 +689,3 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -8,176 +8,170 @@
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(defstate cam-combiner-active (camera-combiner)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(let ((v1-0 arg2))
|
||||
(the-as
|
||||
object
|
||||
(cond
|
||||
((= v1-0 'point-of-interest)
|
||||
(cond
|
||||
((-> arg3 param 0)
|
||||
(set! (-> self tracking use-point-of-interest) #t)
|
||||
(set! (-> self tracking point-of-interest quad) (-> (the-as vector (-> arg3 param 0)) quad))
|
||||
(let ((f0-0 1.0))
|
||||
(set! (-> self tracking point-of-interest-blend target) f0-0)
|
||||
f0-0
|
||||
)
|
||||
)
|
||||
(else
|
||||
(set! (-> self tracking use-point-of-interest) #f)
|
||||
(let ((f0-1 0.0))
|
||||
(set! (-> self tracking point-of-interest-blend target) f0-1)
|
||||
f0-1
|
||||
)
|
||||
)
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(the-as
|
||||
object
|
||||
(case event-type
|
||||
(('point-of-interest)
|
||||
(cond
|
||||
((-> event param 0)
|
||||
(set! (-> self tracking use-point-of-interest) #t)
|
||||
(set! (-> self tracking point-of-interest quad) (-> (the-as vector (-> event param 0)) quad))
|
||||
(set! (-> self tracking point-of-interest-blend target) 1.0)
|
||||
)
|
||||
(else
|
||||
(set! (-> self tracking use-point-of-interest) #f)
|
||||
(set! (-> self tracking point-of-interest-blend target) 0.0)
|
||||
)
|
||||
)
|
||||
((= v1-0 'set-interpolation)
|
||||
(set! (-> self interp-val) 0.0)
|
||||
(let ((f0-4 (/ 5.0 (the float (-> arg3 param 0)))))
|
||||
(set! (-> self interp-step) f0-4)
|
||||
f0-4
|
||||
)
|
||||
)
|
||||
((= v1-0 'teleport)
|
||||
(when (nonzero? (-> self tracking-status))
|
||||
(cam-calc-follow! (-> self tracking) (-> self trans) #f)
|
||||
(slave-set-rotation!
|
||||
(-> self tracking)
|
||||
(-> self trans)
|
||||
(the-as float (-> self tracking-options))
|
||||
(-> self fov)
|
||||
#f
|
||||
)
|
||||
)
|
||||
)
|
||||
((= v1-0 'stop-tracking)
|
||||
(set! (-> self tracking-status) (the-as uint 0))
|
||||
0
|
||||
)
|
||||
((= v1-0 'start-tracking)
|
||||
(cond
|
||||
((< arg1 1)
|
||||
(let ((t9-2 format)
|
||||
(a0-15 0)
|
||||
(a1-3 "ERROR <GMJ>: missing camera-slave parameter to *camera-combiner* start-tracking~%")
|
||||
)
|
||||
(let ((v1-7 (-> arg3 param 0)))
|
||||
(rtype-of v1-7)
|
||||
)
|
||||
(t9-2 a0-15 a1-3)
|
||||
)
|
||||
)
|
||||
((let ((t9-3 type-type?)
|
||||
(v1-8 (-> arg3 param 0))
|
||||
)
|
||||
(not (t9-3 (rtype-of v1-8) camera-slave))
|
||||
)
|
||||
(let ((t9-4 format)
|
||||
(a0-18 0)
|
||||
(a1-5 "ERROR <GMJ>: invalid type '~A' to *camera-combiner* start-tracking~%")
|
||||
(v1-10 (-> arg3 param 0))
|
||||
)
|
||||
(t9-4 a0-18 a1-5 (rtype-of v1-10))
|
||||
)
|
||||
)
|
||||
((zero? (-> self tracking-status))
|
||||
(set! (-> self tracking-status) (the-as uint 1))
|
||||
(let ((gp-1 (the-as object (-> arg3 param 0))))
|
||||
(set! (-> self tracking-options) (the-as int (-> (the-as camera-slave gp-1) options)))
|
||||
(set! (-> self tracking no-follow) (-> (the-as camera-slave gp-1) tracking no-follow))
|
||||
(copy-cam-float-seeker (-> self tracking tilt-adjust) (-> (the-as camera-slave gp-1) tracking tilt-adjust))
|
||||
(copy-cam-float-seeker
|
||||
(-> self tracking underwater-blend)
|
||||
(-> (the-as camera-slave gp-1) tracking underwater-blend)
|
||||
)
|
||||
(set! (-> self tracking use-point-of-interest) (-> (the-as camera-slave gp-1) tracking use-point-of-interest))
|
||||
(set! (-> self tracking point-of-interest quad)
|
||||
(-> (the-as camera-slave gp-1) tracking point-of-interest quad)
|
||||
)
|
||||
(copy-cam-float-seeker
|
||||
(-> self tracking point-of-interest-blend)
|
||||
(-> (the-as camera-slave gp-1) tracking point-of-interest-blend)
|
||||
)
|
||||
(let ((gp-2 (+ (the-as uint gp-1) 108)))
|
||||
(cam-calc-follow! (-> self tracking) (the-as vector gp-2) #f)
|
||||
(slave-set-rotation!
|
||||
(-> self tracking)
|
||||
(the-as vector gp-2)
|
||||
(the-as float (-> self tracking-options))
|
||||
(-> self fov)
|
||||
#f
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
((= v1-0 'copy-tracking)
|
||||
(cond
|
||||
((< arg1 1)
|
||||
(let ((t9-10 format)
|
||||
(a0-27 0)
|
||||
(a1-11 "ERROR <GMJ>: missing camera-slave parameter to *camera-combiner* copy-tracking~%")
|
||||
)
|
||||
(let ((v1-23 (-> arg3 param 0)))
|
||||
(rtype-of v1-23)
|
||||
)
|
||||
(t9-10 a0-27 a1-11)
|
||||
)
|
||||
)
|
||||
((let ((t9-11 type-type?)
|
||||
(v1-24 (-> arg3 param 0))
|
||||
)
|
||||
(not (t9-11 (rtype-of v1-24) camera-slave))
|
||||
)
|
||||
(let ((t9-12 format)
|
||||
(a0-30 0)
|
||||
(a1-13 "ERROR <GMJ>: invalid type '~A' to *camera-combiner* copy-tracking~%")
|
||||
(v1-25 (-> arg3 param 0))
|
||||
)
|
||||
(t9-12 a0-30 a1-13 (rtype-of v1-25))
|
||||
)
|
||||
)
|
||||
((nonzero? (-> self tracking-status))
|
||||
#f
|
||||
)
|
||||
(else
|
||||
(set! (-> self tracking-status) (the-as uint 1))
|
||||
(let ((gp-3 (the-as camera-slave (-> arg3 param 0))))
|
||||
(set! (-> self tracking-options) (the-as int (-> gp-3 options)))
|
||||
(set! (-> self tracking no-follow) (-> gp-3 tracking no-follow))
|
||||
(copy-cam-float-seeker (-> self tracking tilt-adjust) (-> gp-3 tracking tilt-adjust))
|
||||
(copy-cam-float-seeker (-> self tracking underwater-blend) (-> gp-3 tracking underwater-blend))
|
||||
(set! (-> self tracking follow-off quad) (-> gp-3 tracking follow-off quad))
|
||||
(set! (-> self tracking follow-pt quad) (-> gp-3 tracking follow-pt quad))
|
||||
(let* ((a2-17 (-> self tracking))
|
||||
(a3-3 (-> gp-3 tracking))
|
||||
(v1-36 (-> a3-3 inv-mat vector 0 quad))
|
||||
(a0-37 (-> a3-3 inv-mat vector 1 quad))
|
||||
(a1-16 (-> a3-3 inv-mat vector 2 quad))
|
||||
(a3-4 (-> a3-3 inv-mat vector 3 quad))
|
||||
)
|
||||
(set! (-> a2-17 inv-mat vector 0 quad) v1-36)
|
||||
(set! (-> a2-17 inv-mat vector 1 quad) a0-37)
|
||||
(set! (-> a2-17 inv-mat vector 2 quad) a1-16)
|
||||
(set! (-> a2-17 inv-mat vector 3 quad) a3-4)
|
||||
)
|
||||
(('set-interpolation)
|
||||
(set! (-> self interp-val) 0.0)
|
||||
(set! (-> self interp-step) (/ 5.0 (the float (-> event param 0))))
|
||||
)
|
||||
(('teleport)
|
||||
(when (nonzero? (-> self tracking-status))
|
||||
(cam-calc-follow! (-> self tracking) (-> self trans) #f)
|
||||
(the-as object (slave-set-rotation!
|
||||
(-> self tracking)
|
||||
(-> self trans)
|
||||
(the-as float (-> self tracking-options))
|
||||
(-> self fov)
|
||||
#f
|
||||
)
|
||||
)
|
||||
(set! (-> self tracking use-point-of-interest) (-> gp-3 tracking use-point-of-interest))
|
||||
(set! (-> self tracking point-of-interest quad) (-> gp-3 tracking point-of-interest quad))
|
||||
)
|
||||
)
|
||||
(('stop-tracking)
|
||||
(set! (-> self tracking-status) (the-as uint 0))
|
||||
0
|
||||
)
|
||||
(('start-tracking)
|
||||
(cond
|
||||
((< arg1 1)
|
||||
(let ((t9-2 format)
|
||||
(a0-15 0)
|
||||
(a1-3 "ERROR <GMJ>: missing camera-slave parameter to *camera-combiner* start-tracking~%")
|
||||
)
|
||||
(let ((v1-7 (-> event param 0)))
|
||||
(rtype-of v1-7)
|
||||
)
|
||||
(t9-2 a0-15 a1-3)
|
||||
)
|
||||
)
|
||||
((let ((t9-3 type-type?)
|
||||
(v1-8 (-> event param 0))
|
||||
)
|
||||
(not (t9-3 (rtype-of v1-8) camera-slave))
|
||||
)
|
||||
(let ((t9-4 format)
|
||||
(a0-18 0)
|
||||
(a1-5 "ERROR <GMJ>: invalid type '~A' to *camera-combiner* start-tracking~%")
|
||||
(v1-10 (-> event param 0))
|
||||
)
|
||||
(t9-4 a0-18 a1-5 (rtype-of v1-10))
|
||||
)
|
||||
)
|
||||
((zero? (-> self tracking-status))
|
||||
(set! (-> self tracking-status) (the-as uint 1))
|
||||
(let ((gp-1 (the-as object (-> event param 0))))
|
||||
(set! (-> self tracking-options) (the-as int (-> (the-as camera-slave gp-1) options)))
|
||||
(set! (-> self tracking no-follow) (-> (the-as camera-slave gp-1) tracking no-follow))
|
||||
(copy-cam-float-seeker (-> self tracking tilt-adjust) (-> (the-as camera-slave gp-1) tracking tilt-adjust))
|
||||
(copy-cam-float-seeker
|
||||
(-> self tracking underwater-blend)
|
||||
(-> (the-as camera-slave gp-1) tracking underwater-blend)
|
||||
)
|
||||
(set! (-> self tracking use-point-of-interest) (-> (the-as camera-slave gp-1) tracking use-point-of-interest))
|
||||
(set! (-> self tracking point-of-interest quad)
|
||||
(-> (the-as camera-slave gp-1) tracking point-of-interest quad)
|
||||
)
|
||||
(copy-cam-float-seeker
|
||||
(-> self tracking point-of-interest-blend)
|
||||
(-> (the-as camera-slave gp-1) tracking point-of-interest-blend)
|
||||
)
|
||||
(let ((gp-2 (+ (the-as uint gp-1) 108)))
|
||||
(cam-calc-follow! (-> self tracking) (the-as vector gp-2) #f)
|
||||
(the-as object (slave-set-rotation!
|
||||
(-> self tracking)
|
||||
(the-as vector gp-2)
|
||||
(the-as float (-> self tracking-options))
|
||||
(-> self fov)
|
||||
#f
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(('copy-tracking)
|
||||
(cond
|
||||
((< arg1 1)
|
||||
(let ((t9-10 format)
|
||||
(a0-27 0)
|
||||
(a1-11 "ERROR <GMJ>: missing camera-slave parameter to *camera-combiner* copy-tracking~%")
|
||||
)
|
||||
(let ((v1-23 (-> event param 0)))
|
||||
(rtype-of v1-23)
|
||||
)
|
||||
(t9-10 a0-27 a1-11)
|
||||
)
|
||||
)
|
||||
((let ((t9-11 type-type?)
|
||||
(v1-24 (-> event param 0))
|
||||
)
|
||||
(not (t9-11 (rtype-of v1-24) camera-slave))
|
||||
)
|
||||
(let ((t9-12 format)
|
||||
(a0-30 0)
|
||||
(a1-13 "ERROR <GMJ>: invalid type '~A' to *camera-combiner* copy-tracking~%")
|
||||
(v1-25 (-> event param 0))
|
||||
)
|
||||
(t9-12 a0-30 a1-13 (rtype-of v1-25))
|
||||
)
|
||||
)
|
||||
((nonzero? (-> self tracking-status))
|
||||
#f
|
||||
)
|
||||
(else
|
||||
(set! (-> self tracking-status) (the-as uint 1))
|
||||
(let ((gp-3 (the-as camera-slave (-> event param 0))))
|
||||
(set! (-> self tracking-options) (the-as int (-> gp-3 options)))
|
||||
(set! (-> self tracking no-follow) (-> gp-3 tracking no-follow))
|
||||
(copy-cam-float-seeker (-> self tracking tilt-adjust) (-> gp-3 tracking tilt-adjust))
|
||||
(copy-cam-float-seeker (-> self tracking underwater-blend) (-> gp-3 tracking underwater-blend))
|
||||
(set! (-> self tracking follow-off quad) (-> gp-3 tracking follow-off quad))
|
||||
(set! (-> self tracking follow-pt quad) (-> gp-3 tracking follow-pt quad))
|
||||
(let* ((a2-17 (-> self tracking))
|
||||
(a3-3 (-> gp-3 tracking))
|
||||
(v1-36 (-> a3-3 inv-mat vector 0 quad))
|
||||
(a0-37 (-> a3-3 inv-mat vector 1 quad))
|
||||
(a1-16 (-> a3-3 inv-mat vector 2 quad))
|
||||
(a3-4 (-> a3-3 inv-mat vector 3 quad))
|
||||
)
|
||||
(set! (-> a2-17 inv-mat vector 0 quad) v1-36)
|
||||
(set! (-> a2-17 inv-mat vector 1 quad) a0-37)
|
||||
(set! (-> a2-17 inv-mat vector 2 quad) a1-16)
|
||||
(set! (-> a2-17 inv-mat vector 3 quad) a3-4)
|
||||
)
|
||||
(set! (-> self tracking use-point-of-interest) (-> gp-3 tracking use-point-of-interest))
|
||||
(set! (-> self tracking point-of-interest quad) (-> gp-3 tracking point-of-interest quad))
|
||||
(the-as
|
||||
object
|
||||
(copy-cam-float-seeker (-> self tracking point-of-interest-blend) (-> gp-3 tracking point-of-interest-blend))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
:code (behavior ()
|
||||
(local-vars (sv-160 cam-rotation-tracker))
|
||||
(loop
|
||||
(when (and (zero? (logand (-> *camera* master-options) 2)) (!= (-> self tracking-status) 0))
|
||||
(when (and (not (logtest? (-> *camera* master-options) 2)) (!= (-> self tracking-status) 0))
|
||||
(set! (-> self tracking-status) (the-as uint 0))
|
||||
0
|
||||
)
|
||||
@@ -441,7 +435,3 @@
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -5,6 +5,8 @@
|
||||
;; name in dgo: cam-debug
|
||||
;; dgos: GAME, ENGINE
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
;; this file is debug only
|
||||
(declare-file (debug))
|
||||
|
||||
@@ -860,9 +862,7 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for method 12 of type tracking-spline
|
||||
;; INFO: Return type mismatch int vs none.
|
||||
(defmethod TODO-RENAME-12 tracking-spline ((obj tracking-spline))
|
||||
(defmethod tracking-spline-method-12 tracking-spline ((obj tracking-spline))
|
||||
(let ((s5-0 (-> obj used-point)))
|
||||
(while (!= s5-0 -134250495)
|
||||
(print-nth-point obj s5-0)
|
||||
@@ -874,15 +874,13 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for method 23 of type tracking-spline
|
||||
;; INFO: Return type mismatch int vs none.
|
||||
(defmethod TODO-RENAME-23 tracking-spline ((obj tracking-spline))
|
||||
(defmethod tracking-spline-method-23 tracking-spline ((obj tracking-spline))
|
||||
(let ((s5-0 (-> obj used-point))
|
||||
(s4-0 (-> obj point (-> obj used-point) next))
|
||||
)
|
||||
(let ((s3-0 (new 'stack-no-clear 'vector)))
|
||||
(when (!= s4-0 -134250495)
|
||||
(TODO-RENAME-19 obj 0.0 s3-0 (the-as tracking-spline-sampler #f))
|
||||
(tracking-spline-method-19 obj 0.0 s3-0 (the-as tracking-spline-sampler #f))
|
||||
(camera-cross
|
||||
(new 'static 'vector :y 1024.0)
|
||||
(new 'static 'vector :z 1024.0)
|
||||
@@ -890,7 +888,7 @@
|
||||
(new 'static 'vector4w :x #xff :w #x80)
|
||||
(meters 0.25)
|
||||
)
|
||||
(TODO-RENAME-19 obj (-> obj sample-len) s3-0 (the-as tracking-spline-sampler #f))
|
||||
(tracking-spline-method-19 obj (-> obj sample-len) s3-0 (the-as tracking-spline-sampler #f))
|
||||
(camera-cross
|
||||
(new 'static 'vector :y 1024.0)
|
||||
(new 'static 'vector :z 1024.0)
|
||||
@@ -917,14 +915,13 @@
|
||||
(new 'static 'vector4w :x #xff :y #xff :w #x80)
|
||||
)
|
||||
(vector-! s5-1 (-> obj debug-out-position) (-> obj debug-old-position))
|
||||
(TODO-RENAME-20 obj s5-1 (-> obj debug-last-point))
|
||||
(tracking-spline-method-20 obj s5-1 (-> obj debug-last-point))
|
||||
(camera-line-rel (-> obj debug-old-position) s5-1 (new 'static 'vector4w :x #xff :z #xff :w #x80))
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for function debug-euler
|
||||
(defun debug-euler ((arg0 cam-dbg-scratch))
|
||||
(let ((s4-0 (new 'stack-no-clear 'euler-angles))
|
||||
(gp-0 (new 'stack-no-clear 'matrix))
|
||||
@@ -1019,7 +1016,6 @@
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for function bike-cam-limit
|
||||
(defun bike-cam-limit ((arg0 float))
|
||||
(let* ((f0-1 (* 10012.444 arg0))
|
||||
(f30-0 (fmax 0.0 f0-1))
|
||||
@@ -1031,9 +1027,6 @@
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for function camera-slave-debug
|
||||
;; INFO: Return type mismatch int vs none.
|
||||
;; Used lq/sq
|
||||
(defun camera-slave-debug ((arg0 camera-slave))
|
||||
(when *display-camera-marks*
|
||||
(let ((f30-0 (* 0.5 (-> *camera-combiner* fov))))
|
||||
@@ -1072,7 +1065,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(TODO-RENAME-23 (-> arg0 position-spline))
|
||||
(tracking-spline-method-23 (-> arg0 position-spline))
|
||||
(let ((s5-1 (new-stack-vector0)))
|
||||
(let ((s4-1 (new-stack-vector0)))
|
||||
(new-stack-matrix0)
|
||||
@@ -1203,9 +1196,6 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for function master-draw-coordinates
|
||||
;; INFO: Return type mismatch int vs none.
|
||||
;; Used lq/sq
|
||||
(defun master-draw-coordinates ((arg0 vector))
|
||||
(let ((s5-0 (new-stack-vector0))
|
||||
(gp-0 (new-stack-vector0))
|
||||
@@ -1229,7 +1219,15 @@
|
||||
(set! (-> a0-3 w) 1.0)
|
||||
(vector+! a1-2 v1-4 a0-3)
|
||||
)
|
||||
(add-debug-line #t (bucket-id debug-no-zbuf) gp-0 s5-0 (new 'static 'rgba :r #xff :a #x80) #f (the-as rgba -1))
|
||||
(add-debug-line
|
||||
#t
|
||||
(bucket-id debug-no-zbuf)
|
||||
gp-0
|
||||
s5-0
|
||||
(new 'static 'rgba :r #xff :a #x80)
|
||||
#f
|
||||
(the-as rgba -1)
|
||||
)
|
||||
(let ((a1-5 s5-0)
|
||||
(v1-5 gp-0)
|
||||
(a0-5 s5-0)
|
||||
@@ -1240,7 +1238,15 @@
|
||||
(set! (-> a0-5 w) 1.0)
|
||||
(vector+! a1-5 v1-5 a0-5)
|
||||
)
|
||||
(add-debug-line #t (bucket-id debug-no-zbuf) gp-0 s5-0 (new 'static 'rgba :g #xff :a #x80) #f (the-as rgba -1))
|
||||
(add-debug-line
|
||||
#t
|
||||
(bucket-id debug-no-zbuf)
|
||||
gp-0
|
||||
s5-0
|
||||
(new 'static 'rgba :g #xff :a #x80)
|
||||
#f
|
||||
(the-as rgba -1)
|
||||
)
|
||||
(let ((a1-8 s5-0)
|
||||
(v1-6 gp-0)
|
||||
(a0-7 s5-0)
|
||||
@@ -1251,7 +1257,15 @@
|
||||
(set! (-> a0-7 w) 1.0)
|
||||
(vector+! a1-8 v1-6 a0-7)
|
||||
)
|
||||
(add-debug-line #t (bucket-id debug-no-zbuf) gp-0 s5-0 (new 'static 'rgba :b #xff :a #x80) #f (the-as rgba -1))
|
||||
(add-debug-line
|
||||
#t
|
||||
(bucket-id debug-no-zbuf)
|
||||
gp-0
|
||||
s5-0
|
||||
(new 'static 'rgba :b #xff :a #x80)
|
||||
#f
|
||||
(the-as rgba -1)
|
||||
)
|
||||
(when arg0
|
||||
(set! (-> s5-0 quad) (-> arg0 quad))
|
||||
(vector-normalize! s5-0 4096.0)
|
||||
@@ -1271,7 +1285,6 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition of type cam-collision-record
|
||||
(deftype cam-collision-record (structure)
|
||||
((pos vector :inline :offset-assert 0)
|
||||
(vel vector :inline :offset-assert 16)
|
||||
@@ -1294,28 +1307,7 @@
|
||||
:flag-assert #x9000000a8
|
||||
)
|
||||
|
||||
;; definition for method 3 of type cam-collision-record
|
||||
(defmethod inspect cam-collision-record ((obj cam-collision-record))
|
||||
(format #t "[~8x] ~A~%" obj 'cam-collision-record)
|
||||
(format #t "~Tpos: #<vector @ #x~X>~%" (-> obj pos))
|
||||
(format #t "~Tvel: #<vector @ #x~X>~%" (-> obj vel))
|
||||
(format #t "~Tdesired-pos: #<vector @ #x~X>~%" (-> obj desired-pos))
|
||||
(format #t "~Tcam-tpos-cur: #<vector @ #x~X>~%" (-> obj cam-tpos-cur))
|
||||
(format #t "~Tcam-tpos-old: #<vector @ #x~X>~%" (-> obj cam-tpos-old))
|
||||
(format #t "~Tview-flat: #<vector @ #x~X>~%" (-> obj view-flat))
|
||||
(format #t "~Tstring-min-val: #<vector @ #x~X>~%" (-> obj string-min-val))
|
||||
(format #t "~Tstring-max-val: #<vector @ #x~X>~%" (-> obj string-max-val))
|
||||
(format #t "~Tview-off: #<vector @ #x~X>~%" (-> obj view-off))
|
||||
(format #t "~Tmin-z-override: ~f~%" (-> obj min-z-override))
|
||||
(format #t "~Tstring-push-z: ~f~%" (-> obj string-push-z))
|
||||
(format #t "~Tview-off-param: ~f~%" (-> obj view-off-param))
|
||||
(format #t "~Tframe: ~D~%" (-> obj frame))
|
||||
(format #t "~Titeration: ~D~%" (-> obj iteration))
|
||||
(format #t "~Tmove-type: ~A~%" (-> obj move-type))
|
||||
obj
|
||||
)
|
||||
|
||||
;; definition of type cam-collision-record-array
|
||||
(deftype cam-collision-record-array (inline-array-class)
|
||||
((data cam-collision-record :dynamic :offset-assert 16)
|
||||
)
|
||||
@@ -1324,33 +1316,17 @@
|
||||
:flag-assert #x900000010
|
||||
)
|
||||
|
||||
;; definition for method 3 of type cam-collision-record-array
|
||||
(defmethod inspect cam-collision-record-array ((obj cam-collision-record-array))
|
||||
(format #t "[~8x] ~A~%" obj (-> obj type))
|
||||
(format #t "~Tlength: ~D~%" (-> obj length))
|
||||
(format #t "~Tallocated-length: ~D~%" (-> obj allocated-length))
|
||||
(format #t "~Tdata[0] @ #x~X~%" (-> obj data))
|
||||
obj
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(set! (-> cam-collision-record-array heap-base) (the-as uint 176))
|
||||
|
||||
;; definition for symbol *cam-collision-record-first*, type int
|
||||
(define *cam-collision-record-first* 0)
|
||||
|
||||
;; definition for symbol *cam-collision-record-last*, type int
|
||||
(define *cam-collision-record-last* 0)
|
||||
|
||||
;; definition for symbol *cam-collision-record-show*, type int
|
||||
(define *cam-collision-record-show* 0)
|
||||
|
||||
;; definition for symbol *cam-collision-record*, type cam-collision-record-array
|
||||
(define *cam-collision-record* (new 'debug 'cam-collision-record-array 600))
|
||||
|
||||
;; definition for function cam-collision-record-save
|
||||
;; INFO: Return type mismatch int vs none.
|
||||
;; Used lq/sq
|
||||
(defun cam-collision-record-save ((arg0 vector) (arg1 vector) (arg2 int) (arg3 symbol) (arg4 camera-slave))
|
||||
(when *record-cam-collide-history*
|
||||
(let ((v1-5 (the-as
|
||||
@@ -1387,8 +1363,6 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for function cam-collision-record-step
|
||||
;; INFO: Return type mismatch int vs none.
|
||||
(defun cam-collision-record-step ((arg0 int))
|
||||
(set! *cam-collision-record-show* (+ *cam-collision-record-show* arg0))
|
||||
(while (>= *cam-collision-record-show* 600)
|
||||
@@ -1401,8 +1375,6 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for function cam-collision-record-draw
|
||||
;; INFO: Return type mismatch int vs none.
|
||||
(defun cam-collision-record-draw ()
|
||||
(cond
|
||||
((cpad-pressed? 0 down)
|
||||
@@ -1507,8 +1479,6 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for function camera-master-debug
|
||||
;; INFO: Return type mismatch int vs none.
|
||||
(defun camera-master-debug ((arg0 camera-master))
|
||||
(when *display-cam-other*
|
||||
(let ((f0-1 (* 0.5 (-> *camera-other-fov* data))))
|
||||
@@ -1559,7 +1529,7 @@
|
||||
(cam-collision-record-draw)
|
||||
)
|
||||
(if *display-cam-master-marks*
|
||||
(TODO-RENAME-23 (-> arg0 target-spline))
|
||||
(tracking-spline-method-23 (-> arg0 target-spline))
|
||||
)
|
||||
(if *display-xyz-axes*
|
||||
(master-draw-coordinates (the-as vector #f))
|
||||
@@ -1569,8 +1539,6 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for function debug-set-camera-pos-rot!
|
||||
;; Used lq/sq
|
||||
(defun debug-set-camera-pos-rot! ((arg0 vector) (arg1 matrix))
|
||||
(when (and *camera* *camera-combiner*)
|
||||
(send-event *camera* 'change-state cam-free-floating 0)
|
||||
@@ -1591,9 +1559,24 @@
|
||||
arg0
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
(defun external-cam-reset! ()
|
||||
(vector-reset! (-> *math-camera* trans))
|
||||
(matrix-identity! (-> *math-camera* inv-camera-rot))
|
||||
(when *camera-combiner*
|
||||
(let* ((v1-6 (-> *math-camera* inv-camera-rot))
|
||||
(a3-0 (-> *camera-combiner* inv-camera-rot))
|
||||
(a0-2 (-> a3-0 vector 0 quad))
|
||||
(a1-0 (-> a3-0 vector 1 quad))
|
||||
(a2-0 (-> a3-0 vector 2 quad))
|
||||
(a3-1 (-> a3-0 vector 3 quad))
|
||||
)
|
||||
(set! (-> v1-6 vector 0 quad) a0-2)
|
||||
(set! (-> v1-6 vector 1 quad) a1-0)
|
||||
(set! (-> v1-6 vector 2 quad) a2-0)
|
||||
(set! (-> v1-6 vector 3 quad) a3-1)
|
||||
)
|
||||
(set! (-> *math-camera* trans quad) (-> *camera-combiner* trans quad))
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
@@ -109,7 +109,7 @@
|
||||
)
|
||||
(let ((gp-1 (new 'stack-no-clear 'vector)))
|
||||
(vector--float*! gp-1 (-> self tpos-curr-adj) (-> self local-down) (-> self target-height))
|
||||
(the-as symbol (TODO-RENAME-10 (-> self target-spline) gp-1))
|
||||
(the-as symbol (tracking-spline-method-10 (-> self target-spline) gp-1))
|
||||
)
|
||||
)
|
||||
|
||||
@@ -193,7 +193,7 @@
|
||||
(set! (-> self under-water) 0)
|
||||
(let ((gp-1 (new 'stack-no-clear 'vector)))
|
||||
(vector--float*! gp-1 (-> self tpos-curr-adj) (-> self local-down) (-> self target-height))
|
||||
(the-as symbol (TODO-RENAME-10 (-> self target-spline) gp-1))
|
||||
(the-as symbol (tracking-spline-method-10 (-> self target-spline) gp-1))
|
||||
)
|
||||
)
|
||||
|
||||
@@ -274,9 +274,9 @@
|
||||
)
|
||||
(let ((gp-1 (new 'stack-no-clear 'vector)))
|
||||
(vector--float*! gp-1 (-> self tpos-curr-adj) (-> self local-down) (-> self target-height))
|
||||
(TODO-RENAME-17 (-> self target-spline) gp-1 2048.0 0.0 #f)
|
||||
(tracking-spline-method-17 (-> self target-spline) gp-1 2048.0 0.0 #f)
|
||||
)
|
||||
(TODO-RENAME-22 (-> self target-spline) 40960.0)
|
||||
(tracking-spline-method-22 (-> self target-spline) 40960.0)
|
||||
)
|
||||
((handle->process (-> self drawable-target))
|
||||
(logior! (-> self master-options) 2)
|
||||
@@ -499,9 +499,9 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(TODO-RENAME-17 (-> self target-spline) gp-7 2048.0 0.0 #f)
|
||||
(tracking-spline-method-17 (-> self target-spline) gp-7 2048.0 0.0 #f)
|
||||
)
|
||||
(the-as symbol (TODO-RENAME-22 (-> self target-spline) 40960.0))
|
||||
(the-as symbol (tracking-spline-method-22 (-> self target-spline) 40960.0))
|
||||
)
|
||||
(*target*
|
||||
(logior! (-> self master-options) 2)
|
||||
@@ -1697,7 +1697,7 @@
|
||||
(set! (-> self drawable-target) (the-as handle #f))
|
||||
(set! (-> self which-bone) 0)
|
||||
(let ((a1-3 (new-stack-vector0)))
|
||||
(TODO-RENAME-10 (-> self target-spline) a1-3)
|
||||
(tracking-spline-method-10 (-> self target-spline) a1-3)
|
||||
)
|
||||
(set! (-> self pov-handle) (the-as handle #f))
|
||||
(set! (-> self pov-bone) 0)
|
||||
|
||||
@@ -1070,18 +1070,15 @@
|
||||
)
|
||||
(vector+! (-> self circular-follow) (-> self circular-follow) (-> self pivot-pt))
|
||||
(cam-circular-position #t)
|
||||
(when (!= (-> self fov1) 0.0)
|
||||
(let ((f0-7 (lerp-clamp
|
||||
(-> self fov0)
|
||||
(-> self fov1)
|
||||
(parameter-ease-sin-clamp (dummy-10 (-> self fov-index) (-> *camera* tpos-curr-adj)))
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> self fov) f0-7)
|
||||
f0-7
|
||||
(if (!= (-> self fov1) 0.0)
|
||||
(set! (-> self fov)
|
||||
(lerp-clamp
|
||||
(-> self fov0)
|
||||
(-> self fov1)
|
||||
(parameter-ease-sin-clamp (cam-index-method-10 (-> self fov-index) (-> *camera* tpos-curr-adj)))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(defstate cam-circular (camera-slave)
|
||||
@@ -1126,11 +1123,14 @@
|
||||
(set! (-> self fov1) (cam-slave-get-float (-> self cam-entity) 'focalPull (the-as float 0.0)))
|
||||
(cond
|
||||
((and (!= (-> self fov1) 0.0)
|
||||
(dummy-9 (-> self fov-index) 'focalpull (-> self cam-entity) (-> self saved-pt) (the-as curve #f))
|
||||
(cam-index-method-9 (-> self fov-index) 'focalpull (-> self cam-entity) (-> self saved-pt) (the-as curve #f))
|
||||
)
|
||||
(set! (-> self fov0) (-> self fov))
|
||||
(set! (-> self fov)
|
||||
(lerp-clamp (-> self fov0) (-> self fov1) (dummy-10 (-> self fov-index) (-> *camera* tpos-curr-adj)))
|
||||
(set! (-> self fov) (lerp-clamp
|
||||
(-> self fov0)
|
||||
(-> self fov1)
|
||||
(cam-index-method-10 (-> self fov-index) (-> *camera* tpos-curr-adj))
|
||||
)
|
||||
)
|
||||
)
|
||||
(else
|
||||
@@ -1278,7 +1278,7 @@
|
||||
(set! (-> self min-z-override) (vector-length (-> self view-flat)))
|
||||
(vector+! (-> self desired-pos) arg0 (-> *camera* tpos-curr-adj))
|
||||
(set! (-> self string-trans quad) (-> self desired-pos quad))
|
||||
(TODO-RENAME-10 (-> self position-spline) (-> self desired-pos))
|
||||
(tracking-spline-method-10 (-> self position-spline) (-> self desired-pos))
|
||||
(vector-reset! (-> self velocity))
|
||||
(let ((v0-3 (logand -4097 (-> self options))))
|
||||
(set! (-> self options) v0-3)
|
||||
@@ -2689,7 +2689,7 @@
|
||||
(cam-string-move)
|
||||
)
|
||||
)
|
||||
(TODO-RENAME-17
|
||||
(tracking-spline-method-17
|
||||
(-> self position-spline)
|
||||
(-> self string-trans)
|
||||
(the-as float 0.04096)
|
||||
@@ -2698,16 +2698,36 @@
|
||||
)
|
||||
(cond
|
||||
((and (logtest? (-> self options) #x4000) (logtest? (-> self options) 256))
|
||||
(TODO-RENAME-21 (-> self position-spline) (-> self trans) (the-as float 102.4) (the-as float 4096.0))
|
||||
(tracking-spline-method-21
|
||||
(-> self position-spline)
|
||||
(-> self trans)
|
||||
(the-as float 102.4)
|
||||
(the-as float 4096.0)
|
||||
)
|
||||
)
|
||||
((logtest? (-> self options) #x4000)
|
||||
(TODO-RENAME-21 (-> self position-spline) (-> self trans) (the-as float 40.96) (the-as float 4096.0))
|
||||
(tracking-spline-method-21
|
||||
(-> self position-spline)
|
||||
(-> self trans)
|
||||
(the-as float 40.96)
|
||||
(the-as float 4096.0)
|
||||
)
|
||||
)
|
||||
((logtest? (-> self options) 256)
|
||||
(TODO-RENAME-21 (-> self position-spline) (-> self trans) (the-as float 102.4) (the-as float 2457.6))
|
||||
(tracking-spline-method-21
|
||||
(-> self position-spline)
|
||||
(-> self trans)
|
||||
(the-as float 102.4)
|
||||
(the-as float 2457.6)
|
||||
)
|
||||
)
|
||||
(else
|
||||
(TODO-RENAME-21 (-> self position-spline) (-> self trans) (the-as float 20.48) (the-as float 2457.6))
|
||||
(tracking-spline-method-21
|
||||
(-> self position-spline)
|
||||
(-> self trans)
|
||||
(the-as float 20.48)
|
||||
(the-as float 2457.6)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -2906,7 +2926,7 @@
|
||||
)
|
||||
(set! (-> self trans quad) (-> self string-trans quad))
|
||||
(set! (-> self los-last-pos quad) (-> self string-trans quad))
|
||||
(TODO-RENAME-10 (-> self position-spline) (-> self string-trans))
|
||||
(tracking-spline-method-10 (-> self position-spline) (-> self string-trans))
|
||||
(set! (-> self blend-from-type) (the-as uint 2))
|
||||
(set! (-> self blend-to-type) (the-as uint 2))
|
||||
)
|
||||
@@ -2923,7 +2943,7 @@
|
||||
(when (not (paused?))
|
||||
(set-string-parms)
|
||||
(cam-string-code)
|
||||
(TODO-RENAME-9 (-> self position-spline))
|
||||
(tracking-spline-method-9 (-> self position-spline))
|
||||
(set! (-> self have-phony-joystick) #f)
|
||||
)
|
||||
(suspend)
|
||||
|
||||
@@ -102,8 +102,8 @@
|
||||
:size-assert #x30
|
||||
:flag-assert #xb00000030
|
||||
(:methods
|
||||
(dummy-9 (_type_ symbol entity vector curve) symbol 9)
|
||||
(dummy-10 (_type_ vector) float 10)
|
||||
(cam-index-method-9 (_type_ symbol entity vector curve) symbol 9)
|
||||
(cam-index-method-10 (_type_ vector) float 10)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -151,21 +151,21 @@
|
||||
:size-assert #x664
|
||||
:flag-assert #x1800000664
|
||||
(:methods
|
||||
(TODO-RENAME-9 (_type_) none 9)
|
||||
(TODO-RENAME-10 (_type_ vector) none 10)
|
||||
(tracking-spline-method-9 (_type_) none 9)
|
||||
(tracking-spline-method-10 (_type_ vector) none 10)
|
||||
(print-nth-point (_type_ int) none 11)
|
||||
(TODO-RENAME-12 (_type_) none 12)
|
||||
(TODO-RENAME-13 (_type_ int) none 13)
|
||||
(TODO-RENAME-14 (_type_ tracking-spline-sampler) none 14)
|
||||
(TODO-RENAME-15 (_type_) none 15)
|
||||
(TODO-RENAME-16 (_type_ float) none 16)
|
||||
(TODO-RENAME-17 (_type_ vector float float symbol) int 17)
|
||||
(TODO-RENAME-18 (_type_ float vector tracking-spline-sampler) vector 18)
|
||||
(TODO-RENAME-19 (_type_ float vector tracking-spline-sampler) vector 19)
|
||||
(TODO-RENAME-20 (_type_ vector int) none 20)
|
||||
(TODO-RENAME-21 (_type_ vector float float) vector 21)
|
||||
(TODO-RENAME-22 (_type_ float) none 22)
|
||||
(TODO-RENAME-23 (_type_) none 23)
|
||||
(tracking-spline-method-12 (_type_) none 12)
|
||||
(tracking-spline-method-13 (_type_ int) none 13)
|
||||
(tracking-spline-method-14 (_type_ tracking-spline-sampler) none 14)
|
||||
(tracking-spline-method-15 (_type_) none 15)
|
||||
(tracking-spline-method-16 (_type_ float) none 16)
|
||||
(tracking-spline-method-17 (_type_ vector float float symbol) int 17)
|
||||
(tracking-spline-method-18 (_type_ float vector tracking-spline-sampler) vector 18)
|
||||
(tracking-spline-method-19 (_type_ float vector tracking-spline-sampler) vector 19)
|
||||
(tracking-spline-method-20 (_type_ vector int) none 20)
|
||||
(tracking-spline-method-21 (_type_ vector float float) vector 21)
|
||||
(tracking-spline-method-22 (_type_ float) none 22)
|
||||
(tracking-spline-method-23 (_type_) none 23)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -239,10 +239,7 @@
|
||||
|
||||
(defmethod jump-to-target! cam-float-seeker ((obj cam-float-seeker) (arg0 float))
|
||||
(set! (-> obj value) (+ (-> obj target) arg0))
|
||||
(let ((f0-2 0.0))
|
||||
(set! (-> obj vel) f0-2)
|
||||
f0-2
|
||||
)
|
||||
(set! (-> obj vel) 0.0)
|
||||
)
|
||||
|
||||
(deftype cam-vector-seeker (structure)
|
||||
@@ -506,10 +503,3 @@
|
||||
list-keeper-active
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
0
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -343,7 +343,7 @@
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod dummy-9 cam-index ((obj cam-index) (arg0 symbol) (arg1 entity) (arg2 vector) (arg3 curve))
|
||||
(defmethod cam-index-method-9 cam-index ((obj cam-index) (arg0 symbol) (arg1 entity) (arg2 vector) (arg3 curve))
|
||||
(local-vars (sv-32 (function _varargs_ object)))
|
||||
(format (clear *cam-res-string*) "~S-flags" arg0)
|
||||
(set! (-> obj flags) (the-as cam-index-options (cam-slave-get-flags arg1 (string->symbol *res-key-string*))))
|
||||
@@ -419,7 +419,7 @@
|
||||
#t
|
||||
)
|
||||
|
||||
(defmethod dummy-10 cam-index ((obj cam-index) (arg0 vector))
|
||||
(defmethod cam-index-method-10 cam-index ((obj cam-index) (arg0 vector))
|
||||
(let ((s5-0 (new-stack-vector0)))
|
||||
0.0
|
||||
(vector-! s5-0 arg0 (the-as vector (-> obj vec)))
|
||||
@@ -438,7 +438,7 @@
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod TODO-RENAME-10 tracking-spline ((obj tracking-spline) (arg0 vector))
|
||||
(defmethod tracking-spline-method-10 tracking-spline ((obj tracking-spline) (arg0 vector))
|
||||
(set! (-> obj point 0 position quad) (-> arg0 quad))
|
||||
(set! (-> obj point 0 next) -134250495)
|
||||
(set! (-> obj summed-len) 0.0)
|
||||
@@ -462,7 +462,7 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod TODO-RENAME-13 tracking-spline ((obj tracking-spline) (arg0 int))
|
||||
(defmethod tracking-spline-method-13 tracking-spline ((obj tracking-spline) (arg0 int))
|
||||
(let ((v1-3 (-> obj point arg0 next)))
|
||||
(cond
|
||||
((= v1-3 -134250495)
|
||||
@@ -495,7 +495,7 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod TODO-RENAME-14 tracking-spline ((obj tracking-spline) (arg0 tracking-spline-sampler))
|
||||
(defmethod tracking-spline-method-14 tracking-spline ((obj tracking-spline) (arg0 tracking-spline-sampler))
|
||||
(let ((v1-0 (-> obj used-point)))
|
||||
(set! (-> obj partial-point) (-> arg0 partial-pt))
|
||||
(when (= (-> obj next-to-last-point) v1-0)
|
||||
@@ -532,12 +532,12 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod TODO-RENAME-15 tracking-spline ((obj tracking-spline))
|
||||
(defmethod tracking-spline-method-15 tracking-spline ((obj tracking-spline))
|
||||
(let ((s5-0 (new 'stack-no-clear 'tracking-spline-sampler)))
|
||||
(let ((a2-0 (new 'stack-no-clear 'tracking-point)))
|
||||
(set! (-> s5-0 cur-pt) (-> obj used-point))
|
||||
(set! (-> s5-0 partial-pt) (-> obj partial-point))
|
||||
(TODO-RENAME-19 obj (-> obj sample-len) (the-as vector a2-0) s5-0)
|
||||
(tracking-spline-method-19 obj (-> obj sample-len) (the-as vector a2-0) s5-0)
|
||||
)
|
||||
(if (or (= (-> s5-0 cur-pt) (-> obj end-point))
|
||||
(= (-> s5-0 cur-pt) (-> obj next-to-last-point))
|
||||
@@ -568,7 +568,7 @@
|
||||
(set! a0-14 (-> obj point v1-15 next))
|
||||
)
|
||||
(if (< -2.0 f0-2)
|
||||
(TODO-RENAME-13 obj a1-1)
|
||||
(tracking-spline-method-13 obj a1-1)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -578,12 +578,12 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod TODO-RENAME-16 tracking-spline ((obj tracking-spline) (arg0 float))
|
||||
(defmethod tracking-spline-method-16 tracking-spline ((obj tracking-spline) (arg0 float))
|
||||
(let ((s4-0 (new 'stack-no-clear 'tracking-spline-sampler)))
|
||||
(let ((a2-0 (new 'stack-no-clear 'vector)))
|
||||
(set! (-> s4-0 cur-pt) (-> obj used-point))
|
||||
(set! (-> s4-0 partial-pt) (-> obj partial-point))
|
||||
(TODO-RENAME-19 obj (-> obj sample-len) a2-0 s4-0)
|
||||
(tracking-spline-method-19 obj (-> obj sample-len) a2-0 s4-0)
|
||||
)
|
||||
(let ((s4-1 (-> obj point (-> s4-0 cur-pt) next)))
|
||||
(when (!= s4-1 -134250495)
|
||||
@@ -603,7 +603,7 @@
|
||||
)
|
||||
arg0
|
||||
)
|
||||
(TODO-RENAME-13 obj s4-1)
|
||||
(tracking-spline-method-13 obj s4-1)
|
||||
(set! s4-1 v1-11)
|
||||
)
|
||||
(set! v1-11 (-> obj point s4-1 next))
|
||||
@@ -616,7 +616,7 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod TODO-RENAME-17 tracking-spline ((obj tracking-spline) (arg0 vector) (arg1 float) (arg2 float) (arg3 symbol))
|
||||
(defmethod tracking-spline-method-17 tracking-spline ((obj tracking-spline) (arg0 vector) (arg1 float) (arg2 float) (arg3 symbol))
|
||||
(let ((s3-0 (-> obj free-point))
|
||||
(s2-0 (-> obj end-point))
|
||||
)
|
||||
@@ -632,7 +632,7 @@
|
||||
(return 0)
|
||||
)
|
||||
(when (and arg3 (= s3-0 -134250495))
|
||||
(TODO-RENAME-15 obj)
|
||||
(tracking-spline-method-15 obj)
|
||||
(set! s3-0 (-> obj free-point))
|
||||
)
|
||||
(cond
|
||||
@@ -649,7 +649,7 @@
|
||||
(set! (-> obj point s3-0 position quad) (-> arg0 quad))
|
||||
(+! (-> obj used-count) 1)
|
||||
(if (< 0.0 arg2)
|
||||
(TODO-RENAME-16 obj arg2)
|
||||
(tracking-spline-method-16 obj arg2)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -657,7 +657,7 @@
|
||||
0
|
||||
)
|
||||
|
||||
(defmethod TODO-RENAME-18 tracking-spline ((obj tracking-spline) (arg0 float) (arg1 vector) (arg2 tracking-spline-sampler))
|
||||
(defmethod tracking-spline-method-18 tracking-spline ((obj tracking-spline) (arg0 float) (arg1 vector) (arg2 tracking-spline-sampler))
|
||||
(local-vars (f0-4 float))
|
||||
(when (not arg2)
|
||||
(set! arg2 (new 'stack-no-clear 'tracking-spline-sampler))
|
||||
@@ -699,13 +699,13 @@
|
||||
(the-as vector #f)
|
||||
)
|
||||
|
||||
(defmethod TODO-RENAME-19 tracking-spline ((obj tracking-spline) (arg0 float) (arg1 vector) (arg2 tracking-spline-sampler))
|
||||
(defmethod tracking-spline-method-19 tracking-spline ((obj tracking-spline) (arg0 float) (arg1 vector) (arg2 tracking-spline-sampler))
|
||||
(vector-reset! arg1)
|
||||
(TODO-RENAME-18 obj arg0 arg1 arg2)
|
||||
(tracking-spline-method-18 obj arg0 arg1 arg2)
|
||||
arg1
|
||||
)
|
||||
|
||||
(defmethod TODO-RENAME-20 tracking-spline ((obj tracking-spline) (arg0 vector) (arg1 int))
|
||||
(defmethod tracking-spline-method-20 tracking-spline ((obj tracking-spline) (arg0 vector) (arg1 int))
|
||||
(let ((s3-0 (new 'stack-no-clear 'vector)))
|
||||
(vector-!
|
||||
s3-0
|
||||
@@ -793,7 +793,7 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod TODO-RENAME-21 tracking-spline ((obj tracking-spline) (arg0 vector) (arg1 float) (arg2 float))
|
||||
(defmethod tracking-spline-method-21 tracking-spline ((obj tracking-spline) (arg0 vector) (arg1 float) (arg2 float))
|
||||
(let ((v1-0 (-> obj used-point))
|
||||
(f0-0 (-> obj partial-point))
|
||||
)
|
||||
@@ -819,10 +819,10 @@
|
||||
(let ((s4-0 (new 'stack-no-clear 'tracking-spline-sampler)))
|
||||
(set! (-> s4-0 cur-pt) v1-0)
|
||||
(set! (-> s4-0 partial-pt) f0-0)
|
||||
(TODO-RENAME-19 obj (* (-> obj max-move) (-> *display* time-adjust-ratio)) arg0 s4-0)
|
||||
(TODO-RENAME-14 obj s4-0)
|
||||
(tracking-spline-method-19 obj (* (-> obj max-move) (-> *display* time-adjust-ratio)) arg0 s4-0)
|
||||
(tracking-spline-method-14 obj s4-0)
|
||||
(dotimes (s3-0 63)
|
||||
(TODO-RENAME-18 obj (* 0.015625 (-> obj sample-len)) arg0 s4-0)
|
||||
(tracking-spline-method-18 obj (* 0.015625 (-> obj sample-len)) arg0 s4-0)
|
||||
)
|
||||
(vector-float*! arg0 arg0 0.015625)
|
||||
(let ((a2-3 (-> s4-0 cur-pt)))
|
||||
@@ -831,7 +831,7 @@
|
||||
(set! (-> obj debug-old-position quad) (-> obj old-position quad))
|
||||
(set! (-> obj debug-out-position quad) (-> arg0 quad))
|
||||
(vector-! s4-1 arg0 (-> obj old-position))
|
||||
(TODO-RENAME-20 obj s4-1 a2-3)
|
||||
(tracking-spline-method-20 obj s4-1 a2-3)
|
||||
(vector+! arg0 (-> obj old-position) s4-1)
|
||||
)
|
||||
)
|
||||
@@ -841,22 +841,22 @@
|
||||
arg0
|
||||
)
|
||||
|
||||
(defmethod TODO-RENAME-22 tracking-spline ((obj tracking-spline) (arg0 float))
|
||||
(defmethod tracking-spline-method-22 tracking-spline ((obj tracking-spline) (arg0 float))
|
||||
(when (< arg0 (-> obj summed-len))
|
||||
(let ((s5-0 (new 'stack-no-clear 'tracking-spline-sampler)))
|
||||
(let ((a2-0 (new 'stack-no-clear 'vector)))
|
||||
(set! (-> s5-0 cur-pt) (-> obj used-point))
|
||||
(set! (-> s5-0 partial-pt) 0.0)
|
||||
(TODO-RENAME-19 obj (- (-> obj summed-len) arg0) a2-0 s5-0)
|
||||
(tracking-spline-method-19 obj (- (-> obj summed-len) arg0) a2-0 s5-0)
|
||||
)
|
||||
(TODO-RENAME-14 obj s5-0)
|
||||
(tracking-spline-method-14 obj s5-0)
|
||||
)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod TODO-RENAME-9 tracking-spline ((obj tracking-spline))
|
||||
(defmethod tracking-spline-method-9 tracking-spline ((obj tracking-spline))
|
||||
(let ((v1-0 (-> obj used-point))
|
||||
(s4-0 0)
|
||||
(s5-0 0)
|
||||
@@ -885,7 +885,7 @@
|
||||
)
|
||||
(set! (-> obj free-point) -134250495)
|
||||
(dotimes (v1-21 32)
|
||||
(when (zero? (logand s5-0 1))
|
||||
(when (not (logtest? s5-0 1))
|
||||
(set! (-> obj point v1-21 next) (-> obj free-point))
|
||||
(set! (-> obj free-point) v1-21)
|
||||
)
|
||||
@@ -969,7 +969,7 @@
|
||||
(init-cam-float-seeker (-> self tracking point-of-interest-blend) 0.0 0.005 0.02 0.125)
|
||||
(init-cam-float-seeker (-> self tracking underwater-blend) 0.0 0.007 0.03 0.125)
|
||||
(set! (-> self tracking use-point-of-interest) #f)
|
||||
(TODO-RENAME-10 (-> self position-spline) (-> self trans))
|
||||
(tracking-spline-method-10 (-> self position-spline) (-> self trans))
|
||||
(none)
|
||||
)
|
||||
|
||||
@@ -1035,60 +1035,52 @@
|
||||
;; WARN: rewrite_to_get_var got a none typed variable. Is there unreachable code? [OP: 45]
|
||||
;; WARN: rewrite_to_get_var got a none typed variable. Is there unreachable code? [OP: 50]
|
||||
(defbehavior cam-standard-event-handler camera-slave ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(let ((v1-0 arg2))
|
||||
(the-as
|
||||
object
|
||||
(cond
|
||||
((= v1-0 'go)
|
||||
(let ((v1-1 (-> arg3 param 0))
|
||||
(t9-0 (the-as (function object) enter-state))
|
||||
)
|
||||
(set! (-> self next-state) (the-as state v1-1))
|
||||
(t9-0)
|
||||
)
|
||||
)
|
||||
((or (= v1-0 'change-state) (= v1-0 'change-state-no-go))
|
||||
(let ((s5-0 (the-as object (-> arg3 param 0))))
|
||||
(cam-slave-init-vars)
|
||||
(let ((t9-2 (the-as (function object) (-> (the-as state s5-0) enter))))
|
||||
(if t9-2
|
||||
(t9-2)
|
||||
)
|
||||
(the-as
|
||||
object
|
||||
(case arg2
|
||||
(('go)
|
||||
(let ((v1-1 (-> arg3 param 0))
|
||||
(t9-0 (the-as (function object) enter-state))
|
||||
)
|
||||
(set! (-> self enter-has-run) #t)
|
||||
(set! (-> self event-hook) (-> (the-as state s5-0) event))
|
||||
(when (= arg2 'change-state)
|
||||
(let ((t9-3 (the-as (function object) enter-state)))
|
||||
(set! (-> self next-state) (the-as state s5-0))
|
||||
(t9-3)
|
||||
(set! (-> self next-state) (the-as state v1-1))
|
||||
(t9-0)
|
||||
)
|
||||
)
|
||||
(('change-state 'change-state-no-go)
|
||||
(let ((s5-0 (the-as object (-> arg3 param 0))))
|
||||
(cam-slave-init-vars)
|
||||
(let ((t9-2 (the-as (function object) (-> (the-as state s5-0) enter))))
|
||||
(if t9-2
|
||||
(t9-2)
|
||||
)
|
||||
)
|
||||
(set! (-> self enter-has-run) #t)
|
||||
(set! (-> self event-hook) (-> (the-as state s5-0) event))
|
||||
(when (= arg2 'change-state)
|
||||
(let ((t9-3 (the-as (function object) enter-state)))
|
||||
(set! (-> self next-state) (the-as state s5-0))
|
||||
(t9-3)
|
||||
)
|
||||
)
|
||||
)
|
||||
((= v1-0 'point-of-interest)
|
||||
(cond
|
||||
((-> arg3 param 0)
|
||||
(set! (-> self tracking use-point-of-interest) #t)
|
||||
(set! (-> self tracking point-of-interest quad) (-> (the-as vector (-> arg3 param 0)) quad))
|
||||
(let ((f0-0 1.0))
|
||||
(set! (-> self tracking point-of-interest-blend target) f0-0)
|
||||
f0-0
|
||||
)
|
||||
)
|
||||
(else
|
||||
(set! (-> self tracking use-point-of-interest) #f)
|
||||
(let ((f0-1 0.0))
|
||||
(set! (-> self tracking point-of-interest-blend target) f0-1)
|
||||
f0-1
|
||||
)
|
||||
)
|
||||
)
|
||||
(('point-of-interest)
|
||||
(cond
|
||||
((-> arg3 param 0)
|
||||
(set! (-> self tracking use-point-of-interest) #t)
|
||||
(set! (-> self tracking point-of-interest quad) (-> (the-as vector (-> arg3 param 0)) quad))
|
||||
(set! (-> self tracking point-of-interest-blend target) 1.0)
|
||||
)
|
||||
(else
|
||||
(set! (-> self tracking use-point-of-interest) #f)
|
||||
(set! (-> self tracking point-of-interest-blend target) 0.0)
|
||||
)
|
||||
)
|
||||
((= v1-0 'teleport)
|
||||
(cam-calc-follow! (-> self tracking) (-> self trans) #f)
|
||||
(slave-set-rotation! (-> self tracking) (-> self trans) (the-as float (-> self options)) (-> self fov) #f)
|
||||
)
|
||||
)
|
||||
)
|
||||
(('teleport)
|
||||
(cam-calc-follow! (-> self tracking) (-> self trans) #f)
|
||||
(slave-set-rotation! (-> self tracking) (-> self trans) (the-as float (-> self options)) (-> self fov) #f)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -1131,8 +1123,8 @@
|
||||
)
|
||||
((= (-> self spline-follow-dist) 0.0)
|
||||
(let ((f0-18 (if arg3
|
||||
(dummy-10 (-> self index) (-> self tracking follow-pt))
|
||||
(dummy-10 (-> self index) (-> *camera* tpos-curr-adj))
|
||||
(cam-index-method-10 (-> self index) (-> self tracking follow-pt))
|
||||
(cam-index-method-10 (-> self index) (-> *camera* tpos-curr-adj))
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -1165,7 +1157,7 @@
|
||||
(when (get-curve-data! (-> self cam-entity) (-> self spline-curve) 'campath 'campath-k -1000000000.0)
|
||||
(curve-get-pos! (-> self spline-offset) 0.0 (-> self spline-curve))
|
||||
(vector-negate! (-> self spline-offset) (-> self spline-offset))
|
||||
(dummy-9 (-> self index) 'campoints (-> self cam-entity) arg0 (-> self spline-curve))
|
||||
(cam-index-method-9 (-> self index) 'campoints (-> self cam-entity) arg0 (-> self spline-curve))
|
||||
(set! (-> self spline-exists) #t)
|
||||
)
|
||||
(cond
|
||||
@@ -1275,7 +1267,11 @@
|
||||
1.0
|
||||
)
|
||||
(else
|
||||
(let* ((f0-29 (* f0-28 f0-28)) (f0-30 (- 1.0 f0-29))) (* f0-30 (* f0-30 f0-30)))
|
||||
(let* ((f0-29 (* f0-28 f0-28))
|
||||
(f0-30 (- 1.0 f0-29))
|
||||
)
|
||||
(* f0-30 (* f0-30 f0-30))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -1634,11 +1630,9 @@
|
||||
)
|
||||
)
|
||||
|
||||
;; WARN: Stack slot offset 144 signed mismatch
|
||||
;; WARN: Stack slot offset 144 signed mismatch
|
||||
;; WARN: Unsupported inline assembly instruction kind - [mula.s f0, f3]
|
||||
;; WARN: Unsupported inline assembly instruction kind - [madda.s f1, f4]
|
||||
;; WARN: Unsupported inline assembly instruction kind - [madd.s f0, f2, f5]
|
||||
;; ERROR: Unsupported inline assembly instruction kind - [mula.s f0, f3]
|
||||
;; ERROR: Unsupported inline assembly instruction kind - [madda.s f1, f4]
|
||||
;; ERROR: Unsupported inline assembly instruction kind - [madd.s f0, f2, f5]
|
||||
(defun v-slrp2! ((arg0 vector) (arg1 vector) (arg2 vector) (arg3 float) (arg4 vector) (arg5 float))
|
||||
(local-vars
|
||||
(f0-10 float)
|
||||
@@ -1741,11 +1735,9 @@
|
||||
arg0
|
||||
)
|
||||
|
||||
;; WARN: Stack slot offset 144 signed mismatch
|
||||
;; WARN: Stack slot offset 144 signed mismatch
|
||||
;; WARN: Unsupported inline assembly instruction kind - [mula.s f0, f3]
|
||||
;; WARN: Unsupported inline assembly instruction kind - [madda.s f1, f4]
|
||||
;; WARN: Unsupported inline assembly instruction kind - [madd.s f0, f2, f5]
|
||||
;; ERROR: Unsupported inline assembly instruction kind - [mula.s f0, f3]
|
||||
;; ERROR: Unsupported inline assembly instruction kind - [madda.s f1, f4]
|
||||
;; ERROR: Unsupported inline assembly instruction kind - [madd.s f0, f2, f5]
|
||||
(defun v-slrp3! ((arg0 vector) (arg1 vector) (arg2 vector) (arg3 vector) (arg4 float))
|
||||
(local-vars (f0-7 float) (f26-0 float) (f28-0 float) (sv-144 float) (sv-160 vector))
|
||||
(set! sv-144 arg4)
|
||||
@@ -1822,7 +1814,3 @@
|
||||
)
|
||||
arg0
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -9,19 +9,19 @@
|
||||
(define-extern collide-cache-using-y-probe-test (function vector symbol))
|
||||
(define-extern collide-cache-using-box-test (function vector symbol))
|
||||
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;; Collide Helpers
|
||||
;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
(deftype collide-using-spheres-params (structure)
|
||||
((spheres (inline-array sphere) :offset-assert 0)
|
||||
(num-spheres uint32 :offset-assert 4)
|
||||
(collide-with collide-kind :offset-assert 8)
|
||||
(proc process-drawable :offset-assert 16)
|
||||
(ignore-pat pat-surface :offset-assert 20)
|
||||
(solid-only basic :offset-assert 24)
|
||||
((spheres (inline-array sphere) :offset-assert 0)
|
||||
(num-spheres uint32 :offset-assert 4)
|
||||
(collide-with collide-kind :offset-assert 8)
|
||||
(proc process-drawable :offset-assert 16)
|
||||
(ignore-pat pat-surface :offset-assert 20)
|
||||
(solid-only basic :offset-assert 24)
|
||||
)
|
||||
:method-count-assert 9
|
||||
:size-assert #x1c
|
||||
@@ -50,8 +50,8 @@
|
||||
:size-assert #xc60
|
||||
:flag-assert #xb00000c60
|
||||
(:methods
|
||||
(dummy-9 (_type_ object object) symbol 9)
|
||||
(dummy-10 (_type_ object object) symbol 10)
|
||||
(collide-puss-work-method-9 (_type_ object object) symbol 9)
|
||||
(collide-puss-work-method-10 (_type_ object object) symbol 10)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -75,12 +75,12 @@
|
||||
;; The triangles stored in the cache.
|
||||
;; This is a common return type of collision queries.
|
||||
(deftype collide-cache-tri (structure)
|
||||
((vertex vector 3 :inline :offset-assert 0) ;; actual locations
|
||||
(extra-quad uint128 :offset 48)
|
||||
(pat pat-surface :offset 48) ;; metadata about the surface of this tri
|
||||
(prim-index uint16 :offset 52) ;; in the collide-cache-prim list
|
||||
(user16 uint16 :offset 54)
|
||||
(user32 uint32 2 :offset 56)
|
||||
((vertex vector 3 :inline :offset-assert 0) ;; actual locations
|
||||
(extra-quad uint128 :offset 48)
|
||||
(pat pat-surface :offset 48) ;; metadata about the surface of this tri
|
||||
(prim-index uint16 :offset 52) ;; in the collide-cache-prim list
|
||||
(user16 uint16 :offset 54)
|
||||
(user32 uint32 2 :offset 56)
|
||||
)
|
||||
:method-count-assert 9
|
||||
:size-assert #x40
|
||||
@@ -90,18 +90,18 @@
|
||||
;; The primitives stored in the cache.
|
||||
;; The "core" is extracted from the normal collide-shape-prim and placed inline here.
|
||||
(deftype collide-cache-prim (structure)
|
||||
((prim-core collide-prim-core :inline :offset-assert 0)
|
||||
(extra-quad uint128 :offset-assert 32)
|
||||
(ccache collide-cache :offset 32)
|
||||
(prim collide-shape-prim :offset 36)
|
||||
(first-tri uint16 :offset 40)
|
||||
(num-tris uint16 :offset 42)
|
||||
(unused uint8 4 :offset 44)
|
||||
(world-sphere vector :inline :offset 0)
|
||||
(collide-as collide-kind :offset 16)
|
||||
(action collide-action :offset 24)
|
||||
(offense collide-offense :offset 28)
|
||||
(prim-type int8 :offset 29)
|
||||
((prim-core collide-prim-core :inline :offset-assert 0)
|
||||
(extra-quad uint128 :offset-assert 32)
|
||||
(ccache collide-cache :offset 32)
|
||||
(prim collide-shape-prim :offset 36)
|
||||
(first-tri uint16 :offset 40)
|
||||
(num-tris uint16 :offset 42)
|
||||
(unused uint8 4 :offset 44)
|
||||
(world-sphere vector :inline :offset 0)
|
||||
(collide-as collide-kind :offset 16)
|
||||
(action collide-action :offset 24)
|
||||
(offense collide-offense :offset 28)
|
||||
(prim-type int8 :offset 29)
|
||||
)
|
||||
:method-count-assert 11
|
||||
:size-assert #x30
|
||||
@@ -114,17 +114,16 @@
|
||||
|
||||
;; The actual cache!
|
||||
(deftype collide-cache (basic)
|
||||
((num-tris int32 :offset-assert 4)
|
||||
;;(num-tris-u uint32 :offset 4) ;; added
|
||||
(num-prims int32 :offset-assert 8)
|
||||
(num-prims-u uint32 :offset 8 );; added
|
||||
(ignore-mask pat-surface :offset-assert 12)
|
||||
(proc process-drawable :offset-assert 16) ;; types: target
|
||||
(collide-box bounding-box :inline :offset-assert 32)
|
||||
(collide-box4w bounding-box4w :inline :offset-assert 64)
|
||||
(collide-with collide-kind :offset-assert 96)
|
||||
(prims collide-cache-prim 100 :inline :offset-assert 112)
|
||||
(tris collide-cache-tri 461 :inline :offset-assert 4912)
|
||||
((num-tris int32 :offset-assert 4)
|
||||
(num-prims int32 :offset-assert 8)
|
||||
(num-prims-u uint32 :offset 8)
|
||||
(ignore-mask pat-surface :offset-assert 12)
|
||||
(proc process-drawable :offset-assert 16) ;; types: target
|
||||
(collide-box bounding-box :inline :offset-assert 32)
|
||||
(collide-box4w bounding-box4w :inline :offset-assert 64)
|
||||
(collide-with collide-kind :offset-assert 96)
|
||||
(prims collide-cache-prim 100 :inline :offset-assert 112)
|
||||
(tris collide-cache-tri 461 :inline :offset-assert 4912)
|
||||
)
|
||||
:method-count-assert 33
|
||||
:size-assert #x8670
|
||||
@@ -148,9 +147,9 @@
|
||||
(fill-from-foreground-using-y-probe (_type_) none 24)
|
||||
(fill-from-water (_type_ water-control) none 25) ;; or whatever is from 152 in the process passed to 16
|
||||
(load-mesh-from-spad-in-box (_type_ collide-frag-mesh) none 26)
|
||||
(dummy-27 (_type_) none 27)
|
||||
(dummy-28 (_type_) none 28)
|
||||
(dummy-29 (_type_ collide-frag-mesh) none 29)
|
||||
(collide-cache-method-27 (_type_) none 27)
|
||||
(collide-cache-method-28 (_type_) none 28)
|
||||
(collide-cache-method-29 (_type_ collide-frag-mesh) none 29)
|
||||
(puyp-mesh (_type_ collide-puyp-work collide-cache-prim) none 30)
|
||||
(puyp-sphere (_type_ collide-puyp-work collide-cache-prim) vector 31)
|
||||
(unpack-background-collide-mesh (_type_ object object object) none 32) ;; helper for fill from background.
|
||||
@@ -159,8 +158,8 @@
|
||||
|
||||
|
||||
(deftype collide-list-item (structure)
|
||||
((mesh collide-frag-mesh :offset-assert 0)
|
||||
(inst basic :offset-assert 4)
|
||||
((mesh collide-frag-mesh :offset-assert 0)
|
||||
(inst basic :offset-assert 4)
|
||||
)
|
||||
:method-count-assert 9
|
||||
:size-assert #x8
|
||||
@@ -199,17 +198,12 @@
|
||||
(malloc 'global (* (size-of collide-cache-tri) BIG_COLLIDE_CACHE_SIZE))
|
||||
;; but start it at the default.
|
||||
(define *collide-cache-max-tris* 460)
|
||||
(defmacro activate-big-collide-cache! ()
|
||||
`(set! *collide-cache-max-tris* BIG_COLLIDE_CACHE_SIZE)
|
||||
)
|
||||
|
||||
(defmacro activate-big-collide-cache! ()
|
||||
`(set! *collide-cache-max-tris* BIG_COLLIDE_CACHE_SIZE)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
(define-perm *collide-list* collide-list (new 'global 'collide-list))
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -5,6 +5,8 @@
|
||||
;; name in dgo: collide-cache
|
||||
;; dgos: GAME, ENGINE
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(defmethod debug-draw collide-cache ((obj collide-cache))
|
||||
"Debug draw all the things in the collide cache!"
|
||||
(let ((gp-0 (the-as collide-cache-tri (-> obj tris))))
|
||||
@@ -468,7 +470,7 @@
|
||||
(fill-from-background
|
||||
obj
|
||||
(method-of-type bsp-header collide-y-probe)
|
||||
(the-as (function collide-cache object none) (method-of-type collide-cache dummy-28))
|
||||
(the-as (function collide-cache object none) (method-of-type collide-cache collide-cache-method-28))
|
||||
)
|
||||
)
|
||||
(if (logtest? arg2 (collide-kind water))
|
||||
@@ -741,7 +743,7 @@
|
||||
(fill-from-background
|
||||
obj
|
||||
(method-of-type bsp-header collide-ray)
|
||||
(the-as (function collide-cache object none) (method-of-type collide-cache dummy-27))
|
||||
(the-as (function collide-cache object none) (method-of-type collide-cache collide-cache-method-27))
|
||||
)
|
||||
)
|
||||
(if (logtest? arg3 (collide-kind water))
|
||||
@@ -2503,8 +2505,8 @@
|
||||
(when (logtest? s3-0 (-> s4-0 prim-core collide-as))
|
||||
(when (or (not (-> arg0 solid-only)) (logtest? (-> s4-0 prim-core action) (collide-action solid)))
|
||||
(if (>= (-> s4-0 prim-core prim-type) 0)
|
||||
(set! v1-12 (dummy-9 s5-0 s4-0 arg0))
|
||||
(set! v1-12 (dummy-10 s5-0 s4-0 arg0))
|
||||
(set! v1-12 (collide-puss-work-method-9 s5-0 s4-0 arg0))
|
||||
(set! v1-12 (collide-puss-work-method-10 s5-0 s4-0 arg0))
|
||||
)
|
||||
(when v1-12
|
||||
;; uncomment to view the point that blocks you from exiting duck.
|
||||
@@ -2519,7 +2521,8 @@
|
||||
)
|
||||
(b! #t cfg-21 :delay (nop!))
|
||||
(label cfg-20)
|
||||
(format 0 "ERROR: Exceeded max # of spheres in collide-cache::probe-using-spheres!~" a2-0)
|
||||
;; fixed bad format string
|
||||
(format 0 "ERROR: Exceeded max # of spheres in collide-cache::probe-using-spheres!~%")
|
||||
)
|
||||
(label cfg-21)
|
||||
#f
|
||||
|
||||
@@ -13,33 +13,35 @@
|
||||
;; It doesn't participate in the collide shape system at all
|
||||
;; It does use the main collide-cache.
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(deftype edge-grab-info (structure)
|
||||
((world-vertex vector 6 :inline :offset-assert 0)
|
||||
(local-vertex vector 6 :inline :offset-assert 96)
|
||||
(actor-cshape-prim-offset int32 :offset-assert 192)
|
||||
(actor-handle handle :offset-assert 200)
|
||||
(hanging-matrix matrix :inline :offset-assert 208)
|
||||
(edge-vertex vector 2 :inline :offset 0)
|
||||
(center-hold vector :inline :offset 32)
|
||||
(tri-vertex vector 3 :inline :offset 48)
|
||||
(left-hand-hold vector :inline :offset-assert 272)
|
||||
(right-hand-hold vector :inline :offset-assert 288)
|
||||
(center-hold-old vector :inline :offset-assert 304)
|
||||
(edge-tri-pat uint32 :offset-assert 320)
|
||||
((world-vertex vector 6 :inline :offset-assert 0)
|
||||
(local-vertex vector 6 :inline :offset-assert 96)
|
||||
(actor-cshape-prim-offset int32 :offset-assert 192)
|
||||
(actor-handle handle :offset-assert 200)
|
||||
(hanging-matrix matrix :inline :offset-assert 208)
|
||||
(edge-vertex vector 2 :inline :offset 0)
|
||||
(center-hold vector :inline :offset 32)
|
||||
(tri-vertex vector 3 :inline :offset 48)
|
||||
(left-hand-hold vector :inline :offset-assert 272)
|
||||
(right-hand-hold vector :inline :offset-assert 288)
|
||||
(center-hold-old vector :inline :offset-assert 304)
|
||||
(edge-tri-pat uint32 :offset-assert 320)
|
||||
)
|
||||
:method-count-assert 11
|
||||
:size-assert #x144
|
||||
:flag-assert #xb00000144
|
||||
(:methods
|
||||
(dummy-9 (_type_) symbol 9)
|
||||
(edge-grab-info-method-9 (_type_) symbol 9)
|
||||
(debug-draw (_type_) symbol 10)
|
||||
)
|
||||
)
|
||||
|
||||
(declare-type collide-cache-tri structure)
|
||||
(deftype collide-edge-tri (structure)
|
||||
((ctri collide-cache-tri :offset-assert 0)
|
||||
(normal vector :inline :offset-assert 16)
|
||||
((ctri collide-cache-tri :offset-assert 0)
|
||||
(normal vector :inline :offset-assert 16)
|
||||
)
|
||||
:method-count-assert 9
|
||||
:size-assert #x20
|
||||
@@ -47,11 +49,11 @@
|
||||
)
|
||||
|
||||
(deftype collide-edge-edge (structure)
|
||||
((ignore basic :offset-assert 0)
|
||||
(etri collide-edge-tri :offset-assert 4)
|
||||
(vertex-ptr (inline-array vector) 2 :offset-assert 8)
|
||||
(outward vector :inline :offset-assert 16)
|
||||
(edge-vec-norm vector :inline :offset-assert 32)
|
||||
((ignore basic :offset-assert 0)
|
||||
(etri collide-edge-tri :offset-assert 4)
|
||||
(vertex-ptr (inline-array vector) 2 :offset-assert 8)
|
||||
(outward vector :inline :offset-assert 16)
|
||||
(edge-vec-norm vector :inline :offset-assert 32)
|
||||
)
|
||||
:method-count-assert 9
|
||||
:size-assert #x30
|
||||
@@ -59,12 +61,12 @@
|
||||
)
|
||||
|
||||
(deftype collide-edge-hold-item (structure)
|
||||
((next collide-edge-hold-item :offset-assert 0)
|
||||
(rating float :offset-assert 4)
|
||||
(split int8 :offset-assert 8)
|
||||
(edge collide-edge-edge :offset-assert 12)
|
||||
(center-pt vector :inline :offset-assert 16)
|
||||
(outward-pt vector :inline :offset-assert 32)
|
||||
((next collide-edge-hold-item :offset-assert 0)
|
||||
(rating float :offset-assert 4)
|
||||
(split int8 :offset-assert 8)
|
||||
(edge collide-edge-edge :offset-assert 12)
|
||||
(center-pt vector :inline :offset-assert 16)
|
||||
(outward-pt vector :inline :offset-assert 32)
|
||||
)
|
||||
:method-count-assert 9
|
||||
:size-assert #x30
|
||||
@@ -72,10 +74,10 @@
|
||||
)
|
||||
|
||||
(deftype collide-edge-hold-list (structure)
|
||||
((num-allocs uint32 :offset-assert 0)
|
||||
(num-attempts uint32 :offset-assert 4)
|
||||
(head collide-edge-hold-item :offset-assert 8)
|
||||
(items collide-edge-hold-item 32 :inline :offset-assert 16)
|
||||
((num-allocs uint32 :offset-assert 0)
|
||||
(num-attempts uint32 :offset-assert 4)
|
||||
(head collide-edge-hold-item :offset-assert 8)
|
||||
(items collide-edge-hold-item 32 :inline :offset-assert 16)
|
||||
(attempts qword 32 :inline :offset-assert 1552)
|
||||
)
|
||||
:method-count-assert 11
|
||||
@@ -90,32 +92,32 @@
|
||||
(declare-type collide-cache basic)
|
||||
(declare-type collide-shape basic)
|
||||
(deftype collide-edge-work (structure)
|
||||
((ccache collide-cache :offset-assert 0)
|
||||
(cshape collide-shape :offset-assert 4)
|
||||
(num-verts uint32 :offset-assert 8)
|
||||
(num-edges uint32 :offset-assert 12)
|
||||
(num-tris uint32 :offset-assert 16)
|
||||
(cache-fill-box bounding-box :inline :offset-assert 32)
|
||||
(within-reach-box bounding-box :inline :offset-assert 64)
|
||||
(within-reach-box4w bounding-box4w :inline :offset-assert 96)
|
||||
(search-pt vector :inline :offset-assert 128)
|
||||
(search-dir-vec vector :inline :offset-assert 144)
|
||||
(max-dist-sqrd-to-outward-pt float :offset-assert 160)
|
||||
(max-dir-cosa-delta float :offset-assert 164)
|
||||
(split-dists float 2 :offset-assert 168)
|
||||
(outward-offset vector :inline :offset-assert 176)
|
||||
(local-cache-fill-box bounding-box :inline :offset-assert 192)
|
||||
(local-within-reach-box bounding-box :inline :offset-assert 224)
|
||||
(local-player-spheres sphere 12 :inline :offset-assert 256)
|
||||
(world-player-spheres sphere 12 :inline :offset-assert 448)
|
||||
(local-player-hanging-spheres sphere 6 :inline :offset 256)
|
||||
(world-player-hanging-spheres sphere 6 :inline :offset 448)
|
||||
(local-player-leap-up-spheres sphere 6 :inline :offset 352)
|
||||
(world-player-leap-up-spheres sphere 6 :inline :offset 544)
|
||||
(verts vector 64 :inline :offset-assert 640)
|
||||
(edges collide-edge-edge 96 :inline :offset-assert 1664)
|
||||
(tris collide-edge-tri 48 :inline :offset-assert 6272)
|
||||
(hold-list collide-edge-hold-list :inline :offset-assert 7808)
|
||||
((ccache collide-cache :offset-assert 0)
|
||||
(cshape collide-shape :offset-assert 4)
|
||||
(num-verts uint32 :offset-assert 8)
|
||||
(num-edges uint32 :offset-assert 12)
|
||||
(num-tris uint32 :offset-assert 16)
|
||||
(cache-fill-box bounding-box :inline :offset-assert 32)
|
||||
(within-reach-box bounding-box :inline :offset-assert 64)
|
||||
(within-reach-box4w bounding-box4w :inline :offset-assert 96)
|
||||
(search-pt vector :inline :offset-assert 128)
|
||||
(search-dir-vec vector :inline :offset-assert 144)
|
||||
(max-dist-sqrd-to-outward-pt float :offset-assert 160)
|
||||
(max-dir-cosa-delta float :offset-assert 164)
|
||||
(split-dists float 2 :offset-assert 168)
|
||||
(outward-offset vector :inline :offset-assert 176)
|
||||
(local-cache-fill-box bounding-box :inline :offset-assert 192)
|
||||
(local-within-reach-box bounding-box :inline :offset-assert 224)
|
||||
(local-player-spheres sphere 12 :inline :offset-assert 256)
|
||||
(world-player-spheres sphere 12 :inline :offset-assert 448)
|
||||
(local-player-hanging-spheres sphere 6 :inline :offset 256)
|
||||
(world-player-hanging-spheres sphere 6 :inline :offset 448)
|
||||
(local-player-leap-up-spheres sphere 6 :inline :offset 352)
|
||||
(world-player-leap-up-spheres sphere 6 :inline :offset 544)
|
||||
(verts vector 64 :inline :offset-assert 640)
|
||||
(edges collide-edge-edge 96 :inline :offset-assert 1664)
|
||||
(tris collide-edge-tri 48 :inline :offset-assert 6272)
|
||||
(hold-list collide-edge-hold-list :inline :offset-assert 7808)
|
||||
)
|
||||
:method-count-assert 20
|
||||
:size-assert #x2690
|
||||
@@ -126,7 +128,7 @@
|
||||
(debug-draw-tris (_type_) none 11)
|
||||
(debug-draw-sphere (_type_) symbol 12)
|
||||
(compute-center-point! (_type_ collide-edge-edge vector) float 13)
|
||||
(dummy-14 (_type_ vector vector int) float 14)
|
||||
(collide-edge-work-method-14 (_type_ vector vector int) float 14)
|
||||
(find-grabbable-edges! (_type_) none 15)
|
||||
(find-grabbable-tris! (_type_) none 16)
|
||||
(should-add-to-list? (_type_ collide-edge-hold-item collide-edge-edge) symbol 17)
|
||||
@@ -136,33 +138,33 @@
|
||||
)
|
||||
|
||||
(define *collide-edge-work* (new 'static 'collide-edge-work
|
||||
:max-dist-sqrd-to-outward-pt 37748736.0
|
||||
:max-dir-cosa-delta 0.6
|
||||
:split-dists (new 'static 'array float 2 1024.0 1433.6)
|
||||
:outward-offset (new 'static 'vector :x 708.608 :y 13312.0 :w 1.0)
|
||||
:local-cache-fill-box (new 'static 'bounding-box
|
||||
:min (new 'static 'vector :x -8192.0 :y -11059.2 :z -8192.0 :w 1.0)
|
||||
:max (new 'static 'vector :x 8192.0 :y 24576.0 :z 8192.0 :w 1.0)
|
||||
)
|
||||
:local-within-reach-box (new 'static 'bounding-box
|
||||
:min (new 'static 'vector :x -6144.0 :y 5324.8 :z -6144.0 :w 1.0)
|
||||
:max (new 'static 'vector :x 6144.0 :y 11059.2 :z 6144.0 :w 1.0)
|
||||
)
|
||||
:local-player-spheres (new 'static 'inline-array sphere 12
|
||||
(new 'static 'sphere :x 1720.32 :y -819.2 :w 1433.6)
|
||||
(new 'static 'sphere :x 2293.76 :y -3276.8 :w 1884.16)
|
||||
(new 'static 'sphere :x 1966.08 :y -6144.0 :w 1556.48)
|
||||
(new 'static 'sphere :x 1966.08 :y -8601.6 :w 1556.48)
|
||||
(new 'static 'sphere :x 1761.28 :y -11059.2 :w 1351.68)
|
||||
(new 'static 'sphere :x 1679.36 :y -13312.0 :w 1269.76)
|
||||
(new 'static 'sphere :x -737.28 :y 4096.0 :w 3072.0)
|
||||
(new 'static 'sphere :x -737.28 :y 6553.6 :w 3072.0)
|
||||
(new 'static 'sphere :x -737.28 :y 9420.8 :w 3072.0)
|
||||
(new 'static 'sphere :x 1720.32 :y 3686.4 :w 2949.12)
|
||||
(new 'static 'sphere :x 1720.32 :y 5734.4 :w 2949.12)
|
||||
(new 'static 'sphere :x 1720.32 :y 8601.6 :w 2949.12)
|
||||
)
|
||||
:max-dist-sqrd-to-outward-pt 37748736.0
|
||||
:max-dir-cosa-delta 0.6
|
||||
:split-dists (new 'static 'array float 2 1024.0 1433.6)
|
||||
:outward-offset (new 'static 'vector :x 708.608 :y 13312.0 :w 1.0)
|
||||
:local-cache-fill-box (new 'static 'bounding-box
|
||||
:min (new 'static 'vector :x -8192.0 :y -11059.2 :z -8192.0 :w 1.0)
|
||||
:max (new 'static 'vector :x 8192.0 :y 24576.0 :z 8192.0 :w 1.0)
|
||||
)
|
||||
)
|
||||
:local-within-reach-box (new 'static 'bounding-box
|
||||
:min (new 'static 'vector :x -6144.0 :y 5324.8 :z -6144.0 :w 1.0)
|
||||
:max (new 'static 'vector :x 6144.0 :y 11059.2 :z 6144.0 :w 1.0)
|
||||
)
|
||||
:local-player-spheres (new 'static 'inline-array sphere 12
|
||||
(new 'static 'sphere :x 1720.32 :y -819.2 :w 1433.6)
|
||||
(new 'static 'sphere :x 2293.76 :y -3276.8 :w 1884.16)
|
||||
(new 'static 'sphere :x 1966.08 :y -6144.0 :w 1556.48)
|
||||
(new 'static 'sphere :x 1966.08 :y -8601.6 :w 1556.48)
|
||||
(new 'static 'sphere :x 1761.28 :y -11059.2 :w 1351.68)
|
||||
(new 'static 'sphere :x 1679.36 :y -13312.0 :w 1269.76)
|
||||
(new 'static 'sphere :x -737.28 :y 4096.0 :w 3072.0)
|
||||
(new 'static 'sphere :x -737.28 :y 6553.6 :w 3072.0)
|
||||
(new 'static 'sphere :x -737.28 :y 9420.8 :w 3072.0)
|
||||
(new 'static 'sphere :x 1720.32 :y 3686.4 :w 2949.12)
|
||||
(new 'static 'sphere :x 1720.32 :y 5734.4 :w 2949.12)
|
||||
(new 'static 'sphere :x 1720.32 :y 8601.6 :w 2949.12)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(define-perm *edge-grab-info* edge-grab-info (new 'global 'edge-grab-info))
|
||||
|
||||
@@ -5,6 +5,8 @@
|
||||
;; name in dgo: collide-edge-grab
|
||||
;; dgos: GAME, ENGINE
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(defmethod find-edge-grabs! target ((obj target) (arg0 collide-cache))
|
||||
"Main edge grabbing method.
|
||||
Will populate *edge-grab-info* and send *target* an 'edge-grab event if successful."
|
||||
@@ -144,7 +146,7 @@
|
||||
)
|
||||
(let ((s0-0 (new 'stack-no-clear 'vector)))
|
||||
(vector+*! s0-0 (-> arg0 center-pt) (-> s3-0 edge-vec-norm) 1105.92)
|
||||
(let ((f0-0 (dummy-14 obj (-> arg1 right-hand-hold) s0-0 (the-as int s4-0))))
|
||||
(let ((f0-0 (collide-edge-work-method-14 obj (-> arg1 right-hand-hold) s0-0 (the-as int s4-0))))
|
||||
(if (< 491.52 f0-0)
|
||||
(return #f)
|
||||
)
|
||||
@@ -157,7 +159,7 @@
|
||||
)
|
||||
(sv-144 sv-160 sv-176 a2-3 a3-2)
|
||||
)
|
||||
(let ((f0-1 (dummy-14 obj (-> arg1 left-hand-hold) s0-0 (the-as int s4-0))))
|
||||
(let ((f0-1 (collide-edge-work-method-14 obj (-> arg1 left-hand-hold) s0-0 (the-as int s4-0))))
|
||||
(if (< 491.52 f0-1)
|
||||
(return #f)
|
||||
)
|
||||
@@ -229,7 +231,7 @@
|
||||
#t
|
||||
)
|
||||
|
||||
(defmethod dummy-9 edge-grab-info ((obj edge-grab-info))
|
||||
(defmethod edge-grab-info-method-9 edge-grab-info ((obj edge-grab-info))
|
||||
(local-vars (v0-0 symbol) (v1-14 int))
|
||||
(rlet ((acc :class vf)
|
||||
(Q :class vf)
|
||||
@@ -364,7 +366,7 @@
|
||||
(defmethod-mips2c "(method 16 collide-edge-work)" 16 collide-edge-work)
|
||||
(defmethod-mips2c "(method 15 collide-edge-work)" 15 collide-edge-work)
|
||||
|
||||
(defmethod dummy-14 collide-edge-work ((obj collide-edge-work) (arg0 vector) (arg1 vector) (arg2 int))
|
||||
(defmethod collide-edge-work-method-14 collide-edge-work ((obj collide-edge-work) (arg0 vector) (arg1 vector) (arg2 int))
|
||||
(let ((f30-0 -1.0))
|
||||
(let ((s2-0 (new 'stack-no-clear 'vector)))
|
||||
(dotimes (s1-0 (the-as int (-> obj num-edges)))
|
||||
@@ -650,7 +652,6 @@
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(defmethod debug-draw-sphere collide-edge-work ((obj collide-edge-work))
|
||||
(dotimes (s5-0 (the-as int (-> obj num-verts)))
|
||||
(let ((a2-0 (-> obj verts s5-0)))
|
||||
@@ -730,90 +731,73 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(let
|
||||
((v1-1
|
||||
(new 'static 'surface
|
||||
:name '*rotate-surface*
|
||||
:turnv 1.0
|
||||
:turnvv 1.0
|
||||
:tiltv 1.0
|
||||
:tiltvv 1.0
|
||||
:transv-max 1.0
|
||||
:target-speed 1.0
|
||||
:seek0 153600.0
|
||||
:seek90 153600.0
|
||||
:seek180 256000.0
|
||||
:fric 153600.0
|
||||
:nonlin-fric-dist 5120.0
|
||||
:slip-factor 1.0
|
||||
:slope-down-factor 10240.0
|
||||
:slope-slip-angle 8192.0
|
||||
:impact-fric 1.0
|
||||
:bend-factor 0.8
|
||||
:bend-speed 4.0
|
||||
:alignv 1.0
|
||||
:slope-up-traction 1.0
|
||||
:align-speed 1.0
|
||||
:flags #x4000
|
||||
)
|
||||
)
|
||||
)
|
||||
(define *rotate-surface* v1-1)
|
||||
(set!
|
||||
(-> v1-1 mult-hook)
|
||||
(the-as
|
||||
(function surface surface surface int none)
|
||||
(lambda ((arg0 surface) (arg1 object) (arg2 object) (arg3 int))
|
||||
(when (= arg3 1)
|
||||
(let ((f0-0 151756.8))
|
||||
(set! (-> arg0 fric) f0-0)
|
||||
f0-0
|
||||
)
|
||||
(let ((v1-1
|
||||
(new 'static 'surface
|
||||
:name '*rotate-surface*
|
||||
:turnv 1.0
|
||||
:turnvv 1.0
|
||||
:tiltv 1.0
|
||||
:tiltvv 1.0
|
||||
:transv-max 1.0
|
||||
:target-speed 1.0
|
||||
:seek0 153600.0
|
||||
:seek90 153600.0
|
||||
:seek180 256000.0
|
||||
:fric 153600.0
|
||||
:nonlin-fric-dist 5120.0
|
||||
:slip-factor 1.0
|
||||
:slope-down-factor 10240.0
|
||||
:slope-slip-angle 8192.0
|
||||
:impact-fric 1.0
|
||||
:bend-factor 0.8
|
||||
:bend-speed 4.0
|
||||
:alignv 1.0
|
||||
:slope-up-traction 1.0
|
||||
:align-speed 1.0
|
||||
:flags (surface-flags moving-ground)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(define *rotate-surface* v1-1)
|
||||
(set! *rotate-surface* v1-1)
|
||||
(set! (-> v1-1 mult-hook)
|
||||
(the-as
|
||||
(function surface surface surface int none)
|
||||
(lambda ((arg0 surface) (arg1 object) (arg2 object) (arg3 int)) (if (= arg3 1)
|
||||
(set! (-> arg0 fric) 151756.8)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> v1-1 touch-hook) nothing)
|
||||
(set! (-> v1-1 active-hook) nothing)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(let
|
||||
((v1-2
|
||||
(new 'static 'surface
|
||||
:name '*no-walk-surface*
|
||||
:turnv 0.5
|
||||
:turnvv 1.0
|
||||
:tiltv 1.0
|
||||
:tiltvv 1.0
|
||||
:transv-max 0.7
|
||||
:target-speed 0.7
|
||||
:seek0 24576.0
|
||||
:seek90 24576.0
|
||||
:seek180 24576.0
|
||||
:fric 23756.8
|
||||
:nonlin-fric-dist 4091904.0
|
||||
:slope-slip-angle 16384.0
|
||||
:bend-speed 4.0
|
||||
:alignv 0.5
|
||||
:slope-up-traction 0.9
|
||||
:align-speed 1.0
|
||||
:flags #x28
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((v1-2 (new 'static 'surface
|
||||
:name '*no-walk-surface*
|
||||
:turnv 0.5
|
||||
:turnvv 1.0
|
||||
:tiltv 1.0
|
||||
:tiltvv 1.0
|
||||
:transv-max 0.7
|
||||
:target-speed 0.7
|
||||
:seek0 24576.0
|
||||
:seek90 24576.0
|
||||
:seek180 24576.0
|
||||
:fric 23756.8
|
||||
:nonlin-fric-dist 4091904.0
|
||||
:slope-slip-angle 16384.0
|
||||
:bend-speed 4.0
|
||||
:alignv 0.5
|
||||
:slope-up-traction 0.9
|
||||
:align-speed 1.0
|
||||
:flags (surface-flags no-turn-around always-rotate-toward-transv)
|
||||
)
|
||||
)
|
||||
)
|
||||
(define *no-walk-surface* v1-2)
|
||||
(set!
|
||||
(-> v1-2 mult-hook)
|
||||
(the-as (function surface surface surface int none) nothing)
|
||||
)
|
||||
(set! *no-walk-surface* v1-2)
|
||||
(set! (-> v1-2 mult-hook) (the-as (function surface surface surface int none) nothing))
|
||||
(set! (-> v1-2 touch-hook) nothing)
|
||||
(set! (-> v1-2 active-hook) nothing)
|
||||
)
|
||||
|
||||
|
||||
; (defmethod find-edge-grabs! target ((obj target) (arg0 collide-cache))
|
||||
; (format *stdcon* "no edge grabs for you!~%")
|
||||
; (the object 0)
|
||||
; )
|
||||
@@ -68,7 +68,7 @@
|
||||
|
||||
|
||||
;; Nav Enemy Collision (made up name)
|
||||
;; dummy-58 and integrate-for-enemy-with-move-to-ground are nav-enemy specific.
|
||||
;; collide-shape-moving-method-58 and integrate-for-enemy-with-move-to-ground are nav-enemy specific.
|
||||
;; the details aren't super well understood yet. But they basically try to go forward if they aren't blocked.
|
||||
;; Uses find-overlapping-shapes as the detector. (old system)
|
||||
|
||||
@@ -83,6 +83,8 @@
|
||||
(declare-type touching-list structure)
|
||||
(declare-type collide-shape-prim basic)
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;
|
||||
;; Sticky Rider
|
||||
;;;;;;;;;;;;;;;;;;;
|
||||
@@ -93,10 +95,10 @@
|
||||
|
||||
|
||||
(deftype collide-sticky-rider (structure)
|
||||
((rider-handle handle :offset-assert 0)
|
||||
(sticky-prim collide-shape-prim :offset-assert 8)
|
||||
(prim-ry float :offset-assert 12)
|
||||
(rider-local-pos vector :inline :offset-assert 16)
|
||||
((rider-handle handle :offset-assert 0)
|
||||
(sticky-prim collide-shape-prim :offset-assert 8)
|
||||
(prim-ry float :offset-assert 12)
|
||||
(rider-local-pos vector :inline :offset-assert 16)
|
||||
)
|
||||
:method-count-assert 10
|
||||
:size-assert #x20
|
||||
@@ -116,9 +118,9 @@
|
||||
;; A collection of collide-sticky-riders
|
||||
;; dynamic type. There's one collide-sticky-rider per rider.
|
||||
(deftype collide-sticky-rider-group (basic)
|
||||
((num-riders int32 :offset-assert 4)
|
||||
(allocated-riders int32 :offset-assert 8)
|
||||
(rider collide-sticky-rider 1 :inline :offset-assert 16)
|
||||
((num-riders int32 :offset-assert 4)
|
||||
(allocated-riders int32 :offset-assert 8)
|
||||
(rider collide-sticky-rider 1 :inline :offset-assert 16)
|
||||
)
|
||||
:method-count-assert 11
|
||||
:size-assert #x30
|
||||
@@ -139,10 +141,10 @@
|
||||
;; The rider will be pulled along by the object.
|
||||
;; This includes possibly rotating the rider (if the platform spins, it spins Jak too).
|
||||
(deftype pull-rider-info (structure)
|
||||
((rider collide-sticky-rider :offset-assert 0)
|
||||
(rider-cshape collide-shape-moving :offset-assert 4)
|
||||
(rider-delta-ry float :offset-assert 8)
|
||||
(rider-dest vector :inline :offset-assert 16)
|
||||
((rider collide-sticky-rider :offset-assert 0)
|
||||
(rider-cshape collide-shape-moving :offset-assert 4)
|
||||
(rider-delta-ry float :offset-assert 8)
|
||||
(rider-dest vector :inline :offset-assert 16)
|
||||
)
|
||||
:method-count-assert 9
|
||||
:size-assert #x20
|
||||
@@ -158,9 +160,9 @@
|
||||
;; this computes a "move-vec" and "u". If you move along "move-vec" by "u", you will move out of collsion.
|
||||
;; It also tells you which primitives are colliding.
|
||||
(deftype collide-shape-intersect (basic)
|
||||
((move-vec vector :inline :offset-assert 16)
|
||||
(best-u float :offset-assert 32)
|
||||
(best-tri collide-tri-result :inline :offset-assert 48)
|
||||
((move-vec vector :inline :offset-assert 16)
|
||||
(best-u float :offset-assert 32)
|
||||
(best-tri collide-tri-result :inline :offset-assert 48)
|
||||
(best-from-prim collide-shape-prim :offset-assert 132)
|
||||
(best-to-prim collide-shape-prim :offset-assert 136)
|
||||
)
|
||||
@@ -174,10 +176,10 @@
|
||||
|
||||
;; Collision with just overlap distance, no vector.
|
||||
(deftype collide-overlap-result (structure)
|
||||
((best-dist float :offset-assert 0)
|
||||
(best-from-prim collide-shape-prim :offset-assert 4)
|
||||
(best-to-prim collide-shape-prim :offset-assert 8)
|
||||
(best-from-tri collide-tri-result :inline :offset-assert 16)
|
||||
((best-dist float :offset-assert 0)
|
||||
(best-from-prim collide-shape-prim :offset-assert 4)
|
||||
(best-to-prim collide-shape-prim :offset-assert 8)
|
||||
(best-from-tri collide-tri-result :inline :offset-assert 16)
|
||||
)
|
||||
:method-count-assert 10
|
||||
:size-assert #x64
|
||||
@@ -204,7 +206,7 @@
|
||||
;; but this isn't well understood yet
|
||||
|
||||
(deftype overlaps-others-params (structure)
|
||||
((options uint32 :offset-assert 0)
|
||||
((options uint32 :offset-assert 0)
|
||||
(tlist touching-list :offset-assert 4)
|
||||
)
|
||||
:method-count-assert 9
|
||||
@@ -342,13 +344,13 @@
|
||||
;; this is a 32-byte chunk of data that can be pulled out an put in collide caches
|
||||
;; it stores the transformed world sphere and the collision settings
|
||||
(deftype collide-prim-core (structure)
|
||||
((world-sphere vector :inline :offset-assert 0)
|
||||
(collide-as collide-kind :offset-assert 16) ;; what are we (enemy, etc)
|
||||
(action collide-action :offset-assert 24) ;; what happens if we collide (physics)
|
||||
(offense collide-offense :offset-assert 28) ;; how hard to we have to hit it? (touch, attack...)
|
||||
(prim-type int8 :offset-assert 29) ;; what type of primtive do we belong to?
|
||||
(extra uint8 2 :offset-assert 30)
|
||||
(quad uint128 2 :offset 0)
|
||||
((world-sphere vector :inline :offset-assert 0)
|
||||
(collide-as collide-kind :offset-assert 16) ;; what are we (enemy, etc)
|
||||
(action collide-action :offset-assert 24) ;; what happens if we collide (physics)
|
||||
(offense collide-offense :offset-assert 28) ;; how hard do we have to hit it? (touch, attack...)
|
||||
(prim-type int8 :offset-assert 29) ;; what type of primtive do we belong to?
|
||||
(extra uint8 2 :offset-assert 30)
|
||||
(quad uint128 2 :offset 0)
|
||||
)
|
||||
:method-count-assert 9
|
||||
:size-assert #x20
|
||||
@@ -362,20 +364,20 @@
|
||||
|
||||
;; the base class for collision shapes.
|
||||
(deftype collide-shape-prim (basic)
|
||||
((cshape collide-shape :offset-assert 4) ;; our parent collide-shape
|
||||
(prim-id uint32 :offset-assert 8) ;; ?
|
||||
(transform-index int8 :offset-assert 12) ;; ?
|
||||
(prim-core collide-prim-core :inline :offset-assert 16) ;; core data
|
||||
(local-sphere vector :inline :offset-assert 48) ;; sphere, pre transform
|
||||
(collide-with collide-kind :offset-assert 64) ;; things we can collide with
|
||||
((cshape collide-shape :offset-assert 4) ;; our parent collide-shape
|
||||
(prim-id uint32 :offset-assert 8) ;; ?
|
||||
(transform-index int8 :offset-assert 12) ;; ?
|
||||
(prim-core collide-prim-core :inline :offset-assert 16) ;; core data
|
||||
(local-sphere vector :inline :offset-assert 48) ;; sphere, pre transform
|
||||
(collide-with collide-kind :offset-assert 64) ;; things we can collide with
|
||||
|
||||
;; overlays of core.
|
||||
(world-sphere vector :inline :offset 16)
|
||||
(collide-as collide-kind :offset 32)
|
||||
(action collide-action :offset 40)
|
||||
(offense collide-offense :offset 44)
|
||||
(prim-type int8 :offset 45)
|
||||
(radius meters :offset 60)
|
||||
(world-sphere vector :inline :offset 16)
|
||||
(collide-as collide-kind :offset 32)
|
||||
(action collide-action :offset 40)
|
||||
(offense collide-offense :offset 44)
|
||||
(prim-type int8 :offset 45)
|
||||
(radius meters :offset 60)
|
||||
)
|
||||
:method-count-assert 28
|
||||
:size-assert #x48
|
||||
@@ -416,7 +418,7 @@
|
||||
;; the pat is stored directly here.
|
||||
;; I believe the "local sphere" is used as the sphere.
|
||||
(deftype collide-shape-prim-sphere (collide-shape-prim)
|
||||
((pat pat-surface :offset-assert 72)
|
||||
((pat pat-surface :offset-assert 72)
|
||||
)
|
||||
:method-count-assert 28
|
||||
:size-assert #x4c
|
||||
@@ -431,10 +433,10 @@
|
||||
;; These meshes interact with a cache automatically (a specific collide-shape-prim-mesh cache, not the
|
||||
;; more general collide-cache)
|
||||
(deftype collide-shape-prim-mesh (collide-shape-prim)
|
||||
((mesh collide-mesh :offset-assert 72)
|
||||
(mesh-id int32 :offset-assert 76)
|
||||
(mesh-cache-id uint64 :offset-assert 80)
|
||||
(mesh-cache-tris (inline-array collide-mesh-cache-tri) :offset-assert 88)
|
||||
((mesh collide-mesh :offset-assert 72)
|
||||
(mesh-id int32 :offset-assert 76)
|
||||
(mesh-cache-id uint64 :offset-assert 80)
|
||||
(mesh-cache-tris (inline-array collide-mesh-cache-tri) :offset-assert 88)
|
||||
)
|
||||
:method-count-assert 29
|
||||
:size-assert #x5c
|
||||
@@ -447,11 +449,11 @@
|
||||
|
||||
;; A group of collide-shape-prim's
|
||||
(deftype collide-shape-prim-group (collide-shape-prim)
|
||||
((num-prims int32 :offset-assert 72)
|
||||
(num-prims-u uint32 :offset 72)
|
||||
(allocated-prims int32 :offset-assert 76)
|
||||
(prim collide-shape-prim 1 :offset-assert 80)
|
||||
(prims collide-shape-prim :dynamic :score 20 :offset 80) ;; added
|
||||
((num-prims int32 :offset-assert 72)
|
||||
(num-prims-u uint32 :offset 72)
|
||||
(allocated-prims int32 :offset-assert 76)
|
||||
(prim collide-shape-prim 1 :offset-assert 80)
|
||||
(prims collide-shape-prim :dynamic :offset 80) ;; added
|
||||
)
|
||||
:method-count-assert 30
|
||||
:size-assert #x54
|
||||
@@ -492,37 +494,37 @@
|
||||
|
||||
;; we're a child of trsqv, so we store a full transform + derivative.
|
||||
(deftype collide-shape (trsqv)
|
||||
((process process-drawable :offset-assert 140)
|
||||
(max-iteration-count uint8 :offset-assert 144)
|
||||
(nav-flags nav-flags :offset-assert 145)
|
||||
(pad-byte uint8 2 :offset-assert 146)
|
||||
(pat-ignore-mask pat-surface :offset-assert 148)
|
||||
(event-self symbol :offset-assert 152)
|
||||
(event-other symbol :offset-assert 156)
|
||||
(root-prim collide-shape-prim :offset-assert 160)
|
||||
(riders collide-sticky-rider-group :offset-assert 164)
|
||||
(backup-collide-as collide-kind :offset-assert 168)
|
||||
(backup-collide-with collide-kind :offset-assert 176)
|
||||
((process process-drawable :offset-assert 140)
|
||||
(max-iteration-count uint8 :offset-assert 144)
|
||||
(nav-flags nav-flags :offset-assert 145)
|
||||
(pad-byte uint8 2 :offset-assert 146)
|
||||
(pat-ignore-mask pat-surface :offset-assert 148)
|
||||
(event-self symbol :offset-assert 152)
|
||||
(event-other symbol :offset-assert 156)
|
||||
(root-prim collide-shape-prim :offset-assert 160)
|
||||
(riders collide-sticky-rider-group :offset-assert 164)
|
||||
(backup-collide-as collide-kind :offset-assert 168)
|
||||
(backup-collide-with collide-kind :offset-assert 176)
|
||||
)
|
||||
:method-count-assert 56
|
||||
:size-assert #xb8
|
||||
:flag-assert #x38000000b8
|
||||
(:methods
|
||||
(new (symbol type process-drawable collide-list-enum) _type_)
|
||||
(new (symbol type process-drawable collide-list-enum) _type_ 0)
|
||||
(move-by-vector! (_type_ vector) none 28)
|
||||
(alloc-riders (_type_ int) none 29)
|
||||
(move-to-point! (_type_ vector) none 30) ;; ret - symbol | float (CSPG::9)
|
||||
(debug-draw (_type_) none 31)
|
||||
(fill-cache-for-shape! (_type_ float collide-kind) none 32)
|
||||
(fill-cache-integrate-and-collide! (_type_ vector collide-kind) none 33)
|
||||
(find-prim-by-id (_type_ uint) collide-shape-prim 34)
|
||||
(find-prim-by-id (_type_ uint) collide-shape-prim 34)
|
||||
(detect-riders! (_type_) symbol 35)
|
||||
(build-bounding-box-for-shape (_type_ bounding-box float collide-kind) symbol 36)
|
||||
(integrate-and-collide! (_type_ vector) none 37)
|
||||
(find-collision-meshes (_type_) symbol 38)
|
||||
(on-platform (_type_ collide-shape collide-overlap-result) symbol 39)
|
||||
(find-overlapping-shapes (_type_ overlaps-others-params) symbol 40) ;; check if blocked??
|
||||
(dummy-41 (_type_ attack-info float) vector 41)
|
||||
(calc-shove-up (_type_ attack-info float) vector 41)
|
||||
(should-push-away (_type_ collide-shape collide-overlap-result) symbol 42)
|
||||
(pull-rider! (_type_ pull-rider-info) none 43)
|
||||
(pull-riders! (_type_) symbol 44)
|
||||
@@ -614,31 +616,31 @@
|
||||
|
||||
;; A collide-shape for independently moving objects
|
||||
(deftype collide-shape-moving (collide-shape)
|
||||
((rider-time time-frame :offset-assert 184)
|
||||
(rider-last-move vector :inline :offset-assert 192)
|
||||
(trans-old vector 3 :inline :offset-assert 208)
|
||||
(poly-pat pat-surface :offset-assert 256)
|
||||
(cur-pat pat-surface :offset-assert 260)
|
||||
(ground-pat pat-surface :offset-assert 264)
|
||||
(status cshape-moving-flags :offset-assert 272)
|
||||
(old-status cshape-moving-flags :offset-assert 280)
|
||||
(prev-status cshape-moving-flags :offset-assert 288)
|
||||
(reaction-flag cshape-reaction-flags :offset-assert 296)
|
||||
(reaction (function collide-shape-moving collide-shape-intersect vector vector cshape-moving-flags) :offset-assert 300)
|
||||
(no-reaction (function collide-shape-moving collide-shape-intersect vector vector none) :offset-assert 304)
|
||||
(local-normal vector :inline :offset-assert 320)
|
||||
(surface-normal vector :inline :offset-assert 336)
|
||||
(poly-normal vector :inline :offset-assert 352)
|
||||
(ground-poly-normal vector :inline :offset-assert 368)
|
||||
(ground-touch-point vector :inline :offset-assert 384)
|
||||
(shadow-pos vector :inline :offset-assert 400)
|
||||
(ground-impact-vel meters :offset-assert 416)
|
||||
(surface-angle float :offset-assert 420)
|
||||
(poly-angle float :offset-assert 424)
|
||||
(touch-angle float :offset-assert 428)
|
||||
(coverage float :offset-assert 432)
|
||||
(dynam dynamics :offset-assert 436)
|
||||
(surf surface :offset-assert 440)
|
||||
((rider-time time-frame :offset-assert 184)
|
||||
(rider-last-move vector :inline :offset-assert 192)
|
||||
(trans-old vector 3 :inline :offset-assert 208)
|
||||
(poly-pat pat-surface :offset-assert 256)
|
||||
(cur-pat pat-surface :offset-assert 260)
|
||||
(ground-pat pat-surface :offset-assert 264)
|
||||
(status cshape-moving-flags :offset-assert 272)
|
||||
(old-status cshape-moving-flags :offset-assert 280)
|
||||
(prev-status cshape-moving-flags :offset-assert 288)
|
||||
(reaction-flag cshape-reaction-flags :offset-assert 296)
|
||||
(reaction (function collide-shape-moving collide-shape-intersect vector vector cshape-moving-flags) :offset-assert 300)
|
||||
(no-reaction (function collide-shape-moving collide-shape-intersect vector vector none) :offset-assert 304)
|
||||
(local-normal vector :inline :offset-assert 320)
|
||||
(surface-normal vector :inline :offset-assert 336)
|
||||
(poly-normal vector :inline :offset-assert 352)
|
||||
(ground-poly-normal vector :inline :offset-assert 368)
|
||||
(ground-touch-point vector :inline :offset-assert 384)
|
||||
(shadow-pos vector :inline :offset-assert 400)
|
||||
(ground-impact-vel meters :offset-assert 416)
|
||||
(surface-angle float :offset-assert 420)
|
||||
(poly-angle float :offset-assert 424)
|
||||
(touch-angle float :offset-assert 428)
|
||||
(coverage float :offset-assert 432)
|
||||
(dynam dynamics :offset-assert 436)
|
||||
(surf surface :offset-assert 440)
|
||||
)
|
||||
:method-count-assert 65
|
||||
:size-assert #x1bc
|
||||
@@ -646,7 +648,7 @@
|
||||
(:methods
|
||||
(set-and-handle-pat! (_type_ pat-surface) none 56)
|
||||
(integrate-no-collide! (_type_ vector) none 57)
|
||||
(dummy-58 (_type_ vector) symbol 58)
|
||||
(collide-shape-moving-method-58 (_type_ vector) symbol 58)
|
||||
(integrate-for-enemy-with-move-to-ground! (_type_ vector collide-kind float symbol symbol symbol) none 59)
|
||||
(move-to-ground (_type_ float float symbol collide-kind) symbol 60)
|
||||
(move-to-ground-point! (_type_ vector vector vector) none 61)
|
||||
|
||||
@@ -5,6 +5,8 @@
|
||||
;; name in dgo: collide-shape
|
||||
;; dgos: GAME, ENGINE
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
;; The collide shape system is used to handle collision reactions.
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;
|
||||
@@ -1460,7 +1462,7 @@
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod dummy-58 collide-shape-moving ((obj collide-shape-moving) (arg0 vector))
|
||||
(defmethod collide-shape-moving-method-58 collide-shape-moving ((obj collide-shape-moving) (arg0 vector))
|
||||
;; not sure yet. moves shadow-pos, but possibly not trans.
|
||||
(integrate-no-collide! obj arg0)
|
||||
(let ((a1-1 (new 'stack-no-clear 'overlaps-others-params)))
|
||||
@@ -1477,7 +1479,7 @@
|
||||
(defmethod move-to-tri! collide-shape-moving ((obj collide-shape-moving) (arg0 collide-tri-result) (arg1 vector))
|
||||
"Move us to tri arg0, at point arg1."
|
||||
(move-to-point! obj arg1)
|
||||
(logior! (-> obj status) 7)
|
||||
(logior! (-> obj status) (cshape-moving-flags onsurf onground tsurf))
|
||||
(let ((v1-4 (-> arg0 normal)))
|
||||
(set! (-> obj poly-normal quad) (-> v1-4 quad))
|
||||
(set! (-> obj surface-normal quad) (-> v1-4 quad))
|
||||
@@ -1492,15 +1494,14 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
;; WARN: Stack slot offset 128 signed mismatch
|
||||
(defmethod integrate-for-enemy-with-move-to-ground! collide-shape-moving ((obj collide-shape-moving)
|
||||
(arg0 vector)
|
||||
(arg1 collide-kind)
|
||||
(arg2 float)
|
||||
(arg3 symbol)
|
||||
(arg4 symbol)
|
||||
(arg5 symbol)
|
||||
)
|
||||
(arg0 vector)
|
||||
(arg1 collide-kind)
|
||||
(arg2 float)
|
||||
(arg3 symbol)
|
||||
(arg4 symbol)
|
||||
(arg5 symbol)
|
||||
)
|
||||
"This is likely the main method for stepping an enemy.
|
||||
arg0: velocity
|
||||
arg1: ground collision
|
||||
@@ -1654,7 +1655,7 @@
|
||||
;; apply that. note that we scale the slopiness by arg1
|
||||
;; (this is not really how things work.)
|
||||
(vector--float*! arg0 s4-0 a2-2 (cond
|
||||
((logtest? (-> obj status) 1)
|
||||
((logtest? (-> obj status) (cshape-moving-flags onsurf))
|
||||
(empty)
|
||||
arg1
|
||||
)
|
||||
@@ -1805,7 +1806,7 @@
|
||||
)
|
||||
)
|
||||
|
||||
;; WARN: Bad vector register dependency: vf31
|
||||
;; ERROR: Bad vector register dependency: vf31
|
||||
(defmethod add-to-bounding-box collide-shape-prim ((obj collide-shape-prim) (arg0 collide-kind))
|
||||
"Add a single prim to the bounding box. (just adds the bsphere)"
|
||||
(rlet ((vf1 :class vf)
|
||||
@@ -2426,18 +2427,17 @@
|
||||
(bucket-id debug)
|
||||
(the-as vector (-> obj prim-core))
|
||||
(-> obj local-sphere w)
|
||||
(the-as rgba (cond
|
||||
((and (zero? (-> obj prim-core collide-as)) (zero? (-> obj collide-with)))
|
||||
#x40808080
|
||||
)
|
||||
((logtest? (-> obj prim-core action) 1)
|
||||
#x4000ffff
|
||||
)
|
||||
(else
|
||||
#x400080ff
|
||||
)
|
||||
)
|
||||
)
|
||||
(cond
|
||||
((and (zero? (-> obj prim-core collide-as)) (zero? (-> obj collide-with)))
|
||||
(new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x40)
|
||||
)
|
||||
((logtest? (-> obj prim-core action) (collide-action solid))
|
||||
(new 'static 'rgba :r #xff :g #xff :a #x40)
|
||||
)
|
||||
(else
|
||||
(new 'static 'rgba :r #xff :g #x80 :a #x40)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -3268,7 +3268,7 @@
|
||||
(add-touching-prims a0-6 obj arg1 -1.0 (the-as collide-tri-result #f) (the-as collide-tri-result #f))
|
||||
)
|
||||
(label cfg-16)
|
||||
(b! (zero? (logand (-> arg0 options) 1)) cfg-19 :delay (set! v1-26 (-> obj prim-core action)))
|
||||
(b! (not (logtest? (-> arg0 options) 1)) cfg-19 :delay (set! v1-26 (-> obj prim-core action)))
|
||||
(let ((a0-7 (-> arg1 prim-core action)))
|
||||
(b! (logtest? (logand v1-26 (collide-action solid)) a0-7) cfg-19 :delay (nop!))
|
||||
)
|
||||
@@ -3314,13 +3314,12 @@
|
||||
(the-as none 0)
|
||||
(label cfg-9)
|
||||
(b!
|
||||
(not
|
||||
(overlap-test
|
||||
s3-0
|
||||
(the-as collide-mesh-cache-tri (-> obj mesh-cache-tris))
|
||||
(the-as vector (-> arg1 prim-core))
|
||||
)
|
||||
)
|
||||
(not (overlap-test
|
||||
s3-0
|
||||
(the-as collide-mesh-cache-tri (-> obj mesh-cache-tris))
|
||||
(the-as vector (-> arg1 prim-core))
|
||||
)
|
||||
)
|
||||
cfg-12
|
||||
)
|
||||
)
|
||||
@@ -3342,7 +3341,7 @@
|
||||
(add-touching-prims a0-7 obj arg1 -1.0 (the-as collide-tri-result #f) (the-as collide-tri-result #f))
|
||||
)
|
||||
(label cfg-16)
|
||||
(b! (zero? (logand (-> arg0 options) 1)) cfg-19 :delay (set! v1-26 (-> obj prim-core action)))
|
||||
(b! (not (logtest? (-> arg0 options) 1)) cfg-19 :delay (set! v1-26 (-> obj prim-core action)))
|
||||
(let ((a0-8 (-> arg1 prim-core action)))
|
||||
(b! (logtest? (logand v1-26 (collide-action solid)) a0-8) cfg-19 :delay (nop!))
|
||||
)
|
||||
@@ -3479,7 +3478,7 @@
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod dummy-41 collide-shape ((obj collide-shape) (arg0 attack-info) (arg1 float))
|
||||
(defmethod calc-shove-up collide-shape ((obj collide-shape) (arg0 attack-info) (arg1 float))
|
||||
(set! (-> arg0 shove-up) arg1)
|
||||
(let* ((s3-0 (-> obj process path))
|
||||
(s2-0 (-> s3-0 curve num-cverts))
|
||||
@@ -3501,7 +3500,3 @@
|
||||
(vector-! (-> arg0 vector) s5-0 s4-0)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -16,6 +16,8 @@
|
||||
|
||||
(defconstant TOUCHING_LIST_LENGTH 32)
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
;; A record of a primitive which is touching another, possibly including the triangle that is involved.
|
||||
(deftype touching-prim (structure)
|
||||
((cprim collide-shape-prim :offset-assert 0)
|
||||
@@ -29,11 +31,11 @@
|
||||
|
||||
;; A record of two primitives which are touching.
|
||||
(deftype touching-prims-entry (structure)
|
||||
((next touching-prims-entry :offset-assert 0)
|
||||
(prev touching-prims-entry :offset-assert 4)
|
||||
(allocated? symbol :offset-assert 8)
|
||||
(u float :offset-assert 12)
|
||||
(prim1 touching-prim :inline :offset-assert 16)
|
||||
((next touching-prims-entry :offset-assert 0)
|
||||
(prev touching-prims-entry :offset-assert 4)
|
||||
(allocated? symbol :offset-assert 8)
|
||||
(u float :offset-assert 12)
|
||||
(prim1 touching-prim :inline :offset-assert 16)
|
||||
(prim2 touching-prim :inline :offset-assert 128)
|
||||
)
|
||||
:method-count-assert 13
|
||||
@@ -41,7 +43,7 @@
|
||||
:flag-assert #xd000000e4
|
||||
(:methods
|
||||
(get-touched-prim (_type_ trsqv touching-shapes-entry) collide-shape-prim 9)
|
||||
(dummy-10 () none 10)
|
||||
(touching-prims-entry-method-10 () none 10)
|
||||
(get-middle-of-bsphere-overlap (_type_ vector) vector 11)
|
||||
(get-touched-tri (_type_ collide-shape touching-shapes-entry) collide-tri-result 12)
|
||||
)
|
||||
@@ -49,8 +51,8 @@
|
||||
|
||||
;; A pool of up to 64 touching primitives. There is a linked list of freed entries.
|
||||
(deftype touching-prims-entry-pool (structure)
|
||||
((head touching-prims-entry :offset-assert 0)
|
||||
(nodes touching-prims-entry 64 :inline :offset-assert 16)
|
||||
((head touching-prims-entry :offset-assert 0)
|
||||
(nodes touching-prims-entry 64 :inline :offset-assert 16)
|
||||
)
|
||||
:method-count-assert 13
|
||||
:size-assert #x3c10
|
||||
@@ -104,22 +106,22 @@
|
||||
;; two collide shapes which are touching.
|
||||
;; This stores a list of primitive pairs which are touching.
|
||||
(deftype touching-shapes-entry (structure)
|
||||
((cshape1 collide-shape :offset-assert 0)
|
||||
(cshape2 collide-shape :offset-assert 4)
|
||||
(resolve-u int8 :offset-assert 8)
|
||||
(head touching-prims-entry :offset-assert 12)
|
||||
((cshape1 collide-shape :offset-assert 0)
|
||||
(cshape2 collide-shape :offset-assert 4)
|
||||
(resolve-u int8 :offset-assert 8)
|
||||
(head touching-prims-entry :offset-assert 12)
|
||||
)
|
||||
:allow-misaligned
|
||||
:method-count-assert 18
|
||||
:size-assert #x10
|
||||
:flag-assert #x1200000010
|
||||
(:methods
|
||||
(dummy-9 (_type_) none 9)
|
||||
(touching-shapes-entry-method-9 (_type_) none 9)
|
||||
(get-touched-shape (_type_ collide-shape) collide-shape 10)
|
||||
(dummy-11 () none 11)
|
||||
(prims-touching? (_type_ collide-shape-moving uint) touching-prims-entry 12) ; this one!
|
||||
(touching-shapes-entry-method-11 () none 11)
|
||||
(prims-touching? (_type_ collide-shape-moving uint) touching-prims-entry 12)
|
||||
(prims-touching-action? (_type_ collide-shape collide-action collide-action) touching-prims-entry 13)
|
||||
(dummy-14 () none 14)
|
||||
(touching-shapes-entry-method-14 () none 14)
|
||||
(free-touching-prims-list (_type_) symbol 15)
|
||||
(get-head (_type_) touching-prims-entry 16)
|
||||
(get-next (_type_ touching-prims-entry) touching-prims-entry 17)
|
||||
@@ -128,9 +130,9 @@
|
||||
|
||||
;; A list of (up to) TOUCHING_LIST_LENGTH pairs of colliding shapes
|
||||
(deftype touching-list (structure)
|
||||
((num-touching-shapes int32 :offset-assert 0)
|
||||
(resolve-u int8 :offset-assert 4)
|
||||
(touching-shapes touching-shapes-entry TOUCHING_LIST_LENGTH :inline :offset-assert 8)
|
||||
((num-touching-shapes int32 :offset-assert 0)
|
||||
(resolve-u int8 :offset-assert 4)
|
||||
(touching-shapes touching-shapes-entry TOUCHING_LIST_LENGTH :inline :offset-assert 8)
|
||||
)
|
||||
:method-count-assert 15
|
||||
:size-assert #x208
|
||||
@@ -138,7 +140,7 @@
|
||||
(:methods
|
||||
(new (symbol type) _type_ 0)
|
||||
(add-touching-prims (_type_ collide-shape-prim collide-shape-prim float collide-tri-result collide-tri-result) none 9)
|
||||
(dummy-10 () none 10)
|
||||
(touching-list-method-10 () none 10)
|
||||
(update-from-step-size (_type_ float) none 11)
|
||||
(send-events-for-touching-shapes (_type_) none 12)
|
||||
(get-shapes-entry (_type_ collide-shape collide-shape) touching-shapes-entry 13)
|
||||
@@ -176,4 +178,3 @@
|
||||
|
||||
;; and a list of up to TOUCHING_LIST_LENGTH shape pairs
|
||||
(define-perm *touching-list* touching-list (new 'global 'touching-list))
|
||||
|
||||
|
||||
@@ -293,9 +293,9 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod TODO-RENAME-48 babak ((obj babak))
|
||||
(defmethod nav-enemy-method-48 babak ((obj babak))
|
||||
(initialize-skeleton obj *babak-sg* '())
|
||||
(TODO-RENAME-45 obj *babak-nav-enemy-info*)
|
||||
(init-defaults! obj *babak-nav-enemy-info*)
|
||||
(set! (-> obj neck up) (the-as uint 0))
|
||||
(set! (-> obj neck nose) (the-as uint 1))
|
||||
(set! (-> obj neck ear) (the-as uint 2))
|
||||
@@ -303,7 +303,7 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod TODO-RENAME-59 babak ((obj babak))
|
||||
(defmethod nav-enemy-method-59 babak ((obj babak))
|
||||
(cond
|
||||
((and (and (-> obj entity) (logtest? (-> obj entity extra perm status) (entity-perm-status complete)))
|
||||
(logtest? (-> obj enemy-info options) (fact-options has-power-cell))
|
||||
@@ -320,7 +320,3 @@
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -37,10 +37,10 @@
|
||||
(basebutton-startup () _type_ :state 23)
|
||||
(basebutton-up-idle () _type_ :state 24)
|
||||
(reset! (_type_) float 25)
|
||||
(TODO-RENAME-26 (_type_) none 26)
|
||||
(TODO-RENAME-27 (_type_) collide-shape-moving 27)
|
||||
(basebutton-method-26 (_type_) none 26)
|
||||
(basebutton-method-27 (_type_) collide-shape-moving 27)
|
||||
(arm-trigger-event! (_type_) symbol 28)
|
||||
(TODO-RENAME-29 (_type_ symbol entity) none 29)
|
||||
(basebutton-method-29 (_type_ symbol entity) none 29)
|
||||
(move-to-vec-or-quat! (_type_ vector quaternion) quaternion 30)
|
||||
(press! (_type_ symbol) int 31)
|
||||
)
|
||||
@@ -77,12 +77,12 @@
|
||||
|
||||
(defstate basebutton-up-idle (basebutton)
|
||||
:virtual #t
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('attack)
|
||||
(case (-> arg3 param 1)
|
||||
(case (-> event param 1)
|
||||
(('flop)
|
||||
(TODO-RENAME-29 self (-> self event-going-down) (-> self notify-actor))
|
||||
(basebutton-method-29 self (-> self event-going-down) (-> self notify-actor))
|
||||
(sound-play "silo-button")
|
||||
(go-virtual basebutton-going-down)
|
||||
)
|
||||
@@ -93,7 +93,7 @@
|
||||
(go-virtual basebutton-going-down)
|
||||
)
|
||||
(('move-to)
|
||||
(move-to-vec-or-quat! self (the-as vector (-> arg3 param 0)) (the-as quaternion (-> arg3 param 1)))
|
||||
(move-to-vec-or-quat! self (the-as vector (-> event param 0)) (the-as quaternion (-> event param 1)))
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -121,14 +121,14 @@
|
||||
|
||||
(defstate basebutton-going-down (basebutton)
|
||||
:virtual #t
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('untrigger)
|
||||
(sound-play "silo-button")
|
||||
(go-virtual basebutton-going-up)
|
||||
)
|
||||
(('move-to)
|
||||
(move-to-vec-or-quat! self (the-as vector (-> arg3 param 0)) (the-as quaternion (-> arg3 param 1)))
|
||||
(move-to-vec-or-quat! self (the-as vector (-> event param 0)) (the-as quaternion (-> event param 1)))
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -143,7 +143,7 @@
|
||||
(suspend)
|
||||
(ja :num! (seek! max (-> self anim-speed)))
|
||||
)
|
||||
(TODO-RENAME-29 self (-> self event-down) (-> self notify-actor))
|
||||
(basebutton-method-29 self (-> self event-down) (-> self notify-actor))
|
||||
(go-virtual basebutton-down-idle)
|
||||
(none)
|
||||
)
|
||||
@@ -160,14 +160,14 @@
|
||||
|
||||
(defstate basebutton-down-idle (basebutton)
|
||||
:virtual #t
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('untrigger)
|
||||
(sound-play "silo-button")
|
||||
(go-virtual basebutton-going-up)
|
||||
)
|
||||
(('move-to)
|
||||
(move-to-vec-or-quat! self (the-as vector (-> arg3 param 0)) (the-as quaternion (-> arg3 param 1)))
|
||||
(move-to-vec-or-quat! self (the-as vector (-> event param 0)) (the-as quaternion (-> event param 1)))
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -191,7 +191,7 @@
|
||||
(until (>= (- (-> *display* base-frame-counter) (-> self state-time)) (the int (* 300.0 (-> self timeout))))
|
||||
(suspend)
|
||||
)
|
||||
(TODO-RENAME-29 self (-> self event-going-up) (-> self notify-actor))
|
||||
(basebutton-method-29 self (-> self event-going-up) (-> self notify-actor))
|
||||
(sound-play "silo-button")
|
||||
(go-virtual basebutton-going-up)
|
||||
)
|
||||
@@ -211,10 +211,10 @@
|
||||
|
||||
(defstate basebutton-going-up (basebutton)
|
||||
:virtual #t
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('move-to)
|
||||
(move-to-vec-or-quat! self (the-as vector (-> arg3 param 0)) (the-as quaternion (-> arg3 param 1)))
|
||||
(move-to-vec-or-quat! self (the-as vector (-> event param 0)) (the-as quaternion (-> event param 1)))
|
||||
)
|
||||
(('trigger)
|
||||
(sound-play "silo-button")
|
||||
@@ -233,7 +233,7 @@
|
||||
(suspend)
|
||||
(ja :num! (seek! 0.0 (-> self anim-speed)))
|
||||
)
|
||||
(TODO-RENAME-29 self (-> self event-up) (-> self notify-actor))
|
||||
(basebutton-method-29 self (-> self event-up) (-> self notify-actor))
|
||||
(go-virtual basebutton-up-idle)
|
||||
(none)
|
||||
)
|
||||
@@ -264,7 +264,7 @@
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod TODO-RENAME-29 basebutton ((obj basebutton) (arg0 symbol) (arg1 entity))
|
||||
(defmethod basebutton-method-29 basebutton ((obj basebutton) (arg0 symbol) (arg1 entity))
|
||||
(with-pp
|
||||
(when arg0
|
||||
(cond
|
||||
@@ -304,10 +304,7 @@
|
||||
(set! (-> obj event-down) #f)
|
||||
(set! (-> obj event-going-up) #f)
|
||||
(set! (-> obj event-up) #f)
|
||||
(let ((f0-1 1.0))
|
||||
(set! (-> obj anim-speed) f0-1)
|
||||
f0-1
|
||||
)
|
||||
(set! (-> obj anim-speed) 1.0)
|
||||
)
|
||||
|
||||
(defmethod arm-trigger-event! basebutton ((obj basebutton))
|
||||
@@ -317,7 +314,7 @@
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod TODO-RENAME-26 basebutton ((obj basebutton))
|
||||
(defmethod basebutton-method-26 basebutton ((obj basebutton))
|
||||
(initialize-skeleton obj *generic-button-sg* '())
|
||||
(logior! (-> obj skel status) (janim-status inited))
|
||||
(ja-channel-set! 1)
|
||||
@@ -351,7 +348,7 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod TODO-RENAME-27 basebutton ((obj basebutton))
|
||||
(defmethod basebutton-method-27 basebutton ((obj basebutton))
|
||||
(let ((s5-0 (new 'process 'collide-shape-moving obj (collide-list-enum hit-by-player))))
|
||||
(set! (-> s5-0 dynam) (copy *standard-dynamics* 'process))
|
||||
(set! (-> s5-0 reaction) default-collision-reaction)
|
||||
@@ -406,7 +403,7 @@
|
||||
(set! (-> obj button-id) (actor-count-before (-> obj link)))
|
||||
)
|
||||
)
|
||||
(TODO-RENAME-27 obj)
|
||||
(basebutton-method-27 obj)
|
||||
(process-drawable-from-entity! obj arg0)
|
||||
(let ((v1-16 #f))
|
||||
(if (and (-> obj entity) (logtest? (-> obj entity extra perm status) (entity-perm-status complete)))
|
||||
@@ -420,7 +417,7 @@
|
||||
(nav-mesh-connect obj (-> obj root-override) (the-as nav-control #f))
|
||||
)
|
||||
(arm-trigger-event! obj)
|
||||
(TODO-RENAME-26 obj)
|
||||
(basebutton-method-26 obj)
|
||||
(go (method-of-object obj basebutton-startup))
|
||||
(none)
|
||||
)
|
||||
@@ -435,24 +432,23 @@
|
||||
(if arg0
|
||||
(set! (-> self entity) arg0)
|
||||
)
|
||||
(TODO-RENAME-27 self)
|
||||
(basebutton-method-27 self)
|
||||
(set! (-> self root-override trans quad) (-> arg1 quad))
|
||||
(quaternion-copy! (-> self root-override quat) arg2)
|
||||
(set-vector! (-> self root-override scale) 1.0 1.0 1.0 1.0)
|
||||
(arm-trigger-event! self)
|
||||
(TODO-RENAME-26 self)
|
||||
(basebutton-method-26 self)
|
||||
(go-virtual basebutton-startup)
|
||||
(none)
|
||||
)
|
||||
|
||||
(define *warp-info* (the-as (array string) (new 'static 'boxed-array :type string
|
||||
"training-warp"
|
||||
"village1-warp"
|
||||
"village2-warp"
|
||||
"village3-warp"
|
||||
"citadel-warp"
|
||||
)
|
||||
)
|
||||
(define *warp-info* (new 'static 'boxed-array :type string
|
||||
"training-warp"
|
||||
"village1-warp"
|
||||
"village2-warp"
|
||||
"village3-warp"
|
||||
"citadel-warp"
|
||||
)
|
||||
)
|
||||
|
||||
(deftype warp-gate (process-drawable)
|
||||
@@ -508,7 +504,7 @@
|
||||
;; dispose the old code from memory.
|
||||
(case (-> self level)
|
||||
(('citadel 'lavatube 'training)
|
||||
(while (and *target* (zero? (logand (-> *target* draw status) (draw-status hidden))))
|
||||
(while (and *target* (not (logtest? (-> *target* draw status) (draw-status hidden))))
|
||||
(suspend)
|
||||
)
|
||||
)
|
||||
@@ -555,8 +551,8 @@
|
||||
)
|
||||
|
||||
(defstate target-warp-out (target)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('death-end)
|
||||
(let ((v0-0 (the-as object (logior (-> self draw status) (draw-status hidden)))))
|
||||
(set! (-> self draw status) (the-as draw-status v0-0))
|
||||
@@ -564,7 +560,7 @@
|
||||
)
|
||||
)
|
||||
(else
|
||||
(target-generic-event-handler arg0 arg1 arg2 arg3)
|
||||
(target-generic-event-handler proc arg1 event-type event)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -676,7 +672,3 @@
|
||||
)
|
||||
:post target-no-stick-post
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -55,18 +55,18 @@
|
||||
:size-assert #xe4
|
||||
:flag-assert #x1b008000e4
|
||||
(:methods
|
||||
(dummy-20 (_type_) none 20)
|
||||
(dummy-21 (_type_) none 21)
|
||||
(dummy-22 (_type_) none 22)
|
||||
(baseplat-method-20 (_type_) none 20)
|
||||
(baseplat-method-21 (_type_) none 21)
|
||||
(baseplat-method-22 (_type_) none 22)
|
||||
(get-unlit-skel (_type_) skeleton-group 23)
|
||||
(dummy-24 (_type_) none 24)
|
||||
(TODO-RENAME-25 (_type_) sparticle-launch-group 25)
|
||||
(dummy-26 (_type_) none 26)
|
||||
(baseplat-method-24 (_type_) none 24)
|
||||
(baseplat-method-25 (_type_) sparticle-launch-group 25)
|
||||
(baseplat-method-26 (_type_) none 26)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(defmethod dummy-21 baseplat ((obj baseplat))
|
||||
(defmethod baseplat-method-21 baseplat ((obj baseplat))
|
||||
(logior! (-> obj skel status) (janim-status inited))
|
||||
(set! (-> obj basetrans quad) (-> obj root-override trans quad))
|
||||
(set! (-> obj bouncing) #f)
|
||||
@@ -74,7 +74,7 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod dummy-22 baseplat ((obj baseplat))
|
||||
(defmethod baseplat-method-22 baseplat ((obj baseplat))
|
||||
(activate! (-> obj smush) -1.0 60 150 1.0 1.0)
|
||||
(set! (-> obj bouncing) #t)
|
||||
(logclear! (-> obj mask) (process-mask sleep))
|
||||
@@ -122,16 +122,16 @@
|
||||
)
|
||||
|
||||
(defbehavior plat-post baseplat ()
|
||||
(dummy-20 self)
|
||||
(baseplat-method-20 self)
|
||||
(rider-post)
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod TODO-RENAME-25 baseplat ((obj baseplat))
|
||||
(defmethod baseplat-method-25 baseplat ((obj baseplat))
|
||||
(the-as sparticle-launch-group 0)
|
||||
)
|
||||
|
||||
(defmethod dummy-20 baseplat ((obj baseplat))
|
||||
(defmethod baseplat-method-20 baseplat ((obj baseplat))
|
||||
(if (nonzero? (-> obj part))
|
||||
(spawn (-> obj part) (-> obj root-override trans))
|
||||
)
|
||||
@@ -139,12 +139,12 @@
|
||||
)
|
||||
|
||||
(defbehavior plat-event baseplat ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(let ((v1-0 arg2))
|
||||
(the-as object (if (= v1-0 'bonk)
|
||||
(dummy-22 self)
|
||||
)
|
||||
)
|
||||
)
|
||||
(the-as object (case arg2
|
||||
(('bonk)
|
||||
(baseplat-method-22 self)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(deftype eco-door (process-drawable)
|
||||
@@ -170,31 +170,31 @@
|
||||
(door-opening () _type_ :state 21)
|
||||
(door-open () _type_ :state 22)
|
||||
(door-closing () _type_ :state 23)
|
||||
(TODO-RENAME-24 (_type_) none 24)
|
||||
(TODO-RENAME-25 (_type_) none 25)
|
||||
(dummy-26 (_type_) none 26)
|
||||
(eco-door-method-24 (_type_) none 24)
|
||||
(eco-door-method-25 (_type_) none 25)
|
||||
(eco-door-method-26 (_type_) none 26)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(defbehavior eco-door-event-handler eco-door ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(let ((v1-0 arg2))
|
||||
(the-as object (when (= v1-0 'trigger)
|
||||
(set! (-> self locked) (not (-> self locked)))
|
||||
(cond
|
||||
((-> self locked)
|
||||
(if (= (-> self next-state name) 'door-closed)
|
||||
(sound-play "door-lock")
|
||||
)
|
||||
)
|
||||
(else
|
||||
(sound-play "door-unlock")
|
||||
)
|
||||
(the-as object (case arg2
|
||||
(('trigger)
|
||||
(set! (-> self locked) (not (-> self locked)))
|
||||
(cond
|
||||
((-> self locked)
|
||||
(if (= (-> self next-state name) 'door-closed)
|
||||
(sound-play "door-lock")
|
||||
)
|
||||
)
|
||||
#t
|
||||
)
|
||||
)
|
||||
)
|
||||
(else
|
||||
(sound-play "door-unlock")
|
||||
)
|
||||
)
|
||||
#t
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
eco-door-event-handler
|
||||
@@ -212,7 +212,7 @@ eco-door-event-handler
|
||||
(vector-vector-distance (-> self root-override trans) (-> *target* control trans))
|
||||
)
|
||||
)
|
||||
(dummy-26 self)
|
||||
(eco-door-method-26 self)
|
||||
(if (and (not (-> self locked))
|
||||
(or (and (-> self entity) (logtest? (-> self entity extra perm status) (entity-perm-status complete)))
|
||||
(send-event *target* 'query 'powerup (pickup-type eco-blue))
|
||||
@@ -318,7 +318,7 @@ eco-door-event-handler
|
||||
:post (the-as (function none :behavior eco-door) transform-post)
|
||||
)
|
||||
|
||||
(defmethod dummy-26 eco-door ((obj eco-door))
|
||||
(defmethod eco-door-method-26 eco-door ((obj eco-door))
|
||||
(when (-> obj state-actor)
|
||||
(if (logtest? (-> obj state-actor extra perm status) (entity-perm-status complete))
|
||||
(set! (-> obj locked) (logtest? (-> obj flags) (eco-door-flags ecdf01)))
|
||||
@@ -329,7 +329,7 @@ eco-door-event-handler
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod TODO-RENAME-24 eco-door ((obj eco-door))
|
||||
(defmethod eco-door-method-24 eco-door ((obj eco-door))
|
||||
(let ((s5-0 (new 'process 'collide-shape obj (collide-list-enum hit-by-player))))
|
||||
(let ((s4-0 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 0) (the-as uint 0))))
|
||||
(set! (-> s4-0 prim-core collide-as) (collide-kind wall-object))
|
||||
@@ -348,13 +348,13 @@ eco-door-event-handler
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod TODO-RENAME-25 eco-door ((obj eco-door))
|
||||
(defmethod eco-door-method-25 eco-door ((obj eco-door))
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod init-from-entity! eco-door ((obj eco-door) (arg0 entity-actor))
|
||||
(TODO-RENAME-24 obj)
|
||||
(eco-door-method-24 obj)
|
||||
(process-drawable-from-entity! obj arg0)
|
||||
(let ((f0-0 (res-lump-float (-> obj entity) 'scale :default 1.0)))
|
||||
(set-vector! (-> obj root-override scale) f0-0 f0-0 f0-0 1.0)
|
||||
@@ -370,13 +370,13 @@ eco-door-event-handler
|
||||
)
|
||||
(set! (-> obj locked) #f)
|
||||
(set! (-> obj flags) (res-lump-value arg0 'flags eco-door-flags))
|
||||
(dummy-26 obj)
|
||||
(eco-door-method-26 obj)
|
||||
(set! (-> obj auto-close) (logtest? (-> obj flags) (eco-door-flags auto-close)))
|
||||
(set! (-> obj one-way) (logtest? (-> obj flags) (eco-door-flags one-way)))
|
||||
(vector-z-quaternion! (-> obj out-dir) (-> obj root-override quat))
|
||||
(set! (-> obj out-dir w) (- (vector-dot (-> obj out-dir) (-> obj root-override trans))))
|
||||
(update-transforms! (-> obj root-override))
|
||||
(TODO-RENAME-25 obj)
|
||||
(eco-door-method-25 obj)
|
||||
(if (and (not (-> obj auto-close))
|
||||
(-> obj entity)
|
||||
(logtest? (-> obj entity extra perm status) (entity-perm-status complete))
|
||||
@@ -386,7 +386,3 @@ eco-door-event-handler
|
||||
)
|
||||
(none)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -90,7 +90,7 @@
|
||||
(params-init (_type_ entity) none 25)
|
||||
(art-init (_type_) crate 26)
|
||||
(params-set! (_type_ symbol symbol) none 27)
|
||||
(dummy-28 (_type_) none 28)
|
||||
(check-dead (_type_) none 28)
|
||||
(smush-update! (_type_) none 29)
|
||||
)
|
||||
)
|
||||
@@ -240,7 +240,7 @@
|
||||
|
||||
(defpartgroup group-crate-explode
|
||||
:id 71
|
||||
:duration 5
|
||||
:duration (seconds 0.017)
|
||||
:flags (use-local-clock)
|
||||
:bounds (static-bspherem 0 0 0 12)
|
||||
:parts ((sp-item 281) (sp-item 283) (sp-item 285) (sp-item 286) (sp-item 288))
|
||||
@@ -248,7 +248,7 @@
|
||||
|
||||
(defpartgroup group-crate-steel-explode
|
||||
:id 72
|
||||
:duration 5
|
||||
:duration (seconds 0.017)
|
||||
:flags (use-local-clock)
|
||||
:bounds (static-bspherem 0 0 0 12)
|
||||
:parts ((sp-item 281) (sp-item 283) (sp-item 285) (sp-item 288) (sp-item 288) (sp-item 288))
|
||||
@@ -256,7 +256,7 @@
|
||||
|
||||
(defpartgroup group-dark-eco-box-explosion
|
||||
:id 73
|
||||
:duration 600
|
||||
:duration (seconds 2)
|
||||
:flags (use-local-clock)
|
||||
:bounds (static-bspherem 0 0 0 12)
|
||||
:parts ((sp-item 295 :fade-after (meters 100) :period 600 :length 5 :binding 296)
|
||||
@@ -492,7 +492,7 @@
|
||||
(('flop 'uppercut 'explode 'darkeco 'eco-yellow 'bonk 'racer 'tube 'flut-bonk 'flut-attack)
|
||||
(if (and (logtest? (-> self fact options) (fact-options require-zoomer))
|
||||
*target*
|
||||
(zero? (logand (-> *target* control root-prim prim-core action) (collide-action ca-9)))
|
||||
(not (logtest? (-> *target* control root-prim prim-core action) (collide-action ca-9)))
|
||||
)
|
||||
(return #f)
|
||||
)
|
||||
@@ -774,28 +774,28 @@
|
||||
|
||||
(defstate die (crate)
|
||||
:virtual #t
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('touched)
|
||||
(case (-> self defense)
|
||||
(('darkeco)
|
||||
(cond
|
||||
((= (-> arg0 type) target)
|
||||
(send-event arg0 'attack (-> arg3 param 0) (static-attack-info ((mode 'darkeco))))
|
||||
((= (-> proc type) target)
|
||||
(send-event proc 'attack (-> event param 0) (static-attack-info ((mode 'darkeco))))
|
||||
)
|
||||
(else
|
||||
(let ((a1-5 (new 'stack-no-clear 'event-message-block)))
|
||||
(set! (-> a1-5 from) self)
|
||||
(set! (-> a1-5 num-params) 4)
|
||||
(set! (-> a1-5 message) 'attack)
|
||||
(set! (-> a1-5 param 0) (-> arg3 param 0))
|
||||
(set! (-> a1-5 param 0) (-> event param 0))
|
||||
(set! (-> a1-5 param 1) (the-as uint 'darkeco))
|
||||
(let ((v1-12 (+ *global-attack-id* 1)))
|
||||
(set! *global-attack-id* v1-12)
|
||||
(set! (-> a1-5 param 2) (the-as uint v1-12))
|
||||
)
|
||||
(set! (-> a1-5 param 3) (the-as uint 0))
|
||||
(send-event-function arg0 a1-5)
|
||||
(send-event-function proc a1-5)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -933,33 +933,33 @@
|
||||
|
||||
(defstate special-contents-die (crate)
|
||||
:virtual #t
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(let ((v1-0 arg2))
|
||||
(the-as object (when (= v1-0 'notify)
|
||||
(case (-> arg3 param 0)
|
||||
(('pickup)
|
||||
(let ((gp-0 (-> self entity extra perm)))
|
||||
(logior! (-> gp-0 status) (entity-perm-status user-set-from-cstage))
|
||||
(set! (-> gp-0 user-int8 1) (min 127 (+ (-> gp-0 user-int8 1) 1)))
|
||||
(+! (-> self child-count) -1)
|
||||
(when (<= (-> self child-count) 0)
|
||||
(if (or (= (-> self defense) 'iron) (= (-> self defense) 'steel))
|
||||
(process-entity-status! self (entity-perm-status bit-4) #f)
|
||||
)
|
||||
(process-entity-status! self (entity-perm-status dead) #t)
|
||||
(process-entity-status! self (entity-perm-status complete) #t)
|
||||
(set! (-> gp-0 user-int8 0) 2)
|
||||
(let ((v0-0 (logclear (-> self mask) (process-mask sleep))))
|
||||
(set! (-> self mask) v0-0)
|
||||
v0-0
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(the-as object (case event-type
|
||||
(('notify)
|
||||
(case (-> event param 0)
|
||||
(('pickup)
|
||||
(let ((gp-0 (-> self entity extra perm)))
|
||||
(logior! (-> gp-0 status) (entity-perm-status user-set-from-cstage))
|
||||
(set! (-> gp-0 user-int8 1) (min 127 (+ (-> gp-0 user-int8 1) 1)))
|
||||
(+! (-> self child-count) -1)
|
||||
(when (<= (-> self child-count) 0)
|
||||
(if (or (= (-> self defense) 'iron) (= (-> self defense) 'steel))
|
||||
(process-entity-status! self (entity-perm-status bit-4) #f)
|
||||
)
|
||||
(process-entity-status! self (entity-perm-status dead) #t)
|
||||
(process-entity-status! self (entity-perm-status complete) #t)
|
||||
(set! (-> gp-0 user-int8 0) 2)
|
||||
(let ((v0-0 (logclear (-> self mask) (process-mask sleep))))
|
||||
(set! (-> self mask) v0-0)
|
||||
v0-0
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
:trans (-> (method-of-type crate die) trans)
|
||||
:code (behavior ()
|
||||
@@ -1005,14 +1005,14 @@
|
||||
(set! (-> self look) arg2)
|
||||
(set! (-> self defense) arg2)
|
||||
(art-init self)
|
||||
(dummy-28 self)
|
||||
(check-dead self)
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod init-from-entity! crate ((obj crate) (arg0 entity-actor))
|
||||
(params-init obj arg0)
|
||||
(art-init obj)
|
||||
(dummy-28 obj)
|
||||
(check-dead obj)
|
||||
(none)
|
||||
)
|
||||
|
||||
@@ -1154,7 +1154,7 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod dummy-28 crate ((obj crate))
|
||||
(defmethod check-dead crate ((obj crate))
|
||||
(if (>= (-> obj entity extra perm user-int8 0) 1)
|
||||
(go (method-of-object obj die) #t 0)
|
||||
)
|
||||
@@ -1210,8 +1210,8 @@
|
||||
|
||||
(defpartgroup group-buzzer-crate
|
||||
:id 74
|
||||
:duration 5
|
||||
:linger-duration 450
|
||||
:duration (seconds 0.017)
|
||||
:linger-duration (seconds 1.5)
|
||||
:bounds (static-bspherem 0 0 0 2)
|
||||
:parts ((sp-item 302))
|
||||
)
|
||||
@@ -1353,7 +1353,7 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod dummy-28 pickup-spawner ((obj pickup-spawner))
|
||||
(defmethod check-dead pickup-spawner ((obj pickup-spawner))
|
||||
(go (method-of-object obj wait))
|
||||
0
|
||||
(none)
|
||||
@@ -1371,7 +1371,3 @@
|
||||
(none)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -84,8 +84,8 @@
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod TODO-RENAME-25 dark-eco-pool ((obj dark-eco-pool))
|
||||
(let ((t9-0 (method-of-type water-anim TODO-RENAME-25)))
|
||||
(defmethod water-vol-method-25 dark-eco-pool ((obj dark-eco-pool))
|
||||
(let ((t9-0 (method-of-type water-anim water-vol-method-25)))
|
||||
(t9-0 obj)
|
||||
)
|
||||
(logclear! (-> obj flags) (water-flags wt23))
|
||||
@@ -108,8 +108,8 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod TODO-RENAME-22 dark-eco-pool ((obj dark-eco-pool))
|
||||
(let ((t9-0 (method-of-type water-anim TODO-RENAME-22)))
|
||||
(defmethod water-vol-method-22 dark-eco-pool ((obj dark-eco-pool))
|
||||
(let ((t9-0 (method-of-type water-anim water-vol-method-22)))
|
||||
(t9-0 obj)
|
||||
)
|
||||
(let ((gp-0 (new 'process 'ripple-control)))
|
||||
@@ -170,8 +170,8 @@
|
||||
|
||||
(defpartgroup group-dark-eco-pool-nasty
|
||||
:id 445
|
||||
:duration 600
|
||||
:linger-duration 600
|
||||
:duration (seconds 2)
|
||||
:linger-duration (seconds 2)
|
||||
:flags (use-local-clock)
|
||||
:bounds (static-bspherem 0 0 0 12)
|
||||
:parts ((sp-item 2056 :fade-after (meters 100) :period 600 :length 5)
|
||||
@@ -383,7 +383,3 @@
|
||||
(none)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -72,7 +72,7 @@
|
||||
(do-joint-math! self)
|
||||
(let ((a0-22 (-> self skel effect)))
|
||||
(if a0-22
|
||||
(TODO-RENAME-9 a0-22)
|
||||
(effect-control-method-9 a0-22)
|
||||
)
|
||||
)
|
||||
(if (logtest? (-> self skel status) (janim-status blerc blerc-done))
|
||||
@@ -186,15 +186,15 @@
|
||||
|
||||
|
||||
(defstate manipy-idle (manipy)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(local-vars (v0-0 none))
|
||||
(let ((v1-0 arg2))
|
||||
(let ((v1-0 event-type))
|
||||
(the-as
|
||||
object
|
||||
(cond
|
||||
((= v1-0 'attackable)
|
||||
(cond
|
||||
((-> arg3 param 0)
|
||||
((-> event param 0)
|
||||
(set! v0-0 (the-as none (logior (process-mask attackable) (-> self mask))))
|
||||
(set! (-> self mask) (the-as process-mask v0-0))
|
||||
)
|
||||
@@ -207,7 +207,7 @@
|
||||
)
|
||||
((= v1-0 'blend-shape)
|
||||
(cond
|
||||
((-> arg3 param 0)
|
||||
((-> event param 0)
|
||||
(set! v0-0 (the-as none (logior (-> self skel status) (janim-status blerc eye))))
|
||||
(set! (-> self skel status) (the-as janim-status v0-0))
|
||||
)
|
||||
@@ -220,7 +220,7 @@
|
||||
)
|
||||
((= v1-0 'shadow)
|
||||
(cond
|
||||
((-> arg3 param 0)
|
||||
((-> event param 0)
|
||||
(set! v0-0 (the-as none (-> self shadow-backup)))
|
||||
(set! (-> self draw shadow) (the-as shadow-geo v0-0))
|
||||
v0-0
|
||||
@@ -232,37 +232,40 @@
|
||||
)
|
||||
)
|
||||
((= v1-0 'trans-hook)
|
||||
(set! v0-0 (the-as none (-> arg3 param 0)))
|
||||
(set! v0-0 (the-as none (-> event param 0)))
|
||||
(set! (-> self new-trans-hook) (the-as (function none) v0-0))
|
||||
v0-0
|
||||
)
|
||||
((= v1-0 'post-hook)
|
||||
(set! v0-0 (the-as none (-> arg3 param 0)))
|
||||
(set! v0-0 (the-as none (-> event param 0)))
|
||||
(set! (-> self new-post-hook) (the-as (function none) v0-0))
|
||||
v0-0
|
||||
)
|
||||
((= v1-0 'eval)
|
||||
((the-as (function manipy none) (-> arg3 param 0)) self)
|
||||
((the-as (function manipy none) (-> event param 0)) self)
|
||||
)
|
||||
((= v1-0 'become-hud-object)
|
||||
(convert-to-hud-object self (the-as hud (-> arg3 param 0)))
|
||||
(convert-to-hud-object self (the-as hud (-> event param 0)))
|
||||
)
|
||||
((= v1-0 'event-hook)
|
||||
(set! v0-0 (the-as none (-> arg3 param 0)))
|
||||
(set! v0-0 (the-as none (-> event param 0)))
|
||||
(set! (-> self cur-event-hook) (the-as (function none) v0-0))
|
||||
v0-0
|
||||
)
|
||||
((= v1-0 'art-joint-anim)
|
||||
(set! (-> self new-joint-anim)
|
||||
(the-as art-joint-anim (lookup-art (-> self draw art-group) (the-as string (-> arg3 param 0)) art-joint-anim))
|
||||
(the-as
|
||||
art-joint-anim
|
||||
(lookup-art (-> self draw art-group) (the-as string (-> event param 0)) art-joint-anim)
|
||||
)
|
||||
)
|
||||
(set! v0-0 (the-as none (-> arg3 param 1)))
|
||||
(set! v0-0 (the-as none (-> event param 1)))
|
||||
(set! (-> self new-joint-anim-blend) (the-as uint v0-0))
|
||||
v0-0
|
||||
)
|
||||
((= v1-0 'anim-mode)
|
||||
(when (nonzero? (-> self skel))
|
||||
(set! (-> self anim-mode) (the-as symbol (-> arg3 param 0)))
|
||||
(set! (-> self anim-mode) (the-as symbol (-> event param 0)))
|
||||
(if (= (-> self anim-mode) 'clone-anim)
|
||||
(ja-post)
|
||||
)
|
||||
@@ -270,19 +273,16 @@
|
||||
)
|
||||
)
|
||||
((or (= v1-0 'origin-joint-index) (= v1-0 'center-joint))
|
||||
(set! (-> self draw origin-joint-index) (-> arg3 param 0))
|
||||
(set! v0-0 (the-as none (-> arg3 param 0)))
|
||||
(set! (-> self draw origin-joint-index) (-> event param 0))
|
||||
(set! v0-0 (the-as none (-> event param 0)))
|
||||
(set! (-> self draw shadow-joint-index) (the-as uint v0-0))
|
||||
v0-0
|
||||
)
|
||||
((= v1-0 'max-vis-dist)
|
||||
(let ((f0-0 (the-as float (-> arg3 param 0))))
|
||||
(set! (-> self draw lod-set lod (-> self draw lod-set max-lod) dist) f0-0)
|
||||
f0-0
|
||||
)
|
||||
(set! (-> self draw lod-set lod (-> self draw lod-set max-lod) dist) (the-as float (-> event param 0)))
|
||||
)
|
||||
((= v1-0 'grab)
|
||||
(set! (-> self cur-grab-handle) (process->handle (the-as process (-> arg3 param 0))))
|
||||
(set! (-> self cur-grab-handle) (process->handle (the-as process (-> event param 0))))
|
||||
(let ((v1-30 (handle->process (-> self cur-grab-handle))))
|
||||
(when v1-30
|
||||
(set! v0-0 (the-as none (-> self old-grab-pos)))
|
||||
@@ -292,33 +292,33 @@
|
||||
)
|
||||
)
|
||||
((= v1-0 'target)
|
||||
(set! v0-0 (the-as none (process->handle (the-as process (-> arg3 param 0)))))
|
||||
(set! v0-0 (the-as none (process->handle (the-as process (-> event param 0)))))
|
||||
(set! (-> self cur-target-handle) (the-as handle v0-0))
|
||||
v0-0
|
||||
)
|
||||
((= v1-0 'trans)
|
||||
(cond
|
||||
((type-type? (-> self root type) collide-shape)
|
||||
(move-to-point! (the-as collide-shape (-> self root)) (the-as vector (-> arg3 param 0)))
|
||||
(move-to-point! (the-as collide-shape (-> self root)) (the-as vector (-> event param 0)))
|
||||
)
|
||||
(else
|
||||
(set! v0-0 (the-as none (-> self root trans)))
|
||||
(set! (-> (the-as vector v0-0) quad) (-> (the-as vector (-> arg3 param 0)) quad))
|
||||
(set! (-> (the-as vector v0-0) quad) (-> (the-as vector (-> event param 0)) quad))
|
||||
v0-0
|
||||
)
|
||||
)
|
||||
)
|
||||
((= v1-0 'rot)
|
||||
(let ((s5-0 (new 'stack-no-clear 'matrix)))
|
||||
(matrix-rotate-y! s5-0 (the-as float (-> arg3 param 0)))
|
||||
(matrix-rotate-y! s5-0 (the-as float (-> event param 0)))
|
||||
(matrix->quaternion (-> self root quat) s5-0)
|
||||
)
|
||||
)
|
||||
((= v1-0 'rot-quat)
|
||||
(quaternion-copy! (-> self root quat) (the-as quaternion (-> arg3 param 0)))
|
||||
(quaternion-copy! (-> self root quat) (the-as quaternion (-> event param 0)))
|
||||
)
|
||||
((= v1-0 'clone-copy-trans)
|
||||
(set! v0-0 (the-as none (-> arg3 param 0)))
|
||||
(set! v0-0 (the-as none (-> event param 0)))
|
||||
(set! (-> self clone-copy-trans) (the-as symbol v0-0))
|
||||
v0-0
|
||||
)
|
||||
@@ -327,9 +327,9 @@
|
||||
#f
|
||||
)
|
||||
((= v1-0 'draw)
|
||||
(set! (-> self draw?) (the-as symbol (-> arg3 param 0)))
|
||||
(set! (-> self draw?) (the-as symbol (-> event param 0)))
|
||||
(cond
|
||||
((-> arg3 param 0)
|
||||
((-> event param 0)
|
||||
(let ((v1-47 (logtest? (-> self draw status) (draw-status hidden))))
|
||||
(logclear! (-> self draw status) (draw-status hidden))
|
||||
(when v1-47
|
||||
@@ -357,7 +357,7 @@
|
||||
)
|
||||
)
|
||||
((= v1-0 'query)
|
||||
(case (-> arg3 param 0)
|
||||
(case (-> event param 0)
|
||||
(('grab)
|
||||
(handle->process (-> self cur-grab-handle))
|
||||
)
|
||||
@@ -373,10 +373,7 @@
|
||||
((= v1-0 'set-frame-num)
|
||||
(let ((v1-73 (-> self skel root-channel 0)))
|
||||
(set! (-> v1-73 num-func) num-func-identity)
|
||||
(let ((f0-2 (the-as float (-> arg3 param 0))))
|
||||
(set! (-> v1-73 frame-num) f0-2)
|
||||
f0-2
|
||||
)
|
||||
(set! (-> v1-73 frame-num) (the-as float (-> event param 0)))
|
||||
)
|
||||
)
|
||||
(else
|
||||
@@ -842,7 +839,7 @@
|
||||
(send-event gp-0 'query 'done)
|
||||
)
|
||||
((type-type? (-> gp-0 type) process-drawable)
|
||||
(when (zero? (logand (-> (the-as process-drawable gp-0) skel status) (janim-status done)))
|
||||
(when (not (logtest? (-> (the-as process-drawable gp-0) skel status) (janim-status done)))
|
||||
(let ((s5-0 pp))
|
||||
(set! pp gp-0)
|
||||
(let ((v0-1 (the-as object (ja-done? 0))))
|
||||
@@ -1080,32 +1077,30 @@
|
||||
)
|
||||
|
||||
(defstate camera-tracker-process (camera-tracker)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(local-vars (v0-0 uint))
|
||||
(let ((v1-0 arg2))
|
||||
(the-as object (cond
|
||||
((= v1-0 'message)
|
||||
(set! v0-0 (-> arg3 param 0))
|
||||
(set! (-> self message) (the-as basic v0-0))
|
||||
v0-0
|
||||
)
|
||||
((= v1-0 'mask)
|
||||
(set! v0-0 (-> arg3 param 0))
|
||||
(set! (-> self mask-to-clear) (the-as process-mask v0-0))
|
||||
v0-0
|
||||
)
|
||||
((= v1-0 'border)
|
||||
(set! v0-0 (-> arg3 param 0))
|
||||
(set! (-> self border-value) (the-as basic v0-0))
|
||||
v0-0
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(the-as object (case event-type
|
||||
(('message)
|
||||
(set! v0-0 (-> event param 0))
|
||||
(set! (-> self message) (the-as basic v0-0))
|
||||
v0-0
|
||||
)
|
||||
(('mask)
|
||||
(set! v0-0 (-> event param 0))
|
||||
(set! (-> self mask-to-clear) (the-as process-mask v0-0))
|
||||
v0-0
|
||||
)
|
||||
(('border)
|
||||
(set! v0-0 (-> event param 0))
|
||||
(set! (-> self border-value) (the-as basic v0-0))
|
||||
v0-0
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
:enter (behavior ()
|
||||
(if (-> self entity)
|
||||
(dummy-30 (-> self entity) (entity-perm-status bit-3) #t)
|
||||
(set-or-clear-status! (-> self entity) (entity-perm-status bit-3) #t)
|
||||
)
|
||||
(if (not (-> self border-value))
|
||||
(add-setting! 'border-mode (-> self border-value) 0.0 0)
|
||||
@@ -1117,7 +1112,7 @@
|
||||
)
|
||||
:exit (behavior ()
|
||||
(if (-> self entity)
|
||||
(dummy-30 (-> self entity) (entity-perm-status bit-3) #f)
|
||||
(set-or-clear-status! (-> self entity) (entity-perm-status bit-3) #f)
|
||||
)
|
||||
(send-event *camera* 'clear-entity)
|
||||
(none)
|
||||
@@ -1238,7 +1233,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(when (zero? (logand (-> self draw status) (draw-status hidden)))
|
||||
(when (not (logtest? (-> self draw status) (draw-status hidden)))
|
||||
(let ((v1-36 (-> self draw))
|
||||
(a0-18 (new 'stack-no-clear 'vector))
|
||||
)
|
||||
@@ -1330,8 +1325,8 @@
|
||||
)
|
||||
|
||||
(defstate part-spawner-active (part-spawner)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('stop)
|
||||
(process-entity-status! self (entity-perm-status complete) #t)
|
||||
(set! (-> self enable) #f)
|
||||
@@ -1343,7 +1338,7 @@
|
||||
#t
|
||||
)
|
||||
(('trans)
|
||||
(let ((v0-1 (the-as object (-> (the-as vector (-> arg3 param 0)) quad))))
|
||||
(let ((v0-1 (the-as object (-> (the-as vector (-> event param 0)) quad))))
|
||||
(set! (-> self root trans quad) (the-as uint128 v0-1))
|
||||
v0-1
|
||||
)
|
||||
@@ -1703,13 +1698,13 @@
|
||||
)
|
||||
|
||||
(defstate cam-launcher-shortfall (camera-slave)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('teleport)
|
||||
#f
|
||||
)
|
||||
(else
|
||||
(cam-standard-event-handler arg0 arg1 arg2 arg3)
|
||||
(cam-standard-event-handler proc arg1 event-type event)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -1735,7 +1730,7 @@
|
||||
(none)
|
||||
)
|
||||
:trans (behavior ()
|
||||
(if (zero? (logand (-> *camera* master-options) 2))
|
||||
(if (not (logtest? (-> *camera* master-options) 2))
|
||||
(cam-slave-go cam-free-floating)
|
||||
)
|
||||
(none)
|
||||
@@ -1774,13 +1769,13 @@
|
||||
)
|
||||
|
||||
(defstate cam-launcher-longfall (camera-slave)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('teleport)
|
||||
#f
|
||||
)
|
||||
(else
|
||||
(cam-standard-event-handler arg0 arg1 arg2 arg3)
|
||||
(cam-standard-event-handler proc arg1 event-type event)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -1799,7 +1794,7 @@
|
||||
(none)
|
||||
)
|
||||
:trans (behavior ()
|
||||
(if (zero? (logand (-> *camera* master-options) 2))
|
||||
(if (not (logtest? (-> *camera* master-options) 2))
|
||||
(cam-slave-go cam-free-floating)
|
||||
)
|
||||
(cam-launcher-long-joystick)
|
||||
@@ -1869,13 +1864,13 @@
|
||||
)
|
||||
|
||||
(defstate launcher-idle (launcher)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('instant-death)
|
||||
(go launcher-deactivated)
|
||||
)
|
||||
(('trans)
|
||||
(move-to-point! (-> self root-override) (the-as vector (-> arg3 param 0)))
|
||||
(move-to-point! (-> self root-override) (the-as vector (-> event param 0)))
|
||||
(update-transforms! (-> self root-override))
|
||||
)
|
||||
)
|
||||
@@ -1915,17 +1910,17 @@
|
||||
)
|
||||
|
||||
(defstate launcher-active (launcher)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(when (or (= arg2 'touch) (= arg2 'attack))
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(when (or (= event-type 'touch) (= event-type 'attack))
|
||||
(set! (-> self state-time) (-> *display* base-frame-counter))
|
||||
(send-event arg0 'launch (-> self spring-height) (-> self camera) (-> self dest) (-> self seek-time))
|
||||
(send-event proc 'launch (-> self spring-height) (-> self camera) (-> self dest) (-> self seek-time))
|
||||
)
|
||||
(cond
|
||||
((= arg2 'instant-death)
|
||||
((= event-type 'instant-death)
|
||||
(go launcher-deactivated)
|
||||
)
|
||||
((= arg2 'trans)
|
||||
(move-to-point! (-> self root-override) (the-as vector (-> arg3 param 0)))
|
||||
((= event-type 'trans)
|
||||
(move-to-point! (-> self root-override) (the-as vector (-> event param 0)))
|
||||
(update-transforms! (-> self root-override))
|
||||
)
|
||||
)
|
||||
@@ -2094,102 +2089,100 @@
|
||||
)
|
||||
|
||||
(defstate touch-tracker-idle (touch-tracker)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(local-vars (v0-0 none))
|
||||
(let ((v1-0 arg2))
|
||||
(the-as object (cond
|
||||
((= v1-0 'touched)
|
||||
(let ((v1-1 (ppointer->process (-> self parent))))
|
||||
(when (!= v1-1 arg0)
|
||||
(cond
|
||||
((= (-> self event) 'attack)
|
||||
(cond
|
||||
((= (-> arg0 type) target)
|
||||
(send-event
|
||||
arg0
|
||||
(-> self event)
|
||||
:from (the-as process v1-1)
|
||||
#f
|
||||
(static-attack-info ((mode (the-as symbol (-> self event-mode)))))
|
||||
)
|
||||
(the-as object (case event-type
|
||||
(('touched)
|
||||
(let ((v1-1 (ppointer->process (-> self parent))))
|
||||
(when (!= v1-1 proc)
|
||||
(cond
|
||||
((= (-> self event) 'attack)
|
||||
(cond
|
||||
((= (-> proc type) target)
|
||||
(send-event
|
||||
proc
|
||||
(-> self event)
|
||||
:from (the-as process v1-1)
|
||||
#f
|
||||
(static-attack-info ((mode (the-as symbol (-> self event-mode)))))
|
||||
)
|
||||
((= (-> v1-1 type) target)
|
||||
(send-event
|
||||
arg0
|
||||
(-> self event)
|
||||
:from (the-as process v1-1)
|
||||
#f
|
||||
(-> self event-mode)
|
||||
(-> *target* control unknown-dword50)
|
||||
(-> *target* control unknown-dword51)
|
||||
)
|
||||
)
|
||||
((= (-> v1-1 type) target)
|
||||
(send-event
|
||||
proc
|
||||
(-> self event)
|
||||
:from (the-as process v1-1)
|
||||
#f
|
||||
(-> self event-mode)
|
||||
(-> *target* control unknown-dword50)
|
||||
(-> *target* control unknown-dword51)
|
||||
)
|
||||
(else
|
||||
(let ((a1-5 (new 'stack-no-clear 'event-message-block)))
|
||||
(set! (-> a1-5 from) (the-as process v1-1))
|
||||
(set! (-> a1-5 num-params) 4)
|
||||
(set! (-> a1-5 message) (-> self event))
|
||||
(set! (-> a1-5 param 0) (the-as uint #f))
|
||||
(set! (-> a1-5 param 1) (the-as uint (-> self event-mode)))
|
||||
(let ((v1-19 (+ *global-attack-id* 1)))
|
||||
(set! *global-attack-id* v1-19)
|
||||
(set! (-> a1-5 param 2) (the-as uint v1-19))
|
||||
)
|
||||
(set! (-> a1-5 param 3) (the-as uint 0))
|
||||
(send-event-function arg0 a1-5)
|
||||
)
|
||||
(else
|
||||
(let ((a1-5 (new 'stack-no-clear 'event-message-block)))
|
||||
(set! (-> a1-5 from) (the-as process v1-1))
|
||||
(set! (-> a1-5 num-params) 4)
|
||||
(set! (-> a1-5 message) (-> self event))
|
||||
(set! (-> a1-5 param 0) (the-as uint #f))
|
||||
(set! (-> a1-5 param 1) (the-as uint (-> self event-mode)))
|
||||
(let ((v1-19 (+ *global-attack-id* 1)))
|
||||
(set! *global-attack-id* v1-19)
|
||||
(set! (-> a1-5 param 2) (the-as uint v1-19))
|
||||
)
|
||||
(set! (-> a1-5 param 3) (the-as uint 0))
|
||||
(send-event-function proc a1-5)
|
||||
)
|
||||
)
|
||||
)
|
||||
((-> self event)
|
||||
(send-event arg0 (-> self event) :from (the-as process v1-1))
|
||||
)
|
||||
(else
|
||||
(let ((t0-5 (new 'stack-no-clear 'event-message-block)))
|
||||
(set! (-> t0-5 from) arg0)
|
||||
(set! (-> t0-5 num-params) arg1)
|
||||
(set! (-> t0-5 message) arg2)
|
||||
(set! (-> t0-5 param 0) (-> arg3 param 0))
|
||||
(set! (-> t0-5 param 1) (-> arg3 param 1))
|
||||
(set! (-> t0-5 param 2) (-> arg3 param 2))
|
||||
(set! (-> t0-5 param 3) (-> arg3 param 3))
|
||||
(set! (-> t0-5 param 4) (-> arg3 param 4))
|
||||
(set! (-> t0-5 param 5) (-> arg3 param 5))
|
||||
(set! (-> t0-5 param 6) (-> arg3 param 6))
|
||||
(send-event-function v1-1 t0-5)
|
||||
)
|
||||
)
|
||||
((-> self event)
|
||||
(send-event proc (-> self event) :from (the-as process v1-1))
|
||||
)
|
||||
(else
|
||||
(let ((t0-5 (new 'stack-no-clear 'event-message-block)))
|
||||
(set! (-> t0-5 from) proc)
|
||||
(set! (-> t0-5 num-params) arg1)
|
||||
(set! (-> t0-5 message) event-type)
|
||||
(set! (-> t0-5 param 0) (-> event param 0))
|
||||
(set! (-> t0-5 param 1) (-> event param 1))
|
||||
(set! (-> t0-5 param 2) (-> event param 2))
|
||||
(set! (-> t0-5 param 3) (-> event param 3))
|
||||
(set! (-> t0-5 param 4) (-> event param 4))
|
||||
(set! (-> t0-5 param 5) (-> event param 5))
|
||||
(set! (-> t0-5 param 6) (-> event param 6))
|
||||
(send-event-function v1-1 t0-5)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
((= v1-0 'target)
|
||||
(set! v0-0 (the-as none (process->handle (the-as process (-> arg3 param 0)))))
|
||||
(set! (-> self target) (the-as handle v0-0))
|
||||
v0-0
|
||||
)
|
||||
((= v1-0 'event)
|
||||
(set! (-> self event) (the-as symbol (-> arg3 param 0)))
|
||||
(set! v0-0 (the-as none (-> arg3 param 1)))
|
||||
(set! (-> self event-mode) (the-as basic v0-0))
|
||||
v0-0
|
||||
)
|
||||
((= v1-0 'exit)
|
||||
(set! v0-0 (the-as none (-> arg3 param 0)))
|
||||
(set! (-> self run-function) (the-as (function object) v0-0))
|
||||
v0-0
|
||||
)
|
||||
((= v1-0 'eval)
|
||||
((the-as (function touch-tracker none) (-> arg3 param 0)) self)
|
||||
)
|
||||
((= v1-0 'function)
|
||||
(set! v0-0 (the-as none (-> arg3 param 0)))
|
||||
(set! (-> self callback) (the-as (function touch-tracker none) v0-0))
|
||||
v0-0
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(('target)
|
||||
(set! v0-0 (the-as none (process->handle (the-as process (-> event param 0)))))
|
||||
(set! (-> self target) (the-as handle v0-0))
|
||||
v0-0
|
||||
)
|
||||
(('event)
|
||||
(set! (-> self event) (the-as symbol (-> event param 0)))
|
||||
(set! v0-0 (the-as none (-> event param 1)))
|
||||
(set! (-> self event-mode) (the-as basic v0-0))
|
||||
v0-0
|
||||
)
|
||||
(('exit)
|
||||
(set! v0-0 (the-as none (-> event param 0)))
|
||||
(set! (-> self run-function) (the-as (function object) v0-0))
|
||||
v0-0
|
||||
)
|
||||
(('eval)
|
||||
((the-as (function touch-tracker none) (-> event param 0)) self)
|
||||
)
|
||||
(('function)
|
||||
(set! v0-0 (the-as none (-> event param 0)))
|
||||
(set! (-> self callback) (the-as (function touch-tracker none) v0-0))
|
||||
v0-0
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
:code (behavior ()
|
||||
(set! (-> self state-time) (-> *display* base-frame-counter))
|
||||
@@ -2373,7 +2366,3 @@
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -156,54 +156,47 @@
|
||||
(nav-enemy-stare () _type_ :state 31)
|
||||
(nav-enemy-stop-chase () _type_ :state 32)
|
||||
(nav-enemy-victory () _type_ :state 33)
|
||||
(dummy-34 (_type_) none 34)
|
||||
(nav-enemy-method-34 (_type_) none 34)
|
||||
(nav-enemy-wait-for-cue () _type_ :state 35)
|
||||
(nav-enemy-jump-to-point () _type_ :state 36)
|
||||
(TODO-RENAME-37 (_type_) none 37)
|
||||
(TODO-RENAME-38 (_type_) none 38)
|
||||
(nav-enemy-method-37 (_type_) none 37)
|
||||
(nav-enemy-method-38 (_type_) none 38)
|
||||
(common-post (_type_) none 39)
|
||||
(dummy-40 (_type_) none 40)
|
||||
(dummy-41 (_type_) none 41)
|
||||
(TODO-RENAME-42 (_type_) int 42)
|
||||
(dummy-43 (_type_ process event-message-block) object 43)
|
||||
(dummy-44 (_type_ process event-message-block) object 44)
|
||||
(TODO-RENAME-45 (_type_ nav-enemy-info) none 45)
|
||||
(TODO-RENAME-46 (_type_ float) basic 46)
|
||||
(nav-enemy-method-40 (_type_) none 40)
|
||||
(nav-enemy-method-41 (_type_) none 41)
|
||||
(new-patrol-point! (_type_) int 42)
|
||||
(attack-handler (_type_ process event-message-block) object 43)
|
||||
(touch-handler (_type_ process event-message-block) object 44)
|
||||
(init-defaults! (_type_ nav-enemy-info) none 45)
|
||||
(target-in-range? (_type_ float) basic 46)
|
||||
(initialize-collision (_type_) none 47)
|
||||
(TODO-RENAME-48 (_type_) none 48)
|
||||
(TODO-RENAME-49 (_type_ nav-enemy-info) float 49)
|
||||
(TODO-RENAME-50 (_type_ vector) symbol 50)
|
||||
(dummy-51 (_type_) none 51)
|
||||
(dummy-52 (_type_ vector) symbol 52)
|
||||
(dummy-53 (_type_) symbol 53)
|
||||
(dummy-54 (_type_ vector) symbol 54)
|
||||
(dummy-55 (_type_) symbol 55)
|
||||
(nav-enemy-method-48 (_type_) none 48)
|
||||
(init-jm! (_type_ nav-enemy-info) float 49)
|
||||
(nav-enemy-method-50 (_type_ vector) symbol 50)
|
||||
(nav-enemy-method-51 (_type_) none 51)
|
||||
(nav-enemy-method-52 (_type_ vector) symbol 52)
|
||||
(nav-enemy-method-53 (_type_) symbol 53)
|
||||
(nav-enemy-method-54 (_type_ vector) symbol 54)
|
||||
(nav-enemy-method-55 (_type_) symbol 55)
|
||||
(set-jump-height-factor! (_type_ int) none 56)
|
||||
(dummy-57 (_type_) none 57)
|
||||
(dummy-58 (_type_) none 58)
|
||||
(TODO-RENAME-59 (_type_) none 59)
|
||||
(dummy-60 (_type_ symbol) symbol 60)
|
||||
(nav-enemy-method-57 (_type_) none 57)
|
||||
(nav-enemy-method-58 (_type_) none 58)
|
||||
(nav-enemy-method-59 (_type_) none 59)
|
||||
(nav-enemy-method-60 (_type_ symbol) symbol 60)
|
||||
(snow-bunny-attack () _type_ :state 61)
|
||||
(snow-bunny-chase-hop () _type_ :state 62)
|
||||
(snow-bunny-defend () _type_ :state 63)
|
||||
(dummy-64 () _type_ :state 64)
|
||||
(nav-enemy-method-64 () _type_ :state 64)
|
||||
(snow-bunny-lunge () _type_ :state 65)
|
||||
(snow-bunny-nav-resume () _type_ :state 66)
|
||||
(snow-bunny-patrol-hop () _type_ :state 67)
|
||||
(snow-bunny-patrol-idle () _type_ :state 68)
|
||||
(dummy-69 () _type_ :state 69)
|
||||
(nav-enemy-method-69 () _type_ :state 69)
|
||||
(snow-bunny-retreat-hop () _type_ :state 70)
|
||||
(snow-bunny-tune-spheres () _type_ :state 71)
|
||||
(nav-enemy-touch-handler (_type_ process event-message-block) object 72)
|
||||
(nav-enemy-attack-handler (_type_ process event-message-block) object 73)
|
||||
(nav-enemy-jump-blocked () _type_ :state 74)
|
||||
(dummy-75 () _type_ :state 75)
|
||||
(nav-enemy-method-75 () _type_ :state 75)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
0
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
(the-as nav-enemy ((the-as (function process-drawable int none) (find-parent-method nav-enemy 7)) obj arg0))
|
||||
)
|
||||
|
||||
(defmethod TODO-RENAME-42 nav-enemy ((obj nav-enemy))
|
||||
(defmethod new-patrol-point! nav-enemy ((obj nav-enemy))
|
||||
(local-vars (v1-11 symbol))
|
||||
(if (<= (-> obj path curve num-cverts) 0)
|
||||
(go process-drawable-art-error "no path")
|
||||
@@ -76,7 +76,10 @@
|
||||
(defmethod common-post nav-enemy ((obj nav-enemy))
|
||||
(when (and (logtest? (-> obj nav-enemy-flags) (nav-enemy-flags navenmf8))
|
||||
(or (not *target*)
|
||||
(and (zero? (logand (-> *target* state-flags) (state-flags being-attacked invulnerable timed-invulnerable invuln-powerup do-not-notice dying)))
|
||||
(and (not (logtest? (-> *target* state-flags)
|
||||
(state-flags being-attacked invulnerable timed-invulnerable invuln-powerup do-not-notice dying)
|
||||
)
|
||||
)
|
||||
(>= (- (-> *display* base-frame-counter) (-> obj touch-time)) (seconds 0.05))
|
||||
)
|
||||
)
|
||||
@@ -110,7 +113,7 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod dummy-44 nav-enemy ((obj nav-enemy) (arg0 process) (arg1 event-message-block))
|
||||
(defmethod touch-handler nav-enemy ((obj nav-enemy) (arg0 process) (arg1 event-message-block))
|
||||
(if (and (logtest? (-> obj nav-enemy-flags) (nav-enemy-flags navenmf6))
|
||||
((method-of-type touching-shapes-entry prims-touching?)
|
||||
(the-as touching-shapes-entry (-> arg1 param 0))
|
||||
@@ -141,7 +144,7 @@
|
||||
(the-as object 'die)
|
||||
)
|
||||
|
||||
(defmethod dummy-43 nav-enemy ((obj nav-enemy) (arg0 process) (arg1 event-message-block))
|
||||
(defmethod attack-handler nav-enemy ((obj nav-enemy) (arg0 process) (arg1 event-message-block))
|
||||
(cond
|
||||
((logtest? (-> obj nav-enemy-flags) (nav-enemy-flags navenmf5))
|
||||
(send-event arg0 'get-attack-count 1)
|
||||
@@ -149,7 +152,7 @@
|
||||
(go (method-of-object obj nav-enemy-die))
|
||||
)
|
||||
(else
|
||||
(dummy-44 obj arg0 arg1)
|
||||
(touch-handler obj arg0 arg1)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -176,11 +179,11 @@
|
||||
(case arg2
|
||||
(('touch)
|
||||
(set! (-> self touch-time) (-> *display* base-frame-counter))
|
||||
(dummy-44 self arg0 arg3)
|
||||
(touch-handler self arg0 arg3)
|
||||
)
|
||||
(('attack)
|
||||
(nav-enemy-set-hit-from-direction arg0)
|
||||
(dummy-43 self arg0 arg3)
|
||||
(attack-handler self arg0 arg3)
|
||||
)
|
||||
(('instant-death)
|
||||
(let ((gp-1 (-> self hit-from-dir)))
|
||||
@@ -258,13 +261,13 @@ nav-enemy-default-event-handler
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod dummy-40 nav-enemy ((obj nav-enemy))
|
||||
(dummy-11 (-> obj nav) (-> obj nav target-pos))
|
||||
(defmethod nav-enemy-method-40 nav-enemy ((obj nav-enemy))
|
||||
(nav-control-method-11 (-> obj nav) (-> obj nav target-pos))
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod dummy-41 nav-enemy ((obj nav-enemy))
|
||||
(defmethod nav-enemy-method-41 nav-enemy ((obj nav-enemy))
|
||||
(cond
|
||||
((-> obj nav-info use-align)
|
||||
(align-vel-and-quat-only!
|
||||
@@ -314,7 +317,7 @@ nav-enemy-default-event-handler
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod TODO-RENAME-37 nav-enemy ((obj nav-enemy))
|
||||
(defmethod nav-enemy-method-37 nav-enemy ((obj nav-enemy))
|
||||
(when (logtest? (-> obj nav-enemy-flags) (nav-enemy-flags enable-travel))
|
||||
(if (or (logtest? (-> obj nav-enemy-flags) (nav-enemy-flags navenmf7))
|
||||
(logtest? (nav-control-flags navcf19) (-> obj nav flags))
|
||||
@@ -332,7 +335,7 @@ nav-enemy-default-event-handler
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod TODO-RENAME-38 nav-enemy ((obj nav-enemy))
|
||||
(defmethod nav-enemy-method-38 nav-enemy ((obj nav-enemy))
|
||||
(if (-> obj nav-info move-to-ground)
|
||||
(integrate-for-enemy-with-move-to-ground!
|
||||
(-> obj collide-info)
|
||||
@@ -343,7 +346,7 @@ nav-enemy-default-event-handler
|
||||
(-> obj nav-info hover-if-no-ground)
|
||||
(logtest? (-> obj nav-enemy-flags) (nav-enemy-flags navenmf15))
|
||||
)
|
||||
(dummy-58 (-> obj collide-info) (-> obj collide-info transv))
|
||||
(collide-shape-moving-method-58 (-> obj collide-info) (-> obj collide-info transv))
|
||||
)
|
||||
0
|
||||
(none)
|
||||
@@ -353,10 +356,10 @@ nav-enemy-default-event-handler
|
||||
(cond
|
||||
((logtest? (-> self nav-enemy-flags) (nav-enemy-flags enable-rotate))
|
||||
(compute-alignment! (-> self align))
|
||||
(dummy-40 self)
|
||||
(dummy-41 self)
|
||||
(TODO-RENAME-37 self)
|
||||
(TODO-RENAME-38 self)
|
||||
(nav-enemy-method-40 self)
|
||||
(nav-enemy-method-41 self)
|
||||
(nav-enemy-method-37 self)
|
||||
(nav-enemy-method-38 self)
|
||||
(nav-enemy-common-post)
|
||||
)
|
||||
(else
|
||||
@@ -387,7 +390,7 @@ nav-enemy-default-event-handler
|
||||
(logior! (-> self nav flags) (nav-control-flags navcf10))
|
||||
(nav-enemy-get-new-patrol-point)
|
||||
)
|
||||
(dummy-19
|
||||
(nav-control-method-19
|
||||
(-> self nav)
|
||||
(-> self nav target-pos)
|
||||
(-> self collide-info)
|
||||
@@ -418,7 +421,7 @@ nav-enemy-default-event-handler
|
||||
(set! (-> self nav travel quad) (-> gp-1 quad))
|
||||
)
|
||||
(vector-normalize! (-> self nav travel) 409600.0)
|
||||
(dummy-24 (-> self nav) 204.8 (the-as clip-travel-vector-to-mesh-return-info #f))
|
||||
(nav-control-method-24 (-> self nav) 204.8 (the-as clip-travel-vector-to-mesh-return-info #f))
|
||||
(vector+! (-> self nav target-pos) (-> self collide-info trans) (-> self nav travel))
|
||||
(nav-enemy-travel-post)
|
||||
0
|
||||
@@ -481,14 +484,22 @@ nav-enemy-default-event-handler
|
||||
(defun nav-enemy-player-vulnerable? ()
|
||||
(the-as
|
||||
symbol
|
||||
(and *target* (zero? (logand (-> *target* state-flags) (state-flags being-attacked invulnerable timed-invulnerable invuln-powerup do-not-notice dying))))
|
||||
(and *target*
|
||||
(not (logtest? (-> *target* state-flags)
|
||||
(state-flags being-attacked invulnerable timed-invulnerable invuln-powerup do-not-notice dying)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod TODO-RENAME-46 nav-enemy ((obj nav-enemy) (arg0 float))
|
||||
(defmethod target-in-range? nav-enemy ((obj nav-enemy) (arg0 float))
|
||||
(and *target*
|
||||
(zero? (logand (-> *target* state-flags) (state-flags being-attacked invulnerable timed-invulnerable invuln-powerup do-not-notice dying)))
|
||||
(and (or (zero? (logand (-> obj nav-enemy-flags) (nav-enemy-flags navenmf12)))
|
||||
(not (logtest? (-> *target* state-flags)
|
||||
(state-flags being-attacked invulnerable timed-invulnerable invuln-powerup do-not-notice dying)
|
||||
)
|
||||
)
|
||||
(and (or (not (logtest? (-> obj nav-enemy-flags) (nav-enemy-flags navenmf12)))
|
||||
(< (vector-vector-distance (target-pos 0) (-> obj collide-info trans)) arg0)
|
||||
)
|
||||
(nav-enemy-test-point-near-nav-mesh? (-> *target* control shadow-pos))
|
||||
@@ -506,7 +517,7 @@ nav-enemy-default-event-handler
|
||||
)
|
||||
)
|
||||
(else
|
||||
(when (or (TODO-RENAME-46 self (-> self nav-info notice-distance))
|
||||
(when (or (target-in-range? self (-> self nav-info notice-distance))
|
||||
(and (-> self nav-info use-proximity-notice)
|
||||
*target*
|
||||
(>= (-> self nav-info proximity-notice-distance)
|
||||
@@ -545,11 +556,11 @@ nav-enemy-default-event-handler
|
||||
)
|
||||
|
||||
(defbehavior nav-enemy-test-nav-mesh-intersection-xz? nav-enemy ((arg0 vector))
|
||||
(the-as symbol (dummy-16 (-> self nav) arg0))
|
||||
(the-as symbol (nav-control-method-16 (-> self nav) arg0))
|
||||
)
|
||||
|
||||
(defbehavior nav-enemy-test-point-in-nav-mesh? nav-enemy ((arg0 vector))
|
||||
(the-as symbol (and (dummy-16 (-> self nav) arg0)
|
||||
(the-as symbol (and (nav-control-method-16 (-> self nav) arg0)
|
||||
(< (-> arg0 y) (+ (-> self collide-info trans y) (-> self enemy-info notice-top)))
|
||||
)
|
||||
)
|
||||
@@ -562,7 +573,7 @@ nav-enemy-default-event-handler
|
||||
)
|
||||
|
||||
(defbehavior nav-enemy-get-new-patrol-point nav-enemy ()
|
||||
(TODO-RENAME-42 self)
|
||||
(new-patrol-point! self)
|
||||
0
|
||||
)
|
||||
|
||||
@@ -656,7 +667,7 @@ nav-enemy-default-event-handler
|
||||
(when (not s4-1)
|
||||
(compute-alignment! (-> self align))
|
||||
(align! (-> self align) (align-opts adjust-y-vel ignore-y-if-zero) 1.0 arg1 1.0)
|
||||
(when (zero? (logand (-> self align flags) (align-flags disabled)))
|
||||
(when (not (logtest? (-> self align flags) (align-flags disabled)))
|
||||
(let ((f0-6 (* (- (-> self align delta trans z)) (-> *display* frames-per-second))))
|
||||
(set! (-> self collide-info transv x) (* (-> self hit-from-dir x) f0-6))
|
||||
(set! (-> self collide-info transv z) (* (-> self hit-from-dir z) f0-6))
|
||||
@@ -712,7 +723,7 @@ nav-enemy-default-event-handler
|
||||
)
|
||||
|
||||
(defmethod run-logic? nav-enemy ((obj nav-enemy))
|
||||
(or (zero? (logand (-> obj mask) (process-mask actor-pause)))
|
||||
(or (not (logtest? (-> obj mask) (process-mask actor-pause)))
|
||||
(or (and (nonzero? (-> obj draw))
|
||||
(and (>= (+ (-> *ACTOR-bank* pause-dist) (-> obj collide-info pause-adjust-distance))
|
||||
(vector-vector-distance (-> obj collide-info trans) (camera-pos))
|
||||
@@ -899,7 +910,7 @@ nav-enemy-default-event-handler
|
||||
)
|
||||
(set! (-> gp-0 target-pos quad) (-> v1-10 quad))
|
||||
)
|
||||
(dummy-11 (-> self nav) (-> self nav target-pos))
|
||||
(nav-control-method-11 (-> self nav) (-> self nav target-pos))
|
||||
(set! (-> self rotate-speed) (-> self nav-info run-rotate-speed))
|
||||
(set! (-> self turn-time) (-> self nav-info run-turn-time))
|
||||
(none)
|
||||
@@ -1045,7 +1056,7 @@ nav-enemy-default-event-handler
|
||||
)
|
||||
(logior! (-> self nav-enemy-flags) (nav-enemy-flags navenmf13))
|
||||
)
|
||||
(if (or (not (TODO-RENAME-46 self (-> self nav-info stop-chase-distance)))
|
||||
(if (or (not (target-in-range? self (-> self nav-info stop-chase-distance)))
|
||||
(logtest? (-> self nav-enemy-flags) (nav-enemy-flags navenmf13))
|
||||
)
|
||||
(go-virtual nav-enemy-stop-chase)
|
||||
@@ -1105,7 +1116,7 @@ nav-enemy-default-event-handler
|
||||
(if (logtest? (-> *target* state-flags) (state-flags do-not-notice))
|
||||
(go-virtual nav-enemy-patrol)
|
||||
)
|
||||
(if (and (TODO-RENAME-46 self (-> self nav-info notice-distance)) (not (nav-enemy-frustrated?)))
|
||||
(if (and (target-in-range? self (-> self nav-info notice-distance)) (not (nav-enemy-frustrated?)))
|
||||
(go-virtual nav-enemy-chase)
|
||||
)
|
||||
(if (or (or (not *target*) (< (-> self enemy-info idle-distance)
|
||||
@@ -1167,7 +1178,7 @@ nav-enemy-default-event-handler
|
||||
(go-virtual nav-enemy-patrol)
|
||||
)
|
||||
(cond
|
||||
((TODO-RENAME-46 self (-> self nav-info notice-distance))
|
||||
((target-in-range? self (-> self nav-info notice-distance))
|
||||
(if (and (>= (- (-> *display* base-frame-counter) (-> self notice-time)) (-> self reaction-time))
|
||||
(not (nav-enemy-frustrated?))
|
||||
)
|
||||
@@ -1224,7 +1235,7 @@ nav-enemy-default-event-handler
|
||||
)
|
||||
:trans (behavior ()
|
||||
(when (>= (- (-> *display* base-frame-counter) (-> self state-time)) (seconds 0.1))
|
||||
(if (TODO-RENAME-46 self (-> self nav-info notice-distance))
|
||||
(if (target-in-range? self (-> self nav-info notice-distance))
|
||||
(go-virtual nav-enemy-chase)
|
||||
)
|
||||
)
|
||||
@@ -1494,7 +1505,7 @@ nav-enemy-default-event-handler
|
||||
:event nav-enemy-jump-event-handler
|
||||
:enter (behavior ()
|
||||
(set! (-> self state-time) (-> *display* base-frame-counter))
|
||||
(if (and (-> self nav-info use-jump-blocked) (TODO-RENAME-50 self (-> self event-param-point)))
|
||||
(if (and (-> self nav-info use-jump-blocked) (nav-enemy-method-50 self (-> self event-param-point)))
|
||||
(go-virtual nav-enemy-jump-blocked)
|
||||
)
|
||||
(nav-enemy-initialize-jump (-> self event-param-point))
|
||||
@@ -1508,7 +1519,7 @@ nav-enemy-default-event-handler
|
||||
(nav-enemy-execute-jump)
|
||||
(let ((a1-0 (-> self nav user-poly)))
|
||||
(if (not a1-0)
|
||||
(set! a1-0 (dummy-16 (-> self nav) (-> self jump-dest)))
|
||||
(set! a1-0 (nav-control-method-16 (-> self nav) (-> self jump-dest)))
|
||||
)
|
||||
(if a1-0
|
||||
(set-current-poly! (-> self nav) a1-0)
|
||||
@@ -1522,7 +1533,7 @@ nav-enemy-default-event-handler
|
||||
|
||||
(defbehavior nav-enemy-jump-land-post nav-enemy ()
|
||||
(compute-alignment! (-> self align))
|
||||
(dummy-11 (-> self nav) (-> self nav target-pos))
|
||||
(nav-control-method-11 (-> self nav) (-> self nav target-pos))
|
||||
(seek! (-> self target-speed) (-> self nav-info run-travel-speed) 2048.0)
|
||||
(set! (-> self momentum-speed) (-> self target-speed))
|
||||
(let* ((f0-7
|
||||
@@ -1713,11 +1724,11 @@ nav-enemy-default-event-handler
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod TODO-RENAME-45 nav-enemy ((obj nav-enemy) (arg0 nav-enemy-info))
|
||||
(defmethod init-defaults! nav-enemy ((obj nav-enemy) (arg0 nav-enemy-info))
|
||||
(set! (-> obj rand-gen) (new 'process 'random-generator))
|
||||
(set! (-> obj rand-gen seed) (the-as uint #x666edd1e))
|
||||
(set! (-> obj mask) (the-as process-mask (logior (process-mask enemy) (-> obj mask))))
|
||||
(TODO-RENAME-49 obj arg0)
|
||||
(init-jm! obj arg0)
|
||||
(if (-> obj draw shadow)
|
||||
(set! (-> obj draw shadow-ctrl)
|
||||
(new
|
||||
@@ -1736,7 +1747,7 @@ nav-enemy-default-event-handler
|
||||
(set! (-> obj nav) (new 'process 'nav-control (-> obj collide-info) 16 (-> arg0 nav-nearest-y-threshold)))
|
||||
(logior! (-> obj nav flags) (nav-control-flags display-marks navcf3 navcf5 navcf6 navcf7))
|
||||
(set! (-> obj nav gap-event) 'jump)
|
||||
(TODO-RENAME-26 (-> obj nav))
|
||||
(nav-control-method-26 (-> obj nav))
|
||||
(set! (-> obj path) (new 'process 'path-control obj 'path 0.0))
|
||||
(logior! (-> obj path flags) (path-control-flag display draw-line draw-point draw-text))
|
||||
(set! (-> obj enemy-info)
|
||||
@@ -1749,7 +1760,7 @@ nav-enemy-default-event-handler
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod TODO-RENAME-49 nav-enemy ((obj nav-enemy) (arg0 nav-enemy-info))
|
||||
(defmethod init-jm! nav-enemy ((obj nav-enemy) (arg0 nav-enemy-info))
|
||||
(set! (-> obj nav-info) arg0)
|
||||
(set! (-> obj rotate-speed) (-> obj nav-info walk-rotate-speed))
|
||||
(set! (-> obj turn-time) (-> obj nav-info walk-turn-time))
|
||||
@@ -1762,10 +1773,7 @@ nav-enemy-default-event-handler
|
||||
(set! (-> obj neck nose) (the-as uint 2))
|
||||
(set! (-> obj neck ear) (the-as uint 0))
|
||||
(set! (-> obj neck max-dist) 102400.0)
|
||||
(let ((f0-6 16384.0))
|
||||
(set! (-> obj neck ignore-angle) f0-6)
|
||||
f0-6
|
||||
)
|
||||
(set! (-> obj neck ignore-angle) 16384.0)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -1781,7 +1789,7 @@ nav-enemy-default-event-handler
|
||||
)
|
||||
(vector-identity! (-> self collide-info scale))
|
||||
(set! (-> self entity) (-> arg0 entity))
|
||||
(TODO-RENAME-48 self)
|
||||
(nav-enemy-method-48 self)
|
||||
(logclear! (-> self nav-enemy-flags) (nav-enemy-flags navenmf12))
|
||||
(logior! (-> self nav-enemy-flags) (nav-enemy-flags navenmf1))
|
||||
(go-virtual nav-enemy-wait-for-cue)
|
||||
@@ -1793,12 +1801,12 @@ nav-enemy-default-event-handler
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod TODO-RENAME-48 nav-enemy ((obj nav-enemy))
|
||||
(defmethod nav-enemy-method-48 nav-enemy ((obj nav-enemy))
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod TODO-RENAME-59 nav-enemy ((obj nav-enemy))
|
||||
(defmethod nav-enemy-method-59 nav-enemy ((obj nav-enemy))
|
||||
(go (method-of-object obj nav-enemy-idle))
|
||||
0
|
||||
(none)
|
||||
@@ -1807,86 +1815,18 @@ nav-enemy-default-event-handler
|
||||
(defmethod init-from-entity! nav-enemy ((obj nav-enemy) (arg0 entity-actor))
|
||||
(initialize-collision obj)
|
||||
(process-drawable-from-entity! obj arg0)
|
||||
(TODO-RENAME-48 obj)
|
||||
(TODO-RENAME-59 obj)
|
||||
(nav-enemy-method-48 obj)
|
||||
(nav-enemy-method-59 obj)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod TODO-RENAME-50 nav-enemy ((obj nav-enemy) (arg0 vector))
|
||||
(defmethod nav-enemy-method-50 nav-enemy ((obj nav-enemy) (arg0 vector))
|
||||
(let ((s4-0 (new 'stack-no-clear 'vector)))
|
||||
(set! (-> s4-0 quad) (-> obj collide-info trans quad))
|
||||
(set! (-> obj collide-info trans quad) (-> arg0 quad))
|
||||
(let ((gp-0 (-> obj nav)))
|
||||
(TODO-RENAME-28
|
||||
gp-0
|
||||
(collide-kind
|
||||
background
|
||||
cak-1
|
||||
cak-2
|
||||
cak-3
|
||||
target
|
||||
water
|
||||
powerup
|
||||
crate
|
||||
enemy
|
||||
wall-object
|
||||
projectile
|
||||
ground-object
|
||||
target-attack
|
||||
mother-spider
|
||||
cak-14
|
||||
blue-eco-suck
|
||||
unknown-16
|
||||
unknown-17
|
||||
unknown-18
|
||||
unknown-19
|
||||
unknown-20
|
||||
unknown-21
|
||||
unknown-22
|
||||
unknown-23
|
||||
unknown-24
|
||||
unknown-25
|
||||
unknown-26
|
||||
unknown-27
|
||||
unknown-28
|
||||
unknown-29
|
||||
unknown-30
|
||||
unknown-31
|
||||
unknown-32
|
||||
unknown-33
|
||||
unknown-34
|
||||
unknown-35
|
||||
unknown-36
|
||||
unknown-37
|
||||
unknown-38
|
||||
unknown-39
|
||||
unknown-40
|
||||
unknown-41
|
||||
unknown-42
|
||||
unknown-43
|
||||
unknown-44
|
||||
unknown-45
|
||||
unknown-46
|
||||
unknown-47
|
||||
unknown-48
|
||||
unknown-49
|
||||
unknown-50
|
||||
unknown-51
|
||||
unknown-52
|
||||
unknown-53
|
||||
unknown-54
|
||||
unknown-55
|
||||
unknown-56
|
||||
unknown-57
|
||||
unknown-58
|
||||
unknown-59
|
||||
unknown-60
|
||||
unknown-61
|
||||
unknown-62
|
||||
unknown-63
|
||||
)
|
||||
)
|
||||
(nav-control-method-28 gp-0 (the-as collide-kind -1))
|
||||
(set! (-> obj collide-info trans quad) (-> s4-0 quad))
|
||||
(let* ((v1-8 (-> gp-0 mesh origin))
|
||||
(f0-1 (- (-> arg0 x) (-> v1-8 x)))
|
||||
@@ -1908,7 +1848,3 @@ nav-enemy-default-event-handler
|
||||
)
|
||||
#f
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -42,8 +42,8 @@
|
||||
)
|
||||
|
||||
(defstate orb-cache-top-idle (orb-cache-top)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('eco-blue)
|
||||
(process-entity-status! self (entity-perm-status complete) #t)
|
||||
(dotimes (gp-0 5)
|
||||
@@ -53,7 +53,7 @@
|
||||
(go orb-cache-top-activate #f)
|
||||
)
|
||||
(else
|
||||
(plat-event arg0 arg1 arg2 arg3)
|
||||
(plat-event proc arg1 event-type event)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -90,7 +90,7 @@
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod dummy-22 orb-cache-top ((obj orb-cache-top))
|
||||
(defmethod baseplat-method-22 orb-cache-top ((obj orb-cache-top))
|
||||
(if (< 4096.0 (- (-> obj basetrans y) (-> obj root-pos)))
|
||||
(activate! (-> obj smush) -1.0 60 150 1.0 1.0)
|
||||
(activate! (-> obj smush) -0.5 60 150 1.0 1.0)
|
||||
@@ -323,7 +323,7 @@
|
||||
(initialize-skeleton obj *orb-cache-top-sg* '())
|
||||
(logior! (-> obj skel status) (janim-status inited))
|
||||
(update-transforms! (-> obj root-override))
|
||||
(dummy-21 obj)
|
||||
(baseplat-method-21 obj)
|
||||
(set! (-> obj money) (res-lump-value (-> obj entity) 'orb-cache-count int :default (the-as uint128 20)))
|
||||
(set! (-> obj active-distance) 61440.0)
|
||||
(set! (-> obj inactive-distance) 245760.0)
|
||||
@@ -355,7 +355,3 @@
|
||||
)
|
||||
(none)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -33,12 +33,12 @@
|
||||
(plat-button-move-upward () _type_ :state 24)
|
||||
(plat-button-teleport-to-other-end () _type_ :state 25)
|
||||
(can-activate? (_type_) symbol 26)
|
||||
(TODO-RENAME-27 (_type_) none 27)
|
||||
(TODO-RENAME-28 (_type_) collide-shape-moving 28)
|
||||
(plat-button-method-27 (_type_) none 27)
|
||||
(plat-button-method-28 (_type_) collide-shape-moving 28)
|
||||
(can-target-move? (_type_) none 29)
|
||||
(should-teleport? (_type_) symbol 30)
|
||||
(TODO-RENAME-31 (_type_) none 31)
|
||||
(TODO-RENAME-32 (_type_) none 32)
|
||||
(plat-button-method-31 (_type_) none 31)
|
||||
(plat-button-method-32 (_type_) none 32)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -58,20 +58,16 @@
|
||||
|
||||
(defstate plat-button-idle (plat-button)
|
||||
:virtual #t
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('touch)
|
||||
(when (can-activate? self)
|
||||
(if (and ((method-of-type touching-shapes-entry prims-touching?)
|
||||
(the-as touching-shapes-entry (-> arg3 param 0))
|
||||
(the-as touching-shapes-entry (-> event param 0))
|
||||
(-> self root-override)
|
||||
(the-as uint 1)
|
||||
)
|
||||
(or (not (-> self should-grab-player?)) (let ((v0-3 (process-grab? *target*)))
|
||||
(set! (-> self grab-player?) v0-3)
|
||||
v0-3
|
||||
)
|
||||
)
|
||||
(or (not (-> self should-grab-player?)) (set! (-> self grab-player?) (process-grab? *target*)))
|
||||
)
|
||||
(go-virtual plat-button-pressed)
|
||||
)
|
||||
@@ -171,8 +167,8 @@
|
||||
|
||||
(defstate plat-button-move-downward (plat-button)
|
||||
:virtual #t
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(the-as object (when (or (= arg2 'touch) (= arg2 'attack))
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(the-as object (when (or (= event-type 'touch) (= event-type 'attack))
|
||||
(set! (-> self state-time) (-> *display* base-frame-counter))
|
||||
#f
|
||||
)
|
||||
@@ -199,7 +195,7 @@
|
||||
(when (or (not *target*)
|
||||
(and (>= (- (-> *display* base-frame-counter) (-> self state-time)) (seconds 4))
|
||||
(not (and (logtest? (-> *target* control unknown-surface00 flags) (surface-flags jump))
|
||||
(zero? (logand (-> *target* control status) (cshape-moving-flags onsurf)))
|
||||
(not (logtest? (-> *target* control status) (cshape-moving-flags onsurf)))
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -245,8 +241,8 @@
|
||||
|
||||
(defstate plat-button-move-upward (plat-button)
|
||||
:virtual #t
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(the-as object (when (or (= arg2 'touch) (= arg2 'attack))
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(the-as object (when (or (= event-type 'touch) (= event-type 'attack))
|
||||
(set! (-> self state-time) (-> *display* base-frame-counter))
|
||||
#f
|
||||
)
|
||||
@@ -273,7 +269,7 @@
|
||||
(when (or (not *target*)
|
||||
(and (>= (- (-> *display* base-frame-counter) (-> self state-time)) (seconds 4))
|
||||
(not (and (logtest? (-> *target* control unknown-surface00 flags) (surface-flags jump))
|
||||
(zero? (logand (-> *target* control status) (cshape-moving-flags onsurf)))
|
||||
(not (logtest? (-> *target* control status) (cshape-moving-flags onsurf)))
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -337,7 +333,7 @@
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod TODO-RENAME-28 plat-button ((obj plat-button))
|
||||
(defmethod plat-button-method-28 plat-button ((obj plat-button))
|
||||
(let ((s5-0 (new 'process 'collide-shape-moving obj (collide-list-enum hit-by-player))))
|
||||
(set! (-> s5-0 dynam) (copy *standard-dynamics* 'process))
|
||||
(set! (-> s5-0 reaction) default-collision-reaction)
|
||||
@@ -383,7 +379,7 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod TODO-RENAME-27 plat-button ((obj plat-button))
|
||||
(defmethod plat-button-method-27 plat-button ((obj plat-button))
|
||||
(ja-channel-set! 1)
|
||||
(cond
|
||||
((can-activate? obj)
|
||||
@@ -414,13 +410,13 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod TODO-RENAME-31 plat-button ((obj plat-button))
|
||||
(defmethod plat-button-method-31 plat-button ((obj plat-button))
|
||||
(initialize-skeleton obj *plat-button-sg* '())
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod TODO-RENAME-32 plat-button ((obj plat-button))
|
||||
(defmethod plat-button-method-32 plat-button ((obj plat-button))
|
||||
(go (method-of-object obj plat-button-idle))
|
||||
0
|
||||
(none)
|
||||
@@ -444,10 +440,10 @@
|
||||
)
|
||||
)
|
||||
(set! (-> obj bidirectional?) (nonzero? (res-lump-value arg0 'bidirectional uint128)))
|
||||
(TODO-RENAME-28 obj)
|
||||
(plat-button-method-28 obj)
|
||||
(process-drawable-from-entity! obj arg0)
|
||||
(logclear! (-> obj mask) (process-mask actor-pause))
|
||||
(TODO-RENAME-31 obj)
|
||||
(plat-button-method-31 obj)
|
||||
(logior! (-> obj skel status) (janim-status inited))
|
||||
(set! (-> obj spawn-pos quad) (-> obj root-override trans quad))
|
||||
(set! (-> obj path) (new 'process 'curve-control obj 'path -1000000000.0))
|
||||
@@ -460,11 +456,7 @@
|
||||
(set! (-> obj sound-id) (new-sound-id))
|
||||
(set! (-> obj allow-auto-kill) #t)
|
||||
(can-target-move? obj)
|
||||
(TODO-RENAME-27 obj)
|
||||
(TODO-RENAME-32 obj)
|
||||
(plat-button-method-27 obj)
|
||||
(plat-button-method-32 obj)
|
||||
(none)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -40,13 +40,13 @@
|
||||
|
||||
(defstate plat-idle (plat-eco)
|
||||
:virtual #t
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('wake)
|
||||
(go-virtual plat-path-active (the-as plat #f))
|
||||
)
|
||||
(('eco-blue)
|
||||
(go-virtual notice-blue (process->handle arg0))
|
||||
(go-virtual notice-blue (process->handle proc))
|
||||
)
|
||||
(('ridden 'edge-grabbed)
|
||||
(when (send-event *target* 'query 'powerup (pickup-type eco-blue))
|
||||
@@ -72,13 +72,7 @@
|
||||
(if (and *target*
|
||||
(>= (-> self notice-dist) (vector-vector-distance (-> self root-override trans) (-> *target* control trans)))
|
||||
)
|
||||
(level-hint-spawn
|
||||
(game-text-id misty-eco-plat)
|
||||
"sksp0073"
|
||||
(the-as entity #f)
|
||||
*entity-pool*
|
||||
(game-task none)
|
||||
)
|
||||
(level-hint-spawn (game-text-id misty-eco-plat) "sksp0073" (the-as entity #f) *entity-pool* (game-task none))
|
||||
)
|
||||
(none)
|
||||
)
|
||||
@@ -93,8 +87,8 @@
|
||||
|
||||
(defstate notice-blue (plat-eco)
|
||||
:virtual override
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('wake)
|
||||
(sound-play "blue-eco-on" :position (the-as symbol (-> self root-override trans)))
|
||||
(go-virtual plat-path-active (the-as plat #f))
|
||||
@@ -230,7 +224,7 @@
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod dummy-24 plat-eco ((obj plat-eco))
|
||||
(defmethod baseplat-method-24 plat-eco ((obj plat-eco))
|
||||
(let ((s5-0 (new 'process 'collide-shape-moving obj (collide-list-enum hit-by-player))))
|
||||
(set! (-> s5-0 dynam) (copy *standard-dynamics* 'process))
|
||||
(set! (-> s5-0 reaction) default-collision-reaction)
|
||||
@@ -267,7 +261,7 @@
|
||||
(set! (-> obj mask) (logior (process-mask platform) (-> obj mask)))
|
||||
(set! (-> obj notice-dist) (res-lump-float arg0 'notice-dist :default -1.0))
|
||||
(set! (-> obj link) (new 'process 'actor-link-info obj))
|
||||
(dummy-24 obj)
|
||||
(baseplat-method-24 obj)
|
||||
(process-drawable-from-entity! obj arg0)
|
||||
(let ((s4-0 (get-unlit-skel obj))
|
||||
(s5-1 (get-lit-skel obj))
|
||||
@@ -292,8 +286,8 @@
|
||||
(set! (-> obj path-pos) (get-current-phase-with-mirror (-> obj sync)))
|
||||
(eval-path-curve! (-> obj path) (-> obj root-override trans) (-> obj path-pos) 'interp)
|
||||
(set! (-> obj sound-id) (new-sound-id))
|
||||
(dummy-26 obj)
|
||||
(dummy-21 obj)
|
||||
(baseplat-method-26 obj)
|
||||
(baseplat-method-21 obj)
|
||||
(if (or (and (-> obj entity) (logtest? (-> obj entity extra perm status) (entity-perm-status complete)))
|
||||
(< (-> obj notice-dist) 0.0)
|
||||
)
|
||||
@@ -302,7 +296,3 @@
|
||||
)
|
||||
(none)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -69,7 +69,7 @@
|
||||
:flag-assert #x2100a00108
|
||||
(:methods
|
||||
(get-lit-skel (_type_) skeleton-group 27)
|
||||
(dummy-28 () none 28)
|
||||
(plat-method-28 () none 28)
|
||||
(wad () _type_ :state 29)
|
||||
(plat-startup (plat) _type_ :state 30)
|
||||
(plat-idle () _type_ :state 31)
|
||||
@@ -130,7 +130,7 @@
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod dummy-24 plat ((obj plat))
|
||||
(defmethod baseplat-method-24 plat ((obj plat))
|
||||
(let ((s5-0 (new 'process 'collide-shape-moving obj (collide-list-enum hit-by-player))))
|
||||
(set! (-> s5-0 dynam) (copy *standard-dynamics* 'process))
|
||||
(set! (-> s5-0 reaction) default-collision-reaction)
|
||||
@@ -155,12 +155,12 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod dummy-26 plat ((obj plat))
|
||||
(defmethod baseplat-method-26 plat ((obj plat))
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod TODO-RENAME-25 plat ((obj plat))
|
||||
(defmethod baseplat-method-25 plat ((obj plat))
|
||||
(the-as sparticle-launch-group (when (!= (-> (if (-> obj entity)
|
||||
(-> obj entity extra level)
|
||||
(-> *level* level-default)
|
||||
@@ -199,7 +199,7 @@
|
||||
:virtual #t
|
||||
:event (the-as (function process int symbol event-message-block object :behavior plat) plat-event)
|
||||
:trans (behavior ()
|
||||
(dummy-20 self)
|
||||
(baseplat-method-20 self)
|
||||
(none)
|
||||
)
|
||||
:code (behavior ()
|
||||
@@ -250,13 +250,13 @@
|
||||
|
||||
(defmethod init-from-entity! plat ((obj plat) (arg0 entity-actor))
|
||||
(set! (-> obj mask) (logior (process-mask platform) (-> obj mask)))
|
||||
(dummy-24 obj)
|
||||
(baseplat-method-24 obj)
|
||||
(process-drawable-from-entity! obj arg0)
|
||||
(initialize-skeleton obj (get-unlit-skel obj) '())
|
||||
(logior! (-> obj skel status) (janim-status inited))
|
||||
(update-transforms! (-> obj root-override))
|
||||
(dummy-21 obj)
|
||||
(TODO-RENAME-25 obj)
|
||||
(baseplat-method-21 obj)
|
||||
(baseplat-method-25 obj)
|
||||
(load-params! (-> obj sync) obj (the-as uint 0) 0.0 0.15 0.15)
|
||||
(set! (-> obj fact)
|
||||
(new 'process 'fact-info obj (pickup-type eco-pill-random) (-> *FACT-bank* default-pill-inc))
|
||||
@@ -268,7 +268,7 @@
|
||||
((logtest? (-> obj path flags) (path-control-flag not-found))
|
||||
(set! (-> obj path-pos) 0.0)
|
||||
(let ((a0-14 obj))
|
||||
(dummy-26 a0-14)
|
||||
(baseplat-method-26 a0-14)
|
||||
(go (method-of-object obj plat-startup) a0-14)
|
||||
)
|
||||
)
|
||||
@@ -280,7 +280,7 @@
|
||||
)
|
||||
(eval-path-curve! (-> obj path) (-> obj root-override trans) (-> obj path-pos) 'interp)
|
||||
(let ((a0-18 obj))
|
||||
(dummy-26 a0-18)
|
||||
(baseplat-method-26 a0-18)
|
||||
(go (method-of-object obj plat-startup) a0-18)
|
||||
)
|
||||
)
|
||||
@@ -288,14 +288,10 @@
|
||||
(set! (-> obj path-pos) 0.0)
|
||||
(eval-path-curve! (-> obj path) (-> obj root-override trans) (-> obj path-pos) 'interp)
|
||||
(let ((a0-20 obj))
|
||||
(dummy-26 a0-20)
|
||||
(baseplat-method-26 a0-20)
|
||||
(go (method-of-object obj plat-startup) a0-20)
|
||||
)
|
||||
)
|
||||
)
|
||||
(none)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -924,8 +924,8 @@
|
||||
0
|
||||
)
|
||||
|
||||
;; WARN: Unsupported inline assembly instruction kind - [lw ra, return-from-thread(s7)]
|
||||
;; WARN: Unsupported inline assembly instruction kind - [jr ra]
|
||||
;; ERROR: Unsupported inline assembly instruction kind - [lw ra, return-from-thread(s7)]
|
||||
;; ERROR: Unsupported inline assembly instruction kind - [jr ra]
|
||||
(defmethod evaluate-joint-control process-drawable ((obj process-drawable))
|
||||
(local-vars (s7-0 none) (ra-0 int))
|
||||
(let ((gp-0 (-> obj skel)))
|
||||
@@ -983,7 +983,7 @@
|
||||
(label cfg-27)
|
||||
(let ((a0-17 (-> gp-0 effect)))
|
||||
(if a0-17
|
||||
(TODO-RENAME-9 a0-17)
|
||||
(effect-control-method-9 a0-17)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -991,6 +991,7 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
;; WARN: Function ja-post has a return type of none, but the expression builder found a return statement.
|
||||
(defbehavior ja-post process-drawable ()
|
||||
(when (nonzero? (-> self draw))
|
||||
(let ((gp-1 (logtest? (-> self draw status) (draw-status no-skeleton-update))))
|
||||
@@ -1092,7 +1093,7 @@
|
||||
(defbehavior process-drawable-delay-player process-drawable ((arg0 time-frame))
|
||||
(while (and *target*
|
||||
(logtest? (-> *target* control unknown-surface00 flags) (surface-flags jump))
|
||||
(zero? (logand (-> *target* control status) (cshape-moving-flags onsurf)))
|
||||
(not (logtest? (-> *target* control status) (cshape-moving-flags onsurf)))
|
||||
)
|
||||
(suspend)
|
||||
)
|
||||
@@ -1244,7 +1245,3 @@
|
||||
s5-0
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(defmethod dummy-52 process-taskable ((obj process-taskable))
|
||||
(defmethod process-taskable-method-52 process-taskable ((obj process-taskable))
|
||||
(let ((v1-1 (-> obj draw shadow-ctrl)))
|
||||
(when v1-1
|
||||
(let ((a0-1 v1-1))
|
||||
@@ -150,7 +150,7 @@
|
||||
(the-as process-taskable ((method-of-type process-drawable relocate) obj arg0))
|
||||
)
|
||||
|
||||
(defmethod dummy-46 process-taskable ((obj process-taskable))
|
||||
(defmethod process-taskable-method-46 process-taskable ((obj process-taskable))
|
||||
(when (nonzero? (-> obj sound-flava))
|
||||
(let ((s5-1 (vector-!
|
||||
(new 'stack-no-clear 'vector)
|
||||
@@ -213,7 +213,7 @@
|
||||
(the-as basic #f)
|
||||
)
|
||||
|
||||
(defmethod dummy-33 process-taskable ((obj process-taskable))
|
||||
(defmethod process-taskable-method-33 process-taskable ((obj process-taskable))
|
||||
(let ((s5-0 (play-anim! obj #f)))
|
||||
(if (type-type? (-> s5-0 type) spool-anim)
|
||||
(spool-push *art-control* (-> (the-as spool-anim s5-0) name) 0 obj -99.0)
|
||||
@@ -264,7 +264,7 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod dummy-38 process-taskable ((obj process-taskable))
|
||||
(defmethod process-taskable-method-38 process-taskable ((obj process-taskable))
|
||||
(if (nonzero? (-> obj cell-for-task))
|
||||
(go (method-of-object obj give-cell))
|
||||
)
|
||||
@@ -281,7 +281,7 @@
|
||||
(suspend)
|
||||
(ja :num! (loop!))
|
||||
(if (= (-> self next-state name) 'idle)
|
||||
(TODO-RENAME-43 self)
|
||||
(process-taskable-method-43 self)
|
||||
)
|
||||
)
|
||||
(the-as none 0)
|
||||
@@ -298,7 +298,7 @@
|
||||
(go-virtual hidden)
|
||||
)
|
||||
)
|
||||
(dummy-33 self)
|
||||
(process-taskable-method-33 self)
|
||||
((-> self cur-trans-hook))
|
||||
(none)
|
||||
)
|
||||
@@ -331,7 +331,7 @@
|
||||
)
|
||||
)
|
||||
(go-virtual release)
|
||||
(dummy-33 self)
|
||||
(process-taskable-method-33 self)
|
||||
((-> self cur-trans-hook))
|
||||
(none)
|
||||
)
|
||||
@@ -387,7 +387,7 @@
|
||||
)
|
||||
)
|
||||
(set! (-> self last-talk) (-> *display* game-frame-counter))
|
||||
(dummy-52 self)
|
||||
(process-taskable-method-52 self)
|
||||
(none)
|
||||
)
|
||||
|
||||
@@ -583,11 +583,11 @@
|
||||
|
||||
(defstate play-anim (process-taskable)
|
||||
:virtual #t
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('shadow)
|
||||
(cond
|
||||
((-> arg3 param 0)
|
||||
((-> event param 0)
|
||||
(let ((v0-0 (the-as object (-> self shadow-backup))))
|
||||
(set! (-> self draw shadow) (the-as shadow-geo v0-0))
|
||||
v0-0
|
||||
@@ -602,10 +602,10 @@
|
||||
(('shadow-min-max)
|
||||
(let ((v1-5 (-> self draw shadow-ctrl)))
|
||||
(let ((a0-4 v1-5))
|
||||
(set! (-> a0-4 settings bot-plane w) (- (the-as float (-> arg3 param 0))))
|
||||
(set! (-> a0-4 settings bot-plane w) (- (the-as float (-> event param 0))))
|
||||
)
|
||||
0
|
||||
(set! (-> v1-5 settings top-plane w) (- (the-as float (-> arg3 param 1))))
|
||||
(set! (-> v1-5 settings top-plane w) (- (the-as float (-> event param 1))))
|
||||
)
|
||||
0
|
||||
)
|
||||
@@ -625,7 +625,7 @@
|
||||
)
|
||||
:code (behavior ()
|
||||
(process-taskable-play-anim-code (the-as art-joint-anim (get-art-elem self)) (play-anim! self #t))
|
||||
(dummy-38 self)
|
||||
(process-taskable-method-38 self)
|
||||
(none)
|
||||
)
|
||||
:post (the-as (function none :behavior process-taskable) ja-post)
|
||||
@@ -715,7 +715,7 @@
|
||||
)
|
||||
|
||||
;; WARN: disable def twice: 4. This may happen when a cond (no else) is nested inside of another conditional, but it should be rare.
|
||||
(defmethod TODO-RENAME-50 process-taskable ((obj process-taskable))
|
||||
(defmethod process-taskable-method-50 process-taskable ((obj process-taskable))
|
||||
(if *target*
|
||||
(or (not *target*)
|
||||
(< 245760.0 (vector-vector-distance (-> obj root-override trans) (-> *target* control trans)))
|
||||
@@ -745,7 +745,7 @@
|
||||
((-> self been-kicked)
|
||||
(go-virtual idle)
|
||||
)
|
||||
((TODO-RENAME-50 self)
|
||||
((process-taskable-method-50 self)
|
||||
(if (should-display? self)
|
||||
(go-virtual idle)
|
||||
(go-virtual hidden)
|
||||
@@ -759,44 +759,42 @@
|
||||
|
||||
(defstate be-clone (process-taskable)
|
||||
:virtual #t
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(let ((v1-0 arg2))
|
||||
(the-as shadow-geo (cond
|
||||
((= v1-0 'shadow)
|
||||
(the-as shadow-geo (cond
|
||||
((-> arg3 param 0)
|
||||
(let ((v0-0 (-> self shadow-backup)))
|
||||
(set! (-> self draw shadow) v0-0)
|
||||
v0-0
|
||||
)
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(the-as shadow-geo (case event-type
|
||||
(('shadow)
|
||||
(the-as shadow-geo (cond
|
||||
((-> event param 0)
|
||||
(let ((v0-0 (-> self shadow-backup)))
|
||||
(set! (-> self draw shadow) v0-0)
|
||||
v0-0
|
||||
)
|
||||
(else
|
||||
(set! (-> self draw shadow) #f)
|
||||
(the-as shadow-geo #f)
|
||||
)
|
||||
)
|
||||
(else
|
||||
(set! (-> self draw shadow) #f)
|
||||
(the-as shadow-geo #f)
|
||||
)
|
||||
)
|
||||
)
|
||||
((= v1-0 'shadow-min-max)
|
||||
(let ((v1-5 (-> self draw shadow-ctrl)))
|
||||
(let ((a0-5 v1-5))
|
||||
(set! (-> a0-5 settings bot-plane w) (- (the-as float (-> arg3 param 0))))
|
||||
)
|
||||
0
|
||||
(set! (-> v1-5 settings top-plane w) (- (the-as float (-> arg3 param 1))))
|
||||
)
|
||||
)
|
||||
)
|
||||
(('shadow-min-max)
|
||||
(let ((v1-5 (-> self draw shadow-ctrl)))
|
||||
(let ((a0-5 v1-5))
|
||||
(set! (-> a0-5 settings bot-plane w) (- (the-as float (-> event param 0))))
|
||||
)
|
||||
(the-as shadow-geo 0)
|
||||
0
|
||||
(set! (-> v1-5 settings top-plane w) (- (the-as float (-> event param 1))))
|
||||
)
|
||||
((= v1-0 'end-mode)
|
||||
(the-as shadow-geo (if (should-display? self)
|
||||
(the-as shadow-geo (go-virtual idle))
|
||||
(the-as shadow-geo (go-virtual hidden))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(the-as shadow-geo 0)
|
||||
)
|
||||
(('end-mode)
|
||||
(the-as shadow-geo (if (should-display? self)
|
||||
(the-as shadow-geo (go-virtual idle))
|
||||
(the-as shadow-geo (go-virtual hidden))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
:enter (behavior ((arg0 handle))
|
||||
(logior! (-> self skel status) (janim-status blerc))
|
||||
@@ -834,47 +832,45 @@
|
||||
|
||||
(defstate idle (process-taskable)
|
||||
:virtual #t
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(let ((v1-0 arg2))
|
||||
(the-as
|
||||
object
|
||||
(cond
|
||||
((= v1-0 'attack)
|
||||
(the-as
|
||||
symbol
|
||||
(if (-> self bounce-away)
|
||||
(the-as
|
||||
symbol
|
||||
(send-event arg0 'shove #f (static-attack-info ((shove-back (meters 3)) (shove-up (meters 1)))))
|
||||
)
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(the-as
|
||||
object
|
||||
(case event-type
|
||||
(('attack)
|
||||
(the-as
|
||||
symbol
|
||||
(if (-> self bounce-away)
|
||||
(the-as
|
||||
symbol
|
||||
(send-event proc 'shove #f (static-attack-info ((shove-back (meters 3)) (shove-up (meters 1)))))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
((= v1-0 'touch)
|
||||
(the-as symbol (send-shove-back
|
||||
(-> self root-override)
|
||||
arg0
|
||||
(the-as touching-shapes-entry (-> arg3 param 0))
|
||||
0.7
|
||||
6144.0
|
||||
16384.0
|
||||
)
|
||||
)
|
||||
)
|
||||
(('touch)
|
||||
(the-as symbol (send-shove-back
|
||||
(-> self root-override)
|
||||
proc
|
||||
(the-as touching-shapes-entry (-> event param 0))
|
||||
0.7
|
||||
6144.0
|
||||
16384.0
|
||||
)
|
||||
)
|
||||
)
|
||||
(('clone)
|
||||
(the-as symbol (go-virtual be-clone (the-as handle (-> event param 0))))
|
||||
)
|
||||
(('play-anim)
|
||||
(logclear! (-> self mask) (process-mask actor-pause))
|
||||
(let ((v0-0 #t))
|
||||
(set! (-> self been-kicked) v0-0)
|
||||
v0-0
|
||||
)
|
||||
((= v1-0 'clone)
|
||||
(the-as symbol (go-virtual be-clone (the-as handle (-> arg3 param 0))))
|
||||
)
|
||||
((= v1-0 'play-anim)
|
||||
(logclear! (-> self mask) (process-mask actor-pause))
|
||||
(let ((v0-0 #t))
|
||||
(set! (-> self been-kicked) v0-0)
|
||||
v0-0
|
||||
)
|
||||
)
|
||||
((= v1-0 'hidden-other)
|
||||
(the-as symbol (go-virtual hidden-other))
|
||||
)
|
||||
)
|
||||
)
|
||||
(('hidden-other)
|
||||
(the-as symbol (go-virtual hidden-other))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -914,13 +910,13 @@
|
||||
)
|
||||
)
|
||||
((begin
|
||||
(dummy-46 self)
|
||||
(process-taskable-method-46 self)
|
||||
(and (not (and (logtest? (-> *target* control unknown-surface00 flags) (surface-flags jump))
|
||||
(zero? (logand (-> *target* control status) (cshape-moving-flags onsurf)))
|
||||
(not (logtest? (-> *target* control status) (cshape-moving-flags onsurf)))
|
||||
)
|
||||
)
|
||||
(< (-> (target-pos 0) y) (+ 8192.0 (-> self root-override root-prim prim-core world-sphere y)))
|
||||
(less-than-hack (vector-vector-distance (target-pos 0) (the-as vector (-> self root-override root-prim prim-core)))
|
||||
(< (vector-vector-distance (target-pos 0) (the-as vector (-> self root-override root-prim prim-core)))
|
||||
32768.0
|
||||
)
|
||||
(= (-> *level* loading-level) (-> *level* level-default))
|
||||
@@ -973,7 +969,7 @@
|
||||
)
|
||||
)
|
||||
(if (= (-> *level* loading-level) (-> *level* level-default))
|
||||
(dummy-33 self)
|
||||
(process-taskable-method-33 self)
|
||||
)
|
||||
(draw-npc-shadow self)
|
||||
(when (and (-> self been-kicked) (and (not *progress-process*)
|
||||
@@ -1024,7 +1020,7 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod dummy-40 process-taskable ((obj process-taskable) (arg0 object) (arg1 skeleton-group) (arg2 int) (arg3 int) (arg4 vector) (arg5 int))
|
||||
(defmethod process-taskable-method-40 process-taskable ((obj process-taskable) (arg0 object) (arg1 skeleton-group) (arg2 int) (arg3 int) (arg4 vector) (arg5 int))
|
||||
(stack-size-set! (-> obj main-thread) 512)
|
||||
(initialize-collision obj arg2 arg4)
|
||||
(process-drawable-from-entity! obj (the-as entity-actor arg0))
|
||||
@@ -1053,15 +1049,15 @@
|
||||
(set! (-> obj been-kicked) #f)
|
||||
(set! (-> obj neck-joint-index) arg5)
|
||||
(set! (-> obj cur-trans-hook) nothing)
|
||||
(dummy-9 (-> obj ambient))
|
||||
(ambient-control-method-9 (-> obj ambient))
|
||||
(set! (-> obj event-hook) (-> (method-of-object obj idle) event))
|
||||
(set! (-> obj draw shadow-ctrl) (new 'process 'shadow-control 0.0 0.0 614400.0 (the-as float 60) 245760.0))
|
||||
(dummy-52 obj)
|
||||
(process-taskable-method-52 obj)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod dummy-42 process-taskable ((obj process-taskable))
|
||||
(defmethod process-taskable-method-42 process-taskable ((obj process-taskable))
|
||||
(cond
|
||||
((not (should-display? obj))
|
||||
(go (method-of-object obj hidden))
|
||||
@@ -1076,17 +1072,17 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod TODO-RENAME-43 process-taskable ((obj process-taskable))
|
||||
(defmethod process-taskable-method-43 process-taskable ((obj process-taskable))
|
||||
(the-as symbol 0)
|
||||
)
|
||||
|
||||
(defmethod dummy-9 ambient-control ((obj ambient-control))
|
||||
(defmethod ambient-control-method-9 ambient-control ((obj ambient-control))
|
||||
(set! (-> obj last-ambient-time) (-> *display* game-frame-counter))
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod TODO-RENAME-10 ambient-control ((obj ambient-control) (arg0 vector) (arg1 time-frame) (arg2 float) (arg3 process-drawable))
|
||||
(defmethod ambient-control-method-10 ambient-control ((obj ambient-control) (arg0 vector) (arg1 time-frame) (arg2 float) (arg3 process-drawable))
|
||||
(when (< (- (-> *display* game-frame-counter) (-> obj last-ambient-time)) arg1)
|
||||
(set! arg0 (the-as vector #f))
|
||||
(goto cfg-6)
|
||||
@@ -1127,9 +1123,9 @@
|
||||
)
|
||||
|
||||
(defstate othercam-running (othercam)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(local-vars (v0-0 object))
|
||||
(case arg2
|
||||
(case event-type
|
||||
(('die)
|
||||
(set! v0-0 #t)
|
||||
(set! (-> self die?) (the-as symbol v0-0))
|
||||
@@ -1137,13 +1133,13 @@
|
||||
)
|
||||
(('joint)
|
||||
(let ((t9-0 type-type?)
|
||||
(v1-1 (-> arg3 param 0))
|
||||
(v1-1 (-> event param 0))
|
||||
)
|
||||
(cond
|
||||
((t9-0 (rtype-of v1-1) string)
|
||||
(let ((v1-8 (lookup-art
|
||||
(-> (the-as process-taskable (-> self hand process 0)) draw jgeo)
|
||||
(the-as string (-> arg3 param 0))
|
||||
(the-as string (-> event param 0))
|
||||
(the-as type #f)
|
||||
)
|
||||
)
|
||||
@@ -1155,8 +1151,8 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
((zero? (logand (-> arg3 param 0) 7))
|
||||
(set! v0-0 (-> arg3 param 0))
|
||||
((not (logtest? (-> event param 0) 7))
|
||||
(set! v0-0 (-> event param 0))
|
||||
(set! (-> self cam-joint-index) (the-as int v0-0))
|
||||
v0-0
|
||||
)
|
||||
@@ -1164,7 +1160,7 @@
|
||||
)
|
||||
)
|
||||
(('mask)
|
||||
(set! v0-0 (-> arg3 param 0))
|
||||
(set! v0-0 (-> event param 0))
|
||||
(set! (-> self mask-to-clear) (the-as process-mask v0-0))
|
||||
v0-0
|
||||
)
|
||||
@@ -1309,7 +1305,3 @@
|
||||
)
|
||||
(none)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -32,20 +32,20 @@
|
||||
:size-assert #x1a8
|
||||
:flag-assert #x17000001a8
|
||||
(:methods
|
||||
(TODO-RENAME-9 (_type_ float float float float) none 9)
|
||||
(dummy-10 (_type_ float) none 10)
|
||||
(rigid-body-method-9 (_type_ float float float float) none 9)
|
||||
(rigid-body-method-10 (_type_ float) none 10)
|
||||
(clear-force-torque! (_type_) none 11)
|
||||
(clear-momentum! (_type_) none 12)
|
||||
(TODO-RENAME-13 (_type_ vector vector) none 13)
|
||||
(TODO-RENAME-14 (_type_ vector vector) none 14)
|
||||
(TODO-RENAME-15 (_type_ vector) none 15)
|
||||
(TODO-RENAME-16 (_type_ vector vector float) none 16)
|
||||
(TODO-RENAME-17 (_type_ vector vector) vector 17)
|
||||
(TODO-RENAME-18 (_type_ vector) vector 18)
|
||||
(dummy-19 (_type_) none 19)
|
||||
(dummy-20 (_type_) none 20)
|
||||
(TODO-RENAME-21 (_type_) none 21)
|
||||
(TODO-RENAME-22 (_type_ vector quaternion float float) none 22)
|
||||
(rigid-body-method-13 (_type_ vector vector) none 13)
|
||||
(rigid-body-method-14 (_type_ vector vector) none 14)
|
||||
(rigid-body-method-15 (_type_ vector) none 15)
|
||||
(rigid-body-method-16 (_type_ vector vector float) none 16)
|
||||
(rigid-body-method-17 (_type_ vector vector) vector 17)
|
||||
(rigid-body-method-18 (_type_ vector) vector 18)
|
||||
(print-stats (_type_) none 19)
|
||||
(rigid-body-method-20 (_type_) none 20)
|
||||
(rigid-body-method-21 (_type_) none 21)
|
||||
(rigid-body-method-22 (_type_ vector quaternion float float) none 22)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -59,10 +59,3 @@
|
||||
:size-assert #x30
|
||||
:flag-assert #x900000030
|
||||
)
|
||||
|
||||
|
||||
0
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -22,14 +22,14 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod TODO-RENAME-21 rigid-body ((obj rigid-body))
|
||||
(defmethod rigid-body-method-21 rigid-body ((obj rigid-body))
|
||||
(quaternion->matrix (-> obj matrix) (-> obj rotation))
|
||||
(TODO-RENAME-18 obj (-> obj matrix vector 3))
|
||||
(rigid-body-method-18 obj (-> obj matrix vector 3))
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod TODO-RENAME-22 rigid-body ((obj rigid-body) (arg0 vector) (arg1 quaternion) (arg2 float) (arg3 float))
|
||||
(defmethod rigid-body-method-22 rigid-body ((obj rigid-body) (arg0 vector) (arg1 quaternion) (arg2 float) (arg3 float))
|
||||
(clear-force-torque! obj)
|
||||
(clear-momentum! obj)
|
||||
(vector+! (-> obj position) arg0 (-> obj cm-offset-joint))
|
||||
@@ -37,7 +37,7 @@
|
||||
(quaternion-normalize! (-> obj rotation))
|
||||
(set! (-> obj lin-momentum-damping-factor) arg2)
|
||||
(set! (-> obj ang-momentum-damping-factor) arg3)
|
||||
(TODO-RENAME-21 obj)
|
||||
(rigid-body-method-21 obj)
|
||||
(set! (-> obj lin-velocity quad) (-> *null-vector* quad))
|
||||
(set! (-> obj ang-velocity quad) (-> *null-vector* quad))
|
||||
(set! (-> obj inv-i-world vector 0 quad) (the-as uint128 0))
|
||||
@@ -50,7 +50,7 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod TODO-RENAME-9 rigid-body ((obj rigid-body) (arg0 float) (arg1 float) (arg2 float) (arg3 float))
|
||||
(defmethod rigid-body-method-9 rigid-body ((obj rigid-body) (arg0 float) (arg1 float) (arg2 float) (arg3 float))
|
||||
(set! (-> obj mass) arg0)
|
||||
(let ((f0-1 arg0))
|
||||
(set! (-> obj inv-mass) (/ 1.0 f0-1))
|
||||
@@ -93,7 +93,7 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod TODO-RENAME-17 rigid-body ((obj rigid-body) (arg0 vector) (arg1 vector))
|
||||
(defmethod rigid-body-method-17 rigid-body ((obj rigid-body) (arg0 vector) (arg1 vector))
|
||||
(let ((v1-1 (vector-! (new 'stack-no-clear 'vector) arg0 (-> obj position))))
|
||||
(vector-cross! arg1 (-> obj ang-velocity) v1-1)
|
||||
)
|
||||
@@ -120,7 +120,7 @@
|
||||
arg0
|
||||
)
|
||||
|
||||
(defmethod dummy-10 rigid-body ((obj rigid-body) (arg0 float))
|
||||
(defmethod rigid-body-method-10 rigid-body ((obj rigid-body) (arg0 float))
|
||||
(vector+*! (-> obj lin-momentum) (-> obj lin-momentum) (-> obj force) arg0)
|
||||
(vector+*! (-> obj ang-momentum) (-> obj ang-momentum) (-> obj torque) arg0)
|
||||
(vector-float*! (-> obj lin-momentum) (-> obj lin-momentum) (-> obj lin-momentum-damping-factor))
|
||||
@@ -142,12 +142,12 @@
|
||||
)
|
||||
(quaternion-normalize! (-> obj rotation))
|
||||
(quaternion->matrix (-> obj matrix) (-> obj rotation))
|
||||
(TODO-RENAME-18 obj (-> obj matrix vector 3))
|
||||
(rigid-body-method-18 obj (-> obj matrix vector 3))
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod TODO-RENAME-13 rigid-body ((obj rigid-body) (arg0 vector) (arg1 vector))
|
||||
(defmethod rigid-body-method-13 rigid-body ((obj rigid-body) (arg0 vector) (arg1 vector))
|
||||
(vector+! (-> obj force) (-> obj force) arg1)
|
||||
(let* ((v1-2 (vector-! (new 'stack-no-clear 'vector) arg0 (-> obj position)))
|
||||
(a1-2 (vector-cross! (new 'stack-no-clear 'vector) v1-2 arg1))
|
||||
@@ -158,7 +158,7 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod TODO-RENAME-16 rigid-body ((obj rigid-body) (arg0 vector) (arg1 vector) (arg2 float))
|
||||
(defmethod rigid-body-method-16 rigid-body ((obj rigid-body) (arg0 vector) (arg1 vector) (arg2 float))
|
||||
(vector+! (-> obj force) (-> obj force) arg1)
|
||||
(let* ((a0-3 (vector-! (new 'stack-no-clear 'vector) arg0 (-> obj position)))
|
||||
(s4-1 (vector-cross! (new 'stack-no-clear 'vector) a0-3 arg1))
|
||||
@@ -174,26 +174,26 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod TODO-RENAME-14 rigid-body ((obj rigid-body) (arg0 vector) (arg1 vector))
|
||||
(defmethod rigid-body-method-14 rigid-body ((obj rigid-body) (arg0 vector) (arg1 vector))
|
||||
(let ((s5-0 (new 'stack-no-clear 'vector))
|
||||
(s4-0 (new 'stack-no-clear 'vector))
|
||||
)
|
||||
(vector-rotate*! s4-0 arg1 (-> obj matrix))
|
||||
(vector-rotate*! s5-0 arg0 (-> obj matrix))
|
||||
(vector+! s5-0 s5-0 (-> obj position))
|
||||
(TODO-RENAME-13 obj s5-0 s4-0)
|
||||
(rigid-body-method-13 obj s5-0 s4-0)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod TODO-RENAME-15 rigid-body ((obj rigid-body) (arg0 vector))
|
||||
(defmethod rigid-body-method-15 rigid-body ((obj rigid-body) (arg0 vector))
|
||||
(vector+! (-> obj force) (-> obj force) arg0)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod TODO-RENAME-18 rigid-body ((obj rigid-body) (arg0 vector))
|
||||
(defmethod rigid-body-method-18 rigid-body ((obj rigid-body) (arg0 vector))
|
||||
(let ((gp-0 (new 'stack-no-clear 'vector)))
|
||||
(vector-rotate*! gp-0 (-> obj cm-offset-joint) (-> obj matrix))
|
||||
(vector-! arg0 (-> obj position) gp-0)
|
||||
@@ -201,7 +201,7 @@
|
||||
arg0
|
||||
)
|
||||
|
||||
(defmethod dummy-19 rigid-body ((obj rigid-body))
|
||||
(defmethod print-stats rigid-body ((obj rigid-body))
|
||||
(format #t " force ~M ~M ~M" (-> obj force x) (-> obj force y) (-> obj force z))
|
||||
(format #t " torque ~f ~f ~f~%" (-> obj torque x) (-> obj torque y) (-> obj torque z))
|
||||
(format #t " position ~M ~M ~M" (-> obj position x) (-> obj position y) (-> obj position z))
|
||||
@@ -221,7 +221,7 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod dummy-20 rigid-body ((obj rigid-body))
|
||||
(defmethod rigid-body-method-20 rigid-body ((obj rigid-body))
|
||||
(format #t " force ~M ~M ~M" (-> obj force x) (-> obj force y) (-> obj force z))
|
||||
(format #t " torque ~f ~f ~f~%" (-> obj torque x) (-> obj torque y) (-> obj torque z))
|
||||
0
|
||||
@@ -296,19 +296,19 @@
|
||||
(:methods
|
||||
(rigid-body-platform-idle () _type_ :state 20)
|
||||
(rigid-body-platform-float () _type_ :state 21)
|
||||
(TODO-RENAME-22 (_type_ vector float) float 22)
|
||||
(TODO-RENAME-23 (_type_ float) none 23)
|
||||
(TODO-RENAME-24 (_type_ rigid-body-control-point float) none 24)
|
||||
(TODO-RENAME-25 (_type_) none 25)
|
||||
(TODO-RENAME-26 (_type_) none 26)
|
||||
(TODO-RENAME-27 (_type_ vector) none 27)
|
||||
(TODO-RENAME-28 (_type_) none 28)
|
||||
(TODO-RENAME-29 (_type_ rigid-body-platform-constants) none 29)
|
||||
(TODO-RENAME-30 (_type_) none 30)
|
||||
(TODO-RENAME-31 (_type_) none 31)
|
||||
(dummy-32 (_type_) sound-id 32)
|
||||
(dummy-33 (_type_) object 33)
|
||||
(TODO-RENAME-34 (_type_) none 34)
|
||||
(rigid-body-platform-method-22 (_type_ vector float) float 22)
|
||||
(rigid-body-platform-method-23 (_type_ float) none 23)
|
||||
(rigid-body-platform-method-24 (_type_ rigid-body-control-point float) none 24)
|
||||
(rigid-body-platform-method-25 (_type_) none 25)
|
||||
(rigid-body-platform-method-26 (_type_) none 26)
|
||||
(rigid-body-platform-method-27 (_type_ vector) none 27)
|
||||
(rigid-body-platform-method-28 (_type_) none 28)
|
||||
(rigid-body-platform-method-29 (_type_ rigid-body-platform-constants) none 29)
|
||||
(rigid-body-platform-method-30 (_type_) none 30)
|
||||
(rigid-body-platform-method-31 (_type_) none 31)
|
||||
(rigid-body-platform-method-32 (_type_) sound-id 32)
|
||||
(rigid-body-platform-method-33 (_type_) object 33)
|
||||
(rigid-body-platform-method-34 (_type_) none 34)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -328,7 +328,7 @@
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod TODO-RENAME-22 rigid-body-platform ((obj rigid-body-platform) (arg0 vector) (arg1 float))
|
||||
(defmethod rigid-body-platform-method-22 rigid-body-platform ((obj rigid-body-platform) (arg0 vector) (arg1 float))
|
||||
(let ((v1-0 (-> obj water-anim)))
|
||||
0.0
|
||||
(+ (the-as float (cond
|
||||
@@ -355,8 +355,8 @@
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod TODO-RENAME-24 rigid-body-platform ((obj rigid-body-platform) (arg0 rigid-body-control-point) (arg1 float))
|
||||
(set! (-> arg0 world-pos w) (TODO-RENAME-22 obj (-> arg0 world-pos) arg1))
|
||||
(defmethod rigid-body-platform-method-24 rigid-body-platform ((obj rigid-body-platform) (arg0 rigid-body-control-point) (arg1 float))
|
||||
(set! (-> arg0 world-pos w) (rigid-body-platform-method-22 obj (-> arg0 world-pos) arg1))
|
||||
(let* ((s4-0 (new 'stack-no-clear 'vector))
|
||||
(f0-2 (- (-> arg0 world-pos w) (-> arg0 world-pos y)))
|
||||
(f30-0 (/ f0-2 (-> obj info max-buoyancy-depth)))
|
||||
@@ -369,9 +369,9 @@
|
||||
(-> obj info buoyancy-factor)
|
||||
)
|
||||
)
|
||||
(TODO-RENAME-13 (-> obj rbody) (-> arg0 world-pos) s4-0)
|
||||
(rigid-body-method-13 (-> obj rbody) (-> arg0 world-pos) s4-0)
|
||||
(vector-float*! s4-0 (-> arg0 velocity) (* -1.0 (-> obj info drag-factor) (fmin 1.0 f30-0)))
|
||||
(TODO-RENAME-13 (-> obj rbody) (-> arg0 world-pos) s4-0)
|
||||
(rigid-body-method-13 (-> obj rbody) (-> arg0 world-pos) s4-0)
|
||||
)
|
||||
)
|
||||
0
|
||||
@@ -379,10 +379,10 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod TODO-RENAME-25 rigid-body-platform ((obj rigid-body-platform))
|
||||
(defmethod rigid-body-platform-method-25 rigid-body-platform ((obj rigid-body-platform))
|
||||
(when (or (-> obj player-impulse) (-> obj player-contact))
|
||||
(set! (-> obj player-impulse) #f)
|
||||
(TODO-RENAME-16
|
||||
(rigid-body-method-16
|
||||
(-> obj rbody)
|
||||
(-> obj player-force-position)
|
||||
(-> obj player-force)
|
||||
@@ -393,20 +393,20 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod TODO-RENAME-26 rigid-body-platform ((obj rigid-body-platform))
|
||||
(defmethod rigid-body-platform-method-26 rigid-body-platform ((obj rigid-body-platform))
|
||||
(let ((a1-0 (new 'stack-no-clear 'vector)))
|
||||
(vector-float*!
|
||||
a1-0
|
||||
*y-vector*
|
||||
(* -1.0 (-> obj info gravity-factor) (-> obj info gravity) (-> obj rbody mass))
|
||||
)
|
||||
(TODO-RENAME-15 (-> obj rbody) a1-0)
|
||||
(rigid-body-method-15 (-> obj rbody) a1-0)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod TODO-RENAME-27 rigid-body-platform ((obj rigid-body-platform) (arg0 vector))
|
||||
(defmethod rigid-body-platform-method-27 rigid-body-platform ((obj rigid-body-platform) (arg0 vector))
|
||||
(let ((gp-0 (new 'stack-no-clear 'vector)))
|
||||
(vector-! gp-0 arg0 (-> obj rbody position))
|
||||
(set! (-> gp-0 y) 0.0)
|
||||
@@ -415,7 +415,7 @@
|
||||
)
|
||||
(when (< 0.0 f1-1)
|
||||
(vector-float*! gp-0 gp-0 (/ f1-1 f0-1))
|
||||
(TODO-RENAME-15 (-> obj rbody) gp-0)
|
||||
(rigid-body-method-15 (-> obj rbody) gp-0)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -423,23 +423,23 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod TODO-RENAME-23 rigid-body-platform ((obj rigid-body-platform) (arg0 float))
|
||||
(defmethod rigid-body-platform-method-23 rigid-body-platform ((obj rigid-body-platform) (arg0 float))
|
||||
(let ((s4-0 (-> obj rbody matrix)))
|
||||
(dotimes (s3-0 (-> obj info control-point-count))
|
||||
(let ((s2-0 (-> obj control-point-array data s3-0)))
|
||||
(vector-matrix*! (-> s2-0 world-pos) (-> s2-0 local-pos) s4-0)
|
||||
(TODO-RENAME-17 (-> obj rbody) (-> s2-0 world-pos) (-> s2-0 velocity))
|
||||
(TODO-RENAME-24 obj s2-0 arg0)
|
||||
(rigid-body-method-17 (-> obj rbody) (-> s2-0 world-pos) (-> s2-0 velocity))
|
||||
(rigid-body-platform-method-24 obj s2-0 arg0)
|
||||
)
|
||||
)
|
||||
)
|
||||
(TODO-RENAME-26 obj)
|
||||
(TODO-RENAME-25 obj)
|
||||
(rigid-body-platform-method-26 obj)
|
||||
(rigid-body-platform-method-25 obj)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod TODO-RENAME-28 rigid-body-platform ((obj rigid-body-platform))
|
||||
(defmethod rigid-body-platform-method-28 rigid-body-platform ((obj rigid-body-platform))
|
||||
(if (-> obj info platform)
|
||||
(detect-riders! (-> obj root-overlay))
|
||||
)
|
||||
@@ -451,13 +451,13 @@
|
||||
(+! (-> obj sim-time-remaining)
|
||||
(* 0.0033333334 (the float (- (-> *display* base-frame-counter) (-> *display* old-base-frame-counter))))
|
||||
)
|
||||
(let ((f30-0 (* DISPLAY_FPS_RATIO 0.016666668)) ;; changed for high fps
|
||||
(let ((f30-0 0.016666668)
|
||||
(f28-0 (* 0.0033333334 (the float (logand #xffffff (-> *display* base-frame-counter)))))
|
||||
)
|
||||
(while (>= (-> obj sim-time-remaining) (* 0.5 f30-0))
|
||||
(clear-force-torque! (-> obj rbody))
|
||||
(TODO-RENAME-23 obj f28-0)
|
||||
(dummy-10 (-> obj rbody) f30-0)
|
||||
(rigid-body-platform-method-23 obj f28-0)
|
||||
(rigid-body-method-10 (-> obj rbody) f30-0)
|
||||
(set! (-> obj sim-time-remaining) (- (-> obj sim-time-remaining) f30-0))
|
||||
)
|
||||
)
|
||||
@@ -603,9 +603,9 @@
|
||||
#t
|
||||
)
|
||||
)
|
||||
(TODO-RENAME-28 self)
|
||||
(rigid-body-platform-method-28 self)
|
||||
(quaternion-copy! (-> self root-overlay quat) (-> self rbody rotation))
|
||||
(TODO-RENAME-18 (-> self rbody) (-> self root-overlay trans))
|
||||
(rigid-body-method-18 (-> self rbody) (-> self root-overlay trans))
|
||||
(if (-> self info platform)
|
||||
(rider-post)
|
||||
(transform-post)
|
||||
@@ -653,7 +653,7 @@
|
||||
:post (the-as (function none :behavior rigid-body-platform) rigid-body-platform-post)
|
||||
)
|
||||
|
||||
(defmethod TODO-RENAME-29 rigid-body-platform ((obj rigid-body-platform) (arg0 rigid-body-platform-constants))
|
||||
(defmethod rigid-body-platform-method-29 rigid-body-platform ((obj rigid-body-platform) (arg0 rigid-body-platform-constants))
|
||||
(set! (-> obj info) arg0)
|
||||
(set! (-> obj control-point-array)
|
||||
(new 'process 'rigid-body-control-point-inline-array (-> obj info control-point-count))
|
||||
@@ -667,14 +667,14 @@
|
||||
(-> obj info cm-joint-z)
|
||||
1.0
|
||||
)
|
||||
(TODO-RENAME-22
|
||||
(rigid-body-method-22
|
||||
(-> obj rbody)
|
||||
(-> obj root-overlay trans)
|
||||
(-> obj root-overlay quat)
|
||||
(-> obj info linear-damping)
|
||||
(-> obj info angular-damping)
|
||||
)
|
||||
(TODO-RENAME-9
|
||||
(rigid-body-method-9
|
||||
(-> obj rbody)
|
||||
(-> obj info mass)
|
||||
(-> obj info inertial-tensor-x)
|
||||
@@ -692,7 +692,7 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod TODO-RENAME-30 rigid-body-platform ((obj rigid-body-platform))
|
||||
(defmethod rigid-body-platform-method-30 rigid-body-platform ((obj rigid-body-platform))
|
||||
(let ((s5-0 (new 'process 'collide-shape-moving obj (collide-list-enum hit-by-player))))
|
||||
(set! (-> s5-0 dynam) (copy *standard-dynamics* 'process))
|
||||
(set! (-> s5-0 reaction) default-collision-reaction)
|
||||
@@ -743,15 +743,15 @@
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod TODO-RENAME-34 rigid-body-platform ((obj rigid-body-platform))
|
||||
(defmethod rigid-body-platform-method-34 rigid-body-platform ((obj rigid-body-platform))
|
||||
(go (method-of-object obj rigid-body-platform-idle))
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod TODO-RENAME-31 rigid-body-platform ((obj rigid-body-platform))
|
||||
(defmethod rigid-body-platform-method-31 rigid-body-platform ((obj rigid-body-platform))
|
||||
(set! (-> obj float-height-offset) 0.0)
|
||||
(TODO-RENAME-29 obj *rigid-body-platform-constants*)
|
||||
(rigid-body-platform-method-29 obj *rigid-body-platform-constants*)
|
||||
(let ((s5-0 (-> obj info control-point-count)))
|
||||
(dotimes (s4-0 s5-0)
|
||||
(let ((s3-0 (-> obj control-point-array data s4-0)))
|
||||
@@ -770,14 +770,10 @@
|
||||
|
||||
(defmethod init-from-entity! rigid-body-platform ((obj rigid-body-platform) (arg0 entity-actor))
|
||||
(set! (-> obj mask) (logior (process-mask platform) (-> obj mask)))
|
||||
(TODO-RENAME-30 obj)
|
||||
(rigid-body-platform-method-30 obj)
|
||||
(process-drawable-from-entity! obj arg0)
|
||||
(TODO-RENAME-31 obj)
|
||||
(TODO-RENAME-34 obj)
|
||||
(rigid-body-platform-method-31 obj)
|
||||
(rigid-body-platform-method-34 obj)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -505,7 +505,7 @@
|
||||
(set-to-rest-state (_type_) none 25)
|
||||
(add-collision-meshes (_type_) none 26)
|
||||
(do-integration (_type_) none 27)
|
||||
(dummy-28 (_type_) none 28)
|
||||
(ropebridge-method-28 (_type_) none 28)
|
||||
)
|
||||
(:states
|
||||
ropebridge-idle
|
||||
@@ -550,20 +550,20 @@
|
||||
)
|
||||
|
||||
(defstate ropebridge-idle (ropebridge)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(let ((f0-0 -1.0))
|
||||
(cond
|
||||
((= arg2 'bonk)
|
||||
((= event-type 'bonk)
|
||||
(when (>= (- (-> *display* base-frame-counter) (-> self bonk-time-stamp)) (seconds 0.2))
|
||||
(set! (-> self bonk-time-stamp) (-> *display* base-frame-counter))
|
||||
(set! f0-0 (the-as float (-> arg3 param 1)))
|
||||
(set! f0-0 (the-as float (-> event param 1)))
|
||||
(if (>= f0-0 (-> self tuning rider-bonk-max))
|
||||
(set! f0-0 (-> self tuning rider-bonk-max))
|
||||
)
|
||||
)
|
||||
)
|
||||
((and (= arg2 'attack) (= (-> arg3 param 1) 'flop))
|
||||
(let ((v1-17 (-> arg3 param 2)))
|
||||
((and (= event-type 'attack) (= (-> event param 1) 'flop))
|
||||
(let ((v1-17 (-> event param 2)))
|
||||
(when (!= v1-17 (-> self player-attack-id))
|
||||
(set! (-> self player-attack-id) v1-17)
|
||||
(set! (-> self attack-flop-time-stamp) (-> *display* base-frame-counter))
|
||||
@@ -574,13 +574,13 @@
|
||||
)
|
||||
(the-as
|
||||
object
|
||||
(when (and (>= f0-0 (-> self tuning rider-bonk-min)) (-> arg3 param 0))
|
||||
(when (and (>= f0-0 (-> self tuning rider-bonk-min)) (-> event param 0))
|
||||
(set! (-> self agitated-time-stamp) (-> *display* base-frame-counter))
|
||||
(let* ((f30-0 (/ (* (- f0-0 (-> self tuning rider-bonk-min)) (-> self tuning rider-bonk-force))
|
||||
(- (-> self tuning rider-bonk-max) (-> self tuning rider-bonk-min))
|
||||
)
|
||||
)
|
||||
(gp-0 (the-as object (-> arg3 param 0)))
|
||||
(gp-0 (the-as object (-> event param 0)))
|
||||
(a0-7 (-> (the-as touching-shapes-entry gp-0) head))
|
||||
(s4-0 (-> self root-override))
|
||||
(s5-0 (get-touched-prim a0-7 s4-0 (the-as touching-shapes-entry gp-0)))
|
||||
@@ -641,7 +641,7 @@
|
||||
)
|
||||
)
|
||||
|
||||
;; WARN: Expression building failed: Function (method 20 ropebridge) has a return type of none, but the expression builder found a return statement.
|
||||
;; WARN: Function (method 20 ropebridge) has a return type of none, but the expression builder found a return statement.
|
||||
(defmethod set-vel-from-impact ropebridge ((obj ropebridge) (arg0 uint) (arg1 vector) (arg2 int) (arg3 float))
|
||||
(loop
|
||||
(let ((f0-2 (fabs (- (-> arg1 z) (-> obj spring-point (the-as int arg0) local-pos z)))))
|
||||
@@ -708,7 +708,7 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
;; WARN: Expression building failed: Function (method 22 ropebridge) has a return type of none, but the expression builder found a return statement.
|
||||
;; WARN: Function (method 22 ropebridge) has a return type of none, but the expression builder found a return statement.
|
||||
(defmethod set-vel-from-rider ropebridge ((obj ropebridge) (arg0 uint) (arg1 vector) (arg2 int))
|
||||
(loop
|
||||
(let ((f0-0 (vector-vector-distance arg1 (the-as vector (-> obj spring-point (the-as int arg0))))))
|
||||
@@ -983,7 +983,7 @@
|
||||
)
|
||||
|
||||
(defmethod run-logic? ropebridge ((obj ropebridge))
|
||||
(or (zero? (logand (-> obj mask) (process-mask actor-pause)))
|
||||
(or (not (logtest? (-> obj mask) (process-mask actor-pause)))
|
||||
(< (- (-> *display* base-frame-counter) (-> obj agitated-time-stamp)) (seconds 5))
|
||||
(or (>= (-> obj sleep-dist) (vector-vector-distance (-> obj root-override trans) (math-camera-pos)))
|
||||
(and (nonzero? (-> obj skel)) (!= (-> obj skel root-channel 0) (-> obj skel channel)))
|
||||
@@ -992,7 +992,7 @@
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod dummy-28 ropebridge ((obj ropebridge))
|
||||
(defmethod ropebridge-method-28 ropebridge ((obj ropebridge))
|
||||
0
|
||||
(none)
|
||||
)
|
||||
@@ -1064,7 +1064,3 @@
|
||||
(go ropebridge-idle)
|
||||
(none)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -11,8 +11,8 @@
|
||||
|
||||
(defpartgroup group-sharkey-splash
|
||||
:id 106
|
||||
:duration 120
|
||||
:linger-duration 780
|
||||
:duration (seconds 0.4)
|
||||
:linger-duration (seconds 2.6)
|
||||
:flags (use-local-clock)
|
||||
:bounds (static-bspherem 0 -12 0 14)
|
||||
:parts ((sp-item 124 :flags (is-3d) :period 900 :length 63)
|
||||
@@ -63,18 +63,18 @@
|
||||
:bounds (static-spherem 0 0 0 6)
|
||||
)
|
||||
|
||||
(defmethod dummy-44 sharkey ((obj sharkey) (arg0 process) (arg1 event-message-block))
|
||||
(defmethod touch-handler sharkey ((obj sharkey) (arg0 process) (arg1 event-message-block))
|
||||
(the-as object #t)
|
||||
)
|
||||
|
||||
(defmethod dummy-43 sharkey ((obj sharkey) (arg0 process) (arg1 event-message-block))
|
||||
(defmethod attack-handler sharkey ((obj sharkey) (arg0 process) (arg1 event-message-block))
|
||||
(the-as object #t)
|
||||
)
|
||||
|
||||
nav-enemy-default-event-handler
|
||||
|
||||
(defmethod run-logic? sharkey ((obj sharkey))
|
||||
(or (zero? (logand (-> obj mask) (process-mask actor-pause)))
|
||||
(or (not (logtest? (-> obj mask) (process-mask actor-pause)))
|
||||
(or (>= (+ (-> *ACTOR-bank* pause-dist) (-> obj collide-info pause-adjust-distance))
|
||||
(vector-vector-distance (-> obj collide-info trans) (math-camera-pos))
|
||||
)
|
||||
@@ -84,8 +84,8 @@ nav-enemy-default-event-handler
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod dummy-40 sharkey ((obj sharkey))
|
||||
(dummy-11 (-> obj nav) (-> obj nav target-pos))
|
||||
(defmethod nav-enemy-method-40 sharkey ((obj sharkey))
|
||||
(nav-control-method-11 (-> obj nav) (-> obj nav target-pos))
|
||||
(let* ((f0-0 (vector-vector-xz-distance (-> obj collide-info trans) (-> obj nav target-pos)))
|
||||
(f30-0 (/ (- (fmin (-> obj y-max) (-> obj nav target-pos y)) (-> obj collide-info trans y)) f0-0))
|
||||
)
|
||||
@@ -95,7 +95,7 @@ nav-enemy-default-event-handler
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod TODO-RENAME-37 sharkey ((obj sharkey))
|
||||
(defmethod nav-enemy-method-37 sharkey ((obj sharkey))
|
||||
(let ((s5-0 (new 'stack-no-clear 'vector)))
|
||||
(when (< 8192.0 (vector-length (-> obj nav travel)))
|
||||
(vector-normalize-copy! s5-0 (-> obj nav travel) 1.0)
|
||||
@@ -108,7 +108,7 @@ nav-enemy-default-event-handler
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod dummy-41 sharkey ((obj sharkey))
|
||||
(defmethod nav-enemy-method-41 sharkey ((obj sharkey))
|
||||
(let* ((f0-1 (- (-> obj target-speed) (-> obj momentum-speed)))
|
||||
(f1-3 (fmin (* (-> obj acceleration) (-> *display* seconds-per-frame)) (fabs f0-1)))
|
||||
)
|
||||
@@ -138,12 +138,12 @@ nav-enemy-default-event-handler
|
||||
)
|
||||
(set-vector! (-> obj draw color-mult) f0-2 f0-2 f0-2 1.0)
|
||||
)
|
||||
(dummy-10 (-> obj water))
|
||||
(water-control-method-10 (-> obj water))
|
||||
(let ((f28-0 (-> obj collide-info trans y)))
|
||||
(when (or (and (< f30-0 f28-0) (>= f30-0 (-> obj last-y))) (and (>= f30-0 f28-0) (< f30-0 (-> obj last-y))))
|
||||
(set! (-> s5-0 quad) (-> obj collide-info trans quad))
|
||||
(set! (-> s5-0 y) f30-0)
|
||||
(dummy-13 (-> obj water) 1.0 s5-0 1 (-> obj collide-info transv))
|
||||
(create-splash (-> obj water) 1.0 s5-0 1 (-> obj collide-info transv))
|
||||
)
|
||||
(set! (-> obj last-y) f28-0)
|
||||
)
|
||||
@@ -205,10 +205,7 @@ nav-enemy-default-event-handler
|
||||
)
|
||||
(set! (-> self collide-info trans quad) (-> self spawn-point quad))
|
||||
(forward-up->quaternion (-> self collide-info quat) (-> self dir) *up-vector*)
|
||||
(let ((f0-6 0.0))
|
||||
(set! (-> self momentum-speed) f0-6)
|
||||
f0-6
|
||||
)
|
||||
(set! (-> self momentum-speed) 0.0)
|
||||
)
|
||||
|
||||
(defstate nav-enemy-idle (sharkey)
|
||||
@@ -239,11 +236,11 @@ nav-enemy-default-event-handler
|
||||
)
|
||||
)
|
||||
((sharkey-notice-player?)
|
||||
(when (zero? (logand (-> self nav-enemy-flags) (nav-enemy-flags navenmf0)))
|
||||
(when (not (logtest? (-> self nav-enemy-flags) (nav-enemy-flags navenmf0)))
|
||||
(logior! (-> self nav-enemy-flags) (nav-enemy-flags navenmf0))
|
||||
(set! (-> self notice-time) (-> *display* base-frame-counter))
|
||||
)
|
||||
(let ((a0-4 (dummy-16 (-> self nav) (-> *target* control trans))))
|
||||
(let ((a0-4 (nav-control-method-16 (-> self nav) (-> *target* control trans))))
|
||||
(when (or (and a0-4 (logtest? (-> a0-4 pat) 2))
|
||||
(and (logtest? (-> self draw status) (draw-status hidden))
|
||||
(>= (- (-> *display* base-frame-counter) (-> self notice-time)) (-> self reaction-time))
|
||||
@@ -271,7 +268,7 @@ nav-enemy-default-event-handler
|
||||
(ja :num! (loop! (-> self anim-speed)))
|
||||
(seek! (-> self anim-speed) 1.0 0.05)
|
||||
(seek! (-> self collide-info trans y) (-> self y-min) (* (-> self y-speed) (-> *display* seconds-per-frame)))
|
||||
(dummy-10 (-> self water))
|
||||
(water-control-method-10 (-> self water))
|
||||
(ja-post)
|
||||
(suspend)
|
||||
)
|
||||
@@ -551,7 +548,7 @@ nav-enemy-default-event-handler
|
||||
nav-enemy-default-event-handler
|
||||
)
|
||||
:trans (behavior ()
|
||||
(if (TODO-RENAME-46 self (-> self nav-info notice-distance))
|
||||
(if (target-in-range? self (-> self nav-info notice-distance))
|
||||
(go-virtual nav-enemy-chase)
|
||||
)
|
||||
(if (>= (- (-> *display* base-frame-counter) (-> self state-time)) (-> self state-timeout))
|
||||
@@ -670,7 +667,7 @@ nav-enemy-default-event-handler
|
||||
)
|
||||
(process-drawable-from-entity! obj arg0)
|
||||
(initialize-skeleton obj *sharkey-sg* '())
|
||||
(TODO-RENAME-45 obj *sharkey-nav-enemy-info*)
|
||||
(init-defaults! obj *sharkey-nav-enemy-info*)
|
||||
(logclear! (-> obj mask) (process-mask actor-pause))
|
||||
(set! (-> obj water) (new 'process 'water-control obj 3 12288.0 8192.0 2048.0))
|
||||
(set! (-> obj water flags) (water-flags wt01 wt22 wt23))
|
||||
@@ -696,7 +693,3 @@ nav-enemy-default-event-handler
|
||||
(go (method-of-object obj nav-enemy-idle))
|
||||
(none)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
:flag-assert #xb0000003c
|
||||
(:methods
|
||||
(reset! (_type_ process-drawable float float) none 9)
|
||||
(TODO-RENAME-10 (_type_ process-drawable vector) symbol 10)
|
||||
(tippy-method-10 (_type_ process-drawable vector) symbol 10)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod TODO-RENAME-10 tippy ((obj tippy) (arg0 process-drawable) (arg1 vector))
|
||||
(defmethod tippy-method-10 tippy ((obj tippy) (arg0 process-drawable) (arg1 vector))
|
||||
(let ((s4-0 #t))
|
||||
(cond
|
||||
(arg1
|
||||
@@ -70,7 +70,3 @@
|
||||
s4-0
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -288,225 +288,223 @@
|
||||
|
||||
|
||||
(define *water-anim-look*
|
||||
(the-as (array water-anim-look)
|
||||
(new 'static 'boxed-array :type water-anim-look
|
||||
(new 'static 'water-anim-look
|
||||
:skel-group '*water-anim-sunken-big-room-sg*
|
||||
:anim 24
|
||||
:ambient-sound-spec (static-sound-spec "water-loop" :fo-min 70 :fo-max 80)
|
||||
)
|
||||
(new 'static 'water-anim-look
|
||||
:skel-group '*water-anim-sunken-first-room-from-entrance-sg*
|
||||
:anim 24
|
||||
:ambient-sound-spec (static-sound-spec "water-loop" :fo-min 50 :fo-max 60)
|
||||
)
|
||||
(new 'static 'water-anim-look
|
||||
:skel-group '*water-anim-sunken-qbert-room-sg*
|
||||
:anim 24
|
||||
:ambient-sound-spec (static-sound-spec "water-loop" :fo-min 48 :fo-max 58)
|
||||
)
|
||||
(new 'static 'water-anim-look
|
||||
:skel-group '*water-anim-sunken-first-right-branch-sg*
|
||||
:anim 24
|
||||
:ambient-sound-spec (static-sound-spec "water-loop" :fo-min 30 :fo-max 40)
|
||||
)
|
||||
(new 'static 'water-anim-look
|
||||
:skel-group '*water-anim-sunken-circular-with-bullys-sg*
|
||||
:anim 24
|
||||
:ambient-sound-spec (static-sound-spec "water-loop" :fo-min 15 :fo-max 25)
|
||||
)
|
||||
(new 'static 'water-anim-look
|
||||
:skel-group '*water-anim-sunken-hall-with-one-whirlpool-sg*
|
||||
:anim 24
|
||||
:ambient-sound-spec (static-sound-spec "water-loop" :fo-min 27 :fo-max 37)
|
||||
)
|
||||
(new 'static 'water-anim-look
|
||||
:skel-group '*water-anim-sunken-hall-with-three-whirlpools-sg*
|
||||
:anim 24
|
||||
:ambient-sound-spec (static-sound-spec "water-loop" :fo-min 26 :fo-max 36)
|
||||
)
|
||||
(new 'static 'water-anim-look
|
||||
:skel-group '*water-anim-sunken-start-of-helix-slide-sg*
|
||||
:anim 24
|
||||
:ambient-sound-spec (static-sound-spec "water-loop" :fo-min 25 :fo-max 35)
|
||||
)
|
||||
(new 'static 'water-anim-look
|
||||
:skel-group '*water-anim-sunken-room-above-exit-chamber-sg*
|
||||
:anim 24
|
||||
:ambient-sound-spec (static-sound-spec "water-loop" :fo-min 45 :fo-max 55)
|
||||
)
|
||||
(new 'static 'water-anim-look
|
||||
:skel-group '*water-anim-sunken-hall-before-big-room-sg*
|
||||
:anim 24
|
||||
:ambient-sound-spec (static-sound-spec "water-loop" :fo-min 20 :fo-max 30)
|
||||
)
|
||||
(new 'static 'water-anim-look
|
||||
:skel-group '*water-anim-sunken-dark-eco-qbert-sg*
|
||||
:anim 6
|
||||
:ambient-sound-spec (static-sound-spec "darkeco-pool" :fo-min 40 :fo-max 50)
|
||||
)
|
||||
(new 'static 'water-anim-look
|
||||
:skel-group '*water-anim-sunken-short-piece-sg*
|
||||
:anim 24
|
||||
:ambient-sound-spec (static-sound-spec "water-loop" :fo-min 20 :fo-max 30)
|
||||
)
|
||||
(new 'static 'water-anim-look
|
||||
:skel-group '*water-anim-sunken-big-room-upper-water-sg*
|
||||
:anim 24
|
||||
:ambient-sound-spec (static-sound-spec "water-loop" :fo-min 27 :fo-max 37)
|
||||
)
|
||||
(new 'static 'water-anim-look
|
||||
:skel-group '*water-anim-sunken-dark-eco-platform-room-sg*
|
||||
:anim 6
|
||||
:ambient-sound-spec (static-sound-spec "darkeco-pool" :fo-min 22 :fo-max 32)
|
||||
)
|
||||
(new 'static 'water-anim-look
|
||||
:skel-group '*water-anim-maincave-water-with-crystal-sg*
|
||||
:anim 2
|
||||
:ambient-sound-spec #f
|
||||
)
|
||||
(new 'static 'water-anim-look
|
||||
:skel-group '*water-anim-maincave-center-pool-sg*
|
||||
:anim 10
|
||||
:ambient-sound-spec (static-sound-spec "darkeco-pool" :fo-min 70 :fo-max 80)
|
||||
)
|
||||
(new 'static 'water-anim-look
|
||||
:skel-group '*water-anim-maincave-lower-right-pool-sg*
|
||||
:anim 10
|
||||
:ambient-sound-spec (static-sound-spec "darkeco-pool" :fo-min 40 :fo-max 50)
|
||||
)
|
||||
(new 'static 'water-anim-look
|
||||
:skel-group '*water-anim-maincave-mid-right-pool-sg*
|
||||
:anim 10
|
||||
:ambient-sound-spec (static-sound-spec "darkeco-pool" :fo-min 37 :fo-max 47)
|
||||
)
|
||||
(new 'static 'water-anim-look
|
||||
:skel-group '*water-anim-maincave-lower-left-pool-sg*
|
||||
:anim 10
|
||||
:ambient-sound-spec (static-sound-spec "darkeco-pool" :fo-min 20 :fo-max 30)
|
||||
)
|
||||
(new 'static 'water-anim-look
|
||||
:skel-group '*water-anim-maincave-mid-left-pool-sg*
|
||||
:anim 10
|
||||
:ambient-sound-spec (static-sound-spec "darkeco-pool" :fo-min 51 :fo-max 61)
|
||||
)
|
||||
(new 'static 'water-anim-look
|
||||
:skel-group '*water-anim-robocave-main-pool-sg*
|
||||
:anim 3
|
||||
:ambient-sound-spec (static-sound-spec "darkeco-pool" :fo-min 54 :fo-max 64)
|
||||
)
|
||||
(new 'static 'water-anim-look :skel-group '*water-anim-misty-mud-by-arena-sg* :anim 24 :ambient-sound-spec #f)
|
||||
(new 'static 'water-anim-look
|
||||
:skel-group '*water-anim-misty-mud-above-skeleton-sg*
|
||||
:anim 24
|
||||
:ambient-sound-spec #f
|
||||
)
|
||||
(new 'static 'water-anim-look
|
||||
:skel-group '*water-anim-misty-mud-behind-skeleton-sg*
|
||||
:anim 24
|
||||
:ambient-sound-spec #f
|
||||
)
|
||||
(new 'static 'water-anim-look
|
||||
:skel-group '*water-anim-misty-mud-above-skull-back-sg*
|
||||
:anim 24
|
||||
:ambient-sound-spec #f
|
||||
)
|
||||
(new 'static 'water-anim-look
|
||||
:skel-group '*water-anim-misty-mud-above-skull-front-sg*
|
||||
:anim 24
|
||||
:ambient-sound-spec #f
|
||||
)
|
||||
(new 'static 'water-anim-look
|
||||
:skel-group '*water-anim-misty-mud-other-near-skull-sg*
|
||||
:anim 24
|
||||
:ambient-sound-spec #f
|
||||
)
|
||||
(new 'static 'water-anim-look
|
||||
:skel-group '*water-anim-misty-mud-near-skull-sg*
|
||||
:anim 24
|
||||
:ambient-sound-spec #f
|
||||
)
|
||||
(new 'static 'water-anim-look
|
||||
:skel-group '*water-anim-misty-mud-under-spine-sg*
|
||||
:anim 24
|
||||
:ambient-sound-spec #f
|
||||
)
|
||||
(new 'static 'water-anim-look :skel-group '*water-anim-misty-mud-by-dock-sg* :anim 24 :ambient-sound-spec #f)
|
||||
(new 'static 'water-anim-look
|
||||
:skel-group '*water-anim-misty-mud-island-near-dock-sg*
|
||||
:anim 24
|
||||
:ambient-sound-spec #f
|
||||
)
|
||||
(new 'static 'water-anim-look
|
||||
:skel-group '*water-anim-misty-mud-lonely-island-sg*
|
||||
:anim 24
|
||||
:ambient-sound-spec #f
|
||||
)
|
||||
(new 'static 'water-anim-look
|
||||
:skel-group '*water-anim-misty-dark-eco-pool-sg*
|
||||
:anim 24
|
||||
:ambient-sound-spec (static-sound-spec "darkeco-pool" :fo-min 17 :fo-max 27)
|
||||
)
|
||||
(new 'static 'water-anim-look :skel-group '*water-anim-ogre-lava-sg* :anim 2 :ambient-sound-spec #f)
|
||||
(new 'static 'water-anim-look :skel-group '*water-anim-jungle-river-sg* :anim 3 :ambient-sound-spec #f)
|
||||
(new 'static 'water-anim-look :skel-group '*water-anim-village3-lava-sg* :anim 3 :ambient-sound-spec #f)
|
||||
(new 'static 'water-anim-look :skel-group '*water-anim-training-lake-sg* :anim 2 :ambient-sound-spec #f)
|
||||
(new 'static 'water-anim-look
|
||||
:skel-group '*water-anim-darkcave-water-with-crystal-sg*
|
||||
:anim 2
|
||||
:ambient-sound-spec #f
|
||||
)
|
||||
(new 'static 'water-anim-look :skel-group '*water-anim-rolling-water-back-sg* :anim 4 :ambient-sound-spec #f)
|
||||
(new 'static 'water-anim-look :skel-group '*water-anim-rolling-water-front-sg* :anim 4 :ambient-sound-spec #f)
|
||||
(new 'static 'water-anim-look
|
||||
:skel-group '*water-anim-sunken-dark-eco-helix-room-sg*
|
||||
:anim 6
|
||||
:ambient-sound-spec (static-sound-spec "helix-dark-eco" :fo-min 120 :fo-max 130)
|
||||
)
|
||||
(new 'static 'water-anim-look
|
||||
:skel-group '*water-anim-finalboss-dark-eco-pool-sg*
|
||||
:anim 2
|
||||
:ambient-sound-spec (static-sound-spec "darkeco-pool" :fo-min 19 :fo-max 29)
|
||||
)
|
||||
(new 'static 'water-anim-look
|
||||
:skel-group '*water-anim-lavatube-energy-lava-sg*
|
||||
:anim 2
|
||||
:ambient-sound-spec #f
|
||||
)
|
||||
(new 'static 'water-anim-look :skel-group '*water-anim-village1-rice-paddy-sg* :anim 8 :ambient-sound-spec #f)
|
||||
(new 'static 'water-anim-look :skel-group '*water-anim-village1-fountain-sg* :anim 8 :ambient-sound-spec #f)
|
||||
(new 'static 'water-anim-look
|
||||
:skel-group '*water-anim-village1-rice-paddy-mid-sg*
|
||||
:anim 8
|
||||
:ambient-sound-spec #f
|
||||
)
|
||||
(new 'static 'water-anim-look
|
||||
:skel-group '*water-anim-village1-rice-paddy-top-sg*
|
||||
:anim 8
|
||||
:ambient-sound-spec #f
|
||||
)
|
||||
(new 'static 'water-anim-look :skel-group '*water-anim-village2-bucket-sg* :anim 2 :ambient-sound-spec #f)
|
||||
(new 'static 'boxed-array :type water-anim-look
|
||||
(new 'static 'water-anim-look
|
||||
:skel-group '*water-anim-sunken-big-room-sg*
|
||||
:anim 24
|
||||
:ambient-sound-spec (static-sound-spec "water-loop" :fo-min 70 :fo-max 80)
|
||||
)
|
||||
(new 'static 'water-anim-look
|
||||
:skel-group '*water-anim-sunken-first-room-from-entrance-sg*
|
||||
:anim 24
|
||||
:ambient-sound-spec (static-sound-spec "water-loop" :fo-min 50 :fo-max 60)
|
||||
)
|
||||
(new 'static 'water-anim-look
|
||||
:skel-group '*water-anim-sunken-qbert-room-sg*
|
||||
:anim 24
|
||||
:ambient-sound-spec (static-sound-spec "water-loop" :fo-min 48 :fo-max 58)
|
||||
)
|
||||
(new 'static 'water-anim-look
|
||||
:skel-group '*water-anim-sunken-first-right-branch-sg*
|
||||
:anim 24
|
||||
:ambient-sound-spec (static-sound-spec "water-loop" :fo-min 30 :fo-max 40)
|
||||
)
|
||||
(new 'static 'water-anim-look
|
||||
:skel-group '*water-anim-sunken-circular-with-bullys-sg*
|
||||
:anim 24
|
||||
:ambient-sound-spec (static-sound-spec "water-loop" :fo-min 15 :fo-max 25)
|
||||
)
|
||||
(new 'static 'water-anim-look
|
||||
:skel-group '*water-anim-sunken-hall-with-one-whirlpool-sg*
|
||||
:anim 24
|
||||
:ambient-sound-spec (static-sound-spec "water-loop" :fo-min 27 :fo-max 37)
|
||||
)
|
||||
(new 'static 'water-anim-look
|
||||
:skel-group '*water-anim-sunken-hall-with-three-whirlpools-sg*
|
||||
:anim 24
|
||||
:ambient-sound-spec (static-sound-spec "water-loop" :fo-min 26 :fo-max 36)
|
||||
)
|
||||
(new 'static 'water-anim-look
|
||||
:skel-group '*water-anim-sunken-start-of-helix-slide-sg*
|
||||
:anim 24
|
||||
:ambient-sound-spec (static-sound-spec "water-loop" :fo-min 25 :fo-max 35)
|
||||
)
|
||||
(new 'static 'water-anim-look
|
||||
:skel-group '*water-anim-sunken-room-above-exit-chamber-sg*
|
||||
:anim 24
|
||||
:ambient-sound-spec (static-sound-spec "water-loop" :fo-min 45 :fo-max 55)
|
||||
)
|
||||
(new 'static 'water-anim-look
|
||||
:skel-group '*water-anim-sunken-hall-before-big-room-sg*
|
||||
:anim 24
|
||||
:ambient-sound-spec (static-sound-spec "water-loop" :fo-min 20 :fo-max 30)
|
||||
)
|
||||
(new 'static 'water-anim-look
|
||||
:skel-group '*water-anim-sunken-dark-eco-qbert-sg*
|
||||
:anim 6
|
||||
:ambient-sound-spec (static-sound-spec "darkeco-pool" :fo-min 40 :fo-max 50)
|
||||
)
|
||||
(new 'static 'water-anim-look
|
||||
:skel-group '*water-anim-sunken-short-piece-sg*
|
||||
:anim 24
|
||||
:ambient-sound-spec (static-sound-spec "water-loop" :fo-min 20 :fo-max 30)
|
||||
)
|
||||
(new 'static 'water-anim-look
|
||||
:skel-group '*water-anim-sunken-big-room-upper-water-sg*
|
||||
:anim 24
|
||||
:ambient-sound-spec (static-sound-spec "water-loop" :fo-min 27 :fo-max 37)
|
||||
)
|
||||
(new 'static 'water-anim-look
|
||||
:skel-group '*water-anim-sunken-dark-eco-platform-room-sg*
|
||||
:anim 6
|
||||
:ambient-sound-spec (static-sound-spec "darkeco-pool" :fo-min 22 :fo-max 32)
|
||||
)
|
||||
(new 'static 'water-anim-look
|
||||
:skel-group '*water-anim-maincave-water-with-crystal-sg*
|
||||
:anim 2
|
||||
:ambient-sound-spec #f
|
||||
)
|
||||
(new 'static 'water-anim-look
|
||||
:skel-group '*water-anim-maincave-center-pool-sg*
|
||||
:anim 10
|
||||
:ambient-sound-spec (static-sound-spec "darkeco-pool" :fo-min 70 :fo-max 80)
|
||||
)
|
||||
(new 'static 'water-anim-look
|
||||
:skel-group '*water-anim-maincave-lower-right-pool-sg*
|
||||
:anim 10
|
||||
:ambient-sound-spec (static-sound-spec "darkeco-pool" :fo-min 40 :fo-max 50)
|
||||
)
|
||||
(new 'static 'water-anim-look
|
||||
:skel-group '*water-anim-maincave-mid-right-pool-sg*
|
||||
:anim 10
|
||||
:ambient-sound-spec (static-sound-spec "darkeco-pool" :fo-min 37 :fo-max 47)
|
||||
)
|
||||
(new 'static 'water-anim-look
|
||||
:skel-group '*water-anim-maincave-lower-left-pool-sg*
|
||||
:anim 10
|
||||
:ambient-sound-spec (static-sound-spec "darkeco-pool" :fo-min 20 :fo-max 30)
|
||||
)
|
||||
(new 'static 'water-anim-look
|
||||
:skel-group '*water-anim-maincave-mid-left-pool-sg*
|
||||
:anim 10
|
||||
:ambient-sound-spec (static-sound-spec "darkeco-pool" :fo-min 51 :fo-max 61)
|
||||
)
|
||||
(new 'static 'water-anim-look
|
||||
:skel-group '*water-anim-robocave-main-pool-sg*
|
||||
:anim 3
|
||||
:ambient-sound-spec (static-sound-spec "darkeco-pool" :fo-min 54 :fo-max 64)
|
||||
)
|
||||
(new 'static 'water-anim-look :skel-group '*water-anim-misty-mud-by-arena-sg* :anim 24 :ambient-sound-spec #f)
|
||||
(new 'static 'water-anim-look
|
||||
:skel-group '*water-anim-misty-mud-above-skeleton-sg*
|
||||
:anim 24
|
||||
:ambient-sound-spec #f
|
||||
)
|
||||
(new 'static 'water-anim-look
|
||||
:skel-group '*water-anim-misty-mud-behind-skeleton-sg*
|
||||
:anim 24
|
||||
:ambient-sound-spec #f
|
||||
)
|
||||
(new 'static 'water-anim-look
|
||||
:skel-group '*water-anim-misty-mud-above-skull-back-sg*
|
||||
:anim 24
|
||||
:ambient-sound-spec #f
|
||||
)
|
||||
(new 'static 'water-anim-look
|
||||
:skel-group '*water-anim-misty-mud-above-skull-front-sg*
|
||||
:anim 24
|
||||
:ambient-sound-spec #f
|
||||
)
|
||||
(new 'static 'water-anim-look
|
||||
:skel-group '*water-anim-misty-mud-other-near-skull-sg*
|
||||
:anim 24
|
||||
:ambient-sound-spec #f
|
||||
)
|
||||
(new 'static 'water-anim-look
|
||||
:skel-group '*water-anim-misty-mud-near-skull-sg*
|
||||
:anim 24
|
||||
:ambient-sound-spec #f
|
||||
)
|
||||
(new 'static 'water-anim-look
|
||||
:skel-group '*water-anim-misty-mud-under-spine-sg*
|
||||
:anim 24
|
||||
:ambient-sound-spec #f
|
||||
)
|
||||
(new 'static 'water-anim-look :skel-group '*water-anim-misty-mud-by-dock-sg* :anim 24 :ambient-sound-spec #f)
|
||||
(new 'static 'water-anim-look
|
||||
:skel-group '*water-anim-misty-mud-island-near-dock-sg*
|
||||
:anim 24
|
||||
:ambient-sound-spec #f
|
||||
)
|
||||
(new 'static 'water-anim-look
|
||||
:skel-group '*water-anim-misty-mud-lonely-island-sg*
|
||||
:anim 24
|
||||
:ambient-sound-spec #f
|
||||
)
|
||||
(new 'static 'water-anim-look
|
||||
:skel-group '*water-anim-misty-dark-eco-pool-sg*
|
||||
:anim 24
|
||||
:ambient-sound-spec (static-sound-spec "darkeco-pool" :fo-min 17 :fo-max 27)
|
||||
)
|
||||
(new 'static 'water-anim-look :skel-group '*water-anim-ogre-lava-sg* :anim 2 :ambient-sound-spec #f)
|
||||
(new 'static 'water-anim-look :skel-group '*water-anim-jungle-river-sg* :anim 3 :ambient-sound-spec #f)
|
||||
(new 'static 'water-anim-look :skel-group '*water-anim-village3-lava-sg* :anim 3 :ambient-sound-spec #f)
|
||||
(new 'static 'water-anim-look :skel-group '*water-anim-training-lake-sg* :anim 2 :ambient-sound-spec #f)
|
||||
(new 'static 'water-anim-look
|
||||
:skel-group '*water-anim-darkcave-water-with-crystal-sg*
|
||||
:anim 2
|
||||
:ambient-sound-spec #f
|
||||
)
|
||||
(new 'static 'water-anim-look :skel-group '*water-anim-rolling-water-back-sg* :anim 4 :ambient-sound-spec #f)
|
||||
(new 'static 'water-anim-look :skel-group '*water-anim-rolling-water-front-sg* :anim 4 :ambient-sound-spec #f)
|
||||
(new 'static 'water-anim-look
|
||||
:skel-group '*water-anim-sunken-dark-eco-helix-room-sg*
|
||||
:anim 6
|
||||
:ambient-sound-spec (static-sound-spec "helix-dark-eco" :fo-min 120 :fo-max 130)
|
||||
)
|
||||
(new 'static 'water-anim-look
|
||||
:skel-group '*water-anim-finalboss-dark-eco-pool-sg*
|
||||
:anim 2
|
||||
:ambient-sound-spec (static-sound-spec "darkeco-pool" :fo-min 19 :fo-max 29)
|
||||
)
|
||||
(new 'static 'water-anim-look
|
||||
:skel-group '*water-anim-lavatube-energy-lava-sg*
|
||||
:anim 2
|
||||
:ambient-sound-spec #f
|
||||
)
|
||||
(new 'static 'water-anim-look :skel-group '*water-anim-village1-rice-paddy-sg* :anim 8 :ambient-sound-spec #f)
|
||||
(new 'static 'water-anim-look :skel-group '*water-anim-village1-fountain-sg* :anim 8 :ambient-sound-spec #f)
|
||||
(new 'static 'water-anim-look
|
||||
:skel-group '*water-anim-village1-rice-paddy-mid-sg*
|
||||
:anim 8
|
||||
:ambient-sound-spec #f
|
||||
)
|
||||
(new 'static 'water-anim-look
|
||||
:skel-group '*water-anim-village1-rice-paddy-top-sg*
|
||||
:anim 8
|
||||
:ambient-sound-spec #f
|
||||
)
|
||||
(new 'static 'water-anim-look :skel-group '*water-anim-village2-bucket-sg* :anim 2 :ambient-sound-spec #f)
|
||||
)
|
||||
)
|
||||
|
||||
(defstate water-vol-idle (water-anim)
|
||||
:virtual #t
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(let ((v1-0 arg2))
|
||||
(the-as object (when (= v1-0 'move-to)
|
||||
(set! (-> self root trans quad) (-> (the-as vector (-> arg3 param 0)) quad))
|
||||
(set! (-> self water-height) (-> self root trans y))
|
||||
(if (nonzero? (-> self sound))
|
||||
(update-trans! (-> self sound) (-> self root trans))
|
||||
)
|
||||
(let ((v0-0 (logclear (-> self mask) (process-mask sleep-code))))
|
||||
(set! (-> self mask) v0-0)
|
||||
v0-0
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(the-as object (case event-type
|
||||
(('move-to)
|
||||
(set! (-> self root trans quad) (-> (the-as vector (-> event param 0)) quad))
|
||||
(set! (-> self water-height) (-> self root trans y))
|
||||
(if (nonzero? (-> self sound))
|
||||
(update-trans! (-> self sound) (-> self root trans))
|
||||
)
|
||||
(let ((v0-0 (logclear (-> self mask) (process-mask sleep-code))))
|
||||
(set! (-> self mask) v0-0)
|
||||
v0-0
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
:trans (behavior ()
|
||||
(let ((t9-0 (-> (method-of-type water-vol water-vol-idle) trans)))
|
||||
@@ -541,7 +539,7 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod TODO-RENAME-25 water-anim ((obj water-anim))
|
||||
(defmethod water-vol-method-25 water-anim ((obj water-anim))
|
||||
(local-vars (sv-16 res-tag))
|
||||
(set! (-> obj play-ambient-sound?) #t)
|
||||
(set! (-> obj look) (res-lump-value (-> obj entity) 'look int :default (the-as uint128 -1)))
|
||||
@@ -561,7 +559,7 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod TODO-RENAME-22 water-anim ((obj water-anim))
|
||||
(defmethod water-vol-method-22 water-anim ((obj water-anim))
|
||||
(let ((s5-0 (-> obj look)))
|
||||
(if (or (< s5-0 0) (>= s5-0 (-> *water-anim-look* length)))
|
||||
(go process-drawable-art-error "skel group")
|
||||
@@ -600,7 +598,3 @@
|
||||
(ja-post)
|
||||
(none)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -85,14 +85,14 @@
|
||||
:flag-assert #x110000011c
|
||||
(:methods
|
||||
(new (symbol type process int float float float) _type_ 0)
|
||||
(dummy-9 (_type_) none 9)
|
||||
(dummy-10 (_type_) none 10)
|
||||
(water-control-method-9 (_type_) none 9)
|
||||
(water-control-method-10 (_type_) none 10)
|
||||
(start-bobbing! (_type_ float int int) none 11)
|
||||
(distance-from-surface (_type_) float 12)
|
||||
(dummy-13 (_type_ float vector int vector) none 13)
|
||||
(create-splash (_type_ float vector int vector) none 13)
|
||||
(display-water-marks? (_type_) symbol 14)
|
||||
(TODO-RENAME-15 (_type_) none 15)
|
||||
(TODO-RENAME-16 (_type_) none 16)
|
||||
(water-control-method-15 (_type_) none 15)
|
||||
(water-control-method-16 (_type_) none 16)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -136,20 +136,13 @@
|
||||
(:methods
|
||||
(water-vol-idle () _type_ :state 20)
|
||||
(water-vol-startup () _type_ :state 21)
|
||||
(TODO-RENAME-22 (_type_) none 22)
|
||||
(water-vol-method-22 (_type_) none 22)
|
||||
(reset-root! (_type_) none 23)
|
||||
(set-stack-size! (_type_) none 24)
|
||||
(TODO-RENAME-25 (_type_) none 25)
|
||||
(TODO-RENAME-26 (_type_) none 26)
|
||||
(dummy-27 (_type_) none 27)
|
||||
(water-vol-method-25 (_type_) none 25)
|
||||
(update! (_type_) none 26)
|
||||
(on-exit-water (_type_) none 27)
|
||||
(get-ripple-height (_type_ vector) float 28)
|
||||
(TODO-RENAME-29 (_type_) none 29)
|
||||
(init! (_type_) none 29)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
0
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -247,7 +247,7 @@
|
||||
|
||||
(defpartgroup group-part-water-splash
|
||||
:id 40
|
||||
:duration 900
|
||||
:duration (seconds 3)
|
||||
:flags (use-local-clock)
|
||||
:bounds (static-bspherem 0 -12 0 14)
|
||||
:parts ((sp-item 124 :flags (is-3d) :period 900 :length 63)
|
||||
@@ -285,7 +285,7 @@
|
||||
|
||||
(defpartgroup group-part-water-splash-small
|
||||
:id 41
|
||||
:duration 900
|
||||
:duration (seconds 3)
|
||||
:flags (use-local-clock)
|
||||
:bounds (static-bspherem 0 -12 0 14)
|
||||
:parts ((sp-item 124 :flags (is-3d) :period 900 :length 63)
|
||||
@@ -623,16 +623,16 @@
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod dummy-9 water-control ((obj water-control))
|
||||
(defmethod water-control-method-9 water-control ((obj water-control))
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod dummy-10 water-control ((obj water-control))
|
||||
(defmethod water-control-method-10 water-control ((obj water-control))
|
||||
(with-pp
|
||||
(let ((s5-0 (-> obj flags)))
|
||||
(cond
|
||||
((zero? (logand (-> obj flags) (water-flags wt01)))
|
||||
((not (logtest? (-> obj flags) (water-flags wt01)))
|
||||
(logclear! (-> obj flags) (water-flags wt09 wt10 wt11 wt12 wt13 wt14 wt16))
|
||||
)
|
||||
((and (logtest? (water-flags wt21) (-> obj flags))
|
||||
@@ -650,13 +650,13 @@
|
||||
(set! (-> obj bob-offset) (update! (-> obj bob)))
|
||||
(cond
|
||||
((and (logtest? (-> obj flags) (water-flags wt08))
|
||||
(zero? (logand (-> (the-as collide-shape-moving (-> obj process root)) root-prim prim-core action)
|
||||
(not (logtest? (-> (the-as collide-shape-moving (-> obj process root)) root-prim prim-core action)
|
||||
(collide-action ca-9)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> obj real-ocean-offset) (- (ocean-get-height (the-as vector (-> obj bottom))) (-> obj base-height)))
|
||||
(if (zero? (logand (-> obj flags) (water-flags wt09)))
|
||||
(if (not (logtest? (-> obj flags) (water-flags wt09)))
|
||||
(set! (-> obj ocean-offset) (-> obj real-ocean-offset))
|
||||
(set! (-> obj ocean-offset) (lerp (-> obj ocean-offset) (-> obj real-ocean-offset) 0.2))
|
||||
)
|
||||
@@ -666,7 +666,7 @@
|
||||
(f30-0 (ripple-find-height (the-as process-drawable a0-26) 0 (the-as vector (-> obj bottom))))
|
||||
)
|
||||
(set! (-> obj real-ocean-offset) (- f30-0 (-> obj base-height)))
|
||||
(if (zero? (logand (-> obj flags) (water-flags wt09)))
|
||||
(if (not (logtest? (-> obj flags) (water-flags wt09)))
|
||||
(set! (-> obj ocean-offset) (-> obj real-ocean-offset))
|
||||
(set! (-> obj ocean-offset) (lerp (-> obj ocean-offset) (-> obj real-ocean-offset) 0.2))
|
||||
)
|
||||
@@ -699,8 +699,8 @@
|
||||
(set! (-> obj drip-wetness) 1.0)
|
||||
(set! (-> obj drip-height) (fmax (- (-> obj surface-height) (-> obj bottom 0 y)) (-> obj drip-height)))
|
||||
(set! (-> obj drip-speed) 15.0)
|
||||
(if (zero? (logand (-> obj flags) (water-flags wt09)))
|
||||
(TODO-RENAME-15 obj)
|
||||
(if (not (logtest? (-> obj flags) (water-flags wt09)))
|
||||
(water-control-method-15 obj)
|
||||
)
|
||||
(cond
|
||||
((>= (-> obj top 0 y) (-> obj height))
|
||||
@@ -733,7 +733,7 @@
|
||||
)
|
||||
)
|
||||
(if (< (-> obj top 1 y) (-> obj height))
|
||||
(dummy-13 obj 0.2 s4-0 1 (-> obj process root transv))
|
||||
(create-splash obj 0.2 s4-0 1 (-> obj process root transv))
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -774,8 +774,8 @@
|
||||
)
|
||||
(if (and (logtest? (-> obj flags) (water-flags wt04))
|
||||
(and s4-3
|
||||
(zero? (logand (-> (the-as collide-shape-moving (-> obj process root)) status) (cshape-moving-flags on-water))
|
||||
)
|
||||
(not (logtest? (-> (the-as collide-shape-moving (-> obj process root)) status) (cshape-moving-flags on-water))
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> obj bob amp) (* 0.8 (-> obj bob amp)))
|
||||
@@ -786,7 +786,7 @@
|
||||
(>= f30-3 (-> obj bottom 0 y))
|
||||
(and (logtest? s5-0 (water-flags wt11))
|
||||
(logtest? (-> (the-as collide-shape-moving (-> obj process root)) status) (cshape-moving-flags tsurf))
|
||||
(zero? (logand (-> (the-as collide-shape-moving (-> obj process root)) status) (cshape-moving-flags onsurf)))
|
||||
(not (logtest? (-> (the-as collide-shape-moving (-> obj process root)) status) (cshape-moving-flags onsurf)))
|
||||
(>= (+ 204.8 f30-3) (-> obj bottom 0 y))
|
||||
)
|
||||
)
|
||||
@@ -801,21 +801,21 @@
|
||||
(set! (-> obj swim-time) (-> *display* base-frame-counter))
|
||||
(send-event (-> obj process) 'swim)
|
||||
(logior! (-> obj flags) (water-flags wt11))
|
||||
(if (zero? (logand s5-0 (water-flags wt11)))
|
||||
(if (not (logtest? s5-0 (water-flags wt11)))
|
||||
(set! (-> obj enter-swim-time) (-> *display* base-frame-counter))
|
||||
)
|
||||
(cond
|
||||
((and (logtest? (-> obj flags) (water-flags wt04))
|
||||
(logtest? (-> (the-as collide-shape-moving (-> obj process root)) status) (cshape-moving-flags tsurf))
|
||||
(zero? (logand (water-flags wt16) (-> obj flags)))
|
||||
(not (logtest? (water-flags wt16) (-> obj flags)))
|
||||
)
|
||||
(let ((v1-200 (new 'stack-no-clear 'vector)))
|
||||
(set! (-> v1-200 quad) (-> obj bottom 0 quad))
|
||||
(set! (-> v1-200 y) (- (-> obj height) (-> obj swim-height)))
|
||||
(let ((s4-4 (-> obj process root)))
|
||||
(when (and (zero? (logand (-> (the-as collide-shape-moving s4-4) status) (cshape-moving-flags csmf12)))
|
||||
(when (and (not (logtest? (-> (the-as collide-shape-moving s4-4) status) (cshape-moving-flags csmf12)))
|
||||
(logtest? (-> obj flags) (water-flags wt11))
|
||||
(zero? (logand (-> (the-as collide-shape-moving s4-4) root-prim prim-core action) (collide-action ca-9)))
|
||||
(not (logtest? (-> (the-as collide-shape-moving s4-4) root-prim prim-core action) (collide-action ca-9)))
|
||||
)
|
||||
(let ((a1-27 (vector-! (new 'stack-no-clear 'vector) v1-200 (-> s4-4 trans))))
|
||||
(vector-float*! a1-27 a1-27 (-> *display* frames-per-second))
|
||||
@@ -826,7 +826,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
((and (< (-> obj bottom 0 y) f30-3) (zero? (logand (water-flags wt16) (-> obj flags))))
|
||||
((and (< (-> obj bottom 0 y) f30-3) (not (logtest? (water-flags wt16) (-> obj flags))))
|
||||
(logior! (-> obj flags) (water-flags wt12))
|
||||
)
|
||||
)
|
||||
@@ -856,7 +856,7 @@
|
||||
(set! (-> a1-30 quad) (-> obj bottom 0 quad))
|
||||
(let ((s5-1 (-> obj process root)))
|
||||
(set! (-> a1-30 y) f30-3)
|
||||
(when (zero? (logand (-> (the-as collide-shape-moving s5-1) root-prim prim-core action) (collide-action ca-9)))
|
||||
(when (not (logtest? (-> (the-as collide-shape-moving s5-1) root-prim prim-core action) (collide-action ca-9)))
|
||||
(let ((f30-4 (-> (the-as collide-shape-moving s5-1) ground-impact-vel)))
|
||||
(move-to-ground-point! (the-as collide-shape-moving s5-1) a1-30 (-> s5-1 transv) *up-vector*)
|
||||
(logior! (-> (the-as collide-shape-moving s5-1) status) (cshape-moving-flags on-water))
|
||||
@@ -871,17 +871,17 @@
|
||||
(when (and (logtest? (-> (the-as collide-shape-moving (-> obj process root)) status)
|
||||
(cshape-moving-flags onsurf on-water)
|
||||
)
|
||||
(zero? (logand (-> (the-as collide-shape-moving (-> obj process root)) root-prim prim-core action)
|
||||
(not (logtest? (-> (the-as collide-shape-moving (-> obj process root)) root-prim prim-core action)
|
||||
(collide-action ca-9)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(when (< (-> obj process root trans y) -409.6)
|
||||
(send-event (-> obj process) 'no-look-around (seconds 1.5))
|
||||
(when (zero? (logand (-> (the-as collide-shape-moving (-> obj process root)) root-prim prim-core action)
|
||||
(when (not (logtest? (-> (the-as collide-shape-moving (-> obj process root)) root-prim prim-core action)
|
||||
(collide-action ca-14)
|
||||
)
|
||||
)
|
||||
)
|
||||
(cond
|
||||
((= (-> obj process type) target)
|
||||
(send-event
|
||||
@@ -919,13 +919,13 @@
|
||||
)
|
||||
(else
|
||||
(if (logtest? (-> obj flags) (water-flags wt09))
|
||||
(TODO-RENAME-16 obj)
|
||||
(water-control-method-16 obj)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(when (not (or (zero? (logand (-> obj flags) (water-flags wt06)))
|
||||
(zero? (logand (water-flags wt23) (-> obj flags)))
|
||||
(when (not (or (not (logtest? (-> obj flags) (water-flags wt06)))
|
||||
(not (logtest? (water-flags wt23) (-> obj flags)))
|
||||
(= (-> obj drip-wetness) 0.0)
|
||||
)
|
||||
)
|
||||
@@ -1072,7 +1072,7 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod TODO-RENAME-15 water-control ((obj water-control))
|
||||
(defmethod water-control-method-15 water-control ((obj water-control))
|
||||
(with-pp
|
||||
(logior! (-> obj flags) (water-flags wt09))
|
||||
(logclear! (-> obj flags) (water-flags wt16))
|
||||
@@ -1088,9 +1088,9 @@
|
||||
(f30-0 (lerp-scale 0.3 1.0 f0-4 2048.0 24576.0))
|
||||
)
|
||||
(if (nonzero? (-> obj process skel effect))
|
||||
(dummy-10 (-> obj process skel effect) 'swim-stroke 0.0 -1)
|
||||
(effect-control-method-10 (-> obj process skel effect) 'swim-stroke 0.0 -1)
|
||||
)
|
||||
(dummy-13 obj f30-0 (-> obj enter-water-pos) 1 (-> obj process root transv))
|
||||
(create-splash obj f30-0 (-> obj enter-water-pos) 1 (-> obj process root transv))
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -1102,7 +1102,7 @@
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod TODO-RENAME-16 water-control ((obj water-control))
|
||||
(defmethod water-control-method-16 water-control ((obj water-control))
|
||||
(logclear! (-> obj flags) (water-flags wt09))
|
||||
(set-zero! (-> obj bob))
|
||||
(if (logtest? (water-flags wt17) (-> obj flags))
|
||||
@@ -1131,7 +1131,7 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod dummy-13 water-control ((obj water-control) (arg0 float) (arg1 vector) (arg2 int) (arg3 vector))
|
||||
(defmethod create-splash water-control ((obj water-control) (arg0 float) (arg1 vector) (arg2 int) (arg3 vector))
|
||||
(when (and (logtest? (-> obj flags) (water-flags wt05)) (logtest? (water-flags wt23) (-> obj flags)))
|
||||
(let ((a1-3 (vector+float*! (new 'stack-no-clear 'vector) arg1 arg3 0.05)))
|
||||
(set! (-> a1-3 y) (-> obj surface-height))
|
||||
@@ -1142,7 +1142,7 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod dummy-27 water-vol ((obj water-vol))
|
||||
(defmethod on-exit-water water-vol ((obj water-vol))
|
||||
(when (handle->process (-> obj target))
|
||||
(let ((v1-7 (-> (the-as target (-> obj target process 0)) water)))
|
||||
(logclear! (-> v1-7 flags) (water-flags wt01 wt02 wt03 wt08 wt17 wt18 wt19 wt20 wt21 wt23 wt24 wt25 wt26))
|
||||
@@ -1165,12 +1165,12 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod TODO-RENAME-26 water-vol ((obj water-vol))
|
||||
(defmethod update! water-vol ((obj water-vol))
|
||||
(cond
|
||||
((handle->process (-> obj target))
|
||||
(cond
|
||||
((not (dummy-10 (-> obj vol) (-> (the-as target (-> obj target process 0)) control trans)))
|
||||
(dummy-27 obj)
|
||||
((not (point-in-vol? (-> obj vol) (-> (the-as target (-> obj target process 0)) control trans)))
|
||||
(on-exit-water obj)
|
||||
)
|
||||
(else
|
||||
(let ((v1-15 (-> (the-as target (-> obj target process 0)) water)))
|
||||
@@ -1202,8 +1202,9 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
((and *target*
|
||||
(and (not (handle->process (-> *target* water volume))) (dummy-10 (-> obj vol) (-> *target* control trans)))
|
||||
((and *target* (and (not (handle->process (-> *target* water volume)))
|
||||
(point-in-vol? (-> obj vol) (-> *target* control trans))
|
||||
)
|
||||
)
|
||||
(let ((s5-0 (-> *target* water)))
|
||||
(process-entity-status! obj (entity-perm-status bit-3) #t)
|
||||
@@ -1240,20 +1241,20 @@
|
||||
|
||||
(defstate water-vol-idle (water-vol)
|
||||
:virtual #t
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(let ((v1-0 arg2))
|
||||
(the-as object (if (= v1-0 'update)
|
||||
(TODO-RENAME-26 self)
|
||||
)
|
||||
)
|
||||
)
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(the-as object (case event-type
|
||||
(('update)
|
||||
(update! self)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
:exit (behavior ()
|
||||
(dummy-27 self)
|
||||
(on-exit-water self)
|
||||
(none)
|
||||
)
|
||||
:trans (behavior ()
|
||||
(TODO-RENAME-26 self)
|
||||
(update! self)
|
||||
(none)
|
||||
)
|
||||
:code (the-as (function none :behavior water-vol) anim-loop)
|
||||
@@ -1269,12 +1270,12 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod TODO-RENAME-25 water-vol ((obj water-vol))
|
||||
(defmethod water-vol-method-25 water-vol ((obj water-vol))
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod TODO-RENAME-29 water-vol ((obj water-vol))
|
||||
(defmethod init! water-vol ((obj water-vol))
|
||||
(local-vars (sv-16 res-tag))
|
||||
(set! (-> obj attack-event) (the-as symbol ((method-of-type res-lump get-property-struct)
|
||||
(-> obj entity)
|
||||
@@ -1334,7 +1335,7 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod TODO-RENAME-22 water-vol ((obj water-vol))
|
||||
(defmethod water-vol-method-22 water-vol ((obj water-vol))
|
||||
0
|
||||
(none)
|
||||
)
|
||||
@@ -1343,9 +1344,9 @@
|
||||
(set! (-> self entity) arg0)
|
||||
(set-stack-size! self)
|
||||
(reset-root! self)
|
||||
(TODO-RENAME-29 self)
|
||||
(TODO-RENAME-25 self)
|
||||
(TODO-RENAME-22 self)
|
||||
(init! self)
|
||||
(water-vol-method-25 self)
|
||||
(water-vol-method-22 self)
|
||||
(go-virtual water-vol-startup)
|
||||
(none)
|
||||
)
|
||||
@@ -1353,13 +1354,9 @@
|
||||
(defmethod init-from-entity! water-vol ((obj water-vol) (arg0 entity-actor))
|
||||
(set-stack-size! obj)
|
||||
(reset-root! obj)
|
||||
(TODO-RENAME-29 obj)
|
||||
(TODO-RENAME-25 obj)
|
||||
(TODO-RENAME-22 obj)
|
||||
(init! obj)
|
||||
(water-vol-method-25 obj)
|
||||
(water-vol-method-22 obj)
|
||||
(go (method-of-object obj water-vol-startup))
|
||||
(none)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -5,52 +5,53 @@
|
||||
;; name in dgo: stats-h
|
||||
;; dgos: GAME, ENGINE
|
||||
|
||||
;; definition of type tr-stat
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(deftype tr-stat (structure)
|
||||
((groups uint16 :offset-assert 0)
|
||||
(fragments uint16 :offset-assert 2)
|
||||
(tris uint32 :offset-assert 4)
|
||||
(dverts uint32 :offset-assert 8)
|
||||
(instances uint16 :offset-assert 12)
|
||||
(pad uint16 :offset-assert 14)
|
||||
((groups uint16 :offset-assert 0)
|
||||
(fragments uint16 :offset-assert 2)
|
||||
(tris uint32 :offset-assert 4)
|
||||
(dverts uint32 :offset-assert 8)
|
||||
(instances uint16 :offset-assert 12)
|
||||
(pad uint16 :offset-assert 14)
|
||||
)
|
||||
:method-count-assert 9
|
||||
:size-assert #x10
|
||||
:flag-assert #x900000010
|
||||
)
|
||||
|
||||
;; definition of type merc-global-stats
|
||||
|
||||
(deftype merc-global-stats (structure)
|
||||
((merc tr-stat :inline :offset-assert 0)
|
||||
(mercneric tr-stat :inline :offset-assert 16)
|
||||
((merc tr-stat :inline :offset-assert 0)
|
||||
(mercneric tr-stat :inline :offset-assert 16)
|
||||
)
|
||||
:method-count-assert 9
|
||||
:size-assert #x20
|
||||
:flag-assert #x900000020
|
||||
)
|
||||
|
||||
;; definition of type perf-stat
|
||||
|
||||
(deftype perf-stat (structure)
|
||||
((frame-number uint32 :offset-assert 0)
|
||||
(count uint32 :offset-assert 4)
|
||||
(cycles uint32 :offset-assert 8)
|
||||
(instructions uint32 :offset-assert 12)
|
||||
(icache uint32 :offset-assert 16)
|
||||
(dcache uint32 :offset-assert 20)
|
||||
(select uint32 :offset-assert 24)
|
||||
(ctrl uint32 :offset-assert 28)
|
||||
(accum0 uint32 :offset-assert 32)
|
||||
(accum1 uint32 :offset-assert 36)
|
||||
(to-vu0-waits uint32 :offset-assert 40)
|
||||
(to-spr-waits uint32 :offset-assert 44)
|
||||
(from-spr-waits uint32 :offset-assert 48)
|
||||
((frame-number uint32 :offset-assert 0)
|
||||
(count uint32 :offset-assert 4)
|
||||
(cycles uint32 :offset-assert 8)
|
||||
(instructions uint32 :offset-assert 12)
|
||||
(icache uint32 :offset-assert 16)
|
||||
(dcache uint32 :offset-assert 20)
|
||||
(select uint32 :offset-assert 24)
|
||||
(ctrl uint32 :offset-assert 28)
|
||||
(accum0 uint32 :offset-assert 32)
|
||||
(accum1 uint32 :offset-assert 36)
|
||||
(to-vu0-waits uint32 :offset-assert 40)
|
||||
(to-spr-waits uint32 :offset-assert 44)
|
||||
(from-spr-waits uint32 :offset-assert 48)
|
||||
)
|
||||
:pack-me
|
||||
:method-count-assert 14
|
||||
:size-assert #x34
|
||||
:flag-assert #xe00000034
|
||||
(:methods
|
||||
(dummy-9 (_type_) none 9)
|
||||
(perf-stat-method-9 (_type_) none 9)
|
||||
(print-to-stream (_type_ string basic) none 10)
|
||||
(reset! (_type_) none 11)
|
||||
(read! (_type_) none 12)
|
||||
@@ -58,15 +59,15 @@
|
||||
)
|
||||
)
|
||||
|
||||
;; definition of type perf-stat-array
|
||||
|
||||
(deftype perf-stat-array (inline-array-class)
|
||||
((data perf-stat :inline :dynamic :offset-assert 16))
|
||||
((data perf-stat :inline :dynamic :offset-assert 16)
|
||||
)
|
||||
:method-count-assert 9
|
||||
:size-assert #x10
|
||||
:flag-assert #x900000010
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(set! (-> perf-stat-array heap-base) (the-as uint 52))
|
||||
|
||||
(define *pc-perf-stat-counter* (the-as uint 0))
|
||||
@@ -120,14 +121,14 @@
|
||||
|
||||
(defmethod update-wait-stats perf-stat ((obj perf-stat) (arg0 uint) (arg1 uint) (arg2 uint))
|
||||
(when (nonzero? (-> obj ctrl))
|
||||
(set! (-> obj to-vu0-waits) (+ (-> obj to-vu0-waits) arg0))
|
||||
(set! (-> obj to-spr-waits) (+ (-> obj to-spr-waits) arg1))
|
||||
(set! (-> obj from-spr-waits) (+ (-> obj from-spr-waits) arg2))
|
||||
)
|
||||
(+! (-> obj to-vu0-waits) arg0)
|
||||
(+! (-> obj to-spr-waits) arg1)
|
||||
(+! (-> obj from-spr-waits) arg2)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(when (not *debug-segment*)
|
||||
(set! (-> perf-stat method-table 11) nothing)
|
||||
(set! (-> perf-stat method-table 12) nothing)
|
||||
|
||||
@@ -5,8 +5,12 @@
|
||||
;; name in dgo: entity-h
|
||||
;; dgos: GAME, ENGINE
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(define *generate-actor-vis* #f)
|
||||
|
||||
(define *generate-actor-vis-start* #f)
|
||||
|
||||
(define *generate-actor-vis-output* #f)
|
||||
|
||||
(deftype entity-perm (structure)
|
||||
@@ -34,6 +38,7 @@
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype entity-links (structure)
|
||||
((prev-link entity-links :offset-assert 0)
|
||||
(next-link entity-links :offset-assert 4)
|
||||
@@ -55,6 +60,7 @@
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype entity-perm-array (inline-array-class)
|
||||
((data entity-perm :inline :dynamic :offset-assert 16)
|
||||
)
|
||||
@@ -62,6 +68,8 @@
|
||||
:size-assert #x10
|
||||
:flag-assert #x900000010
|
||||
)
|
||||
|
||||
|
||||
(set! (-> entity-perm-array heap-base) (the-as uint 16))
|
||||
|
||||
(deftype entity-links-array (inline-array-class)
|
||||
@@ -71,6 +79,8 @@
|
||||
:size-assert #x10
|
||||
:flag-assert #x900000010
|
||||
)
|
||||
|
||||
|
||||
(set! (-> entity-links-array heap-base) (the-as uint 64))
|
||||
|
||||
(deftype entity (res-lump)
|
||||
@@ -98,29 +108,33 @@
|
||||
)
|
||||
|
||||
(deftype entity-ambient-data (structure)
|
||||
((user-object object 3 :offset-assert 0)
|
||||
(function (function drawable-ambient vector none) :offset-assert 12)
|
||||
(quad uint128 :offset 0)
|
||||
(user-uint64 uint64 1 :offset 0)
|
||||
(user-float float 3 :offset 0)
|
||||
(user-int32 int32 3 :offset 0)
|
||||
(user-uint32 uint32 3 :offset 0)
|
||||
(user-int16 int16 6 :offset 0)
|
||||
(user-uint16 uint16 6 :offset 0)
|
||||
(user-int8 int8 12 :offset 0)
|
||||
(user-uint8 uint8 12 :offset 0)
|
||||
((user-object object 3 :offset-assert 0)
|
||||
(function (function drawable-ambient vector none) :offset-assert 12)
|
||||
(quad uint128 :offset 0)
|
||||
(user-uint64 uint64 1 :offset 0)
|
||||
(user-float float 3 :offset 0)
|
||||
(user-int32 int32 3 :offset 0)
|
||||
(user-uint32 uint32 3 :offset 0)
|
||||
(user-int16 int16 6 :offset 0)
|
||||
(user-uint16 uint16 6 :offset 0)
|
||||
(user-int8 int8 12 :offset 0)
|
||||
(user-uint8 uint8 12 :offset 0)
|
||||
)
|
||||
:method-count-assert 9
|
||||
:size-assert #x10
|
||||
:flag-assert #x900000010
|
||||
)
|
||||
|
||||
|
||||
(deftype entity-ambient-data-array (inline-array-class)
|
||||
((data entity-ambient-data :inline :dynamic))
|
||||
((data entity-ambient-data :inline :dynamic :offset-assert 16)
|
||||
)
|
||||
:method-count-assert 9
|
||||
:size-assert #x10
|
||||
:flag-assert #x900000010
|
||||
)
|
||||
|
||||
|
||||
(set! (-> entity-ambient-data-array heap-base) (the-as uint 16))
|
||||
|
||||
(deftype entity-ambient (entity)
|
||||
@@ -136,12 +150,12 @@
|
||||
)
|
||||
|
||||
(deftype entity-actor (entity)
|
||||
((nav-mesh nav-mesh :offset-assert 52)
|
||||
(etype type :offset-assert 56)
|
||||
(task game-task :offset-assert 60)
|
||||
(vis-id uint16 :offset-assert 62)
|
||||
(vis-id-signed int16 :offset 62) ;; added
|
||||
(quat quaternion :inline :offset-assert 64)
|
||||
((nav-mesh nav-mesh :offset-assert 52)
|
||||
(etype type :offset-assert 56)
|
||||
(task game-task :offset-assert 60)
|
||||
(vis-id uint16 :offset-assert 62)
|
||||
(vis-id-signed int16 :offset 62) ;; added
|
||||
(quat quaternion :inline :offset-assert 64)
|
||||
)
|
||||
:method-count-assert 31
|
||||
:size-assert #x50
|
||||
@@ -150,7 +164,7 @@
|
||||
(next-actor (_type_) entity-actor 27)
|
||||
(prev-actor (_type_) entity-actor 28)
|
||||
(debug-print (_type_ symbol type) none 29)
|
||||
(dummy-30 (_type_ entity-perm-status symbol) none 30)
|
||||
(set-or-clear-status! (_type_ entity-perm-status symbol) none 30)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
@@ -1050,10 +1050,10 @@
|
||||
(debug-draw (-> (the-as process-drawable s5-2) nav))
|
||||
)
|
||||
(if (nonzero? (-> (the-as process-drawable s5-2) path))
|
||||
(dummy-9 (-> (the-as process-drawable s5-2) path))
|
||||
(debug-draw (-> (the-as process-drawable s5-2) path))
|
||||
)
|
||||
(if (nonzero? (-> (the-as process-drawable s5-2) vol))
|
||||
(dummy-9 (-> (the-as process-drawable s5-2) vol))
|
||||
(init! (-> (the-as process-drawable s5-2) vol))
|
||||
)
|
||||
)
|
||||
(if (and (the-as process-drawable s5-2)
|
||||
@@ -1108,10 +1108,10 @@
|
||||
(debug-draw (-> arg0 nav))
|
||||
)
|
||||
(if (nonzero? (-> arg0 path))
|
||||
(dummy-9 (-> arg0 path))
|
||||
(debug-draw (-> arg0 path))
|
||||
)
|
||||
(if (nonzero? (-> arg0 vol))
|
||||
(dummy-9 (-> arg0 vol))
|
||||
(init! (-> arg0 vol))
|
||||
)
|
||||
)
|
||||
(none)
|
||||
@@ -1857,7 +1857,7 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod dummy-30 entity-actor ((obj entity-actor) (arg0 entity-perm-status) (arg1 symbol))
|
||||
(defmethod set-or-clear-status! entity-actor ((obj entity-actor) (arg0 entity-perm-status) (arg1 symbol))
|
||||
(let ((v1-0 (-> obj extra)))
|
||||
(if arg1
|
||||
(logior! (-> v1-0 perm status) arg0)
|
||||
|
||||
@@ -24,12 +24,12 @@
|
||||
:flag-assert #xf00000024
|
||||
(:methods
|
||||
(new (symbol type process-drawable) _type_ 0)
|
||||
(TODO-RENAME-9 (_type_) none 9)
|
||||
(dummy-10 (_type_ symbol float int) object 10)
|
||||
(dummy-11 (_type_ symbol float int basic pat-surface) none 11)
|
||||
(dummy-12 (_type_ symbol float int basic sound-name) int 12)
|
||||
(effect-control-method-9 (_type_) none 9)
|
||||
(effect-control-method-10 (_type_ symbol float int) object 10)
|
||||
(effect-control-method-11 (_type_ symbol float int basic pat-surface) none 11)
|
||||
(effect-control-method-12 (_type_ symbol float int basic sound-name) int 12)
|
||||
(set-channel-offset! (_type_ int) none 13)
|
||||
(TODO-RENAME-14 (_type_ float float float) none 14)
|
||||
(effect-control-method-14 (_type_ float float float) none 14)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
@@ -129,7 +129,7 @@
|
||||
arg0
|
||||
)
|
||||
|
||||
(defmethod TODO-RENAME-9 effect-control ((obj effect-control))
|
||||
(defmethod effect-control-method-9 effect-control ((obj effect-control))
|
||||
(let* ((a0-1 (-> obj process skel))
|
||||
(v1-3 (if (< (-> obj channel-offset) (-> a0-1 active-channels))
|
||||
(-> a0-1 root-channel (-> obj channel-offset))
|
||||
@@ -156,7 +156,7 @@
|
||||
(if (and (-> obj name) (= (-> obj name 0 key-frame) -1000000000.0))
|
||||
(set! (-> obj name) (&-> (-> obj name) 1))
|
||||
)
|
||||
(TODO-RENAME-14 obj f30-0 f30-0 f30-0)
|
||||
(effect-control-method-14 obj f30-0 f30-0 f30-0)
|
||||
)
|
||||
((or (not (-> obj name)) (= f30-0 (-> obj last-frame-num)))
|
||||
)
|
||||
@@ -170,12 +170,12 @@
|
||||
(cond
|
||||
((< f26-0 f28-0)
|
||||
(if (>= f28-0 f0-6)
|
||||
(TODO-RENAME-14 obj f26-0 f28-0 f30-0)
|
||||
(effect-control-method-14 obj f26-0 f28-0 f30-0)
|
||||
)
|
||||
)
|
||||
(else
|
||||
(if (>= f0-6 f28-0)
|
||||
(TODO-RENAME-14 obj f28-0 f26-0 f30-0)
|
||||
(effect-control-method-14 obj f28-0 f26-0 f30-0)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -186,31 +186,31 @@
|
||||
((>= (-> v1-3 param 0) 0.0)
|
||||
(cond
|
||||
((< f26-0 f28-0)
|
||||
(TODO-RENAME-14 obj f28-0 9999999.0 f30-0)
|
||||
(TODO-RENAME-14 obj -100000000.0 f26-0 9999999.0)
|
||||
(effect-control-method-14 obj f28-0 9999999.0 f30-0)
|
||||
(effect-control-method-14 obj -100000000.0 f26-0 9999999.0)
|
||||
)
|
||||
(else
|
||||
(TODO-RENAME-14 obj f28-0 f26-0 f30-0)
|
||||
(effect-control-method-14 obj f28-0 f26-0 f30-0)
|
||||
)
|
||||
)
|
||||
)
|
||||
((< f28-0 f26-0)
|
||||
(TODO-RENAME-14 obj f26-0 9999999.0 f30-0)
|
||||
(TODO-RENAME-14 obj -100000000.0 f28-0 9999999.0)
|
||||
(effect-control-method-14 obj f26-0 9999999.0 f30-0)
|
||||
(effect-control-method-14 obj -100000000.0 f28-0 9999999.0)
|
||||
)
|
||||
(else
|
||||
(TODO-RENAME-14 obj f26-0 f28-0 f30-0)
|
||||
(effect-control-method-14 obj f26-0 f28-0 f30-0)
|
||||
)
|
||||
)
|
||||
)
|
||||
((= a0-3 num-func-+!)
|
||||
(if (>= (-> v1-3 param 0) 0.0)
|
||||
(TODO-RENAME-14 obj f28-0 f26-0 f30-0)
|
||||
(TODO-RENAME-14 obj f26-0 f28-0 f30-0)
|
||||
(effect-control-method-14 obj f28-0 f26-0 f30-0)
|
||||
(effect-control-method-14 obj f26-0 f28-0 f30-0)
|
||||
)
|
||||
)
|
||||
((= a0-3 num-func-identity)
|
||||
(TODO-RENAME-14 obj f30-0 f30-0 f30-0)
|
||||
(effect-control-method-14 obj f30-0 f30-0 f30-0)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -230,7 +230,7 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod TODO-RENAME-14 effect-control ((obj effect-control) (arg0 float) (arg1 float) (arg2 float))
|
||||
(defmethod effect-control-method-14 effect-control ((obj effect-control) (arg0 float) (arg1 float) (arg2 float))
|
||||
;; note: this check was added. I believe in the original game name could be false, and then the
|
||||
;; effect-name check below would fail. This did not cause a crash on original hardware because
|
||||
;; misaligned 16-byte loads silently align. This causes a crash in opengoal, so we skip it manually.
|
||||
@@ -240,7 +240,7 @@
|
||||
(let ((f0-0 (-> s2-0 0 key-frame)))
|
||||
(when (or (and (< f0-0 arg1) (< arg0 f0-0)) (= f0-0 arg2))
|
||||
(let* ((a0-1 obj)
|
||||
(t9-0 (method-of-object a0-1 dummy-10))
|
||||
(t9-0 (method-of-object a0-1 effect-control-method-10))
|
||||
(v1-7 (-> obj res))
|
||||
(a1-1 (-> s2-0 0))
|
||||
)
|
||||
@@ -268,7 +268,7 @@
|
||||
;; WARN: rewrite_to_get_var got a none typed variable. Is there unreachable code? [OP: 364]
|
||||
;; WARN: rewrite_to_get_var got a none typed variable. Is there unreachable code? [OP: 450]
|
||||
;; WARN: rewrite_to_get_var got a none typed variable. Is there unreachable code? [OP: 469]
|
||||
(defmethod dummy-10 effect-control ((obj effect-control) (arg0 symbol) (arg1 float) (arg2 int))
|
||||
(defmethod effect-control-method-10 effect-control ((obj effect-control) (arg0 symbol) (arg1 float) (arg2 int))
|
||||
(local-vars
|
||||
(sv-160 int)
|
||||
(sv-176 symbol)
|
||||
@@ -333,7 +333,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(dummy-11 obj arg0 arg1 s5-0 (-> obj res) (the-as pat-surface t1-1))
|
||||
(effect-control-method-11 obj arg0 arg1 s5-0 (-> obj res) (the-as pat-surface t1-1))
|
||||
)
|
||||
)
|
||||
((let ((v1-18 (symbol->string arg0)))
|
||||
@@ -353,7 +353,7 @@
|
||||
(set! s3-0 (-> v0-5 0))
|
||||
)
|
||||
)
|
||||
(the-as (pointer sparticle-launch-group) s3-0)
|
||||
s3-0
|
||||
)
|
||||
(else
|
||||
(-> (the-as (pointer sparticle-launch-group) s3-0) 0)
|
||||
@@ -407,7 +407,7 @@
|
||||
(activate! *camera-smush-control* 819.2 37 600 1.0 0.995)
|
||||
)
|
||||
((zero? s3-0)
|
||||
(dummy-12 obj arg0 arg1 s5-0 (-> obj res) (string->sound-name (symbol->string arg0)))
|
||||
(effect-control-method-12 obj arg0 arg1 s5-0 (-> obj res) (string->sound-name (symbol->string arg0)))
|
||||
)
|
||||
((= (-> (the-as basic s3-0) type) sparticle-launcher)
|
||||
(if *debug-effect-control*
|
||||
@@ -518,7 +518,7 @@
|
||||
)
|
||||
(when (-> (the-as death-info s3-0) sound)
|
||||
(let* ((s2-5 obj)
|
||||
(s1-3 (method-of-object s2-5 dummy-12))
|
||||
(s1-3 (method-of-object s2-5 effect-control-method-12))
|
||||
(s0-3 (-> (the-as death-info s3-0) sound))
|
||||
)
|
||||
(set! sv-288 (-> obj res))
|
||||
@@ -530,7 +530,7 @@
|
||||
(send-event (-> obj process) 'death-start (the-as death-info s3-0))
|
||||
)
|
||||
(else
|
||||
(dummy-12 obj arg0 arg1 s5-0 (-> obj res) (string->sound-name (symbol->string arg0)))
|
||||
(effect-control-method-12 obj arg0 arg1 s5-0 (-> obj res) (string->sound-name (symbol->string arg0)))
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -538,7 +538,7 @@
|
||||
0
|
||||
)
|
||||
|
||||
(defmethod dummy-11 effect-control ((obj effect-control) (arg0 symbol) (arg1 float) (arg2 int) (arg3 basic) (arg4 pat-surface))
|
||||
(defmethod effect-control-method-11 effect-control ((obj effect-control) (arg0 symbol) (arg1 float) (arg2 int) (arg3 basic) (arg4 pat-surface))
|
||||
(local-vars
|
||||
(sv-48
|
||||
(function sparticle-system sparticle-launcher vector sparticle-launch-state sparticle-launch-control float none)
|
||||
@@ -579,7 +579,7 @@
|
||||
(('effect-land-poof)
|
||||
(when (< a0-4 9000)
|
||||
(let* ((a0-13 obj)
|
||||
(t9-8 (method-of-object a0-13 dummy-10))
|
||||
(t9-8 (method-of-object a0-13 effect-control-method-10))
|
||||
(v1-15 (-> arg4 material))
|
||||
)
|
||||
(t9-8
|
||||
@@ -646,7 +646,7 @@
|
||||
(('effect-run-poof)
|
||||
(when (< a0-4 9000)
|
||||
(let* ((a0-14 obj)
|
||||
(t9-9 (method-of-object a0-14 dummy-10))
|
||||
(t9-9 (method-of-object a0-14 effect-control-method-10))
|
||||
(v1-20 (-> arg4 material))
|
||||
)
|
||||
(t9-9
|
||||
@@ -712,7 +712,7 @@
|
||||
)
|
||||
(('effect-just-footprint)
|
||||
(let* ((a0-15 obj)
|
||||
(t9-10 (method-of-object a0-15 dummy-10))
|
||||
(t9-10 (method-of-object a0-15 effect-control-method-10))
|
||||
(v1-24 (-> arg4 material))
|
||||
)
|
||||
(t9-10
|
||||
@@ -778,7 +778,7 @@
|
||||
(('effect-just-poof)
|
||||
(when (< a0-4 9000)
|
||||
(let* ((a0-16 obj)
|
||||
(t9-11 (method-of-object a0-16 dummy-10))
|
||||
(t9-11 (method-of-object a0-16 effect-control-method-10))
|
||||
(v1-29 (-> arg4 material))
|
||||
)
|
||||
(t9-11
|
||||
@@ -844,7 +844,7 @@
|
||||
)
|
||||
(('effect-slide-poof)
|
||||
(let* ((a0-19 obj)
|
||||
(t9-12 (method-of-object a0-19 dummy-10))
|
||||
(t9-12 (method-of-object a0-19 effect-control-method-10))
|
||||
(v1-33 (-> arg4 material))
|
||||
)
|
||||
(t9-12
|
||||
@@ -1050,14 +1050,14 @@
|
||||
)
|
||||
)
|
||||
(if s1-0
|
||||
(dummy-12 obj arg0 arg1 arg2 arg3 s1-0)
|
||||
(effect-control-method-12 obj arg0 arg1 arg2 arg3 s1-0)
|
||||
)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod dummy-12 effect-control ((obj effect-control) (arg0 symbol) (arg1 float) (arg2 int) (arg3 basic) (arg4 sound-name))
|
||||
(defmethod effect-control-method-12 effect-control ((obj effect-control) (arg0 symbol) (arg1 float) (arg2 int) (arg3 basic) (arg4 sound-name))
|
||||
(local-vars (sv-112 res-tag) (sv-128 sound-name) (sv-144 basic) (sv-160 (function vector vector float)))
|
||||
(set! sv-144 arg3)
|
||||
(let ((s0-0 arg4)
|
||||
@@ -1126,8 +1126,8 @@
|
||||
(defbehavior target-land-effect target ()
|
||||
(cond
|
||||
((logtest? (-> self control root-prim prim-core action) (collide-action ca-14))
|
||||
(dummy-10 (-> self skel effect) 'effect-land-poof -1.0 -1)
|
||||
(dummy-10 (-> self skel effect) 'effect-flut-land -1.0 -1)
|
||||
(effect-control-method-10 (-> self skel effect) 'effect-land-poof -1.0 -1)
|
||||
(effect-control-method-10 (-> self skel effect) 'effect-flut-land -1.0 -1)
|
||||
)
|
||||
((logtest? (-> self control root-prim prim-core action) (collide-action ca-9))
|
||||
(sound-play-by-name
|
||||
@@ -1143,17 +1143,13 @@
|
||||
)
|
||||
)
|
||||
((logtest? (-> self water flags) (water-flags wt09))
|
||||
(dummy-10 (-> self skel effect) 'effect-land-water -1.0 -1)
|
||||
(effect-control-method-10 (-> self skel effect) 'effect-land-water -1.0 -1)
|
||||
)
|
||||
(else
|
||||
(dummy-10 (-> self skel effect) 'effect-land-poof -1.0 -1)
|
||||
(dummy-10 (-> self skel effect) 'effect-land -1.0 -1)
|
||||
(effect-control-method-10 (-> self skel effect) 'effect-land-poof -1.0 -1)
|
||||
(effect-control-method-10 (-> self skel effect) 'effect-land -1.0 -1)
|
||||
)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -145,49 +145,49 @@
|
||||
:size-assert #xb0
|
||||
:flag-assert #x3f004000b0
|
||||
(:methods
|
||||
(dummy-20 () none 20)
|
||||
(dummy-21 () none 21)
|
||||
(dummy-22 () none 22)
|
||||
(dummy-23 () none 23)
|
||||
(dummy-24 () none 24)
|
||||
(dummy-25 () none 25)
|
||||
(dummy-26 () none 26)
|
||||
(dummy-27 () none 27)
|
||||
(dummy-28 () none 28)
|
||||
(dummy-29 () none 29)
|
||||
(dummy-30 () none 30)
|
||||
(dummy-31 () none 31)
|
||||
(dummy-32 () none 32)
|
||||
(dummy-33 () none 33)
|
||||
(dummy-34 () none 34)
|
||||
(dummy-35 () none 35)
|
||||
(dummy-36 () none 36)
|
||||
(dummy-37 () none 37)
|
||||
(dummy-38 () none 38)
|
||||
(dummy-39 () none 39)
|
||||
(dummy-40 () none 40)
|
||||
(dummy-41 () none 41)
|
||||
(dummy-42 () none 42)
|
||||
(dummy-43 () none 43)
|
||||
(dummy-44 () none 44)
|
||||
(dummy-45 () none 45)
|
||||
(dummy-46 () none 46)
|
||||
(dummy-47 () none 47)
|
||||
(dummy-48 () none 48)
|
||||
(dummy-49 () none 49)
|
||||
(dummy-50 () none 50)
|
||||
(dummy-51 () none 51)
|
||||
(dummy-52 () none 52)
|
||||
(dummy-53 () none 53)
|
||||
(dummy-54 () none 54)
|
||||
(dummy-55 () none 55)
|
||||
(dummy-56 () none 56)
|
||||
(dummy-57 () none 57)
|
||||
(dummy-58 () none 58)
|
||||
(dummy-59 () none 59)
|
||||
(dummy-60 () none 60)
|
||||
(dummy-61 () none 61)
|
||||
(dummy-62 () none 62)
|
||||
(process-drawable-reserved-method-20 () none 20)
|
||||
(process-drawable-reserved-method-21 () none 21)
|
||||
(process-drawable-reserved-method-22 () none 22)
|
||||
(process-drawable-reserved-method-23 () none 23)
|
||||
(process-drawable-reserved-method-24 () none 24)
|
||||
(process-drawable-reserved-method-25 () none 25)
|
||||
(process-drawable-reserved-method-26 () none 26)
|
||||
(process-drawable-reserved-method-27 () none 27)
|
||||
(process-drawable-reserved-method-28 () none 28)
|
||||
(process-drawable-reserved-method-29 () none 29)
|
||||
(process-drawable-reserved-method-30 () none 30)
|
||||
(process-drawable-reserved-method-31 () none 31)
|
||||
(process-drawable-reserved-method-32 () none 32)
|
||||
(process-drawable-reserved-method-33 () none 33)
|
||||
(process-drawable-reserved-method-34 () none 34)
|
||||
(process-drawable-reserved-method-35 () none 35)
|
||||
(process-drawable-reserved-method-36 () none 36)
|
||||
(process-drawable-reserved-method-37 () none 37)
|
||||
(process-drawable-reserved-method-38 () none 38)
|
||||
(process-drawable-reserved-method-39 () none 39)
|
||||
(process-drawable-reserved-method-40 () none 40)
|
||||
(process-drawable-reserved-method-41 () none 41)
|
||||
(process-drawable-reserved-method-42 () none 42)
|
||||
(process-drawable-reserved-method-43 () none 43)
|
||||
(process-drawable-reserved-method-44 () none 44)
|
||||
(process-drawable-reserved-method-45 () none 45)
|
||||
(process-drawable-reserved-method-46 () none 46)
|
||||
(process-drawable-reserved-method-47 () none 47)
|
||||
(process-drawable-reserved-method-48 () none 48)
|
||||
(process-drawable-reserved-method-49 () none 49)
|
||||
(process-drawable-reserved-method-50 () none 50)
|
||||
(process-drawable-reserved-method-51 () none 51)
|
||||
(process-drawable-reserved-method-52 () none 52)
|
||||
(process-drawable-reserved-method-53 () none 53)
|
||||
(process-drawable-reserved-method-54 () none 54)
|
||||
(process-drawable-reserved-method-55 () none 55)
|
||||
(process-drawable-reserved-method-56 () none 56)
|
||||
(process-drawable-reserved-method-57 () none 57)
|
||||
(process-drawable-reserved-method-58 () none 58)
|
||||
(process-drawable-reserved-method-59 () none 59)
|
||||
(process-drawable-reserved-method-60 () none 60)
|
||||
(process-drawable-reserved-method-61 () none 61)
|
||||
(process-drawable-reserved-method-62 () none 62)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -213,21 +213,21 @@
|
||||
|
||||
;; The attack-info is generated by attackers and sent to target.
|
||||
(deftype attack-info (structure)
|
||||
((trans vector :inline :offset-assert 0)
|
||||
(vector vector :inline :offset-assert 16)
|
||||
(intersection vector :inline :offset-assert 32)
|
||||
(attacker handle :offset-assert 48)
|
||||
(invinc-time time-frame :offset-assert 56)
|
||||
(mask attack-mask :offset-assert 64)
|
||||
(mode symbol :offset-assert 68)
|
||||
(shove-back meters :offset-assert 72)
|
||||
(shove-up meters :offset-assert 76)
|
||||
(speed meters :offset-assert 80)
|
||||
(dist meters :offset-assert 84)
|
||||
(control float :offset-assert 88)
|
||||
(angle symbol :offset-assert 92)
|
||||
(rotate-to degrees :offset-assert 96)
|
||||
(prev-state state :offset-assert 100)
|
||||
((trans vector :inline :offset-assert 0)
|
||||
(vector vector :inline :offset-assert 16)
|
||||
(intersection vector :inline :offset-assert 32)
|
||||
(attacker handle :offset-assert 48)
|
||||
(invinc-time time-frame :offset-assert 56)
|
||||
(mask attack-mask :offset-assert 64)
|
||||
(mode symbol :offset-assert 68)
|
||||
(shove-back meters :offset-assert 72)
|
||||
(shove-up meters :offset-assert 76)
|
||||
(speed meters :offset-assert 80)
|
||||
(dist meters :offset-assert 84)
|
||||
(control float :offset-assert 88)
|
||||
(angle symbol :offset-assert 92)
|
||||
(rotate-to degrees :offset-assert 96)
|
||||
(prev-state state :offset-assert 100)
|
||||
)
|
||||
:method-count-assert 10
|
||||
:size-assert #x68
|
||||
@@ -249,10 +249,3 @@
|
||||
:size-assert #x24
|
||||
:flag-assert #x900000024
|
||||
)
|
||||
|
||||
|
||||
0
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -93,6 +93,8 @@
|
||||
(aspect-ratio 509)
|
||||
)
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
;; the game save is a bunch of "game-save-tag"s
|
||||
;; the elt-type field identifies what it is.
|
||||
;; the data may be stored in one of the user fields, or
|
||||
@@ -149,11 +151,11 @@
|
||||
:size-assert #x50
|
||||
:flag-assert #xc00000050
|
||||
(:methods
|
||||
(new (symbol type int) _type_ 0)
|
||||
(save-to-file (_type_ string) _type_ 9)
|
||||
(load-from-file! (_type_ string) _type_ 10)
|
||||
(debug-print (_type_ symbol) _type_ 11)
|
||||
)
|
||||
(new (symbol type int) _type_ 0)
|
||||
(save-to-file (_type_ string) _type_ 9)
|
||||
(load-from-file! (_type_ string) _type_ 10)
|
||||
(debug-print (_type_ symbol) _type_ 11)
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod asize-of game-save ((obj game-save))
|
||||
@@ -1137,8 +1139,7 @@
|
||||
)
|
||||
|
||||
(defpart 2662
|
||||
:init-specs
|
||||
((sp-tex spt-texture (new 'static 'texture-id :index #x6b :page #x1cf))
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x6b :page #x1cf))
|
||||
(sp-flt spt-num 1.0)
|
||||
(sp-flt spt-scale-x (meters 1.5))
|
||||
(sp-copy-from-other spt-scale-y -4)
|
||||
@@ -1159,17 +1160,17 @@
|
||||
(define *auto-save-info* (new 'global 'mc-slot-info))
|
||||
|
||||
(deftype auto-save (process)
|
||||
((card int32 :offset-assert 112)
|
||||
(slot int32 :offset-assert 116)
|
||||
(which int32 :offset-assert 120)
|
||||
(buffer kheap :offset-assert 124)
|
||||
(mode basic :offset-assert 128)
|
||||
(result mc-status-code :offset-assert 132)
|
||||
(save game-save :offset-assert 136)
|
||||
(info mc-slot-info :inline :offset-assert 140)
|
||||
(notify handle :offset-assert 440)
|
||||
(state-time time-frame :offset-assert 448)
|
||||
(part sparticle-launch-control :offset-assert 456)
|
||||
((card int32 :offset-assert 112)
|
||||
(slot int32 :offset-assert 116)
|
||||
(which int32 :offset-assert 120)
|
||||
(buffer kheap :offset-assert 124)
|
||||
(mode basic :offset-assert 128)
|
||||
(result mc-status-code :offset-assert 132)
|
||||
(save game-save :offset-assert 136)
|
||||
(info mc-slot-info :inline :offset-assert 140)
|
||||
(notify handle :offset-assert 440)
|
||||
(state-time time-frame :offset-assert 448)
|
||||
(part sparticle-launch-control :offset-assert 456)
|
||||
)
|
||||
:heap-base #x160
|
||||
:method-count-assert 23
|
||||
@@ -1224,11 +1225,7 @@
|
||||
(set! (-> v1-6 height) (the float 80))
|
||||
)
|
||||
(set! (-> gp-0 flags) (font-flags shadow kerning))
|
||||
(format (clear *temp-string*) "~S / ~S ~D~%"
|
||||
(-> self mode)
|
||||
(-> self state name)
|
||||
(-> self which)
|
||||
)
|
||||
(format (clear *temp-string*) "~S / ~S ~D~%" (-> self mode) (-> self state name) (-> self which))
|
||||
(print-game-text *temp-string* gp-0 #f 128 22)
|
||||
)
|
||||
)
|
||||
@@ -1354,8 +1351,7 @@
|
||||
;; Get heap memory.
|
||||
(defstate get-heap (auto-save)
|
||||
:virtual #t
|
||||
:code
|
||||
(behavior ()
|
||||
:code (behavior ()
|
||||
(set! (-> self state-time) (-> *display* real-frame-counter))
|
||||
(let ((a0-1 (reserve-alloc *art-control*)))
|
||||
(while (not a0-1)
|
||||
@@ -1374,8 +1370,7 @@
|
||||
|
||||
(defstate get-card (auto-save)
|
||||
:virtual #t
|
||||
:code
|
||||
(behavior ()
|
||||
:code (behavior ()
|
||||
(label cfg-0)
|
||||
(mc-get-slot-info (-> self slot) (-> self info))
|
||||
(when (zero? (-> self info known))
|
||||
@@ -1426,8 +1421,7 @@
|
||||
|
||||
(defstate format-card (auto-save)
|
||||
:virtual #t
|
||||
:code
|
||||
(behavior ()
|
||||
:code (behavior ()
|
||||
(when (zero? (-> self info formatted))
|
||||
(label cfg-1)
|
||||
(set! (-> self result) (mc-format (-> self card)))
|
||||
@@ -1467,8 +1461,7 @@
|
||||
|
||||
(defstate unformat-card (auto-save)
|
||||
:virtual #t
|
||||
:code
|
||||
(behavior ()
|
||||
:code (behavior ()
|
||||
(when (nonzero? (-> self info formatted))
|
||||
(label cfg-1)
|
||||
(set! (-> self result) (mc-unformat (-> self card)))
|
||||
@@ -1476,7 +1469,7 @@
|
||||
(suspend)
|
||||
(goto cfg-1)
|
||||
)
|
||||
(while #t
|
||||
(loop
|
||||
(set! (-> self result) (the-as mc-status-code (mc-check-result)))
|
||||
(case (-> self result)
|
||||
(((mc-status-code busy))
|
||||
@@ -1499,8 +1492,7 @@
|
||||
|
||||
(defstate create-file (auto-save)
|
||||
:virtual #t
|
||||
:code
|
||||
(behavior ()
|
||||
:code (behavior ()
|
||||
(cond
|
||||
((zero? (-> self info formatted))
|
||||
(go-virtual error (mc-status-code no-format))
|
||||
@@ -1518,7 +1510,7 @@
|
||||
(suspend)
|
||||
(goto cfg-6)
|
||||
)
|
||||
(while #t
|
||||
(loop
|
||||
(set! (-> self result) (the-as mc-status-code (mc-check-result)))
|
||||
(case (-> self result)
|
||||
(((mc-status-code busy))
|
||||
@@ -1550,8 +1542,7 @@
|
||||
|
||||
(defstate save (auto-save)
|
||||
:virtual #t
|
||||
:code
|
||||
(behavior ()
|
||||
:code (behavior ()
|
||||
(cond
|
||||
((zero? (-> self info formatted))
|
||||
(go-virtual error (mc-status-code no-format))
|
||||
@@ -1590,7 +1581,7 @@
|
||||
(suspend)
|
||||
(goto cfg-7)
|
||||
)
|
||||
(while #t
|
||||
(loop
|
||||
(set! (-> self result) (the-as mc-status-code (mc-check-result)))
|
||||
(let ((v1-24 (-> self result)))
|
||||
(set! gp-0 (cond
|
||||
@@ -1627,8 +1618,7 @@
|
||||
|
||||
(defstate restore (auto-save)
|
||||
:virtual #t
|
||||
:code
|
||||
(behavior ()
|
||||
:code (behavior ()
|
||||
(local-vars (gp-0 object))
|
||||
(cond
|
||||
((zero? (-> self info formatted))
|
||||
@@ -1650,7 +1640,7 @@
|
||||
(suspend)
|
||||
(goto cfg-6)
|
||||
)
|
||||
(while #t
|
||||
(loop
|
||||
(set! (-> self result) (the-as mc-status-code (mc-check-result)))
|
||||
(let ((v1-22 (-> self result)))
|
||||
(set! gp-0 (cond
|
||||
@@ -1689,7 +1679,7 @@
|
||||
(set! (-> *game-info* mode) 'play)
|
||||
(initialize! *game-info* 'game (-> self save) (the-as string #f))
|
||||
(set-master-mode 'game)
|
||||
(add-setting! 'process-mask 'set 0.0 16)
|
||||
(add-setting! 'process-mask 'set 0.0 (process-mask progress))
|
||||
(apply-settings *setting-control*)
|
||||
(dotimes (gp-1 15)
|
||||
(suspend)
|
||||
@@ -1701,22 +1691,18 @@
|
||||
|
||||
(defstate error (auto-save)
|
||||
:virtual #t
|
||||
:event
|
||||
(behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(let ((v1-0 arg2))
|
||||
(the-as object (cond
|
||||
((= v1-0 'progress-allowed?)
|
||||
#t
|
||||
)
|
||||
((= v1-0 'die)
|
||||
(deactivate self)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(the-as object (case event-type
|
||||
(('progress-allowed?)
|
||||
#t
|
||||
)
|
||||
(('die)
|
||||
(the-as symbol (deactivate self))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
:code
|
||||
(behavior ((arg0 mc-status-code))
|
||||
:code (behavior ((arg0 mc-status-code))
|
||||
(if (-> self buffer)
|
||||
(reserve-free *art-control* (-> self buffer))
|
||||
)
|
||||
@@ -1751,8 +1737,7 @@
|
||||
|
||||
(defstate done (auto-save)
|
||||
:virtual #t
|
||||
:code
|
||||
(behavior ()
|
||||
:code (behavior ()
|
||||
(if (and (-> self buffer) (-> *art-control* reserve-buffer))
|
||||
(reserve-free *art-control* (-> self buffer))
|
||||
)
|
||||
@@ -1795,19 +1780,14 @@
|
||||
)
|
||||
|
||||
(defun auto-save-check ()
|
||||
(when (and (-> *setting-control* current auto-save)
|
||||
(not (handle->process (-> *game-info* auto-save-proc)))
|
||||
)
|
||||
(when (and (-> *setting-control* current auto-save) (not (handle->process (-> *game-info* auto-save-proc))))
|
||||
(mc-get-slot-info 0 *auto-save-info*)
|
||||
(if (and (nonzero? (-> *auto-save-info* known))
|
||||
(or (zero? (-> *auto-save-info* handle))
|
||||
(!= (-> *auto-save-info* handle) (-> *game-info* auto-save-card))
|
||||
)
|
||||
(or (zero? (-> *auto-save-info* handle)) (!= (-> *auto-save-info* handle) (-> *game-info* auto-save-card)))
|
||||
)
|
||||
(auto-save-command 'error 0 0 *default-pool*)
|
||||
)
|
||||
)
|
||||
(auto-save-command 'error 0 0 *default-pool*)
|
||||
)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
|
||||
@@ -513,7 +513,7 @@
|
||||
)
|
||||
|
||||
(defbehavior target-powerup-process target ()
|
||||
(dummy-10 (-> self water))
|
||||
(water-control-method-10 (-> self water))
|
||||
(when (not *weather-off*)
|
||||
(case (-> self current-level name)
|
||||
(('swamp)
|
||||
|
||||
@@ -44,11 +44,11 @@
|
||||
(projectile-dissipate () _type_ :state 21)
|
||||
(projectile-impact () _type_ :state 22)
|
||||
(projectile-moving () _type_ :state 23)
|
||||
(dummy-24 (_type_) none 24)
|
||||
(dummy-25 (_type_) none 25)
|
||||
(dummy-26 (_type_) none 26)
|
||||
(dummy-27 (_type_) none 27)
|
||||
(dummy-28 (_type_) none 28)
|
||||
(projectile-method-24 (_type_) none 24)
|
||||
(projectile-method-25 (_type_) none 25)
|
||||
(projectile-method-26 (_type_) none 26)
|
||||
(projectile-method-27 (_type_) none 27)
|
||||
(projectile-method-28 (_type_) none 28)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -73,10 +73,3 @@
|
||||
:size-assert #x1a4
|
||||
:flag-assert #x1d014001a4
|
||||
)
|
||||
|
||||
|
||||
0
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -143,7 +143,7 @@
|
||||
(set! sv-80 (logior sv-80 16))
|
||||
)
|
||||
(set! sv-224 (< (fabs (-> arg0 surface-angle)) (-> *pat-mode-info* (-> arg0 cur-pat mode) wall-angle)))
|
||||
(if (zero? (logand (-> arg0 prev-status) (cshape-moving-flags onsurf)))
|
||||
(if (not (logtest? (-> arg0 prev-status) (cshape-moving-flags onsurf)))
|
||||
(set! (-> arg0 ground-impact-vel) (- (vector-dot (-> arg0 transv) (-> arg0 dynam gravity-normal))))
|
||||
)
|
||||
(set! sv-80 (logior sv-80 4))
|
||||
@@ -176,7 +176,7 @@
|
||||
|
||||
(defpartgroup group-yellow-eco-fireball
|
||||
:id 102
|
||||
:duration 300
|
||||
:duration (seconds 1)
|
||||
:bounds (static-bspherem 0 0 0 3)
|
||||
:parts ((sp-item 349 :flags (launch-asap) :binding 350)
|
||||
(sp-item 350 :flags (start-dead launch-asap) :binding 351)
|
||||
@@ -316,7 +316,7 @@
|
||||
|
||||
(defpartgroup group-part-yellow-eco-fireball-launcher
|
||||
:id 103
|
||||
:duration 600
|
||||
:duration (seconds 2)
|
||||
:bounds (static-bspherem 0 0 0 6)
|
||||
:parts ((sp-item 355 :flags (launch-asap))
|
||||
(sp-item 356 :flags (bit1) :period 630 :length 15)
|
||||
@@ -487,7 +487,7 @@
|
||||
|
||||
(defpartgroup group-part-yellow-eco-fireball-hit
|
||||
:id 104
|
||||
:duration 600
|
||||
:duration (seconds 2)
|
||||
:flags (use-local-clock)
|
||||
:bounds (static-bspherem 0 0 0 6)
|
||||
:parts ((sp-item 2059 :period 600 :length 5)
|
||||
@@ -591,46 +591,46 @@
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod dummy-24 projectile ((obj projectile))
|
||||
(defmethod projectile-method-24 projectile ((obj projectile))
|
||||
(spawn (-> obj part) (the-as vector (-> obj root-override root-prim prim-core)))
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod dummy-28 projectile ((obj projectile))
|
||||
(defmethod projectile-method-28 projectile ((obj projectile))
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(defstate projectile-moving (projectile)
|
||||
:virtual #t
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('touched)
|
||||
(when (-> self attack-mode)
|
||||
(when (cond
|
||||
((= (-> arg0 type) target)
|
||||
(send-event arg0 'attack (-> arg3 param 0) (static-attack-info ((mode (-> self attack-mode)))))
|
||||
((= (-> proc type) target)
|
||||
(send-event proc 'attack (-> event param 0) (static-attack-info ((mode (-> self attack-mode)))))
|
||||
)
|
||||
(else
|
||||
(let ((a1-2 (new 'stack-no-clear 'event-message-block)))
|
||||
(set! (-> a1-2 from) self)
|
||||
(set! (-> a1-2 num-params) 4)
|
||||
(set! (-> a1-2 message) 'attack)
|
||||
(set! (-> a1-2 param 0) (-> arg3 param 0))
|
||||
(set! (-> a1-2 param 0) (-> event param 0))
|
||||
(set! (-> a1-2 param 1) (the-as uint (-> self attack-mode)))
|
||||
(let ((v1-13 (+ *global-attack-id* 1)))
|
||||
(set! *global-attack-id* v1-13)
|
||||
(set! (-> a1-2 param 2) (the-as uint v1-13))
|
||||
)
|
||||
(set! (-> a1-2 param 3) (the-as uint 0))
|
||||
(send-event-function arg0 a1-2)
|
||||
(send-event-function proc a1-2)
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((v1-14 (-> self notify-handle)))
|
||||
(if (handle->process v1-14)
|
||||
(send-event (-> v1-14 process 0) 'notify 'attack arg0)
|
||||
(send-event (-> v1-14 process 0) 'notify 'attack proc)
|
||||
)
|
||||
)
|
||||
(+! (-> self hits) 1)
|
||||
@@ -658,7 +658,7 @@
|
||||
(if gp-0
|
||||
(go-virtual projectile-impact)
|
||||
)
|
||||
(dummy-28 self)
|
||||
(projectile-method-28 self)
|
||||
((-> self update-velocity) self)
|
||||
(when (logtest? (-> self options) 2)
|
||||
(seek! (-> self tween) 1.0 (* 0.5 (-> *display* seconds-per-frame)))
|
||||
@@ -699,7 +699,7 @@
|
||||
)
|
||||
(set-time-ratios *display* (the float s5-0))
|
||||
)
|
||||
(dummy-24 self)
|
||||
(projectile-method-24 self)
|
||||
(suspend)
|
||||
)
|
||||
)
|
||||
@@ -792,12 +792,12 @@
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod dummy-27 projectile ((obj projectile))
|
||||
(defmethod projectile-method-27 projectile ((obj projectile))
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod dummy-26 projectile ((obj projectile))
|
||||
(defmethod projectile-method-26 projectile ((obj projectile))
|
||||
(let ((s5-0 (new 'process 'collide-shape-moving obj (collide-list-enum hit-by-player))))
|
||||
(set! (-> s5-0 dynam) (copy *standard-dynamics* 'process))
|
||||
(set! (-> s5-0 reaction) projectile-collision-reaction)
|
||||
@@ -822,7 +822,7 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod dummy-25 projectile ((obj projectile))
|
||||
(defmethod projectile-method-25 projectile ((obj projectile))
|
||||
(go (method-of-object obj projectile-moving))
|
||||
0
|
||||
(none)
|
||||
@@ -864,7 +864,7 @@
|
||||
(countdown (v1-4 16)
|
||||
(set! (-> self old-dist v1-4) 4095996000.0)
|
||||
)
|
||||
(dummy-26 self)
|
||||
(projectile-method-26 self)
|
||||
(set! (-> self root-override dynam gravity y) 1228800.0)
|
||||
(set! (-> self root-override dynam gravity-length) 1228800.0)
|
||||
(set! (-> self root-override dynam gravity-max) 1228800.0)
|
||||
@@ -881,8 +881,8 @@
|
||||
(vector-normalize-copy! (-> self base-vector) arg2 1.0)
|
||||
(vector+float*! (-> self target) (-> self root-override trans) (-> self root-override transv) 2.0)
|
||||
(set! (-> self target-base quad) (-> self target quad))
|
||||
(dummy-27 self)
|
||||
(dummy-24 self)
|
||||
(projectile-method-27 self)
|
||||
(projectile-method-24 self)
|
||||
(when (not (type-type? (-> self type) projectile-blue))
|
||||
(let ((a1-8 (new 'stack-no-clear 'collide-edge-hold-list)))
|
||||
(set! (-> a1-8 num-allocs) (the-as uint 1))
|
||||
@@ -891,11 +891,11 @@
|
||||
)
|
||||
)
|
||||
(set! (-> self event-hook) (-> (method-of-object self projectile-moving) event))
|
||||
(dummy-25 self)
|
||||
(projectile-method-25 self)
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod dummy-27 projectile-yellow ((obj projectile-yellow))
|
||||
(defmethod projectile-method-27 projectile-yellow ((obj projectile-yellow))
|
||||
(cpad-set-buzz! (-> *cpad-list* cpads 0) 1 204 (seconds 0.1))
|
||||
(set! (-> obj attack-mode) 'eco-yellow)
|
||||
(set! (-> obj mode) 1)
|
||||
@@ -922,7 +922,7 @@
|
||||
)
|
||||
(sound-play "yellow-fire")
|
||||
(set! (-> obj sound-id) (sound-play "yellow-buzz"))
|
||||
(if (zero? (logand (-> obj options) 416))
|
||||
(if (not (logtest? (-> obj options) 416))
|
||||
(process-spawn part-tracker :init part-tracker-init (-> *part-group-id-table* 103) -1 #f #f #f s5-0 :to obj)
|
||||
)
|
||||
(set! (-> *part-id-table* 350 init-specs 2 initial-valuef) f30-0)
|
||||
@@ -942,7 +942,7 @@
|
||||
(logior! (-> obj root-override root-prim collide-with) (collide-kind water))
|
||||
)
|
||||
(('ogre)
|
||||
(when (zero? (logand (-> obj options) 128))
|
||||
(when (not (logtest? (-> obj options) 128))
|
||||
(set! (-> obj water) (new 'process 'water-control obj 0 0.0 8192.0 2048.0))
|
||||
(set! (-> obj water flags) (water-flags wt01 wt04 wt07))
|
||||
(set! (-> obj water height) 129024.0)
|
||||
@@ -962,15 +962,15 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod dummy-26 projectile-yellow ((obj projectile-yellow))
|
||||
(let ((t9-0 (method-of-type projectile dummy-26)))
|
||||
(defmethod projectile-method-26 projectile-yellow ((obj projectile-yellow))
|
||||
(let ((t9-0 (method-of-type projectile projectile-method-26)))
|
||||
(t9-0 obj)
|
||||
)
|
||||
(logior! (-> obj root-override root-prim collide-with) (collide-kind mother-spider))
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod dummy-24 projectile-yellow ((obj projectile-yellow))
|
||||
(defmethod projectile-method-24 projectile-yellow ((obj projectile-yellow))
|
||||
(with-pp
|
||||
(find-ground-and-draw-shadow
|
||||
(-> obj root-override trans)
|
||||
@@ -1024,7 +1024,7 @@
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod dummy-28 projectile-yellow ((obj projectile-yellow))
|
||||
(defmethod projectile-method-28 projectile-yellow ((obj projectile-yellow))
|
||||
(cond
|
||||
((or (not (handle->process (-> obj last-target)))
|
||||
(zero? (-> (the-as target (handle->process (-> obj last-target))) control root-prim prim-core collide-as))
|
||||
@@ -1103,7 +1103,7 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod dummy-27 projectile-blue ((obj projectile-blue))
|
||||
(defmethod projectile-method-27 projectile-blue ((obj projectile-blue))
|
||||
(cpad-set-buzz! (-> *cpad-list* cpads 0) 1 204 (seconds 0.1))
|
||||
(sound-play "blue-eco-on")
|
||||
(set! (-> obj mode) 2)
|
||||
@@ -1129,7 +1129,7 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod dummy-26 projectile-blue ((obj projectile-blue))
|
||||
(defmethod projectile-method-26 projectile-blue ((obj projectile-blue))
|
||||
(let ((s5-0 (new 'process 'collide-shape-moving obj (collide-list-enum hit-by-player))))
|
||||
(set! (-> s5-0 dynam) (copy *standard-dynamics* 'process))
|
||||
(set! (-> s5-0 reaction) projectile-collision-reaction)
|
||||
@@ -1203,7 +1203,7 @@
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod dummy-28 projectile-blue ((obj projectile-blue))
|
||||
(defmethod projectile-method-28 projectile-blue ((obj projectile-blue))
|
||||
(let* ((s5-0 (handle->process (-> obj last-target)))
|
||||
(v1-4 (if (and (nonzero? s5-0) (type-type? (-> s5-0 type) process-drawable))
|
||||
s5-0
|
||||
@@ -1221,7 +1221,7 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod dummy-24 projectile-blue ((obj projectile-blue))
|
||||
(defmethod projectile-method-24 projectile-blue ((obj projectile-blue))
|
||||
(if (rand-vu-percent? 0.75)
|
||||
(eco-blue-glow (the-as vector (-> obj root-override root-prim prim-core)))
|
||||
)
|
||||
@@ -1244,7 +1244,3 @@
|
||||
(none)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -102,8 +102,8 @@
|
||||
:size-assert #x10
|
||||
:flag-assert #xc00000010
|
||||
(:methods
|
||||
(dummy-9 (_type_) none 9)
|
||||
(TODO-RENAME-10 (_type_ vector time-frame float process-drawable) vector 10)
|
||||
(ambient-control-method-9 (_type_) none 9)
|
||||
(ambient-control-method-10 (_type_ vector time-frame float process-drawable) vector 10)
|
||||
(play-ambient (_type_ string symbol vector) symbol 11)
|
||||
)
|
||||
)
|
||||
@@ -155,26 +155,26 @@
|
||||
(idle () _type_ :state 30)
|
||||
(get-art-elem (_type_) art-element 31)
|
||||
(play-anim! (_type_ symbol) basic 32)
|
||||
(dummy-33 (_type_) none 33)
|
||||
(process-taskable-method-33 (_type_) none 33)
|
||||
(get-accept-anim (_type_ symbol) spool-anim 34)
|
||||
(push-accept-anim (_type_) none 35)
|
||||
(get-reject-anim (_type_ symbol) spool-anim 36)
|
||||
(push-reject-anim (_type_) none 37)
|
||||
(dummy-38 (_type_) none 38)
|
||||
(process-taskable-method-38 (_type_) none 38)
|
||||
(should-display? (_type_) symbol 39)
|
||||
(dummy-40 (_type_ object skeleton-group int int vector int) none 40)
|
||||
(process-taskable-method-40 (_type_ object skeleton-group int int vector int) none 40)
|
||||
(initialize-collision (_type_ int vector) none 41)
|
||||
(dummy-42 (_type_) none 42)
|
||||
(TODO-RENAME-43 (_type_) symbol 43)
|
||||
(process-taskable-method-42 (_type_) none 42)
|
||||
(process-taskable-method-43 (_type_) symbol 43)
|
||||
(play-reminder (_type_) symbol 44)
|
||||
(dummy-45 (_type_) symbol 45)
|
||||
(dummy-46 (_type_) none 46)
|
||||
(process-taskable-method-45 (_type_) symbol 45)
|
||||
(process-taskable-method-46 (_type_) none 46)
|
||||
(target-above-threshold? (_type_) symbol 47)
|
||||
(draw-npc-shadow (_type_) none 48)
|
||||
(hidden-other () _type_ :state 49)
|
||||
(TODO-RENAME-50 (_type_) symbol 50)
|
||||
(process-taskable-method-50 (_type_) symbol 50)
|
||||
(close-anim-file! (_type_) symbol 51)
|
||||
(dummy-52 (_type_) none 52)
|
||||
(process-taskable-method-52 (_type_) none 52)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
@@ -15,32 +15,34 @@
|
||||
(not-found 4)
|
||||
)
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
;; A path-control is a curve that can be loaded from res-lump/entities.
|
||||
(deftype path-control (basic)
|
||||
((flags path-control-flag :offset-assert 4)
|
||||
(name symbol :offset-assert 8)
|
||||
(process process-drawable :offset-assert 12)
|
||||
(curve curve :inline :offset-assert 16)
|
||||
(num-cverts int32 :offset 20)
|
||||
(cverts (inline-array vector) :score 100 :offset 16)
|
||||
((flags path-control-flag :offset-assert 4)
|
||||
(name symbol :offset-assert 8)
|
||||
(process process-drawable :offset-assert 12)
|
||||
(curve curve :inline :offset-assert 16)
|
||||
(num-cverts int32 :offset 20)
|
||||
(cverts (inline-array vector) :offset 16)
|
||||
)
|
||||
:method-count-assert 21
|
||||
:size-assert #x24
|
||||
:flag-assert #x1500000024
|
||||
(:methods
|
||||
(new (symbol type process symbol float) _type_)
|
||||
(dummy-9 (_type_) none 9)
|
||||
(new (symbol type process symbol float) _type_ 0)
|
||||
(debug-draw (_type_) none 9)
|
||||
(eval-path-curve-div! (_type_ vector float symbol) vector 10)
|
||||
(get-random-point (_type_ vector) vector 11)
|
||||
(TODO-RENAME-12 (_type_ vector float) vector 12)
|
||||
(path-control-method-12 (_type_ vector float) vector 12)
|
||||
(eval-path-curve! (_type_ vector float symbol) vector 13)
|
||||
(TODO-RENAME-14 (_type_ vector float) vector 14)
|
||||
(path-control-method-14 (_type_ vector float) vector 14)
|
||||
(length-as-float (_type_) float 15)
|
||||
(path-distance (_type_) float 16)
|
||||
(get-num-verts (_type_) int 17)
|
||||
(should-display? (_type_) symbol 18)
|
||||
(TODO-RENAME-19 (_type_) float 19)
|
||||
(TODO-RENAME-20 (_type_) float 20)
|
||||
(path-control-method-19 (_type_) float 19)
|
||||
(path-control-method-20 (_type_) float 20)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -51,8 +53,8 @@
|
||||
:size-assert #x24
|
||||
:flag-assert #x1500000024
|
||||
(:methods
|
||||
(new (symbol type process symbol float) _type_ 0)
|
||||
)
|
||||
(new (symbol type process symbol float) _type_ 0)
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod new path-control ((allocation symbol) (type-to-make type) (proc process) (name symbol) (time float))
|
||||
@@ -122,7 +124,7 @@
|
||||
(let ((obj (object-new allocation type-to-make (the-as int (-> type-to-make size)))))
|
||||
(set! (-> obj process) (the-as process-drawable proc))
|
||||
(set! (-> obj name) name)
|
||||
(let* ((ent (the-as entity (-> proc entity)))
|
||||
(let* ((ent (-> proc entity))
|
||||
(v1-2 name)
|
||||
(s2-0 (cond
|
||||
((= v1-2 'path)
|
||||
@@ -136,7 +138,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((lookup-entity (entity-actor-lookup ent 'path-actor 0)))
|
||||
(if lookup-entity
|
||||
@@ -162,4 +164,3 @@
|
||||
obj
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(defmethod dummy-9 path-control ((obj path-control))
|
||||
(defmethod debug-draw path-control ((obj path-control))
|
||||
(cond
|
||||
((logtest? (-> obj flags) (path-control-flag not-found))
|
||||
(when (and (type-type? (-> obj process type) process-drawable) *display-entity-errors*)
|
||||
@@ -162,8 +162,8 @@
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod TODO-RENAME-12 path-control ((obj path-control) (arg0 vector) (arg1 float))
|
||||
(when (zero? (logand (-> obj flags) (path-control-flag not-found)))
|
||||
(defmethod path-control-method-12 path-control ((obj path-control) (arg0 vector) (arg1 float))
|
||||
(when (not (logtest? (-> obj flags) (path-control-flag not-found)))
|
||||
(let ((v1-3 (-> obj curve num-cverts))
|
||||
(f0-3 (the float (the int arg1)))
|
||||
)
|
||||
@@ -184,12 +184,12 @@
|
||||
(vector-normalize! arg0 1.0)
|
||||
)
|
||||
|
||||
(defmethod TODO-RENAME-14 path-control ((obj path-control) (arg0 vector) (arg1 float))
|
||||
(TODO-RENAME-12 obj arg0 (* arg1 (the float (+ (-> obj curve num-cverts) -1))))
|
||||
(defmethod path-control-method-14 path-control ((obj path-control) (arg0 vector) (arg1 float))
|
||||
(path-control-method-12 obj arg0 (* arg1 (the float (+ (-> obj curve num-cverts) -1))))
|
||||
)
|
||||
|
||||
(defmethod TODO-RENAME-14 curve-control ((obj curve-control) (arg0 vector) (arg1 float))
|
||||
(when (zero? (logand (-> obj flags) (path-control-flag not-found)))
|
||||
(defmethod path-control-method-14 curve-control ((obj curve-control) (arg0 vector) (arg1 float))
|
||||
(when (not (logtest? (-> obj flags) (path-control-flag not-found)))
|
||||
(let ((s4-0 (new 'stack-no-clear 'vector)))
|
||||
(curve-evaluate!
|
||||
arg0
|
||||
@@ -228,11 +228,11 @@
|
||||
(vector-normalize! arg0 1.0)
|
||||
)
|
||||
|
||||
(defmethod TODO-RENAME-12 curve-control ((obj curve-control) (arg0 vector) (arg1 float))
|
||||
(TODO-RENAME-14 obj arg0 (/ arg1 (the float (+ (-> obj curve num-cverts) -1))))
|
||||
(defmethod path-control-method-12 curve-control ((obj curve-control) (arg0 vector) (arg1 float))
|
||||
(path-control-method-14 obj arg0 (/ arg1 (the float (+ (-> obj curve num-cverts) -1))))
|
||||
)
|
||||
|
||||
(defmethod TODO-RENAME-19 path-control ((obj path-control))
|
||||
(defmethod path-control-method-19 path-control ((obj path-control))
|
||||
(let ((s5-0 (new 'stack-no-clear 'vector))
|
||||
(s4-0 (new 'stack-no-clear 'vector))
|
||||
(s3-0 (new 'stack-no-clear 'vector))
|
||||
@@ -262,11 +262,11 @@
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod TODO-RENAME-20 path-control ((obj path-control))
|
||||
(/ (TODO-RENAME-19 obj) (the float (+ (-> obj curve num-cverts) -1)))
|
||||
(defmethod path-control-method-20 path-control ((obj path-control))
|
||||
(/ (path-control-method-19 obj) (the float (+ (-> obj curve num-cverts) -1)))
|
||||
)
|
||||
|
||||
(defmethod dummy-9 curve-control ((obj curve-control))
|
||||
(defmethod debug-draw curve-control ((obj curve-control))
|
||||
(cond
|
||||
((logtest? (-> obj flags) (path-control-flag not-found))
|
||||
(when (and (type-type? (-> obj process type) process-drawable) *display-entity-errors*)
|
||||
@@ -319,7 +319,3 @@
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -21,9 +21,9 @@
|
||||
:size-assert #x18
|
||||
:flag-assert #xc00000018
|
||||
(:methods
|
||||
(dummy-9 (_type_ symbol vector-array vector-array) symbol 9)
|
||||
(init-vol! (_type_ symbol vector-array vector-array) symbol 9)
|
||||
(debug-draw (_type_) none 10)
|
||||
(dummy-11 (_type_ vector float) symbol 11)
|
||||
(point-in-vol? (_type_ vector float) symbol 11)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -43,9 +43,9 @@
|
||||
:flag-assert #xc0000061c
|
||||
(:methods
|
||||
(new (symbol type process-drawable) _type_ 0)
|
||||
(dummy-9 (_type_) symbol 9)
|
||||
(dummy-10 (_type_ vector) symbol 10)
|
||||
(TODO-RENAME-11 (_type_) symbol 11)
|
||||
(init! (_type_) symbol 9)
|
||||
(point-in-vol? (_type_ vector) symbol 10)
|
||||
(vol-control-method-11 (_type_) symbol 11)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -107,10 +107,6 @@
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod TODO-RENAME-11 vol-control ((obj vol-control))
|
||||
(defmethod vol-control-method-11 vol-control ((obj vol-control))
|
||||
(and *display-vol-marks* (logtest? (-> obj flags) 1))
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -18,18 +18,7 @@
|
||||
)
|
||||
)
|
||||
|
||||
;; WARN: Stack slot offset 148 signed mismatch
|
||||
;; WARN: Stack slot offset 148 signed mismatch
|
||||
;; WARN: Stack slot offset 148 signed mismatch
|
||||
;; WARN: Stack slot offset 148 signed mismatch
|
||||
;; WARN: Stack slot offset 148 signed mismatch
|
||||
;; WARN: Stack slot offset 148 signed mismatch
|
||||
;; WARN: Stack slot offset 148 signed mismatch
|
||||
;; WARN: Stack slot offset 148 signed mismatch
|
||||
;; WARN: Stack slot offset 148 signed mismatch
|
||||
;; WARN: Stack slot offset 148 signed mismatch
|
||||
;; WARN: Stack slot offset 148 signed mismatch
|
||||
(defmethod dummy-9 plane-volume ((obj plane-volume) (arg0 symbol) (arg1 vector-array) (arg2 vector-array))
|
||||
(defmethod init-vol! plane-volume ((obj plane-volume) (arg0 symbol) (arg1 vector-array) (arg2 vector-array))
|
||||
(local-vars
|
||||
(sv-144 vector)
|
||||
(sv-148 float)
|
||||
@@ -161,10 +150,7 @@
|
||||
(set! (-> arg2 data (-> arg2 length) quad) (-> s1-0 quad))
|
||||
(set! (-> arg2 data (+ (-> arg2 length) 1) quad) (-> s2-0 s3-0 quad))
|
||||
(+! (-> arg2 length) 2)
|
||||
(let ((v1-112 (+ (-> obj normal-count) 2)))
|
||||
(set! (-> obj normal-count) v1-112)
|
||||
v1-112
|
||||
)
|
||||
(set! (-> obj normal-count) (+ (-> obj normal-count) 2))
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -206,7 +192,7 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod dummy-11 plane-volume ((obj plane-volume) (arg0 vector) (arg1 float))
|
||||
(defmethod point-in-vol? plane-volume ((obj plane-volume) (arg0 vector) (arg1 float))
|
||||
(dotimes (v1-0 (-> obj num-planes))
|
||||
(if (< arg1 (- (vector-dot arg0 (the-as vector (-> obj plane v1-0))) (the-as float (-> obj plane v1-0 w))))
|
||||
(return #f)
|
||||
@@ -215,7 +201,7 @@
|
||||
#t
|
||||
)
|
||||
|
||||
(defmethod dummy-9 vol-control ((obj vol-control))
|
||||
(defmethod init! vol-control ((obj vol-control))
|
||||
(with-pp
|
||||
(let ((a0-1 obj))
|
||||
(when (and (and *display-vol-marks* (logtest? (-> a0-1 flags) 1)) (logtest? (-> obj flags) 2))
|
||||
@@ -237,10 +223,10 @@
|
||||
(set! (-> obj debug-point length) 0)
|
||||
(set! (-> obj debug-normal length) 0)
|
||||
(dotimes (s5-1 (-> obj pos-vol-count))
|
||||
(dummy-9 (-> obj pos-vol s5-1) 'vol (-> obj debug-point) (-> obj debug-normal))
|
||||
(init-vol! (-> obj pos-vol s5-1) 'vol (-> obj debug-point) (-> obj debug-normal))
|
||||
)
|
||||
(dotimes (s5-2 (-> obj neg-vol-count))
|
||||
(dummy-9 (-> obj neg-vol s5-2) 'vol (-> obj debug-point) (-> obj debug-normal))
|
||||
(init-vol! (-> obj neg-vol s5-2) 'vol (-> obj debug-point) (-> obj debug-normal))
|
||||
)
|
||||
)
|
||||
(dotimes (s5-3 (-> obj pos-vol-count))
|
||||
@@ -255,20 +241,16 @@
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod dummy-10 vol-control ((obj vol-control) (arg0 vector))
|
||||
(defmethod point-in-vol? vol-control ((obj vol-control) (arg0 vector))
|
||||
(dotimes (s4-0 (-> obj neg-vol-count))
|
||||
(if (dummy-11 (-> obj neg-vol s4-0) arg0 0.0)
|
||||
(if (point-in-vol? (-> obj neg-vol s4-0) arg0 0.0)
|
||||
(return #f)
|
||||
)
|
||||
)
|
||||
(dotimes (s4-1 (-> obj pos-vol-count))
|
||||
(if (dummy-11 (-> obj pos-vol s4-1) arg0 0.0)
|
||||
(if (point-in-vol? (-> obj pos-vol s4-1) arg0 0.0)
|
||||
(return #t)
|
||||
)
|
||||
)
|
||||
#f
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1849,434 +1849,353 @@
|
||||
(defmethod execute-command load-state ((obj load-state) (arg0 pair))
|
||||
(local-vars (v1-26 int) (v1-57 int))
|
||||
(with-pp
|
||||
(cond
|
||||
((null? arg0)
|
||||
)
|
||||
((pair? arg0)
|
||||
(let ((v1-4 (car arg0))
|
||||
(gp-0 (cdr arg0))
|
||||
)
|
||||
(cond
|
||||
((= v1-4 'set!)
|
||||
(let ((s5-1 (command-get-param (car gp-0) #f)))
|
||||
(if s5-1
|
||||
(set!
|
||||
(-> (the-as symbol s5-1) value)
|
||||
(command-get-param (car (cdr gp-0)) #f)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
((= v1-4 'eval)
|
||||
((the-as (function int) (command-get-param (car gp-0) #f)))
|
||||
)
|
||||
((= v1-4 'want-vis)
|
||||
(want-vis obj (the-as symbol (command-get-param (car gp-0) #f)))
|
||||
)
|
||||
((= v1-4 'want-levels)
|
||||
(want-levels
|
||||
obj
|
||||
(the-as symbol (command-get-param (car gp-0) #f))
|
||||
(the-as symbol (command-get-param (car (cdr gp-0)) #f))
|
||||
)
|
||||
)
|
||||
((= v1-4 'display-level)
|
||||
(want-display-level
|
||||
obj
|
||||
(the-as symbol (command-get-param (car gp-0) #f))
|
||||
(the-as symbol (command-get-param (car (cdr gp-0)) #f))
|
||||
)
|
||||
)
|
||||
((= v1-4 'want-force-vis)
|
||||
(want-force-vis
|
||||
obj
|
||||
(the-as symbol (command-get-param (car gp-0) #f))
|
||||
(the-as symbol (command-get-param (car (cdr gp-0)) #f))
|
||||
)
|
||||
)
|
||||
((= v1-4 'want-force-inside)
|
||||
(set-force-inside!
|
||||
obj
|
||||
(the-as symbol (command-get-param (car gp-0) #f))
|
||||
(the-as symbol (command-get-param (car (cdr gp-0)) #f))
|
||||
)
|
||||
)
|
||||
((= v1-4 'alive)
|
||||
(let ((s4-5 (command-get-param (car gp-0) #f)))
|
||||
(when s4-5
|
||||
(let ((gp-1 (entity-by-name (the-as string s4-5))))
|
||||
(when gp-1
|
||||
(dotimes (v1-25 256)
|
||||
(when (not (-> obj object-name v1-25))
|
||||
(set! (-> obj object-name v1-25) (the-as symbol s4-5))
|
||||
(set!
|
||||
(-> obj object-status v1-25)
|
||||
(the-as basic (-> gp-1 extra perm status))
|
||||
)
|
||||
(set! v1-26 v1-25)
|
||||
(goto cfg-29)
|
||||
)
|
||||
(cond
|
||||
((null? arg0)
|
||||
)
|
||||
((pair? arg0)
|
||||
(let ((v1-4 (car arg0))
|
||||
(gp-0 (cdr arg0))
|
||||
)
|
||||
(set! v1-26 -1)
|
||||
(label cfg-29)
|
||||
(when (>= v1-26 0)
|
||||
(entity-birth-no-kill gp-1)
|
||||
(let ((a0-45 (-> gp-1 extra process)))
|
||||
(when a0-45
|
||||
(logclear! (-> a0-45 mask) (process-mask actor-pause))
|
||||
(logclear!
|
||||
(-> a0-45 mask)
|
||||
(-> *kernel-context* prevent-from-run)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
((= v1-4 'dead)
|
||||
(let ((s3-4 (command-get-param (car gp-0) #f)))
|
||||
(when s3-4
|
||||
(let ((s4-6 (entity-by-name (the-as string s3-4))))
|
||||
(when s4-6
|
||||
(dotimes (gp-2 256)
|
||||
(when
|
||||
(string=
|
||||
(the-as string (-> obj object-name gp-2))
|
||||
(the-as string s3-4)
|
||||
)
|
||||
(set!
|
||||
(-> s4-6 extra perm status)
|
||||
(the-as entity-perm-status (-> obj object-status gp-2))
|
||||
)
|
||||
(if (-> s4-6 extra process)
|
||||
(kill! s4-6)
|
||||
)
|
||||
(set! (-> obj object-name gp-2) #f)
|
||||
(goto cfg-45)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(label cfg-45)
|
||||
)
|
||||
((= v1-4 'kill)
|
||||
(let ((s4-7 (command-get-param (car gp-0) #f)))
|
||||
(when s4-7
|
||||
(let ((gp-3 (entity-by-name (the-as string s4-7))))
|
||||
(when gp-3
|
||||
(dotimes (v1-56 256)
|
||||
(when (not (-> obj object-name v1-56))
|
||||
(set! (-> obj object-name v1-56) (the-as symbol s4-7))
|
||||
(set!
|
||||
(-> obj object-status v1-56)
|
||||
(the-as basic (-> gp-3 extra perm status))
|
||||
)
|
||||
(set! v1-57 v1-56)
|
||||
(goto cfg-56)
|
||||
)
|
||||
)
|
||||
(set! v1-57 -1)
|
||||
(label cfg-56)
|
||||
(when (>= v1-57 0)
|
||||
(if (-> gp-3 extra process)
|
||||
(kill! gp-3)
|
||||
)
|
||||
(logior! (-> gp-3 extra perm status) (entity-perm-status dead))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
((= v1-4 'special)
|
||||
(let ((a0-70 (command-get-param (car gp-0) #f)))
|
||||
(when a0-70
|
||||
(let ((s5-2 (entity-by-name (the-as string a0-70))))
|
||||
(if s5-2
|
||||
(dummy-30
|
||||
(the-as entity-actor s5-2)
|
||||
(entity-perm-status bit-7)
|
||||
(the-as symbol (command-get-param (car (cdr gp-0)) #f))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
((= v1-4 'active)
|
||||
(let ((gp-4 (command-get-param (car gp-0) #f)))
|
||||
(while (!= (level-status *level* (the-as symbol gp-4)) 'active)
|
||||
(suspend)
|
||||
)
|
||||
)
|
||||
)
|
||||
((= v1-4 'part-tracker)
|
||||
(let* ((s5-4 (command-get-param (car gp-0) #f))
|
||||
(a0-81 (command-get-param (car (cdr gp-0)) #f))
|
||||
(gp-5 (entity-by-name (the-as string a0-81)))
|
||||
(s4-9
|
||||
(lookup-part-group-by-name
|
||||
(symbol->string (the-as symbol s5-4))
|
||||
)
|
||||
)
|
||||
(s5-5
|
||||
(if
|
||||
(and
|
||||
(nonzero? s4-9)
|
||||
(type-type? (-> s4-9 type) sparticle-launch-group)
|
||||
(cond
|
||||
((= v1-4 'set!)
|
||||
(let ((s5-1 (command-get-param (car gp-0) #f)))
|
||||
(if s5-1
|
||||
(set! (-> (the-as symbol s5-1) value) (command-get-param (car (cdr gp-0)) #f))
|
||||
)
|
||||
s4-9
|
||||
)
|
||||
)
|
||||
)
|
||||
(when (and gp-5 s5-5)
|
||||
(let* ((s3-6 (-> gp-5 extra process))
|
||||
(s4-10
|
||||
(if
|
||||
(and
|
||||
(nonzero? s3-6)
|
||||
(type-type? (-> s3-6 type) process-drawable)
|
||||
)
|
||||
(the-as process-drawable s3-6)
|
||||
)
|
||||
)
|
||||
(s3-7 (get-process *default-dead-pool* part-tracker #x4000))
|
||||
)
|
||||
(when s3-7
|
||||
(let ((t9-41 (method-of-type part-tracker activate))
|
||||
(a0-86 s3-7)
|
||||
(a1-40 (the process-tree (ppointer->process (-> *setting-control* current movie))))
|
||||
)
|
||||
(set! a1-40
|
||||
(cond
|
||||
(a1-40
|
||||
a1-40
|
||||
)
|
||||
)
|
||||
((= v1-4 'eval)
|
||||
((the-as (function int) (command-get-param (car gp-0) #f)))
|
||||
)
|
||||
((= v1-4 'want-vis)
|
||||
(want-vis obj (the-as symbol (command-get-param (car gp-0) #f)))
|
||||
)
|
||||
((= v1-4 'want-levels)
|
||||
(want-levels
|
||||
obj
|
||||
(the-as symbol (command-get-param (car gp-0) #f))
|
||||
(the-as symbol (command-get-param (car (cdr gp-0)) #f))
|
||||
)
|
||||
)
|
||||
((= v1-4 'display-level)
|
||||
(want-display-level
|
||||
obj
|
||||
(the-as symbol (command-get-param (car gp-0) #f))
|
||||
(the-as symbol (command-get-param (car (cdr gp-0)) #f))
|
||||
)
|
||||
)
|
||||
((= v1-4 'want-force-vis)
|
||||
(want-force-vis
|
||||
obj
|
||||
(the-as symbol (command-get-param (car gp-0) #f))
|
||||
(the-as symbol (command-get-param (car (cdr gp-0)) #f))
|
||||
)
|
||||
)
|
||||
((= v1-4 'want-force-inside)
|
||||
(set-force-inside!
|
||||
obj
|
||||
(the-as symbol (command-get-param (car gp-0) #f))
|
||||
(the-as symbol (command-get-param (car (cdr gp-0)) #f))
|
||||
)
|
||||
)
|
||||
((= v1-4 'alive)
|
||||
(let ((s4-5 (command-get-param (car gp-0) #f)))
|
||||
(when s4-5
|
||||
(let ((gp-1 (entity-by-name (the-as string s4-5))))
|
||||
(when gp-1
|
||||
(dotimes (v1-25 256)
|
||||
(when (not (-> obj object-name v1-25))
|
||||
(set! (-> obj object-name v1-25) (the-as symbol s4-5))
|
||||
(set! (-> obj object-status v1-25) (the-as basic (-> gp-1 extra perm status)))
|
||||
(set! v1-26 v1-25)
|
||||
(goto cfg-29)
|
||||
)
|
||||
(else
|
||||
*entity-pool*
|
||||
)
|
||||
(set! v1-26 -1)
|
||||
(label cfg-29)
|
||||
(when (>= v1-26 0)
|
||||
(entity-birth-no-kill gp-1)
|
||||
(let ((a0-45 (-> gp-1 extra process)))
|
||||
(when a0-45
|
||||
(logclear! (-> a0-45 mask) (process-mask actor-pause))
|
||||
(logclear! (-> a0-45 mask) (-> *kernel-context* prevent-from-run))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(t9-41
|
||||
(the-as part-tracker a0-86)
|
||||
a1-40
|
||||
'part-tracker
|
||||
(the-as pointer #x70004000)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
((= v1-4 'dead)
|
||||
(let ((s3-4 (command-get-param (car gp-0) #f)))
|
||||
(when s3-4
|
||||
(let ((s4-6 (entity-by-name (the-as string s3-4))))
|
||||
(when s4-6
|
||||
(dotimes (gp-2 256)
|
||||
(when (string= (the-as string (-> obj object-name gp-2)) (the-as string s3-4))
|
||||
(set! (-> s4-6 extra perm status) (the-as entity-perm-status (-> obj object-status gp-2)))
|
||||
(if (-> s4-6 extra process)
|
||||
(kill! s4-6)
|
||||
)
|
||||
(set! (-> obj object-name gp-2) #f)
|
||||
(goto cfg-45)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(label cfg-45)
|
||||
)
|
||||
((= v1-4 'kill)
|
||||
(let ((s4-7 (command-get-param (car gp-0) #f)))
|
||||
(when s4-7
|
||||
(let ((gp-3 (entity-by-name (the-as string s4-7))))
|
||||
(when gp-3
|
||||
(dotimes (v1-56 256)
|
||||
(when (not (-> obj object-name v1-56))
|
||||
(set! (-> obj object-name v1-56) (the-as symbol s4-7))
|
||||
(set! (-> obj object-status v1-56) (the-as basic (-> gp-3 extra perm status)))
|
||||
(set! v1-57 v1-56)
|
||||
(goto cfg-56)
|
||||
)
|
||||
)
|
||||
(set! v1-57 -1)
|
||||
(label cfg-56)
|
||||
(when (>= v1-57 0)
|
||||
(if (-> gp-3 extra process)
|
||||
(kill! gp-3)
|
||||
)
|
||||
(logior! (-> gp-3 extra perm status) (entity-perm-status dead))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
((= v1-4 'special)
|
||||
(let ((a0-70 (command-get-param (car gp-0) #f)))
|
||||
(when a0-70
|
||||
(let ((s5-2 (entity-by-name (the-as string a0-70))))
|
||||
(if s5-2
|
||||
(set-or-clear-status!
|
||||
(the-as entity-actor s5-2)
|
||||
(entity-perm-status bit-7)
|
||||
(the-as symbol (command-get-param (car (cdr gp-0)) #f))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
((= v1-4 'active)
|
||||
(let ((gp-4 (command-get-param (car gp-0) #f)))
|
||||
(while (!= (level-status *level* (the-as symbol gp-4)) 'active)
|
||||
(suspend)
|
||||
)
|
||||
)
|
||||
)
|
||||
((= v1-4 'part-tracker)
|
||||
(let* ((s5-4 (command-get-param (car gp-0) #f))
|
||||
(a0-81 (command-get-param (car (cdr gp-0)) #f))
|
||||
(gp-5 (entity-by-name (the-as string a0-81)))
|
||||
(s4-9 (lookup-part-group-by-name (symbol->string (the-as symbol s5-4))))
|
||||
(s5-5 (if (and (nonzero? s4-9) (type-type? (-> s4-9 type) sparticle-launch-group))
|
||||
s4-9
|
||||
)
|
||||
)
|
||||
)
|
||||
(when (and gp-5 s5-5)
|
||||
(let* ((s3-6 (-> gp-5 extra process))
|
||||
(s4-10 (if (and (nonzero? s3-6) (type-type? (-> s3-6 type) process-drawable))
|
||||
(the-as process-drawable s3-6)
|
||||
)
|
||||
)
|
||||
(s3-7 (get-process *default-dead-pool* part-tracker #x4000))
|
||||
)
|
||||
(when s3-7
|
||||
(let ((t9-41 (method-of-type part-tracker activate))
|
||||
(a0-86 s3-7)
|
||||
(a1-40 (ppointer->process (-> *setting-control* current movie)))
|
||||
)
|
||||
(set! a1-40 (cond
|
||||
(a1-40
|
||||
(empty)
|
||||
a1-40
|
||||
)
|
||||
(else
|
||||
*entity-pool*
|
||||
)
|
||||
)
|
||||
)
|
||||
(t9-41 (the-as part-tracker a0-86) a1-40 'part-tracker (the-as pointer #x70004000))
|
||||
)
|
||||
(run-now-in-process s3-7 part-tracker-init s5-5 -1 #f #f #f (if s4-10
|
||||
(-> s4-10 root trans)
|
||||
(-> gp-5 extra trans)
|
||||
)
|
||||
)
|
||||
(-> s3-7 ppointer)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
((= v1-4 'auto-save)
|
||||
(auto-save-command (the-as symbol (command-get-param (car gp-0) #f)) 0 0 *default-pool*)
|
||||
)
|
||||
((= v1-4 'shadow)
|
||||
(let ((s5-7 (command-list-get-process (car gp-0)))
|
||||
(v1-95 (command-get-quoted-param (car (cdr gp-0)) #f))
|
||||
)
|
||||
(send-event s5-7 'shadow v1-95)
|
||||
)
|
||||
)
|
||||
((= v1-4 'time-of-day)
|
||||
(when *time-of-day-proc*
|
||||
(let ((v1-99 (command-get-int (car gp-0) 0)))
|
||||
(cond
|
||||
((< v1-99 0)
|
||||
(set! (-> *time-of-day-proc* 0 time-ratio) 300.0)
|
||||
)
|
||||
(else
|
||||
(set! (-> *time-of-day-proc* 0 hour) v1-99)
|
||||
(set! (-> *time-of-day-proc* 0 minute) 0)
|
||||
(set! (-> *time-of-day-proc* 0 frame) 0)
|
||||
(set! (-> *time-of-day-proc* 0 time-ratio) 0.0)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
((= v1-4 'save)
|
||||
(mem-copy! (&-> *backup-load-state* type) (&-> obj type) 2092)
|
||||
(set! (-> *backup-load-state* command-list) '())
|
||||
(dotimes (v1-112 256)
|
||||
(if (-> *backup-load-state* object-name v1-112)
|
||||
(set! (-> *backup-load-state* object-name v1-112) #f)
|
||||
)
|
||||
)
|
||||
)
|
||||
((= v1-4 'setting-reset)
|
||||
(set-setting! (the-as symbol (command-get-param (car gp-0) #f)) (command-get-param (car (cdr gp-0)) #f) 0.0 0)
|
||||
)
|
||||
((= v1-4 'setting-unset)
|
||||
(remove-setting! (the-as symbol (command-get-param (car gp-0) #f)))
|
||||
)
|
||||
;; PAL patch here
|
||||
((= v1-4 'sfx-volume)
|
||||
(set-setting! 'sfx-volume (command-get-param (car gp-0) #f) (command-get-float (car (cdr gp-0)) 0.0) 0)
|
||||
)
|
||||
(run-now-in-process s3-7 part-tracker-init s5-5 -1 #f #f #f (if s4-10
|
||||
(->
|
||||
s4-10
|
||||
root
|
||||
trans
|
||||
)
|
||||
(->
|
||||
gp-5
|
||||
extra
|
||||
trans
|
||||
)
|
||||
)
|
||||
)
|
||||
(-> s3-7 ppointer)
|
||||
((= v1-4 'blackout)
|
||||
(set-blackout-frames (the-as time-frame (the int (* 5.0000005 (the float (command-get-int (car gp-0) 0))))))
|
||||
)
|
||||
((= v1-4 'teleport)
|
||||
(set! *teleport* #t)
|
||||
)
|
||||
((= v1-4 'joint)
|
||||
(send-event (ppointer->process (-> *setting-control* current movie)) 'joint (command-get-param (car gp-0) #f))
|
||||
(set! *teleport-count* 2)
|
||||
)
|
||||
((= v1-4 'ambient)
|
||||
(ambient-hint-spawn
|
||||
(the-as string (command-get-param (car (cdr gp-0)) #f))
|
||||
(the-as vector #f)
|
||||
*entity-pool*
|
||||
(the-as symbol (command-get-param (car gp-0) #f))
|
||||
)
|
||||
)
|
||||
((= v1-4 'send-event)
|
||||
(let ((s5-13 (command-list-get-process (car gp-0)))
|
||||
(s4-14 (command-get-quoted-param (car (cdr gp-0)) #f))
|
||||
(gp-6 (cdr (cdr gp-0)))
|
||||
)
|
||||
(when (and s5-13 (not (null? s4-14)))
|
||||
(let ((s3-11 (new 'stack-no-clear 'event-message-block)))
|
||||
(set! (-> s3-11 from) pp)
|
||||
(let ((a0-142 gp-6))
|
||||
(set! (-> s3-11 num-params) ((method-of-type (rtype-of a0-142) length) a0-142))
|
||||
)
|
||||
(set! (-> s3-11 message) (the-as symbol s4-14))
|
||||
(set! (-> s3-11 param 0) (the-as uint (command-get-quoted-param (car gp-6) #f)))
|
||||
(set! (-> s3-11 param 1) (the-as uint (command-get-quoted-param (car (cdr gp-6)) #f)))
|
||||
(set! (-> s3-11 param 2) (the-as uint (command-get-quoted-param (car (cdr (cdr gp-6))) #f)))
|
||||
(send-event-function s5-13 s3-11)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
((= v1-4 'auto-save)
|
||||
(auto-save-command
|
||||
(the-as symbol (command-get-param (car gp-0) #f))
|
||||
0
|
||||
0
|
||||
*default-pool*
|
||||
)
|
||||
)
|
||||
((= v1-4 'shadow)
|
||||
(let ((s5-7 (command-list-get-process (car gp-0)))
|
||||
(v1-95 (command-get-quoted-param (car (cdr gp-0)) #f))
|
||||
)
|
||||
(send-event s5-7 'shadow v1-95)
|
||||
)
|
||||
)
|
||||
((= v1-4 'time-of-day)
|
||||
(when *time-of-day-proc*
|
||||
(let ((v1-99 (command-get-int (car gp-0) 0)))
|
||||
(cond
|
||||
((< v1-99 0)
|
||||
(set! (-> *time-of-day-proc* 0 time-ratio) 300.0)
|
||||
)
|
||||
(else
|
||||
(set! (-> *time-of-day-proc* 0 hour) v1-99)
|
||||
(set! (-> *time-of-day-proc* 0 minute) 0)
|
||||
(set! (-> *time-of-day-proc* 0 frame) 0)
|
||||
(set! (-> *time-of-day-proc* 0 time-ratio) 0.0)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
((= v1-4 'save)
|
||||
(mem-copy! (&-> *backup-load-state* type) (&-> obj type) 2092)
|
||||
(set! (-> *backup-load-state* command-list) '())
|
||||
(dotimes (v1-112 256)
|
||||
(if (-> *backup-load-state* object-name v1-112)
|
||||
(set! (-> *backup-load-state* object-name v1-112) #f)
|
||||
)
|
||||
)
|
||||
)
|
||||
((= v1-4 'setting-reset)
|
||||
(set-setting! (the-as symbol (command-get-param (car gp-0) #f)) (command-get-param (car (cdr gp-0)) #f) 0.0 0)
|
||||
)
|
||||
((= v1-4 'setting-unset)
|
||||
(remove-setting! (the-as symbol (command-get-param (car gp-0) #f)))
|
||||
)
|
||||
;; PAL patch here
|
||||
((= v1-4 'sfx-volume)
|
||||
(set-setting! 'sfx-volume (command-get-param (car gp-0) #f) (command-get-float (car (cdr gp-0)) 0.0) 0)
|
||||
)
|
||||
((= v1-4 'blackout)
|
||||
(set-blackout-frames
|
||||
(the int (* 5.0000005 (the float (command-get-int (car gp-0) 0))))
|
||||
)
|
||||
)
|
||||
((= v1-4 'teleport)
|
||||
(set! *teleport* #t)
|
||||
)
|
||||
((= v1-4 'joint)
|
||||
(send-event
|
||||
(ppointer->process (-> *setting-control* current movie))
|
||||
'joint
|
||||
(command-get-param (car gp-0) #f)
|
||||
)
|
||||
(set! *teleport-count* 2)
|
||||
)
|
||||
((= v1-4 'ambient)
|
||||
(ambient-hint-spawn
|
||||
(the-as string (command-get-param (car (cdr gp-0)) #f))
|
||||
(the-as vector #f)
|
||||
*entity-pool*
|
||||
(the-as symbol (command-get-param (car gp-0) #f))
|
||||
)
|
||||
)
|
||||
((= v1-4 'send-event)
|
||||
(let ((s5-13 (command-list-get-process (car gp-0)))
|
||||
(s4-14 (command-get-quoted-param (car (cdr gp-0)) #f))
|
||||
(gp-6 (cdr (cdr gp-0)))
|
||||
)
|
||||
(when (and s5-13 (not (null? s4-14)))
|
||||
(let ((s3-11 (new 'stack-no-clear 'event-message-block)))
|
||||
(set! (-> s3-11 from) pp)
|
||||
(let ((a0-142 gp-6))
|
||||
(set!
|
||||
(-> s3-11 num-params)
|
||||
((method-of-type (rtype-of a0-142) length) a0-142)
|
||||
)
|
||||
)
|
||||
(set! (-> s3-11 message) (the-as symbol s4-14))
|
||||
(set!
|
||||
(-> s3-11 param 0)
|
||||
(the-as uint (command-get-quoted-param (car gp-6) #f))
|
||||
)
|
||||
(set!
|
||||
(-> s3-11 param 1)
|
||||
(the-as uint (command-get-quoted-param (car (cdr gp-6)) #f))
|
||||
)
|
||||
(set!
|
||||
(-> s3-11 param 2)
|
||||
(the-as uint (command-get-quoted-param (car (cdr (cdr gp-6))) #f))
|
||||
)
|
||||
(send-event-function s5-13 s3-11)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
)
|
||||
|
||||
(defun check-boundary ((arg0 load-boundary))
|
||||
(local-vars (s5-0 object))
|
||||
(let ((a1-0 (if (logtest? (-> arg0 flags) (load-boundary-flags player))
|
||||
(-> *load-boundary-target* 1)
|
||||
(-> *load-boundary-target* 0)
|
||||
)
|
||||
)
|
||||
(-> *load-boundary-target* 1)
|
||||
(-> *load-boundary-target* 0)
|
||||
)
|
||||
)
|
||||
(a2-0 (if (logtest? (-> arg0 flags) (load-boundary-flags player))
|
||||
(-> *load-boundary-target* 3)
|
||||
(-> *load-boundary-target* 2)
|
||||
)
|
||||
(-> *load-boundary-target* 3)
|
||||
(-> *load-boundary-target* 2)
|
||||
)
|
||||
)
|
||||
)
|
||||
0
|
||||
(let ((f0-1 (- (-> a1-0 x) (-> arg0 rejector x)))
|
||||
(f1-2 (- (-> a1-0 z) (-> arg0 rejector z)))
|
||||
)
|
||||
(cond
|
||||
((< (+ (* f0-1 f0-1) (* f1-2 f1-2)) (* (-> arg0 rejector w) (-> arg0 rejector w)))
|
||||
(if (logtest? (-> arg0 flags) (load-boundary-flags closed))
|
||||
(set! s5-0 (check-closed-boundary arg0 a1-0 a2-0))
|
||||
(set! s5-0 (check-open-boundary arg0 a1-0 a2-0))
|
||||
)
|
||||
)
|
||||
(else
|
||||
(set! s5-0 0)
|
||||
(goto cfg-28)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((s4-0 (the-as load-boundary-crossing-command #f)))
|
||||
(if (= (the-as symbol s5-0) 1)
|
||||
(set! s4-0 (-> arg0 cmd-fwd))
|
||||
)
|
||||
(if (= (the-as symbol s5-0) 2)
|
||||
(set! s4-0 (-> arg0 cmd-bwd))
|
||||
)
|
||||
(when s4-0
|
||||
(cond
|
||||
((= (-> s4-0 cmd) (load-boundary-cmd vis))
|
||||
(load-state-want-vis (the-as symbol (-> s4-0 lev0)))
|
||||
)
|
||||
((= (-> s4-0 cmd) (load-boundary-cmd load))
|
||||
(load-state-want-levels (the-as symbol (-> s4-0 lev0)) (the-as symbol (-> s4-0 lev1)))
|
||||
)
|
||||
((= (-> s4-0 cmd) (load-boundary-cmd display))
|
||||
(load-state-want-display-level (the-as symbol (-> s4-0 lev0)) (the-as symbol (-> s4-0 lev1)))
|
||||
)
|
||||
((= (-> s4-0 cmd) (load-boundary-cmd force-vis))
|
||||
(load-state-want-force-vis (the-as symbol (-> s4-0 lev0)) (the-as symbol (-> s4-0 lev1)))
|
||||
)
|
||||
((= (-> s4-0 cmd) (load-boundary-cmd checkpt))
|
||||
(format 0 "Setting continue to ~A~%" (-> s4-0 lev0))
|
||||
(set-continue! *game-info* (-> s4-0 lev0))
|
||||
)
|
||||
)
|
||||
0
|
||||
(let ((f0-1 (- (-> a1-0 x) (-> arg0 rejector x)))
|
||||
(f1-2 (- (-> a1-0 z) (-> arg0 rejector z)))
|
||||
)
|
||||
(cond
|
||||
((<
|
||||
(+ (* f0-1 f0-1) (* f1-2 f1-2))
|
||||
(* (-> arg0 rejector w) (-> arg0 rejector w))
|
||||
)
|
||||
(if (logtest? (-> arg0 flags) (load-boundary-flags closed))
|
||||
(set! s5-0 (check-closed-boundary arg0 a1-0 a2-0))
|
||||
(set! s5-0 (check-open-boundary arg0 a1-0 a2-0))
|
||||
)
|
||||
)
|
||||
(else
|
||||
(set! s5-0 0)
|
||||
(goto cfg-28)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((s4-0 (the-as load-boundary-crossing-command #f)))
|
||||
(if (= (the-as symbol s5-0) 1)
|
||||
(set! s4-0 (-> arg0 cmd-fwd))
|
||||
)
|
||||
(if (= (the-as symbol s5-0) 2)
|
||||
(set! s4-0 (-> arg0 cmd-bwd))
|
||||
)
|
||||
(when s4-0
|
||||
(cond
|
||||
((= (-> s4-0 cmd) (load-boundary-cmd vis))
|
||||
(load-state-want-vis (the-as symbol (-> s4-0 lev0)))
|
||||
)
|
||||
((= (-> s4-0 cmd) (load-boundary-cmd load))
|
||||
(load-state-want-levels
|
||||
(the-as symbol (-> s4-0 lev0))
|
||||
(the-as symbol (-> s4-0 lev1))
|
||||
)
|
||||
)
|
||||
((= (-> s4-0 cmd) (load-boundary-cmd display))
|
||||
(load-state-want-display-level
|
||||
(the-as symbol (-> s4-0 lev0))
|
||||
(the-as symbol (-> s4-0 lev1))
|
||||
)
|
||||
)
|
||||
((= (-> s4-0 cmd) (load-boundary-cmd force-vis))
|
||||
(load-state-want-force-vis
|
||||
(the-as symbol (-> s4-0 lev0))
|
||||
(the-as symbol (-> s4-0 lev1))
|
||||
)
|
||||
)
|
||||
((= (-> s4-0 cmd) (load-boundary-cmd checkpt))
|
||||
(format 0 "Setting continue to ~A~%" (-> s4-0 lev0))
|
||||
(set-continue! *game-info* (-> s4-0 lev0))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(label cfg-28)
|
||||
(none)
|
||||
)
|
||||
|
||||
(define-perm *load-state* load-state (new 'global 'load-state))
|
||||
(define-perm *load-state* load-state (new 'global 'load-state))
|
||||
|
||||
@@ -33,11 +33,13 @@
|
||||
(navcf21 21) ;; TODO - nav-control::19
|
||||
)
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(deftype nav-poly (structure)
|
||||
((id uint8 :offset-assert 0)
|
||||
(vertex uint8 3 :offset-assert 1)
|
||||
(adj-poly uint8 3 :offset-assert 4)
|
||||
(pat uint8 :offset-assert 7)
|
||||
((id uint8 :offset-assert 0)
|
||||
(vertex uint8 3 :offset-assert 1)
|
||||
(adj-poly uint8 3 :offset-assert 4)
|
||||
(pat uint8 :offset-assert 7)
|
||||
)
|
||||
:pack-me
|
||||
:method-count-assert 9
|
||||
@@ -53,7 +55,7 @@
|
||||
)
|
||||
|
||||
(deftype nav-sphere (structure)
|
||||
((trans sphere :inline :offset-assert 0)
|
||||
((trans sphere :inline :offset-assert 0)
|
||||
)
|
||||
:method-count-assert 9
|
||||
:size-assert #x10
|
||||
@@ -61,17 +63,17 @@
|
||||
)
|
||||
|
||||
(deftype nav-ray (structure)
|
||||
((current-pos vector :inline :offset-assert 0)
|
||||
(dir vector :inline :offset-assert 16)
|
||||
(dest-pos vector :inline :offset-assert 32)
|
||||
(current-poly nav-poly :offset-assert 48)
|
||||
(next-poly nav-poly :offset-assert 52)
|
||||
(len meters :offset-assert 56)
|
||||
(last-edge int8 :offset-assert 60)
|
||||
(terminated symbol :offset-assert 64) ;; TODO - guesses
|
||||
(reached-dest symbol :offset-assert 68) ;; TODO - guesses
|
||||
(hit-boundary symbol :offset-assert 72) ;; TODO - guesses
|
||||
(hit-gap symbol :offset-assert 76) ;; TODO - guesses
|
||||
((current-pos vector :inline :offset-assert 0)
|
||||
(dir vector :inline :offset-assert 16)
|
||||
(dest-pos vector :inline :offset-assert 32)
|
||||
(current-poly nav-poly :offset-assert 48)
|
||||
(next-poly nav-poly :offset-assert 52)
|
||||
(len meters :offset-assert 56)
|
||||
(last-edge int8 :offset-assert 60)
|
||||
(terminated symbol :offset-assert 64)
|
||||
(reached-dest symbol :offset-assert 68)
|
||||
(hit-boundary symbol :offset-assert 72)
|
||||
(hit-gap symbol :offset-assert 76)
|
||||
)
|
||||
:method-count-assert 9
|
||||
:size-assert #x50
|
||||
@@ -79,9 +81,9 @@
|
||||
)
|
||||
|
||||
(deftype nav-route-portal (structure)
|
||||
((next-poly nav-poly :offset-assert 0)
|
||||
(vertex nav-vertex 2 :offset-assert 4)
|
||||
(edge-index int8 :offset-assert 12)
|
||||
((next-poly nav-poly :offset-assert 0)
|
||||
(vertex nav-vertex 2 :offset-assert 4)
|
||||
(edge-index int8 :offset-assert 12)
|
||||
)
|
||||
:method-count-assert 9
|
||||
:size-assert #xd
|
||||
@@ -90,15 +92,15 @@
|
||||
|
||||
|
||||
(deftype clip-travel-vector-to-mesh-return-info (structure)
|
||||
((found-boundary symbol :offset-assert 0)
|
||||
(intersection vector :inline :offset-assert 16)
|
||||
(boundary-normal vector :inline :offset-assert 32)
|
||||
(prev-normal vector :inline :offset-assert 48)
|
||||
(next-normal vector :inline :offset-assert 64)
|
||||
(poly nav-poly :offset-assert 80)
|
||||
(gap-poly nav-poly :offset-assert 84)
|
||||
(edge int32 :offset-assert 88)
|
||||
(vert-prev vector :inline :offset-assert 96)
|
||||
((found-boundary symbol :offset-assert 0)
|
||||
(intersection vector :inline :offset-assert 16)
|
||||
(boundary-normal vector :inline :offset-assert 32)
|
||||
(prev-normal vector :inline :offset-assert 48)
|
||||
(next-normal vector :inline :offset-assert 64)
|
||||
(poly nav-poly :offset-assert 80)
|
||||
(gap-poly nav-poly :offset-assert 84)
|
||||
(edge int32 :offset-assert 88)
|
||||
(vert-prev vector :inline :offset-assert 96)
|
||||
(vert-0 vector :inline :offset-assert 112)
|
||||
(vert-1 vector :inline :offset-assert 128)
|
||||
(vert-next vector :inline :offset-assert 144)
|
||||
@@ -109,24 +111,24 @@
|
||||
)
|
||||
|
||||
(deftype nav-node (structure)
|
||||
((center-x float :offset-assert 0)
|
||||
(center-y float :offset-assert 4)
|
||||
(center-z float :offset-assert 8)
|
||||
(type uint16 :offset-assert 12)
|
||||
(parent-offset uint16 :offset-assert 14)
|
||||
(center vector :inline :offset 0)
|
||||
(radius-x float :offset-assert 16)
|
||||
(radius-y float :offset-assert 20)
|
||||
(radius-z float :offset-assert 24)
|
||||
(left-offset uint16 :offset-assert 28)
|
||||
(right-offset uint16 :offset-assert 30)
|
||||
(num-tris uint32 :offset 28)
|
||||
(radius vector :inline :offset 16)
|
||||
(scale-x float :offset-assert 32)
|
||||
(first-tris uint8 4 :offset-assert 36)
|
||||
(scale-z float :offset-assert 40)
|
||||
(last-tris uint8 4 :offset-assert 44)
|
||||
(scale vector :inline :offset 32)
|
||||
((center-x float :offset-assert 0)
|
||||
(center-y float :offset-assert 4)
|
||||
(center-z float :offset-assert 8)
|
||||
(type uint16 :offset-assert 12)
|
||||
(parent-offset uint16 :offset-assert 14)
|
||||
(center vector :inline :offset 0)
|
||||
(radius-x float :offset-assert 16)
|
||||
(radius-y float :offset-assert 20)
|
||||
(radius-z float :offset-assert 24)
|
||||
(left-offset uint16 :offset-assert 28)
|
||||
(right-offset uint16 :offset-assert 30)
|
||||
(num-tris uint32 :offset 28)
|
||||
(radius vector :inline :offset 16)
|
||||
(scale-x float :offset-assert 32)
|
||||
(first-tris uint8 4 :offset-assert 36)
|
||||
(scale-z float :offset-assert 40)
|
||||
(last-tris uint8 4 :offset-assert 44)
|
||||
(scale vector :inline :offset 32)
|
||||
)
|
||||
:method-count-assert 9
|
||||
:size-assert #x30
|
||||
@@ -134,14 +136,14 @@
|
||||
)
|
||||
|
||||
(deftype nav-lookup-elem (structure)
|
||||
((vec vector :inline :offset-assert 0)
|
||||
(y-thresh float :offset 12)
|
||||
(time uint32 :offset-assert 16)
|
||||
(node-offset uint32 :offset-assert 20)
|
||||
(lookup-type uint8 :offset-assert 24)
|
||||
(poly-ind uint8 :offset-assert 25)
|
||||
(dummy0 uint16 :offset-assert 26)
|
||||
(dummy uint32 :offset-assert 28)
|
||||
((vec vector :inline :offset-assert 0)
|
||||
(y-thresh float :offset 12)
|
||||
(time uint32 :offset-assert 16)
|
||||
(node-offset uint32 :offset-assert 20)
|
||||
(lookup-type uint8 :offset-assert 24)
|
||||
(poly-ind uint8 :offset-assert 25)
|
||||
(dummy0 uint16 :offset-assert 26)
|
||||
(dummy uint32 :offset-assert 28)
|
||||
)
|
||||
:method-count-assert 9
|
||||
:size-assert #x20
|
||||
@@ -149,21 +151,21 @@
|
||||
)
|
||||
|
||||
(deftype nav-mesh (basic)
|
||||
((user-list engine :offset-assert 4)
|
||||
(poly-lookup-history uint8 2 :offset-assert 8)
|
||||
(debug-time uint8 :offset-assert 10)
|
||||
(static-sphere-count uint8 :offset-assert 11)
|
||||
(static-sphere (inline-array nav-sphere) :offset-assert 12)
|
||||
(bounds sphere :inline :offset-assert 16)
|
||||
(origin vector :inline :offset-assert 32)
|
||||
(cache nav-lookup-elem 4 :inline :offset-assert 48) ;; guess on type
|
||||
(node-count int32 :offset-assert 176)
|
||||
(nodes (inline-array nav-node) :offset-assert 180)
|
||||
(vertex-count int32 :offset-assert 184)
|
||||
(vertex (inline-array nav-vertex) :offset-assert 188)
|
||||
(poly-count int32 :offset-assert 192)
|
||||
(poly (inline-array nav-poly) :offset-assert 196)
|
||||
(route (inline-array vector4ub) :offset-assert 200) ;; this is a guess, it's probably wrong -- but its something with a uint8 at offset 0
|
||||
((user-list engine :offset-assert 4)
|
||||
(poly-lookup-history uint8 2 :offset-assert 8)
|
||||
(debug-time uint8 :offset-assert 10)
|
||||
(static-sphere-count uint8 :offset-assert 11)
|
||||
(static-sphere (inline-array nav-sphere) :offset-assert 12)
|
||||
(bounds sphere :inline :offset-assert 16)
|
||||
(origin vector :inline :offset-assert 32)
|
||||
(cache nav-lookup-elem 4 :inline :offset-assert 48)
|
||||
(node-count int32 :offset-assert 176)
|
||||
(nodes (inline-array nav-node) :offset-assert 180)
|
||||
(vertex-count int32 :offset-assert 184)
|
||||
(vertex (inline-array nav-vertex) :offset-assert 188)
|
||||
(poly-count int32 :offset-assert 192)
|
||||
(poly (inline-array nav-poly) :offset-assert 196)
|
||||
(route (inline-array vector4ub) :offset-assert 200)
|
||||
)
|
||||
:method-count-assert 30
|
||||
:size-assert #xcc
|
||||
@@ -181,14 +183,14 @@
|
||||
;; - you hit a nav mesh boundary/gap
|
||||
;; - you cross 15 triangles.
|
||||
(try-move-along-ray (_type_ nav-poly vector vector float) meters 15)
|
||||
(TODO-RENAME-16 (_type_ vector nav-poly vector symbol float clip-travel-vector-to-mesh-return-info) none 16)
|
||||
(nav-mesh-method-16 (_type_ vector nav-poly vector symbol float clip-travel-vector-to-mesh-return-info) none 16)
|
||||
(update-route-table (_type_) none 17) ;; (initialization related)
|
||||
(dummy-18 (_type_ int vector int (pointer int8) int) none 18) ;; something to do with routes.
|
||||
(nav-mesh-method-18 (_type_ int vector int (pointer int8) int) none 18) ;; something to do with routes.
|
||||
(compute-bounding-box (_type_ vector vector) none 19)
|
||||
(debug-draw-poly (_type_ nav-poly rgba) none 20) ;; TODO - is rgba a vector4w?
|
||||
(point-in-poly? (_type_ nav-poly vector) symbol 21) ;; is the point inside of the triangle?
|
||||
(find-opposite-vertices (_type_ nav-poly nav-poly) uint 22) ;; given two triangles that share an edge, get the indices of the two vertices that aren't part of the edge.
|
||||
(dummy-23 (_type_ nav-poly vector vector vector nav-route-portal) vector 23)
|
||||
(nav-mesh-method-23 (_type_ nav-poly vector vector vector nav-route-portal) vector 23)
|
||||
(closest-point-on-boundary (_type_ nav-poly vector vector) vector 24) ;; find the closest point on the perimeter of the triangle.
|
||||
(project-point-into-tri-3d (_type_ nav-poly vector vector) none 25) ;; will move a 3D point in space to the surface of this nav-poly
|
||||
;; Looking from the top down, is the point inside the nav-poly?
|
||||
@@ -210,9 +212,9 @@
|
||||
(define-extern *default-nav-mesh* nav-mesh)
|
||||
|
||||
(deftype check-vector-collision-with-nav-spheres-info (structure)
|
||||
((u float :offset-assert 0)
|
||||
(intersect vector :inline :offset-assert 16)
|
||||
(normal vector :inline :offset-assert 32)
|
||||
((u float :offset-assert 0)
|
||||
(intersect vector :inline :offset-assert 16)
|
||||
(normal vector :inline :offset-assert 32)
|
||||
)
|
||||
:method-count-assert 9
|
||||
:size-assert #x30
|
||||
@@ -220,8 +222,8 @@
|
||||
)
|
||||
|
||||
(deftype nav-gap-info (structure)
|
||||
((dest vector :inline :offset-assert 0)
|
||||
(poly nav-poly :offset-assert 16)
|
||||
((dest vector :inline :offset-assert 0)
|
||||
(poly nav-poly :offset-assert 16)
|
||||
)
|
||||
:method-count-assert 9
|
||||
:size-assert #x14
|
||||
@@ -229,65 +231,65 @@
|
||||
)
|
||||
|
||||
(deftype nav-control (basic)
|
||||
((flags nav-control-flags :offset-assert 4)
|
||||
(process basic :offset-assert 8)
|
||||
(shape collide-shape :offset-assert 12)
|
||||
(mesh nav-mesh :offset-assert 16)
|
||||
(gap-event basic :offset-assert 20)
|
||||
(block-event basic :offset-assert 24)
|
||||
(current-poly nav-poly :offset-assert 28)
|
||||
(next-poly nav-poly :offset-assert 32)
|
||||
(target-poly nav-poly :offset-assert 36)
|
||||
(portal nav-route-portal 2 :offset-assert 40) ;; guess
|
||||
(nearest-y-threshold meters :offset-assert 48)
|
||||
(event-temp vector :inline :offset-assert 64)
|
||||
(old-travel vector :inline :offset-assert 80)
|
||||
(blocked-travel vector :inline :offset-assert 96)
|
||||
(prev-pos vector :inline :offset-assert 112)
|
||||
(extra-nav-sphere vector :inline :offset-assert 128)
|
||||
(travel vector :inline :offset-assert 144)
|
||||
(target-pos vector :inline :offset-assert 160)
|
||||
(destination-pos vector :inline :offset-assert 176)
|
||||
(block-time time-frame :offset-assert 192)
|
||||
(block-count float :offset-assert 200)
|
||||
(user-poly nav-poly :offset-assert 204)
|
||||
(nav-cull-radius float :offset-assert 208)
|
||||
(num-spheres int16 :offset-assert 212)
|
||||
(max-spheres int16 :offset-assert 214)
|
||||
(sphere sphere :inline :dynamic :offset-assert 224) ;; guess
|
||||
((flags nav-control-flags :offset-assert 4)
|
||||
(process basic :offset-assert 8)
|
||||
(shape collide-shape :offset-assert 12)
|
||||
(mesh nav-mesh :offset-assert 16)
|
||||
(gap-event basic :offset-assert 20)
|
||||
(block-event basic :offset-assert 24)
|
||||
(current-poly nav-poly :offset-assert 28)
|
||||
(next-poly nav-poly :offset-assert 32)
|
||||
(target-poly nav-poly :offset-assert 36)
|
||||
(portal nav-route-portal 2 :offset-assert 40)
|
||||
(nearest-y-threshold meters :offset-assert 48)
|
||||
(event-temp vector :inline :offset-assert 64)
|
||||
(old-travel vector :inline :offset-assert 80)
|
||||
(blocked-travel vector :inline :offset-assert 96)
|
||||
(prev-pos vector :inline :offset-assert 112)
|
||||
(extra-nav-sphere vector :inline :offset-assert 128)
|
||||
(travel vector :inline :offset-assert 144)
|
||||
(target-pos vector :inline :offset-assert 160)
|
||||
(destination-pos vector :inline :offset-assert 176)
|
||||
(block-time time-frame :offset-assert 192)
|
||||
(block-count float :offset-assert 200)
|
||||
(user-poly nav-poly :offset-assert 204)
|
||||
(nav-cull-radius float :offset-assert 208)
|
||||
(num-spheres int16 :offset-assert 212)
|
||||
(max-spheres int16 :offset-assert 214)
|
||||
(sphere sphere :inline :dynamic :offset-assert 224)
|
||||
)
|
||||
:method-count-assert 36
|
||||
:size-assert #xe0
|
||||
:flag-assert #x24000000e0
|
||||
(:methods
|
||||
(new (symbol type collide-shape int float) _type_)
|
||||
(new (symbol type collide-shape int float) _type_ 0)
|
||||
(debug-draw (_type_) none 9)
|
||||
(point-in-bounds? (_type_ vector) symbol 10)
|
||||
(dummy-11 (_type_ vector) vector 11)
|
||||
(TODO-RENAME-12 (_type_ nav-gap-info) symbol 12)
|
||||
(dummy-13 (_type_ vector vector) vector 13) ;; see - puffer::20 | second vector may be clip-travel-vector-to-mesh-return-info though
|
||||
(nav-control-method-11 (_type_ vector) vector 11)
|
||||
(nav-control-method-12 (_type_ nav-gap-info) symbol 12)
|
||||
(nav-control-method-13 (_type_ vector vector) vector 13) ;; see - puffer::20 | second vector may be clip-travel-vector-to-mesh-return-info though
|
||||
(set-current-poly! (_type_ nav-poly) none 14)
|
||||
(set-target-pos! (_type_ vector) none 15)
|
||||
(dummy-16 (_type_ vector) nav-poly 16) ; see - nav-enemy-test-point-in-nav-mesh?
|
||||
(nav-control-method-16 (_type_ vector) nav-poly 16) ; see - nav-enemy-test-point-in-nav-mesh?
|
||||
(project-onto-nav-mesh (_type_ vector vector) vector 17) ;; moves point to nav-mesh.
|
||||
(find-poly (_type_ vector) nav-poly 18)
|
||||
(dummy-19 (_type_ vector collide-shape-moving vector float) none 19) ;; csm not trsqv? ret not vector?
|
||||
(nav-control-method-19 (_type_ vector collide-shape-moving vector float) none 19) ;; csm not trsqv? ret not vector?
|
||||
(project-point-into-tri-3d (_type_ nav-poly vector vector) vector 20)
|
||||
(TODO-RENAME-21 (_type_ vector) nav-poly 21)
|
||||
(TODO-RENAME-22 (_type_ vector float) symbol 22)
|
||||
(dummy-23 (_type_ vector check-vector-collision-with-nav-spheres-info) float 23) ;; TODO - unconfirmed maybe (dummy-23 (_type_ vector matrix) float 23)
|
||||
(dummy-24 (_type_ float clip-travel-vector-to-mesh-return-info) none 24)
|
||||
(nav-control-method-21 (_type_ vector) nav-poly 21)
|
||||
(nav-control-method-22 (_type_ vector float) symbol 22)
|
||||
(nav-control-method-23 (_type_ vector check-vector-collision-with-nav-spheres-info) float 23) ;; TODO - unconfirmed maybe
|
||||
(nav-control-method-24 (_type_ float clip-travel-vector-to-mesh-return-info) none 24)
|
||||
(is-in-mesh? (_type_ vector float) symbol 25) ; see - nav-enemy-test-point-near-nav-mesh?
|
||||
(TODO-RENAME-26 (_type_) none 26) ;; stub
|
||||
(TODO-RENAME-27 (_type_) none 27)
|
||||
(TODO-RENAME-28 (_type_ collide-kind) none 28)
|
||||
(nav-control-method-26 (_type_) none 26) ;; stub
|
||||
(nav-control-method-27 (_type_) none 27)
|
||||
(nav-control-method-28 (_type_ collide-kind) none 28)
|
||||
(should-display? (_type_) symbol 29)
|
||||
(dummy-30 (_type_ vector vector vector) sphere 30) ;; TODO - last arg? - it has a float as the first arg, vector is a total guess
|
||||
(nav-control-method-30 (_type_ vector vector vector) sphere 30) ;; TODO - last arg? - it has a float as the first arg, vector is a total guess
|
||||
(intersect-ray-line-segment? (_type_ vector vector vector vector) symbol 31)
|
||||
(TODO-ASM-32 (_type_ vector vector vector vector float) symbol 32)
|
||||
(TODO-RENAME-33 (_type_ vector vector vector vector float) symbol 33)
|
||||
(dummy-34 () none 34)
|
||||
(dummy-35 (_type_ vector vector vector vector float) none 35)
|
||||
(nav-control-method-32 (_type_ vector vector vector vector float) symbol 32)
|
||||
(nav-control-method-33 (_type_ vector vector vector vector float) symbol 33)
|
||||
(nav-control-method-34 () none 34)
|
||||
(nav-control-method-35 (_type_ vector vector vector vector float) none 35)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -354,43 +356,43 @@
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod new nav-control ((allocation symbol) (type-to-make type) (shape collide-shape) (sphere-count int) (nearest-y-threshold-default float))
|
||||
(defmethod new nav-control ((allocation symbol)
|
||||
(type-to-make type)
|
||||
(shape collide-shape)
|
||||
(sphere-count int)
|
||||
(nearest-y-threshold-default float)
|
||||
)
|
||||
(let ((obj (object-new allocation type-to-make (the-as int (+ (-> type-to-make size) (* sphere-count 16))))))
|
||||
(when (zero? obj)
|
||||
(go process-drawable-art-error "memory")
|
||||
(set! obj (the-as nav-control 0))
|
||||
(goto cfg-4)
|
||||
(when (zero? obj)
|
||||
(go process-drawable-art-error "memory")
|
||||
(set! obj (the-as nav-control 0))
|
||||
(goto cfg-4)
|
||||
)
|
||||
(set! (-> obj max-spheres) sphere-count)
|
||||
(set! (-> obj flags) (nav-control-flags navcf8 navcf13))
|
||||
(set! (-> obj mesh) (nav-mesh-connect (-> shape process) shape obj))
|
||||
(let ((ent (-> shape process entity)))
|
||||
(set! (-> obj nearest-y-threshold)
|
||||
(res-lump-float ent 'nearest-y-threshold :default nearest-y-threshold-default)
|
||||
)
|
||||
)
|
||||
(set! (-> obj shape) shape)
|
||||
(set! (-> obj process) (-> shape process))
|
||||
(set! (-> obj gap-event) #f)
|
||||
(set! (-> obj current-poly) #f)
|
||||
(set! (-> obj next-poly) #f)
|
||||
(set! (-> obj target-poly) #f)
|
||||
(set! (-> obj user-poly) #f)
|
||||
(set! (-> obj portal 0) #f)
|
||||
(set! (-> obj portal 1) #f)
|
||||
(set! (-> obj nav-cull-radius) 40960.0)
|
||||
(label cfg-4)
|
||||
(the-as nav-control obj)
|
||||
)
|
||||
(set! (-> obj max-spheres) sphere-count)
|
||||
(set! (-> obj flags) (nav-control-flags navcf8 navcf13))
|
||||
(set! (-> obj mesh) (nav-mesh-connect (-> shape process) shape obj))
|
||||
(let ((ent (-> shape process entity)))
|
||||
(set! (-> obj nearest-y-threshold)
|
||||
(res-lump-float ent 'nearest-y-threshold :default nearest-y-threshold-default)
|
||||
)
|
||||
)
|
||||
(set! (-> obj shape) shape)
|
||||
(set! (-> obj process) (-> shape process))
|
||||
(set! (-> obj gap-event) #f)
|
||||
(set! (-> obj current-poly) #f)
|
||||
(set! (-> obj next-poly) #f)
|
||||
(set! (-> obj target-poly) #f)
|
||||
(set! (-> obj user-poly) #f)
|
||||
(set! (-> obj portal 0) #f)
|
||||
(set! (-> obj portal 1) #f)
|
||||
(set! (-> obj nav-cull-radius) 40960.0)
|
||||
(label cfg-4)
|
||||
(the-as nav-control obj)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
;; definition for method 29 of type nav-control
|
||||
(defmethod should-display? nav-control ((obj nav-control))
|
||||
(and
|
||||
*display-nav-marks*
|
||||
(logtest? (-> obj flags) (nav-control-flags display-marks))
|
||||
)
|
||||
(and *display-nav-marks* (logtest? (-> obj flags) (nav-control-flags display-marks)))
|
||||
)
|
||||
|
||||
(defmethod point-in-bounds? nav-control ((obj nav-control) (arg0 vector))
|
||||
@@ -406,8 +408,6 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for function has-nav-mesh?
|
||||
;; INFO: Return type mismatch structure vs symbol.
|
||||
(defun has-nav-mesh? ((arg0 entity-actor))
|
||||
"Does the actor have a nav mesh? Either loaded an in the nav-mesh field, or in
|
||||
the res-lump."
|
||||
|
||||
@@ -740,6 +740,7 @@
|
||||
)
|
||||
)
|
||||
|
||||
;; ERROR: Failed load: (set! vf3 (l.vf a0-4)) at op 42
|
||||
(defmethod is-in-mesh? nav-mesh ((obj nav-mesh) (arg0 vector) (arg1 float) (arg2 meters))
|
||||
(local-vars (v1-10 int))
|
||||
(rlet ((vf1 :class vf)
|
||||
@@ -983,7 +984,7 @@
|
||||
|
||||
(define *nav-update-route-table-route-count* 0)
|
||||
|
||||
(defmethod dummy-18 nav-mesh ((obj nav-mesh) (arg0 int) (arg1 vector) (arg2 int) (arg3 (pointer int8)) (arg4 int))
|
||||
(defmethod nav-mesh-method-18 nav-mesh ((obj nav-mesh) (arg0 int) (arg1 vector) (arg2 int) (arg3 (pointer int8)) (arg4 int))
|
||||
(local-vars (sv-32 int) (sv-48 uint))
|
||||
(set! (-> arg3 arg2) 1)
|
||||
(nav-mesh-update-route-table obj arg0 arg2 (the-as uint 3))
|
||||
@@ -1007,7 +1008,7 @@
|
||||
)
|
||||
(when v0-3
|
||||
(let* ((a0-16 obj)
|
||||
(t9-5 (method-of-object a0-16 dummy-18))
|
||||
(t9-5 (method-of-object a0-16 nav-mesh-method-18))
|
||||
(a1-7 arg0)
|
||||
(a2-6 arg1)
|
||||
(t0-1 arg3)
|
||||
@@ -1046,7 +1047,7 @@
|
||||
(let ((a3-0 (-> s2-0 adj-poly s1-0)))
|
||||
(when (!= a3-0 255)
|
||||
(if (not (logtest? (-> obj poly a3-0 pat) 1))
|
||||
(dummy-18 obj s3-0 s5-0 (the-as int a3-0) s4-0 0)
|
||||
(nav-mesh-method-18 obj s3-0 s5-0 (the-as int a3-0) s4-0 0)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -1462,7 +1463,7 @@
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod dummy-23 nav-mesh ((obj nav-mesh) (arg0 nav-poly) (arg1 vector) (arg2 vector) (arg3 vector) (arg4 nav-route-portal))
|
||||
(defmethod nav-mesh-method-23 nav-mesh ((obj nav-mesh) (arg0 nav-poly) (arg1 vector) (arg2 vector) (arg3 vector) (arg4 nav-route-portal))
|
||||
(local-vars (v1-32 int) (a0-14 int) (a0-17 int) (a1-10 int) (sv-16 nav-vertex))
|
||||
(let ((s1-0 (-> obj vertex))
|
||||
(s0-0 -1)
|
||||
@@ -1880,7 +1881,7 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod dummy-30 nav-control ((obj nav-control) (arg0 vector) (arg1 vector) (arg2 vector))
|
||||
(defmethod nav-control-method-30 nav-control ((obj nav-control) (arg0 vector) (arg1 vector) (arg2 vector))
|
||||
(let ((s5-0 (the-as sphere #f)))
|
||||
(let ((f30-0 -0.000001))
|
||||
(countdown (s1-0 (-> obj num-spheres))
|
||||
@@ -1965,7 +1966,7 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod TODO-RENAME-28 nav-control ((obj nav-control) (arg0 collide-kind))
|
||||
(defmethod nav-control-method-28 nav-control ((obj nav-control) (arg0 collide-kind))
|
||||
(local-vars
|
||||
(sv-32 nav-control)
|
||||
(sv-48 sphere)
|
||||
@@ -1981,7 +1982,9 @@
|
||||
)
|
||||
(when (and *target*
|
||||
(or (logtest? (-> obj flags) (nav-control-flags navcf11))
|
||||
(logtest? (-> *target* state-flags) (state-flags being-attacked invulnerable timed-invulnerable invuln-powerup do-not-notice dying))
|
||||
(logtest? (-> *target* state-flags)
|
||||
(state-flags being-attacked invulnerable timed-invulnerable invuln-powerup do-not-notice dying)
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((s2-0 obj)
|
||||
@@ -2113,10 +2116,10 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod dummy-35 nav-control ((obj nav-control) (arg0 vector) (arg1 vector) (arg2 vector) (arg3 vector) (arg4 float))
|
||||
(defmethod nav-control-method-35 nav-control ((obj nav-control) (arg0 vector) (arg1 vector) (arg2 vector) (arg3 vector) (arg4 float))
|
||||
(let ((v1-0 (new 'stack-no-clear 'vector)))
|
||||
(vector-! v1-0 arg1 (-> obj mesh origin))
|
||||
(TODO-ASM-32 obj arg0 v1-0 arg2 arg3 arg4)
|
||||
(nav-control-method-32 obj arg0 v1-0 arg2 arg3 arg4)
|
||||
)
|
||||
(none)
|
||||
)
|
||||
@@ -2254,7 +2257,7 @@
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod TODO-ASM-32 nav-control ((obj nav-control) (arg0 vector) (arg1 vector) (arg2 vector) (arg3 vector) (arg4 float))
|
||||
(defmethod nav-control-method-32 nav-control ((obj nav-control) (arg0 vector) (arg1 vector) (arg2 vector) (arg3 vector) (arg4 float))
|
||||
(local-vars (v0-3 symbol) (v1-38 int) (a0-29 int) (a3-7 int) (sv-208 sphere))
|
||||
(let ((gp-0 (new 'stack-no-clear 'nav-control-cfs-work)))
|
||||
(set! (-> gp-0 in-dir quad) (-> arg2 quad))
|
||||
@@ -2408,7 +2411,7 @@
|
||||
v0-3
|
||||
)
|
||||
|
||||
(defmethod dummy-23 nav-control ((obj nav-control) (arg0 vector) (arg1 check-vector-collision-with-nav-spheres-info))
|
||||
(defmethod nav-control-method-23 nav-control ((obj nav-control) (arg0 vector) (arg1 check-vector-collision-with-nav-spheres-info))
|
||||
(let ((s2-1 (vector-! (new 'stack-no-clear 'vector) (-> obj shape trans) (-> obj mesh origin)))
|
||||
(f30-0 -1.0)
|
||||
)
|
||||
@@ -2449,9 +2452,9 @@
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod TODO-RENAME-33 nav-control ((obj nav-control) (arg0 vector) (arg1 vector) (arg2 vector) (arg3 vector) (arg4 float))
|
||||
(defmethod nav-control-method-33 nav-control ((obj nav-control) (arg0 vector) (arg1 vector) (arg2 vector) (arg3 vector) (arg4 float))
|
||||
(let ((f30-0 (vector-xz-length (-> obj travel))))
|
||||
(when (TODO-ASM-32 obj arg0 arg1 arg2 arg3 f30-0)
|
||||
(when (nav-control-method-32 obj arg0 arg1 arg2 arg3 f30-0)
|
||||
(set! (-> obj blocked-travel quad) (-> obj travel quad))
|
||||
(let ((f0-0 (vector-xz-length (-> obj travel))))
|
||||
(when (and (>= f30-0 f0-0) (< f0-0 204.8))
|
||||
@@ -2480,7 +2483,7 @@
|
||||
|
||||
(define *test-ray-dest-pos* (new 'static 'vector :x -722887.7 :y 9532.475 :z -958862.25 :w 1.0))
|
||||
|
||||
(defmethod dummy-19 nav-control ((obj nav-control) (arg0 vector) (arg1 collide-shape-moving) (arg2 vector) (arg3 float))
|
||||
(defmethod nav-control-method-19 nav-control ((obj nav-control) (arg0 vector) (arg1 collide-shape-moving) (arg2 vector) (arg3 float))
|
||||
(local-vars (sv-48 float))
|
||||
(let ((f30-0 (* arg3 (-> *display* seconds-per-frame)))
|
||||
(s0-0 arg1)
|
||||
@@ -2503,7 +2506,7 @@
|
||||
(logclear! (-> obj flags) (nav-control-flags navcf21))
|
||||
(vector+! arg0 (-> arg1 trans) s2-1)
|
||||
)
|
||||
(when (or (not (dummy-16 obj arg0))
|
||||
(when (or (not (nav-control-method-16 obj arg0))
|
||||
(logtest? (nav-control-flags navcf17) (-> obj flags))
|
||||
(not (logtest? (-> obj flags) (nav-control-flags navcf10)))
|
||||
)
|
||||
@@ -2518,7 +2521,7 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod dummy-16 nav-control ((obj nav-control) (arg0 vector))
|
||||
(defmethod nav-control-method-16 nav-control ((obj nav-control) (arg0 vector))
|
||||
(find-poly-fast
|
||||
(-> obj mesh)
|
||||
(vector-! (new 'stack-no-clear 'vector) arg0 (-> obj mesh origin))
|
||||
@@ -2526,7 +2529,7 @@
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod TODO-RENAME-21 nav-control ((obj nav-control) (arg0 vector))
|
||||
(defmethod nav-control-method-21 nav-control ((obj nav-control) (arg0 vector))
|
||||
(find-poly-fast
|
||||
(-> obj mesh)
|
||||
(vector-! (new 'stack-no-clear 'vector) arg0 (-> obj mesh origin))
|
||||
@@ -2534,7 +2537,7 @@
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod TODO-RENAME-22 nav-control ((obj nav-control) (arg0 vector) (arg1 float))
|
||||
(defmethod nav-control-method-22 nav-control ((obj nav-control) (arg0 vector) (arg1 float))
|
||||
(the-as symbol (and (find-poly-fast
|
||||
(-> obj mesh)
|
||||
(vector-! (new 'stack-no-clear 'vector) arg0 (-> obj mesh origin))
|
||||
@@ -2555,12 +2558,12 @@
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod TODO-RENAME-26 nav-control ((obj nav-control))
|
||||
(defmethod nav-control-method-26 nav-control ((obj nav-control))
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod TODO-RENAME-27 nav-control ((obj nav-control))
|
||||
(defmethod nav-control-method-27 nav-control ((obj nav-control))
|
||||
(local-vars (v1-7 symbol))
|
||||
(cond
|
||||
((-> obj current-poly)
|
||||
@@ -2601,19 +2604,19 @@
|
||||
(set! (-> obj current-poly) (find-poly obj (-> obj shape trans)))
|
||||
)
|
||||
)
|
||||
(TODO-RENAME-26 obj)
|
||||
(nav-control-method-26 obj)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod TODO-RENAME-16 nav-mesh ((obj nav-mesh)
|
||||
(arg0 vector)
|
||||
(arg1 nav-poly)
|
||||
(arg2 vector)
|
||||
(arg3 symbol)
|
||||
(arg4 float)
|
||||
(arg5 clip-travel-vector-to-mesh-return-info)
|
||||
)
|
||||
(defmethod nav-mesh-method-16 nav-mesh ((obj nav-mesh)
|
||||
(arg0 vector)
|
||||
(arg1 nav-poly)
|
||||
(arg2 vector)
|
||||
(arg3 symbol)
|
||||
(arg4 float)
|
||||
(arg5 clip-travel-vector-to-mesh-return-info)
|
||||
)
|
||||
(local-vars (v1-10 symbol) (sv-96 symbol) (sv-112 int) (sv-128 int))
|
||||
(when arg5
|
||||
(set! (-> arg5 found-boundary) #f)
|
||||
@@ -2699,10 +2702,10 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod dummy-24 nav-control ((obj nav-control) (arg0 float) (arg1 clip-travel-vector-to-mesh-return-info))
|
||||
(defmethod nav-control-method-24 nav-control ((obj nav-control) (arg0 float) (arg1 clip-travel-vector-to-mesh-return-info))
|
||||
(let ((v1-0 (new 'stack-no-clear 'vector)))
|
||||
(vector-! v1-0 (-> obj shape trans) (-> obj mesh origin))
|
||||
(TODO-RENAME-16
|
||||
(nav-mesh-method-16
|
||||
(-> obj mesh)
|
||||
v1-0
|
||||
(-> obj current-poly)
|
||||
@@ -2820,7 +2823,7 @@
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod dummy-13 nav-control ((obj nav-control) (arg0 vector) (arg1 vector))
|
||||
(defmethod nav-control-method-13 nav-control ((obj nav-control) (arg0 vector) (arg1 vector))
|
||||
(local-vars
|
||||
(sv-80 vector)
|
||||
(sv-84 vector)
|
||||
@@ -2907,9 +2910,9 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(TODO-RENAME-33 obj (-> obj travel) sv-84 (-> obj travel) arg1 40960.0)
|
||||
(nav-control-method-33 obj (-> obj travel) sv-84 (-> obj travel) arg1 40960.0)
|
||||
(let ((s5-1 (new 'stack-no-clear 'clip-travel-vector-to-mesh-return-info)))
|
||||
(TODO-RENAME-16
|
||||
(nav-mesh-method-16
|
||||
(-> obj mesh)
|
||||
sv-84
|
||||
sv-88
|
||||
@@ -2930,7 +2933,7 @@
|
||||
(-> obj travel)
|
||||
)
|
||||
|
||||
(defmethod TODO-RENAME-12 nav-control ((obj nav-control) (arg0 nav-gap-info))
|
||||
(defmethod nav-control-method-12 nav-control ((obj nav-control) (arg0 nav-gap-info))
|
||||
(when (and (-> obj next-poly) (logtest? (-> obj next-poly pat) 1))
|
||||
(let ((s4-0 (-> obj next-poly))
|
||||
(s3-1 (vector-! (new 'stack-no-clear 'vector) (-> obj shape trans) (-> obj mesh origin)))
|
||||
@@ -2951,16 +2954,16 @@
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod dummy-11 nav-control ((obj nav-control) (arg0 vector))
|
||||
(defmethod nav-control-method-11 nav-control ((obj nav-control) (arg0 vector))
|
||||
(set! (-> obj old-travel quad) (-> obj travel quad))
|
||||
(-> obj block-count)
|
||||
(seek! (-> obj block-count) 0.0 0.016666668)
|
||||
(logclear! (-> obj flags) (nav-control-flags navcf9 navcf17 navcf18 navcf19))
|
||||
(TODO-RENAME-27 obj)
|
||||
(nav-control-method-27 obj)
|
||||
(if (logtest? (-> obj flags) (nav-control-flags navcf8))
|
||||
(TODO-RENAME-28 obj (the-as collide-kind -1))
|
||||
(nav-control-method-28 obj (the-as collide-kind -1))
|
||||
)
|
||||
(dummy-13 obj arg0 (-> obj old-travel))
|
||||
(nav-control-method-13 obj arg0 (-> obj old-travel))
|
||||
(-> obj mesh)
|
||||
(vector-! (new 'stack-no-clear 'vector) (-> obj shape trans) (-> obj mesh origin))
|
||||
(let ((s5-1 (new 'stack-no-clear 'nav-gap-info)))
|
||||
@@ -2970,7 +2973,7 @@
|
||||
)
|
||||
((-> obj next-poly)
|
||||
(cond
|
||||
((TODO-RENAME-12 obj s5-1)
|
||||
((nav-control-method-12 obj s5-1)
|
||||
(set! (-> obj next-poly) #f)
|
||||
(send-event
|
||||
(the-as process-tree (-> obj process))
|
||||
|
||||
@@ -1229,7 +1229,7 @@
|
||||
|
||||
(defbehavior target-compute-edge target ()
|
||||
(let ((s5-0 *edge-grab-info*))
|
||||
(if (not (dummy-9 s5-0))
|
||||
(if (not (edge-grab-info-method-9 s5-0))
|
||||
(send-event self 'end-mode)
|
||||
)
|
||||
(if *display-edge-collision-marks*
|
||||
@@ -1286,7 +1286,7 @@
|
||||
|
||||
(defbehavior target-compute-edge-rider target ()
|
||||
(let ((gp-0 *edge-grab-info*))
|
||||
(if (not (dummy-9 gp-0))
|
||||
(if (not (edge-grab-info-method-9 gp-0))
|
||||
(send-event self 'end-mode)
|
||||
)
|
||||
(if *display-edge-collision-marks*
|
||||
|
||||
@@ -66,11 +66,11 @@
|
||||
)
|
||||
|
||||
(defstate sidekick-clone (sidekick)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(local-vars (v0-0 object))
|
||||
(case arg2
|
||||
(case event-type
|
||||
(('matrix)
|
||||
(case (-> arg3 param 0)
|
||||
(case (-> event param 0)
|
||||
(('play-anim)
|
||||
(set! v0-0 (-> self node-list data))
|
||||
(set! (-> (the-as (inline-array cspace) v0-0) 0 param0) cspace<-cspace+quaternion!)
|
||||
@@ -103,13 +103,13 @@
|
||||
v0-0
|
||||
)
|
||||
(('shadow)
|
||||
(set! v0-0 (-> arg3 param 0))
|
||||
(set! v0-0 (-> event param 0))
|
||||
(set! (-> self shadow-in-movie?) (the-as symbol v0-0))
|
||||
v0-0
|
||||
)
|
||||
(('blend-shape)
|
||||
(cond
|
||||
((-> arg3 param 0)
|
||||
((-> event param 0)
|
||||
(set! v0-0 (logior (-> self skel status) (janim-status blerc)))
|
||||
(set! (-> self skel status) (the-as janim-status v0-0))
|
||||
)
|
||||
@@ -208,7 +208,7 @@
|
||||
)
|
||||
(let ((a0-26 (-> self skel effect)))
|
||||
(if a0-26
|
||||
(TODO-RENAME-9 a0-26)
|
||||
(effect-control-method-9 a0-26)
|
||||
)
|
||||
)
|
||||
(if (logtest? (-> self skel status) (janim-status blerc blerc-done))
|
||||
@@ -261,7 +261,3 @@
|
||||
(defun starts ()
|
||||
(send-event *target* 'sidekick #t)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -729,8 +729,8 @@
|
||||
(ja-no-eval :group! eichar-jump-ja :num! (seek!) :frame-num 0.0)
|
||||
(when (= (-> arg0 angle) 'air)
|
||||
(sound-play "smack-surface")
|
||||
(dummy-10 (-> self skel effect) 'group-smack-surface (the-as float 0.0) 5)
|
||||
(dummy-10 (-> self skel effect) 'group-smack-surface-dizzy (the-as float 0.0) 8)
|
||||
(effect-control-method-10 (-> self skel effect) 'group-smack-surface (the-as float 0.0) 5)
|
||||
(effect-control-method-10 (-> self skel effect) 'group-smack-surface-dizzy (the-as float 0.0) 8)
|
||||
)
|
||||
)
|
||||
(('shove)
|
||||
|
||||
@@ -9,304 +9,280 @@
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
;; WARN: rewrite_to_get_var got a none typed variable. Is there unreachable code? [OP: 37]
|
||||
;; WARN: rewrite_to_get_var got a none typed variable. Is there unreachable code? [OP: 39]
|
||||
;; WARN: rewrite_to_get_var got a none typed variable. Is there unreachable code? [OP: 60]
|
||||
;; WARN: rewrite_to_get_var got a none typed variable. Is there unreachable code? [OP: 69]
|
||||
;; WARN: rewrite_to_get_var got a none typed variable. Is there unreachable code? [OP: 73]
|
||||
;; WARN: rewrite_to_get_var got a none typed variable. Is there unreachable code? [OP: 151]
|
||||
;; WARN: rewrite_to_get_var got a none typed variable. Is there unreachable code? [OP: 168]
|
||||
;; WARN: rewrite_to_get_var got a none typed variable. Is there unreachable code? [OP: 185]
|
||||
;; WARN: rewrite_to_get_var got a none typed variable. Is there unreachable code? [OP: 196]
|
||||
;; WARN: rewrite_to_get_var got a none typed variable. Is there unreachable code? [OP: 201]
|
||||
;; WARN: rewrite_to_get_var got a none typed variable. Is there unreachable code? [OP: 222]
|
||||
;; WARN: rewrite_to_get_var got a none typed variable. Is there unreachable code? [OP: 292]
|
||||
;; WARN: rewrite_to_get_var got a none typed variable. Is there unreachable code? [OP: 351]
|
||||
;; WARN: rewrite_to_get_var got a none typed variable. Is there unreachable code? [OP: 366]
|
||||
;; WARN: rewrite_to_get_var got a none typed variable. Is there unreachable code? [OP: 408]
|
||||
;; WARN: rewrite_to_get_var got a none typed variable. Is there unreachable code? [OP: 420]
|
||||
;; WARN: rewrite_to_get_var got a none typed variable. Is there unreachable code? [OP: 427]
|
||||
;; WARN: rewrite_to_get_var got a none typed variable. Is there unreachable code? [OP: 451]
|
||||
;; WARN: rewrite_to_get_var got a none typed variable. Is there unreachable code? [OP: 465]
|
||||
;; WARN: rewrite_to_get_var got a none typed variable. Is there unreachable code? [OP: 472]
|
||||
;; WARN: rewrite_to_get_var got a none typed variable. Is there unreachable code? [OP: 482]
|
||||
;; WARN: rewrite_to_get_var got a none typed variable. Is there unreachable code? [OP: 524]
|
||||
;; WARN: rewrite_to_get_var got a none typed variable. Is there unreachable code? [OP: 552]
|
||||
;; WARN: rewrite_to_get_var got a none typed variable. Is there unreachable code? [OP: 563]
|
||||
(defbehavior target-generic-event-handler target ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(local-vars (v0-0 object))
|
||||
(let ((v1-0 arg2))
|
||||
(the-as
|
||||
object
|
||||
(cond
|
||||
((= v1-0 'get-pickup)
|
||||
(when (zero? (logand (-> self state-flags) (state-flags dying)))
|
||||
(let ((s4-0 (-> arg3 param 0))
|
||||
(f28-0 (the-as float (-> arg3 param 1)))
|
||||
)
|
||||
(if (!= (pickup-collectable!
|
||||
(-> self fact-info-target)
|
||||
(the-as pickup-type s4-0)
|
||||
(the-as float 0.0)
|
||||
(the-as handle #f)
|
||||
)
|
||||
(pickup-collectable! (-> self fact-info-target) (the-as pickup-type s4-0) f28-0 (process->handle arg0))
|
||||
(the-as
|
||||
object
|
||||
(case arg2
|
||||
(('get-pickup)
|
||||
(when (not (logtest? (-> self state-flags) (state-flags dying)))
|
||||
(let ((s4-0 (-> arg3 param 0))
|
||||
(f28-0 (the-as float (-> arg3 param 1)))
|
||||
)
|
||||
(if (!= (pickup-collectable!
|
||||
(-> self fact-info-target)
|
||||
(the-as pickup-type s4-0)
|
||||
(the-as float 0.0)
|
||||
(the-as handle #f)
|
||||
)
|
||||
#t
|
||||
'full
|
||||
)
|
||||
)
|
||||
(pickup-collectable! (-> self fact-info-target) (the-as pickup-type s4-0) f28-0 (process->handle arg0))
|
||||
)
|
||||
#t
|
||||
'full
|
||||
)
|
||||
)
|
||||
)
|
||||
((= v1-0 'reset-pickup)
|
||||
(reset! (-> self fact-info-target) (the-as symbol (-> arg3 param 0)))
|
||||
)
|
||||
(('reset-pickup)
|
||||
(the-as object (reset! (-> self fact-info-target) (the-as symbol (-> arg3 param 0))))
|
||||
)
|
||||
(('reset-collide)
|
||||
(cond
|
||||
((-> self control unknown-symbol00)
|
||||
(target-collide-set! (-> self control unknown-symbol00) (-> self control unknown-float90))
|
||||
)
|
||||
((-> self control unknown-symbol30)
|
||||
(target-danger-set! (-> self control unknown-symbol30) #f)
|
||||
)
|
||||
)
|
||||
((= v1-0 'reset-collide)
|
||||
(cond
|
||||
((-> self control unknown-symbol00)
|
||||
(target-collide-set! (-> self control unknown-symbol00) (-> self control unknown-float90))
|
||||
)
|
||||
((-> self control unknown-symbol30)
|
||||
(target-danger-set! (-> self control unknown-symbol30) #f)
|
||||
)
|
||||
)
|
||||
)
|
||||
((= v1-0 'level-deactivate)
|
||||
#f
|
||||
)
|
||||
((= v1-0 'level-enter)
|
||||
(let ((v1-21 (level-get *level* (the-as symbol (-> arg3 param 0)))))
|
||||
(when v1-21
|
||||
(let ((s5-1 (-> v1-21 info)))
|
||||
(let ((v1-22 (-> s5-1 buzzer)))
|
||||
(if (zero? v1-22)
|
||||
(set! (-> self fact-info-target buzzer) 0.0)
|
||||
(set! (-> self fact-info-target buzzer) (pickup-collectable!
|
||||
(-> self fact-info-target)
|
||||
(pickup-type buzzer)
|
||||
(the float (logior -65536 v1-22))
|
||||
(the-as handle #f)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(if (and (zero? (-> *game-info* enter-level-time (-> s5-1 index)))
|
||||
(>= (-> *level-task-data-remap* length) (-> s5-1 index))
|
||||
)
|
||||
(set! (-> *game-info* enter-level-time (-> *level-task-data-remap* (+ (-> s5-1 index) -1)))
|
||||
(-> *display* base-frame-counter)
|
||||
)
|
||||
(('level-deactivate)
|
||||
#f
|
||||
)
|
||||
(('level-enter)
|
||||
(let ((v1-21 (level-get *level* (the-as symbol (-> arg3 param 0)))))
|
||||
(when v1-21
|
||||
(let ((s5-1 (-> v1-21 info)))
|
||||
(let ((v1-22 (-> s5-1 buzzer)))
|
||||
(if (zero? v1-22)
|
||||
(set! (-> self fact-info-target buzzer) 0.0)
|
||||
(set! (-> self fact-info-target buzzer) (pickup-collectable!
|
||||
(-> self fact-info-target)
|
||||
(pickup-type buzzer)
|
||||
(the float (logior -65536 v1-22))
|
||||
(the-as handle #f)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(send-event (ppointer->process (-> *hud-parts* buzzers)) 'sync)
|
||||
(format #t "GAMEPLAY: enter ~A~%" (-> arg3 param 0))
|
||||
(if (and (zero? (-> *game-info* enter-level-time (-> s5-1 index)))
|
||||
(>= (-> *level-task-data-remap* length) (-> s5-1 index))
|
||||
)
|
||||
(set! (-> *game-info* enter-level-time (-> *level-task-data-remap* (+ (-> s5-1 index) -1)))
|
||||
(-> *display* base-frame-counter)
|
||||
)
|
||||
)
|
||||
)
|
||||
(send-event (ppointer->process (-> *hud-parts* buzzers)) 'sync)
|
||||
(format #t "GAMEPLAY: enter ~A~%" (-> arg3 param 0))
|
||||
)
|
||||
)
|
||||
)
|
||||
(('get-attack-count)
|
||||
(set! v0-0 (+ (-> self control unknown-dword51) (-> arg3 param 0)))
|
||||
(set! (-> self control unknown-dword51) (the-as int v0-0))
|
||||
v0-0
|
||||
)
|
||||
(('continue)
|
||||
(go target-continue (the-as continue-point (-> arg3 param 0)))
|
||||
)
|
||||
(('query)
|
||||
(case (-> arg3 param 0)
|
||||
(('powerup)
|
||||
(and (= (-> self fact-info-target eco-type) (-> arg3 param 1)) (< 0.0 (-> self fact-info-target eco-level)))
|
||||
)
|
||||
(('pickup)
|
||||
(pickup-collectable!
|
||||
(-> self fact-info-target)
|
||||
(the-as pickup-type (-> arg3 param 1))
|
||||
(the-as float 0.0)
|
||||
(the-as handle #f)
|
||||
)
|
||||
)
|
||||
(('ground-height)
|
||||
(target-height-above-ground)
|
||||
)
|
||||
)
|
||||
)
|
||||
(('trans)
|
||||
(case (-> arg3 param 0)
|
||||
(('save)
|
||||
(set! (-> self alt-cam-pos quad) (-> self control trans quad))
|
||||
(set! (-> self state-flags) (logior (state-flags has-saved-position) (-> self state-flags)))
|
||||
(mem-copy! (the-as pointer (-> arg3 param 1)) (the-as pointer (-> self control trans)) 48)
|
||||
)
|
||||
(('restore)
|
||||
(logclear! (-> self state-flags) (state-flags has-saved-position))
|
||||
(let ((gp-1 (-> arg3 param 1)))
|
||||
(move-to-point! (-> self control) (the-as vector (+ gp-1 0)))
|
||||
(quaternion-copy! (-> self control quat) (the-as quaternion (+ gp-1 16)))
|
||||
)
|
||||
(rot->dir-targ! (-> self control))
|
||||
(logior! (-> self control status) (cshape-moving-flags onsurf onground tsurf))
|
||||
(set! v0-0 (-> *display* base-frame-counter))
|
||||
(set! (-> self control unknown-dword11) (the-as time-frame v0-0))
|
||||
v0-0
|
||||
)
|
||||
(('reset)
|
||||
(set! v0-0 (logclear (-> self state-flags) (state-flags has-saved-position)))
|
||||
(set! (-> self state-flags) (the-as state-flags v0-0))
|
||||
v0-0
|
||||
)
|
||||
)
|
||||
)
|
||||
(('effect)
|
||||
(the-as object (target-powerup-effect (the-as symbol (-> arg3 param 0))))
|
||||
)
|
||||
(('do-effect)
|
||||
(effect-control-method-10
|
||||
(-> self skel effect)
|
||||
(the-as symbol (-> arg3 param 0))
|
||||
(the-as float (-> arg3 param 1))
|
||||
-1
|
||||
)
|
||||
(if (-> self sidekick)
|
||||
(effect-control-method-10
|
||||
(-> self sidekick 0 skel effect)
|
||||
(the-as symbol (-> arg3 param 0))
|
||||
(the-as float (-> arg3 param 1))
|
||||
-1
|
||||
)
|
||||
)
|
||||
)
|
||||
((= v1-0 'get-attack-count)
|
||||
(set! v0-0 (the-as object (+ (-> self control unknown-dword51) (-> arg3 param 0))))
|
||||
(set! (-> self control unknown-dword51) (the-as int v0-0))
|
||||
v0-0
|
||||
)
|
||||
((= v1-0 'continue)
|
||||
(go target-continue (the-as continue-point (-> arg3 param 0)))
|
||||
)
|
||||
((= v1-0 'query)
|
||||
(case (-> arg3 param 0)
|
||||
(('powerup)
|
||||
(and (= (-> self fact-info-target eco-type) (-> arg3 param 1)) (< 0.0 (-> self fact-info-target eco-level)))
|
||||
)
|
||||
(('pickup)
|
||||
(pickup-collectable!
|
||||
(-> self fact-info-target)
|
||||
(the-as pickup-type (-> arg3 param 1))
|
||||
(the-as float 0.0)
|
||||
(the-as handle #f)
|
||||
)
|
||||
)
|
||||
(('ground-height)
|
||||
(target-height-above-ground)
|
||||
)
|
||||
)
|
||||
(('neck)
|
||||
(set! (-> self neck flex-blend) (the-as float (-> arg3 param 0)))
|
||||
(cond
|
||||
((-> arg3 param 1)
|
||||
(set! (-> self state-flags) (logior (state-flags looking-at-enemy) (-> self state-flags)))
|
||||
(set! (-> self alt-neck-pos quad) (-> (the-as vector (-> arg3 param 1)) quad))
|
||||
(the-as object (look-at-enemy! (-> self neck) (-> self alt-neck-pos) 'force arg0))
|
||||
)
|
||||
(else
|
||||
(set! v0-0 (logclear (-> self state-flags) (state-flags looking-at-enemy)))
|
||||
(set! (-> self state-flags) (the-as state-flags v0-0))
|
||||
v0-0
|
||||
)
|
||||
)
|
||||
((= v1-0 'trans)
|
||||
(case (-> arg3 param 0)
|
||||
(('save)
|
||||
(set! (-> self alt-cam-pos quad) (-> self control trans quad))
|
||||
(set! (-> self state-flags) (logior (state-flags has-saved-position) (-> self state-flags)))
|
||||
(mem-copy! (the-as pointer (-> arg3 param 1)) (the-as pointer (-> self control trans)) 48)
|
||||
)
|
||||
(('restore)
|
||||
(logclear! (-> self state-flags) (state-flags has-saved-position))
|
||||
(let ((gp-1 (-> arg3 param 1)))
|
||||
(move-to-point! (-> self control) (the-as vector (+ gp-1 0)))
|
||||
(quaternion-copy! (-> self control quat) (the-as quaternion (+ gp-1 16)))
|
||||
)
|
||||
(rot->dir-targ! (-> self control))
|
||||
(logior! (-> self control status) (cshape-moving-flags onsurf onground tsurf))
|
||||
(set! v0-0 (the-as object (-> *display* base-frame-counter)))
|
||||
(set! (-> self control unknown-dword11) (the-as time-frame v0-0))
|
||||
v0-0
|
||||
)
|
||||
(('reset)
|
||||
(set! v0-0 (the-as object (logclear (-> self state-flags) (state-flags has-saved-position))))
|
||||
(set! (-> self state-flags) (the-as state-flags v0-0))
|
||||
v0-0
|
||||
)
|
||||
)
|
||||
)
|
||||
((= v1-0 'effect)
|
||||
(target-powerup-effect (the-as symbol (-> arg3 param 0)))
|
||||
)
|
||||
((= v1-0 'do-effect)
|
||||
(dummy-10 (-> self skel effect) (the-as symbol (-> arg3 param 0)) (the-as float (-> arg3 param 1)) -1)
|
||||
(if (-> self sidekick)
|
||||
(dummy-10
|
||||
(-> self sidekick 0 skel effect)
|
||||
(the-as symbol (-> arg3 param 0))
|
||||
(the-as float (-> arg3 param 1))
|
||||
-1
|
||||
)
|
||||
)
|
||||
)
|
||||
((= v1-0 'neck)
|
||||
(set! (-> self neck flex-blend) (the-as float (-> arg3 param 0)))
|
||||
(cond
|
||||
((-> arg3 param 1)
|
||||
(set! (-> self state-flags) (logior (state-flags looking-at-enemy) (-> self state-flags)))
|
||||
(set! (-> self alt-neck-pos quad) (-> (the-as vector (-> arg3 param 1)) quad))
|
||||
(look-at-enemy! (-> self neck) (-> self alt-neck-pos) 'force arg0)
|
||||
)
|
||||
(else
|
||||
(set! v0-0 (the-as object (logclear (-> self state-flags) (state-flags looking-at-enemy))))
|
||||
(set! (-> self state-flags) (the-as state-flags v0-0))
|
||||
v0-0
|
||||
)
|
||||
)
|
||||
)
|
||||
((= v1-0 'sidekick)
|
||||
(cond
|
||||
((and (-> arg3 param 0) (not (-> self sidekick)))
|
||||
(let ((gp-2 (get-process *default-dead-pool* sidekick #x4000)))
|
||||
(set! v0-0 (when gp-2
|
||||
(let ((t9-21 (method-of-type sidekick activate)))
|
||||
(t9-21 (the-as sidekick gp-2) self 'sidekick (the-as pointer #x70004000))
|
||||
)
|
||||
(run-now-in-process gp-2 init-sidekick)
|
||||
(-> gp-2 ppointer)
|
||||
)
|
||||
(('sidekick)
|
||||
(cond
|
||||
((and (-> arg3 param 0) (not (-> self sidekick)))
|
||||
(let ((gp-2 (get-process *default-dead-pool* sidekick #x4000)))
|
||||
(set! v0-0 (when gp-2
|
||||
(let ((t9-21 (method-of-type sidekick activate)))
|
||||
(t9-21 (the-as sidekick gp-2) self 'sidekick (the-as pointer #x70004000))
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> self sidekick) (the-as (pointer sidekick) v0-0))
|
||||
v0-0
|
||||
(run-now-in-process gp-2 init-sidekick)
|
||||
(-> gp-2 ppointer)
|
||||
)
|
||||
)
|
||||
)
|
||||
((and (not (-> arg3 param 0)) (-> self sidekick))
|
||||
(deactivate (-> self sidekick 0))
|
||||
(set! (-> self sidekick) (the-as (pointer sidekick) #f))
|
||||
#f
|
||||
(set! (-> self sidekick) (the-as (pointer sidekick) v0-0))
|
||||
v0-0
|
||||
)
|
||||
((and (not (-> arg3 param 0)) (-> self sidekick))
|
||||
(deactivate (-> self sidekick 0))
|
||||
(set! (-> self sidekick) (the-as (pointer sidekick) #f))
|
||||
#f
|
||||
)
|
||||
)
|
||||
)
|
||||
(('blend-shape)
|
||||
(if (-> arg3 param 0)
|
||||
(logior! (-> self skel status) (janim-status blerc))
|
||||
(logclear! (-> self skel status) (janim-status blerc))
|
||||
)
|
||||
(let ((v1-105 (new 'stack-no-clear 'event-message-block)))
|
||||
(set! (-> v1-105 from) arg0)
|
||||
(set! (-> v1-105 num-params) arg1)
|
||||
(set! (-> v1-105 message) arg2)
|
||||
(set! (-> v1-105 param 0) (-> arg3 param 0))
|
||||
(set! (-> v1-105 param 1) (-> arg3 param 1))
|
||||
(set! (-> v1-105 param 2) (-> arg3 param 2))
|
||||
(set! (-> v1-105 param 3) (-> arg3 param 3))
|
||||
(set! (-> v1-105 param 4) (-> arg3 param 4))
|
||||
(set! (-> v1-105 param 5) (-> arg3 param 5))
|
||||
(set! (-> v1-105 param 6) (-> arg3 param 6))
|
||||
(send-event-function (ppointer->process (-> self sidekick)) v1-105)
|
||||
)
|
||||
)
|
||||
(('shadow)
|
||||
(cond
|
||||
((-> arg3 param 0)
|
||||
(let ((v1-108 (-> self draw shadow-ctrl)))
|
||||
(logclear! (-> v1-108 settings flags) (shadow-flags disable-draw))
|
||||
)
|
||||
)
|
||||
)
|
||||
((= v1-0 'blend-shape)
|
||||
(if (-> arg3 param 0)
|
||||
(logior! (-> self skel status) (janim-status blerc))
|
||||
(logclear! (-> self skel status) (janim-status blerc))
|
||||
0
|
||||
)
|
||||
(else
|
||||
(let ((v1-110 (-> self draw shadow-ctrl)))
|
||||
(logior! (-> v1-110 settings flags) (shadow-flags disable-draw))
|
||||
)
|
||||
(let ((v1-105 (new 'stack-no-clear 'event-message-block)))
|
||||
(set! (-> v1-105 from) arg0)
|
||||
(set! (-> v1-105 num-params) arg1)
|
||||
(set! (-> v1-105 message) arg2)
|
||||
(set! (-> v1-105 param 0) (-> arg3 param 0))
|
||||
(set! (-> v1-105 param 1) (-> arg3 param 1))
|
||||
(set! (-> v1-105 param 2) (-> arg3 param 2))
|
||||
(set! (-> v1-105 param 3) (-> arg3 param 3))
|
||||
(set! (-> v1-105 param 4) (-> arg3 param 4))
|
||||
(set! (-> v1-105 param 5) (-> arg3 param 5))
|
||||
(set! (-> v1-105 param 6) (-> arg3 param 6))
|
||||
(send-event-function (ppointer->process (-> self sidekick)) v1-105)
|
||||
0
|
||||
)
|
||||
)
|
||||
((= v1-0 'shadow)
|
||||
(cond
|
||||
((-> arg3 param 0)
|
||||
(let ((v1-108 (-> self draw shadow-ctrl)))
|
||||
(logclear! (-> v1-108 settings flags) (shadow-flags disable-draw))
|
||||
)
|
||||
0
|
||||
)
|
||||
(else
|
||||
(let ((v1-110 (-> self draw shadow-ctrl)))
|
||||
(logior! (-> v1-110 settings flags) (shadow-flags disable-draw))
|
||||
)
|
||||
0
|
||||
)
|
||||
(('rotate-y-angle)
|
||||
(quaternion-rotate-y!
|
||||
(-> self control unknown-quaternion00)
|
||||
(-> self control unknown-quaternion00)
|
||||
(the-as float (-> arg3 param 0))
|
||||
)
|
||||
(if (= (-> *cpad-list* cpads (-> self control unknown-cpad-info00 number) stick0-speed) 0.0)
|
||||
(rot->dir-targ! (-> self control))
|
||||
)
|
||||
)
|
||||
(('touched)
|
||||
(send-event arg0 'touch (-> arg3 param 0))
|
||||
)
|
||||
(('dry)
|
||||
(set! (-> self water drip-wetness) 0.0)
|
||||
)
|
||||
(('reset-height)
|
||||
(set! (-> self control unknown-vector52 quad) (-> self control trans quad))
|
||||
#f
|
||||
)
|
||||
(('draw)
|
||||
(if (-> arg3 param 0)
|
||||
(logclear! (-> self draw status) (draw-status skip-bones))
|
||||
(logior! (-> self draw status) (draw-status skip-bones))
|
||||
)
|
||||
(let ((v1-132 (new 'stack-no-clear 'event-message-block)))
|
||||
(set! (-> v1-132 from) arg0)
|
||||
(set! (-> v1-132 num-params) arg1)
|
||||
(set! (-> v1-132 message) arg2)
|
||||
(set! (-> v1-132 param 0) (-> arg3 param 0))
|
||||
(set! (-> v1-132 param 1) (-> arg3 param 1))
|
||||
(set! (-> v1-132 param 2) (-> arg3 param 2))
|
||||
(set! (-> v1-132 param 3) (-> arg3 param 3))
|
||||
(set! (-> v1-132 param 4) (-> arg3 param 4))
|
||||
(set! (-> v1-132 param 5) (-> arg3 param 5))
|
||||
(set! (-> v1-132 param 6) (-> arg3 param 6))
|
||||
(send-event-function (ppointer->process (-> self manipy)) v1-132)
|
||||
)
|
||||
)
|
||||
(('no-load-wait)
|
||||
(set! v0-0 (+ (-> *display* base-frame-counter) (the-as time-frame (-> arg3 param 0))))
|
||||
(set! (-> self no-load-wait) (the-as time-frame v0-0))
|
||||
v0-0
|
||||
)
|
||||
(('no-look-around)
|
||||
(set! (-> self no-look-around-wait)
|
||||
(+ (-> *display* base-frame-counter) (the-as time-frame (-> arg3 param 0)))
|
||||
)
|
||||
(if (= (-> self next-state name) 'target-look-around)
|
||||
(send-event self 'end-mode)
|
||||
)
|
||||
)
|
||||
(('change-state)
|
||||
(go
|
||||
(the-as (state object object object object target) (-> arg3 param 0))
|
||||
(-> arg3 param 1)
|
||||
(-> arg3 param 2)
|
||||
(-> arg3 param 3)
|
||||
(-> arg3 param 4)
|
||||
)
|
||||
((= v1-0 'rotate-y-angle)
|
||||
(quaternion-rotate-y!
|
||||
(-> self control unknown-quaternion00)
|
||||
(-> self control unknown-quaternion00)
|
||||
(the-as float (-> arg3 param 0))
|
||||
)
|
||||
(if (= (-> *cpad-list* cpads (-> self control unknown-cpad-info00 number) stick0-speed) 0.0)
|
||||
(rot->dir-targ! (-> self control))
|
||||
)
|
||||
)
|
||||
((= v1-0 'touched)
|
||||
(send-event arg0 'touch (-> arg3 param 0))
|
||||
)
|
||||
((= v1-0 'dry)
|
||||
(let ((f0-9 0.0))
|
||||
(set! (-> self water drip-wetness) f0-9)
|
||||
f0-9
|
||||
)
|
||||
)
|
||||
((= v1-0 'reset-height)
|
||||
(set! (-> self control unknown-vector52 quad) (-> self control trans quad))
|
||||
#f
|
||||
)
|
||||
((= v1-0 'draw)
|
||||
(if (-> arg3 param 0)
|
||||
(logclear! (-> self draw status) (draw-status skip-bones))
|
||||
(logior! (-> self draw status) (draw-status skip-bones))
|
||||
)
|
||||
(let ((v1-132 (new 'stack-no-clear 'event-message-block)))
|
||||
(set! (-> v1-132 from) arg0)
|
||||
(set! (-> v1-132 num-params) arg1)
|
||||
(set! (-> v1-132 message) arg2)
|
||||
(set! (-> v1-132 param 0) (-> arg3 param 0))
|
||||
(set! (-> v1-132 param 1) (-> arg3 param 1))
|
||||
(set! (-> v1-132 param 2) (-> arg3 param 2))
|
||||
(set! (-> v1-132 param 3) (-> arg3 param 3))
|
||||
(set! (-> v1-132 param 4) (-> arg3 param 4))
|
||||
(set! (-> v1-132 param 5) (-> arg3 param 5))
|
||||
(set! (-> v1-132 param 6) (-> arg3 param 6))
|
||||
(send-event-function (ppointer->process (-> self manipy)) v1-132)
|
||||
)
|
||||
)
|
||||
((= v1-0 'no-load-wait)
|
||||
(set! v0-0 (the-as object (+ (-> *display* base-frame-counter) (the-as time-frame (-> arg3 param 0)))))
|
||||
(set! (-> self no-load-wait) (the-as time-frame v0-0))
|
||||
v0-0
|
||||
)
|
||||
((= v1-0 'no-look-around)
|
||||
(set! (-> self no-look-around-wait)
|
||||
(+ (-> *display* base-frame-counter) (the-as time-frame (-> arg3 param 0)))
|
||||
)
|
||||
(if (= (-> self next-state name) 'target-look-around)
|
||||
(send-event self 'end-mode)
|
||||
)
|
||||
)
|
||||
((= v1-0 'change-state)
|
||||
(go
|
||||
(the-as (state object object object object target) (-> arg3 param 0))
|
||||
(-> arg3 param 1)
|
||||
(-> arg3 param 2)
|
||||
(-> arg3 param 3)
|
||||
(-> arg3 param 4)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -338,8 +314,13 @@
|
||||
arg0
|
||||
)
|
||||
|
||||
(defbehavior target-attacked target ((arg0 symbol) (arg1 attack-info) (arg2 process) (arg3 touching-shapes-entry) (arg4 (state symbol attack-info target)))
|
||||
(when (zero? (logand (-> self state-flags) (state-flags being-attacked)))
|
||||
(defbehavior target-attacked target ((arg0 symbol)
|
||||
(arg1 attack-info)
|
||||
(arg2 process)
|
||||
(arg3 touching-shapes-entry)
|
||||
(arg4 (state symbol attack-info target))
|
||||
)
|
||||
(when (not (logtest? (-> self state-flags) (state-flags being-attacked)))
|
||||
(cond
|
||||
((or (logtest? (-> self state-flags) (state-flags invulnerable timed-invulnerable invuln-powerup))
|
||||
(and (logtest? (-> arg1 mask) (attack-mask mode))
|
||||
@@ -507,10 +488,10 @@
|
||||
)
|
||||
)
|
||||
(else
|
||||
(dummy-10 (-> self skel effect) 'group-spin-hit (the-as float -1.0) 74)
|
||||
(effect-control-method-10 (-> self skel effect) 'group-spin-hit (the-as float -1.0) 74)
|
||||
)
|
||||
)
|
||||
(dummy-12
|
||||
(effect-control-method-12
|
||||
(-> self skel effect)
|
||||
(-> self control unknown-symbol30)
|
||||
(the-as float -1.0)
|
||||
@@ -591,7 +572,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(dummy-12
|
||||
(effect-control-method-12
|
||||
(-> self skel effect)
|
||||
(-> self control unknown-symbol30)
|
||||
(the-as float -1.0)
|
||||
@@ -602,7 +583,7 @@
|
||||
(cpad-set-buzz! (-> *cpad-list* cpads 0) 1 178 (seconds 0.1))
|
||||
)
|
||||
((= v1-5 'flip)
|
||||
(dummy-12
|
||||
(effect-control-method-12
|
||||
(-> self skel effect)
|
||||
(-> self control unknown-symbol30)
|
||||
(the-as float -1.0)
|
||||
@@ -683,8 +664,8 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(dummy-10 (-> self skel effect) 'group-uppercut-hit (the-as float -1.0) 23)
|
||||
(dummy-12
|
||||
(effect-control-method-10 (-> self skel effect) 'group-uppercut-hit (the-as float -1.0) 23)
|
||||
(effect-control-method-12
|
||||
(-> self skel effect)
|
||||
(-> self control unknown-symbol30)
|
||||
(the-as float -1.0)
|
||||
@@ -695,9 +676,9 @@
|
||||
(cpad-set-buzz! (-> *cpad-list* cpads 0) 1 178 (seconds 0.1))
|
||||
)
|
||||
((or (= v1-5 'flop) (= v1-5 'flop-down))
|
||||
(dummy-10 (-> self skel effect) 'group-flop-hit (the-as float -1.0) 23)
|
||||
(dummy-10 (-> self skel effect) 'group-flop-hit (the-as float -1.0) 17)
|
||||
(dummy-12
|
||||
(effect-control-method-10 (-> self skel effect) 'group-flop-hit (the-as float -1.0) 23)
|
||||
(effect-control-method-10 (-> self skel effect) 'group-flop-hit (the-as float -1.0) 17)
|
||||
(effect-control-method-12
|
||||
(-> self skel effect)
|
||||
(-> self control unknown-symbol30)
|
||||
(the-as float -1.0)
|
||||
@@ -708,7 +689,7 @@
|
||||
(cpad-set-buzz! (-> *cpad-list* cpads 0) 1 178 (seconds 0.1))
|
||||
)
|
||||
((= v1-5 'flut-attack)
|
||||
(dummy-12
|
||||
(effect-control-method-12
|
||||
(-> self skel effect)
|
||||
(-> self control unknown-symbol30)
|
||||
(the-as float -1.0)
|
||||
|
||||
@@ -1625,7 +1625,7 @@
|
||||
)
|
||||
:code (behavior ((arg0 float) (arg1 float))
|
||||
(ja-channel-push! 2 (seconds 0.05))
|
||||
(dummy-10 (-> self skel effect) 'jump-double (the-as float -1.0) -1)
|
||||
(effect-control-method-10 (-> self skel effect) 'jump-double (the-as float -1.0) -1)
|
||||
(ja-no-eval :group! eichar-jump-ja :num! (seek!) :frame-num (ja-aframe (the-as float 5.0) 0))
|
||||
(ja :chan 1 :group! eichar-jump-forward-ja :num! (chan 0))
|
||||
(until (ja-done? 0)
|
||||
@@ -1917,7 +1917,7 @@
|
||||
((let ((v1-4 (ja-group)))
|
||||
(or (= v1-4 eichar-launch-jump-ja) (= v1-4 eichar-launch-jump-loop-ja))
|
||||
)
|
||||
(dummy-10 (-> self skel effect) 'group-blue-hit-ground-effect (the-as float 0.0) -1)
|
||||
(effect-control-method-10 (-> self skel effect) 'group-blue-hit-ground-effect (the-as float 0.0) -1)
|
||||
(cpad-set-buzz! (-> *cpad-list* cpads 0) 1 255 (seconds 0.3))
|
||||
)
|
||||
(else
|
||||
@@ -2033,7 +2033,7 @@
|
||||
(when (and (= (-> self fact-info-target eco-type) (pickup-type eco-red))
|
||||
(>= (-> self fact-info-target eco-level) 1.0)
|
||||
)
|
||||
(dummy-10 (-> self skel effect) 'group-red-eco-spinkick (ja-frame-num 0) 74)
|
||||
(effect-control-method-10 (-> self skel effect) 'group-red-eco-spinkick (ja-frame-num 0) 74)
|
||||
(cpad-set-buzz! (-> *cpad-list* cpads 0) 1 153 (seconds 0.1))
|
||||
(level-hint-spawn
|
||||
(game-text-id misty-eco-red-first-use)
|
||||
@@ -2218,7 +2218,7 @@
|
||||
(if (and (logtest? (-> self water flags) (water-flags wt09))
|
||||
(zero? (mod (- (-> *display* base-frame-counter) (-> self state-time)) 21))
|
||||
)
|
||||
(dummy-13
|
||||
(create-splash
|
||||
(-> self water)
|
||||
(the-as float 0.6)
|
||||
(vector<-cspace! (new 'stack-no-clear 'vector) (-> self node-list data 37))
|
||||
@@ -2229,7 +2229,7 @@
|
||||
(when (and (= (-> self fact-info-target eco-type) (pickup-type eco-red))
|
||||
(>= (-> self fact-info-target eco-level) 1.0)
|
||||
)
|
||||
(dummy-10 (-> self skel effect) 'group-red-eco-spinkick (ja-frame-num 0) 23)
|
||||
(effect-control-method-10 (-> self skel effect) 'group-red-eco-spinkick (ja-frame-num 0) 23)
|
||||
(cpad-set-buzz! (-> *cpad-list* cpads 0) 1 153 (seconds 0.1))
|
||||
(level-hint-spawn
|
||||
(game-text-id misty-eco-red-first-use)
|
||||
@@ -2456,7 +2456,7 @@
|
||||
(when (and (= (-> self fact-info-target eco-type) (pickup-type eco-red))
|
||||
(>= (-> self fact-info-target eco-level) 1.0)
|
||||
)
|
||||
(dummy-10 (-> self skel effect) 'group-red-eco-spinkick (ja-frame-num 0) 70)
|
||||
(effect-control-method-10 (-> self skel effect) 'group-red-eco-spinkick (ja-frame-num 0) 70)
|
||||
(cpad-set-buzz! (-> *cpad-list* cpads 0) 1 153 (seconds 0.1))
|
||||
(level-hint-spawn
|
||||
(game-text-id misty-eco-red-first-use)
|
||||
@@ -2620,7 +2620,7 @@
|
||||
(when (and (= (-> self fact-info-target eco-type) (pickup-type eco-red))
|
||||
(>= (-> self fact-info-target eco-level) 1.0)
|
||||
)
|
||||
(dummy-10 (-> self skel effect) 'group-red-eco-spinkick (ja-frame-num 0) 23)
|
||||
(effect-control-method-10 (-> self skel effect) 'group-red-eco-spinkick (ja-frame-num 0) 23)
|
||||
(cpad-set-buzz! (-> *cpad-list* cpads 0) 1 153 (seconds 0.1))
|
||||
)
|
||||
(if (and (= (-> self control unknown-symbol30) 'uppercut)
|
||||
@@ -2675,7 +2675,7 @@
|
||||
)
|
||||
(cond
|
||||
((< 6144.0 (target-height-above-ground))
|
||||
(dummy-10 (-> self skel effect) 'swim-flop (the-as float -1.0) -1)
|
||||
(effect-control-method-10 (-> self skel effect) 'swim-flop (the-as float -1.0) -1)
|
||||
(let ((t9-3 enter-state))
|
||||
(set! (-> self next-state) target-swim-down)
|
||||
((the-as (function object :behavior target) t9-3))
|
||||
@@ -2764,7 +2764,7 @@
|
||||
(>= (-> self fact-info-target eco-level) 1.0)
|
||||
)
|
||||
(cpad-set-buzz! (-> *cpad-list* cpads 0) 1 255 (seconds 0.5))
|
||||
(dummy-10 (-> self skel effect) 'group-red-eco-strike-ground (ja-frame-num 0) 0)
|
||||
(effect-control-method-10 (-> self skel effect) 'group-red-eco-strike-ground (ja-frame-num 0) 0)
|
||||
(let ((s5-1 (process-spawn touch-tracker :init touch-tracker-init (-> self control trans) 4096.0 30 :to self)))
|
||||
(send-event (ppointer->process s5-1) 'event 'attack 'flop)
|
||||
(send-event
|
||||
@@ -2790,7 +2790,7 @@
|
||||
(when (and (= (-> self fact-info-target eco-type) (pickup-type eco-red))
|
||||
(>= (-> self fact-info-target eco-level) 1.0)
|
||||
)
|
||||
(dummy-10
|
||||
(effect-control-method-10
|
||||
(-> self skel effect)
|
||||
'group-red-eco-spinkick
|
||||
(ja-frame-num 0)
|
||||
@@ -2954,7 +2954,7 @@
|
||||
)
|
||||
(< (- (-> *display* base-frame-counter) (-> self state-time)) (seconds 0.25))
|
||||
)
|
||||
(dummy-10
|
||||
(effect-control-method-10
|
||||
(-> self skel effect)
|
||||
'group-red-eco-spinkick
|
||||
(ja-frame-num 0)
|
||||
|
||||
@@ -1692,7 +1692,7 @@
|
||||
)
|
||||
(when (and (cpad-pressed? (-> self control unknown-cpad-info00 number) circle) (can-feet?))
|
||||
(sound-play "swim-stroke")
|
||||
(dummy-13 (-> self water) (the-as float 1.4) (-> self control trans) 0 (-> self control transv))
|
||||
(create-splash (-> self water) (the-as float 1.4) (-> self control trans) 0 (-> self control transv))
|
||||
(go target-attack)
|
||||
)
|
||||
(if (can-hands? #t)
|
||||
@@ -1737,7 +1737,7 @@
|
||||
)
|
||||
(when (and (cpad-pressed? (-> self control unknown-cpad-info00 number) circle) (can-feet?))
|
||||
(sound-play "swim-stroke")
|
||||
(dummy-13 (-> self water) (the-as float 1.4) (-> self control trans) 0 (-> self control transv))
|
||||
(create-splash (-> self water) (the-as float 1.4) (-> self control trans) 0 (-> self control transv))
|
||||
(go target-attack)
|
||||
)
|
||||
(if (can-hands? #t)
|
||||
@@ -1893,7 +1893,7 @@
|
||||
)
|
||||
(case (the int (ja-aframe-num 0))
|
||||
((15 16 17 18)
|
||||
(dummy-13
|
||||
(create-splash
|
||||
(-> self water)
|
||||
(the-as float 0.2)
|
||||
(vector<-cspace! (new 'stack-no-clear 'vector) (-> self node-list data 75))
|
||||
@@ -1903,7 +1903,7 @@
|
||||
(set! gp-6 (the-as int (-> *display* base-frame-counter)))
|
||||
)
|
||||
((46 47 48 49)
|
||||
(dummy-13
|
||||
(create-splash
|
||||
(-> self water)
|
||||
(the-as float 0.2)
|
||||
(vector<-cspace! (new 'stack-no-clear 'vector) (-> self node-list data 71))
|
||||
@@ -2282,7 +2282,7 @@
|
||||
(the-as float 1.0)
|
||||
)
|
||||
(if (= (ja-aframe-num 0) 73.0)
|
||||
(dummy-13 (-> self water) (the-as float 0.7) (-> self control trans) 1 *null-vector*)
|
||||
(create-splash (-> self water) (the-as float 0.7) (-> self control trans) 1 *null-vector*)
|
||||
)
|
||||
(suspend)
|
||||
(ja :num! (seek!))
|
||||
|
||||
@@ -96,7 +96,7 @@
|
||||
(init-particles! (_type_ int) none 20)
|
||||
(get-icon-pos-x (_type_) int 21)
|
||||
(get-icon-pos-y (_type_) int 22)
|
||||
(dummy-23 (_type_) none 23) ;; unused
|
||||
(hud-method-23 (_type_) none 23)
|
||||
(set-pos-and-scale (_type_ symbol symbol) none 24)
|
||||
(get-icon-scale-x (_type_) float 25)
|
||||
(get-icon-scale-y (_type_) float 26)
|
||||
|
||||
@@ -300,11 +300,11 @@
|
||||
:size-assert #x2dc
|
||||
:flag-assert #x3b027002dc
|
||||
(:methods
|
||||
(progress-dummy-14 (_type_) none 14) ;; unused
|
||||
(progress-dummy-15 (_type_) none 15) ;; unused
|
||||
(progress-dummy-16 (_type_) none 16) ;; unused
|
||||
(progress-method-14 (_type_) none 14)
|
||||
(progress-method-15 (_type_) none 15)
|
||||
(progress-method-16 (_type_) none 16)
|
||||
(draw-progress (_type_) none 17)
|
||||
(progress-dummy-18 () none 18) ;; unused
|
||||
(progress-method-18 () none 18)
|
||||
(visible? (_type_) symbol 19)
|
||||
(hidden? (_type_) symbol 20)
|
||||
(adjust-sprites (_type_) none 21)
|
||||
@@ -330,10 +330,10 @@
|
||||
(draw-memcard-auto-save-error (_type_ font-context) none 41)
|
||||
(draw-memcard-removed (_type_ font-context) none 42)
|
||||
(draw-memcard-error (_type_ font-context) none 43)
|
||||
(progress-dummy-44 (_type_) none 44) ;; unused
|
||||
(progress-method-44 (_type_) none 44)
|
||||
(push! (_type_) none 45)
|
||||
(pop! (_type_) none 46)
|
||||
(progress-dummy-47 (_type_) none 47) ;; unused
|
||||
(progress-method-47 (_type_) none 47)
|
||||
(enter! (_type_ progress-screen int) none 48)
|
||||
(draw-memcard-format (_type_ font-context) none 49)
|
||||
(draw-auto-save (_type_ font-context) none 50)
|
||||
|
||||
@@ -283,7 +283,7 @@
|
||||
(deactivate (_type_) none 10)
|
||||
(init-from-entity! (_type_ entity-actor) none 11)
|
||||
(run-logic? (_type_) symbol 12)
|
||||
(dummy-method () none 13)
|
||||
(process-tree-method-13 () none 13)
|
||||
)
|
||||
|
||||
:size-assert #x20
|
||||
|
||||
@@ -246,7 +246,7 @@
|
||||
(deactivate (_type_) none 10)
|
||||
(init-from-entity! (_type_ entity-actor) none 11)
|
||||
(run-logic? (_type_) symbol 12)
|
||||
(dummy-method () none 13)
|
||||
(process-tree-method-13 () none 13)
|
||||
)
|
||||
|
||||
:size-assert #x20
|
||||
|
||||
@@ -967,7 +967,7 @@
|
||||
:size-assert #x110
|
||||
:flag-assert #x1500a00110
|
||||
(:methods
|
||||
(dummy-20 (_type_ float float float) none 20)
|
||||
(flutflutegg-method-20 (_type_ float float float) none 20)
|
||||
)
|
||||
(:states
|
||||
(flutflutegg-break symbol)
|
||||
@@ -999,7 +999,7 @@
|
||||
)
|
||||
|
||||
;; WARN: Function (method 20 flutflutegg) has a return type of none, but the expression builder found a return statement.
|
||||
(defmethod dummy-20 flutflutegg ((obj flutflutegg) (arg0 float) (arg1 float) (arg2 float))
|
||||
(defmethod flutflutegg-method-20 flutflutegg ((obj flutflutegg) (arg0 float) (arg1 float) (arg2 float))
|
||||
(if (< (- (-> *display* base-frame-counter) (the-as time-frame (-> obj last-impulse-time))) (seconds 0.5))
|
||||
(return 0)
|
||||
)
|
||||
@@ -1047,8 +1047,8 @@
|
||||
(f1-2 (- (* (-> s5-1 x) (-> self dir z)) (* (-> s5-1 z) (-> self dir x))))
|
||||
)
|
||||
(if (< f0-2 -0.7)
|
||||
(dummy-20 self 24576.0 (* -8192.0 f1-2) (* -8192.0 f0-2))
|
||||
(dummy-20 self 0.0 (* -8192.0 f1-2) (* -8192.0 f0-2))
|
||||
(flutflutegg-method-20 self 24576.0 (* -8192.0 f1-2) (* -8192.0 f0-2))
|
||||
(flutflutegg-method-20 self 0.0 (* -8192.0 f1-2) (* -8192.0 f0-2))
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -1056,7 +1056,7 @@
|
||||
)
|
||||
)
|
||||
:trans (behavior ()
|
||||
(let* ((gp-0 (TODO-RENAME-10 (-> self ambient) (new 'stack-no-clear 'vector) (seconds 3) 368640.0 self))
|
||||
(let* ((gp-0 (ambient-control-method-10 (-> self ambient) (new 'stack-no-clear 'vector) (seconds 3) 368640.0 self))
|
||||
(v1-2 (/ (the-as int (rand-uint31-gen *random-generator*)) 256))
|
||||
(v1-3 (the-as number (logior #x3f800000 v1-2)))
|
||||
(f30-0 (+ -1.0 (the-as float v1-3)))
|
||||
@@ -1143,8 +1143,8 @@
|
||||
(f1-2 (- (* (-> s5-1 x) (-> self dir z)) (* (-> s5-1 z) (-> self dir x))))
|
||||
)
|
||||
(if (< f0-2 -0.7)
|
||||
(dummy-20 self 24576.0 (* -8192.0 f1-2) (* -8192.0 f0-2))
|
||||
(dummy-20 self 0.0 (* -8192.0 f1-2) (* -8192.0 f0-2))
|
||||
(the-as symbol (flutflutegg-method-20 self 24576.0 (* -8192.0 f1-2) (* -8192.0 f0-2)))
|
||||
(the-as symbol (flutflutegg-method-20 self 0.0 (* -8192.0 f1-2) (* -8192.0 f0-2)))
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -1163,7 +1163,7 @@
|
||||
(vector+! a1-0 a1-0 (-> self start))
|
||||
(move-to-point! (-> self root-override) a1-0)
|
||||
)
|
||||
(TODO-RENAME-12 (-> self wobbler) (-> self root-override quat))
|
||||
(wobbler-method-12 (-> self wobbler) (-> self root-override quat))
|
||||
(let ((a2-3 (quaternion-axis-angle! (new 'stack-no-clear 'quaternion) 0.0 1.0 0.0 -18204.445)))
|
||||
(quaternion*! (-> self root-override quat) (-> self root-override quat) a2-3)
|
||||
)
|
||||
@@ -1229,7 +1229,7 @@
|
||||
#f
|
||||
)
|
||||
(move! (-> self wobbler))
|
||||
(TODO-RENAME-12 (-> self wobbler) (-> self root-override quat))
|
||||
(wobbler-method-12 (-> self wobbler) (-> self root-override quat))
|
||||
(let ((a2-6 (quaternion-axis-angle! (new 'stack-no-clear 'quaternion) 0.0 1.0 0.0 -18204.445)))
|
||||
(quaternion*! (-> self root-override quat) (-> self root-override quat) a2-6)
|
||||
)
|
||||
|
||||
@@ -93,13 +93,9 @@
|
||||
)
|
||||
|
||||
(defmethod init-from-entity! bird-lady-beach ((obj bird-lady-beach) (arg0 entity-actor))
|
||||
(dummy-40 obj arg0 *bird-lady-beach-sg* 3 51 (new 'static 'vector :y 4096.0 :w 4096.0) 5)
|
||||
(process-taskable-method-40 obj arg0 *bird-lady-beach-sg* 3 51 (new 'static 'vector :y 4096.0 :w 4096.0) 5)
|
||||
(set! (-> obj tasks) (get-task-control (game-task beach-flutflut)))
|
||||
(set! (-> obj sound-flava) (music-flava birdlady))
|
||||
(dummy-42 obj)
|
||||
(process-taskable-method-42 obj)
|
||||
(none)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
:shadow bird-lady-shadow-mg
|
||||
)
|
||||
|
||||
(defmethod dummy-52 bird-lady ((obj bird-lady))
|
||||
(defmethod process-taskable-method-52 bird-lady ((obj bird-lady))
|
||||
(let ((v1-1 (-> obj draw shadow-ctrl)))
|
||||
(when v1-1
|
||||
(let ((f0-0 (-> obj root-override trans y)))
|
||||
@@ -134,8 +134,8 @@
|
||||
(-> obj draw art-group data 3)
|
||||
)
|
||||
|
||||
(defmethod TODO-RENAME-43 bird-lady ((obj bird-lady))
|
||||
(when (TODO-RENAME-10 (-> obj ambient) (new 'stack-no-clear 'vector) (seconds 30) 122880.0 obj)
|
||||
(defmethod process-taskable-method-43 bird-lady ((obj bird-lady))
|
||||
(when (ambient-control-method-10 (-> obj ambient) (new 'stack-no-clear 'vector) (seconds 30) 122880.0 obj)
|
||||
(let ((f0-2 (rand-float-gen)))
|
||||
(cond
|
||||
((< 0.66 f0-2)
|
||||
@@ -157,7 +157,7 @@
|
||||
)
|
||||
|
||||
(defmethod init-from-entity! bird-lady ((obj bird-lady) (arg0 entity-actor))
|
||||
(dummy-40 obj arg0 *bird-lady-sg* 3 51 (new 'static 'vector :y 4096.0 :w 4096.0) 5)
|
||||
(process-taskable-method-40 obj arg0 *bird-lady-sg* 3 51 (new 'static 'vector :y 4096.0 :w 4096.0) 5)
|
||||
(set! (-> obj tasks) (get-task-control (game-task beach-flutflut)))
|
||||
(set! (-> obj sound-flava) (music-flava birdlady))
|
||||
(set! (-> obj draw light-index) (the-as uint 4))
|
||||
@@ -167,7 +167,3 @@
|
||||
)
|
||||
(none)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -75,7 +75,7 @@
|
||||
:bounds (static-spherem 0 0 0 2.5)
|
||||
)
|
||||
|
||||
(defmethod dummy-44 lurkercrab ((obj lurkercrab) (arg0 process) (arg1 event-message-block))
|
||||
(defmethod touch-handler lurkercrab ((obj lurkercrab) (arg0 process) (arg1 event-message-block))
|
||||
(if (and (logtest? (-> obj nav-enemy-flags) (nav-enemy-flags navenmf6))
|
||||
((method-of-type touching-shapes-entry prims-touching?)
|
||||
(the-as touching-shapes-entry (-> arg1 param 0))
|
||||
@@ -93,13 +93,13 @@
|
||||
6144.0
|
||||
16384.0
|
||||
)
|
||||
(the-as object (if (zero? (logand (-> obj nav-enemy-flags) (nav-enemy-flags navenmf8)))
|
||||
(the-as object (if (not (logtest? (-> obj nav-enemy-flags) (nav-enemy-flags navenmf8)))
|
||||
(do-push-aways! (-> obj collide-info))
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod dummy-43 lurkercrab ((obj lurkercrab) (arg0 process) (arg1 event-message-block))
|
||||
(defmethod attack-handler lurkercrab ((obj lurkercrab) (arg0 process) (arg1 event-message-block))
|
||||
(let ((s5-0 (-> obj incomming-attack-id)))
|
||||
(set! (-> obj incomming-attack-id) (the-as handle (-> arg1 param 2)))
|
||||
(let ((v1-1 (-> arg1 param 1)))
|
||||
@@ -158,7 +158,7 @@
|
||||
|
||||
nav-enemy-default-event-handler
|
||||
|
||||
(defmethod TODO-RENAME-37 lurkercrab ((obj lurkercrab))
|
||||
(defmethod nav-enemy-method-37 lurkercrab ((obj lurkercrab))
|
||||
(when (-> obj orient)
|
||||
(if (logtest? (nav-control-flags navcf19) (-> obj nav flags))
|
||||
(seek-to-point-toward-point!
|
||||
@@ -181,7 +181,7 @@ nav-enemy-default-event-handler
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod TODO-RENAME-38 lurkercrab ((obj lurkercrab))
|
||||
(defmethod nav-enemy-method-38 lurkercrab ((obj lurkercrab))
|
||||
(integrate-for-enemy-with-move-to-ground!
|
||||
(-> obj collide-info)
|
||||
(-> obj collide-info transv)
|
||||
@@ -605,7 +605,7 @@ nav-enemy-default-event-handler
|
||||
)
|
||||
(process-drawable-from-entity! obj arg0)
|
||||
(initialize-skeleton obj *lurkercrab-sg* '())
|
||||
(TODO-RENAME-45 obj *lurkercrab-nav-enemy-info*)
|
||||
(init-defaults! obj *lurkercrab-nav-enemy-info*)
|
||||
(set! (-> obj part) (create-launch-control (-> *part-group-id-table* 159) obj))
|
||||
(set! (-> obj orient) #t)
|
||||
(logclear! (-> obj nav-enemy-flags) (nav-enemy-flags navenmf5 navenmf6))
|
||||
@@ -615,7 +615,3 @@ nav-enemy-default-event-handler
|
||||
(go (method-of-object obj nav-enemy-idle))
|
||||
(none)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -285,9 +285,9 @@ nav-enemy-default-event-handler
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod TODO-RENAME-48 lurkerpuppy ((obj lurkerpuppy))
|
||||
(defmethod nav-enemy-method-48 lurkerpuppy ((obj lurkerpuppy))
|
||||
(initialize-skeleton obj *lurkerpuppy-sg* '())
|
||||
(TODO-RENAME-45 obj *lurkerpuppy-nav-enemy-info*)
|
||||
(init-defaults! obj *lurkerpuppy-nav-enemy-info*)
|
||||
(when (nonzero? (-> obj neck))
|
||||
(set! (-> obj neck up) (the-as uint 0))
|
||||
(set! (-> obj neck nose) (the-as uint 1))
|
||||
@@ -296,7 +296,3 @@ nav-enemy-default-event-handler
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
:size-assert #xc8
|
||||
:flag-assert #x16006000c8
|
||||
(:methods
|
||||
(TODO-RENAME-20 (_type_) none 20)
|
||||
(lurkerworm-method-20 (_type_) none 20)
|
||||
(particle-effect (_type_) none 21)
|
||||
)
|
||||
(:states
|
||||
@@ -203,11 +203,11 @@
|
||||
:init-specs ((sp-flt spt-fade-a -0.10666667))
|
||||
)
|
||||
|
||||
(defmethod TODO-RENAME-20 lurkerworm ((obj lurkerworm))
|
||||
(defmethod lurkerworm-method-20 lurkerworm ((obj lurkerworm))
|
||||
(let ((s5-0 (new 'stack-no-clear 'vector)))
|
||||
(vector-! s5-0 (target-pos 0) (-> obj root-override trans))
|
||||
(set-target! (-> obj twister) (atan (-> s5-0 x) (-> s5-0 z)))
|
||||
(TODO-RENAME-11 (-> obj twister))
|
||||
(twister-method-11 (-> obj twister))
|
||||
(let* ((f0-5 (sqrtf (+ (* (-> s5-0 x) (-> s5-0 x)) (* (-> s5-0 z) (-> s5-0 z)))))
|
||||
(f0-6 (atan (-> s5-0 y) f0-5))
|
||||
)
|
||||
@@ -233,7 +233,7 @@
|
||||
|
||||
(defun lurkerworm-joint-callback ((arg0 lurkerworm))
|
||||
(let ((a1-0 arg0))
|
||||
(TODO-RENAME-12 (-> a1-0 twister) a1-0)
|
||||
(twister-method-12 (-> a1-0 twister) a1-0)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
@@ -275,7 +275,7 @@
|
||||
)
|
||||
|
||||
(defbehavior lurkerworm-default-post-behavior lurkerworm ()
|
||||
(TODO-RENAME-20 self)
|
||||
(lurkerworm-method-20 self)
|
||||
(transform-post)
|
||||
0
|
||||
(none)
|
||||
@@ -563,7 +563,7 @@ lurkerworm-default-post-behavior
|
||||
(set! (-> obj part) (create-launch-control (-> *part-group-id-table* 157) obj))
|
||||
(set! (-> obj part2) (create-launch-control (-> *part-group-id-table* 158) obj))
|
||||
(set! (-> obj twister) (new 'process 'twister 3 15 1092.2667 72.81778 0.25 0.001))
|
||||
(TODO-RENAME-9 (-> obj twister) 3 9 910.2222)
|
||||
(twister-method-9 (-> obj twister) 3 9 910.2222)
|
||||
(set! (-> obj head-tilt) 0.0)
|
||||
(set! (-> obj skel prebind-function) lurkerworm-prebind-function)
|
||||
(set! (-> obj skel postbind-function) lurkerworm-joint-callback)
|
||||
@@ -572,7 +572,3 @@ lurkerworm-default-post-behavior
|
||||
(go lurkerworm-idle)
|
||||
(none)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
:shadow mayor-shadow-mg
|
||||
)
|
||||
|
||||
(defmethod dummy-52 mayor ((obj mayor))
|
||||
(defmethod process-taskable-method-52 mayor ((obj mayor))
|
||||
(let ((v1-1 (-> obj draw shadow-ctrl)))
|
||||
(when v1-1
|
||||
(let ((f0-0 (-> obj root-override trans y)))
|
||||
@@ -650,8 +650,8 @@
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod TODO-RENAME-43 mayor ((obj mayor))
|
||||
(when (TODO-RENAME-10 (-> obj ambient) (new 'stack-no-clear 'vector) (seconds 30) 122880.0 obj)
|
||||
(defmethod process-taskable-method-43 mayor ((obj mayor))
|
||||
(when (ambient-control-method-10 (-> obj ambient) (new 'stack-no-clear 'vector) (seconds 30) 122880.0 obj)
|
||||
(let ((f0-2 (rand-float-gen)))
|
||||
(cond
|
||||
((< 0.8888889 f0-2)
|
||||
@@ -719,15 +719,11 @@
|
||||
)
|
||||
|
||||
(defmethod init-from-entity! mayor ((obj mayor) (arg0 entity-actor))
|
||||
(dummy-40 obj arg0 *mayor-sg* 3 51 (new 'static 'vector :y 4096.0 :w 4096.0) 5)
|
||||
(process-taskable-method-40 obj arg0 *mayor-sg* 3 51 (new 'static 'vector :y 4096.0 :w 4096.0) 5)
|
||||
(set! (-> obj bounce-away) #f)
|
||||
(set! (-> obj tasks) (get-task-control (game-task jungle-lurkerm)))
|
||||
(set! (-> obj sound-flava) (music-flava mayor))
|
||||
(set! (-> obj draw light-index) (the-as uint 2))
|
||||
(dummy-42 obj)
|
||||
(process-taskable-method-42 obj)
|
||||
(none)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -119,7 +119,7 @@
|
||||
(eval-path-curve-div! (-> self path) s3-0 f30-0 'interp)
|
||||
(+! (-> s3-0 y) (-> self align align trans y))
|
||||
(move-to-point! (-> self root-override) s3-0)
|
||||
(TODO-RENAME-12 (-> self path) s3-0 f30-0)
|
||||
(path-control-method-12 (-> self path) s3-0 f30-0)
|
||||
)
|
||||
(if arg4
|
||||
(set-heading-vec-clear-roll-pitch! (-> self root-override) s3-0)
|
||||
@@ -182,27 +182,25 @@
|
||||
)
|
||||
|
||||
(defstate pelican-circle (pelican)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(let ((v1-0 arg2))
|
||||
(the-as
|
||||
object
|
||||
(cond
|
||||
((= v1-0 'dive)
|
||||
(let ((v0-0 (the-as structure #t)))
|
||||
(set! (-> self state-object) (the-as symbol v0-0))
|
||||
v0-0
|
||||
)
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(the-as
|
||||
object
|
||||
(case event-type
|
||||
(('dive)
|
||||
(let ((v0-0 (the-as structure #t)))
|
||||
(set! (-> self state-object) (the-as symbol v0-0))
|
||||
v0-0
|
||||
)
|
||||
((= v1-0 'fuel-cell)
|
||||
(handle->process (-> self fuel-cell))
|
||||
)
|
||||
(('fuel-cell)
|
||||
(handle->process (-> self fuel-cell))
|
||||
)
|
||||
(('position)
|
||||
(set! (-> self path-pos) (the-as float (-> event param 0)))
|
||||
(let ((a1-3 (path-control-method-12 (-> self path) (new 'stack-no-clear 'vector) (-> self path-pos))))
|
||||
(set-heading-vec! (-> self root-override) a1-3)
|
||||
)
|
||||
((= v1-0 'position)
|
||||
(set! (-> self path-pos) (the-as float (-> arg3 param 0)))
|
||||
(let ((a1-3 (TODO-RENAME-12 (-> self path) (new 'stack-no-clear 'vector) (-> self path-pos))))
|
||||
(set-heading-vec! (-> self root-override) a1-3)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -320,18 +318,16 @@
|
||||
)
|
||||
|
||||
(defstate pelican-dive (pelican)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(let ((v1-0 arg2))
|
||||
(the-as object (cond
|
||||
((= v1-0 'got-cell?)
|
||||
(-> self state-object)
|
||||
)
|
||||
((= v1-0 'fuel-cell)
|
||||
(handle->process (-> self fuel-cell))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(the-as object (case event-type
|
||||
(('got-cell?)
|
||||
(-> self state-object)
|
||||
)
|
||||
(('fuel-cell)
|
||||
(handle->process (-> self fuel-cell))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
:enter (behavior ((arg0 path-control) (arg1 curve-control) (arg2 time-frame))
|
||||
(init! (-> self query) (the-as string #f) 40 150 25 #t (the-as string #f))
|
||||
@@ -354,7 +350,7 @@
|
||||
(set! (-> self path-max) (the float (+ (-> self path curve num-cverts) -1)))
|
||||
(set! (-> self path-speed) (/ (* 300.0 (-> self path-max)) (the float (-> *PELICAN-bank* dive-time))))
|
||||
(let ((gp-1 (new 'stack-no-clear 'vector)))
|
||||
(TODO-RENAME-12 (-> self path) gp-1 (-> self path-pos))
|
||||
(path-control-method-12 (-> self path) gp-1 (-> self path-pos))
|
||||
(set-heading-vec! (-> self root-override) gp-1)
|
||||
)
|
||||
(set! (-> self draw force-lod) 0)
|
||||
@@ -437,54 +433,53 @@
|
||||
)
|
||||
|
||||
(defstate pelican-wait-at-nest (pelican)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(let ((v1-0 arg2))
|
||||
(the-as
|
||||
object
|
||||
(cond
|
||||
((= v1-0 'attack)
|
||||
(case (-> arg3 param 1)
|
||||
(('explode)
|
||||
(let ((a0-2 (handle->process (-> self fuel-cell))))
|
||||
(if a0-2
|
||||
(send-event a0-2 'trans (-> self root-override trans))
|
||||
)
|
||||
)
|
||||
(go pelican-explode #f)
|
||||
#f
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(the-as
|
||||
object
|
||||
(case event-type
|
||||
(('attack)
|
||||
(case (-> event param 1)
|
||||
(('explode)
|
||||
(let ((a0-2 (handle->process (-> self fuel-cell))))
|
||||
(if a0-2
|
||||
(send-event a0-2 'trans (-> self root-override trans))
|
||||
)
|
||||
)
|
||||
(else
|
||||
(let* ((gp-0 arg0)
|
||||
(v1-13 (if (and (nonzero? gp-0) (type-type? (-> gp-0 type) process-drawable))
|
||||
gp-0
|
||||
)
|
||||
)
|
||||
(f30-0 8192.0)
|
||||
(gp-1 (-> self root-override))
|
||||
(s4-0 (-> (the-as process-drawable v1-13) root trans))
|
||||
)
|
||||
(if (< f30-0
|
||||
(fabs
|
||||
(deg-diff (y-angle gp-1) (vector-y-angle (vector-! (new 'stack-no-clear 'vector) s4-0 (-> gp-1 trans))))
|
||||
)
|
||||
(go pelican-explode #f)
|
||||
#f
|
||||
)
|
||||
(else
|
||||
(let* ((gp-0 proc)
|
||||
(v1-13 (if (and (nonzero? gp-0) (type-type? (-> gp-0 type) process-drawable))
|
||||
gp-0
|
||||
)
|
||||
)
|
||||
(f30-0 8192.0)
|
||||
(gp-1 (-> self root-override))
|
||||
(s4-0 (-> (the-as process-drawable v1-13) root trans))
|
||||
)
|
||||
(if (< f30-0
|
||||
(fabs
|
||||
(deg-diff (y-angle gp-1) (vector-y-angle (vector-! (new 'stack-no-clear 'vector) s4-0 (-> gp-1 trans))))
|
||||
)
|
||||
(go pelican-spit)
|
||||
)
|
||||
)
|
||||
)
|
||||
(go pelican-spit)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
((= v1-0 'touch)
|
||||
(send-shove-back
|
||||
(-> self root-override)
|
||||
arg0
|
||||
(the-as touching-shapes-entry (-> arg3 param 0))
|
||||
0.7
|
||||
6144.0
|
||||
16384.0
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(('touch)
|
||||
(the-as object (send-shove-back
|
||||
(-> self root-override)
|
||||
proc
|
||||
(the-as touching-shapes-entry (-> event param 0))
|
||||
0.7
|
||||
6144.0
|
||||
16384.0
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -500,7 +495,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(TODO-RENAME-12 (-> self path) (-> self path-vector) (-> self path-pos))
|
||||
(path-control-method-12 (-> self path) (-> self path-vector) (-> self path-pos))
|
||||
(when arg0
|
||||
(move-to-point! (-> self root-override) (-> self state-vector))
|
||||
(set-heading-vec! (-> self root-override) (-> self path-vector))
|
||||
@@ -915,11 +910,10 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> obj fuel-cell) (the-as handle (if s5-2
|
||||
(ppointer->handle s5-2)
|
||||
(the-as int #f)
|
||||
)
|
||||
)
|
||||
(set! (-> obj fuel-cell) (if s5-2
|
||||
(ppointer->handle s5-2)
|
||||
(the-as handle #f)
|
||||
)
|
||||
)
|
||||
(when s5-2
|
||||
(send-event
|
||||
@@ -942,7 +936,3 @@
|
||||
)
|
||||
(none)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
:shadow sculptor-shadow-mg
|
||||
)
|
||||
|
||||
(defmethod dummy-52 sculptor ((obj sculptor))
|
||||
(defmethod process-taskable-method-52 sculptor ((obj sculptor))
|
||||
(let ((v1-1 (-> obj draw shadow-ctrl)))
|
||||
(when v1-1
|
||||
(let ((f0-0 (-> obj root-override trans y)))
|
||||
@@ -177,8 +177,8 @@
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod TODO-RENAME-43 sculptor ((obj sculptor))
|
||||
(when (TODO-RENAME-10 (-> obj ambient) (new 'stack-no-clear 'vector) (seconds 30) 122880.0 obj)
|
||||
(defmethod process-taskable-method-43 sculptor ((obj sculptor))
|
||||
(when (ambient-control-method-10 (-> obj ambient) (new 'stack-no-clear 'vector) (seconds 30) 122880.0 obj)
|
||||
(let ((f0-2 (rand-float-gen)))
|
||||
(cond
|
||||
((< 0.85714287 f0-2)
|
||||
@@ -303,7 +303,7 @@
|
||||
)
|
||||
)
|
||||
((begin
|
||||
(TODO-RENAME-43 self)
|
||||
(process-taskable-method-43 self)
|
||||
(let* ((f30-3 4.0)
|
||||
(v1-287 (/ (the-as int (rand-uint31-gen *random-generator*)) 256))
|
||||
(v1-288 (the-as number (logior #x3f800000 v1-287)))
|
||||
@@ -349,15 +349,11 @@
|
||||
)
|
||||
|
||||
(defmethod init-from-entity! sculptor ((obj sculptor) (arg0 entity-actor))
|
||||
(dummy-40 obj arg0 *sculptor-sg* 3 40 (new 'static 'vector :w 4096.0) 5)
|
||||
(process-taskable-method-40 obj arg0 *sculptor-sg* 3 40 (new 'static 'vector :w 4096.0) 5)
|
||||
(set! (-> obj tasks) (get-task-control (game-task misty-muse)))
|
||||
(set! (-> obj muse) (the-as handle #f))
|
||||
(set! (-> obj sound-flava) (music-flava sculptor))
|
||||
(set! (-> obj draw light-index) (the-as uint 3))
|
||||
(dummy-42 obj)
|
||||
(process-taskable-method-42 obj)
|
||||
(none)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -60,12 +60,12 @@
|
||||
(:methods
|
||||
(move-vertically! (_type_ symbol) none 20)
|
||||
(adjust-heading-around-point-slow! (_type_ float) none 21)
|
||||
(dummy-22 (_type_) none 22)
|
||||
(seagull-method-22 (_type_) none 22)
|
||||
(adjust-heading-around-point! (_type_ float) none 23)
|
||||
(dummy-24 (_type_) none 24)
|
||||
(dummy-25 (_type_ float) none 25)
|
||||
(dummy-26 (_type_) symbol 26)
|
||||
(dummy-27 (_type_) none 27)
|
||||
(seagull-method-24 (_type_) none 24)
|
||||
(seagull-method-25 (_type_ float) none 25)
|
||||
(seagull-method-26 (_type_) symbol 26)
|
||||
(seagull-method-27 (_type_) none 27)
|
||||
)
|
||||
(:states
|
||||
seagull-flying
|
||||
@@ -102,7 +102,7 @@
|
||||
(:methods
|
||||
(spawn-bird (_type_ vector) (pointer process) 14)
|
||||
(play-hint (_type_ int) none 15)
|
||||
(dummy-16 (_type_ seagull) float 16)
|
||||
(seagullflock-method-16 (_type_ seagull) float 16)
|
||||
)
|
||||
(:states
|
||||
seagullflock-at-waterfall
|
||||
@@ -192,7 +192,7 @@
|
||||
:bounds (static-spherem 0 0 0 2)
|
||||
)
|
||||
|
||||
(defmethod dummy-25 seagull ((obj seagull) (arg0 float))
|
||||
(defmethod seagull-method-25 seagull ((obj seagull) (arg0 float))
|
||||
(let ((f1-1 (the float (sar (shl (the int (- arg0 (-> obj heading))) 48) 48)))
|
||||
(f0-5 (- (-> obj tilt)))
|
||||
)
|
||||
@@ -226,12 +226,12 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod dummy-24 seagull ((obj seagull))
|
||||
(defmethod seagull-method-24 seagull ((obj seagull))
|
||||
(let ((s5-0 (new 'stack-no-clear 'vector)))
|
||||
(vector-! s5-0 (-> obj flock 0 target) (-> obj root-override trans))
|
||||
(when (< (vector-dot s5-0 s5-0) 6710886400.0)
|
||||
(let ((v1-5 (ash 1 (-> obj index))))
|
||||
(when (zero? (logand v1-5 (-> obj flock 0 bird-at-waterfall)))
|
||||
(when (not (logtest? v1-5 (-> obj flock 0 bird-at-waterfall)))
|
||||
(logior! (-> obj flock 0 bird-at-waterfall) v1-5)
|
||||
(+! (-> obj flock 0 birds-at-waterfall) 1)
|
||||
)
|
||||
@@ -332,7 +332,7 @@
|
||||
(defstate seagull-idle (seagull)
|
||||
:enter (behavior ()
|
||||
(let* ((v1-0 (-> self flock))
|
||||
(f30-0 (dummy-16
|
||||
(f30-0 (seagullflock-method-16
|
||||
(if v1-0
|
||||
(-> v1-0 0 self-override)
|
||||
)
|
||||
@@ -478,7 +478,7 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod dummy-26 seagull ((obj seagull))
|
||||
(defmethod seagull-method-26 seagull ((obj seagull))
|
||||
(let ((s5-0 (new 'stack-no-clear 'vector)))
|
||||
(let ((f30-0 -4096.0)
|
||||
(f28-0 8192.0)
|
||||
@@ -525,13 +525,13 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod dummy-22 seagull ((obj seagull))
|
||||
(defmethod seagull-method-22 seagull ((obj seagull))
|
||||
(set! (-> obj root-override transv y) -8192.0)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod dummy-27 seagull ((obj seagull))
|
||||
(defmethod seagull-method-27 seagull ((obj seagull))
|
||||
(local-vars (at-0 int))
|
||||
(rlet ((vf0 :class vf)
|
||||
(vf1 :class vf)
|
||||
@@ -605,7 +605,7 @@
|
||||
)
|
||||
0
|
||||
)
|
||||
(dummy-27 self)
|
||||
(seagull-method-27 self)
|
||||
(suspend)
|
||||
(ja :num! (seek! (ja-aframe 4.0 0)))
|
||||
)
|
||||
@@ -633,7 +633,7 @@
|
||||
(until (ja-done? 0)
|
||||
(ja-blend-eval)
|
||||
(when (-> self teleport)
|
||||
(dummy-26 self)
|
||||
(seagull-method-26 self)
|
||||
(suspend)
|
||||
0
|
||||
)
|
||||
@@ -643,7 +643,7 @@
|
||||
(vector-! s4-0 (-> s5-0 flock 0 target) (-> s5-0 root-override trans))
|
||||
(when (< (vector-dot s4-0 s4-0) 6710886400.0)
|
||||
(let ((v1-24 (ash 1 (-> s5-0 index))))
|
||||
(when (zero? (logand v1-24 (-> s5-0 flock 0 bird-at-waterfall)))
|
||||
(when (not (logtest? v1-24 (-> s5-0 flock 0 bird-at-waterfall)))
|
||||
(logior! (-> s5-0 flock 0 bird-at-waterfall) v1-24)
|
||||
(+! (-> s5-0 flock 0 birds-at-waterfall) 1)
|
||||
)
|
||||
@@ -780,7 +780,7 @@
|
||||
(set! (-> s5-1 root-override transv z) (+ (* 0.8 (-> s5-1 root-override transv z)) (* 0.2 f0-44)))
|
||||
)
|
||||
0
|
||||
(dummy-27 self)
|
||||
(seagull-method-27 self)
|
||||
(suspend)
|
||||
(ja :num! (seek!))
|
||||
)
|
||||
@@ -825,7 +825,7 @@
|
||||
(until (ja-done? 0)
|
||||
(ja-blend-eval)
|
||||
(when (-> self teleport)
|
||||
(dummy-26 self)
|
||||
(seagull-method-26 self)
|
||||
(suspend)
|
||||
0
|
||||
)
|
||||
@@ -835,7 +835,7 @@
|
||||
(vector-! s5-0 (-> gp-0 flock 0 target) (-> gp-0 root-override trans))
|
||||
(when (< (vector-dot s5-0 s5-0) 6710886400.0)
|
||||
(let ((v1-26 (ash 1 (-> gp-0 index))))
|
||||
(when (zero? (logand v1-26 (-> gp-0 flock 0 bird-at-waterfall)))
|
||||
(when (not (logtest? v1-26 (-> gp-0 flock 0 bird-at-waterfall)))
|
||||
(logior! (-> gp-0 flock 0 bird-at-waterfall) v1-26)
|
||||
(+! (-> gp-0 flock 0 birds-at-waterfall) 1)
|
||||
)
|
||||
@@ -930,7 +930,7 @@
|
||||
(set! (-> gp-1 root-override transv z) (* DISPLAY_FPS_RATIO (+ (* 0.8 (-> gp-1 root-override transv z)) (* 0.2 f0-41)))) ;; changed for high fps
|
||||
)
|
||||
0
|
||||
(dummy-27 self)
|
||||
(seagull-method-27 self)
|
||||
(when (< (-> self angletan) 0.2)
|
||||
(if (< (-> self root-override trans y) 40960.0)
|
||||
(go seagull-flying)
|
||||
@@ -1266,7 +1266,7 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod dummy-16 seagullflock ((obj seagullflock) (arg0 seagull))
|
||||
(defmethod seagullflock-method-16 seagullflock ((obj seagullflock) (arg0 seagull))
|
||||
(let ((gp-0 (new 'stack-no-clear 'vector)))
|
||||
(eval-path-curve-div! (-> obj path) gp-0 (the float (-> obj targetnum)) 'interp)
|
||||
(vector-! gp-0 gp-0 (-> arg0 root-override trans))
|
||||
@@ -1323,7 +1323,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(while (zero? (logand (-> gp-0 extra perm status) (entity-perm-status complete)))
|
||||
(while (not (logtest? (-> gp-0 extra perm status) (entity-perm-status complete)))
|
||||
(suspend)
|
||||
)
|
||||
)
|
||||
@@ -1403,19 +1403,12 @@
|
||||
)
|
||||
|
||||
(defun-debug beach-rock-trigger ()
|
||||
(let ((gp-0 600))
|
||||
(set! (-> (the-as
|
||||
seagullflock
|
||||
(search-process-tree *active-pool* (lambda ((arg0 process)) (= (-> arg0 type) seagullflock)))
|
||||
)
|
||||
teleport-frames
|
||||
(set! (-> (the-as
|
||||
seagullflock
|
||||
(search-process-tree *active-pool* (lambda ((arg0 process)) (= (-> arg0 type) seagullflock)))
|
||||
)
|
||||
gp-0
|
||||
)
|
||||
gp-0
|
||||
)
|
||||
teleport-frames
|
||||
)
|
||||
600
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -36,10 +36,10 @@
|
||||
:flag-assert #xd00000028
|
||||
(:methods
|
||||
(new (symbol type int int float float float float) _type_ 0)
|
||||
(TODO-RENAME-9 (_type_ int int float) none 9)
|
||||
(twister-method-9 (_type_ int int float) none 9)
|
||||
(set-target! (_type_ float) none 10)
|
||||
(TODO-RENAME-11 (_type_) none 11)
|
||||
(TODO-RENAME-12 (_type_ process-drawable) none 12)
|
||||
(twister-method-11 (_type_) none 11)
|
||||
(twister-method-12 (_type_ process-drawable) none 12)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -77,7 +77,7 @@
|
||||
(+ (* (-> obj num-joints) 16) 40)
|
||||
)
|
||||
|
||||
(defmethod TODO-RENAME-9 twister ((obj twister) (arg0 int) (arg1 int) (arg2 float))
|
||||
(defmethod twister-method-9 twister ((obj twister) (arg0 int) (arg1 int) (arg2 float))
|
||||
(let ((v1-1 (- arg0 (-> obj first-joint)))
|
||||
(a1-2 (- arg1 (-> obj first-joint)))
|
||||
)
|
||||
@@ -96,7 +96,7 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod TODO-RENAME-11 twister ((obj twister))
|
||||
(defmethod twister-method-11 twister ((obj twister))
|
||||
(let* ((s5-0 (+ (-> obj num-joints) -1))
|
||||
(s4-0 (-> obj data s5-0))
|
||||
)
|
||||
@@ -134,7 +134,7 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod TODO-RENAME-12 twister ((obj twister) (arg0 process-drawable))
|
||||
(defmethod twister-method-12 twister ((obj twister) (arg0 process-drawable))
|
||||
(let ((s4-0 (new 'stack-no-clear 'matrix)))
|
||||
(dotimes (s3-0 (-> obj num-joints))
|
||||
(let ((s2-0 (-> arg0 node-list data (+ (-> obj first-joint) s3-0) bone transform)))
|
||||
@@ -148,7 +148,3 @@
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
(reset! (_type_ float float float) none 9)
|
||||
(inc-xy-vel! (_type_ float float) none 10)
|
||||
(move! (_type_) none 11)
|
||||
(TODO-RENAME-12 (_type_ quaternion) none 12)
|
||||
(wobbler-method-12 (_type_ quaternion) none 12)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod TODO-RENAME-12 wobbler ((obj wobbler) (arg0 quaternion))
|
||||
(defmethod wobbler-method-12 wobbler ((obj wobbler) (arg0 quaternion))
|
||||
(let ((s5-0 (new 'stack-no-clear 'vector)))
|
||||
(set! (-> s5-0 x) (-> obj posy))
|
||||
(set! (-> s5-0 y) 0.0)
|
||||
@@ -73,7 +73,3 @@
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -74,7 +74,7 @@
|
||||
(defstate hidden (assistant-lavatube-end)
|
||||
:virtual #t
|
||||
:trans (behavior ()
|
||||
(dummy-33 self)
|
||||
(process-taskable-method-33 self)
|
||||
((-> (method-of-type process-taskable hidden) trans))
|
||||
(when (and (and *target* (>= 61440.0 (vector-vector-distance (-> self root-override trans) (-> *target* control trans))))
|
||||
(not (closed? (-> self tasks) (game-task village4-button) (task-status need-reward-speech)))
|
||||
@@ -121,13 +121,9 @@
|
||||
)
|
||||
|
||||
(defmethod init-from-entity! assistant-lavatube-end ((obj assistant-lavatube-end) (arg0 entity-actor))
|
||||
(dummy-40 obj arg0 *assistant-lavatube-end-sg* 3 29 (new 'static 'vector :w 4096.0) 5)
|
||||
(process-taskable-method-40 obj arg0 *assistant-lavatube-end-sg* 3 29 (new 'static 'vector :w 4096.0) 5)
|
||||
(set! (-> obj tasks) (get-task-control (game-task village4-button)))
|
||||
(first-any (-> obj tasks) #t)
|
||||
(dummy-42 obj)
|
||||
(process-taskable-method-42 obj)
|
||||
(none)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -355,7 +355,7 @@
|
||||
:flag-assert #x16005000bc
|
||||
(:methods
|
||||
(init! (_type_) none 20)
|
||||
(dummy-21 (_type_) none 21)
|
||||
(citb-disc-method-21 (_type_) none 21)
|
||||
)
|
||||
(:states
|
||||
citb-disc-idle
|
||||
@@ -364,14 +364,14 @@
|
||||
|
||||
|
||||
(defstate citb-disc-idle (citb-disc)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(let ((v1-0 arg2))
|
||||
(the-as object (when (= v1-0 'touch)
|
||||
(send-event arg0 'no-look-around (seconds 0.25))
|
||||
#f
|
||||
)
|
||||
)
|
||||
)
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(the-as object (case event-type
|
||||
(('touch)
|
||||
(send-event proc 'no-look-around (seconds 0.25))
|
||||
#f
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
:trans (the-as (function none :behavior citb-disc) rider-trans)
|
||||
:code (behavior ()
|
||||
@@ -416,7 +416,7 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod dummy-21 citb-disc ((obj citb-disc))
|
||||
(defmethod citb-disc-method-21 citb-disc ((obj citb-disc))
|
||||
0
|
||||
(none)
|
||||
)
|
||||
@@ -437,7 +437,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(dummy-21 obj)
|
||||
(citb-disc-method-21 obj)
|
||||
(set! (-> obj sound)
|
||||
(new 'process 'ambient-sound (static-sound-spec "rotate-plat" :fo-max 20) (-> obj root-override trans))
|
||||
)
|
||||
@@ -482,25 +482,25 @@
|
||||
)
|
||||
|
||||
|
||||
(defmethod dummy-21 citb-disc-a ((obj citb-disc-a))
|
||||
(defmethod citb-disc-method-21 citb-disc-a ((obj citb-disc-a))
|
||||
(initialize-skeleton obj *citb-disc-a-sg* '())
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod dummy-21 citb-disc-b ((obj citb-disc-b))
|
||||
(defmethod citb-disc-method-21 citb-disc-b ((obj citb-disc-b))
|
||||
(initialize-skeleton obj *citb-disc-b-sg* '())
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod dummy-21 citb-disc-c ((obj citb-disc-c))
|
||||
(defmethod citb-disc-method-21 citb-disc-c ((obj citb-disc-c))
|
||||
(initialize-skeleton obj *citb-disc-c-sg* '())
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod dummy-21 citb-disc-d ((obj citb-disc-d))
|
||||
(defmethod citb-disc-method-21 citb-disc-d ((obj citb-disc-d))
|
||||
(initialize-skeleton obj *citb-disc-d-sg* '())
|
||||
0
|
||||
(none)
|
||||
@@ -520,7 +520,7 @@
|
||||
:bounds (static-spherem 0 0 0 8)
|
||||
)
|
||||
|
||||
(defmethod TODO-RENAME-24 citb-iris-door ((obj citb-iris-door))
|
||||
(defmethod eco-door-method-24 citb-iris-door ((obj citb-iris-door))
|
||||
(let ((s5-0 (new 'process 'collide-shape obj (collide-list-enum hit-by-others))))
|
||||
(let ((s4-0 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 0) (the-as uint 0))))
|
||||
(set! (-> s4-0 prim-core collide-as) (collide-kind wall-object))
|
||||
@@ -539,7 +539,7 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod TODO-RENAME-25 citb-iris-door ((obj citb-iris-door))
|
||||
(defmethod eco-door-method-25 citb-iris-door ((obj citb-iris-door))
|
||||
(initialize-skeleton obj *citb-iris-door-sg* '())
|
||||
(set! (-> obj open-distance) 32768.0)
|
||||
(set! (-> obj close-distance) 49152.0)
|
||||
@@ -564,7 +564,7 @@
|
||||
)
|
||||
|
||||
|
||||
(defmethod TODO-RENAME-27 citb-button ((obj citb-button))
|
||||
(defmethod basebutton-method-27 citb-button ((obj citb-button))
|
||||
(let ((s5-0 (new 'process 'collide-shape-moving obj (collide-list-enum hit-by-player))))
|
||||
(set! (-> s5-0 dynam) (copy *standard-dynamics* 'process))
|
||||
(set! (-> s5-0 reaction) default-collision-reaction)
|
||||
@@ -587,7 +587,7 @@
|
||||
(the-as collide-shape-moving 0)
|
||||
)
|
||||
|
||||
(defmethod TODO-RENAME-26 citb-button ((obj citb-button))
|
||||
(defmethod basebutton-method-26 citb-button ((obj citb-button))
|
||||
(initialize-skeleton obj *citb-button-sg* '())
|
||||
(logior! (-> obj skel status) (janim-status inited))
|
||||
(ja-channel-set! 1)
|
||||
@@ -654,7 +654,7 @@
|
||||
*citb-launcher-sg*
|
||||
)
|
||||
|
||||
(defmethod dummy-26 citb-launcher ((obj citb-launcher))
|
||||
(defmethod baseplat-method-26 citb-launcher ((obj citb-launcher))
|
||||
(let ((f30-0 (res-lump-float (-> obj entity) 'spring-height :default 163840.0))
|
||||
(s5-0 (res-lump-value (-> obj entity) 'mode uint128))
|
||||
)
|
||||
@@ -735,12 +735,12 @@
|
||||
|
||||
|
||||
(defstate citb-robotboss-idle (citb-robotboss)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(local-vars (sv-96 int) (sv-112 int))
|
||||
(the-as
|
||||
object
|
||||
(cond
|
||||
((= arg2 'shield-off)
|
||||
((= event-type 'shield-off)
|
||||
(stop! (-> self sound))
|
||||
(if (-> self shield-on)
|
||||
(sound-play "robotcage-off")
|
||||
@@ -748,17 +748,17 @@
|
||||
(set! (-> self shield-on) #f)
|
||||
#f
|
||||
)
|
||||
((= arg2 'shield-on)
|
||||
((= event-type 'shield-on)
|
||||
(let ((v0-3 #t))
|
||||
(set! (-> self shield-on) v0-3)
|
||||
v0-3
|
||||
)
|
||||
)
|
||||
((= arg2 'die)
|
||||
((= event-type 'die)
|
||||
(cleanup-for-death self)
|
||||
(the-as symbol (deactivate self))
|
||||
)
|
||||
((or (= arg2 'touch) (= arg2 'attack))
|
||||
((or (= event-type 'touch) (= event-type 'attack))
|
||||
(let ((s4-0 sound-play-by-name)
|
||||
(s3-0 (make-u128 #x7061 (the-as uint #x7a2d646c65696873)))
|
||||
(s2-0 (new-sound-id))
|
||||
@@ -772,9 +772,9 @@
|
||||
)
|
||||
)
|
||||
(the-as symbol (send-event
|
||||
arg0
|
||||
proc
|
||||
'shove
|
||||
(-> arg3 param 0)
|
||||
(-> event param 0)
|
||||
(static-attack-info ((shove-up (meters 2)) (shove-back (meters 3))))
|
||||
)
|
||||
)
|
||||
@@ -918,8 +918,8 @@
|
||||
)
|
||||
|
||||
(defstate citb-coil-idle (citb-coil)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('trigger)
|
||||
(go citb-coil-break)
|
||||
)
|
||||
@@ -1118,7 +1118,7 @@
|
||||
:flag-assert #x1600c00124
|
||||
(:methods
|
||||
(init! (_type_) none 20)
|
||||
(dummy-21 (_type_) none 21)
|
||||
(citb-generator-method-21 (_type_) none 21)
|
||||
)
|
||||
(:states
|
||||
citb-generator-break
|
||||
@@ -1225,8 +1225,8 @@
|
||||
)
|
||||
|
||||
(defstate citb-generator-idle (citb-generator)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('attack)
|
||||
(if (-> self mushroom)
|
||||
(increment-success-for-hint (game-text-id citadel-generator))
|
||||
@@ -1382,7 +1382,7 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod dummy-21 citb-generator ((obj citb-generator))
|
||||
(defmethod citb-generator-method-21 citb-generator ((obj citb-generator))
|
||||
(initialize-skeleton obj *citb-generator-sg* '())
|
||||
(setup-lods! (-> obj normal-look) *citb-generator-sg* (-> obj draw art-group) (-> obj entity))
|
||||
(setup-lods! (-> obj broken-look) *citb-generator-broken-sg* (-> obj draw art-group) (-> obj entity))
|
||||
@@ -1430,7 +1430,7 @@
|
||||
(defmethod init-from-entity! citb-generator ((obj citb-generator) (arg0 entity-actor))
|
||||
(init! obj)
|
||||
(process-drawable-from-entity! obj arg0)
|
||||
(dummy-21 obj)
|
||||
(citb-generator-method-21 obj)
|
||||
(let ((v1-4 (entity-actor-lookup (-> obj entity) 'state-actor 0)))
|
||||
(if (not v1-4)
|
||||
(set! v1-4 (-> obj entity))
|
||||
@@ -1462,8 +1462,8 @@
|
||||
|
||||
|
||||
(defstate citadelcam-idle (citadelcam)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('trigger)
|
||||
(when (and (task-complete? *game-info* (game-task citadel-sage-blue))
|
||||
(task-complete? *game-info* (game-task citadel-sage-red))
|
||||
@@ -1525,13 +1525,7 @@
|
||||
(suspend)
|
||||
)
|
||||
)
|
||||
(level-hint-spawn
|
||||
(game-text-id citadel-plat)
|
||||
"sksp0387"
|
||||
(the-as entity #f)
|
||||
*entity-pool*
|
||||
(game-task none)
|
||||
)
|
||||
(level-hint-spawn (game-text-id citadel-plat) "sksp0387" (the-as entity #f) *entity-pool* (game-task none))
|
||||
(go citadelcam-idle)
|
||||
(none)
|
||||
)
|
||||
@@ -1557,13 +1551,7 @@
|
||||
(defstate battlecontroller-play-intro-camera (citb-battlecontroller)
|
||||
:virtual #t
|
||||
:code (behavior ()
|
||||
(level-hint-spawn
|
||||
(game-text-id citadel-battle)
|
||||
"sksp0383"
|
||||
(the-as entity #f)
|
||||
*entity-pool*
|
||||
(game-task none)
|
||||
)
|
||||
(level-hint-spawn (game-text-id citadel-battle) "sksp0383" (the-as entity #f) *entity-pool* (game-task none))
|
||||
(suspend)
|
||||
(let ((gp-1 (ppointer->handle (process-spawn
|
||||
pov-camera
|
||||
@@ -1602,13 +1590,9 @@
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod TODO-RENAME-27 citb-battlecontroller ((obj citb-battlecontroller))
|
||||
(defmethod battlecontroller-method-27 citb-battlecontroller ((obj citb-battlecontroller))
|
||||
((the-as (function battlecontroller none) (find-parent-method citb-battlecontroller 27)) obj)
|
||||
(set! (-> obj activate-distance) 143360.0)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -38,8 +38,8 @@
|
||||
:size-assert #x17c
|
||||
:flag-assert #x160110017c
|
||||
(:methods
|
||||
(dummy-20 (_type_) none 20)
|
||||
(dummy-21 (_type_) none 21)
|
||||
(citb-sagecage-method-20 (_type_) none 20)
|
||||
(citb-sagecage-method-21 (_type_) none 21)
|
||||
)
|
||||
(:states
|
||||
citb-sagecage-idle
|
||||
@@ -91,36 +91,34 @@
|
||||
)
|
||||
|
||||
(defstate citb-sagecage-idle (citb-sagecage)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(local-vars (v0-3 none))
|
||||
(let ((v1-0 arg2))
|
||||
(the-as object (cond
|
||||
((= v1-0 'disable-bars)
|
||||
(stop! (-> self sound))
|
||||
(sound-play "sagecage-off")
|
||||
(set! (-> self bars-on) #f)
|
||||
(citb-sagecage-update-collision)
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(local-vars (v0-3 basic))
|
||||
(the-as object (case event-type
|
||||
(('disable-bars)
|
||||
(stop! (-> self sound))
|
||||
(sound-play "sagecage-off")
|
||||
(set! (-> self bars-on) #f)
|
||||
(the-as basic (citb-sagecage-update-collision))
|
||||
)
|
||||
(('enable-bars)
|
||||
(set! (-> self bars-on) #t)
|
||||
(the-as basic (citb-sagecage-update-collision))
|
||||
)
|
||||
(('start-cloning)
|
||||
(set! v0-3 #t)
|
||||
(set! (-> self cloning) (the-as symbol v0-3))
|
||||
v0-3
|
||||
)
|
||||
(('stop-cloning)
|
||||
(set! (-> self cloning) #f)
|
||||
(let ((v1-7 (-> self skel root-channel 0)))
|
||||
(set! v0-3 (-> self draw art-group data 3))
|
||||
(set! (-> v1-7 frame-group) (the-as art-joint-anim v0-3))
|
||||
)
|
||||
((= v1-0 'enable-bars)
|
||||
(set! (-> self bars-on) #t)
|
||||
(citb-sagecage-update-collision)
|
||||
)
|
||||
((= v1-0 'start-cloning)
|
||||
(set! v0-3 (the-as none #t))
|
||||
(set! (-> self cloning) (the-as symbol v0-3))
|
||||
v0-3
|
||||
)
|
||||
((= v1-0 'stop-cloning)
|
||||
(set! (-> self cloning) #f)
|
||||
(let ((v1-7 (-> self skel root-channel 0)))
|
||||
(set! v0-3 (the-as none (-> self draw art-group data 3)))
|
||||
(set! (-> v1-7 frame-group) (the-as art-joint-anim v0-3))
|
||||
)
|
||||
v0-3
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
v0-3
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
:trans (the-as (function none :behavior citb-sagecage) rider-trans)
|
||||
:code (behavior ()
|
||||
@@ -159,7 +157,7 @@
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod dummy-20 citb-sagecage ((obj citb-sagecage))
|
||||
(defmethod citb-sagecage-method-20 citb-sagecage ((obj citb-sagecage))
|
||||
(let ((s5-0 (new 'process 'collide-shape-moving obj (collide-list-enum hit-by-player))))
|
||||
(set! (-> s5-0 dynam) (copy *standard-dynamics* 'process))
|
||||
(set! (-> s5-0 reaction) default-collision-reaction)
|
||||
@@ -184,7 +182,7 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod dummy-21 citb-sagecage ((obj citb-sagecage))
|
||||
(defmethod citb-sagecage-method-21 citb-sagecage ((obj citb-sagecage))
|
||||
(initialize-skeleton obj *citb-sagecage-sg* '())
|
||||
(logior! (-> obj skel status) (janim-status inited))
|
||||
(set! (-> obj root-override pause-adjust-distance) 409600.0)
|
||||
@@ -220,11 +218,11 @@
|
||||
)
|
||||
|
||||
(defbehavior citb-sagecage-init-by-other citb-sagecage ((arg0 citb-sage))
|
||||
(dummy-20 self)
|
||||
(citb-sagecage-method-20 self)
|
||||
(mem-copy! (the-as pointer (-> self root-override trans)) (the-as pointer (-> arg0 root-override trans)) 16)
|
||||
(mem-copy! (the-as pointer (-> self root-override quat)) (the-as pointer (-> arg0 root-override quat)) 16)
|
||||
(mem-copy! (the-as pointer (-> self root-override scale)) (the-as pointer (-> arg0 root-override scale)) 16)
|
||||
(dummy-21 self)
|
||||
(citb-sagecage-method-21 self)
|
||||
(go citb-sagecage-idle)
|
||||
(none)
|
||||
)
|
||||
@@ -339,12 +337,12 @@
|
||||
(the-as symbol 0)
|
||||
)
|
||||
|
||||
(defmethod dummy-45 citb-sage ((obj citb-sage))
|
||||
(defmethod process-taskable-method-45 citb-sage ((obj citb-sage))
|
||||
(set! (-> obj spawn-pos quad) (-> obj root-override trans quad))
|
||||
(the-as symbol 0)
|
||||
)
|
||||
|
||||
(defmethod dummy-42 citb-sage ((obj citb-sage))
|
||||
(defmethod process-taskable-method-42 citb-sage ((obj citb-sage))
|
||||
(if (not (should-display? obj))
|
||||
(go (method-of-object obj hidden))
|
||||
(go (method-of-object obj idle))
|
||||
@@ -398,20 +396,20 @@
|
||||
(vector-! (-> self dir) (-> self target-pos) (-> self spawn-pos))
|
||||
(set! (-> self rot-y) (vector-y-angle (-> self dir)))
|
||||
(set! (-> self rot-x) (- 16384.0 (vector-x-angle (-> self dir))))
|
||||
(dummy-45 self)
|
||||
(process-taskable-method-45 self)
|
||||
(spawn (-> self part) (-> self spawn-pos))
|
||||
(spawn (-> self part-impact) (-> self target-pos))
|
||||
)
|
||||
|
||||
(defstate play-anim (citb-sage)
|
||||
:virtual #t
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('disable-bars)
|
||||
(send-event (handle->process (-> self cage)) 'disable-bars)
|
||||
)
|
||||
(else
|
||||
((-> (method-of-type process-taskable play-anim) event) arg0 arg1 arg2 arg3)
|
||||
((-> (method-of-type process-taskable play-anim) event) proc arg1 event-type event)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -419,13 +417,13 @@
|
||||
|
||||
(defstate idle (citb-sage)
|
||||
:virtual #t
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('open)
|
||||
(send-event (handle->process (-> self cage)) 'disable-bars)
|
||||
)
|
||||
(else
|
||||
((-> (method-of-type process-taskable idle) event) arg0 arg1 arg2 arg3)
|
||||
((-> (method-of-type process-taskable idle) event) proc arg1 event-type event)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -461,7 +459,7 @@
|
||||
)
|
||||
|
||||
|
||||
(defmethod dummy-52 red-sagecage ((obj red-sagecage))
|
||||
(defmethod process-taskable-method-52 red-sagecage ((obj red-sagecage))
|
||||
(let ((v1-1 (-> obj draw shadow-ctrl)))
|
||||
(when v1-1
|
||||
(let ((a0-1 v1-1))
|
||||
@@ -501,7 +499,7 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod dummy-45 red-sagecage ((obj red-sagecage))
|
||||
(defmethod process-taskable-method-45 red-sagecage ((obj red-sagecage))
|
||||
(set! (-> *part-id-table* 2455 init-specs 14 initial-valuef) (-> obj rot-y))
|
||||
(set! (-> *part-id-table* 2455 init-specs 13 initial-valuef) (-> obj rot-x))
|
||||
(set! (-> *part-id-table* 2457 init-specs 14 initial-valuef) (-> obj rot-y))
|
||||
@@ -535,11 +533,11 @@
|
||||
(the-as symbol 0)
|
||||
)
|
||||
|
||||
(defmethod TODO-RENAME-43 red-sagecage ((obj red-sagecage))
|
||||
(defmethod process-taskable-method-43 red-sagecage ((obj red-sagecage))
|
||||
(if (-> obj beam-on)
|
||||
(return #f)
|
||||
)
|
||||
(when (TODO-RENAME-10 (-> obj ambient) (new 'stack-no-clear 'vector) (seconds 30) 122880.0 obj)
|
||||
(when (ambient-control-method-10 (-> obj ambient) (new 'stack-no-clear 'vector) (seconds 30) 122880.0 obj)
|
||||
(let ((f0-2 (rand-float-gen)))
|
||||
(cond
|
||||
((< 0.6666667 f0-2)
|
||||
@@ -557,11 +555,11 @@
|
||||
)
|
||||
|
||||
(defmethod init-from-entity! red-sagecage ((obj red-sagecage) (arg0 entity-actor))
|
||||
(dummy-40 obj arg0 *redsage-sg* 3 33 (new 'static 'vector :w 8192.0) 5)
|
||||
(process-taskable-method-40 obj arg0 *redsage-sg* 3 33 (new 'static 'vector :w 8192.0) 5)
|
||||
(set! (-> obj tasks) (get-task-control (-> obj entity extra perm task)))
|
||||
(play-reminder obj)
|
||||
(set! (-> obj sound-flava) (music-flava sage-red))
|
||||
(dummy-42 obj)
|
||||
(process-taskable-method-42 obj)
|
||||
(none)
|
||||
)
|
||||
|
||||
@@ -574,7 +572,7 @@
|
||||
)
|
||||
|
||||
|
||||
(defmethod dummy-52 blue-sagecage ((obj blue-sagecage))
|
||||
(defmethod process-taskable-method-52 blue-sagecage ((obj blue-sagecage))
|
||||
(let ((v1-1 (-> obj draw shadow-ctrl)))
|
||||
(when v1-1
|
||||
(let ((a0-1 v1-1))
|
||||
@@ -614,7 +612,7 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod dummy-45 blue-sagecage ((obj blue-sagecage))
|
||||
(defmethod process-taskable-method-45 blue-sagecage ((obj blue-sagecage))
|
||||
(set! (-> *part-id-table* 2448 init-specs 14 initial-valuef) (-> obj rot-y))
|
||||
(set! (-> *part-id-table* 2448 init-specs 13 initial-valuef) (-> obj rot-x))
|
||||
(set! (-> *part-id-table* 2450 init-specs 14 initial-valuef) (-> obj rot-y))
|
||||
@@ -653,11 +651,11 @@
|
||||
(the-as symbol 0)
|
||||
)
|
||||
|
||||
(defmethod TODO-RENAME-43 blue-sagecage ((obj blue-sagecage))
|
||||
(defmethod process-taskable-method-43 blue-sagecage ((obj blue-sagecage))
|
||||
(if (-> obj beam-on)
|
||||
(return #f)
|
||||
)
|
||||
(when (TODO-RENAME-10 (-> obj ambient) (new 'stack-no-clear 'vector) (seconds 30) 122880.0 obj)
|
||||
(when (ambient-control-method-10 (-> obj ambient) (new 'stack-no-clear 'vector) (seconds 30) 122880.0 obj)
|
||||
(let ((f0-2 (rand-float-gen)))
|
||||
(cond
|
||||
((< 0.6666667 f0-2)
|
||||
@@ -675,11 +673,11 @@
|
||||
)
|
||||
|
||||
(defmethod init-from-entity! blue-sagecage ((obj blue-sagecage) (arg0 entity-actor))
|
||||
(dummy-40 obj arg0 *bluesage-sg* 3 54 (new 'static 'vector :w 8192.0) 5)
|
||||
(process-taskable-method-40 obj arg0 *bluesage-sg* 3 54 (new 'static 'vector :w 8192.0) 5)
|
||||
(set! (-> obj tasks) (get-task-control (-> obj entity extra perm task)))
|
||||
(play-reminder obj)
|
||||
(set! (-> obj sound-flava) (music-flava sage-blue))
|
||||
(dummy-42 obj)
|
||||
(process-taskable-method-42 obj)
|
||||
(none)
|
||||
)
|
||||
|
||||
@@ -692,7 +690,7 @@
|
||||
)
|
||||
|
||||
|
||||
(defmethod dummy-52 yellow-sagecage ((obj yellow-sagecage))
|
||||
(defmethod process-taskable-method-52 yellow-sagecage ((obj yellow-sagecage))
|
||||
(let ((v1-1 (-> obj draw shadow-ctrl)))
|
||||
(when v1-1
|
||||
(let ((a0-1 v1-1))
|
||||
@@ -732,7 +730,7 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod dummy-45 yellow-sagecage ((obj yellow-sagecage))
|
||||
(defmethod process-taskable-method-45 yellow-sagecage ((obj yellow-sagecage))
|
||||
(set! (-> *part-id-table* 2462 init-specs 14 initial-valuef) (-> obj rot-y))
|
||||
(set! (-> *part-id-table* 2462 init-specs 13 initial-valuef) (-> obj rot-x))
|
||||
(set! (-> *part-id-table* 2464 init-specs 14 initial-valuef) (-> obj rot-y))
|
||||
@@ -766,11 +764,11 @@
|
||||
(the-as symbol 0)
|
||||
)
|
||||
|
||||
(defmethod TODO-RENAME-43 yellow-sagecage ((obj yellow-sagecage))
|
||||
(defmethod process-taskable-method-43 yellow-sagecage ((obj yellow-sagecage))
|
||||
(if (-> obj beam-on)
|
||||
(return #f)
|
||||
)
|
||||
(when (TODO-RENAME-10 (-> obj ambient) (new 'stack-no-clear 'vector) (seconds 30) 122880.0 obj)
|
||||
(when (ambient-control-method-10 (-> obj ambient) (new 'stack-no-clear 'vector) (seconds 30) 122880.0 obj)
|
||||
(let ((f0-2 (rand-float-gen)))
|
||||
(cond
|
||||
((< 0.6666667 f0-2)
|
||||
@@ -788,11 +786,11 @@
|
||||
)
|
||||
|
||||
(defmethod init-from-entity! yellow-sagecage ((obj yellow-sagecage) (arg0 entity-actor))
|
||||
(dummy-40 obj arg0 *yellowsage-sg* 3 50 (new 'static 'vector :w 8192.0) 5)
|
||||
(process-taskable-method-40 obj arg0 *yellowsage-sg* 3 50 (new 'static 'vector :w 8192.0) 5)
|
||||
(set! (-> obj tasks) (get-task-control (-> obj entity extra perm task)))
|
||||
(play-reminder obj)
|
||||
(set! (-> obj sound-flava) (music-flava sage-yellow))
|
||||
(dummy-42 obj)
|
||||
(process-taskable-method-42 obj)
|
||||
(none)
|
||||
)
|
||||
|
||||
@@ -810,7 +808,7 @@
|
||||
)
|
||||
|
||||
|
||||
(defmethod dummy-45 green-sagecage ((obj green-sagecage))
|
||||
(defmethod process-taskable-method-45 green-sagecage ((obj green-sagecage))
|
||||
(set! (-> *part-id-table* 2469 init-specs 14 initial-valuef) (-> obj rot-y))
|
||||
(set! (-> *part-id-table* 2469 init-specs 13 initial-valuef) (-> obj rot-x))
|
||||
(set! (-> *part-id-table* 2471 init-specs 14 initial-valuef) (-> obj rot-y))
|
||||
@@ -999,8 +997,8 @@
|
||||
|
||||
(defstate play-anim (green-sagecage)
|
||||
:virtual #t
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('spawn-robot)
|
||||
(let ((gp-0 (entity-by-name "robotboss-3")))
|
||||
(format 0 "robotboss ent ~A~%" gp-0)
|
||||
@@ -1014,17 +1012,14 @@
|
||||
(let ((s5-1 (handle->process (-> self robotboss))))
|
||||
(when s5-1
|
||||
(format 0 "robotboss activated ent ~A~%" gp-0)
|
||||
(let ((f0-0 327680.0))
|
||||
(set! (-> (the-as process-drawable s5-1) draw bounds w) f0-0)
|
||||
f0-0
|
||||
)
|
||||
(set! (-> (the-as process-drawable s5-1) draw bounds w) 327680.0)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(else
|
||||
((-> (method-of-type citb-sage play-anim) event) arg0 arg1 arg2 arg3)
|
||||
((-> (method-of-type citb-sage play-anim) event) proc arg1 event-type event)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -1142,7 +1137,7 @@
|
||||
)
|
||||
|
||||
(defmethod init-from-entity! green-sagecage ((obj green-sagecage) (arg0 entity-actor))
|
||||
(dummy-40 obj arg0 *green-sagecage-sg* 3 40 (new 'static 'vector :w 4096.0) 5)
|
||||
(process-taskable-method-40 obj arg0 *green-sagecage-sg* 3 40 (new 'static 'vector :w 4096.0) 5)
|
||||
(set! (-> obj tasks) (get-task-control (-> obj entity extra perm task)))
|
||||
(play-reminder obj)
|
||||
(set! (-> obj evilbro) (the-as handle #f))
|
||||
@@ -1159,10 +1154,6 @@
|
||||
)
|
||||
)
|
||||
(set! (-> obj sound-flava) (music-flava sage))
|
||||
(dummy-42 obj)
|
||||
(process-taskable-method-42 obj)
|
||||
(none)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
:size-assert #x200
|
||||
:flag-assert #x4d01900200
|
||||
(:methods
|
||||
(TODO-RENAME-48 (_type_ object) none :replace 48)
|
||||
(citb-bunny-method-48 (_type_ object) none :replace 48)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -78,16 +78,16 @@
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod dummy-60 citb-bunny ((obj citb-bunny))
|
||||
(defmethod snow-bunny-method-60 citb-bunny ((obj citb-bunny))
|
||||
(initialize-skeleton obj *citb-bunny-sg* '())
|
||||
(set! (-> obj draw origin-joint-index) (the-as uint 3))
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod TODO-RENAME-48 citb-bunny ((obj citb-bunny) (arg0 object))
|
||||
(dummy-60 obj)
|
||||
(TODO-RENAME-45 obj *citb-bunny-nav-enemy-info*)
|
||||
(defmethod citb-bunny-method-48 citb-bunny ((obj citb-bunny) (arg0 object))
|
||||
(snow-bunny-method-60 obj)
|
||||
(init-defaults! obj *citb-bunny-nav-enemy-info*)
|
||||
(logclear! (-> obj draw shadow-ctrl settings flags) (shadow-flags shdf03))
|
||||
(cond
|
||||
((zero? (res-lump-value (-> obj entity) 'mode uint128))
|
||||
@@ -136,7 +136,3 @@
|
||||
)
|
||||
(none)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -49,8 +49,8 @@
|
||||
:size-assert #xe1
|
||||
:flag-assert #x16008000e1
|
||||
(:methods
|
||||
(TODO-RENAME-20 (_type_) none 20)
|
||||
(dummy-21 (_type_) none 21)
|
||||
(drop-plat-method-20 (_type_) none 20)
|
||||
(drop-plat-method-21 (_type_) none 21)
|
||||
)
|
||||
(:states
|
||||
drop-plat-die
|
||||
@@ -63,8 +63,8 @@
|
||||
|
||||
|
||||
(defstate drop-plat-idle (drop-plat)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('drop)
|
||||
(logclear! (-> self mask) (process-mask actor-pause))
|
||||
(go drop-plat-drop)
|
||||
@@ -108,8 +108,8 @@
|
||||
)
|
||||
|
||||
(defstate drop-plat-spawn (drop-plat)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('drop)
|
||||
(go drop-plat-die)
|
||||
)
|
||||
@@ -138,8 +138,8 @@
|
||||
)
|
||||
|
||||
(defstate drop-plat-rise (drop-plat)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('drop)
|
||||
(go drop-plat-drop)
|
||||
)
|
||||
@@ -240,7 +240,7 @@
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod TODO-RENAME-20 drop-plat ((obj drop-plat))
|
||||
(defmethod drop-plat-method-20 drop-plat ((obj drop-plat))
|
||||
(let ((s5-0 (new 'process 'collide-shape-moving obj (collide-list-enum hit-by-player))))
|
||||
(set! (-> s5-0 dynam) (copy *standard-dynamics* 'process))
|
||||
(set! (-> s5-0 reaction) default-collision-reaction)
|
||||
@@ -265,7 +265,7 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod dummy-21 drop-plat ((obj drop-plat))
|
||||
(defmethod drop-plat-method-21 drop-plat ((obj drop-plat))
|
||||
(case (-> obj color)
|
||||
((1)
|
||||
(initialize-skeleton obj *citb-drop-plat-red-sg* '())
|
||||
@@ -310,11 +310,11 @@
|
||||
(set! (-> self color) arg3)
|
||||
(set! (-> self delay) arg1)
|
||||
(set! (-> self duration) arg2)
|
||||
(TODO-RENAME-20 self)
|
||||
(drop-plat-method-20 self)
|
||||
(set! (-> self root-override trans quad) (-> arg0 quad))
|
||||
(vector-identity! (-> self root-override scale))
|
||||
(quaternion-copy! (-> self root-override quat) (-> (the-as process-drawable (-> self parent 0)) root quat))
|
||||
(dummy-21 self)
|
||||
(drop-plat-method-21 self)
|
||||
(go drop-plat-spawn)
|
||||
(none)
|
||||
)
|
||||
@@ -459,8 +459,8 @@
|
||||
)
|
||||
|
||||
(defstate citb-drop-plat-idle (citb-drop-plat)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('trigger)
|
||||
(go citb-drop-plat-active)
|
||||
)
|
||||
@@ -476,21 +476,19 @@
|
||||
)
|
||||
|
||||
(defstate citb-drop-plat-active (citb-drop-plat)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(let ((v1-0 arg2))
|
||||
(the-as object (cond
|
||||
((= v1-0 'player-stepped)
|
||||
(when (>= (- (-> *display* base-frame-counter) (-> self drop-time)) (seconds 0.2))
|
||||
(set! (-> self drop-time) (-> *display* base-frame-counter))
|
||||
(citb-drop-plat-drop-children (the-as int (-> arg3 param 0)))
|
||||
)
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(the-as object (case event-type
|
||||
(('player-stepped)
|
||||
(when (>= (- (-> *display* base-frame-counter) (-> self drop-time)) (seconds 0.2))
|
||||
(set! (-> self drop-time) (-> *display* base-frame-counter))
|
||||
(the-as object (citb-drop-plat-drop-children (the-as int (-> event param 0))))
|
||||
)
|
||||
((= v1-0 'trigger)
|
||||
(go citb-drop-plat-idle)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(('trigger)
|
||||
(go citb-drop-plat-idle)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
:code (behavior ()
|
||||
(set! (-> self state-time) (-> *display* base-frame-counter))
|
||||
@@ -546,7 +544,3 @@
|
||||
(go citb-drop-plat-idle)
|
||||
(none)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -52,10 +52,10 @@
|
||||
:flag-assert #x19005000b4
|
||||
(:methods
|
||||
(citb-base-plat-idle () _type_ :state 20)
|
||||
(dummy-21 (_type_) none 21)
|
||||
(dummy-22 (_type_) none 22)
|
||||
(citb-base-plat-method-21 (_type_) none 21)
|
||||
(citb-base-plat-method-22 (_type_) none 22)
|
||||
(citb-base-plat-active () _type_ :state 23)
|
||||
(dummy-24 (_type_) none 24)
|
||||
(citb-base-plat-method-24 (_type_) none 24)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -91,7 +91,7 @@
|
||||
:post (the-as (function none :behavior citb-base-plat) rider-post)
|
||||
)
|
||||
|
||||
(defmethod dummy-21 citb-base-plat ((obj citb-base-plat))
|
||||
(defmethod citb-base-plat-method-21 citb-base-plat ((obj citb-base-plat))
|
||||
(let ((s5-0 (new 'process 'collide-shape-moving obj (collide-list-enum hit-by-others))))
|
||||
(set! (-> s5-0 dynam) (copy *standard-dynamics* 'process))
|
||||
(set! (-> s5-0 reaction) default-collision-reaction)
|
||||
@@ -116,25 +116,25 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod dummy-22 citb-base-plat ((obj citb-base-plat))
|
||||
(defmethod citb-base-plat-method-22 citb-base-plat ((obj citb-base-plat))
|
||||
(initialize-skeleton obj *plat-citb-sg* '())
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod dummy-24 citb-base-plat ((obj citb-base-plat))
|
||||
(defmethod citb-base-plat-method-24 citb-base-plat ((obj citb-base-plat))
|
||||
(go (method-of-object obj citb-base-plat-idle))
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod init-from-entity! citb-base-plat ((obj citb-base-plat) (arg0 entity-actor))
|
||||
(dummy-21 obj)
|
||||
(citb-base-plat-method-21 obj)
|
||||
(process-drawable-from-entity! obj arg0)
|
||||
(set! (-> obj idle-distance) 245760.0)
|
||||
(dummy-22 obj)
|
||||
(citb-base-plat-method-22 obj)
|
||||
(logior! (-> obj skel status) (janim-status inited))
|
||||
(dummy-24 obj)
|
||||
(citb-base-plat-method-24 obj)
|
||||
(none)
|
||||
)
|
||||
|
||||
@@ -147,7 +147,7 @@
|
||||
)
|
||||
|
||||
|
||||
(defmethod dummy-24 citb-plat-eco ((obj citb-plat-eco))
|
||||
(defmethod baseplat-method-24 citb-plat-eco ((obj citb-plat-eco))
|
||||
(let ((s5-0 (new 'process 'collide-shape-moving obj (collide-list-enum hit-by-others))))
|
||||
(set! (-> s5-0 dynam) (copy *standard-dynamics* 'process))
|
||||
(set! (-> s5-0 reaction) default-collision-reaction)
|
||||
@@ -172,7 +172,7 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod dummy-26 citb-plat-eco ((obj citb-plat-eco))
|
||||
(defmethod baseplat-method-26 citb-plat-eco ((obj citb-plat-eco))
|
||||
(logclear! (-> obj mask) (process-mask actor-pause))
|
||||
(set! (-> obj notice-dist) 8192.0)
|
||||
(none)
|
||||
@@ -218,7 +218,7 @@
|
||||
*plat-citb-sg*
|
||||
)
|
||||
|
||||
(defmethod dummy-24 citb-plat ((obj citb-plat))
|
||||
(defmethod baseplat-method-24 citb-plat ((obj citb-plat))
|
||||
(let ((s5-0 (new 'process 'collide-shape-moving obj (collide-list-enum hit-by-others))))
|
||||
(set! (-> s5-0 dynam) (copy *standard-dynamics* 'process))
|
||||
(set! (-> s5-0 reaction) default-collision-reaction)
|
||||
@@ -243,7 +243,7 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod dummy-26 citb-plat ((obj citb-plat))
|
||||
(defmethod baseplat-method-26 citb-plat ((obj citb-plat))
|
||||
(logclear! (-> obj mask) (process-mask actor-pause))
|
||||
(set! (-> obj root-override scale quad) (-> (res-lump-struct (-> obj entity) 'scale vector) quad))
|
||||
(let ((f0-0 (-> obj root-override scale x)))
|
||||
@@ -284,17 +284,17 @@
|
||||
|
||||
(defstate citb-base-plat-idle (citb-stair-plat)
|
||||
:virtual #t
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(let ((v1-0 arg2))
|
||||
(the-as object (when (= v1-0 'trigger)
|
||||
(logclear! (-> self mask) (process-mask actor-pause))
|
||||
(let ((v0-0 #t))
|
||||
(set! (-> self rise) v0-0)
|
||||
v0-0
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(the-as object (case event-type
|
||||
(('trigger)
|
||||
(logclear! (-> self mask) (process-mask actor-pause))
|
||||
(let ((v0-0 #t))
|
||||
(set! (-> self rise) v0-0)
|
||||
v0-0
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
:trans (the-as (function none :behavior citb-stair-plat) #f)
|
||||
:code (behavior ()
|
||||
@@ -345,7 +345,7 @@
|
||||
:post (the-as (function none :behavior citb-stair-plat) ja-post)
|
||||
)
|
||||
|
||||
(defmethod dummy-22 citb-stair-plat ((obj citb-stair-plat))
|
||||
(defmethod citb-base-plat-method-22 citb-stair-plat ((obj citb-stair-plat))
|
||||
(initialize-skeleton obj *plat-citb-sg* '())
|
||||
(set! (-> obj rise-height) (-> obj root-override trans y))
|
||||
(set! (-> obj idle-height) (+ -409600.0 (-> obj rise-height)))
|
||||
@@ -365,7 +365,7 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod dummy-24 citb-stair-plat ((obj citb-stair-plat))
|
||||
(defmethod citb-base-plat-method-24 citb-stair-plat ((obj citb-stair-plat))
|
||||
(if (and (task-complete? *game-info* (game-task citadel-sage-blue))
|
||||
(task-complete? *game-info* (game-task citadel-sage-red))
|
||||
(task-complete? *game-info* (game-task citadel-sage-yellow))
|
||||
@@ -420,7 +420,7 @@
|
||||
)
|
||||
|
||||
|
||||
(defmethod TODO-RENAME-22 citb-chain-plat ((obj citb-chain-plat) (arg0 vector) (arg1 float))
|
||||
(defmethod rigid-body-platform-method-22 citb-chain-plat ((obj citb-chain-plat) (arg0 vector) (arg1 float))
|
||||
(+ 12288.0
|
||||
(* 2048.0
|
||||
(fmax 0.0 (fmin 1.0 (* 0.000024414063 (-> obj float-height-offset))))
|
||||
@@ -431,7 +431,7 @@
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod TODO-RENAME-27 citb-chain-plat ((obj citb-chain-plat) (arg0 vector))
|
||||
(defmethod rigid-body-platform-method-27 citb-chain-plat ((obj citb-chain-plat) (arg0 vector))
|
||||
(let ((gp-0 (new 'stack-no-clear 'vector)))
|
||||
(vector-! gp-0 arg0 (-> obj rbody position))
|
||||
(set! (-> gp-0 y) 0.0)
|
||||
@@ -440,7 +440,7 @@
|
||||
)
|
||||
(when (< 0.0 f1-1)
|
||||
(vector-float*! gp-0 gp-0 (/ f1-1 f0-1))
|
||||
(TODO-RENAME-15 (-> obj rbody) gp-0)
|
||||
(rigid-body-method-15 (-> obj rbody) gp-0)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -448,9 +448,9 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod TODO-RENAME-23 citb-chain-plat ((obj citb-chain-plat) (arg0 float))
|
||||
(defmethod rigid-body-platform-method-23 citb-chain-plat ((obj citb-chain-plat) (arg0 float))
|
||||
((the-as (function rigid-body-platform float none) (find-parent-method citb-chain-plat 23)) obj arg0)
|
||||
(TODO-RENAME-27 obj (-> obj orig-trans))
|
||||
(rigid-body-platform-method-27 obj (-> obj orig-trans))
|
||||
0
|
||||
(none)
|
||||
)
|
||||
@@ -546,7 +546,7 @@
|
||||
)
|
||||
(set! (-> self root-overlay trans quad) (-> self orig-trans quad))
|
||||
(quaternion-copy! (-> self root-overlay quat) (-> self orig-quat))
|
||||
(TODO-RENAME-22
|
||||
(rigid-body-method-22
|
||||
(-> self rbody)
|
||||
(-> self root-overlay trans)
|
||||
(-> self root-overlay quat)
|
||||
@@ -560,7 +560,7 @@
|
||||
:post (the-as (function none :behavior citb-chain-plat) rider-post)
|
||||
)
|
||||
|
||||
(defmethod TODO-RENAME-30 citb-chain-plat ((obj citb-chain-plat))
|
||||
(defmethod rigid-body-platform-method-30 citb-chain-plat ((obj citb-chain-plat))
|
||||
(let ((s5-0 (new 'process 'collide-shape-moving obj (collide-list-enum hit-by-player))))
|
||||
(set! (-> s5-0 dynam) (copy *standard-dynamics* 'process))
|
||||
(set! (-> s5-0 reaction) default-collision-reaction)
|
||||
@@ -585,13 +585,13 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod TODO-RENAME-31 citb-chain-plat ((obj citb-chain-plat))
|
||||
(defmethod rigid-body-platform-method-31 citb-chain-plat ((obj citb-chain-plat))
|
||||
(initialize-skeleton obj *citb-chain-plat-sg* '())
|
||||
(set! (-> obj orig-trans quad) (-> obj root-overlay trans quad))
|
||||
(quaternion-copy! (-> obj orig-quat) (-> obj root-overlay quat))
|
||||
(set! (-> obj beam-end quad) (-> obj orig-trans quad))
|
||||
(set! (-> obj beam-end y) (+ -49152.0 (-> obj beam-end y)))
|
||||
(TODO-RENAME-29 obj *citb-chain-plat-constants*)
|
||||
(rigid-body-platform-method-29 obj *citb-chain-plat-constants*)
|
||||
(set! (-> obj idle-offset) 0.0)
|
||||
(set! (-> obj float-offset) (res-lump-float (-> obj entity) 'height-info :default 4096.0))
|
||||
(set! (-> obj float-height-offset) (-> obj idle-offset))
|
||||
@@ -649,7 +649,7 @@
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod dummy-21 citb-rotatebox ((obj citb-rotatebox))
|
||||
(defmethod citb-base-plat-method-21 citb-rotatebox ((obj citb-rotatebox))
|
||||
(let ((s5-0 (new 'process 'collide-shape-moving obj (collide-list-enum hit-by-others))))
|
||||
(set! (-> s5-0 dynam) (copy *standard-dynamics* 'process))
|
||||
(set! (-> s5-0 reaction) default-collision-reaction)
|
||||
@@ -674,7 +674,7 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod dummy-22 citb-rotatebox ((obj citb-rotatebox))
|
||||
(defmethod citb-base-plat-method-22 citb-rotatebox ((obj citb-rotatebox))
|
||||
(initialize-skeleton obj *citb-rotatebox-sg* '())
|
||||
0
|
||||
(none)
|
||||
@@ -711,7 +711,7 @@
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod dummy-21 citb-donut ((obj citb-donut))
|
||||
(defmethod citb-base-plat-method-21 citb-donut ((obj citb-donut))
|
||||
(let ((s5-0 (new 'process 'collide-shape-moving obj (collide-list-enum hit-by-others))))
|
||||
(set! (-> s5-0 dynam) (copy *standard-dynamics* 'process))
|
||||
(set! (-> s5-0 reaction) default-collision-reaction)
|
||||
@@ -736,7 +736,7 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod dummy-22 citb-donut ((obj citb-donut))
|
||||
(defmethod citb-base-plat-method-22 citb-donut ((obj citb-donut))
|
||||
(initialize-skeleton obj *citb-donut-sg* '())
|
||||
(setup-params! (-> obj sync) (the-as uint 9000) 0.0 0.15 0.15)
|
||||
(set! (-> obj sound)
|
||||
@@ -778,7 +778,7 @@
|
||||
*citb-stopbox-sg*
|
||||
)
|
||||
|
||||
(defmethod dummy-24 citb-stopbox ((obj citb-stopbox))
|
||||
(defmethod baseplat-method-24 citb-stopbox ((obj citb-stopbox))
|
||||
(let ((s5-0 (new 'process 'collide-shape-moving obj (collide-list-enum hit-by-others))))
|
||||
(set! (-> s5-0 dynam) (copy *standard-dynamics* 'process))
|
||||
(set! (-> s5-0 reaction) default-collision-reaction)
|
||||
@@ -803,7 +803,7 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod dummy-26 citb-stopbox ((obj citb-stopbox))
|
||||
(defmethod baseplat-method-26 citb-stopbox ((obj citb-stopbox))
|
||||
(logior! (-> obj fact options) (fact-options wrap-phase))
|
||||
(logclear! (-> obj mask) (process-mask actor-pause))
|
||||
0
|
||||
@@ -894,13 +894,13 @@
|
||||
)
|
||||
|
||||
(defstate citb-firehose-blast (citb-firehose)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('touch)
|
||||
(send-event
|
||||
arg0
|
||||
proc
|
||||
'attack
|
||||
(-> arg3 param 0)
|
||||
(-> event param 0)
|
||||
(static-attack-info ((mode 'damage) (shove-back (meters 6)) (shove-up (meters 3))))
|
||||
)
|
||||
)
|
||||
@@ -1003,8 +1003,8 @@
|
||||
|
||||
|
||||
(defstate citb-exit-plat-idle (citb-exit-plat)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('trigger)
|
||||
(let ((v1-3 (-> self entity extra perm)))
|
||||
(logior! (-> v1-3 status) (entity-perm-status user-set-from-cstage))
|
||||
@@ -1103,12 +1103,12 @@
|
||||
(not (movie?))
|
||||
)
|
||||
|
||||
(defmethod TODO-RENAME-31 citb-exit-plat ((obj citb-exit-plat))
|
||||
(defmethod plat-button-method-31 citb-exit-plat ((obj citb-exit-plat))
|
||||
(initialize-skeleton obj *citb-exit-plat-sg* '())
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod TODO-RENAME-32 citb-exit-plat ((obj citb-exit-plat))
|
||||
(defmethod plat-button-method-32 citb-exit-plat ((obj citb-exit-plat))
|
||||
(if (-> obj activated)
|
||||
(go (method-of-object obj plat-button-idle))
|
||||
(go citb-exit-plat-idle)
|
||||
@@ -1117,7 +1117,7 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod TODO-RENAME-28 citb-exit-plat ((obj citb-exit-plat))
|
||||
(defmethod plat-button-method-28 citb-exit-plat ((obj citb-exit-plat))
|
||||
(let ((s5-0 (new 'process 'collide-shape-moving obj (collide-list-enum hit-by-others))))
|
||||
(set! (-> s5-0 dynam) (copy *standard-dynamics* 'process))
|
||||
(set! (-> s5-0 reaction) default-collision-reaction)
|
||||
@@ -1193,7 +1193,3 @@
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -63,14 +63,14 @@
|
||||
:size-assert #x27c
|
||||
:flag-assert #x1d0210027c
|
||||
(:methods
|
||||
(dummy-20 () none 20)
|
||||
(battlecontroller-method-20 () none 20)
|
||||
(battlecontroller-idle () _type_ :state 21)
|
||||
(battlecontroller-play-intro-camera () _type_ :state 22)
|
||||
(dummy-23 () none 23)
|
||||
(battlecontroller-method-23 () none 23)
|
||||
(battlecontroller-active () _type_ :state 24)
|
||||
(dummy-25 () none 25)
|
||||
(battlecontroller-method-25 () none 25)
|
||||
(battlecontroller-die () _type_ :state 26)
|
||||
(TODO-RENAME-27 (_type_) none 27)
|
||||
(battlecontroller-method-27 (_type_) none 27)
|
||||
(cleanup-if-finished! (_type_) none 28)
|
||||
)
|
||||
)
|
||||
@@ -100,10 +100,7 @@
|
||||
(else
|
||||
(set! (-> v1-4 fact pickup-type) (-> self final-pickup-type))
|
||||
(set! (-> v1-4 fact pickup-amount) 1.0)
|
||||
(let ((f0-1 0.0))
|
||||
(set! (-> v1-4 fact pickup-spawn-amount) f0-1)
|
||||
f0-1
|
||||
)
|
||||
(set! (-> v1-4 fact pickup-spawn-amount) 0.0)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -120,7 +117,7 @@ battlecontroller-default-event-handler
|
||||
|
||||
(defbehavior battlecontroller-draw-debug battlecontroller ()
|
||||
(dotimes (gp-0 (-> self spawner-count))
|
||||
(dummy-9 (-> self spawner-array gp-0 path))
|
||||
(debug-draw (-> self spawner-array gp-0 path))
|
||||
)
|
||||
0
|
||||
(none)
|
||||
@@ -158,7 +155,7 @@ battlecontroller-default-event-handler
|
||||
(eval-path-curve-div! (-> s5-0 path) s3-0 (the float (-> s5-0 state)) 'interp)
|
||||
(send-event s4-0 'cue-jump-to-point s3-0)
|
||||
)
|
||||
(if (zero? (logand (-> (the-as nav-enemy s4-0) nav-enemy-flags) (nav-enemy-flags navenmf11)))
|
||||
(if (not (logtest? (-> (the-as nav-enemy s4-0) nav-enemy-flags) (nav-enemy-flags navenmf11)))
|
||||
(+! (-> s5-0 state) 1)
|
||||
)
|
||||
)
|
||||
@@ -629,7 +626,7 @@ battlecontroller-default-event-handler
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod TODO-RENAME-27 battlecontroller ((obj battlecontroller))
|
||||
(defmethod battlecontroller-method-27 battlecontroller ((obj battlecontroller))
|
||||
(local-vars (sv-16 res-tag))
|
||||
(set! (-> obj fact)
|
||||
(new 'process 'fact-info obj (pickup-type eco-pill-random) (-> *FACT-bank* default-pill-inc))
|
||||
@@ -785,11 +782,7 @@ battlecontroller-default-event-handler
|
||||
(set! (-> obj mask) (logior (process-mask enemy) (-> obj mask)))
|
||||
(set! (-> obj root) (new 'process 'trsqv))
|
||||
(process-drawable-from-entity! obj arg0)
|
||||
(TODO-RENAME-27 obj)
|
||||
(battlecontroller-method-27 obj)
|
||||
(cleanup-if-finished! obj)
|
||||
(none)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -93,8 +93,8 @@
|
||||
)
|
||||
|
||||
(defstate cavecrystal-idle (cavecrystal)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('attack)
|
||||
(go cavecrystal-active)
|
||||
)
|
||||
@@ -122,24 +122,24 @@
|
||||
)
|
||||
|
||||
(defstate cavecrystal-active (cavecrystal)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(let ((v1-0 arg2))
|
||||
(the-as object (when (= v1-0 'attack)
|
||||
(let ((v1-1 (-> arg3 param 2)))
|
||||
(cond
|
||||
((!= v1-1 (-> self player-attack-id))
|
||||
(set! (-> self player-attack-id) v1-1)
|
||||
(set! (-> self activated-time) (-> *display* game-frame-counter))
|
||||
#t
|
||||
)
|
||||
(else
|
||||
#f
|
||||
)
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(the-as object (case event-type
|
||||
(('attack)
|
||||
(let ((v1-1 (-> event param 2)))
|
||||
(cond
|
||||
((!= v1-1 (-> self player-attack-id))
|
||||
(set! (-> self player-attack-id) v1-1)
|
||||
(set! (-> self activated-time) (-> *display* game-frame-counter))
|
||||
#t
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(else
|
||||
#f
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
:enter (behavior ()
|
||||
(logclear! (-> self mask) (process-mask actor-pause))
|
||||
@@ -177,7 +177,7 @@
|
||||
(set! (-> s5-1 w) 0.0)
|
||||
)
|
||||
)
|
||||
(TODO-RENAME-9 *cavecrystal-light-control* (-> self crystal-id) (-> self glow-u) self)
|
||||
(cavecrystal-light-control-method-9 *cavecrystal-light-control* (-> self crystal-id) (-> self glow-u) self)
|
||||
(update-connected-crystals! self)
|
||||
(when (>= 0.0 f30-0)
|
||||
(level-hint-spawn
|
||||
@@ -258,14 +258,10 @@
|
||||
)
|
||||
(ja-post)
|
||||
(update-transforms! (-> obj root-override))
|
||||
(TODO-RENAME-9 *cavecrystal-light-control* (-> obj crystal-id) 0.0 obj)
|
||||
(cavecrystal-light-control-method-9 *cavecrystal-light-control* (-> obj crystal-id) 0.0 obj)
|
||||
(set! (-> obj sound)
|
||||
(new 'process 'ambient-sound (static-sound-spec "crystal-on" :fo-max 80) (-> obj root-override trans))
|
||||
)
|
||||
(go cavecrystal-idle)
|
||||
(none)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
:flag-assert #x17004000b0
|
||||
(:methods
|
||||
(idle () _type_ :state 20)
|
||||
(dummy-21 (_type_) none 21)
|
||||
(final-door-method-21 (_type_) none 21)
|
||||
(open (symbol) _type_ :state 22)
|
||||
)
|
||||
)
|
||||
@@ -52,8 +52,8 @@
|
||||
|
||||
(defstate idle (final-door)
|
||||
:virtual #t
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('open)
|
||||
(go-virtual open #f)
|
||||
)
|
||||
@@ -70,24 +70,24 @@
|
||||
|
||||
(defstate open (final-door)
|
||||
:virtual #t
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(let ((v1-0 arg2))
|
||||
(the-as object (when (= v1-0 'brightness)
|
||||
(let ((f0-0 (the-as float (-> arg3 param 0)))
|
||||
(f1-0 (the-as float (-> arg3 param 1)))
|
||||
)
|
||||
(set-vector! (-> self draw color-mult) f0-0 f0-0 f0-0 f0-0)
|
||||
(let ((v0-0 (-> self draw color-emissive)))
|
||||
(set! (-> v0-0 x) f1-0)
|
||||
(set! (-> v0-0 y) f1-0)
|
||||
(set! (-> v0-0 z) f1-0)
|
||||
(set! (-> v0-0 w) f1-0)
|
||||
v0-0
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(the-as object (case event-type
|
||||
(('brightness)
|
||||
(let ((f0-0 (the-as float (-> event param 0)))
|
||||
(f1-0 (the-as float (-> event param 1)))
|
||||
)
|
||||
(set-vector! (-> self draw color-mult) f0-0 f0-0 f0-0 f0-0)
|
||||
(let ((v0-0 (-> self draw color-emissive)))
|
||||
(set! (-> v0-0 x) f1-0)
|
||||
(set! (-> v0-0 y) f1-0)
|
||||
(set! (-> v0-0 z) f1-0)
|
||||
(set! (-> v0-0 w) f1-0)
|
||||
v0-0
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
:code (behavior ((arg0 symbol))
|
||||
(case (-> self type)
|
||||
@@ -137,7 +137,7 @@
|
||||
(set! (-> obj root) s4-0)
|
||||
)
|
||||
(process-drawable-from-entity! obj arg0)
|
||||
(dummy-21 obj)
|
||||
(final-door-method-21 obj)
|
||||
(go (method-of-object obj idle))
|
||||
(none)
|
||||
)
|
||||
@@ -166,7 +166,7 @@
|
||||
(ja-post)
|
||||
(loop
|
||||
(if (and (and *target* (>= 61440.0 (vector-vector-distance (-> self root trans) (-> *target* control trans))))
|
||||
(and (zero? (logand (-> *target* state-flags) (state-flags grabbed)))
|
||||
(and (not (logtest? (-> *target* state-flags) (state-flags grabbed)))
|
||||
(and (>= (-> *game-info* fuel) 100.0)
|
||||
(not (and (-> self entity) (logtest? (-> self entity extra perm status) (entity-perm-status complete))))
|
||||
(= (get-task-status (game-task finalboss-movies)) (task-status need-reward-speech))
|
||||
@@ -188,13 +188,13 @@
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod dummy-21 power-left ((obj power-left))
|
||||
(defmethod final-door-method-21 power-left ((obj power-left))
|
||||
(initialize-skeleton obj *power-left-sg* '())
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod dummy-21 power-right ((obj power-right))
|
||||
(defmethod final-door-method-21 power-right ((obj power-right))
|
||||
(initialize-skeleton obj *power-right-sg* '())
|
||||
0
|
||||
(none)
|
||||
@@ -211,7 +211,7 @@
|
||||
:size-assert #xd4
|
||||
:flag-assert #x17007000d4
|
||||
(:methods
|
||||
(dummy-20 () none 20)
|
||||
(powercellalt-method-20 () none 20)
|
||||
(jump () _type_ :state 21)
|
||||
(idle () _type_ :state 22)
|
||||
)
|
||||
@@ -305,8 +305,8 @@
|
||||
)
|
||||
|
||||
(defstate target-final-door (target)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
((-> target-grab event) arg0 arg1 arg2 arg3)
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
((-> target-grab event) proc arg1 event-type event)
|
||||
)
|
||||
:enter (behavior ((arg0 basic) (arg1 handle))
|
||||
(send-event *camera* 'change-to-entity-by-name "camera-403")
|
||||
@@ -416,7 +416,3 @@
|
||||
)
|
||||
:post target-no-stick-post
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
:size-assert #x1d8
|
||||
:flag-assert #x4c017001d8
|
||||
(:methods
|
||||
(dummy-51 (_type_ vector) symbol :replace 51)
|
||||
(green-eco-lurker-method-51 (_type_ vector) symbol :replace 51)
|
||||
)
|
||||
(:states
|
||||
green-eco-lurker-appear
|
||||
@@ -108,7 +108,7 @@
|
||||
|
||||
(defpartgroup group-green-eco-lurker-death
|
||||
:id 643
|
||||
:duration 600
|
||||
:duration (seconds 2)
|
||||
:flags (use-local-clock)
|
||||
:bounds (static-bspherem 0 0 0 12)
|
||||
:parts ((sp-item 2585 :fade-after (meters 100) :period 600 :length 5 :binding 2583)
|
||||
@@ -296,7 +296,7 @@
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod dummy-43 green-eco-lurker ((obj green-eco-lurker) (arg0 process) (arg1 event-message-block))
|
||||
(defmethod attack-handler green-eco-lurker ((obj green-eco-lurker) (arg0 process) (arg1 event-message-block))
|
||||
(cond
|
||||
((= (-> arg0 type) target)
|
||||
(if (nav-enemy-send-attack arg0 (the-as touching-shapes-entry (-> arg1 param 0)) 'generic)
|
||||
@@ -306,7 +306,7 @@
|
||||
)
|
||||
(else
|
||||
(nav-enemy-set-hit-from-direction arg0)
|
||||
((method-of-type nav-enemy dummy-43) obj arg0 arg1)
|
||||
((method-of-type nav-enemy attack-handler) obj arg0 arg1)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -325,7 +325,7 @@
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod dummy-44 green-eco-lurker ((obj green-eco-lurker) (arg0 process) (arg1 event-message-block))
|
||||
(defmethod touch-handler green-eco-lurker ((obj green-eco-lurker) (arg0 process) (arg1 event-message-block))
|
||||
(when (and (logtest? (-> obj nav-enemy-flags) (nav-enemy-flags navenmf6))
|
||||
((method-of-type touching-shapes-entry prims-touching?)
|
||||
(the-as touching-shapes-entry (-> arg1 param 0))
|
||||
@@ -353,20 +353,20 @@
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod dummy-51 green-eco-lurker ((obj green-eco-lurker) (arg0 vector))
|
||||
(defmethod green-eco-lurker-method-51 green-eco-lurker ((obj green-eco-lurker) (arg0 vector))
|
||||
(when (or (not *target*) (>= (vector-vector-xz-distance arg0 (target-pos 0)) 36864.0))
|
||||
(let ((v1-3 (new 'stack-no-clear 'vector)))
|
||||
(set! (-> v1-3 quad) (-> arg0 quad))
|
||||
(set! (-> v1-3 w) (-> obj collide-info root-prim local-sphere w))
|
||||
)
|
||||
(if (not (TODO-RENAME-50 obj arg0))
|
||||
(if (not (nav-enemy-method-50 obj arg0))
|
||||
(return #t)
|
||||
)
|
||||
)
|
||||
#f
|
||||
)
|
||||
|
||||
(defmethod dummy-52 green-eco-lurker ((obj green-eco-lurker) (arg0 vector))
|
||||
(defmethod nav-enemy-method-52 green-eco-lurker ((obj green-eco-lurker) (arg0 vector))
|
||||
(let ((s4-0 (-> obj path curve num-cverts)))
|
||||
(when (> s4-0 0)
|
||||
(let ((s2-0 (nav-enemy-rnd-int-count s4-0))
|
||||
@@ -374,7 +374,7 @@
|
||||
)
|
||||
(while (> s3-0 0)
|
||||
(eval-path-curve-div! (-> obj path) arg0 (the float s2-0) 'interp)
|
||||
(if (dummy-51 obj arg0)
|
||||
(if (green-eco-lurker-method-51 obj arg0)
|
||||
(return #t)
|
||||
)
|
||||
(set! s2-0 (mod (+ s2-0 1) s4-0))
|
||||
@@ -410,7 +410,7 @@
|
||||
(none)
|
||||
)
|
||||
:trans (behavior ()
|
||||
(if (dummy-52 self (-> self appear-dest))
|
||||
(if (nav-enemy-method-52 self (-> self appear-dest))
|
||||
(go green-eco-lurker-appear)
|
||||
)
|
||||
(none)
|
||||
@@ -424,7 +424,7 @@
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod dummy-53 green-eco-lurker ((obj green-eco-lurker))
|
||||
(defmethod nav-enemy-method-53 green-eco-lurker ((obj green-eco-lurker))
|
||||
(the-as symbol (cond
|
||||
((and (-> obj draw shadow)
|
||||
(zero? (-> obj draw cur-lod))
|
||||
@@ -507,7 +507,7 @@
|
||||
(set! (-> self played-sound?) #t)
|
||||
(sound-play "blob-jump" :pitch (nav-enemy-rnd-float-range -0.5 0.5))
|
||||
)
|
||||
(dummy-53 self)
|
||||
(nav-enemy-method-53 self)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
@@ -749,11 +749,11 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod TODO-RENAME-48 green-eco-lurker ((obj green-eco-lurker))
|
||||
(defmethod nav-enemy-method-48 green-eco-lurker ((obj green-eco-lurker))
|
||||
(initialize-skeleton obj *green-eco-lurker-sg* '())
|
||||
(set! (-> obj draw origin-joint-index) (the-as uint 3))
|
||||
(logclear! (-> obj collide-info nav-flags) (nav-flags navf0))
|
||||
(TODO-RENAME-45 obj *green-eco-lurker-nav-enemy-info*)
|
||||
(init-defaults! obj *green-eco-lurker-nav-enemy-info*)
|
||||
(logior! (-> obj draw shadow-ctrl settings flags) (shadow-flags shdf02))
|
||||
(set! (-> obj neck up) (the-as uint 0))
|
||||
(set! (-> obj neck nose) (the-as uint 1))
|
||||
@@ -768,15 +768,15 @@
|
||||
(vector-identity! (-> self collide-info scale))
|
||||
(quaternion-identity! (-> self collide-info quat))
|
||||
(set! (-> self entity) (-> arg1 entity))
|
||||
(TODO-RENAME-48 self)
|
||||
(nav-enemy-method-48 self)
|
||||
(logclear! (-> self mask) (process-mask actor-pause))
|
||||
(go green-eco-lurker-wait-to-appear)
|
||||
(none)
|
||||
)
|
||||
|
||||
(defstate spawn-minions (green-eco-lurker-gen)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('blob-died)
|
||||
(set! (-> self num-alive) (max 0 (+ (-> self num-alive) -1)))
|
||||
(send-event (ppointer->process (-> self parent)) 'blob-died)
|
||||
@@ -831,7 +831,3 @@
|
||||
(go spawn-minions)
|
||||
(none)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -22,11 +22,11 @@
|
||||
)
|
||||
|
||||
(defstate cam-robotboss (camera-slave)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('set-pivot)
|
||||
(let ((v0-0 (the-as object (-> self pivot-pt))))
|
||||
(set! (-> (the-as vector v0-0) quad) (-> (the-as vector (-> arg3 param 0)) quad))
|
||||
(set! (-> (the-as vector v0-0) quad) (-> (the-as vector (-> event param 0)) quad))
|
||||
v0-0
|
||||
)
|
||||
)
|
||||
@@ -34,7 +34,7 @@
|
||||
#f
|
||||
)
|
||||
(else
|
||||
(cam-standard-event-handler arg0 arg1 arg2 arg3)
|
||||
(cam-standard-event-handler proc arg1 event-type event)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -53,7 +53,7 @@
|
||||
(none)
|
||||
)
|
||||
:trans (behavior ()
|
||||
(when (zero? (logand (-> *camera* master-options) 2))
|
||||
(when (not (logtest? (-> *camera* master-options) 2))
|
||||
(set! *camera-base-mode* cam-string)
|
||||
(cam-slave-go cam-free-floating)
|
||||
)
|
||||
@@ -159,68 +159,61 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
;; ERROR: Failed load: (set! a0-3 (l.wu (+ gp-1 -4))) at op 13
|
||||
;; WARN: rewrite_to_get_var got a none typed variable. Is there unreachable code? [OP: 28]
|
||||
;; WARN: rewrite_to_get_var got a none typed variable. Is there unreachable code? [OP: 79]
|
||||
(defbehavior ecoclaw-handler ecoclaw ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(let ((v1-0 arg2))
|
||||
(the-as
|
||||
object
|
||||
(cond
|
||||
((= v1-0 'open)
|
||||
(let ((gp-1 (-> arg3 param 0)))
|
||||
(set! (-> self particles 0 kind)
|
||||
(the-as basic (if (and (nonzero? gp-1) (type-type? (rtype-of gp-1) sparticle-launch-group))
|
||||
gp-1
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> self particles 0 trans quad) (-> self root trans quad))
|
||||
(let ((f0-1 (+ 12288.0 (-> self particles 0 trans y))))
|
||||
(set! (-> self particles 0 trans y) f0-1)
|
||||
f0-1
|
||||
)
|
||||
)
|
||||
((= v1-0 'beam-on)
|
||||
(let ((s5-0 (-> arg3 param 0)))
|
||||
(set! (-> self particles 1 kind)
|
||||
(the-as basic (if (and (nonzero? s5-0) (type-type? (rtype-of s5-0) sparticle-launch-group))
|
||||
s5-0
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> self particles 1 trans quad) (-> self root trans quad))
|
||||
(set! (-> self particles 1 trans y) (+ 24576.0 (-> self particles 1 trans y)))
|
||||
(let ((s5-1 (-> arg3 param 1)))
|
||||
(set! (-> self particles 2 kind)
|
||||
(the-as basic (if (and (nonzero? s5-1) (type-type? (rtype-of s5-1) sparticle-launch-group))
|
||||
s5-1
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> self particles 2 trans quad) (-> (the-as vector (-> arg3 param 2)) quad))
|
||||
(let ((f0-5 (+ 81920.0 (-> self particles 2 trans y))))
|
||||
(set! (-> self particles 2 trans y) f0-5)
|
||||
f0-5
|
||||
)
|
||||
)
|
||||
((= v1-0 'beam-off)
|
||||
(set! (-> self particles 1 kind) #f)
|
||||
(set! (-> self particles 2 kind) #f)
|
||||
(let ((a0-10 (handle->process (-> self particles 1 tracker))))
|
||||
(if a0-10
|
||||
(deactivate a0-10)
|
||||
(the-as
|
||||
object
|
||||
(case arg2
|
||||
(('open)
|
||||
(let ((gp-1 (-> arg3 param 0)))
|
||||
(set! (-> self particles 0 kind)
|
||||
(the-as basic (if (and (nonzero? gp-1) (type-type? (rtype-of gp-1) sparticle-launch-group))
|
||||
gp-1
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((a0-14 (handle->process (-> self particles 2 tracker))))
|
||||
(if a0-14
|
||||
(deactivate a0-14)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> self particles 0 trans quad) (-> self root trans quad))
|
||||
(set! (-> self particles 0 trans y) (+ 12288.0 (-> self particles 0 trans y)))
|
||||
)
|
||||
(('beam-on)
|
||||
(let ((s5-0 (-> arg3 param 0)))
|
||||
(set! (-> self particles 1 kind)
|
||||
(the-as basic (if (and (nonzero? s5-0) (type-type? (rtype-of s5-0) sparticle-launch-group))
|
||||
s5-0
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> self particles 1 trans quad) (-> self root trans quad))
|
||||
(set! (-> self particles 1 trans y) (+ 24576.0 (-> self particles 1 trans y)))
|
||||
(let ((s5-1 (-> arg3 param 1)))
|
||||
(set! (-> self particles 2 kind)
|
||||
(the-as basic (if (and (nonzero? s5-1) (type-type? (rtype-of s5-1) sparticle-launch-group))
|
||||
s5-1
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> self particles 2 trans quad) (-> (the-as vector (-> arg3 param 2)) quad))
|
||||
(set! (-> self particles 2 trans y) (+ 81920.0 (-> self particles 2 trans y)))
|
||||
)
|
||||
(('beam-off)
|
||||
(set! (-> self particles 1 kind) #f)
|
||||
(set! (-> self particles 2 kind) #f)
|
||||
(let ((a0-10 (handle->process (-> self particles 1 tracker))))
|
||||
(if a0-10
|
||||
(deactivate a0-10)
|
||||
)
|
||||
)
|
||||
(let ((a0-14 (handle->process (-> self particles 2 tracker))))
|
||||
(if a0-14
|
||||
(deactivate a0-14)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -319,13 +312,10 @@
|
||||
|
||||
(defstate idle (silodoor)
|
||||
:virtual #t
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('open)
|
||||
(let ((f0-0 (the-as float (-> arg3 param 0))))
|
||||
(set! (-> self part-opened) f0-0)
|
||||
f0-0
|
||||
)
|
||||
(set! (-> self part-opened) (the-as float (-> event param 0)))
|
||||
)
|
||||
(('hide)
|
||||
(go-virtual hidden)
|
||||
@@ -523,13 +513,9 @@
|
||||
|
||||
(defbehavior finalbosscam-init-by-other finalbosscam ((arg0 entity-actor))
|
||||
(set! (-> self entity) arg0)
|
||||
(dummy-40 self arg0 *finalbosscam-sg* 4 4 (new 'static 'vector :w 4096.0) 4)
|
||||
(process-taskable-method-40 self arg0 *finalbosscam-sg* 4 4 (new 'static 'vector :w 4096.0) 4)
|
||||
(set! (-> self tasks) (get-task-control (game-task finalboss-movies)))
|
||||
(set! (-> self robotboss) (the-as handle #f))
|
||||
(go-virtual hidden)
|
||||
(none)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -21,15 +21,15 @@
|
||||
:size-assert #x28
|
||||
:flag-assert #xd00000028
|
||||
(:methods
|
||||
(dummy-9 (_type_ vector) none 9)
|
||||
(TODO-RENAME-10 (_type_ collide-prim-core vector) symbol 10)
|
||||
(dummy-11 (_type_ vector) symbol 11)
|
||||
(dummy-12 (_type_ vector) vector 12)
|
||||
(torus-method-9 (_type_ vector) none 9)
|
||||
(torus-method-10 (_type_ collide-prim-core vector) symbol 10)
|
||||
(torus-method-11 (_type_ vector) symbol 11)
|
||||
(torus-method-12 (_type_ vector) vector 12)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(defmethod TODO-RENAME-10 torus ((obj torus) (arg0 collide-prim-core) (arg1 vector))
|
||||
(defmethod torus-method-10 torus ((obj torus) (arg0 collide-prim-core) (arg1 vector))
|
||||
(let ((gp-0 (new 'stack-no-clear 'vector))
|
||||
(s5-0 (new 'stack-no-clear 'vector))
|
||||
(f30-0 (+ (-> obj radius-secondary) (-> arg0 world-sphere w)))
|
||||
@@ -42,16 +42,16 @@
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod dummy-11 torus ((obj torus) (arg0 vector))
|
||||
(defmethod torus-method-11 torus ((obj torus) (arg0 vector))
|
||||
(let ((s4-0 (the-as collide-shape-prim-group (-> *target* control root-prim))))
|
||||
(when (and (logtest? (-> s4-0 prim-core collide-as) (collide-kind target))
|
||||
(TODO-RENAME-10 obj (-> s4-0 prim-core) arg0)
|
||||
(torus-method-10 obj (-> s4-0 prim-core) arg0)
|
||||
)
|
||||
(countdown (s3-0 (-> s4-0 num-prims))
|
||||
(let ((v1-9 (-> s4-0 prims s3-0)))
|
||||
(if (and (logtest? (-> v1-9 prim-core action) (collide-action solid))
|
||||
(logtest? (-> v1-9 prim-core collide-as) (collide-kind target))
|
||||
(TODO-RENAME-10 obj (-> v1-9 prim-core) arg0)
|
||||
(torus-method-10 obj (-> v1-9 prim-core) arg0)
|
||||
)
|
||||
(return #t)
|
||||
)
|
||||
@@ -71,7 +71,7 @@
|
||||
)
|
||||
|
||||
|
||||
(defmethod dummy-9 torus ((obj torus) (arg0 vector))
|
||||
(defmethod torus-method-9 torus ((obj torus) (arg0 vector))
|
||||
(local-vars (sv-256 int) (sv-272 int) (sv-288 int))
|
||||
(let ((s0-0 (new 'stack-no-clear 'vector))
|
||||
(s4-0 (new 'stack-no-clear 'vector))
|
||||
@@ -121,7 +121,7 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod dummy-12 torus ((obj torus) (arg0 vector))
|
||||
(defmethod torus-method-12 torus ((obj torus) (arg0 vector))
|
||||
(let* ((f30-0 65536.0)
|
||||
(v1-1 (/ (the-as int (rand-uint31-gen *random-generator*)) 256))
|
||||
(v1-2 (the-as number (logior #x3f800000 v1-1)))
|
||||
@@ -179,10 +179,7 @@
|
||||
)
|
||||
(set! (-> self y-vel) (* 0.5 (- (sqrtf (- (* f0-6 f0-6) (* 4.0 f3-1))) f0-6)))
|
||||
)
|
||||
(let ((f0-12 (/ (- (* (-> self y-vel) (-> self y-vel))) (* 2.0 v1-2))))
|
||||
(set! (-> self grav) f0-12)
|
||||
f0-12
|
||||
)
|
||||
(set! (-> self grav) (/ (- (* (-> self y-vel) (-> self y-vel))) (* 2.0 v1-2)))
|
||||
)
|
||||
)
|
||||
|
||||
@@ -191,10 +188,7 @@
|
||||
(vector-lerp! arg0 (-> self from) (-> self to) s5-0)
|
||||
(set! (-> arg0 y) (-> self from y))
|
||||
(+! (-> arg0 y) (* (-> self y-vel) s5-0))
|
||||
(let ((f0-6 (+ (-> arg0 y) (* 0.5 s5-0 s5-0 (-> self grav)))))
|
||||
(set! (-> arg0 y) f0-6)
|
||||
f0-6
|
||||
)
|
||||
(set! (-> arg0 y) (+ (-> arg0 y) (* 0.5 s5-0 s5-0 (-> self grav))))
|
||||
)
|
||||
)
|
||||
|
||||
@@ -661,7 +655,7 @@
|
||||
(* 204.8 (the float (- (-> *display* game-frame-counter) (-> self state-time))))
|
||||
)
|
||||
(let ((gp-0 (new 'stack-no-clear 'vector)))
|
||||
(when (dummy-11 (-> self ring) gp-0)
|
||||
(when (torus-method-11 (-> self ring) gp-0)
|
||||
(vector-normalize! gp-0 16384.0)
|
||||
(send-event *target* 'attack #f (static-attack-info ((vector gp-0))))
|
||||
(send-event (ppointer->process (-> self parent)) 'hit-jak)
|
||||
@@ -669,7 +663,7 @@
|
||||
)
|
||||
(dotimes (gp-1 5)
|
||||
(let ((s5-0 (new 'stack-no-clear 'vector)))
|
||||
(dummy-12 (-> self ring) s5-0)
|
||||
(torus-method-12 (-> self ring) s5-0)
|
||||
(spawn (-> self test-particle) s5-0)
|
||||
)
|
||||
)
|
||||
@@ -808,11 +802,11 @@
|
||||
|
||||
|
||||
(defstate yellowshot-idle (yellowshot)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('touch 'attack)
|
||||
(when (= (-> arg0 type) target)
|
||||
(send-event *target* 'attack (-> arg3 param 0) (static-attack-info ((mode 'generic))))
|
||||
(when (= (-> proc type) target)
|
||||
(send-event *target* 'attack (-> event param 0) (static-attack-info ((mode 'generic))))
|
||||
(send-event (ppointer->process (-> self parent)) 'hit-jak)
|
||||
)
|
||||
)
|
||||
@@ -871,7 +865,3 @@
|
||||
(go yellowshot-idle)
|
||||
(none)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -392,41 +392,36 @@
|
||||
)
|
||||
|
||||
(defbehavior robotboss-handler robotboss ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(let ((v1-0 arg2))
|
||||
(the-as object (cond
|
||||
((= v1-0 'flash)
|
||||
(let ((f0-1 (* 0.0078125 (the-as float (-> arg3 param 0)))))
|
||||
(set! (-> self palette-val) f0-1)
|
||||
f0-1
|
||||
)
|
||||
)
|
||||
((= v1-0 'attack)
|
||||
(when (>= arg1 2)
|
||||
(case (-> arg3 param 1)
|
||||
(('eco-yellow)
|
||||
(let ((a0-5 (-> arg3 param 0)))
|
||||
(when (and a0-5 ((method-of-type touching-shapes-entry prims-touching?)
|
||||
(the-as touching-shapes-entry a0-5)
|
||||
(-> self root-override)
|
||||
(the-as uint (-> self vulnerable))
|
||||
)
|
||||
)
|
||||
(when (> (-> self hits-to-go) 0)
|
||||
(set! (-> self took-hit) #t)
|
||||
(let ((v0-0 (the-as number (+ (-> self hits-to-go) -1))))
|
||||
(set! (-> self hits-to-go) (the-as int v0-0))
|
||||
v0-0
|
||||
)
|
||||
(the-as object (case arg2
|
||||
(('flash)
|
||||
(set! (-> self palette-val) (* 0.0078125 (the-as float (-> arg3 param 0))))
|
||||
)
|
||||
(('attack)
|
||||
(when (>= arg1 2)
|
||||
(case (-> arg3 param 1)
|
||||
(('eco-yellow)
|
||||
(let ((a0-5 (-> arg3 param 0)))
|
||||
(when (and a0-5 ((method-of-type touching-shapes-entry prims-touching?)
|
||||
(the-as touching-shapes-entry a0-5)
|
||||
(-> self root-override)
|
||||
(the-as uint (-> self vulnerable))
|
||||
)
|
||||
)
|
||||
(when (> (-> self hits-to-go) 0)
|
||||
(set! (-> self took-hit) #t)
|
||||
(let ((v0-0 (the-as number (+ (-> self hits-to-go) -1))))
|
||||
(set! (-> self hits-to-go) (the-as int v0-0))
|
||||
v0-0
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(defstate robotboss-yellow-dark-bomb-wait (robotboss)
|
||||
@@ -452,7 +447,7 @@
|
||||
)
|
||||
)
|
||||
(cleanup-for-death self)
|
||||
(deactivate self)
|
||||
(the-as object (deactivate self))
|
||||
)
|
||||
(else
|
||||
(robotboss-bomb-handler proc arg1 event-type event)
|
||||
@@ -2625,7 +2620,13 @@
|
||||
)
|
||||
(robotboss-blue-beam 8 #t)
|
||||
(robotboss-blue-beam 9 #f)
|
||||
(when (TODO-RENAME-10 (-> self ambient) (new 'stack-no-clear 'vector) (seconds 10) (the-as float 327680.0) self)
|
||||
(when (ambient-control-method-10
|
||||
(-> self ambient)
|
||||
(new 'stack-no-clear 'vector)
|
||||
(seconds 10)
|
||||
(the-as float 327680.0)
|
||||
self
|
||||
)
|
||||
(let ((f0-2 (rand-float-gen)))
|
||||
(cond
|
||||
((< 0.8 f0-2)
|
||||
@@ -2941,7 +2942,7 @@
|
||||
(set! (-> obj blue-smoke) #f)
|
||||
(set! (-> obj red-smoke) #f)
|
||||
(set! (-> obj yellow-smoke) #f)
|
||||
(dummy-9 (-> obj ambient))
|
||||
(ambient-control-method-9 (-> obj ambient))
|
||||
(set! (-> obj yellow-gun) (new 'process 'joint-mod (joint-mod-handler-mode flex-blend) obj 16))
|
||||
(set-vector! (-> obj yellow-gun twist-max) 8192.0 8192.0 0.0 1.0)
|
||||
(set! (-> obj yellow-gun up) (the-as uint 1))
|
||||
|
||||
@@ -59,7 +59,7 @@
|
||||
*plat-eco-finalboss-lit-sg*
|
||||
)
|
||||
|
||||
(defmethod dummy-26 plat-eco-finalboss ((obj plat-eco-finalboss))
|
||||
(defmethod baseplat-method-26 plat-eco-finalboss ((obj plat-eco-finalboss))
|
||||
(set! (-> obj force-dest) -1.0)
|
||||
(set! (-> obj targ-dest) -1.0)
|
||||
(set! (-> obj dest) 0.0)
|
||||
@@ -71,14 +71,11 @@
|
||||
|
||||
(defstate plat-path-active (plat-eco-finalboss)
|
||||
:virtual #t
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('target)
|
||||
(process-entity-status! self (entity-perm-status complete) #t)
|
||||
(let ((f0-0 (the-as float (-> arg3 param 0))))
|
||||
(set! (-> self force-dest) f0-0)
|
||||
f0-0
|
||||
)
|
||||
(set! (-> self force-dest) (the-as float (-> event param 0)))
|
||||
)
|
||||
(('ridden 'edge-grabbed)
|
||||
(if (>= (- (-> *display* base-frame-counter) (-> self touch-time)) (seconds 2))
|
||||
@@ -100,7 +97,7 @@
|
||||
#f
|
||||
)
|
||||
(else
|
||||
(plat-event arg0 arg1 arg2 arg3)
|
||||
(plat-event proc arg1 event-type event)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -272,7 +269,7 @@
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod dummy-45 sage-finalboss ((obj sage-finalboss))
|
||||
(defmethod process-taskable-method-45 sage-finalboss ((obj sage-finalboss))
|
||||
(let ((s5-0 (entity-by-name "assistant-lavatube-end-3")))
|
||||
(the-as
|
||||
symbol
|
||||
@@ -394,7 +391,7 @@
|
||||
(set-yaw-angle-clear-roll-pitch! (-> obj root-override) 0.0)
|
||||
(close-current! (-> obj tasks))
|
||||
(play-reminder obj)
|
||||
(dummy-45 obj)
|
||||
(process-taskable-method-45 obj)
|
||||
(set! (-> obj kick-the-credits) #t)
|
||||
(set! (-> obj robotplat)
|
||||
(ppointer->handle
|
||||
@@ -448,7 +445,7 @@
|
||||
(when arg0
|
||||
(set-yaw-angle-clear-roll-pitch! (-> obj root-override) -13116.667)
|
||||
(close-current! (-> obj tasks))
|
||||
(dummy-45 obj)
|
||||
(process-taskable-method-45 obj)
|
||||
(send-event *camera* 'teleport)
|
||||
(set-setting! 'allow-progress #f 0.0 0)
|
||||
)
|
||||
@@ -496,7 +493,7 @@
|
||||
(when arg0
|
||||
(set-yaw-angle-clear-roll-pitch! (-> obj root-override) -13116.667)
|
||||
(close-current! (-> obj tasks))
|
||||
(dummy-45 obj)
|
||||
(process-taskable-method-45 obj)
|
||||
(set! (-> obj left-door) (the-as entity-actor (entity-by-name "power-left-2")))
|
||||
(set! (-> obj right-door) (the-as entity-actor (entity-by-name "power-right-2")))
|
||||
(set-setting! 'allow-progress #f 0.0 0)
|
||||
@@ -568,28 +565,22 @@
|
||||
|
||||
(defstate play-anim (sage-finalboss)
|
||||
:virtual #t
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('fade)
|
||||
(let ((f0-0 1.0))
|
||||
(set! (-> self credit-fade) f0-0)
|
||||
f0-0
|
||||
)
|
||||
(set! (-> self credit-fade) 1.0)
|
||||
)
|
||||
(('flash)
|
||||
(let ((f0-1 1.9921875))
|
||||
(set! (-> self palette-val) f0-1)
|
||||
f0-1
|
||||
)
|
||||
(set! (-> self palette-val) 1.9921875)
|
||||
)
|
||||
(('activate-particle)
|
||||
(let ((v0-0 (the-as object #t)))
|
||||
(set! (-> self particle (-> arg3 param 0) active) (the-as symbol v0-0))
|
||||
(set! (-> self particle (-> event param 0) active) (the-as symbol v0-0))
|
||||
v0-0
|
||||
)
|
||||
)
|
||||
(('deactivate-particle)
|
||||
(set! (-> self particle (-> arg3 param 0) active) #f)
|
||||
(set! (-> self particle (-> event param 0) active) #f)
|
||||
#f
|
||||
)
|
||||
)
|
||||
@@ -600,15 +591,6 @@
|
||||
(none)
|
||||
)
|
||||
:exit (behavior ()
|
||||
(#when PC_PORT
|
||||
(when (and (= (get-response (-> self query)) 'no) (or (not (= *cheat-mode* 'debug)) (not (cpad-hold? 0 r1))))
|
||||
(case (current-status (-> self tasks))
|
||||
(((task-status need-reminder-a))
|
||||
(close-specific-task! (game-task finalboss-movies) (task-status need-reminder-a))
|
||||
(set! (-> self kick-the-credits) #t)
|
||||
)
|
||||
))
|
||||
)
|
||||
(when (= (current-status (-> self tasks)) (task-status invalid))
|
||||
(cond
|
||||
((not (-> self credits-played))
|
||||
@@ -1027,7 +1009,7 @@
|
||||
)
|
||||
|
||||
(defmethod init-from-entity! sage-finalboss ((obj sage-finalboss) (arg0 entity-actor))
|
||||
(dummy-40 obj arg0 *sage-finalboss-sg* 3 40 (new 'static 'vector :w 4096.0) 5)
|
||||
(process-taskable-method-40 obj arg0 *sage-finalboss-sg* 3 40 (new 'static 'vector :w 4096.0) 5)
|
||||
(set! (-> obj tasks) (get-task-control (game-task finalboss-movies)))
|
||||
(set! (-> obj redsage) (the-as handle #f))
|
||||
(set! (-> obj bluesage) (the-as handle #f))
|
||||
@@ -1066,7 +1048,3 @@
|
||||
)
|
||||
(none)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -258,13 +258,9 @@
|
||||
)
|
||||
|
||||
(defmethod init-from-entity! assistant-firecanyon ((obj assistant-firecanyon) (arg0 entity-actor))
|
||||
(dummy-40 obj arg0 *assistant-firecanyon-sg* 3 29 (new 'static 'vector :w 4096.0) 5)
|
||||
(process-taskable-method-40 obj arg0 *assistant-firecanyon-sg* 3 29 (new 'static 'vector :w 4096.0) 5)
|
||||
(set! (-> obj tasks) (get-task-control (game-task firecanyon-assistant)))
|
||||
(first-any (-> obj tasks) #t)
|
||||
(dummy-42 obj)
|
||||
(process-taskable-method-42 obj)
|
||||
(none)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1297,7 +1297,7 @@
|
||||
(if (and (logtest? (-> self water flags) (water-flags wt09))
|
||||
(zero? (mod (- (-> *display* base-frame-counter) (-> self state-time)) 21))
|
||||
)
|
||||
(dummy-13
|
||||
(create-splash
|
||||
(-> self water)
|
||||
(the-as float 0.6)
|
||||
(vector<-cspace! (new 'stack-no-clear 'vector) (-> self node-list data 37))
|
||||
@@ -1565,7 +1565,7 @@
|
||||
(set! (-> self control unknown-dword33) 0)
|
||||
(set! (-> self control unknown-surface00) *flut-air-attack-mods*)
|
||||
(sound-play "flop-land" :pitch -0.4)
|
||||
(dummy-10 (-> self skel effect) 'group-flut-attack-strike-ground (ja-frame-num 0) 0)
|
||||
(effect-control-method-10 (-> self skel effect) 'group-flut-attack-strike-ground (ja-frame-num 0) 0)
|
||||
(let ((gp-2 (process-spawn touch-tracker :init touch-tracker-init (-> self control trans) 4096.0 30 :to self)))
|
||||
(send-event (ppointer->process gp-2) 'event 'attack 'flut-attack)
|
||||
(send-event (ppointer->process gp-2) 'function (lambda :behavior target
|
||||
|
||||
@@ -97,10 +97,10 @@
|
||||
)
|
||||
|
||||
(defmethod init-from-entity! evilbro ((obj evilbro) (arg0 entity-actor))
|
||||
(dummy-40 obj arg0 *evilbro-intro-sg* 3 40 (new 'static 'vector :w 4096.0) 5)
|
||||
(process-taskable-method-40 obj arg0 *evilbro-intro-sg* 3 40 (new 'static 'vector :w 4096.0) 5)
|
||||
(set! (-> obj tasks) (get-task-control (game-task leaving-misty)))
|
||||
(set! (-> obj evilsis) (entity-actor-lookup arg0 'alt-actor 0))
|
||||
(dummy-42 obj)
|
||||
(process-taskable-method-42 obj)
|
||||
(none)
|
||||
)
|
||||
|
||||
@@ -145,12 +145,8 @@
|
||||
)
|
||||
|
||||
(defmethod init-from-entity! evilsis ((obj evilsis) (arg0 entity-actor))
|
||||
(dummy-40 obj arg0 *evilsis-intro-sg* 3 0 (new 'static 'vector :w 4096.0) 5)
|
||||
(process-taskable-method-40 obj arg0 *evilsis-intro-sg* 3 0 (new 'static 'vector :w 4096.0) 5)
|
||||
(set! (-> obj tasks) (get-task-control (game-task leaving-misty)))
|
||||
(dummy-42 obj)
|
||||
(process-taskable-method-42 obj)
|
||||
(none)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -33,8 +33,8 @@
|
||||
|
||||
(defpartgroup group-bad-fish
|
||||
:id 177
|
||||
:duration 5
|
||||
:linger-duration 450
|
||||
:duration (seconds 0.017)
|
||||
:linger-duration (seconds 1.5)
|
||||
:flags (use-local-clock)
|
||||
:bounds (static-bspherem 0 0 0 2)
|
||||
:parts ((sp-item 828) (sp-item 2013))
|
||||
@@ -84,8 +84,8 @@
|
||||
|
||||
(defpartgroup group-normal-fish
|
||||
:id 178
|
||||
:duration 5
|
||||
:linger-duration 450
|
||||
:duration (seconds 0.017)
|
||||
:linger-duration (seconds 1.5)
|
||||
:flags (use-local-clock)
|
||||
:bounds (static-bspherem 0 0 0 2)
|
||||
:parts ((sp-item 2001))
|
||||
@@ -111,8 +111,8 @@
|
||||
|
||||
(defpartgroup group-fish-collect
|
||||
:id 179
|
||||
:duration 5
|
||||
:linger-duration 1200
|
||||
:duration (seconds 0.017)
|
||||
:linger-duration (seconds 4)
|
||||
:flags (use-local-clock)
|
||||
:bounds (static-bspherem 0 0 0 8)
|
||||
:parts ((sp-item 830) (sp-item 831))
|
||||
@@ -802,7 +802,7 @@
|
||||
:shadow fisher-shadow-mg
|
||||
)
|
||||
|
||||
(defmethod dummy-52 fisher ((obj fisher))
|
||||
(defmethod process-taskable-method-52 fisher ((obj fisher))
|
||||
(let ((v1-1 (-> obj draw shadow-ctrl)))
|
||||
(when v1-1
|
||||
(let ((f0-0 (-> obj root-override trans y)))
|
||||
@@ -862,7 +862,7 @@
|
||||
(defbehavior fisher-fish-move fisher-fish ()
|
||||
(+! (-> self pos) (* (-> self vel) (-> *display* seconds-per-frame)))
|
||||
(eval-path-curve-div! (-> (the-as fisher (-> self parent 0)) path) (-> self root trans) (-> self pos) 'interp)
|
||||
(TODO-RENAME-12 (-> (the-as fisher (-> self parent 0)) path) (-> self dir) (-> self pos))
|
||||
(path-control-method-12 (-> (the-as fisher (-> self parent 0)) path) (-> self dir) (-> self pos))
|
||||
(seek-toward-heading-vec! (-> self root) (-> self dir) 291271.12 (seconds 0.2))
|
||||
(let ((f30-1 (+ 16384.0 (y-angle (-> self root))))
|
||||
(gp-0 (new-stack-vector0))
|
||||
@@ -886,7 +886,7 @@
|
||||
:code (behavior ()
|
||||
(set-heading-vec!
|
||||
(-> self root)
|
||||
(TODO-RENAME-12 (-> (the-as fisher (-> self parent 0)) path) (-> self dir) (-> self pos))
|
||||
(path-control-method-12 (-> (the-as fisher (-> self parent 0)) path) (-> self dir) (-> self pos))
|
||||
)
|
||||
(loop
|
||||
(ja-no-eval :group! (ja-group) :num! (seek!) :frame-num 0.0)
|
||||
@@ -1183,7 +1183,7 @@
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod dummy-38 fisher ((obj fisher))
|
||||
(defmethod process-taskable-method-38 fisher ((obj fisher))
|
||||
(case (current-status (-> obj tasks))
|
||||
(((task-status need-reminder-a) (task-status need-reminder))
|
||||
(go (method-of-object obj query))
|
||||
@@ -1508,18 +1508,18 @@
|
||||
)
|
||||
|
||||
(defstate fisher-playing (fisher)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(local-vars (v0-2 object))
|
||||
(case arg2
|
||||
(case event-type
|
||||
(('fisher-fish-die)
|
||||
(sound-play "fish-miss")
|
||||
(set! v0-2 (+ (-> self missed) (-> arg3 param 0)))
|
||||
(set! v0-2 (+ (-> self missed) (-> event param 0)))
|
||||
(set! (-> self missed) (the-as int v0-2))
|
||||
v0-2
|
||||
)
|
||||
(('fisher-fish-caught)
|
||||
(send-event *target* 'bounce)
|
||||
(set! v0-2 (+ (-> self caught) (-> arg3 param 0)))
|
||||
(set! v0-2 (+ (-> self caught) (-> event param 0)))
|
||||
(set! (-> self caught) (the-as int v0-2))
|
||||
v0-2
|
||||
)
|
||||
@@ -1689,16 +1689,16 @@
|
||||
)
|
||||
:exit (behavior ()
|
||||
(#when PC_PORT
|
||||
;; needed for cutscene skipping
|
||||
;; needed for cutscene skipping
|
||||
(set! (-> self cur-trans-hook) nothing)
|
||||
)
|
||||
((-> (method-of-type process-taskable play-anim) exit)))
|
||||
)
|
||||
|
||||
(defmethod TODO-RENAME-43 fisher ((obj fisher))
|
||||
(defmethod process-taskable-method-43 fisher ((obj fisher))
|
||||
(cond
|
||||
((closed? (-> obj tasks) (game-task jungle-fishgame) (task-status need-reminder))
|
||||
(when (TODO-RENAME-10 (-> obj ambient) (new 'stack-no-clear 'vector) (seconds 1) 122880.0 obj)
|
||||
(when (ambient-control-method-10 (-> obj ambient) (new 'stack-no-clear 'vector) (seconds 1) 122880.0 obj)
|
||||
(let ((f0-2 (rand-float-gen)))
|
||||
(if (< 0.5 f0-2)
|
||||
(play-ambient (-> obj ambient) "FIS-LO03" #f (-> obj root-override trans))
|
||||
@@ -1708,7 +1708,7 @@
|
||||
)
|
||||
)
|
||||
(else
|
||||
(when (TODO-RENAME-10 (-> obj ambient) (new 'stack-no-clear 'vector) (seconds 30) 122880.0 obj)
|
||||
(when (ambient-control-method-10 (-> obj ambient) (new 'stack-no-clear 'vector) (seconds 30) 122880.0 obj)
|
||||
(let ((f0-5 (rand-float-gen)))
|
||||
(cond
|
||||
((< 0.875 f0-5)
|
||||
@@ -1744,31 +1744,29 @@
|
||||
|
||||
(defstate play-accept (fisher)
|
||||
:virtual #t
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(local-vars (v0-0 rgbaf))
|
||||
(let ((v1-0 arg2))
|
||||
(the-as object (cond
|
||||
((= v1-0 'emissive-on)
|
||||
(set-vector! (-> self draw color-mult) 0.6 0.6 0.6 1.0)
|
||||
(set! v0-0 (-> self draw color-emissive))
|
||||
(set! (-> v0-0 x) 0.6)
|
||||
(set! (-> v0-0 y) 0.6)
|
||||
(set! (-> v0-0 z) 0.6)
|
||||
(set! (-> v0-0 w) 0.0)
|
||||
v0-0
|
||||
)
|
||||
((= v1-0 'emissive-off)
|
||||
(set-vector! (-> self draw color-mult) 1.0 1.0 1.0 1.0)
|
||||
(set! v0-0 (-> self draw color-emissive))
|
||||
(set! (-> v0-0 x) 0.0)
|
||||
(set! (-> v0-0 y) 0.0)
|
||||
(set! (-> v0-0 z) 0.0)
|
||||
(set! (-> v0-0 w) 0.0)
|
||||
v0-0
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(the-as object (case event-type
|
||||
(('emissive-on)
|
||||
(set-vector! (-> self draw color-mult) 0.6 0.6 0.6 1.0)
|
||||
(set! v0-0 (-> self draw color-emissive))
|
||||
(set! (-> v0-0 x) 0.6)
|
||||
(set! (-> v0-0 y) 0.6)
|
||||
(set! (-> v0-0 z) 0.6)
|
||||
(set! (-> v0-0 w) 0.0)
|
||||
v0-0
|
||||
)
|
||||
(('emissive-off)
|
||||
(set-vector! (-> self draw color-mult) 1.0 1.0 1.0 1.0)
|
||||
(set! v0-0 (-> self draw color-emissive))
|
||||
(set! (-> v0-0 x) 0.0)
|
||||
(set! (-> v0-0 y) 0.0)
|
||||
(set! (-> v0-0 z) 0.0)
|
||||
(set! (-> v0-0 w) 0.0)
|
||||
v0-0
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
:trans (behavior ()
|
||||
(when (-> self training)
|
||||
@@ -1929,7 +1927,7 @@
|
||||
(countdown (gp-1 (+ (the int (* f30-0 (+ -1.0 (the-as float v1-10)))) 5))
|
||||
(ja-no-eval :group! (ja-group) :num! (seek!) :frame-num 0.0)
|
||||
(until (ja-done? 0)
|
||||
(TODO-RENAME-43 self)
|
||||
(process-taskable-method-43 self)
|
||||
(suspend)
|
||||
(ja :num! (seek!))
|
||||
)
|
||||
@@ -1938,7 +1936,7 @@
|
||||
(when (ja-group? fisher-idle-more-often-ja)
|
||||
(ja-no-eval :group! fisher-idle-less-often-ja :num! (seek!) :frame-num 0.0)
|
||||
(until (ja-done? 0)
|
||||
(TODO-RENAME-43 self)
|
||||
(process-taskable-method-43 self)
|
||||
(suspend)
|
||||
(ja :num! (seek!))
|
||||
)
|
||||
@@ -1989,12 +1987,12 @@
|
||||
)
|
||||
|
||||
(defmethod init-from-entity! fisher ((obj fisher) (arg0 entity-actor))
|
||||
(dummy-40 obj arg0 *fisher-sg* 3 49 (new 'static 'vector :w 4096.0) 33)
|
||||
(process-taskable-method-40 obj arg0 *fisher-sg* 3 49 (new 'static 'vector :w 4096.0) 33)
|
||||
(set! (-> obj tasks) (get-task-control (game-task jungle-fishgame)))
|
||||
(set! (-> obj path) (new 'process 'curve-control obj 'path -1000000000.0))
|
||||
(logior! (-> obj path flags) (path-control-flag display draw-line draw-point draw-text))
|
||||
(let ((s5-0 (eval-path-curve-div! (-> obj path) (-> obj paddle-pos) 6.5 'interp))
|
||||
(s4-0 (TODO-RENAME-12 (-> obj path) (new-stack-vector0) 6.5))
|
||||
(s4-0 (path-control-method-12 (-> obj path) (new-stack-vector0) 6.5))
|
||||
)
|
||||
(set! (-> s5-0 y) (+ 2457.6 (-> s5-0 y)))
|
||||
(vector-normalize! (vector-rotate-y! s4-0 s4-0 16384.0) (-> *FISHER-bank* width))
|
||||
@@ -2006,23 +2004,23 @@
|
||||
(set! (-> obj hard) #f)
|
||||
(set! (-> *FISHER-bank* max-caught) 200)
|
||||
(set! (-> obj training) #f)
|
||||
(dummy-42 obj)
|
||||
(process-taskable-method-42 obj)
|
||||
(none)
|
||||
)
|
||||
|
||||
(defstate target-fishing (target)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(cond
|
||||
((= arg2 'bounce)
|
||||
((= event-type 'bounce)
|
||||
(set-zero! (-> self control unknown-smush00))
|
||||
(activate! (-> self control unknown-smush00) 1.0 120 210 0.3 1.0)
|
||||
)
|
||||
((= arg2 'lose)
|
||||
(set! (-> self control unknown-uint20) (the-as uint arg2))
|
||||
arg2
|
||||
((= event-type 'lose)
|
||||
(set! (-> self control unknown-uint20) (the-as uint event-type))
|
||||
event-type
|
||||
)
|
||||
(else
|
||||
((-> target-grab event) arg0 arg1 arg2 arg3)
|
||||
((-> target-grab event) proc arg1 event-type event)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -2145,7 +2143,3 @@
|
||||
)
|
||||
:post target-post
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -99,7 +99,7 @@ nav-enemy-default-event-handler
|
||||
)
|
||||
|
||||
(defbehavior hopper-do-jump hopper ()
|
||||
(dummy-11 (-> self nav) (-> self nav target-pos))
|
||||
(nav-control-method-11 (-> self nav) (-> self nav target-pos))
|
||||
(if (< (-> self jump-length) (vector-length (-> self nav travel)))
|
||||
(vector-normalize! (-> self nav travel) (-> self jump-length))
|
||||
)
|
||||
@@ -142,7 +142,7 @@ nav-enemy-default-event-handler
|
||||
nav-enemy-jump-event-handler
|
||||
)
|
||||
:trans (behavior ()
|
||||
(if (zero? (logand (-> self nav-enemy-flags) (nav-enemy-flags enable-rotate)))
|
||||
(if (not (logtest? (-> self nav-enemy-flags) (nav-enemy-flags enable-rotate)))
|
||||
((-> (method-of-type nav-enemy nav-enemy-patrol) trans))
|
||||
)
|
||||
(none)
|
||||
@@ -213,7 +213,7 @@ nav-enemy-default-event-handler
|
||||
nav-enemy-jump-event-handler
|
||||
)
|
||||
:trans (behavior ()
|
||||
(if (zero? (logand (-> self nav-enemy-flags) (nav-enemy-flags enable-rotate)))
|
||||
(if (not (logtest? (-> self nav-enemy-flags) (nav-enemy-flags enable-rotate)))
|
||||
((-> (method-of-type nav-enemy nav-enemy-chase) trans))
|
||||
)
|
||||
(none)
|
||||
@@ -365,14 +365,10 @@ nav-enemy-default-event-handler
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod TODO-RENAME-48 hopper ((obj hopper))
|
||||
(defmethod nav-enemy-method-48 hopper ((obj hopper))
|
||||
(initialize-skeleton obj *hopper-sg* '())
|
||||
(TODO-RENAME-45 obj *hopper-nav-enemy-info*)
|
||||
(init-defaults! obj *hopper-nav-enemy-info*)
|
||||
(set! (-> obj shadow-min-y) (+ (-> obj collide-info trans y) (-> obj nav-info shadow-min-y)))
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -52,9 +52,9 @@
|
||||
|
||||
(defstate idle (logtrap)
|
||||
:virtual #t
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(if (or (= arg2 'touch) (= arg2 'attack))
|
||||
(send-event arg0 'attack (-> arg3 param 0) (new 'static 'attack-info))
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(if (or (= event-type 'touch) (= event-type 'attack))
|
||||
(send-event proc 'attack (-> event param 0) (new 'static 'attack-info))
|
||||
)
|
||||
)
|
||||
:code (behavior ()
|
||||
@@ -178,17 +178,14 @@
|
||||
)
|
||||
|
||||
(defstate lurkerm-tall-sail-idle (lurkerm-tall-sail)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(let ((v1-0 arg2))
|
||||
(the-as object (when (= v1-0 'stop)
|
||||
(process-entity-status! self (entity-perm-status complete) #t)
|
||||
(let ((f0-0 0.0))
|
||||
(set! (-> self speed) f0-0)
|
||||
f0-0
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(the-as object (case event-type
|
||||
(('stop)
|
||||
(process-entity-status! self (entity-perm-status complete) #t)
|
||||
(set! (-> self speed) 0.0)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
:trans (the-as (function none :behavior lurkerm-tall-sail) rider-trans)
|
||||
:code (behavior ()
|
||||
@@ -273,17 +270,14 @@
|
||||
)
|
||||
|
||||
(defstate lurkerm-short-sail-idle (lurkerm-short-sail)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(let ((v1-0 arg2))
|
||||
(the-as object (when (= v1-0 'stop)
|
||||
(process-entity-status! self (entity-perm-status complete) #t)
|
||||
(let ((f0-0 0.0))
|
||||
(set! (-> self speed) f0-0)
|
||||
f0-0
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(the-as object (case event-type
|
||||
(('stop)
|
||||
(process-entity-status! self (entity-perm-status complete) #t)
|
||||
(set! (-> self speed) 0.0)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
:trans (the-as (function none :behavior lurkerm-short-sail) rider-trans)
|
||||
:code (behavior ()
|
||||
@@ -388,17 +382,14 @@
|
||||
)
|
||||
|
||||
(defstate lurkerm-piston-idle (lurkerm-piston)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(let ((v1-0 arg2))
|
||||
(the-as object (when (= v1-0 'stop)
|
||||
(process-entity-status! self (entity-perm-status complete) #t)
|
||||
(let ((f0-0 0.0))
|
||||
(set! (-> self speed) f0-0)
|
||||
f0-0
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(the-as object (case event-type
|
||||
(('stop)
|
||||
(process-entity-status! self (entity-perm-status complete) #t)
|
||||
(set! (-> self speed) 0.0)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
:trans (the-as (function none :behavior lurkerm-piston) rider-trans)
|
||||
:code (behavior ()
|
||||
@@ -503,17 +494,14 @@
|
||||
)
|
||||
|
||||
(defstate accordian-idle (accordian)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(let ((v1-0 arg2))
|
||||
(the-as object (when (= v1-0 'stop)
|
||||
(process-entity-status! self (entity-perm-status complete) #t)
|
||||
(let ((f0-0 0.0))
|
||||
(set! (-> self speed) f0-0)
|
||||
f0-0
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(the-as object (case event-type
|
||||
(('stop)
|
||||
(process-entity-status! self (entity-perm-status complete) #t)
|
||||
(set! (-> self speed) 0.0)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
:code (behavior ()
|
||||
(ja-no-eval :num! (loop!) :frame-num 0.0)
|
||||
@@ -620,8 +608,8 @@
|
||||
)
|
||||
|
||||
(defstate precurbridge-idle (precurbridge)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('go)
|
||||
(go precurbridge-activate)
|
||||
)
|
||||
@@ -705,20 +693,20 @@
|
||||
)
|
||||
|
||||
(defstate precurbridge-active (precurbridge)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(let ((v1-0 arg2))
|
||||
(the-as
|
||||
object
|
||||
(when (= v1-0 'bonk)
|
||||
(let* ((gp-0 (the-as object (-> arg3 param 0)))
|
||||
(a0-2 (-> (the-as touching-shapes-entry gp-0) head))
|
||||
(s5-0 (-> self root-override))
|
||||
)
|
||||
(get-touched-prim a0-2 s5-0 (the-as touching-shapes-entry gp-0))
|
||||
((method-of-type touching-shapes-entry get-touched-shape) (the-as touching-shapes-entry gp-0) s5-0)
|
||||
)
|
||||
(activate! (-> self smush) -1.0 150 600 1.0 1.0)
|
||||
)
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(the-as
|
||||
object
|
||||
(case event-type
|
||||
(('bonk)
|
||||
(let* ((gp-0 (the-as object (-> event param 0)))
|
||||
(a0-2 (-> (the-as touching-shapes-entry gp-0) head))
|
||||
(s5-0 (-> self root-override))
|
||||
)
|
||||
(get-touched-prim a0-2 s5-0 (the-as touching-shapes-entry gp-0))
|
||||
((method-of-type touching-shapes-entry get-touched-shape) (the-as touching-shapes-entry gp-0) s5-0)
|
||||
)
|
||||
(activate! (-> self smush) -1.0 150 600 1.0 1.0)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -1080,7 +1068,7 @@
|
||||
:bounds (static-spherem 0 0 0 8)
|
||||
)
|
||||
|
||||
(defmethod TODO-RENAME-24 sidedoor ((obj sidedoor))
|
||||
(defmethod eco-door-method-24 sidedoor ((obj sidedoor))
|
||||
(let ((s5-0 (new 'process 'collide-shape obj (collide-list-enum hit-by-player))))
|
||||
(let ((s4-0 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 0) (the-as uint 0))))
|
||||
(set! (-> s4-0 prim-core collide-as) (collide-kind wall-object))
|
||||
@@ -1099,7 +1087,7 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod TODO-RENAME-25 sidedoor ((obj sidedoor))
|
||||
(defmethod eco-door-method-25 sidedoor ((obj sidedoor))
|
||||
(initialize-skeleton obj *sidedoor-sg* '())
|
||||
(set! (-> obj open-distance) 22528.0)
|
||||
(set! (-> obj close-distance) 61440.0)
|
||||
@@ -1229,8 +1217,8 @@
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod TODO-RENAME-22 jungle-water ((obj jungle-water))
|
||||
(let ((t9-0 (method-of-type water-anim TODO-RENAME-22)))
|
||||
(defmethod water-vol-method-22 jungle-water ((obj jungle-water))
|
||||
(let ((t9-0 (method-of-type water-anim water-vol-method-22)))
|
||||
(t9-0 obj)
|
||||
)
|
||||
(let ((v1-2 (new 'process 'ripple-control)))
|
||||
@@ -1243,7 +1231,3 @@
|
||||
)
|
||||
(none)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
nav-enemy-default-event-handler
|
||||
|
||||
(defmethod common-post junglefish ((obj junglefish))
|
||||
(dummy-10 (-> obj water))
|
||||
(water-control-method-10 (-> obj water))
|
||||
((the-as (function nav-enemy none) (find-parent-method junglefish 39)) obj)
|
||||
0
|
||||
(none)
|
||||
@@ -275,7 +275,7 @@ nav-enemy-default-event-handler
|
||||
)
|
||||
(process-drawable-from-entity! obj arg0)
|
||||
(initialize-skeleton obj *junglefish-sg* '())
|
||||
(TODO-RENAME-45 obj *junglefish-nav-enemy-info*)
|
||||
(init-defaults! obj *junglefish-nav-enemy-info*)
|
||||
(set! (-> obj water) (new 'process 'water-control obj 7 0.0 8192.0 2048.0))
|
||||
(set! (-> obj water flags) (water-flags wt01))
|
||||
(set! (-> obj water height) (res-lump-float (-> obj entity) 'water-height))
|
||||
@@ -284,7 +284,3 @@ nav-enemy-default-event-handler
|
||||
(go (method-of-object obj nav-enemy-idle))
|
||||
(none)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user