decompiler: call-parent-state-handler and suspend-for macros (#3625)

Also fix `hud-draw-pris2` bucket in Jak 3 to make subtitles work and
foreground HUD envmap.
This commit is contained in:
Hat Kid 2024-09-04 19:35:54 +02:00 committed by GitHub
parent d46e9fb8bb
commit bc66d416b4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
536 changed files with 4365 additions and 9381 deletions

View File

@ -295,7 +295,7 @@ void break_list(Node* node) {
}
} else if (name == "until" || name == "while" || name == "dotimes" || name == "countdown" ||
name == "when" || name == "behavior" || name == "lambda" || name == "defpart" ||
name == "define") {
name == "define" || name == "suspend-for") {
node->top_line_count = 2;
} else if (name == "let" || name == "let*" || name == "rlet" ||
name == "with-dma-buffer-add-bucket") {
@ -341,9 +341,9 @@ void break_list(Node* node) {
void insert_required_breaks(const std::vector<Node*>& bfs_order) {
const std::unordered_set<std::string> always_break = {
"when", "defun-debug", "countdown", "case", "defun", "defmethod", "let",
"until", "while", "if", "dotimes", "cond", "else", "defbehavior",
"with-pp", "rlet", "defstate", "behavior", "defpart", "loop", "let*"};
"when", "defun-debug", "countdown", "case", "defun", "defmethod", "let", "until",
"while", "if", "dotimes", "cond", "else", "defbehavior", "with-pp", "rlet",
"defstate", "behavior", "defpart", "loop", "let*", "suspend-for"};
for (auto node : bfs_order) {
if (!node->break_list && node->kind == Node::Kind::LIST &&
node->child_nodes.at(0).kind == Node::Kind::ATOM) {

View File

@ -211,6 +211,13 @@ Matcher Matcher::while_loop(const Matcher& condition, const Matcher& body) {
return m;
}
Matcher Matcher::until_loop(const Matcher& condition, const Matcher& body) {
Matcher m;
m.m_kind = Kind::UNTIL_LOOP;
m.m_sub_matchers = {condition, body};
return m;
}
Matcher Matcher::any_constant_token(int match_id) {
Matcher m;
m.m_kind = Kind::ANY_CONSTANT_TOKEN;
@ -671,6 +678,22 @@ bool Matcher::do_match(Form* input, MatchResult::Maps* maps_out, const Env* cons
return true;
} break;
case Kind::UNTIL_LOOP: {
auto as_until = dynamic_cast<UntilElement*>(input->try_as_single_active_element());
if (!as_until) {
return false;
}
if (!m_sub_matchers.at(0).do_match(as_until->condition, maps_out, env)) {
return false;
}
if (!m_sub_matchers.at(1).do_match(as_until->body, maps_out, env)) {
return false;
}
return true;
} break;
case Kind::BEGIN: {
if ((int)m_sub_matchers.size() != input->size()) {
return false;

View File

@ -69,6 +69,7 @@ class Matcher {
const Matcher& false_case);
static Matcher if_no_else(const Matcher& condition, const Matcher& true_case);
static Matcher while_loop(const Matcher& condition, const Matcher& body);
static Matcher until_loop(const Matcher& condition, const Matcher& body);
static Matcher any_constant_token(int match_id = -1);
static Matcher constant_token(const std::string& name);
static Matcher or_expression(const std::vector<Matcher>& elts);
@ -100,6 +101,7 @@ class Matcher {
IF_WITH_ELSE,
IF_NO_ELSE,
WHILE_LOOP,
UNTIL_LOOP,
ANY_CONSTANT_TOKEN,
CONSTANT_TOKEN,
SC_OR,

View File

@ -79,12 +79,14 @@ struct LetRewriteStats {
int with_dma_buf_add_bucket = 0;
int dma_buffer_add_gs_set = 0;
int launch_particles = 0;
int call_parent_state_handler = 0;
int suspend_for = 0;
int total() const {
return dotimes + countdown + abs + abs2 + unused + ja + case_no_else + case_with_else +
set_vector + set_vector2 + send_event + font_context_meth + proc_new + attack_info +
vector_dot + rand_float_gen + set_let + with_dma_buf_add_bucket + dma_buffer_add_gs_set +
launch_particles;
launch_particles + call_parent_state_handler + suspend_for;
}
std::string print() const {
@ -111,6 +113,8 @@ struct LetRewriteStats {
out += fmt::format(" with_dma_buf_add_bucket: {}\n", with_dma_buf_add_bucket);
out += fmt::format(" dma_buffer_add_gs_set: {}\n", dma_buffer_add_gs_set);
out += fmt::format(" launch_particles: {}\n", launch_particles);
out += fmt::format(" call_parent_state_handler: {}\n", call_parent_state_handler);
out += fmt::format(" suspend_for: {}\n", suspend_for);
return out;
}
@ -135,6 +139,8 @@ struct LetRewriteStats {
result.set_let = rand_float_gen + other.set_let;
result.with_dma_buf_add_bucket = rand_float_gen + other.with_dma_buf_add_bucket;
result.launch_particles = launch_particles + other.launch_particles;
result.call_parent_state_handler = call_parent_state_handler + other.call_parent_state_handler;
result.suspend_for = suspend_for + other.suspend_for;
return result;
}
@ -158,6 +164,8 @@ struct LetRewriteStats {
set_let += other.set_let;
with_dma_buf_add_bucket += other.with_dma_buf_add_bucket;
launch_particles += other.launch_particles;
call_parent_state_handler += other.call_parent_state_handler;
suspend_for += other.suspend_for;
return *this;
}
};

View File

@ -1673,6 +1673,99 @@ FormElement* rewrite_part_tracker_new(const std::string& type,
->try_as_single_element();
}
FormElement* rewrite_call_parent_state_handler(LetElement* in, const Env& env, FormPool& pool) {
// (let ((t9-3 (-> (find-parent-state) code)))
// (if t9-3
// ((the-as (function none) t9-3))
// )
// )
auto mr =
Matcher::let(false,
{LetEntryMatcher::any(Matcher::deref(Matcher::func("find-parent-state", {}),
false, {DerefTokenMatcher::any_string(1)}),
0)},
{Matcher::if_no_else(Matcher::any(), Matcher::any(2))});
auto let_mr = match(mr, in);
if (!let_mr.matched) {
return nullptr;
}
auto handler = let_mr.maps.strings.at(1);
auto valid_handlers = {"enter", "trans", "code", "post"};
if (std::find(valid_handlers.begin(), valid_handlers.end(), handler) != valid_handlers.end()) {
std::vector<Form*> macro_args;
macro_args.push_back(pool.form<ConstantTokenElement>(handler));
// there are no examples of this being used with args, so that is not handled for now...
// auto func = let_mr.maps.forms.at(2);
return pool
.form<GenericElement>(GenericOperator::make_function(
pool.form<ConstantTokenElement>("call-parent-state-handler")),
macro_args)
->try_as_single_element();
}
return nullptr;
}
FormElement* rewrite_suspend_for(LetElement* in, const Env& env, FormPool& pool) {
// (let ((gp-1 (current-time)))
// (until (time-elapsed? gp-1 (seconds 0.5))
// (suspend)
// )
// )
// ->
// (suspend-for (seconds 0.5))
auto until = dynamic_cast<UntilElement*>(in->body()->at(0));
if (!until) {
return nullptr;
}
auto mr = Matcher::let(
false, {LetEntryMatcher::any(Matcher::func("current-time", {}), 0)},
{Matcher::until_loop(Matcher::func("time-elapsed?", {Matcher::any_reg(1), Matcher::any(2)}),
Matcher::any(3))});
auto let_mr = match(mr, in);
if (!let_mr.matched) {
return nullptr;
}
auto var = let_mr.maps.regs.at(1);
auto time = let_mr.maps.forms.at(2);
auto body = let_mr.maps.forms.at(3);
std::vector<Form*> macro_args;
std::vector<FormElement*> macro_elts;
macro_args.push_back(time);
for (auto& elt : body->elts()) {
auto op = dynamic_cast<AtomicOpElement*>(elt);
auto suspend = op && op->op() && dynamic_cast<SpecialOp*>(op->op()) &&
dynamic_cast<SpecialOp*>(op->op())->kind() == SpecialOp::Kind::SUSPEND;
if (!suspend || elt != body->elts().back()) {
elt->apply_form([&](Form* form) {
for (auto& e : form->elts()) {
auto as_expr = dynamic_cast<SimpleExpressionElement*>(e);
if (as_expr) {
RegAccessSet regs;
as_expr->collect_vars(regs, false);
for (auto reg : regs) {
if (reg.to_string(env, RegisterAccess::Print::AS_VARIABLE) ==
var.value().to_string(env, RegisterAccess::Print::AS_VARIABLE)) {
e = pool.alloc_element<ConstantTokenElement>("time");
}
}
}
}
});
macro_elts.push_back(elt);
}
}
if (!macro_elts.empty()) {
for (auto elt : macro_elts) {
macro_args.push_back(pool.alloc_single_form(nullptr, elt));
}
}
return pool
.form<GenericElement>(
GenericOperator::make_function(pool.form<ConstantTokenElement>("suspend-for")),
macro_args)
->try_as_single_element();
}
FormElement* rewrite_proc_new(LetElement* in, const Env& env, FormPool& pool) {
// this function checks for the process-spawn macros.
// it uses recursive form scanning to wrap the macro inside a potential "shell"
@ -2185,6 +2278,12 @@ FormElement* rewrite_let(LetElement* in, const Env& env, FormPool& pool, LetRewr
return as_set_vector3;
}
auto suspend_for = rewrite_suspend_for(in, env, pool);
if (suspend_for) {
stats.suspend_for++;
return suspend_for;
}
auto as_abs_2 = fix_up_abs_2(in, env, pool);
if (as_abs_2) {
stats.abs2++;
@ -2215,6 +2314,12 @@ FormElement* rewrite_let(LetElement* in, const Env& env, FormPool& pool, LetRewr
return as_attack_info;
}
auto as_call_parent_state = rewrite_call_parent_state_handler(in, env, pool);
if (as_call_parent_state) {
stats.call_parent_state_handler++;
return as_call_parent_state;
}
// nothing matched.
return nullptr;
}

View File

@ -374,8 +374,8 @@ void OpenGLRenderer::init_bucket_renderers_jak3() {
BucketId::HUD_DRAW_HUD_ALPHA, 0x8000);
init_bucket_renderer<TextureUploadHandler>("tex-hud-pris2", BucketCategory::TEX,
BucketId::TEX_HUD_PRIS2, m_texture_animator);
init_bucket_renderer<TextureUploadHandler>("hud-draw-pris2", BucketCategory::TEX,
BucketId::HUD_DRAW_PRIS2, m_texture_animator);
init_bucket_renderer<ProgressRenderer>("hud-draw-pris2", BucketCategory::OTHER,
BucketId::HUD_DRAW_PRIS2, 0x8000);
init_bucket_renderer<ProgressRenderer>("progress", BucketCategory::OTHER, BucketId::BUCKET582,
0x8000);

View File

@ -1544,6 +1544,11 @@ block_11:
block_16:
c->gprs[t0].du64[0] = 0; // or t0, r0, r0
// Unknown instr: ld t0, L217(fp)
// L217:
// .word 0x80808080
// .word 0x0
c->gprs[t0].du32[0] = 0x80808080;
c->gprs[t0].du32[1] = 0x0;
c->dsll(t1, a3, 3); // dsll t1, a3, 3
c->daddu(t1, v1, t1); // daddu t1, v1, t1
c->sw(t0, 124, t1); // sw t0, 124(t1)

View File

@ -61,6 +61,7 @@
(COLLIDE_RADIUS float)
(DARKECO_EXPLODE_RADIUS float)))
(define *CRATE-bank*
(new 'static 'crate-bank :COLLIDE_YOFF 4096.0 :COLLIDE_RADIUS 4915.2 :DARKECO_EXPLODE_RADIUS 16384.0))
@ -87,6 +88,7 @@
(check-dead (_type_) none)
(smush-update! (_type_) none)))
(method-set! crate 12 (method-of-type process run-logic?))
(defbehavior crate-post crate ()
@ -635,7 +637,7 @@
(not arg0)))
(logior! (-> self fact options) (fact-options instant-collect)))
(when (not arg0)
(let ((s5-1 (current-time))) (until (time-elapsed? s5-1 (seconds 0.04)) (suspend)))
(suspend-for (seconds 0.04))
(logior! (-> self draw status) (draw-status hidden))
(case (-> self look)
(('iron) (sound-play "icrate-break"))
@ -702,7 +704,7 @@
(drop-pickup (-> self fact) #t *entity-pool* (the-as fact-info #f) arg1)
(process-entity-status! self (entity-perm-status dead) #t)
(process-entity-status! self (entity-perm-status complete) #t)
(let ((gp-1 (current-time))) (until (time-elapsed? gp-1 (seconds 5)) (suspend)))))
(suspend-for (seconds 5))))
(defstate special-contents-die (crate)
:virtual #t
@ -868,6 +870,7 @@
(deftype barrel (crate) ())
(defmethod params-init ((this barrel) (arg0 entity))
(let ((t9-0 (method-of-type crate params-init))) (t9-0 this arg0))
(set! (-> this look) 'barrel)
@ -875,6 +878,7 @@
(deftype bucket (crate) ())
(defmethod params-init ((this bucket) (arg0 entity))
(let ((t9-0 (method-of-type crate params-init))) (t9-0 this arg0))
(set! (-> this look) 'bucket)
@ -912,6 +916,7 @@
(deftype crate-buzzer (crate) ())
(defmethod art-init ((this crate-buzzer))
(let ((t9-0 (method-of-type crate art-init))) (t9-0 this))
(set! (-> this part) (create-launch-control (-> *part-group-id-table* 74) this))
@ -969,6 +974,7 @@
(deftype pickup-spawner (crate)
((blocker entity-actor)))
(defmethod params-init ((this pickup-spawner) (arg0 entity))
(let ((t9-0 (method-of-type crate params-init))) (t9-0 this arg0))
(set! (-> this look) 'none)

View File

@ -96,7 +96,7 @@
(suspend)
(while (and *target* (= (handle->process (-> *target* control unknown-handle10)) self))
(suspend))
(let ((gp-0 (current-time))) (until (time-elapsed? gp-0 (seconds 0.5)) (suspend)))
(suspend-for (seconds 0.5))
(go swingpole-stance)))
(defmethod init-from-entity! ((this swingpole) (arg0 entity-actor))
@ -127,8 +127,10 @@
(deftype target-start (process-hidden) ())
(deftype camera-start (process-hidden) ())
(defstate manipy-idle (manipy)
:event
(behavior ((proc process) (argc int) (message symbol) (block event-message-block))
@ -365,10 +367,7 @@
(vector+! (-> self root trans) (-> (the-as process-drawable gp-0) root trans) (-> self offset)))))
(let ((gp-1 (-> self root trans))) (if (-> self callback) ((-> self callback) self)) (spawn (-> self part) gp-1))
(suspend))
(let ((gp-2 (current-time)))
(until (time-elapsed? gp-2 (-> self linger-duration))
(if (-> self linger-callback) ((-> self linger-callback) self))
(suspend)))
(suspend-for (-> self linger-duration) (if (-> self linger-callback) ((-> self linger-callback) self)))
(if (-> self linger-callback) ((-> self linger-callback) self))
(part-tracker-notify)
(suspend)
@ -551,11 +550,7 @@
(set! s2-1 (cdr s2-1))
(set! a1-5 (car s2-1)))))))
(('not) (set! gp-0 (not (eval this (the-as pair (car s4-0))))))
(('wait-for 'wait 'suspend)
(let ((s5-1 (command-get-time (car s4-0) 1))
(s4-1 (current-time)))
(until (time-elapsed? s4-1 s5-1)
(suspend))))
(('wait-for 'wait 'suspend) (let ((s5-1 (command-get-time (car s4-0) 1))) (suspend-for s5-1)))
(('message?) (when (= (-> this message) (car s4-0)) (set! gp-0 (-> this message)) (set! (-> this message) #f)))
(('send-event)
(let ((s5-2 (command-get-process (car s4-0) *target*))
@ -688,6 +683,7 @@
(:states
med-res-level-idle))
(defstate med-res-level-idle (med-res-level)
:code
(behavior ()
@ -836,6 +832,7 @@
launcher-deactivated
launcher-idle))
(defpartgroup group-beach-launcher
:id 37
:bounds (static-bspherem 0 3 0 5)

View File

@ -35,11 +35,11 @@
(+! (-> result y) (* 0.5 time time (-> this gravity)))
result)
(defmethod relocate ((this nav-enemy) (arg0 int))
(if (nonzero? (-> this neck)) (set! (-> this neck) (the-as joint-mod (+ (the-as int (-> this neck)) arg0))))
(defmethod relocate ((this nav-enemy) (offset int))
(if (nonzero? (-> this neck)) (set! (-> this neck) (the-as joint-mod (+ (the-as int (-> this neck)) offset))))
(if (nonzero? (-> this rand-gen))
(set! (-> this rand-gen) (the-as random-generator (+ (the-as int (-> this rand-gen)) arg0))))
(call-parent-method this arg0))
(set! (-> this rand-gen) (the-as random-generator (+ (the-as int (-> this rand-gen)) offset))))
(call-parent-method this offset))
(defmethod new-patrol-point! ((this nav-enemy))
(local-vars (v1-11 symbol))
@ -1060,11 +1060,7 @@ nav-enemy-default-event-handler
(ja :num! (loop! f30-0)))
(ja-channel-push! 1 (seconds 0.1))
(nav-enemy-turn-to-face-point (-> self event-param-point) 910.2222)
(let ((gp-0 (nav-enemy-rnd-int-range 0 150))
(s5-0 (current-time)))
(until (time-elapsed? s5-0 gp-0)
(ja :num! (loop! f30-0))
(suspend))))
(let ((gp-0 (nav-enemy-rnd-int-range 0 150))) (suspend-for gp-0 (ja :num! (loop! f30-0)))))
(go-virtual nav-enemy-jump-to-point))
:post nav-enemy-simple-post)

View File

@ -11,21 +11,21 @@
;; DECOMP BEGINS
(defmethod mem-usage ((this drawable-ambient) (arg0 memory-usage-block) (arg1 int))
(set! (-> arg0 length) (max 50 (-> arg0 length)))
(set! (-> arg0 data 49 name) "ambient")
(+! (-> arg0 data 49 count) 1)
(let ((v1-6 (asize-of this))) (+! (-> arg0 data 49 used) v1-6) (+! (-> arg0 data 49 total) (logand -16 (+ v1-6 15))))
(mem-usage (-> this ambient) arg0 (logior arg1 128))
(defmethod mem-usage ((this drawable-ambient) (usage memory-usage-block) (flags int))
(set! (-> usage length) (max 50 (-> usage length)))
(set! (-> usage data 49 name) "ambient")
(+! (-> usage data 49 count) 1)
(let ((v1-6 (asize-of this))) (+! (-> usage data 49 used) v1-6) (+! (-> usage data 49 total) (logand -16 (+ v1-6 15))))
(mem-usage (-> this ambient) usage (logior flags 128))
(the-as drawable-ambient 0))
(defmethod mem-usage ((this drawable-inline-array-ambient) (arg0 memory-usage-block) (arg1 int))
(set! (-> arg0 length) (max 1 (-> arg0 length)))
(set! (-> arg0 data 0 name) (symbol->string 'drawable-group))
(+! (-> arg0 data 0 count) 1)
(let ((v1-7 32)) (+! (-> arg0 data 0 used) v1-7) (+! (-> arg0 data 0 total) (logand -16 (+ v1-7 15))))
(defmethod mem-usage ((this drawable-inline-array-ambient) (usage memory-usage-block) (flags int))
(set! (-> usage length) (max 1 (-> usage length)))
(set! (-> usage data 0 name) (symbol->string 'drawable-group))
(+! (-> usage data 0 count) 1)
(let ((v1-7 32)) (+! (-> usage data 0 used) v1-7) (+! (-> usage data 0 total) (logand -16 (+ v1-7 15))))
(dotimes (s3-0 (-> this length))
(mem-usage (-> this data s3-0) arg0 arg1))
(mem-usage (-> this data s3-0) usage flags))
(the-as drawable-inline-array-ambient 0))
(define *hint-semaphore* (the-as (pointer level-hint) #f))
@ -368,15 +368,13 @@
:code
(behavior ((arg0 string) (arg1 string))
(remove-setting! 'hint)
(let ((s4-0 (current-time)))
(until (time-elapsed? s4-0 (seconds 1))
(when (and *debug-segment* (not (paused?)) (not (str-is-playing?)) (bottom-hud-hidden?))
(let ((s3-0 (new 'stack 'font-context *font-default-matrix* 56 160 0.0 (font-color default) (font-flags shadow kerning))))
(let ((v1-7 s3-0)) (set! (-> v1-7 width) (the float 400)))
(let ((v1-8 s3-0)) (set! (-> v1-8 height) (the float 96)))
(set! (-> s3-0 flags) (font-flags shadow kerning middle))
(let ((s2-0 print-game-text)) (format (clear *temp-string*) "~S~S" arg0 arg1) (s2-0 *temp-string* s3-0 #f 128 22))))
(suspend)))
(suspend-for (seconds 1)
(when (and *debug-segment* (not (paused?)) (not (str-is-playing?)) (bottom-hud-hidden?))
(let ((s3-0 (new 'stack 'font-context *font-default-matrix* 56 160 0.0 (font-color default) (font-flags shadow kerning))))
(let ((v1-7 s3-0)) (set! (-> v1-7 width) (the float 400)))
(let ((v1-8 s3-0)) (set! (-> v1-8 height) (the float 96)))
(set! (-> s3-0 flags) (font-flags shadow kerning middle))
(let ((s2-0 print-game-text)) (format (clear *temp-string*) "~S~S" arg0 arg1) (s2-0 *temp-string* s3-0 #f 128 22)))))
(go level-hint-exit)))
(defstate level-hint-exit (level-hint)

View File

@ -16,24 +16,20 @@
(change-parent self arg0)
(let ((s1-1 (process->handle arg0))
(s2-1 (process->handle arg1)))
(let ((s0-0 (current-time)))
(until (time-elapsed? s0-0 (+ arg3 arg4))
(let ((v1-8 (or (not (handle->process s1-1)) (not (handle->process s2-1))))) (if v1-8 (deactivate self)))
(let* ((f0-1 (fmax 0.0 (fmin 1.0 (/ (- (the float (- (current-time) s0-0)) (the float arg3)) (the float arg4)))))
(a0-18 (process-drawable-pair-random-point! (the-as process-drawable (-> s1-1 process 0))
(the-as process-drawable (-> s2-1 process 0))
(new-stack-vector0)
f0-1)))
(arg2 a0-18))
(suspend)))
(suspend-for (+ arg3 arg4)
(let ((v1-8 (or (not (handle->process s1-1)) (not (handle->process s2-1))))) (if v1-8 (deactivate self)))
(let* ((f0-1 (fmax 0.0 (fmin 1.0 (/ (- (the float (- (current-time) time)) (the float arg3)) (the float arg4)))))
(a0-18 (process-drawable-pair-random-point! (the-as process-drawable (-> s1-1 process 0))
(the-as process-drawable (-> s2-1 process 0))
(new-stack-vector0)
f0-1)))
(arg2 a0-18)))
(cond
((zero? arg5) (loop (suspend)))
(else
(let ((s4-1 (current-time)))
(until (time-elapsed? s4-1 arg5)
(let ((a0-21 (process-drawable-random-point! (the-as process-drawable (-> s2-1 process 0)) (new-stack-vector0))))
(arg2 a0-21))
(suspend))))))
(suspend-for arg5
(let ((a0-21 (process-drawable-random-point! (the-as process-drawable (-> s2-1 process 0)) (new-stack-vector0))))
(arg2 a0-21))))))
(none))
(defpart 255

View File

@ -180,7 +180,7 @@
(suspend)
(suspend)
(send-event (if gp-0 (-> gp-0 extra process)) 'play-anim)))
(let ((gp-1 (current-time))) (until (time-elapsed? gp-1 (seconds 2)) (suspend)))
(suspend-for (seconds 2))
(until (not v1-10)
(suspend)
(set! v1-10 (and *target* (logtest? (-> *target* state-flags) (state-flags grabbed)))))
@ -271,7 +271,7 @@
(s3-7 (if v1-235 (-> v1-235 extra process)) s4-13))))
(set-continue! *game-info* "lavatube-end")))
(go target-warp-in s5-6 (-> arg0 trans))))
(else (let ((s5-7 (current-time))) (until (time-elapsed? s5-7 (seconds 0.05)) (suspend)))))
(else (suspend-for (seconds 0.05))))
(set-continue! *game-info* arg0)
(when *auto-continue*
(let ((s5-8 (next-level (-> arg0 level))))
@ -712,7 +712,7 @@
(-> self attack-info attacker)
(ja-channel-set! 0)
(ja-post)
(let ((gp-1 (current-time))) (until (time-elapsed? gp-1 (seconds 1)) (suspend))))
(suspend-for (seconds 1)))
(('drown 'drown-death)
(sound-play "death-drown")
(logclear! (-> self water flags) (water-flags wt04))
@ -772,7 +772,7 @@
(set! (-> self post-hook) target-no-ja-move-post)
(ja-channel-set! 0)
(ja-post)
(let ((gp-9 (current-time))) (until (time-elapsed? gp-9 (seconds 2)) (suspend))))
(suspend-for (seconds 2)))
(('endlessfall)
(sound-play "death-fall")
(camera-change-to (the-as string cam-endlessfall) 30 #f)
@ -809,10 +809,7 @@
(target-falling-anim (seconds 0.1) (seconds 0.33))
(ja-channel-push! 1 (seconds 0.3))
(ja-no-eval :group! eichar-launch-jump-loop-ja :num! (loop! 0.5) :frame-num 0.0)
(let ((gp-12 (current-time)))
(until (time-elapsed? gp-12 (seconds 0.8))
(ja :group! eichar-launch-jump-loop-ja :num! (loop! 0.5))
(suspend)))
(suspend-for (seconds 0.8) (ja :group! eichar-launch-jump-loop-ja :num! (loop! 0.5)))
(camera-change-to (the-as string 'base) 0 #f))
(('target-hit-ground-hard)
(set! (-> self control unknown-surface00) *neutral-mods*)

View File

@ -28,11 +28,7 @@
(send-event *camera* 'joystick 0.0 0.0)
(suspend)
(ja :num! (seek!)))
(let ((gp-0 (current-time)))
(until (time-elapsed? gp-0 (seconds 0.3))
(suspend)
(ja :num! (seek! (ja-aframe (the-as float 19.0) 0) 0.05))
(suspend)))
(suspend-for (seconds 0.3) (suspend) (ja :num! (seek! (ja-aframe (the-as float 19.0) 0) 0.05)))
(ja-channel-push! 1 (seconds 0.3))
(ja-no-eval :group! eichar-painful-land-ja :num! (seek!) :frame-num (ja-aframe (the-as float 40.0) 0))
(until (ja-done? 0)
@ -166,11 +162,11 @@
(go hud-waiting)
(none))
(defmethod relocate ((this first-person-hud) (arg0 int))
(defmethod relocate ((this first-person-hud) (offset int))
(dotimes (v1-0 (-> this nb-of-particles))
(when (-> this particles v1-0 part)
(if (nonzero? (-> this particles v1-0 part)) (&+! (-> this particles v1-0 part) arg0))))
(the-as first-person-hud ((method-of-type process relocate) this arg0)))
(if (nonzero? (-> this particles v1-0 part)) (&+! (-> this particles v1-0 part) offset))))
(the-as first-person-hud ((method-of-type process relocate) this offset)))
(defmethod spawn-particles! ((this first-person-hud))
(dotimes (s5-0 (-> this nb-of-particles))
@ -1007,7 +1003,7 @@
:to
self)
(set-time! (-> self control unknown-dword82))
(let ((gp-4 (current-time))) (until (time-elapsed? gp-4 (seconds 0.1)) (suspend)))
(suspend-for (seconds 0.1))
(ja-no-eval :group! eichar-yellow-jumping-blast-ja :num! (seek!) :frame-num (ja-frame-num 0))
(until (ja-done? 0)
(suspend)
@ -1676,7 +1672,7 @@
143360.0
:to
self))
;; PAL patch (sound plays elsewhere)
;; og:preserve-this PAL patch (sound plays elsewhere)
;(sound-play "launch-fire")
(go target-high-jump arg0 arg0 'launch))
:post target-no-stick-post)

View File

@ -209,6 +209,10 @@ It type checks the arguments for the entry function.
,*defstate-current-state-name*
(find-parent-method ,*defstate-current-type* (method-id-of-type ,*defstate-current-type* ,*defstate-current-state-name*))))
(defmacro call-parent-state-handler (handler &key (type (function none)) &rest args)
"Call the parent handler for this state."
`(let ((handler (-> (find-parent-state) ,handler))) (if handler ((the ,type handler) ,@args))))
(defmacro behavior (bindings &rest body)
"Define an anonymous behavior for a process state. This may only be used inside a defstate!"
(let ((behavior-type (first *defstate-type-stack*)))
@ -428,3 +432,6 @@ It type checks the arguments for the entry function.
(defmacro time-passed? (time)
"has it been 'time' since set-state-time?"
`(>= (time-passed) ,time))
(defmacro suspend-for (time &rest body)
`(let ((time (current-time))) (until (time-elapsed? time ,time) ,@body (suspend))))

View File

@ -21,6 +21,7 @@
(:states
windmill-one-idle))
(defskelgroup *windmill-one-sg*
windmill-one
windmill-one-lod0-jg
@ -167,6 +168,7 @@
grottopole-moving-down
grottopole-moving-up))
(defskelgroup *grottopole-sg*
grottopole
grottopole-lod0-jg
@ -319,6 +321,7 @@
(:states (ecoventrock-break symbol)
ecoventrock-idle))
(defskelgroup *ecoventrock-sg*
ecoventrock
ecoventrock-lod0-jg
@ -525,7 +528,7 @@
(set! sv-128 (the-as symbol #f))
(apply-all (-> self link) actor-link-subtask-complete-hook (& sv-128))
(when sv-128
(let ((s5-2 (current-time))) (until (time-elapsed? s5-2 (seconds 0.5)) (suspend)))
(suspend-for (seconds 0.5))
(let ((gp-1 (cond
(arg0 (the-as int #f))
(else
@ -570,6 +573,7 @@
flying-rock-idle
flying-rock-rolling))
(defskelgroup *kickrock-sg*
kickrock
kickrock-lod0-jg
@ -675,6 +679,7 @@
(:states
bladeassm-idle))
(defskelgroup *bladeassm-sg*
bladeassm
bladeassm-lod0-jg
@ -739,6 +744,7 @@
flutflutegg-physics
flutflutegg-physics-fall))
(defskelgroup *flutflutegg-sg*
flutflutegg
flutflutegg-lod0-jg
@ -753,9 +759,9 @@
((flutflut-lod0-mg (meters 999999)))
:bounds (static-spherem 0 0 0 8))
(defmethod relocate ((this flutflutegg) (arg0 int))
(if (nonzero? (-> this wobbler)) (&+! (-> this wobbler) arg0))
(call-parent-method this arg0))
(defmethod relocate ((this flutflutegg) (offset int))
(if (nonzero? (-> this wobbler)) (&+! (-> this wobbler) offset))
(call-parent-method this offset))
;; WARN: Function (method 20 flutflutegg) has a return type of none, but the expression builder found a return statement.
(defmethod flutflutegg-method-20 ((this flutflutegg) (arg0 float) (arg1 float) (arg2 float))
@ -875,7 +881,7 @@
(suspend))
(camera-change-to "camera-135" 0 #f)
(camera-look-at (the-as pair (ppointer->process (-> self parent))) (the-as uint 9))
(let ((gp-0 (current-time))) (until (time-elapsed? gp-0 (seconds 4)) (suspend)))
(suspend-for (seconds 4))
(while (not (process-release? (handle->process (-> self grab-target))))
(suspend))
(camera-look-at (the-as pair *target*) (the-as uint 0))
@ -994,6 +1000,7 @@
harvester-idle
(harvester-inflate symbol)))
(defskelgroup *harvester-sg*
harvester
harvester-lod0-jg
@ -1094,6 +1101,7 @@
(deftype beachcam (process-hidden) ())
(defun beachcam-spawn ()
(with-pp
(let ((gp-0 (entity-actor-lookup (-> pp entity) 'alt-actor 0)))

View File

@ -56,6 +56,7 @@
(:states
lurkercrab-pushed))
(defskelgroup *lurkercrab-sg*
lurkercrab
lurkercrab-lod0-jg
@ -146,13 +147,13 @@ nav-enemy-default-event-handler
(ja-channel-push! 1 (seconds 0.075))
(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)))
(suspend-for (seconds 3))
(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)
(suspend)
(ja :num! (seek! (ja-aframe 19.0 0))))
(ja :num-func num-func-identity :frame-num (ja-aframe 19.0 0))
(let ((gp-5 (current-time))) (until (time-elapsed? gp-5 (seconds 1)) (suspend)))
(suspend-for (seconds 1))
(ja-no-eval :group! lurkercrab-idle-ja :num! (seek! (ja-aframe 1.0 0)) :frame-num (ja-aframe 19.0 0))
(until (ja-done? 0)
(suspend)
@ -199,7 +200,7 @@ nav-enemy-default-event-handler
(nav-enemy-rnd-int-range 2 6)
(until (not (nav-enemy-rnd-go-idle? 0.2))
(ja :group! lurkercrab-idle-ja :num! (identity (ja-aframe 1.0 0)))
(let ((gp-2 (current-time))) (until (time-elapsed? gp-2 (seconds 2)) (suspend))))
(suspend-for (seconds 2)))
(logior! (-> self nav-enemy-flags) (nav-enemy-flags enable-rotate))
(ja-no-eval :group! lurkercrab-idle-to-walk-ja :num! (seek!) :frame-num 0.0)
(until (ja-done? 0)
@ -326,8 +327,8 @@ nav-enemy-default-event-handler
(until (ja-done? 0)
(suspend)
(ja :num! (seek! (ja-aframe 18.0 0) 0.75)))
(let ((gp-2 (current-time))) (until (time-elapsed? gp-2 (seconds 0.25)) (suspend)))
(let ((gp-3 (current-time))) (until (time-elapsed? gp-3 (seconds 0.1)) (suspend)))
(suspend-for (seconds 0.25))
(suspend-for (seconds 0.1))
(go-virtual nav-enemy-chase))
:post
(behavior ()

View File

@ -7,6 +7,7 @@
(deftype lurkerpuppy (nav-enemy) ())
(defskelgroup *lurkerpuppy-sg*
lurkerpuppy
lurkerpuppy-lod0-jg
@ -77,12 +78,7 @@ nav-enemy-default-event-handler
(ja-channel-push! 1 (seconds 0.1))
(ja :group! lurkerpuppy-idle-ja)
(ja :num-func num-func-identity :frame-num 0.0)
(let ((gp-2 (rand-vu-int-range 750 900))
(s5-0 (current-time)))
(until (time-elapsed? s5-0 gp-2)
(ja :num! (loop!))
(ja-blend-eval)
(suspend)))))))
(let ((gp-2 (rand-vu-int-range 750 900))) (suspend-for gp-2 (ja :num! (loop!)) (ja-blend-eval)))))))
(defstate nav-enemy-give-up (lurkerpuppy)
:virtual #t

View File

@ -20,6 +20,7 @@
(setup-new-process! (_type_) none)
(idle () _type_ :state)))
(defskelgroup *citb-arm-a-sg*
citb-arm
citb-arm-a-lod0-jg
@ -121,6 +122,7 @@
(deftype citb-arm (citb-arm-section)
((root collide-shape-moving :override)))
(defstate idle (citb-arm)
:virtual #t
:trans rider-trans
@ -161,6 +163,7 @@
(deftype citb-arm-shoulder (citb-arm-section) ())
(defmethod setup-new-process! ((this citb-arm-shoulder))
(call-parent-method this)
(set! (-> this draw origin-joint-index) (the-as uint 4))
@ -171,16 +174,22 @@
(deftype citb-arm-a (citb-arm) ())
(deftype citb-arm-b (citb-arm) ())
(deftype citb-arm-c (citb-arm) ())
(deftype citb-arm-d (citb-arm) ())
(deftype citb-arm-shoulder-a (citb-arm-shoulder) ())
(deftype citb-arm-shoulder-b (citb-arm-shoulder) ())
(defmethod setup-new-process! ((this citb-arm-a))
(initialize-skeleton this *citb-arm-a-sg* '())
(call-parent-method this)
@ -263,6 +272,7 @@
(:states
citb-disc-idle))
(defstate citb-disc-idle (citb-disc)
:event
(behavior ((proc process) (argc int) (message symbol) (block event-message-block))
@ -323,12 +333,16 @@
(deftype citb-disc-a (citb-disc) ())
(deftype citb-disc-b (citb-disc) ())
(deftype citb-disc-c (citb-disc) ())
(deftype citb-disc-d (citb-disc) ())
(defmethod citb-disc-method-21 ((this citb-disc-a))
(initialize-skeleton this *citb-disc-a-sg* '())
0
@ -351,6 +365,7 @@
(deftype citb-iris-door (eco-door) ())
(defskelgroup *citb-iris-door-sg*
citb-iris-door
citb-iris-door-lod0-jg
@ -393,6 +408,7 @@
(deftype citb-button (basebutton) ())
(defmethod basebutton-method-27 ((this citb-button))
(let ((s5-0 (new 'process 'collide-shape-moving this (collide-list-enum hit-by-player))))
(set! (-> s5-0 dynam) (copy *standard-dynamics* 'process))
@ -433,6 +449,7 @@
(deftype citb-launcher (plat)
((launcher (pointer launcher))))
(defstate plat-path-active (citb-launcher)
:virtual #t
:post
@ -538,6 +555,7 @@
citb-robotboss-die
citb-robotboss-idle))
(defstate citb-robotboss-idle (citb-robotboss)
:event
(behavior ((proc process) (argc int) (message symbol) (block event-message-block))
@ -650,9 +668,10 @@
citb-coil-broken
citb-coil-idle))
(defmethod relocate ((this citb-coil) (arg0 int))
(if (nonzero? (-> this part-off)) (&+! (-> this part-off) arg0))
(the-as citb-coil ((method-of-type process-drawable relocate) this arg0)))
(defmethod relocate ((this citb-coil) (offset int))
(if (nonzero? (-> this part-off)) (&+! (-> this part-off) offset))
(the-as citb-coil ((method-of-type process-drawable relocate) this offset)))
(defmethod deactivate ((this citb-coil))
(if (nonzero? (-> this part-off)) (kill-and-free-particles (-> this part-off)))
@ -724,6 +743,7 @@
citb-hose-idle
citb-hose-spawn))
(defbehavior citb-hose-event-handler citb-hose ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
(case arg2
(('spawn) (go citb-hose-spawn))
@ -776,6 +796,7 @@
(deftype citb-chains (process-hidden) ())
(defskelgroup *citb-generator-sg*
citb-generator
citb-generator-lod0-jg
@ -808,10 +829,11 @@
citb-generator-broken
citb-generator-idle))
(defmethod relocate ((this citb-generator) (arg0 int))
(if (nonzero? (-> this part-broken)) (&+! (-> this part-broken) arg0))
(if (nonzero? (-> this part-mushroom)) (&+! (-> this part-mushroom) arg0))
(the-as citb-generator ((method-of-type process-drawable relocate) this arg0)))
(defmethod relocate ((this citb-generator) (offset int))
(if (nonzero? (-> this part-broken)) (&+! (-> this part-broken) offset))
(if (nonzero? (-> this part-mushroom)) (&+! (-> this part-mushroom) offset))
(the-as citb-generator ((method-of-type process-drawable relocate) this offset)))
(defmethod deactivate ((this citb-generator))
(if (nonzero? (-> this part-broken)) (kill-and-free-particles (-> this part-broken)))
@ -998,6 +1020,7 @@
citadelcam-idle
citadelcam-stair-plats))
(defstate citadelcam-idle (citadelcam)
:event
(behavior ((proc process) (argc int) (message symbol) (block event-message-block))
@ -1044,6 +1067,7 @@
(deftype citb-battlecontroller (battlecontroller) ())
(defstate battlecontroller-play-intro-camera (citb-battlecontroller)
:virtual #t
:code
@ -1070,7 +1094,7 @@
:code
(behavior ()
(process-entity-status! self (entity-perm-status complete) #t)
(let ((t9-2 (-> (find-parent-state) code))) (if t9-2 ((the-as (function none :behavior battlecontroller) t9-2))))))
(call-parent-state-handler code)))
(defmethod battlecontroller-method-27 ((this citb-battlecontroller))
(call-parent-method this)

View File

@ -59,6 +59,7 @@
(drop-plat-rise draw-control)
drop-plat-spawn))
(defstate drop-plat-idle (drop-plat)
:event
(behavior ((proc process) (argc int) (message symbol) (block event-message-block))
@ -231,6 +232,7 @@
(deftype handle-inline-array (inline-array-class)
((data handle :dynamic)))
(set! (-> handle-inline-array heap-base) (the-as uint 8))
(deftype citb-drop-plat (process-drawable)
@ -251,9 +253,10 @@
citb-drop-plat-active
citb-drop-plat-idle))
(defmethod relocate ((this citb-drop-plat) (arg0 int))
(if (nonzero? (-> this child-array)) (&+! (-> this child-array) arg0))
(the-as citb-drop-plat ((method-of-type process-drawable relocate) this arg0)))
(defmethod relocate ((this citb-drop-plat) (offset int))
(if (nonzero? (-> this child-array)) (&+! (-> this child-array) offset))
(the-as citb-drop-plat ((method-of-type process-drawable relocate) this offset)))
(defbehavior citb-drop-plat-spawn-children citb-drop-plat ()
(local-vars (s0-0 int) (sv-48 process) (sv-64 int))
@ -286,7 +289,7 @@
(t0-0 (-> self duration)))
((the-as (function process function vector int int int none) t9-7) a0-8 a1-5 a2-4 sv-64 (the-as int t0-0) s0-0))
(-> sv-48 ppointer)))))))
(let ((s2-1 (current-time))) (until (time-elapsed? s2-1 (seconds 0.12)) (suspend)))
(suspend-for (seconds 0.12))
(+! s5-0 s4-0))))
(set-time! (-> self drop-time))
0

View File

@ -13,6 +13,7 @@
(state int8)
(enabled symbol)))
(deftype battlecontroller-creature-type (structure)
((type2 type)
(percent float)
@ -22,6 +23,7 @@
(pickup-count int8))
:allow-misaligned)
(deftype battlecontroller (process-drawable)
((final-pickup-spawn-point vector :inline)
(activate-distance float)
@ -54,6 +56,7 @@
(battlecontroller-method-27 (_type_) none)
(cleanup-if-finished! (_type_) none)))
(defbehavior battlecontroller-spawners-full? battlecontroller ()
(dotimes (v1-0 (-> self spawner-count))
(if (= (-> self spawner-array v1-0 creature) #f) (return #f)))
@ -301,7 +304,7 @@ battlecontroller-default-event-handler
(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)))
(suspend-for (-> self spawn-period))
(battlecontroller-spawn-creature-random-spawner))))
(suspend)))
:post #f)
@ -373,11 +376,11 @@ battlecontroller-default-event-handler
(process-entity-status! self (entity-perm-status dead) #t))
:post #f)
(defmethod relocate ((this battlecontroller) (arg0 int))
(defmethod relocate ((this battlecontroller) (offset int))
(dotimes (v1-0 (-> this spawner-count))
(let ((a0-3 (-> this spawner-array v1-0))) (if (nonzero? (-> a0-3 path)) (&+! (-> a0-3 path) arg0))))
(if (nonzero? (-> this path-spawn)) (&+! (-> this path-spawn) arg0))
(call-parent-method this arg0))
(let ((a0-3 (-> this spawner-array v1-0))) (if (nonzero? (-> a0-3 path)) (&+! (-> a0-3 path) offset))))
(if (nonzero? (-> this path-spawn)) (&+! (-> this path-spawn) offset))
(call-parent-method this offset))
(defmethod deactivate ((this battlecontroller))
(with-pp

View File

@ -11,6 +11,7 @@
(deftype fin-door (process-hidden) ())
(deftype final-door (process-drawable) ()
(:state-methods
idle)
@ -18,6 +19,7 @@
(final-door-method-21 (_type_) none)
(open (symbol) _type_ :state)))
(defskelgroup *power-left-sg*
power-left
power-left-lod0-jg
@ -110,8 +112,10 @@
(deftype power-left (final-door) ())
(deftype power-right (final-door) ())
(defstate idle (power-left)
:virtual #t
:code
@ -151,6 +155,7 @@
(jump () _type_ :state)
(idle () _type_ :state)))
(defstate jump (powercellalt)
:virtual #t
:code
@ -263,7 +268,7 @@
(t9-16 (the-as powercellalt sv-144) s1-0 'powercellalt (the-as pointer #x70004000)))
(run-now-in-process sv-144 powercellalt-init-by-other s4-3 s3-1 sv-160 s0-0)
(-> sv-144 ppointer))))
(let ((s1-1 (current-time))) (until (time-elapsed? s1-1 (seconds 0.1)) (suspend)))
(suspend-for (seconds 0.1))
(when (handle->process arg1)
(let ((s1-2 (handle->process arg1))
(s0-1 (+ s2-0 4)))
@ -274,8 +279,8 @@
(t9-20 (the-as powercellalt sv-176) s1-2 'powercellalt (the-as pointer #x70004000)))
(run-now-in-process sv-176 powercellalt-init-by-other s4-3 s3-1 sv-192 s0-1)
(-> sv-176 ppointer))))
(let ((s1-3 (current-time))) (until (time-elapsed? s1-3 (seconds 0.1)) (suspend)))))
(let ((gp-1 (current-time))) (until (time-elapsed? gp-1 (seconds 2)) (suspend)))
(suspend-for (seconds 0.1))))
(suspend-for (seconds 2))
(let ((v0-22 (entity-by-name "sage-finalboss-1"))
(a1-26 (new 'stack-no-clear 'event-message-block)))
(set! (-> a1-26 from) self)

View File

@ -47,6 +47,7 @@
(speed float)
(touch-time time-frame)))
(defmethod get-unlit-skel ((this plat-eco-finalboss))
*plat-eco-finalboss-unlit-sg*)
@ -114,6 +115,7 @@
(active symbol))
:allow-misaligned)
(deftype sage-finalboss (process-taskable)
((redsage handle)
(bluesage handle)
@ -135,11 +137,12 @@
(:states
sage-finalboss-credits))
(defmethod relocate ((this sage-finalboss) (arg0 int))
(defmethod relocate ((this sage-finalboss) (offset int))
(dotimes (v1-0 9)
(if (nonzero? (-> this particle v1-0 part)) (&+! (-> this particle v1-0 part) arg0)))
(if (nonzero? (-> this particle-whiteout)) (&+! (-> this particle-whiteout) arg0))
(the-as sage-finalboss ((method-of-type process-taskable relocate) this arg0)))
(if (nonzero? (-> this particle v1-0 part)) (&+! (-> this particle v1-0 part) offset)))
(if (nonzero? (-> this particle-whiteout)) (&+! (-> this particle-whiteout) offset))
(the-as sage-finalboss ((method-of-type process-taskable relocate) this offset)))
(defmethod deactivate ((this sage-finalboss))
(dotimes (s5-0 9)
@ -619,7 +622,7 @@
(remove-setting! 'music)
(apply-settings *setting-control*)
(set-blackout-frames (seconds 0.05))
(let ((gp-1 (current-time))) (until (time-elapsed? gp-1 (seconds 0.05)) (suspend)))
(suspend-for (seconds 0.05))
(go-virtual hidden)))
(defmethod should-display? ((this sage-finalboss))

View File

@ -27,10 +27,11 @@
(pickup (state flutflut))
wait-for-return))
(defmethod relocate ((this flutflut) (arg0 int))
(defmethod relocate ((this flutflut) (offset int))
(countdown (v1-0 2)
(if (-> this path-data v1-0) (&+! (-> this path-data v1-0) arg0)))
(the-as flutflut ((method-of-type process-drawable relocate) this arg0)))
(if (-> this path-data v1-0) (&+! (-> this path-data v1-0) offset)))
(the-as flutflut ((method-of-type process-drawable relocate) this offset)))
(define *flutflut-shadow-control*
(new 'static
@ -187,7 +188,7 @@
(while (and *target* (logtest? (-> *target* control root-prim prim-core action) (collide-action flut)))
(flutflut-effect)
(suspend))
(let ((s5-0 (current-time))) (until (time-elapsed? s5-0 (seconds 1)) (flutflut-effect) (suspend)))
(suspend-for (seconds 1) (flutflut-effect))
(go arg0)))
(defstate wait-for-return (flutflut)

View File

@ -18,6 +18,7 @@
(stick-lock basic)
(flap-sound-id sound-id)))
(deftype flut-bank (basic)
((jump-height-min meters)
(jump-height-max meters)
@ -26,6 +27,7 @@
(air-attack-speed meters)
(ground-timeout time-frame)))
(define *FLUT-bank*
(new 'static
'flut-bank
@ -1084,7 +1086,7 @@
(let ((s4-1 (new-stack-vector0)))
(set! (-> s4-1 quad) (-> self control last-known-safe-ground quad))
(ja-channel-set! 0)
(let ((s3-1 (current-time))) (until (time-elapsed? s3-1 (seconds 1)) (suspend)))
(suspend-for (seconds 1))
(move-to-point! (-> self control) s4-1))
(set! (-> (&-> (-> self control) unknown-qword00) 0) (-> self control trans quad))
(send-event *camera* 'teleport)
@ -1159,24 +1161,22 @@
(vector+! (-> self control transv)
(vector-float*! (-> self control transv) (-> self control dynam gravity-normal) f30-0)
(vector-float*! gp-3 gp-3 (/ f0-4 f1-3))))))
(let ((gp-4 (current-time)))
(until (time-elapsed? gp-4 (seconds 1))
(target-flut-falling-anim-trans)
(vector-seek! (-> self draw color-mult) *zero-vector* (seconds-per-frame))
(let ((s5-2 (new-stack-vector0))
(f30-1 (the-as number (vector-dot (-> self control dynam gravity-normal) (-> self control transv)))))
0.0
(vector-! s5-2
(-> self control transv)
(vector-float*! s5-2 (-> self control dynam gravity-normal) (the-as float f30-1)))
(let* ((f0-10 (vector-length s5-2))
(f1-4 f0-10))
(if (< (the-as float (-> self control unknown-uint20)) (the-as float f30-1)) (set! f30-1 (-> self control unknown-uint20)))
(vector+! (-> self control transv)
(vector-float*! (-> self control transv) (-> self control dynam gravity-normal) (the-as float f30-1))
(vector-float*! s5-2 s5-2 (/ f0-10 f1-4)))))
(target-flut-post-post)
(suspend)))
(suspend-for (seconds 1)
(target-flut-falling-anim-trans)
(vector-seek! (-> self draw color-mult) *zero-vector* (seconds-per-frame))
(let ((s5-2 (new-stack-vector0))
(f30-1 (the-as number (vector-dot (-> self control dynam gravity-normal) (-> self control transv)))))
0.0
(vector-! s5-2
(-> self control transv)
(vector-float*! s5-2 (-> self control dynam gravity-normal) (the-as float f30-1)))
(let* ((f0-10 (vector-length s5-2))
(f1-4 f0-10))
(if (< (the-as float (-> self control unknown-uint20)) (the-as float f30-1)) (set! f30-1 (-> self control unknown-uint20)))
(vector+! (-> self control transv)
(vector-float*! (-> self control transv) (-> self control dynam gravity-normal) (the-as float f30-1))
(vector-float*! s5-2 s5-2 (/ f0-10 f1-4)))))
(target-flut-post-post))
(camera-change-to (the-as string 'base) 0 #f))
(else
(set! (-> self control unknown-surface00) *neutral-mods*)

View File

@ -23,6 +23,7 @@
darkvine-idle
darkvine-retreat))
(defmethod run-logic? ((this darkvine))
(or (not (logtest? (-> this mask) (process-mask actor-pause)))
(or (and (nonzero? (-> this draw))
@ -167,7 +168,7 @@
(suspend)
(ja :num! (seek!)))
(ja-channel-set! 0)
(let ((gp-0 (current-time))) (until (time-elapsed? gp-0 (seconds 2)) (suspend)))
(suspend-for (seconds 2))
(process-spawn part-tracker
:init
part-tracker-init
@ -179,7 +180,7 @@
(-> self root trans)
:to
*entity-pool*)
(let ((gp-2 (current-time))) (until (time-elapsed? gp-2 (seconds 0.5)) (suspend)))
(suspend-for (seconds 0.5))
(set! (-> self dangerous) #t)
(logior! (-> self mask) (process-mask actor-pause))
(ja-channel-set! 1)

View File

@ -15,6 +15,7 @@
(max-caught int32)
(max-missed int32)))
(define *FISHER-bank*
(new 'static 'fisher-bank :width (meters 3.3) :net-radius (meters 0.7) :max-caught #xc8 :max-missed 20))
@ -148,6 +149,7 @@
(powerup-percent float))
:allow-misaligned)
(define *fisher-params*
(new 'static
'boxed-array
@ -696,6 +698,7 @@
fisher-done
fisher-playing))
(deftype fisher-fish (process-drawable)
((dir vector :inline)
(offset float)
@ -708,6 +711,7 @@
fisher-fish-die
fisher-fish-fall))
(defskelgroup *catch-fisha-sg*
catch-fisha
catch-fisha-lod0-jg
@ -1084,7 +1088,7 @@
(-> gp-2 user-uint8 6)))
(process-spawn-function process
(lambda :behavior process ()
(let ((gp-0 (current-time))) (until (time-elapsed? gp-0 (seconds 0.1)) (suspend)))
(suspend-for (seconds 0.1))
(ambient-hint-spawn "st-lose" (the-as vector #f) *entity-pool* 'stinger)
(none)))
(send-event *target* 'lose))))
@ -1400,13 +1404,13 @@
(launch-particles (-> *part-id-table* 828) gp-0)
(launch-particles (-> *part-id-table* 2013) gp-0)
(fisher-fish-water gp-0 (+ 32768.0 (vector-y-angle (-> self node-list data 80 bone transform vector 1))))))
(let ((t9-14 (-> (find-parent-state) trans))) (if t9-14 (t9-14)))))
(call-parent-state-handler trans)))
(defstate idle (fisher)
:virtual #t
:trans
(behavior ()
(let ((t9-1 (-> (find-parent-state) trans))) (if t9-1 (t9-1)))
(call-parent-state-handler trans)
(when (task-complete? *game-info* (-> self entity extra perm task))
(when (nonzero? (-> *cpad-list* cpads 0 button0-rel 0))
(let ((v1-9 (-> self cheat-temp)))

View File

@ -10,6 +10,7 @@
(teleport-if-below-y float)
(teleport-if-above-y float)))
(defmethod can-activate? ((this jungle-elevator))
(and ((method-of-type plat-button can-activate?) this) (task-complete? *game-info* (game-task jungle-tower))))
@ -31,7 +32,7 @@
(let ((s5-0 (new 'stack-no-clear 'vector))
(gp-0 (new 'stack-no-clear 'vector)))
(set! (-> s5-0 quad) (-> self root trans quad))
(let ((t9-1 (-> (find-parent-state) trans))) (if t9-1 (t9-1)))
(call-parent-state-handler trans)
(vector-! gp-0 (-> self root trans) s5-0)
(when (< (-> self path-pos) 0.9)
(move-by-vector! (-> *target* control) gp-0)

View File

@ -493,10 +493,11 @@
periscope-wait-for-player
periscope-wait-for-power-input))
(defmethod relocate ((this periscope) (arg0 int))
(if (nonzero? (-> this grips)) (&+! (-> this grips) arg0))
(if (nonzero? (-> this part-aligned)) (&+! (-> this part-aligned) arg0))
(the-as periscope ((method-of-type process-drawable relocate) this arg0)))
(defmethod relocate ((this periscope) (offset int))
(if (nonzero? (-> this grips)) (&+! (-> this grips) offset))
(if (nonzero? (-> this part-aligned)) (&+! (-> this part-aligned) offset))
(the-as periscope ((method-of-type process-drawable relocate) this offset)))
(defmethod deactivate ((this periscope))
(if (nonzero? (-> this part-aligned)) (kill-and-free-particles (-> this part-aligned)))
@ -509,6 +510,7 @@
(:states
reflector-idle))
(deftype reflector-origin (process-drawable)
((reflector-trans vector :inline)
(next-reflector-trans vector :inline)
@ -518,12 +520,14 @@
(:states
reflector-origin-idle))
(deftype reflector-mirror (process-drawable)
((root collide-shape :override)
(beam-end vector :inline))
(:states (reflector-mirror-broken symbol)
reflector-mirror-idle))
(defskelgroup *periscope-base-sg*
periscope
periscope-base-lod0-jg
@ -1436,7 +1440,7 @@
(ambient-hint-spawn "gamcam21" (the-as vector #f) *entity-pool* 'camera)
(let ((v1-11 (manipy-spawn (-> self root trans) (-> self entity) *reflector-mirror-break-sg* #f :to self)))
(send-event (ppointer->process v1-11) 'anim-mode 'play1))
(let ((gp-2 (current-time))) (until (time-elapsed? gp-2 (seconds 0.5)) (suspend)))
(suspend-for (seconds 0.5))
(process-grab? *target*)
(while (or (-> self child) (-> *setting-control* current ambient))
(suspend))

View File

@ -14,6 +14,7 @@
(:states (eggtop-close symbol)
eggtop-idle))
(defskelgroup *eggtop-sg*
eggtop
eggtop-lod0-jg
@ -204,11 +205,11 @@
(lambda :behavior camera-tracker ()
(while (not (process-grab? *target*))
(suspend))
(let ((gp-0 (current-time))) (until (time-elapsed? gp-0 (seconds 1)) (suspend)))
(suspend-for (seconds 1))
(send-event *camera* 'blend-from-as-fixed)
(camera-look-at (the-as pair "ecovent-171") (the-as uint 0))
(camera-change-to "camera-223" 0 #f)
(let ((gp-1 (current-time))) (until (time-elapsed? gp-1 (seconds 3)) (suspend)))
(suspend-for (seconds 3))
(while (not (process-release? (handle->process (-> self grab-target))))
(suspend))
(send-event *camera* 'blend-from-as-fixed)
@ -271,6 +272,7 @@
(deftype jng-iris-door (eco-door) ())
(defskelgroup *jng-iris-door-sg*
jng-iris-door
jng-iris-door-lod0-jg

View File

@ -40,13 +40,14 @@
plant-boss-spawn
plant-boss-vulnerable))
(defmethod relocate ((this plant-boss) (arg0 int))
(if (nonzero? (-> this neck)) (&+! (-> this neck) arg0))
(if (nonzero? (-> this body)) (&+! (-> this body) arg0))
(defmethod relocate ((this plant-boss) (offset int))
(if (nonzero? (-> this neck)) (&+! (-> this neck) offset))
(if (nonzero? (-> this body)) (&+! (-> this body) offset))
(dotimes (v1-8 3)
(if (nonzero? (-> this attack-prim v1-8)) (&+! (-> this attack-prim v1-8) arg0))
(if (nonzero? (-> this death-prim v1-8)) (&+! (-> this death-prim v1-8) arg0)))
(call-parent-method this arg0))
(if (nonzero? (-> this attack-prim v1-8)) (&+! (-> this attack-prim v1-8) offset))
(if (nonzero? (-> this death-prim v1-8)) (&+! (-> this death-prim v1-8) offset)))
(call-parent-method this offset))
(deftype plant-boss-arm (process-drawable)
((root collide-shape :override)
@ -64,6 +65,7 @@
(plant-boss-vine-hit basic)
plant-boss-vine-idle))
(deftype plant-boss-leaf (process-drawable)
((root collide-shape-moving :override)
(side int32)
@ -77,6 +79,7 @@
(plant-boss-leaf-open symbol)
(plant-boss-leaf-open-idle symbol)))
(defskelgroup *plant-boss-sg*
plant-boss
plant-boss-main-lod0-jg
@ -356,11 +359,8 @@
:code
(behavior ((arg0 symbol))
(when (not arg0)
(let ((f30-0 (rand-vu-float-range (the-as float 0.0) (the-as float 1.0)))
(gp-0 (current-time)))
(until (time-elapsed? gp-0 (the int (* 300.0 f30-0)))
(ja :num! (loop!))
(suspend)))
(let ((f30-0 (rand-vu-float-range (the-as float 0.0) (the-as float 1.0))))
(suspend-for (the int (* 300.0 f30-0)) (ja :num! (loop!))))
(ja-channel-push! 1 (seconds 0.25))
(ja-no-eval :group! plant-boss-vine-die-ja :num! (seek!) :frame-num 0.0)
(until (ja-done? 0)
@ -387,11 +387,7 @@
(defstate plant-boss-root-die (plant-boss-arm)
:code
(behavior ((arg0 symbol))
(when (not arg0)
(let ((gp-0 (current-time)))
(until (time-elapsed? gp-0 (seconds 4))
(+! (-> self root trans z) (* -4096.0 (seconds-per-frame)))
(suspend)))))
(if (not arg0) (suspend-for (seconds 4) (+! (-> self root trans z) (* -4096.0 (seconds-per-frame))))))
:post ja-post)
(defbehavior plant-boss-arm-init plant-boss-arm ((arg0 vector) (arg1 float) (arg2 int))
@ -733,7 +729,7 @@
(while (not (send-event *camera* 'intro-done?))
(suspend))
(camera-change-to "camera-222" 600 #f)
(let ((gp-0 (current-time))) (until (time-elapsed? gp-0 (seconds 2)) (suspend)))
(suspend-for (seconds 2))
(while (not (process-release? (handle->process (-> self grab-target))))
(suspend))
(send-event *camera* 'blend-from-as-fixed)
@ -1203,11 +1199,7 @@
(behavior ()
(ja-channel-set! 1)
(ja :group! plant-boss-main-die-ja :num! max)
(let ((gp-1 (current-time)))
(until (time-elapsed? gp-1 (seconds 5))
(transform-post)
(do-push-aways! (-> self root))
(suspend)))
(suspend-for (seconds 5) (transform-post) (do-push-aways! (-> self root)))
(loop
(logior! (-> self mask) (process-mask sleep))
(suspend))))

View File

@ -23,6 +23,7 @@
(init! (_type_ symbol symbol symbol symbol int int symbol) none)
(set-delay! (_type_ time-frame) none)))
(deftype baby-spider (nav-enemy)
((die-if-not-visible? symbol)
(hack-move-above-ground? symbol)
@ -45,6 +46,7 @@
baby-spider-hatching
baby-spider-resume))
(defskelgroup *baby-spider-sg*
baby-spider
baby-spider-lod0-jg
@ -380,13 +382,8 @@ baby-spider-default-event-handler
(ja :num! (seek! max f30-0)))
(ja-no-eval :num! (loop!))
(logclear! (-> self nav-enemy-flags) (nav-enemy-flags enable-travel))
(let ((gp-0 (rand-vu-int-range 300 600))
(s5-0 (current-time)))
(until (time-elapsed? s5-0 gp-0)
(ja :num-func num-func-identity :frame-num 0.0)
(ja-blend-eval)
(suspend)
(suspend)))))))
(let ((gp-0 (rand-vu-int-range 300 600)))
(suspend-for gp-0 (ja :num-func num-func-identity :frame-num 0.0) (ja-blend-eval) (suspend)))))))
(defstate nav-enemy-give-up (baby-spider)
:virtual #t

View File

@ -25,6 +25,7 @@
dark-crystal-idle
dark-crystal-spawn-fuel-cell))
(defskelgroup *dark-crystal-sg*
dark-crystal
dark-crystal-lod0-jg
@ -459,7 +460,7 @@
(-> self root trans)
:to
*entity-pool*)
(let ((s5-4 (current-time))) (until (time-elapsed? s5-4 (seconds 0.25)) (suspend)))
(suspend-for (seconds 0.25))
(if gp-1 (go dark-crystal-spawn-fuel-cell)))
(cleanup-for-death self)
(until (not (-> self child))

View File

@ -15,6 +15,7 @@
babak-with-cannon-jump-onto-cannon
babak-with-cannon-shooting))
nav-enemy-default-event-handler
(defstate nav-enemy-idle (babak-with-cannon)
@ -206,7 +207,7 @@ nav-enemy-default-event-handler
(behavior ()
(if (and *target* (= (-> *target* current-level name) 'beach)) (spool-push *art-control* "beachcam-cannon" 0 self -1.0))
(if (and *target* (= (-> *target* current-level name) 'misty)) (spool-push *art-control* "mistycam-cannon" 0 self -1.0))
(let ((t9-3 (-> (find-parent-state) trans))) (if t9-3 (t9-3)))))
(call-parent-state-handler trans)))
(defstate nav-enemy-fuel-cell (babak-with-cannon)
:virtual #t

View File

@ -211,6 +211,7 @@
(explosion-force float)
(mine-weight float)))
(define *BALLOONLURKER-bank*
(new 'static
'balloonlurker-bank
@ -281,6 +282,7 @@
(balloonlurker-mine-explode int)
balloonlurker-patrol))
(deftype balloonlurker-pilot (process-drawable)
((root collide-shape-moving :override)
(parent-override (pointer balloonlurker) :overlay-at parent))
@ -291,6 +293,7 @@
balloonlurker-pilot-die
balloonlurker-pilot-idle))
(defskelgroup *balloonlurker-sg*
balloonlurker
balloonlurker-lod0-jg
@ -586,7 +589,7 @@
(apply-all (-> self link) actor-link-dead-hook (& sv-16))
(when (and sv-16 sv-24)
(process-grab? *target*)
(let ((gp-0 (current-time))) (until (time-elapsed? gp-0 (seconds 1)) (suspend)))
(suspend-for (seconds 1))
(process-release? *target*)
(while (let ((a1-4 (new 'stack-no-clear 'event-message-block)))
(set! (-> a1-4 from) self)
@ -607,12 +610,12 @@
(suspend)))
:post balloonlurker-post)
(defmethod relocate ((this balloonlurker) (arg0 int))
(if (nonzero? (-> this propeller)) (&+! (-> this propeller) arg0))
(if (nonzero? (-> this rudder)) (&+! (-> this rudder) arg0))
(if (nonzero? (-> this mine 0)) (&+! (-> this mine 0) arg0))
(if (nonzero? (-> this mine 1)) (&+! (-> this mine 1) arg0))
(call-parent-method this arg0))
(defmethod relocate ((this balloonlurker) (offset int))
(if (nonzero? (-> this propeller)) (&+! (-> this propeller) offset))
(if (nonzero? (-> this rudder)) (&+! (-> this rudder) offset))
(if (nonzero? (-> this mine 0)) (&+! (-> this mine 0) offset))
(if (nonzero? (-> this mine 1)) (&+! (-> this mine 1) offset))
(call-parent-method this offset))
(defstate balloonlurker-pilot-idle (balloonlurker-pilot)
:event

View File

@ -15,6 +15,7 @@
silostep-idle
(silostep-rise symbol)))
(defskelgroup *silostep-sg*
silostep
silostep-lod0-jg
@ -45,7 +46,7 @@
(while (not (process-grab? *target*))
(suspend))
(camera-change-to "camera-160" 150 #f)
(let ((gp-0 (current-time))) (until (time-elapsed? gp-0 (seconds 3)) (suspend)))
(suspend-for (seconds 3))
(while (not (process-release? (handle->process (-> self grab-target))))
(suspend))
(camera-change-to (the-as string 'base) 150 #f)
@ -62,7 +63,7 @@
(v1-1 (get-reminder gp-0 0)))
(save-reminder gp-0 (logior v1-1 2) 0))
(set-time! (-> self state-time))
(let ((gp-1 (current-time))) (until (time-elapsed? gp-1 (seconds 1)) (suspend)))
(suspend-for (seconds 1))
(sound-play "arena-steps")
(send-to-all-after (-> self link) 'trigger-rise)
(go silostep-rise #f))
@ -124,6 +125,7 @@
(deftype rounddoor (eco-door) ())
(defmethod eco-door-method-24 ((this rounddoor))
(let ((s5-0 (new 'process 'collide-shape this (collide-list-enum hit-by-others))))
(let ((s4-0 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 0) (the-as uint 0))))

View File

@ -13,6 +13,7 @@
(range float)
(speed float)))
(defun angle-tracker-apply-move! ((arg0 angle-tracker) (arg1 float))
(let* ((f0-2 (* arg1 (-> arg0 speed) (seconds-per-frame)))
(f0-3 (+ (-> arg0 value) f0-2)))
@ -530,9 +531,10 @@
mistycannon-missile-idle
mistycannon-missile-in-water))
(defmethod relocate ((this mistycannon-missile) (arg0 int))
(if (nonzero? (-> this part2)) (&+! (-> this part2) arg0))
(the-as mistycannon-missile ((method-of-type process-drawable relocate) this arg0)))
(defmethod relocate ((this mistycannon-missile) (offset int))
(if (nonzero? (-> this part2)) (&+! (-> this part2) offset))
(the-as mistycannon-missile ((method-of-type process-drawable relocate) this offset)))
(defmethod deactivate ((this mistycannon-missile))
(if (nonzero? (-> this part2)) (kill-and-free-particles (-> this part2)))
@ -720,10 +722,7 @@
(find-overlapping-shapes (-> self root) a1-3))
(suspend)
(clear-collide-with-as (-> self root))
(let ((gp-2 (current-time)))
(until (time-elapsed? gp-2 (seconds 3))
(spawn (-> self part2) (-> self root trans))
(suspend)))
(suspend-for (seconds 3) (spawn (-> self part2) (-> self root trans)))
(kill-and-free-particles (-> self part2))
(deactivate self))
:post ja-post)
@ -748,6 +747,7 @@
(muzzle-time float)
(blast-radius float)))
(defbehavior mistycannon-missile-init-by-other mistycannon-missile ((arg0 mistycannon-init-data) (arg1 entity-actor))
(logior! (-> self mask) (process-mask projectile))
(logclear! (-> self mask) (process-mask actor-pause))
@ -829,6 +829,7 @@
mistycannon-waiting-for-player
mistycannon-waiting-for-player-to-fuck-off))
(defbehavior mistycannon-pick-random-target-point mistycannon ()
(let ((f30-0 (* (sqrtf (rand-vu)) (-> self center-point w)))
(f28-1 (* 65536.0 (rand-vu))))
@ -965,6 +966,7 @@
((s1 float)
(s2 float)))
(defun solve-missile-tilt ((arg0 quadratic-solution) (arg1 float) (arg2 float) (arg3 float) (arg4 float))
(let* ((f1-3 (* 0.5 arg2 arg2 arg4))
(f0-3 f1-3)
@ -986,6 +988,7 @@
(speed float)
(time float)))
(defun solve-missile-velocity ((arg0 trajectory-params) (arg1 float))
(set! (-> arg0 theta) arg1)
(let ((f0-4 (* (- (* (-> arg0 x) (tan arg1)) (-> arg0 y)) (/ 2.0 (-> arg0 gravity)))))

View File

@ -24,6 +24,7 @@
plunger-lurker-idle
plunger-lurker-plunge))
(defskelgroup *plunger-lurker-sg*
plunger-lurker
plunger-lurker-lod0-jg
@ -235,6 +236,7 @@
flying-lurker-sleep
flying-lurker-start))
(defskelgroup *flying-lurker-sg*
flying-lurker
flying-lurker-lod0-jg
@ -607,7 +609,7 @@
(process-release? *target*)
(process-spawn-function process
(lambda :behavior process ()
(let ((gp-0 (current-time))) (until (time-elapsed? gp-0 (seconds 0.1)) (suspend)))
(suspend-for (seconds 0.1))
(level-hint-spawn (text-id ogre-race-hint) "asstvb24" (the-as entity #f) *entity-pool* (game-task none))
(none))
:to
@ -761,7 +763,7 @@
(if (= (get-task-status (game-task plunger-lurker-hit)) (task-status invalid)) (go flying-lurker-die))
(when (and *target* (>= 172032.0 (vector-vector-xz-distance (-> self root trans) (-> *target* control trans))))
(process-grab? *target*)
(let ((s5-0 (current-time))) (until (time-elapsed? s5-0 (seconds 1)) (suspend)))
(suspend-for (seconds 1))
(process-release? *target*)
(send-event self 'saw-player))
(suspend)

View File

@ -106,6 +106,7 @@
ogreboss-missile-impact
ogreboss-missile-seek))
(defstate ogreboss-missile-idle (ogreboss-missile)
:enter
(behavior ()
@ -272,6 +273,7 @@
(blast-radius float)
(pickup-type pickup-type)))
(defbehavior ogreboss-missile-init-by-other ogreboss-missile ((arg0 ogreboss-missile-init-data) (arg1 entity-actor))
(set! (-> self entity) arg1)
(let ((s5-0 (new 'process 'collide-shape-moving self (collide-list-enum hit-by-player))))
@ -338,6 +340,7 @@
ogreboss-super-boulder-roll
ogreboss-super-boulder-throw))
(defbehavior ogreboss-super-boulder-event-handler ogreboss-super-boulder ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
(case arg2
;; og:preserve-this PAL patch here
@ -532,9 +535,9 @@
(transform-post)
0))
(defmethod relocate ((this ogreboss-super-boulder) (arg0 int))
(if (nonzero? (-> this joint)) (&+! (-> this joint) arg0))
(call-parent-method this arg0))
(defmethod relocate ((this ogreboss-super-boulder) (offset int))
(if (nonzero? (-> this joint)) (&+! (-> this joint) offset))
(call-parent-method this offset))
(defstate ogreboss-super-boulder-killed-player (ogreboss-super-boulder)
:code
@ -594,6 +597,7 @@
(:states
ogreboss-bounce-boulder-idle))
(defbehavior ogreboss-bounce-boulder-event-handler ogreboss-bounce-boulder ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
(case arg2
(('touch)
@ -722,6 +726,7 @@
ogreboss-stage3-throw
ogreboss-wait-for-player))
(defbehavior ogreboss-inc-try-count ogreboss ()
(when (not (-> self try-counted))
(set! (-> self try-counted) #t)
@ -757,7 +762,7 @@
(until (ja-done? 0)
(suspend)
(ja :num! (seek! (ja-aframe (the-as float 140.0) 0))))
(let ((gp-2 (current-time))) (until (time-elapsed? gp-2 (seconds 0.167)) (suspend)))
(suspend-for (seconds 0.167))
(ja-no-eval :group!
ogreboss-idle-ja
:num!
@ -767,7 +772,7 @@
(until (ja-done? 0)
(suspend)
(ja :num! (seek! (ja-aframe (the-as float 168.0) 0))))
(let ((gp-5 (current-time))) (until (time-elapsed? gp-5 (seconds 0.167)) (suspend)))
(suspend-for (seconds 0.167))
(ja-no-eval :group! ogreboss-idle-ja :num! (seek!) :frame-num (ja-aframe (the-as float 168.0) 0))
(until (ja-done? 0)
(suspend)
@ -945,7 +950,7 @@
(ja :num! (seek! max arg1)))))
(logior! (-> self draw status) (draw-status hidden))
(set! (-> self submerged) #t)
(let ((s5-1 (current-time))) (until (time-elapsed? s5-1 arg0) (suspend))))
(suspend-for arg0))
0
(none))

View File

@ -718,7 +718,7 @@
(set! (-> self post-hook) target-no-ja-move-post)
(ja-channel-set! 0)
(ja-post)
(let ((gp-6 (current-time))) (until (time-elapsed? gp-6 (seconds 2)) (suspend))))
(suspend-for (seconds 2)))
(('endlessfall)
(sound-play "death-fall")
(camera-change-to (the-as string cam-endlessfall) 30 #f)
@ -734,21 +734,19 @@
(vector+! (-> self control transv)
(vector-float*! (-> self control transv) (-> self control dynam gravity-normal) f2-2)
(vector-float*! gp-8 gp-8 (/ f0-29 f1-9)))))
(let ((gp-9 (current-time)))
(until (time-elapsed? gp-9 (seconds 0.75))
(vector-seek! (-> self draw color-mult) *zero-vector* (* 1.5 (seconds-per-frame)))
(set-forward-vel (* 0.96 (-> self control unknown-float01)))
(let ((s5-3 (new-stack-vector0))
(f28-0 (vector-dot (-> self control dynam gravity-normal) (-> self control transv))))
0.0
(vector-! s5-3 (-> self control transv) (vector-float*! s5-3 (-> self control dynam gravity-normal) f28-0))
(let* ((f0-38 (vector-length s5-3))
(f1-12 f0-38))
(if (< f30-0 f28-0) (set! f28-0 f30-0))
(vector+! (-> self control transv)
(vector-float*! (-> self control transv) (-> self control dynam gravity-normal) f28-0)
(vector-float*! s5-3 s5-3 (/ f0-38 f1-12)))))
(suspend))))
(suspend-for (seconds 0.75)
(vector-seek! (-> self draw color-mult) *zero-vector* (* 1.5 (seconds-per-frame)))
(set-forward-vel (* 0.96 (-> self control unknown-float01)))
(let ((s5-3 (new-stack-vector0))
(f28-0 (vector-dot (-> self control dynam gravity-normal) (-> self control transv))))
0.0
(vector-! s5-3 (-> self control transv) (vector-float*! s5-3 (-> self control dynam gravity-normal) f28-0))
(let* ((f0-38 (vector-length s5-3))
(f1-12 f0-38))
(if (< f30-0 f28-0) (set! f28-0 f30-0))
(vector+! (-> self control transv)
(vector-float*! (-> self control transv) (-> self control dynam gravity-normal) f28-0)
(vector-float*! s5-3 s5-3 (/ f0-38 f1-12)))))))
(camera-change-to (the-as string 'base) 0 #f)))
(set! (-> self control transv quad) (the-as uint128 0))
(set! (-> self control unknown-float01) 0.0)
@ -871,15 +869,13 @@
(ja :chan 1 :group! eichar-racer-turn2-ja :num! (chan 0))
(ja :chan 2 :group! eichar-racer-dig-ja :num! (chan 0))
(ja :chan 3 :group! eichar-racer-dig2-ja :num! (chan 0)))
(let ((s5-1 (current-time)))
(until (time-elapsed? s5-1 (seconds 0.5))
(set! (-> self racer stick-lock) #t)
(set-forward-vel (* 0.9 (-> self control unknown-float01)))
(set! (-> self racer turn-anim-targ) 0.0)
(set! (-> self racer turn-anim-targ) 0.0)
(target-racing-turn-anim)
(seek! (-> self control unknown-vector11 y) 6144.0 (* 3.0 (seconds-per-frame)))
(suspend)))
(suspend-for (seconds 0.5)
(set! (-> self racer stick-lock) #t)
(set-forward-vel (* 0.9 (-> self control unknown-float01)))
(set! (-> self racer turn-anim-targ) 0.0)
(set! (-> self racer turn-anim-targ) 0.0)
(target-racing-turn-anim)
(seek! (-> self control unknown-vector11 y) 6144.0 (* 3.0 (seconds-per-frame))))
(go target-racing-get-off-jump arg0))
:post target-racing-post)

View File

@ -30,10 +30,11 @@
(pickup (state collectable))
wait-for-return))
(defmethod relocate ((this racer) (arg0 int))
(defmethod relocate ((this racer) (offset int))
(countdown (v1-0 2)
(if (-> this path-data v1-0) (&+! (-> this path-data v1-0) arg0)))
(the-as racer ((method-of-type process-drawable relocate) this arg0)))
(if (-> this path-data v1-0) (&+! (-> this path-data v1-0) offset)))
(the-as racer ((method-of-type process-drawable relocate) this offset)))
(defskelgroup *racer-sg*
racer
@ -219,7 +220,7 @@
(while (and *target* (logtest? (-> *target* control root-prim prim-core action) (collide-action racer)))
(racer-effect)
(suspend))
(let ((s5-0 (current-time))) (until (time-elapsed? s5-0 (seconds 1)) (racer-effect) (suspend)))
(suspend-for (seconds 1) (racer-effect))
(go arg0)))
(defstate wait-for-return (racer)

View File

@ -12,6 +12,7 @@
(deftype snowcam (pov-camera)
((seq uint64)))
(defskelgroup *snowcam-sg*
snowcam
snowcam-lod0-jg
@ -42,7 +43,7 @@
(until (ja-done? 0)
(suspend)
(ja :num! (seek!)))
(let ((gp-0 (current-time))) (until (time-elapsed? gp-0 (seconds 4.5)) (suspend))))
(suspend-for (seconds 4.5)))
((= v1-0 1)
(let ((gp-2 (ppointer->handle (process-spawn fuel-cell
:init
@ -82,6 +83,7 @@
snow-eggtop-idle-down
snow-eggtop-idle-up))
(defskelgroup *snow-eggtop-sg*
snow-eggtop
snow-eggtop-lod0-jg
@ -370,6 +372,7 @@
(:states
snowpusher-idle))
(defskelgroup *snowpusher-sg*
snowpusher
snowpusher-lod0-jg
@ -451,6 +454,7 @@
(:states
snow-spatula-idle))
(defskelgroup *snow-spatula-sg*
snow-spatula
snow-spatula-lod0-jg
@ -525,6 +529,7 @@
snow-fort-gate-idle-closed
snow-fort-gate-idle-open))
(defskelgroup *snow-fort-gate-sg*
snow-fort-gate
snow-fort-gate-lod0-jg
@ -768,10 +773,10 @@
((method-of-type process-drawable deactivate) this)
(none))
(defmethod relocate ((this snow-fort-gate) (arg0 int))
(if (nonzero? (-> this part2)) (&+! (-> this part2) arg0))
(if (nonzero? (-> this part3)) (&+! (-> this part3) arg0))
(call-parent-method this arg0))
(defmethod relocate ((this snow-fort-gate) (offset int))
(if (nonzero? (-> this part2)) (&+! (-> this part2) offset))
(if (nonzero? (-> this part3)) (&+! (-> this part3) offset))
(call-parent-method this offset))
(defmethod init-from-entity! ((this snow-fort-gate) (arg0 entity-actor))
(let ((s4-0 (new 'process 'collide-shape this (collide-list-enum hit-by-others))))
@ -817,6 +822,7 @@
snow-gears-idle
snow-gears-stopped))
(defskelgroup *snow-gears-sg*
snow-gears
snow-gears-lod0-jg
@ -981,6 +987,7 @@
snow-switch-idle-down
snow-switch-idle-up))
(defskelgroup *snow-switch-sg*
snow-switch
snow-switch-lod0-jg
@ -1120,6 +1127,7 @@
snow-log-hidden
snow-log-wait-for-master))
(defskelgroup *snow-log-sg*
snow-log
snow-log-lod0-jg
@ -1258,6 +1266,7 @@
snow-log-button-idle-down
snow-log-button-idle-up))
(defbehavior snow-log-button-event-handler snow-log-button ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
(local-vars (v0-2 basic))
(case arg2

View File

@ -26,10 +26,11 @@
billy-done
billy-playing))
(defmethod relocate ((this billy) (arg0 int))
(defmethod relocate ((this billy) (offset int))
(countdown (v1-0 3)
(if (nonzero? (-> this path-data v1-0)) (&+! (-> this path-data v1-0) arg0)))
(call-parent-method this arg0))
(if (nonzero? (-> this path-data v1-0)) (&+! (-> this path-data v1-0) offset)))
(call-parent-method this offset))
(deftype billy-snack (process-drawable)
((num-rats int32))
@ -37,6 +38,7 @@
billy-snack-eat
billy-snack-idle))
(defskelgroup *farthy-snack-sg*
farthy-snack
farthy-snack-lod0-jg
@ -88,6 +90,7 @@
billy-rat-eat
billy-rat-salivate))
(defun rat-about-to-eat? ((arg0 billy-rat) (arg1 billy))
(the-as symbol (and (= (-> arg0 dest-type) 2) (> (-> arg1 num-snacks) 0) (handle->process (-> arg0 snack)))))
@ -152,7 +155,7 @@
:virtual #t
:enter
(behavior ()
(let ((t9-1 (-> (find-parent-state) enter))) (if t9-1 (t9-1)))
(call-parent-state-handler enter)
(when (logtest? (nav-control-flags navcf19) (-> self nav flags))
(logclear! (-> self nav flags) (nav-control-flags navcf19))
(if (rat-about-to-eat? self (-> self billy 0))

View File

@ -26,6 +26,7 @@
(:states
swamp-rat-spawn))
(defskelgroup *swamp-rat-sg*
swamp-rat
swamp-rat-lod0-jg
@ -183,13 +184,8 @@ swamp-rat-default-event-handler
(ja :num! (seek! max f30-0)))
(ja-no-eval :num! (loop!))
(logclear! (-> self nav-enemy-flags) (nav-enemy-flags enable-travel))
(let ((gp-0 (rand-vu-int-range 300 600))
(s5-0 (current-time)))
(until (time-elapsed? s5-0 gp-0)
(ja :num-func num-func-identity :frame-num 0.0)
(ja-blend-eval)
(suspend)
(suspend)))))))
(let ((gp-0 (rand-vu-int-range 300 600)))
(suspend-for gp-0 (ja :num-func num-func-identity :frame-num 0.0) (ja-blend-eval) (suspend)))))))
(defstate nav-enemy-give-up (swamp-rat)
:virtual #t

View File

@ -24,9 +24,10 @@
hidden
ndi))
(defmethod relocate ((this logo) (arg0 int))
(if (nonzero? (-> this main-joint)) (&+! (-> this main-joint) arg0))
(the-as logo ((method-of-type process-drawable relocate) this arg0)))
(defmethod relocate ((this logo) (offset int))
(if (nonzero? (-> this main-joint)) (&+! (-> this main-joint) offset))
(the-as logo ((method-of-type process-drawable relocate) this offset)))
(deftype logo-slave (process-drawable)
((parent-process (pointer logo) :overlay-at parent)
@ -34,9 +35,10 @@
(:state-methods
idle))
(defmethod relocate ((this logo-slave) (arg0 int))
(if (nonzero? (-> this main-joint)) (&+! (-> this main-joint) arg0))
(the-as logo-slave ((method-of-type process-drawable relocate) this arg0)))
(defmethod relocate ((this logo-slave) (offset int))
(if (nonzero? (-> this main-joint)) (&+! (-> this main-joint) offset))
(the-as logo-slave ((method-of-type process-drawable relocate) this offset)))
(defskelgroup *logo-sg*
logo
@ -324,7 +326,7 @@
(let ((gp-0 *master-mode*)) (set! *master-mode* 'game) (clear-rec *art-control*) (set! *master-mode* gp-0))
(loop
(when (and (none-reserved? *art-control*) (not (paused?)))
(let ((gp-1 (current-time))) (until (time-elapsed? gp-1 (seconds 0.1)) (set! *camera-look-through-other* 2) (suspend)))
(suspend-for (seconds 0.1) (set! *camera-look-through-other* 2))
(go-virtual idle))
(set! *camera-look-through-other* 2)
(suspend))))
@ -534,7 +536,7 @@
(while (!= (file-status *art-control* "ndi-intro" 0) 'active)
(set-blackout-frames (seconds 0.05))
(suspend))
(let ((s5-1 (current-time))) (until (time-elapsed? s5-1 (seconds 0.25)) (set-blackout-frames (seconds 0.05)) (suspend)))))
(suspend-for (seconds 0.25) (set-blackout-frames (seconds 0.05)))))
(label cfg-8)
(let ((s5-2 (new 'stack-no-clear 'mc-slot-info)))
(mc-get-slot-info 0 s5-2)
@ -560,7 +562,7 @@
(apply-settings *setting-control*)
(while *progress-process*
(suspend))
(let ((gp-2 (current-time))) (until (time-elapsed? gp-2 (seconds 0.01)) (suspend)))
(suspend-for (seconds 0.01))
(goto cfg-41))))
(label cfg-41)
(let ((gp-3 (entity-by-name "logo-1")))

View File

@ -12,6 +12,7 @@
(deftype training-water (water-anim) ())
(define ripple-for-training-water
(new 'static
'ripple-wave-set
@ -54,9 +55,10 @@
(:state-methods
idle))
(defmethod relocate ((this training-cam) (arg0 int))
(if (nonzero? (-> this root)) (&+! (-> this root) arg0))
(the-as training-cam ((method-of-type process relocate) this arg0)))
(defmethod relocate ((this training-cam) (offset int))
(if (nonzero? (-> this root)) (&+! (-> this root) offset))
(the-as training-cam ((method-of-type process relocate) this offset)))
(defstate idle (training-cam)
:virtual #t
@ -125,7 +127,7 @@
(when (not (task-complete? *game-info* (game-task training-climb)))
(clear-text-seen! *game-info* (text-id training-double-jump))
(level-hint-spawn (text-id training-double-jump) "sagevb27" (the-as entity #f) *entity-pool* (game-task none))
(let ((gp-8 (current-time))) (until (time-elapsed? gp-8 (seconds 30)) (suspend)))
(suspend-for (seconds 30))
(process-entity-status! self (entity-perm-status bit-3) #f)
(go-virtual idle)))))
(while (-> self child)
@ -154,6 +156,7 @@
(deftype tra-pontoon (rigid-body-platform)
((anchor-point vector :inline)))
(defmethod init-from-entity! ((this tra-pontoon) (arg0 entity-actor))
(logior! (-> this mask) (process-mask platform))
(rigid-body-platform-method-30 this)
@ -254,6 +257,7 @@
(deftype tra-iris-door (eco-door) ())
(defskelgroup *tra-iris-door-sg*
jng-iris-door
jng-iris-door-lod0-jg
@ -440,6 +444,7 @@
idle
(hit float vector symbol)))
(deftype scarecrow-b (process-drawable)
((root collide-shape :override)
(incomming-attack-id uint64)
@ -448,6 +453,7 @@
idle
(hit float vector symbol)))
(defskelgroup *scarecrow-a-sg*
scarecrow-a
scarecrow-a-lod0-jg

View File

@ -42,6 +42,7 @@
((local-pos vector :inline)
(normal vector :inline)))
(deftype vehicle-path (structure)
((point-array vector 10 :inline)
(point-count int32))
@ -52,6 +53,7 @@
(add-point! (_type_ float float float float) none)
(debug-draw (_type_) symbol)))
(defmethod get-point-count ((this vehicle-path))
(-> this point-count))
@ -215,8 +217,9 @@
(vehicle-controller-method-15 (_type_ collide-shape-moving) none)
(vehicle-controller-method-16 (_type_) none)))
(defmethod relocate ((this vehicle-controller) (arg0 int))
(if (nonzero? (-> this path)) (&+! (-> this path) arg0))
(defmethod relocate ((this vehicle-controller) (offset int))
(if (nonzero? (-> this path)) (&+! (-> this path) offset))
(the-as vehicle-controller 0))
(defmethod vehicle-controller-method-12 ((this vehicle-controller) (arg0 int) (arg1 vector))
@ -398,6 +401,7 @@
fishermans-boat-ride-to-misty
fishermans-boat-ride-to-village1))
(defskelgroup *fishermans-boat-sg*
fishermans-boat
fishermans-boat-lod0-jg
@ -924,21 +928,17 @@
(suspend))
(vector-z-quaternion! gp-0 (-> self root-overlay quat))
(vehicle-controller-method-10 (-> self controller) gp-0 (-> self controller throttle) s5-0)
(let ((s3-0 (current-time)))
(until (time-elapsed? s3-0 (seconds 1))
(fishermans-boat-set-throttle-by-speed f30-0)
(suspend)
(suspend))))
(suspend-for (seconds 1) (fishermans-boat-set-throttle-by-speed f30-0) (suspend)))
(vector-z-quaternion! gp-0 (-> self root-overlay quat))
(vehicle-controller-method-10 (-> self controller) gp-0 (-> self controller throttle) s5-0)
(+! s5-0 1)))
(go fishermans-boat-player-control))
:post fishermans-boat-post)
(defmethod relocate ((this fishermans-boat) (arg0 int))
(relocate (-> this controller) arg0)
(if (nonzero? (-> this propeller)) (&+! (-> this propeller) arg0))
(call-parent-method this arg0))
(defmethod relocate ((this fishermans-boat) (offset int))
(relocate (-> this controller) offset)
(if (nonzero? (-> this propeller)) (&+! (-> this propeller) offset))
(call-parent-method this offset))
(defmethod rigid-body-platform-method-30 ((this fishermans-boat))
(let ((s5-0 (new 'process 'collide-shape-moving this (collide-list-enum hit-by-others))))
@ -1115,7 +1115,7 @@
(apply-settings *setting-control*)
(process-spawn-function process
(lambda :behavior fishermans-boat ()
(let ((gp-0 (current-time))) (until (time-elapsed? gp-0 (seconds 1)) (suspend)))
(suspend-for (seconds 1))
(while (or (-> *setting-control* current ambient) (-> *setting-control* current hint) (-> *setting-control* current movie))
(suspend))
(suspend)

View File

@ -11,6 +11,7 @@
(teleport-if-below-y float)
(teleport-if-above-y float)))
(defskelgroup *sunken-elevator-sg*
sunken-elevator
sunken-elevator-lod0-jg
@ -99,7 +100,7 @@
(gp-0 (new 'stack-no-clear 'vector)))
(set! *teleport* #t)
(set! (-> s5-0 quad) (-> self root trans quad))
(let ((t9-1 (-> (find-parent-state) trans))) (if t9-1 (t9-1)))
(call-parent-state-handler trans)
(vector-! gp-0 (-> self root trans) s5-0)
(when (< (-> self path-pos) 0.9)
(move-by-vector! (-> *target* control) gp-0)

View File

@ -10,6 +10,7 @@
(deftype village2cam (pov-camera)
((seq uint64)))
(defskelgroup *village2cam-sg*
village2cam
village2cam-lod0-jg
@ -76,6 +77,7 @@
pontoon-die
pontoon-hidden))
(defstate pontoon-hidden (pontoon)
:enter
(behavior ()
@ -193,8 +195,10 @@
(deftype pontoonfive (pontoon) ())
(deftype pontoonten (pontoon) ())
(defskelgroup *pontoonfive-sg*
pontoonfive
pontoonfive-lod0-jg
@ -375,6 +379,7 @@
(:states (allpontoons-be-clone handle)
allpontoons-idle))
(defskelgroup *allpontoons-sg*
allpontoons
allpontoons-lod0-jg
@ -443,6 +448,7 @@
fireboulder-hover
fireboulder-idle))
(defskelgroup *fireboulder-sg*
fireboulder
fireboulder-lod0-jg
@ -621,6 +627,7 @@
(:states
ceilingflag-idle))
(defskelgroup *ceilingflag-sg*
ceilingflag
ceilingflag-geo-jg
@ -654,6 +661,7 @@
exit-chamber-dummy-idle
exit-chamber-dummy-wait-to-appear))
(defskelgroup *exit-chamber-dummy-sg*
exit-chamber-dummy
exit-chamber-dummy-lod0-jg
@ -723,6 +731,7 @@
ogreboss-village2-idle
ogreboss-village2-throw))
(defskelgroup *ogreboss-village2-sg*
ogreboss-village2
ogreboss-village2-lod0-jg
@ -1054,12 +1063,12 @@
(until (ja-done? 0)
(suspend)
(ja :num! (seek! (ja-aframe 140.0 0))))
(let ((gp-2 (current-time))) (until (time-elapsed? gp-2 (seconds 0.167)) (suspend)))
(suspend-for (seconds 0.167))
(ja-no-eval :group! ogreboss-village2-idle-ja :num! (seek! (ja-aframe 168.0 0)) :frame-num (ja-aframe 140.0 0))
(until (ja-done? 0)
(suspend)
(ja :num! (seek! (ja-aframe 168.0 0))))
(let ((gp-5 (current-time))) (until (time-elapsed? gp-5 (seconds 0.167)) (suspend)))
(suspend-for (seconds 0.167))
(ja-no-eval :group! ogreboss-village2-idle-ja :num! (seek!) :frame-num (ja-aframe 168.0 0))
(until (ja-done? 0)
(suspend)
@ -1116,8 +1125,10 @@
(deftype villageb-ogreboss (ogreboss-village2) ())
(deftype villageb-water (water-anim) ())
(define ripple-for-villageb-water
(new 'static
'ripple-wave-set

View File

@ -11,6 +11,7 @@
(deftype warpgate (process-hidden) ())
(defstate target-warp-in (target)
:event target-generic-event-handler
:enter
@ -31,7 +32,7 @@
(ja-channel-set! 0)
(vector-reset! (-> self control transv))
(move-to-point! (-> self control) (-> self control unknown-vector102))
(let ((gp-0 (current-time))) (until (time-elapsed? gp-0 (seconds 1)) (suspend)))
(suspend-for (seconds 1))
(let ((gp-1 (new-stack-vector0)))
(let ((f0-1 (vector-dot (-> self control dynam gravity-normal) (-> self control transv))))
0.0
@ -270,6 +271,7 @@
(:methods
(pressable? (_type_) symbol)))
(defskelgroup *warp-gate-switch-sg*
warp-gate-switch
warp-gate-switch-lod0-jg
@ -484,9 +486,10 @@
(:state-methods
idle))
(defmethod relocate ((this village-cam) (arg0 int))
(if (nonzero? (-> this root-override)) (&+! (-> this root-override) arg0))
(the-as village-cam ((method-of-type process relocate) this arg0)))
(defmethod relocate ((this village-cam) (offset int))
(if (nonzero? (-> this root-override)) (&+! (-> this root-override) offset))
(the-as village-cam ((method-of-type process relocate) this offset)))
(defstate idle (village-cam)
:virtual #t
@ -627,7 +630,7 @@
(let ((a0-70 (-> self entity extra perm)))
(when (= (-> a0-70 user-uint8 0) 1)
(remove-setting! 'allow-progress)
(let ((gp-3 (current-time))) (until (time-elapsed? gp-3 (seconds 300)) (suspend)))
(suspend-for (seconds 300))
(go-virtual idle))))
(process-entity-status! self (entity-perm-status bit-3) #f)
(process-entity-status! self (entity-perm-status dead) #t)

View File

@ -121,7 +121,7 @@
(defmethod play-communicator-speech! ((this talker-speech-class))
"Plays the provided [[talker-speech-class]]
@TODO - understand the array from [[game-info]] better"
@TODO - understand the array from [[game-info]] better"
(set! (-> *game-info* unknown-pad6 (+ (* (-> this speech) 2) 1)) (the-as uint #xffff))
0
(none)
@ -258,6 +258,7 @@
)
(defmethod deactivate ((this talker))
"Make a process dead, clean it up, remove it from the active pool, and return to dead pool."
(send-event (handle->process (-> this voicebox)) 'die)
(call-parent-method this)
(none)
@ -346,11 +347,7 @@
(defstate idle (talker)
:virtual #t
:code (behavior ()
(let ((gp-0 (current-time)))
(until (time-elapsed? gp-0 (the-as time-frame (-> self message delay)))
(suspend)
)
)
(suspend-for (the-as time-frame (-> self message delay)))
(case (-> self message channel)
(((gui-channel voicebox))
(if *target*
@ -477,7 +474,10 @@
(and (nonzero? (-> self message-id))
(= (get-status *gui-control* (-> self message-id)) (gui-status active))
(or (not (time-elapsed? (-> self state-time) (the-as time-frame (-> self message text-duration))))
(and (logtest? (-> self message flags) 16) (-> self region) (point-in-region-debug! (-> self region) (target-pos 0)))
(and (logtest? (-> self message flags) 16)
(-> self region)
(point-in-region-debug! (-> self region) (target-pos 0))
)
)
)
(not (time-elapsed? (-> self state-time) (seconds 0.05)))
@ -512,11 +512,7 @@
)
)
(when (and (logtest? (-> self message flags) 8) (not (-> self save?)))
(let ((gp-2 (current-time)))
(until (time-elapsed? gp-2 (seconds 1))
(suspend)
)
)
(suspend-for (seconds 1))
(set! (-> self save?) #t)
(auto-save-user)
)

View File

@ -841,11 +841,7 @@
)
)
(when (not arg0)
(let ((s5-1 (current-time)))
(until (time-elapsed? s5-1 (seconds 0.04))
(suspend)
)
)
(suspend-for (seconds 0.04))
(logior! (-> self draw status) (draw-control-status no-draw))
(case (-> self look)
(('iron)
@ -996,17 +992,9 @@
(drop-pickup (-> self fact) #t *entity-pool* (the-as fact-info #f) arg1)
(process-entity-status! self (entity-perm-status dead) #t)
(process-entity-status! self (entity-perm-status subtask-complete) #t)
(let ((gp-1 (current-time)))
(until (time-elapsed? gp-1 (seconds 5))
(suspend)
)
)
(suspend-for (seconds 5))
(when (logtest? (actor-option cond-respawn) (-> self fact options))
(let ((gp-2 (current-time)))
(until (time-elapsed? gp-2 (seconds 15))
(suspend)
)
)
(suspend-for (seconds 15))
(go-virtual hide)
)
)
@ -1104,11 +1092,11 @@
(defmethod init-from-entity! ((this crate) (arg0 entity-actor))
"Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that.
This commonly includes things such as:
- stack size
- collision information
- loading the skeleton group / bones
- sounds"
This commonly includes things such as:
- stack size
- collision information
- loading the skeleton group / bones
- sounds"
(crate-init! this arg0)
(skel-init! this)
(crate-method-38 this)

View File

@ -229,12 +229,7 @@
(move-along-path self)
(suspend)
)
(let ((gp-1 (current-time)))
(until (time-elapsed? gp-1 (seconds 0.5))
(move-along-path self)
(suspend)
)
)
(suspend-for (seconds 0.5) (move-along-path self))
(go-virtual idle)
)
)
@ -242,11 +237,11 @@
;; WARN: Return type mismatch object vs none.
(defmethod init-from-entity! ((this swingpole) (arg0 entity-actor))
"Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that.
This commonly includes things such as:
- stack size
- collision information
- loading the skeleton group / bones
- sounds"
This commonly includes things such as:
- stack size
- collision information
- loading the skeleton group / bones
- sounds"
"Copy defaults from the entity."
(stack-size-set! (-> this main-thread) 128)
(let ((s4-0 (new 'process 'collide-shape this (collide-list-enum hit-by-player))))
@ -339,11 +334,11 @@ This commonly includes things such as:
;; WARN: Return type mismatch object vs none.
(defmethod init-from-entity! ((this process-hidden) (arg0 entity-actor))
"Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that.
This commonly includes things such as:
- stack size
- collision information
- loading the skeleton group / bones
- sounds"
This commonly includes things such as:
- stack size
- collision information
- loading the skeleton group / bones
- sounds"
"Copy defaults from the entity."
(process-entity-status! this (entity-perm-status dead) #t)
(go (method-of-object this die))
@ -1020,6 +1015,7 @@ This commonly includes things such as:
)
(defmethod deactivate ((this part-tracker))
"Make a process dead, clean it up, remove it from the active pool, and return to dead pool."
(if (nonzero? (-> this part))
(kill-and-free-particles (-> this part))
)
@ -1091,28 +1087,26 @@ This commonly includes things such as:
)
(suspend)
)
(let ((gp-1 (current-time)))
(until (time-elapsed? gp-1 (the-as time-frame (-> self linger-duration)))
(if (-> self linger-callback)
((-> self linger-callback) self)
)
(let* ((s5-0 (handle->process (-> self target)))
(v1-30 (if (type? s5-0 process-drawable)
s5-0
)
)
)
(if (and v1-30
(nonzero? (-> (the-as process-drawable v1-30) root))
(nonzero? (-> (the-as process-drawable v1-30) node-list))
)
(vector<-cspace!
(-> self root trans)
(-> (the-as process-drawable v1-30) node-list data (-> self target-joint))
)
)
(suspend-for
(the-as time-frame (-> self linger-duration))
(if (-> self linger-callback)
((-> self linger-callback) self)
)
(suspend)
(let* ((s5-0 (handle->process (-> self target)))
(v1-30 (if (type? s5-0 process-drawable)
s5-0
)
)
)
(if (and v1-30
(nonzero? (-> (the-as process-drawable v1-30) root))
(nonzero? (-> (the-as process-drawable v1-30) node-list))
)
(vector<-cspace!
(-> self root trans)
(-> (the-as process-drawable v1-30) node-list data (-> self target-joint))
)
)
)
)
(if (-> self linger-callback)
@ -1736,11 +1730,11 @@ This commonly includes things such as:
;; WARN: Return type mismatch object vs none.
(defmethod init-from-entity! ((this med-res-level) (arg0 entity-actor))
"Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that.
This commonly includes things such as:
- stack size
- collision information
- loading the skeleton group / bones
- sounds"
This commonly includes things such as:
- stack size
- collision information
- loading the skeleton group / bones
- sounds"
(stack-size-set! (-> this main-thread) 128)
(let ((s4-0 (res-lump-struct arg0 'art-name structure))
(s3-0 (res-lump-struct (-> this entity) 'level structure))
@ -1763,6 +1757,7 @@ This commonly includes things such as:
)
(defmethod deactivate ((this part-spawner))
"Make a process dead, clean it up, remove it from the active pool, and return to dead pool."
(if (nonzero? (-> this part))
(kill-and-free-particles (-> this part))
)
@ -1817,11 +1812,11 @@ This commonly includes things such as:
;; WARN: Return type mismatch object vs none.
(defmethod init-from-entity! ((this part-spawner) (arg0 entity-actor))
"Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that.
This commonly includes things such as:
- stack size
- collision information
- loading the skeleton group / bones
- sounds"
This commonly includes things such as:
- stack size
- collision information
- loading the skeleton group / bones
- sounds"
(local-vars (sv-16 string))
(stack-size-set! (-> this main-thread) 128)
(logior! (-> this mask) (process-mask ambient))
@ -2422,11 +2417,11 @@ This commonly includes things such as:
;; WARN: Return type mismatch object vs none.
(defmethod init-from-entity! ((this launcher) (arg0 entity-actor))
"Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that.
This commonly includes things such as:
- stack size
- collision information
- loading the skeleton group / bones
- sounds"
This commonly includes things such as:
- stack size
- collision information
- loading the skeleton group / bones
- sounds"
(stack-size-set! (-> this main-thread) 128)
(let ((s4-0 (new 'process 'collide-shape this (collide-list-enum hit-by-player))))
(let ((v1-4 (new 'process 'collide-shape-prim-sphere s4-0 (the-as uint 0))))

View File

@ -20,25 +20,23 @@
(let ((s1-1 (process->handle arg0))
(s2-1 (process->handle arg1))
)
(let ((s0-0 (current-time)))
(until (time-elapsed? s0-0 (+ arg3 arg4))
(let ((v1-8 (or (not (handle->process s1-1)) (not (handle->process s2-1)))))
(if v1-8
(deactivate self)
)
)
(let* ((f0-1 (fmax 0.0 (fmin 1.0 (/ (- (the float (- (current-time) s0-0)) (the float arg3)) (the float arg4)))))
(a0-18 (process-drawable-pair-random-point!
(the-as process-drawable (-> s1-1 process 0))
(the-as process-drawable (-> s2-1 process 0))
(new-stack-vector0)
f0-1
)
(suspend-for
(+ arg3 arg4)
(let ((v1-8 (or (not (handle->process s1-1)) (not (handle->process s2-1)))))
(if v1-8
(deactivate self)
)
)
(let* ((f0-1 (fmax 0.0 (fmin 1.0 (/ (- (the float (- (current-time) time)) (the float arg3)) (the float arg4)))))
(a0-18 (process-drawable-pair-random-point!
(the-as process-drawable (-> s1-1 process 0))
(the-as process-drawable (-> s2-1 process 0))
(new-stack-vector0)
f0-1
)
)
(arg2 a0-18)
)
(suspend)
)
)
(arg2 a0-18)
)
)
(cond
@ -49,12 +47,10 @@
#f
)
(else
(let ((s4-1 (current-time)))
(until (time-elapsed? s4-1 arg5)
(let ((a0-21 (process-drawable-random-point! (the-as process-drawable (-> s2-1 process 0)) (new-stack-vector0))))
(arg2 a0-21)
)
(suspend)
(suspend-for
arg5
(let ((a0-21 (process-drawable-random-point! (the-as process-drawable (-> s2-1 process 0)) (new-stack-vector0))))
(arg2 a0-21)
)
)
)

View File

@ -1481,6 +1481,7 @@
(defmethod run-logic? ((this fail-mission))
"Should this process be run? Checked by execute-process-tree."
#t
)
@ -1676,6 +1677,7 @@
)
(defmethod deactivate ((this fail-mission))
"Make a process dead, clean it up, remove it from the active pool, and return to dead pool."
(set-filter-color! 1.0 1.0 1.0)
(sound-group-continue (sound-group sfx music dialog sog3 ambient dialog2 sog6 sog7))
(update-rates! (-> *display* bg-clock) 1.0)
@ -1713,27 +1715,25 @@
)
:code (behavior ()
(local-vars (a1-10 string))
(let ((gp-0 (current-time)))
(until (time-elapsed? gp-0 (seconds 1))
(let ((f30-0 (lerp-scale 1.0 0.0 (the float (- (current-time) gp-0)) 0.0 270.0)))
(when *sound-player-enable*
(let ((v1-6 (the-as sound-rpc-set-param (get-sound-buffer-entry))))
(set! (-> v1-6 command) (sound-command set-param))
(set! (-> v1-6 id) (-> self stinger))
(set! (-> v1-6 params volume) (the int (* 1024.0 f30-0)))
(set! (-> v1-6 params mask) (the-as uint 1))
(-> v1-6 id)
)
(suspend-for
(seconds 1)
(let ((f30-0 (lerp-scale 1.0 0.0 (the float (- (current-time) time)) 0.0 270.0)))
(when *sound-player-enable*
(let ((v1-6 (the-as sound-rpc-set-param (get-sound-buffer-entry))))
(set! (-> v1-6 command) (sound-command set-param))
(set! (-> v1-6 id) (-> self stinger))
(set! (-> v1-6 params volume) (the int (* 1024.0 f30-0)))
(set! (-> v1-6 params mask) (the-as uint 1))
(-> v1-6 id)
)
)
(let ((f30-1 (lerp-scale 1.0 0.0 (the float (- (current-time) gp-0)) 0.0 300.0)))
(set-filter-color!
(lerp-scale 1.0 1.25 f30-1 0.0 1.0)
(lerp-scale 1.0 0.875 f30-1 0.0 1.0)
(lerp-scale 1.0 0.25 f30-1 0.0 1.0)
)
)
(let ((f30-1 (lerp-scale 1.0 0.0 (the float (- (current-time) time)) 0.0 300.0)))
(set-filter-color!
(lerp-scale 1.0 1.25 f30-1 0.0 1.0)
(lerp-scale 1.0 0.875 f30-1 0.0 1.0)
(lerp-scale 1.0 0.25 f30-1 0.0 1.0)
)
(suspend)
)
)
(case (-> self message)
@ -1866,15 +1866,16 @@
)
;; WARN: Return type mismatch process vs task-manager.
(defmethod relocate ((this task-manager) (arg0 int))
(defmethod relocate ((this task-manager) (offset int))
(if (nonzero? (-> this link))
(+! (-> this link) arg0)
(+! (-> this link) offset)
)
(the-as task-manager ((method-of-type process relocate) this arg0))
(the-as task-manager ((method-of-type process relocate) this offset))
)
(defbehavior task-manager-init-by-other task-manager ((arg0 game-task-node-info) (arg1 symbol))
(stack-size-set! (-> self main-thread) 3072) ;; increased from 1024
;; og:preserve-this increased from 1024
(stack-size-set! (-> self main-thread) 3072)
(add-connection *task-manager-engine* self nothing self arg0 #f)
(set! (-> self node-info) arg0)
(set! (-> self lev-name) arg1)
@ -1951,6 +1952,7 @@
)
(defmethod deactivate ((this task-manager))
"Make a process dead, clean it up, remove it from the active pool, and return to dead pool."
(with-pp
(let ((s5-0 pp))
(set! pp this)

View File

@ -8,17 +8,17 @@
;; DECOMP BEGINS
;; WARN: Return type mismatch process-focusable vs process-taskable.
(defmethod relocate ((this process-taskable) (arg0 int))
(defmethod relocate ((this process-taskable) (offset int))
(if (nonzero? (-> this task))
(&+! (-> this task) arg0)
(&+! (-> this task) offset)
)
(the-as process-taskable ((method-of-type process-focusable relocate) this arg0))
(the-as process-taskable ((method-of-type process-focusable relocate) this offset))
)
(defbehavior process-taskable-anim-loop process-taskable ((arg0 (function process-taskable object)))
"Takes in a function and loops as long as it's return value is truthy
Seen take in - `true-func` which takes no args TODO - seems fishy
- a `(process-taskable process) lambda"
Seen take in - `true-func` which takes no args TODO - seems fishy
- a `(process-taskable process) lambda"
(while (arg0 self)
(let ((s5-0 (get-art-elem self)))
(when (!= (ja-group) s5-0)
@ -43,7 +43,7 @@ Seen take in - `true-func` which takes no args TODO - seems fishy
;; WARN: Return type mismatch art-joint-anim vs art-element.
(defmethod get-art-elem ((this process-taskable))
"Checks various things such the current actor, task status, etc to determine the right art-group data to use
@returns the appropriate [[art-element]] for the given NPC"
@returns the appropriate [[art-element]] for the given NPC"
(the-as art-element (if (> (-> this skel active-channels) 0)
(-> this skel root-channel 0 frame-group)
)
@ -329,11 +329,7 @@ Seen take in - `true-func` which takes no args TODO - seems fishy
:enter (-> (method-of-type process-taskable active) enter)
:exit (-> (method-of-type process-taskable active) exit)
:code (behavior ((arg0 game-task-event))
(let ((gp-0 (current-time)))
(until (time-elapsed? gp-0 (seconds 0.5))
(suspend)
)
)
(suspend-for (seconds 0.5))
(go-virtual hide)
)
:post (-> (method-of-type process-taskable idle) post)
@ -418,11 +414,11 @@ Seen take in - `true-func` which takes no args TODO - seems fishy
;; WARN: Return type mismatch object vs none.
(defmethod init-from-entity! ((this process-taskable) (arg0 entity-actor))
"Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that.
This commonly includes things such as:
- stack size
- collision information
- loading the skeleton group / bones
- sounds"
This commonly includes things such as:
- stack size
- collision information
- loading the skeleton group / bones
- sounds"
(stack-size-set! (-> this main-thread) 512)
(process-taskable-method-31 this)
(process-drawable-from-entity! this arg0)

View File

@ -2973,11 +2973,7 @@
(let ((s4-1 (new-stack-vector0)))
(set! (-> s4-1 quad) (-> self control last-trans-on-ground quad))
(ja-channel-set! 0)
(let ((s3-1 (current-time)))
(until (time-elapsed? s3-1 (seconds 1))
(suspend)
)
)
(suspend-for (seconds 1))
(move-to-point! (-> self control) s4-1)
)
(set! (-> self control camera-pos quad) (-> self control trans quad))

View File

@ -642,15 +642,19 @@
(set! (-> gp-1 penetrate-using) (penetrate explode))
(explosion-spawn (the-as process-drawable *default-pool*) explosion gp-1)
)
;; og:preserve-this stack array -> pointer
(let (;(s3-0 (the-as (array collide-shape) (new 'stack 'array collide-shape 16)))
(s3-0 (the-as (pointer collide-shape) (new 'stack-no-clear 'array 'collide-shape 16)))
(let ((s3-0 (the-as (array collide-shape) ((method-of-type array new)
(the-as symbol (new 'stack-no-clear 'array 'collide-shape 16))
array
collide-shape
16
)
)
)
(a1-8 (new 'stack-no-clear 'sphere))
)
(set! (-> a1-8 quad) (-> self root trans quad))
(set! (-> a1-8 r) (-> self blast-radius))
;; og:preserve-this stack array -> pointer
(let ((gp-2 (fill-actor-list-for-sphere *actor-hash* a1-8 s3-0 16)))
(let ((gp-2 (fill-actor-list-for-sphere *actor-hash* a1-8 (-> s3-0 data) (-> s3-0 allocated-length))))
(let ((s1-0 (the-as process-drawable #f))
(f30-0 4096000.0)
(s4-0 0)
@ -816,11 +820,7 @@
(-> self result-array (+ gp-2 -1))
:to s4-1
)
(let ((s4-2 (current-time)))
(until (time-elapsed? s4-2 (seconds 0.1))
(suspend)
)
)
(suspend-for (seconds 0.1))
)
)
)

View File

@ -1002,11 +1002,7 @@
(let ((s4-1 (new-stack-vector0)))
(set! (-> s4-1 quad) (-> self control last-trans-on-ground quad))
(ja-channel-set! 0)
(let ((s3-1 (current-time)))
(until (time-elapsed? s3-1 (seconds 1))
(suspend)
)
)
(suspend-for (seconds 1))
(move-to-point! (-> self control) s4-1)
)
(set! (-> self control camera-pos quad) (-> self control trans quad))
@ -1141,12 +1137,7 @@
)
(ja-channel-push! 1 (seconds 0.3))
(ja-no-eval :group! jakb-mech-jump-loop-ja :num! (loop! 0.5) :frame-num 0.0)
(let ((gp-3 (current-time)))
(until (time-elapsed? gp-3 (seconds 0.8))
(ja :group! jakb-mech-jump-loop-ja :num! (loop! 0.5))
(suspend)
)
)
(suspend-for (seconds 0.8) (ja :group! jakb-mech-jump-loop-ja :num! (loop! 0.5)))
(remove-setting! 'mode-name)
)
(else
@ -1266,11 +1257,7 @@
(suspend)
(ja :num! (seek!))
)
(let ((gp-9 (current-time)))
(until (time-elapsed? gp-9 (seconds 2))
(suspend)
)
)
(suspend-for (seconds 2))
)
)
(set! (-> self control transv quad) (the-as uint128 0))

View File

@ -237,12 +237,7 @@
(mech-method-24 self)
(suspend)
)
(let ((s5-0 (current-time)))
(until (time-elapsed? s5-0 (seconds 1))
(mech-method-24 self)
(suspend)
)
)
(suspend-for (seconds 1) (mech-method-24 self))
(go arg0)
)
)
@ -351,11 +346,11 @@
(defmethod init-from-entity! ((this mech) (arg0 entity-actor))
"Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that.
This commonly includes things such as:
- stack size
- collision information
- loading the skeleton group / bones
- sounds"
This commonly includes things such as:
- stack size
- collision information
- loading the skeleton group / bones
- sounds"
(mech-init arg0 (the-as matrix3 #f) (the-as handle #f) 100.0)
(none)
)

View File

@ -310,11 +310,7 @@
)
)
)
(let ((s5-6 (current-time)))
(until (time-elapsed? s5-6 (seconds 0.05))
(suspend)
)
)
(suspend-for (seconds 0.05))
)
((logtest? (-> arg0 flags) (continue-flags title))
(go target-title #t)
@ -337,11 +333,7 @@
(intro-play)
)
((logtest? (-> arg0 flags) (continue-flags warp-gate))
(let ((s5-7 (current-time)))
(until (time-elapsed? s5-7 (seconds 0.05))
(suspend)
)
)
(suspend-for (seconds 0.05))
(let ((s5-8 (new 'static 'vector))
(a2-26 (find-nearest-entity (-> arg0 trans) warp-gate))
)
@ -370,11 +362,7 @@
(go target-grab 'stance)
)
(else
(let ((s5-9 (current-time)))
(until (time-elapsed? s5-9 (seconds 0.05))
(suspend)
)
)
(suspend-for (seconds 0.05))
)
)
(let* ((a0-122 *game-info*)
@ -1025,11 +1013,7 @@
(let ((gp-1 (new-stack-vector0)))
(set! (-> gp-1 quad) (-> self control last-trans-on-ground quad))
(ja-channel-set! 0)
(let ((s5-1 (current-time)))
(until (time-elapsed? s5-1 (seconds 1))
(suspend)
)
)
(suspend-for (seconds 1))
(move-to-point! (-> self control) gp-1)
)
(set! (-> self control camera-pos quad) (-> self control trans quad))
@ -1644,11 +1628,7 @@
(set! (-> self post-hook) target-no-ja-move-post)
(ja-channel-set! 0)
(ja-post)
(let ((s5-3 (current-time)))
(until (time-elapsed? s5-3 (seconds 2))
(suspend)
)
)
(suspend-for (seconds 2))
(b! #t cfg-131 :delay (nop!))
(label cfg-79)
(b! (not (or (= v1-63 'grenade) (= v1-63 'big-explosion) (= v1-63 'explode))) cfg-122 :delay (empty-form))
@ -1759,11 +1739,7 @@
(suspend)
(ja :num! (seek!))
)
(let ((s5-7 (current-time)))
(until (time-elapsed? s5-7 (seconds 2))
(suspend)
)
)
(suspend-for (seconds 2))
)
(b! #t cfg-131 :delay (nop!))
(label cfg-122)
@ -1812,11 +1788,7 @@
(set! (-> self post-hook) target-no-ja-move-post)
(ja-channel-set! 0)
(ja-post)
(let ((s5-10 (current-time)))
(until (time-elapsed? s5-10 (seconds 2))
(suspend)
)
)
(suspend-for (seconds 2))
)
)
(label cfg-131)
@ -1832,11 +1804,7 @@
(set! (-> self post-hook) target-no-ja-move-post)
(ja-channel-set! 0)
(ja-post)
(let ((s5-11 (current-time)))
(until (time-elapsed? s5-11 (seconds 1.2))
(suspend)
)
)
(suspend-for (seconds 1.2))
)
((= v1-50 'endlessfall)
((lambda :behavior target
@ -1874,38 +1842,36 @@
(target-falling-anim 30 (seconds 0.33))
(ja-channel-push! 1 (seconds 0.3))
(ja-no-eval :group! jakb-launch-jump-loop-ja :num! (loop! 0.5) :frame-num 0.0)
(let ((gp-1 (current-time)))
(until (time-elapsed? gp-1 (seconds 0.8))
(when (and (logtest? (-> self control status) (collide-status on-surface)) (!= (-> self control cur-pat event) 2))
(set! v1-24 'target-hit-ground-hard)
(goto cfg-17)
)
(vector-seek! (-> self draw color-mult) *zero-vector* (seconds-per-frame))
(let ((v1-49 (new-stack-vector0))
(f0-7 (the-as number (vector-dot (-> self control dynam gravity-normal) (-> self control transv))))
)
0.0
(vector-!
v1-49
(-> self control transv)
(vector-float*! v1-49 (-> self control dynam gravity-normal) (the-as float f0-7))
)
(let* ((f1-7 (vector-length v1-49))
(f2-2 f1-7)
)
(if (< (the-as float (-> self control unknown-word04)) (the-as float f0-7))
(set! f0-7 (-> self control unknown-word04))
)
(vector+!
(-> self control transv)
(vector-float*! (-> self control transv) (-> self control dynam gravity-normal) (the-as float f0-7))
(vector-float*! v1-49 v1-49 (/ f1-7 f2-2))
)
)
)
(ja :group! jakb-launch-jump-loop-ja :num! (loop! 0.5))
(suspend)
(suspend-for
(seconds 0.8)
(when (and (logtest? (-> self control status) (collide-status on-surface)) (!= (-> self control cur-pat event) 2))
(set! v1-24 'target-hit-ground-hard)
(goto cfg-17)
)
(vector-seek! (-> self draw color-mult) *zero-vector* (seconds-per-frame))
(let ((v1-49 (new-stack-vector0))
(f0-7 (the-as number (vector-dot (-> self control dynam gravity-normal) (-> self control transv))))
)
0.0
(vector-!
v1-49
(-> self control transv)
(vector-float*! v1-49 (-> self control dynam gravity-normal) (the-as float f0-7))
)
(let* ((f1-7 (vector-length v1-49))
(f2-2 f1-7)
)
(if (< (the-as float (-> self control unknown-word04)) (the-as float f0-7))
(set! f0-7 (-> self control unknown-word04))
)
(vector+!
(-> self control transv)
(vector-float*! (-> self control transv) (-> self control dynam gravity-normal) (the-as float f0-7))
(vector-float*! v1-49 v1-49 (/ f1-7 f2-2))
)
)
)
(ja :group! jakb-launch-jump-loop-ja :num! (loop! 0.5))
)
(set! v1-24 #f)
(label cfg-17)
@ -1920,11 +1886,7 @@
(suspend)
(ja :num! (seek!))
)
(let ((gp-2 (current-time)))
(until (time-elapsed? gp-2 (seconds 2))
(suspend)
)
)
(suspend-for (seconds 2))
)
(remove-setting! 'mode-name)
(none)
@ -2013,11 +1975,7 @@
(suspend)
(ja :num! (seek!))
)
(let ((s5-13 (current-time)))
(until (time-elapsed? s5-13 (seconds 2))
(suspend)
)
)
(suspend-for (seconds 2))
)
((= v1-50 'centipede)
(set! (-> self trans-hook) #f)

View File

@ -714,13 +714,13 @@
;; WARN: Return type mismatch process-drawable vs base-turret.
(defmethod relocate ((this base-turret) (arg0 int))
(defmethod relocate ((this base-turret) (offset int))
(countdown (v1-0 4)
(if (-> this gun-recoil-jmod v1-0)
(&+! (-> this gun-recoil-jmod v1-0) arg0)
(&+! (-> this gun-recoil-jmod v1-0) offset)
)
)
(the-as base-turret ((method-of-type process-drawable relocate) this arg0))
(the-as base-turret ((method-of-type process-drawable relocate) this offset))
)
(defmethod base-turret-method-34 ((this base-turret) (arg0 process))
@ -1457,11 +1457,7 @@
(sound-stop (-> self sound-id 1))
(sound-stop (-> self sound-id 2))
(set! (-> self focus-status) (focus-status disable ignore inactive))
(let ((gp-0 (current-time)))
(until (time-elapsed? gp-0 (seconds 0.8))
(suspend)
)
)
(suspend-for (seconds 0.8))
(send-event
(handle->process (-> self rider))
'attack
@ -1979,6 +1975,7 @@
)
(defmethod deactivate ((this base-turret))
"Make a process dead, clean it up, remove it from the active pool, and return to dead pool."
(if (valid? (-> this hud) (the-as type #f) "" #t 0)
(send-event (handle->process (-> this hud)) 'hide-and-die)
)
@ -1992,11 +1989,11 @@
;; WARN: Return type mismatch object vs none.
(defmethod init-from-entity! ((this base-turret) (arg0 entity-actor))
"Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that.
This commonly includes things such as:
- stack size
- collision information
- loading the skeleton group / bones
- sounds"
This commonly includes things such as:
- stack size
- collision information
- loading the skeleton group / bones
- sounds"
(turret-init! this arg0 (the-as matrix #f))
(go (method-of-object this idle))
(none)

View File

@ -50,13 +50,7 @@
(suspend)
(ja :num! (seek!))
)
(let ((gp-0 (current-time)))
(until (time-elapsed? gp-0 (seconds 0.3))
(suspend)
(ja :num! (seek! (ja-aframe 19.0 0) 0.05))
(suspend)
)
)
(suspend-for (seconds 0.3) (suspend) (ja :num! (seek! (ja-aframe 19.0 0) 0.05)))
(ja-channel-push! 1 (seconds 0.3))
(ja-no-eval :group! jakb-painful-land-ja :num! (seek!) :frame-num (ja-aframe 40.0 0))
(until (ja-done? 0)
@ -1202,12 +1196,7 @@
(until #f
(let ((s5-0 (rand-vu-int-range 30 600)))
(ja :group! jakb-wall-hide-head-ja)
(let ((s4-0 (current-time)))
(until (time-elapsed? s4-0 s5-0)
(gp-0)
(suspend)
)
)
(suspend-for s5-0 (gp-0))
)
(let ((f30-0 (rand-vu-float-range 0.5 1.5)))
(cond
@ -1244,13 +1233,8 @@
(suspend)
(ja :num! (seek! max f30-0))
)
(let ((s5-2 (rand-vu-int-range 60 300))
(s4-2 (current-time))
)
(until (time-elapsed? s4-2 s5-2)
(gp-0)
(suspend)
)
(let ((s5-2 (rand-vu-int-range 60 300)))
(suspend-for s5-2 (gp-0))
)
(ja-no-eval :group! jakb-wall-hide-head-left-ja :num! (seek! 0.0 f30-0) :frame-num max)
(until (ja-done? 0)
@ -1266,13 +1250,8 @@
(suspend)
(ja :num! (seek! 0.0 f30-0))
)
(let ((s5-3 (rand-vu-int-range 60 300))
(s4-3 (current-time))
)
(until (time-elapsed? s4-3 s5-3)
(gp-0)
(suspend)
)
(let ((s5-3 (rand-vu-int-range 60 300)))
(suspend-for s5-3 (gp-0))
)
(ja-no-eval :group! jakb-wall-hide-head-right-ja :num! (seek! max f30-0) :frame-num 0.0)
(until (ja-done? 0)

View File

@ -724,3 +724,6 @@
(defmacro time-elapsed? (time duration)
`(>= (- (current-time) ,time) ,duration)
)
(defmacro suspend-for (time &rest body)
`(let ((time (current-time))) (until (time-elapsed? time ,time) ,@body (suspend))))

View File

@ -252,6 +252,12 @@ It type checks the arguments for the entry function.
)
)
(defmacro call-parent-state-handler (handler &key (type (function none)) &rest args)
"Call the parent handler for this state."
`(let ((handler (-> (find-parent-state) ,handler)))
(if handler ((the ,type handler) ,@args))
)
)
(defmacro behavior (bindings &rest body)
"Define an anonymous behavior for a process state. This may only be used inside a defstate!"

View File

@ -112,6 +112,7 @@
)
(defmethod deactivate ((this piston))
"Make a process dead, clean it up, remove it from the active pool, and return to dead pool."
(sound-stop (-> this looping-id))
((method-of-type process-focusable deactivate) this)
(none)
@ -120,11 +121,11 @@
;; WARN: Return type mismatch object vs none.
(defmethod init-from-entity! ((this piston) (arg0 entity-actor))
"Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that.
This commonly includes things such as:
- stack size
- collision information
- loading the skeleton group / bones
- sounds"
This commonly includes things such as:
- stack size
- collision information
- loading the skeleton group / bones
- sounds"
(local-vars (sv-64 res-tag))
(let ((s4-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player))))
(let ((s3-0 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 0) (the-as uint 0))))
@ -281,11 +282,11 @@ This commonly includes things such as:
;; WARN: Return type mismatch object vs none.
(defmethod init-from-entity! ((this turbine) (arg0 entity-actor))
"Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that.
This commonly includes things such as:
- stack size
- collision information
- loading the skeleton group / bones
- sounds"
This commonly includes things such as:
- stack size
- collision information
- loading the skeleton group / bones
- sounds"
(local-vars (sv-16 res-tag) (sv-32 res-tag))
(let ((s4-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player))))
(let ((s3-0 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 0) (the-as uint 0))))
@ -433,11 +434,11 @@ This commonly includes things such as:
;; WARN: Return type mismatch object vs none.
(defmethod init-from-entity! ((this liftcat) (arg0 entity-actor))
"Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that.
This commonly includes things such as:
- stack size
- collision information
- loading the skeleton group / bones
- sounds"
This commonly includes things such as:
- stack size
- collision information
- loading the skeleton group / bones
- sounds"
(local-vars (sv-16 res-tag) (sv-32 res-tag))
(let ((s4-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player))))
(let ((s3-0 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 0) (the-as uint 0))))
@ -556,42 +557,24 @@ This commonly includes things such as:
)
)
:code (behavior ()
(let ((gp-0 (current-time)))
(until (time-elapsed? gp-0 (the int (-> self cycle-offset)))
(suspend)
)
)
(suspend-for (the int (-> self cycle-offset)))
(until #f
(let ((gp-1 (current-time)))
(until (time-elapsed? gp-1 (the int (-> self cycle-time)))
(suspend)
)
)
(suspend-for (the int (-> self cycle-time)))
(activate! (-> self smush) -1.0 60 225 1.0 1.0 (-> self clock))
(sound-play "rot-pipe-wiggle" :position (-> self root trans))
(let ((gp-3 (current-time)))
(until (time-elapsed? gp-3 (seconds 0.75))
(set! (-> self shudder-angle) (* 364.0889 (update! (-> self smush))))
(suspend)
)
)
(suspend-for (seconds 0.75) (set! (-> self shudder-angle) (* 364.0889 (update! (-> self smush)))))
(set! (-> self shudder-angle) 0.0)
(set-zero! (-> self smush))
(let ((gp-4 (current-time)))
(until (time-elapsed? gp-4 (seconds 0.25))
(suspend)
)
)
(suspend-for (seconds 0.25))
(sound-play "rot-pipe-turn" :position (-> self root trans))
(let* ((f0-7 2.0)
(f30-1 (* 16384.0 f0-7))
(gp-6 (current-time))
)
(until (time-elapsed? gp-6 (seconds 0.5))
(suspend-for
(seconds 0.5)
(set! (-> self rot-angle)
(the float (sar (shl (the int (+ (-> self rot-angle) (* f30-1 (seconds-per-frame)))) 48) 48))
)
(suspend)
)
)
(let ((v1-42 #x4000))
@ -615,11 +598,11 @@ This commonly includes things such as:
;; WARN: Return type mismatch object vs none.
(defmethod init-from-entity! ((this atollrotpipe) (arg0 entity-actor))
"Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that.
This commonly includes things such as:
- stack size
- collision information
- loading the skeleton group / bones
- sounds"
This commonly includes things such as:
- stack size
- collision information
- loading the skeleton group / bones
- sounds"
(local-vars (sv-16 res-tag))
(let ((s4-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player))))
(let ((s3-0 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 0) (the-as uint 0))))
@ -780,32 +763,34 @@ This commonly includes things such as:
)
(defmethod run-logic? ((this slider))
"Should this process be run? Checked by execute-process-tree."
#t
)
(defmethod deactivate ((this slider))
"Make a process dead, clean it up, remove it from the active pool, and return to dead pool."
(sound-stop (the-as sound-id (-> this sound-id)))
(call-parent-method this)
(none)
)
(defmethod relocate ((this slider) (arg0 int))
(defmethod relocate ((this slider) (offset int))
(dotimes (v1-0 4)
(if (nonzero? (-> this l-bolts v1-0))
(&+! (-> this l-bolts v1-0) arg0)
(&+! (-> this l-bolts v1-0) offset)
)
)
(call-parent-method this arg0)
(call-parent-method this offset)
)
;; WARN: Return type mismatch object vs none.
(defmethod init-from-entity! ((this slider) (arg0 entity-actor))
"Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that.
This commonly includes things such as:
- stack size
- collision information
- loading the skeleton group / bones
- sounds"
This commonly includes things such as:
- stack size
- collision information
- loading the skeleton group / bones
- sounds"
(let ((s4-0 (new 'process 'collide-shape this (collide-list-enum hit-by-player))))
(let ((v1-2 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 0) (the-as uint 0))))
(set! (-> v1-2 prim-core collide-as) (collide-spec obstacle))
@ -963,11 +948,11 @@ This commonly includes things such as:
;; WARN: Return type mismatch object vs none.
(defmethod init-from-entity! ((this atoll-windmill) (arg0 entity-actor))
"Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that.
This commonly includes things such as:
- stack size
- collision information
- loading the skeleton group / bones
- sounds"
This commonly includes things such as:
- stack size
- collision information
- loading the skeleton group / bones
- sounds"
(logior! (-> this mask) (process-mask ambient))
(let ((a1-1 (new 'stack-no-clear 'sync-info-params)))
(let ((v1-2 0))
@ -1032,11 +1017,11 @@ This commonly includes things such as:
;; WARN: Return type mismatch object vs none.
(defmethod init-from-entity! ((this atoll-valve) (arg0 entity-actor))
"Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that.
This commonly includes things such as:
- stack size
- collision information
- loading the skeleton group / bones
- sounds"
This commonly includes things such as:
- stack size
- collision information
- loading the skeleton group / bones
- sounds"
(logior! (-> this mask) (process-mask ambient))
(set! (-> this root) (new 'process 'trsqv))
(process-drawable-from-entity! this arg0)
@ -1073,11 +1058,11 @@ This commonly includes things such as:
;; WARN: Return type mismatch object vs none.
(defmethod init-from-entity! ((this atoll-hatch) (arg0 entity-actor))
"Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that.
This commonly includes things such as:
- stack size
- collision information
- loading the skeleton group / bones
- sounds"
This commonly includes things such as:
- stack size
- collision information
- loading the skeleton group / bones
- sounds"
(logior! (-> this mask) (process-mask ambient))
(set! (-> this root) (new 'process 'trsqv))
(process-drawable-from-entity! this arg0)
@ -1140,11 +1125,11 @@ This commonly includes things such as:
;; WARN: Return type mismatch object vs none.
(defmethod init-from-entity! ((this atoll-hellcat) (arg0 entity-actor))
"Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that.
This commonly includes things such as:
- stack size
- collision information
- loading the skeleton group / bones
- sounds"
This commonly includes things such as:
- stack size
- collision information
- loading the skeleton group / bones
- sounds"
(let ((s4-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player))))
(let ((v1-2 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 0) (the-as uint 0))))
(set! (-> v1-2 prim-core collide-as) (collide-spec obstacle))
@ -1201,11 +1186,11 @@ This commonly includes things such as:
;; WARN: Return type mismatch object vs none.
(defmethod init-from-entity! ((this atoll-mar-symbol) (arg0 entity-actor))
"Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that.
This commonly includes things such as:
- stack size
- collision information
- loading the skeleton group / bones
- sounds"
This commonly includes things such as:
- stack size
- collision information
- loading the skeleton group / bones
- sounds"
(set! (-> this root) (new 'process 'trsqv))
(process-drawable-from-entity! this arg0)
(initialize-skeleton

View File

@ -334,13 +334,13 @@
)
;; WARN: Return type mismatch projectile vs juicer-shot.
(defmethod relocate ((this juicer-shot) (arg0 int))
(defmethod relocate ((this juicer-shot) (offset int))
(dotimes (v1-0 5)
(if (nonzero? (-> this lightning v1-0))
(&+! (-> this lightning v1-0) arg0)
(&+! (-> this lightning v1-0) offset)
)
)
(the-as juicer-shot ((method-of-type projectile relocate) this arg0))
(the-as juicer-shot ((method-of-type projectile relocate) this offset))
)
(defmethod init-proj-settings! ((this juicer-shot))
@ -679,9 +679,9 @@
(defmethod common-post ((this juicer))
"Does a lot of various things relating to interacting with the target
- tracks when the enemy was last drawn
- looks at the target and handles attacking
@TODO Not extremely well understood yet"
- tracks when the enemy was last drawn
- looks at the target and handles attacking
@TODO Not extremely well understood yet"
(let ((t9-0 (method-of-type nav-enemy common-post)))
(t9-0 this)
)
@ -713,7 +713,7 @@
(defmethod general-event-handler ((this juicer) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
"Handles various events for the enemy
@TODO - unsure if there is a pattern for the events and this should have a more specific name"
@TODO - unsure if there is a pattern for the events and this should have a more specific name"
(case arg2
(('hit-flinch)
(cond
@ -1275,57 +1275,56 @@
(s5-0 (+ (-> v1-29 attack-id) 1))
)
(set! (-> v1-29 attack-id) s5-0)
(let ((s4-0 (current-time)))
(until (time-elapsed? s4-0 (seconds 0.25))
(ja-no-eval :group! juicer-attack0-ja :num! (seek!) :frame-num 0.0)
(until (ja-done? 0)
(let ((s3-0 (handle->process (-> self focus handle))))
(when s3-0
(when (< 28672.0 (vector-vector-distance (-> self root trans) (get-trans (the-as process-focusable s3-0) 0)))
(fire-projectile self (the-as process-focusable s3-0) s5-0)
(current-time)
(if (not gp-0)
(set! gp-0 #t)
(suspend-for
(seconds 0.25)
(ja-no-eval :group! juicer-attack0-ja :num! (seek!) :frame-num 0.0)
(until (ja-done? 0)
(let ((s3-0 (handle->process (-> self focus handle))))
(when s3-0
(when (< 28672.0 (vector-vector-distance (-> self root trans) (get-trans (the-as process-focusable s3-0) 0)))
(fire-projectile self (the-as process-focusable s3-0) s5-0)
(current-time)
(if (not gp-0)
(set! gp-0 #t)
)
)
)
)
(if (and (logtest? (-> self enemy-flags) (enemy-flag victory)) (-> self enemy-info use-victory))
(go-virtual victory)
)
(b!
(not (and (-> self using-turn-anim) (let ((v1-73 (ja-group)))
(not (and v1-73 (= v1-73 juicer-attack-turn-ja)))
)
)
)
)
)
(if (and (logtest? (-> self enemy-flags) (enemy-flag victory)) (-> self enemy-info use-victory))
(go-virtual victory)
)
(b!
(not (and (-> self using-turn-anim) (let ((v1-73 (ja-group)))
(not (and v1-73 (= v1-73 juicer-attack-turn-ja)))
)
)
)
cfg-31
:delay (empty-form)
)
)
cfg-31
:delay (empty-form)
)
(ja-channel-push! 1 (seconds 0.05))
(ja :group! juicer-attack-turn-ja)
(b! #t cfg-42 :delay (nop!))
(label cfg-31)
(when (and (not (-> self using-turn-anim)) (let ((v1-84 (ja-group)))
(not (and v1-84 (= v1-84 juicer-attack0-ja)))
)
)
(ja-channel-push! 1 (seconds 0.05))
(ja :group! juicer-attack-turn-ja)
(b! #t cfg-42 :delay (nop!))
(label cfg-31)
(when (and (not (-> self using-turn-anim)) (let ((v1-84 (ja-group)))
(not (and v1-84 (= v1-84 juicer-attack0-ja)))
)
)
(ja-channel-push! 1 (seconds 0.05))
(ja :group! juicer-attack0-ja)
)
(label cfg-42)
(suspend)
(ja :num! (seek!))
)
(send-event (handle->process (-> self current-projectile)) 'die)
(let ((a0-37 (handle->process (-> self focus handle))))
(when a0-37
(if (>= 28672.0 (vector-vector-distance (-> self root trans) (get-trans (the-as process-focusable a0-37) 0)))
(go-virtual circling)
)
)
(ja :group! juicer-attack0-ja)
)
(label cfg-42)
(suspend)
(ja :num! (seek!))
)
(empty-form)
(send-event (handle->process (-> self current-projectile)) 'die)
(let ((a0-37 (handle->process (-> self focus handle))))
(when a0-37
(if (>= 28672.0 (vector-vector-distance (-> self root trans) (get-trans (the-as process-focusable a0-37) 0)))
(go-virtual circling)
)
)
)
)
)
@ -1730,14 +1729,14 @@
(none)
)
(defmethod relocate ((this juicer) (arg0 int))
(defmethod relocate ((this juicer) (offset int))
(if (nonzero? (-> this intro-path))
(&+! (-> this intro-path) arg0)
(&+! (-> this intro-path) offset)
)
(if (nonzero? (-> this joint))
(&+! (-> this joint) arg0)
(&+! (-> this joint) offset)
)
(call-parent-method this arg0)
(call-parent-method this offset)
)
(defmethod init-enemy! ((this juicer))

View File

@ -39,11 +39,11 @@
;; WARN: Return type mismatch object vs none.
(defmethod init-from-entity! ((this cas-conveyor) (arg0 entity-actor))
"Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that.
This commonly includes things such as:
- stack size
- collision information
- loading the skeleton group / bones
- sounds"
This commonly includes things such as:
- stack size
- collision information
- loading the skeleton group / bones
- sounds"
(local-vars (sv-16 res-tag))
(reset-root! this)
(set! (-> this path) (new 'process 'path-control this 'path 0.0 (the-as entity #f) #f))
@ -74,6 +74,7 @@ This commonly includes things such as:
)
(defmethod deactivate ((this cas-conveyor))
"Make a process dead, clean it up, remove it from the active pool, and return to dead pool."
(sound-stop (-> this sound-id))
(call-parent-method this)
(none)
@ -344,11 +345,11 @@ This commonly includes things such as:
;; WARN: Return type mismatch object vs none.
(defmethod init-from-entity! ((this cas-conveyor-switch) (arg0 entity-actor))
"Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that.
This commonly includes things such as:
- stack size
- collision information
- loading the skeleton group / bones
- sounds"
This commonly includes things such as:
- stack size
- collision information
- loading the skeleton group / bones
- sounds"
(local-vars (sv-16 res-tag))
(let ((s4-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player))))
(let ((v1-2 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 0) (the-as uint 0))))
@ -479,11 +480,7 @@ This commonly includes things such as:
(sound-play "lightning-node")
(suspend)
(logior! (-> self entity extra perm status) (entity-perm-status dead))
(let ((gp-2 (current-time)))
(until (time-elapsed? gp-2 (seconds 4))
(suspend)
)
)
(suspend-for (seconds 4))
(cleanup-for-death self)
)
)
@ -624,11 +621,11 @@ This commonly includes things such as:
;; WARN: Return type mismatch object vs none.
(defmethod init-from-entity! ((this cas-electric-fence) (arg0 entity-actor))
"Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that.
This commonly includes things such as:
- stack size
- collision information
- loading the skeleton group / bones
- sounds"
This commonly includes things such as:
- stack size
- collision information
- loading the skeleton group / bones
- sounds"
(let ((s4-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player))))
(let ((v1-2 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 0) (the-as uint 0))))
(set! (-> v1-2 prim-core collide-as) (collide-spec obstacle))
@ -803,10 +800,10 @@ This commonly includes things such as:
(defmethod move-between-points ((this cas-elevator) (arg0 vector) (arg1 float) (arg2 float))
"Move between two points on the elevator's path
@param vec TODO not sure
@param point-a The first point fetched from the elevator's path
@param point-b The second point fetched from the path
@see [[path-control]] and [[elevator]]"
@param vec TODO not sure
@param point-a The first point fetched from the elevator's path
@param point-b The second point fetched from the path
@see [[path-control]] and [[elevator]]"
(let ((s5-0 (get-point-in-path! (-> this path) (new 'stack-no-clear 'vector) arg1 'interp))
(a0-3 (get-point-in-path! (-> this path) (new 'stack-no-clear 'vector) arg2 'interp))
(v1-3 (-> this root trans))
@ -914,6 +911,7 @@ This commonly includes things such as:
)
(defmethod deactivate ((this cas-elevator))
"Make a process dead, clean it up, remove it from the active pool, and return to dead pool."
(sound-stop (-> this sound-id))
(call-parent-method this)
(none)
@ -921,7 +919,7 @@ This commonly includes things such as:
(defmethod init-plat! ((this cas-elevator))
"Does any necessary initial platform setup.
For example for an elevator pre-compute the distance between the first and last points (both ways) and clear the sound."
For example for an elevator pre-compute the distance between the first and last points (both ways) and clear the sound."
(set! (-> this sound-id) (new-sound-id))
(cas-elevator-method-49 this)
(none)
@ -1229,11 +1227,11 @@ For example for an elevator pre-compute the distance between the first and last
;; WARN: Return type mismatch object vs none.
(defmethod init-from-entity! ((this cas-rot-bridge) (arg0 entity-actor))
"Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that.
This commonly includes things such as:
- stack size
- collision information
- loading the skeleton group / bones
- sounds"
This commonly includes things such as:
- stack size
- collision information
- loading the skeleton group / bones
- sounds"
(let ((s4-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player))))
(let ((s3-0 (new 'process 'collide-shape-prim-group s4-0 (the-as uint 5) 0)))
(set! (-> s4-0 total-prims) (the-as uint 6))
@ -1456,11 +1454,11 @@ This commonly includes things such as:
;; WARN: Return type mismatch object vs none.
(defmethod init-from-entity! ((this cas-switch) (arg0 entity-actor))
"Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that.
This commonly includes things such as:
- stack size
- collision information
- loading the skeleton group / bones
- sounds"
This commonly includes things such as:
- stack size
- collision information
- loading the skeleton group / bones
- sounds"
(local-vars (sv-16 res-tag))
(let ((s4-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player))))
(let ((s3-0 (new 'process 'collide-shape-prim-group s4-0 (the-as uint 2) 0)))
@ -1649,11 +1647,7 @@ This commonly includes things such as:
(sound-play "trapdoor")
(suspend)
(ja-channel-set! 0)
(let ((gp-1 (current-time)))
(until (time-elapsed? gp-1 (seconds 1))
(suspend)
)
)
(suspend-for (seconds 1))
(send-event self 'death-end)
(while (-> self child)
(suspend)
@ -1666,11 +1660,11 @@ This commonly includes things such as:
;; WARN: Return type mismatch object vs none.
(defmethod init-from-entity! ((this cas-trapdoor) (arg0 entity-actor))
"Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that.
This commonly includes things such as:
- stack size
- collision information
- loading the skeleton group / bones
- sounds"
This commonly includes things such as:
- stack size
- collision information
- loading the skeleton group / bones
- sounds"
(let ((s4-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player))))
(let ((v1-2 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 0) (the-as uint 0))))
(set! (-> v1-2 prim-core collide-as) (collide-spec obstacle))
@ -1761,11 +1755,11 @@ This commonly includes things such as:
;; WARN: Return type mismatch object vs none.
(defmethod init-from-entity! ((this cas-chain-plat) (arg0 entity-actor))
"Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that.
This commonly includes things such as:
- stack size
- collision information
- loading the skeleton group / bones
- sounds"
This commonly includes things such as:
- stack size
- collision information
- loading the skeleton group / bones
- sounds"
(let ((s4-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player))))
(let ((v1-2 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 0) (the-as uint 0))))
(set! (-> v1-2 prim-core collide-as) (collide-spec obstacle))
@ -1875,11 +1869,11 @@ This commonly includes things such as:
;; WARN: Return type mismatch object vs none.
(defmethod init-from-entity! ((this cas-rot-blade) (arg0 entity-actor))
"Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that.
This commonly includes things such as:
- stack size
- collision information
- loading the skeleton group / bones
- sounds"
This commonly includes things such as:
- stack size
- collision information
- loading the skeleton group / bones
- sounds"
(let ((s4-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player))))
(let ((s3-0 (new 'process 'collide-shape-prim-group s4-0 (the-as uint 2) 0)))
(set! (-> s4-0 total-prims) (the-as uint 3))
@ -1946,6 +1940,7 @@ This commonly includes things such as:
)
(defmethod deactivate ((this cas-rot-blade))
"Make a process dead, clean it up, remove it from the active pool, and return to dead pool."
(sound-stop (-> this sound-id))
(call-parent-method this)
(none)
@ -1982,11 +1977,11 @@ This commonly includes things such as:
;; WARN: Return type mismatch object vs none.
(defmethod init-from-entity! ((this cas-flag-a) (arg0 entity-actor))
"Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that.
This commonly includes things such as:
- stack size
- collision information
- loading the skeleton group / bones
- sounds"
This commonly includes things such as:
- stack size
- collision information
- loading the skeleton group / bones
- sounds"
(set! (-> this root) (new 'process 'trsqv))
(process-drawable-from-entity! this arg0)
(initialize-skeleton
@ -2029,11 +2024,11 @@ This commonly includes things such as:
;; WARN: Return type mismatch object vs none.
(defmethod init-from-entity! ((this cas-flag-b) (arg0 entity-actor))
"Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that.
This commonly includes things such as:
- stack size
- collision information
- loading the skeleton group / bones
- sounds"
This commonly includes things such as:
- stack size
- collision information
- loading the skeleton group / bones
- sounds"
(set! (-> this root) (new 'process 'trsqv))
(process-drawable-from-entity! this arg0)
(initialize-skeleton
@ -2136,11 +2131,7 @@ This commonly includes things such as:
(suspend)
(ja :num! (seek!))
)
(let ((gp-1 (current-time)))
(until (time-elapsed? gp-1 (seconds 0.5))
(suspend)
)
)
(suspend-for (seconds 0.5))
(while (or (= (-> self spawn-total) -1) (< (-> self spawn-count-total) (-> self spawn-total)))
(when (and (< (-> self player-dist) (+ 81920.0 (-> self notice-dist)))
(and (< (-> self spawn-count) (-> self spawn-max))
@ -2176,18 +2167,10 @@ This commonly includes things such as:
)
)
)
(let ((gp-3 (current-time)))
(until (time-elapsed? gp-3 (the int (* 300.0 (rand-vu-float-range 0.5 1.0))))
(suspend)
)
)
(suspend-for (the int (* 300.0 (rand-vu-float-range 0.5 1.0))))
)
(while (> (-> self spawn-count) 0)
(let ((gp-4 (current-time)))
(until (time-elapsed? gp-4 (seconds 0.43))
(suspend)
)
)
(suspend-for (seconds 0.43))
)
(process-entity-status! self (entity-perm-status subtask-complete) #t)
(cond
@ -2205,11 +2188,7 @@ This commonly includes things such as:
(set-setting! 'entity-name a3-4 0.0 0)
)
)
(let ((gp-5 (current-time)))
(until (time-elapsed? gp-5 (seconds 2))
(suspend)
)
)
(suspend-for (seconds 2))
(dotimes (gp-6 (-> self actor-group 1 length))
(let ((a1-17 (new 'stack-no-clear 'event-message-block)))
(set! (-> a1-17 from) (process->ppointer self))
@ -2239,11 +2218,7 @@ This commonly includes things such as:
(set-setting! 'entity-name a3-6 0.0 0)
)
)
(let ((gp-7 (current-time)))
(until (time-elapsed? gp-7 (seconds 1))
(suspend)
)
)
(suspend-for (seconds 1))
(let ((gp-8 (-> self actor-group 0)))
(dotimes (s5-3 (-> gp-8 length))
(let ((a1-21 (new 'stack-no-clear 'event-message-block)))
@ -2273,11 +2248,7 @@ This commonly includes things such as:
(suspend)
(ja :num! (seek! 0.0))
)
(let ((gp-10 (current-time)))
(until (time-elapsed? gp-10 (seconds 1))
(suspend)
)
)
(suspend-for (seconds 1))
(remove-setting! 'entity-name)
(until (process-release? *target*)
(suspend)
@ -2313,11 +2284,7 @@ This commonly includes things such as:
(label cfg-14)
(not v1-28)
)
(let ((gp-1 (current-time)))
(until (time-elapsed? gp-1 (seconds 0.51))
(suspend)
)
)
(suspend-for (seconds 0.51))
)
(until (process-grab? *target* #f)
(suspend)
@ -2327,11 +2294,7 @@ This commonly includes things such as:
(set-setting! 'entity-name a3-2 0.0 0)
)
)
(let ((gp-2 (current-time)))
(until (time-elapsed? gp-2 (seconds 1))
(suspend)
)
)
(suspend-for (seconds 1))
(task-node-close! (game-task-node castle-break-in-resolution))
(let ((a1-7 (new 'stack-no-clear 'event-message-block)))
(set! (-> a1-7 from) (process->ppointer self))
@ -2367,11 +2330,7 @@ This commonly includes things such as:
)
)
)
(let ((gp-3 (current-time)))
(until (time-elapsed? gp-3 (seconds 2.5))
(suspend)
)
)
(suspend-for (seconds 2.5))
(remove-setting! 'entity-name)
(until (process-release? *target*)
(suspend)
@ -2383,11 +2342,11 @@ This commonly includes things such as:
;; WARN: Return type mismatch object vs none.
(defmethod init-from-entity! ((this cas-robot-door) (arg0 entity-actor))
"Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that.
This commonly includes things such as:
- stack size
- collision information
- loading the skeleton group / bones
- sounds"
This commonly includes things such as:
- stack size
- collision information
- loading the skeleton group / bones
- sounds"
;; og:preserve-this added
(stack-size-set! (-> this main-thread) 512)
(local-vars (sv-16 res-tag) (sv-32 res-tag))
@ -2535,11 +2494,11 @@ This commonly includes things such as:
;; WARN: Return type mismatch object vs none.
(defmethod init-from-entity! ((this lightning-ball) (arg0 entity-actor))
"Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that.
This commonly includes things such as:
- stack size
- collision information
- loading the skeleton group / bones
- sounds"
This commonly includes things such as:
- stack size
- collision information
- loading the skeleton group / bones
- sounds"
(let ((s4-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player))))
(let ((v1-2 (new 'process 'collide-shape-prim-sphere s4-0 (the-as uint 0))))
(set! (-> v1-2 prim-core collide-as) (collide-spec obstacle))

View File

@ -28,10 +28,10 @@
(defmethod move-between-points ((this cpad-elevator) (vec vector) (point-a float) (point-b float))
"Move between two points on the elevator's path
@param vec TODO not sure
@param point-a The first point fetched from the elevator's path
@param point-b The second point fetched from the path
@see [[path-control]] and [[elevator]]"
@param vec TODO not sure
@param point-a The first point fetched from the elevator's path
@param point-b The second point fetched from the path
@see [[path-control]] and [[elevator]]"
(let ((path-point-a (get-point-in-path! (-> this path) (new 'stack-no-clear 'vector) point-a 'interp))
(path-point-b (get-point-in-path! (-> this path) (new 'stack-no-clear 'vector) point-b 'interp))
(elevator-trans (-> this root trans))
@ -66,7 +66,7 @@
(defmethod configure-collision ((this cpad-elevator) (collide-with-jak? symbol))
"Appropriately sets the collision on the elevator
@param collide-with-jak? If set, the elevator will collide with Jak"
@param collide-with-jak? If set, the elevator will collide with Jak"
(let ((prim (-> (the-as collide-shape-prim-group (-> this root root-prim)) child 1)))
(cond
(collide-with-jak?
@ -106,11 +106,7 @@
)
)
:code (behavior ()
(let ((frame-counter (current-time)))
(until (time-elapsed? frame-counter (seconds 1))
(suspend)
)
)
(suspend-for (seconds 1))
(logior! (-> self elevator-status) (elevator-status waiting-to-ascend))
(until #f
(sound-play "dig-elevate" :id (-> self sound-id))
@ -147,6 +143,7 @@
)
(defmethod deactivate ((this cpad-elevator))
"Make a process dead, clean it up, remove it from the active pool, and return to dead pool."
(sound-stop (-> this sound-id))
(call-parent-method this)
(none)
@ -164,7 +161,7 @@
;; WARN: Return type mismatch sound-id vs none.
(defmethod init-plat! ((this cpad-elevator))
"Does any necessary initial platform setup.
For example for an elevator pre-compute the distance between the first and last points (both ways) and clear the sound."
For example for an elevator pre-compute the distance between the first and last points (both ways) and clear the sound."
(let ((last-path-index (+ (-> this path curve num-cverts) -1)))
(calc-dist-between-points! this 0 last-path-index)
(calc-dist-between-points! this last-path-index 0)

View File

@ -23,11 +23,7 @@
(until #f
(when (< (vector-vector-distance (target-pos 0) (-> self info end-sphere)) (-> self info end-sphere r))
(send-event (handle->process (-> self arrow)) 'leave)
(let ((gp-2 (current-time)))
(until (time-elapsed? gp-2 (seconds 0.007))
(suspend)
)
)
(suspend-for (seconds 0.007))
(go-virtual complete)
)
(suspend)

View File

@ -332,11 +332,7 @@
(defstate ambush (roboguard-level)
:virtual #t
:enter (behavior ()
(let ((t9-1 (-> (find-parent-state) enter)))
(if t9-1
(t9-1)
)
)
(call-parent-state-handler enter)
(logand! (-> self flags) -9)
(logior! (-> self flags) 4)
(logior! (-> self nav flags) (nav-control-flag output-sphere-hash))
@ -398,11 +394,7 @@
(defstate idle (roboguard-level)
:virtual #t
:enter (behavior ()
(let ((t9-1 (-> (find-parent-state) enter)))
(if t9-1
(t9-1)
)
)
(call-parent-state-handler enter)
(roboguard-level-method-185 self (the-as symbol 0))
)
:code (behavior ()
@ -468,11 +460,7 @@
(defstate stare (roboguard-level)
:virtual #t
:enter (behavior ()
(let ((t9-1 (-> (find-parent-state) enter)))
(if t9-1
(t9-1)
)
)
(call-parent-state-handler enter)
(roboguard-level-method-185 self (the-as symbol 0))
)
:code (behavior ()
@ -731,11 +719,7 @@
(defstate die (roboguard-level)
:virtual #t
:enter (behavior ()
(let ((t9-1 (-> (find-parent-state) enter)))
(if t9-1
(t9-1)
)
)
(call-parent-state-handler enter)
(roboguard-level-method-185 self (the-as symbol 0))
)
:code (behavior ()
@ -935,7 +919,7 @@
(defmethod general-event-handler ((this roboguard-level) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
"Handles various events for the enemy
@TODO - unsure if there is a pattern for the events and this should have a more specific name"
@TODO - unsure if there is a pattern for the events and this should have a more specific name"
(case arg2
(('attack)
(cond

View File

@ -1740,11 +1740,11 @@
;; WARN: Return type mismatch entity-perm-status vs none.
(defmethod init-from-entity! ((this bush-collect) (arg0 entity-actor))
"Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that.
This commonly includes things such as:
- stack size
- collision information
- loading the skeleton group / bones
- sounds"
This commonly includes things such as:
- stack size
- collision information
- loading the skeleton group / bones
- sounds"
(process-entity-status! this (entity-perm-status dead) #t)
(none)
)
@ -2901,11 +2901,7 @@ This commonly includes things such as:
)
(send-event *camera* 'teleport-to-transformq gp-0)
)
(let ((gp-1 (current-time)))
(until (time-elapsed? gp-1 (seconds 3))
(suspend)
)
)
(suspend-for (seconds 3))
(remove-setting! 'minimap)
(set! (-> *ACTOR-bank* birth-max) 1000)
(persist-with-delay *setting-control* 'interp-time (seconds 0.05) 'interp-time 'abs 0.0 0)

View File

@ -823,11 +823,7 @@
(logior! (-> self focus-status) (focus-status dead))
(case arg0
(('melt 'grenade 'explode)
(let ((s5-0 (current-time)))
(until (time-elapsed? s5-0 (seconds 0.2))
(suspend)
)
)
(suspend-for (seconds 0.2))
(case arg0
(('dark-eco-pool)
(sound-play "death-darkeco")
@ -950,11 +946,7 @@
)
0
(ja-channel-set! 0)
(let ((s5-7 (current-time)))
(until (time-elapsed? s5-7 (seconds 1.8))
(suspend)
)
)
(suspend-for (seconds 1.8))
)
(('endlessfall)
(sound-play "death-fall")
@ -983,11 +975,7 @@
)
)
)
(let ((s5-9 (current-time)))
(until (time-elapsed? s5-9 (seconds 0.5))
(suspend)
)
)
(suspend-for (seconds 0.5))
)
(('bot)
(set! (-> self trans-hook) #f)

View File

@ -530,11 +530,11 @@
;; WARN: Return type mismatch object vs none.
(defmethod init-from-entity! ((this security-wall) (arg0 entity-actor))
"Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that.
This commonly includes things such as:
- stack size
- collision information
- loading the skeleton group / bones
- sounds"
This commonly includes things such as:
- stack size
- collision information
- loading the skeleton group / bones
- sounds"
(ctywide-entity-hack)
(set! (-> this breach) #f)
(set! (-> this pass) (res-lump-value arg0 'pickup-type int :time -1000000000.0))
@ -985,11 +985,11 @@ This commonly includes things such as:
;; WARN: Return type mismatch object vs none.
(defmethod init-from-entity! ((this fruit-stand) (arg0 entity-actor))
"Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that.
This commonly includes things such as:
- stack size
- collision information
- loading the skeleton group / bones
- sounds"
This commonly includes things such as:
- stack size
- collision information
- loading the skeleton group / bones
- sounds"
(fruit-stand-method-28 this)
(process-drawable-from-entity! this arg0)
(initialize-skeleton
@ -1523,16 +1523,12 @@ This commonly includes things such as:
)
)
)
(let ((gp-0 (current-time)))
(until (time-elapsed? gp-0 (seconds 2))
(let ((a1-1 (new 'stack-no-clear 'vector)))
(set! (-> a1-1 quad) (-> self root trans quad))
(+! (-> a1-1 y) 10240.0)
(spawn (-> self part) a1-1)
)
(suspend)
)
)
(suspend-for (seconds 2) (let ((a1-1 (new 'stack-no-clear 'vector)))
(set! (-> a1-1 quad) (-> self root trans quad))
(+! (-> a1-1 y) 10240.0)
(spawn (-> self part) a1-1)
)
)
(while (not (-> self button-down?))
(suspend)
)
@ -1567,11 +1563,7 @@ This commonly includes things such as:
(suspend)
(ja :num! (seek! 32.0 0.5))
)
(let ((gp-1 (current-time)))
(until (time-elapsed? gp-1 (seconds 3))
(suspend)
)
)
(suspend-for (seconds 3))
)
)
(set! (-> self root root-prim specific 0) (-> self root root-prim specific 1))
@ -1715,11 +1707,7 @@ This commonly includes things such as:
(suspend)
(ja :num! (seek! (ja-aframe 32.0 0)))
)
(let ((gp-4 (current-time)))
(until (time-elapsed? gp-4 (seconds 5))
(suspend)
)
)
(suspend-for (seconds 5))
(set! (-> self root root-prim specific 0) (-> self root root-prim specific 1))
(setup-masks (-> self draw) 2 0)
(go-virtual idle)
@ -2009,17 +1997,17 @@ This commonly includes things such as:
)
)
(defmethod relocate ((this cty-guard-turret) (arg0 int))
(defmethod relocate ((this cty-guard-turret) (offset int))
(if (nonzero? (-> this jm-turret))
(&+! (-> this jm-turret) arg0)
(&+! (-> this jm-turret) offset)
)
(if (nonzero? (-> this jm-gunsL))
(&+! (-> this jm-gunsL) arg0)
(&+! (-> this jm-gunsL) offset)
)
(if (nonzero? (-> this jm-gunsR))
(&+! (-> this jm-gunsR) arg0)
(&+! (-> this jm-gunsR) offset)
)
(call-parent-method this arg0)
(call-parent-method this offset)
)
(defmethod cty-guard-turret-method-32 ((this cty-guard-turret))
@ -2103,11 +2091,11 @@ This commonly includes things such as:
;; WARN: Return type mismatch object vs none.
(defmethod init-from-entity! ((this cty-guard-turret) (arg0 entity-actor))
"Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that.
This commonly includes things such as:
- stack size
- collision information
- loading the skeleton group / bones
- sounds"
This commonly includes things such as:
- stack size
- collision information
- loading the skeleton group / bones
- sounds"
(local-vars (v1-23 handle))
(with-pp
(cty-guard-turret-method-32 this)
@ -2315,11 +2303,11 @@ This commonly includes things such as:
;; WARN: Return type mismatch object vs none.
(defmethod init-from-entity! ((this parking-spot) (arg0 entity-actor))
"Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that.
This commonly includes things such as:
- stack size
- collision information
- loading the skeleton group / bones
- sounds"
This commonly includes things such as:
- stack size
- collision information
- loading the skeleton group / bones
- sounds"
(set! (-> this root) (new 'process 'trsqv))
(set! (-> this minimap) #f)
(set! (-> this vehicle) (the-as handle #f))
@ -2834,11 +2822,11 @@ This commonly includes things such as:
;; WARN: Return type mismatch object vs none.
(defmethod init-from-entity! ((this propa) (arg0 entity-actor))
"Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that.
This commonly includes things such as:
- stack size
- collision information
- loading the skeleton group / bones
- sounds"
This commonly includes things such as:
- stack size
- collision information
- loading the skeleton group / bones
- sounds"
(propa-method-29 this)
(process-drawable-from-entity! this arg0)
(ctywide-entity-hack)
@ -2871,6 +2859,7 @@ This commonly includes things such as:
)
(defmethod run-logic? ((this baron-statue))
"Should this process be run? Checked by execute-process-tree."
#t
)
@ -2882,11 +2871,11 @@ This commonly includes things such as:
;; WARN: Return type mismatch object vs none.
(defmethod init-from-entity! ((this baron-statue) (arg0 entity-actor))
"Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that.
This commonly includes things such as:
- stack size
- collision information
- loading the skeleton group / bones
- sounds"
This commonly includes things such as:
- stack size
- collision information
- loading the skeleton group / bones
- sounds"
(set! (-> this root) (new 'process 'trsqv))
(process-drawable-from-entity! this arg0)
(initialize-skeleton
@ -3770,20 +3759,21 @@ This commonly includes things such as:
)
;; WARN: Return type mismatch process-focusable vs burning-bush.
(defmethod relocate ((this burning-bush) (arg0 int))
(defmethod relocate ((this burning-bush) (offset int))
(if (nonzero? (-> this task))
(&+! (-> this task) arg0)
(&+! (-> this task) offset)
)
(if (nonzero? (-> this part-off))
(&+! (-> this part-off) arg0)
(&+! (-> this part-off) offset)
)
(if (nonzero? (-> this part-alert))
(&+! (-> this part-alert) arg0)
(&+! (-> this part-alert) offset)
)
(the-as burning-bush ((method-of-type process-focusable relocate) this arg0))
(the-as burning-bush ((method-of-type process-focusable relocate) this offset))
)
(defmethod run-logic? ((this burning-bush))
"Should this process be run? Checked by execute-process-tree."
(or (not (logtest? (-> this mask) (process-mask actor-pause)))
(or (and (nonzero? (-> this draw))
(logtest? (-> this draw status) (draw-control-status on-screen))
@ -3800,11 +3790,11 @@ This commonly includes things such as:
;; WARN: Return type mismatch object vs none.
(defmethod init-from-entity! ((this burning-bush) (arg0 entity-actor))
"Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that.
This commonly includes things such as:
- stack size
- collision information
- loading the skeleton group / bones
- sounds"
This commonly includes things such as:
- stack size
- collision information
- loading the skeleton group / bones
- sounds"
(burning-bush-method-30 this)
(process-drawable-from-entity! this arg0)
(ctywide-entity-hack)
@ -3849,11 +3839,11 @@ This commonly includes things such as:
;; WARN: Return type mismatch object vs none.
(defmethod init-from-entity! ((this barons-ship-lores) (arg0 entity-actor))
"Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that.
This commonly includes things such as:
- stack size
- collision information
- loading the skeleton group / bones
- sounds"
This commonly includes things such as:
- stack size
- collision information
- loading the skeleton group / bones
- sounds"
(when (demo?)
(process-entity-status! this (entity-perm-status dead) #t)
(go empty-state)
@ -3896,17 +3886,17 @@ This commonly includes things such as:
(none)
)
(defmethod relocate ((this barons-ship-lores) (arg0 int))
(defmethod relocate ((this barons-ship-lores) (offset int))
(if (nonzero? (-> this paths 0))
(&+! (-> this paths 0) arg0)
(&+! (-> this paths 0) offset)
)
(if (nonzero? (-> this paths 1))
(&+! (-> this paths 1) arg0)
(&+! (-> this paths 1) offset)
)
(if (nonzero? (-> this paths 2))
(&+! (-> this paths 2) arg0)
(&+! (-> this paths 2) offset)
)
(call-parent-method this arg0)
(call-parent-method this offset)
)
(defstate idle (barons-ship-lores)
@ -4093,11 +4083,11 @@ This commonly includes things such as:
;; WARN: Return type mismatch object vs none.
(defmethod init-from-entity! ((this lurker-pipe-lid) (arg0 entity-actor))
"Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that.
This commonly includes things such as:
- stack size
- collision information
- loading the skeleton group / bones
- sounds"
This commonly includes things such as:
- stack size
- collision information
- loading the skeleton group / bones
- sounds"
(lurker-pipe-lid-method-28 this)
(process-drawable-from-entity! this arg0)
(ctywide-entity-hack)
@ -4251,11 +4241,11 @@ This commonly includes things such as:
;; WARN: Return type mismatch object vs none.
(defmethod init-from-entity! ((this ctyn-lamp) (arg0 entity-actor))
"Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that.
This commonly includes things such as:
- stack size
- collision information
- loading the skeleton group / bones
- sounds"
This commonly includes things such as:
- stack size
- collision information
- loading the skeleton group / bones
- sounds"
(ctyn-lamp-method-29 this)
(process-drawable-from-entity! this arg0)
(initialize-skeleton

View File

@ -181,11 +181,7 @@
(talker-spawn-func (-> *talker-speech* 38) *entity-pool* (target-pos 0) (the-as region #f))
)
(wait-for-speech-end (-> self sound-id 0))
(let ((gp-1 (current-time)))
(until (time-elapsed? gp-1 (seconds 1))
(suspend)
)
)
(suspend-for (seconds 1))
(while (or (not *target*) (focus-test? *target* dead teleporting))
(suspend)
)
@ -234,11 +230,7 @@
(talker-spawn-func (-> *talker-speech* 31) *entity-pool* (target-pos 0) (the-as region #f))
)
(wait-for-speech-end (-> self sound-id 0))
(let ((gp-1 (current-time)))
(until (time-elapsed? gp-1 (seconds 1))
(suspend)
)
)
(suspend-for (seconds 1))
(while (or (not *target*) (focus-test? *target* dead teleporting))
(suspend)
)
@ -246,11 +238,7 @@
(talker-spawn-func (-> *talker-speech* 35) *entity-pool* (target-pos 0) (the-as region #f))
)
(wait-for-speech-end (-> self sound-id 0))
(let ((gp-3 (current-time)))
(until (time-elapsed? gp-3 (seconds 1))
(suspend)
)
)
(suspend-for (seconds 1))
(while (or (not *target*) (focus-test? *target* dead teleporting))
(suspend)
)
@ -271,11 +259,7 @@
)
(wait-for-speech-end (-> self sound-id 0))
(set! (-> self sub-state) (the-as uint 2))
(let ((gp-6 (current-time)))
(until (time-elapsed? gp-6 (seconds 1))
(suspend)
)
)
(suspend-for (seconds 1))
(go-virtual complete)
(none)
)
@ -348,11 +332,7 @@
(talker-spawn-func (-> *talker-speech* 35) *entity-pool* (target-pos 0) (the-as region #f))
)
(wait-for-speech-end (-> self sound-id 0))
(let ((gp-1 (current-time)))
(until (time-elapsed? gp-1 (seconds 1))
(suspend)
)
)
(suspend-for (seconds 1))
(set! (-> self sound-id 0)
(talker-spawn-func (-> *talker-speech* 36) *entity-pool* (target-pos 0) (the-as region #f))
)
@ -366,11 +346,7 @@
(talker-spawn-func (-> *talker-speech* 37) *entity-pool* (target-pos 0) (the-as region #f))
)
(wait-for-speech-end (-> self sound-id 0))
(let ((gp-4 (current-time)))
(until (time-elapsed? gp-4 (seconds 3))
(suspend)
)
)
(suspend-for (seconds 3))
(go-virtual complete)
(none)
)

View File

@ -1042,11 +1042,7 @@
:to self
)
(process-entity-status! self (entity-perm-status dead) #t)
(let ((frame (current-time)))
(until (time-elapsed? frame (seconds 5))
(suspend)
)
)
(suspend-for (seconds 5))
)
)
@ -1070,11 +1066,11 @@
;; WARN: Return type mismatch object vs none.
(defmethod init-from-entity! ((this market-basket-a) (arg0 entity-actor))
"Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that.
This commonly includes things such as:
- stack size
- collision information
- loading the skeleton group / bones
- sounds"
This commonly includes things such as:
- stack size
- collision information
- loading the skeleton group / bones
- sounds"
(let ((cshape (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player))))
(let ((prim-mesh (new 'process 'collide-shape-prim-mesh cshape (the-as uint 0) (the-as uint 0))))
(set! (-> prim-mesh prim-core collide-as) (collide-spec crate))
@ -1146,11 +1142,11 @@ This commonly includes things such as:
;; WARN: Return type mismatch object vs none.
(defmethod init-from-entity! ((this market-basket-b) (arg0 entity-actor))
"Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that.
This commonly includes things such as:
- stack size
- collision information
- loading the skeleton group / bones
- sounds"
This commonly includes things such as:
- stack size
- collision information
- loading the skeleton group / bones
- sounds"
(let ((cshape (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player))))
(let ((prim-mesh (new 'process 'collide-shape-prim-mesh cshape (the-as uint 0) (the-as uint 0))))
(set! (-> prim-mesh prim-core collide-as) (collide-spec crate))
@ -1222,11 +1218,11 @@ This commonly includes things such as:
;; WARN: Return type mismatch object vs none.
(defmethod init-from-entity! ((this market-crate) (arg0 entity-actor))
"Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that.
This commonly includes things such as:
- stack size
- collision information
- loading the skeleton group / bones
- sounds"
This commonly includes things such as:
- stack size
- collision information
- loading the skeleton group / bones
- sounds"
(let ((cshape (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player))))
(let ((prim-mesh (new 'process 'collide-shape-prim-mesh cshape (the-as uint 0) (the-as uint 0))))
(set! (-> prim-mesh prim-core collide-as) (collide-spec crate))
@ -1298,11 +1294,11 @@ This commonly includes things such as:
;; WARN: Return type mismatch object vs none.
(defmethod init-from-entity! ((this market-sack-a) (arg0 entity-actor))
"Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that.
This commonly includes things such as:
- stack size
- collision information
- loading the skeleton group / bones
- sounds"
This commonly includes things such as:
- stack size
- collision information
- loading the skeleton group / bones
- sounds"
(let ((cshape (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player))))
(let ((prim-mesh (new 'process 'collide-shape-prim-mesh cshape (the-as uint 0) (the-as uint 0))))
(set! (-> prim-mesh prim-core collide-as) (collide-spec crate))
@ -1374,11 +1370,11 @@ This commonly includes things such as:
;; WARN: Return type mismatch object vs none.
(defmethod init-from-entity! ((this market-sack-b) (arg0 entity-actor))
"Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that.
This commonly includes things such as:
- stack size
- collision information
- loading the skeleton group / bones
- sounds"
This commonly includes things such as:
- stack size
- collision information
- loading the skeleton group / bones
- sounds"
(let ((cshape (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player))))
(let ((prim-mesh (new 'process 'collide-shape-prim-mesh cshape (the-as uint 0) (the-as uint 0))))
(set! (-> prim-mesh prim-core collide-as) (collide-spec crate))

View File

@ -1836,11 +1836,7 @@
(-> gp-0 ppointer)
)
)
(let ((gp-1 (current-time)))
(until (time-elapsed? gp-1 (seconds 0.25))
(suspend)
)
)
(suspend-for (seconds 0.25))
(go-virtual fall)
)
)
@ -2536,11 +2532,7 @@
)
:code (behavior ((arg0 symbol))
(ja-channel-set! 0)
(let ((gp-0 (current-time)))
(until (time-elapsed? gp-0 (seconds 1))
(suspend)
)
)
(suspend-for (seconds 1))
(talker-spawn-func (-> *talker-speech* 145) *entity-pool* (target-pos 0) (the-as region #f))
(sleep-code)
)
@ -2662,11 +2654,7 @@
(while (nonzero? (get-status *gui-control* s5-1))
(suspend)
)
(let ((s5-3 (current-time)))
(until (time-elapsed? s5-3 (seconds 2))
(suspend)
)
)
(suspend-for (seconds 2))
(set-blackout-frames (seconds 0.1))
(send-event (handle->process gp-4) 'complete)
)

View File

@ -968,11 +968,7 @@
0
)
:code (behavior ()
(let ((gp-0 (current-time)))
(until (time-elapsed? gp-0 (seconds 3))
(suspend)
)
)
(suspend-for (seconds 3))
(cleanup-for-death self)
)
:post (behavior ()
@ -1476,11 +1472,7 @@
(defstate die (ctyport-cargo)
:virtual #t
:code (behavior ()
(let ((gp-0 (current-time)))
(until (time-elapsed? gp-0 (seconds 1))
(suspend)
)
)
(suspend-for (seconds 1))
(cleanup-for-death self)
)
)
@ -1864,11 +1856,7 @@
)
)
)
(let ((gp-1 (current-time)))
(until (time-elapsed? gp-1 (seconds 2))
(suspend)
)
)
(suspend-for (seconds 2))
)
(none)
)

View File

@ -382,18 +382,10 @@
)
)
)
(let ((gp-2 (current-time)))
(until (time-elapsed? gp-2 (seconds 0.6))
(suspend)
)
)
(suspend-for (seconds 0.6))
(+! (-> self root trans y) -8192.0)
(logior! (-> self draw status) (draw-control-status no-draw))
(let ((gp-3 (current-time)))
(until (time-elapsed? gp-3 (the int (* 300.0 (rnd-float-range self 0.0 0.6))))
(suspend)
)
)
(suspend-for (the int (* 300.0 (rnd-float-range self 0.0 0.6))))
(logclear! (-> self draw status) (draw-control-status no-draw))
(go-virtual ambush-jumping)
)

View File

@ -672,11 +672,7 @@
(-> gp-0 ppointer)
)
)
(let ((gp-1 (current-time)))
(until (time-elapsed? gp-1 (seconds 0.6))
(suspend)
)
)
(suspend-for (seconds 0.6))
(+! (-> self root trans y) -8192.0)
(enemy-method-129 self)
(let ((a0-5 (handle->process (-> self focus handle))))
@ -694,11 +690,7 @@
)
)
)
(let ((gp-3 (current-time)))
(until (time-elapsed? gp-3 (the int (* 300.0 (rnd-float-range self 0.0 0.6))))
(suspend)
)
)
(suspend-for (the int (* 300.0 (rnd-float-range self 0.0 0.6))))
(logclear! (-> self draw status) (draw-control-status no-draw))
(go-virtual ambush-jumping)
)

View File

@ -331,7 +331,7 @@
(defmethod general-event-handler ((this grunt) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
"Handles various events for the enemy
@TODO - unsure if there is a pattern for the events and this should have a more specific name"
@TODO - unsure if there is a pattern for the events and this should have a more specific name"
(case arg2
(('hit 'hit-knocked)
(logclear! (-> this mask) (process-mask actor-pause))
@ -450,11 +450,7 @@
)
)
:code (behavior ()
(let ((gp-0 (current-time)))
(until (time-elapsed? gp-0 (seconds 0.2))
(suspend)
)
)
(suspend-for (seconds 0.2))
(let ((v1-6 (-> self root root-prim)))
(set! (-> v1-6 prim-core collide-as) (-> self root backup-collide-as))
(set! (-> v1-6 prim-core collide-with) (-> self root backup-collide-with))
@ -1411,11 +1407,11 @@
)
;; WARN: Return type mismatch nav-enemy vs grunt.
(defmethod relocate ((this grunt) (arg0 int))
(defmethod relocate ((this grunt) (offset int))
(if (nonzero? (-> this intro-path))
(&+! (-> this intro-path) arg0)
(&+! (-> this intro-path) offset)
)
(the-as grunt ((method-of-type nav-enemy relocate) this arg0))
(the-as grunt ((method-of-type nav-enemy relocate) this offset))
)
(defmethod init-enemy-collision! ((this grunt))

View File

@ -1105,7 +1105,7 @@
(defmethod general-event-handler ((this crimson-guard-level) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
"Handles various events for the enemy
@TODO - unsure if there is a pattern for the events and this should have a more specific name"
@TODO - unsure if there is a pattern for the events and this should have a more specific name"
(case arg2
(('event-death)
(when (<= (-> this hit-points) 0)
@ -1459,9 +1459,9 @@
;; WARN: Return type mismatch object vs none.
(defmethod common-post ((this crimson-guard-level))
"Does a lot of various things relating to interacting with the target
- tracks when the enemy was last drawn
- looks at the target and handles attacking
@TODO Not extremely well understood yet"
- tracks when the enemy was last drawn
- looks at the target and handles attacking
@TODO Not extremely well understood yet"
(let ((t9-0 (method-of-type nav-enemy common-post)))
(t9-0 this)
)
@ -2131,11 +2131,7 @@
(suspend)
)
(when (logtest? (-> self flags) 4)
(let ((s5-1 (current-time)))
(until (time-elapsed? s5-1 (seconds 1))
(suspend)
)
)
(suspend-for (seconds 1))
(until (crimson-guard-level-method-194 self)
(suspend)
)
@ -2705,22 +2701,21 @@
(suspend)
(ja :num! (seek! (ja-aframe 12.0 0)))
)
(let ((gp-2 (current-time)))
(until (time-elapsed? gp-2 (the int (* 900.0 (you-suck-scale *game-info* #f))))
(ja-no-eval :group! crimson-guard-grenade-attack-ja
:num! (seek! (ja-aframe 12.0 0))
:frame-num (ja-aframe 12.0 0)
)
(until (ja-done? 0)
(seek-toward-heading-vec! (-> self root) (-> self target-self-xz) 65536.0 (seconds 0.02))
(suspend)
(ja :num! (seek! (ja-aframe 12.0 0)))
)
(if (and (< (-> self target-self-xz-dist) 81920.0) (= (-> self focus aware) (enemy-aware enemy-aware-3)))
(go-hostile self)
)
(suspend-for
(the int (* 900.0 (you-suck-scale *game-info* #f)))
(ja-no-eval :group! crimson-guard-grenade-attack-ja
:num! (seek! (ja-aframe 12.0 0))
:frame-num (ja-aframe 12.0 0)
)
(until (ja-done? 0)
(seek-toward-heading-vec! (-> self root) (-> self target-self-xz) 65536.0 (seconds 0.02))
(suspend)
(ja :num! (seek! (ja-aframe 12.0 0)))
)
(empty-form)
(if (and (< (-> self target-self-xz-dist) 81920.0) (= (-> self focus aware) (enemy-aware enemy-aware-3)))
(go-hostile self)
)
)
(crimson-guard-level-method-192 self)
(ja-no-eval :group! crimson-guard-grenade-attack-ja
@ -4118,14 +4113,14 @@
(none)
)
(defmethod relocate ((this crimson-guard-level) (arg0 int))
(defmethod relocate ((this crimson-guard-level) (offset int))
(if (nonzero? (-> this joint))
(&+! (-> this joint) arg0)
(&+! (-> this joint) offset)
)
(if (nonzero? (-> this l-control))
(&+! (-> this l-control) arg0)
(&+! (-> this l-control) offset)
)
(call-parent-method this arg0)
(call-parent-method this offset)
)
;; WARN: Return type mismatch float vs none.

View File

@ -907,11 +907,7 @@
(defstate knocked (crimson-guard-hover)
:virtual #t
:enter (behavior ()
(let ((t9-1 (-> (find-parent-state) enter)))
(if t9-1
(t9-1)
)
)
(call-parent-state-handler enter)
)
)
@ -967,11 +963,7 @@
0
(set! (-> self hit-points) 0)
(do-effect (-> self skel effect) 'death-default 0.0 -1)
(let ((gp-0 (current-time)))
(until (time-elapsed? gp-0 (seconds 1))
(suspend)
)
)
(suspend-for (seconds 1))
(send-event self 'death-end)
(cleanup-for-death self)
)
@ -981,11 +973,7 @@
(defstate flying-death (crimson-guard-hover)
:virtual #t
:enter (behavior ()
(let ((t9-1 (-> (find-parent-state) enter)))
(if t9-1
(t9-1)
)
)
(call-parent-state-handler enter)
(let ((gp-0 (get-process *default-dead-pool* part-tracker #x4000)))
(when gp-0
(let ((t9-3 (method-of-type part-tracker activate)))
@ -1042,11 +1030,7 @@
(defstate flying-death-explode (crimson-guard-hover)
:virtual #t
:enter (behavior ()
(let ((t9-1 (-> (find-parent-state) enter)))
(if t9-1
(t9-1)
)
)
(call-parent-state-handler enter)
(sound-play "hover-explode")
(let ((gp-1 (get-process *default-dead-pool* part-tracker #x4000)))
(when gp-1
@ -1094,7 +1078,7 @@
(defmethod general-event-handler ((this crimson-guard-hover) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
"Handles various events for the enemy
@TODO - unsure if there is a pattern for the events and this should have a more specific name"
@TODO - unsure if there is a pattern for the events and this should have a more specific name"
(local-vars (v1-15 enemy-flag))
(case arg2
(('attack-invinc)
@ -1317,9 +1301,9 @@
(defmethod common-post ((this crimson-guard-hover))
"Does a lot of various things relating to interacting with the target
- tracks when the enemy was last drawn
- looks at the target and handles attacking
@TODO Not extremely well understood yet"
- tracks when the enemy was last drawn
- looks at the target and handles attacking
@TODO Not extremely well understood yet"
(seek! (-> this gun-x-angle) (-> this gun-x-angle-final) (* 21845.334 (seconds-per-frame)))
(let* ((s5-0 (hover-nav-control-method-16 (-> this hover) (new 'stack-no-clear 'vector)))
(s4-0
@ -1693,23 +1677,24 @@
)
;; WARN: Return type mismatch hover-enemy vs crimson-guard-hover.
(defmethod relocate ((this crimson-guard-hover) (arg0 int))
(defmethod relocate ((this crimson-guard-hover) (offset int))
(if (nonzero? (-> this gun-jmod))
(&+! (-> this gun-jmod) arg0)
(&+! (-> this gun-jmod) offset)
)
(if (nonzero? (-> this hips-jmod))
(&+! (-> this hips-jmod) arg0)
(&+! (-> this hips-jmod) offset)
)
(if (nonzero? (-> this smoke-part))
(&+! (-> this smoke-part) arg0)
(&+! (-> this smoke-part) offset)
)
(if (nonzero? (-> this engine-part))
(&+! (-> this engine-part) arg0)
(&+! (-> this engine-part) offset)
)
(the-as crimson-guard-hover ((method-of-type hover-enemy relocate) this arg0))
(the-as crimson-guard-hover ((method-of-type hover-enemy relocate) this offset))
)
(defmethod deactivate ((this crimson-guard-hover))
"Make a process dead, clean it up, remove it from the active pool, and return to dead pool."
(if (nonzero? (-> this smoke-part))
(kill-and-free-particles (-> this smoke-part))
)

View File

@ -180,21 +180,13 @@
(('wait)
)
)
(let ((s4-0 (current-time)))
(until (time-elapsed? s4-0 (-> gp-0 s5-0 time))
(suspend)
)
)
(suspend-for (-> gp-0 s5-0 time))
(while (< (-> gp-0 s5-0 alive-count) (-> self alive-count))
(suspend)
)
)
)
(let ((gp-1 (current-time)))
(until (time-elapsed? gp-1 (seconds 2))
(suspend)
)
)
(suspend-for (seconds 2))
(go-virtual die)
)
:post hover-enemy-manager-post
@ -242,16 +234,16 @@
(none)
)
(defmethod relocate ((this hover-enemy-manager) (arg0 int))
(defmethod relocate ((this hover-enemy-manager) (offset int))
(when (-> this formation)
(if (nonzero? (-> this formation))
(&+! (-> this formation) arg0)
(&+! (-> this formation) offset)
)
)
(if (nonzero? (-> this path))
(&+! (-> this path) arg0)
(&+! (-> this path) offset)
)
(call-parent-method this arg0)
(call-parent-method this offset)
)
(defmethod hover-enemy-manager-init! ((this hover-enemy-manager) (arg0 (array hover-enemy-battle-command)))

View File

@ -438,7 +438,7 @@
(defmethod general-event-handler ((this wasp) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
"Handles various events for the enemy
@TODO - unsure if there is a pattern for the events and this should have a more specific name"
@TODO - unsure if there is a pattern for the events and this should have a more specific name"
(case arg2
(('hit 'hit-knocked)
(logclear! (-> this mask) (process-mask actor-pause))
@ -539,9 +539,9 @@
(defmethod common-post ((this wasp))
"Does a lot of various things relating to interacting with the target
- tracks when the enemy was last drawn
- looks at the target and handles attacking
@TODO Not extremely well understood yet"
- tracks when the enemy was last drawn
- looks at the target and handles attacking
@TODO Not extremely well understood yet"
(seek! (-> this gun-x-angle) (-> this gun-x-angle-final) (* 21845.334 (seconds-per-frame)))
((method-of-type hover-enemy common-post) this)
(none)
@ -1053,11 +1053,7 @@
0
(set! (-> self hit-points) 0)
(do-effect (-> self skel effect) 'death-default 0.0 -1)
(let ((gp-0 (current-time)))
(until (time-elapsed? gp-0 (seconds 1))
(suspend)
)
)
(suspend-for (seconds 1))
(send-event self 'death-end)
(cleanup-for-death self)
)
@ -1401,6 +1397,7 @@
)
(defmethod deactivate ((this wasp))
"Make a process dead, clean it up, remove it from the active pool, and return to dead pool."
(if (nonzero? (-> this smoke-part))
(kill-and-free-particles (-> this smoke-part))
)
@ -1413,17 +1410,17 @@
)
;; WARN: Return type mismatch hover-enemy vs wasp.
(defmethod relocate ((this wasp) (arg0 int))
(defmethod relocate ((this wasp) (offset int))
(if (nonzero? (-> this gun-jmod))
(&+! (-> this gun-jmod) arg0)
(&+! (-> this gun-jmod) offset)
)
(if (nonzero? (-> this smoke-part))
(&+! (-> this smoke-part) arg0)
(&+! (-> this smoke-part) offset)
)
(if (nonzero? (-> this engine-part))
(&+! (-> this engine-part) arg0)
(&+! (-> this engine-part) offset)
)
(the-as wasp ((method-of-type hover-enemy relocate) this arg0))
(the-as wasp ((method-of-type hover-enemy relocate) this offset))
)
(defmethod hover-enemy-method-149 ((this wasp))

View File

@ -267,7 +267,7 @@
(defmethod general-event-handler ((this spyder) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
"Handles various events for the enemy
@TODO - unsure if there is a pattern for the events and this should have a more specific name"
@TODO - unsure if there is a pattern for the events and this should have a more specific name"
(case arg2
(('hit-knocked)
(logclear! (-> this mask) (process-mask actor-pause))
@ -661,9 +661,9 @@
(defmethod common-post ((this spyder))
"Does a lot of various things relating to interacting with the target
- tracks when the enemy was last drawn
- looks at the target and handles attacking
@TODO Not extremely well understood yet"
- tracks when the enemy was last drawn
- looks at the target and handles attacking
@TODO Not extremely well understood yet"
(spyder-method-185 this)
(spyder-method-184 this (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> this root quat)))
(update-trans! (-> this sound) (-> this root trans))
@ -1067,13 +1067,11 @@
(set! (-> self fire-info 0 quad) (-> s3-0 quad))
(set! (-> self fire-info 1 quad) (-> s2-1 quad))
)
(let ((s3-1 (current-time)))
(until (time-elapsed? s3-1 (seconds 0.2))
(set! f30-0 (seek f30-0 (lerp-scale 0.0 1.0 (the float s4-0) 0.0 8.0) (seconds-per-frame)))
(ja :num! (loop!))
(ja :chan 1 :num! (chan 0) :frame-interp0 f30-0 :frame-interp1 f30-0)
(suspend)
)
(suspend-for
(seconds 0.2)
(set! f30-0 (seek f30-0 (lerp-scale 0.0 1.0 (the float s4-0) 0.0 8.0) (seconds-per-frame)))
(ja :num! (loop!))
(ja :chan 1 :num! (chan 0) :frame-interp0 f30-0 :frame-interp1 f30-0)
)
(let ((f28-1 (+ 12288.0 f28-0)))
(set! (-> gp-0 quad) (-> s5-0 quad))

View File

@ -30,10 +30,10 @@
(defmethod move-between-points ((this com-elevator) (arg0 vector) (arg1 float) (arg2 float))
"Move between two points on the elevator's path
@param vec TODO not sure
@param point-a The first point fetched from the elevator's path
@param point-b The second point fetched from the path
@see [[path-control]] and [[elevator]]"
@param vec TODO not sure
@param point-a The first point fetched from the elevator's path
@param point-b The second point fetched from the path
@see [[path-control]] and [[elevator]]"
(let ((s4-0 (get-point-in-path! (-> this path) (new 'stack-no-clear 'vector) arg1 'interp))
(a0-3 (get-point-in-path! (-> this path) (new 'stack-no-clear 'vector) arg2 'interp))
(v1-3 (-> this root trans))
@ -93,11 +93,7 @@
(defstate dormant (com-elevator)
:virtual #t
:enter (behavior ()
(let ((t9-1 (-> (find-parent-state) enter)))
(if t9-1
(t9-1)
)
)
(call-parent-state-handler enter)
(process-entity-status! self (entity-perm-status subtask-complete) #t)
)
)
@ -127,11 +123,7 @@
(remove-setting! 'allow-look-around)
)
:code (behavior ()
(let ((gp-0 (current-time)))
(until (time-elapsed? gp-0 (seconds 1))
(suspend)
)
)
(suspend-for (seconds 1))
(sound-play "com-elevator-s")
(logior! (-> self elevator-status) (elevator-status waiting-to-ascend))
(until #f
@ -174,6 +166,7 @@
)
(defmethod deactivate ((this com-elevator))
"Make a process dead, clean it up, remove it from the active pool, and return to dead pool."
(sound-stop (-> this sound-id))
(call-parent-method this)
(none)
@ -182,7 +175,7 @@
;; WARN: Return type mismatch sound-id vs none.
(defmethod init-plat! ((this com-elevator))
"Does any necessary initial platform setup.
For example for an elevator pre-compute the distance between the first and last points (both ways) and clear the sound."
For example for an elevator pre-compute the distance between the first and last points (both ways) and clear the sound."
(dotimes (s5-0 (-> this path curve num-cverts))
(let ((a1-1 (res-lump-struct (-> this entity) 'string-startup-vector structure :time (the float s5-0))))
(cond
@ -272,11 +265,7 @@ For example for an elevator pre-compute the distance between the first and last
)
)
:code (behavior ()
(let ((gp-0 (current-time)))
(until (time-elapsed? gp-0 (seconds 1))
(suspend)
)
)
(suspend-for (seconds 1))
(logior! (-> self elevator-status) (elevator-status waiting-to-ascend))
(until #f
(sound-play "tmb-elevator-lp" :id (-> self sound-id))
@ -303,6 +292,7 @@ For example for an elevator pre-compute the distance between the first and last
)
(defmethod deactivate ((this tomb-trans-elevator))
"Make a process dead, clean it up, remove it from the active pool, and return to dead pool."
(sound-stop (-> this sound-id))
(call-parent-method this)
(none)
@ -311,7 +301,7 @@ For example for an elevator pre-compute the distance between the first and last
;; WARN: Return type mismatch sound-id vs none.
(defmethod init-plat! ((this tomb-trans-elevator))
"Does any necessary initial platform setup.
For example for an elevator pre-compute the distance between the first and last points (both ways) and clear the sound."
For example for an elevator pre-compute the distance between the first and last points (both ways) and clear the sound."
(call-parent-method this)
(set! (-> this sound-id) (new-sound-id))
(none)

View File

@ -826,11 +826,7 @@
(gun-buoy-method-183 self a1-1)
)
)
(let ((s5-1 (current-time)))
(until (time-elapsed? s5-1 (seconds 0.75))
(suspend)
)
)
(suspend-for (seconds 0.75))
)
(go-virtual hostile)
)
@ -856,11 +852,7 @@
(suspend)
(ja :num! (seek!))
)
(let ((gp-0 (current-time)))
(until (time-elapsed? gp-0 (seconds 2))
(suspend)
)
)
(suspend-for (seconds 2))
(go-virtual exit-ambush)
)
:post gun-buoy-chase-post
@ -875,7 +867,7 @@
(defmethod general-event-handler ((this gun-buoy) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
"Handles various events for the enemy
@TODO - unsure if there is a pattern for the events and this should have a more specific name"
@TODO - unsure if there is a pattern for the events and this should have a more specific name"
(case arg2
(('jump)
#f
@ -888,9 +880,9 @@
(defmethod common-post ((this gun-buoy))
"Does a lot of various things relating to interacting with the target
- tracks when the enemy was last drawn
- looks at the target and handles attacking
@TODO Not extremely well understood yet"
- tracks when the enemy was last drawn
- looks at the target and handles attacking
@TODO Not extremely well understood yet"
(-> this root)
(let* ((s4-0 *target*)
(s5-0 (if (type? s4-0 process-focusable)
@ -973,10 +965,10 @@
;; WARN: disable def twice: 40. This may happen when a cond (no else) is nested inside of another conditional, but it should be rare.
(defmethod in-aggro-range? ((this gun-buoy) (arg0 process-focusable) (arg1 vector))
"Should the enemy activate.
- if `activate-distance` is `0.0`, always true
- otherwise, check if the provided process is close enough
@param proc The process used to distance check
@returns true/false"
- if `activate-distance` is `0.0`, always true
- otherwise, check if the provided process is close enough
@param proc The process used to distance check
@returns true/false"
(local-vars (v1-19 process-focusable) (f30-1 meters))
(if (and arg0 (not arg1))
(set! arg1 (get-trans arg0 0))
@ -1142,11 +1134,11 @@
)
;; WARN: Return type mismatch nav-enemy vs gun-buoy.
(defmethod relocate ((this gun-buoy) (arg0 int))
(defmethod relocate ((this gun-buoy) (offset int))
(if (nonzero? (-> this gun-elev-jmod))
(&+! (-> this gun-elev-jmod) arg0)
(&+! (-> this gun-elev-jmod) offset)
)
(the-as gun-buoy ((method-of-type nav-enemy relocate) this arg0))
(the-as gun-buoy ((method-of-type nav-enemy relocate) this offset))
)
;; WARN: Return type mismatch collide-shape-moving vs none.

View File

@ -622,9 +622,9 @@
(defmethod common-post ((this spydroid))
"Does a lot of various things relating to interacting with the target
- tracks when the enemy was last drawn
- looks at the target and handles attacking
@TODO Not extremely well understood yet"
- tracks when the enemy was last drawn
- looks at the target and handles attacking
@TODO Not extremely well understood yet"
(let ((t9-0 (method-of-type nav-enemy common-post)))
(t9-0 this)
)
@ -720,7 +720,7 @@
(defmethod general-event-handler ((this spydroid) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
"Handles various events for the enemy
@TODO - unsure if there is a pattern for the events and this should have a more specific name"
@TODO - unsure if there is a pattern for the events and this should have a more specific name"
(local-vars (v1-6 vector) (sv-144 vector))
(rlet ((vf0 :class vf)
(vf4 :class vf)
@ -868,11 +868,7 @@
)
(suspend)
(ja-channel-set! 0)
(let ((gp-0 (current-time)))
(until (time-elapsed? gp-0 (seconds 1))
(suspend)
)
)
(suspend-for (seconds 1))
(send-event self 'death-end)
(while (-> self child)
(suspend)
@ -1299,6 +1295,7 @@
)
(defmethod deactivate ((this spydroid))
"Make a process dead, clean it up, remove it from the active pool, and return to dead pool."
(if (nonzero? (-> this explode-part))
(kill-and-free-particles (-> this explode-part))
)
@ -1307,18 +1304,18 @@
)
;; WARN: Return type mismatch nav-enemy vs spydroid.
(defmethod relocate ((this spydroid) (arg0 int))
(defmethod relocate ((this spydroid) (offset int))
(dotimes (v1-0 4)
(if (nonzero? (-> this lightning v1-0))
(&+! (-> this lightning v1-0) arg0)
(&+! (-> this lightning v1-0) offset)
)
)
(when (nonzero? (-> this explode-part))
(if (nonzero? (-> this explode-part))
(&+! (-> this explode-part) arg0)
(&+! (-> this explode-part) offset)
)
)
(the-as spydroid ((method-of-type nav-enemy relocate) this arg0))
(the-as spydroid ((method-of-type nav-enemy relocate) this offset))
)
(defmethod init-enemy! ((this spydroid))

View File

@ -283,50 +283,30 @@
:code (behavior ()
(until #f
(ja :num-func num-func-identity :frame-num (ja-aframe 0.0 0))
(let ((gp-1 (current-time)))
(until (time-elapsed? gp-1 (seconds 0.5))
(suspend)
)
)
(suspend-for (seconds 0.5))
(ja-no-eval :group! (ja-group) :num! (seek! (ja-aframe 2.0 0)) :frame-num (ja-aframe 0.0 0))
(until (ja-done? 0)
(suspend)
(ja :num! (seek! (ja-aframe 2.0 0)))
)
(process-spawn part-tracker :init part-tracker-init (-> *part-group-id-table* 196) 600 #f #f self 5 :to self)
(let ((gp-5 (current-time)))
(until (time-elapsed? gp-5 (seconds 0.5))
(suspend)
)
)
(suspend-for (seconds 0.5))
(ja-no-eval :group! (ja-group) :num! (seek! (ja-aframe 4.0 0)) :frame-num (ja-aframe 2.0 0))
(until (ja-done? 0)
(suspend)
(ja :num! (seek! (ja-aframe 4.0 0)))
)
(process-spawn part-tracker :init part-tracker-init (-> *part-group-id-table* 195) 300 #f #f self 7 :to self)
(let ((gp-9 (current-time)))
(until (time-elapsed? gp-9 (seconds 0.5))
(suspend)
)
)
(suspend-for (seconds 0.5))
(ja-no-eval :group! (ja-group) :num! (seek! (ja-aframe 6.0 0)) :frame-num (ja-aframe 4.0 0))
(until (ja-done? 0)
(suspend)
(ja :num! (seek! (ja-aframe 6.0 0)))
)
(process-spawn part-tracker :init part-tracker-init (-> *part-group-id-table* 194) 300 #f #f self 9 :to self)
(let ((gp-13 (current-time)))
(until (time-elapsed? gp-13 (seconds 0.5))
(suspend)
)
)
(suspend-for (seconds 0.5))
(process-spawn part-tracker :init part-tracker-init (-> *part-group-id-table* 197) 300 #f #f self 10 :to self)
(let ((gp-15 (current-time)))
(until (time-elapsed? gp-15 (seconds 0.5))
(suspend)
)
)
(suspend-for (seconds 0.5))
)
#f
)

View File

@ -696,11 +696,7 @@
(set-blackout-frames (seconds 0.05))
)
(start 'play arg0)
(let ((gp-1 (current-time)))
(until (time-elapsed? gp-1 (seconds 1))
(suspend)
)
)
(suspend-for (seconds 1))
(while (and *target* (and (>= 81920.0 (vector-vector-distance (-> self root trans) (-> *target* control trans)))
(not (logtest? (focus-status teleporting) (-> *target* focus-status)))
)
@ -789,11 +785,11 @@
(defmethod init-from-entity! ((this warp-gate) (arg0 entity-actor))
"Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that.
This commonly includes things such as:
- stack size
- collision information
- loading the skeleton group / bones
- sounds"
This commonly includes things such as:
- stack size
- collision information
- loading the skeleton group / bones
- sounds"
(warp-gate-init arg0 (the-as vector #f))
(none)
)
@ -1104,20 +1100,21 @@ This commonly includes things such as:
;; WARN: Return type mismatch warp-gate vs air-train.
(defmethod relocate ((this air-train) (arg0 int))
(defmethod relocate ((this air-train) (offset int))
(if (nonzero? (-> this part-exhaust-left))
(&+! (-> this part-exhaust-left) arg0)
(&+! (-> this part-exhaust-left) offset)
)
(if (nonzero? (-> this part-exhaust-right))
(&+! (-> this part-exhaust-right) arg0)
(&+! (-> this part-exhaust-right) offset)
)
(if (nonzero? (-> this part-dust))
(&+! (-> this part-dust) arg0)
(&+! (-> this part-dust) offset)
)
(the-as air-train ((method-of-type warp-gate relocate) this arg0))
(the-as air-train ((method-of-type warp-gate relocate) this offset))
)
(defmethod deactivate ((this air-train))
"Make a process dead, clean it up, remove it from the active pool, and return to dead pool."
(sound-stop (-> this hover-sound))
(if (nonzero? (-> this part-exhaust-left))
(kill-and-free-particles (-> this part-exhaust-left))

View File

@ -30,16 +30,17 @@
;; WARN: Return type mismatch process vs demo-control.
(defmethod relocate ((this demo-control) (arg0 int))
(defmethod relocate ((this demo-control) (offset int))
(dotimes (v1-0 2)
(if (nonzero? (-> this buffer v1-0))
(&+! (-> this buffer v1-0) arg0)
(&+! (-> this buffer v1-0) offset)
)
)
(the-as demo-control ((method-of-type process relocate) this arg0))
(the-as demo-control ((method-of-type process relocate) this offset))
)
(defmethod deactivate ((this demo-control))
"Make a process dead, clean it up, remove it from the active pool, and return to dead pool."
(dotimes (s5-0 2)
(set-pending-file (-> this buffer s5-0) (the-as string #f) -1 (the-as handle #f) 100000000.0)
)
@ -634,59 +635,41 @@
)
(set! (-> self sprite-draw) (the-as uint 3))
(set-vector! (-> self sprite-pos) -512.0 40.0 0.0 1.0)
(let ((gp-4 (current-time)))
(until (time-elapsed? gp-4 (seconds 0.25))
(set! (-> self sprite-pos x)
(lerp-scale -512.0 0.0 (sin (* 218.45334 (the float (- (current-time) gp-4)))) 0.0 1.0)
)
(suspend)
)
(suspend-for
(seconds 0.25)
(set! (-> self sprite-pos x)
(lerp-scale -512.0 0.0 (sin (* 218.45334 (the float (- (current-time) time)))) 0.0 1.0)
)
)
(let ((gp-5 (current-time)))
(until (time-elapsed? gp-5 (seconds 2))
(suspend)
)
)
(let ((gp-6 (current-time)))
(until (time-elapsed? gp-6 (seconds 0.25))
(set! (-> self sprite-pos x)
(lerp-scale 0.0 512.0 (sin (* 218.45334 (the float (- (current-time) gp-6)))) 0.0 1.0)
)
(suspend)
)
(suspend-for (seconds 2))
(suspend-for
(seconds 0.25)
(set! (-> self sprite-pos x)
(lerp-scale 0.0 512.0 (sin (* 218.45334 (the float (- (current-time) time)))) 0.0 1.0)
)
)
(set! (-> self sprite-draw) (the-as uint 1))
(set-vector! (-> self sprite-pos) 30.0 -240.0 0.0 1.0)
(let ((gp-7 (current-time)))
(until (time-elapsed? gp-7 (seconds 0.25))
(set! (-> self sprite-pos y)
(lerp-scale -240.0 270.0 (sin (* 218.45334 (the float (- (current-time) gp-7)))) 0.0 1.0)
)
(suspend)
)
(suspend-for
(seconds 0.25)
(set! (-> self sprite-pos y)
(lerp-scale -240.0 270.0 (sin (* 218.45334 (the float (- (current-time) time)))) 0.0 1.0)
)
)
(let ((gp-8 (current-time)))
(until (time-elapsed? gp-8 (seconds 2))
(suspend)
)
)
(let ((gp-9 (current-time)))
(until (time-elapsed? gp-9 (seconds 0.25))
(set! (-> self sprite-pos y)
(lerp-scale 270.0 720.0 (sin (* 218.45334 (the float (- (current-time) gp-9)))) 0.0 1.0)
)
(suspend)
)
(suspend-for (seconds 2))
(suspend-for
(seconds 0.25)
(set! (-> self sprite-pos y)
(lerp-scale 270.0 720.0 (sin (* 218.45334 (the float (- (current-time) time)))) 0.0 1.0)
)
)
(set! (-> self sprite-draw) (the-as uint 2))
(set-vector! (-> self sprite-pos) 20.0 40.0 0.0 1.0)
(let ((gp-10 (current-time)))
(until (time-elapsed? gp-10 (seconds 0.25))
(set! (-> self sprite-pos y)
(lerp-scale 720.0 20.0 (sin (* 218.45334 (the float (- (current-time) gp-10)))) 0.0 1.0)
)
(suspend)
)
(suspend-for
(seconds 0.25)
(set! (-> self sprite-pos y)
(lerp-scale 720.0 20.0 (sin (* 218.45334 (the float (- (current-time) time)))) 0.0 1.0)
)
)
(let ((a1-21 (new 'stack-no-clear 'array 'symbol 6)))
(set! (-> a1-21 5) #f)
@ -697,73 +680,27 @@
(set! (-> a1-21 0) 'demo)
(want-levels *load-state* a1-21)
)
(let ((gp-11 (current-time)))
(until (time-elapsed? gp-11 (seconds 2))
(suspend)
)
)
(let ((gp-12 (current-time)))
(until (time-elapsed? gp-12 (seconds 0.25))
(set! (-> self sprite-pos y)
(lerp-scale 20.0 -720.0 (sin (* 218.45334 (the float (- (current-time) gp-12)))) 0.0 1.0)
)
(suspend)
)
(suspend-for (seconds 2))
(suspend-for
(seconds 0.25)
(set! (-> self sprite-pos y)
(lerp-scale 20.0 -720.0 (sin (* 218.45334 (the float (- (current-time) time)))) 0.0 1.0)
)
)
)
(else
(let ((gp-13 (current-time)))
(until (time-elapsed? gp-13 (seconds 0.38))
(suspend)
)
)
(let ((gp-14 (current-time)))
(until (time-elapsed? gp-14 (seconds 2))
(suspend)
)
)
(let ((gp-15 (current-time)))
(until (time-elapsed? gp-15 (seconds 0.25))
(suspend)
)
)
(let ((gp-16 (current-time)))
(until (time-elapsed? gp-16 (seconds 0.25))
(suspend)
)
)
(let ((gp-17 (current-time)))
(until (time-elapsed? gp-17 (seconds 2))
(suspend)
)
)
(let ((gp-18 (current-time)))
(until (time-elapsed? gp-18 (seconds 0.25))
(suspend)
)
)
(let ((gp-19 (current-time)))
(until (time-elapsed? gp-19 (seconds 0.25))
(suspend)
)
)
(let ((gp-20 (current-time)))
(until (time-elapsed? gp-20 (seconds 2))
(suspend)
)
)
(let ((gp-21 (current-time)))
(until (time-elapsed? gp-21 (seconds 0.25))
(suspend)
)
)
)
)
(let ((gp-22 (current-time)))
(until (time-elapsed? gp-22 (seconds 3))
(suspend)
(suspend-for (seconds 0.38))
(suspend-for (seconds 2))
(suspend-for (seconds 0.25))
(suspend-for (seconds 0.25))
(suspend-for (seconds 2))
(suspend-for (seconds 0.25))
(suspend-for (seconds 0.25))
(suspend-for (seconds 2))
(suspend-for (seconds 0.25))
)
)
(suspend-for (seconds 3))
(demo-screen-change -1 -1 #f #t)
(set! (-> *game-info* demo-state) (the-as uint 1))
(start 'play (get-continue-by-name *game-info* "demo-start"))

View File

@ -440,22 +440,14 @@
(ja :num! (seek! max f30-0))
)
(ja-no-eval :group! dig-bomb-crate-cylinder-idle-ja :num! (seek!) :frame-num 0.0)
(let ((gp-1 (current-time)))
(until (time-elapsed? gp-1 (seconds 0.5))
(suspend)
)
)
(suspend-for (seconds 0.5))
(ja-no-eval :group! dig-bomb-crate-cylinder-pulse-ja :num! (seek! max f30-0) :frame-num 0.0)
(until (ja-done? 0)
(suspend)
(ja :num! (seek! max f30-0))
)
(ja-no-eval :group! dig-bomb-crate-cylinder-idle-ja :num! (seek!) :frame-num 0.0)
(let ((gp-2 (current-time)))
(until (time-elapsed? gp-2 (seconds 0.5))
(suspend)
)
)
(suspend-for (seconds 0.5))
(ja-no-eval :group! dig-bomb-crate-cylinder-pulse-ja :num! (seek! max f30-0) :frame-num 0.0)
(until (ja-done? 0)
(suspend)
@ -463,33 +455,21 @@
)
)
(ja-no-eval :group! dig-bomb-crate-cylinder-idle-ja :num! (seek!) :frame-num 0.0)
(let ((gp-3 (current-time)))
(until (time-elapsed? gp-3 (seconds 0.5))
(suspend)
)
)
(suspend-for (seconds 0.5))
(ja-no-eval :group! dig-bomb-crate-cylinder-pulse-ja :num! (seek! max 0.375) :frame-num 0.0)
(until (ja-done? 0)
(suspend)
(ja :num! (seek! max 0.375))
)
(ja-no-eval :group! dig-bomb-crate-cylinder-idle-ja :num! (seek!) :frame-num 0.0)
(let ((gp-4 (current-time)))
(until (time-elapsed? gp-4 (seconds 0.25))
(suspend)
)
)
(suspend-for (seconds 0.25))
(ja-no-eval :group! dig-bomb-crate-cylinder-pulse-ja :num! (seek! max 0.4375) :frame-num 0.0)
(until (ja-done? 0)
(suspend)
(ja :num! (seek! max 0.4375))
)
(ja-no-eval :group! dig-bomb-crate-cylinder-idle-ja :num! (seek!) :frame-num 0.0)
(let ((gp-5 (current-time)))
(until (time-elapsed? gp-5 (seconds 0.125))
(suspend)
)
)
(suspend-for (seconds 0.125))
(dotimes (gp-6 12)
(ja-no-eval :group! dig-bomb-crate-cylinder-pulse-ja :num! (seek! max 0.437) :frame-num 0.0)
(until (ja-done? 0)
@ -497,11 +477,7 @@
(ja :num! (seek! max 0.437))
)
(ja-no-eval :group! dig-bomb-crate-cylinder-idle-ja :num! (seek!) :frame-num 0.0)
(let ((s5-0 (current-time)))
(until (time-elapsed? s5-0 (seconds 0.05))
(suspend)
)
)
(suspend-for (seconds 0.05))
)
(go-virtual die)
)
@ -876,11 +852,7 @@
)
)
(suspend)
(let ((gp-2 (current-time)))
(until (time-elapsed? gp-2 (seconds 4))
(suspend)
)
)
(suspend-for (seconds 4))
(cleanup-for-death self)
)
)
@ -888,11 +860,11 @@
;; WARN: Return type mismatch object vs none.
(defmethod init-from-entity! ((this dig-bomb-crate) (arg0 entity-actor))
"Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that.
This commonly includes things such as:
- stack size
- collision information
- loading the skeleton group / bones
- sounds"
This commonly includes things such as:
- stack size
- collision information
- loading the skeleton group / bones
- sounds"
(let ((s4-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player))))
(set! (-> s4-0 penetrated-by)
(penetrate

View File

@ -261,42 +261,24 @@
:virtual #t
:trans rider-trans
:code (behavior ()
(let ((gp-0 (current-time)))
(until (time-elapsed? gp-0 (the int (-> self cycle-offset)))
(suspend)
)
)
(suspend-for (the int (-> self cycle-offset)))
(until #f
(let ((gp-1 (current-time)))
(until (time-elapsed? gp-1 (the int (-> self cycle-time)))
(suspend)
)
)
(suspend-for (the int (-> self cycle-time)))
(activate! (-> self smush) -1.0 60 225 1.0 1.0 (-> self clock))
(sound-play "spikey-shake" :position (-> self root trans))
(let ((gp-3 (current-time)))
(until (time-elapsed? gp-3 (seconds 0.75))
(set! (-> self shudder-angle) (* 364.0889 (update! (-> self smush))))
(suspend)
)
)
(suspend-for (seconds 0.75) (set! (-> self shudder-angle) (* 364.0889 (update! (-> self smush)))))
(set! (-> self shudder-angle) 0.0)
(set-zero! (-> self smush))
(let ((gp-4 (current-time)))
(until (time-elapsed? gp-4 (seconds 0.25))
(suspend)
)
)
(suspend-for (seconds 0.25))
(sound-play "spikey-turn" :position (-> self root trans))
(let* ((f0-7 1.0)
(f30-1 (* 65536.0 f0-7))
(gp-6 (current-time))
)
(until (time-elapsed? gp-6 (seconds 1))
(suspend-for
(seconds 1)
(set! (-> self rot-angle)
(the float (sar (shl (the int (+ (-> self rot-angle) (* f30-1 (seconds-per-frame)))) 48) 48))
)
(suspend)
)
)
(let ((v1-42 #x10000))
@ -329,11 +311,11 @@
;; WARN: Return type mismatch object vs none.
(defmethod init-from-entity! ((this dig-spikey-step) (arg0 entity-actor))
"Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that.
This commonly includes things such as:
- stack size
- collision information
- loading the skeleton group / bones
- sounds"
This commonly includes things such as:
- stack size
- collision information
- loading the skeleton group / bones
- sounds"
(local-vars (sv-16 int))
(let ((s4-0 (new 'process 'collide-shape this (collide-list-enum hit-by-player))))
(let ((s3-0 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 0) (the-as uint 0))))
@ -438,11 +420,7 @@ This commonly includes things such as:
)
(sound-play "spikey-break")
(suspend)
(let ((gp-2 (current-time)))
(until (time-elapsed? gp-2 (seconds 4))
(suspend)
)
)
(suspend-for (seconds 4))
(let ((t9-7 (-> (method-of-type projectile-bounce die) code)))
(if t9-7
((the-as (function none) t9-7))
@ -672,11 +650,7 @@ This commonly includes things such as:
:virtual #t
:code (behavior ()
(sound-play "spikey-door")
(let ((gp-1 (current-time)))
(until (time-elapsed? gp-1 (seconds 0.1))
(suspend)
)
)
(suspend-for (seconds 0.1))
(let ((gp-2 (new 'stack-no-clear 'vector))
(s5-1 (new 'static 'vector :x -16384.0 :y -16384.0))
)
@ -718,11 +692,11 @@ This commonly includes things such as:
;; WARN: Return type mismatch object vs none.
(defmethod init-from-entity! ((this dig-spikey-sphere-door) (arg0 entity-actor))
"Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that.
This commonly includes things such as:
- stack size
- collision information
- loading the skeleton group / bones
- sounds"
This commonly includes things such as:
- stack size
- collision information
- loading the skeleton group / bones
- sounds"
(set! (-> this root) (new 'process 'trsqv))
(process-drawable-from-entity! this arg0)
(initialize-skeleton
@ -942,11 +916,11 @@ This commonly includes things such as:
;; WARN: Return type mismatch object vs none.
(defmethod init-from-entity! ((this dig-balloon-lurker) (arg0 entity-actor))
"Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that.
This commonly includes things such as:
- stack size
- collision information
- loading the skeleton group / bones
- sounds"
This commonly includes things such as:
- stack size
- collision information
- loading the skeleton group / bones
- sounds"
(let ((s4-0 (new 'process 'collide-shape this (collide-list-enum hit-by-player))))
(let ((s3-0 (new 'process 'collide-shape-prim-group s4-0 (the-as uint 3) 0)))
(set! (-> s4-0 total-prims) (the-as uint 4))
@ -1046,6 +1020,7 @@ This commonly includes things such as:
)
(defmethod deactivate ((this dig-balloon-lurker))
"Make a process dead, clean it up, remove it from the active pool, and return to dead pool."
(sound-stop (-> this pedal-sound-id))
((method-of-type process-drawable deactivate) this)
(none)
@ -1198,6 +1173,7 @@ This commonly includes things such as:
)
(defmethod deactivate ((this dig-wheel-step))
"Make a process dead, clean it up, remove it from the active pool, and return to dead pool."
(sound-stop (-> this wheel-sound-id))
((method-of-type process-drawable deactivate) this)
(none)
@ -1206,11 +1182,11 @@ This commonly includes things such as:
;; WARN: Return type mismatch object vs none.
(defmethod init-from-entity! ((this dig-wheel-step) (arg0 entity-actor))
"Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that.
This commonly includes things such as:
- stack size
- collision information
- loading the skeleton group / bones
- sounds"
This commonly includes things such as:
- stack size
- collision information
- loading the skeleton group / bones
- sounds"
(let ((s4-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player))))
(let ((s3-0 (new 'process 'collide-shape-prim-group s4-0 (the-as uint 3) 0)))
(set! (-> s4-0 total-prims) (the-as uint 4))
@ -1895,11 +1871,11 @@ This commonly includes things such as:
;; WARN: Return type mismatch object vs none.
(defmethod init-from-entity! ((this dig-stomp-block-controller) (arg0 entity-actor))
"Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that.
This commonly includes things such as:
- stack size
- collision information
- loading the skeleton group / bones
- sounds"
This commonly includes things such as:
- stack size
- collision information
- loading the skeleton group / bones
- sounds"
(set! (-> this played-fall?) #f)
(set! (-> this root) (new 'process 'trsqv))
(process-drawable-from-entity! this arg0)
@ -1921,6 +1897,7 @@ This commonly includes things such as:
)
(defmethod run-logic? ((this dig-totem))
"Should this process be run? Checked by execute-process-tree."
#t
)
@ -1932,11 +1909,11 @@ This commonly includes things such as:
;; WARN: Return type mismatch object vs none.
(defmethod init-from-entity! ((this dig-totem) (arg0 entity-actor))
"Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that.
This commonly includes things such as:
- stack size
- collision information
- loading the skeleton group / bones
- sounds"
This commonly includes things such as:
- stack size
- collision information
- loading the skeleton group / bones
- sounds"
(let ((s4-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player))))
(let ((v1-2 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 0) (the-as uint 0))))
(set! (-> v1-2 prim-core collide-as) (collide-spec obstacle))

View File

@ -192,11 +192,11 @@
(defmethod init-from-entity! ((this drill-flip-step) (arg0 entity-actor))
"Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that.
This commonly includes things such as:
- stack size
- collision information
- loading the skeleton group / bones
- sounds"
This commonly includes things such as:
- stack size
- collision information
- loading the skeleton group / bones
- sounds"
(init-plat-collision! this)
(process-drawable-from-entity! this arg0)
(initialize-skeleton this (the-as skeleton-group (get-skel this)) (the-as pair 0))
@ -345,11 +345,11 @@ This commonly includes things such as:
;; WARN: Return type mismatch object vs none.
(defmethod init-from-entity! ((this drill-falling-door) (arg0 entity-actor))
"Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that.
This commonly includes things such as:
- stack size
- collision information
- loading the skeleton group / bones
- sounds"
This commonly includes things such as:
- stack size
- collision information
- loading the skeleton group / bones
- sounds"
(let ((s4-0 (new 'process 'collide-shape this (collide-list-enum hit-by-player))))
(let ((s3-0 (new 'process 'collide-shape-prim-group s4-0 (the-as uint 2) 0)))
(set! (-> s4-0 total-prims) (the-as uint 3))
@ -449,11 +449,11 @@ This commonly includes things such as:
;; WARN: Return type mismatch object vs none.
(defmethod init-from-entity! ((this drill-sliding-door) (arg0 entity-actor))
"Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that.
This commonly includes things such as:
- stack size
- collision information
- loading the skeleton group / bones
- sounds"
This commonly includes things such as:
- stack size
- collision information
- loading the skeleton group / bones
- sounds"
(let ((s4-0 (new 'process 'collide-shape this (collide-list-enum hit-by-player))))
(let ((s3-0 (new 'process 'collide-shape-prim-group s4-0 (the-as uint 2) 0)))
(set! (-> s4-0 total-prims) (the-as uint 3))
@ -604,11 +604,11 @@ This commonly includes things such as:
;; WARN: Return type mismatch object vs none.
(defmethod init-from-entity! ((this drill-breakable-barrel) (arg0 entity-actor))
"Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that.
This commonly includes things such as:
- stack size
- collision information
- loading the skeleton group / bones
- sounds"
This commonly includes things such as:
- stack size
- collision information
- loading the skeleton group / bones
- sounds"
(let ((s4-0 (new 'process 'collide-shape this (collide-list-enum hit-by-player))))
(let ((v1-2 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 0) (the-as uint 0))))
(set! (-> v1-2 prim-core collide-as) (collide-spec obstacle))
@ -788,11 +788,7 @@ This commonly includes things such as:
)
)
)
(let ((gp-2 (current-time)))
(until (time-elapsed? gp-2 (seconds 0.5))
(suspend)
)
)
(suspend-for (seconds 0.5))
(cleanup-for-death self)
)
)
@ -818,11 +814,11 @@ This commonly includes things such as:
;; WARN: Return type mismatch object vs none.
(defmethod init-from-entity! ((this drill-metalhead-eggs) (arg0 entity-actor))
"Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that.
This commonly includes things such as:
- stack size
- collision information
- loading the skeleton group / bones
- sounds"
This commonly includes things such as:
- stack size
- collision information
- loading the skeleton group / bones
- sounds"
(local-vars (sv-16 res-tag))
(init-collision! this)
(process-drawable-from-entity! this arg0)
@ -1145,11 +1141,11 @@ This commonly includes things such as:
;; WARN: Return type mismatch object vs none.
(defmethod init-from-entity! ((this drill-bridge-shot) (arg0 entity-actor))
"Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that.
This commonly includes things such as:
- stack size
- collision information
- loading the skeleton group / bones
- sounds"
This commonly includes things such as:
- stack size
- collision information
- loading the skeleton group / bones
- sounds"
(let ((s4-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player))))
(let ((s3-0 (new 'process 'collide-shape-prim-group s4-0 (the-as uint 3) 0)))
(set! (-> s4-0 total-prims) (the-as uint 4))
@ -1233,11 +1229,11 @@ This commonly includes things such as:
;; WARN: Return type mismatch object vs none.
(defmethod init-from-entity! ((this drill-drill) (arg0 entity-actor))
"Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that.
This commonly includes things such as:
- stack size
- collision information
- loading the skeleton group / bones
- sounds"
This commonly includes things such as:
- stack size
- collision information
- loading the skeleton group / bones
- sounds"
(set! (-> this root) (new 'process 'trsqv))
(process-drawable-from-entity! this arg0)
(initialize-skeleton

View File

@ -26,11 +26,11 @@
;; WARN: Return type mismatch object vs none.
(defmethod init-from-entity! ((this forest-hover-manager) (arg0 entity-actor))
"Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that.
This commonly includes things such as:
- stack size
- collision information
- loading the skeleton group / bones
- sounds"
This commonly includes things such as:
- stack size
- collision information
- loading the skeleton group / bones
- sounds"
(set! (-> this entity) arg0)
(hover-enemy-manager-init! this *forest-protect-battle*)
(set! (-> this transport-actor 0) (entity-actor-lookup arg0 'alt-actor 0))
@ -343,11 +343,7 @@ This commonly includes things such as:
)
)
)
(let ((gp-1 (current-time)))
(until (time-elapsed? gp-1 (seconds 2))
(suspend)
)
)
(suspend-for (seconds 2))
(send-event *camera* 'change-target #f)
(cleanup-for-death self)
)
@ -381,6 +377,7 @@ This commonly includes things such as:
)
(defmethod deactivate ((this forest-youngsamos))
"Make a process dead, clean it up, remove it from the active pool, and return to dead pool."
(if (valid? (-> this hud) (the-as type #f) "" #t 0)
(send-event (handle->process (-> this hud)) 'hide-and-die)
)
@ -392,12 +389,13 @@ This commonly includes things such as:
;; WARN: Return type mismatch object vs none.
(defmethod init-from-entity! ((this forest-youngsamos) (arg0 entity-actor))
"Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that.
This commonly includes things such as:
- stack size
- collision information
- loading the skeleton group / bones
- sounds"
(stack-size-set! (-> this main-thread) 384) ;; og:preserve-this
This commonly includes things such as:
- stack size
- collision information
- loading the skeleton group / bones
- sounds"
;; og:preserve-this
(stack-size-set! (-> this main-thread) 384)
(let ((s4-0 (new 'process 'collide-shape-moving this (collide-list-enum hit-by-others))))
(set! (-> s4-0 dynam) (copy *standard-dynamics* 'process))
(set! (-> s4-0 reaction) forest-youngsamos-bounce-reaction)
@ -596,11 +594,7 @@ This commonly includes things such as:
(lambda :behavior task-manager
()
(set-time! (-> self start-time))
(let ((gp-0 (current-time)))
(until (time-elapsed? gp-0 (seconds 0.5))
(suspend)
)
)
(suspend-for (seconds 0.5))
(let ((s5-0 (entity-by-name "transport-level-1"))
(gp-1 (entity-by-name "transport-level-2"))
)
@ -669,11 +663,7 @@ This commonly includes things such as:
)
)
)
(let ((s3-0 (current-time)))
(until (time-elapsed? s3-0 (seconds 15))
(suspend)
)
)
(suspend-for (seconds 15))
(let ((a1-4 (new 'stack-no-clear 'event-message-block)))
(set! (-> a1-4 from) (process->ppointer self))
(set! (-> a1-4 num-params) 1)
@ -707,11 +697,7 @@ This commonly includes things such as:
)
)
(dotimes (s3-1 3)
(let ((s2-0 (current-time)))
(until (time-elapsed? s2-0 (seconds 10))
(suspend)
)
)
(suspend-for (seconds 10))
(let ((a1-6 (new 'stack-no-clear 'event-message-block)))
(set! (-> a1-6 from) (process->ppointer self))
(set! (-> a1-6 num-params) 1)
@ -744,11 +730,7 @@ This commonly includes things such as:
)
)
)
(let ((s2-1 (current-time)))
(until (time-elapsed? s2-1 (seconds 10))
(suspend)
)
)
(suspend-for (seconds 10))
(let ((a1-8 (new 'stack-no-clear 'event-message-block)))
(set! (-> a1-8 from) (process->ppointer self))
(set! (-> a1-8 num-params) 1)
@ -782,11 +764,7 @@ This commonly includes things such as:
)
)
)
(let ((s3-2 (current-time)))
(until (time-elapsed? s3-2 (seconds 10))
(suspend)
)
)
(suspend-for (seconds 10))
(let ((a1-10 (new 'stack-no-clear 'event-message-block)))
(set! (-> a1-10 from) (process->ppointer self))
(set! (-> a1-10 num-params) 1)
@ -819,11 +797,7 @@ This commonly includes things such as:
)
)
)
(let ((s3-3 (current-time)))
(until (time-elapsed? s3-3 (seconds 10))
(suspend)
)
)
(suspend-for (seconds 10))
(dotimes (s3-4 10)
(let ((v1-114 s4-0))
(if (not (if v1-114
@ -833,11 +807,7 @@ This commonly includes things such as:
(goto cfg-74)
)
)
(let ((s2-2 (current-time)))
(until (time-elapsed? s2-2 (seconds 1))
(suspend)
)
)
(suspend-for (seconds 1))
)
(label cfg-74)
(let ((a1-12 (new 'stack-no-clear 'event-message-block)))
@ -912,37 +882,21 @@ This commonly includes things such as:
)
)
)
(let ((s3-5 (current-time)))
(until (time-elapsed? s3-5 (seconds 1))
(suspend)
)
)
)
)
(let ((s4-1 (current-time)))
(until (time-elapsed? s4-1 (seconds 0.5))
(suspend)
(suspend-for (seconds 1))
)
)
(suspend-for (seconds 0.5))
(set-setting! 'entity-name "camera-260" 0.0 0)
(set-setting! 'process-mask 'set 0.0 (process-mask movie enemy))
(process-grab? *target* #f)
(let ((s4-2 (current-time)))
(until (time-elapsed? s4-2 (seconds 0.5))
(suspend)
)
)
(suspend-for (seconds 0.5))
(send-event
(if s5-0
(-> s5-0 extra process)
)
'leave
)
(let ((s5-1 (current-time)))
(until (time-elapsed? s5-1 (seconds 0.2))
(suspend)
)
)
(suspend-for (seconds 0.2))
(send-event
(if gp-1
(-> gp-1 extra process)
@ -950,19 +904,11 @@ This commonly includes things such as:
'leave
)
)
(let ((gp-2 (current-time)))
(until (time-elapsed? gp-2 (seconds 3))
(suspend)
)
)
(suspend-for (seconds 3))
(remove-setting! 'entity-name)
(remove-setting! 'process-mask)
(process-release? *target*)
(let ((gp-3 (current-time)))
(until (time-elapsed? gp-3 (seconds 3))
(suspend)
)
)
(suspend-for (seconds 3))
(go-virtual complete)
(while *target*
(suspend)

View File

@ -48,19 +48,11 @@
:virtual #t
:event (-> (method-of-type fort-elec-switch idle) event)
:code (behavior ()
(let ((gp-0 (current-time)))
(until (time-elapsed? gp-0 (seconds 16))
(suspend)
)
)
(suspend-for (seconds 16))
(until (logtest? (-> self draw status) (draw-control-status on-screen))
(suspend)
)
(let ((gp-1 (current-time)))
(until (time-elapsed? gp-1 (seconds 0.4))
(suspend)
)
)
(suspend-for (seconds 0.4))
(talker-spawn-func (-> *talker-speech* 86) *entity-pool* (target-pos 0) (the-as region #f))
(sleep-code)
)
@ -137,11 +129,7 @@
)
)
(sound-play "elec-switch")
(let ((gp-2 (current-time)))
(until (time-elapsed? gp-2 (seconds 0.5))
(suspend)
)
)
(suspend-for (seconds 0.5))
(let ((v1-22 #t))
(when (-> self switch-group)
(dotimes (a0-11 (-> self switch-group-count))
@ -173,11 +161,7 @@
)
)
)
(let ((gp-3 (current-time)))
(until (time-elapsed? gp-3 (seconds 0.75))
(suspend)
)
)
(suspend-for (seconds 0.75))
(let ((a1-14 (new 'stack-no-clear 'event-message-block)))
(set! (-> a1-14 from) (process->ppointer self))
(set! (-> a1-14 num-params) 0)
@ -193,11 +177,7 @@
)
)
)
(let ((gp-4 (current-time)))
(until (time-elapsed? gp-4 (seconds 1.5))
(suspend)
)
)
(suspend-for (seconds 1.5))
(remove-setting! 'entity-name)
(remove-setting! 'process-mask)
(process-release? *target*)
@ -223,21 +203,21 @@
)
;; WARN: Return type mismatch process-drawable vs fort-elec-switch.
(defmethod relocate ((this fort-elec-switch) (arg0 int))
(defmethod relocate ((this fort-elec-switch) (offset int))
(if (nonzero? (-> this l-bolt))
(&+! (-> this l-bolt) arg0)
(&+! (-> this l-bolt) offset)
)
(the-as fort-elec-switch ((method-of-type process-drawable relocate) this arg0))
(the-as fort-elec-switch ((method-of-type process-drawable relocate) this offset))
)
;; WARN: Return type mismatch object vs none.
(defmethod init-from-entity! ((this fort-elec-switch) (arg0 entity-actor))
"Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that.
This commonly includes things such as:
- stack size
- collision information
- loading the skeleton group / bones
- sounds"
This commonly includes things such as:
- stack size
- collision information
- loading the skeleton group / bones
- sounds"
(local-vars (sv-16 res-tag))
;; og:preserve-this added
(stack-size-set! (-> this top-thread) 512)
@ -447,11 +427,11 @@ This commonly includes things such as:
;; WARN: Return type mismatch object vs none.
(defmethod init-from-entity! ((this fort-fence) (arg0 entity-actor))
"Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that.
This commonly includes things such as:
- stack size
- collision information
- loading the skeleton group / bones
- sounds"
This commonly includes things such as:
- stack size
- collision information
- loading the skeleton group / bones
- sounds"
(stack-size-set! (-> this main-thread) 512)
(fort-fence-method-23 this)
(process-drawable-from-entity! this arg0)

View File

@ -134,11 +134,7 @@
)
)
)
(let ((gp-2 (current-time)))
(until (time-elapsed? gp-2 (seconds 0.5))
(suspend)
)
)
(suspend-for (seconds 0.5))
(cleanup-for-death self)
)
)
@ -146,11 +142,11 @@
;; WARN: Return type mismatch object vs none.
(defmethod init-from-entity! ((this fort-dump-bomb-a) (arg0 entity-actor))
"Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that.
This commonly includes things such as:
- stack size
- collision information
- loading the skeleton group / bones
- sounds"
This commonly includes things such as:
- stack size
- collision information
- loading the skeleton group / bones
- sounds"
(let ((s4-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player))))
(let ((v1-2 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 0) (the-as uint 0))))
(set! (-> v1-2 prim-core collide-as) (collide-spec bot))
@ -355,11 +351,7 @@ This commonly includes things such as:
(-> gp-2 ppointer)
)
)
(let ((gp-3 (current-time)))
(until (time-elapsed? gp-3 (seconds 1))
(suspend)
)
)
(suspend-for (seconds 1))
(send-event (ppointer->process (-> self parent)) 'died)
(sleep-code)
)
@ -371,6 +363,7 @@ This commonly includes things such as:
)
(defmethod deactivate ((this fort-missile-target))
"Make a process dead, clean it up, remove it from the active pool, and return to dead pool."
(sound-stop (the-as sound-id (-> this sound-id)))
(call-parent-method this)
(none)
@ -521,42 +514,22 @@ This commonly includes things such as:
)
)
:code (behavior ()
(let ((gp-0 (current-time)))
(until (time-elapsed? gp-0 (seconds 8))
(suspend)
)
)
(suspend-for (seconds 8))
(until (logtest? (-> self draw status) (draw-control-status on-screen))
(suspend)
)
(when (= (-> self bomb-count) 4)
(let ((gp-1 (current-time)))
(until (time-elapsed? gp-1 (seconds 0.4))
(suspend)
)
)
(suspend-for (seconds 0.4))
(add-process *gui-control* self (gui-channel daxter) (gui-action play) "ds017" -99.0 0)
)
(let ((gp-2 (current-time)))
(until (time-elapsed? gp-2 (seconds 20))
(suspend)
)
)
(suspend-for (seconds 20))
(if (= (-> self bomb-count) 4)
(add-process *gui-control* self (gui-channel daxter) (gui-action play) "ds018" -99.0 0)
)
(while (> (-> self bomb-count) 0)
(let ((gp-3 (current-time)))
(until (time-elapsed? gp-3 (seconds 0.2))
(suspend)
)
)
)
(let ((gp-4 (current-time)))
(until (time-elapsed? gp-4 (seconds 0.8))
(suspend)
)
(suspend-for (seconds 0.2))
)
(suspend-for (seconds 0.8))
(go-virtual missile-countdown)
)
:post (behavior ()
@ -599,22 +572,14 @@ This commonly includes things such as:
)
)
(set-fordumpc-light-flag! #t)
(let ((gp-0 (current-time)))
(until (time-elapsed? gp-0 (seconds 0.2))
(suspend)
)
)
(suspend-for (seconds 0.2))
(while (not (process-grab? *target* #f))
(suspend)
)
(set-setting! 'entity-name "camera-182" 0.0 0)
(set-setting! 'process-mask 'set 0.0 (process-mask movie enemy))
(task-node-close! (game-task-node fortress-dump-missile))
(let ((gp-1 (current-time)))
(until (time-elapsed? gp-1 (seconds 0.75))
(suspend)
)
)
(suspend-for (seconds 0.75))
(let ((a1-5 (new 'stack-no-clear 'event-message-block)))
(set! (-> a1-5 from) (process->ppointer self))
(set! (-> a1-5 num-params) 0)
@ -645,11 +610,7 @@ This commonly includes things such as:
)
)
)
(let ((gp-2 (current-time)))
(until (time-elapsed? gp-2 (seconds 1.5))
(suspend)
)
)
(suspend-for (seconds 1.5))
(remove-setting! 'entity-name)
(remove-setting! 'process-mask)
(process-release? *target*)
@ -672,21 +633,13 @@ This commonly includes things such as:
(set! (-> *game-info* timer) 0)
(set! (-> self hud) (ppointer->handle (process-spawn hud-timer :init hud-init-by-other :to *target*)))
)
(let ((gp-4 (current-time)))
(until (time-elapsed? gp-4 (seconds 0.4))
(suspend)
)
)
(suspend-for (seconds 0.4))
(set! (-> self explosion-sound-id)
(add-process *gui-control* self (gui-channel background) (gui-action queue) "big-xplo" -99.0 0)
)
(dotimes (gp-5 10)
(set! (-> *game-info* timer) (the-as time-frame (- 3000 (the int (* 300.0 (the float gp-5))))))
(let ((s5-0 (current-time)))
(until (time-elapsed? s5-0 (seconds 1))
(suspend)
)
)
(suspend-for (seconds 1))
)
(go-virtual die)
)
@ -722,11 +675,7 @@ This commonly includes things such as:
(remove-setting! 'allow-progress)
)
:code (behavior ()
(let ((gp-0 (current-time)))
(until (time-elapsed? gp-0 (seconds 0.4))
(suspend)
)
)
(suspend-for (seconds 0.4))
(logior! (-> self draw status) (draw-control-status no-draw))
(when *scene-player*
(cleanup-for-death self)
@ -884,11 +833,7 @@ This commonly includes things such as:
(suspend)
)
)
(let ((gp-5 (current-time)))
(until (time-elapsed? gp-5 (seconds 10))
(suspend)
)
)
(suspend-for (seconds 10))
(cleanup-for-death self)
)
)
@ -899,6 +844,7 @@ This commonly includes things such as:
)
(defmethod deactivate ((this fort-missile))
"Make a process dead, clean it up, remove it from the active pool, and return to dead pool."
(set-fordumpc-light-flag! #f)
(send-event (handle->process (-> this hud)) 'hide-and-die)
(if (nonzero? (-> this part-doom))
@ -909,21 +855,21 @@ This commonly includes things such as:
(none)
)
(defmethod relocate ((this fort-missile) (arg0 int))
(defmethod relocate ((this fort-missile) (offset int))
(if (nonzero? (-> this part-doom))
(&+! (-> this part-doom) arg0)
(&+! (-> this part-doom) offset)
)
(call-parent-method this arg0)
(call-parent-method this offset)
)
;; WARN: Return type mismatch object vs none.
(defmethod init-from-entity! ((this fort-missile) (arg0 entity-actor))
"Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that.
This commonly includes things such as:
- stack size
- collision information
- loading the skeleton group / bones
- sounds"
This commonly includes things such as:
- stack size
- collision information
- loading the skeleton group / bones
- sounds"
(stack-size-set! (-> this main-thread) 512)
(let ((s4-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player))))
(let ((s3-0 (new 'process 'collide-shape-prim-group s4-0 (the-as uint 2) 0)))

View File

@ -240,12 +240,10 @@
(defstate die (fort-roboscreen)
:virtual #t
:code (behavior ()
(let ((gp-0 (current-time)))
(until (time-elapsed? gp-0 (seconds 1))
(seek! (-> self transition) 0.0 (seconds-per-frame))
(set-roboscreen-alpha! (-> self transition))
(suspend)
)
(suspend-for
(seconds 1)
(seek! (-> self transition) 0.0 (seconds-per-frame))
(set-roboscreen-alpha! (-> self transition))
)
)
)
@ -316,6 +314,7 @@
)
(defmethod deactivate ((this fort-roboscreen))
"Make a process dead, clean it up, remove it from the active pool, and return to dead pool."
(disable *screen-filter*)
(set-roboscreen-alpha! 0.0)
(call-parent-method this)
@ -537,19 +536,19 @@
)
;; WARN: Return type mismatch process-drawable vs fort-robotank-reticle.
(defmethod relocate ((this fort-robotank-reticle) (arg0 int))
(defmethod relocate ((this fort-robotank-reticle) (offset int))
(if (nonzero? (-> this shadow-jmod))
(&+! (-> this shadow-jmod) arg0)
(&+! (-> this shadow-jmod) offset)
)
(if (nonzero? (-> this sight-jmod))
(&+! (-> this sight-jmod) arg0)
(&+! (-> this sight-jmod) offset)
)
(dotimes (v1-8 3)
(if (nonzero? (-> this ring-jmod v1-8))
(&+! (-> this ring-jmod v1-8) arg0)
(&+! (-> this ring-jmod v1-8) offset)
)
)
(the-as fort-robotank-reticle ((method-of-type process-drawable relocate) this arg0))
(the-as fort-robotank-reticle ((method-of-type process-drawable relocate) this offset))
)
;; WARN: Return type mismatch object vs none.
@ -1185,11 +1184,7 @@
(logior! (-> self flags) (robotank-turret-flags rotflags-3))
(set! (-> self firing-sight-pos quad) (-> self sight-pos quad))
(send-event (handle->process (-> self reticle)) 'lock)
(let ((gp-0 (current-time)))
(until (time-elapsed? gp-0 (seconds 0.5))
(suspend)
)
)
(suspend-for (seconds 0.5))
(let ((gp-2 (max 2 (min 3 (rand-vu-int-range 0 3)))))
0
(dotimes (s5-2 gp-2)
@ -1215,12 +1210,8 @@
)
)
)
(let ((f30-0 (rand-vu-float-range 0.05 0.43))
(s4-2 (current-time))
)
(until (time-elapsed? s4-2 (the int (* 300.0 f30-0)))
(suspend)
)
(let ((f30-0 (rand-vu-float-range 0.05 0.43)))
(suspend-for (the int (* 300.0 f30-0)))
)
)
)
@ -1238,11 +1229,8 @@
2.11
)
)
(gp-3 (current-time))
)
(until (time-elapsed? gp-3 (the int (* 300.0 f30-1)))
(suspend)
)
(suspend-for (the int (* 300.0 f30-1)))
)
)
#f
@ -1255,11 +1243,7 @@
:code (behavior ()
(send-event (handle->process (-> self reticle)) 'die)
(send-event (handle->process (-> self screen)) 'die)
(let ((gp-0 (current-time)))
(until (time-elapsed? gp-0 (seconds 1))
(suspend)
)
)
(suspend-for (seconds 1))
(while (-> self child)
(suspend)
)
@ -1267,6 +1251,7 @@
)
(defmethod deactivate ((this fort-robotank-turret))
"Make a process dead, clean it up, remove it from the active pool, and return to dead pool."
(logclear! (-> this flags) (robotank-turret-flags rotflags-6))
(sound-stop (-> this turn-sound-id))
(let ((a0-4 (handle->process (-> this screen))))
@ -1279,11 +1264,11 @@
)
;; WARN: Return type mismatch process-focusable vs fort-robotank-turret.
(defmethod relocate ((this fort-robotank-turret) (arg0 int))
(defmethod relocate ((this fort-robotank-turret) (offset int))
(if (nonzero? (-> this gun-elev-jmod))
(&+! (-> this gun-elev-jmod) arg0)
(&+! (-> this gun-elev-jmod) offset)
)
(the-as fort-robotank-turret ((method-of-type process-focusable relocate) this arg0))
(the-as fort-robotank-turret ((method-of-type process-focusable relocate) this offset))
)
;; WARN: Return type mismatch object vs none.

View File

@ -769,11 +769,7 @@
)
:code (behavior ()
(logclear! (-> self flags) (robotank-flags roflags-2))
(let ((gp-0 (current-time)))
(until (time-elapsed? gp-0 (seconds 0.1))
(suspend)
)
)
(suspend-for (seconds 0.1))
(logior! (-> self flags) (robotank-flags roflags-2))
(sleep-code)
)
@ -901,11 +897,7 @@
(remove-setting! 'process-mask)
(remove-setting! 'target-height)
(send-event (handle->process (-> self turret)) 'die)
(let ((gp-0 (current-time)))
(until (time-elapsed? gp-0 (seconds 2))
(suspend)
)
)
(suspend-for (seconds 2))
(while (-> self child)
(suspend)
)
@ -914,36 +906,37 @@
)
(defmethod deactivate ((this fort-robotank))
"Make a process dead, clean it up, remove it from the active pool, and return to dead pool."
(stop! (-> this idle-sound))
(stop! (-> this barrel-sound))
((method-of-type process-drawable deactivate) this)
(none)
)
(defmethod relocate ((this fort-robotank) (arg0 int))
(defmethod relocate ((this fort-robotank) (offset int))
(if (nonzero? (-> this barrel-part))
(&+! (-> this barrel-part) arg0)
(&+! (-> this barrel-part) offset)
)
(if (nonzero? (-> this roller-jmod))
(&+! (-> this roller-jmod) arg0)
(&+! (-> this roller-jmod) offset)
)
(if (nonzero? (-> this vibe-jmod))
(&+! (-> this vibe-jmod) arg0)
(&+! (-> this vibe-jmod) offset)
)
(if (nonzero? (-> this idle-sound))
(&+! (-> this idle-sound) arg0)
(&+! (-> this idle-sound) offset)
)
(if (nonzero? (-> this barrel-sound))
(&+! (-> this barrel-sound) arg0)
(&+! (-> this barrel-sound) offset)
)
(let ((v1-20 (-> this path-info)))
(when (nonzero? v1-20)
(dotimes (a0-2 (-> this path-count))
(if (nonzero? (-> v1-20 data a0-2 path))
(&+! (-> v1-20 data a0-2 path) arg0)
(&+! (-> v1-20 data a0-2 path) offset)
)
)
(&+! (-> this path-info) arg0)
(&+! (-> this path-info) offset)
)
)
(dotimes (v1-24 2)
@ -961,24 +954,24 @@
joint-mod
(-> (the-as (pointer uint32) (&+ (&+ (the-as (pointer uint32) this) (* 144 v1-24)) (* a0-4 16))) 55)
)
arg0
offset
)
)
)
)
)
)
(call-parent-method this arg0)
(call-parent-method this offset)
)
;; WARN: Return type mismatch object vs none.
(defmethod init-from-entity! ((this fort-robotank) (arg0 entity-actor))
"Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that.
This commonly includes things such as:
- stack size
- collision information
- loading the skeleton group / bones
- sounds"
This commonly includes things such as:
- stack size
- collision information
- loading the skeleton group / bones
- sounds"
(let ((s4-0 (new 'process 'collide-shape-moving this (collide-list-enum usually-hit-by-player))))
(set! (-> s4-0 dynam) (copy *standard-dynamics* 'process))
(set! (-> s4-0 reaction) cshape-reaction-default)

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