format/j1: fix loop mistake

This commit is contained in:
Tyler Wilding
2024-05-24 21:16:50 -04:00
parent ba88a54902
commit f00dbf15fe
191 changed files with 3633 additions and 3008 deletions
+1
View File
@@ -145,6 +145,7 @@
"name": "Game - Jak 1 - Runtime (boot)",
"args": [
"-v",
"--portable",
"--game",
"jak1",
"--",
+12 -3
View File
@@ -380,7 +380,9 @@ std::vector<std::string> apply_formatting(const FormatterTreeNode& curr_node,
// Consolidate any lines if the configuration requires it
// TODO there is a hack here so that multi-line forms that are consolidated still line up properly
// i have to make consolidate a more first-class feature of the config
if (curr_node.formatting_config.inline_until_index(form_lines)) {
// TODO - hacky, but prevents a bad situation, clean up
if (curr_node.formatting_config.inline_until_index(form_lines) &&
!str_util::contains(form_lines.at(0), ";")) {
std::vector<std::string> new_form_lines = {};
const auto original_form_head_width = str_util::split(form_lines.at(0), '\n').at(0).length();
bool consolidating_lines = true;
@@ -436,15 +438,22 @@ std::vector<std::string> apply_formatting(const FormatterTreeNode& curr_node,
}
form_lines = {fmt::format("{}", fmt::join(new_form_lines, " "))};
} else {
bool currently_in_block_comment = false;
for (int i = 0; i < (int)form_lines.size(); i++) {
if (i > 0) {
auto& line = form_lines.at(i);
auto& line = form_lines.at(i);
if (str_util::contains(line, "|#")) {
currently_in_block_comment = false;
}
if (i > 0 && !currently_in_block_comment) {
line = fmt::format("{}{}",
str_util::repeat(curr_node.formatting_config.indentation_width_for_index(
curr_node.formatting_config, i),
" "),
line);
}
if (str_util::contains(line, "#|") && !str_util::contains(line, "|#")) {
currently_in_block_comment = true;
}
}
}
return form_lines;
+7 -3
View File
@@ -89,10 +89,14 @@ std::vector<std::string> format_block_comment(const std::string& comment) {
comment_contents = str_util::rtrim(comment_contents);
std::vector<std::string> lines = {new_comment};
const auto contents_as_lines = str_util::split_string(comment_contents, "\n");
for (const auto& line : contents_as_lines) {
lines.push_back(line);
if (contents_as_lines.size() > 1) {
for (const auto& line : contents_as_lines) {
lines.push_back(line);
}
lines.push_back("|#");
} else {
lines.at(0) = fmt::format("{} {} |#", new_comment, str_util::trim(contents_as_lines.at(0)));
}
lines.push_back("|#");
return lines;
}
} // namespace comments
+1 -1
View File
@@ -288,7 +288,7 @@ const std::unordered_map<std::string, FormFormattingConfig> opengoal_form_config
{"#when", new_flow_rule(2)},
{"countdown", new_flow_rule(2)},
{"until", new_flow_rule(2)},
{"loop", new_flow_rule(2)},
{"loop", new_flow_rule(0)},
{"while", new_flow_rule(2)},
{"begin", new_flow_rule(0)},
{"seval", new_flow_rule(0)},
+1 -3
View File
@@ -1,6 +1,4 @@
#|@file
Compiler Setup for Jak 1
|#
#|@file Compiler Setup for Jak 1 |#
;; load kernel type definitions.
;; these types/functions are provided by Jak 1's runtime.
+16 -16
View File
@@ -1325,22 +1325,22 @@
(defun make-joint-jump-tables ()
#|
#x3ee6b6f9, // = 9 ^ 1055307504
#x3ee6b6ff, // = 15 ^ 1055307504
#x3ee6b6e2, // = 18 ^ 1055307504
#x3ee6b6e4, // = 20 ^ 1055307504
#x3ee6b6e5, // = 21 ^ 1055307504
#x3ee6b6eb, // = 27 ^ 1055307504
#x3ee6b6ee, // = 30 ^ 1055307504
#x3ee6b6f6, // = 6 ^ 1055307504
#x3ee6b6fc, // = 12 ^ 1055307504
#x3ee6b6ff, // = 15 ^ 1055307504
#x3ee6b6e3, // = 19 ^ 1055307504
#x3ee6b6e4, // = 20 ^ 1055307504
#x3ee6b6e8, // = 24 ^ 1055307504
#x3ee6b6eb, // = 27 ^ 1055307504
#x3ee6b6ef, // = 31 ^ 1055307504
#x3ee6b6f6, // = 6 ^ 1055307504
#x3ee6b6f9, // = 9 ^ 1055307504
#x3ee6b6ff, // = 15 ^ 1055307504
#x3ee6b6e2, // = 18 ^ 1055307504
#x3ee6b6e4, // = 20 ^ 1055307504
#x3ee6b6e5, // = 21 ^ 1055307504
#x3ee6b6eb, // = 27 ^ 1055307504
#x3ee6b6ee, // = 30 ^ 1055307504
#x3ee6b6f6, // = 6 ^ 1055307504
#x3ee6b6fc, // = 12 ^ 1055307504
#x3ee6b6ff, // = 15 ^ 1055307504
#x3ee6b6e3, // = 19 ^ 1055307504
#x3ee6b6e4, // = 20 ^ 1055307504
#x3ee6b6e8, // = 24 ^ 1055307504
#x3ee6b6eb, // = 27 ^ 1055307504
#x3ee6b6ef, // = 31 ^ 1055307504
#x3ee6b6f6, // = 6 ^ 1055307504
|#
(set! (-> (scratchpad-object terrain-context) work foreground joint-work fix-jmp-table 0)
(the-as (function none) (+ 0 #x3ee6b6f9)))
+4 -3
View File
@@ -101,9 +101,10 @@
:code
(behavior ()
(local-vars (sv-160 cam-rotation-tracker))
(loop (when (and (not (logtest? (-> *camera* master-options) 2)) (!= (-> self tracking-status) 0))
(set! (-> self tracking-status) (the-as uint 0))
0)
(loop
(when (and (not (logtest? (-> *camera* master-options) 2)) (!= (-> self tracking-status) 0))
(set! (-> self tracking-status) (the-as uint 0))
0)
(when *camera*
(let ((s5-0 (-> *camera* slave 0))
(s4-0 (-> *camera* slave 1))
+4 -2
View File
@@ -136,7 +136,8 @@
(sv-272 int)
(sv-288 int))
(let ((s4-0 0))
(loop (set! sv-16 (new 'static 'res-tag))
(loop
(set! sv-16 (new 'static 'res-tag))
(let ((s3-0 (the-as (inline-array vector)
((method-of-type res-lump get-property-data)
arg0
@@ -2679,7 +2680,8 @@
(defstate cam-layout-active (cam-layout)
:code
(behavior ()
(loop (cam-layout-entity-info (the-as entity-actor (-> self cam-entity)))
(loop
(cam-layout-entity-info (the-as entity-actor (-> self cam-entity)))
(cam-layout-entity-volume-info)
(cam-layout-do-menu *clm*)
(suspend))))
+9 -6
View File
@@ -345,7 +345,8 @@
(defun in-cam-entity-volume? ((arg0 vector) (arg1 entity) (arg2 float) (arg3 symbol))
(local-vars (sv-16 res-tag))
(let ((s2-0 0))
(loop (set! sv-16 (new 'static 'res-tag))
(loop
(set! sv-16 (new 'static 'res-tag))
(let ((v1-1 (the-as object
((method-of-type res-lump get-property-data)
arg1
@@ -930,10 +931,11 @@
(cam-master-effect)))
:code
(behavior ()
(loop (if (and *dproc* *debug-segment*)
(add-frame (-> *display* frames (-> *display* on-screen) frame profile-bar 0)
'camera
(new 'static 'rgba :r #x40 :b #x40 :a #x80)))
(loop
(if (and *dproc* *debug-segment*)
(add-frame (-> *display* frames (-> *display* on-screen) frame profile-bar 0)
'camera
(new 'static 'rgba :r #x40 :b #x40 :a #x80)))
(set! (-> self string-min target y) (-> self stringMinHeight))
(set! (-> self string-max target y) (-> self stringMaxHeight))
(set! (-> self string-min target z) (-> self stringMinLength))
@@ -962,7 +964,8 @@
(defstate list-keeper-active (camera-master)
:code
(behavior ()
(loop (change-to-last-brother self)
(loop
(change-to-last-brother self)
(suspend))))
(defbehavior list-keeper-init camera-master ()
+36 -33
View File
@@ -30,35 +30,36 @@
(set! (-> self blend-to-type) (the-as uint 1))))
:code
(behavior ()
(loop (let ((s5-0 (new-stack-vector0))
(gp-0 (new-stack-vector0)))
(when *camera-read-analog*
(let ((f28-0 (analog-input (the-as int (-> *cpad-list* cpads 0 leftx)) 128.0 48.0 110.0 -1.0))
(f30-0 (analog-input (the-as int (-> *cpad-list* cpads 0 lefty)) 128.0 48.0 110.0 -1.0))
(f26-0 (analog-input (the-as int (-> *cpad-list* cpads 0 rightx)) 128.0 48.0 110.0 -1.0))
(f0-0 (analog-input (the-as int (-> *cpad-list* cpads 0 righty)) 128.0 48.0 110.0 -1.0)))
(cond
((cpad-hold? (-> *CAMERA-bank* joypad) r2)
(set! (-> s5-0 y) (- (-> s5-0 y) (* 0.2 (-> *CAM_POINT_WATCH-bank* rot-speed) (- f26-0))))
(set! (-> s5-0 x) (- (-> s5-0 x) (* 0.2 (-> *CAM_POINT_WATCH-bank* rot-speed) (- f0-0))))
(+! (-> gp-0 x) (* 0.2 (-> *CAM_POINT_WATCH-bank* speed) f28-0))
(+! (-> gp-0 z) (* 0.2 (-> *CAM_POINT_WATCH-bank* speed) f30-0)))
(else
(set! (-> s5-0 y) (- (-> s5-0 y) (* 2.0 (-> *CAM_POINT_WATCH-bank* rot-speed) (- f26-0))))
(set! (-> s5-0 x) (- (-> s5-0 x) (* 2.0 (-> *CAM_POINT_WATCH-bank* rot-speed) (- f0-0))))
(+! (-> gp-0 x) (* 2.0 (-> *CAM_POINT_WATCH-bank* speed) f28-0))
(+! (-> gp-0 z) (* 2.0 (-> *CAM_POINT_WATCH-bank* speed) f30-0)))))
(let ((s4-0 (new-stack-vector0)))
(let ((s3-0 (new-stack-matrix0)))
(matrix-axis-angle! s3-0 (the-as vector (-> self tracking)) (- (-> s5-0 x)))
(vector-matrix*! s4-0 (-> self tracking inv-mat vector 2) s3-0)
(matrix-axis-angle! s3-0 (-> *camera* local-down) (- (-> s5-0 y)))
(vector-matrix*! s4-0 s4-0 s3-0))
(forward-down->inv-matrix (the-as matrix (-> self tracking)) s4-0 (-> *camera* local-down)))
(set! (-> self pivot-rad) (- (-> self pivot-rad) (-> gp-0 z)))
(if (< (-> self pivot-rad) 4096.0) (set! (-> self pivot-rad) 4096.0))
(set-vector! gp-0 0.0 0.0 (- (-> self pivot-rad)) 1.0)
(vector-matrix*! (-> self trans) gp-0 (the-as matrix (-> self tracking)))))
(loop
(let ((s5-0 (new-stack-vector0))
(gp-0 (new-stack-vector0)))
(when *camera-read-analog*
(let ((f28-0 (analog-input (the-as int (-> *cpad-list* cpads 0 leftx)) 128.0 48.0 110.0 -1.0))
(f30-0 (analog-input (the-as int (-> *cpad-list* cpads 0 lefty)) 128.0 48.0 110.0 -1.0))
(f26-0 (analog-input (the-as int (-> *cpad-list* cpads 0 rightx)) 128.0 48.0 110.0 -1.0))
(f0-0 (analog-input (the-as int (-> *cpad-list* cpads 0 righty)) 128.0 48.0 110.0 -1.0)))
(cond
((cpad-hold? (-> *CAMERA-bank* joypad) r2)
(set! (-> s5-0 y) (- (-> s5-0 y) (* 0.2 (-> *CAM_POINT_WATCH-bank* rot-speed) (- f26-0))))
(set! (-> s5-0 x) (- (-> s5-0 x) (* 0.2 (-> *CAM_POINT_WATCH-bank* rot-speed) (- f0-0))))
(+! (-> gp-0 x) (* 0.2 (-> *CAM_POINT_WATCH-bank* speed) f28-0))
(+! (-> gp-0 z) (* 0.2 (-> *CAM_POINT_WATCH-bank* speed) f30-0)))
(else
(set! (-> s5-0 y) (- (-> s5-0 y) (* 2.0 (-> *CAM_POINT_WATCH-bank* rot-speed) (- f26-0))))
(set! (-> s5-0 x) (- (-> s5-0 x) (* 2.0 (-> *CAM_POINT_WATCH-bank* rot-speed) (- f0-0))))
(+! (-> gp-0 x) (* 2.0 (-> *CAM_POINT_WATCH-bank* speed) f28-0))
(+! (-> gp-0 z) (* 2.0 (-> *CAM_POINT_WATCH-bank* speed) f30-0)))))
(let ((s4-0 (new-stack-vector0)))
(let ((s3-0 (new-stack-matrix0)))
(matrix-axis-angle! s3-0 (the-as vector (-> self tracking)) (- (-> s5-0 x)))
(vector-matrix*! s4-0 (-> self tracking inv-mat vector 2) s3-0)
(matrix-axis-angle! s3-0 (-> *camera* local-down) (- (-> s5-0 y)))
(vector-matrix*! s4-0 s4-0 s3-0))
(forward-down->inv-matrix (the-as matrix (-> self tracking)) s4-0 (-> *camera* local-down)))
(set! (-> self pivot-rad) (- (-> self pivot-rad) (-> gp-0 z)))
(if (< (-> self pivot-rad) 4096.0) (set! (-> self pivot-rad) 4096.0))
(set-vector! gp-0 0.0 0.0 (- (-> self pivot-rad)) 1.0)
(vector-matrix*! (-> self trans) gp-0 (the-as matrix (-> self tracking)))))
(suspend)
0)))
@@ -232,9 +233,10 @@
(send-event *camera-combiner* 'stop-tracking)))
:code
(behavior ()
(loop (let ((a2-0 (-> *camera* local-down)))
(if (logtest? (-> self options) 8) (set! a2-0 (the-as vector #f)))
(cam-free-floating-move (the-as matrix (-> self tracking)) (-> self trans) a2-0 (the-as int (-> *CAMERA-bank* joypad))))
(loop
(let ((a2-0 (-> *camera* local-down)))
(if (logtest? (-> self options) 8) (set! a2-0 (the-as vector #f)))
(cam-free-floating-move (the-as matrix (-> self tracking)) (-> self trans) a2-0 (the-as int (-> *CAMERA-bank* joypad))))
(suspend))))
(deftype camera-orbit-info (structure)
@@ -281,7 +283,8 @@
())
:code
(behavior ()
(loop (if (not *camera-orbit-target*) (cam-slave-go cam-free-floating))
(loop
(if (not *camera-orbit-target*) (cam-slave-go cam-free-floating))
(when *camera-read-analog*
(let ((f0-0 (analog-input (the-as int (-> *cpad-list* cpads 0 righty)) 128.0 32.0 110.0 0.05)))
(cond
+224 -206
View File
@@ -31,13 +31,14 @@
0))
:code
(behavior ()
(loop (when (not (paused?))
(let ((gp-0 (new 'stack-no-clear 'vector)))
(set! (-> self trans quad) (-> self saved-pt quad))
(cam-curve-pos (-> self trans) gp-0 (the-as curve #f) #f)
(when (!= (-> gp-0 w) 0.0)
(vector-normalize! gp-0 (the-as float 1.0))
(forward-down->inv-matrix (the-as matrix (-> self tracking)) gp-0 (-> *camera* local-down)))))
(loop
(when (not (paused?))
(let ((gp-0 (new 'stack-no-clear 'vector)))
(set! (-> self trans quad) (-> self saved-pt quad))
(cam-curve-pos (-> self trans) gp-0 (the-as curve #f) #f)
(when (!= (-> gp-0 w) 0.0)
(vector-normalize! gp-0 (the-as float 1.0))
(forward-down->inv-matrix (the-as matrix (-> self tracking)) gp-0 (-> *camera* local-down)))))
(suspend))))
(defstate cam-fixed-read-entity (camera-slave)
@@ -63,7 +64,8 @@
(go cam-fixed))
:code
(behavior ()
(loop (format *stdcon* "ERROR <GMJ>: stayed in cam-fixed-read-entity~%")
(loop
(format *stdcon* "ERROR <GMJ>: stayed in cam-fixed-read-entity~%")
(suspend))))
(defstate cam-pov (camera-slave)
@@ -84,20 +86,21 @@
(cam-slave-go cam-fixed)))
:code
(behavior ()
(loop (when (not (paused?))
(vector<-cspace! (-> self trans)
(-> (the-as pov-camera (-> *camera* pov-handle process 0)) node-list data (-> *camera* pov-bone)))
(let* ((v1-5 (-> self tracking))
(a3-0 (-> (the-as pov-camera (-> *camera* pov-handle process 0)) node-list data (-> *camera* pov-bone) bone transform))
(a0-8 (-> a3-0 vector 0 quad))
(a1-9 (-> a3-0 vector 1 quad))
(a2-0 (-> a3-0 vector 2 quad))
(a3-1 (-> a3-0 vector 3 quad)))
(set! (-> v1-5 inv-mat vector 0 quad) a0-8)
(set! (-> v1-5 inv-mat vector 1 quad) a1-9)
(set! (-> v1-5 inv-mat vector 2 quad) a2-0)
(set! (-> v1-5 inv-mat vector 3 quad) a3-1))
(vector-reset! (-> self tracking inv-mat vector 3)))
(loop
(when (not (paused?))
(vector<-cspace! (-> self trans)
(-> (the-as pov-camera (-> *camera* pov-handle process 0)) node-list data (-> *camera* pov-bone)))
(let* ((v1-5 (-> self tracking))
(a3-0 (-> (the-as pov-camera (-> *camera* pov-handle process 0)) node-list data (-> *camera* pov-bone) bone transform))
(a0-8 (-> a3-0 vector 0 quad))
(a1-9 (-> a3-0 vector 1 quad))
(a2-0 (-> a3-0 vector 2 quad))
(a3-1 (-> a3-0 vector 3 quad)))
(set! (-> v1-5 inv-mat vector 0 quad) a0-8)
(set! (-> v1-5 inv-mat vector 1 quad) a1-9)
(set! (-> v1-5 inv-mat vector 2 quad) a2-0)
(set! (-> v1-5 inv-mat vector 3 quad) a3-1))
(vector-reset! (-> self tracking inv-mat vector 3)))
(suspend))))
(defstate cam-pov180 (camera-slave)
@@ -124,28 +127,29 @@
(vector<-cspace! gp-0 (-> (the-as pov-camera (-> *camera* pov-handle process 0)) node-list data (-> *camera* pov-bone)))
(let ((v1-11 (-> (the-as pov-camera (-> *camera* pov-handle process 0)) node-list data (-> *camera* pov-bone) bone transform)))
(vector-normalize-copy! s5-0 (-> v1-11 vector 2) (the-as float 1.0)))
(loop (when (not (paused?))
(let ((s0-0 (-> (the-as pov-camera (-> *camera* pov-handle process 0)) node-list data (-> *camera* pov-bone) bone transform))
(s1-0 (-> (the-as pov-camera (-> *camera* pov-handle process 0)) node-list data (-> *camera* pov-bone) bone scale))
(s3-0 (new 'stack-no-clear 'vector)))
(let ((s2-0 (new 'stack-no-clear 'vector)))
(vector<-cspace! s2-0 (-> (the-as pov-camera (-> *camera* pov-handle process 0)) node-list data (-> *camera* pov-bone)))
(vector-normalize-copy! s3-0 (-> s0-0 vector 2) (the-as float 1.0))
(set! s4-0
(cond
((and (< (vector-vector-distance s2-0 gp-0) 40960.0) (< (cos (the-as float 3640.889)) (vector-dot s5-0 s3-0)))
(set! (-> self trans quad) (-> s2-0 quad))
(vector-negate! (the-as vector (-> self tracking)) (the-as vector (-> s0-0 vector)))
(set! (-> self tracking inv-mat vector 1 quad) (-> s0-0 vector 1 quad))
(vector-negate! (-> self tracking inv-mat vector 2) (-> s0-0 vector 2))
(set! (-> self fov) (* 2.0 (atan (/ 12.700255 (* 20.3 (-> s1-0 x))) (the-as float 1.0))))
(vector-float*! (the-as vector (-> self tracking)) (the-as vector (-> self tracking)) (/ 1.0 (-> s1-0 x)))
(vector-reset! (-> self tracking inv-mat vector 3))
(if s4-0 (set! s4-0 #f))
s4-0)
(else #t)))
(set! (-> gp-0 quad) (-> s2-0 quad)))
(set! (-> s5-0 quad) (-> s3-0 quad))))
(loop
(when (not (paused?))
(let ((s0-0 (-> (the-as pov-camera (-> *camera* pov-handle process 0)) node-list data (-> *camera* pov-bone) bone transform))
(s1-0 (-> (the-as pov-camera (-> *camera* pov-handle process 0)) node-list data (-> *camera* pov-bone) bone scale))
(s3-0 (new 'stack-no-clear 'vector)))
(let ((s2-0 (new 'stack-no-clear 'vector)))
(vector<-cspace! s2-0 (-> (the-as pov-camera (-> *camera* pov-handle process 0)) node-list data (-> *camera* pov-bone)))
(vector-normalize-copy! s3-0 (-> s0-0 vector 2) (the-as float 1.0))
(set! s4-0
(cond
((and (< (vector-vector-distance s2-0 gp-0) 40960.0) (< (cos (the-as float 3640.889)) (vector-dot s5-0 s3-0)))
(set! (-> self trans quad) (-> s2-0 quad))
(vector-negate! (the-as vector (-> self tracking)) (the-as vector (-> s0-0 vector)))
(set! (-> self tracking inv-mat vector 1 quad) (-> s0-0 vector 1 quad))
(vector-negate! (-> self tracking inv-mat vector 2) (-> s0-0 vector 2))
(set! (-> self fov) (* 2.0 (atan (/ 12.700255 (* 20.3 (-> s1-0 x))) (the-as float 1.0))))
(vector-float*! (the-as vector (-> self tracking)) (the-as vector (-> self tracking)) (/ 1.0 (-> s1-0 x)))
(vector-reset! (-> self tracking inv-mat vector 3))
(if s4-0 (set! s4-0 #f))
s4-0)
(else #t)))
(set! (-> gp-0 quad) (-> s2-0 quad)))
(set! (-> s5-0 quad) (-> s3-0 quad))))
(suspend)))))
(defstate cam-pov-track (camera-slave)
@@ -164,9 +168,10 @@
(cam-slave-go cam-free-floating)))
:code
(behavior ()
(loop (if (not (paused?))
(vector<-cspace! (-> self trans)
(-> (the-as pov-camera (-> *camera* pov-handle process 0)) node-list data (-> *camera* pov-bone))))
(loop
(if (not (paused?))
(vector<-cspace! (-> self trans)
(-> (the-as pov-camera (-> *camera* pov-handle process 0)) node-list data (-> *camera* pov-bone))))
(suspend))))
(defbehavior cam-standoff-calc-trans camera-slave ()
@@ -200,9 +205,10 @@
(if (not (logtest? (-> *camera* master-options) 2)) (cam-slave-go cam-free-floating)))
:code
(behavior ()
(loop (when (not (paused?))
(cam-calc-follow! (-> self tracking) (-> self trans) #t)
(cam-standoff-calc-trans))
(loop
(when (not (paused?))
(cam-calc-follow! (-> self tracking) (-> self trans) #t)
(cam-standoff-calc-trans))
(suspend))))
(defstate cam-standoff-read-entity (camera-slave)
@@ -232,7 +238,8 @@
(go cam-standoff))
:code
(behavior ()
(loop (format *stdcon* "ERROR <GMJ>: stayed in cam-standoff-read-entity~%")
(loop
(format *stdcon* "ERROR <GMJ>: stayed in cam-standoff-read-entity~%")
(suspend))))
(deftype cam-eye-bank (basic)
@@ -273,73 +280,74 @@
:code
(behavior ()
(let ((gp-0 (current-time)))
(loop (when (not (paused?))
(let ((s4-0 (vector-reset! (new-stack-vector0)))
(s5-0 (new-stack-matrix0)))
(when *camera-read-analog*
(let ((f30-0 (analog-input-horizontal-first ;; og:preserve-this changed for pc port
(the-as int (+ (-> *cpad-list* cpads 0 rightx) -256 (-> *cpad-list* cpads 0 leftx)))
(the-as float 0.0)
(the-as float 48.0)
(the-as float 110.0)
(the-as float -1.0)))
(f0-0 (analog-input-vertical-first ;; og:preserve-this changed for pc port
(the-as int (+ (-> *cpad-list* cpads 0 righty) -256 (-> *cpad-list* cpads 0 lefty)))
(the-as float 0.0)
(the-as float 48.0)
(the-as float 110.0)
(the-as float -1.0))))
(set! (-> s4-0 y) (- (-> s4-0 y) (* (- f30-0) (* (-> *display* time-adjust-ratio) (-> *CAM_EYE-bank* rot-speed))))) ;; og:preserve-this changed for high fps
(set! (-> s4-0 x) (- (-> s4-0 x) (* (- f0-0) (* (-> *display* time-adjust-ratio) (-> *CAM_EYE-bank* rot-speed))))) ;; og:preserve-this changed for high fps
))
(cond
((< (* (-> *display* time-adjust-ratio) (-> *CAM_EYE-bank* rot-speed)) (-> s4-0 x)) ;; og:preserve-this changed for high fps
(set! (-> s4-0 x) (* (-> *display* time-adjust-ratio) (-> *CAM_EYE-bank* rot-speed))) ;; og:preserve-this changed for high fps
)
((< (-> s4-0 x) (- (* (-> *display* time-adjust-ratio) (-> *CAM_EYE-bank* rot-speed)))) ;; og:preserve-this changed for high fps
(set! (-> s4-0 x) (- (* (-> *display* time-adjust-ratio) (-> *CAM_EYE-bank* rot-speed)))) ;; og:preserve-this changed for high fps
))
(cond
((< (* (-> *display* time-adjust-ratio) (-> *CAM_EYE-bank* rot-speed)) (-> s4-0 y)) ;; og:preserve-this changed for high fps
(set! (-> s4-0 y) (* (-> *display* time-adjust-ratio) (-> *CAM_EYE-bank* rot-speed))) ;; og:preserve-this changed for high fps
)
((< (-> s4-0 y) (- (* (-> *display* time-adjust-ratio) (-> *CAM_EYE-bank* rot-speed)))) ;; og:preserve-this changed for high fps
(set! (-> s4-0 y) (- (* (-> *display* time-adjust-ratio) (-> *CAM_EYE-bank* rot-speed)))) ;; og:preserve-this changed for high fps
))
(cond
((and (= (-> s4-0 x) 0.0) (= (-> s4-0 y) 0.0)) (set! gp-0 (current-time)))
(else (let ((v1-44 (min 10 (max 1 (- (current-time) gp-0))))) (vector-float*! s4-0 s4-0 (* 0.1 (the float v1-44))))))
(matrix-axis-angle! s5-0 (-> *camera* local-down) (-> s4-0 y))
(matrix*! (the-as matrix (-> self tracking)) (the-as matrix (-> self tracking)) s5-0)
(when (not (logtest? (-> self options) 8))
(if (< (vector-dot (-> self tracking inv-mat vector 1) (-> *camera* local-down)) 0.0)
(forward-down->inv-matrix (the-as matrix (-> self tracking))
(-> self tracking inv-mat vector 2)
(-> *camera* local-down))
(forward-down->inv-matrix (the-as matrix (-> self tracking))
(-> self tracking inv-mat vector 2)
(vector-negate! (new-stack-vector0) (-> *camera* local-down)))))
(matrix-axis-angle! s5-0 (the-as vector (-> self tracking)) (- (-> s4-0 x)))
(matrix*! (the-as matrix (-> self tracking)) (the-as matrix (-> self tracking)) s5-0))
(when (not (logtest? (-> self options) 8))
(let ((f30-1 (vector-dot (-> *camera* local-down) (-> self tracking inv-mat vector 2))))
(set! (-> (new 'stack-no-clear 'vector) quad) (the-as uint128 0))
(when (< (sin (-> *CAM_EYE-bank* max-degrees)) (fabs f30-1))
(vector--float*! (-> self tracking inv-mat vector 2) (-> self tracking inv-mat vector 2) (-> *camera* local-down) f30-1)
(vector-normalize! (-> self tracking inv-mat vector 2) (cos (-> *CAM_EYE-bank* max-degrees)))
(if (< f30-1 0.0)
(vector--float*! (-> self tracking inv-mat vector 2)
(-> self tracking inv-mat vector 2)
(-> *camera* local-down)
(sin (-> *CAM_EYE-bank* max-degrees)))
(vector+float*! (-> self tracking inv-mat vector 2)
(-> self tracking inv-mat vector 2)
(-> *camera* local-down)
(sin (-> *CAM_EYE-bank* max-degrees))))
(vector-cross! (-> self tracking inv-mat vector 1)
(loop
(when (not (paused?))
(let ((s4-0 (vector-reset! (new-stack-vector0)))
(s5-0 (new-stack-matrix0)))
(when *camera-read-analog*
(let ((f30-0 (analog-input-horizontal-first ;; og:preserve-this changed for pc port
(the-as int (+ (-> *cpad-list* cpads 0 rightx) -256 (-> *cpad-list* cpads 0 leftx)))
(the-as float 0.0)
(the-as float 48.0)
(the-as float 110.0)
(the-as float -1.0)))
(f0-0 (analog-input-vertical-first ;; og:preserve-this changed for pc port
(the-as int (+ (-> *cpad-list* cpads 0 righty) -256 (-> *cpad-list* cpads 0 lefty)))
(the-as float 0.0)
(the-as float 48.0)
(the-as float 110.0)
(the-as float -1.0))))
(set! (-> s4-0 y) (- (-> s4-0 y) (* (- f30-0) (* (-> *display* time-adjust-ratio) (-> *CAM_EYE-bank* rot-speed))))) ;; og:preserve-this changed for high fps
(set! (-> s4-0 x) (- (-> s4-0 x) (* (- f0-0) (* (-> *display* time-adjust-ratio) (-> *CAM_EYE-bank* rot-speed))))) ;; og:preserve-this changed for high fps
))
(cond
((< (* (-> *display* time-adjust-ratio) (-> *CAM_EYE-bank* rot-speed)) (-> s4-0 x)) ;; og:preserve-this changed for high fps
(set! (-> s4-0 x) (* (-> *display* time-adjust-ratio) (-> *CAM_EYE-bank* rot-speed))) ;; og:preserve-this changed for high fps
)
((< (-> s4-0 x) (- (* (-> *display* time-adjust-ratio) (-> *CAM_EYE-bank* rot-speed)))) ;; og:preserve-this changed for high fps
(set! (-> s4-0 x) (- (* (-> *display* time-adjust-ratio) (-> *CAM_EYE-bank* rot-speed)))) ;; og:preserve-this changed for high fps
))
(cond
((< (* (-> *display* time-adjust-ratio) (-> *CAM_EYE-bank* rot-speed)) (-> s4-0 y)) ;; og:preserve-this changed for high fps
(set! (-> s4-0 y) (* (-> *display* time-adjust-ratio) (-> *CAM_EYE-bank* rot-speed))) ;; og:preserve-this changed for high fps
)
((< (-> s4-0 y) (- (* (-> *display* time-adjust-ratio) (-> *CAM_EYE-bank* rot-speed)))) ;; og:preserve-this changed for high fps
(set! (-> s4-0 y) (- (* (-> *display* time-adjust-ratio) (-> *CAM_EYE-bank* rot-speed)))) ;; og:preserve-this changed for high fps
))
(cond
((and (= (-> s4-0 x) 0.0) (= (-> s4-0 y) 0.0)) (set! gp-0 (current-time)))
(else (let ((v1-44 (min 10 (max 1 (- (current-time) gp-0))))) (vector-float*! s4-0 s4-0 (* 0.1 (the float v1-44))))))
(matrix-axis-angle! s5-0 (-> *camera* local-down) (-> s4-0 y))
(matrix*! (the-as matrix (-> self tracking)) (the-as matrix (-> self tracking)) s5-0)
(when (not (logtest? (-> self options) 8))
(if (< (vector-dot (-> self tracking inv-mat vector 1) (-> *camera* local-down)) 0.0)
(forward-down->inv-matrix (the-as matrix (-> self tracking))
(-> self tracking inv-mat vector 2)
(-> *camera* local-down))
(forward-down->inv-matrix (the-as matrix (-> self tracking))
(-> self tracking inv-mat vector 2)
(vector-negate! (new-stack-vector0) (-> *camera* local-down)))))
(matrix-axis-angle! s5-0 (the-as vector (-> self tracking)) (- (-> s4-0 x)))
(matrix*! (the-as matrix (-> self tracking)) (the-as matrix (-> self tracking)) s5-0))
(when (not (logtest? (-> self options) 8))
(let ((f30-1 (vector-dot (-> *camera* local-down) (-> self tracking inv-mat vector 2))))
(set! (-> (new 'stack-no-clear 'vector) quad) (the-as uint128 0))
(when (< (sin (-> *CAM_EYE-bank* max-degrees)) (fabs f30-1))
(vector--float*! (-> self tracking inv-mat vector 2) (-> self tracking inv-mat vector 2) (-> *camera* local-down) f30-1)
(vector-normalize! (-> self tracking inv-mat vector 2) (cos (-> *CAM_EYE-bank* max-degrees)))
(if (< f30-1 0.0)
(vector--float*! (-> self tracking inv-mat vector 2)
(-> self tracking inv-mat vector 2)
(the-as vector (-> self tracking)))
(set! (-> self tracking inv-mat vector 1 w) 0.0)))))
(-> *camera* local-down)
(sin (-> *CAM_EYE-bank* max-degrees)))
(vector+float*! (-> self tracking inv-mat vector 2)
(-> self tracking inv-mat vector 2)
(-> *camera* local-down)
(sin (-> *CAM_EYE-bank* max-degrees))))
(vector-cross! (-> self tracking inv-mat vector 1)
(-> self tracking inv-mat vector 2)
(the-as vector (-> self tracking)))
(set! (-> self tracking inv-mat vector 1 w) 0.0)))))
(let ((v1-76 (vector-float*! (new-stack-vector0) (-> *camera* local-down) (+ 1024.0 (-> *camera* target-height)))))
(vector-! (-> self trans) (-> *camera* tpos-curr) v1-76))
(suspend)))))
@@ -374,51 +382,52 @@
(if (not (logtest? (-> *camera* master-options) 2)) (go cam-free-floating)))
:code
(behavior ()
(loop (when (not (paused?))
(let ((s5-0 (vector-reset! (new-stack-vector0)))
(s4-0 (vector-reset! (new-stack-vector0)))
(s3-0 (vector-reset! (new-stack-vector0)))
(s2-0 (new-stack-vector0))
(gp-0 (new-stack-matrix0)))
0.0
(when *camera-read-analog*
(let ((f1-0 (analog-input-horizontal-first ;; og:preserve-this changed for pc port
(the-as int (+ (-> *cpad-list* cpads 0 rightx) -256 (-> *cpad-list* cpads 0 leftx)))
(the-as float 0.0)
(the-as float 48.0)
(the-as float 110.0)
(the-as float -1.0))))
(set! (-> s5-0 y) (- (-> s5-0 y) (* (- f1-0) (* (-> *display* time-adjust-ratio) (-> *CAM_BILLY-bank* rot-speed))))) ;; og:preserve-this changed for high fps
))
(cond
((< (* (-> *display* time-adjust-ratio) (-> *CAM_BILLY-bank* rot-speed)) (-> s5-0 y)) ;; og:preserve-this changed for high fps
(set! (-> s5-0 y) (* (-> *display* time-adjust-ratio) (-> *CAM_BILLY-bank* rot-speed))) ;; og:preserve-this changed for high fps
)
((< (-> s5-0 y) (- (* (-> *display* time-adjust-ratio) (-> *CAM_BILLY-bank* rot-speed)))) ;; og:preserve-this changed for high fps
(set! (-> s5-0 y) (- (* (-> *display* time-adjust-ratio) (-> *CAM_BILLY-bank* rot-speed)))) ;; og:preserve-this changed for high fps
))
(set! (-> s3-0 x) (sin (the-as float 37319.11)))
(set! (-> s3-0 z) (cos (the-as float 37319.11)))
(set! (-> s4-0 x) (-> s3-0 z))
(set! (-> s4-0 z) (- (-> s3-0 x)))
(vector-flatten! s2-0 (-> self tracking inv-mat vector 2) (-> *camera* local-down))
(vector-normalize! s2-0 (the-as float 1.0))
(let ((f0-14 (acos (vector-dot (-> self tracking inv-mat vector 2) s3-0))))
(if (< (vector-dot (-> self tracking inv-mat vector 2) s4-0) 0.0) (set! f0-14 (- f0-14)))
(let ((f0-18 (cond
((and (< 0.0 f0-14) (< 0.0 (-> s5-0 y))) (fmin (-> s5-0 y) (fmax 0.0 (* 0.5 (- 10922.667 f0-14)))))
((and (< f0-14 0.0) (< (-> s5-0 y) 0.0)) (fmax (-> s5-0 y) (fmin 0.0 (* 0.5 (- -10922.667 f0-14)))))
(else (-> s5-0 y)))))
(matrix-axis-angle! gp-0 (-> *camera* local-down) f0-18)))
(vector-matrix*! (-> self tracking inv-mat vector 2) (-> self tracking inv-mat vector 2) gp-0))
(set! (-> self tracking inv-mat vector 2 y) 0.0)
(vector-normalize! (-> self tracking inv-mat vector 2) (cos (-> *CAM_BILLY-bank* tilt-degrees)))
(set! (-> self tracking inv-mat vector 2 y) (sin (-> *CAM_BILLY-bank* tilt-degrees)))
(vector-cross! (the-as vector (-> self tracking)) (-> self tracking inv-mat vector 2) (-> *camera* local-down))
(vector-normalize! (the-as vector (-> self tracking)) (the-as float 1.0))
(vector-cross! (-> self tracking inv-mat vector 1)
(-> self tracking inv-mat vector 2)
(the-as vector (-> self tracking))))
(loop
(when (not (paused?))
(let ((s5-0 (vector-reset! (new-stack-vector0)))
(s4-0 (vector-reset! (new-stack-vector0)))
(s3-0 (vector-reset! (new-stack-vector0)))
(s2-0 (new-stack-vector0))
(gp-0 (new-stack-matrix0)))
0.0
(when *camera-read-analog*
(let ((f1-0 (analog-input-horizontal-first ;; og:preserve-this changed for pc port
(the-as int (+ (-> *cpad-list* cpads 0 rightx) -256 (-> *cpad-list* cpads 0 leftx)))
(the-as float 0.0)
(the-as float 48.0)
(the-as float 110.0)
(the-as float -1.0))))
(set! (-> s5-0 y) (- (-> s5-0 y) (* (- f1-0) (* (-> *display* time-adjust-ratio) (-> *CAM_BILLY-bank* rot-speed))))) ;; og:preserve-this changed for high fps
))
(cond
((< (* (-> *display* time-adjust-ratio) (-> *CAM_BILLY-bank* rot-speed)) (-> s5-0 y)) ;; og:preserve-this changed for high fps
(set! (-> s5-0 y) (* (-> *display* time-adjust-ratio) (-> *CAM_BILLY-bank* rot-speed))) ;; og:preserve-this changed for high fps
)
((< (-> s5-0 y) (- (* (-> *display* time-adjust-ratio) (-> *CAM_BILLY-bank* rot-speed)))) ;; og:preserve-this changed for high fps
(set! (-> s5-0 y) (- (* (-> *display* time-adjust-ratio) (-> *CAM_BILLY-bank* rot-speed)))) ;; og:preserve-this changed for high fps
))
(set! (-> s3-0 x) (sin (the-as float 37319.11)))
(set! (-> s3-0 z) (cos (the-as float 37319.11)))
(set! (-> s4-0 x) (-> s3-0 z))
(set! (-> s4-0 z) (- (-> s3-0 x)))
(vector-flatten! s2-0 (-> self tracking inv-mat vector 2) (-> *camera* local-down))
(vector-normalize! s2-0 (the-as float 1.0))
(let ((f0-14 (acos (vector-dot (-> self tracking inv-mat vector 2) s3-0))))
(if (< (vector-dot (-> self tracking inv-mat vector 2) s4-0) 0.0) (set! f0-14 (- f0-14)))
(let ((f0-18 (cond
((and (< 0.0 f0-14) (< 0.0 (-> s5-0 y))) (fmin (-> s5-0 y) (fmax 0.0 (* 0.5 (- 10922.667 f0-14)))))
((and (< f0-14 0.0) (< (-> s5-0 y) 0.0)) (fmax (-> s5-0 y) (fmin 0.0 (* 0.5 (- -10922.667 f0-14)))))
(else (-> s5-0 y)))))
(matrix-axis-angle! gp-0 (-> *camera* local-down) f0-18)))
(vector-matrix*! (-> self tracking inv-mat vector 2) (-> self tracking inv-mat vector 2) gp-0))
(set! (-> self tracking inv-mat vector 2 y) 0.0)
(vector-normalize! (-> self tracking inv-mat vector 2) (cos (-> *CAM_BILLY-bank* tilt-degrees)))
(set! (-> self tracking inv-mat vector 2 y) (sin (-> *CAM_BILLY-bank* tilt-degrees)))
(vector-cross! (the-as vector (-> self tracking)) (-> self tracking inv-mat vector 2) (-> *camera* local-down))
(vector-normalize! (the-as vector (-> self tracking)) (the-as float 1.0))
(vector-cross! (-> self tracking inv-mat vector 1)
(-> self tracking inv-mat vector 2)
(the-as vector (-> self tracking))))
(vector--float*! (-> self trans) (-> *camera* tpos-curr) (-> *camera* local-down) (-> *camera* target-height))
(suspend))))
@@ -477,11 +486,12 @@
(if (not (logtest? (-> *camera* master-options) 2)) (cam-slave-go cam-free-floating)))
:code
(behavior ()
(loop (when (not (paused?))
(cam-calc-follow! (-> self tracking) (-> self trans) #t)
(new 'stack 'curve)
(set! (-> self trans quad) (-> self saved-pt quad))
(cam-curve-pos (-> self trans) (the-as vector #f) (the-as curve #f) #t))
(loop
(when (not (paused?))
(cam-calc-follow! (-> self tracking) (-> self trans) #t)
(new 'stack 'curve)
(set! (-> self trans quad) (-> self saved-pt quad))
(cam-curve-pos (-> self trans) (the-as vector #f) (the-as curve #f) #t))
(suspend))))
(defstate cam-decel (camera-slave)
@@ -495,24 +505,25 @@
(if (not (-> self enter-has-run)) (set! (-> self saved-pt quad) (-> self trans quad))))
:code
(behavior ()
(loop (when (not (paused?))
(let ((s5-0 (new-stack-vector0))
(gp-0 (new-stack-vector0)))
(when (!= (-> *camera* outro-t-step) 0.0)
(curve-get-pos! s5-0 (parameter-ease-sin-clamp (-> *camera* outro-t)) (-> *camera* outro-curve))
(+! (-> *camera* outro-t) (* (-> *camera* outro-t-step) (-> *display* time-adjust-ratio)))
(curve-get-pos! gp-0 (parameter-ease-sin-clamp (-> *camera* outro-t)) (-> *camera* outro-curve))
(vector-! gp-0 gp-0 s5-0)
(cond
((or (and (< (-> *camera* outro-t-step) 0.0) (>= (-> *camera* outro-exit-value) (-> *camera* outro-t)))
(and (< 0.0 (-> *camera* outro-t-step)) (>= (-> *camera* outro-t) (-> *camera* outro-exit-value))))
(set! (-> *camera* outro-t) (-> *camera* outro-exit-value))
(set! (-> *camera* outro-t-step) 0.0)
(vector+! (-> self velocity) (-> self velocity) gp-0)
(send-event *camera* 'outro-done))
(else (vector+! (-> self trans) (-> self trans) gp-0)))))
(vector-float*! (-> self velocity) (-> self velocity) 0.9)
(vector+! (-> self trans) (-> self trans) (-> self velocity)))
(loop
(when (not (paused?))
(let ((s5-0 (new-stack-vector0))
(gp-0 (new-stack-vector0)))
(when (!= (-> *camera* outro-t-step) 0.0)
(curve-get-pos! s5-0 (parameter-ease-sin-clamp (-> *camera* outro-t)) (-> *camera* outro-curve))
(+! (-> *camera* outro-t) (* (-> *camera* outro-t-step) (-> *display* time-adjust-ratio)))
(curve-get-pos! gp-0 (parameter-ease-sin-clamp (-> *camera* outro-t)) (-> *camera* outro-curve))
(vector-! gp-0 gp-0 s5-0)
(cond
((or (and (< (-> *camera* outro-t-step) 0.0) (>= (-> *camera* outro-exit-value) (-> *camera* outro-t)))
(and (< 0.0 (-> *camera* outro-t-step)) (>= (-> *camera* outro-t) (-> *camera* outro-exit-value))))
(set! (-> *camera* outro-t) (-> *camera* outro-exit-value))
(set! (-> *camera* outro-t-step) 0.0)
(vector+! (-> self velocity) (-> self velocity) gp-0)
(send-event *camera* 'outro-done))
(else (vector+! (-> self trans) (-> self trans) gp-0)))))
(vector-float*! (-> self velocity) (-> self velocity) 0.9)
(vector+! (-> self trans) (-> self trans) (-> self velocity)))
(suspend))))
(defstate cam-endlessfall (camera-slave)
@@ -538,17 +549,18 @@
(set! (-> s5-0 y) 0.0)
(init! gp-0 s4-0 (the-as float 81.92) (fmax 819.2 (vector-length s5-0)) (the-as float 0.75))
(set! (-> gp-0 vel quad) (-> s5-0 quad)))
(loop (when (not (paused?))
(set! (-> gp-0 target x) (-> (target-pos 0) x))
(set! (-> gp-0 target z) (-> (target-pos 0) z))
(update! gp-0 (the-as vector #f))
(when (< 819.2 (-> gp-0 max-vel))
(set! (-> gp-0 max-vel) (* 0.9 (-> gp-0 max-vel)))
(if (< (-> gp-0 max-vel) 819.2) (set! (-> gp-0 max-vel) 819.2)))
(set! f30-0 (* 0.9 f30-0))
(+! (-> self trans y) f30-0)
(set! (-> self trans x) (-> gp-0 value x))
(set! (-> self trans z) (-> gp-0 value z)))
(loop
(when (not (paused?))
(set! (-> gp-0 target x) (-> (target-pos 0) x))
(set! (-> gp-0 target z) (-> (target-pos 0) z))
(update! gp-0 (the-as vector #f))
(when (< 819.2 (-> gp-0 max-vel))
(set! (-> gp-0 max-vel) (* 0.9 (-> gp-0 max-vel)))
(if (< (-> gp-0 max-vel) 819.2) (set! (-> gp-0 max-vel) 819.2)))
(set! f30-0 (* 0.9 f30-0))
(+! (-> self trans y) f30-0)
(set! (-> self trans x) (-> gp-0 value x))
(set! (-> self trans z) (-> gp-0 value z)))
(suspend)))))
(defbehavior cam-circular-position-into-max-angle camera-slave ((arg0 vector) (arg1 vector) (arg2 float))
@@ -716,7 +728,8 @@
(if (not (logtest? (-> *camera* master-options) 2)) (cam-slave-go cam-free-floating)))
:code
(behavior ()
(loop (if (not (paused?)) (cam-circular-code))
(loop
(if (not (paused?)) (cam-circular-code))
(suspend))))
(defstate cam-lookat (camera-slave)
@@ -731,7 +744,8 @@
(if (not (logtest? (-> *camera* master-options) 2)) (cam-slave-go cam-free-floating)))
:code
(behavior ()
(loop (suspend))))
(loop
(suspend))))
(deftype cam-string-bank (basic)
((los-coll-rad meters)
@@ -750,7 +764,8 @@
(set! (-> s5-0 z) (+ 1024.0 (-> *CAMERA-bank* default-string-min-z))))
(vector--float*! s5-0 s5-0 (-> *camera* local-down) (-> *CAMERA-bank* default-string-min-y))
(set! (-> arg0 quad) (-> s5-0 quad))
(loop (vector--float*! s4-0 arg0 (-> *camera* local-down) (-> *camera* target-height))
(loop
(vector--float*! s4-0 arg0 (-> *camera* local-down) (-> *camera* target-height))
(if (< (fill-and-probe-using-line-sphere *collide-cache*
(-> *camera* tpos-curr-adj)
arg0
@@ -1703,11 +1718,12 @@
(if (not (logtest? (-> *camera* master-options) 2)) (cam-slave-go cam-free-floating)))
:code
(behavior ()
(loop (when (not (paused?))
(set-string-parms)
(cam-string-code)
(tracking-spline-method-9 (-> self position-spline))
(set! (-> self have-phony-joystick) #f))
(loop
(when (not (paused?))
(set-string-parms)
(cam-string-code)
(tracking-spline-method-9 (-> self position-spline))
(set! (-> self have-phony-joystick) #f))
(suspend))))
(deftype cam-stick-bank (basic)
@@ -1843,7 +1859,8 @@
(vector-matrix*! (-> self view-flat) (-> self view-flat) gp-0)))))))
:code
(behavior ()
(loop (if (not (paused?)) (cam-stick-code))
(loop
(if (not (paused?)) (cam-stick-code))
(suspend))))
(deftype cam-bike-bank (basic)
@@ -1954,7 +1971,8 @@
(if (not (logtest? (-> *camera* master-options) 2)) (cam-slave-go cam-free-floating)))
:code
(behavior ()
(loop (if (not (paused?)) (cam-bike-code))
(loop
(if (not (paused?)) (cam-bike-code))
(suspend))))
(define *camera-base-mode* cam-string)
+22 -21
View File
@@ -375,27 +375,28 @@
(set! (-> arg2 cur-pt) (-> this used-point))
(set! (-> arg2 partial-pt) (-> this partial-point)))
0.0
(loop (cond
((= (-> arg2 cur-pt) (-> this end-point))
(set! (-> arg2 partial-pt) 0.0)
(vector+! arg1 arg1 (the-as vector (-> this point (-> arg2 cur-pt))))
(return arg1))
((begin
(set! f0-4 (+ (-> arg2 partial-pt) (/ arg0 (-> this point (-> arg2 cur-pt) tp-length))))
(< f0-4 1.0))
(set! (-> arg2 partial-pt) f0-4)
(let ((s5-0 (new 'stack-no-clear 'tracking-spline-sampler)))
(let ((a2-5 (-> this point (-> arg2 cur-pt) next)))
(vector-lerp! (the-as vector s5-0)
(the-as vector (-> this point (-> arg2 cur-pt)))
(the-as vector (-> this point a2-5))
f0-4))
(vector+! arg1 arg1 (the-as vector s5-0)))
(return arg1))
(else
(let ((f0-7 (* (- 1.0 (-> arg2 partial-pt)) (-> this point (-> arg2 cur-pt) tp-length)))) (set! arg0 (- arg0 f0-7)))
(set! (-> arg2 partial-pt) 0.0)
(set! (-> arg2 cur-pt) (-> this point (-> arg2 cur-pt) next)))))
(loop
(cond
((= (-> arg2 cur-pt) (-> this end-point))
(set! (-> arg2 partial-pt) 0.0)
(vector+! arg1 arg1 (the-as vector (-> this point (-> arg2 cur-pt))))
(return arg1))
((begin
(set! f0-4 (+ (-> arg2 partial-pt) (/ arg0 (-> this point (-> arg2 cur-pt) tp-length))))
(< f0-4 1.0))
(set! (-> arg2 partial-pt) f0-4)
(let ((s5-0 (new 'stack-no-clear 'tracking-spline-sampler)))
(let ((a2-5 (-> this point (-> arg2 cur-pt) next)))
(vector-lerp! (the-as vector s5-0)
(the-as vector (-> this point (-> arg2 cur-pt)))
(the-as vector (-> this point a2-5))
f0-4))
(vector+! arg1 arg1 (the-as vector s5-0)))
(return arg1))
(else
(let ((f0-7 (* (- 1.0 (-> arg2 partial-pt)) (-> this point (-> arg2 cur-pt) tp-length)))) (set! arg0 (- arg0 f0-7)))
(set! (-> arg2 partial-pt) 0.0)
(set! (-> arg2 cur-pt) (-> this point (-> arg2 cur-pt) next)))))
(the-as vector #f))
(defmethod tracking-spline-method-19 ((this tracking-spline) (arg0 float) (arg1 vector) (arg2 tracking-spline-sampler))
+14 -12
View File
@@ -54,7 +54,8 @@
(ja-channel-push! 1 (seconds 0.2))
(ja :group! (-> self draw art-group data (-> self nav-info run-anim)))
(ja :num-func num-func-identity :frame-num 0.0)))
(loop (suspend)
(loop
(suspend)
(ja :num! (loop! f30-0))))))
(defstate nav-enemy-stare (babak)
@@ -70,17 +71,18 @@
(until (ja-done? 0)
(suspend)
(ja :num! (seek! (ja-aframe 68.0 0) f30-0))))
(loop (when (not (nav-enemy-facing-player? 2730.6667))
(logior! (-> self nav-enemy-flags) (nav-enemy-flags enable-travel))
(ja-no-eval :num! (loop!))
(ja-channel-push! 1 (seconds 0.2))
(ja :group! babak-turn-ja)
(ja :num-func num-func-identity :frame-num 0.0)
(until (nav-enemy-facing-player? 1820.4445)
(ja-blend-eval)
(suspend)
(ja :num! (loop! 0.75)))
(logclear! (-> self nav-enemy-flags) (nav-enemy-flags enable-travel)))
(loop
(when (not (nav-enemy-facing-player? 2730.6667))
(logior! (-> self nav-enemy-flags) (nav-enemy-flags enable-travel))
(ja-no-eval :num! (loop!))
(ja-channel-push! 1 (seconds 0.2))
(ja :group! babak-turn-ja)
(ja :num-func num-func-identity :frame-num 0.0)
(until (nav-enemy-facing-player? 1820.4445)
(ja-blend-eval)
(suspend)
(ja :num! (loop! 0.75)))
(logclear! (-> self nav-enemy-flags) (nav-enemy-flags enable-travel)))
(if (not (ja-group? babak-idle-ja)) (ja-channel-push! 1 (seconds 0.2)))
(ja-no-eval :group! babak-idle-ja :num! (seek! max f30-0) :frame-num 0.0)
(until (ja-done? 0)
+21 -18
View File
@@ -80,10 +80,11 @@
(suspend)
(transform-post)
(suspend)
(loop (when (not (-> self bouncing))
(logior! (-> self mask) (process-mask sleep))
(suspend)
0)
(loop
(when (not (-> self bouncing))
(logior! (-> self mask) (process-mask sleep))
(suspend)
0)
(while (-> self bouncing)
(suspend)))
(none))
@@ -159,14 +160,15 @@ eco-door-event-handler
(suspend)
(update-transforms! (-> self root))
(ja-post)
(loop (when (and *target* (>= (-> self open-distance) (vector-vector-distance (-> self root trans) (-> *target* control trans))))
(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))
(and (-> self one-way) (< (vector4-dot (-> self out-dir) (target-pos 0)) -8192.0))))
(go-virtual door-opening))
(level-hint-spawn (text-id zero) (the-as string #f) (-> self entity) *entity-pool* (game-task none)))
(loop
(when (and *target* (>= (-> self open-distance) (vector-vector-distance (-> self root trans) (-> *target* control trans))))
(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))
(and (-> self one-way) (< (vector4-dot (-> self out-dir) (target-pos 0)) -8192.0))))
(go-virtual door-opening))
(level-hint-spawn (text-id zero) (the-as string #f) (-> self entity) *entity-pool* (game-task none)))
(suspend))))
(defstate door-opening (eco-door)
@@ -199,12 +201,13 @@ eco-door-event-handler
(suspend)
(update-transforms! (-> self root))
(ja-post)
(loop (let ((f30-0 (vector4-dot (-> self out-dir) (target-pos 0)))
(f28-0 (vector4-dot (-> self out-dir) (camera-pos))))
(when (and (-> self auto-close)
(or (not *target*)
(< (-> self close-distance) (vector-vector-distance (-> self root trans) (-> *target* control trans)))))
(if (and (>= (* f30-0 f28-0) 0.0) (< 16384.0 (fabs f28-0))) (go-virtual door-closing))))
(loop
(let ((f30-0 (vector4-dot (-> self out-dir) (target-pos 0)))
(f28-0 (vector4-dot (-> self out-dir) (camera-pos))))
(when (and (-> self auto-close)
(or (not *target*)
(< (-> self close-distance) (vector-vector-distance (-> self root trans) (-> *target* control trans)))))
(if (and (>= (* f30-0 f28-0) 0.0) (< 16384.0 (fabs f28-0))) (go-virtual door-closing))))
(suspend))))
(defstate door-closing (eco-door)
+45 -36
View File
@@ -383,19 +383,20 @@
(update-transforms! (-> self root)))
:code
(behavior ()
(loop (let ((gp-0 (-> self part))
(s5-0 (-> self root root-prim prim-core)))
(when (and (logtest? (-> self flags) (collectable-flags fade)) (time-elapsed? (-> self birth-time) (-> self fadeout-timeout)))
(let ((v1-10 (- (seconds 1) (- (- (current-time) (-> self birth-time)) (-> self fadeout-timeout)))))
(cond
((< v1-10 0) (process-entity-status! self (entity-perm-status dead) #t) (deactivate self))
(else
(logclear! (-> self mask) (process-mask actor-pause))
(set! (-> self actor-pause) #f)
(logior! (-> self flags) (collectable-flags fading))
(logior! (-> self state-flags) (state-flags fade-out-particles))
(set! (-> gp-0 fade) (* 0.0033333334 (the float v1-10)))))))
(spawn gp-0 (the-as vector s5-0)))
(loop
(let ((gp-0 (-> self part))
(s5-0 (-> self root root-prim prim-core)))
(when (and (logtest? (-> self flags) (collectable-flags fade)) (time-elapsed? (-> self birth-time) (-> self fadeout-timeout)))
(let ((v1-10 (- (seconds 1) (- (- (current-time) (-> self birth-time)) (-> self fadeout-timeout)))))
(cond
((< v1-10 0) (process-entity-status! self (entity-perm-status dead) #t) (deactivate self))
(else
(logclear! (-> self mask) (process-mask actor-pause))
(set! (-> self actor-pause) #f)
(logior! (-> self flags) (collectable-flags fading))
(logior! (-> self state-flags) (state-flags fade-out-particles))
(set! (-> gp-0 fade) (* 0.0033333334 (the float v1-10)))))))
(spawn gp-0 (the-as vector s5-0)))
(if (nonzero? (-> self sound)) (update! (-> self sound)))
(suspend))))
@@ -432,7 +433,8 @@
(go-virtual wait))))
:code
(behavior ((arg0 handle))
(loop (set! (-> self root trans quad) (-> self base quad))
(loop
(set! (-> self root trans quad) (-> self base quad))
(add-blue-motion #t #f #t #f)
(update-transforms! (-> self root))
(if (nonzero? (-> self draw)) (ja-post))
@@ -685,7 +687,8 @@
:virtual #t
:code
(behavior ()
(loop (quaternion-rotate-y! (-> self root quat) (-> self root quat) (* 40049.777 (seconds-per-frame)))
(loop
(quaternion-rotate-y! (-> self root quat) (-> self root quat) (* 40049.777 (seconds-per-frame)))
(let ((f30-0 (-> self bob-amount)))
(when (< 0.0 f30-0)
(set! (-> self root trans y)
@@ -703,7 +706,8 @@
:virtual #t
:code
(behavior ((arg0 handle))
(loop (quaternion-rotate-y! (-> self root quat) (-> self root quat) (* 91022.22 (seconds-per-frame)))
(loop
(quaternion-rotate-y! (-> self root quat) (-> self root quat) (* 91022.22 (seconds-per-frame)))
(set! (-> self root trans quad) (-> self base quad))
(add-blue-motion #t #t #t #f)
(let ((f30-0 (-> self bob-amount)))
@@ -912,17 +916,18 @@
0.5
(let ((f28-0 0.0))
(ja :group! fuel-cell-idle-ja)
(loop (let ((f30-0 (vector-vector-distance (-> self base) (target-pos 0))))
(set! f28-0
(if (and (< f30-0 (-> *FACT-bank* suck-suck-dist)) (not (logtest? (-> self flags) (collectable-flags anim))))
(seek f28-0 (the-as float 16384.0) (* 3072.0 (seconds-per-frame)))
(seek f28-0 (the-as float 0.0) (* 3072.0 (seconds-per-frame)))))
(set! (-> self root trans y) (+ (-> self base y) (* 2867.2 (sin f28-0))))
(let ((f30-1 (lerp-scale (the-as float 0.6) (the-as float 0.5) f30-0 (the-as float 8192.0) (-> *FACT-bank* suck-suck-dist))))
(transform-post)
(fuel-cell-animate)
(suspend)
(ja :num! (loop! f30-1))))))))
(loop
(let ((f30-0 (vector-vector-distance (-> self base) (target-pos 0))))
(set! f28-0
(if (and (< f30-0 (-> *FACT-bank* suck-suck-dist)) (not (logtest? (-> self flags) (collectable-flags anim))))
(seek f28-0 (the-as float 16384.0) (* 3072.0 (seconds-per-frame)))
(seek f28-0 (the-as float 0.0) (* 3072.0 (seconds-per-frame)))))
(set! (-> self root trans y) (+ (-> self base y) (* 2867.2 (sin f28-0))))
(let ((f30-1 (lerp-scale (the-as float 0.6) (the-as float 0.5) f30-0 (the-as float 8192.0) (-> *FACT-bank* suck-suck-dist))))
(transform-post)
(fuel-cell-animate)
(suspend)
(ja :num! (loop! f30-1))))))))
(defstate pickup (fuel-cell)
:virtual #t
@@ -1241,7 +1246,8 @@
(behavior ()
(case (get-reminder (get-task-control (the-as game-task (logand (the int (-> self fact pickup-amount)) #xffff))) 0)
((127) (go-virtual pickup #t (the-as handle #f))))
(loop (transform-post)
(loop
(transform-post)
(animate self)
(suspend))))
@@ -1578,8 +1584,9 @@
(transform-post)
(suspend)
(transform-post)
(loop (if (not ((-> self block-func) (the-as vent (ppointer->process (-> self parent)))))
(set-vector! (-> self offset-target) 0.0 0.0 0.0 1.0))
(loop
(if (not ((-> self block-func) (the-as vent (ppointer->process (-> self parent)))))
(set-vector! (-> self offset-target) 0.0 0.0 0.0 1.0))
(when (!= (-> self offset-target y) (-> self offset y))
(vector-seek! (-> self offset) (-> self offset-target) (* 4096.0 (seconds-per-frame)))
(move-to-point! (-> self root)
@@ -1718,11 +1725,12 @@
(vent-standard-event-handler proc argc message block))
:code
(behavior ()
(loop (let ((a0-0 (-> self part))
(a1-0 (-> self root trans))
(gp-0 (-> self sound)))
(if (and (nonzero? a0-0) (-> self show-particles)) (spawn a0-0 a1-0))
(if (nonzero? gp-0) (update! gp-0)))
(loop
(let ((a0-0 (-> self part))
(a1-0 (-> self root trans))
(gp-0 (-> self sound)))
(if (and (nonzero? a0-0) (-> self show-particles)) (spawn a0-0 a1-0))
(if (nonzero? gp-0) (update! gp-0)))
(suspend))))
(defstate vent-blocked (vent)
@@ -1732,7 +1740,8 @@
(('show) (go vent-wait-for-touch))))
:code
(behavior ()
(loop (if (not ((-> self block-func) self)) (go vent-wait-for-touch))
(loop
(if (not ((-> self block-func) self)) (go vent-wait-for-touch))
(suspend))))
(defstate vent-pickup (vent)
+36 -32
View File
@@ -546,7 +546,8 @@
(suspend)
(update-transforms! (-> self root))
(logior! (-> self mask) (process-mask sleep))
(loop (suspend)))
(loop
(suspend)))
:post ja-post)
(defstate bounce-on (crate)
@@ -572,34 +573,35 @@
:code
(behavior ((arg0 handle))
(set! (-> self target) arg0)
(loop (let* ((gp-0 (handle->process (-> self target)))
(v1-4 (if (and (nonzero? gp-0) (type-type? (-> gp-0 type) process-drawable)) gp-0)))
(when v1-4
(let* ((gp-1 (-> (the-as process-drawable v1-4) root))
(v1-6 (if (and (nonzero? gp-1) (type-type? (-> gp-1 type) collide-shape)) gp-1)))
(when v1-6
(let* ((gp-2 (-> self root root-prim prim-core))
(a1-3 (-> (the-as collide-shape v1-6) root-prim prim-core))
(f30-0 (vector-vector-distance (the-as vector gp-2) (the-as vector a1-3))))
(when (and (< f30-0 (-> *FACT-bank* suck-suck-dist)) (!= (-> self defense) 'steel))
(logior! (-> self fact options) (fact-options can-collect))
(go-virtual die #f 0))
(when (rand-vu-percent? 0.5)
(let ((s5-0 (new 'stack-no-clear 'vector)))
(set! (-> s5-0 quad) (-> gp-2 world-sphere quad))
(dotimes (gp-3 3)
(+! (-> s5-0 data gp-3) (rand-vu-float-range -5324.8 5324.8)))
(eco-blue-glow s5-0)))
(activate! (-> self smush)
(lerp-scale (rand-vu-float-range 0.1 0.3)
(rand-vu-float-range 0.0 0.02)
f30-0
(-> *FACT-bank* suck-suck-dist)
(-> *FACT-bank* suck-bounce-dist))
60
60
1.0
1.0))))))
(loop
(let* ((gp-0 (handle->process (-> self target)))
(v1-4 (if (and (nonzero? gp-0) (type-type? (-> gp-0 type) process-drawable)) gp-0)))
(when v1-4
(let* ((gp-1 (-> (the-as process-drawable v1-4) root))
(v1-6 (if (and (nonzero? gp-1) (type-type? (-> gp-1 type) collide-shape)) gp-1)))
(when v1-6
(let* ((gp-2 (-> self root root-prim prim-core))
(a1-3 (-> (the-as collide-shape v1-6) root-prim prim-core))
(f30-0 (vector-vector-distance (the-as vector gp-2) (the-as vector a1-3))))
(when (and (< f30-0 (-> *FACT-bank* suck-suck-dist)) (!= (-> self defense) 'steel))
(logior! (-> self fact options) (fact-options can-collect))
(go-virtual die #f 0))
(when (rand-vu-percent? 0.5)
(let ((s5-0 (new 'stack-no-clear 'vector)))
(set! (-> s5-0 quad) (-> gp-2 world-sphere quad))
(dotimes (gp-3 3)
(+! (-> s5-0 data gp-3) (rand-vu-float-range -5324.8 5324.8)))
(eco-blue-glow s5-0)))
(activate! (-> self smush)
(lerp-scale (rand-vu-float-range 0.1 0.3)
(rand-vu-float-range 0.0 0.02)
f30-0
(-> *FACT-bank* suck-suck-dist)
(-> *FACT-bank* suck-bounce-dist))
60
60
1.0
1.0))))))
(suspend)))
:post crate-post)
@@ -940,7 +942,8 @@
(set-time! (-> self state-time))
(suspend)
(update-transforms! (-> self root))
(loop (set-time! (-> self state-time))
(loop
(set-time! (-> self state-time))
(ja-post)
(logior! (-> self mask) (process-mask sleep-code))
(suspend)
@@ -988,6 +991,7 @@
:virtual #t
:code
(behavior ()
(loop (if (or (not (-> self blocker)) (logtest? (-> self blocker extra perm status) (entity-perm-status complete)))
(go-virtual die #t 0))
(loop
(if (or (not (-> self blocker)) (logtest? (-> self blocker extra perm status) (entity-perm-status complete)))
(go-virtual die #t 0))
(suspend))))
+59 -53
View File
@@ -85,11 +85,12 @@
(defstate swingpole-stance (swingpole)
:code
(behavior ()
(loop (when (and *target*
(< (vector-vector-distance (-> self root trans) (-> *target* control unknown-vector90)) (-> self range))
(logtest? (-> *target* control root-prim prim-core action) (collide-action edgegrab-possible))
(< (-> *target* control unknown-vector90 y) (+ (-> self root trans y) (* 0.5 (-> self range)))))
(if (send-event *target* 'pole-grab self) (go swingpole-active)))
(loop
(when (and *target*
(< (vector-vector-distance (-> self root trans) (-> *target* control unknown-vector90)) (-> self range))
(logtest? (-> *target* control root-prim prim-core action) (collide-action edgegrab-possible))
(< (-> *target* control unknown-vector90 y) (+ (-> self root trans y) (* 0.5 (-> self range)))))
(if (send-event *target* 'pole-grab self) (go swingpole-active)))
(suspend))))
(defstate swingpole-active (swingpole)
@@ -255,7 +256,8 @@
:code
(behavior ()
(logclear! (-> self mask) (process-mask heap-shrunk))
(loop ((-> self cur-post-hook))
(loop
((-> self cur-post-hook))
(if (!= (-> self anim-mode) 'clone-anim) (ja-post))
(suspend)
(case (-> self anim-mode)
@@ -697,19 +699,20 @@
(vf16 :class vf)
(vf17 :class vf))
(init-vf0-vector)
(loop (let ((a0-1 (level-get *level* (-> self level)))
(v1-3 (-> *game-info* current-continue level)))
(cond
((and a0-1 (or (= (-> a0-1 display?) 'special) (= (-> a0-1 display?) 'special-vis)))
(logclear! (-> self draw status) (draw-status hidden))
(if (nonzero? (-> self skel)) (ja :num! (loop!))))
((or (and a0-1 (= (-> a0-1 status) 'active)) (= v1-3 'firecanyon)) (logior! (-> self draw status) (draw-status hidden)))
((and (= (-> self level) 'firecanyon) (< (-> (camera-pos) y) 327680.0))
(logior! (-> self draw status) (draw-status hidden)))
(else
(logclear! (-> self draw status) (draw-status hidden))
(if (nonzero? (-> self part)) (spawn (-> self part) (-> self root trans)))
(if (nonzero? (-> self skel)) (ja :num! (loop!))))))
(loop
(let ((a0-1 (level-get *level* (-> self level)))
(v1-3 (-> *game-info* current-continue level)))
(cond
((and a0-1 (or (= (-> a0-1 display?) 'special) (= (-> a0-1 display?) 'special-vis)))
(logclear! (-> self draw status) (draw-status hidden))
(if (nonzero? (-> self skel)) (ja :num! (loop!))))
((or (and a0-1 (= (-> a0-1 status) 'active)) (= v1-3 'firecanyon)) (logior! (-> self draw status) (draw-status hidden)))
((and (= (-> self level) 'firecanyon) (< (-> (camera-pos) y) 327680.0))
(logior! (-> self draw status) (draw-status hidden)))
(else
(logclear! (-> self draw status) (draw-status hidden))
(if (nonzero? (-> self part)) (spawn (-> self part) (-> self root trans)))
(if (nonzero? (-> self skel)) (ja :num! (loop!))))))
(when (not (logtest? (-> self draw status) (draw-status hidden)))
(let ((v1-36 (-> self draw))
(a0-18 (new 'stack-no-clear 'vector)))
@@ -777,9 +780,10 @@
v0-1))))
:code
(behavior ()
(loop (when (-> self enable)
(spawn (-> self part) (-> self root trans))
(if (nonzero? (-> self sound)) (update! (-> self sound))))
(loop
(when (-> self enable)
(spawn (-> self part) (-> self root trans))
(if (nonzero? (-> self sound)) (update! (-> self sound))))
(suspend))))
(defmethod init-from-entity! ((this part-spawner) (arg0 entity-actor))
@@ -1100,11 +1104,12 @@
:code
(behavior ()
(let ((gp-0 (current-time)))
(loop (when (not (paused?))
(vector--float*! (-> self trans) (-> *camera* tpos-curr) (-> *camera* local-down) 28672.0)
(send-event *camera* 'teleport)
(if (and (-> *camera* on-ground) (time-elapsed? gp-0 (seconds 1)))
(send-event *camera* 'change-state *camera-base-mode* (seconds 0.5))))
(loop
(when (not (paused?))
(vector--float*! (-> self trans) (-> *camera* tpos-curr) (-> *camera* local-down) 28672.0)
(send-event *camera* 'teleport)
(if (and (-> *camera* on-ground) (time-elapsed? gp-0 (seconds 1)))
(send-event *camera* 'change-state *camera-base-mode* (seconds 0.5))))
(suspend)))))
;; og:preserve-this
@@ -1146,32 +1151,33 @@
:code
(behavior ()
(let ((gp-0 (current-time)))
(loop (when (not (paused?))
(let ((s4-0 (new 'stack-no-clear 'vector))
(s5-0 (new 'stack-no-clear 'vector)))
0.0
0.0
0.0
(send-event *camera* 'teleport)
(let* ((f0-4 (vector-dot (-> self velocity) (-> *camera* local-down)))
(f30-0 (* 0.975 f0-4)))
(vector--float*! s4-0 (-> *camera* tpos-curr) (-> *camera* local-down) 28672.0)
(vector-! s4-0 s4-0 (-> self trans))
(let ((f28-0 (vector-dot s4-0 (-> *camera* local-down))))
(vector--float*! s5-0 s4-0 (-> *camera* local-down) f28-0)
(cond
((< f28-0 f30-0) (set! f30-0 f28-0))
((< 20480.0 f28-0)
(let ((f28-1 (+ -20480.0 f28-0)))
(let ((f0-8 (lerp f30-0 f28-1 0.005))) (if (< f30-0 f0-8) (set! f30-0 f0-8)))
(if (< (* 0.09 f28-1) f30-0) (set! f30-0 (* 0.09 f28-1)))))))
(vector+float*! (-> self velocity) s5-0 (-> *camera* local-down) f30-0)))
(vector+! (-> self trans) (-> self trans) (-> self velocity))
(set! (-> self trans x) (-> *camera* tpos-curr x))
(set! (-> self trans z) (-> *camera* tpos-curr z))
(vector+! (-> self trans) (-> self trans) (-> self view-flat))
(if (and (-> *camera* on-ground) (time-elapsed? gp-0 (seconds 1)))
(send-event *camera* 'change-state *camera-base-mode* (seconds 0.5))))
(loop
(when (not (paused?))
(let ((s4-0 (new 'stack-no-clear 'vector))
(s5-0 (new 'stack-no-clear 'vector)))
0.0
0.0
0.0
(send-event *camera* 'teleport)
(let* ((f0-4 (vector-dot (-> self velocity) (-> *camera* local-down)))
(f30-0 (* 0.975 f0-4)))
(vector--float*! s4-0 (-> *camera* tpos-curr) (-> *camera* local-down) 28672.0)
(vector-! s4-0 s4-0 (-> self trans))
(let ((f28-0 (vector-dot s4-0 (-> *camera* local-down))))
(vector--float*! s5-0 s4-0 (-> *camera* local-down) f28-0)
(cond
((< f28-0 f30-0) (set! f30-0 f28-0))
((< 20480.0 f28-0)
(let ((f28-1 (+ -20480.0 f28-0)))
(let ((f0-8 (lerp f30-0 f28-1 0.005))) (if (< f30-0 f0-8) (set! f30-0 f0-8)))
(if (< (* 0.09 f28-1) f30-0) (set! f30-0 (* 0.09 f28-1)))))))
(vector+float*! (-> self velocity) s5-0 (-> *camera* local-down) f30-0)))
(vector+! (-> self trans) (-> self trans) (-> self velocity))
(set! (-> self trans x) (-> *camera* tpos-curr x))
(set! (-> self trans z) (-> *camera* tpos-curr z))
(vector+! (-> self trans) (-> self trans) (-> self view-flat))
(if (and (-> *camera* on-ground) (time-elapsed? gp-0 (seconds 1)))
(send-event *camera* 'change-state *camera-base-mode* (seconds 0.5))))
(vector-reset! (-> self tracking follow-off))
(vector+! (-> self tracking follow-pt) (-> *camera* tpos-curr-adj) (-> self tracking follow-off))
(vector--float*! (-> self tracking follow-pt)
+4 -2
View File
@@ -549,7 +549,8 @@ nav-enemy-default-event-handler
:code
(behavior ()
(let ((f30-0 (nav-enemy-rnd-float-range 0.9 1.1)))
(loop (ja-no-eval :group! (-> self draw art-group data (-> self nav-info walk-anim)) :num! (seek! max f30-0) :frame-num 0.0)
(loop
(ja-no-eval :group! (-> self draw art-group data (-> self nav-info walk-anim)) :num! (seek! max f30-0) :frame-num 0.0)
(until (ja-done? 0)
(suspend)
(ja :num! (seek! max f30-0)))
@@ -630,7 +631,8 @@ nav-enemy-default-event-handler
(suspend)
(ja :num! (seek! max f30-0)))
(ja-channel-push! 1 (seconds 0.2))
(loop (ja-no-eval :group! (-> self draw art-group data (-> self nav-info idle-anim)) :num! (seek! max f30-0) :frame-num 0.0)
(loop
(ja-no-eval :group! (-> self draw art-group data (-> self nav-info idle-anim)) :num! (seek! max f30-0) :frame-num 0.0)
(until (ja-done? 0)
(suspend)
(ja :num! (seek! max f30-0))))))
+2 -1
View File
@@ -140,7 +140,8 @@
(set! (-> self money-pos-actual s5-1) (-> s4-1 y))
(set! (-> self money-list s5-1)
(ppointer->handle (process-spawn money :init money-init-by-other-no-bob s4-1 *null-vector* 5 1.0 (-> self entity) :to self)))))
(loop (calculate-pos self #t)
(loop
(calculate-pos self #t)
(while (not (or (not *target*)
(< (-> self inactive-distance) (vector-vector-xz-distance (-> self root trans) (-> *target* control trans)))))
(pos-logic self #t)
@@ -67,7 +67,8 @@
(behavior ()
(let ((gp-0 (can-activate? self)))
(if gp-0 (ja-no-eval :num! (seek! 0.0)) (ja-no-eval :num! (seek!)))
(loop (if (should-teleport? self) (go-virtual plat-button-teleport-to-other-end))
(loop
(if (should-teleport? self) (go-virtual plat-button-teleport-to-other-end))
(let ((s5-0 (can-activate? self)))
(when (!= s5-0 gp-0)
(set! gp-0 s5-0)
@@ -226,8 +227,9 @@
(if (-> self allow-auto-kill) (process-entity-status! self (entity-perm-status bit-3) #f))
(sound-stop (-> self sound-id))
(sound-play "elev-land")
(loop (if (or (not *target*) (< 268435460.0 (vector-vector-xz-distance-squared (-> self root trans) (target-pos 0))))
(go-virtual plat-button-idle))
(loop
(if (or (not *target*) (< 268435460.0 (vector-vector-xz-distance-squared (-> self root trans) (target-pos 0))))
(go-virtual plat-button-idle))
(suspend))))
(defmethod plat-button-method-28 ((this plat-button))
+27 -26
View File
@@ -93,32 +93,33 @@
:code
(behavior ((arg0 handle))
(set! (-> self target) arg0)
(loop (let* ((gp-0 (handle->process (-> self target)))
(v1-4 (if (and (nonzero? gp-0) (type-type? (-> gp-0 type) process-drawable)) gp-0)))
(when v1-4
(let* ((gp-1 (-> (the-as process-drawable v1-4) root))
(v1-6 (if (and (nonzero? gp-1) (type-type? (-> gp-1 type) collide-shape)) gp-1)))
(when v1-6
(let* ((s5-0 (-> self root root-prim prim-core))
(a1-3 (-> (the-as collide-shape v1-6) root-prim prim-core))
(f30-0 (vector-vector-distance (the-as vector s5-0) (the-as vector a1-3))))
(when (rand-vu-percent? 0.5)
(let ((gp-2 (new 'stack-no-clear 'vector)))
(set! (-> gp-2 quad) (-> s5-0 world-sphere quad))
(dotimes (s5-1 3)
(+! (-> gp-2 data s5-1) (rand-vu-float-range -5324.8 5324.8)))
(eco-blue-glow gp-2)))
(set! (-> self bouncing) #t)
(activate! (-> self smush)
(lerp-scale (rand-vu-float-range 1.1 1.3)
(rand-vu-float-range 1.0 1.02)
f30-0
(-> *FACT-bank* suck-suck-dist)
(-> *FACT-bank* suck-bounce-dist))
60
60
1.0
1.0))))))
(loop
(let* ((gp-0 (handle->process (-> self target)))
(v1-4 (if (and (nonzero? gp-0) (type-type? (-> gp-0 type) process-drawable)) gp-0)))
(when v1-4
(let* ((gp-1 (-> (the-as process-drawable v1-4) root))
(v1-6 (if (and (nonzero? gp-1) (type-type? (-> gp-1 type) collide-shape)) gp-1)))
(when v1-6
(let* ((s5-0 (-> self root root-prim prim-core))
(a1-3 (-> (the-as collide-shape v1-6) root-prim prim-core))
(f30-0 (vector-vector-distance (the-as vector s5-0) (the-as vector a1-3))))
(when (rand-vu-percent? 0.5)
(let ((gp-2 (new 'stack-no-clear 'vector)))
(set! (-> gp-2 quad) (-> s5-0 world-sphere quad))
(dotimes (s5-1 3)
(+! (-> gp-2 data s5-1) (rand-vu-float-range -5324.8 5324.8)))
(eco-blue-glow gp-2)))
(set! (-> self bouncing) #t)
(activate! (-> self smush)
(lerp-scale (rand-vu-float-range 1.1 1.3)
(rand-vu-float-range 1.0 1.02)
f30-0
(-> *FACT-bank* suck-suck-dist)
(-> *FACT-bank* suck-bounce-dist))
60
60
1.0
1.0))))))
(suspend)))
:post
(behavior ()
+7 -6
View File
@@ -145,12 +145,13 @@
(plat-trans)
(rider-post)
(suspend)
(loop (when (not (-> self bouncing))
(plat-trans)
(rider-post)
(logior! (-> self mask) (process-mask sleep-code))
(suspend)
0)
(loop
(when (not (-> self bouncing))
(plat-trans)
(rider-post)
(logior! (-> self mask) (process-mask sleep-code))
(suspend)
0)
(while (-> self bouncing)
(plat-trans)
(rider-post)
@@ -311,12 +311,13 @@
:code
(behavior ((arg0 string))
(logior! (-> self entity extra perm status) (entity-perm-status bit-1))
(loop (when *display-entity-errors*
(let ((s5-0 add-debug-text-3d)
(s4-0 #t)
(s3-0 68))
(format (clear *temp-string*) "~2j~s art error for ~s" arg0 (-> self name))
(s5-0 s4-0 (the-as bucket-id s3-0) *temp-string* (-> self root trans) (font-color red) (the-as vector2h #f))))
(loop
(when *display-entity-errors*
(let ((s5-0 add-debug-text-3d)
(s4-0 #t)
(s3-0 68))
(format (clear *temp-string*) "~2j~s art error for ~s" arg0 (-> self name))
(s5-0 s4-0 (the-as bucket-id s3-0) *temp-string* (-> self root trans) (font-color red) (the-as vector2h #f))))
(suspend))
(none)))
@@ -674,7 +675,8 @@
(defbehavior anim-loop process-drawable ()
(logior! (-> self mask) (process-mask sleep-code))
(loop (nop!)
(loop
(nop!)
(suspend))
(none))
@@ -171,7 +171,8 @@
(when (!= (ja-group) (get-art-elem self))
(ja-channel-push! 1 (seconds 0.2))
(ja :group! (get-art-elem self)))
(loop (suspend)
(loop
(suspend)
(ja :num! (loop!))
(if (= (-> self next-state name) 'idle) (process-taskable-method-43 self)))
(the-as none 0)
@@ -764,36 +765,37 @@
(apply-settings *setting-control*))
:code
(behavior ()
(loop (let ((s2-0 (-> self hand process 0)))
(when (not s2-0)
(format #t "ERROR<GMJ>: othercam parent invalid~%")
(deactivate self))
(set! (-> *camera-other-root* quad) (-> (the-as process-taskable s2-0) root trans quad))
(let ((s4-0 (-> (the-as process-taskable s2-0) node-list data (-> self cam-joint-index) bone transform))
(s3-0 (-> (the-as process-taskable s2-0) node-list data (-> self cam-joint-index) bone scale))
(gp-0 (new 'stack-no-clear 'vector))
(s5-0 (new 'stack-no-clear 'vector))
(s1-0 (or (!= (-> self spooling?) #t) (logtest? (-> (the-as process-taskable s2-0) skel status) (janim-status spool)))))
(vector<-cspace! s5-0 (-> (the-as process-taskable s2-0) node-list data (-> self cam-joint-index)))
(vector-normalize-copy! gp-0 (-> s4-0 vector 2) -1.0)
(when s1-0
(when (not (-> self had-valid-frame))
(set! (-> self had-valid-frame) #t)
(set! (-> self old-pos quad) (-> s5-0 quad))
(set! (-> self old-mat-z quad) (-> gp-0 quad)))
(when #t
(set! (-> *camera-other-trans* quad) (-> s5-0 quad))
(vector-normalize-copy! (the-as vector (-> *camera-other-matrix* vector)) (the-as vector (-> s4-0 vector)) -1.0)
(set! (-> *camera-other-matrix* vector 0 w) 0.0)
(vector-normalize-copy! (-> *camera-other-matrix* vector 1) (-> s4-0 vector 1) 1.0)
(set! (-> *camera-other-matrix* vector 1 w) 0.0)
(vector-normalize-copy! (-> *camera-other-matrix* vector 2) (-> s4-0 vector 2) -1.0)
(set! (-> *camera-other-matrix* vector 2 w) 0.0)
(vector-reset! (-> *camera-other-matrix* vector 3))
(othercam-calc (-> s3-0 x)))
(set! *camera-look-through-other* 2)
(set! (-> self old-pos quad) (-> s5-0 quad))
(set! (-> self old-mat-z quad) (-> gp-0 quad)))))
(loop
(let ((s2-0 (-> self hand process 0)))
(when (not s2-0)
(format #t "ERROR<GMJ>: othercam parent invalid~%")
(deactivate self))
(set! (-> *camera-other-root* quad) (-> (the-as process-taskable s2-0) root trans quad))
(let ((s4-0 (-> (the-as process-taskable s2-0) node-list data (-> self cam-joint-index) bone transform))
(s3-0 (-> (the-as process-taskable s2-0) node-list data (-> self cam-joint-index) bone scale))
(gp-0 (new 'stack-no-clear 'vector))
(s5-0 (new 'stack-no-clear 'vector))
(s1-0 (or (!= (-> self spooling?) #t) (logtest? (-> (the-as process-taskable s2-0) skel status) (janim-status spool)))))
(vector<-cspace! s5-0 (-> (the-as process-taskable s2-0) node-list data (-> self cam-joint-index)))
(vector-normalize-copy! gp-0 (-> s4-0 vector 2) -1.0)
(when s1-0
(when (not (-> self had-valid-frame))
(set! (-> self had-valid-frame) #t)
(set! (-> self old-pos quad) (-> s5-0 quad))
(set! (-> self old-mat-z quad) (-> gp-0 quad)))
(when #t
(set! (-> *camera-other-trans* quad) (-> s5-0 quad))
(vector-normalize-copy! (the-as vector (-> *camera-other-matrix* vector)) (the-as vector (-> s4-0 vector)) -1.0)
(set! (-> *camera-other-matrix* vector 0 w) 0.0)
(vector-normalize-copy! (-> *camera-other-matrix* vector 1) (-> s4-0 vector 1) 1.0)
(set! (-> *camera-other-matrix* vector 1 w) 0.0)
(vector-normalize-copy! (-> *camera-other-matrix* vector 2) (-> s4-0 vector 2) -1.0)
(set! (-> *camera-other-matrix* vector 2 w) 0.0)
(vector-reset! (-> *camera-other-matrix* vector 3))
(othercam-calc (-> s3-0 x)))
(set! *camera-look-through-other* 2)
(set! (-> self old-pos quad) (-> s5-0 quad))
(set! (-> self old-mat-z quad) (-> gp-0 quad)))))
(suspend)
(let ((a0-25 (-> self hand process 0)))
(when (or (-> self die?) (and (not (-> self survive-anim-end?)) (ja-anim-done? a0-25)))
@@ -419,7 +419,8 @@
(go-virtual rigid-body-platform-float)))
:code
(behavior ()
(loop (suspend)))
(loop
(suspend)))
:post ja-post)
(defstate rigid-body-platform-float (rigid-body-platform)
@@ -432,7 +433,8 @@
(go-virtual rigid-body-platform-idle)))
:code
(behavior ()
(loop (suspend)))
(loop
(suspend)))
:post rigid-body-platform-post)
(defmethod rigid-body-platform-method-29 ((this rigid-body-platform) (arg0 rigid-body-platform-constants))
+16 -13
View File
@@ -593,7 +593,8 @@
(set-vel-from-impact self (+ s5-1 1) gp-1 1 f30-0))))))
:code
(behavior ()
(loop (suspend)
(loop
(suspend)
(detect-riders! (-> self root))
(when (-> self do-physics?)
(clear-spring-forces self)
@@ -621,12 +622,13 @@
;; WARN: Function (method 20 ropebridge) has a return type of none, but the expression builder found a return statement.
(defmethod set-vel-from-impact ((this ropebridge) (arg0 uint) (arg1 vector) (arg2 int) (arg3 float))
(loop (let ((f0-2 (fabs (- (-> arg1 z) (-> this spring-point (the-as int arg0) local-pos z)))))
(if (< (-> this tuning max-bonk-influence-dist) f0-2) (return #f))
(let* ((f0-4 (/ (* 8.0 f0-2) (-> this tuning max-bonk-influence-dist)))
(f0-5 (+ 1.0 f0-4))
(f0-6 (/ 1.0 f0-5)))
(set! (-> this spring-point (the-as int arg0) vel y) (- (-> this spring-point (the-as int arg0) vel y) (* f0-6 arg3)))))
(loop
(let ((f0-2 (fabs (- (-> arg1 z) (-> this spring-point (the-as int arg0) local-pos z)))))
(if (< (-> this tuning max-bonk-influence-dist) f0-2) (return #f))
(let* ((f0-4 (/ (* 8.0 f0-2) (-> this tuning max-bonk-influence-dist)))
(f0-5 (+ 1.0 f0-4))
(f0-6 (/ 1.0 f0-5)))
(set! (-> this spring-point (the-as int arg0) vel y) (- (-> this spring-point (the-as int arg0) vel y) (* f0-6 arg3)))))
(set! arg0 (+ arg0 arg2))
(if (or (< (the-as int arg0) 0) (>= (the-as int arg0) (-> this tuning num-spring-points))) (return #f)))
(none))
@@ -659,12 +661,13 @@
;; WARN: Function (method 22 ropebridge) has a return type of none, but the expression builder found a return statement.
(defmethod set-vel-from-rider ((this ropebridge) (arg0 uint) (arg1 vector) (arg2 int))
(loop (let ((f0-0 (vector-vector-distance arg1 (the-as vector (-> this spring-point (the-as int arg0))))))
(if (< (-> this tuning max-influence-dist) f0-0) (return #f))
(let* ((f0-2 (/ (* 8.0 f0-0) (-> this tuning max-influence-dist)))
(f0-3 (+ 1.0 f0-2))
(f0-4 (/ 1.0 f0-3)))
(+! (-> this spring-point (the-as int arg0) extra-force y) (* f0-4 (-> this tuning rider-max-gravity)))))
(loop
(let ((f0-0 (vector-vector-distance arg1 (the-as vector (-> this spring-point (the-as int arg0))))))
(if (< (-> this tuning max-influence-dist) f0-0) (return #f))
(let* ((f0-2 (/ (* 8.0 f0-0) (-> this tuning max-influence-dist)))
(f0-3 (+ 1.0 f0-2))
(f0-4 (/ 1.0 f0-3)))
(+! (-> this spring-point (the-as int arg0) extra-force y) (* f0-4 (-> this tuning rider-max-gravity)))))
(+! arg0 arg2)
(if (or (< (the-as int arg0) 0) (>= (the-as int arg0) (-> this tuning num-spring-points))) (return #f)))
(none))
+20 -16
View File
@@ -216,11 +216,12 @@ nav-enemy-default-event-handler
(behavior ()
(ja-channel-push! 1 (seconds 0.075))
(set! (-> self nav target-pos quad) (-> self spawn-point quad))
(loop (ja-no-eval :group!
(-> self draw art-group data (-> self nav-info walk-anim))
:num!
(seek! max (-> self anim-speed))
:frame-num 0.0)
(loop
(ja-no-eval :group!
(-> self draw art-group data (-> self nav-info walk-anim))
:num!
(seek! max (-> self anim-speed))
:frame-num 0.0)
(until (ja-done? 0)
(seek! (-> self anim-speed) 1.0 0.05)
(cond
@@ -346,11 +347,12 @@ nav-enemy-default-event-handler
(set-time! (-> self player-water-time))
(ja-channel-push! 1 (seconds 0.17))
(sound-play "bigshark-idle")
(loop (ja-no-eval :group!
(-> self draw art-group data (-> self nav-info run-anim))
:num!
(seek! max (-> self anim-speed))
:frame-num 0.0)
(loop
(ja-no-eval :group!
(-> self draw art-group data (-> self nav-info run-anim))
:num!
(seek! max (-> self anim-speed))
:frame-num 0.0)
(until (ja-done? 0)
(seek! (-> self anim-speed) 1.0 (* 3.0 (seconds-per-frame)))
(suspend)
@@ -370,11 +372,12 @@ nav-enemy-default-event-handler
:code
(behavior ()
(ja-channel-push! 1 (seconds 0.17))
(loop (ja-no-eval :group!
(-> self draw art-group data (-> self nav-info walk-anim))
:num!
(seek! max (-> self anim-speed))
:frame-num 0.0)
(loop
(ja-no-eval :group!
(-> self draw art-group data (-> self nav-info walk-anim))
:num!
(seek! max (-> self anim-speed))
:frame-num 0.0)
(until (ja-done? 0)
(seek! (-> self anim-speed) 1.0 0.05)
(seek! (-> self collide-info trans y) (-> self y-max) (* (-> self y-speed) (seconds-per-frame)))
@@ -393,7 +396,8 @@ nav-enemy-default-event-handler
(ja-channel-push! 1 (seconds 0.17))
(ja :group! (-> self draw art-group data (-> self nav-info idle-anim)))
(ja :num-func num-func-identity :frame-num 0.0)
(loop (ja :num! (loop! (-> self anim-speed)))
(loop
(ja :num! (loop! (-> self anim-speed)))
(seek! (-> self anim-speed) 1.0 0.05)
(seek! (-> self collide-info trans y) (-> self y-max) (* (-> self y-speed) (seconds-per-frame)))
(suspend))))
+2 -1
View File
@@ -114,7 +114,8 @@
:trans voicebox-track
:code
(behavior ()
(loop (suspend)
(loop
(suspend)
(ja :num! (loop!))))
:post ja-post)
@@ -545,7 +545,8 @@
(if (and (-> self play-ambient-sound?) (nonzero? (-> self sound))) (update! (-> self sound))))
:code
(behavior ()
(loop (ja-post)
(loop
(ja-post)
(logior! (-> self mask) (process-mask sleep-code))
(suspend))))
+24 -16
View File
@@ -168,11 +168,12 @@
(let ((v1-88 (-> arg0 the-node)))
"is this node the start of the list. #t = start"
(when (not (not (-> v1-88 prev)))
(loop (let ((v1-92 (-> arg0 the-node)))
"return the previous node in the list"
(let ((v1-93 (-> v1-92 prev)))
(let ((a0-41 v1-93)) "is this node the start of the list. #t = start" (if (not (-> a0-41 prev)) (goto cfg-61)))
(set! (-> arg0 the-node) v1-93)))
(loop
(let ((v1-92 (-> arg0 the-node)))
"return the previous node in the list"
(let ((v1-93 (-> v1-92 prev)))
(let ((a0-41 v1-93)) "is this node the start of the list. #t = start" (if (not (-> a0-41 prev)) (goto cfg-61)))
(set! (-> arg0 the-node) v1-93)))
(+! (-> arg0 the-index) -1)
(when ((-> arg0 listfunc) 1 arg0)
(set! (-> arg0 top-index) (-> arg0 the-index))
@@ -186,11 +187,12 @@
(let ((v1-107 (-> arg0 the-node)))
"is this node the end of the list. #t = end"
(when (not (not (-> v1-107 next)))
(loop (let ((v1-111 (-> arg0 the-node)))
"return the next node in the list"
(let ((v1-112 (-> v1-111 next)))
(let ((a0-55 v1-112)) "is this node the end of the list. #t = end" (if (not (-> a0-55 next)) (goto cfg-77)))
(set! (-> arg0 the-node) v1-112)))
(loop
(let ((v1-111 (-> arg0 the-node)))
"return the next node in the list"
(let ((v1-112 (-> v1-111 next)))
(let ((a0-55 v1-112)) "is this node the end of the list. #t = end" (if (not (-> a0-55 next)) (goto cfg-77)))
(set! (-> arg0 the-node) v1-112)))
(+! (-> arg0 the-index) 1)
(when ((-> arg0 listfunc) 1 arg0)
(set! (-> arg0 top-index) (-> arg0 the-index))
@@ -683,7 +685,8 @@
"is the list empty, #t = empty"
(when (not (= (-> v1-15 tailpred) v1-15))
(let ((v1-17 (glst-get-node-by-index (-> arg1 list) (-> arg1 highlight-index))))
(loop "return the previous node in the list"
(loop
"return the previous node in the list"
(set! v1-17 (-> (the-as anim-test-obj v1-17) prev))
(let ((a0-23 (the-as anim-test-obj v1-17)))
"is this node the start of the list. #t = start"
@@ -697,7 +700,8 @@
"is the list empty, #t = empty"
(when (not (= (-> v1-21 tailpred) v1-21))
(let ((v1-23 (glst-get-node-by-index (-> arg1 list) (-> arg1 highlight-index))))
(loop "return the next node in the list"
(loop
"return the next node in the list"
(set! v1-23 (-> (the-as anim-test-obj v1-23) next))
(let ((a0-40 (the-as anim-test-obj v1-23)))
"is this node the end of the list. #t = end"
@@ -787,7 +791,8 @@
"is the list empty, #t = empty"
(when (not (= (-> v1-17 tailpred) v1-17))
(let ((v1-19 (glst-get-node-by-index (-> arg1 list) (-> arg1 highlight-index))))
(loop "return the previous node in the list"
(loop
"return the previous node in the list"
(set! v1-19 (-> (the-as anim-test-sequence v1-19) prev))
(let ((a0-24 (the-as anim-test-sequence v1-19)))
"is this node the start of the list. #t = start"
@@ -801,7 +806,8 @@
"is the list empty, #t = empty"
(when (not (= (-> v1-23 tailpred) v1-23))
(let ((v1-25 (glst-get-node-by-index (-> arg1 list) (-> arg1 highlight-index))))
(loop "return the next node in the list"
(loop
"return the next node in the list"
(set! v1-25 (-> (the-as anim-test-sequence v1-25) next))
(let ((a0-42 (the-as anim-test-sequence v1-25)))
"is this node the end of the list. #t = end"
@@ -1354,7 +1360,8 @@
(let ((s5-0 v0-0)
(s4-0 (-> arg0 playing-item)))
(when (logtest? (-> v0-0 flags) 5)
(loop (+! s4-0 1)
(loop
(+! s4-0 1)
(if (>= s4-0 (glst-num-elements (-> arg0 item-list))) (set! s4-0 0))
(set! v0-0 ((the-as (function glst-list int anim-test-seq-item) glst-get-node-by-index) (-> arg0 item-list) s4-0))
(when (or (= v0-0 s5-0) (not (logtest? (-> v0-0 flags) 5)))
@@ -1377,7 +1384,8 @@
:code
(behavior ()
(local-vars (s4-0 glst-node) (s5-1 anim-test-seq-item) (gp-2 anim-test-sequence))
(loop (logclear! (-> self flags) (anim-tester-flags fanimt0))
(loop
(logclear! (-> self flags) (anim-tester-flags fanimt0))
(let ((v1-2 (-> self obj-list)))
"is the list empty, #t = empty"
(cond
+7 -6
View File
@@ -39,12 +39,13 @@
(defstate part-tester-idle (part-tester)
:code
(behavior ()
(loop (let ((gp-0 (entity-by-name *part-tester-name*)))
(when gp-0
(let ((s5-0 (-> gp-0 extra process)))
(if (and s5-0 (type-type? (-> s5-0 type) process-drawable) (nonzero? (-> (the-as process-drawable s5-0) root)))
(set! (-> self root trans quad) (-> (the-as process-drawable s5-0) root trans quad))
(set! (-> self root trans quad) (-> gp-0 extra trans quad))))))
(loop
(let ((gp-0 (entity-by-name *part-tester-name*)))
(when gp-0
(let ((s5-0 (-> gp-0 extra process)))
(if (and s5-0 (type-type? (-> s5-0 type) process-drawable) (nonzero? (-> (the-as process-drawable s5-0) root)))
(set! (-> self root trans quad) (-> (the-as process-drawable s5-0) root trans quad))
(set! (-> self root trans quad) (-> gp-0 extra trans quad))))))
(add-debug-x #t
(bucket-id debug-no-zbuf)
(-> self root trans)
+25 -25
View File
@@ -56,21 +56,21 @@
(when (nonzero? (-> this ctrl))
(set! *pc-perf-stat-counter* (get-cpu-clock)))
#|
(let ((v1-0 (-> this ctrl)))
(+! (-> this count) 1)
(b! (zero? v1-0) cfg-2 :delay (nop!))
(.mtc0 Perf 0)
(.sync.l)
(.sync.p)
(.mtpc pcr0 0)
(.mtpc pcr1 0)
(.sync.l)
(.sync.p)
(.mtc0 Perf v1-0)
)
(.sync.l)
(.sync.p)
(label cfg-2)
(let ((v1-0 (-> this ctrl)))
(+! (-> this count) 1)
(b! (zero? v1-0) cfg-2 :delay (nop!))
(.mtc0 Perf 0)
(.sync.l)
(.sync.p)
(.mtpc pcr0 0)
(.mtpc pcr1 0)
(.sync.l)
(.sync.p)
(.mtc0 Perf v1-0)
)
(.sync.l)
(.sync.p)
(label cfg-2)
|#
0
(none))
@@ -81,16 +81,16 @@
(+! (-> this accum0) (- (get-cpu-clock) *pc-perf-stat-counter*))
(set! (-> this accum1) 0))
#|
(local-vars (v1-1 int) (v1-3 int))
(b! (zero? (-> this ctrl)) cfg-2 :delay (nop!))
(.mtc0 Perf 0)
(.sync.l)
(.sync.p)
(.mfpc v1-1 pcr0)
(+! (-> this accum0) v1-1)
(.mfpc v1-3 pcr1)
(+! (-> this accum1) v1-3)
(label cfg-2)
(local-vars (v1-1 int) (v1-3 int))
(b! (zero? (-> this ctrl)) cfg-2 :delay (nop!))
(.mtc0 Perf 0)
(.sync.l)
(.sync.p)
(.mfpc v1-1 pcr0)
(+! (-> this accum0) v1-1)
(.mfpc v1-3 pcr1)
(+! (-> this accum1) v1-3)
(label cfg-2)
|#
0
(none))
+2 -1
View File
@@ -29,7 +29,8 @@
(defstate viewer-process (viewer)
:code
(behavior ()
(loop (ja-no-eval :group! (-> self janim) :num! (seek! (the float (+ (-> self janim data 0 length) -1))) :frame-num 0.0)
(loop
(ja-no-eval :group! (-> self janim) :num! (seek! (the float (+ (-> self janim data 0 length) -1))) :frame-num 0.0)
(until (ja-done? 0)
(compute-alignment! (-> self align))
(align! (-> self align)
+22 -22
View File
@@ -10,28 +10,28 @@
;; dgos: GAME, ENGINE
#|
res is a generic storage system for not very large data, used mostly for the game entities.
These res files store collections of data, which can be as values (int8, int16, int32, int64, uint8, uint16, uint32, uint64, float, vector), or any structure (as references), which are tagged and identified with a res-tag.
The data is stored similar to an unboxed inline-array, the type of the data is stored in the res-tag.
A res-lump stores and is used to access all of the data for a single "resource", a collection of varying data.
This is similar to a C++ map or C# dictionary. The key is a res-tag and the value is the corresponding binary data.
A res-tag is a tag that contains information about a particular property of this resource, such as type, name, and amount of elements.
For example, information about an array of vectors that make up a path - for a moving platform - or an integer to store its entity ID.
Keyframes are used to specify when/where the data is relevant.
For example (this is made-up), say you have a camera spline, and you want the FOV to change at three specific points:
when it starts, somewhere in the middle, and at the end.
You would store an array of three FOV values. The key-frame field could then be used to say at which point in the spline
the FOV should be at that value. If the camera is somewhere between those points, the result could then be interpolated.
Properties are looked up from a res-lump using their name (a symbol).
You can look up the data of the property you want directly using the various get-property methods.
Curves can be quickly filled in using the get-curve-data! method.
This is updated from the entity system used in Crash 2, which had most of these features and worked very similarly!
res is a generic storage system for not very large data, used mostly for the game entities.
These res files store collections of data, which can be as values (int8, int16, int32, int64, uint8, uint16, uint32, uint64, float, vector), or any structure (as references), which are tagged and identified with a res-tag.
The data is stored similar to an unboxed inline-array, the type of the data is stored in the res-tag.
A res-lump stores and is used to access all of the data for a single "resource", a collection of varying data.
This is similar to a C++ map or C# dictionary. The key is a res-tag and the value is the corresponding binary data.
A res-tag is a tag that contains information about a particular property of this resource, such as type, name, and amount of elements.
For example, information about an array of vectors that make up a path - for a moving platform - or an integer to store its entity ID.
Keyframes are used to specify when/where the data is relevant.
For example (this is made-up), say you have a camera spline, and you want the FOV to change at three specific points:
when it starts, somewhere in the middle, and at the end.
You would store an array of three FOV values. The key-frame field could then be used to say at which point in the spline
the FOV should be at that value. If the camera is somewhere between those points, the result could then be interpolated.
Properties are looked up from a res-lump using their name (a symbol).
You can look up the data of the property you want directly using the various get-property methods.
Curves can be quickly filled in using the get-curve-data! method.
This is updated from the entity system used in Crash 2, which had most of these features and worked very similarly!
|#
(defmacro res-ref? (tag)
+8 -4
View File
@@ -1003,7 +1003,8 @@
(when (!= (-> self result) (mc-status-code ok))
(suspend)
(goto cfg-1))
(loop (set! (-> self result) (the-as mc-status-code (mc-check-result)))
(loop
(set! (-> self result) (the-as mc-status-code (mc-check-result)))
(case (-> self result)
(((mc-status-code busy)))
(((mc-status-code ok)) (goto cfg-11))
@@ -1026,7 +1027,8 @@
(when (!= (-> self result) (mc-status-code ok))
(suspend)
(goto cfg-6))
(loop (set! (-> self result) (the-as mc-status-code (mc-check-result)))
(loop
(set! (-> self result) (the-as mc-status-code (mc-check-result)))
(case (-> self result)
(((mc-status-code busy)))
(((mc-status-code ok)) (goto cfg-16))
@@ -1068,7 +1070,8 @@
(when (!= (-> self result) (mc-status-code ok))
(suspend)
(goto cfg-7))
(loop (set! (-> self result) (the-as mc-status-code (mc-check-result)))
(loop
(set! (-> self result) (the-as mc-status-code (mc-check-result)))
(let ((v1-24 (-> self result)))
(set! gp-0
(cond
@@ -1098,7 +1101,8 @@
(when (!= (-> self result) (mc-status-code ok))
(suspend)
(goto cfg-6))
(loop (set! (-> self result) (the-as mc-status-code (mc-check-result)))
(loop
(set! (-> self result) (the-as mc-status-code (mc-check-result)))
(let ((v1-22 (-> self result)))
(set! gp-0
(cond
+1 -3
View File
@@ -201,9 +201,7 @@
(define bones-vu0-block
(new 'static
'vu-function
#|
:length 63 :qlength 32
|#
#| :length 63 :qlength 32 |#
))
;; these changes only matter if transferring in _interleave_ mode.
+2 -1
View File
@@ -68,7 +68,8 @@
(defstate time-of-day-tick (time-of-day-proc)
:code
(behavior ()
(loop (+! (-> self frame) (the int (* (-> self time-ratio) (-> *display* time-adjust-ratio))))
(loop
(+! (-> self frame) (the int (* (-> self time-ratio) (-> *display* time-adjust-ratio))))
;; now update time...
(when (>= (-> self frame) 300)
;; 300 ticks/second
@@ -79,9 +79,7 @@
(define ocean-texture-vu1-block
(new 'static
'vu-function
#|
:length #x92 :qlength 73
|#
#| :length #x92 :qlength 73 |#
))
(defun ocean-texture-setup-constants ((arg0 ocean-texture-constants))
+10 -11
View File
@@ -123,17 +123,16 @@
;; it seems like the first definition is not used.
;; The OpenGOAL compiler doesn't like this, so this is commented out.
#|
;; shadow-cpu-h
; (deftype shadow-edge (structure) ;
; ((ind-0 uint16 :offset-assert 0) ;
; (ind-1 uint16 :offset-assert 2) ;
; (tri-0 uint16 :offset-assert 4) ;
; (tri-1 uint16 :offset-assert 6) ;
; ) ;
; :method-count-assert 9 ;
; :size-assert #x4 ;
; :flag-assert #x900000004 ;
; ) ;
(deftype shadow-edge (structure)
((ind-0 uint16 :offset-assert 0)
(ind-1 uint16 :offset-assert 2)
(tri-0 uint16 :offset-assert 4)
(tri-1 uint16 :offset-assert 6)
)
:method-count-assert 9
:size-assert #x4
:flag-assert #x900000004
)
|#
(deftype shadow-tri (structure)
@@ -370,9 +370,7 @@
(define shadow-vu0-block
(new 'static
'vu-function
#|
:length 88 :qlength 44
|#
#| :length 88 :qlength 44 |#
))
(def-mips2c shadow-xform-verts function)
+1 -3
View File
@@ -173,9 +173,7 @@
(define shrub-vu1-block
(new 'static
'vu-function
#|
:length #x26a :qlength #x135
|#
#| :length #x26a :qlength #x135 |#
))
(defun shrub-num-tris ((arg0 shrubbery))
+4 -4
View File
@@ -53,10 +53,10 @@
(the-as int (+ (-> drawable-inline-array-instance-tie size) (* (+ (-> this length) -1) 64))))
#|
;; for some reason, this showed up twice.
(defmethod login ((this drawable-tree-instance-tie))
this
)
;; for some reason, this showed up twice.
(defmethod login ((this drawable-tree-instance-tie))
this
)
|#
(defmethod login ((this drawable-tree-instance-tie))
+60 -58
View File
@@ -802,57 +802,58 @@
((= v1-7 (+ s4-0 -1)) (set! (-> s5-0 v1-7 v1) (the-as uint 0)) 0)
(else (set! (-> s5-0 v1-7 v1) (the-as uint (+ v1-7 1)))))
(set! (-> s5-0 v1-7 v2) (the-as uint 1)))
(loop (let ((a1-11 -1))
(let ((f0-0 268435460.0))
(dotimes (v1-10 (the-as int s4-0))
(when (nonzero? (-> s5-0 v1-10 v2))
(when (or (< (-> s5-0 v1-10 z) f0-0) (and (= (-> s5-0 v1-10 z) f0-0) (< (-> s5-0 v1-10 x) (-> s5-0 a1-11 x))))
(set! f0-0 (-> s5-0 v1-10 z))
(set! a1-11 v1-10)))))
(let* ((v1-14 (-> s5-0 a1-11))
(a2-0 (-> s5-0 (-> v1-14 v0)))
(a0-36 (-> s5-0 (-> v1-14 v1)))
(f0-2 (- (-> v1-14 x) (-> a2-0 x)))
(f1-5 (- (-> v1-14 z) (-> a2-0 z)))
(f2-3 (- (-> a0-36 x) (-> v1-14 x))))
(when (< (- (* f0-2 (- (-> a0-36 z) (-> v1-14 z))) (* f2-3 f1-5)) 0.0)
(dotimes (v1-16 (the-as int s4-0))
(let ((a0-39 (-> s5-0 v1-16 v0))) (set! (-> s5-0 v1-16 v0) (-> s5-0 v1-16 v1)) (set! (-> s5-0 v1-16 v1) a0-39)))))
(let ((s3-0 a1-11)
(a0-40 (-> s5-0 a1-11 v0))
(v1-23 (-> s5-0 a1-11 v1)))
(let ((a2-6 0))
(while (>= (-> s5-0 a0-40 z) (-> s5-0 s3-0 z))
(set! s3-0 (the-as int a0-40))
(set! a0-40 (-> s5-0 (the-as uint s3-0) v0))
(+! a2-6 1)
(when (= a2-6 10)
(break!)
0)))
(while (and (!= s3-0 a1-11) (>= (-> s5-0 s3-0 z) (-> s5-0 a0-40 z)))
(set! s3-0 (the-as int a0-40))
(set! a0-40 (-> s5-0 (the-as uint s3-0) v0)))
(when (= s3-0 a1-11)
(split-monotone-polygon arg0 a1-11)
(fix-boundary-normals arg0)
(return (the-as object 0)))
(let ((s2-0 a1-11))
(while (and (>= (-> s5-0 v1-23 z) (-> s5-0 s2-0 z)) (>= (-> s5-0 s3-0 z) (-> s5-0 v1-23 z)))
(set! s2-0 (the-as int v1-23))
(set! v1-23 (-> s5-0 (the-as uint s2-0) v1)))
(let ((s1-0 (-> s5-0 s3-0 v0))
(s0-0 (-> s5-0 s2-0 v1)))
(set! (-> s5-0 s3-0 v0) (the-as uint s2-0))
(set! (-> s5-0 s2-0 v1) (the-as uint s3-0))
(let ((v1-37 (-> s5-0 s3-0 v1)))
(while (!= v1-37 s2-0)
(set! (-> s5-0 v1-37 v2) (the-as uint 0))
(set! v1-37 (-> s5-0 v1-37 v1))))
(split-monotone-polygon arg0 a1-11)
(set! (-> s5-0 s3-0 v0) s1-0)
(set! (-> s5-0 s2-0 v1) s0-0))
(set! (-> s5-0 s2-0 v0) (the-as uint s3-0))
(set! (-> s5-0 s3-0 v1) (the-as uint s2-0))))))))
(loop
(let ((a1-11 -1))
(let ((f0-0 268435460.0))
(dotimes (v1-10 (the-as int s4-0))
(when (nonzero? (-> s5-0 v1-10 v2))
(when (or (< (-> s5-0 v1-10 z) f0-0) (and (= (-> s5-0 v1-10 z) f0-0) (< (-> s5-0 v1-10 x) (-> s5-0 a1-11 x))))
(set! f0-0 (-> s5-0 v1-10 z))
(set! a1-11 v1-10)))))
(let* ((v1-14 (-> s5-0 a1-11))
(a2-0 (-> s5-0 (-> v1-14 v0)))
(a0-36 (-> s5-0 (-> v1-14 v1)))
(f0-2 (- (-> v1-14 x) (-> a2-0 x)))
(f1-5 (- (-> v1-14 z) (-> a2-0 z)))
(f2-3 (- (-> a0-36 x) (-> v1-14 x))))
(when (< (- (* f0-2 (- (-> a0-36 z) (-> v1-14 z))) (* f2-3 f1-5)) 0.0)
(dotimes (v1-16 (the-as int s4-0))
(let ((a0-39 (-> s5-0 v1-16 v0))) (set! (-> s5-0 v1-16 v0) (-> s5-0 v1-16 v1)) (set! (-> s5-0 v1-16 v1) a0-39)))))
(let ((s3-0 a1-11)
(a0-40 (-> s5-0 a1-11 v0))
(v1-23 (-> s5-0 a1-11 v1)))
(let ((a2-6 0))
(while (>= (-> s5-0 a0-40 z) (-> s5-0 s3-0 z))
(set! s3-0 (the-as int a0-40))
(set! a0-40 (-> s5-0 (the-as uint s3-0) v0))
(+! a2-6 1)
(when (= a2-6 10)
(break!)
0)))
(while (and (!= s3-0 a1-11) (>= (-> s5-0 s3-0 z) (-> s5-0 a0-40 z)))
(set! s3-0 (the-as int a0-40))
(set! a0-40 (-> s5-0 (the-as uint s3-0) v0)))
(when (= s3-0 a1-11)
(split-monotone-polygon arg0 a1-11)
(fix-boundary-normals arg0)
(return (the-as object 0)))
(let ((s2-0 a1-11))
(while (and (>= (-> s5-0 v1-23 z) (-> s5-0 s2-0 z)) (>= (-> s5-0 s3-0 z) (-> s5-0 v1-23 z)))
(set! s2-0 (the-as int v1-23))
(set! v1-23 (-> s5-0 (the-as uint s2-0) v1)))
(let ((s1-0 (-> s5-0 s3-0 v0))
(s0-0 (-> s5-0 s2-0 v1)))
(set! (-> s5-0 s3-0 v0) (the-as uint s2-0))
(set! (-> s5-0 s2-0 v1) (the-as uint s3-0))
(let ((v1-37 (-> s5-0 s3-0 v1)))
(while (!= v1-37 s2-0)
(set! (-> s5-0 v1-37 v2) (the-as uint 0))
(set! v1-37 (-> s5-0 v1-37 v1))))
(split-monotone-polygon arg0 a1-11)
(set! (-> s5-0 s3-0 v0) s1-0)
(set! (-> s5-0 s2-0 v1) s0-0))
(set! (-> s5-0 s2-0 v0) (the-as uint s3-0))
(set! (-> s5-0 s3-0 v1) (the-as uint s2-0))))))))
0)
(defun try-corner ((arg0 object) (arg1 int))
@@ -871,13 +872,14 @@
(defun split-monotone-polygon ((arg0 load-boundary) (arg1 int))
(let ((s5-0 *triangulation-buffer*))
(loop (when (= (-> s5-0 (-> s5-0 (-> s5-0 arg1 v0) v0) v0) arg1)
(let ((v1-10 (-> arg0 tri-cnt)))
(set! (-> arg0 data v1-10 v0) (the-as uint arg1))
(set! (-> arg0 data v1-10 v1) (-> s5-0 arg1 v0))
(set! (-> arg0 data v1-10 v2) (-> s5-0 (-> s5-0 arg1 v0) v0)))
(+! (-> arg0 tri-cnt) 1)
(return 0))
(loop
(when (= (-> s5-0 (-> s5-0 (-> s5-0 arg1 v0) v0) v0) arg1)
(let ((v1-10 (-> arg0 tri-cnt)))
(set! (-> arg0 data v1-10 v0) (the-as uint arg1))
(set! (-> arg0 data v1-10 v1) (-> s5-0 arg1 v0))
(set! (-> arg0 data v1-10 v2) (-> s5-0 (-> s5-0 arg1 v0) v0)))
(+! (-> arg0 tri-cnt) 1)
(return 0))
(let ((s3-0 arg1))
(while (not (try-corner arg0 s3-0))
(set! s3-0 (the-as int (-> s5-0 s3-0 v1)))
+16 -15
View File
@@ -22,21 +22,22 @@
"Unpack run-length-encoded data. Has sections of repeated values, then normally copied."
(local-vars (current-input int) (copy-length int))
(nop!)
(loop (loop ;; read the input and see what kind it is, based on number.
(set! current-input (-> in 0))
(set! in (&-> in 1))
(b! (<= current-input 0) cfg-5 :delay (nop!))
;; it's a repated value, loop to copy it.
(let ((repeated-value (-> in 0)))
(set! in (&-> in 1))
(label cfg-3)
(nop!)
(nop!)
(nop!)
(nop!)
(set! (-> out 0) repeated-value))
(set! out (&-> out 1))
(b! (> current-input 0) cfg-3 :delay (set! current-input (+ current-input -1))))
(loop
(loop ;; read the input and see what kind it is, based on number.
(set! current-input (-> in 0))
(set! in (&-> in 1))
(b! (<= current-input 0) cfg-5 :delay (nop!))
;; it's a repated value, loop to copy it.
(let ((repeated-value (-> in 0)))
(set! in (&-> in 1))
(label cfg-3)
(nop!)
(nop!)
(nop!)
(nop!)
(set! (-> out 0) repeated-value))
(set! out (&-> out 1))
(b! (> current-input 0) cfg-3 :delay (set! current-input (+ current-input -1))))
(label cfg-5)
;; check for end
(b! (zero? current-input) cfg-8 :delay (set! copy-length (- current-input)))
+27 -18
View File
@@ -374,7 +374,8 @@
(the-as uint eichar-stance-loop-down-ja)
(the-as uint eichar-stance-loop-left-ja)
(the-as uint eichar-stance-loop-right-ja))
(loop (ground-tween-update gp-0 (-> self control unknown-float61) (-> self control unknown-float62))
(loop
(ground-tween-update gp-0 (-> self control unknown-float61) (-> self control unknown-float62))
(suspend)
(ja :num! (loop!))
(ja :chan 1 :num! (chan 0))
@@ -570,16 +571,17 @@
(ja :chan 3 :group! eichar-run-ja :num! (identity f28-1) :frame-interp 0.0 :dist (-> *TARGET-bank* run-cycle-dist)))
(let ((f28-2 0.0)
(f26-1 0.0))
(loop (let ((f22-0 (fmax -1.0 (fmin 1.0 (* 2.0 (-> self control unknown-float61)))))
(f24-0 (fmax -1.0 (fmin 1.0 (* 1.6 (-> self control unknown-float62))))))
(set! f30-0
(seek f30-0
(fmax 0.0 (fmin 1.0 (* 0.000048828126 (+ -16384.0 (-> self control unknown-float01)))))
(* 2.0 (seconds-per-frame))))
(let ((v1-317 (-> self skel effect))) (set! (-> v1-317 channel-offset) (if (< 0.5 f30-0) 3 0)))
0
(let ((f0-64 (fabs (- f22-0 f28-2)))) (set! f28-2 (seek f28-2 f22-0 (fmax 0.05 (fmin 0.2 (* 0.25 f0-64))))))
(let ((f0-69 (fabs (- f24-0 f26-1)))) (set! f26-1 (seek f26-1 f24-0 (fmax 0.05 (fmin 0.2 (* 0.25 f0-69)))))))
(loop
(let ((f22-0 (fmax -1.0 (fmin 1.0 (* 2.0 (-> self control unknown-float61)))))
(f24-0 (fmax -1.0 (fmin 1.0 (* 1.6 (-> self control unknown-float62))))))
(set! f30-0
(seek f30-0
(fmax 0.0 (fmin 1.0 (* 0.000048828126 (+ -16384.0 (-> self control unknown-float01)))))
(* 2.0 (seconds-per-frame))))
(let ((v1-317 (-> self skel effect))) (set! (-> v1-317 channel-offset) (if (< 0.5 f30-0) 3 0)))
0
(let ((f0-64 (fabs (- f22-0 f28-2)))) (set! f28-2 (seek f28-2 f22-0 (fmax 0.05 (fmin 0.2 (* 0.25 f0-64))))))
(let ((f0-69 (fabs (- f24-0 f26-1)))) (set! f26-1 (seek f26-1 f24-0 (fmax 0.05 (fmin 0.2 (* 0.25 f0-69)))))))
(cond
((>= f28-2 0.0)
(ja :chan 1 :group! eichar-walk-up-ja :frame-interp (fabs f28-2) :dist (-> *TARGET-bank* walk-up-cycle-dist))
@@ -672,7 +674,8 @@
:code
(behavior ()
(if (not (ja-group? eichar-duck-stance-ja)) (ja-channel-push! 1 (seconds 0.1)))
(loop (ja-no-eval :group! eichar-duck-stance-ja :num! (seek!) :frame-num 0.0)
(loop
(ja-no-eval :group! eichar-duck-stance-ja :num! (seek!) :frame-num 0.0)
(until (ja-done? 0)
(suspend)
(ja :num! (seek!)))))
@@ -803,7 +806,8 @@
(until (ja-done? 0)
(suspend)
(ja :num! (seek!)))))
(loop (ja-no-eval :group! eichar-duck-stance-ja :num! (seek!) :frame-num 0.0)
(loop
(ja-no-eval :group! eichar-duck-stance-ja :num! (seek!) :frame-num 0.0)
(until (ja-done? 0)
(suspend)
(ja :num! (seek!)))))
@@ -847,7 +851,8 @@
((and (ja-group? eichar-duck-walk-ja) (= (-> self skel root-channel 0) (-> self skel channel))))
((ja-group? eichar-duck-stance-ja) (ja-channel-push! 1 (seconds 0.45)) (ja :group! eichar-duck-walk-ja :num! min))
(else (ja-channel-push! 1 (seconds 0.1)) (ja :group! eichar-duck-walk-ja :num! min)))
(loop (if (= (-> self skel root-channel 0) (-> self skel channel)) (set! (-> self control unknown-surface00) *duck-mods*))
(loop
(if (= (-> self skel root-channel 0) (-> self skel channel)) (set! (-> self control unknown-surface00) *duck-mods*))
(ja :num!
(loop! (fmin 1.0
(/ (-> self control unknown-float01)
@@ -956,7 +961,8 @@
(suspend)
(ja :num! (seek!)))
(ja-no-eval :group! eichar-jump-loop-ja :num! (loop!) :frame-num 0.0)
(loop (suspend)
(loop
(suspend)
(ja :group! eichar-jump-loop-ja :num! (loop!))))
:post target-post)
@@ -1148,11 +1154,13 @@
(cond
((= arg2 'launch)
(ja-no-eval :group! eichar-launch-jump-loop-ja :num! (loop! f28-0) :frame-num 0.0)
(loop (suspend)
(loop
(suspend)
(ja :group! eichar-launch-jump-loop-ja :num! (loop! f28-0))))
(else
(ja-no-eval :group! eichar-jump-loop-ja :num! (loop!) :frame-num 0.0)
(loop (suspend)
(loop
(suspend)
(ja :group! eichar-jump-loop-ja :num! (loop!))))))
(the-as none 0))
:post target-post)
@@ -1734,7 +1742,8 @@
(vector-float*! (-> self control transv) (-> self control dynam gravity-normal) f2-2)
(vector-float*! gp-4 gp-4 (/ f0-23 f1-3)))))
(suspend)
(loop (+! (-> self control unknown-uint20) 1)
(loop
(+! (-> self control unknown-uint20) 1)
(ja :num! (+!))
(ja :chan 1
:num!
+92 -76
View File
@@ -204,8 +204,9 @@
(disable-hud (the-as int (-> *hud-parts* power))))
:code
(behavior ()
(loop (dotimes (gp-0 (-> self nb-of-particles))
(if (= (-> self particles gp-0 part matrix) -1) (set! (-> self particles gp-0 part matrix) (sprite-allocate-user-hvdf))))
(loop
(dotimes (gp-0 (-> self nb-of-particles))
(if (= (-> self particles gp-0 part matrix) -1) (set! (-> self particles gp-0 part matrix) (sprite-allocate-user-hvdf))))
(set-setting! 'common-page 'set 0.0 1)
(suspend)
(go hud-coming-in)
@@ -217,7 +218,8 @@
event)
:code
(behavior ()
(loop (seekl! (-> self in-out-position) 0 (the int (* 350.0 (-> *display* time-adjust-ratio))))
(loop
(seekl! (-> self in-out-position) 0 (the int (* 350.0 (-> *display* time-adjust-ratio))))
(if (zero? (-> self in-out-position)) (go hud-normal))
(suspend)))
:post
@@ -230,17 +232,19 @@
event)
:code
(behavior ()
(loop (if (or (not *progress-process*)
(= (-> *progress-process* 0 next-state name) 'progress-going-out)
(= (-> *progress-process* 0 next-state name) 'progress-gone))
(seekl! (-> self in-out-position) 0 (the int (* 150.0 (-> *display* time-adjust-ratio))))
(seekl! (-> self in-out-position) 4096 (the int (* 200.0 (-> *display* time-adjust-ratio)))))
(loop
(if (or (not *progress-process*)
(= (-> *progress-process* 0 next-state name) 'progress-going-out)
(= (-> *progress-process* 0 next-state name) 'progress-gone))
(seekl! (-> self in-out-position) 0 (the int (* 150.0 (-> *display* time-adjust-ratio))))
(seekl! (-> self in-out-position) 4096 (the int (* 200.0 (-> *display* time-adjust-ratio)))))
(suspend))))
(defstate hud-going-out (first-person-hud)
:code
(behavior ()
(loop (seekl! (-> self in-out-position) 4096 (the int (* 350.0 (-> *display* time-adjust-ratio))))
(loop
(seekl! (-> self in-out-position) 4096 (the int (* 350.0 (-> *display* time-adjust-ratio))))
(if (= (-> self in-out-position) 4096) (deactivate self))
(suspend)))
:post
@@ -388,7 +392,8 @@
(suspend))
(ja-channel-set! 0)
(set! (-> self control transv quad) (the-as uint128 0))
(loop (if (!= (-> self cam-user-mode) 'look-around) (go target-stance-look-around))
(loop
(if (!= (-> self cam-user-mode) 'look-around) (go target-stance-look-around))
(suspend)))
:post target-no-move-post)
@@ -509,56 +514,59 @@
(= v1-11 eichar-duck-high-jump-ja))))
(target-hit-ground-anim #f)))
(-> self control unknown-spoolanim00)
(loop (let ((gp-1 (-> self control unknown-spoolanim00)))
(case gp-1
(('stance)
(cond
((or (and (ja-group? eichar-walk-ja) (< 0.5 (-> self skel root-channel 6 frame-interp)))
(let ((v1-32 (ja-group)))
(or (= v1-32 eichar-run-squash-ja)
(= v1-32 eichar-run-squash-weak-ja)
(= v1-32 eichar-attack-from-stance-run-end-ja)
(= v1-32 eichar-attack-from-stance-run-alt-end-ja))))
(ja-channel-push! 1 (seconds 0.15))
(ja-no-eval :group! eichar-run-to-stance-loop-ja :num! (seek!) :frame-num 0.0)
(until (ja-done? 0)
(suspend)
(ja :num! (seek!)))
(ja-no-eval :group! eichar-run-to-stance-ja :num! (seek!) :frame-num 0.0)
(until (ja-done? 0)
(suspend)
(ja :num! (seek!)))
(ja-channel-push! 1 (seconds 0.15)))
((let ((v1-87 (ja-group)))
(and (or (= v1-87 eichar-jump-short-land-ja) (= v1-87 eichar-jump-land-ja)) (not (ja-max? 0))))
(ja-no-eval :num! (seek!))
(while (not (ja-done? 0))
(suspend)
(ja-eval))
(ja-channel-push! 1 (seconds 0.075)))
((not (and (ja-group? eichar-stance-loop-ja) (= (ja-group-size) 1))) (ja-channel-push! 1 (seconds 0.075))))
(loop (ja-no-eval :group! eichar-stance-loop-ja :num! (seek!) :frame-num 0.0)
(until (ja-done? 0)
(if (!= gp-1 (-> self control unknown-spoolanim00)) (goto cfg-94))
(suspend)
(ja :num! (seek!)))))
(('shock-in)
(ja-channel-push! 1 (seconds 0.2))
(ja-no-eval :group! eichar-shocked-ja :num! (seek! (ja-aframe (the-as float 18.0) 0)) :frame-num 0.0)
(until (ja-done? 0)
(if (!= gp-1 (-> self control unknown-spoolanim00)) (goto cfg-94))
(suspend)
(ja :num! (seek! (ja-aframe (the-as float 18.0) 0))))
(loop (if (!= gp-1 (-> self control unknown-spoolanim00)) (goto cfg-94))
(suspend)))
(('shock-out)
(if (not (ja-group? eichar-shocked-ja)) (ja-channel-push! 1 (seconds 0.2)))
(ja-no-eval :group! eichar-shocked-ja :num! (seek!) :frame-num (ja-aframe (the-as float 18.0) 0))
(until (ja-done? 0)
(if (!= gp-1 (-> self control unknown-spoolanim00)) (goto cfg-94))
(suspend)
(ja :num! (seek!)))
(set! (-> self control unknown-uint20) (the-as uint 'stance)))))
(loop
(let ((gp-1 (-> self control unknown-spoolanim00)))
(case gp-1
(('stance)
(cond
((or (and (ja-group? eichar-walk-ja) (< 0.5 (-> self skel root-channel 6 frame-interp)))
(let ((v1-32 (ja-group)))
(or (= v1-32 eichar-run-squash-ja)
(= v1-32 eichar-run-squash-weak-ja)
(= v1-32 eichar-attack-from-stance-run-end-ja)
(= v1-32 eichar-attack-from-stance-run-alt-end-ja))))
(ja-channel-push! 1 (seconds 0.15))
(ja-no-eval :group! eichar-run-to-stance-loop-ja :num! (seek!) :frame-num 0.0)
(until (ja-done? 0)
(suspend)
(ja :num! (seek!)))
(ja-no-eval :group! eichar-run-to-stance-ja :num! (seek!) :frame-num 0.0)
(until (ja-done? 0)
(suspend)
(ja :num! (seek!)))
(ja-channel-push! 1 (seconds 0.15)))
((let ((v1-87 (ja-group)))
(and (or (= v1-87 eichar-jump-short-land-ja) (= v1-87 eichar-jump-land-ja)) (not (ja-max? 0))))
(ja-no-eval :num! (seek!))
(while (not (ja-done? 0))
(suspend)
(ja-eval))
(ja-channel-push! 1 (seconds 0.075)))
((not (and (ja-group? eichar-stance-loop-ja) (= (ja-group-size) 1))) (ja-channel-push! 1 (seconds 0.075))))
(loop
(ja-no-eval :group! eichar-stance-loop-ja :num! (seek!) :frame-num 0.0)
(until (ja-done? 0)
(if (!= gp-1 (-> self control unknown-spoolanim00)) (goto cfg-94))
(suspend)
(ja :num! (seek!)))))
(('shock-in)
(ja-channel-push! 1 (seconds 0.2))
(ja-no-eval :group! eichar-shocked-ja :num! (seek! (ja-aframe (the-as float 18.0) 0)) :frame-num 0.0)
(until (ja-done? 0)
(if (!= gp-1 (-> self control unknown-spoolanim00)) (goto cfg-94))
(suspend)
(ja :num! (seek! (ja-aframe (the-as float 18.0) 0))))
(loop
(if (!= gp-1 (-> self control unknown-spoolanim00)) (goto cfg-94))
(suspend)))
(('shock-out)
(if (not (ja-group? eichar-shocked-ja)) (ja-channel-push! 1 (seconds 0.2)))
(ja-no-eval :group! eichar-shocked-ja :num! (seek!) :frame-num (ja-aframe (the-as float 18.0) 0))
(until (ja-done? 0)
(if (!= gp-1 (-> self control unknown-spoolanim00)) (goto cfg-94))
(suspend)
(ja :num! (seek!)))
(set! (-> self control unknown-uint20) (the-as uint 'stance)))))
(label cfg-94)))
:post
(behavior ()
@@ -634,7 +642,8 @@
(until (ja-done? 0)
(suspend)
(ja :num! (seek!)))
(loop (set! (-> self anim-seed) (the-as uint (if (rand-vu-percent? (the-as float 0.1)) 0 1)))
(loop
(set! (-> self anim-seed) (the-as uint (if (rand-vu-percent? (the-as float 0.1)) 0 1)))
(ja-no-eval :group! eichar-pole-cycle-ja :num! (seek!) :frame-num 0.0)
(until (ja-done? 0)
(suspend)
@@ -680,7 +689,8 @@
(set! f1-1 (vector-dot (-> self control dynam gravity-normal) (-> self control transv)))))
(ja-channel-push! 1 (seconds 0.25))
(ja-no-eval :group! eichar-jump-loop-ja :num! (loop!) :frame-num 0.0)
(loop (suspend)
(loop
(suspend)
(ja :group! eichar-jump-loop-ja :num! (loop!))))
:post target-post)
@@ -786,7 +796,8 @@
(suspend)
(ja :num! (seek!)))
(ja-channel-set! 1)
(loop (ja-no-eval :group! eichar-edge-grab-stance0-ja :num! (seek!) :frame-num 0.0)
(loop
(ja-no-eval :group! eichar-edge-grab-stance0-ja :num! (seek!) :frame-num 0.0)
(until (ja-done? 0)
(suspend)
(ja :num! (seek!)))
@@ -1159,10 +1170,11 @@
(the-as float 16384.0)
(the-as float 32768.0)))
(gp-6 0))
(loop (let ((f0-10 (fmax -1.0 (fmin 1.0 (* 2.0 (-> self control unknown-float61)))))
(f24-0 (fmax -1.0 (fmin 1.0 (* 1.6 (-> self control unknown-float62))))))
(let ((f1-4 (fabs (- f0-10 f30-1)))) (set! f30-1 (seek f30-1 f0-10 (fmax 0.05 (fmin 0.2 (* 0.25 f1-4))))))
(let ((f0-14 (fabs (- f24-0 f28-0)))) (set! f28-0 (seek f28-0 f24-0 (fmax 0.05 (fmin 0.2 (* 0.25 f0-14)))))))
(loop
(let ((f0-10 (fmax -1.0 (fmin 1.0 (* 2.0 (-> self control unknown-float61)))))
(f24-0 (fmax -1.0 (fmin 1.0 (* 1.6 (-> self control unknown-float62))))))
(let ((f1-4 (fabs (- f0-10 f30-1)))) (set! f30-1 (seek f30-1 f0-10 (fmax 0.05 (fmin 0.2 (* 0.25 f1-4))))))
(let ((f0-14 (fabs (- f24-0 f28-0)))) (set! f28-0 (seek f28-0 f24-0 (fmax 0.05 (fmin 0.2 (* 0.25 f0-14)))))))
(ja :chan 3 :group! eichar-walk-down-ja :dist (-> *TARGET-bank* walk-down-cycle-dist))
(if (>= f30-1 0.0)
(ja :chan 3 :group! eichar-walk-up-ja :frame-interp (fabs f30-1) :dist (-> *TARGET-bank* walk-up-cycle-dist))
@@ -1299,7 +1311,8 @@
(joint-control-channel-group-eval! a0-9 (the-as art-joint-anim #f) num-func-seek!))))
((ja-group? eichar-swim-walk-ja) (ja-channel-push! 1 (seconds 0.83)))
(else (ja-channel-push! 1 (seconds 0.15)))))
(loop (ja :group! eichar-swim-stance-ja :num! min)
(loop
(ja :group! eichar-swim-stance-ja :num! min)
(until (and (ja-done? 0) (= (-> self skel root-channel 0) (-> self skel channel)))
(suspend)
(if (= (-> self skel root-channel 0) (-> self skel channel)) (ja :num! (seek!))))))
@@ -1359,7 +1372,8 @@
(suspend)
(ja :num! (seek!))))
(else (ja-channel-push! 1 (seconds 0.15)))))
(loop (ja-no-eval :group! eichar-swim-walk-ja :num! (seek!) :frame-num 0.0)
(loop
(ja-no-eval :group! eichar-swim-walk-ja :num! (seek!) :frame-num 0.0)
(until (ja-done? 0)
(compute-alignment! (-> self align))
(if (not (logtest? (-> self align flags) (align-flags disabled)))
@@ -1449,9 +1463,10 @@
(ja :group! eichar-swim-down-ja :num! (identity (ja-aframe (the-as float 124.0) 0)))
-16384.0)
(else (ja-channel-push! 1 (seconds 0.075)) (ja :group! eichar-swim-down-ja :num! min) f30-0))))))
(loop (if (and (or (not (cpad-hold? (-> self control unknown-cpad-info00 number) square)) (-> self control unknown-spoolanim00))
(time-elapsed? (-> self state-time) gp-0))
(go target-swim-up))
(loop
(if (and (or (not (cpad-hold? (-> self control unknown-cpad-info00 number) square)) (-> self control unknown-spoolanim00))
(time-elapsed? (-> self state-time) gp-0))
(go target-swim-up))
(if (or (time-elapsed? (-> self state-time) s5-0)
(and (logtest? (-> self control status) (cshape-moving-flags onsurf))
(and (< (-> self water swim-depth) 8192.0) (time-elapsed? (-> self state-time) gp-0))))
@@ -1523,10 +1538,11 @@
(suspend)
(ja :num! (seek!))))
(ja :group! eichar-swim-up-ja :num! min)
(loop (target-swim-tilt (the-as float (if (< 8192.0 (-> self water swim-depth)) 0.3 0.0))
(the-as float 1.0)
(the-as float 0.0)
(the-as float 0.1))
(loop
(target-swim-tilt (the-as float (if (< 8192.0 (-> self water swim-depth)) 0.3 0.0))
(the-as float 1.0)
(the-as float 0.0)
(the-as float 0.1))
(if (not (logtest? (-> self water flags) (water-flags wt12))) (goto cfg-37))
(if (cpad-pressed? (-> self control unknown-cpad-info00 number) x) (set! f30-0 2.0))
(compute-alignment! (-> self align))
+14 -10
View File
@@ -177,7 +177,8 @@
:code
(behavior ()
(logior! (-> self mask) (process-mask sleep-code))
(loop (suspend)))
(loop
(suspend)))
:post
(behavior ()
(if (-> self deactivate-when-hidden) (deactivate self))
@@ -212,7 +213,8 @@
(if (= (-> self particles gp-1 part matrix) -1) (set! (-> self particles gp-1 part matrix) (sprite-allocate-user-hvdf)))))
:code
(behavior ()
(loop (if (not (paused?)) (seekl! (-> self offset) 0 (the int (* 15.0 (-> *display* time-adjust-ratio)))))
(loop
(if (not (paused?)) (seekl! (-> self offset) 0 (the int (* 15.0 (-> *display* time-adjust-ratio)))))
(draw-icons self)
(if (<= (-> self offset) 0) (go hud-in))
(when (movie?)
@@ -260,7 +262,8 @@
event)
:code
(behavior ((arg0 int))
(loop (if (not (paused?)) (seekl! (-> self offset) 128 (the int (* (the float arg0) (-> *display* time-adjust-ratio)))))
(loop
(if (not (paused?)) (seekl! (-> self offset) 128 (the int (* (the float arg0) (-> *display* time-adjust-ratio)))))
(draw-icons self)
(when (movie?)
(set-time! (-> self last-hide-time))
@@ -320,13 +323,14 @@
(f28-0 (-> self root scale x))
(f24-0 (-> self root scale y))
(f22-0 (-> self root scale z)))
(loop (let ((f0-7 (* f30-0 (seconds-per-frame))))
(+! f26-0 f0-7)
(when (< 1.0 f26-0)
(let ((f0-8 (- f26-0 f0-7))) (set! f0-7 (- 1.0 f0-8)))
(set! f26-0 1.0))
(+! (-> self root trans x) (* f0-7 (-> s5-0 x)))
(+! (-> self root trans y) (* f0-7 (-> s5-0 y))))
(loop
(let ((f0-7 (* f30-0 (seconds-per-frame))))
(+! f26-0 f0-7)
(when (< 1.0 f26-0)
(let ((f0-8 (- f26-0 f0-7))) (set! f0-7 (- 1.0 f0-8)))
(set! f26-0 1.0))
(+! (-> self root trans x) (* f0-7 (-> s5-0 x)))
(+! (-> self root trans y) (* f0-7 (-> s5-0 y))))
(set-vector! (-> self root scale)
(* f28-0 (-> *video-parms* relative-x-scale))
(* f24-0 (-> *video-parms* relative-y-scale) (-> *video-parms* relative-y-scale))
+41 -36
View File
@@ -645,12 +645,13 @@
(('go-away) (go progress-gone))))
:code
(behavior ()
(loop (when (hud-hidden?)
(dotimes (gp-0 (-> self nb-of-particles))
(if (= (-> self particles gp-0 part matrix) -1) (set! (-> self particles gp-0 part matrix) (sprite-allocate-user-hvdf))))
(set-setting! 'common-page 'set 0.0 1)
(suspend)
(go progress-coming-in))
(loop
(when (hud-hidden?)
(dotimes (gp-0 (-> self nb-of-particles))
(if (= (-> self particles gp-0 part matrix) -1) (set! (-> self particles gp-0 part matrix) (sprite-allocate-user-hvdf))))
(set-setting! 'common-page 'set 0.0 1)
(suspend)
(go progress-coming-in))
(suspend))))
(defstate progress-gone (progress)
@@ -1202,12 +1203,13 @@
v0-0)))))))))
:code
(behavior ()
(loop (when (and (cpad-hold? 0 l1) (cpad-hold? 0 r1) *cheat-mode*)
(when (and (< (-> self task-index) (-> *level-task-data* (-> self display-level-index) nb-of-tasks))
(>= (-> self task-index) 0))
(let ((gp-0 (-> *level-task-data* (-> self display-level-index) task-info (-> self task-index) task-id)))
(close-specific-task! gp-0 (task-status need-resolution))
(send-event *target* 'get-pickup 6 (the float gp-0)))))
(loop
(when (and (cpad-hold? 0 l1) (cpad-hold? 0 r1) *cheat-mode*)
(when (and (< (-> self task-index) (-> *level-task-data* (-> self display-level-index) nb-of-tasks))
(>= (-> self task-index) 0))
(let ((gp-0 (-> *level-task-data* (-> self display-level-index) task-info (-> self task-index) task-id)))
(close-specific-task! gp-0 (task-status need-resolution))
(send-event *target* 'get-pickup 6 (the float gp-0)))))
(if (and (= (-> self display-state) (-> self next-display-state))
(= (-> self display-level-index) (-> self next-level-index)))
(seekl! (-> self transition-offset)
@@ -1380,7 +1382,8 @@
(set! *pause-lock* #f))
:code
(behavior ()
(loop (seekl! (-> self in-out-position) 0 (the int (* 170.0 (-> *display* time-adjust-ratio))))
(loop
(seekl! (-> self in-out-position) 0 (the int (* 170.0 (-> *display* time-adjust-ratio))))
(when (< (-> self in-out-position) 2867)
(seekl! (-> self transition-offset) 0 (the int (* (-> self transition-speed) (-> *display* time-adjust-ratio))))
(set-transition-progress! self (-> self transition-offset)))
@@ -1402,7 +1405,8 @@
(set! (-> self transition-speed) 30.0))))
:code
(behavior ()
(loop (seekl! (-> self transition-offset) 512 (the int (* (-> self transition-speed) (-> *display* time-adjust-ratio))))
(loop
(seekl! (-> self transition-offset) 512 (the int (* (-> self transition-speed) (-> *display* time-adjust-ratio))))
(set-transition-progress! self (-> self transition-offset))
(when (< 153 (-> self transition-offset))
(seekl! (-> self in-out-position) 4096 (the int (* 170.0 (-> *display* time-adjust-ratio))))
@@ -1419,28 +1423,29 @@
(('go-away) (go progress-going-out))))
:code
(behavior ()
(loop (cond
((cpad-pressed? 0 left) (if (> (-> self current-debug-string) 0) (+! (-> self current-debug-string) -1)))
((cpad-pressed? 0 right)
(if (< (-> self current-debug-string) (+ (-> *common-text* length) -1)) (+! (-> self current-debug-string) 1)))
((cpad-pressed? 0 up)
(when (> (-> self current-debug-group) 0)
(+! (-> self current-debug-group) -1)
(set! (-> self current-debug-string) 0)
0))
((cpad-pressed? 0 down)
(when (< (-> self current-debug-group) (+ (-> *text-group-names* length) -1))
(+! (-> self current-debug-group) 1)
(set! (-> self current-debug-string) 0)
0))
((cpad-pressed? 0 l1)
(if (> (the-as int (-> *setting-control* default language)) 0) (+! (-> *setting-control* default language) -1)))
((cpad-pressed? 0 r1)
(if (< (the-as int (-> *setting-control* default language)) 6) (+! (-> *setting-control* default language) 1)))
((cpad-pressed? 0 l2)
(logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons l2))
(logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons l2))
(go progress-normal)))
(loop
(cond
((cpad-pressed? 0 left) (if (> (-> self current-debug-string) 0) (+! (-> self current-debug-string) -1)))
((cpad-pressed? 0 right)
(if (< (-> self current-debug-string) (+ (-> *common-text* length) -1)) (+! (-> self current-debug-string) 1)))
((cpad-pressed? 0 up)
(when (> (-> self current-debug-group) 0)
(+! (-> self current-debug-group) -1)
(set! (-> self current-debug-string) 0)
0))
((cpad-pressed? 0 down)
(when (< (-> self current-debug-group) (+ (-> *text-group-names* length) -1))
(+! (-> self current-debug-group) 1)
(set! (-> self current-debug-string) 0)
0))
((cpad-pressed? 0 l1)
(if (> (the-as int (-> *setting-control* default language)) 0) (+! (-> *setting-control* default language) -1)))
((cpad-pressed? 0 r1)
(if (< (the-as int (-> *setting-control* default language)) 6) (+! (-> *setting-control* default language) 1)))
((cpad-pressed? 0 l2)
(logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons l2))
(logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons l2))
(go progress-normal)))
(load-game-text-info (-> *text-group-names* (-> self current-debug-group)) '*common-text* *common-text-heap*)
(suspend)))
:post
+43 -42
View File
@@ -8,47 +8,47 @@
;; dgos: KERNEL
#|
Summary of state system:
A process can be put into a state, using enter-state, or the go macro.
This will set up the process to run the appropriate handler functions defined by the state.
The state handlers are:
- enter : gets run before trans on the first time the state is used. Can be #f. Must return.
- trans : gets run before code each time the code is run. Can be #f. Must return.
- code : main thread. Can suspend. If it returns, the process dies
- exit : gets run when leaving a state. must return.
- event : not sure of the details here yet.
You can use "go" to change the state of a process. This causes the process main thread execution to be abandoned.
If the main thread has exits/protects on the stack frame, they will be run first to clean up.
There are several ways to "go"
- go during init: when a process is being initialized with run-function-in-process, you can "go".
this causes the run-function-in-process to return immediately, and the next time the process is dispatched
it will go into the other state. This will automatically set the process to waiting-to-run,
and shrink the process heap, if appropriate
- go from outside the process. You can temporarily set pp to another process, and have that
process go to another state. The actual go will occur the next time the process is scheduled.
Use the go-process macro to do this.
- go from a non-main thread in the right process. You can do a go from a temporary thread, like trans or post.
If you do it from post, the go returns and the rest of the post runs. If you do it from any other thread, the temporary thread
is immediately abandonded. Like the previous two, it will defer the actual go until the next time the
process runs.
- go from the main thread of the main process. This causes the (-> pp state) to change, the stack frames
to be cleaned up, and the old state's exit to be called. It will reset the stack, then run the code.
Unlike the others, this means you "go" immediately.
The compiler has two special hooks related to states: go-hook and define-state-hook.
These take care of doing a go and a state definition and properly checking types.
The define-state-hook takes a state object and handlers and defines a global symbol
with the appropriate state type.
The go-hook calls enter state and sets (-> proc next-state) for the given process.
It type checks the arguments for the entry function.
Summary of state system:
A process can be put into a state, using enter-state, or the go macro.
This will set up the process to run the appropriate handler functions defined by the state.
The state handlers are:
- enter : gets run before trans on the first time the state is used. Can be #f. Must return.
- trans : gets run before code each time the code is run. Can be #f. Must return.
- code : main thread. Can suspend. If it returns, the process dies
- exit : gets run when leaving a state. must return.
- event : not sure of the details here yet.
You can use "go" to change the state of a process. This causes the process main thread execution to be abandoned.
If the main thread has exits/protects on the stack frame, they will be run first to clean up.
There are several ways to "go"
- go during init: when a process is being initialized with run-function-in-process, you can "go".
this causes the run-function-in-process to return immediately, and the next time the process is dispatched
it will go into the other state. This will automatically set the process to waiting-to-run,
and shrink the process heap, if appropriate
- go from outside the process. You can temporarily set pp to another process, and have that
process go to another state. The actual go will occur the next time the process is scheduled.
Use the go-process macro to do this.
- go from a non-main thread in the right process. You can do a go from a temporary thread, like trans or post.
If you do it from post, the go returns and the rest of the post runs. If you do it from any other thread, the temporary thread
is immediately abandonded. Like the previous two, it will defer the actual go until the next time the
process runs.
- go from the main thread of the main process. This causes the (-> pp state) to change, the stack frames
to be cleaned up, and the old state's exit to be called. It will reset the stack, then run the code.
Unlike the others, this means you "go" immediately.
The compiler has two special hooks related to states: go-hook and define-state-hook.
These take care of doing a go and a state definition and properly checking types.
The define-state-hook takes a state object and handlers and defines a global symbol
with the appropriate state type.
The go-hook calls enter state and sets (-> proc next-state) for the given process.
It type checks the arguments for the entry function.
|#
(defmacro go (next-state &rest args)
@@ -417,7 +417,8 @@ It type checks the arguments for the entry function.
(defun looping-code ()
"Loop."
(loop (suspend))
(loop
(suspend))
#f)
(defmacro set-state-time ()
+14 -14
View File
@@ -8,20 +8,20 @@
;; dgos: KERNEL
#|
pskernel.gc contains a bunch of utilities for poking around the PS2's kernel.
These are unused in the retail game, and wouldn't be "safe" to use on a retail console,
as later console revisions may have different memory layout of the BIOS. I suspect this
was used for the purposes of debugging and handling crashes.
They took over syscall 102 to access memory inside the kernel.
There's an error message:
"I CANNOT CONTINUE TO LOAD GOAL, BECAUSE THE KERNEL VERSION HAS CHANGED~%"
"~%Alternatively, try removing pskernel.gc and debug-handlers.gc from project.cl, do an (lg) and then (:r) again~%"
My theory is that debug-handlers.gc held crash handlers, and on load would install them using functions defined in pskernel.gc.
In the retail game, they removed debug-handlers, but not pskernel.
In the PC port, all of these functions are just stubs.
pskernel.gc contains a bunch of utilities for poking around the PS2's kernel.
These are unused in the retail game, and wouldn't be "safe" to use on a retail console,
as later console revisions may have different memory layout of the BIOS. I suspect this
was used for the purposes of debugging and handling crashes.
They took over syscall 102 to access memory inside the kernel.
There's an error message:
"I CANNOT CONTINUE TO LOAD GOAL, BECAUSE THE KERNEL VERSION HAS CHANGED~%"
"~%Alternatively, try removing pskernel.gc and debug-handlers.gc from project.cl, do an (lg) and then (:r) again~%"
My theory is that debug-handlers.gc held crash handlers, and on load would install them using functions defined in pskernel.gc.
In the retail game, they removed debug-handlers, but not pskernel.
In the PC port, all of these functions are just stubs.
|#
;; map of the kernel's memory.
+20 -10
View File
@@ -46,7 +46,8 @@
(sound-play "gears-rumble" :id (-> self sound-id) :position (the-as symbol t2-0)))))
:code
(behavior ()
(loop (ja-no-eval :group! windmill-one-idle-ja :num! (seek! max 0.5) :frame-num 0.0)
(loop
(ja-no-eval :group! windmill-one-idle-ja :num! (seek! max 0.5) :frame-num 0.0)
(until (ja-done? 0)
(suspend)
(ja :num! (seek! max 0.5)))))
@@ -215,7 +216,8 @@
(ja :group! grottopole-idle-ja :num! min)
(transform-post)
(suspend)
(loop (logior! (-> self mask) (process-mask sleep))
(loop
(logior! (-> self mask) (process-mask sleep))
(suspend))))
(defun move-grottopole ((arg0 grottopole) (arg1 float))
@@ -462,7 +464,8 @@
:code
(behavior ()
(transform-post)
(loop (logior! (-> self mask) (process-mask sleep))
(loop
(logior! (-> self mask) (process-mask sleep))
(suspend))))
(defstate ecoventrock-break (ecoventrock)
@@ -688,7 +691,8 @@
(defstate bladeassm-idle (bladeassm)
:code
(behavior ()
(loop (+! (-> self angle) (* 3640.889 (seconds-per-frame)))
(loop
(+! (-> self angle) (* 3640.889 (seconds-per-frame)))
(set! (-> self angle) (the float (sar (shl (the int (-> self angle)) 48) 48)))
(pusher-post)
(suspend))))
@@ -822,7 +826,8 @@
:code
(behavior ()
(ja-post)
(loop (suspend))))
(loop
(suspend))))
(defstate flutflutegg-physics (flutflutegg)
:event
@@ -844,7 +849,8 @@
:code
(behavior ()
(set-time! (-> self state-time))
(loop (+! (-> self pos) (* (-> self vel) (seconds-per-frame)))
(loop
(+! (-> self pos) (* (-> self vel) (seconds-per-frame)))
;; og:preserve-this PAL patch here
(set! (-> self vel) (* (-> self vel) (- 1.0 (* 0.05 (-> *display* time-adjust-ratio)))))
(move! (-> self wobbler))
@@ -884,7 +890,8 @@
:to
self)
(close-specific-task! (game-task beach-flutflut) (task-status need-reminder))
(loop (vector-float*! (-> self root transv) (-> self dir) (-> self vel))
(loop
(vector-float*! (-> self root transv) (-> self dir) (-> self vel))
(set-time! (-> self state-time))
(until v1-25
(vector-v++! (-> self root transv) (compute-acc-due-to-gravity (-> self root) (new-stack-vector0) 0.0))
@@ -936,7 +943,8 @@
(set-vector! (-> self root trans) -231190.94 64559.105 -1164727.5 1.0)
(quaternion-axis-angle! (-> self root quat) 0.0 1.0 0.0 0.0)
(ja :group! flutflutegg-broke-ja :num! max)
(loop (logior! (-> self mask) (process-mask sleep))
(loop
(logior! (-> self mask) (process-mask sleep))
(suspend)))
:post ja-post)
@@ -1011,7 +1019,8 @@
(go harvester-inflate #t))
(ja :group! harvester-inflate-ja :num! (identity (ja-aframe 1.0 0)))
(ja-post)
(loop (logior! (-> self mask) (process-mask sleep))
(loop
(logior! (-> self mask) (process-mask sleep))
(suspend))))
(defstate harvester-inflate (harvester)
@@ -1022,7 +1031,8 @@
(until (ja-done? 0)
(suspend)
(ja :num! (seek!))))
(loop (ja-no-eval :group! harvester-idle-ja :num! (seek!) :frame-num 0.0)
(loop
(ja-no-eval :group! harvester-idle-ja :num! (seek!) :frame-num 0.0)
(until (ja-done? 0)
(suspend)
(ja :num! (seek!)))))
+7 -6
View File
@@ -78,12 +78,13 @@
(defstate beach-part-grotto-1 (beach-part)
:code
(behavior ()
(loop (when (is-visible? self)
(let* ((gp-0 (camera-pos))
(f0-0 (vector-vector-distance (-> self root trans) gp-0)))
(if (or (< (-> gp-0 y) (-> self root trans y)) (< 122880.0 f0-0))
(launch-particles (-> *part-id-table* 666) (-> self root trans))))
(launch-particles (-> *part-id-table* 668) (-> self root trans)))
(loop
(when (is-visible? self)
(let* ((gp-0 (camera-pos))
(f0-0 (vector-vector-distance (-> self root trans) gp-0)))
(if (or (< (-> gp-0 y) (-> self root trans y)) (< 122880.0 f0-0))
(launch-particles (-> *part-id-table* 666) (-> self root trans))))
(launch-particles (-> *part-id-table* 668) (-> self root trans)))
(suspend))))
(defpart 671
+4 -2
View File
@@ -260,7 +260,8 @@
(if (-> self trigger) (go-virtual falling))
(ja-channel-set! 0)
(ja-post)
(loop (logior! (-> self mask) (process-mask sleep))
(loop
(logior! (-> self mask) (process-mask sleep))
(suspend))))
(defstate loading (beach-rock)
@@ -270,7 +271,8 @@
event)
:code
(behavior ()
(loop (spool-push *art-control* "lrocklrg-falling" 0 self -1.0)
(loop
(spool-push *art-control* "lrocklrg-falling" 0 self -1.0)
(suspend))))
(defstate falling (beach-rock)
+10 -7
View File
@@ -148,7 +148,8 @@ nav-enemy-default-event-handler
(set! (-> self target-speed) 0.0)
(set! (-> self draw force-lod) 2)
(ja-channel-push! 1 (seconds 0.075))
(loop (ja :group! lurkercrab-idle-ja :num! (identity (ja-aframe 1.0 0)))
(loop
(ja :group! lurkercrab-idle-ja :num! (identity (ja-aframe 1.0 0)))
(let ((gp-1 (current-time))) (until (time-elapsed? gp-1 (seconds 3)) (suspend)))
(ja-no-eval :group! lurkercrab-idle-ja :num! (seek! (ja-aframe 19.0 0)) :frame-num (ja-aframe 1.0 0))
(until (ja-done? 0)
@@ -189,11 +190,12 @@ nav-enemy-default-event-handler
(suspend)
(ja :num! (seek!))))
(ja-channel-push! 1 (seconds 0.075))
(loop (dotimes (gp-0 6)
(ja-no-eval :group! lurkercrab-walk-ja :num! (seek!) :frame-num 0.0)
(until (ja-done? 0)
(suspend)
(ja :num! (seek!))))
(loop
(dotimes (gp-0 6)
(ja-no-eval :group! lurkercrab-walk-ja :num! (seek!) :frame-num 0.0)
(until (ja-done? 0)
(suspend)
(ja :num! (seek!))))
(when (nav-enemy-rnd-go-idle? 0.2)
(ja-no-eval :num! (loop!))
(ja-channel-push! 1 (seconds 0.6))
@@ -249,7 +251,8 @@ nav-enemy-default-event-handler
(behavior ()
(logior! (-> self nav-enemy-flags) (nav-enemy-flags enable-rotate))
(ja-channel-push! 1 (seconds 0.075))
(loop (ja-no-eval :group! lurkercrab-walk-ja :num! (seek!) :frame-num 0.0)
(loop
(ja-no-eval :group! lurkercrab-walk-ja :num! (seek!) :frame-num 0.0)
(until (ja-done? 0)
(suspend)
(ja :num! (seek!)))
+4 -2
View File
@@ -49,7 +49,8 @@ nav-enemy-default-event-handler
(ja :num! (seek!))))
(else (ja-channel-push! 1 (seconds 0.17))))
(let ((f30-0 (rand-vu-float-range 0.9 1.1)))
(loop (if (rand-vu-percent? 0.25) (sound-play "puppy-bark"))
(loop
(if (rand-vu-percent? 0.25) (sound-play "puppy-bark"))
(ja-no-eval :group! lurkerpuppy-run-ja :num! (seek! max f30-0) :frame-num 0.0)
(until (ja-done? 0)
(if (logtest? (-> self nav-enemy-flags) (nav-enemy-flags navenmf8)) (go-virtual nav-enemy-attack))
@@ -65,7 +66,8 @@ nav-enemy-default-event-handler
(set! (-> self turn-time) (seconds 0.1))
(logclear! (-> self nav-enemy-flags) (nav-enemy-flags enable-travel))
(let ((f30-0 (rand-vu-float-range 0.8 1.2)))
(loop (logior! (-> self nav-enemy-flags) (nav-enemy-flags enable-travel))
(loop
(logior! (-> self nav-enemy-flags) (nav-enemy-flags enable-travel))
(ja-channel-push! 1 (seconds 0.1))
(ja-no-eval :group! lurkerpuppy-celebrate-ja :num! (seek! (ja-aframe 12.0 0) f30-0) :frame-num 0.0)
(until (ja-done? 0)
+7 -5
View File
@@ -246,10 +246,11 @@ lurkerworm-default-post-behavior
(set-time! (-> self state-time)))
:code
(behavior ()
(loop (if (and (time-elapsed? (-> self state-time) (seconds 1))
*target*
(>= 81920.0 (vector-vector-distance (-> self root trans) (-> *target* control trans))))
(go lurkerworm-spot))
(loop
(if (and (time-elapsed? (-> self state-time) (seconds 1))
*target*
(>= 81920.0 (vector-vector-distance (-> self root trans) (-> *target* control trans))))
(go lurkerworm-spot))
(suspend)))
:post lurkerworm-default-post-behavior)
@@ -262,7 +263,8 @@ lurkerworm-default-post-behavior
:code
(behavior ()
(set! (-> self part local-clock) 0)
(loop (spawn (-> self part) (-> self root trans))
(loop
(spawn (-> self part) (-> self root trans))
(particle-effect self)
(when (time-elapsed? (-> self state-time) (seconds 1))
(if (and *target* (>= 81920.0 (vector-vector-distance (-> self root trans) (-> *target* control trans))))
+6 -4
View File
@@ -103,9 +103,10 @@
(seek-toward-heading-vec! (-> self root) s3-0 arg0 (the-as time-frame arg1)))))
(defbehavior pelican-fly pelican ((arg0 (function pelican int)) (arg1 (function pelican int)))
(loop (cond
((ja-group? pelican-fly-ja) (ja-no-eval :num! (seek!)) (while (not (ja-done? 0)) (suspend) (ja-eval)))
(else (ja-channel-push! 1 (seconds 0.25))))
(loop
(cond
((ja-group? pelican-fly-ja) (ja-no-eval :num! (seek!)) (while (not (ja-done? 0)) (suspend) (ja-eval)))
(else (ja-channel-push! 1 (seconds 0.25))))
(let ((s4-0 (arg0 self)))
(dotimes (s3-0 s4-0)
(ja-no-eval :group! pelican-fly-ja :num! (seek!) :frame-num 0.0)
@@ -376,7 +377,8 @@
(ja :num! (seek!)))
(ja-channel-push! 1 (seconds 0.5))))
(send-event (handle->process (-> self cam-tracker)) 'message 'release)
(loop (ja-no-eval :group! pelican-sleep-ja :num! (seek!) :frame-num 0.0)
(loop
(ja-no-eval :group! pelican-sleep-ja :num! (seek!) :frame-num 0.0)
(until (ja-done? 0)
(suspend)
(ja :num! (seek!)))))
+68 -67
View File
@@ -155,87 +155,88 @@
(suspend)
(ja :num! (seek!)))
(muse-to-idle (the-as muse self))))
(loop (let ((v1-43 (current-status (-> self tasks))))
(cond
((or (= v1-43 (task-status invalid)) (= v1-43 (task-status need-resolution)))
(ja-no-eval :group! sculptor-to-small-ja :num! (seek!) :frame-num 0.0)
(loop
(let ((v1-43 (current-status (-> self tasks))))
(cond
((or (= v1-43 (task-status invalid)) (= v1-43 (task-status need-resolution)))
(ja-no-eval :group! sculptor-to-small-ja :num! (seek!) :frame-num 0.0)
(until (ja-done? 0)
(suspend)
(ja :num! (seek!)))
(let* ((f30-0 4.0)
(v1-68 (/ (the-as int (rand-uint31-gen *random-generator*)) 256))
(v1-69 (the-as number (logior #x3f800000 v1-68))))
(countdown (gp-1 (+ (the int (* f30-0 (+ -1.0 (the-as float v1-69)))) 4))
(ja-no-eval :group! sculptor-small-ja :num! (seek!) :frame-num 0.0)
(until (ja-done? 0)
(suspend)
(ja :num! (seek!)))))
(let ((f30-1 (rand-float-gen)))
(ja-no-eval :group! sculptor-small-to-looking-ja :num! (seek!) :frame-num 0.0)
(until (ja-done? 0)
(suspend)
(ja :num! (seek!)))
(ja-no-eval :group! sculptor-looking-ja :num! (seek!) :frame-num 0.0)
(until (ja-done? 0)
(suspend)
(ja :num! (seek!)))
(ja-no-eval :group! sculptor-from-looking-ja :num! (seek!) :frame-num 0.0)
(until (ja-done? 0)
(suspend)
(ja :num! (seek!)))
(when (< f30-1 0.5)
(ja-no-eval :group! sculptor-to-huge-ja :num! (seek!) :frame-num 0.0)
(until (ja-done? 0)
(suspend)
(ja :num! (seek!)))
(let* ((f30-0 4.0)
(v1-68 (/ (the-as int (rand-uint31-gen *random-generator*)) 256))
(v1-69 (the-as number (logior #x3f800000 v1-68))))
(countdown (gp-1 (+ (the int (* f30-0 (+ -1.0 (the-as float v1-69)))) 4))
(ja-no-eval :group! sculptor-small-ja :num! (seek!) :frame-num 0.0)
(let* ((f30-2 2.0)
(v1-190 (/ (the-as int (rand-uint31-gen *random-generator*)) 256))
(v1-191 (the-as number (logior #x3f800000 v1-190))))
(countdown (gp-2 (+ (the int (* f30-2 (+ -1.0 (the-as float v1-191)))) 2))
(ja-no-eval :group! sculptor-huge-ja :num! (seek!) :frame-num 0.0)
(until (ja-done? 0)
(suspend)
(ja :num! (seek!)))))
(let ((f30-1 (rand-float-gen)))
(ja-no-eval :group! sculptor-small-to-looking-ja :num! (seek!) :frame-num 0.0)
(until (ja-done? 0)
(suspend)
(ja :num! (seek!)))
(ja-no-eval :group! sculptor-looking-ja :num! (seek!) :frame-num 0.0)
(until (ja-done? 0)
(suspend)
(ja :num! (seek!)))
(ja-no-eval :group! sculptor-from-looking-ja :num! (seek!) :frame-num 0.0)
(until (ja-done? 0)
(suspend)
(ja :num! (seek!)))
(when (< f30-1 0.5)
(ja-no-eval :group! sculptor-to-huge-ja :num! (seek!) :frame-num 0.0)
(until (ja-done? 0)
(suspend)
(ja :num! (seek!)))
(let* ((f30-2 2.0)
(v1-190 (/ (the-as int (rand-uint31-gen *random-generator*)) 256))
(v1-191 (the-as number (logior #x3f800000 v1-190))))
(countdown (gp-2 (+ (the int (* f30-2 (+ -1.0 (the-as float v1-191)))) 2))
(ja-no-eval :group! sculptor-huge-ja :num! (seek!) :frame-num 0.0)
(until (ja-done? 0)
(suspend)
(ja :num! (seek!)))))
(ja-no-eval :group! sculptor-huge-to-looking-ja :num! (seek!) :frame-num 0.0)
(until (ja-done? 0)
(suspend)
(ja :num! (seek!)))
(ja-no-eval :group! sculptor-looking-ja :num! (seek!) :frame-num 0.0)
(until (ja-done? 0)
(suspend)
(ja :num! (seek!)))
(ja-no-eval :group! sculptor-from-looking-ja :num! (seek!) :frame-num 0.0)
(until (ja-done? 0)
(suspend)
(ja :num! (seek!))))))
((begin
(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))))
(countdown (gp-3 (+ (the int (* f30-3 (+ -1.0 (the-as float v1-288)))) 4))
(ja-no-eval :group! sculptor-idle-ja :num! (seek!) :frame-num 0.0)
(until (ja-done? 0)
(suspend)
(ja :num! (seek!)))))
(< (rand-float-gen) 0.5))
(ja-no-eval :group! sculptor-sigh-ja :num! (seek!) :frame-num 0.0)
(until (ja-done? 0)
(suspend)
(ja :num! (seek!))))
(else
(ja-no-eval :group! sculptor-strikestart-ja :num! (seek!) :frame-num 0.0)
(ja-no-eval :group! sculptor-huge-to-looking-ja :num! (seek!) :frame-num 0.0)
(until (ja-done? 0)
(suspend)
(ja :num! (seek!)))
(ja-no-eval :group! sculptor-strikemiddle-ja :num! (seek!) :frame-num 0.0)
(ja-no-eval :group! sculptor-looking-ja :num! (seek!) :frame-num 0.0)
(until (ja-done? 0)
(suspend)
(ja :num! (seek!)))
(ja-no-eval :group! sculptor-strikeend-ja :num! (seek!) :frame-num 0.0)
(ja-no-eval :group! sculptor-from-looking-ja :num! (seek!) :frame-num 0.0)
(until (ja-done? 0)
(suspend)
(ja :num! (seek!)))))))))
(ja :num! (seek!))))))
((begin
(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))))
(countdown (gp-3 (+ (the int (* f30-3 (+ -1.0 (the-as float v1-288)))) 4))
(ja-no-eval :group! sculptor-idle-ja :num! (seek!) :frame-num 0.0)
(until (ja-done? 0)
(suspend)
(ja :num! (seek!)))))
(< (rand-float-gen) 0.5))
(ja-no-eval :group! sculptor-sigh-ja :num! (seek!) :frame-num 0.0)
(until (ja-done? 0)
(suspend)
(ja :num! (seek!))))
(else
(ja-no-eval :group! sculptor-strikestart-ja :num! (seek!) :frame-num 0.0)
(until (ja-done? 0)
(suspend)
(ja :num! (seek!)))
(ja-no-eval :group! sculptor-strikemiddle-ja :num! (seek!) :frame-num 0.0)
(until (ja-done? 0)
(suspend)
(ja :num! (seek!)))
(ja-no-eval :group! sculptor-strikeend-ja :num! (seek!) :frame-num 0.0)
(until (ja-done? 0)
(suspend)
(ja :num! (seek!)))))))))
(defmethod init-from-entity! ((this sculptor) (arg0 entity-actor))
(process-taskable-method-40 this arg0 *sculptor-sg* 3 40 (new 'static 'vector :w 4096.0) 5)
+58 -54
View File
@@ -305,57 +305,58 @@
(update-transforms! (-> self root))
(clear-collide-with-as (-> self root))
(ja :group! seagull-idle-ja :num! (identity (ja-aframe 0.0 0)))
(loop (let* ((f30-0 4.0)
(v1-14 (/ (the-as int (rand-uint31-gen *random-generator*)) 256))
(v1-15 (the-as number (logior #x3f800000 v1-14)))
(gp-1 (the int (* f30-0 (+ -1.0 (the-as float v1-15))))))
(let* ((f30-1 60.0)
(v1-18 (/ (the-as int (rand-uint31-gen *random-generator*)) 256))
(v1-19 (the-as number (logior #x3f800000 v1-18)))
(s5-0 (the int (* f30-1 (+ -1.0 (the-as float v1-19))))))
(dotimes (s4-0 s5-0)
(suspend)))
(cond
((zero? gp-1)
(ja-no-eval :group! seagull-idle-ja :num! (seek! (ja-aframe 4.0 0)) :frame-num (ja-aframe 0.0 0))
(until (ja-done? 0)
(suspend)
(ja :num! (seek! (ja-aframe 4.0 0))))
(let* ((f30-2 60.0)
(v1-37 (/ (the-as int (rand-uint31-gen *random-generator*)) 256))
(v1-38 (the-as number (logior #x3f800000 v1-37)))
(gp-4 (the int (* f30-2 (+ -1.0 (the-as float v1-38))))))
(dotimes (s5-1 gp-4)
(suspend)))
(ja-no-eval :group! seagull-idle-ja :num! (seek! (ja-aframe 10.0 0)) :frame-num (ja-aframe 4.0 0))
(until (ja-done? 0)
(suspend)
(ja :num! (seek! (ja-aframe 10.0 0))))
(let* ((f30-3 60.0)
(v1-55 (/ (the-as int (rand-uint31-gen *random-generator*)) 256))
(v1-56 (the-as number (logior #x3f800000 v1-55)))
(gp-7 (the int (* f30-3 (+ -1.0 (the-as float v1-56))))))
(dotimes (s5-2 gp-7)
(suspend)))
(ja-no-eval :group! seagull-idle-ja :num! (seek! (ja-aframe 14.0 0)) :frame-num (ja-aframe 10.0 0))
(until (ja-done? 0)
(suspend)
(ja :num! (seek! (ja-aframe 14.0 0)))))
((= gp-1 2)
(ja-no-eval :group! seagull-peck-ja :num! (seek! (ja-aframe 4.0 0)) :frame-num (ja-aframe 0.0 0))
(until (ja-done? 0)
(suspend)
(ja :num! (seek! (ja-aframe 4.0 0)))))
((= gp-1 3)
(ja-no-eval :group! seagull-peck-ja :num! (seek! (ja-aframe 8.0 0)) :frame-num (ja-aframe 4.0 0))
(until (ja-done? 0)
(suspend)
(ja :num! (seek! (ja-aframe 8.0 0)))))
((= gp-1 4)
(ja-no-eval :group! seagull-peck-ja :num! (seek! (ja-aframe 12.0 0)) :frame-num (ja-aframe 8.0 0))
(until (ja-done? 0)
(suspend)
(ja :num! (seek! (ja-aframe 12.0 0)))))))))
(loop
(let* ((f30-0 4.0)
(v1-14 (/ (the-as int (rand-uint31-gen *random-generator*)) 256))
(v1-15 (the-as number (logior #x3f800000 v1-14)))
(gp-1 (the int (* f30-0 (+ -1.0 (the-as float v1-15))))))
(let* ((f30-1 60.0)
(v1-18 (/ (the-as int (rand-uint31-gen *random-generator*)) 256))
(v1-19 (the-as number (logior #x3f800000 v1-18)))
(s5-0 (the int (* f30-1 (+ -1.0 (the-as float v1-19))))))
(dotimes (s4-0 s5-0)
(suspend)))
(cond
((zero? gp-1)
(ja-no-eval :group! seagull-idle-ja :num! (seek! (ja-aframe 4.0 0)) :frame-num (ja-aframe 0.0 0))
(until (ja-done? 0)
(suspend)
(ja :num! (seek! (ja-aframe 4.0 0))))
(let* ((f30-2 60.0)
(v1-37 (/ (the-as int (rand-uint31-gen *random-generator*)) 256))
(v1-38 (the-as number (logior #x3f800000 v1-37)))
(gp-4 (the int (* f30-2 (+ -1.0 (the-as float v1-38))))))
(dotimes (s5-1 gp-4)
(suspend)))
(ja-no-eval :group! seagull-idle-ja :num! (seek! (ja-aframe 10.0 0)) :frame-num (ja-aframe 4.0 0))
(until (ja-done? 0)
(suspend)
(ja :num! (seek! (ja-aframe 10.0 0))))
(let* ((f30-3 60.0)
(v1-55 (/ (the-as int (rand-uint31-gen *random-generator*)) 256))
(v1-56 (the-as number (logior #x3f800000 v1-55)))
(gp-7 (the int (* f30-3 (+ -1.0 (the-as float v1-56))))))
(dotimes (s5-2 gp-7)
(suspend)))
(ja-no-eval :group! seagull-idle-ja :num! (seek! (ja-aframe 14.0 0)) :frame-num (ja-aframe 10.0 0))
(until (ja-done? 0)
(suspend)
(ja :num! (seek! (ja-aframe 14.0 0)))))
((= gp-1 2)
(ja-no-eval :group! seagull-peck-ja :num! (seek! (ja-aframe 4.0 0)) :frame-num (ja-aframe 0.0 0))
(until (ja-done? 0)
(suspend)
(ja :num! (seek! (ja-aframe 4.0 0)))))
((= gp-1 3)
(ja-no-eval :group! seagull-peck-ja :num! (seek! (ja-aframe 8.0 0)) :frame-num (ja-aframe 4.0 0))
(until (ja-done? 0)
(suspend)
(ja :num! (seek! (ja-aframe 8.0 0)))))
((= gp-1 4)
(ja-no-eval :group! seagull-peck-ja :num! (seek! (ja-aframe 12.0 0)) :frame-num (ja-aframe 8.0 0))
(until (ja-done? 0)
(suspend)
(ja :num! (seek! (ja-aframe 12.0 0)))))))))
:post seagull-post)
(defmethod move-vertically! ((this seagull) (arg0 symbol))
@@ -480,7 +481,8 @@
(behavior ()
(set! (-> self max-tilt) 1820.4445)
(let ((gp-0 0))
(loop (ja-no-eval :group! seagull-fly-ja :num! (seek!) :frame-num 0.0)
(loop
(ja-no-eval :group! seagull-fly-ja :num! (seek!) :frame-num 0.0)
(until (ja-done? 0)
(ja-blend-eval)
(when (-> self teleport)
@@ -586,7 +588,8 @@
(behavior ()
(set-time! (-> self state-time))
(set! (-> self max-tilt) 4551.1113)
(loop (ja-no-eval :group! seagull-slowfly-ja :num! (seek!) :frame-num 0.0)
(loop
(ja-no-eval :group! seagull-slowfly-ja :num! (seek!) :frame-num 0.0)
(until (ja-done? 0)
(ja-blend-eval)
(when (-> self teleport)
@@ -866,7 +869,8 @@
(defstate seagullflock-idle (seagullflock)
:code
(behavior ()
(loop (if (> (-> self teleport-frames) 0) (go seagullflock-at-waterfall))
(loop
(if (> (-> self teleport-frames) 0) (go seagullflock-at-waterfall))
(if (and *target* (>= 102400.0 (vector-vector-distance (-> self trans) (-> *target* control trans))))
(level-hint-spawn (text-id zero) (the-as string #f) (-> self entity) *entity-pool* (game-task none)))
(suspend))))
@@ -73,9 +73,10 @@
(((task-status need-reward-speech)) (send-event self 'play-anim))))
:code
(behavior ()
(loop (when (!= (ja-group) (get-art-elem self))
(ja-channel-push! 1 (seconds 0.05))
(ja :group! assistant-lavatube-end-idle-ja))
(loop
(when (!= (ja-group) (get-art-elem self))
(ja-channel-push! 1 (seconds 0.05))
(ja :group! assistant-lavatube-end-idle-ja))
(ja-no-eval :group! (ja-group) :num! (seek!) :frame-num 0.0)
(until (ja-done? 0)
(suspend)
+19 -12
View File
@@ -78,9 +78,10 @@
(behavior ()
(let ((gp-0 (new 'stack-no-clear 'vector))
(s5-0 (new 'stack-no-clear 'vector)))
(loop (cond
((< (- (-> (target-pos 0) y) (-> self root trans y)) -122880.0) (set! (-> self draw force-lod) 1))
(else (set! (-> self draw force-lod) 0) 0))
(loop
(cond
((< (- (-> (target-pos 0) y) (-> self root trans y)) -122880.0) (set! (-> self draw force-lod) 1))
(else (set! (-> self draw force-lod) 0) 0))
(set! (-> self y-angle) (* 65536.0 (get-current-phase (-> self sync)) (-> self rot-scale)))
(quaternion-axis-angle! (-> self root quat) 0.0 1.0 0.0 (-> self y-angle))
(vector-orient-by-quat! gp-0 (-> self cull-dir-local) (-> self root quat))
@@ -274,7 +275,8 @@
:trans rider-trans
:code
(behavior ()
(loop (update! (-> self sound))
(loop
(update! (-> self sound))
(quaternion-axis-angle! (-> self root quat)
0.0
1.0
@@ -600,10 +602,11 @@
(send-event (ppointer->process gp-7) 'art-joint-anim "citb-robotboss-belly-idle" 0)
(send-event (ppointer->process gp-7) 'draw #t))
(update-transforms! (-> self root))
(loop (when (-> self shield-on)
(update! (-> self sound))
(spawn (-> self part) (-> self root trans))
(set! (-> *palette-fade-controls* control 7 fade) 1.0))
(loop
(when (-> self shield-on)
(update! (-> self sound))
(spawn (-> self part) (-> self root trans))
(set! (-> *palette-fade-controls* control 7 fade) 1.0))
(suspend)))
:post ja-post)
@@ -667,7 +670,8 @@
(('trigger) (go citb-coil-break))))
:code
(behavior ()
(loop (ja-no-eval :group! (ja-group) :num! (seek!) :frame-num 0.0)
(loop
(ja-no-eval :group! (ja-group) :num! (seek!) :frame-num 0.0)
(until (ja-done? 0)
(suspend)
(ja :num! (seek!)))))
@@ -695,7 +699,8 @@
(until (ja-done? 0)
(suspend)
(ja :num! (seek!)))
(loop (spawn (-> self part-off) (-> self root trans))
(loop
(spawn (-> self part-off) (-> self root trans))
(suspend)))
:post ja-post)
@@ -732,7 +737,8 @@
:event citb-hose-event-handler
:code
(behavior ()
(loop (ja-no-eval :group! citb-hose-idle-ja :num! (seek!) :frame-num 0.0)
(loop
(ja-no-eval :group! citb-hose-idle-ja :num! (seek!) :frame-num 0.0)
(until (ja-done? 0)
(suspend)
(ja :num! (seek!)))))
@@ -868,7 +874,8 @@
(behavior ()
(lods-assign! (-> self draw) (-> self normal-look))
(update-transforms! (-> self root))
(loop (spawn (-> self part) (-> self root trans))
(loop
(spawn (-> self part) (-> self root trans))
(update! (-> self sound))
(if (-> self mushroom) (spawn (-> self part-mushroom) (-> self mushroom-pos)))
(if (not (-> self mushroom)) (+! (-> *palette-fade-controls* control 3 fade) 0.3333))
@@ -80,13 +80,14 @@
:trans rider-trans
:code
(behavior ()
(loop (cond
((-> self cloning)
(let ((gp-0 (ppointer->process (-> self parent-override))))
(when gp-0
(joint-control-copy! (-> self skel) (-> (the-as citb-sage gp-0) skel))
(joint-control-remap! (-> self skel) (-> self draw art-group) (-> (the-as citb-sage gp-0) draw art-group) () 0 ""))))
(else (ja :num! (loop!))))
(loop
(cond
((-> self cloning)
(let ((gp-0 (ppointer->process (-> self parent-override))))
(when gp-0
(joint-control-copy! (-> self skel) (-> (the-as citb-sage gp-0) skel))
(joint-control-remap! (-> self skel) (-> self draw art-group) (-> (the-as citb-sage gp-0) draw art-group) () 0 ""))))
(else (ja :num! (loop!))))
(suspend)))
:post
(behavior ()
+21 -15
View File
@@ -78,7 +78,8 @@
(update-transforms! (-> self root))
(set-time! (-> self state-time))
(logior! (-> self mask) (process-mask actor-pause))
(loop (if (time-elapsed? (-> self state-time) (-> self duration)) (go drop-plat-drop))
(loop
(if (time-elapsed? (-> self state-time) (-> self duration)) (go drop-plat-drop))
(suspend)))
:post ja-post)
@@ -101,11 +102,12 @@
(logior! (-> self draw status) (draw-status hidden))
(ja-post)
(set-time! (-> self state-time))
(loop (when (time-elapsed? (-> self state-time) (-> self delay))
(let ((v1-14 (logclear (-> self draw status) (draw-status hidden)))
(a0-5 (-> self draw)))
(set! (-> a0-5 status) v1-14)
(go drop-plat-rise a0-5)))
(loop
(when (time-elapsed? (-> self state-time) (-> self delay))
(let ((v1-14 (logclear (-> self draw status) (draw-status hidden)))
(a0-5 (-> self draw)))
(set! (-> a0-5 status) v1-14)
(go drop-plat-rise a0-5)))
(suspend))))
(defstate drop-plat-rise (drop-plat)
@@ -123,8 +125,9 @@
(s5-0 #f))
(set! (-> gp-0 quad) (-> self root trans quad))
(set! (-> gp-0 y) (-> (the-as process-drawable (-> self parent 0)) root trans y))
(loop (let ((f0-6 (fmax 0.0 (- 1.0 (* 0.0033333334 (the float (- (current-time) (-> self state-time))))))))
(set! (-> self interp) (* f0-6 f0-6)))
(loop
(let ((f0-6 (fmax 0.0 (- 1.0 (* 0.0033333334 (the float (- (current-time) (-> self state-time))))))))
(set! (-> self interp) (* f0-6 f0-6)))
(set! (-> self root trans y)
(- (-> (the-as process-drawable (-> self parent 0)) root trans y) (* 204800.0 (-> self interp))))
(when (and (not s5-0) (< (-> self interp) 0.05))
@@ -152,7 +155,8 @@
(set! (-> self interp) (/ (the float (- (current-time) (-> self state-time))) (the float gp-1)))
(set! (-> self spin-angle) (* 910.2222 (sin (* 196608.0 (-> self interp)))))
(suspend))))
(loop (vector-v++! (-> self root transv) (compute-acc-due-to-gravity (-> self root) (new-stack-vector0) 0.0))
(loop
(vector-v++! (-> self root transv) (compute-acc-due-to-gravity (-> self root) (new-stack-vector0) 0.0))
(vector-v++! (-> self root trans) (-> self root transv))
(if (< 204800.0 (- (-> (the-as process-drawable (-> self parent 0)) root trans y) (-> self root trans y)))
(go drop-plat-die))
@@ -318,7 +322,8 @@
:code
(behavior ()
(citb-drop-plat-drop-all-children)
(loop (suspend))))
(loop
(suspend))))
(defstate citb-drop-plat-active (citb-drop-plat)
:event
@@ -333,11 +338,12 @@
(behavior ()
(set-time! (-> self state-time))
(citb-drop-plat-spawn-children)
(loop (if (or (time-elapsed? (-> self state-time) (+ (-> self duration) (seconds 2)))
(or (not *target*)
(< (-> self idle-distance) (vector-vector-distance (-> self root trans) (-> *target* control trans))))
(not (-> self child)))
(go citb-drop-plat-idle))
(loop
(if (or (time-elapsed? (-> self state-time) (+ (-> self duration) (seconds 2)))
(or (not *target*)
(< (-> self idle-distance) (vector-vector-distance (-> self root trans) (-> *target* control trans))))
(not (-> self child)))
(go citb-drop-plat-idle))
(suspend))))
(defmethod init-from-entity! ((this citb-drop-plat) (arg0 entity-actor))
+20 -14
View File
@@ -229,11 +229,12 @@
(ja-post)
(suspend))
(set-time! (-> self state-time))
(loop (let ((f30-0 (- 1.0 (* 0.0011111111 (the float (- (current-time) (-> self state-time)))))))
(when (< f30-0 0.0)
(set! (-> self root trans y) (-> self rise-height))
(go-virtual citb-base-plat-active))
(set! (-> self root trans y) (lerp (-> self rise-height) (-> self idle-height) (* f30-0 f30-0))))
(loop
(let ((f30-0 (- 1.0 (* 0.0011111111 (the float (- (current-time) (-> self state-time)))))))
(when (< f30-0 0.0)
(set! (-> self root trans y) (-> self rise-height))
(go-virtual citb-base-plat-active))
(set! (-> self root trans y) (lerp (-> self rise-height) (-> self idle-height) (* f30-0 f30-0))))
(let ((f0-12 (fmax 0.0 (fmin 1.0 (* 0.000012207031 (+ 409600.0 (-> self root trans y)))))))
(set! (-> self draw color-mult x) f0-12)
(set! (-> self draw color-mult y) f0-12)
@@ -465,7 +466,8 @@
:trans rider-trans
:code
(behavior ()
(loop (ja-no-eval :group! (ja-group) :num! (seek!) :frame-num 0.0)
(loop
(ja-no-eval :group! (ja-group) :num! (seek!) :frame-num 0.0)
(until (ja-done? 0)
(suspend)
(ja :num! (seek!)))
@@ -617,7 +619,8 @@
(go citb-firehose-active)))
:code
(behavior ()
(loop (suspend)))
(loop
(suspend)))
:post ja-post)
(defstate citb-firehose-active (citb-firehose)
@@ -632,7 +635,8 @@
(if (< f0-2 f1-1) (go citb-firehose-blast))))
:code
(behavior ()
(loop (suspend)))
(loop
(suspend)))
:post ja-post)
(defbehavior citb-firehose-blast-particles citb-firehose ()
@@ -745,7 +749,8 @@
(behavior ()
(logior! (-> self draw status) (draw-status hidden))
(clear-collide-with-as (-> self root))
(loop (suspend))))
(loop
(suspend))))
(defstate citb-exit-plat-rise (citb-exit-plat)
:trans rider-trans
@@ -754,11 +759,12 @@
(logclear! (-> self draw status) (draw-status hidden))
(restore-collide-with-as (-> self root))
(set-time! (-> self state-time))
(loop (let ((f30-0 (- 1.0 (* 0.0016666667 (the float (- (current-time) (-> self state-time)))))))
(when (< f30-0 0.0)
(set! (-> self root trans y) (-> self rise-height))
(go-virtual plat-button-idle))
(set! (-> self root trans y) (lerp (-> self rise-height) (-> self idle-height) (* f30-0 f30-0))))
(loop
(let ((f30-0 (- 1.0 (* 0.0016666667 (the float (- (current-time) (-> self state-time)))))))
(when (< f30-0 0.0)
(set! (-> self root trans y) (-> self rise-height))
(go-virtual plat-button-idle))
(set! (-> self root trans y) (lerp (-> self rise-height) (-> self idle-height) (* f30-0 f30-0))))
(suspend)))
:post rider-post)
+21 -19
View File
@@ -249,17 +249,18 @@ battlecontroller-default-event-handler
(behavior ()
(set-time! (-> self state-time))
(if (-> self prespawn) (battlecontroller-fill-all-spawners))
(loop (when (time-elapsed? (-> self state-time) (seconds 0.1))
(set-time! (-> self state-time))
(when (and *target*
(>= (-> self activate-distance) (vector-vector-distance (-> self root trans) (-> *target* control trans))))
(set! (-> self noticed-player) #t)
(battlecontroller-battle-begin)
(when (not (-> self prespawn))
(battlecontroller-fill-all-spawners)
(suspend)
0)
(go-virtual battlecontroller-play-intro-camera)))
(loop
(when (time-elapsed? (-> self state-time) (seconds 0.1))
(set-time! (-> self state-time))
(when (and *target*
(>= (-> self activate-distance) (vector-vector-distance (-> self root trans) (-> *target* control trans))))
(set! (-> self noticed-player) #t)
(battlecontroller-battle-begin)
(when (not (-> self prespawn))
(battlecontroller-fill-all-spawners)
(suspend)
0)
(go-virtual battlecontroller-play-intro-camera)))
(suspend)))
:post #f)
@@ -297,14 +298,15 @@ battlecontroller-default-event-handler
(behavior ()
(set-time! (-> self state-time))
(battlecontroller-camera-on)
(loop (when (time-elapsed? (-> self state-time) (seconds 0.1))
(set-time! (-> self state-time))
(let ((gp-0 0))
(let ((v1-8 (-> self child))) (while v1-8 (+! gp-0 1) (set! v1-8 (-> v1-8 0 brother)) (nop!) (nop!)))
(if (and (zero? gp-0) (= (-> self spawn-count) (-> self max-spawn-count))) (go-virtual battlecontroller-die))
(when (< gp-0 (-> self target-count))
(let ((gp-1 (current-time))) (until (time-elapsed? gp-1 (-> self spawn-period)) (suspend)))
(battlecontroller-spawn-creature-random-spawner))))
(loop
(when (time-elapsed? (-> self state-time) (seconds 0.1))
(set-time! (-> self state-time))
(let ((gp-0 0))
(let ((v1-8 (-> self child))) (while v1-8 (+! gp-0 1) (set! v1-8 (-> v1-8 0 brother)) (nop!) (nop!)))
(if (and (zero? gp-0) (= (-> self spawn-count) (-> self max-spawn-count))) (go-virtual battlecontroller-die))
(when (< gp-0 (-> self target-count))
(let ((gp-1 (current-time))) (until (time-elapsed? gp-1 (-> self spawn-period)) (suspend)))
(battlecontroller-spawn-creature-random-spawner))))
(suspend)))
:post #f)
@@ -25,7 +25,8 @@
:code
(behavior ()
(transform-post)
(loop (logior! (-> self mask) (process-mask sleep))
(loop
(logior! (-> self mask) (process-mask sleep))
(suspend))))
(defbehavior blocking-plane-init-by-other blocking-plane ((arg0 curve-control) (arg1 int))
+15 -13
View File
@@ -46,10 +46,11 @@
(ja :num-func num-func-identity :frame-num 0.0)
(set! (-> self draw force-lod) 1))
(suspend)
(loop (if (and *target*
(= (-> *target* control unknown-surface00 name) 'launch-jump)
(< (-> *target* control trans y) (-> self thresh-y)))
(go launcherdoor-open #f))
(loop
(if (and *target*
(= (-> *target* control unknown-surface00 name) 'launch-jump)
(< (-> *target* control trans y) (-> self thresh-y)))
(go launcherdoor-open #f))
(ja :num! (seek! 0.0 (-> self close-speed)))
(suspend)
(when (ja-done? 0)
@@ -73,15 +74,16 @@
(clear-collide-with-as (-> self root))
(ja-no-eval :num! (seek!))
(if arg0 (ja :num-func num-func-identity :frame-num max))
(loop (when (or (not *target*)
(!= (-> *target* control unknown-surface00 name) 'launch-jump)
(< (+ 4096.0 (-> self root trans y)) (-> *target* control trans y)))
(when (and *target* (< (-> self thresh-y) (-> *target* control trans y)))
(let ((a1-3 (res-lump-struct (-> self entity) 'continue-name structure)))
(when a1-3
(let ((v1-36 (set-continue! *game-info* (the-as basic a1-3)))) (load-commands-set! *level* (-> v1-36 load-commands)))))
(set! (-> self notify-player-passed-thru?) #t))
(go launcherdoor-closed #f))
(loop
(when (or (not *target*)
(!= (-> *target* control unknown-surface00 name) 'launch-jump)
(< (+ 4096.0 (-> self root trans y)) (-> *target* control trans y)))
(when (and *target* (< (-> self thresh-y) (-> *target* control trans y)))
(let ((a1-3 (res-lump-struct (-> self entity) 'continue-name structure)))
(when a1-3
(let ((v1-36 (set-continue! *game-info* (the-as basic a1-3)))) (load-commands-set! *level* (-> v1-36 load-commands)))))
(set! (-> self notify-player-passed-thru?) #t))
(go launcherdoor-closed #f))
(ja :num! (seek! max (-> self open-speed)))
(suspend)))
:post ja-post)
+2 -1
View File
@@ -198,5 +198,6 @@
(lambda ()
(set! (-> *setting-control* default bg-a) 0.0)
(start 'play (get-continue-by-name *game-info* "village1-demo-convo"))))
(loop (suspend)))
(loop
(suspend)))
:post target-no-move-post)
+14 -12
View File
@@ -122,17 +122,18 @@
:code
(behavior ()
(ja-post)
(loop (if (and (and *target* (>= 61440.0 (vector-vector-distance (-> self root trans) (-> *target* control trans))))
(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))
(send-event *target*
'change-mode
'final-door
(search-process-tree *active-pool* (lambda ((arg0 final-door)) (= (-> arg0 type) power-right)))
(search-process-tree *active-pool* (lambda ((arg0 final-door)) (= (-> arg0 type) power-left)))))))
(process-entity-status! self (entity-perm-status complete) #t))
(loop
(if (and (and *target* (>= 61440.0 (vector-vector-distance (-> self root trans) (-> *target* control trans))))
(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))
(send-event *target*
'change-mode
'final-door
(search-process-tree *active-pool* (lambda ((arg0 final-door)) (= (-> arg0 type) power-right)))
(search-process-tree *active-pool* (lambda ((arg0 final-door)) (= (-> arg0 type) power-left)))))))
(process-entity-status! self (entity-perm-status complete) #t))
(suspend))))
(defmethod final-door-method-21 ((this power-left))
@@ -191,7 +192,8 @@
:virtual #t
:code
(behavior ()
(loop (vector<-cspace! (-> self root trans) (-> (the-as process-drawable (-> self parent 0)) node-list data (-> self index)))
(loop
(vector<-cspace! (-> self root trans) (-> (the-as process-drawable (-> self parent 0)) node-list data (-> self index)))
(transform-post)
(suspend))))
@@ -349,7 +349,8 @@
(if (nav-enemy-method-52 self (-> self appear-dest)) (go green-eco-lurker-appear)))
:code
(behavior ()
(loop (logior! (-> self mask) (process-mask sleep-code))
(loop
(logior! (-> self mask) (process-mask sleep-code))
(suspend))))
(defmethod nav-enemy-method-53 ((this green-eco-lurker))
@@ -416,7 +417,8 @@
(until (ja-done? 0)
(suspend)
(ja :num! (seek!)))))
(loop (logior! (-> self mask) (process-mask sleep-code))
(loop
(logior! (-> self mask) (process-mask sleep-code))
(suspend)))
:post transform-post)
@@ -469,7 +471,8 @@
(ja-channel-push! 1 (seconds 0.2))
(ja :group! (-> self draw art-group data (-> self nav-info run-anim)))
(ja :num-func num-func-identity :frame-num 0.0)))
(loop (suspend)
(loop
(suspend)
(ja :num! (loop! f30-0))))))
(defstate nav-enemy-jump-land (green-eco-lurker)
+8 -4
View File
@@ -349,7 +349,8 @@
(common-trans self))
:code
(behavior ()
(loop (suspend)
(loop
(suspend)
(ja :num! (loop!))))
:post transform-post)
@@ -380,7 +381,8 @@
(common-trans self))
:code
(behavior ()
(loop (suspend)
(loop
(suspend)
(ja :num! (loop!))))
:post transform-post)
@@ -395,7 +397,8 @@
(common-trans self))
:code
(behavior ()
(loop (suspend)
(loop
(suspend)
(ja :num! (loop!))))
:post transform-post)
@@ -542,7 +545,8 @@
0)
:code
(behavior ()
(loop (suspend)
(loop
(suspend)
(ja :num! (loop!))))
:post ja-post)
@@ -49,22 +49,23 @@
(cam-slave-go cam-free-floating)))
:code
(behavior ()
(loop (when #t
(let ((a2-0 (new-stack-vector0)))
(vector-! a2-0 (-> *camera* tpos-curr-adj) (-> self pivot-pt))
(vector-! (-> self circular-follow) (-> self circular-follow) (-> self pivot-pt))
(v-slrp3! (-> self circular-follow)
(-> self circular-follow)
a2-0
(-> *camera* local-down)
(* 182.04445 (-> *display* time-adjust-ratio))))
(vector+! (-> self circular-follow) (-> self circular-follow) (-> self pivot-pt))
(let ((gp-0 (new 'stack-no-clear 'vector)))
(vector-! gp-0 (-> self circular-follow) (-> self pivot-pt))
(vector-flatten! gp-0 gp-0 (-> *camera* local-down))
(let ((f0-3 (- (vector-length gp-0) (-> self pivot-rad))))
(if (>= 0.0 f0-3) (vector-reset! gp-0) (vector-normalize! gp-0 f0-3)))
(vector+! (-> self trans) gp-0 (-> self pivot-pt))))
(loop
(when #t
(let ((a2-0 (new-stack-vector0)))
(vector-! a2-0 (-> *camera* tpos-curr-adj) (-> self pivot-pt))
(vector-! (-> self circular-follow) (-> self circular-follow) (-> self pivot-pt))
(v-slrp3! (-> self circular-follow)
(-> self circular-follow)
a2-0
(-> *camera* local-down)
(* 182.04445 (-> *display* time-adjust-ratio))))
(vector+! (-> self circular-follow) (-> self circular-follow) (-> self pivot-pt))
(let ((gp-0 (new 'stack-no-clear 'vector)))
(vector-! gp-0 (-> self circular-follow) (-> self pivot-pt))
(vector-flatten! gp-0 gp-0 (-> *camera* local-down))
(let ((f0-3 (- (vector-length gp-0) (-> self pivot-rad))))
(if (>= 0.0 f0-3) (vector-reset! gp-0) (vector-normalize! gp-0 f0-3)))
(vector+! (-> self trans) gp-0 (-> self pivot-pt))))
(suspend))))
(deftype ecoclaw-part-info (structure)
@@ -173,14 +174,16 @@
(until (ja-done? 0)
(suspend)
(ja :num! (seek!)))
(loop (suspend)))
(loop
(suspend)))
:post ja-post)
(defstate ecoclaw-idle (ecoclaw)
:event ecoclaw-handler
:code
(behavior ()
(loop (if (-> self particles 0 kind) (go ecoclaw-activate))
(loop
(if (-> self particles 0 kind) (go ecoclaw-activate))
(suspend)))
:post ja-post)
@@ -218,12 +221,13 @@
:trans rider-trans
:code
(behavior ()
(loop (when (not (movie?))
(ja :num! (seek! (* (-> self part-opened) (the float (ja-num-frames 0))) 0.01))
(cond
((< 0.01 (fabs (- (* (-> self part-opened) (the float (ja-num-frames 0))) (ja-aframe-num 0))))
(if (nonzero? (-> self sound)) (update! (-> self sound))))
((nonzero? (-> self sound)) (stop! (-> self sound)))))
(loop
(when (not (movie?))
(ja :num! (seek! (* (-> self part-opened) (the float (ja-num-frames 0))) 0.01))
(cond
((< 0.01 (fabs (- (* (-> self part-opened) (the float (ja-num-frames 0))) (ja-aframe-num 0))))
(if (nonzero? (-> self sound)) (update! (-> self sound))))
((nonzero? (-> self sound)) (stop! (-> self sound)))))
(suspend)))
:post
(behavior ()
@@ -150,7 +150,8 @@
(arcing-shot-draw))
:code
(behavior ()
(loop (format *stdcon* "debug trajectory~%")
(loop
(format *stdcon* "debug trajectory~%")
(suspend))))
(deftype darkecobomb (arcing-shot)
@@ -259,7 +260,8 @@
(until (ja-done? 0)
(suspend)
(ja :num! (seek!)))
(loop (ja-no-eval :group! darkecobomb-spin-cycle-ja :num! (seek! max (-> self anim-speed)) :frame-num 0.0)
(loop
(ja-no-eval :group! darkecobomb-spin-cycle-ja :num! (seek! max (-> self anim-speed)) :frame-num 0.0)
(until (ja-done? 0)
(update! (-> self sound))
(suspend)
@@ -282,7 +284,8 @@
(while (not (ja-done? 0))
(suspend)
(ja-eval))
(loop (ja-no-eval :group! darkecobomb-idle-ja :num! (seek!) :frame-num 0.0)
(loop
(ja-no-eval :group! darkecobomb-idle-ja :num! (seek!) :frame-num 0.0)
(until (ja-done? 0)
(suspend)
(ja :num! (seek!)))))
@@ -303,7 +306,8 @@
(until (ja-done? 0)
(suspend)
(ja :num! (seek!)))
(loop (ja-no-eval :group! darkecobomb-idle-ja :num! (seek!) :frame-num 0.0)
(loop
(ja-no-eval :group! darkecobomb-idle-ja :num! (seek!) :frame-num 0.0)
(until (ja-done? 0)
(suspend)
(ja :num! (seek!)))))
@@ -360,7 +364,8 @@
(spawn (-> self part) (-> self root trans)))
:code
(behavior ()
(loop (ja-no-eval :group! (ja-group) :num! (seek!) :frame-num 0.0)
(loop
(ja-no-eval :group! (ja-group) :num! (seek!) :frame-num 0.0)
(until (ja-done? 0)
(suspend)
(ja :num! (seek!)))))
@@ -478,7 +483,8 @@
(deactivate self)))
:code
(behavior ()
(loop (ja :num-func num-func-identity :frame-num (* 0.000016276043 (-> self ring radius-primary)))
(loop
(ja :num-func num-func-identity :frame-num (* 0.000016276043 (-> self ring radius-primary)))
(suspend)))
:post transform-post)
@@ -498,7 +504,8 @@
(spawn (-> self shot-particle) (-> self root trans)))
:code
(behavior ()
(loop (suspend)))
(loop
(suspend)))
:post transform-post)
(defstate redshot-idle (redshot)
@@ -515,7 +522,8 @@
(spawn (-> self shot-particle) (-> self root trans)))
:code
(behavior ()
(loop (suspend)))
(loop
(suspend)))
:post transform-post)
(defbehavior redshot-init-by-other redshot ((arg0 vector) (arg1 vector) (arg2 float) (arg3 time-frame) (arg4 time-frame) (arg5 int))
@@ -576,7 +584,8 @@
(deactivate self)))
:code
(behavior ()
(loop (suspend)))
(loop
(suspend)))
:post transform-post)
(defbehavior yellowshot-init-by-other yellowshot ((arg0 vector) (arg1 vector) (arg2 float) (arg3 time-frame))
+96 -80
View File
@@ -203,7 +203,8 @@
(defbehavior robotboss-anim-blend-loop robotboss ((arg0 art-joint-anim))
(let ((s5-0 (ja-group))) (ja-channel-push! 2 0) (ja :group! arg0 :num! min) (ja :chan 1 :group! s5-0 :num! min))
(loop (ja :num! (loop!))
(loop
(ja :num! (loop!))
(ja :chan 1 :num! (chan 0) :frame-interp (- 1.0 (ease-loc-t self)))
(suspend))
(none))
@@ -389,9 +390,10 @@
(set! (-> self des-cam-entity) "camera-365"))
(suspend)
(ja :num! (seek!)))
(loop (when (not (ja-group? robotboss-idle-hover-no-yellow-ja))
(ja-channel-push! 1 (seconds 0.2))
(ja :group! robotboss-idle-hover-no-yellow-ja))
(loop
(when (not (ja-group? robotboss-idle-hover-no-yellow-ja))
(ja-channel-push! 1 (seconds 0.2))
(ja :group! robotboss-idle-hover-no-yellow-ja))
(ja-no-eval :group! (ja-group) :num! (seek!) :frame-num 0.0)
(until (ja-done? 0)
(suspend)
@@ -550,7 +552,8 @@
(when (not (ja-group? robotboss-idle-hover-no-yellow-ja))
(ja-channel-push! 1 (seconds 0.2))
(ja :group! robotboss-idle-hover-no-yellow-ja))
(loop (ja-no-eval :group! (ja-group) :num! (seek!) :frame-num 0.0)
(loop
(ja-no-eval :group! (ja-group) :num! (seek!) :frame-num 0.0)
(until (ja-done? 0)
(suspend)
(ja :num! (seek!)))))
@@ -674,33 +677,34 @@
(ja-eval))
(robotboss-setup-for-hits 8 (-> self dda yellow-gun-hits))
(if (nonzero? (-> self yellow-gun)) (set-mode! (-> self yellow-gun) (joint-mod-handler-mode look-at)))
(loop (when (not (robotboss-time-to-shoot-yellow))
(when (not (ja-group? robotboss-yellow-idle-ja))
(ja-channel-push! 1 (seconds 0.2))
(ja :group! robotboss-yellow-idle-ja))
(if (>= (- (-> *display* game-frame-counter) (-> self state-time)) (-> self till-next-shot))
(ja :num-func num-func-identity :frame-num 15.0))
(while (not (or (>= (- (-> *display* game-frame-counter) (-> self state-time)) (-> self till-next-shot))
(ja-group? robotboss-yellow-last-hit-ja)))
(when (not (ja-group? robotboss-yellow-idle-ja))
(ja-channel-push! 1 (seconds 0.2))
(ja :group! robotboss-yellow-idle-ja))
(ja-no-eval :group! (ja-group) :num! (seek!) :frame-num 0.0)
(until (ja-done? 0)
(if (robotboss-is-yellow-hit) (goto cfg-36))
(suspend)
(ja :num! (seek!))))
(label cfg-36)
(when (not (robotboss-is-yellow-hit))
(when (not (ja-group? robotboss-yellow-idle-ja))
(ja-channel-push! 1 (seconds 0.2))
(ja :group! robotboss-yellow-idle-ja))
(ja-no-eval :group! (ja-group) :num! (seek!) :frame-num 0.0)
(until (ja-done? 0)
(if (robotboss-is-yellow-hit) (goto cfg-55))
(if (< 15.0 (ja-aframe-num 0)) (set! (-> self keep-charging) #t))
(suspend)
(ja :num! (seek!)))))
(loop
(when (not (robotboss-time-to-shoot-yellow))
(when (not (ja-group? robotboss-yellow-idle-ja))
(ja-channel-push! 1 (seconds 0.2))
(ja :group! robotboss-yellow-idle-ja))
(if (>= (- (-> *display* game-frame-counter) (-> self state-time)) (-> self till-next-shot))
(ja :num-func num-func-identity :frame-num 15.0))
(while (not (or (>= (- (-> *display* game-frame-counter) (-> self state-time)) (-> self till-next-shot))
(ja-group? robotboss-yellow-last-hit-ja)))
(when (not (ja-group? robotboss-yellow-idle-ja))
(ja-channel-push! 1 (seconds 0.2))
(ja :group! robotboss-yellow-idle-ja))
(ja-no-eval :group! (ja-group) :num! (seek!) :frame-num 0.0)
(until (ja-done? 0)
(if (robotboss-is-yellow-hit) (goto cfg-36))
(suspend)
(ja :num! (seek!))))
(label cfg-36)
(when (not (robotboss-is-yellow-hit))
(when (not (ja-group? robotboss-yellow-idle-ja))
(ja-channel-push! 1 (seconds 0.2))
(ja :group! robotboss-yellow-idle-ja))
(ja-no-eval :group! (ja-group) :num! (seek!) :frame-num 0.0)
(until (ja-done? 0)
(if (robotboss-is-yellow-hit) (goto cfg-55))
(if (< 15.0 (ja-aframe-num 0)) (set! (-> self keep-charging) #t))
(suspend)
(ja :num! (seek!)))))
(label cfg-55)
(when (and (not (ja-group? robotboss-yellow-last-hit-ja))
(or (robotboss-time-to-shoot-yellow) (not (ja-group? robotboss-yellow-hit-ja))))
@@ -764,14 +768,15 @@
(until (ja-done? 0)
(suspend)
(ja :num! (seek!)))
(loop (cond
((and *target* (< (+ 81920.0 (-> self entity extra trans y)) (-> (target-pos 0) y)))
(when (not (ja-group? robotboss-idle-hover-lookup-no-red-ja))
(ja-channel-push! 1 (seconds 0.8))
(ja :group! robotboss-idle-hover-lookup-no-red-ja)))
((not (ja-group? robotboss-idle-hover-no-red-ja))
(ja-channel-push! 1 (seconds 0.2))
(ja :group! robotboss-idle-hover-no-red-ja)))
(loop
(cond
((and *target* (< (+ 81920.0 (-> self entity extra trans y)) (-> (target-pos 0) y)))
(when (not (ja-group? robotboss-idle-hover-lookup-no-red-ja))
(ja-channel-push! 1 (seconds 0.8))
(ja :group! robotboss-idle-hover-lookup-no-red-ja)))
((not (ja-group? robotboss-idle-hover-no-red-ja))
(ja-channel-push! 1 (seconds 0.2))
(ja :group! robotboss-idle-hover-no-red-ja)))
(ja-no-eval :group! (ja-group) :num! (seek!) :frame-num 0.0)
(until (ja-done? 0)
(suspend)
@@ -810,9 +815,10 @@
(set! (-> self des-cam-entity) "camera-365"))
(suspend)
(ja :num! (seek!)))
(loop (when (not (ja-group? robotboss-idle-hover-no-red-ja))
(ja-channel-push! 1 (seconds 0.2))
(ja :group! robotboss-idle-hover-no-red-ja))
(loop
(when (not (ja-group? robotboss-idle-hover-no-red-ja))
(ja-channel-push! 1 (seconds 0.2))
(ja :group! robotboss-idle-hover-no-red-ja))
(ja-no-eval :group! (ja-group) :num! (seek!) :frame-num 0.0)
(until (ja-done? 0)
(suspend)
@@ -844,7 +850,8 @@
(when (not (ja-group? robotboss-idle-hover-no-red-ja))
(ja-channel-push! 1 (seconds 0.2))
(ja :group! robotboss-idle-hover-no-red-ja))
(loop (ja-no-eval :group! (ja-group) :num! (seek!) :frame-num 0.0)
(loop
(ja-no-eval :group! (ja-group) :num! (seek!) :frame-num 0.0)
(until (ja-done? 0)
(suspend)
(ja :num! (seek!)))))
@@ -1034,15 +1041,16 @@
(suspend)
(ja-eval))
(robotboss-setup-for-hits 1 5)
(loop (until (or (>= (- (-> *display* game-frame-counter) (-> self state-time)) (-> self till-next-shot))
(ja-group? robotboss-red-last-hit-ja))
(ja-channel-push! 1 (seconds 0.2))
(ja :group! robotboss-red-idle-ja)
(ja-no-eval :group! (ja-group) :num! (seek!) :frame-num 0.0)
(until (ja-done? 0)
(if (ja-group? robotboss-red-last-hit-ja) (goto cfg-24))
(suspend)
(ja :num! (seek!))))
(loop
(until (or (>= (- (-> *display* game-frame-counter) (-> self state-time)) (-> self till-next-shot))
(ja-group? robotboss-red-last-hit-ja))
(ja-channel-push! 1 (seconds 0.2))
(ja :group! robotboss-red-idle-ja)
(ja-no-eval :group! (ja-group) :num! (seek!) :frame-num 0.0)
(until (ja-done? 0)
(if (ja-group? robotboss-red-last-hit-ja) (goto cfg-24))
(suspend)
(ja :num! (seek!))))
(label cfg-24)
(set! (-> self state-time) (-> *display* game-frame-counter))
(let ((f30-0 (-> self dda red-shot-time-min))
@@ -1123,9 +1131,10 @@
(until (ja-done? 0)
(suspend)
(ja :num! (seek!)))
(loop (when (not (ja-group? robotboss-idle-hover-no-blue-ja))
(ja-channel-push! 1 (seconds 0.2))
(ja :group! robotboss-idle-hover-no-blue-ja))
(loop
(when (not (ja-group? robotboss-idle-hover-no-blue-ja))
(ja-channel-push! 1 (seconds 0.2))
(ja :group! robotboss-idle-hover-no-blue-ja))
(ja-no-eval :group! (ja-group) :num! (seek!) :frame-num 0.0)
(until (ja-done? 0)
(suspend)
@@ -1164,9 +1173,10 @@
(play-ambient (-> self ambient) "GOL-AM11" #t (the-as vector #f)))
(suspend)
(ja :num! (seek!)))
(loop (when (not (ja-group? robotboss-idle-hover-no-blue-ja))
(ja-channel-push! 1 (seconds 0.2))
(ja :group! robotboss-idle-hover-no-blue-ja))
(loop
(when (not (ja-group? robotboss-idle-hover-no-blue-ja))
(ja-channel-push! 1 (seconds 0.2))
(ja :group! robotboss-idle-hover-no-blue-ja))
(ja-no-eval :group! (ja-group) :num! (seek!) :frame-num 0.0)
(until (ja-done? 0)
(suspend)
@@ -1199,7 +1209,8 @@
(when (not (ja-group? robotboss-idle-hover-no-blue-ja))
(ja-channel-push! 1 (seconds 0.2))
(ja :group! robotboss-idle-hover-no-blue-ja))
(loop (ja-no-eval :group! (ja-group) :num! (seek!) :frame-num 0.0)
(loop
(ja-no-eval :group! (ja-group) :num! (seek!) :frame-num 0.0)
(until (ja-done? 0)
(suspend)
(ja :num! (seek!)))))
@@ -1332,11 +1343,12 @@
(while (not (ja-done? 0))
(suspend)
(ja-eval))
(loop (cond
((ja-group? robotboss-green-roar-ja) (go robotboss-green-dark-bomb))
((not (ja-group? robotboss-idle-hover-no-blue-ja))
(ja-channel-push! 1 (seconds 0.2))
(ja :group! robotboss-idle-hover-no-blue-ja)))
(loop
(cond
((ja-group? robotboss-green-roar-ja) (go robotboss-green-dark-bomb))
((not (ja-group? robotboss-idle-hover-no-blue-ja))
(ja-channel-push! 1 (seconds 0.2))
(ja :group! robotboss-idle-hover-no-blue-ja)))
(ja-no-eval :group! (ja-group) :num! (seek!) :frame-num 0.0)
(until (ja-done? 0)
(suspend)
@@ -1372,9 +1384,10 @@
(until (ja-done? 0)
(suspend)
(ja :num! (seek!)))
(loop (when (not (ja-group? robotboss-idle-hover-no-blue-ja))
(ja-channel-push! 1 (seconds 0.2))
(ja :group! robotboss-idle-hover-no-blue-ja))
(loop
(when (not (ja-group? robotboss-idle-hover-no-blue-ja))
(ja-channel-push! 1 (seconds 0.2))
(ja :group! robotboss-idle-hover-no-blue-ja))
(ja-no-eval :group! (ja-group) :num! (seek!) :frame-num 0.0)
(until (ja-done? 0)
(suspend)
@@ -1413,14 +1426,15 @@
(play-ambient (-> self ambient) "MAI-AM04" #t (the-as vector #f)))
(suspend)
(ja :num! (seek!)))
(loop (cond
((and *target* (< (+ 81920.0 (-> self entity extra trans y)) (-> (target-pos 0) y)))
(when (not (ja-group? robotboss-idle-hover-lookup-no-blue-ja))
(ja-channel-push! 1 (seconds 0.8))
(ja :group! robotboss-idle-hover-lookup-no-blue-ja)))
((not (ja-group? robotboss-idle-hover-no-blue-ja))
(ja-channel-push! 1 (seconds 0.2))
(ja :group! robotboss-idle-hover-no-blue-ja)))
(loop
(cond
((and *target* (< (+ 81920.0 (-> self entity extra trans y)) (-> (target-pos 0) y)))
(when (not (ja-group? robotboss-idle-hover-lookup-no-blue-ja))
(ja-channel-push! 1 (seconds 0.8))
(ja :group! robotboss-idle-hover-lookup-no-blue-ja)))
((not (ja-group? robotboss-idle-hover-no-blue-ja))
(ja-channel-push! 1 (seconds 0.2))
(ja :group! robotboss-idle-hover-no-blue-ja)))
(ja-no-eval :group! (ja-group) :num! (seek!) :frame-num 0.0)
(until (ja-done? 0)
(suspend)
@@ -1452,7 +1466,8 @@
(when (not (ja-group? robotboss-idle-hover-no-blue-ja))
(ja-channel-push! 1 (seconds 0.2))
(ja :group! robotboss-idle-hover-no-blue-ja))
(loop (ja-no-eval :group! (ja-group) :num! (seek!) :frame-num 0.0)
(loop
(ja-no-eval :group! (ja-group) :num! (seek!) :frame-num 0.0)
(until (ja-done? 0)
(suspend)
(ja :num! (seek!)))))
@@ -1674,9 +1689,10 @@
(until (ja-done? 0)
(suspend)
(ja :num! (seek!)))
(loop (when (not (ja-group? robotboss-idle-blue-ja))
(ja-channel-push! 1 (seconds 0.2))
(ja :group! robotboss-idle-blue-ja))
(loop
(when (not (ja-group? robotboss-idle-blue-ja))
(ja-channel-push! 1 (seconds 0.2))
(ja :group! robotboss-idle-blue-ja))
(ja-no-eval :group! (ja-group) :num! (seek!) :frame-num 0.0)
(until (ja-done? 0)
(suspend)
@@ -87,84 +87,85 @@
:code
(behavior ()
(if (!= (ja-group) (get-art-elem self)) (ja-channel-push! 1 (seconds 0.05)))
(loop (let ((gp-0 #t))
(cond
((= (current-status (-> self tasks)) (task-status invalid))
(when (< (rand-float-gen) 0.5)
(ja :group! assistant-firecanyon-idle-a-ja)
(let* ((f30-0 2.0)
(v1-16 (/ (the-as int (rand-uint31-gen *random-generator*)) 256))
(v1-17 (the-as number (logior #x3f800000 v1-16))))
(countdown (gp-1 (+ (the int (* f30-0 (+ -1.0 (the-as float v1-17)))) 3))
(ja-no-eval :group! (ja-group) :num! (seek!) :frame-num 0.0)
(until (ja-done? 0)
(suspend)
(ja :num! (seek!)))))
(set! gp-0 #f))
(when (or gp-0 (< (rand-float-gen) 0.5))
(ja-no-eval :group! assistant-firecanyon-idle-to-b-ja :num! (seek!) :frame-num 0.0)
(until (ja-done? 0)
(suspend)
(ja :num! (seek!)))
(ja :group! assistant-firecanyon-idle-b-ja)
(let* ((f30-1 2.0)
(v1-83 (/ (the-as int (rand-uint31-gen *random-generator*)) 256))
(v1-84 (the-as number (logior #x3f800000 v1-83))))
(countdown (gp-2 (+ (the int (* f30-1 (+ -1.0 (the-as float v1-84)))) 3))
(ja-no-eval :group! (ja-group) :num! (seek!) :frame-num 0.0)
(until (ja-done? 0)
(suspend)
(ja :num! (seek!)))))
(ja-no-eval :group! assistant-firecanyon-idle-to-a-ja :num! (seek!) :frame-num 0.0)
(until (ja-done? 0)
(suspend)
(ja :num! (seek!))))
(when (< (rand-float-gen) 0.25)
(ja :group! assistant-firecanyon-idle-wipe-brow-ja)
(loop
(let ((gp-0 #t))
(cond
((= (current-status (-> self tasks)) (task-status invalid))
(when (< (rand-float-gen) 0.5)
(ja :group! assistant-firecanyon-idle-a-ja)
(let* ((f30-0 2.0)
(v1-16 (/ (the-as int (rand-uint31-gen *random-generator*)) 256))
(v1-17 (the-as number (logior #x3f800000 v1-16))))
(countdown (gp-1 (+ (the int (* f30-0 (+ -1.0 (the-as float v1-17)))) 3))
(ja-no-eval :group! (ja-group) :num! (seek!) :frame-num 0.0)
(until (ja-done? 0)
(suspend)
(ja :num! (seek!)))))
(else
(when (< (rand-float-gen) 0.8)
(ja :group! assistant-firecanyon-idle-twist-ja)
(let* ((f30-2 4.0)
(v1-184 (/ (the-as int (rand-uint31-gen *random-generator*)) 256))
(v1-185 (the-as number (logior #x3f800000 v1-184))))
(countdown (gp-3 (+ (the int (* f30-2 (+ -1.0 (the-as float v1-185)))) 8))
(ja-no-eval :group! (ja-group) :num! (seek!) :frame-num 0.0)
(until (ja-done? 0)
(suspend)
(ja :num! (seek!)))))
(set! gp-0 #f))
(when (or gp-0 (< (rand-float-gen) 0.5))
(ja-no-eval :group! assistant-firecanyon-idle-down-ja :num! (seek!) :frame-num 0.0)
(set! gp-0 #f))
(when (or gp-0 (< (rand-float-gen) 0.5))
(ja-no-eval :group! assistant-firecanyon-idle-to-b-ja :num! (seek!) :frame-num 0.0)
(until (ja-done? 0)
(suspend)
(ja :num! (seek!)))
(ja :group! assistant-firecanyon-idle-b-ja)
(let* ((f30-1 2.0)
(v1-83 (/ (the-as int (rand-uint31-gen *random-generator*)) 256))
(v1-84 (the-as number (logior #x3f800000 v1-83))))
(countdown (gp-2 (+ (the int (* f30-1 (+ -1.0 (the-as float v1-84)))) 3))
(ja-no-eval :group! (ja-group) :num! (seek!) :frame-num 0.0)
(until (ja-done? 0)
(suspend)
(ja :num! (seek!)))
(ja :group! assistant-firecanyon-idle-examine-ja)
(let* ((f30-3 2.0)
(v1-251 (/ (the-as int (rand-uint31-gen *random-generator*)) 256))
(v1-252 (the-as number (logior #x3f800000 v1-251))))
(countdown (gp-4 (+ (the int (* f30-3 (+ -1.0 (the-as float v1-252)))) 3))
(ja-no-eval :group! (ja-group) :num! (seek!) :frame-num 0.0)
(until (ja-done? 0)
(suspend)
(ja :num! (seek!)))))
(ja-no-eval :group! assistant-firecanyon-idle-up-ja :num! (seek!) :frame-num 0.0)
(ja :num! (seek!)))))
(ja-no-eval :group! assistant-firecanyon-idle-to-a-ja :num! (seek!) :frame-num 0.0)
(until (ja-done? 0)
(suspend)
(ja :num! (seek!))))
(when (< (rand-float-gen) 0.25)
(ja :group! assistant-firecanyon-idle-wipe-brow-ja)
(ja-no-eval :group! (ja-group) :num! (seek!) :frame-num 0.0)
(until (ja-done? 0)
(suspend)
(ja :num! (seek!)))))
(else
(when (< (rand-float-gen) 0.8)
(ja :group! assistant-firecanyon-idle-twist-ja)
(let* ((f30-2 4.0)
(v1-184 (/ (the-as int (rand-uint31-gen *random-generator*)) 256))
(v1-185 (the-as number (logior #x3f800000 v1-184))))
(countdown (gp-3 (+ (the int (* f30-2 (+ -1.0 (the-as float v1-185)))) 8))
(ja-no-eval :group! (ja-group) :num! (seek!) :frame-num 0.0)
(until (ja-done? 0)
(suspend)
(ja :num! (seek!))))
(when (< (rand-float-gen) 0.5)
(ja :group! assistant-firecanyon-idle-fiddle-ja)
(let* ((f30-4 2.0)
(v1-316 (/ (the-as int (rand-uint31-gen *random-generator*)) 256))
(v1-317 (the-as number (logior #x3f800000 v1-316))))
(countdown (gp-5 (+ (the int (* f30-4 (+ -1.0 (the-as float v1-317)))) 3))
(ja-no-eval :group! (ja-group) :num! (seek!) :frame-num 0.0)
(until (ja-done? 0)
(suspend)
(ja :num! (seek!))))))))))))
(ja :num! (seek!)))))
(set! gp-0 #f))
(when (or gp-0 (< (rand-float-gen) 0.5))
(ja-no-eval :group! assistant-firecanyon-idle-down-ja :num! (seek!) :frame-num 0.0)
(until (ja-done? 0)
(suspend)
(ja :num! (seek!)))
(ja :group! assistant-firecanyon-idle-examine-ja)
(let* ((f30-3 2.0)
(v1-251 (/ (the-as int (rand-uint31-gen *random-generator*)) 256))
(v1-252 (the-as number (logior #x3f800000 v1-251))))
(countdown (gp-4 (+ (the int (* f30-3 (+ -1.0 (the-as float v1-252)))) 3))
(ja-no-eval :group! (ja-group) :num! (seek!) :frame-num 0.0)
(until (ja-done? 0)
(suspend)
(ja :num! (seek!)))))
(ja-no-eval :group! assistant-firecanyon-idle-up-ja :num! (seek!) :frame-num 0.0)
(until (ja-done? 0)
(suspend)
(ja :num! (seek!))))
(when (< (rand-float-gen) 0.5)
(ja :group! assistant-firecanyon-idle-fiddle-ja)
(let* ((f30-4 2.0)
(v1-316 (/ (the-as int (rand-uint31-gen *random-generator*)) 256))
(v1-317 (the-as number (logior #x3f800000 v1-316))))
(countdown (gp-5 (+ (the int (* f30-4 (+ -1.0 (the-as float v1-317)))) 3))
(ja-no-eval :group! (ja-group) :num! (seek!) :frame-num 0.0)
(until (ja-done? 0)
(suspend)
(ja :num! (seek!))))))))))))
(defmethod should-display? ((this assistant-firecanyon))
(first-any (-> this tasks) #t)
@@ -108,7 +108,8 @@
:code
(behavior ()
(transform-post)
(loop (ja-no-eval :group! (ja-group) :num! (seek!) :frame-num 0.0)
(loop
(ja-no-eval :group! (ja-group) :num! (seek!) :frame-num 0.0)
(until (ja-done? 0)
(suspend)
(ja :num! (seek!)))))
@@ -171,7 +172,8 @@
(transform-post)
(suspend)
(ja :num! (seek!)))
(loop (suspend))))
(loop
(suspend))))
(defstate spike-down (spike)
:event
@@ -193,7 +195,8 @@
:code
(behavior ()
(transform-post)
(loop (suspend))))
(loop
(suspend))))
(defstate spike-idle (spike)
:trans
@@ -211,7 +214,8 @@
:code
(behavior ()
(transform-post)
(loop (suspend))))
(loop
(suspend))))
(defmethod init-from-entity! ((this spike) (arg0 entity-actor))
(let ((s4-0 (new 'process 'collide-shape this (collide-list-enum hit-by-player))))
+39 -36
View File
@@ -80,38 +80,39 @@
0)
:code
(behavior ()
(loop (let ((v1-0 (-> self condition)))
(cond
((or (zero? v1-0) (= v1-0 1))
(if (or (and (task-complete? *game-info* (game-task beach-flutflut))
(or (and (zero? (-> self condition)) (task-closed? (game-task village2-levitator) (task-status need-hint)))
(and (= (-> self condition) 1) (task-closed? (game-task village3-button) (task-status need-hint)))))
(and *cheat-mode* (cpad-hold? 0 l3))
(and *target* (logtest? (-> *target* control root-prim prim-core action) (collide-action flut))))
(goto cfg-75)))
((= v1-0 4)
(if (and *target* (logtest? (-> *target* control root-prim prim-core action) (collide-action flut))) (goto cfg-75)))
((= v1-0 3)
(cond
((and (task-complete? *game-info* (-> self entity extra perm task)) (not (handle->process (-> self cell))))
(when (and (-> self auto-get-off) (send-event *target* 'end-mode))
(set! (-> self auto-get-off) #f)
(go-virtual pickup (method-of-object self idle)))
(set! (-> self auto-get-off) #f)
(if (= (-> self condition) 3) (goto cfg-75))
(if (and *target*
(logtest? (-> *target* control root-prim prim-core action) (collide-action flut))
(not (time-elapsed? (-> self touch-time) (seconds 0.05))))
(go-virtual pickup (method-of-object self idle))))
((not (handle->process (-> self cell)))
(set! (-> self cell)
(ppointer->handle (birth-pickup-at-point (vector+! (new 'stack-no-clear 'vector) (-> self root trans) (new 'static 'vector :y 8192.0 :w 1.0))
(pickup-type fuel-cell)
(the float (-> self entity extra perm task))
#f
self
(-> self fact)))))))
(else (goto cfg-75))))
(loop
(let ((v1-0 (-> self condition)))
(cond
((or (zero? v1-0) (= v1-0 1))
(if (or (and (task-complete? *game-info* (game-task beach-flutflut))
(or (and (zero? (-> self condition)) (task-closed? (game-task village2-levitator) (task-status need-hint)))
(and (= (-> self condition) 1) (task-closed? (game-task village3-button) (task-status need-hint)))))
(and *cheat-mode* (cpad-hold? 0 l3))
(and *target* (logtest? (-> *target* control root-prim prim-core action) (collide-action flut))))
(goto cfg-75)))
((= v1-0 4)
(if (and *target* (logtest? (-> *target* control root-prim prim-core action) (collide-action flut))) (goto cfg-75)))
((= v1-0 3)
(cond
((and (task-complete? *game-info* (-> self entity extra perm task)) (not (handle->process (-> self cell))))
(when (and (-> self auto-get-off) (send-event *target* 'end-mode))
(set! (-> self auto-get-off) #f)
(go-virtual pickup (method-of-object self idle)))
(set! (-> self auto-get-off) #f)
(if (= (-> self condition) 3) (goto cfg-75))
(if (and *target*
(logtest? (-> *target* control root-prim prim-core action) (collide-action flut))
(not (time-elapsed? (-> self touch-time) (seconds 0.05))))
(go-virtual pickup (method-of-object self idle))))
((not (handle->process (-> self cell)))
(set! (-> self cell)
(ppointer->handle (birth-pickup-at-point (vector+! (new 'stack-no-clear 'vector) (-> self root trans) (new 'static 'vector :y 8192.0 :w 1.0))
(pickup-type fuel-cell)
(the float (-> self entity extra perm task))
#f
self
(-> self fact)))))))
(else (goto cfg-75))))
(flutflut-effect)
(suspend))
(label cfg-75)
@@ -137,8 +138,9 @@
(ja :group! flut-saddle-flut-idle-ja)
(set! (-> self root root-prim prim-core action) (collide-action solid attackable-unused))
(set! (-> self root root-prim prim-core offense) (collide-offense indestructible))
(loop (if (and *target* (logtest? (-> *target* control root-prim prim-core action) (collide-action flut)))
(go-virtual wait-for-return))
(loop
(if (and *target* (logtest? (-> *target* control root-prim prim-core action) (collide-action flut)))
(go-virtual wait-for-return))
(when (logtest? (-> self draw status) (draw-status was-drawn))
(if (and *target* (>= 40960.0 (vector-vector-distance (-> self root trans) (-> *target* control trans))))
(level-hint-spawn (text-id swamp-flutflut-hint) "sksp0160" (the-as entity #f) *entity-pool* (game-task none))))
@@ -207,8 +209,9 @@
(behavior ()
(ja-channel-set! 0)
(ja-post)
(loop (if (not (and *target* (logtest? (-> *target* control root-prim prim-core action) (collide-action flut))))
(go-virtual idle))
(loop
(if (not (and *target* (logtest? (-> *target* control root-prim prim-core action) (collide-action flut))))
(go-virtual idle))
(flutflut-effect)
(suspend))))
@@ -421,7 +421,8 @@
(ja :num! (seek!))))))
(if (not (ja-group? eichar-flut-idle-ja)) (ja-channel-push! 1 (the-as time-frame gp-0))))
(ja :group! eichar-flut-idle-ja)
(loop (suspend)
(loop
(suspend)
(ja :num! (loop!))))
:post target-flut-post)
@@ -491,7 +492,8 @@
(else (ja-channel-push! 2 (the-as time-frame gp-0)) f30-0))))
(ja-no-eval :group! eichar-flut-walk-ja :num! (loop!) :dist 49152.0 :frame-num f28-0)
(ja-no-eval :chan 1 :group! eichar-flut-run-ja :num! (identity (* 0.5 f28-0)) :frame-interp f30-0 :dist 40960.0)
(loop (suspend)
(loop
(suspend)
(let ((f0-13 (lerp-scale (the-as float 0.0)
(the-as float 1.0)
(-> self control unknown-float01)
@@ -601,7 +603,8 @@
(suspend))
(ja-no-eval :group! eichar-flut-jump-loop-ja :num! (loop!) :frame-num 0.0)
(ja :chan 1 :group! eichar-flut-jump-forward-loop-ja :num! (chan 0) :frame-interp (-> self control unknown-float122))
(loop (suspend)
(loop
(suspend)
(ja :group! eichar-flut-jump-loop-ja :num! (loop!))
(ja :chan 1 :group! eichar-flut-jump-forward-loop-ja :num! (chan 0) :frame-interp (-> self control unknown-float122))))
:post target-flut-post)
@@ -672,7 +675,8 @@
(ja-channel-push! 2 (seconds 0.1))
(ja-no-eval :group! eichar-flut-jump-loop-ja :num! (loop!) :frame-num 0.0)
(ja :chan 1 :group! eichar-flut-jump-forward-loop-ja :num! min :frame-interp (-> self control unknown-float122))
(loop (suspend)
(loop
(suspend)
(seek! (-> self control dynam gravity-max)
(-> self control unknown-dynamics00 gravity-max)
(* 163840.0 (seconds-per-frame)))
@@ -748,7 +752,8 @@
(else (ja-channel-push! 2 (seconds 0.5))))
(ja-no-eval :group! eichar-flut-jump-loop-ja :num! (loop!) :frame-num 0.0)
(ja :chan 1 :group! eichar-flut-jump-forward-loop-ja :num! min :frame-interp (-> self control unknown-float122))
(loop (suspend)
(loop
(suspend)
(ja :num! (loop! max))
(ja :chan 1 :num! (chan 0) :frame-interp (-> self control unknown-float122))))
:post target-flut-post)
@@ -994,7 +999,8 @@
(suspend)
(ja :num! (seek!)))
(ja :group! eichar-flut-air-attack-loop-ja :num! min)
(loop (suspend)))
(loop
(suspend)))
:post target-flut-post)
(defstate target-flut-air-attack-hit-ground (target)
+2 -1
View File
@@ -43,7 +43,8 @@
:code
(behavior ()
(if (!= (ja-group) (get-art-elem self)) (ja-channel-push! 1 (seconds 0.05)))
(loop (ja-no-eval :group! evilbro-idle-ja :num! (seek!) :frame-num 0.0)
(loop
(ja-no-eval :group! evilbro-idle-ja :num! (seek!) :frame-num 0.0)
(until (ja-done? 0)
(suspend)
(ja :num! (seek!)))
+12 -10
View File
@@ -47,7 +47,8 @@
(behavior ()
(ja :group! bounceytarp-idle-ja :num! min)
(transform-post)
(loop (logior! (-> self mask) (process-mask sleep))
(loop
(logior! (-> self mask) (process-mask sleep))
(suspend))))
(defstate bouncer-smush (springbox)
@@ -60,15 +61,16 @@
(behavior ()
(set-time! (-> self state-time))
(set! (-> self smush) 0.0)
(loop (if (time-elapsed? (-> self state-time) (seconds 0.2))
(ja :num! (seek! 0.0 0.1))
(ja :num!
(seek! (lerp-scale (ja-aframe 6.0 0)
(ja-aframe 2.0 0)
(vector-vector-xz-distance (target-pos 0) (-> self root trans))
0.0
4096.0)
0.2)))
(loop
(if (time-elapsed? (-> self state-time) (seconds 0.2))
(ja :num! (seek! 0.0 0.1))
(ja :num!
(seek! (lerp-scale (ja-aframe 6.0 0)
(ja-aframe 2.0 0)
(vector-vector-xz-distance (target-pos 0) (-> self root trans))
0.0
4096.0)
0.2)))
(suspend)
(if (ja-min? 0) (go bouncer-wait))))
:post transform-post)
+2 -1
View File
@@ -136,7 +136,8 @@
(set! (-> self dangerous) #t)
(set! (-> self vulnerable) #t)
(let ((f30-0 0.0))
(loop (if (logtest? (get-reminder (get-task-control (game-task jungle-plant)) 0) 1) (go darkvine-die #f))
(loop
(if (logtest? (get-reminder (get-task-control (game-task jungle-plant)) 0) 1) (go darkvine-die #f))
(ja-no-eval :group! darkvine-idle-ja :num! (seek! max (-> self speed)) :frame-num 0.0)
(until (ja-done? 0)
(if (and (>= (ja-aframe-num 0) 120.0) (>= 180.0 (ja-aframe-num 0)))
+8 -4
View File
@@ -806,7 +806,8 @@
(behavior ()
(set-heading-vec! (-> self root)
(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)
(loop
(ja-no-eval :group! (ja-group) :num! (seek!) :frame-num 0.0)
(until (ja-done? 0)
(fisher-fish-move)
(if (< (vector-vector-xz-distance (-> self root trans) (-> (the-as fisher (-> self parent 0)) paddle-pos))
@@ -1216,7 +1217,8 @@
(process-spawn-function process
(lambda :behavior fisher-fish ()
(logclear! (-> self mask) (process-mask pause))
(loop (fisher-draw-display (the-as fisher (ppointer->process (-> self parent))))
(loop
(fisher-draw-display (the-as fisher (ppointer->process (-> self parent))))
(suspend))
(none))
:to
@@ -1269,7 +1271,8 @@
(set! (-> self ambient-steady) 0)
(set! (-> self ambient-sagging) 0)
(set! (-> self ambient-almost) 0)
(loop (hide-hud-quick)
(loop
(hide-hud-quick)
(fisher-game-update)
(if (or (zero? (-> self params timeout))
(>= (-> self missed) (-> *FISHER-bank* max-missed))
@@ -1458,7 +1461,8 @@
:code
(behavior ()
(if (!= (ja-group) (get-art-elem self)) (ja-channel-push! 1 (seconds 0.2)))
(loop (ja :group! (get-art-elem self))
(loop
(ja :group! (get-art-elem self))
(let* ((f30-0 5.0)
(v1-9 (/ (the-as int (rand-uint31-gen *random-generator*)) 256))
(v1-10 (the-as number (logior #x3f800000 v1-9))))
+40 -37
View File
@@ -90,11 +90,12 @@ nav-enemy-default-event-handler
:code
(behavior ()
(ja-channel-push! 1 (seconds 0.075))
(loop (dotimes (gp-0 3)
(ja-no-eval :group! hopper-idle-ja :num! (seek!) :frame-num 0.0)
(until (ja-done? 0)
(suspend)
(ja :num! (seek!))))
(loop
(dotimes (gp-0 3)
(ja-no-eval :group! hopper-idle-ja :num! (seek!) :frame-num 0.0)
(until (ja-done? 0)
(suspend)
(ja :num! (seek!))))
(ja-no-eval :group! hopper-burp-ja :num! (seek!) :frame-num 0.0)
(until (ja-done? 0)
(suspend)
@@ -112,22 +113,23 @@ nav-enemy-default-event-handler
(vector-reset! (-> self collide-info transv))
(set! (-> self jump-length) 16384.0)
(logclear! (-> self nav-enemy-flags) (nav-enemy-flags enable-rotate))
(loop (cond
((ja-group? hopper-jump-long-ja)
(ja-channel-push! 1 (seconds 0.067))
(ja-no-eval :group! hopper-jump-long-land-ja :num! (seek!) :frame-num 0.0)
(until (ja-done? 0)
(suspend)
(ja :num! (seek!)))
(ja-channel-push! 1 (seconds 0.1)))
((ja-group? hopper-jump-short-ja)
(ja-channel-push! 1 (seconds 0.1))
(ja-no-eval :group! hopper-jump-short-land-ja :num! (seek!) :frame-num 0.0)
(until (ja-done? 0)
(suspend)
(ja :num! (seek!)))
(ja-channel-push! 1 (seconds 0.1)))
(else (ja-channel-push! 1 (seconds 0.075))))
(loop
(cond
((ja-group? hopper-jump-long-ja)
(ja-channel-push! 1 (seconds 0.067))
(ja-no-eval :group! hopper-jump-long-land-ja :num! (seek!) :frame-num 0.0)
(until (ja-done? 0)
(suspend)
(ja :num! (seek!)))
(ja-channel-push! 1 (seconds 0.1)))
((ja-group? hopper-jump-short-ja)
(ja-channel-push! 1 (seconds 0.1))
(ja-no-eval :group! hopper-jump-short-land-ja :num! (seek!) :frame-num 0.0)
(until (ja-done? 0)
(suspend)
(ja :num! (seek!)))
(ja-channel-push! 1 (seconds 0.1)))
(else (ja-channel-push! 1 (seconds 0.075))))
(set-time! (-> self state-time))
(ja :group! hopper-idle-ja :num! min)
(until (time-elapsed? (-> self state-time) (seconds 0.5))
@@ -160,22 +162,23 @@ nav-enemy-default-event-handler
(vector-reset! (-> self collide-info transv))
(set! (-> self jump-length) 32768.0)
(logclear! (-> self nav-enemy-flags) (nav-enemy-flags enable-rotate))
(loop (cond
((ja-group? hopper-jump-long-ja)
(ja-channel-push! 1 (seconds 0.067))
(ja-no-eval :group! hopper-jump-long-land-ja :num! (seek!) :frame-num 0.0)
(until (ja-done? 0)
(suspend)
(ja :num! (seek!)))
(ja-channel-push! 1 (seconds 0.1)))
((ja-group? hopper-jump-short-ja)
(ja-channel-push! 1 (seconds 0.1))
(ja-no-eval :group! hopper-jump-short-land-ja :num! (seek!) :frame-num 0.0)
(until (ja-done? 0)
(suspend)
(ja :num! (seek!)))
(ja-channel-push! 1 (seconds 0.1)))
(else (ja-channel-push! 1 (seconds 0.075))))
(loop
(cond
((ja-group? hopper-jump-long-ja)
(ja-channel-push! 1 (seconds 0.067))
(ja-no-eval :group! hopper-jump-long-land-ja :num! (seek!) :frame-num 0.0)
(until (ja-done? 0)
(suspend)
(ja :num! (seek!)))
(ja-channel-push! 1 (seconds 0.1)))
((ja-group? hopper-jump-short-ja)
(ja-channel-push! 1 (seconds 0.1))
(ja-no-eval :group! hopper-jump-short-land-ja :num! (seek!) :frame-num 0.0)
(until (ja-done? 0)
(suspend)
(ja :num! (seek!)))
(ja-channel-push! 1 (seconds 0.1)))
(else (ja-channel-push! 1 (seconds 0.075))))
(set-time! (-> self state-time))
(ja :group! hopper-idle-ja :num! min)
(until (time-elapsed? (-> self state-time) (seconds 0.2))
+97 -85
View File
@@ -583,50 +583,52 @@
(f28-0 (the-as float (-> (the-as periscope (-> gp-0 0)) tilt)))
(f30-0 (the-as float (-> (the-as periscope (-> gp-0 0)) turn)))
(s5-0 (new 'stack-no-clear 'vector)))
(loop (when (not (or (paused?) (-> (the-as periscope (-> self change-event-from 0)) aligned?)))
(vector-reset! s5-0)
(when *camera-read-analog*
;; og:preserve-this Mirror controls changed to respect PC Port settings
(let ((f26-0 (analog-input-horizontal-first (the-as int (+ (-> *cpad-list* cpads 0 rightx) -256 (-> *cpad-list* cpads 0 leftx)))
0.0
48.0
110.0
-1.0))
(f0-0 (analog-input-vertical-first (the-as int (+ (-> *cpad-list* cpads 0 righty) -256 (-> *cpad-list* cpads 0 lefty)))
0.0
48.0
110.0
-1.0)))
(set! (-> s5-0 y) (- (-> s5-0 y) (* 136.53334 (- f26-0))))
(set! (-> s5-0 x) (- (-> s5-0 x) (* 136.53334 (- f0-0))))
(cond
((and (= f26-0 0.0) (= f0-0 0.0)) (sound-stop (-> (the-as periscope (-> gp-0 0)) sound-id)))
(else
(let ((s4-0 sound-play-by-name)
(s3-0 (make-u128 101 (the-as uint #x706f6373656c6574)))
(s2-0 (-> (the-as periscope (-> gp-0 0)) sound-id))
(s1-0 1024)
(s0-0 0))
(set! sv-32 0)
(set! sv-48 1)
(let ((t2-0 (target-pos 0)))
(the-as int (s4-0 (the-as sound-name s3-0) s2-0 s1-0 s0-0 sv-32 (the-as sound-group sv-48) (the-as symbol t2-0)))))))))
(loop
(when (not (or (paused?) (-> (the-as periscope (-> self change-event-from 0)) aligned?)))
(vector-reset! s5-0)
(when *camera-read-analog*
;; og:preserve-this Mirror controls changed to respect PC Port settings
(let ((f26-0 (analog-input-horizontal-first (the-as int (+ (-> *cpad-list* cpads 0 rightx) -256 (-> *cpad-list* cpads 0 leftx)))
0.0
48.0
110.0
-1.0))
(f0-0 (analog-input-vertical-first (the-as int (+ (-> *cpad-list* cpads 0 righty) -256 (-> *cpad-list* cpads 0 lefty)))
0.0
48.0
110.0
-1.0)))
(set! (-> s5-0 y) (- (-> s5-0 y) (* 136.53334 (- f26-0))))
(set! (-> s5-0 x) (- (-> s5-0 x) (* 136.53334 (- f0-0))))
(cond
((< 136.53334 (-> s5-0 x)) (set! (-> s5-0 x) 136.53334))
((< (-> s5-0 x) -136.53334) (set! (-> s5-0 x) -136.53334)))
(cond
((< 136.53334 (-> s5-0 y)) (set! (-> s5-0 y) 136.53334))
((< (-> s5-0 y) -136.53334) (set! (-> s5-0 y) -136.53334)))
(+! f30-0 (* (-> s5-0 y) (-> *display* time-adjust-ratio)))
(set! f28-0 (fmax -12743.111 (fmin 12743.111 (+ f28-0 (* (-> s5-0 x) (-> *display* time-adjust-ratio))))))
(matrix-rotate-yx! (the-as matrix (-> self tracking)) f30-0 f28-0))
((and (= f26-0 0.0) (= f0-0 0.0)) (sound-stop (-> (the-as periscope (-> gp-0 0)) sound-id)))
(else
(let ((s4-0 sound-play-by-name)
(s3-0 (make-u128 101 (the-as uint #x706f6373656c6574)))
(s2-0 (-> (the-as periscope (-> gp-0 0)) sound-id))
(s1-0 1024)
(s0-0 0))
(set! sv-32 0)
(set! sv-48 1)
(let ((t2-0 (target-pos 0)))
(the-as int (s4-0 (the-as sound-name s3-0) s2-0 s1-0 s0-0 sv-32 (the-as sound-group sv-48) (the-as symbol t2-0)))))))))
(cond
((< 136.53334 (-> s5-0 x)) (set! (-> s5-0 x) 136.53334))
((< (-> s5-0 x) -136.53334) (set! (-> s5-0 x) -136.53334)))
(cond
((< 136.53334 (-> s5-0 y)) (set! (-> s5-0 y) 136.53334))
((< (-> s5-0 y) -136.53334) (set! (-> s5-0 y) -136.53334)))
(+! f30-0 (* (-> s5-0 y) (-> *display* time-adjust-ratio)))
(set! f28-0 (fmax -12743.111 (fmin 12743.111 (+ f28-0 (* (-> s5-0 x) (-> *display* time-adjust-ratio))))))
(matrix-rotate-yx! (the-as matrix (-> self tracking)) f30-0 f28-0))
(suspend)))))
(defstate reflector-idle (reflector)
:code
(behavior ()
(let ((gp-0 (new 'stack-no-clear 'vector)))
(loop (set! (-> gp-0 x) (-> self parent-override 0 tilt))
(loop
(set! (-> gp-0 x) (-> self parent-override 0 tilt))
(set! (-> gp-0 y) (-> self parent-override 0 turn))
(set! (-> gp-0 z) 0.0)
(set! (-> gp-0 w) 1.0)
@@ -948,7 +950,8 @@
(suspend)
(update-transforms! (-> self root))
(logior! (-> self draw status) (draw-status hidden))
(loop (suspend))))
(loop
(suspend))))
(defstate periscope-activate (periscope)
:exit
@@ -992,7 +995,8 @@
(suspend)))
(update-transforms! (-> self root))
(set! (-> self y-offset) (-> self height))
(loop (if (periscope-has-power-input?) (go periscope-wait-for-player))
(loop
(if (periscope-has-power-input?) (go periscope-wait-for-player))
(suspend)))
:post ja-post)
@@ -1038,7 +1042,8 @@
(s5-0 (new 'stack-no-clear 'vector))
(s4-0 (new 'stack-no-clear 'vector))
(s3-0 (new 'stack-no-clear 'vector)))
(loop (set! (-> s5-0 quad) (-> self node-list data 4 bone transform vector 3 quad))
(loop
(set! (-> s5-0 quad) (-> self node-list data 4 bone transform vector 3 quad))
(let ((a0-10 s5-0)
(f30-1 81920.0))
(when (and *target* (>= f30-1 (vector-vector-distance a0-10 (-> *target* control trans))))
@@ -1068,7 +1073,8 @@
(print-game-text (lookup-text! *common-text* (text-id press-to-use) #f) s2-2 #f 128 22))
(when (cpad-pressed? 0 circle)
(set! (-> self grips-moving?) #f)
(loop (send-event *target* 'change-mode 'periscope self)
(loop
(send-event *target* 'change-mode 'periscope self)
(hide-hud)
(suspend)
(hide-hud)
@@ -1186,50 +1192,52 @@
(send-event *camera* 'change-state cam-periscope 0)
(logior! (-> self reflector 0 draw status) (draw-status hidden))
(suspend)
(loop (if (not (-> self aligned?)) (set-time! (-> self lock-time)))
(loop
(if (not (-> self aligned?)) (set-time! (-> self lock-time)))
(periscope-crosshair)
(when (or (cpad-pressed? 0 triangle x) (and (-> self aligned?) (time-elapsed? (-> self lock-time) (seconds 3))))
(sound-stop (-> self sound-id))
(if (periscope-test-task-complete?) (close-specific-task! (game-task jungle-lurkerm) (task-status need-reminder)))
(loop (when (send-event *target* 'end-mode)
(cond
((and (-> self entity) (logtest? (-> self entity extra perm status) (entity-perm-status complete)))
(let ((gp-1 (ppointer->handle (peri-beamcam-init-by-other (the-as string (-> self name))))))
(suspend)
(while (and *target* (= (-> *target* next-state name) 'target-periscope))
(periscope-crosshair)
(suspend))
(logclear! (-> self reflector 0 draw status) (draw-status hidden))
(periscope-find-reflection-angles)
(set! (-> self turn) (-> self target-turn))
(set! (-> self tilt) (-> self target-tilt))
(set! *camera-init-mat* (-> self old-camera-matrix))
(send-event *camera* 'change-state *camera-base-mode* 0)
(set! *camera-init-mat* #f)
(while (handle->process (the-as handle gp-1))
(suspend)))
(process-spawn-function process
(lambda ((arg0 string))
(while (or (-> *setting-control* current ambient) (-> *setting-control* current movie) (-> *setting-control* current hint))
(suspend))
(cond
((name= arg0 "periscope-11")
(level-hint-spawn (text-id sidekick-hint-periscope3) "sksp0053" (the-as entity #f) *entity-pool* (game-task none)))
((name= arg0 "periscope-12")
(level-hint-spawn (text-id sidekick-hint-periscope2) "sksp0052" (the-as entity #f) *entity-pool* (game-task none)))
((name= arg0 "periscope-15")
(level-hint-spawn (text-id jungle-lurkerm-resolution) "sksp0018" (the-as entity #f) *entity-pool* (game-task none))))
(none))
(-> self name)
:to
self))
(else
(set! *camera-init-mat* (-> self old-camera-matrix))
(send-event *camera* 'change-state *camera-base-mode* 0)
(set! *camera-init-mat* #f)))
(if (and (-> self entity) (logtest? (-> self entity extra perm status) (entity-perm-status complete)))
(go periscope-power-on)
(go periscope-wait-for-player)))
(loop
(when (send-event *target* 'end-mode)
(cond
((and (-> self entity) (logtest? (-> self entity extra perm status) (entity-perm-status complete)))
(let ((gp-1 (ppointer->handle (peri-beamcam-init-by-other (the-as string (-> self name))))))
(suspend)
(while (and *target* (= (-> *target* next-state name) 'target-periscope))
(periscope-crosshair)
(suspend))
(logclear! (-> self reflector 0 draw status) (draw-status hidden))
(periscope-find-reflection-angles)
(set! (-> self turn) (-> self target-turn))
(set! (-> self tilt) (-> self target-tilt))
(set! *camera-init-mat* (-> self old-camera-matrix))
(send-event *camera* 'change-state *camera-base-mode* 0)
(set! *camera-init-mat* #f)
(while (handle->process (the-as handle gp-1))
(suspend)))
(process-spawn-function process
(lambda ((arg0 string))
(while (or (-> *setting-control* current ambient) (-> *setting-control* current movie) (-> *setting-control* current hint))
(suspend))
(cond
((name= arg0 "periscope-11")
(level-hint-spawn (text-id sidekick-hint-periscope3) "sksp0053" (the-as entity #f) *entity-pool* (game-task none)))
((name= arg0 "periscope-12")
(level-hint-spawn (text-id sidekick-hint-periscope2) "sksp0052" (the-as entity #f) *entity-pool* (game-task none)))
((name= arg0 "periscope-15")
(level-hint-spawn (text-id jungle-lurkerm-resolution) "sksp0018" (the-as entity #f) *entity-pool* (game-task none))))
(none))
(-> self name)
:to
self))
(else
(set! *camera-init-mat* (-> self old-camera-matrix))
(send-event *camera* 'change-state *camera-base-mode* 0)
(set! *camera-init-mat* #f)))
(if (and (-> self entity) (logtest? (-> self entity extra perm status) (entity-perm-status complete)))
(go periscope-power-on)
(go periscope-wait-for-player)))
(suspend)))
(suspend)))
:post
@@ -1256,7 +1264,8 @@
(suspend)))
(sound-stop (-> self grips-sound-id))
(ja-post)
(loop (suspend)))
(loop
(suspend)))
:post periscope-post)
(defmethod init-from-entity! ((this periscope) (arg0 entity-actor))
@@ -1362,7 +1371,8 @@
(suspend)))
(process-entity-status! self (entity-perm-status complete) #t)
(reflector-origin-update (-> self link next))
(loop (suspend)))
(loop
(suspend)))
:post
(behavior ()
(draw-power-beam (-> self reflector-trans) (-> self next-reflector-trans))))
@@ -1390,7 +1400,8 @@
(let ((gp-0 (new-stack-vector0)))
(set! (-> gp-0 quad) (-> self root trans quad))
(+! (-> gp-0 y) 49152.0)
(loop (draw-power-beam gp-0 (-> self beam-end))
(loop
(draw-power-beam gp-0 (-> self beam-end))
(update! (-> self sound))
(when (logtest? (-> self draw status) (draw-status was-drawn))
(launch-particles (-> *part-id-table* 825) (-> self beam-end))
@@ -1431,7 +1442,8 @@
(while (-> self child)
(suspend)))
(logior! (-> self mask) (process-mask actor-pause))
(loop (suspend))))
(loop
(suspend))))
(defmethod init-from-entity! ((this reflector-mirror) (arg0 entity-actor))
(let ((s4-0 (new 'process 'collide-shape this (collide-list-enum hit-by-player))))
+51 -40
View File
@@ -51,7 +51,8 @@
:code
(behavior ()
(transform-post)
(loop (ja-no-eval :group! logtrap-idle-ja :num! (seek!) :frame-num 0.0)
(loop
(ja-no-eval :group! logtrap-idle-ja :num! (seek!) :frame-num 0.0)
(until (ja-done? 0)
(when (logtest? (-> self draw status) (draw-status was-drawn))
(cond
@@ -100,7 +101,8 @@
(defstate towertop-idle (towertop)
:code
(behavior ()
(loop (ja-no-eval :group! towertop-idle-ja :num! (seek! max 0.4) :frame-num 0.0)
(loop
(ja-no-eval :group! towertop-idle-ja :num! (seek! max 0.4) :frame-num 0.0)
(until (ja-done? 0)
(suspend)
(ja :num! (seek! max 0.4)))))
@@ -140,7 +142,8 @@
:trans rider-trans
:code
(behavior ()
(loop (ja-no-eval :group! lurkerm-tall-sail-idle-ja :num! (seek! max (* 0.5 (-> self speed))) :frame-num 0.0)
(loop
(ja-no-eval :group! lurkerm-tall-sail-idle-ja :num! (seek! max (* 0.5 (-> self speed))) :frame-num 0.0)
(until (ja-done? 0)
(quaternion-rotate-local-y! (-> self root quat) (-> self root quat) (* 12743.111 (seconds-per-frame) (-> self speed)))
(suspend)
@@ -205,7 +208,8 @@
:trans rider-trans
:code
(behavior ()
(loop (ja-no-eval :group! (-> self draw art-group data 4) :num! (seek! max (* 0.5 (-> self speed))) :frame-num 0.0)
(loop
(ja-no-eval :group! (-> self draw art-group data 4) :num! (seek! max (* 0.5 (-> self speed))) :frame-num 0.0)
(until (ja-done? 0)
(quaternion-rotate-local-y! (-> self root quat) (-> self root quat) (* -12743.111 (seconds-per-frame) (-> self speed)))
(suspend)
@@ -288,7 +292,8 @@
:trans rider-trans
:code
(behavior ()
(loop (ja-no-eval :group! lurkerm-piston-idle-ja :num! (seek! max (-> self speed)) :frame-num 0.0)
(loop
(ja-no-eval :group! lurkerm-piston-idle-ja :num! (seek! max (-> self speed)) :frame-num 0.0)
(until (ja-done? 0)
(let ((gp-0 (new-stack-vector0)))
(set! (-> gp-0 quad) (-> self base quad))
@@ -366,7 +371,8 @@
(behavior ()
(ja-no-eval :num! (loop!) :frame-num 0.0)
(ja-post)
(loop (suspend)
(loop
(suspend)
(when (logtest? (-> self draw status) (draw-status was-drawn))
(ja :num! (loop! (-> self speed)))
(ja-post)))))
@@ -441,32 +447,33 @@
(behavior ()
(ja :group! precurbridge-idle-ja :num! min)
(transform-post)
(loop (when (and *target*
(< (vector-vector-xz-distance (-> self activation-point) (-> *target* control trans)) 49152.0)
(< (-> self activation-point y) (-> *target* control trans y))
(< (-> *target* control trans y) (+ 20480.0 (-> self activation-point y)))
(not (-> self child)))
(cond
((send-event *target* 'query 'powerup (pickup-type eco-blue))
(logclear! (-> self mask) (process-mask actor-pause))
(logclear! (-> self mask) (process-mask platform))
(let ((gp-1 (entity-by-name "junglecam-1")))
(cond
(gp-1
(process-spawn precurbridgecam
:init
pov-camera-init-by-other
(-> gp-1 extra trans)
*junglecam-sg*
"precurbridgecam"
0
#f
()
:to
self))
(else (format #t "ERROR<GMJ>: position for precursor bridge camera not found~%") (go precurbridge-activate)))))
(else
(level-hint-spawn (text-id sidekick-hint-precurbridge) "sksp0039" (the-as entity #f) *entity-pool* (game-task none)))))
(loop
(when (and *target*
(< (vector-vector-xz-distance (-> self activation-point) (-> *target* control trans)) 49152.0)
(< (-> self activation-point y) (-> *target* control trans y))
(< (-> *target* control trans y) (+ 20480.0 (-> self activation-point y)))
(not (-> self child)))
(cond
((send-event *target* 'query 'powerup (pickup-type eco-blue))
(logclear! (-> self mask) (process-mask actor-pause))
(logclear! (-> self mask) (process-mask platform))
(let ((gp-1 (entity-by-name "junglecam-1")))
(cond
(gp-1
(process-spawn precurbridgecam
:init
pov-camera-init-by-other
(-> gp-1 extra trans)
*junglecam-sg*
"precurbridgecam"
0
#f
()
:to
self))
(else (format #t "ERROR<GMJ>: position for precursor bridge camera not found~%") (go precurbridge-activate)))))
(else
(level-hint-spawn (text-id sidekick-hint-precurbridge) "sksp0039" (the-as entity #f) *entity-pool* (game-task none)))))
(suspend)))
:post ja-post)
@@ -508,7 +515,8 @@
(ja-post)
(update-transforms! (-> self root))
(logior! (-> self mask) (process-mask actor-pause))
(loop (if (not (movie?)) (logior! (-> self mask) (process-mask platform)))
(loop
(if (not (movie?)) (logior! (-> self mask) (process-mask platform)))
(cond
((and *target* (>= 61440.0 (vector-vector-distance (-> self root trans) (-> *target* control trans))))
(when (not (ja-group? precurbridge-static-ja))
@@ -705,11 +713,12 @@
(if arg0 (ja :num-func num-func-identity :frame-num 0.0))
(suspend)
(update-transforms! (-> self root))
(loop (when (or (and (-> self entity) (logtest? (-> self entity extra perm status) (entity-perm-status complete)))
(and (and *target* (>= (-> self thresh w) (vector-vector-distance (-> self root trans) (-> *target* control trans))))
(send-event *target* 'query 'powerup (pickup-type eco-blue))))
(sound-play "blue-eco-on" :position (the-as symbol (-> self root trans)))
(go maindoor-open #f))
(loop
(when (or (and (-> self entity) (logtest? (-> self entity extra perm status) (entity-perm-status complete)))
(and (and *target* (>= (-> self thresh w) (vector-vector-distance (-> self root trans) (-> *target* control trans))))
(send-event *target* 'query 'powerup (pickup-type eco-blue))))
(sound-play "blue-eco-on" :position (the-as symbol (-> self root trans)))
(go maindoor-open #f))
(if (and *target* (>= (-> self thresh w) (vector-vector-distance (-> self root trans) (-> *target* control trans))))
(level-hint-spawn (text-id sidekick-hint-rounddoor) "sksp0038" (the-as entity #f) *entity-pool* (game-task none)))
(when (ja-min? 0)
@@ -733,7 +742,8 @@
(if (and (not arg0) (rand-vu-percent? 0.2)) (spawn-projectile-blue *target*))
(suspend))
(logior! (-> self draw status) (draw-status hidden))
(loop (suspend)))
(loop
(suspend)))
:post ja-post)
(defmethod init-from-entity! ((this maindoor) (arg0 entity-actor))
@@ -816,7 +826,8 @@
:trans rider-trans
:code
(behavior ()
(loop (ja :num-func num-func-identity :frame-num (get-current-value-with-mirror (-> self sync) (the float (ja-num-frames 0))))
(loop
(ja :num-func num-func-identity :frame-num (get-current-value-with-mirror (-> self sync) (the float (ja-num-frames 0))))
(cond
((< (ja-frame-num 0) (the float (/ (ja-num-frames 0) 3)))
(set! (-> self back-prim prim-core collide-as) (collide-kind))
+2 -1
View File
@@ -37,7 +37,8 @@ nav-enemy-default-event-handler
(behavior ()
(ja-channel-push! 1 (seconds 0.2))
(let ((f30-0 (nav-enemy-rnd-float-range 0.9 1.1)))
(loop (ja-no-eval :group! (-> self draw art-group data (-> self nav-info walk-anim)) :num! (seek! max f30-0) :frame-num 0.0)
(loop
(ja-no-eval :group! (-> self draw art-group data (-> self nav-info walk-anim)) :num! (seek! max f30-0) :frame-num 0.0)
(until (ja-done? 0)
(suspend)
(ja :num! (seek! max f30-0)))
+2 -1
View File
@@ -290,7 +290,8 @@ junglesnake-default-event-handler
(cond
((ja-group? junglesnake-idle-ja) (while (not (ja-done? 0)) (suspend) (ja :num! (seek!))))
(else (ja-channel-push! 1 (seconds 0.15))))
(loop (ja-no-eval :group! junglesnake-idle-ja :num! (seek!) :frame-num 0.0)
(loop
(ja-no-eval :group! junglesnake-idle-ja :num! (seek!) :frame-num 0.0)
(until (ja-done? 0)
(suspend)
(ja :num! (seek!)))))
+14 -12
View File
@@ -48,7 +48,8 @@
((>= (-> self try) 10) 300)
((>= (-> self try) 5) 150)
(else 0))))
(loop (ja-channel-push! 1 (seconds 0.05))
(loop
(ja-channel-push! 1 (seconds 0.05))
(sound-play "aphid-spike-out")
(ja-no-eval :group! aphid-lurker-spike-out-ja :num! (seek!) :frame-num 0.0)
(until (ja-done? 0)
@@ -94,17 +95,18 @@
(until (ja-done? 0)
(suspend)
(ja :num! (seek! max f30-0))))
(loop (when (not (nav-enemy-facing-player? 2730.6667))
(logior! (-> self nav-enemy-flags) (nav-enemy-flags enable-travel))
(ja-no-eval :num! (loop!))
(ja-channel-push! 1 (seconds 0.2))
(ja :group! aphid-lurker-walk-ja)
(ja :num-func num-func-identity :frame-num 0.0)
(until (nav-enemy-facing-player? 1820.4445)
(ja-blend-eval)
(suspend)
(ja :num! (loop! 0.75)))
(logclear! (-> self nav-enemy-flags) (nav-enemy-flags enable-travel)))
(loop
(when (not (nav-enemy-facing-player? 2730.6667))
(logior! (-> self nav-enemy-flags) (nav-enemy-flags enable-travel))
(ja-no-eval :num! (loop!))
(ja-channel-push! 1 (seconds 0.2))
(ja :group! aphid-lurker-walk-ja)
(ja :num-func num-func-identity :frame-num 0.0)
(until (nav-enemy-facing-player? 1820.4445)
(ja-blend-eval)
(suspend)
(ja :num! (loop! 0.75)))
(logclear! (-> self nav-enemy-flags) (nav-enemy-flags enable-travel)))
(when (nav-enemy-rnd-percent? 0.3)
(if (not (ja-group? aphid-lurker-win-ja)) (ja-channel-push! 1 (seconds 0.1)))
(ja-no-eval :group! aphid-lurker-win-ja :num! (seek! max f30-0) :frame-num 0.0)
+36 -25
View File
@@ -191,7 +191,8 @@
(ja-channel-set! 2)
(ja :group! plant-boss-arms-idle-ja :num! min)
(ja :chan 1 :group! plant-boss-arms-still-ja :num! min)
(loop (ja :num! (loop!))
(loop
(ja :num! (loop!))
(ja :chan 1 :frame-interp (- 1.0 (-> self parent-override 0 energy)))
(suspend)))
:post ja-post)
@@ -254,7 +255,8 @@
(set! (-> (find-prim-by-id (-> self root) (the-as uint 2)) prim-core action) (collide-action))
0
(update-transforms! (-> self root))
(loop (logior! (-> self mask) (process-mask sleep))
(loop
(logior! (-> self mask) (process-mask sleep))
(suspend)))
:post ja-post)
@@ -267,7 +269,8 @@
((= message 'die) (go plant-boss-back-arms-die (the-as symbol (-> block param 0))))))
:code
(behavior ()
(loop (ja-no-eval :group! plant-boss-back-arms-idle-ja :num! (seek!) :frame-num 0.0)
(loop
(ja-no-eval :group! plant-boss-back-arms-idle-ja :num! (seek!) :frame-num 0.0)
(until (ja-done? 0)
(suspend)
(ja :num! (seek!)))))
@@ -314,7 +317,8 @@
(ja :num! (seek!)))))
(clear-collide-with-as (-> self root))
(ja :group! plant-boss-back-arms-die-ja :num! max)
(loop (suspend)))
(loop
(suspend)))
:post ja-post)
(defstate plant-boss-vine-idle (plant-boss-arm)
@@ -326,7 +330,8 @@
:code
(behavior ()
(let ((f30-0 (rand-vu-float-range (the-as float 0.9) (the-as float 1.1))))
(loop (ja-no-eval :group! plant-boss-vine-idle-ja :num! (seek! max f30-0) :frame-num 0.0)
(loop
(ja-no-eval :group! plant-boss-vine-idle-ja :num! (seek! max f30-0) :frame-num 0.0)
(until (ja-done? 0)
(suspend)
(ja :num! (seek! max f30-0))))))
@@ -377,7 +382,8 @@
:code
(behavior ()
(let ((f30-0 (rand-vu-float-range (the-as float 0.9) (the-as float 1.1))))
(loop (ja-no-eval :group! plant-boss-root-idle-ja :num! (seek! max f30-0) :frame-num 0.0)
(loop
(ja-no-eval :group! plant-boss-root-idle-ja :num! (seek! max f30-0) :frame-num 0.0)
(until (ja-done? 0)
(suspend)
(ja :num! (seek! max f30-0))))))
@@ -501,19 +507,20 @@
(('die) (go plant-boss-leaf-die (the-as basic (-> block param 0))))))
:code
(behavior ((arg0 symbol))
(loop (case (-> self side)
((1)
(dotimes (gp-0 4)
(ja-no-eval :group! plant-boss-leaf-stubby-right-ja :num! (seek!) :frame-num 0.0)
(until (ja-done? 0)
(suspend)
(ja :num! (seek!)))))
(else
(dotimes (gp-1 5)
(ja-no-eval :group! plant-boss-leaf-stubby-left-ja :num! (seek!) :frame-num 0.0)
(until (ja-done? 0)
(suspend)
(ja :num! (seek!))))))))
(loop
(case (-> self side)
((1)
(dotimes (gp-0 4)
(ja-no-eval :group! plant-boss-leaf-stubby-right-ja :num! (seek!) :frame-num 0.0)
(until (ja-done? 0)
(suspend)
(ja :num! (seek!)))))
(else
(dotimes (gp-1 5)
(ja-no-eval :group! plant-boss-leaf-stubby-left-ja :num! (seek!) :frame-num 0.0)
(until (ja-done? 0)
(suspend)
(ja :num! (seek!))))))))
:post ja-post)
(defstate plant-boss-leaf-open (plant-boss-leaf)
@@ -638,7 +645,8 @@
(defstate plant-boss-leaf-die (plant-boss-leaf)
:code
(behavior ((arg0 basic))
(loop (logior! (-> self mask) (process-mask sleep))
(loop
(logior! (-> self mask) (process-mask sleep))
(suspend)))
:post ja-post)
@@ -684,7 +692,8 @@
(set-mode! (-> self body) (joint-mod-handler-mode flex-blend))
(set! (-> self body flex-blend) 0.0)
(ja-channel-set! 1)
(loop (ja-no-eval :group! plant-boss-main-initial-ja :num! (seek!) :frame-num 0.0)
(loop
(ja-no-eval :group! plant-boss-main-initial-ja :num! (seek!) :frame-num 0.0)
(until (ja-done? 0)
(seek! (-> self energy) (the-as float 0.25) (seconds-per-frame))
(if (and (and *target* (>= 245760.0 (vector-vector-distance (-> self root trans) (-> *target* control trans))))
@@ -810,9 +819,10 @@
(ja :num! (seek!))))
((ja-group? plant-boss-main-intro-ja))
(else (ja-channel-push! 1 (seconds 0.25))))
(loop (when (or (and *cheat-mode* (cpad-hold? 1 r3)) (zero? (-> self aphid-count)))
(ja-no-eval :group! plant-boss-main-idle-ja :num! (seek!) :frame-num 0.0)
(go plant-boss-vulnerable))
(loop
(when (or (and *cheat-mode* (cpad-hold? 1 r3)) (zero? (-> self aphid-count)))
(ja-no-eval :group! plant-boss-main-idle-ja :num! (seek!) :frame-num 0.0)
(go plant-boss-vulnerable))
(ja-no-eval :group! plant-boss-main-idle-ja :num! (seek!) :frame-num 0.0)
(until (ja-done? 0)
(suspend)
@@ -1203,7 +1213,8 @@
(transform-post)
(do-push-aways! (-> self root))
(suspend)))
(loop (logior! (-> self mask) (process-mask sleep))
(loop
(logior! (-> self mask) (process-mask sleep))
(suspend))))
(defstate plant-boss-dead-bounce (plant-boss)
+29 -28
View File
@@ -42,34 +42,35 @@
(behavior ()
(local-vars (f30-0 float) (f30-1 float))
(let ((gp-0 #f))
(loop (let ((f0-1 (get-current-value (-> self sync) (-> self total-time))))
(cond
((< f0-1 (-> self before-turn-down-time)) (ja :group! plat-flip-turn-down-ja :num! min) (set! gp-0 #f))
((begin
(set! f30-0 (- f0-1 (-> self before-turn-down-time)))
(< f30-0 (-> self turn-down-time)))
(when (not gp-0)
(set! gp-0 #t)
(sound-play "plat-flip"))
(ja :group!
plat-flip-turn-down-ja
:num!
(identity (/ (* f30-0 (the float (+ (-> (the-as art-joint-anim plat-flip-turn-down-ja) data 0 length) -1)))
(-> self turn-down-time)))))
((begin
(set! f30-1 (- f30-0 (-> self turn-down-time)))
(< f30-1 (-> self before-turn-up-time)))
(set! gp-0 #f)
(ja :group! plat-flip-turn-down-ja :num! max))
(else
(when (not gp-0)
(set! gp-0 #t)
(sound-play "plat-flip"))
(let ((f30-2 (- f30-1 (-> self before-turn-up-time))))
(ja :group!
plat-flip-turn-up-ja
:num!
(identity (/ (* f30-2 (the float (+ (-> (the-as art-joint-anim plat-flip-turn-up-ja) data 0 length) -1))) (-> self turn-up-time))))))))
(loop
(let ((f0-1 (get-current-value (-> self sync) (-> self total-time))))
(cond
((< f0-1 (-> self before-turn-down-time)) (ja :group! plat-flip-turn-down-ja :num! min) (set! gp-0 #f))
((begin
(set! f30-0 (- f0-1 (-> self before-turn-down-time)))
(< f30-0 (-> self turn-down-time)))
(when (not gp-0)
(set! gp-0 #t)
(sound-play "plat-flip"))
(ja :group!
plat-flip-turn-down-ja
:num!
(identity (/ (* f30-0 (the float (+ (-> (the-as art-joint-anim plat-flip-turn-down-ja) data 0 length) -1)))
(-> self turn-down-time)))))
((begin
(set! f30-1 (- f30-0 (-> self turn-down-time)))
(< f30-1 (-> self before-turn-up-time)))
(set! gp-0 #f)
(ja :group! plat-flip-turn-down-ja :num! max))
(else
(when (not gp-0)
(set! gp-0 #t)
(sound-play "plat-flip"))
(let ((f30-2 (- f30-1 (-> self before-turn-up-time))))
(ja :group!
plat-flip-turn-up-ja
:num!
(identity (/ (* f30-2 (the float (+ (-> (the-as art-joint-anim plat-flip-turn-up-ja) data 0 length) -1))) (-> self turn-up-time))))))))
(let ((s5-5 (new 'stack-no-clear 'vector)))
(set! (-> s5-5 quad) (-> self base-pos quad))
(+! (-> s5-5 y) (* 1638.4 (update! (-> self smush))))
@@ -72,9 +72,10 @@
:virtual #t
:code
(behavior ()
(loop (when (!= (ja-group) (get-art-elem self))
(ja-channel-push! 1 (seconds 0.05))
(ja :group! assistant-lavatube-start-idle-ja))
(loop
(when (!= (ja-group) (get-art-elem self))
(ja-channel-push! 1 (seconds 0.05))
(ja :group! assistant-lavatube-start-idle-ja))
(let* ((f30-0 2.0)
(v1-7 (/ (the-as int (rand-uint31-gen *random-generator*)) 256))
(v1-8 (the-as number (logior #x3f800000 v1-7))))
@@ -404,7 +404,8 @@
(behavior ()
(ja :num-func num-func-identity :frame-num max)
(transform-post)
(loop (suspend))))
(loop
(suspend))))
(defstate energydoor-opening (energydoor)
:event energydoor-open-handler
@@ -435,7 +436,8 @@
(behavior ()
(ja :num-func num-func-identity :frame-num 0.0)
(transform-post)
(loop (suspend))))
(loop
(suspend))))
(defstate energydoor-closed-till-near (energydoor)
:event energydoor-closed-handler
@@ -446,7 +448,8 @@
(behavior ()
(ja :num-func num-func-identity :frame-num 0.0)
(transform-post)
(loop (suspend))))
(loop
(suspend))))
(defmethod init-from-entity! ((this energydoor) (arg0 entity-actor))
(with-pp
@@ -502,13 +505,15 @@
:code
(behavior ()
(ja-post)
(loop (suspend))))
(loop
(suspend))))
(defstate energybase-stopping (energybase)
:code
(behavior ()
(let ((f30-0 1.0))
(loop (ja-no-eval :group! (ja-group) :num! (seek! max f30-0) :frame-num 0.0)
(loop
(ja-no-eval :group! (ja-group) :num! (seek! max f30-0) :frame-num 0.0)
(until (ja-done? 0)
(set! f30-0 (- f30-0 (* 0.002 (-> *display* time-adjust-ratio))))
(if (< f30-0 0.0) (go energybase-stopped))
@@ -523,8 +528,9 @@
(('stop) (go energybase-stopping))))
:code
(behavior ()
(loop (if (and *target* (>= 307200.0 (vector-vector-distance (-> self root trans) (-> *target* control trans))))
(level-hint-spawn (text-id lavatube-balls) "sksp0375" (the-as entity #f) *entity-pool* (game-task none)))
(loop
(if (and *target* (>= 307200.0 (vector-vector-distance (-> self root trans) (-> *target* control trans))))
(level-hint-spawn (text-id lavatube-balls) "sksp0375" (the-as entity #f) *entity-pool* (game-task none)))
(ja-no-eval :group! (ja-group) :num! (seek!) :frame-num 0.0)
(until (ja-done? 0)
(suspend)
@@ -627,7 +633,8 @@
(matrix->quaternion (-> self root quat) s5-1))))
:code
(behavior ()
(loop (ja-no-eval :group! (ja-group) :num! (seek!) :frame-num 0.0)
(loop
(ja-no-eval :group! (ja-group) :num! (seek!) :frame-num 0.0)
(until (ja-done? 0)
(suspend)
(ja :num! (seek!)))))
@@ -699,7 +706,8 @@
(energyarm-trans))
:code
(behavior ()
(loop (ja-no-eval :group! (ja-group) :num! (seek!) :frame-num 0.0)
(loop
(ja-no-eval :group! (ja-group) :num! (seek!) :frame-num 0.0)
(until (ja-done? 0)
(suspend)
(ja :num! (seek!)))))
@@ -734,7 +742,8 @@
(energyarm-trans))
:code
(behavior ()
(loop (ja-no-eval :group! (ja-group) :num! (seek!) :frame-num 0.0)
(loop
(ja-no-eval :group! (ja-group) :num! (seek!) :frame-num 0.0)
(until (ja-done? 0)
(suspend)
(ja :num! (seek!)))))
@@ -755,7 +764,8 @@
(energyarm-trans))
:code
(behavior ()
(loop (ja-no-eval :group! (ja-group) :num! (seek!) :frame-num 0.0)
(loop
(ja-no-eval :group! (ja-group) :num! (seek!) :frame-num 0.0)
(until (ja-done? 0)
(suspend)
(ja :num! (seek!)))))
@@ -794,7 +804,8 @@
(let ((gp-0 (-> self skel root-channel 0)))
(set! (-> gp-0 num-func) num-func-identity)
(set! (-> gp-0 frame-num) (* (rand-float-gen) (the float (ja-num-frames 0)))))
(loop (suspend)
(loop
(suspend)
(let* ((f30-1 0.25)
(f28-0 0.25)
(v1-9 (/ (the-as int (rand-uint31-gen *random-generator*)) 256))
@@ -895,7 +906,8 @@
(energyhub-set-lava-height -122880.0))
:code
(behavior ()
(loop (suspend)
(loop
(suspend)
(let* ((f30-0 1.0)
(f28-0 0.25)
(v1-1 (/ (the-as int (rand-uint31-gen *random-generator*)) 256))
@@ -938,7 +950,8 @@
(if (< (-> self rotation-speed value) 0.3) (go energyhub-stopped)))
:code
(behavior ()
(loop (suspend)
(loop
(suspend)
(let* ((f30-0 1.0)
(f28-0 0.25)
(v1-1 (/ (the-as int (rand-uint31-gen *random-generator*)) 256))
@@ -972,7 +985,8 @@
(energyhub-trans))
:code
(behavior ()
(loop (suspend)
(loop
(suspend)
(let* ((f30-0 1.0)
(f28-0 0.25)
(v1-1 (/ (the-as int (rand-uint31-gen *random-generator*)) 256))
@@ -1024,7 +1038,8 @@
(defstate energylava-idle (energylava)
:code
(behavior ()
(loop (ja-no-eval :group! (ja-group) :num! (seek!) :frame-num 0.0)
(loop
(ja-no-eval :group! (ja-group) :num! (seek!) :frame-num 0.0)
(until (ja-done? 0)
(suspend)
(ja :num! (seek!)))))
+20 -10
View File
@@ -27,7 +27,8 @@
(defstate lavabase-idle (lavabase)
:code
(behavior ()
(loop (ja-no-eval :group! (ja-group) :num! (seek!) :frame-num 0.0)
(loop
(ja-no-eval :group! (ja-group) :num! (seek!) :frame-num 0.0)
(until (ja-done? 0)
(suspend)
(ja :num! (seek!)))))
@@ -55,7 +56,8 @@
(defstate lavafall-idle (lavafall)
:code
(behavior ()
(loop (ja-no-eval :group! (ja-group) :num! (seek!) :frame-num 0.0)
(loop
(ja-no-eval :group! (ja-group) :num! (seek!) :frame-num 0.0)
(until (ja-done? 0)
(suspend)
(ja :num! (seek!)))))
@@ -83,7 +85,8 @@
(defstate lavashortcut-idle (lavashortcut)
:code
(behavior ()
(loop (ja-no-eval :group! (ja-group) :num! (seek!) :frame-num 0.0)
(loop
(ja-no-eval :group! (ja-group) :num! (seek!) :frame-num 0.0)
(until (ja-done? 0)
(suspend)
(ja :num! (seek!)))))
@@ -461,7 +464,8 @@
(let ((gp-0 (-> self skel root-channel 0)))
(set! (-> gp-0 num-func) num-func-identity)
(set! (-> gp-0 frame-num) (* (rand-float-gen) (the float (ja-num-frames 0)))))
(loop (ja :num-func num-func-identity :frame-num 0.0)
(loop
(ja :num-func num-func-identity :frame-num 0.0)
(suspend)))
:post pusher-post)
@@ -541,7 +545,8 @@
(if (nonzero? (-> self sound)) (update! (-> self sound))))
:code
(behavior ()
(loop (ja-no-eval :group! (ja-group) :num! (seek!) :frame-num 0.0)
(loop
(ja-no-eval :group! (ja-group) :num! (seek!) :frame-num 0.0)
(until (ja-done? 0)
(suspend)
(ja :num! (seek!))))))
@@ -604,7 +609,8 @@
(defstate lavafallsewera-idle (lavafallsewera)
:code
(behavior ()
(loop (ja-no-eval :group! (ja-group) :num! (seek!) :frame-num 0.0)
(loop
(ja-no-eval :group! (ja-group) :num! (seek!) :frame-num 0.0)
(until (ja-done? 0)
(suspend)
(ja :num! (seek!)))))
@@ -631,7 +637,8 @@
(defstate lavafallsewerb-idle (lavafallsewerb)
:code
(behavior ()
(loop (ja-no-eval :group! (ja-group) :num! (seek!) :frame-num 0.0)
(loop
(ja-no-eval :group! (ja-group) :num! (seek!) :frame-num 0.0)
(until (ja-done? 0)
(suspend)
(ja :num! (seek!)))))
@@ -799,7 +806,8 @@
(('attack 'touch) (send-event proc 'attack (-> block param 0) (static-attack-info ((mode 'deadly)))) (go-virtual die))))
:code
(behavior ()
(loop (ja-no-eval :group! (ja-group) :num! (seek!) :frame-num 0.0)
(loop
(ja-no-eval :group! (ja-group) :num! (seek!) :frame-num 0.0)
(until (ja-done? 0)
(if (nonzero? (-> self sound)) (update! (-> self sound)))
(suspend)
@@ -942,7 +950,8 @@
(eval-path-curve! (-> self path) (-> self root trans) f0-4 'interp))))
:code
(behavior ()
(loop (ja-no-eval :group! (ja-group) :num! (seek!) :frame-num 0.0)
(loop
(ja-no-eval :group! (ja-group) :num! (seek!) :frame-num 0.0)
(until (ja-done? 0)
(suspend)
(ja :num! (seek!)))))
@@ -1021,7 +1030,8 @@
(defstate lavayellowtarp-idle (lavayellowtarp)
:code
(behavior ()
(loop (ja-no-eval :group! (ja-group) :num! (seek!) :frame-num 0.0)
(loop
(ja-no-eval :group! (ja-group) :num! (seek!) :frame-num 0.0)
(until (ja-done? 0)
(suspend)
(ja :num! (seek!)))))
+8 -5
View File
@@ -299,7 +299,8 @@ baby-spider-default-event-handler
:code
(behavior ()
(let ((f30-0 (nav-enemy-rnd-float-range 0.9 1.1)))
(loop (ja-no-eval :group! (-> self draw art-group data (-> self nav-info walk-anim)) :num! (seek! max f30-0) :frame-num 0.0)
(loop
(ja-no-eval :group! (-> self draw art-group data (-> self nav-info walk-anim)) :num! (seek! max f30-0) :frame-num 0.0)
(until (ja-done? 0)
(suspend)
(ja :num! (seek! max f30-0)))))))
@@ -339,9 +340,10 @@ baby-spider-default-event-handler
(set! (-> self chase-rest-time) (rand-vu-int-range (seconds 1) (seconds 4)))
(ja-channel-push! 1 (seconds 0.17))
(ja :group! baby-spider-run-ja :num! min)
(loop (when (time-elapsed? (-> self wiggle-time) (seconds 1))
(set-time! (-> self wiggle-time))
(nav-enemy-method-51 self))
(loop
(when (time-elapsed? (-> self wiggle-time) (seconds 1))
(set-time! (-> self wiggle-time))
(nav-enemy-method-51 self))
(suspend)
(ja :num! (loop!))))
:post
@@ -372,7 +374,8 @@ baby-spider-default-event-handler
(set! (-> self rotate-speed) 1456355.5)
(set! (-> self turn-time) (seconds 0.075))
(let ((f30-0 (rand-vu-float-range 0.8 1.2)))
(loop (logior! (-> self nav-enemy-flags) (nav-enemy-flags enable-travel))
(loop
(logior! (-> self nav-enemy-flags) (nav-enemy-flags enable-travel))
(ja-channel-push! 1 (seconds 0.1))
(ja-no-eval :group! baby-spider-celebrate-ja :num! (seek! max f30-0) :frame-num 0.0)
(until (ja-done? 0)
@@ -409,7 +409,8 @@
(go dark-crystal-activate))))
:code
(behavior ()
(loop (logior! (-> self mask) (process-mask sleep-code))
(loop
(logior! (-> self mask) (process-mask sleep-code))
(suspend))))
(defstate dark-crystal-activate (dark-crystal)
@@ -444,7 +444,8 @@
:code
(behavior ()
(update-trans! (-> self sound2) (-> self root-overeride trans))
(loop (set! (-> self timeout) (rand-vu-int-range 4 8))
(loop
(set! (-> self timeout) (rand-vu-int-range 4 8))
(ja-channel-push! 1 (seconds 0.2))
(dotimes (gp-0 (-> self timeout))
(let ((f30-0 (rand-vu-float-range 1.0 1.8)))
@@ -484,7 +485,8 @@
(ja-channel-push! 2 (seconds 0.2))
(ja :group! driller-lurker-walk-ja :num! min)
(ja :chan 1 :group! driller-lurker-walk-up-ja :num! (chan 0) :frame-interp (-> self up-blend))
(loop (suspend)
(loop
(suspend)
(ja :num! (seek!))
(if (= (ja-group-size) 2) (ja :chan 1 :num! (chan 0) :frame-interp (-> self up-blend)))
(when (ja-done? 0)
@@ -558,7 +560,8 @@
(ja-channel-push! 2 (seconds 0.2))
(ja :group! driller-lurker-run-ja :num! min)
(ja :chan 1 :group! driller-lurker-run-up-ja :num! (chan 0) :frame-interp (-> self up-blend))
(loop (suspend)
(loop
(suspend)
(ja :num! (seek!))
(if (= (ja-group-size) 2) (ja :chan 1 :num! (chan 0) :frame-interp (-> self up-blend)))
(if (ja-done? 0) (ja :num-func num-func-identity :frame-num 0.0))))
@@ -584,7 +587,8 @@
(ja-channel-push! 2 (seconds 0.2))
(ja :group! driller-lurker-attack-ja :num! min)
(ja :chan 1 :group! driller-lurker-attack-up-ja :num! (chan 0) :frame-interp (-> self up-blend))
(loop (suspend)
(loop
(suspend)
(ja :num! (seek!))
(if (= (ja-group-size) 2) (ja :chan 1 :num! (chan 0) :frame-interp (-> self up-blend)))
(if (ja-done? 0) (ja :num-func num-func-identity :frame-num 0.0))))
+24 -22
View File
@@ -623,24 +623,25 @@
(until (ja-done? 0)
(suspend)
(ja :num! (seek!)))
(loop (let ((gp-2 (rand-vu-int-range 1 2))
(s4-0 (rand-vu-int-range 1 2)))
(dotimes (s5-0 gp-2)
(dotimes (s3-0 s4-0)
(set! (-> self anim-speed) (rand-vu-float-range 0.8 1.0))
(ja-channel-push! 1 (seconds 0.075))
(ja-no-eval :group! gnawer-tear-side-to-side-ja :num! (seek! max (-> self anim-speed)) :frame-num 0.0)
(until (ja-done? 0)
(suspend)
(ja :num! (seek! max (-> self anim-speed)))))
(set! s4-0 (rand-vu-int-range 1 2))
(dotimes (s3-1 s4-0)
(set! (-> self anim-speed) (rand-vu-float-range 0.8 1.0))
(ja-channel-push! 1 (seconds 0.075))
(ja-no-eval :group! gnawer-tug-ja :num! (seek! max (-> self anim-speed)) :frame-num 0.0)
(until (ja-done? 0)
(suspend)
(ja :num! (seek! max (-> self anim-speed)))))))
(loop
(let ((gp-2 (rand-vu-int-range 1 2))
(s4-0 (rand-vu-int-range 1 2)))
(dotimes (s5-0 gp-2)
(dotimes (s3-0 s4-0)
(set! (-> self anim-speed) (rand-vu-float-range 0.8 1.0))
(ja-channel-push! 1 (seconds 0.075))
(ja-no-eval :group! gnawer-tear-side-to-side-ja :num! (seek! max (-> self anim-speed)) :frame-num 0.0)
(until (ja-done? 0)
(suspend)
(ja :num! (seek! max (-> self anim-speed)))))
(set! s4-0 (rand-vu-int-range 1 2))
(dotimes (s3-1 s4-0)
(set! (-> self anim-speed) (rand-vu-float-range 0.8 1.0))
(ja-channel-push! 1 (seconds 0.075))
(ja-no-eval :group! gnawer-tug-ja :num! (seek! max (-> self anim-speed)) :frame-num 0.0)
(until (ja-done? 0)
(suspend)
(ja :num! (seek! max (-> self anim-speed)))))))
(ja-channel-push! 1 (seconds 0.075))
(ja-no-eval :group! gnawer-up-to-chew-ja :num! (seek!) :frame-num 0.0)
(until (ja-done? 0)
@@ -743,10 +744,11 @@
(ja-channel-set! 1)
(ja :group! gnawer-run-ja :num! min)
(ja-no-eval :num! (seek!))
(loop (until v1-19
(suspend)
(ja :num! (seek!))
(set! v1-19 (or (ja-done? 0) (-> self show-damage?))))
(loop
(until v1-19
(suspend)
(ja :num! (seek!))
(set! v1-19 (or (ja-done? 0) (-> self show-damage?))))
(when (-> self show-damage?)
(until (not (-> self show-damage?))
(set! (-> self show-damage?) #f)
+16 -9
View File
@@ -105,7 +105,8 @@
(target-attack-up *target* 'attack-or-shove 'deadlyup))))))
:code
(behavior ()
(loop (ja-no-eval :group! cavecrusher-idle-ja :num! (seek!) :frame-num 0.0)
(loop
(ja-no-eval :group! cavecrusher-idle-ja :num! (seek!) :frame-num 0.0)
(until (ja-done? 0)
(update! (-> self sound))
(suspend)
@@ -362,7 +363,8 @@
(clear-collide-with-as (-> self root)))))))
:code
(behavior ()
(loop (logior! (-> self mask) (process-mask sleep-code))
(loop
(logior! (-> self mask) (process-mask sleep-code))
(suspend))))
(defmethod init-from-entity! ((this caveflamepots) (arg0 entity-actor))
@@ -479,7 +481,8 @@
(quaternion-axis-angle! (-> self root quat) 0.0 1.0 0.0 (* -65536.0 f0-0))))
:code
(behavior ()
(loop (logior! (-> self mask) (process-mask sleep-code))
(loop
(logior! (-> self mask) (process-mask sleep-code))
(suspend)))
:post rider-post)
@@ -553,7 +556,8 @@
(quaternion-axis-angle! (-> self root quat) 0.0 1.0 0.0 (* -65536.0 f0-0))))
:code
(behavior ()
(loop (logior! (-> self mask) (process-mask sleep-code))
(loop
(logior! (-> self mask) (process-mask sleep-code))
(suspend)))
:post rider-post)
@@ -665,9 +669,10 @@
(caveelevator-method-20 self))
:code
(behavior ()
(loop (let ((f30-1 (* (get-current-phase (-> self sync)) (the float (ja-num-frames 0)))))
(if (< (-> self prev-frame-num) f30-1) (ja :num! (seek! f30-1 10000.0)) (ja :num-func num-func-identity :frame-num f30-1))
(set! (-> self prev-frame-num) f30-1))
(loop
(let ((f30-1 (* (get-current-phase (-> self sync)) (the float (ja-num-frames 0)))))
(if (< (-> self prev-frame-num) f30-1) (ja :num! (seek! f30-1 10000.0)) (ja :num-func num-func-identity :frame-num f30-1))
(set! (-> self prev-frame-num) f30-1))
(suspend)))
:post
(behavior ()
@@ -692,7 +697,8 @@
(-> (the-as art-joint-anim (+ (* (-> self anim 0) 4) (the-as int (-> self draw art-group)))) master-art-group-name)
:num!
min)
(loop (suspend)))
(loop
(suspend)))
:post
(behavior ()
(rider-post)
@@ -745,7 +751,8 @@
:code
(behavior ()
(ja :group! (-> self draw art-group data (-> self anim 0)) :num! max)
(loop (suspend)))
(loop
(suspend)))
:post
(behavior ()
(rider-post)
@@ -197,7 +197,8 @@
:code
(behavior ()
(ja-channel-push! 1 0)
(loop (ja-no-eval :group! spider-egg-idle-ja :num! (seek! max (-> self anim-speed)) :frame-num 0.0)
(loop
(ja-no-eval :group! spider-egg-idle-ja :num! (seek! max (-> self anim-speed)) :frame-num 0.0)
(until (ja-done? 0)
(suspend)
(ja :num! (seek! max (-> self anim-speed))))))
@@ -238,7 +239,8 @@
(quaternion-slerp! (-> self root quat) gp-0 s5-0 f0-9))
(suspend)
(ja :num! (seek! max 1.3))))
(loop (ja-no-eval :group! spider-egg-idle-ja :num! (seek! max (-> self anim-speed)) :frame-num 0.0)
(loop
(ja-no-eval :group! spider-egg-idle-ja :num! (seek! max (-> self anim-speed)) :frame-num 0.0)
(until (ja-done? 0)
(suspend)
(ja :num! (seek! max (-> self anim-speed))))))
+15 -9
View File
@@ -553,7 +553,8 @@
(if (grab-player? self) (go mother-spider-traveling (the-as uint 1))))
:code
(behavior ()
(loop (logior! (-> self mask) (process-mask sleep-code))
(loop
(logior! (-> self mask) (process-mask sleep-code))
(suspend))))
(defstate mother-spider-traveling (mother-spider)
@@ -610,10 +611,11 @@
(local-vars (v1-12 symbol) (v1-28 symbol))
(ja-channel-push! 1 (seconds 0.1))
(ja :group! mother-spider-lowering-ja :num! min)
(loop (until v1-12
(suspend)
(ja :num! (seek!))
(set! v1-12 (or (ja-done? 0) (-> self hit?))))
(loop
(until v1-12
(suspend)
(ja :num! (seek!))
(set! v1-12 (or (ja-done? 0) (-> self hit?))))
(when (-> self hit?)
(until (not (-> self hit?))
(set! (-> self hit?) #f)
@@ -699,7 +701,8 @@
(cond
((ja-group? mother-spider-idle-ja) (ja-no-eval :num! (seek!)) (while (not (ja-done? 0)) (suspend) (ja-eval)))
(else (ja-channel-push! 1 (seconds 0.25))))
(loop (ja-no-eval :group! mother-spider-idle-ja :num! (seek!) :frame-num 0.0)
(loop
(ja-no-eval :group! mother-spider-idle-ja :num! (seek!) :frame-num 0.0)
(until (ja-done? 0)
(suspend)
(ja :num! (seek!)))))
@@ -725,7 +728,8 @@
(suspend)
(ja :num! (seek!)))
(ja-channel-push! 1 (seconds 0.1))
(loop (ja-no-eval :group! mother-spider-idle-ja :num! (seek!) :frame-num 0.0)
(loop
(ja-no-eval :group! mother-spider-idle-ja :num! (seek!) :frame-num 0.0)
(until (ja-done? 0)
(suspend)
(ja :num! (seek!)))))
@@ -816,7 +820,8 @@
(cond
((ja-group? mother-spider-idle-ja) (ja-no-eval :num! (seek!)) (while (not (ja-done? 0)) (suspend) (ja-eval)))
(else (ja-channel-push! 1 (seconds 0.25))))
(loop (ja-no-eval :group! mother-spider-idle-ja :num! (seek!) :frame-num 0.0)
(loop
(ja-no-eval :group! mother-spider-idle-ja :num! (seek!) :frame-num 0.0)
(until (ja-done? 0)
(suspend)
(ja :num! (seek!)))))
@@ -925,7 +930,8 @@
(suspend)
(ja :num! (seek!)))
(ja-channel-push! 1 (seconds 0.1))
(loop (ja-no-eval :group! mother-spider-idle-ja :num! (seek!) :frame-num 0.0)
(loop
(ja-no-eval :group! mother-spider-idle-ja :num! (seek!) :frame-num 0.0)
(until (ja-done? 0)
(suspend)
(ja :num! (seek!)))))

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