mirror of
https://github.com/open-goal/jak-project
synced 2026-08-24 15:37:01 -04:00
jak2: focus-test? macro, fix (zero? (logand ...)) -> (not (logtest? ...)) detection (#2321)
There are *a lot* of file changes and while I have carefully gone through every gsrc change to fix up manual patches, there might still be spots that I missed.
This commit is contained in:
@@ -1877,6 +1877,8 @@ std::string fixed_operator_to_string(FixedOperatorKind kind) {
|
||||
return "vector-length";
|
||||
case FixedOperatorKind::VECTOR_PLUS_FLOAT_TIMES:
|
||||
return "vector+float*!";
|
||||
case FixedOperatorKind::FOCUS_TEST:
|
||||
return "focus-test?";
|
||||
default:
|
||||
ASSERT(false);
|
||||
return "";
|
||||
|
||||
@@ -4574,6 +4574,63 @@ FormElement* try_make_nonzero_logtest(Form* in, FormPool& pool) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
FormElement* try_make_focus_test_macro(Form* in, FormPool& pool) {
|
||||
/*
|
||||
(defmacro focus-test? (pfoc &rest status)
|
||||
`(logtest? (-> (the process-focusable ,pfoc) focus-status) (focus-status ,@status)))
|
||||
|
||||
pfoc first:
|
||||
(logtest? (-> self focus-status) (focus-status dead hit grabbed))
|
||||
|
||||
enum first:
|
||||
(logtest? (focus-status mech) (-> a1-2 focus-status))
|
||||
*/
|
||||
auto logtest_focus_matcher_pfoc = Matcher::op(
|
||||
GenericOpMatcher::fixed(FixedOperatorKind::LOGTEST),
|
||||
{Matcher::deref(Matcher::any(0), false, {DerefTokenMatcher::string("focus-status")}),
|
||||
Matcher::op_with_rest(GenericOpMatcher::func(Matcher::constant_token("focus-status")), {})});
|
||||
auto logtest_focus_matcher_enum = Matcher::op(
|
||||
GenericOpMatcher::fixed(FixedOperatorKind::LOGTEST),
|
||||
{
|
||||
Matcher::op_with_rest(GenericOpMatcher::func(Matcher::constant_token("focus-status")),
|
||||
{}),
|
||||
Matcher::deref(Matcher::any(0), false, {DerefTokenMatcher::string("focus-status")}),
|
||||
});
|
||||
auto mr_logtest_pfoc = match(logtest_focus_matcher_pfoc, in);
|
||||
auto mr_logtest_enum = match(logtest_focus_matcher_enum, in);
|
||||
if (mr_logtest_pfoc.matched) {
|
||||
auto logtest_elt = dynamic_cast<GenericElement*>(in->at(0));
|
||||
if (logtest_elt != nullptr) {
|
||||
auto focus_form = logtest_elt->elts().at(1);
|
||||
std::vector<Form*> macro;
|
||||
macro.push_back(mr_logtest_pfoc.maps.forms.at(0));
|
||||
auto* focus = dynamic_cast<GenericElement*>(focus_form->at(0));
|
||||
if (focus) {
|
||||
macro.insert(macro.end(), focus->elts().begin(), focus->elts().end());
|
||||
}
|
||||
|
||||
return pool.alloc_element<GenericElement>(
|
||||
GenericOperator::make_fixed(FixedOperatorKind::FOCUS_TEST), macro);
|
||||
}
|
||||
}
|
||||
if (mr_logtest_enum.matched) {
|
||||
auto logtest_elt = dynamic_cast<GenericElement*>(in->at(0));
|
||||
if (logtest_elt != nullptr) {
|
||||
auto focus_form = logtest_elt->elts().at(0);
|
||||
std::vector<Form*> macro;
|
||||
macro.push_back(mr_logtest_enum.maps.forms.at(0));
|
||||
auto* focus = dynamic_cast<GenericElement*>(focus_form->at(0));
|
||||
if (focus) {
|
||||
macro.insert(macro.end(), focus->elts().begin(), focus->elts().end());
|
||||
}
|
||||
|
||||
return pool.alloc_element<GenericElement>(
|
||||
GenericOperator::make_fixed(FixedOperatorKind::FOCUS_TEST), macro);
|
||||
}
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
FormElement* try_make_logtest_cpad_macro(Form* in, FormPool& pool) {
|
||||
/*
|
||||
(defmacro cpad-pressed (pad-idx)
|
||||
@@ -4682,10 +4739,17 @@ FormElement* ConditionElement::make_zero_check_generic(const Env& env,
|
||||
auto as_cpad_macro = try_make_logtest_cpad_macro(logtest_form, pool);
|
||||
if (as_cpad_macro) {
|
||||
logtest_form = pool.alloc_single_form(nullptr, as_cpad_macro);
|
||||
return pool.alloc_element<GenericElement>(
|
||||
GenericOperator::make_compare(IR2_Condition::Kind::FALSE), logtest_form);
|
||||
}
|
||||
auto not_form = pool.alloc_element<GenericElement>(
|
||||
auto focus_test_macro = try_make_focus_test_macro(logtest_form, pool);
|
||||
if (focus_test_macro) {
|
||||
logtest_form = pool.alloc_single_form(nullptr, focus_test_macro);
|
||||
return pool.alloc_element<GenericElement>(
|
||||
GenericOperator::make_compare(IR2_Condition::Kind::FALSE), logtest_form);
|
||||
}
|
||||
return pool.alloc_element<GenericElement>(
|
||||
GenericOperator::make_compare(IR2_Condition::Kind::FALSE), logtest_form);
|
||||
return not_form;
|
||||
}
|
||||
|
||||
return pool.alloc_element<GenericElement>(GenericOperator::make_compare(m_kind), source_forms);
|
||||
@@ -4726,6 +4790,10 @@ FormElement* ConditionElement::make_nonzero_check_generic(const Env& env,
|
||||
if (as_cpad_macro) {
|
||||
return as_cpad_macro;
|
||||
}
|
||||
auto focus_test_macro = try_make_focus_test_macro(logtest_form, pool);
|
||||
if (focus_test_macro) {
|
||||
return focus_test_macro;
|
||||
}
|
||||
return as_logtest;
|
||||
}
|
||||
|
||||
@@ -5895,8 +5963,33 @@ void ConditionalMoveFalseElement::push_to_stack(const Env& env, FormPool& pool,
|
||||
auto as_cpad_macro = try_make_logtest_cpad_macro(logtest_form, pool);
|
||||
if (as_cpad_macro) {
|
||||
val = pool.alloc_single_form(nullptr, as_cpad_macro);
|
||||
} else {
|
||||
val = pool.alloc_single_form(nullptr, as_logtest);
|
||||
}
|
||||
if (!val) {
|
||||
auto focus_test_macro = try_make_focus_test_macro(logtest_form, pool);
|
||||
if (focus_test_macro) {
|
||||
val = pool.alloc_single_form(nullptr, focus_test_macro);
|
||||
} else {
|
||||
val = pool.alloc_single_form(nullptr, as_logtest);
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
auto as_logtest = try_make_nonzero_logtest(popped.at(1), pool);
|
||||
if (as_logtest) {
|
||||
auto logtest_form = pool.alloc_single_form(nullptr, as_logtest);
|
||||
auto not_form = pool.form<GenericElement>(
|
||||
GenericOperator::make_compare(IR2_Condition::Kind::FALSE), logtest_form);
|
||||
auto as_cpad_macro = try_make_logtest_cpad_macro(not_form, pool);
|
||||
if (as_cpad_macro) {
|
||||
val = pool.alloc_single_form(nullptr, as_cpad_macro);
|
||||
}
|
||||
if (!val) {
|
||||
auto focus_test_macro = try_make_focus_test_macro(not_form, pool);
|
||||
if (focus_test_macro) {
|
||||
val = pool.alloc_single_form(nullptr, focus_test_macro);
|
||||
} else {
|
||||
val = not_form;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -174,6 +174,7 @@ enum class FixedOperatorKind {
|
||||
SEND_EVENT,
|
||||
CPAD_PRESSED_P,
|
||||
CPAD_HOLD_P,
|
||||
FOCUS_TEST,
|
||||
INVALID
|
||||
};
|
||||
|
||||
|
||||
@@ -736,6 +736,7 @@ void SSA::make_vars(const Function& function, const DecompilerTypeSystem& dts) {
|
||||
event_handler_hack = function.guessed_name.is_event_handler() ||
|
||||
function.guessed_name.to_string() == "target-generic-event-handler" ||
|
||||
function.guessed_name.to_string() == "target-standard-event-handler" ||
|
||||
function.guessed_name.to_string() == "target-board-handler" ||
|
||||
function.guessed_name.to_string() == "(method 74 pegasus)" ||
|
||||
function.guessed_name.to_string() == "(method 74 crimson-guard-level)" ||
|
||||
function.guessed_name.to_string() == "widow-handler" ||
|
||||
|
||||
@@ -186,17 +186,6 @@
|
||||
)
|
||||
)
|
||||
|
||||
;; WARN: Stack slot offset 164 signed mismatch
|
||||
;; WARN: Stack slot offset 164 signed mismatch
|
||||
;; WARN: Stack slot offset 164 signed mismatch
|
||||
;; WARN: Stack slot offset 164 signed mismatch
|
||||
;; WARN: Stack slot offset 164 signed mismatch
|
||||
;; WARN: Stack slot offset 164 signed mismatch
|
||||
;; WARN: Stack slot offset 164 signed mismatch
|
||||
;; WARN: Stack slot offset 164 signed mismatch
|
||||
;; WARN: Stack slot offset 164 signed mismatch
|
||||
;; WARN: Stack slot offset 164 signed mismatch
|
||||
;; WARN: Stack slot offset 164 signed mismatch
|
||||
(defbehavior cam-layout-entity-volume-info-create cam-layout ((arg0 entity-camera) (arg1 symbol))
|
||||
(local-vars
|
||||
(sv-16 res-tag)
|
||||
@@ -354,10 +343,7 @@
|
||||
(set! (-> *volume-normal* data *volume-normal-current* quad) (-> s0-0 quad))
|
||||
(set! (-> *volume-normal* data (+ *volume-normal-current* 1) quad) (-> s3-0 s1-0 quad))
|
||||
(set! *volume-normal-current* (+ *volume-normal-current* 2))
|
||||
(let ((v1-132 (+ (-> s2-0 normal-count) 2)))
|
||||
(set! (-> s2-0 normal-count) v1-132)
|
||||
v1-132
|
||||
)
|
||||
(set! (-> s2-0 normal-count) (+ (-> s2-0 normal-count) 2))
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -381,7 +367,7 @@
|
||||
(cond
|
||||
((and (= gp-0 (-> self cur-volume))
|
||||
(= *camera-layout-blink* 'volume)
|
||||
(zero? (logand (-> *display* real-actual-frame-counter) 8))
|
||||
(not (logtest? (-> *display* real-actual-frame-counter) 8))
|
||||
)
|
||||
)
|
||||
(else
|
||||
@@ -480,13 +466,7 @@
|
||||
(format *stdcon* "~S ~f~%" (-> arg1 disp) (vector-length gp-0))
|
||||
(vector+! gp-0 gp-0 (-> arg1 origin))
|
||||
(camera-line (-> arg1 origin) gp-0 (-> arg1 color))
|
||||
(camera-cross
|
||||
(new 'static 'vector :y 1024.0)
|
||||
(new 'static 'vector :z 1024.0)
|
||||
gp-0
|
||||
(-> arg1 color)
|
||||
(meters 1.0)
|
||||
)
|
||||
(camera-cross (new 'static 'vector :y 1024.0) (new 'static 'vector :z 1024.0) gp-0 (-> arg1 color) (meters 1))
|
||||
)
|
||||
)
|
||||
|
||||
@@ -506,13 +486,7 @@
|
||||
(format *stdcon* "~S ~f~%" (-> arg1 disp) (vector-length gp-0))
|
||||
(vector+! gp-0 gp-0 (-> arg1 origin))
|
||||
(camera-line (-> arg1 origin) gp-0 (-> arg1 color))
|
||||
(camera-cross
|
||||
(new 'static 'vector :y 1024.0)
|
||||
(new 'static 'vector :z 1024.0)
|
||||
gp-0
|
||||
(-> arg1 color)
|
||||
(meters 1.0)
|
||||
)
|
||||
(camera-cross (new 'static 'vector :y 1024.0) (new 'static 'vector :z 1024.0) gp-0 (-> arg1 color) (meters 1))
|
||||
)
|
||||
)
|
||||
|
||||
@@ -546,7 +520,7 @@
|
||||
(new 'static 'vector :z 1024.0)
|
||||
s5-1
|
||||
(new 'static 'vector4w :x #x80 :w #x80)
|
||||
(meters 1.0)
|
||||
(meters 1)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -559,7 +533,7 @@
|
||||
(new 'static 'vector :z 1024.0)
|
||||
s5-2
|
||||
(new 'static 'vector4w :y #x80 :w #x80)
|
||||
(meters 1.0)
|
||||
(meters 1)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -572,7 +546,7 @@
|
||||
(new 'static 'vector :z 1024.0)
|
||||
s5-3
|
||||
(new 'static 'vector4w :x #x80 :z #x80 :w #x80)
|
||||
(meters 1.0)
|
||||
(meters 1)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -623,7 +597,7 @@
|
||||
(new 'static 'vector :z 1024.0)
|
||||
s5-4
|
||||
(new 'static 'vector4w :x #xff :y #xff :w #x80)
|
||||
(meters 1.0)
|
||||
(meters 1)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -666,7 +640,7 @@
|
||||
(new 'static 'vector :z 1024.0)
|
||||
s5-5
|
||||
(new 'static 'vector4w :z #xff :w #x80)
|
||||
(meters 1.0)
|
||||
(meters 1)
|
||||
)
|
||||
(curve-get-pos! s5-5 (cam-slave-get-float arg0 'intro-exitValue (the-as float 0.0)) s3-2)
|
||||
(vector+! s5-5 s5-5 s4-2)
|
||||
@@ -675,7 +649,7 @@
|
||||
(new 'static 'vector :z 1024.0)
|
||||
s5-5
|
||||
(new 'static 'vector4w :z #xff :w #x80)
|
||||
(meters 1.0)
|
||||
(meters 1)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -703,7 +677,7 @@
|
||||
(new 'static 'vector :z 1024.0)
|
||||
s5-6
|
||||
(new 'static 'vector4w :x #xff :y #xff :w #x80)
|
||||
(meters 1.0)
|
||||
(meters 1)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -727,7 +701,7 @@
|
||||
(new 'static 'vector :z 1024.0)
|
||||
s5-7
|
||||
(new 'static 'vector4w :y #xff :z #xff :w #x80)
|
||||
(meters 1.0)
|
||||
(meters 1)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -2415,7 +2389,7 @@
|
||||
)
|
||||
(format arg0 ": on")
|
||||
)
|
||||
((zero? (logand ((method-of-type res-lump get-property-value)
|
||||
((not (logtest? ((method-of-type res-lump get-property-value)
|
||||
(-> self cam-entity)
|
||||
(the-as symbol arg2)
|
||||
'exact
|
||||
@@ -2426,7 +2400,7 @@
|
||||
)
|
||||
s5-0
|
||||
)
|
||||
)
|
||||
)
|
||||
(format arg0 ": off(maya)")
|
||||
)
|
||||
(else
|
||||
@@ -3342,14 +3316,14 @@
|
||||
((and (logtest? (-> arg0 options) 8) (logtest? (-> *cpad-list* cpads 0 button0-abs 0) (-> arg0 button)))
|
||||
#f
|
||||
)
|
||||
((and (zero? (logand (-> arg0 options) 12))
|
||||
((and (not (logtest? (-> arg0 options) 12))
|
||||
(logtest? (-> arg0 options) 1)
|
||||
(zero? (logand (-> *cpad-list* cpads 0 button0-rel 0) (-> arg0 button)))
|
||||
(not (logtest? (-> *cpad-list* cpads 0 button0-rel 0) (-> arg0 button)))
|
||||
)
|
||||
#f
|
||||
)
|
||||
((and (zero? (logand (-> arg0 options) 13))
|
||||
(zero? (logand (-> *cpad-list* cpads 0 button0-abs 0) (-> arg0 button)))
|
||||
((and (not (logtest? (-> arg0 options) 13))
|
||||
(not (logtest? (-> *cpad-list* cpads 0 button0-abs 0) (-> arg0 button)))
|
||||
)
|
||||
#f
|
||||
)
|
||||
@@ -3595,6 +3569,3 @@
|
||||
(cam-layout-start)
|
||||
(none)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -46,10 +46,7 @@
|
||||
(set! (-> self tpos-old-adj quad) (-> self tpos-old quad))
|
||||
(set! (-> self tpos-curr-adj quad) (-> self tpos-old quad))
|
||||
(set! (-> self tpos-tgt quad) (-> self tpos-old quad))
|
||||
(let ((f0-0 0.0))
|
||||
(set! (-> self upspeed) f0-0)
|
||||
f0-0
|
||||
)
|
||||
(set! (-> self upspeed) 0.0)
|
||||
)
|
||||
|
||||
(defbehavior reset-target-tracking camera-master ()
|
||||
@@ -67,7 +64,7 @@
|
||||
(set! (-> self target-height) (-> *CAMERA_MASTER-bank* target-height))
|
||||
(set! (-> self on-ground)
|
||||
(not (and (logtest? (-> *target* control unknown-surface00 flags) (surface-flags jump))
|
||||
(zero? (logand (-> *target* control status) (cshape-moving-flags onsurf)))
|
||||
(not (logtest? (-> *target* control status) (cshape-moving-flags onsurf)))
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -90,7 +87,7 @@
|
||||
(else
|
||||
(set! (-> self attack-start) (-> *display* base-frame-counter))
|
||||
(set! (-> self being-attacked) #t)
|
||||
(when (and (zero? (logand (-> self master-options) 64))
|
||||
(when (and (not (logtest? (-> self master-options) 64))
|
||||
(or (!= (-> last-try-to-look-at-data horz) 0.0) (!= (-> last-try-to-look-at-data vert) 0.0))
|
||||
)
|
||||
(set! (-> self string-max target y) (fmax (-> self string-max target y) (-> last-try-to-look-at-data vert)))
|
||||
@@ -101,7 +98,7 @@
|
||||
)
|
||||
(cond
|
||||
((and (logtest? (-> *target* water flags) (water-flags wt12))
|
||||
(zero? (logand (-> *target* water flags) (water-flags wt04)))
|
||||
(not (logtest? (-> *target* water flags) (water-flags wt04)))
|
||||
)
|
||||
(set! (-> self under-water) 2)
|
||||
)
|
||||
@@ -126,10 +123,7 @@
|
||||
(set! (-> self tpos-curr quad) (-> self tpos-old quad))
|
||||
(set! (-> self tpos-old-adj quad) (-> self tpos-old quad))
|
||||
(set! (-> self tpos-curr-adj quad) (-> self tpos-old quad))
|
||||
(let ((f0-0 0.0))
|
||||
(set! (-> self upspeed) f0-0)
|
||||
f0-0
|
||||
)
|
||||
(set! (-> self upspeed) 0.0)
|
||||
)
|
||||
|
||||
(defbehavior reset-drawable-tracking camera-master ()
|
||||
@@ -315,7 +309,7 @@
|
||||
(set! (-> self attack-start) (-> *display* base-frame-counter))
|
||||
)
|
||||
(set! (-> self being-attacked) #t)
|
||||
(when (and (zero? (logand (-> self master-options) 64))
|
||||
(when (and (not (logtest? (-> self master-options) 64))
|
||||
(or (!= (-> last-try-to-look-at-data horz) 0.0) (!= (-> last-try-to-look-at-data vert) 0.0))
|
||||
)
|
||||
(set! (-> self string-max target y) (fmax (-> self string-max target y) (-> last-try-to-look-at-data vert)))
|
||||
@@ -326,7 +320,7 @@
|
||||
)
|
||||
(cond
|
||||
((and (logtest? (-> *target* water flags) (water-flags wt12))
|
||||
(zero? (logand (-> *target* water flags) (water-flags wt04)))
|
||||
(not (logtest? (-> *target* water flags) (water-flags wt04)))
|
||||
)
|
||||
(set! (-> self under-water) 2)
|
||||
)
|
||||
@@ -398,7 +392,7 @@
|
||||
)
|
||||
(set! (-> self on-ground)
|
||||
(not (and (logtest? (-> *target* control unknown-surface00 flags) (surface-flags jump))
|
||||
(zero? (logand (-> *target* control status) (cshape-moving-flags onsurf)))
|
||||
(not (logtest? (-> *target* control status) (cshape-moving-flags onsurf)))
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -406,7 +400,7 @@
|
||||
0.0
|
||||
(cond
|
||||
((and (and (logtest? (-> *target* control unknown-surface00 flags) (surface-flags jump))
|
||||
(zero? (logand (-> *target* control status) (cshape-moving-flags onsurf)))
|
||||
(not (logtest? (-> *target* control status) (cshape-moving-flags onsurf)))
|
||||
)
|
||||
(!= (-> *target* control unknown-surface00 name) 'launch-jump)
|
||||
)
|
||||
@@ -477,7 +471,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(if (zero? (logand (-> self slave-options) 16))
|
||||
(if (not (logtest? (-> self slave-options) 16))
|
||||
(reset-follow)
|
||||
)
|
||||
(let ((v1-196 (-> *target* water flags)))
|
||||
@@ -612,10 +606,9 @@
|
||||
(if (logtest? #x10000 (cam-slave-get-flags (-> self cam-entity) 'flags))
|
||||
(send-event *camera* 'set-slave-option #x10000)
|
||||
)
|
||||
(let ((f0-12 (cam-slave-get-float arg0 'tiltAdjust (-> *CAMERA-bank* default-tilt-adjust))))
|
||||
(set! (-> *camera-combiner* tracking tilt-adjust target) f0-12)
|
||||
f0-12
|
||||
)
|
||||
(set! (-> *camera-combiner* tracking tilt-adjust target)
|
||||
(cam-slave-get-float arg0 'tiltAdjust (-> *CAMERA-bank* default-tilt-adjust))
|
||||
)
|
||||
)
|
||||
|
||||
(defun setup-slave-for-hopefull ((arg0 camera-slave))
|
||||
@@ -778,7 +771,7 @@
|
||||
)
|
||||
((and (logtest? (-> self master-options) 4)
|
||||
(not (-> self on-ground))
|
||||
(or (not (-> self cam-entity)) (zero? (logand #x20000 (cam-slave-get-flags (-> self cam-entity) 'flags))))
|
||||
(or (not (-> self cam-entity)) (not (logtest? #x20000 (cam-slave-get-flags (-> self cam-entity) 'flags))))
|
||||
)
|
||||
#f
|
||||
)
|
||||
@@ -1728,7 +1721,3 @@
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -20,13 +20,13 @@
|
||||
(define *CAM_POINT_WATCH-bank* (new 'static 'cam-point-watch-bank :speed 1600.0 :rot-speed (degrees 0.6)))
|
||||
|
||||
(defstate cam-point-watch (camera-slave)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('teleport)
|
||||
#f
|
||||
)
|
||||
(else
|
||||
(cam-standard-event-handler arg0 arg1 arg2 arg3)
|
||||
(cam-standard-event-handler proc arg1 event-type event)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -297,9 +297,9 @@
|
||||
)
|
||||
(when *display-load-boundaries*
|
||||
(when (and (!= arg3 1)
|
||||
(zero? (logand (-> *cpad-list* cpads 1 button0-abs 0) (pad-buttons x)))
|
||||
(zero? (logand (-> *cpad-list* cpads 1 button0-abs 0) (pad-buttons r1)))
|
||||
(zero? (logand (-> *cpad-list* cpads 1 button0-abs 0) (pad-buttons r2)))
|
||||
(not (cpad-hold? 1 x))
|
||||
(not (cpad-hold? 1 r1))
|
||||
(not (logtest? (-> *cpad-list* cpads 1 button0-abs 0) (pad-buttons r2)))
|
||||
)
|
||||
(+! f28-14 (analog-input (the-as int (-> *cpad-list* cpads 1 leftx)) 128.0 48.0 110.0 -1.0))
|
||||
(+! f30-14 (analog-input (the-as int (-> *cpad-list* cpads 1 lefty)) 128.0 48.0 110.0 -1.0))
|
||||
@@ -390,13 +390,13 @@
|
||||
)
|
||||
|
||||
(defstate cam-free-floating (camera-slave)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('teleport)
|
||||
#f
|
||||
)
|
||||
(else
|
||||
(cam-standard-event-handler arg0 arg1 arg2 arg3)
|
||||
(cam-standard-event-handler proc arg1 event-type event)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -469,13 +469,13 @@
|
||||
(set! (-> *camera-orbit-info* orbit-off y) 4096.0)
|
||||
|
||||
(defstate cam-orbit (camera-slave)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('teleport)
|
||||
#f
|
||||
)
|
||||
(else
|
||||
(cam-standard-event-handler arg0 arg1 arg2 arg3)
|
||||
(cam-standard-event-handler proc arg1 event-type event)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -589,7 +589,3 @@
|
||||
(none)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -10,13 +10,13 @@
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(defstate cam-fixed (camera-slave)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('teleport)
|
||||
#f
|
||||
)
|
||||
(else
|
||||
(cam-standard-event-handler arg0 arg1 arg2 arg3)
|
||||
(cam-standard-event-handler proc arg1 event-type event)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -48,13 +48,13 @@
|
||||
)
|
||||
|
||||
(defstate cam-fixed-read-entity (camera-slave)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('teleport)
|
||||
#f
|
||||
)
|
||||
(else
|
||||
(cam-standard-event-handler arg0 arg1 arg2 arg3)
|
||||
(cam-standard-event-handler proc arg1 event-type event)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -91,13 +91,13 @@
|
||||
)
|
||||
|
||||
(defstate cam-pov (camera-slave)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('teleport)
|
||||
#f
|
||||
)
|
||||
(else
|
||||
(cam-standard-event-handler arg0 arg1 arg2 arg3)
|
||||
(cam-standard-event-handler proc arg1 event-type event)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -150,13 +150,13 @@
|
||||
)
|
||||
|
||||
(defstate cam-pov180 (camera-slave)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('teleport)
|
||||
#f
|
||||
)
|
||||
(else
|
||||
(cam-standard-event-handler arg0 arg1 arg2 arg3)
|
||||
(cam-standard-event-handler proc arg1 event-type event)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -263,7 +263,7 @@
|
||||
(none)
|
||||
)
|
||||
:trans (behavior ()
|
||||
(if (or (not (handle->process (-> *camera* pov-handle))) (zero? (logand (-> *camera* master-options) 2)))
|
||||
(if (or (not (handle->process (-> *camera* pov-handle))) (not (logtest? (-> *camera* master-options) 2)))
|
||||
(cam-slave-go cam-free-floating)
|
||||
)
|
||||
(none)
|
||||
@@ -290,10 +290,10 @@
|
||||
)
|
||||
|
||||
(defstate cam-standoff (camera-slave)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('set-standoff-dist)
|
||||
(vector-normalize! (-> self pivot-pt) (the-as float (-> arg3 param 0)))
|
||||
(vector-normalize! (-> self pivot-pt) (the-as float (-> event param 0)))
|
||||
(cam-standoff-calc-trans)
|
||||
)
|
||||
(('set-standoff-height)
|
||||
@@ -302,12 +302,12 @@
|
||||
(-> self pivot-pt)
|
||||
(-> self pivot-pt)
|
||||
(-> *camera* local-down)
|
||||
(the-as float (-> arg3 param 0))
|
||||
(the-as float (-> event param 0))
|
||||
)
|
||||
(cam-standoff-calc-trans)
|
||||
)
|
||||
(else
|
||||
(cam-standard-event-handler arg0 arg1 arg2 arg3)
|
||||
(cam-standard-event-handler proc arg1 event-type event)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -330,7 +330,7 @@
|
||||
(none)
|
||||
)
|
||||
:trans (behavior ()
|
||||
(if (zero? (logand (-> *camera* master-options) 2))
|
||||
(if (not (logtest? (-> *camera* master-options) 2))
|
||||
(cam-slave-go cam-free-floating)
|
||||
)
|
||||
(none)
|
||||
@@ -412,13 +412,13 @@
|
||||
;; main first-person camera
|
||||
;; note: modified for high fps
|
||||
(defstate cam-eye (camera-slave)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('teleport)
|
||||
#f
|
||||
)
|
||||
(else
|
||||
(cam-standard-event-handler arg0 arg1 arg2 arg3)
|
||||
(cam-standard-event-handler proc arg1 event-type event)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -444,7 +444,7 @@
|
||||
(none)
|
||||
)
|
||||
:trans (behavior ()
|
||||
(if (zero? (logand (-> *camera* master-options) 2))
|
||||
(if (not (logtest? (-> *camera* master-options) 2))
|
||||
(go cam-free-floating)
|
||||
)
|
||||
(none)
|
||||
@@ -506,7 +506,7 @@
|
||||
)
|
||||
(matrix-axis-angle! s5-0 (-> *camera* local-down) (-> s4-0 y))
|
||||
(matrix*! (the-as matrix (-> self tracking)) (the-as matrix (-> self tracking)) s5-0)
|
||||
(when (zero? (logand (-> self options) 8))
|
||||
(when (not (logtest? (-> self options) 8))
|
||||
(if (< (vector-dot (-> self tracking inv-mat vector 1) (-> *camera* local-down)) 0.0)
|
||||
(forward-down->inv-matrix
|
||||
(the-as matrix (-> self tracking))
|
||||
@@ -523,7 +523,7 @@
|
||||
(matrix-axis-angle! s5-0 (the-as vector (-> self tracking)) (- (-> s4-0 x)))
|
||||
(matrix*! (the-as matrix (-> self tracking)) (the-as matrix (-> self tracking)) s5-0)
|
||||
)
|
||||
(when (zero? (logand (-> self options) 8))
|
||||
(when (not (logtest? (-> self options) 8))
|
||||
(let ((f30-1 (vector-dot (-> *camera* local-down) (-> self tracking inv-mat vector 2))))
|
||||
(set! (-> (new 'stack-no-clear 'vector) quad) (the-as uint128 0))
|
||||
(when (< (sin (-> *CAM_EYE-bank* max-degrees)) (fabs f30-1))
|
||||
@@ -582,13 +582,13 @@
|
||||
|
||||
;; first person camera for rat game
|
||||
(defstate cam-billy (camera-slave)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('teleport)
|
||||
#f
|
||||
)
|
||||
(else
|
||||
(cam-standard-event-handler arg0 arg1 arg2 arg3)
|
||||
(cam-standard-event-handler proc arg1 event-type event)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -610,7 +610,7 @@
|
||||
(none)
|
||||
)
|
||||
:trans (behavior ()
|
||||
(if (zero? (logand (-> *camera* master-options) 2))
|
||||
(if (not (logtest? (-> *camera* master-options) 2))
|
||||
(go cam-free-floating)
|
||||
)
|
||||
(none)
|
||||
@@ -779,7 +779,7 @@
|
||||
(none)
|
||||
)
|
||||
:trans (behavior ()
|
||||
(if (zero? (logand (-> *camera* master-options) 2))
|
||||
(if (not (logtest? (-> *camera* master-options) 2))
|
||||
(cam-slave-go cam-free-floating)
|
||||
)
|
||||
(none)
|
||||
@@ -799,13 +799,13 @@
|
||||
)
|
||||
|
||||
(defstate cam-decel (camera-slave)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('teleport)
|
||||
#f
|
||||
)
|
||||
(else
|
||||
(cam-standard-event-handler arg0 arg1 arg2 arg3)
|
||||
(cam-standard-event-handler proc arg1 event-type event)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -851,13 +851,13 @@
|
||||
)
|
||||
|
||||
(defstate cam-endlessfall (camera-slave)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('teleport)
|
||||
#f
|
||||
)
|
||||
(else
|
||||
(cam-standard-event-handler arg0 arg1 arg2 arg3)
|
||||
(cam-standard-event-handler proc arg1 event-type event)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -1019,7 +1019,7 @@
|
||||
(vector-! gp-0 (-> self pivot-pt) (-> self circular-follow))
|
||||
)
|
||||
(vector-! s5-0 (-> self trans) (-> self pivot-pt))
|
||||
(when (zero? (logand (-> self options) 4))
|
||||
(when (not (logtest? (-> self options) 4))
|
||||
(vector-flatten! gp-0 gp-0 (-> *camera* local-down))
|
||||
(vector-flatten! s5-0 s5-0 (-> *camera* local-down))
|
||||
)
|
||||
@@ -1085,8 +1085,8 @@
|
||||
)
|
||||
|
||||
(defstate cam-circular (camera-slave)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('teleport)
|
||||
#f
|
||||
)
|
||||
@@ -1095,7 +1095,7 @@
|
||||
(cam-circular-position #f)
|
||||
)
|
||||
(else
|
||||
(cam-standard-event-handler arg0 arg1 arg2 arg3)
|
||||
(cam-standard-event-handler proc arg1 event-type event)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -1171,7 +1171,7 @@
|
||||
(none)
|
||||
)
|
||||
:trans (behavior ()
|
||||
(if (zero? (logand (-> *camera* master-options) 2))
|
||||
(if (not (logtest? (-> *camera* master-options) 2))
|
||||
(cam-slave-go cam-free-floating)
|
||||
)
|
||||
(none)
|
||||
@@ -1197,7 +1197,7 @@
|
||||
(none)
|
||||
)
|
||||
:trans (behavior ()
|
||||
(if (zero? (logand (-> *camera* master-options) 2))
|
||||
(if (not (logtest? (-> *camera* master-options) 2))
|
||||
(cam-slave-go cam-free-floating)
|
||||
)
|
||||
(none)
|
||||
@@ -1450,8 +1450,6 @@
|
||||
)
|
||||
|
||||
|
||||
;; WARN: Stack slot offset 128 signed mismatch
|
||||
;; WARN: Stack slot offset 128 signed mismatch
|
||||
(defun los-cw-ccw ((arg0 (inline-array collide-cache-tri))
|
||||
(arg1 vector)
|
||||
(arg2 vector)
|
||||
@@ -1769,9 +1767,9 @@
|
||||
)
|
||||
)
|
||||
|
||||
;; WARN: Unsupported inline assembly instruction kind - [mula.s f2, f5]
|
||||
;; WARN: Unsupported inline assembly instruction kind - [madda.s f3, f6]
|
||||
;; WARN: Unsupported inline assembly instruction kind - [madd.s f2, f4, f7]
|
||||
;; ERROR: Unsupported inline assembly instruction kind - [mula.s f2, f5]
|
||||
;; ERROR: Unsupported inline assembly instruction kind - [madda.s f3, f6]
|
||||
;; ERROR: Unsupported inline assembly instruction kind - [madd.s f2, f4, f7]
|
||||
(defbehavior cam-los-collide camera-slave ((arg0 vector) (arg1 vector) (arg2 clip-travel-vector-to-mesh-return-info) (arg3 pat-surface))
|
||||
(local-vars (s1-3 int) (s2-2 int) (f2-1 float) (sv-224 vector) (sv-240 vector))
|
||||
(dist-info-init (the-as collide-los-dist-info (-> arg2 intersection)))
|
||||
@@ -2101,7 +2099,7 @@
|
||||
(cam-los-setup-lateral arg2 s4-1 arg1)
|
||||
)
|
||||
(cond
|
||||
((zero? (logand (-> self options) 1024))
|
||||
((not (logtest? (-> self options) 1024))
|
||||
)
|
||||
((= (-> self string-vel-dir) 5)
|
||||
)
|
||||
@@ -2725,8 +2723,8 @@
|
||||
)
|
||||
|
||||
(defstate cam-string (camera-slave)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('teleport)
|
||||
(let ((gp-0 (new-stack-vector0)))
|
||||
(cam-string-find-position-rel! gp-0)
|
||||
@@ -2734,8 +2732,8 @@
|
||||
)
|
||||
)
|
||||
(('joystick)
|
||||
(set! (-> self phony-joystick-x) (the-as float (-> arg3 param 0)))
|
||||
(set! (-> self phony-joystick-y) (the-as float (-> arg3 param 1)))
|
||||
(set! (-> self phony-joystick-x) (the-as float (-> event param 0)))
|
||||
(set! (-> self phony-joystick-y) (the-as float (-> event param 1)))
|
||||
(let ((v0-1 (the-as object #t)))
|
||||
(set! (-> self have-phony-joystick) (the-as symbol v0-1))
|
||||
v0-1
|
||||
@@ -2743,16 +2741,13 @@
|
||||
)
|
||||
(('set-dist)
|
||||
(cond
|
||||
((-> arg3 param 0)
|
||||
((-> event param 0)
|
||||
(set! (-> self string-val-locked) #t)
|
||||
(set! (-> self string-min-val quad) (-> (the-as vector (-> arg3 param 0)) quad))
|
||||
(set! (-> self string-max-val quad) (-> (the-as vector (-> arg3 param 1)) quad))
|
||||
(set! (-> self string-min-val quad) (-> (the-as vector (-> event param 0)) quad))
|
||||
(set! (-> self string-max-val quad) (-> (the-as vector (-> event param 1)) quad))
|
||||
(set! (-> self string-max-val x) (fmax (-> self string-max-val x) (-> self string-min-val x)))
|
||||
(set! (-> self string-max-val y) (fmax (-> self string-max-val y) (-> self string-min-val y)))
|
||||
(let ((f0-7 (fmax (-> self string-max-val z) (-> self string-min-val z))))
|
||||
(set! (-> self string-max-val z) f0-7)
|
||||
f0-7
|
||||
)
|
||||
(set! (-> self string-max-val z) (fmax (-> self string-max-val z) (-> self string-min-val z)))
|
||||
)
|
||||
(else
|
||||
(set! (-> self string-val-locked) #f)
|
||||
@@ -2764,7 +2759,7 @@
|
||||
(-> self los-state)
|
||||
)
|
||||
(else
|
||||
(cam-standard-event-handler arg0 arg1 arg2 arg3)
|
||||
(cam-standard-event-handler proc arg1 event-type event)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -2918,7 +2913,7 @@
|
||||
(none)
|
||||
)
|
||||
:trans (behavior ()
|
||||
(if (zero? (logand (-> *camera* master-options) 2))
|
||||
(if (not (logtest? (-> *camera* master-options) 2))
|
||||
(cam-slave-go cam-free-floating)
|
||||
)
|
||||
(none)
|
||||
@@ -3079,7 +3074,7 @@
|
||||
(none)
|
||||
)
|
||||
:trans (behavior ()
|
||||
(if (zero? (logand (-> *camera* master-options) 2))
|
||||
(if (not (logtest? (-> *camera* master-options) 2))
|
||||
(cam-slave-go cam-free-floating)
|
||||
)
|
||||
(when (not (paused?))
|
||||
@@ -3313,7 +3308,7 @@
|
||||
(none)
|
||||
)
|
||||
:trans (behavior ()
|
||||
(if (zero? (logand (-> *camera* master-options) 2))
|
||||
(if (not (logtest? (-> *camera* master-options) 2))
|
||||
(cam-slave-go cam-free-floating)
|
||||
)
|
||||
(none)
|
||||
@@ -3330,7 +3325,3 @@
|
||||
)
|
||||
|
||||
(define *camera-base-mode* cam-string)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -548,7 +548,7 @@
|
||||
(let ((v1-1 (-> obj head)))
|
||||
(while v1-1
|
||||
(let ((a0-1 (-> v1-1 prim1 cprim)))
|
||||
(if (and (logtest? arg1 (-> a0-1 prim-core action)) (zero? (logand arg2 (-> a0-1 prim-core action))))
|
||||
(if (and (logtest? arg1 (-> a0-1 prim-core action)) (not (logtest? arg2 (-> a0-1 prim-core action))))
|
||||
(return v1-1)
|
||||
)
|
||||
)
|
||||
@@ -560,7 +560,7 @@
|
||||
(let ((v1-4 (-> obj head)))
|
||||
(while v1-4
|
||||
(let ((a0-5 (-> v1-4 prim2 cprim)))
|
||||
(if (and (logtest? arg1 (-> a0-5 prim-core action)) (zero? (logand arg2 (-> a0-5 prim-core action))))
|
||||
(if (and (logtest? arg1 (-> a0-5 prim-core action)) (not (logtest? arg2 (-> a0-5 prim-core action))))
|
||||
(return v1-4)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -633,7 +633,7 @@
|
||||
(let ((v1-1 (the-as anim-test-sequence s5-0)))
|
||||
"return the next node in the list"
|
||||
(let ((s4-0 (-> v1-1 next)))
|
||||
(when (zero? (logand (-> (the-as anim-test-sequence s5-0) flags) 2))
|
||||
(when (not (logtest? (-> (the-as anim-test-sequence s5-0) flags) 2))
|
||||
(let ((v1-5 (-> (the-as anim-test-sequence s5-0) item-list)))
|
||||
"return the start of the list"
|
||||
(let ((s3-0 (the-as anim-test-seq-item (-> v1-5 head))))
|
||||
@@ -644,7 +644,7 @@
|
||||
(let ((v1-6 s3-0))
|
||||
"return the next node in the list"
|
||||
(let ((s2-0 (the-as anim-test-seq-item (-> v1-6 next))))
|
||||
(if (and (zero? (logand (-> s3-0 flags) 1)) (not (anim-test-obj-item-valid? arg0 s3-0)))
|
||||
(if (and (not (logtest? (-> s3-0 flags) 1)) (not (anim-test-obj-item-valid? arg0 s3-0)))
|
||||
(glst-remove (-> (the-as anim-test-sequence s5-0) item-list) s3-0)
|
||||
)
|
||||
(set! s3-0 s2-0)
|
||||
@@ -729,10 +729,7 @@
|
||||
(set! (-> self anim-last) (-> arg0 first-frame))
|
||||
)
|
||||
(set! (-> self anim-gspeed) (fabs (-> self anim-gspeed)))
|
||||
(let ((f0-13 (fabs (-> self anim-speed))))
|
||||
(set! (-> self anim-speed) f0-13)
|
||||
f0-13
|
||||
)
|
||||
(set! (-> self anim-speed) (fabs (-> self anim-speed)))
|
||||
)
|
||||
|
||||
(defbehavior anim-tester-reset anim-tester ()
|
||||
@@ -923,11 +920,10 @@
|
||||
s3-0
|
||||
(-> arg1 xpos)
|
||||
(-> arg1 ypos)
|
||||
(the-as font-color (if (= (-> arg1 the-index) (-> arg1 current-index))
|
||||
15
|
||||
12
|
||||
)
|
||||
)
|
||||
(if (= (-> arg1 the-index) (-> arg1 current-index))
|
||||
(font-color yellow-green)
|
||||
(font-color dim-white)
|
||||
)
|
||||
(font-flags shadow kerning)
|
||||
)
|
||||
)
|
||||
@@ -1051,11 +1047,10 @@
|
||||
s3-0
|
||||
(-> arg1 xpos)
|
||||
(-> arg1 ypos)
|
||||
(the-as font-color (if (= (-> arg1 the-index) (-> arg1 current-index))
|
||||
15
|
||||
12
|
||||
)
|
||||
)
|
||||
(if (= (-> arg1 the-index) (-> arg1 current-index))
|
||||
(font-color yellow-green)
|
||||
(font-color dim-white)
|
||||
)
|
||||
(font-flags shadow kerning)
|
||||
)
|
||||
)
|
||||
@@ -1076,7 +1071,7 @@
|
||||
)
|
||||
)
|
||||
((= arg0 1)
|
||||
(return (zero? (logand (-> s5-0 flags) 1)))
|
||||
(return (not (logtest? (-> s5-0 flags) 1)))
|
||||
)
|
||||
((= arg0 4)
|
||||
(cond
|
||||
@@ -1094,7 +1089,7 @@
|
||||
(goto cfg-25)
|
||||
)
|
||||
)
|
||||
(when (zero? (logand (-> (the-as anim-test-obj v1-17) flags) 1))
|
||||
(when (not (logtest? (-> (the-as anim-test-obj v1-17) flags) 1))
|
||||
(set! (-> arg1 highlight-index) (glst-get-node-index (-> arg1 list) (the-as anim-test-obj v1-17)))
|
||||
(goto cfg-25)
|
||||
)
|
||||
@@ -1118,7 +1113,7 @@
|
||||
(goto cfg-39)
|
||||
)
|
||||
)
|
||||
(when (zero? (logand (-> (the-as anim-test-obj v1-23) flags) 1))
|
||||
(when (not (logtest? (-> (the-as anim-test-obj v1-23) flags) 1))
|
||||
(set! (-> arg1 highlight-index) (glst-get-node-index (-> arg1 list) (the-as anim-test-obj v1-23)))
|
||||
(goto cfg-39)
|
||||
)
|
||||
@@ -1227,11 +1222,10 @@
|
||||
s3-0
|
||||
(-> arg1 xpos)
|
||||
(-> arg1 ypos)
|
||||
(the-as font-color (if (= (-> arg1 the-index) (-> arg1 current-index))
|
||||
15
|
||||
12
|
||||
)
|
||||
)
|
||||
(if (= (-> arg1 the-index) (-> arg1 current-index))
|
||||
(font-color yellow-green)
|
||||
(font-color dim-white)
|
||||
)
|
||||
(font-flags shadow kerning)
|
||||
)
|
||||
)
|
||||
@@ -1500,11 +1494,10 @@
|
||||
(-> arg1 xpos)
|
||||
(-> arg1 ypos)
|
||||
(the-as float 0.0)
|
||||
(the-as font-color (if (= (-> arg1 the-index) (-> arg1 current-index))
|
||||
15
|
||||
12
|
||||
)
|
||||
)
|
||||
(if (= (-> arg1 the-index) (-> arg1 current-index))
|
||||
(font-color yellow-green)
|
||||
(font-color dim-white)
|
||||
)
|
||||
(font-flags shadow kerning)
|
||||
)
|
||||
)
|
||||
@@ -1594,7 +1587,7 @@
|
||||
(let* ((s2-2 (-> *display* frames (-> *display* on-screen) frame debug-buf))
|
||||
(s4-1 (the-as anim-test-sequence (-> s2-2 base)))
|
||||
)
|
||||
(when (zero? (logand (-> (the-as anim-test-seq-item gp-0) flags) 1))
|
||||
(when (not (logtest? (-> (the-as anim-test-seq-item gp-0) flags) 1))
|
||||
(let ((v1-57 s3-0)
|
||||
(a1-13 (+ (-> arg1 xpos) (* (-> *ANIM_TESTER-bank* EDIT_STATS_X) (-> *DISP_LIST-bank* CHAR_WIDTH))))
|
||||
(a0-29 (-> arg1 ypos))
|
||||
@@ -1728,7 +1721,7 @@
|
||||
)
|
||||
((= v1-88 9)
|
||||
(cond
|
||||
((zero? (logand (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons x)))
|
||||
((not (cpad-hold? 0 x))
|
||||
(logclear! (-> *anim-tester* 0 flags) (anim-tester-flags fanimt3))
|
||||
)
|
||||
((cpad-pressed? 0 up)
|
||||
@@ -1756,7 +1749,7 @@
|
||||
(v1-143 s3-2)
|
||||
)
|
||||
"is this node the end of the list. #t = end"
|
||||
(when (and (not (not (-> v1-143 next))) (zero? (logand (-> s3-2 flags) 1)))
|
||||
(when (and (not (not (-> v1-143 next))) (not (logtest? (-> s3-2 flags) 1)))
|
||||
(glst-remove (-> (the-as anim-test-sequence s4-0) item-list) (the-as anim-test-seq-item gp-0))
|
||||
(glst-insert-after (-> (the-as anim-test-sequence s4-0) item-list) s3-2 (the-as anim-test-seq-item gp-0))
|
||||
(+! (-> arg1 current-index) 1)
|
||||
@@ -1771,7 +1764,7 @@
|
||||
)
|
||||
((or (= v1-88 1) (= v1-88 2) (= v1-88 3) (= v1-88 4))
|
||||
(cond
|
||||
((zero? (logand (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons x)))
|
||||
((not (cpad-hold? 0 x))
|
||||
(logclear! (-> *anim-tester* 0 flags) (anim-tester-flags fanimt3))
|
||||
)
|
||||
((begin (set! (-> arg1 current-index) (-> arg1 the-index)) (<= (-> *anim-tester* 0 inc-timer) 0))
|
||||
@@ -1912,14 +1905,14 @@
|
||||
(anim-test-edit-seq-insert-item (the-as anim-test-seq-item gp-0) (the-as anim-test-sequence s4-0))
|
||||
)
|
||||
((= v1-322 11)
|
||||
(when (zero? (logand (-> (the-as anim-test-seq-item gp-0) flags) 1))
|
||||
(when (not (logtest? (-> (the-as anim-test-seq-item gp-0) flags) 1))
|
||||
(anim-test-seq-mark-as-edited (the-as anim-test-sequence s4-0))
|
||||
(glst-remove (-> (the-as anim-test-sequence s4-0) item-list) (the-as anim-test-seq-item gp-0))
|
||||
)
|
||||
(send-event (ppointer->process *anim-tester*) 'change-anim)
|
||||
)
|
||||
(else
|
||||
(when (zero? (logand (-> (the-as anim-test-seq-item gp-0) flags) 4))
|
||||
(when (not (logtest? (-> (the-as anim-test-seq-item gp-0) flags) 4))
|
||||
(case (-> *anim-tester* 0 item-field)
|
||||
((5)
|
||||
(anim-test-seq-mark-as-edited (the-as anim-test-sequence s4-0))
|
||||
@@ -2215,7 +2208,7 @@
|
||||
(set! v0-0
|
||||
((the-as (function glst-list int anim-test-seq-item) glst-get-node-by-index) (-> arg0 item-list) s4-0)
|
||||
)
|
||||
(when (or (= v0-0 s5-0) (zero? (logand (-> v0-0 flags) 5)))
|
||||
(when (or (= v0-0 s5-0) (not (logtest? (-> v0-0 flags) 5)))
|
||||
(set! (-> arg0 playing-item) s4-0)
|
||||
(return v0-0)
|
||||
)
|
||||
@@ -2233,7 +2226,7 @@
|
||||
(none)
|
||||
)
|
||||
:trans (behavior ()
|
||||
(if (and (zero? (logand (-> self flags) (anim-tester-flags fanimt1))) (= *master-mode* 'menu))
|
||||
(if (and (not (logtest? (-> self flags) (anim-tester-flags fanimt1))) (= *master-mode* 'menu))
|
||||
(anim-tester-interface)
|
||||
)
|
||||
(logclear! (-> self flags) (anim-tester-flags fanimt1))
|
||||
@@ -2499,7 +2492,7 @@
|
||||
"is this node the end of the list. #t = end"
|
||||
(not (not (-> v1-21 next)))
|
||||
)
|
||||
(when (zero? (logand (-> s4-2 flags) 5))
|
||||
(when (not (logtest? (-> s4-2 flags) 5))
|
||||
(format gp-2 " Item \"~S\" ~d ~d " (-> s4-2 privname) (-> s4-2 speed) (-> s4-2 blend))
|
||||
(anim-tester-num-print gp-2 (-> s4-2 first-frame))
|
||||
(format gp-2 " ")
|
||||
@@ -2804,6 +2797,3 @@
|
||||
)
|
||||
(none)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -565,7 +565,7 @@
|
||||
(if (= arg1 (debug-menu-msg press))
|
||||
(logxor! (-> v1-0 flags) 1)
|
||||
)
|
||||
(zero? (logand (-> v1-0 flags) 1))
|
||||
(not (logtest? (-> v1-0 flags) 1))
|
||||
)
|
||||
(else
|
||||
#f
|
||||
@@ -3424,17 +3424,10 @@
|
||||
"sfx-volume"
|
||||
#f
|
||||
,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float))
|
||||
(cond
|
||||
((= arg1 (debug-menu-msg press))
|
||||
(let ((f0-0 arg2))
|
||||
(set! (-> *setting-control* default sfx-volume) f0-0)
|
||||
f0-0
|
||||
)
|
||||
)
|
||||
(else
|
||||
(if (= arg1 (debug-menu-msg press))
|
||||
(set! (-> *setting-control* default sfx-volume) arg2)
|
||||
(-> *setting-control* default sfx-volume)
|
||||
)
|
||||
)
|
||||
)
|
||||
2
|
||||
1
|
||||
@@ -3447,17 +3440,10 @@
|
||||
"music-volume"
|
||||
#f
|
||||
,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float))
|
||||
(cond
|
||||
((= arg1 (debug-menu-msg press))
|
||||
(let ((f0-0 arg2))
|
||||
(set! (-> *setting-control* default music-volume) f0-0)
|
||||
f0-0
|
||||
)
|
||||
)
|
||||
(else
|
||||
(if (= arg1 (debug-menu-msg press))
|
||||
(set! (-> *setting-control* default music-volume) arg2)
|
||||
(-> *setting-control* default music-volume)
|
||||
)
|
||||
)
|
||||
)
|
||||
2
|
||||
1
|
||||
@@ -3470,17 +3456,10 @@
|
||||
"dialog-volume"
|
||||
#f
|
||||
,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float))
|
||||
(cond
|
||||
((= arg1 (debug-menu-msg press))
|
||||
(let ((f0-0 arg2))
|
||||
(set! (-> *setting-control* default dialog-volume) f0-0)
|
||||
f0-0
|
||||
)
|
||||
)
|
||||
(else
|
||||
(if (= arg1 (debug-menu-msg press))
|
||||
(set! (-> *setting-control* default dialog-volume) arg2)
|
||||
(-> *setting-control* default dialog-volume)
|
||||
)
|
||||
)
|
||||
)
|
||||
2
|
||||
1
|
||||
@@ -3945,4 +3924,3 @@
|
||||
(debug-menus-handler *debug-menu-context*)
|
||||
(debug-menus-handler *popup-menu-context*)
|
||||
)
|
||||
|
||||
|
||||
@@ -917,11 +917,10 @@
|
||||
)
|
||||
)
|
||||
((or (= arg0 'full) (-> s0-0 extra process))
|
||||
(add-debug-x #t (bucket-id debug-no-zbuf) s1-0 (the-as rgba (if (-> s0-0 extra process)
|
||||
(the-as uint #x8080ff80)
|
||||
(the-as uint #x800000ff)
|
||||
)
|
||||
)
|
||||
(add-debug-x #t (bucket-id debug-no-zbuf) s1-0 (if (-> s0-0 extra process)
|
||||
(new 'static 'rgba :r #x80 :g #xff :b #x80 :a #x80)
|
||||
(new 'static 'rgba :r #xff :a #x80)
|
||||
)
|
||||
)
|
||||
(set! sv-192 add-debug-text-3d)
|
||||
(set! sv-208 #t)
|
||||
@@ -1018,22 +1017,20 @@
|
||||
(s4-2 (-> (the-as process-drawable s5-2) root trans))
|
||||
)
|
||||
(when s3-2
|
||||
(add-debug-x #t (bucket-id debug-no-zbuf) s4-2 (the-as rgba (if (-> s3-2 extra process)
|
||||
(the-as uint #x8080ff80)
|
||||
(the-as uint #x800000ff)
|
||||
)
|
||||
)
|
||||
(add-debug-x #t (bucket-id debug-no-zbuf) s4-2 (if (-> s3-2 extra process)
|
||||
(new 'static 'rgba :r #x80 :g #xff :b #x80 :a #x80)
|
||||
(new 'static 'rgba :r #xff :a #x80)
|
||||
)
|
||||
)
|
||||
(add-debug-text-3d
|
||||
#t
|
||||
(bucket-id debug-no-zbuf)
|
||||
(res-lump-struct s3-2 'name string)
|
||||
s4-2
|
||||
(the-as font-color (if (logtest? (-> s3-2 extra perm status) (entity-perm-status bit-0 bit-1))
|
||||
1
|
||||
1
|
||||
)
|
||||
)
|
||||
(if (logtest? (-> s3-2 extra perm status) (entity-perm-status bit-0 bit-1))
|
||||
(font-color white)
|
||||
(font-color white)
|
||||
)
|
||||
(new 'static 'vector2h :y 8)
|
||||
)
|
||||
(add-debug-text-3d
|
||||
@@ -1089,11 +1086,10 @@
|
||||
(bucket-id debug-no-zbuf)
|
||||
(the-as vector (&+ v0-35 0))
|
||||
(the-as vector (&+ v0-35 16))
|
||||
(the-as rgba (if (is-object-visible? (-> s5-3 extra level) a1-31)
|
||||
(the-as uint #x80808000)
|
||||
(the-as uint #x80800080)
|
||||
)
|
||||
)
|
||||
(if (is-object-visible? (-> s5-3 extra level) a1-31)
|
||||
(new 'static 'rgba :g #x80 :b #x80 :a #x80)
|
||||
(new 'static 'rgba :r #x80 :b #x80 :a #x80)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -1152,11 +1148,10 @@
|
||||
(bucket-id debug)
|
||||
(the-as vector (-> s3-4 data s2-4))
|
||||
(the-as vector (+ (the-as uint (-> s3-4 data 0 max)) (* s2-4 32)))
|
||||
(the-as rgba (if (zero? (-> s4-4 index))
|
||||
(the-as uint #x80808000)
|
||||
(the-as uint #x808080ff)
|
||||
)
|
||||
)
|
||||
(if (zero? (-> s4-4 index))
|
||||
(new 'static 'rgba :g #x80 :b #x80 :a #x80)
|
||||
(new 'static 'rgba :r #xff :g #x80 :b #x80 :a #x80)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -1531,7 +1526,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(when (zero? (logand (-> obj status) (entity-perm-status user-set-from-cstage)))
|
||||
(when (not (logtest? (-> obj status) (entity-perm-status user-set-from-cstage)))
|
||||
(set! (-> obj user-uint64) (the-as uint 0))
|
||||
0
|
||||
)
|
||||
@@ -1617,7 +1612,7 @@
|
||||
)
|
||||
|
||||
(defmethod run-logic? process-drawable ((obj process-drawable))
|
||||
(or (zero? (logand (-> obj mask) (process-mask actor-pause)))
|
||||
(or (not (logtest? (-> obj mask) (process-mask actor-pause)))
|
||||
(or (>= (+ (-> *ACTOR-bank* pause-dist) (-> obj root pause-adjust-distance))
|
||||
(vector-vector-distance (-> obj root trans) (math-camera-pos))
|
||||
)
|
||||
@@ -1628,7 +1623,7 @@
|
||||
)
|
||||
|
||||
(defmethod birth? entity-links ((obj entity-links) (arg0 vector))
|
||||
(and (zero? (logand (-> obj perm status) (entity-perm-status bit-0 dead)))
|
||||
(and (not (logtest? (-> obj perm status) (entity-perm-status bit-0 dead)))
|
||||
(< (vector-vector-distance (-> obj trans) arg0) (-> *ACTOR-bank* birth-dist))
|
||||
)
|
||||
)
|
||||
@@ -1688,7 +1683,7 @@
|
||||
)
|
||||
)
|
||||
(else
|
||||
(if (and (-> v1-44 process) (zero? (logand (-> v1-44 perm status) (entity-perm-status bit-3))))
|
||||
(if (and (-> v1-44 process) (not (logtest? (-> v1-44 perm status) (entity-perm-status bit-3))))
|
||||
(kill! (-> v1-44 entity))
|
||||
)
|
||||
)
|
||||
@@ -1711,7 +1706,7 @@
|
||||
)
|
||||
)
|
||||
(else
|
||||
(when (and (-> s0-0 process) (zero? (logand (-> s0-0 perm status) (entity-perm-status bit-3))))
|
||||
(when (and (-> s0-0 process) (not (logtest? (-> s0-0 perm status) (entity-perm-status bit-3))))
|
||||
(kill! (-> s0-0 entity))
|
||||
(set! sv-24 (+ sv-24 1))
|
||||
)
|
||||
@@ -1741,7 +1736,7 @@
|
||||
)
|
||||
)
|
||||
(else
|
||||
(if (and (-> v1-84 process) (zero? (logand (-> v1-84 perm status) (entity-perm-status bit-3))))
|
||||
(if (and (-> v1-84 process) (not (logtest? (-> v1-84 perm status) (entity-perm-status bit-3))))
|
||||
(kill! (-> v1-84 entity))
|
||||
)
|
||||
)
|
||||
@@ -1758,7 +1753,7 @@
|
||||
(let ((s1-1 (-> s4-5 data s2-3)))
|
||||
(cond
|
||||
((and (< (vector-vector-distance (-> s1-1 trans) sv-16) (-> *ACTOR-bank* birth-dist))
|
||||
(zero? (logand (-> s1-1 perm status) (entity-perm-status bit-9 bit-10)))
|
||||
(not (logtest? (-> s1-1 perm status) (entity-perm-status bit-9 bit-10)))
|
||||
)
|
||||
(when (not (or (-> s1-1 process) (logtest? (-> s1-1 perm status) (entity-perm-status bit-0 dead))))
|
||||
(birth! (-> s1-1 entity))
|
||||
@@ -1769,7 +1764,7 @@
|
||||
)
|
||||
)
|
||||
(else
|
||||
(if (and (-> s1-1 process) (zero? (logand (-> s1-1 perm status) (entity-perm-status bit-3))))
|
||||
(if (and (-> s1-1 process) (not (logtest? (-> s1-1 perm status) (entity-perm-status bit-3))))
|
||||
(kill! (-> s1-1 entity))
|
||||
)
|
||||
)
|
||||
@@ -1810,7 +1805,7 @@
|
||||
)
|
||||
)
|
||||
(else
|
||||
(when (and (-> sv-32 process) (zero? (logand (-> sv-32 perm status) (entity-perm-status bit-3))))
|
||||
(when (and (-> sv-32 process) (not (logtest? (-> sv-32 perm status) (entity-perm-status bit-3))))
|
||||
(kill! (-> sv-32 entity))
|
||||
(set! sv-24 (+ sv-24 1))
|
||||
)
|
||||
|
||||
@@ -168,8 +168,8 @@
|
||||
|
||||
(defpartgroup group-blue-hit-ground-effect
|
||||
:id 70
|
||||
:duration 5
|
||||
:linger-duration 450
|
||||
:duration (seconds 0.017)
|
||||
:linger-duration (seconds 1.5)
|
||||
:bounds (static-bspherem 0 0 0 2)
|
||||
:parts ((sp-item 261) (sp-item 262) (sp-item 263 :flags (is-3d)) (sp-item 264) (sp-item 265 :flags (is-3d)))
|
||||
)
|
||||
@@ -609,8 +609,8 @@
|
||||
(stop! (-> self sound))
|
||||
)
|
||||
(when (and (< 0.0 (-> self fact-info-target eco-level))
|
||||
(zero? (logand (-> self state-flags) (state-flags first-person-mode)))
|
||||
(zero? (logand (-> self draw status) (draw-status hidden no-anim)))
|
||||
(not (logtest? (-> self state-flags) (state-flags first-person-mode)))
|
||||
(not (logtest? (-> self draw status) (draw-status hidden no-anim)))
|
||||
(not (movie?))
|
||||
(rand-vu-percent?
|
||||
(lerp-scale
|
||||
@@ -670,7 +670,7 @@
|
||||
(let ((v1-150 (rand-vu-int-range 3 (+ (-> self node-list length) -1))))
|
||||
(cond
|
||||
((and (logtest? (-> self control unknown-surface00 flags) (surface-flags jump))
|
||||
(zero? (logand (-> self control status) (cshape-moving-flags onsurf)))
|
||||
(not (logtest? (-> self control status) (cshape-moving-flags onsurf)))
|
||||
)
|
||||
(set! (-> *part-id-table* 259 init-specs 4 initial-valuef) 0.0)
|
||||
(set! (-> *part-id-table* 259 init-specs 4 random-rangef) 65536.0)
|
||||
@@ -731,7 +731,3 @@
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -158,7 +158,7 @@
|
||||
(!= (-> self control unknown-surface00 mode) 'swim)
|
||||
(!= (-> self control unknown-surface00 mode) 'dive)
|
||||
(!= (-> self next-state name) 'target-flop)
|
||||
(zero? (logand (-> self draw status) (draw-status hidden no-anim skip-bones)))
|
||||
(not (logtest? (-> self draw status) (draw-status hidden no-anim skip-bones)))
|
||||
)
|
||||
(set! (-> self control shadow-pos quad) (-> self control trans quad))
|
||||
(find-ground-and-draw-shadow
|
||||
@@ -197,7 +197,3 @@
|
||||
(sp-flt spt-conerot-radius (meters 0.2))
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -234,11 +234,11 @@
|
||||
(vector+! arg1 arg1 (-> obj origin))
|
||||
)
|
||||
|
||||
(define *edge-vert0-table* (the-as (array int8) (new 'static 'boxed-array :type int8 1 2 0)))
|
||||
(define *edge-vert0-table* (new 'static 'boxed-array :type int8 1 2 0))
|
||||
|
||||
(define *edge-vert1-table* (the-as (array int8) (new 'static 'boxed-array :type int8 2 0 1)))
|
||||
(define *edge-vert1-table* (new 'static 'boxed-array :type int8 2 0 1))
|
||||
|
||||
(define *edge-mask-table* (the-as (array int8) (new 'static 'boxed-array :type int8 1 2 4)))
|
||||
(define *edge-mask-table* (new 'static 'boxed-array :type int8 1 2 4))
|
||||
|
||||
(defun inc-mod3 ((arg0 int))
|
||||
(local-vars (v0-1 int) (v1-1 int))
|
||||
@@ -381,7 +381,7 @@
|
||||
(vf9 :class vf)
|
||||
)
|
||||
(let ((t0-0 (-> arg0 poly arg1)))
|
||||
(when (zero? (logand (-> t0-0 pat) 1))
|
||||
(when (not (logtest? (-> t0-0 pat) 1))
|
||||
(let ((v1-5 (-> arg0 vertex (-> t0-0 vertex 0)))
|
||||
(a1-5 (-> arg0 vertex (-> t0-0 vertex 1)))
|
||||
(a0-2 (-> arg0 vertex (-> t0-0 vertex 2)))
|
||||
@@ -758,7 +758,7 @@
|
||||
(countdown (s1-0 (-> obj poly-count))
|
||||
(set! *debug-traverse* (+ *debug-traverse* 1))
|
||||
(let ((a0-3 (-> obj poly s1-0)))
|
||||
(when (zero? (logand (-> a0-3 pat) 1))
|
||||
(when (not (logtest? (-> a0-3 pat) 1))
|
||||
(nop!)
|
||||
(let ((v1-8 (the-as object (-> obj vertex))))
|
||||
(nop!)
|
||||
@@ -871,7 +871,7 @@
|
||||
)
|
||||
)
|
||||
(cond
|
||||
((and (-> arg0 next-poly) (zero? (logand (-> arg0 next-poly pat) 1)))
|
||||
((and (-> arg0 next-poly) (not (logtest? (-> arg0 next-poly pat) 1)))
|
||||
(set! (-> arg0 current-poly) (-> arg0 next-poly))
|
||||
)
|
||||
(else
|
||||
@@ -998,7 +998,7 @@
|
||||
(set! sv-48 (-> (the-as nav-poly (+ sv-32 (the-as int s1-1))) adj-poly 0))
|
||||
(when (and (!= sv-48 255) (!= 1 (-> (the-as (pointer uint8) (&+ arg3 sv-48)))))
|
||||
(set! (-> arg3 sv-48) 1)
|
||||
(when (zero? (logand (-> obj poly sv-48 pat) 1))
|
||||
(when (not (logtest? (-> obj poly sv-48 pat) 1))
|
||||
(let ((v0-3 (= (nav-mesh-lookup-route obj arg0 (the-as int sv-48)) 3)))
|
||||
(when (not v0-3)
|
||||
(tri-centroid-local obj s1-1 s0-0)
|
||||
@@ -1038,14 +1038,14 @@
|
||||
(set! *nav-update-route-table-route-count* 0)
|
||||
(countdown (s3-0 (-> obj poly-count))
|
||||
(let ((s2-0 (-> obj poly s3-0)))
|
||||
(when (zero? (logand (-> s2-0 pat) 1))
|
||||
(when (not (logtest? (-> s2-0 pat) 1))
|
||||
(tri-centroid-local obj s2-0 s5-0)
|
||||
(mem-set32! s4-0 64 0)
|
||||
(set! (-> s4-0 s3-0) 1)
|
||||
(dotimes (s1-0 3)
|
||||
(let ((a3-0 (-> s2-0 adj-poly s1-0)))
|
||||
(when (!= a3-0 255)
|
||||
(if (zero? (logand (-> obj poly a3-0 pat) 1))
|
||||
(if (not (logtest? (-> obj poly a3-0 pat) 1))
|
||||
(dummy-18 obj s3-0 s5-0 (the-as int a3-0) s4-0 0)
|
||||
)
|
||||
)
|
||||
@@ -1180,7 +1180,7 @@
|
||||
(let ((f30-0 10000000000000000000000000000000000000.0))
|
||||
(countdown (s1-0 (-> obj poly-count))
|
||||
(let ((s0-0 (-> obj poly s1-0)))
|
||||
(when (zero? (logand (-> s0-0 pat) 1))
|
||||
(when (not (logtest? (-> s0-0 pat) 1))
|
||||
(set! (-> s2-0 0 quad) (-> obj vertex (-> s0-0 vertex 0) quad))
|
||||
(set! (-> s2-0 1 quad) (-> obj vertex (-> s0-0 vertex 1) quad))
|
||||
(set! (-> s2-0 2 quad) (-> obj vertex (-> s0-0 vertex 2) quad))
|
||||
@@ -1456,10 +1456,7 @@
|
||||
(when (< arg3 f0-2)
|
||||
(let ((f0-3 (/ arg3 f0-2)))
|
||||
(set! (-> arg0 x) (* (-> arg0 x) f0-3))
|
||||
(let ((f0-4 (* (-> arg0 z) f0-3)))
|
||||
(set! (-> arg0 z) f0-4)
|
||||
f0-4
|
||||
)
|
||||
(set! (-> arg0 z) (* (-> arg0 z) f0-3))
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -1627,8 +1624,8 @@
|
||||
(-> s5-0 bounds w)
|
||||
(new 'static 'rgba :r #xff :g #xff :a #x20)
|
||||
)
|
||||
(add-debug-vector #t (bucket-id debug-no-zbuf) (-> s5-0 origin) *x-vector* (meters 1.0) *color-red*)
|
||||
(add-debug-vector #t (bucket-id debug-no-zbuf) (-> s5-0 origin) *z-vector* (meters 1.0) *color-blue*)
|
||||
(add-debug-vector #t (bucket-id debug-no-zbuf) (-> s5-0 origin) *x-vector* (meters 1) *color-red*)
|
||||
(add-debug-vector #t (bucket-id debug-no-zbuf) (-> s5-0 origin) *z-vector* (meters 1) *color-blue*)
|
||||
(when (logtest? (-> obj flags) (nav-control-flags navcf2))
|
||||
(dotimes (s3-0 (-> s5-0 vertex-count))
|
||||
(add-debug-x
|
||||
@@ -1687,27 +1684,26 @@
|
||||
(when (logtest? (-> obj flags) (nav-control-flags navcf3))
|
||||
(dotimes (s3-2 (-> s5-0 poly-count))
|
||||
(let ((s2-1 (-> s5-0 poly s3-2)))
|
||||
(debug-draw-poly s5-0 s2-1 (the-as rgba (cond
|
||||
((logtest? (-> s2-1 pat) 1)
|
||||
#x40808000
|
||||
)
|
||||
((logtest? (-> s2-1 pat) 2)
|
||||
#x4080ff00
|
||||
)
|
||||
((logtest? (-> s2-1 pat) 4)
|
||||
(the-as int (the-as uint #x8040ff00))
|
||||
)
|
||||
((logtest? (-> s2-1 pat) 8)
|
||||
(the-as int (the-as uint #xff408000))
|
||||
)
|
||||
((logtest? (-> s2-1 pat) 16)
|
||||
(the-as int (the-as uint #xff408000))
|
||||
)
|
||||
(else
|
||||
(the-as int (the-as uint #x80ff8000))
|
||||
)
|
||||
)
|
||||
)
|
||||
(debug-draw-poly s5-0 s2-1 (cond
|
||||
((logtest? (-> s2-1 pat) 1)
|
||||
(new 'static 'rgba :g #x80 :b #x80 :a #x40)
|
||||
)
|
||||
((logtest? (-> s2-1 pat) 2)
|
||||
(new 'static 'rgba :g #xff :b #x80 :a #x40)
|
||||
)
|
||||
((logtest? (-> s2-1 pat) 4)
|
||||
(new 'static 'rgba :g #xff :b #x40 :a #x80)
|
||||
)
|
||||
((logtest? (-> s2-1 pat) 8)
|
||||
(new 'static 'rgba :g #x80 :b #x40 :a #xff)
|
||||
)
|
||||
((logtest? (-> s2-1 pat) 16)
|
||||
(new 'static 'rgba :g #x80 :b #x40 :a #xff)
|
||||
)
|
||||
(else
|
||||
(new 'static 'rgba :g #x80 :b #xff :a #x80)
|
||||
)
|
||||
)
|
||||
)
|
||||
(when (logtest? (-> obj flags) (nav-control-flags navcf4))
|
||||
(let ((s1-1 add-debug-text-3d)
|
||||
@@ -2059,7 +2055,7 @@
|
||||
)
|
||||
(while (!= v1-71 (-> s4-0 alive-list-end))
|
||||
(let ((s0-3 (the-as collide-shape (-> (the-as connection v1-71) param3))))
|
||||
(when (not (or (= s0-3 (-> obj shape)) (zero? (logand arg0 (-> s0-3 root-prim prim-core collide-as)))))
|
||||
(when (not (or (= s0-3 (-> obj shape)) (not (logtest? arg0 (-> s0-3 root-prim prim-core collide-as)))))
|
||||
(let ((s1-3 obj))
|
||||
(set! sv-112 s3-0)
|
||||
(when (logtest? (-> s0-3 nav-flags) (nav-flags navf0))
|
||||
@@ -2224,7 +2220,7 @@
|
||||
(let ((s1-0 (new 'stack-no-clear 'vector)))
|
||||
(vector-float*! s1-0 arg1 arg2)
|
||||
(dotimes (s0-0 arg3)
|
||||
(when (zero? (logand arg5 (ash 1 s0-0)))
|
||||
(when (not (logtest? arg5 (ash 1 s0-0)))
|
||||
(let* ((v1-7 (-> arg4 s0-0))
|
||||
(f0-2 (ray-circle-intersect arg0 s1-0 v1-7 (-> v1-7 w)))
|
||||
)
|
||||
@@ -2509,7 +2505,7 @@
|
||||
)
|
||||
(when (or (not (dummy-16 obj arg0))
|
||||
(logtest? (nav-control-flags navcf17) (-> obj flags))
|
||||
(zero? (logand (-> obj flags) (nav-control-flags navcf10)))
|
||||
(not (logtest? (-> obj flags) (nav-control-flags navcf10)))
|
||||
)
|
||||
(set! (-> obj flags) (logior (nav-control-flags navcf21) (-> obj flags)))
|
||||
(vector-! (-> obj travel) arg2 (-> arg1 trans))
|
||||
@@ -2711,7 +2707,7 @@
|
||||
v1-0
|
||||
(-> obj current-poly)
|
||||
(-> obj travel)
|
||||
(zero? (logand (-> obj flags) (nav-control-flags navcf12)))
|
||||
(not (logtest? (-> obj flags) (nav-control-flags navcf12)))
|
||||
arg0
|
||||
arg1
|
||||
)
|
||||
@@ -2918,7 +2914,7 @@
|
||||
sv-84
|
||||
sv-88
|
||||
(-> obj travel)
|
||||
(zero? (logand (-> obj flags) (nav-control-flags navcf12)))
|
||||
(not (logtest? (-> obj flags) (nav-control-flags navcf12)))
|
||||
204.8
|
||||
s5-1
|
||||
)
|
||||
@@ -2962,73 +2958,7 @@
|
||||
(logclear! (-> obj flags) (nav-control-flags navcf9 navcf17 navcf18 navcf19))
|
||||
(TODO-RENAME-27 obj)
|
||||
(if (logtest? (-> obj flags) (nav-control-flags navcf8))
|
||||
(TODO-RENAME-28 obj (collide-kind
|
||||
background
|
||||
cak-1
|
||||
cak-2
|
||||
cak-3
|
||||
target
|
||||
water
|
||||
powerup
|
||||
crate
|
||||
enemy
|
||||
wall-object
|
||||
projectile
|
||||
ground-object
|
||||
target-attack
|
||||
mother-spider
|
||||
cak-14
|
||||
blue-eco-suck
|
||||
unknown-16
|
||||
unknown-17
|
||||
unknown-18
|
||||
unknown-19
|
||||
unknown-20
|
||||
unknown-21
|
||||
unknown-22
|
||||
unknown-23
|
||||
unknown-24
|
||||
unknown-25
|
||||
unknown-26
|
||||
unknown-27
|
||||
unknown-28
|
||||
unknown-29
|
||||
unknown-30
|
||||
unknown-31
|
||||
unknown-32
|
||||
unknown-33
|
||||
unknown-34
|
||||
unknown-35
|
||||
unknown-36
|
||||
unknown-37
|
||||
unknown-38
|
||||
unknown-39
|
||||
unknown-40
|
||||
unknown-41
|
||||
unknown-42
|
||||
unknown-43
|
||||
unknown-44
|
||||
unknown-45
|
||||
unknown-46
|
||||
unknown-47
|
||||
unknown-48
|
||||
unknown-49
|
||||
unknown-50
|
||||
unknown-51
|
||||
unknown-52
|
||||
unknown-53
|
||||
unknown-54
|
||||
unknown-55
|
||||
unknown-56
|
||||
unknown-57
|
||||
unknown-58
|
||||
unknown-59
|
||||
unknown-60
|
||||
unknown-61
|
||||
unknown-62
|
||||
unknown-63
|
||||
)
|
||||
)
|
||||
(TODO-RENAME-28 obj (the-as collide-kind -1))
|
||||
)
|
||||
(dummy-13 obj arg0 (-> obj old-travel))
|
||||
(-> obj mesh)
|
||||
@@ -3069,7 +2999,3 @@
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -109,7 +109,7 @@
|
||||
(meters 0.000024414063)
|
||||
(the-as rgba (+ #x408040 (shl s4-0 24)))
|
||||
)
|
||||
(when (zero? (logand (-> s2-0 status) (cshape-moving-flags csmf08)))
|
||||
(when (not (logtest? (-> s2-0 status) (cshape-moving-flags csmf08)))
|
||||
(add-debug-line
|
||||
(logtest? s5-0 1)
|
||||
(bucket-id debug-no-zbuf)
|
||||
@@ -128,7 +128,7 @@
|
||||
(bucket-id debug-no-zbuf)
|
||||
(-> s2-0 intersect)
|
||||
(-> s2-0 surface-normal)
|
||||
(meters 1.0)
|
||||
(meters 1)
|
||||
(the-as rgba (+ s1-1 (shl s4-0 24)))
|
||||
)
|
||||
(add-debug-vector
|
||||
@@ -136,7 +136,7 @@
|
||||
(bucket-id debug-no-zbuf)
|
||||
(-> s2-0 intersect)
|
||||
(-> s2-0 local-normal)
|
||||
(meters 1.0)
|
||||
(meters 1)
|
||||
(the-as rgba (+ s1-1 (shl s4-0 24)))
|
||||
)
|
||||
)
|
||||
@@ -176,11 +176,11 @@
|
||||
(format
|
||||
#t
|
||||
"~C~C~C~C~C~C"
|
||||
(if (zero? (logand s3-0 (cshape-reaction-flags csrf00)))
|
||||
(if (not (logtest? s3-0 (cshape-reaction-flags csrf00)))
|
||||
103
|
||||
87
|
||||
)
|
||||
(if (zero? (logand s3-0 (cshape-reaction-flags csrf01)))
|
||||
(if (not (logtest? s3-0 (cshape-reaction-flags csrf01)))
|
||||
103
|
||||
87
|
||||
)
|
||||
@@ -188,7 +188,7 @@
|
||||
((logtest? s3-0 (cshape-reaction-flags csrf11))
|
||||
71
|
||||
)
|
||||
((zero? (logand s3-0 (cshape-reaction-flags csrf02)))
|
||||
((not (logtest? s3-0 (cshape-reaction-flags csrf02)))
|
||||
103
|
||||
)
|
||||
(else
|
||||
@@ -206,11 +206,11 @@
|
||||
99
|
||||
)
|
||||
)
|
||||
(if (zero? (logand s3-0 (cshape-reaction-flags csrf04)))
|
||||
(if (not (logtest? s3-0 (cshape-reaction-flags csrf04)))
|
||||
110
|
||||
66
|
||||
)
|
||||
(if (zero? (logand s3-0 (cshape-reaction-flags csrf05)))
|
||||
(if (not (logtest? s3-0 (cshape-reaction-flags csrf05)))
|
||||
103
|
||||
65
|
||||
)
|
||||
@@ -751,7 +751,7 @@
|
||||
)
|
||||
(vector-matrix*! s2-3 s3-3 (-> self control unknown-matrix01))
|
||||
(let ((f28-2 (vector-vector-xz-distance s3-3 s4-0)))
|
||||
(when (and (zero? (logand (-> self control status) (cshape-moving-flags tsurf)))
|
||||
(when (and (not (logtest? (-> self control status) (cshape-moving-flags tsurf)))
|
||||
(< (vector-xz-length gp-0) (vector-xz-length s3-3))
|
||||
)
|
||||
(let ((f0-50 (lerp-scale 163840.0 0.0 f28-2 0.0 20480.0)))
|
||||
@@ -763,7 +763,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(if (and (zero? (logand (-> self control status) (cshape-moving-flags twall)))
|
||||
(if (and (not (logtest? (-> self control status) (cshape-moving-flags twall)))
|
||||
(logtest? (-> self control old-status) (cshape-moving-flags twall))
|
||||
(logtest? (-> self control unknown-surface00 flags) (surface-flags jump))
|
||||
(< 0.0 (-> gp-0 y))
|
||||
@@ -782,7 +782,7 @@
|
||||
(if (< (- (-> *display* base-frame-counter) (-> self control unknown-dword70)) (seconds 0.2))
|
||||
(set! f30-4 (+ 204800.0 f30-4))
|
||||
)
|
||||
(if (and (zero? (logand (-> self control status) (cshape-moving-flags twall)))
|
||||
(if (and (not (logtest? (-> self control status) (cshape-moving-flags twall)))
|
||||
(and (logtest? (-> self control old-status) (cshape-moving-flags twall))
|
||||
(logtest? (-> self control unknown-surface00 flags) (surface-flags jump))
|
||||
(< 0.0 (-> gp-0 y))
|
||||
@@ -901,8 +901,8 @@
|
||||
(defbehavior do-rotations2 target ()
|
||||
(let ((gp-0 (vector-z-quaternion! (new-stack-vector0) (-> self control dir-targ)))
|
||||
(s5-0
|
||||
(if (and (or (zero? (logand (logior (-> self control status) (-> self control old-status)) (cshape-moving-flags onsurf tsurf))
|
||||
)
|
||||
(if (and (or (not (logtest? (logior (-> self control status) (-> self control old-status)) (cshape-moving-flags onsurf tsurf))
|
||||
)
|
||||
(< (- (-> *display* base-frame-counter) (-> self control unknown-dword20)) (seconds 0.5))
|
||||
(!= (-> self next-state name) 'target-walk)
|
||||
(< (- (-> *display* base-frame-counter) (-> self state-time)) (seconds 0.5))
|
||||
@@ -910,7 +910,7 @@
|
||||
(logtest? (-> self control unknown-surface01 flags) (surface-flags no-rotate-toward-transv))
|
||||
(!= (-> self control unknown-float41) 0.0)
|
||||
)
|
||||
(zero? (logand (-> self control unknown-surface01 flags) (surface-flags always-rotate-toward-transv)))
|
||||
(not (logtest? (-> self control unknown-surface01 flags) (surface-flags always-rotate-toward-transv)))
|
||||
)
|
||||
(-> self control unknown-vector20)
|
||||
(-> self control transv)
|
||||
@@ -941,7 +941,7 @@
|
||||
(bucket-id debug-no-zbuf)
|
||||
(-> self control trans)
|
||||
gp-0
|
||||
(meters 2.0)
|
||||
(meters 2)
|
||||
(new 'static 'rgba :r #xff :g #xff :b #xff :a #x80)
|
||||
)
|
||||
(add-debug-vector
|
||||
@@ -949,7 +949,7 @@
|
||||
(bucket-id debug-no-zbuf)
|
||||
(-> self control trans)
|
||||
s5-0
|
||||
(meters 2.0)
|
||||
(meters 2)
|
||||
(new 'static 'rgba :r #xff :a #x80)
|
||||
)
|
||||
)
|
||||
@@ -958,7 +958,7 @@
|
||||
(bucket-id debug-no-zbuf)
|
||||
(-> self control trans)
|
||||
(-> self control unknown-matrix01 vector 2)
|
||||
(meters 2.0)
|
||||
(meters 2)
|
||||
(new 'static 'rgba :r #xff :b #xff :a #x80)
|
||||
)
|
||||
(rotate-toward-orientation!
|
||||
@@ -1001,7 +1001,7 @@
|
||||
(set! (-> self control unknown-dword11) (-> *display* base-frame-counter))
|
||||
(set! (-> self control unknown-vector52 quad) (-> self control trans quad))
|
||||
(if (and (>= (-> self control coverage) 1.0)
|
||||
(zero? (logand (-> self control status) (cshape-moving-flags t-act on-water)))
|
||||
(not (logtest? (-> self control status) (cshape-moving-flags t-act on-water)))
|
||||
(logtest? (-> self control status) (cshape-moving-flags onground))
|
||||
)
|
||||
(set! (-> self control last-known-safe-ground quad) (-> self control trans quad))
|
||||
@@ -1029,12 +1029,12 @@
|
||||
)
|
||||
(when (and (cpad-pressed? (-> self control unknown-cpad-info00 number) triangle)
|
||||
(zero? (-> self control unknown-int40))
|
||||
(zero? (logand (-> *kernel-context* prevent-from-run) (process-mask movie)))
|
||||
(not (logtest? (-> *kernel-context* prevent-from-run) (process-mask movie)))
|
||||
)
|
||||
(if (and (= (-> self cam-user-mode) 'normal)
|
||||
(logtest? (-> self control unknown-surface00 flags) (surface-flags allow-look-around))
|
||||
(zero? (logand (-> self control root-prim prim-core action) (collide-action ca-7 ca-8 ca-9 ca-12 ca-13 ca-14))
|
||||
)
|
||||
(not (logtest? (-> self control root-prim prim-core action) (collide-action ca-7 ca-8 ca-9 ca-12 ca-13 ca-14))
|
||||
)
|
||||
(-> *setting-control* current allow-look-around)
|
||||
(>= (- (-> *display* base-frame-counter) (-> self no-look-around-wait)) (seconds 0.05))
|
||||
(not (and (= (-> self control ground-pat material) (pat-material ice))
|
||||
@@ -1048,7 +1048,7 @@
|
||||
(when (and (= *cheat-mode* 'debug)
|
||||
(cpad-hold? (-> self control unknown-cpad-info00 number) r2)
|
||||
(not *pause-lock*)
|
||||
(zero? (logand (-> self state-flags) (state-flags grabbed first-person-mode)))
|
||||
(not (logtest? (-> self state-flags) (state-flags grabbed first-person-mode)))
|
||||
)
|
||||
(if (!= (-> self next-state name) 'target-falling)
|
||||
(send-event self 'change-mode 'falling)
|
||||
@@ -1095,7 +1095,7 @@
|
||||
(let ((f0-17 (vector-dot (-> self control dynam gravity-normal) (-> self control transv))))
|
||||
(if (and (or (logtest? (-> self control unknown-surface01 flags) (surface-flags allow-edge-grab))
|
||||
(and (= (-> self next-state name) 'target-walk)
|
||||
(zero? (logand (-> self control status) (cshape-moving-flags onsurf)))
|
||||
(not (logtest? (-> self control status) (cshape-moving-flags onsurf)))
|
||||
)
|
||||
)
|
||||
(< f0-17 0.0)
|
||||
@@ -1108,7 +1108,7 @@
|
||||
)
|
||||
9420.8
|
||||
)
|
||||
(zero? (logand (-> self control root-prim prim-core action) (collide-action ca-9 ca-14)))
|
||||
(not (logtest? (-> self control root-prim prim-core action) (collide-action ca-9 ca-14)))
|
||||
#t
|
||||
)
|
||||
)
|
||||
@@ -1157,7 +1157,7 @@
|
||||
)
|
||||
(let ((f0-2
|
||||
(if (and (logtest? (-> self control status) (cshape-moving-flags twall))
|
||||
(zero? (logand (-> self control status) (cshape-moving-flags onsurf)))
|
||||
(not (logtest? (-> self control status) (cshape-moving-flags onsurf)))
|
||||
)
|
||||
0.0
|
||||
(-> self control unknown-float81)
|
||||
@@ -1198,7 +1198,7 @@
|
||||
(bucket-id debug-no-zbuf)
|
||||
(-> self control trans)
|
||||
(-> self control ground-poly-normal)
|
||||
(meters 2.0)
|
||||
(meters 2)
|
||||
(new 'static 'rgba :b #xff :a #x80)
|
||||
)
|
||||
(add-debug-vector
|
||||
@@ -1206,7 +1206,7 @@
|
||||
(bucket-id debug-no-zbuf)
|
||||
(-> self control trans)
|
||||
(-> self control local-normal)
|
||||
(meters 2.0)
|
||||
(meters 2)
|
||||
(new 'static 'rgba :b #xff :a #x80)
|
||||
)
|
||||
(add-debug-vector
|
||||
@@ -1222,7 +1222,7 @@
|
||||
(bucket-id debug-no-zbuf)
|
||||
(-> self control trans)
|
||||
(-> self control dynam gravity-normal)
|
||||
(meters 3.0)
|
||||
(meters 3)
|
||||
(new 'static 'rgba :r #xff :b #xff :a #x80)
|
||||
)
|
||||
)
|
||||
@@ -1346,7 +1346,7 @@
|
||||
(bucket-id debug-no-zbuf)
|
||||
(-> (the-as swingpole s4-0) root trans)
|
||||
(the-as vector (&-> s4-0 stack 16))
|
||||
(meters 3.0)
|
||||
(meters 3)
|
||||
(new 'static 'rgba :r #xff :b #xff :a #x80)
|
||||
)
|
||||
(add-debug-sphere
|
||||
@@ -1403,7 +1403,7 @@
|
||||
(let ((gp-0 (new 'stack-no-clear 'vector)))
|
||||
(cond
|
||||
((and (= (-> self next-state name) 'target-clone-anim)
|
||||
(zero? (logand (-> self draw status) (draw-status hidden)))
|
||||
(not (logtest? (-> self draw status) (draw-status hidden)))
|
||||
(begin
|
||||
(vector<-cspace! gp-0 (-> self node-list data 3))
|
||||
(set! (-> gp-0 y) (+ -5896.192 (-> gp-0 y)))
|
||||
@@ -1421,7 +1421,7 @@
|
||||
(the-as cspace (-> self node-list data))
|
||||
)
|
||||
(if (not (and (logtest? (-> self water flags) (water-flags wt12))
|
||||
(zero? (logand (-> self water flags) (water-flags wt04)))
|
||||
(not (logtest? (-> self water flags) (water-flags wt04)))
|
||||
)
|
||||
)
|
||||
(set! (-> self control unknown-float30) (- (-> self water base-height) (-> self water swim-height)))
|
||||
@@ -2081,9 +2081,3 @@
|
||||
)
|
||||
*target*
|
||||
)
|
||||
|
||||
0
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
(set! (-> *load-boundary-target* 1 quad) (-> (target-pos 0) quad))
|
||||
(set! (-> *load-boundary-target* 2 quad) (-> *load-boundary-target* 0 quad))
|
||||
(set! (-> *load-boundary-target* 3 quad) (-> *load-boundary-target* 1 quad))
|
||||
(when (zero? (logand (-> *game-info* current-continue flags) (continue-flags intro sage-intro title)))
|
||||
(when (not (logtest? (-> *game-info* current-continue flags) (continue-flags intro sage-intro title)))
|
||||
(set! (-> *level* border?) (-> *level* play?))
|
||||
(set! (-> *setting-control* default border-mode) (-> *level* play?))
|
||||
)
|
||||
@@ -114,7 +114,7 @@
|
||||
(let ((v1-52 (lookup-level-info (-> arg0 level))))
|
||||
(if (and v1-52
|
||||
(= (-> *setting-control* current music) (-> v1-52 music-bank))
|
||||
(zero? (logand (-> arg0 flags) (continue-flags sage-intro title)))
|
||||
(not (logtest? (-> arg0 flags) (continue-flags sage-intro title)))
|
||||
)
|
||||
(remove-setting! 'music-volume)
|
||||
)
|
||||
@@ -184,7 +184,7 @@
|
||||
;; vis info check added for PC, don't bother waiting for vis if the level doesn't have it.
|
||||
(when (and s5-2 (-> s5-2 vis-info 0))
|
||||
(while (and (= (-> s5-2 all-visible?) 'loading) (-> *level* vis?))
|
||||
(suspend)
|
||||
(suspend)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -614,7 +614,7 @@
|
||||
(defbehavior target-hit-push target ((arg0 vector) (arg1 matrix) (arg2 float) (arg3 float) (arg4 attack-info))
|
||||
(case (-> arg4 angle)
|
||||
(('jump 'up 'up-forward)
|
||||
(when (and (zero? (logand (-> self control root-prim prim-core action) (collide-action ca-9 ca-14)))
|
||||
(when (and (not (logtest? (-> self control root-prim prim-core action) (collide-action ca-9 ca-14)))
|
||||
(not (and (= (-> self game mode) 'play) (>= 0.0 (-> self fact-info-target health))))
|
||||
)
|
||||
(if (and (cpad-pressed? (-> self control unknown-cpad-info00 number) circle) (can-feet?))
|
||||
@@ -626,9 +626,9 @@
|
||||
(>= (- (-> *display* base-frame-counter) (-> self control unknown-dword36))
|
||||
(the-as time-frame (-> *TARGET-bank* stuck-timeout))
|
||||
)
|
||||
(zero? (logand (-> self state-flags) (state-flags prevent-attack)))
|
||||
(zero? (logand (-> self control unknown-surface01 flags) (surface-flags prevent-attacks-during-launch-jump surf08))
|
||||
)
|
||||
(not (logtest? (-> self state-flags) (state-flags prevent-attack)))
|
||||
(not (logtest? (-> self control unknown-surface01 flags) (surface-flags prevent-attacks-during-launch-jump surf08))
|
||||
)
|
||||
)
|
||||
)
|
||||
(go
|
||||
@@ -782,7 +782,7 @@
|
||||
(ja :num! (seek!))
|
||||
(set! v1-40 (or (ja-done? 0) (and arg1 (logtest? (-> self control status) (cshape-moving-flags onsurf)))))
|
||||
)
|
||||
(while (and (or (zero? (logand (-> self control status) (cshape-moving-flags onsurf))) s2-1) (!= s2-1 'stuck))
|
||||
(while (and (or (not (logtest? (-> self control status) (cshape-moving-flags onsurf))) s2-1) (!= s2-1 'stuck))
|
||||
(arg2)
|
||||
(+! f30-1 (* (-> arg0 shove-back) f28-1 (-> *display* seconds-per-frame)))
|
||||
(set! s2-1 (target-hit-push s3-1 s1-1 f30-1 (* (-> arg0 shove-back) f28-1) arg0))
|
||||
@@ -859,7 +859,7 @@
|
||||
)
|
||||
)
|
||||
(combine! gp-0 arg1)
|
||||
(when (zero? (logand (-> gp-0 mask) (attack-mask vector)))
|
||||
(when (not (logtest? (-> gp-0 mask) (attack-mask vector)))
|
||||
(vector-z-quaternion! (-> gp-0 vector) (-> self control unknown-quaternion00))
|
||||
(vector-xz-normalize! (-> gp-0 vector) (- (fabs (-> gp-0 shove-back))))
|
||||
(set! (-> gp-0 vector y) (-> gp-0 shove-up))
|
||||
@@ -976,20 +976,18 @@
|
||||
)
|
||||
|
||||
(define *death-spool-array*
|
||||
(the-as (array spool-anim)
|
||||
(new 'static 'boxed-array :type spool-anim
|
||||
(new 'static 'spool-anim :name "death-0181" :index 3 :parts 1 :command-list '())
|
||||
(new 'static 'spool-anim :name "death-0182" :index 4 :parts 1 :command-list '())
|
||||
(new 'static 'spool-anim :name "death-0184" :index 5 :parts 1 :command-list '())
|
||||
(new 'static 'spool-anim :name "death-0186" :index 6 :parts 1 :command-list '())
|
||||
(new 'static 'spool-anim :name "death-0187" :index 7 :parts 1 :command-list '())
|
||||
(new 'static 'spool-anim :name "death-0191" :index 8 :parts 1 :command-list '())
|
||||
(new 'static 'spool-anim :name "death-0193" :index 9 :parts 2 :command-list '())
|
||||
(new 'static 'spool-anim :name "death-0195" :index 10 :parts 1 :command-list '())
|
||||
(new 'static 'spool-anim :name "death-0197" :index 11 :parts 2 :command-list '())
|
||||
(new 'static 'spool-anim :name "death-0199" :index 12 :parts 2 :command-list '())
|
||||
(new 'static 'spool-anim :name "death-0202" :index 13 :parts 1 :command-list '())
|
||||
)
|
||||
(new 'static 'boxed-array :type spool-anim
|
||||
(new 'static 'spool-anim :name "death-0181" :index 3 :parts 1 :command-list '())
|
||||
(new 'static 'spool-anim :name "death-0182" :index 4 :parts 1 :command-list '())
|
||||
(new 'static 'spool-anim :name "death-0184" :index 5 :parts 1 :command-list '())
|
||||
(new 'static 'spool-anim :name "death-0186" :index 6 :parts 1 :command-list '())
|
||||
(new 'static 'spool-anim :name "death-0187" :index 7 :parts 1 :command-list '())
|
||||
(new 'static 'spool-anim :name "death-0191" :index 8 :parts 1 :command-list '())
|
||||
(new 'static 'spool-anim :name "death-0193" :index 9 :parts 2 :command-list '())
|
||||
(new 'static 'spool-anim :name "death-0195" :index 10 :parts 1 :command-list '())
|
||||
(new 'static 'spool-anim :name "death-0197" :index 11 :parts 2 :command-list '())
|
||||
(new 'static 'spool-anim :name "death-0199" :index 12 :parts 2 :command-list '())
|
||||
(new 'static 'spool-anim :name "death-0202" :index 13 :parts 1 :command-list '())
|
||||
)
|
||||
)
|
||||
|
||||
@@ -1000,7 +998,7 @@
|
||||
(defun death-movie-remap ((arg0 int) (arg1 int))
|
||||
(let ((v1-0 (/ arg0 arg1)))
|
||||
(mod
|
||||
(if (zero? (logand v1-0 1))
|
||||
(if (not (logtest? v1-0 1))
|
||||
(logxor v1-0 arg0)
|
||||
(logand #xfffffff (- (logxor v1-0 arg0)))
|
||||
)
|
||||
@@ -1020,7 +1018,7 @@
|
||||
(send-event *camera* 'joystick 0.0 -1.0)
|
||||
(compute-alignment! (-> self align))
|
||||
(let ((s5-0 (new 'stack-no-clear 'vector)))
|
||||
(when (zero? (logand (-> self align flags) (align-flags disabled)))
|
||||
(when (not (logtest? (-> self align flags) (align-flags disabled)))
|
||||
(vector-matrix*! s5-0 (the-as vector (-> self align delta)) (-> self control unknown-matrix01))
|
||||
(vector-float*! (-> self control transv) s5-0 (-> *display* frames-per-second))
|
||||
)
|
||||
@@ -1033,22 +1031,22 @@
|
||||
)
|
||||
|
||||
(defstate target-death (target)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(let ((v1-0 arg2))
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(let ((v1-0 event-type))
|
||||
(the-as object (cond
|
||||
((= v1-0 'end-mode)
|
||||
(set! (-> self control unknown-uint20) (the-as uint #t))
|
||||
)
|
||||
((= v1-0 'change-mode)
|
||||
(case (-> arg3 param 0)
|
||||
(case (-> event param 0)
|
||||
(('grab)
|
||||
#t
|
||||
)
|
||||
)
|
||||
)
|
||||
((= v1-0 'notify)
|
||||
(when (type-type? (-> arg0 type) pov-camera)
|
||||
(case (-> arg3 param 0)
|
||||
(when (type-type? (-> proc type) pov-camera)
|
||||
(case (-> event param 0)
|
||||
(('die 'abort-request)
|
||||
(set! (-> self control unknown-uint20) (the-as uint #t))
|
||||
(set-blackout-frames (seconds 0.2))
|
||||
@@ -1063,7 +1061,7 @@
|
||||
#f
|
||||
)
|
||||
(else
|
||||
(target-generic-event-handler arg0 arg1 arg2 arg3)
|
||||
(target-generic-event-handler proc arg1 event-type event)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -1350,7 +1348,7 @@
|
||||
(set-setting! 'allow-progress #f 0.0 0)
|
||||
(target-death-anim gp-18)
|
||||
(when (and (< (rand-vu-int-count (-> *game-info* death-movie-tick)) (* (-> *death-spool-array* length) 2))
|
||||
(zero? (logand (-> self water flags) (water-flags wt09)))
|
||||
(not (logtest? (-> self water flags) (water-flags wt09)))
|
||||
(!= (-> self control ground-pat material) 9)
|
||||
(!= (-> self control ground-pat material) 10)
|
||||
)
|
||||
@@ -1409,7 +1407,3 @@
|
||||
)
|
||||
:post target-no-stick-post
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -317,7 +317,7 @@
|
||||
(set! (-> s5-0 shove-back) arg0)
|
||||
(set! (-> s5-0 shove-up) arg1)
|
||||
(set! (-> s5-0 angle)
|
||||
(if (zero? (logand (logior (-> self control status) (-> self control old-status)) (cshape-moving-flags onsurf)))
|
||||
(if (not (logtest? (logior (-> self control status) (-> self control old-status)) (cshape-moving-flags onsurf)))
|
||||
'air
|
||||
'shove
|
||||
)
|
||||
@@ -381,7 +381,7 @@
|
||||
)
|
||||
(set! (-> self attack-info-rec prev-state) (-> self state))
|
||||
(logior! (-> self attack-info-rec mask) (attack-mask atki13))
|
||||
(when (zero? (logand (-> self attack-info-rec mask) (attack-mask attacker)))
|
||||
(when (not (logtest? (-> self attack-info-rec mask) (attack-mask attacker)))
|
||||
(set! (-> self attack-info-rec attacker) (process->handle arg2))
|
||||
(logior! (-> self attack-info-rec mask) (attack-mask attacker))
|
||||
)
|
||||
@@ -727,7 +727,7 @@
|
||||
)
|
||||
|
||||
(defbehavior target-apply-tongue target ((arg0 vector))
|
||||
(when (zero? (logand (-> self state-flags) (state-flags being-attacked)))
|
||||
(when (not (logtest? (-> self state-flags) (state-flags being-attacked)))
|
||||
(logior! (-> self state-flags) (state-flags prevent-attack prevent-duck remove-prevents))
|
||||
(let ((gp-1 (vector-! (new 'stack-no-clear 'vector) arg0 (-> self control trans))))
|
||||
(set! (-> self control unknown-float41) (lerp-scale
|
||||
@@ -765,7 +765,7 @@
|
||||
(('shove)
|
||||
(when (!= (-> self next-state name) 'target-hit)
|
||||
(mem-copy! (the-as pointer (-> self attack-info-rec)) (the-as pointer (-> arg3 param 1)) 104)
|
||||
(when (zero? (logand (-> self attack-info-rec mask) (attack-mask attacker)))
|
||||
(when (not (logtest? (-> self attack-info-rec mask) (attack-mask attacker)))
|
||||
(set! (-> self attack-info-rec attacker) (process->handle arg0))
|
||||
(logior! (-> self attack-info-rec mask) (attack-mask attacker))
|
||||
)
|
||||
@@ -786,7 +786,7 @@
|
||||
)
|
||||
(('loading)
|
||||
(if (not (or (and (logtest? (-> self control unknown-surface00 flags) (surface-flags jump))
|
||||
(zero? (logand (-> self control status) (cshape-moving-flags onsurf)))
|
||||
(not (logtest? (-> self control status) (cshape-moving-flags onsurf)))
|
||||
)
|
||||
(or (logtest? (-> self water flags) (water-flags wt09))
|
||||
(logtest? (-> self state-flags) (state-flags dangerous sf02 being-attacked grabbed first-person-mode dying))
|
||||
@@ -823,7 +823,7 @@
|
||||
)
|
||||
(('tube)
|
||||
(if (and (logtest? (-> self control status) (cshape-moving-flags onsurf))
|
||||
(zero? (logand (-> self water flags) (water-flags wt09)))
|
||||
(not (logtest? (-> self water flags) (water-flags wt09)))
|
||||
)
|
||||
(go target-tube-start (process->handle (the-as process (-> arg3 param 1))))
|
||||
)
|
||||
@@ -855,7 +855,7 @@
|
||||
(go target-edge-grab)
|
||||
)
|
||||
(('pole-grab)
|
||||
(if (zero? (logand (-> self control root-prim prim-core action) (collide-action ca-8)))
|
||||
(if (not (logtest? (-> self control root-prim prim-core action) (collide-action ca-8)))
|
||||
(go target-pole-cycle (process->handle (the-as process (-> arg3 param 0))))
|
||||
)
|
||||
)
|
||||
@@ -973,7 +973,7 @@
|
||||
(-> self control unknown-dword50)
|
||||
(-> self control unknown-dword51)
|
||||
)
|
||||
(zero? (logand (-> self state-flags) (state-flags being-attacked dying)))
|
||||
(not (logtest? (-> self state-flags) (state-flags being-attacked dying)))
|
||||
)
|
||||
(set! (-> self control unknown-vector52 quad) (-> self control trans quad))
|
||||
(target-timed-invulnerable (seconds 0.1) self)
|
||||
@@ -1075,7 +1075,3 @@ target-standard-event-handler
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -491,10 +491,7 @@
|
||||
(set! (-> self control root-prim local-sphere w) (* (-> self control root-prim local-sphere w) f30-0))
|
||||
(set! (-> s4-0 local-sphere w) (* (-> s4-0 local-sphere w) f30-0))
|
||||
(set! (-> s5-0 local-sphere w) (* (-> s5-0 local-sphere w) f30-0))
|
||||
(let ((f0-37 (* (-> gp-0 local-sphere w) f30-0)))
|
||||
(set! (-> gp-0 local-sphere w) f0-37)
|
||||
f0-37
|
||||
)
|
||||
(set! (-> gp-0 local-sphere w) (* (-> gp-0 local-sphere w) f30-0))
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -674,7 +671,7 @@
|
||||
(* (-> s1-0 x) (-> *display* seconds-per-frame))
|
||||
)
|
||||
)
|
||||
(if (zero? (logand arg0 (align-opts adjust-xz-vel keep-other-velocities)))
|
||||
(if (not (logtest? arg0 (align-opts adjust-xz-vel keep-other-velocities)))
|
||||
(set! (-> a1-3 z) 0.0)
|
||||
)
|
||||
)
|
||||
@@ -691,7 +688,7 @@
|
||||
(* (-> s1-0 z) (-> *display* seconds-per-frame))
|
||||
)
|
||||
)
|
||||
(if (zero? (logand arg0 (align-opts adjust-x-vel keep-other-velocities)))
|
||||
(if (not (logtest? arg0 (align-opts adjust-x-vel keep-other-velocities)))
|
||||
(set! (-> a1-3 x) 0.0)
|
||||
)
|
||||
)
|
||||
@@ -729,8 +726,8 @@
|
||||
(not (-> *setting-control* current spooling))
|
||||
(not (-> *setting-control* current movie))
|
||||
(not (-> *setting-control* current hint))
|
||||
(zero? (logand (-> self control status) (cshape-moving-flags t-act)))
|
||||
(zero? (logand (-> self water flags) (water-flags wt09)))
|
||||
(not (logtest? (-> self control status) (cshape-moving-flags t-act)))
|
||||
(not (logtest? (-> self water flags) (water-flags wt09)))
|
||||
)
|
||||
)
|
||||
|
||||
@@ -741,8 +738,8 @@
|
||||
(< 0.866 (-> self control surface-angle))
|
||||
)
|
||||
)
|
||||
(and (zero? (logand (-> self control unknown-surface01 flags) (surface-flags prevent-jump)))
|
||||
(zero? (logand (-> self state-flags) (state-flags prevent-jump)))
|
||||
(and (not (logtest? (-> self control unknown-surface01 flags) (surface-flags prevent-jump)))
|
||||
(not (logtest? (-> self state-flags) (state-flags prevent-jump)))
|
||||
(case arg0
|
||||
(('target-wheel-flip)
|
||||
(>= 0.5 (-> self control unknown-float61))
|
||||
@@ -764,7 +761,7 @@
|
||||
)
|
||||
|
||||
(defbehavior fall-test target ()
|
||||
(when (and (zero? (logand (-> self control status) (cshape-moving-flags onsurf)))
|
||||
(when (and (not (logtest? (-> self control status) (cshape-moving-flags onsurf)))
|
||||
(>= (- (-> *display* base-frame-counter) (-> self control unknown-dword11)) (-> *TARGET-bank* ground-timeout))
|
||||
(>= 0.0 (vector-dot (-> self control dynam gravity-normal) (-> self control transv)))
|
||||
(let ((v1-15 (ja-group)))
|
||||
@@ -789,7 +786,7 @@
|
||||
)
|
||||
|
||||
(defbehavior slide-down-test target ()
|
||||
(if (and (zero? (logand (-> self control status) (cshape-moving-flags onsurf csmf07)))
|
||||
(if (and (not (logtest? (-> self control status) (cshape-moving-flags onsurf csmf07)))
|
||||
(>= (- (-> *display* base-frame-counter) (-> self control unknown-dword11)) (-> *TARGET-bank* ground-timeout))
|
||||
(logtest? (-> self control status) (cshape-moving-flags tsurf))
|
||||
(< 0.5 (-> self control surface-angle))
|
||||
@@ -803,18 +800,18 @@
|
||||
(and (< 0.7 (-> self control touch-angle))
|
||||
(and (< (-> self control surface-angle) 0.3)
|
||||
(logtest? (-> self control status) (cshape-moving-flags twall))
|
||||
(or arg0 (zero? (logand (-> self control status) (cshape-moving-flags t-act))))
|
||||
(or arg0 (not (logtest? (-> self control status) (cshape-moving-flags t-act))))
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(defbehavior can-wheel? target ()
|
||||
(and (logtest? (-> self control status) (cshape-moving-flags onsurf))
|
||||
(or (zero? (logand (-> self control status) (cshape-moving-flags twall)))
|
||||
(or (not (logtest? (-> self control status) (cshape-moving-flags twall)))
|
||||
(>= 0.7 (-> self control touch-angle))
|
||||
)
|
||||
(and (< (-> self control unknown-float61) 0.7)
|
||||
(zero? (logand (-> self state-flags) (state-flags prevent-duck)))
|
||||
(not (logtest? (-> self state-flags) (state-flags prevent-duck)))
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -822,9 +819,9 @@
|
||||
(defbehavior can-duck? target ()
|
||||
(and (logtest? (-> self control status) (cshape-moving-flags onsurf))
|
||||
(>= (-> self control unknown-float60) 0.7)
|
||||
(zero? (logand (-> self water flags) (water-flags wt11 wt12)))
|
||||
(zero? (logand (-> self state-flags) (state-flags prevent-duck)))
|
||||
(or (zero? (logand (-> self water flags) (water-flags wt10)))
|
||||
(not (logtest? (-> self water flags) (water-flags wt11 wt12)))
|
||||
(not (logtest? (-> self state-flags) (state-flags prevent-duck)))
|
||||
(or (not (logtest? (-> self water flags) (water-flags wt10)))
|
||||
(< (- (- (-> self control trans y) (- (-> self water base-height) (-> self water wade-height)))) 2457.6)
|
||||
)
|
||||
)
|
||||
@@ -858,12 +855,9 @@
|
||||
|
||||
(defbehavior can-hands? target ((arg0 symbol))
|
||||
(cond
|
||||
((or (zero? (logand (-> *cpad-list* cpads (-> self control unknown-cpad-info00 number) button0-rel 0)
|
||||
(pad-buttons square)
|
||||
)
|
||||
)
|
||||
((or (not (cpad-pressed? (-> self control unknown-cpad-info00 number) square))
|
||||
(or (and (logtest? (-> self state-flags) (state-flags prevent-attack))
|
||||
(or (zero? (logand (-> self state-flags) (state-flags remove-prevents)))
|
||||
(or (not (logtest? (-> self state-flags) (state-flags remove-prevents)))
|
||||
(not (and (= (-> self fact-info-target eco-type) (pickup-type eco-yellow))
|
||||
(>= (-> self fact-info-target eco-level) 1.0)
|
||||
)
|
||||
@@ -1033,7 +1027,7 @@
|
||||
(set! (-> obj intersection quad) (-> arg0 intersection quad))
|
||||
)
|
||||
(cond
|
||||
((zero? (logand s4-0 (attack-mask vector)))
|
||||
((not (logtest? s4-0 (attack-mask vector)))
|
||||
(let* ((s3-0 pp)
|
||||
(s2-0 (handle->process (-> obj attacker)))
|
||||
(v1-39 (if (and (nonzero? s2-0) (type-type? (-> s2-0 type) process-drawable))
|
||||
@@ -1064,15 +1058,15 @@
|
||||
)
|
||||
)
|
||||
(set! (-> obj vector quad) (-> arg0 vector quad))
|
||||
(if (zero? (logand s4-0 (attack-mask shove-back)))
|
||||
(if (not (logtest? s4-0 (attack-mask shove-back)))
|
||||
(set! (-> obj shove-back) (vector-xz-length (-> obj vector)))
|
||||
)
|
||||
(if (zero? (logand s4-0 (attack-mask shove-up)))
|
||||
(if (not (logtest? s4-0 (attack-mask shove-up)))
|
||||
(set! (-> obj shove-up) (-> obj vector y))
|
||||
)
|
||||
)
|
||||
)
|
||||
(if (zero? (logand (-> obj mask) (attack-mask dist)))
|
||||
(if (not (logtest? (-> obj mask) (attack-mask dist)))
|
||||
(set! (-> obj dist) (fabs (-> obj shove-back)))
|
||||
)
|
||||
(if (logtest? s4-0 (attack-mask trans))
|
||||
@@ -1209,7 +1203,3 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -108,9 +108,9 @@
|
||||
)
|
||||
(pad-buttons x)
|
||||
)
|
||||
(zero? (logand (-> self water flags) (water-flags wt09)))
|
||||
(not (logtest? (-> self water flags) (water-flags wt09)))
|
||||
(< (- (-> *display* base-frame-counter) (-> self state-time)) (seconds 3))
|
||||
(zero? (logand (-> self state-flags) (state-flags prevent-jump)))
|
||||
(not (logtest? (-> self state-flags) (state-flags prevent-jump)))
|
||||
)
|
||||
(go target-jump (-> *TARGET-bank* jump-height-min) (-> *TARGET-bank* jump-height-max) (the-as surface #f))
|
||||
)
|
||||
@@ -1004,7 +1004,7 @@
|
||||
(if (can-hands? #t)
|
||||
(go target-running-attack)
|
||||
)
|
||||
(if (and (zero? (logand (-> self control status) (cshape-moving-flags onsurf)))
|
||||
(if (and (not (logtest? (-> self control status) (cshape-moving-flags onsurf)))
|
||||
(>= (- (-> *display* base-frame-counter) (-> self control unknown-dword11)) (seconds 0.08))
|
||||
)
|
||||
(go target-falling #f)
|
||||
@@ -1226,8 +1226,7 @@
|
||||
)
|
||||
:trans (behavior ()
|
||||
((-> self state-hook))
|
||||
(if (and (or (zero? (logand (-> *cpad-list* cpads (-> self control unknown-cpad-info00 number) button0-abs 0) (pad-buttons l1 r1))
|
||||
)
|
||||
(if (and (or (not (cpad-hold? (-> self control unknown-cpad-info00 number) l1 r1))
|
||||
(logtest? (-> self state-flags) (state-flags prevent-duck))
|
||||
)
|
||||
(let ((v1-13 (ja-group)))
|
||||
@@ -1312,8 +1311,7 @@
|
||||
:exit (-> target-duck-stance exit)
|
||||
:trans (behavior ()
|
||||
((-> self state-hook))
|
||||
(if (and (or (zero? (logand (-> *cpad-list* cpads (-> self control unknown-cpad-info00 number) button0-abs 0) (pad-buttons l1 r1))
|
||||
)
|
||||
(if (and (or (not (cpad-hold? (-> self control unknown-cpad-info00 number) l1 r1))
|
||||
(logtest? (-> self state-flags) (state-flags prevent-duck))
|
||||
(and (logtest? (-> self water flags) (water-flags wt10))
|
||||
(>= (- (- (-> self control trans y) (- (-> self water base-height) (-> self water wade-height)))) 2457.6)
|
||||
@@ -1466,8 +1464,8 @@
|
||||
(if (and (cpad-pressed? (-> self control unknown-cpad-info00 number) x)
|
||||
(< (vector-dot (-> self control dynam gravity-normal) (-> self control transv)) 12288.0)
|
||||
(and (< -61440.0 (vector-dot (-> self control dynam gravity-normal) (-> self control transv)))
|
||||
(zero? (logand (-> self water flags) (water-flags wt09)))
|
||||
(zero? (logand (-> self state-flags) (state-flags prevent-jump)))
|
||||
(not (logtest? (-> self water flags) (water-flags wt09)))
|
||||
(not (logtest? (-> self state-flags) (state-flags prevent-jump)))
|
||||
)
|
||||
)
|
||||
(go target-double-jump (-> *TARGET-bank* double-jump-height-min) (-> *TARGET-bank* double-jump-height-max))
|
||||
@@ -1478,9 +1476,9 @@
|
||||
(>= (- (-> *display* base-frame-counter) (-> self control unknown-dword36))
|
||||
(the-as time-frame (-> *TARGET-bank* stuck-timeout))
|
||||
)
|
||||
(zero? (logand (-> self state-flags) (state-flags prevent-attack)))
|
||||
(zero? (logand (-> self control unknown-surface01 flags) (surface-flags prevent-attacks-during-launch-jump surf08))
|
||||
)
|
||||
(not (logtest? (-> self state-flags) (state-flags prevent-attack)))
|
||||
(not (logtest? (-> self control unknown-surface01 flags) (surface-flags prevent-attacks-during-launch-jump surf08))
|
||||
)
|
||||
)
|
||||
)
|
||||
(go
|
||||
@@ -1599,9 +1597,9 @@
|
||||
(>= (- (-> *display* base-frame-counter) (-> self control unknown-dword36))
|
||||
(the-as time-frame (-> *TARGET-bank* stuck-timeout))
|
||||
)
|
||||
(zero? (logand (-> self state-flags) (state-flags prevent-attack)))
|
||||
(zero? (logand (-> self control unknown-surface01 flags) (surface-flags prevent-attacks-during-launch-jump surf08))
|
||||
)
|
||||
(not (logtest? (-> self state-flags) (state-flags prevent-attack)))
|
||||
(not (logtest? (-> self control unknown-surface01 flags) (surface-flags prevent-attacks-during-launch-jump surf08))
|
||||
)
|
||||
)
|
||||
)
|
||||
(go
|
||||
@@ -1699,9 +1697,9 @@
|
||||
(>= (- (-> *display* base-frame-counter) (-> self control unknown-dword36))
|
||||
(the-as time-frame (-> *TARGET-bank* stuck-timeout))
|
||||
)
|
||||
(zero? (logand (-> self state-flags) (state-flags prevent-attack)))
|
||||
(zero? (logand (-> self control unknown-surface01 flags) (surface-flags prevent-attacks-during-launch-jump surf08))
|
||||
)
|
||||
(not (logtest? (-> self state-flags) (state-flags prevent-attack)))
|
||||
(not (logtest? (-> self control unknown-surface01 flags) (surface-flags prevent-attacks-during-launch-jump surf08))
|
||||
)
|
||||
)
|
||||
)
|
||||
(go
|
||||
@@ -1930,7 +1928,7 @@
|
||||
)
|
||||
)
|
||||
(if (and (< (-> *TARGET-bank* fall-far) f0-1)
|
||||
(zero? (logand (-> self control status) (cshape-moving-flags on-water)))
|
||||
(not (logtest? (-> self control status) (cshape-moving-flags on-water)))
|
||||
)
|
||||
(go target-hit-ground-hard f0-1)
|
||||
)
|
||||
@@ -2066,19 +2064,19 @@
|
||||
)
|
||||
|
||||
(defstate target-running-attack (target)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('touched)
|
||||
(cond
|
||||
(((method-of-type touching-shapes-entry prims-touching?)
|
||||
(the-as touching-shapes-entry (-> arg3 param 0))
|
||||
(the-as touching-shapes-entry (-> event param 0))
|
||||
(-> self control)
|
||||
(the-as uint 224)
|
||||
)
|
||||
(let ((gp-1 (target-send-attack
|
||||
arg0
|
||||
proc
|
||||
(the-as uint (-> self control unknown-symbol30))
|
||||
(the-as touching-shapes-entry (-> arg3 param 0))
|
||||
(the-as touching-shapes-entry (-> event param 0))
|
||||
(-> self control unknown-dword50)
|
||||
(-> self control unknown-dword51)
|
||||
)
|
||||
@@ -2086,8 +2084,8 @@
|
||||
)
|
||||
(when gp-1
|
||||
(set! (-> self control unknown-uint20) (the-as uint (-> *display* base-frame-counter)))
|
||||
(let ((v1-9 (if (and (nonzero? arg0) (type-type? (-> arg0 type) process-drawable))
|
||||
arg0
|
||||
(let ((v1-9 (if (and (nonzero? proc) (type-type? (-> proc type) process-drawable))
|
||||
proc
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -2117,12 +2115,12 @@
|
||||
)
|
||||
)
|
||||
(else
|
||||
(target-dangerous-event-handler arg0 arg1 arg2 arg3)
|
||||
(target-dangerous-event-handler proc arg1 event-type event)
|
||||
)
|
||||
)
|
||||
)
|
||||
(else
|
||||
(target-dangerous-event-handler arg0 arg1 arg2 arg3)
|
||||
(target-dangerous-event-handler proc arg1 event-type event)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -2161,7 +2159,7 @@
|
||||
(when (!= (-> self state-time) (-> *display* base-frame-counter))
|
||||
(if (and (or (smack-surface? #t)
|
||||
(and (>= (-> self control unknown-float63) 0.7)
|
||||
(zero? (logand (-> self control status) (cshape-moving-flags t-act)))
|
||||
(not (logtest? (-> self control status) (cshape-moving-flags t-act)))
|
||||
)
|
||||
)
|
||||
(begin
|
||||
@@ -2202,13 +2200,13 @@
|
||||
(if (and (cpad-pressed? (-> self control unknown-cpad-info00 number) x)
|
||||
(and (< 4096.0 (-> self control unknown-float01))
|
||||
(or (>= (- (-> *display* base-frame-counter) (-> self state-time)) (seconds 0.1))
|
||||
(zero? (logand (-> *cpad-list* cpads (-> self control unknown-cpad-info00 number) button0-abs 0)
|
||||
(not (logtest? (-> *cpad-list* cpads (-> self control unknown-cpad-info00 number) button0-abs 0)
|
||||
(pad-buttons square)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(zero? (logand (-> self state-flags) (state-flags prevent-jump prevent-attack)))
|
||||
(zero? (logand (-> self control unknown-surface01 flags) (surface-flags prevent-attacks-during-launch-jump)))
|
||||
(not (logtest? (-> self state-flags) (state-flags prevent-jump prevent-attack)))
|
||||
(not (logtest? (-> self control unknown-surface01 flags) (surface-flags prevent-attacks-during-launch-jump)))
|
||||
)
|
||||
)
|
||||
(go
|
||||
@@ -2261,7 +2259,7 @@
|
||||
(when (not (ja-min? 0))
|
||||
(cond
|
||||
((and (>= (ja-aframe-num 0) 20.0)
|
||||
(and (and (zero? (logand (-> self control status) (cshape-moving-flags onsurf)))
|
||||
(and (and (not (logtest? (-> self control status) (cshape-moving-flags onsurf)))
|
||||
(>= (- (-> *display* base-frame-counter) (-> self control unknown-dword11)) (-> *TARGET-bank* ground-timeout))
|
||||
(>= 0.0 (vector-dot (-> self control dynam gravity-normal) (-> self control transv)))
|
||||
(let ((v1-39 (ja-group)))
|
||||
@@ -2288,10 +2286,7 @@
|
||||
)
|
||||
(set-forward-vel (the-as float 0.0))
|
||||
)
|
||||
((and (zero? (logand (-> *cpad-list* cpads (-> self control unknown-cpad-info00 number) button0-abs 0)
|
||||
(pad-buttons square)
|
||||
)
|
||||
)
|
||||
((and (not (cpad-hold? (-> self control unknown-cpad-info00 number) square))
|
||||
(>= (- (-> *display* base-frame-counter) (-> self state-time)) (seconds 0.05))
|
||||
)
|
||||
(if (= (-> self control ground-pat material) (pat-material ice))
|
||||
@@ -2326,7 +2321,7 @@
|
||||
(+! gp-2 1)
|
||||
)
|
||||
)
|
||||
(if (and (zero? (logand (-> self control status) (cshape-moving-flags onsurf)))
|
||||
(if (and (not (logtest? (-> self control status) (cshape-moving-flags onsurf)))
|
||||
(>= (- (-> *display* base-frame-counter) (-> self control unknown-dword11)) (-> *TARGET-bank* ground-timeout))
|
||||
(>= 0.0 (vector-dot (-> self control dynam gravity-normal) (-> self control transv)))
|
||||
(let ((v1-121 (ja-group)))
|
||||
@@ -2348,15 +2343,15 @@
|
||||
)
|
||||
|
||||
(defstate target-attack-air (target)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(let ((v0-0 (target-bonk-event-handler arg0 arg1 arg2 arg3)))
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(let ((v0-0 (target-bonk-event-handler proc arg1 event-type event)))
|
||||
(cond
|
||||
(v0-0
|
||||
(empty)
|
||||
v0-0
|
||||
)
|
||||
(else
|
||||
(target-dangerous-event-handler arg0 arg1 arg2 arg3)
|
||||
(target-dangerous-event-handler proc arg1 event-type event)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -2596,9 +2591,9 @@
|
||||
(>= (- (-> *display* base-frame-counter) (-> self control unknown-dword36))
|
||||
(the-as time-frame (-> *TARGET-bank* stuck-timeout))
|
||||
)
|
||||
(zero? (logand (-> self state-flags) (state-flags prevent-attack)))
|
||||
(zero? (logand (-> self control unknown-surface01 flags) (surface-flags prevent-attacks-during-launch-jump surf08))
|
||||
)
|
||||
(not (logtest? (-> self state-flags) (state-flags prevent-attack)))
|
||||
(not (logtest? (-> self control unknown-surface01 flags) (surface-flags prevent-attacks-during-launch-jump surf08))
|
||||
)
|
||||
)
|
||||
)
|
||||
(set-quaternion! (-> self control) (-> self control dir-targ))
|
||||
@@ -2668,14 +2663,14 @@
|
||||
)
|
||||
|
||||
(defstate target-flop (target)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(let ((v0-0 (target-bonk-event-handler arg0 arg1 arg2 arg3)))
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(let ((v0-0 (target-bonk-event-handler proc arg1 event-type event)))
|
||||
(cond
|
||||
(v0-0
|
||||
(empty)
|
||||
v0-0
|
||||
)
|
||||
((let ((v1-0 arg2))
|
||||
((let ((v1-0 event-type))
|
||||
(= v1-0 'swim)
|
||||
)
|
||||
(cond
|
||||
@@ -2697,7 +2692,7 @@
|
||||
)
|
||||
)
|
||||
(else
|
||||
(target-dangerous-event-handler arg0 arg1 arg2 arg3)
|
||||
(target-dangerous-event-handler proc arg1 event-type event)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -2916,13 +2911,13 @@
|
||||
)
|
||||
|
||||
(defstate target-flop-hit-ground (target)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('swim)
|
||||
#f
|
||||
)
|
||||
(else
|
||||
(target-standard-event-handler arg0 arg1 arg2 arg3)
|
||||
(target-standard-event-handler proc arg1 event-type event)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -2989,11 +2984,11 @@
|
||||
)
|
||||
|
||||
(defstate target-wheel (target)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(if (= arg2 'touched)
|
||||
(send-event arg0 'roll)
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(if (= event-type 'touched)
|
||||
(send-event proc 'roll)
|
||||
)
|
||||
(target-standard-event-handler arg0 arg1 arg2 arg3)
|
||||
(target-standard-event-handler proc arg1 event-type event)
|
||||
)
|
||||
:enter (behavior ()
|
||||
(set! (-> self state-time) (-> *display* base-frame-counter))
|
||||
@@ -3178,7 +3173,7 @@
|
||||
)
|
||||
)
|
||||
(set! (-> self state-time) (-> *display* base-frame-counter))
|
||||
(while (zero? (logand (-> self control status) (cshape-moving-flags onsurf)))
|
||||
(while (not (logtest? (-> self control status) (cshape-moving-flags onsurf)))
|
||||
(when (>= (- (-> *display* base-frame-counter) (-> self state-time)) (seconds 0.01))
|
||||
(when (not (ja-group? eichar-jump-loop-ja))
|
||||
(ja-channel-push! 1 (seconds 0.1))
|
||||
@@ -3241,7 +3236,3 @@
|
||||
)
|
||||
:post target-post
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -12,14 +12,14 @@
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(defstate target-load-wait (target)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('loading)
|
||||
(set! (-> self state-time) (-> *display* base-frame-counter))
|
||||
#f
|
||||
)
|
||||
(else
|
||||
(target-standard-event-handler arg0 arg1 arg2 arg3)
|
||||
(target-standard-event-handler proc arg1 event-type event)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -63,13 +63,13 @@
|
||||
)
|
||||
|
||||
(defstate target-stance-ambient (target)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('movie)
|
||||
(go target-stance)
|
||||
)
|
||||
(else
|
||||
(target-standard-event-handler arg0 arg1 arg2 arg3)
|
||||
(target-standard-event-handler proc arg1 event-type event)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -277,8 +277,8 @@
|
||||
)
|
||||
|
||||
(defstate hud-waiting (first-person-hud)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('go-away)
|
||||
(go hud-going-out)
|
||||
)
|
||||
@@ -451,21 +451,21 @@
|
||||
)
|
||||
|
||||
(defstate target-look-around (target)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(cond
|
||||
((and (= arg2 'query) (= (-> arg3 param 0) 'mode))
|
||||
((and (= event-type 'query) (= (-> event param 0) 'mode))
|
||||
(-> self state name)
|
||||
)
|
||||
((let ((v1-4 arg2))
|
||||
((let ((v1-4 event-type))
|
||||
(= v1-4 'end-mode)
|
||||
)
|
||||
(go target-stance-look-around)
|
||||
)
|
||||
((-> self control unknown-symbol30)
|
||||
(target-dangerous-event-handler arg0 arg1 arg2 arg3)
|
||||
(target-dangerous-event-handler proc arg1 event-type event)
|
||||
)
|
||||
(else
|
||||
(target-standard-event-handler arg0 arg1 arg2 arg3)
|
||||
(target-standard-event-handler proc arg1 event-type event)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -611,18 +611,18 @@
|
||||
)
|
||||
|
||||
(defstate target-billy-game (target)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(cond
|
||||
((and (= arg2 'query) (= (-> arg3 param 0) 'mode))
|
||||
((and (= event-type 'query) (= (-> event param 0) 'mode))
|
||||
(-> self state name)
|
||||
)
|
||||
((let ((v1-4 arg2))
|
||||
((let ((v1-4 event-type))
|
||||
(= v1-4 'end-mode)
|
||||
)
|
||||
(go target-stance)
|
||||
)
|
||||
(else
|
||||
(target-standard-event-handler arg0 arg1 arg2 arg3)
|
||||
(target-standard-event-handler proc arg1 event-type event)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -743,38 +743,38 @@
|
||||
)
|
||||
|
||||
(defstate target-grab (target)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(cond
|
||||
((and (= arg2 'query) (= (-> arg3 param 0) 'mode))
|
||||
((and (= event-type 'query) (= (-> event param 0) 'mode))
|
||||
(-> self state name)
|
||||
)
|
||||
(else
|
||||
(case arg2
|
||||
(case event-type
|
||||
(('end-mode)
|
||||
(go target-stance)
|
||||
)
|
||||
(('play-anim)
|
||||
(let ((v0-0 (the-as object (-> arg3 param 0))))
|
||||
(let ((v0-0 (the-as object (-> event param 0))))
|
||||
(set! (-> self control unknown-uint20) (the-as uint v0-0))
|
||||
v0-0
|
||||
)
|
||||
)
|
||||
(('clone-anim)
|
||||
(go target-clone-anim (process->handle (the-as process (-> arg3 param 0))))
|
||||
(go target-clone-anim (process->handle (the-as process (-> event param 0))))
|
||||
)
|
||||
(('change-mode)
|
||||
(case (-> arg3 param 0)
|
||||
(case (-> event param 0)
|
||||
(('final-door)
|
||||
(go
|
||||
target-final-door
|
||||
(the-as basic (process->handle (the-as process (-> arg3 param 1))))
|
||||
(process->handle (the-as process (-> arg3 param 2)))
|
||||
(the-as basic (process->handle (the-as process (-> event param 1))))
|
||||
(process->handle (the-as process (-> event param 2)))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(else
|
||||
(target-generic-event-handler arg0 arg1 arg2 arg3)
|
||||
(target-generic-event-handler proc arg1 event-type event)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -795,7 +795,7 @@
|
||||
:code (behavior ()
|
||||
(set-forward-vel (the-as float 0.0))
|
||||
(let ((gp-0 0))
|
||||
(while (zero? (logand (-> self control status) (cshape-moving-flags onsurf)))
|
||||
(while (not (logtest? (-> self control status) (cshape-moving-flags onsurf)))
|
||||
(target-falling-anim-trans)
|
||||
(+! gp-0 (- (-> *display* base-frame-counter) (-> *display* old-base-frame-counter)))
|
||||
(suspend)
|
||||
@@ -912,10 +912,10 @@
|
||||
)
|
||||
|
||||
(defstate target-pole-cycle (target)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(if (and (= arg2 'query) (= (-> arg3 param 0) 'mode))
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(if (and (= event-type 'query) (= (-> event param 0) 'mode))
|
||||
(-> self state name)
|
||||
(target-standard-event-handler arg0 arg1 arg2 arg3)
|
||||
(target-standard-event-handler proc arg1 event-type event)
|
||||
)
|
||||
)
|
||||
:enter (behavior ((arg0 handle))
|
||||
@@ -944,7 +944,7 @@
|
||||
)
|
||||
(pad-buttons x)
|
||||
)
|
||||
(zero? (logand (-> self state-flags) (state-flags prevent-jump)))
|
||||
(not (logtest? (-> self state-flags) (state-flags prevent-jump)))
|
||||
(>= (- (-> *display* base-frame-counter) (-> self state-time)) (seconds 0.1))
|
||||
)
|
||||
(set! (-> self control transv quad) (the-as uint128 0))
|
||||
@@ -1128,13 +1128,13 @@
|
||||
)
|
||||
|
||||
(defstate target-edge-grab (target)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('end-mode)
|
||||
(go target-falling 'target-edge-grab)
|
||||
)
|
||||
(else
|
||||
(target-standard-event-handler arg0 arg1 arg2 arg3)
|
||||
(target-standard-event-handler proc arg1 event-type event)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -1164,7 +1164,7 @@
|
||||
)
|
||||
(pad-buttons x)
|
||||
)
|
||||
(zero? (logand (-> self state-flags) (state-flags prevent-jump)))
|
||||
(not (logtest? (-> self state-flags) (state-flags prevent-jump)))
|
||||
)
|
||||
(cond
|
||||
((or (< -0.2 (local-pad-angle))
|
||||
@@ -1247,13 +1247,13 @@
|
||||
)
|
||||
|
||||
(defstate target-edge-grab-jump (target)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('end-mode)
|
||||
(go target-falling 'target-edge-grab)
|
||||
)
|
||||
(else
|
||||
(target-standard-event-handler arg0 arg1 arg2 arg3)
|
||||
(target-standard-event-handler proc arg1 event-type event)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -1268,7 +1268,7 @@
|
||||
(until (ja-done? 0)
|
||||
(target-compute-edge-rider)
|
||||
(compute-alignment! (-> self align))
|
||||
(when (zero? (logand (-> self align flags) (align-flags disabled)))
|
||||
(when (not (logtest? (-> self align flags) (align-flags disabled)))
|
||||
(vector-matrix*! s4-0 (the-as vector (-> self align delta)) (-> self control unknown-matrix01))
|
||||
(move-by-vector! (-> self control) s4-0)
|
||||
)
|
||||
@@ -1297,7 +1297,7 @@
|
||||
(ja-no-eval :group! eichar-edge-grab-off-ja :num! (seek! (ja-aframe (the-as float 191.0) 0)) :frame-num 0.0)
|
||||
(until (ja-done? 0)
|
||||
(compute-alignment! (-> self align))
|
||||
(when (zero? (logand (-> self align flags) (align-flags disabled)))
|
||||
(when (not (logtest? (-> self align flags) (align-flags disabled)))
|
||||
(vector-matrix*! gp-0 (the-as vector (-> self align delta)) (-> self control unknown-matrix01))
|
||||
(move-by-vector! (-> self control) gp-0)
|
||||
)
|
||||
@@ -1603,8 +1603,8 @@
|
||||
)
|
||||
(pad-buttons x)
|
||||
)
|
||||
(zero? (logand (-> self water flags) (water-flags wt09)))
|
||||
(zero? (logand (-> self state-flags) (state-flags prevent-jump)))
|
||||
(not (logtest? (-> self water flags) (water-flags wt09)))
|
||||
(not (logtest? (-> self state-flags) (state-flags prevent-jump)))
|
||||
)
|
||||
(go target-jump (-> *TARGET-bank* jump-height-min) (-> *TARGET-bank* jump-height-max) (the-as surface #f))
|
||||
)
|
||||
@@ -1665,7 +1665,7 @@
|
||||
)
|
||||
:trans (behavior ()
|
||||
((-> self state-hook))
|
||||
(when (and (zero? (logand (-> self water flags) (water-flags wt10)))
|
||||
(when (and (not (logtest? (-> self water flags) (water-flags wt10)))
|
||||
(>= (- (-> *display* base-frame-counter) (-> self water wade-time)) (seconds 0.05))
|
||||
)
|
||||
(if (logtest? (-> self water flags) (water-flags wt11))
|
||||
@@ -1710,7 +1710,7 @@
|
||||
:exit (-> target-wade-stance exit)
|
||||
:trans (behavior ()
|
||||
((-> self state-hook))
|
||||
(when (and (zero? (logand (-> self water flags) (water-flags wt10)))
|
||||
(when (and (not (logtest? (-> self water flags) (water-flags wt10)))
|
||||
(>= (- (-> *display* base-frame-counter) (-> self water wade-time)) (seconds 0.1))
|
||||
)
|
||||
(if (logtest? (-> self water flags) (water-flags wt11))
|
||||
@@ -1953,10 +1953,7 @@
|
||||
(seek! (-> self control unknown-float131) (the-as float -6144.0) (* 4096.0 (-> *display* seconds-per-frame)))
|
||||
(seek! (-> self control unknown-float131) (the-as float 0.0) (* 2048.0 (-> *display* seconds-per-frame)))
|
||||
)
|
||||
(let ((f0-20 (-> self control unknown-float131)))
|
||||
(set! (-> self control unknown-vector11 y) f0-20)
|
||||
f0-20
|
||||
)
|
||||
(set! (-> self control unknown-vector11 y) (-> self control unknown-float131))
|
||||
)
|
||||
|
||||
(defstate target-swim-stance (target)
|
||||
@@ -1985,11 +1982,11 @@
|
||||
:trans (behavior ()
|
||||
((-> self state-hook))
|
||||
(if (and (logtest? (-> self control status) (cshape-moving-flags onsurf))
|
||||
(zero? (logand (-> self control status) (cshape-moving-flags on-water)))
|
||||
(not (logtest? (-> self control status) (cshape-moving-flags on-water)))
|
||||
)
|
||||
(set-zero! (-> self water bob))
|
||||
)
|
||||
(when (and (zero? (logand (-> self water flags) (water-flags wt11)))
|
||||
(when (and (not (logtest? (-> self water flags) (water-flags wt11)))
|
||||
(>= (- (-> *display* base-frame-counter) (-> self state-time)) (seconds 0.1))
|
||||
)
|
||||
(if (logtest? (-> self water flags) (water-flags wt10))
|
||||
@@ -2100,11 +2097,11 @@
|
||||
:trans (behavior ()
|
||||
((-> self state-hook))
|
||||
(if (and (logtest? (-> self control status) (cshape-moving-flags onsurf))
|
||||
(zero? (logand (-> self control status) (cshape-moving-flags on-water)))
|
||||
(not (logtest? (-> self control status) (cshape-moving-flags on-water)))
|
||||
)
|
||||
(set-zero! (-> self water bob))
|
||||
)
|
||||
(when (and (zero? (logand (-> self water flags) (water-flags wt11)))
|
||||
(when (and (not (logtest? (-> self water flags) (water-flags wt11)))
|
||||
(>= (- (-> *display* base-frame-counter) (-> self water swim-time)) (seconds 0.1))
|
||||
)
|
||||
(if (logtest? (-> self water flags) (water-flags wt10))
|
||||
@@ -2161,7 +2158,7 @@
|
||||
(ja-no-eval :group! eichar-swim-walk-ja :num! (seek!) :frame-num (ja-aframe (the-as float 19.0) 0))
|
||||
(until (ja-done? 0)
|
||||
(compute-alignment! (-> self align))
|
||||
(if (zero? (logand (-> self align flags) (align-flags disabled)))
|
||||
(if (not (logtest? (-> self align flags) (align-flags disabled)))
|
||||
(set! (-> self control unknown-surface00 target-speed)
|
||||
(* (-> self align delta trans z) (-> self control unknown-surface01 alignv) (-> *display* frames-per-second))
|
||||
)
|
||||
@@ -2179,7 +2176,7 @@
|
||||
(ja-no-eval :group! eichar-swim-walk-ja :num! (seek!) :frame-num 0.0)
|
||||
(until (ja-done? 0)
|
||||
(compute-alignment! (-> self align))
|
||||
(if (zero? (logand (-> self align flags) (align-flags disabled)))
|
||||
(if (not (logtest? (-> self align flags) (align-flags disabled)))
|
||||
(set! (-> self control unknown-surface00 target-speed)
|
||||
(* (-> self align delta trans z) (-> self control unknown-surface01 alignv) (-> *display* frames-per-second))
|
||||
)
|
||||
@@ -2194,11 +2191,11 @@
|
||||
)
|
||||
|
||||
(defstate target-swim-down (target)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('attack 'attack-invinc)
|
||||
(let ((v1-2 (the-as attack-info (-> arg3 param 1))))
|
||||
(when (or (zero? (logand (-> v1-2 mask) (attack-mask mode))) (= (-> v1-2 mode) 'generic) (= (-> v1-2 mode) 'drown))
|
||||
(let ((v1-2 (the-as attack-info (-> event param 1))))
|
||||
(when (or (not (logtest? (-> v1-2 mask) (attack-mask mode))) (= (-> v1-2 mode) 'generic) (= (-> v1-2 mode) 'drown))
|
||||
(set! (-> v1-2 mode) 'damage)
|
||||
(if (and (= (-> self game mode) 'play) (>= 1.0 (-> self fact-info-target health)))
|
||||
(set! (-> v1-2 mode) 'drown-death)
|
||||
@@ -2209,7 +2206,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(target-standard-event-handler arg0 arg1 arg2 arg3)
|
||||
(target-standard-event-handler proc arg1 event-type event)
|
||||
)
|
||||
:enter (behavior ()
|
||||
(set! (-> self state-time) (-> *display* base-frame-counter))
|
||||
@@ -2312,10 +2309,7 @@
|
||||
)
|
||||
)
|
||||
(loop
|
||||
(if (and (or (zero? (logand (-> *cpad-list* cpads (-> self control unknown-cpad-info00 number) button0-abs 0)
|
||||
(pad-buttons square)
|
||||
)
|
||||
)
|
||||
(if (and (or (not (cpad-hold? (-> self control unknown-cpad-info00 number) square))
|
||||
(-> self control unknown-spoolanim00)
|
||||
)
|
||||
(>= (- (-> *display* base-frame-counter) (-> self state-time)) gp-0)
|
||||
@@ -2371,8 +2365,8 @@
|
||||
:exit (-> target-swim-down exit)
|
||||
:trans (behavior ()
|
||||
(if (and (cpad-pressed? (-> self control unknown-cpad-info00 number) x)
|
||||
(zero? (logand (-> self state-flags) (state-flags prevent-jump)))
|
||||
(zero? (logand (-> self water flags) (water-flags wt13 wt14)))
|
||||
(not (logtest? (-> self state-flags) (state-flags prevent-jump)))
|
||||
(not (logtest? (-> self water flags) (water-flags wt13 wt14)))
|
||||
)
|
||||
(go
|
||||
target-swim-jump-jump
|
||||
@@ -2405,7 +2399,7 @@
|
||||
(the-as float 0.0)
|
||||
(the-as float 0.1)
|
||||
)
|
||||
(if (and (zero? (logand (-> self water flags) (water-flags wt12)))
|
||||
(if (and (not (logtest? (-> self water flags) (water-flags wt12)))
|
||||
(or (>= (ja-aframe-num 0) 222.0)
|
||||
(and (!= (-> *cpad-list* cpads (-> self control unknown-cpad-info00 number) stick0-speed) 0.0)
|
||||
(>= (ja-aframe-num 0) 200.0)
|
||||
@@ -2415,7 +2409,7 @@
|
||||
(goto cfg-37)
|
||||
)
|
||||
(compute-alignment! (-> self align))
|
||||
(when (zero? (logand (-> self water flags) (water-flags wt12)))
|
||||
(when (not (logtest? (-> self water flags) (water-flags wt12)))
|
||||
(logior! (-> self water flags) (water-flags wt04))
|
||||
(set! gp-0 #f)
|
||||
)
|
||||
@@ -2438,7 +2432,7 @@
|
||||
(the-as float 0.0)
|
||||
(the-as float 0.1)
|
||||
)
|
||||
(if (zero? (logand (-> self water flags) (water-flags wt12)))
|
||||
(if (not (logtest? (-> self water flags) (water-flags wt12)))
|
||||
(goto cfg-37)
|
||||
)
|
||||
(if (cpad-pressed? (-> self control unknown-cpad-info00 number) x)
|
||||
@@ -2502,7 +2496,7 @@
|
||||
(ja :group! eichar-swim-jump-ja :num! min)
|
||||
(until (and (ja-done? 0) (= (-> self skel root-channel 0) (-> self skel channel)))
|
||||
(compute-alignment! (-> self align))
|
||||
(if (zero? (logand (-> self align flags) (align-flags disabled)))
|
||||
(if (not (logtest? (-> self align flags) (align-flags disabled)))
|
||||
(+! (-> self water align-offset) (* 0.6 (-> self align delta trans y)))
|
||||
)
|
||||
(suspend)
|
||||
@@ -2554,7 +2548,7 @@
|
||||
(the-as handle #f)
|
||||
)
|
||||
)
|
||||
(if (zero? (logand (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons l3)))
|
||||
(if (not (cpad-hold? 0 l3))
|
||||
(target-timed-invulnerable (-> *TARGET-bank* hit-invulnerable-timeout) self)
|
||||
)
|
||||
)
|
||||
@@ -2589,10 +2583,10 @@
|
||||
)
|
||||
|
||||
(defstate target-launch (target)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(if (and (= arg2 'query) (= (-> arg3 param 0) 'mode))
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(if (and (= event-type 'query) (= (-> event param 0) 'mode))
|
||||
'target-launch
|
||||
(target-standard-event-handler arg0 arg1 arg2 arg3)
|
||||
(target-standard-event-handler proc arg1 event-type event)
|
||||
)
|
||||
)
|
||||
:code (behavior ((arg0 float) (arg1 symbol) (arg2 vector) (arg3 int))
|
||||
@@ -2685,8 +2679,8 @@
|
||||
)
|
||||
|
||||
(defstate target-periscope (target)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('change-mode)
|
||||
#f
|
||||
)
|
||||
@@ -2697,7 +2691,7 @@
|
||||
)
|
||||
)
|
||||
(else
|
||||
(target-generic-event-handler arg0 arg1 arg2 arg3)
|
||||
(target-generic-event-handler proc arg1 event-type event)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -2784,11 +2778,11 @@
|
||||
)
|
||||
|
||||
(defstate target-clone-anim (target)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(if (and (= arg2 'trans) (= (-> arg3 param 0) 'restore))
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(if (and (= event-type 'trans) (= (-> event param 0) 'restore))
|
||||
(set! (-> self control unknown-uint20) (the-as uint #f))
|
||||
)
|
||||
((-> target-grab event) arg0 arg1 arg2 arg3)
|
||||
((-> target-grab event) proc arg1 event-type event)
|
||||
)
|
||||
:enter (behavior ((arg0 handle))
|
||||
(set! (-> self control unknown-handle10) arg0)
|
||||
@@ -2810,7 +2804,7 @@
|
||||
(cond
|
||||
((not (-> self control unknown-spoolanim00))
|
||||
)
|
||||
((zero? (logand (-> self draw status) (draw-status hidden)))
|
||||
((not (logtest? (-> self draw status) (draw-status hidden)))
|
||||
(move-to-point! (-> self control) (the-as vector a1-2))
|
||||
(matrix->quaternion (-> self control unknown-quaternion00) (-> gp-0 bone transform))
|
||||
(quaternion-copy! (-> self control quat) (-> self control unknown-quaternion00))
|
||||
@@ -2853,7 +2847,3 @@
|
||||
)
|
||||
:post target-no-ja-move-post
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -216,19 +216,19 @@
|
||||
)
|
||||
|
||||
(defstate grottopole-idle (grottopole)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(when (= (-> arg0 type) target)
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(when (= (-> proc type) target)
|
||||
(case event-type
|
||||
(('attack)
|
||||
(let ((v1-2 (-> arg3 param 2)))
|
||||
(let ((v1-2 (-> event param 2)))
|
||||
(when (!= v1-2 (-> self incomming-attack-id))
|
||||
(set! (-> self incomming-attack-id) v1-2)
|
||||
(case (-> arg3 param 1)
|
||||
(case (-> event param 1)
|
||||
(('uppercut)
|
||||
(when (and (< (-> *target* control trans y) (+ -40960.0 (-> self root-override trans y)))
|
||||
(< (-> self position) (-> self max-position))
|
||||
((method-of-type touching-shapes-entry prims-touching?)
|
||||
(the-as touching-shapes-entry (-> arg3 param 0))
|
||||
(the-as touching-shapes-entry (-> event param 0))
|
||||
(the-as collide-shape-moving (-> self root-override))
|
||||
(the-as uint 2)
|
||||
)
|
||||
@@ -243,7 +243,7 @@
|
||||
(when (and (< (+ -40960.0 (-> self root-override trans y)) (-> *target* control trans y))
|
||||
(> (-> self position) 0)
|
||||
((method-of-type touching-shapes-entry prims-touching?)
|
||||
(the-as touching-shapes-entry (-> arg3 param 0))
|
||||
(the-as touching-shapes-entry (-> event param 0))
|
||||
(the-as collide-shape-moving (-> self root-override))
|
||||
(the-as uint 1)
|
||||
)
|
||||
@@ -413,7 +413,7 @@
|
||||
|
||||
(defpartgroup group-beach-harvester-rock-explosion
|
||||
:id 156
|
||||
:duration 600
|
||||
:duration (seconds 2)
|
||||
:flags (use-local-clock)
|
||||
:bounds (static-bspherem 0 0 0 8)
|
||||
:parts ((sp-item 543 :period 1500 :length 5)
|
||||
@@ -545,8 +545,8 @@
|
||||
)
|
||||
|
||||
(defstate ecoventrock-idle (ecoventrock)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('attack)
|
||||
(sound-play "cannon-shot")
|
||||
(increment-success-for-hint (game-text-id sidekick-hint-ecorocks))
|
||||
@@ -998,7 +998,7 @@
|
||||
)
|
||||
)
|
||||
|
||||
;; WARN: Expression building failed: Function (method 20 flutflutegg) has a return type of none, but the expression builder found a return statement.
|
||||
;; WARN: Function (method 20 flutflutegg) has a return type of none, but the expression builder found a return statement.
|
||||
(defmethod dummy-20 flutflutegg ((obj flutflutegg) (arg0 float) (arg1 float) (arg2 float))
|
||||
(if (< (- (-> *display* base-frame-counter) (the-as time-frame (-> obj last-impulse-time))) (seconds 0.5))
|
||||
(return 0)
|
||||
@@ -1015,12 +1015,12 @@
|
||||
(cond
|
||||
((not (task-closed? (game-task beach-flutflut) (task-status need-introduction)))
|
||||
)
|
||||
((zero? (logand (-> self ambients-played) 8))
|
||||
((not (logtest? (-> self ambients-played) 8))
|
||||
(if (play-ambient (-> self ambient) "BIR-AM04" #f (the-as vector #f))
|
||||
(logior! (-> self ambients-played) 8)
|
||||
)
|
||||
)
|
||||
((zero? (logand (-> self ambients-played) 512))
|
||||
((not (logtest? (-> self ambients-played) 512))
|
||||
(if (play-ambient (-> self ambient) "BIR-AM10" #f (the-as vector #f))
|
||||
(logior! (-> self ambients-played) 512)
|
||||
)
|
||||
@@ -1030,15 +1030,15 @@
|
||||
)
|
||||
|
||||
(defstate flutflutegg-idle (flutflutegg)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(when (and (= arg2 'attack)
|
||||
(or (= (-> arg3 param 1) 'punch) (= (-> arg3 param 1) 'spin) (= (-> arg3 param 1) 'spin-air))
|
||||
(!= (-> self incomming-attack-id) (-> arg3 param 2))
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(when (and (= event-type 'attack)
|
||||
(or (= (-> event param 1) 'punch) (= (-> event param 1) 'spin) (= (-> event param 1) 'spin-air))
|
||||
(!= (-> self incomming-attack-id) (-> event param 2))
|
||||
)
|
||||
(set! (-> self incomming-attack-id) (-> arg3 param 2))
|
||||
(set! (-> self incomming-attack-id) (-> event param 2))
|
||||
(flutflutegg-hit-sounds)
|
||||
(let ((s5-1
|
||||
(vector-! (new-stack-vector0) (-> (the-as process-drawable arg0) root trans) (-> self root-override trans))
|
||||
(vector-! (new-stack-vector0) (-> (the-as process-drawable proc) root trans) (-> self root-override trans))
|
||||
)
|
||||
)
|
||||
(set! (-> s5-1 y) 0.0)
|
||||
@@ -1070,22 +1070,22 @@
|
||||
(set! (-> self ambients-played) 0)
|
||||
0
|
||||
)
|
||||
((and (zero? (logand (-> self ambients-played) 1)) (< (vector-length gp-0) 327680.0) (< -61440.0 (-> gp-0 y)))
|
||||
((and (not (logtest? (-> self ambients-played) 1)) (< (vector-length gp-0) 327680.0) (< -61440.0 (-> gp-0 y)))
|
||||
(if (play-ambient (-> self ambient) "BIR-AM01" #f (the-as vector #f))
|
||||
(logior! (-> self ambients-played) 1)
|
||||
)
|
||||
)
|
||||
((and (zero? (logand (-> self ambients-played) 2)) (< (vector-length gp-0) 163840.0) (< -40960.0 (-> gp-0 y)))
|
||||
((and (not (logtest? (-> self ambients-played) 2)) (< (vector-length gp-0) 163840.0) (< -40960.0 (-> gp-0 y)))
|
||||
(if (play-ambient (-> self ambient) "BIR-AM02" #f (the-as vector #f))
|
||||
(logior! (-> self ambients-played) 2)
|
||||
)
|
||||
)
|
||||
((and (zero? (logand (-> self ambients-played) 16)) (< (vector-length gp-0) 81920.0) (< -24576.0 (-> gp-0 y)))
|
||||
((and (not (logtest? (-> self ambients-played) 16)) (< (vector-length gp-0) 81920.0) (< -24576.0 (-> gp-0 y)))
|
||||
(if (play-ambient (-> self ambient) "BIR-AM05" #f (the-as vector #f))
|
||||
(logior! (-> self ambients-played) 16)
|
||||
)
|
||||
)
|
||||
((and (zero? (logand (-> self ambients-played) 4)) (< (vector-length gp-0) 40960.0) (< -24576.0 (-> gp-0 y)))
|
||||
((and (not (logtest? (-> self ambients-played) 4)) (< (vector-length gp-0) 40960.0) (< -24576.0 (-> gp-0 y)))
|
||||
(if (play-ambient (-> self ambient) "BIR-AM03" #f (the-as vector #f))
|
||||
(logior! (-> self ambients-played) 4)
|
||||
)
|
||||
@@ -1123,18 +1123,18 @@
|
||||
)
|
||||
|
||||
(defstate flutflutegg-physics (flutflutegg)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(the-as
|
||||
object
|
||||
(when (and (>= (- (-> *display* base-frame-counter) (-> self state-time)) (seconds 0.5))
|
||||
(= arg2 'attack)
|
||||
(or (= (-> arg3 param 1) 'punch) (= (-> arg3 param 1) 'spin) (= (-> arg3 param 1) 'spin-air))
|
||||
(!= (-> self incomming-attack-id) (-> arg3 param 2))
|
||||
(= event-type 'attack)
|
||||
(or (= (-> event param 1) 'punch) (= (-> event param 1) 'spin) (= (-> event param 1) 'spin-air))
|
||||
(!= (-> self incomming-attack-id) (-> event param 2))
|
||||
)
|
||||
(set! (-> self incomming-attack-id) (-> arg3 param 2))
|
||||
(set! (-> self incomming-attack-id) (-> event param 2))
|
||||
(flutflutegg-hit-sounds)
|
||||
(let ((s5-1
|
||||
(vector-! (new-stack-vector0) (-> (the-as process-drawable arg0) root trans) (-> self root-override trans))
|
||||
(vector-! (new-stack-vector0) (-> (the-as process-drawable proc) root trans) (-> self root-override trans))
|
||||
)
|
||||
)
|
||||
(set! (-> s5-1 y) 0.0)
|
||||
@@ -1264,7 +1264,7 @@
|
||||
)
|
||||
(ja :group! (-> self draw art-group data 5) :num! max)
|
||||
(while (and (not (task-closed? (game-task beach-flutflut) (task-status need-reward-speech)))
|
||||
(zero? (logand (-> self ambients-played) 1024))
|
||||
(not (logtest? (-> self ambients-played) 1024))
|
||||
)
|
||||
(if (play-ambient (-> self ambient) "BIR-AM11" #f (the-as vector #f))
|
||||
(logior! (-> self ambients-played) 1024)
|
||||
@@ -1377,8 +1377,8 @@
|
||||
)
|
||||
|
||||
(defstate harvester-idle (harvester)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('update)
|
||||
(if (and (-> self alt-actor) (logtest? (-> self alt-actor extra perm status) (entity-perm-status complete)))
|
||||
(go harvester-inflate #f)
|
||||
@@ -1534,7 +1534,3 @@
|
||||
(none)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
(robotboss-cut-cam-exit)
|
||||
)
|
||||
((or (and (logtest? (-> *target* control unknown-surface00 flags) (surface-flags jump))
|
||||
(zero? (logand (-> *target* control status) (cshape-moving-flags onsurf)))
|
||||
(not (logtest? (-> *target* control status) (cshape-moving-flags onsurf)))
|
||||
)
|
||||
(-> self skip-cut)
|
||||
)
|
||||
@@ -359,10 +359,7 @@
|
||||
(local-vars (v0-0 object))
|
||||
(case arg2
|
||||
(('flash)
|
||||
(let ((f0-1 (* 0.0078125 (the-as float (-> arg3 param 0)))))
|
||||
(set! (-> self palette-val) f0-1)
|
||||
f0-1
|
||||
)
|
||||
(set! (-> self palette-val) (* 0.0078125 (the-as float (-> arg3 param 0))))
|
||||
)
|
||||
(('bomb-done)
|
||||
(set! (-> self des-cam-entity) #f)
|
||||
@@ -433,8 +430,8 @@
|
||||
)
|
||||
|
||||
(defstate robotboss-yellow-dark-bomb-wait (robotboss)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(let ((v1-0 arg2))
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(let ((v1-0 event-type))
|
||||
(the-as object (cond
|
||||
((= v1-0 'white-eco-picked-up)
|
||||
(close-specific-task! (game-task finalboss-movies) (task-status unknown))
|
||||
@@ -458,7 +455,7 @@
|
||||
(deactivate self)
|
||||
)
|
||||
(else
|
||||
(robotboss-bomb-handler arg0 arg1 arg2 arg3)
|
||||
(robotboss-bomb-handler proc arg1 event-type event)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -912,8 +909,8 @@
|
||||
)
|
||||
|
||||
(defstate robotboss-yellow-wait (robotboss)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('hit-jak)
|
||||
(let ((f0-2 (rand-float-gen)))
|
||||
(cond
|
||||
@@ -941,7 +938,7 @@
|
||||
)
|
||||
)
|
||||
(else
|
||||
(robotboss-handler arg0 arg1 arg2 arg3)
|
||||
(robotboss-handler proc arg1 event-type event)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -1487,8 +1484,8 @@
|
||||
)
|
||||
|
||||
(defstate robotboss-red-wait (robotboss)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('hit-jak)
|
||||
(let ((f0-2 (rand-float-gen)))
|
||||
(cond
|
||||
@@ -1516,7 +1513,7 @@
|
||||
)
|
||||
)
|
||||
(else
|
||||
(robotboss-handler arg0 arg1 arg2 arg3)
|
||||
(robotboss-handler proc arg1 event-type event)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -1939,8 +1936,8 @@
|
||||
)
|
||||
|
||||
(defstate robotboss-green-wait (robotboss)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('trigger)
|
||||
(ja-channel-push! 1 (seconds 0.2))
|
||||
(ja :group! robotboss-green-roar-ja)
|
||||
@@ -1998,7 +1995,7 @@
|
||||
)
|
||||
)
|
||||
(else
|
||||
(robotboss-handler arg0 arg1 arg2 arg3)
|
||||
(robotboss-handler proc arg1 event-type event)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -2352,10 +2349,10 @@
|
||||
(when (and arg1 (nonzero? (-> self looping-sound 0)))
|
||||
(update! (-> self looping-sound 0))
|
||||
(when (and *target*
|
||||
(zero? (logand (-> *target* state-flags)
|
||||
(not (logtest? (-> *target* state-flags)
|
||||
(state-flags being-attacked invulnerable timed-invulnerable invuln-powerup do-not-notice dying)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((t2-0 (new 'stack-no-clear 'collide-tri-result))
|
||||
(a2-0 (new 'stack-no-clear 'vector))
|
||||
@@ -2391,10 +2388,10 @@
|
||||
(when (and arg1 (nonzero? (-> self looping-sound 1)))
|
||||
(update! (-> self looping-sound 1))
|
||||
(if (and *target*
|
||||
(zero? (logand (-> *target* state-flags)
|
||||
(not (logtest? (-> *target* state-flags)
|
||||
(state-flags being-attacked invulnerable timed-invulnerable invuln-powerup do-not-notice dying)
|
||||
)
|
||||
)
|
||||
)
|
||||
(>= 8192.0 (vector-vector-distance gp-0 (target-pos 0)))
|
||||
)
|
||||
(send-event *target* 'attack #f (static-attack-info ((shove-up (meters 2.5)) (shove-back (meters 7.5)))))
|
||||
@@ -2970,7 +2967,3 @@
|
||||
(go robotboss-blue-wait)
|
||||
(none)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -297,7 +297,7 @@
|
||||
(('shove)
|
||||
(when (!= (-> self next-state name) 'target-hit)
|
||||
(mem-copy! (the-as pointer (-> self attack-info-rec)) (the-as pointer (-> arg3 param 1)) 104)
|
||||
(when (zero? (logand (-> self attack-info-rec mask) (attack-mask attacker)))
|
||||
(when (not (logtest? (-> self attack-info-rec mask) (attack-mask attacker)))
|
||||
(set! (-> self attack-info-rec attacker) (process->handle arg0))
|
||||
(logior! (-> self attack-info-rec mask) (attack-mask attacker))
|
||||
)
|
||||
@@ -475,10 +475,7 @@
|
||||
(let ((a0-15 (-> v1-0 draw color-emissive quad)))
|
||||
(set! (-> self draw color-emissive quad) a0-15)
|
||||
)
|
||||
(let ((f0-0 (-> v1-0 draw secondary-interp)))
|
||||
(set! (-> self draw secondary-interp) f0-0)
|
||||
f0-0
|
||||
)
|
||||
(set! (-> self draw secondary-interp) (-> v1-0 draw secondary-interp))
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -533,7 +530,7 @@
|
||||
(if (can-hands? #t)
|
||||
(go target-flut-running-attack)
|
||||
)
|
||||
(if (and (zero? (logand (-> self control status) (cshape-moving-flags onsurf)))
|
||||
(if (and (not (logtest? (-> self control status) (cshape-moving-flags onsurf)))
|
||||
(and (>= (- (-> *display* base-frame-counter) (-> self control unknown-dword11)) (-> *FLUT-bank* ground-timeout))
|
||||
(>= 0.0 (vector-dot (-> self control dynam gravity-normal) (-> self control transv)))
|
||||
(let ((v1-37 (ja-group)))
|
||||
@@ -628,7 +625,7 @@
|
||||
(if (can-hands? #t)
|
||||
(go target-flut-running-attack)
|
||||
)
|
||||
(if (and (zero? (logand (-> self control status) (cshape-moving-flags onsurf)))
|
||||
(if (and (not (logtest? (-> self control status) (cshape-moving-flags onsurf)))
|
||||
(and (>= (- (-> *display* base-frame-counter) (-> self control unknown-dword11)) (-> *FLUT-bank* ground-timeout))
|
||||
(>= 0.0 (vector-dot (-> self control dynam gravity-normal) (-> self control transv)))
|
||||
(let ((v1-37 (ja-group)))
|
||||
@@ -756,10 +753,10 @@
|
||||
)
|
||||
|
||||
(defstate target-flut-jump (target)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(when (and (= arg2 'touched)
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(when (and (= event-type 'touched)
|
||||
((method-of-type touching-shapes-entry prims-touching?)
|
||||
(the-as touching-shapes-entry (-> arg3 param 0))
|
||||
(the-as touching-shapes-entry (-> event param 0))
|
||||
(-> self control)
|
||||
(the-as uint 6)
|
||||
)
|
||||
@@ -770,22 +767,22 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(send-event arg0 'bonk (-> arg3 param 0) (-> self control ground-impact-vel))
|
||||
(send-event proc 'bonk (-> event param 0) (-> self control ground-impact-vel))
|
||||
(when (target-send-attack
|
||||
arg0
|
||||
proc
|
||||
(the-as uint 'flut-bonk)
|
||||
(the-as touching-shapes-entry (-> arg3 param 0))
|
||||
(the-as touching-shapes-entry (-> event param 0))
|
||||
(-> self control unknown-dword50)
|
||||
(-> self control unknown-dword51)
|
||||
)
|
||||
)
|
||||
)
|
||||
(case arg2
|
||||
(case event-type
|
||||
(('jump)
|
||||
(go target-flut-jump (the-as float (-> arg3 param 0)) (the-as float (-> arg3 param 0)))
|
||||
(go target-flut-jump (the-as float (-> event param 0)) (the-as float (-> event param 0)))
|
||||
)
|
||||
(else
|
||||
(target-flut-standard-event-handler arg0 arg1 arg2 arg3)
|
||||
(target-flut-standard-event-handler proc arg1 event-type event)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -820,8 +817,8 @@
|
||||
)
|
||||
(if (and (cpad-pressed? (-> self control unknown-cpad-info00 number) x)
|
||||
(< (vector-dot (-> self control dynam gravity-normal) (-> self control transv)) 40960.0)
|
||||
(and (zero? (logand (-> self water flags) (water-flags wt09)))
|
||||
(zero? (logand (-> self state-flags) (state-flags prevent-jump)))
|
||||
(and (not (logtest? (-> self water flags) (water-flags wt09)))
|
||||
(not (logtest? (-> self state-flags) (state-flags prevent-jump)))
|
||||
(< 4096.0 (target-height-above-ground))
|
||||
)
|
||||
)
|
||||
@@ -833,9 +830,9 @@
|
||||
(>= (- (-> *display* base-frame-counter) (-> self control unknown-dword36))
|
||||
(the-as time-frame (-> *TARGET-bank* stuck-timeout))
|
||||
)
|
||||
(zero? (logand (-> self state-flags) (state-flags prevent-attack)))
|
||||
(zero? (logand (-> self control unknown-surface01 flags) (surface-flags prevent-attacks-during-launch-jump surf08))
|
||||
)
|
||||
(not (logtest? (-> self state-flags) (state-flags prevent-attack)))
|
||||
(not (logtest? (-> self control unknown-surface01 flags) (surface-flags prevent-attacks-during-launch-jump surf08))
|
||||
)
|
||||
)
|
||||
)
|
||||
(go target-flut-air-attack (-> *FLUT-bank* air-attack-speed))
|
||||
@@ -947,9 +944,9 @@
|
||||
)
|
||||
(pad-buttons square)
|
||||
)
|
||||
(and (zero? (logand (-> self state-flags) (state-flags prevent-attack)))
|
||||
(zero? (logand (-> self control unknown-surface01 flags) (surface-flags prevent-attacks-during-launch-jump surf08))
|
||||
)
|
||||
(and (not (logtest? (-> self state-flags) (state-flags prevent-attack)))
|
||||
(not (logtest? (-> self control unknown-surface01 flags) (surface-flags prevent-attacks-during-launch-jump surf08))
|
||||
)
|
||||
(>= (- (-> *display* base-frame-counter) (-> self control unknown-dword36))
|
||||
(the-as time-frame (-> *TARGET-bank* stuck-timeout))
|
||||
)
|
||||
@@ -1065,7 +1062,7 @@
|
||||
(if (move-legs?)
|
||||
(go target-flut-walk)
|
||||
)
|
||||
(if (and (zero? (logand (-> self control status) (cshape-moving-flags onsurf)))
|
||||
(if (and (not (logtest? (-> self control status) (cshape-moving-flags onsurf)))
|
||||
(and (>= (- (-> *display* base-frame-counter) (-> self control unknown-dword11)) (-> *FLUT-bank* ground-timeout))
|
||||
(>= 0.0 (vector-dot (-> self control dynam gravity-normal) (-> self control transv)))
|
||||
(let ((v1-34 (ja-group)))
|
||||
@@ -1151,19 +1148,19 @@
|
||||
)
|
||||
|
||||
(defstate target-flut-running-attack (target)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('touched)
|
||||
(cond
|
||||
(((method-of-type touching-shapes-entry prims-touching?)
|
||||
(the-as touching-shapes-entry (-> arg3 param 0))
|
||||
(the-as touching-shapes-entry (-> event param 0))
|
||||
(-> self control)
|
||||
(the-as uint 224)
|
||||
)
|
||||
(let ((gp-1 (target-send-attack
|
||||
arg0
|
||||
proc
|
||||
(the-as uint (-> self control unknown-symbol30))
|
||||
(the-as touching-shapes-entry (-> arg3 param 0))
|
||||
(the-as touching-shapes-entry (-> event param 0))
|
||||
(-> self control unknown-dword50)
|
||||
(-> self control unknown-dword51)
|
||||
)
|
||||
@@ -1171,8 +1168,8 @@
|
||||
)
|
||||
(when gp-1
|
||||
(set! (-> self control unknown-uint20) (the-as uint (-> *display* base-frame-counter)))
|
||||
(let ((v1-9 (if (and (nonzero? arg0) (type-type? (-> arg0 type) process-drawable))
|
||||
arg0
|
||||
(let ((v1-9 (if (and (nonzero? proc) (type-type? (-> proc type) process-drawable))
|
||||
proc
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -1203,12 +1200,12 @@
|
||||
)
|
||||
)
|
||||
(else
|
||||
(target-flut-dangerous-event-handler arg0 arg1 arg2 arg3)
|
||||
(target-flut-dangerous-event-handler proc arg1 event-type event)
|
||||
)
|
||||
)
|
||||
)
|
||||
(else
|
||||
(target-flut-dangerous-event-handler arg0 arg1 arg2 arg3)
|
||||
(target-flut-dangerous-event-handler proc arg1 event-type event)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -1264,7 +1261,7 @@
|
||||
(when (!= (-> self state-time) (-> *display* base-frame-counter))
|
||||
(if (and (or (smack-surface? #t)
|
||||
(and (>= (-> self control unknown-float63) 0.7)
|
||||
(zero? (logand (-> self control status) (cshape-moving-flags t-act)))
|
||||
(not (logtest? (-> self control status) (cshape-moving-flags t-act)))
|
||||
)
|
||||
)
|
||||
(begin
|
||||
@@ -1295,7 +1292,7 @@
|
||||
)
|
||||
(!= (-> self control unknown-uint31) 1)
|
||||
)
|
||||
(target-shoved (meters 2.0) (-> *TARGET-bank* smack-surface-height) (the-as process #f) target-flut-hit)
|
||||
(target-shoved (meters 2) (-> *TARGET-bank* smack-surface-height) (the-as process #f) target-flut-hit)
|
||||
)
|
||||
(if (and (logtest? (-> self water flags) (water-flags wt09))
|
||||
(zero? (mod (- (-> *display* base-frame-counter) (-> self state-time)) 21))
|
||||
@@ -1330,7 +1327,7 @@
|
||||
(when (not (ja-min? 0))
|
||||
(cond
|
||||
((and (>= (ja-aframe-num 0) 20.0)
|
||||
(and (and (zero? (logand (-> self control status) (cshape-moving-flags onsurf)))
|
||||
(and (and (not (logtest? (-> self control status) (cshape-moving-flags onsurf)))
|
||||
(>= (- (-> *display* base-frame-counter) (-> self control unknown-dword11)) (-> *FLUT-bank* ground-timeout))
|
||||
(>= 0.0 (vector-dot (-> self control dynam gravity-normal) (-> self control transv)))
|
||||
(let ((v1-39 (ja-group)))
|
||||
@@ -1383,7 +1380,7 @@
|
||||
(set! f30-0 (* f30-0 (the-as float (fmin 1.0 (the-as float (-> self control unknown-float140))))))
|
||||
)
|
||||
)
|
||||
(if (and (zero? (logand (-> self control status) (cshape-moving-flags onsurf)))
|
||||
(if (and (not (logtest? (-> self control status) (cshape-moving-flags onsurf)))
|
||||
(>= (- (-> *display* base-frame-counter) (-> self control unknown-dword11)) (-> *FLUT-bank* ground-timeout))
|
||||
(>= 0.0 (vector-dot (-> self control dynam gravity-normal) (-> self control transv)))
|
||||
(let ((v1-105 (ja-group)))
|
||||
@@ -1419,10 +1416,10 @@
|
||||
)
|
||||
|
||||
(defstate target-flut-air-attack (target)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(if (and (= arg2 'touched)
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(if (and (= event-type 'touched)
|
||||
((method-of-type touching-shapes-entry prims-touching?)
|
||||
(the-as touching-shapes-entry (-> arg3 param 0))
|
||||
(the-as touching-shapes-entry (-> event param 0))
|
||||
(-> self control)
|
||||
(the-as uint 6)
|
||||
)
|
||||
@@ -1433,14 +1430,14 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(send-event arg0 'bonk (-> arg3 param 0) (-> self control ground-impact-vel))
|
||||
(send-event proc 'bonk (-> event param 0) (-> self control ground-impact-vel))
|
||||
)
|
||||
(case arg2
|
||||
(case event-type
|
||||
(('jump)
|
||||
(go target-flut-jump (the-as float (-> arg3 param 0)) (the-as float (-> arg3 param 0)))
|
||||
(go target-flut-jump (the-as float (-> event param 0)) (the-as float (-> event param 0)))
|
||||
)
|
||||
(else
|
||||
(target-flut-dangerous-event-handler arg0 arg1 arg2 arg3)
|
||||
(target-flut-dangerous-event-handler proc arg1 event-type event)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -1659,7 +1656,7 @@
|
||||
)
|
||||
)
|
||||
(combine! gp-0 arg1)
|
||||
(when (zero? (logand (-> gp-0 mask) (attack-mask vector)))
|
||||
(when (not (logtest? (-> gp-0 mask) (attack-mask vector)))
|
||||
(vector-z-quaternion! (-> gp-0 vector) (-> self control unknown-quaternion00))
|
||||
(vector-xz-normalize! (-> gp-0 vector) (- (fabs (-> gp-0 shove-back))))
|
||||
(set! (-> gp-0 vector y) (-> gp-0 shove-up))
|
||||
@@ -1857,7 +1854,7 @@
|
||||
(until (ja-done? 0)
|
||||
(compute-alignment! (-> self align))
|
||||
(let ((gp-5 (new 'stack-no-clear 'vector)))
|
||||
(when (zero? (logand (-> self align flags) (align-flags disabled)))
|
||||
(when (not (logtest? (-> self align flags) (align-flags disabled)))
|
||||
(vector-matrix*! gp-5 (the-as vector (-> self align delta)) (-> self control unknown-matrix01))
|
||||
(vector-float*! (-> self control transv) gp-5 (-> *display* frames-per-second))
|
||||
)
|
||||
@@ -1976,7 +1973,7 @@
|
||||
:code (behavior ((arg0 handle))
|
||||
(set-forward-vel (the-as float 0.0))
|
||||
(let ((s5-0 0))
|
||||
(while (zero? (logand (-> self control status) (cshape-moving-flags onsurf)))
|
||||
(while (not (logtest? (-> self control status) (cshape-moving-flags onsurf)))
|
||||
(target-flut-falling-anim-trans)
|
||||
(+! s5-0 (- (-> *display* base-frame-counter) (-> *display* old-base-frame-counter)))
|
||||
(suspend)
|
||||
@@ -2112,21 +2109,21 @@
|
||||
)
|
||||
|
||||
(defstate target-flut-grab (target)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(cond
|
||||
((and (= arg2 'query) (= (-> arg3 param 0) 'mode))
|
||||
((and (= event-type 'query) (= (-> event param 0) 'mode))
|
||||
(-> self state name)
|
||||
)
|
||||
(else
|
||||
(case arg2
|
||||
(case event-type
|
||||
(('end-mode)
|
||||
(go target-flut-stance)
|
||||
)
|
||||
(('clone-anim)
|
||||
(go target-flut-clone-anim (process->handle (the-as process (-> arg3 param 0))))
|
||||
(go target-flut-clone-anim (process->handle (the-as process (-> event param 0))))
|
||||
)
|
||||
(else
|
||||
(target-generic-event-handler arg0 arg1 arg2 arg3)
|
||||
(target-generic-event-handler proc arg1 event-type event)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -2153,11 +2150,11 @@
|
||||
)
|
||||
|
||||
(defstate target-flut-clone-anim (target)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(if (and (= arg2 'trans) (= (-> arg3 param 0) 'restore))
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(if (and (= event-type 'trans) (= (-> event param 0) 'restore))
|
||||
(set! (-> self control unknown-uint20) (the-as uint #f))
|
||||
)
|
||||
((-> target-flut-grab event) arg0 arg1 arg2 arg3)
|
||||
((-> target-flut-grab event) proc arg1 event-type event)
|
||||
)
|
||||
:enter (-> target-clone-anim enter)
|
||||
:exit (behavior ()
|
||||
@@ -2178,7 +2175,3 @@
|
||||
(none)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -638,7 +638,7 @@
|
||||
(none)
|
||||
)
|
||||
:trans (behavior ()
|
||||
(if (zero? (logand (-> *camera* master-options) 2))
|
||||
(if (not (logtest? (-> *camera* master-options) 2))
|
||||
(cam-slave-go cam-free-floating)
|
||||
)
|
||||
(none)
|
||||
@@ -1047,7 +1047,7 @@
|
||||
(lambda ((arg0 entity-actor) (arg1 (pointer symbol)))
|
||||
(the-as
|
||||
object
|
||||
(when (and (= (-> arg0 etype) periscope) (zero? (logand (-> arg0 extra perm status) (entity-perm-status complete))))
|
||||
(when (and (= (-> arg0 etype) periscope) (not (logtest? (-> arg0 extra perm status) (entity-perm-status complete))))
|
||||
(set! (-> arg1 0) #f)
|
||||
#t
|
||||
)
|
||||
@@ -1160,8 +1160,8 @@
|
||||
)
|
||||
|
||||
(defstate periscope-idle (periscope)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('activate)
|
||||
(logclear! (-> self mask) (process-mask actor-pause))
|
||||
(go periscope-activate)
|
||||
@@ -1261,16 +1261,16 @@
|
||||
)
|
||||
|
||||
(defstate periscope-wait-for-player (periscope)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('touch)
|
||||
(when (and *target* (not (and (logtest? (-> *target* control unknown-surface00 flags) (surface-flags jump))
|
||||
(zero? (logand (-> *target* control status) (cshape-moving-flags onsurf)))
|
||||
(not (logtest? (-> *target* control status) (cshape-moving-flags onsurf)))
|
||||
)
|
||||
)
|
||||
)
|
||||
(when ((method-of-type touching-shapes-entry prims-touching?)
|
||||
(the-as touching-shapes-entry (-> arg3 param 0))
|
||||
(the-as touching-shapes-entry (-> event param 0))
|
||||
(the-as collide-shape-moving (-> self root-override))
|
||||
(the-as uint 1)
|
||||
)
|
||||
@@ -1742,7 +1742,7 @@
|
||||
(defstate reflector-origin-idle (reflector-origin)
|
||||
:code (behavior ()
|
||||
(reflector-origin-update (-> self blocker))
|
||||
(while (zero? (logand (-> self blocker extra perm status) (entity-perm-status complete)))
|
||||
(while (not (logtest? (-> self blocker extra perm status) (entity-perm-status complete)))
|
||||
(suspend)
|
||||
)
|
||||
(let ((a1-0 (new 'stack-no-clear 'event-message-block)))
|
||||
@@ -1802,8 +1802,8 @@
|
||||
)
|
||||
|
||||
(defstate reflector-mirror-idle (reflector-mirror)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('attack)
|
||||
(sound-play "mirror-smash")
|
||||
(go reflector-mirror-broken #f)
|
||||
@@ -1984,7 +1984,3 @@
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -117,10 +117,10 @@
|
||||
)
|
||||
(cond
|
||||
((and (-> self is-lethal?)
|
||||
(zero? (logand (-> *target* state-flags)
|
||||
(not (logtest? (-> *target* state-flags)
|
||||
(state-flags being-attacked invulnerable timed-invulnerable invuln-powerup do-not-notice dying)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(when (send-event arg0 'attack (-> arg3 param 0) (new 'static 'attack-info))
|
||||
(let ((v0-1 (the-as object #t)))
|
||||
@@ -404,10 +404,10 @@ junglesnake-default-event-handler
|
||||
:trans (behavior ()
|
||||
(if (and (and *target* (>= 24576.0 (vector-vector-distance (-> self root-override trans) (-> *target* control trans))))
|
||||
(>= (- (-> *display* base-frame-counter) (-> self state-time)) (-> self refractory-delay))
|
||||
(zero? (logand (-> *target* state-flags)
|
||||
(not (logtest? (-> *target* state-flags)
|
||||
(state-flags being-attacked invulnerable timed-invulnerable invuln-powerup do-not-notice dying)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(go junglesnake-attack)
|
||||
)
|
||||
@@ -796,7 +796,3 @@ junglesnake-default-event-handler
|
||||
(go junglesnake-sleeping)
|
||||
(none)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -236,13 +236,13 @@
|
||||
)
|
||||
|
||||
(defstate plant-boss-arm-idle (plant-boss-arm)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('hide 'die)
|
||||
(go plant-boss-arm-die (the-as symbol (-> arg3 param 0)))
|
||||
(go plant-boss-arm-die (the-as symbol (-> event param 0)))
|
||||
)
|
||||
(('hit)
|
||||
(go plant-boss-arm-hit (the-as basic (-> arg3 param 0)))
|
||||
(go plant-boss-arm-hit (the-as basic (-> event param 0)))
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -351,16 +351,16 @@
|
||||
)
|
||||
|
||||
(defstate plant-boss-back-arms-idle (plant-boss-arm)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(if (or (= arg2 'touch) (= arg2 'attack))
|
||||
(send-event arg0 'attack (-> arg3 param 0) (new 'static 'attack-info))
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(if (or (= event-type 'touch) (= event-type 'attack))
|
||||
(send-event proc 'attack (-> event param 0) (new 'static 'attack-info))
|
||||
)
|
||||
(cond
|
||||
((= arg2 'hit)
|
||||
(go plant-boss-back-arms-hit (the-as symbol (-> arg3 param 0)))
|
||||
((= event-type 'hit)
|
||||
(go plant-boss-back-arms-hit (the-as symbol (-> event param 0)))
|
||||
)
|
||||
((= arg2 'die)
|
||||
(go plant-boss-back-arms-die (the-as symbol (-> arg3 param 0)))
|
||||
((= event-type 'die)
|
||||
(go plant-boss-back-arms-die (the-as symbol (-> event param 0)))
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -443,13 +443,13 @@
|
||||
)
|
||||
|
||||
(defstate plant-boss-vine-idle (plant-boss-arm)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('hide 'die)
|
||||
(go plant-boss-vine-die (the-as symbol (-> arg3 param 0)))
|
||||
(go plant-boss-vine-die (the-as symbol (-> event param 0)))
|
||||
)
|
||||
(('hit)
|
||||
(go plant-boss-vine-hit (the-as basic (-> arg3 param 0)))
|
||||
(go plant-boss-vine-hit (the-as basic (-> event param 0)))
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -515,10 +515,10 @@
|
||||
)
|
||||
|
||||
(defstate plant-boss-root-idle (plant-boss-arm)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('hide 'die)
|
||||
(go plant-boss-root-die (the-as symbol (-> arg3 param 0)))
|
||||
(go plant-boss-root-die (the-as symbol (-> event param 0)))
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -666,13 +666,13 @@
|
||||
)
|
||||
|
||||
(defstate plant-boss-leaf-idle (plant-boss-leaf)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('trigger)
|
||||
(go plant-boss-leaf-open (the-as symbol (-> arg3 param 0)))
|
||||
(go plant-boss-leaf-open (the-as symbol (-> event param 0)))
|
||||
)
|
||||
(('die)
|
||||
(go plant-boss-leaf-die (the-as basic (-> arg3 param 0)))
|
||||
(go plant-boss-leaf-die (the-as basic (-> event param 0)))
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -705,13 +705,13 @@
|
||||
)
|
||||
|
||||
(defstate plant-boss-leaf-open (plant-boss-leaf)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('kill)
|
||||
(go plant-boss-leaf-close)
|
||||
)
|
||||
(('die)
|
||||
(go plant-boss-leaf-die (the-as basic (-> arg3 param 0)))
|
||||
(go plant-boss-leaf-die (the-as basic (-> event param 0)))
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -762,11 +762,11 @@
|
||||
)
|
||||
|
||||
(defstate plant-boss-leaf-open-idle (plant-boss-leaf)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('kill)
|
||||
(set! (-> self state-object) #t)
|
||||
(let ((v0-0 (the-as object (+ (-> *display* base-frame-counter) (the-as time-frame (-> arg3 param 0))))))
|
||||
(let ((v0-0 (the-as object (+ (-> *display* base-frame-counter) (the-as time-frame (-> event param 0))))))
|
||||
(set! (-> self state-time-frame) (the-as time-frame v0-0))
|
||||
v0-0
|
||||
)
|
||||
@@ -777,7 +777,7 @@
|
||||
)
|
||||
)
|
||||
(('die)
|
||||
(go plant-boss-leaf-die (the-as basic (-> arg3 param 0)))
|
||||
(go plant-boss-leaf-die (the-as basic (-> event param 0)))
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -810,17 +810,17 @@
|
||||
)
|
||||
|
||||
(defstate plant-boss-leaf-bounce (plant-boss-leaf)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('kill)
|
||||
(set! (-> self state-object) #t)
|
||||
(let ((v0-0 (the-as object (+ (-> *display* base-frame-counter) (the-as time-frame (-> arg3 param 0))))))
|
||||
(let ((v0-0 (the-as object (+ (-> *display* base-frame-counter) (the-as time-frame (-> event param 0))))))
|
||||
(set! (-> self state-time-frame) (the-as time-frame v0-0))
|
||||
v0-0
|
||||
)
|
||||
)
|
||||
(('die)
|
||||
(go plant-boss-leaf-die (the-as basic (-> arg3 param 0)))
|
||||
(go plant-boss-leaf-die (the-as basic (-> event param 0)))
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -852,10 +852,10 @@
|
||||
)
|
||||
|
||||
(defstate plant-boss-leaf-close (plant-boss-leaf)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('die)
|
||||
(go plant-boss-leaf-die (the-as basic (-> arg3 param 0)))
|
||||
(go plant-boss-leaf-die (the-as basic (-> event param 0)))
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -1092,10 +1092,10 @@
|
||||
)
|
||||
)
|
||||
*target*
|
||||
(zero? (logand (-> *target* state-flags)
|
||||
(not (logtest? (-> *target* state-flags)
|
||||
(state-flags being-attacked invulnerable timed-invulnerable invuln-powerup do-not-notice dying)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(go plant-boss-attack 1)
|
||||
)
|
||||
@@ -1236,25 +1236,25 @@
|
||||
)
|
||||
|
||||
(defstate plant-boss-vulnerable (plant-boss)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('attack)
|
||||
(when ((method-of-type touching-shapes-entry prims-touching?)
|
||||
(the-as touching-shapes-entry (-> arg3 param 0))
|
||||
(the-as touching-shapes-entry (-> event param 0))
|
||||
(the-as collide-shape-moving (-> self root-override))
|
||||
(the-as uint 1)
|
||||
)
|
||||
(send-event
|
||||
arg0
|
||||
proc
|
||||
'shove
|
||||
(-> arg3 param 0)
|
||||
(-> event param 0)
|
||||
(static-attack-info ((shove-up (meters 2)) (shove-back (meters 6))))
|
||||
)
|
||||
(go plant-boss-hit (the-as symbol (-> arg3 param 1)))
|
||||
(go plant-boss-hit (the-as symbol (-> event param 1)))
|
||||
)
|
||||
)
|
||||
(else
|
||||
(plant-boss-generic-event-handler arg0 arg1 arg2 arg3)
|
||||
(plant-boss-generic-event-handler proc arg1 event-type event)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -1335,17 +1335,17 @@
|
||||
)
|
||||
|
||||
(defstate plant-boss-attack (plant-boss)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('touch 'attack)
|
||||
(when (and ((method-of-type touching-shapes-entry prims-touching?)
|
||||
(the-as touching-shapes-entry (-> arg3 param 0))
|
||||
(the-as touching-shapes-entry (-> event param 0))
|
||||
(the-as collide-shape-moving (-> self root-override))
|
||||
(the-as uint 1)
|
||||
)
|
||||
(not (ja-group? plant-boss-main-vulnerable2idle-ja))
|
||||
(not (ja-group? (-> self draw art-group data 13)))
|
||||
)
|
||||
(when (send-event arg0 'attack-or-shove (-> arg3 param 0) (static-attack-info ((mode 'plant-boss))))
|
||||
(when (send-event proc 'attack-or-shove (-> event param 0) (static-attack-info ((mode 'plant-boss))))
|
||||
(let ((v0-1 (the-as object #t)))
|
||||
(set! (-> self ate) (the-as symbol v0-1))
|
||||
v0-1
|
||||
@@ -1354,7 +1354,7 @@
|
||||
)
|
||||
)
|
||||
(else
|
||||
(plant-boss-default-event-handler arg0 arg1 arg2 arg3)
|
||||
(plant-boss-default-event-handler proc arg1 event-type event)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -1683,20 +1683,20 @@
|
||||
)
|
||||
|
||||
(defstate plant-boss-dead-idle (plant-boss)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('bonk)
|
||||
(go plant-boss-dead-bounce (lerp-scale
|
||||
(the-as float 0.1)
|
||||
(the-as float 1.0)
|
||||
(the-as float (-> arg3 param 1))
|
||||
(the-as float (-> event param 1))
|
||||
(the-as float 40960.0)
|
||||
(the-as float 81920.0)
|
||||
)
|
||||
)
|
||||
)
|
||||
(else
|
||||
(plant-boss-generic-event-handler arg0 arg1 arg2 arg3)
|
||||
(plant-boss-generic-event-handler proc arg1 event-type event)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -1947,7 +1947,3 @@
|
||||
(go plant-boss-far-idle)
|
||||
(none)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -134,22 +134,22 @@
|
||||
)
|
||||
|
||||
(defstate cavecrusher-idle (cavecrusher)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(let ((v1-0 arg2))
|
||||
(the-as object (when (or (= v1-0 'touch) (= v1-0 'attack))
|
||||
(when (= (-> arg0 type) target)
|
||||
(if ((method-of-type touching-shapes-entry prims-touching-action?)
|
||||
(the-as touching-shapes-entry (-> arg3 param 0))
|
||||
(-> *target* control)
|
||||
(collide-action solid)
|
||||
(collide-action)
|
||||
)
|
||||
(target-attack-up *target* 'attack-or-shove 'deadlyup)
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(the-as object (case event-type
|
||||
(('touch 'attack)
|
||||
(when (= (-> proc type) target)
|
||||
(if ((method-of-type touching-shapes-entry prims-touching-action?)
|
||||
(the-as touching-shapes-entry (-> event param 0))
|
||||
(-> *target* control)
|
||||
(collide-action solid)
|
||||
(collide-action)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(target-attack-up *target* 'attack-or-shove 'deadlyup)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
:code (behavior ()
|
||||
(loop
|
||||
@@ -223,12 +223,12 @@
|
||||
|
||||
(defstate idle (cavetrapdoor)
|
||||
:virtual #t
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('touch)
|
||||
(when (= (-> arg0 type) target)
|
||||
(when (= (-> proc type) target)
|
||||
(when (>= (- (-> (target-pos 0) y) (-> self root-override trans y)) 409.6)
|
||||
(send-event arg0 'no-look-around (seconds 1.5))
|
||||
(send-event proc 'no-look-around (seconds 1.5))
|
||||
(go-virtual trigger)
|
||||
)
|
||||
)
|
||||
@@ -277,10 +277,10 @@
|
||||
(< 28672.0 (vector-vector-distance (-> self root-override trans) (-> *target* control trans)))
|
||||
)
|
||||
(and (not (and (logtest? (-> *target* control unknown-surface00 flags) (surface-flags jump))
|
||||
(zero? (logand (-> *target* control status) (cshape-moving-flags onsurf)))
|
||||
(not (logtest? (-> *target* control status) (cshape-moving-flags onsurf)))
|
||||
)
|
||||
)
|
||||
(zero? (logand (-> *target* control root-prim prim-core action) (collide-action ca-7)))
|
||||
(not (logtest? (-> *target* control root-prim prim-core action) (collide-action ca-7)))
|
||||
)
|
||||
)
|
||||
(ja-no-eval :group! (-> self draw art-group data 7) :num! (seek!) :frame-num 0.0)
|
||||
@@ -294,7 +294,7 @@
|
||||
(until (ja-done? 0)
|
||||
(when (and (and *target* (>= 28672.0 (vector-vector-distance (-> self root-override trans) (-> *target* control trans))))
|
||||
(or (and (logtest? (-> *target* control unknown-surface00 flags) (surface-flags jump))
|
||||
(zero? (logand (-> *target* control status) (cshape-moving-flags onsurf)))
|
||||
(not (logtest? (-> *target* control status) (cshape-moving-flags onsurf)))
|
||||
)
|
||||
(logtest? (-> *target* control root-prim prim-core action) (collide-action ca-7))
|
||||
)
|
||||
@@ -434,12 +434,12 @@
|
||||
)
|
||||
|
||||
(defstate caveflamepots-active (caveflamepots)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('touch 'attack)
|
||||
(when (= (-> arg0 type) target)
|
||||
(when (= (-> proc type) target)
|
||||
(when ((method-of-type touching-shapes-entry prims-touching-action?)
|
||||
(the-as touching-shapes-entry (-> arg3 param 0))
|
||||
(the-as touching-shapes-entry (-> event param 0))
|
||||
(-> *target* control)
|
||||
(collide-action solid)
|
||||
(collide-action)
|
||||
@@ -451,15 +451,15 @@
|
||||
(< 0.75 (-> *target* control poly-normal y))
|
||||
)
|
||||
(send-event
|
||||
arg0
|
||||
proc
|
||||
'attack-or-shove
|
||||
(-> arg3 param 0)
|
||||
(-> event param 0)
|
||||
(static-attack-info ((mode 'burn) (vector (-> s4-0 vector)) (shove-up (-> s4-0 shove-up))))
|
||||
)
|
||||
(send-event
|
||||
arg0
|
||||
proc
|
||||
'attack-or-shove
|
||||
(-> arg3 param 0)
|
||||
(-> event param 0)
|
||||
(static-attack-info ((mode 'burn)
|
||||
(shove-up (meters 0))
|
||||
(shove-back (meters 2))
|
||||
@@ -931,21 +931,18 @@
|
||||
)
|
||||
(vector<-cspace! s5-0 (-> obj node-list data 3))
|
||||
(vector-! gp-0 s5-0 (-> obj root-override trans))
|
||||
(let ((f0-0 17408.0))
|
||||
(set! (-> gp-0 w) f0-0)
|
||||
f0-0
|
||||
)
|
||||
(set! (-> gp-0 w) 17408.0)
|
||||
)
|
||||
)
|
||||
|
||||
(defstate caveelevator-cycle-active (caveelevator)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(let ((v1-0 arg2))
|
||||
(the-as object (if (= v1-0 'bonk)
|
||||
(activate! (-> self smush) -1.0 60 150 1.0 1.0)
|
||||
)
|
||||
)
|
||||
)
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(the-as object (case event-type
|
||||
(('bonk)
|
||||
(activate! (-> self smush) -1.0 60 150 1.0 1.0)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
:enter (behavior ()
|
||||
(logclear! (-> self mask) (process-mask actor-pause))
|
||||
@@ -981,14 +978,14 @@
|
||||
)
|
||||
|
||||
(defstate caveelevator-one-way-idle-start (caveelevator)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('bonk)
|
||||
(activate! (-> self smush) -1.0 60 150 1.0 1.0)
|
||||
(go caveelevator-one-way-travel-to-end)
|
||||
)
|
||||
(('attack 'touch)
|
||||
(if (and (= (-> arg0 type) target)
|
||||
(if (and (= (-> proc type) target)
|
||||
(>= 8192.0 (vector-vector-xz-distance (target-pos 0) (-> self root-override trans)))
|
||||
)
|
||||
(go caveelevator-one-way-travel-to-end)
|
||||
@@ -1020,13 +1017,13 @@
|
||||
)
|
||||
|
||||
(defstate caveelevator-one-way-travel-to-end (caveelevator)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(let ((v1-0 arg2))
|
||||
(the-as object (if (= v1-0 'bonk)
|
||||
(activate! (-> self smush) -1.0 60 150 1.0 1.0)
|
||||
)
|
||||
)
|
||||
)
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(the-as object (case event-type
|
||||
(('bonk)
|
||||
(activate! (-> self smush) -1.0 60 150 1.0 1.0)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
:enter (behavior ()
|
||||
(logclear! (-> self mask) (process-mask actor-pause))
|
||||
@@ -1059,13 +1056,13 @@
|
||||
)
|
||||
|
||||
(defstate caveelevator-one-way-idle-end (caveelevator)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(let ((v1-0 arg2))
|
||||
(the-as object (if (= v1-0 'bonk)
|
||||
(activate! (-> self smush) -1.0 60 150 1.0 1.0)
|
||||
)
|
||||
)
|
||||
)
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(the-as object (case event-type
|
||||
(('bonk)
|
||||
(activate! (-> self smush) -1.0 60 150 1.0 1.0)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
:enter (behavior ()
|
||||
(set! (-> self state-time) (-> *display* base-frame-counter))
|
||||
@@ -1101,13 +1098,13 @@
|
||||
)
|
||||
|
||||
(defstate caveelevator-one-way-travel-to-start (caveelevator)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(let ((v1-0 arg2))
|
||||
(the-as object (if (= v1-0 'bonk)
|
||||
(activate! (-> self smush) -1.0 60 150 1.0 1.0)
|
||||
)
|
||||
)
|
||||
)
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(the-as object (case event-type
|
||||
(('bonk)
|
||||
(activate! (-> self smush) -1.0 60 150 1.0 1.0)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
:enter (behavior ()
|
||||
(logclear! (-> self mask) (process-mask actor-pause))
|
||||
@@ -1275,7 +1272,3 @@
|
||||
)
|
||||
(none)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
|
||||
(defpartgroup group-mother-spider-proj-fly
|
||||
:id 326
|
||||
:duration 300
|
||||
:duration (seconds 1)
|
||||
:bounds (static-bspherem 0 0 0 3)
|
||||
:parts ((sp-item 718 :flags (launch-asap) :binding 716)
|
||||
(sp-item 716 :flags (start-dead) :binding 717)
|
||||
@@ -144,7 +144,7 @@
|
||||
|
||||
(defpartgroup group-mother-spider-proj-hit
|
||||
:id 327
|
||||
:duration 5
|
||||
:duration (seconds 0.017)
|
||||
:flags (use-local-clock)
|
||||
:bounds (static-bspherem 0 0 0 8)
|
||||
:parts ((sp-item 722) (sp-item 723) (sp-item 724))
|
||||
@@ -219,7 +219,7 @@
|
||||
|
||||
(defpartgroup group-mother-spider-proj-die
|
||||
:id 328
|
||||
:duration 5
|
||||
:duration (seconds 0.017)
|
||||
:flags (use-local-clock)
|
||||
:bounds (static-bspherem 0 0 0 8)
|
||||
:parts ((sp-item 722))
|
||||
@@ -339,10 +339,10 @@
|
||||
|
||||
(defmethod dummy-28 mother-spider-proj ((obj mother-spider-proj))
|
||||
(when (and *target*
|
||||
(zero? (logand (-> *target* state-flags)
|
||||
(not (logtest? (-> *target* state-flags)
|
||||
(state-flags being-attacked invulnerable timed-invulnerable invuln-powerup do-not-notice dying)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((gp-0 (-> obj target)))
|
||||
(set! (-> gp-0 quad) (-> (target-pos 0) quad))
|
||||
@@ -410,7 +410,3 @@
|
||||
(none)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -361,7 +361,7 @@
|
||||
|
||||
(defmethod is-player-stuck? mother-spider ((obj mother-spider))
|
||||
(when (and *target* (not (and (logtest? (-> *target* control unknown-surface00 flags) (surface-flags jump))
|
||||
(zero? (logand (-> *target* control status) (cshape-moving-flags onsurf)))
|
||||
(not (logtest? (-> *target* control status) (cshape-moving-flags onsurf)))
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -427,10 +427,8 @@
|
||||
0
|
||||
(let* ((f3-0 (vector-vector-distance (-> s5-0 intersect) (-> obj root-override trans)))
|
||||
(f0-14 (* 0.000030517578 (fmin 32768.0 (fmax 0.0 (+ -57344.0 f3-0)))))
|
||||
(f0-15 (lerp 409600.0 40960.0 f0-14))
|
||||
)
|
||||
(set! (-> obj draw shadow-ctrl settings shadow-dir w) f0-15)
|
||||
f0-15
|
||||
(set! (-> obj draw shadow-ctrl settings shadow-dir w) (lerp 409600.0 40960.0 f0-14))
|
||||
)
|
||||
)
|
||||
(else
|
||||
@@ -1047,7 +1045,7 @@
|
||||
)
|
||||
)
|
||||
(if (or (not *target*) (and (logtest? (-> *target* control unknown-surface00 flags) (surface-flags jump))
|
||||
(zero? (logand (-> *target* control status) (cshape-moving-flags onsurf)))
|
||||
(not (logtest? (-> *target* control status) (cshape-moving-flags onsurf)))
|
||||
)
|
||||
)
|
||||
(set! (-> self last-player-in-air-time) (-> *display* base-frame-counter))
|
||||
@@ -1236,20 +1234,20 @@
|
||||
(go mother-spider-traveling (the-as uint 0))
|
||||
)
|
||||
(if (and (>= (- (-> *display* base-frame-counter) (-> self started-birthing-time)) (seconds 6))
|
||||
(zero? (logand (-> *target* state-flags)
|
||||
(not (logtest? (-> *target* state-flags)
|
||||
(state-flags being-attacked invulnerable timed-invulnerable invuln-powerup do-not-notice dying)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(go mother-spider-traveling (the-as uint 1))
|
||||
)
|
||||
(if (and (>= (- (-> *display* base-frame-counter) (-> self state-time)) (seconds 0.25))
|
||||
(> (-> self birthing-counter) 0)
|
||||
(and (>= 49152.0 (- (-> self max-dist-from-anchor) (-> self dist-from-anchor)))
|
||||
(zero? (logand (-> *target* state-flags)
|
||||
(not (logtest? (-> *target* state-flags)
|
||||
(state-flags being-attacked invulnerable timed-invulnerable invuln-powerup do-not-notice dying)
|
||||
)
|
||||
)
|
||||
)
|
||||
(TODO-RENAME-21 (-> self nav) (-> self root-override trans))
|
||||
)
|
||||
)
|
||||
@@ -1334,73 +1332,7 @@
|
||||
(defmethod TODO-RENAME-20 mother-spider ((obj mother-spider) (arg0 vector) (arg1 vector))
|
||||
(set! (-> obj nav nav-cull-radius) 40960.0)
|
||||
(set-current-poly! (-> obj nav) (dummy-16 (-> obj nav) (-> obj root-override trans)))
|
||||
(TODO-RENAME-28 (-> obj nav) (collide-kind
|
||||
background
|
||||
cak-1
|
||||
cak-2
|
||||
cak-3
|
||||
target
|
||||
water
|
||||
powerup
|
||||
crate
|
||||
enemy
|
||||
wall-object
|
||||
projectile
|
||||
ground-object
|
||||
target-attack
|
||||
mother-spider
|
||||
cak-14
|
||||
blue-eco-suck
|
||||
unknown-16
|
||||
unknown-17
|
||||
unknown-18
|
||||
unknown-19
|
||||
unknown-20
|
||||
unknown-21
|
||||
unknown-22
|
||||
unknown-23
|
||||
unknown-24
|
||||
unknown-25
|
||||
unknown-26
|
||||
unknown-27
|
||||
unknown-28
|
||||
unknown-29
|
||||
unknown-30
|
||||
unknown-31
|
||||
unknown-32
|
||||
unknown-33
|
||||
unknown-34
|
||||
unknown-35
|
||||
unknown-36
|
||||
unknown-37
|
||||
unknown-38
|
||||
unknown-39
|
||||
unknown-40
|
||||
unknown-41
|
||||
unknown-42
|
||||
unknown-43
|
||||
unknown-44
|
||||
unknown-45
|
||||
unknown-46
|
||||
unknown-47
|
||||
unknown-48
|
||||
unknown-49
|
||||
unknown-50
|
||||
unknown-51
|
||||
unknown-52
|
||||
unknown-53
|
||||
unknown-54
|
||||
unknown-55
|
||||
unknown-56
|
||||
unknown-57
|
||||
unknown-58
|
||||
unknown-59
|
||||
unknown-60
|
||||
unknown-61
|
||||
unknown-62
|
||||
unknown-63
|
||||
)
|
||||
)
|
||||
(TODO-RENAME-28 (-> obj nav) (the-as collide-kind -1))
|
||||
(dotimes (s3-1 4)
|
||||
(let ((f28-0 (+ 32768.0 (-> obj orient-rot y)))
|
||||
(f30-0 (rand-vu-float-range 16384.0 40960.0))
|
||||
@@ -1680,15 +1612,12 @@
|
||||
(vector-normalize! (-> arg0 vector 1) 1.0)
|
||||
(set! (-> arg0 vector 0 w) 0.0)
|
||||
(set! (-> arg0 vector 1 w) 0.0)
|
||||
(let ((f0-8 0.0))
|
||||
(set! (-> arg0 vector 2 w) f0-8)
|
||||
f0-8
|
||||
)
|
||||
(set! (-> arg0 vector 2 w) 0.0)
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod run-logic? mother-spider ((obj mother-spider))
|
||||
(or (zero? (logand (-> obj mask) (process-mask actor-pause)))
|
||||
(or (not (logtest? (-> obj mask) (process-mask actor-pause)))
|
||||
(or (< (vector-vector-xz-distance (-> obj root-override trans) (math-camera-pos)) (-> obj deactivate-xz-dist))
|
||||
(and (nonzero? (-> obj skel)) (!= (-> obj skel root-channel 0) (-> obj skel channel)))
|
||||
(and (nonzero? (-> obj draw)) (logtest? (-> obj draw status) (draw-status no-skeleton-update)))
|
||||
@@ -1934,7 +1863,3 @@
|
||||
)
|
||||
(none)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -413,14 +413,10 @@ nav-enemy-default-event-handler
|
||||
(set! (-> obj cannon-ent) (entity-actor-lookup (-> obj entity) 'alt-actor 0))
|
||||
(logclear! (-> obj mask) (process-mask actor-pause))
|
||||
(if (or (not (and (-> obj entity) (logtest? (-> obj entity extra perm status) (entity-perm-status complete))))
|
||||
(zero? (logand (-> obj enemy-info options) (fact-options has-power-cell)))
|
||||
(not (logtest? (-> obj enemy-info options) (fact-options has-power-cell)))
|
||||
)
|
||||
(go (method-of-object obj nav-enemy-idle))
|
||||
)
|
||||
(go (method-of-object obj nav-enemy-fuel-cell))
|
||||
(none)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -164,16 +164,16 @@
|
||||
)
|
||||
|
||||
(defstate plunger-lurker-flee (plunger-lurker)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(let ((v1-0 arg2))
|
||||
(the-as object (when (= v1-0 'attack)
|
||||
(let ((v0-0 #t))
|
||||
(set! (-> self got-hit) v0-0)
|
||||
v0-0
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(the-as object (case event-type
|
||||
(('attack)
|
||||
(let ((v0-0 #t))
|
||||
(set! (-> self got-hit) v0-0)
|
||||
v0-0
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
:trans (behavior ()
|
||||
(when (-> self got-hit)
|
||||
@@ -222,8 +222,8 @@
|
||||
)
|
||||
|
||||
(defstate plunger-lurker-idle (plunger-lurker)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('plunge)
|
||||
(logclear! (-> self mask) (process-mask actor-pause))
|
||||
(go plunger-lurker-plunge)
|
||||
@@ -590,106 +590,104 @@
|
||||
)
|
||||
|
||||
(defstate flying-lurker-fly (flying-lurker)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(let ((v1-0 arg2))
|
||||
(the-as object (cond
|
||||
((= v1-0 'clone-and-kill-links)
|
||||
(let ((a1-1 (new 'stack-no-clear 'event-message-block)))
|
||||
(set! (-> a1-1 from) self)
|
||||
(set! (-> a1-1 num-params) 0)
|
||||
(set! (-> a1-1 message) 'sleep)
|
||||
(let ((t9-0 send-event-function)
|
||||
(v1-3 (-> self link next))
|
||||
)
|
||||
(t9-0
|
||||
(if v1-3
|
||||
(-> v1-3 extra process)
|
||||
)
|
||||
a1-1
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(the-as object (case event-type
|
||||
(('clone-and-kill-links)
|
||||
(let ((a1-1 (new 'stack-no-clear 'event-message-block)))
|
||||
(set! (-> a1-1 from) self)
|
||||
(set! (-> a1-1 num-params) 0)
|
||||
(set! (-> a1-1 message) 'sleep)
|
||||
(let ((t9-0 send-event-function)
|
||||
(v1-3 (-> self link next))
|
||||
)
|
||||
(t9-0
|
||||
(if v1-3
|
||||
(-> v1-3 extra process)
|
||||
)
|
||||
a1-1
|
||||
)
|
||||
)
|
||||
(go flying-lurker-clone (the-as handle (-> arg3 param 0)) "")
|
||||
)
|
||||
((= v1-0 'die)
|
||||
(let ((v1-7 (new 'stack-no-clear 'event-message-block)))
|
||||
(set! (-> v1-7 from) arg0)
|
||||
(set! (-> v1-7 num-params) arg1)
|
||||
(set! (-> v1-7 message) arg2)
|
||||
(set! (-> v1-7 param 0) (-> arg3 param 0))
|
||||
(set! (-> v1-7 param 1) (-> arg3 param 1))
|
||||
(set! (-> v1-7 param 2) (-> arg3 param 2))
|
||||
(set! (-> v1-7 param 3) (-> arg3 param 3))
|
||||
(set! (-> v1-7 param 4) (-> arg3 param 4))
|
||||
(set! (-> v1-7 param 5) (-> arg3 param 5))
|
||||
(set! (-> v1-7 param 6) (-> arg3 param 6))
|
||||
(let ((t9-2 send-event-function)
|
||||
(a1-3 (-> self link next))
|
||||
)
|
||||
(t9-2
|
||||
(if a1-3
|
||||
(-> a1-3 extra process)
|
||||
)
|
||||
v1-7
|
||||
(go flying-lurker-clone (the-as handle (-> event param 0)) "")
|
||||
)
|
||||
(('die)
|
||||
(let ((v1-7 (new 'stack-no-clear 'event-message-block)))
|
||||
(set! (-> v1-7 from) proc)
|
||||
(set! (-> v1-7 num-params) arg1)
|
||||
(set! (-> v1-7 message) event-type)
|
||||
(set! (-> v1-7 param 0) (-> event param 0))
|
||||
(set! (-> v1-7 param 1) (-> event param 1))
|
||||
(set! (-> v1-7 param 2) (-> event param 2))
|
||||
(set! (-> v1-7 param 3) (-> event param 3))
|
||||
(set! (-> v1-7 param 4) (-> event param 4))
|
||||
(set! (-> v1-7 param 5) (-> event param 5))
|
||||
(set! (-> v1-7 param 6) (-> event param 6))
|
||||
(let ((t9-2 send-event-function)
|
||||
(a1-3 (-> self link next))
|
||||
)
|
||||
(t9-2
|
||||
(if a1-3
|
||||
(-> a1-3 extra process)
|
||||
)
|
||||
v1-7
|
||||
)
|
||||
)
|
||||
(cleanup-for-death self)
|
||||
(deactivate self)
|
||||
)
|
||||
((= v1-0 'sleep)
|
||||
(let ((v1-12 (new 'stack-no-clear 'event-message-block)))
|
||||
(set! (-> v1-12 from) arg0)
|
||||
(set! (-> v1-12 num-params) arg1)
|
||||
(set! (-> v1-12 message) arg2)
|
||||
(set! (-> v1-12 param 0) (-> arg3 param 0))
|
||||
(set! (-> v1-12 param 1) (-> arg3 param 1))
|
||||
(set! (-> v1-12 param 2) (-> arg3 param 2))
|
||||
(set! (-> v1-12 param 3) (-> arg3 param 3))
|
||||
(set! (-> v1-12 param 4) (-> arg3 param 4))
|
||||
(set! (-> v1-12 param 5) (-> arg3 param 5))
|
||||
(set! (-> v1-12 param 6) (-> arg3 param 6))
|
||||
(let ((t9-5 send-event-function)
|
||||
(a1-5 (-> self link next))
|
||||
)
|
||||
(t9-5
|
||||
(if a1-5
|
||||
(-> a1-5 extra process)
|
||||
)
|
||||
v1-12
|
||||
(cleanup-for-death self)
|
||||
(deactivate self)
|
||||
)
|
||||
(('sleep)
|
||||
(let ((v1-12 (new 'stack-no-clear 'event-message-block)))
|
||||
(set! (-> v1-12 from) proc)
|
||||
(set! (-> v1-12 num-params) arg1)
|
||||
(set! (-> v1-12 message) event-type)
|
||||
(set! (-> v1-12 param 0) (-> event param 0))
|
||||
(set! (-> v1-12 param 1) (-> event param 1))
|
||||
(set! (-> v1-12 param 2) (-> event param 2))
|
||||
(set! (-> v1-12 param 3) (-> event param 3))
|
||||
(set! (-> v1-12 param 4) (-> event param 4))
|
||||
(set! (-> v1-12 param 5) (-> event param 5))
|
||||
(set! (-> v1-12 param 6) (-> event param 6))
|
||||
(let ((t9-5 send-event-function)
|
||||
(a1-5 (-> self link next))
|
||||
)
|
||||
(t9-5
|
||||
(if a1-5
|
||||
(-> a1-5 extra process)
|
||||
)
|
||||
v1-12
|
||||
)
|
||||
)
|
||||
(go flying-lurker-sleep)
|
||||
)
|
||||
((= v1-0 'reset)
|
||||
(let ((v1-15 (new 'stack-no-clear 'event-message-block)))
|
||||
(set! (-> v1-15 from) arg0)
|
||||
(set! (-> v1-15 num-params) arg1)
|
||||
(set! (-> v1-15 message) arg2)
|
||||
(set! (-> v1-15 param 0) (-> arg3 param 0))
|
||||
(set! (-> v1-15 param 1) (-> arg3 param 1))
|
||||
(set! (-> v1-15 param 2) (-> arg3 param 2))
|
||||
(set! (-> v1-15 param 3) (-> arg3 param 3))
|
||||
(set! (-> v1-15 param 4) (-> arg3 param 4))
|
||||
(set! (-> v1-15 param 5) (-> arg3 param 5))
|
||||
(set! (-> v1-15 param 6) (-> arg3 param 6))
|
||||
(let ((t9-7 send-event-function)
|
||||
(a1-7 (-> self link next))
|
||||
)
|
||||
(t9-7
|
||||
(if a1-7
|
||||
(-> a1-7 extra process)
|
||||
)
|
||||
v1-15
|
||||
(go flying-lurker-sleep)
|
||||
)
|
||||
(('reset)
|
||||
(let ((v1-15 (new 'stack-no-clear 'event-message-block)))
|
||||
(set! (-> v1-15 from) proc)
|
||||
(set! (-> v1-15 num-params) arg1)
|
||||
(set! (-> v1-15 message) event-type)
|
||||
(set! (-> v1-15 param 0) (-> event param 0))
|
||||
(set! (-> v1-15 param 1) (-> event param 1))
|
||||
(set! (-> v1-15 param 2) (-> event param 2))
|
||||
(set! (-> v1-15 param 3) (-> event param 3))
|
||||
(set! (-> v1-15 param 4) (-> event param 4))
|
||||
(set! (-> v1-15 param 5) (-> event param 5))
|
||||
(set! (-> v1-15 param 6) (-> event param 6))
|
||||
(let ((t9-7 send-event-function)
|
||||
(a1-7 (-> self link next))
|
||||
)
|
||||
(t9-7
|
||||
(if a1-7
|
||||
(-> a1-7 extra process)
|
||||
)
|
||||
v1-15
|
||||
)
|
||||
)
|
||||
(deactivate self)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(deactivate self)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
:enter (behavior ()
|
||||
(process-entity-status! self (entity-perm-status bit-3) #t)
|
||||
@@ -699,7 +697,7 @@
|
||||
:trans (behavior ()
|
||||
(dummy-20 self)
|
||||
(when (not (movie?))
|
||||
(flying-lurker-calc-speed (meters 15.0) (meters 30.0) (meters 0.11666667) (meters 0.083333336))
|
||||
(flying-lurker-calc-speed (meters 15) (meters 30) (meters 0.11666667) (meters 0.083333336))
|
||||
(flying-lurker-move)
|
||||
(flying-lurker-rotate)
|
||||
(when (and (-> self alt-actor)
|
||||
@@ -738,7 +736,7 @@
|
||||
(suspend)
|
||||
(when (>= (- (-> *display* base-frame-counter) (-> self last-look-time)) (-> self time-to-next-look))
|
||||
(ja-channel-push! 1 (seconds 0.2))
|
||||
(ja-no-eval :group! flying-lurker-look-ja :num! (seek!) :frame-num 0.0)
|
||||
(ja-no-eval :group! (-> self draw art-group data 6) :num! (seek!) :frame-num 0.0)
|
||||
(until (ja-done? 0)
|
||||
(suspend)
|
||||
(ja :num! (seek!))
|
||||
@@ -850,7 +848,7 @@
|
||||
(close-specific-task! (game-task plunger-lurker-hit) (task-status unknown))
|
||||
(while (and *target*
|
||||
(logtest? (-> *target* control unknown-surface00 flags) (surface-flags jump))
|
||||
(zero? (logand (-> *target* control status) (cshape-moving-flags onsurf)))
|
||||
(not (logtest? (-> *target* control status) (cshape-moving-flags onsurf)))
|
||||
)
|
||||
(suspend)
|
||||
)
|
||||
@@ -930,13 +928,7 @@
|
||||
(suspend)
|
||||
)
|
||||
)
|
||||
(level-hint-spawn
|
||||
(game-text-id ogre-race-hint)
|
||||
"asstvb24"
|
||||
(the-as entity #f)
|
||||
*entity-pool*
|
||||
(game-task none)
|
||||
)
|
||||
(level-hint-spawn (game-text-id ogre-race-hint) "asstvb24" (the-as entity #f) *entity-pool* (game-task none))
|
||||
(none)
|
||||
)
|
||||
:to self
|
||||
@@ -989,21 +981,21 @@
|
||||
)
|
||||
|
||||
(defstate flying-lurker-clone (flying-lurker)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(let ((v1-0 arg2))
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(let ((v1-0 event-type))
|
||||
(the-as object (cond
|
||||
((= v1-0 'die)
|
||||
(let ((v1-1 (new 'stack-no-clear 'event-message-block)))
|
||||
(set! (-> v1-1 from) arg0)
|
||||
(set! (-> v1-1 from) proc)
|
||||
(set! (-> v1-1 num-params) arg1)
|
||||
(set! (-> v1-1 message) arg2)
|
||||
(set! (-> v1-1 param 0) (-> arg3 param 0))
|
||||
(set! (-> v1-1 param 1) (-> arg3 param 1))
|
||||
(set! (-> v1-1 param 2) (-> arg3 param 2))
|
||||
(set! (-> v1-1 param 3) (-> arg3 param 3))
|
||||
(set! (-> v1-1 param 4) (-> arg3 param 4))
|
||||
(set! (-> v1-1 param 5) (-> arg3 param 5))
|
||||
(set! (-> v1-1 param 6) (-> arg3 param 6))
|
||||
(set! (-> v1-1 message) event-type)
|
||||
(set! (-> v1-1 param 0) (-> event param 0))
|
||||
(set! (-> v1-1 param 1) (-> event param 1))
|
||||
(set! (-> v1-1 param 2) (-> event param 2))
|
||||
(set! (-> v1-1 param 3) (-> event param 3))
|
||||
(set! (-> v1-1 param 4) (-> event param 4))
|
||||
(set! (-> v1-1 param 5) (-> event param 5))
|
||||
(set! (-> v1-1 param 6) (-> event param 6))
|
||||
(let ((t9-0 send-event-function)
|
||||
(a1-1 (-> self link next))
|
||||
)
|
||||
@@ -1020,16 +1012,16 @@
|
||||
)
|
||||
((= v1-0 'sleep)
|
||||
(let ((v1-6 (new 'stack-no-clear 'event-message-block)))
|
||||
(set! (-> v1-6 from) arg0)
|
||||
(set! (-> v1-6 from) proc)
|
||||
(set! (-> v1-6 num-params) arg1)
|
||||
(set! (-> v1-6 message) arg2)
|
||||
(set! (-> v1-6 param 0) (-> arg3 param 0))
|
||||
(set! (-> v1-6 param 1) (-> arg3 param 1))
|
||||
(set! (-> v1-6 param 2) (-> arg3 param 2))
|
||||
(set! (-> v1-6 param 3) (-> arg3 param 3))
|
||||
(set! (-> v1-6 param 4) (-> arg3 param 4))
|
||||
(set! (-> v1-6 param 5) (-> arg3 param 5))
|
||||
(set! (-> v1-6 param 6) (-> arg3 param 6))
|
||||
(set! (-> v1-6 message) event-type)
|
||||
(set! (-> v1-6 param 0) (-> event param 0))
|
||||
(set! (-> v1-6 param 1) (-> event param 1))
|
||||
(set! (-> v1-6 param 2) (-> event param 2))
|
||||
(set! (-> v1-6 param 3) (-> event param 3))
|
||||
(set! (-> v1-6 param 4) (-> event param 4))
|
||||
(set! (-> v1-6 param 5) (-> event param 5))
|
||||
(set! (-> v1-6 param 6) (-> event param 6))
|
||||
(let ((t9-3 send-event-function)
|
||||
(a1-3 (-> self link next))
|
||||
)
|
||||
@@ -1045,16 +1037,16 @@
|
||||
)
|
||||
((= v1-0 'reset)
|
||||
(let ((v1-9 (new 'stack-no-clear 'event-message-block)))
|
||||
(set! (-> v1-9 from) arg0)
|
||||
(set! (-> v1-9 from) proc)
|
||||
(set! (-> v1-9 num-params) arg1)
|
||||
(set! (-> v1-9 message) arg2)
|
||||
(set! (-> v1-9 param 0) (-> arg3 param 0))
|
||||
(set! (-> v1-9 param 1) (-> arg3 param 1))
|
||||
(set! (-> v1-9 param 2) (-> arg3 param 2))
|
||||
(set! (-> v1-9 param 3) (-> arg3 param 3))
|
||||
(set! (-> v1-9 param 4) (-> arg3 param 4))
|
||||
(set! (-> v1-9 param 5) (-> arg3 param 5))
|
||||
(set! (-> v1-9 param 6) (-> arg3 param 6))
|
||||
(set! (-> v1-9 message) event-type)
|
||||
(set! (-> v1-9 param 0) (-> event param 0))
|
||||
(set! (-> v1-9 param 1) (-> event param 1))
|
||||
(set! (-> v1-9 param 2) (-> event param 2))
|
||||
(set! (-> v1-9 param 3) (-> event param 3))
|
||||
(set! (-> v1-9 param 4) (-> event param 4))
|
||||
(set! (-> v1-9 param 5) (-> event param 5))
|
||||
(set! (-> v1-9 param 6) (-> event param 6))
|
||||
(let ((t9-5 send-event-function)
|
||||
(a1-5 (-> self link next))
|
||||
)
|
||||
@@ -1069,7 +1061,7 @@
|
||||
(deactivate self)
|
||||
)
|
||||
(else
|
||||
(flying-lurker-handler arg0 arg1 arg2 arg3)
|
||||
(flying-lurker-handler proc arg1 event-type event)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -1086,23 +1078,23 @@
|
||||
)
|
||||
|
||||
(defstate flying-lurker-idle (flying-lurker)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('saw-player)
|
||||
(set! (-> self take-off) #t)
|
||||
(when (-> self link prev)
|
||||
(entity-birth-no-kill (-> self link prev))
|
||||
(let ((a1-1 (new 'stack-no-clear 'event-message-block)))
|
||||
(set! (-> a1-1 from) arg0)
|
||||
(set! (-> a1-1 from) proc)
|
||||
(set! (-> a1-1 num-params) arg1)
|
||||
(set! (-> a1-1 message) arg2)
|
||||
(set! (-> a1-1 param 0) (-> arg3 param 0))
|
||||
(set! (-> a1-1 param 1) (-> arg3 param 1))
|
||||
(set! (-> a1-1 param 2) (-> arg3 param 2))
|
||||
(set! (-> a1-1 param 3) (-> arg3 param 3))
|
||||
(set! (-> a1-1 param 4) (-> arg3 param 4))
|
||||
(set! (-> a1-1 param 5) (-> arg3 param 5))
|
||||
(set! (-> a1-1 param 6) (-> arg3 param 6))
|
||||
(set! (-> a1-1 message) event-type)
|
||||
(set! (-> a1-1 param 0) (-> event param 0))
|
||||
(set! (-> a1-1 param 1) (-> event param 1))
|
||||
(set! (-> a1-1 param 2) (-> event param 2))
|
||||
(set! (-> a1-1 param 3) (-> event param 3))
|
||||
(set! (-> a1-1 param 4) (-> event param 4))
|
||||
(set! (-> a1-1 param 5) (-> event param 5))
|
||||
(set! (-> a1-1 param 6) (-> event param 6))
|
||||
(let ((t9-1 send-event-function)
|
||||
(v1-13 (-> self link prev))
|
||||
)
|
||||
@@ -1123,8 +1115,8 @@
|
||||
(set! (-> a1-2 from) self)
|
||||
(set! (-> a1-2 num-params) 2)
|
||||
(set! (-> a1-2 message) 'clone)
|
||||
(set! (-> a1-2 param 0) (-> arg3 param 0))
|
||||
(set! (-> a1-2 param 1) (+ (-> arg3 param 1) -1))
|
||||
(set! (-> a1-2 param 0) (-> event param 0))
|
||||
(set! (-> a1-2 param 1) (+ (-> event param 1) -1))
|
||||
(let ((t9-3 send-event-function)
|
||||
(v1-25 (-> self link next))
|
||||
)
|
||||
@@ -1137,17 +1129,17 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(case (-> arg3 param 1)
|
||||
(case (-> event param 1)
|
||||
((2)
|
||||
(go flying-lurker-clone (the-as handle (-> arg3 param 0)) "flying-lurker-b-")
|
||||
(go flying-lurker-clone (the-as handle (-> event param 0)) "flying-lurker-b-")
|
||||
)
|
||||
((1)
|
||||
(go flying-lurker-clone (the-as handle (-> arg3 param 0)) "flying-lurker-c-")
|
||||
(go flying-lurker-clone (the-as handle (-> event param 0)) "flying-lurker-c-")
|
||||
)
|
||||
)
|
||||
)
|
||||
(else
|
||||
(flying-lurker-handler arg0 arg1 arg2 arg3)
|
||||
(flying-lurker-handler proc arg1 event-type event)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -1265,7 +1257,3 @@
|
||||
)
|
||||
(none)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -61,7 +61,7 @@
|
||||
(if s3-1
|
||||
(set! sv-104 (logior sv-104 2))
|
||||
)
|
||||
(when (zero? (logand (-> arg0 prev-status) (cshape-moving-flags onsurf)))
|
||||
(when (not (logtest? (-> arg0 prev-status) (cshape-moving-flags onsurf)))
|
||||
(set! (-> arg0 ground-impact-vel) (- (vector-dot (-> arg0 transv) (-> arg0 dynam gravity-normal))))
|
||||
(set! sv-96 (logior sv-96 2048))
|
||||
(when (not s3-1)
|
||||
@@ -124,7 +124,7 @@
|
||||
)
|
||||
(and (< 0.0 (vector-dot (-> arg0 ground-poly-normal) arg2))
|
||||
(< (- (-> *display* base-frame-counter) (-> arg0 unknown-dword10)) (seconds 0.3))
|
||||
(zero? (logand sv-104 32))
|
||||
(not (logtest? sv-104 32))
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -156,7 +156,7 @@
|
||||
(else
|
||||
(set! sv-96 (logior sv-96 1))
|
||||
(set! (-> arg0 cur-pat mode) 0)
|
||||
(if (and (= (-> arg1 best-from-prim prim-id) 6) (zero? (logand sv-104 7)))
|
||||
(if (and (= (-> arg1 best-from-prim prim-id) 6) (not (logtest? sv-104 7)))
|
||||
(set! (-> arg0 local-normal quad) (-> sv-84 quad))
|
||||
)
|
||||
(vector-reflect-flat! arg2 (-> sv-88 0) sv-84)
|
||||
@@ -165,7 +165,7 @@
|
||||
)
|
||||
(set! sv-96 (logior sv-96 2))
|
||||
(set! (-> arg0 ground-touch-point w) 0.0)
|
||||
(when (zero? (logand sv-104 15))
|
||||
(when (not (logtest? sv-104 15))
|
||||
(set! sv-96 (logior sv-96 2))
|
||||
(set! (-> arg0 ground-poly-normal quad) (-> arg0 poly-normal quad))
|
||||
(set! (-> arg0 unknown-vector53 quad) (-> sv-84 quad))
|
||||
@@ -193,7 +193,3 @@
|
||||
(set! (-> arg0 unknown-halfword00) (logand (+ (-> arg0 unknown-halfword00) 1) 127))
|
||||
(the-as cshape-moving-flags sv-96)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -976,8 +976,8 @@
|
||||
|
||||
(defpartgroup group-racer-explode
|
||||
:id 116
|
||||
:duration 300
|
||||
:linger-duration 3000
|
||||
:duration (seconds 1)
|
||||
:linger-duration (seconds 10)
|
||||
:flags (use-local-clock)
|
||||
:bounds (static-bspherem 0 0 0 8)
|
||||
:parts ((sp-item 2279 :period 600 :length 5)
|
||||
@@ -1122,7 +1122,3 @@
|
||||
(sp-cpuinfo-flags bit0 bit2 bit3 bit14)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -10,83 +10,77 @@
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(defstate target-racing-start (target)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(cond
|
||||
((and (= arg2 'query) (= (-> arg3 param 0) 'mode))
|
||||
((and (= event-type 'query) (= (-> event param 0) 'mode))
|
||||
'racer
|
||||
)
|
||||
((and (= arg2 'get-pickup) (= (-> arg3 param 0) 3))
|
||||
((and (= event-type 'get-pickup) (= (-> event param 0) 3))
|
||||
(if (>= (- (-> *display* base-frame-counter) (-> self racer boost-time)) (seconds 1))
|
||||
(send-event self 'boost (fmax 1.0 (fmin 2.0 (the-as float (-> arg3 param 1)))))
|
||||
(send-event self 'boost (fmax 1.0 (fmin 2.0 (the-as float (-> event param 1)))))
|
||||
)
|
||||
)
|
||||
(else
|
||||
(case arg2
|
||||
(case event-type
|
||||
(('end-mode)
|
||||
(go target-racing-get-off (process->handle arg0))
|
||||
(go target-racing-get-off (process->handle proc))
|
||||
)
|
||||
(('touched)
|
||||
(send-event arg0 'attack (-> arg3 param 0) 'racer 0 0)
|
||||
(when (and (type-type? (-> arg0 type) babak) (< 40960.0 (-> self control unknown-float01)))
|
||||
(send-event proc 'attack (-> event param 0) 'racer 0 0)
|
||||
(when (and (type-type? (-> proc type) babak) (< 40960.0 (-> self control unknown-float01)))
|
||||
(let ((f0-5 (lerp-scale 16384.0 32768.0 (-> self control unknown-float01) 40960.0 (-> self racer transv-max))))
|
||||
(go target-racing-jump f0-5 f0-5 #f)
|
||||
)
|
||||
)
|
||||
)
|
||||
(('attack 'attack-or-shove 'attack-invinc)
|
||||
(let ((v1-27 (the-as attack-info (-> arg3 param 1))))
|
||||
(let ((v1-27 (the-as attack-info (-> event param 1))))
|
||||
(if (not (and (logtest? (-> v1-27 mask) (attack-mask mode)) (or (= (-> v1-27 mode) 'burn) (= (-> v1-27 mode) 'burnup)))
|
||||
)
|
||||
(target-attacked
|
||||
arg2
|
||||
(the-as attack-info (-> arg3 param 1))
|
||||
arg0
|
||||
(the-as touching-shapes-entry (-> arg3 param 0))
|
||||
event-type
|
||||
(the-as attack-info (-> event param 1))
|
||||
proc
|
||||
(the-as touching-shapes-entry (-> event param 0))
|
||||
(the-as (state symbol attack-info target) target-racing-hit)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(('heat)
|
||||
(let ((f0-7 (fmax 0.0 (fmin (+ (-> self racer heat) (the-as float (-> arg3 param 0))) (-> *RACER-bank* heat-max))))
|
||||
(set! (-> self racer heat)
|
||||
(fmax 0.0 (fmin (+ (-> self racer heat) (the-as float (-> event param 0))) (-> *RACER-bank* heat-max)))
|
||||
)
|
||||
(set! (-> self racer heat) f0-7)
|
||||
f0-7
|
||||
)
|
||||
)
|
||||
(('boost)
|
||||
(sound-play "get-blue-eco")
|
||||
(set! (-> self racer boost-sound-id) (sound-play "zoom-boost"))
|
||||
(set! (-> self racer boost-time) (-> *display* base-frame-counter))
|
||||
(let ((f0-12 (seek
|
||||
(-> self racer boost-level)
|
||||
(-> *RACER-bank* boost-level-max)
|
||||
(* (-> *RACER-bank* boost-level-inc) (the-as float (-> arg3 param 0)))
|
||||
)
|
||||
)
|
||||
(set! (-> self racer boost-level) (seek
|
||||
(-> self racer boost-level)
|
||||
(-> *RACER-bank* boost-level-max)
|
||||
(* (-> *RACER-bank* boost-level-inc) (the-as float (-> event param 0)))
|
||||
)
|
||||
)
|
||||
(set! (-> self racer boost-level) f0-12)
|
||||
f0-12
|
||||
)
|
||||
)
|
||||
(('smack)
|
||||
(go target-racing-smack (-> self control unknown-float01) #t)
|
||||
)
|
||||
(('jump)
|
||||
(go target-racing-jump (the-as float (-> arg3 param 0)) (the-as float (-> arg3 param 1)) #f)
|
||||
(go target-racing-jump (the-as float (-> event param 0)) (the-as float (-> event param 1)) #f)
|
||||
)
|
||||
(('change-mode)
|
||||
(case (-> arg3 param 0)
|
||||
(case (-> event param 0)
|
||||
(('grab)
|
||||
(go target-racing-grab)
|
||||
)
|
||||
)
|
||||
)
|
||||
(('clone-anim)
|
||||
(go target-racing-clone-anim (process->handle (the-as process (-> arg3 param 0))))
|
||||
(go target-racing-clone-anim (process->handle (the-as process (-> event param 0))))
|
||||
)
|
||||
(else
|
||||
(target-generic-event-handler arg0 arg1 arg2 arg3)
|
||||
(target-generic-event-handler proc arg1 event-type event)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -264,10 +258,7 @@
|
||||
(let ((a0-11 (-> (the-as target v1-0) draw color-emissive quad)))
|
||||
(set! (-> self draw color-emissive quad) a0-11)
|
||||
)
|
||||
(let ((f0-0 (-> (the-as target v1-0) draw secondary-interp)))
|
||||
(set! (-> self draw secondary-interp) f0-0)
|
||||
f0-0
|
||||
)
|
||||
(set! (-> self draw secondary-interp) (-> (the-as target v1-0) draw secondary-interp))
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -367,7 +358,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(if (and (zero? (logand (-> self control status) (cshape-moving-flags onsurf)))
|
||||
(if (and (not (logtest? (-> self control status) (cshape-moving-flags onsurf)))
|
||||
(or (>= (- (-> *display* base-frame-counter) (-> self control unknown-dword11))
|
||||
(* (-> *TARGET-bank* ground-timeout) 2)
|
||||
)
|
||||
@@ -558,8 +549,7 @@
|
||||
((cpad-pressed? (-> self control unknown-cpad-info00 number) l1 r1)
|
||||
(set! (-> self racer slide-down-time 0) (-> *display* base-frame-counter))
|
||||
)
|
||||
((zero? (logand (-> *cpad-list* cpads (-> self control unknown-cpad-info00 number) button0-abs 0) (pad-buttons l1 r1))
|
||||
)
|
||||
((not (cpad-hold? (-> self control unknown-cpad-info00 number) l1 r1))
|
||||
(set! (-> self racer slide-down-time 0) 0)
|
||||
0
|
||||
)
|
||||
@@ -1073,7 +1063,7 @@
|
||||
(until v1-154
|
||||
(suspend)
|
||||
(set! v1-154 (and (>= (- (-> *display* base-frame-counter) (-> self state-time)) (seconds 1))
|
||||
(zero? (logand (-> *kernel-context* prevent-from-run) (process-mask movie)))
|
||||
(not (logtest? (-> *kernel-context* prevent-from-run) (process-mask movie)))
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -1423,21 +1413,21 @@
|
||||
)
|
||||
|
||||
(defstate target-racing-grab (target)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(cond
|
||||
((and (= arg2 'query) (= (-> arg3 param 0) 'mode))
|
||||
((and (= event-type 'query) (= (-> event param 0) 'mode))
|
||||
(-> self state name)
|
||||
)
|
||||
(else
|
||||
(case arg2
|
||||
(case event-type
|
||||
(('end-mode)
|
||||
(go target-racing)
|
||||
)
|
||||
(('clone-anim)
|
||||
(go target-racing-clone-anim (process->handle (the-as process (-> arg3 param 0))))
|
||||
(go target-racing-clone-anim (process->handle (the-as process (-> event param 0))))
|
||||
)
|
||||
(else
|
||||
(target-generic-event-handler arg0 arg1 arg2 arg3)
|
||||
(target-generic-event-handler proc arg1 event-type event)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -1476,11 +1466,11 @@
|
||||
)
|
||||
|
||||
(defstate target-racing-clone-anim (target)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(if (and (= arg2 'trans) (= (-> arg3 param 0) 'restore))
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(if (and (= event-type 'trans) (= (-> event param 0) 'restore))
|
||||
(set! (-> self control unknown-uint20) (the-as uint #f))
|
||||
)
|
||||
((-> target-racing-grab event) arg0 arg1 arg2 arg3)
|
||||
((-> target-racing-grab event) proc arg1 event-type event)
|
||||
)
|
||||
:enter (-> target-clone-anim enter)
|
||||
:exit (behavior ()
|
||||
@@ -1510,7 +1500,3 @@
|
||||
(none)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -83,34 +83,32 @@
|
||||
|
||||
(defstate wait-for-start (racer)
|
||||
:virtual #t
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(local-vars (v0-1 structure))
|
||||
(let ((v1-0 arg2))
|
||||
(the-as
|
||||
object
|
||||
(cond
|
||||
((= v1-0 'trans)
|
||||
(vector+! (the-as vector (-> arg3 param 0)) (-> self root-override trans) (-> self extra-trans))
|
||||
)
|
||||
((= v1-0 'notify)
|
||||
(set! v0-1 #t)
|
||||
(set! (-> self auto-get-off) (the-as symbol v0-1))
|
||||
v0-1
|
||||
)
|
||||
((= v1-0 'shadow)
|
||||
(cond
|
||||
((-> arg3 param 0)
|
||||
(set! v0-1 (-> self shadow-backup))
|
||||
(set! (-> self draw shadow) (the-as shadow-geo v0-1))
|
||||
v0-1
|
||||
)
|
||||
(else
|
||||
(set! (-> self draw shadow) #f)
|
||||
#f
|
||||
)
|
||||
(the-as
|
||||
object
|
||||
(case event-type
|
||||
(('trans)
|
||||
(vector+! (the-as vector (-> event param 0)) (-> self root-override trans) (-> self extra-trans))
|
||||
)
|
||||
(('notify)
|
||||
(set! v0-1 #t)
|
||||
(set! (-> self auto-get-off) (the-as symbol v0-1))
|
||||
v0-1
|
||||
)
|
||||
(('shadow)
|
||||
(cond
|
||||
((-> event param 0)
|
||||
(set! v0-1 (-> self shadow-backup))
|
||||
(set! (-> self draw shadow) (the-as shadow-geo v0-1))
|
||||
v0-1
|
||||
)
|
||||
(else
|
||||
(set! (-> self draw shadow) #f)
|
||||
#f
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -188,7 +186,7 @@
|
||||
)
|
||||
)
|
||||
((4)
|
||||
(if (and *target* (zero? (logand (-> *target* control root-prim prim-core action) (collide-action ca-9))))
|
||||
(if (and *target* (not (logtest? (-> *target* control root-prim prim-core action) (collide-action ca-9))))
|
||||
(goto cfg-77)
|
||||
)
|
||||
)
|
||||
@@ -269,8 +267,8 @@
|
||||
|
||||
(defstate pickup (racer)
|
||||
:virtual #t
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('draw)
|
||||
(ja-channel-set! 1)
|
||||
(ja :group! (-> self draw art-group data 3))
|
||||
@@ -279,14 +277,14 @@
|
||||
(transform-post)
|
||||
)
|
||||
(('trans)
|
||||
(vector+! (the-as vector (-> arg3 param 0)) (-> self root-override trans) (-> self extra-trans))
|
||||
(vector+! (the-as vector (-> event param 0)) (-> self root-override trans) (-> self extra-trans))
|
||||
)
|
||||
(('touch 'attack)
|
||||
#f
|
||||
)
|
||||
(('shadow)
|
||||
(cond
|
||||
((-> arg3 param 0)
|
||||
((-> event param 0)
|
||||
(let ((v0-1 (the-as object (-> self shadow-backup))))
|
||||
(set! (-> self draw shadow) (the-as shadow-geo v0-1))
|
||||
v0-1
|
||||
@@ -315,13 +313,7 @@
|
||||
(case (-> (level-get-target-inside *level*) name)
|
||||
(('misty)
|
||||
(close-specific-task! (game-task misty-bike) (task-status need-reminder-a))
|
||||
(level-hint-spawn
|
||||
(game-text-id misty-bike-hint)
|
||||
"sksp0062"
|
||||
(the-as entity #f)
|
||||
*entity-pool*
|
||||
(game-task none)
|
||||
)
|
||||
(level-hint-spawn (game-text-id misty-bike-hint) "sksp0062" (the-as entity #f) *entity-pool* (game-task none))
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -347,19 +339,21 @@
|
||||
|
||||
(defstate wait-for-return (racer)
|
||||
:virtual #t
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(if (and (or (= arg2 'touch) (= arg2 'attack)) (and (!= (-> self condition) 4) (send-event *target* 'end-mode)))
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(if (and (or (= event-type 'touch) (= event-type 'attack))
|
||||
(and (!= (-> self condition) 4) (send-event *target* 'end-mode))
|
||||
)
|
||||
(go-virtual pickup (the-as (state collectable) (method-of-object self idle)))
|
||||
)
|
||||
(the-as
|
||||
object
|
||||
(cond
|
||||
((= arg2 'trans)
|
||||
(vector+! (the-as vector (-> arg3 param 0)) (-> self root-override trans) (-> self extra-trans))
|
||||
((= event-type 'trans)
|
||||
(vector+! (the-as vector (-> event param 0)) (-> self root-override trans) (-> self extra-trans))
|
||||
)
|
||||
((= arg2 'shadow)
|
||||
((= event-type 'shadow)
|
||||
(cond
|
||||
((-> arg3 param 0)
|
||||
((-> event param 0)
|
||||
(let ((v0-3 (the-as structure (-> self shadow-backup))))
|
||||
(set! (-> self draw shadow) (the-as shadow-geo v0-3))
|
||||
v0-3
|
||||
@@ -455,7 +449,3 @@
|
||||
(go (method-of-object obj wait-for-start))
|
||||
(none)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -128,14 +128,12 @@
|
||||
(let ((v1-1 (-> self racer slide-mode)))
|
||||
(cond
|
||||
((zero? v1-1)
|
||||
(if (zero? (logand (-> *cpad-list* cpads (-> self control unknown-cpad-info00 number) button0-abs 0) (pad-buttons l1 r1))
|
||||
)
|
||||
(if (not (cpad-hold? (-> self control unknown-cpad-info00 number) l1 r1))
|
||||
(set! (-> self racer slide-mode) -1)
|
||||
)
|
||||
)
|
||||
((= v1-1 1)
|
||||
(if (zero? (logand (-> *cpad-list* cpads (-> self control unknown-cpad-info00 number) button0-abs 0) (pad-buttons l1 r1))
|
||||
)
|
||||
(if (not (cpad-hold? (-> self control unknown-cpad-info00 number) l1 r1))
|
||||
(set! (-> self racer slide-mode) -1)
|
||||
)
|
||||
)
|
||||
@@ -531,7 +529,7 @@
|
||||
)
|
||||
(let ((f0-2
|
||||
(if (or (and (logtest? (-> self control status) (cshape-moving-flags twall))
|
||||
(zero? (logand (-> self control status) (cshape-moving-flags onsurf)))
|
||||
(not (logtest? (-> self control status) (cshape-moving-flags onsurf)))
|
||||
)
|
||||
(logtest? (-> self state-flags) (state-flags dying))
|
||||
)
|
||||
@@ -773,7 +771,7 @@
|
||||
)
|
||||
(cpad-pressed? (-> self control unknown-cpad-info00 number) circle square)
|
||||
(>= (- (-> *display* base-frame-counter) (-> self control unknown-dword82)) (seconds 0.25))
|
||||
(zero? (logand (-> self state-flags) (state-flags being-attacked dying)))
|
||||
(not (logtest? (-> self state-flags) (state-flags being-attacked dying)))
|
||||
)
|
||||
(let ((gp-6 (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> self control quat)))
|
||||
(s5-4 (vector<-cspace! (new 'stack-no-clear 'vector) (-> self manipy 0 node-list data 4)))
|
||||
@@ -855,8 +853,7 @@
|
||||
(set! (-> self racer boost-curve) 0.0)
|
||||
)
|
||||
)
|
||||
(when (or (zero? (logand (-> *cpad-list* cpads (-> self control unknown-cpad-info00 number) button0-abs 0) (pad-buttons x))
|
||||
)
|
||||
(when (or (not (cpad-hold? (-> self control unknown-cpad-info00 number) x))
|
||||
(< (-> self control unknown-float01) 4096.0)
|
||||
(= (-> self racer boost-level) 0.0)
|
||||
)
|
||||
@@ -1455,7 +1452,3 @@
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -238,7 +238,7 @@
|
||||
)
|
||||
|
||||
(defmethod dummy-58 snow-bunny ((obj snow-bunny))
|
||||
(if (zero? (logand (-> *target* state-flags) (state-flags dangerous)))
|
||||
(if (not (logtest? (-> *target* state-flags) (state-flags dangerous)))
|
||||
(set! (-> obj last-nondangerous-time) (-> *display* base-frame-counter))
|
||||
)
|
||||
(none)
|
||||
@@ -285,7 +285,7 @@
|
||||
)
|
||||
|
||||
(defmethod dummy-57 snow-bunny ((obj snow-bunny))
|
||||
(if (or (not *target*) (zero? (logand (-> *target* state-flags) (state-flags dangerous))))
|
||||
(if (or (not *target*) (not (logtest? (-> *target* state-flags) (state-flags dangerous))))
|
||||
(return #f)
|
||||
)
|
||||
(let ((f0-0 (vector-vector-xz-distance (target-pos 0) (-> obj collide-info trans))))
|
||||
@@ -855,73 +855,7 @@
|
||||
(set! (-> s5-0 found-best) #f)
|
||||
(let ((s4-0 (-> obj nav)))
|
||||
(TODO-RENAME-27 s4-0)
|
||||
(TODO-RENAME-28 s4-0 (collide-kind
|
||||
background
|
||||
cak-1
|
||||
cak-2
|
||||
cak-3
|
||||
target
|
||||
water
|
||||
powerup
|
||||
crate
|
||||
enemy
|
||||
wall-object
|
||||
projectile
|
||||
ground-object
|
||||
target-attack
|
||||
mother-spider
|
||||
cak-14
|
||||
blue-eco-suck
|
||||
unknown-16
|
||||
unknown-17
|
||||
unknown-18
|
||||
unknown-19
|
||||
unknown-20
|
||||
unknown-21
|
||||
unknown-22
|
||||
unknown-23
|
||||
unknown-24
|
||||
unknown-25
|
||||
unknown-26
|
||||
unknown-27
|
||||
unknown-28
|
||||
unknown-29
|
||||
unknown-30
|
||||
unknown-31
|
||||
unknown-32
|
||||
unknown-33
|
||||
unknown-34
|
||||
unknown-35
|
||||
unknown-36
|
||||
unknown-37
|
||||
unknown-38
|
||||
unknown-39
|
||||
unknown-40
|
||||
unknown-41
|
||||
unknown-42
|
||||
unknown-43
|
||||
unknown-44
|
||||
unknown-45
|
||||
unknown-46
|
||||
unknown-47
|
||||
unknown-48
|
||||
unknown-49
|
||||
unknown-50
|
||||
unknown-51
|
||||
unknown-52
|
||||
unknown-53
|
||||
unknown-54
|
||||
unknown-55
|
||||
unknown-56
|
||||
unknown-57
|
||||
unknown-58
|
||||
unknown-59
|
||||
unknown-60
|
||||
unknown-61
|
||||
unknown-62
|
||||
unknown-63
|
||||
)
|
||||
)
|
||||
(TODO-RENAME-28 s4-0 (the-as collide-kind -1))
|
||||
)
|
||||
(let ((s4-1 (target-pos 0)))
|
||||
(vector-! (-> s5-0 away-vec) (-> obj collide-info trans) s4-1)
|
||||
@@ -1177,7 +1111,3 @@
|
||||
)
|
||||
:post (the-as (function none :behavior snow-bunny) nav-enemy-simple-post)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -229,11 +229,11 @@
|
||||
)
|
||||
|
||||
(defstate snow-button-up-idle (snow-button)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(local-vars (v0-2 object))
|
||||
(case arg2
|
||||
(case event-type
|
||||
(('touch 'attack 'bonk)
|
||||
(when (and (= (-> arg0 type) target)
|
||||
(when (and (= (-> proc type) target)
|
||||
(logtest? (-> *target* control root-prim prim-core action) (collide-action ca-14))
|
||||
(>= 10649.6 (vector-vector-xz-distance (-> self root-override trans) (target-pos 0)))
|
||||
)
|
||||
@@ -260,9 +260,9 @@
|
||||
)
|
||||
|
||||
(defstate snow-button-activate (snow-button)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(local-vars (v0-0 object))
|
||||
(case arg2
|
||||
(case event-type
|
||||
(('untrigger)
|
||||
(go snow-button-deactivate)
|
||||
)
|
||||
@@ -327,9 +327,9 @@
|
||||
)
|
||||
|
||||
(defstate snow-button-deactivate (snow-button)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(local-vars (v0-0 symbol))
|
||||
(case arg2
|
||||
(case event-type
|
||||
(('query)
|
||||
(return (the-as object #f))
|
||||
v0-0
|
||||
@@ -446,7 +446,7 @@
|
||||
)
|
||||
)
|
||||
(set! (-> obj has-path?)
|
||||
(and (zero? (logand (-> obj path flags) (path-control-flag not-found))) (> (-> obj sync period) 0))
|
||||
(and (not (logtest? (-> obj path flags) (path-control-flag not-found))) (> (-> obj sync period) 0))
|
||||
)
|
||||
(when (nonzero? (-> obj plat-type))
|
||||
(cond
|
||||
@@ -491,8 +491,8 @@
|
||||
|
||||
(defstate plat-startup (flutflut-plat)
|
||||
:virtual #t
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('trigger)
|
||||
(when (or (!= (-> self plat-type) 1)
|
||||
(not (and (-> self entity) (logtest? (-> self entity extra perm status) (entity-perm-status complete))))
|
||||
@@ -538,8 +538,8 @@
|
||||
)
|
||||
|
||||
(defstate flutflut-plat-hidden-idle (flutflut-plat)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('trigger)
|
||||
(logclear! (-> self mask) (process-mask actor-pause))
|
||||
(go flutflut-plat-appear)
|
||||
@@ -565,13 +565,13 @@
|
||||
)
|
||||
|
||||
(defstate flutflut-plat-appear (flutflut-plat)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(let ((v1-0 arg2))
|
||||
(the-as object (if (or (= v1-0 'bonk) (= v1-0 'bounce))
|
||||
(dummy-22 self)
|
||||
)
|
||||
)
|
||||
)
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(the-as object (case event-type
|
||||
(('bonk 'bounce)
|
||||
(dummy-22 self)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
:enter (behavior ()
|
||||
(set! (-> self state-time) (-> *display* base-frame-counter))
|
||||
@@ -641,18 +641,16 @@
|
||||
|
||||
(defstate plat-idle (flutflut-plat)
|
||||
:virtual #t
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(let ((v1-0 arg2))
|
||||
(the-as object (cond
|
||||
((or (= v1-0 'bonk) (= v1-0 'bounce))
|
||||
(dummy-22 self)
|
||||
)
|
||||
((= v1-0 'untrigger)
|
||||
(go flutflut-plat-hide)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(the-as object (case event-type
|
||||
(('bonk 'bounce)
|
||||
(dummy-22 self)
|
||||
)
|
||||
(('untrigger)
|
||||
(go flutflut-plat-hide)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
:enter (behavior ()
|
||||
(let ((t9-0 (-> (method-of-type plat plat-idle) enter)))
|
||||
@@ -687,18 +685,16 @@
|
||||
|
||||
(defstate plat-path-active (flutflut-plat)
|
||||
:virtual #t
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(let ((v1-0 arg2))
|
||||
(the-as object (cond
|
||||
((or (= v1-0 'bonk) (= v1-0 'bounce))
|
||||
(dummy-22 self)
|
||||
)
|
||||
((= v1-0 'untrigger)
|
||||
(go flutflut-plat-hide)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(the-as object (case event-type
|
||||
(('bonk 'bounce)
|
||||
(dummy-22 self)
|
||||
)
|
||||
(('untrigger)
|
||||
(go flutflut-plat-hide)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
:enter (behavior ((arg0 plat))
|
||||
(let ((t9-0 (-> (method-of-type plat plat-path-active) enter)))
|
||||
@@ -725,13 +721,13 @@
|
||||
)
|
||||
|
||||
(defstate flutflut-plat-hide (flutflut-plat)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(let ((v1-0 arg2))
|
||||
(the-as object (if (= v1-0 'bonk)
|
||||
(dummy-22 self)
|
||||
)
|
||||
)
|
||||
)
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(the-as object (case event-type
|
||||
(('bonk)
|
||||
(dummy-22 self)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
:enter (behavior ()
|
||||
(set! (-> self state-time) (-> *display* base-frame-counter))
|
||||
@@ -783,25 +779,23 @@
|
||||
)
|
||||
|
||||
(defstate elevator-idle-at-cave (flutflut-plat)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(let ((v1-0 arg2))
|
||||
(the-as
|
||||
object
|
||||
(cond
|
||||
((= v1-0 'bonk)
|
||||
(dummy-22 self)
|
||||
)
|
||||
((= v1-0 'bounce)
|
||||
(if (not (and (-> self entity) (logtest? (-> self entity extra perm status) (entity-perm-status complete))))
|
||||
(dummy-22 self)
|
||||
)
|
||||
)
|
||||
((= v1-0 'ridden)
|
||||
(if (or (not *target*) (zero? (logand (-> *target* control root-prim prim-core action) (collide-action ca-14))))
|
||||
(go elevator-travel-to-fort)
|
||||
)
|
||||
)
|
||||
)
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(the-as
|
||||
object
|
||||
(case event-type
|
||||
(('bonk)
|
||||
(dummy-22 self)
|
||||
)
|
||||
(('bounce)
|
||||
(if (not (and (-> self entity) (logtest? (-> self entity extra perm status) (entity-perm-status complete))))
|
||||
(dummy-22 self)
|
||||
)
|
||||
)
|
||||
(('ridden)
|
||||
(if (or (not *target*) (not (logtest? (-> *target* control root-prim prim-core action) (collide-action ca-14))))
|
||||
(go elevator-travel-to-fort)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -820,13 +814,13 @@
|
||||
)
|
||||
|
||||
(defstate elevator-travel-to-fort (flutflut-plat)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(let ((v1-0 arg2))
|
||||
(the-as object (if (or (= v1-0 'bonk) (= v1-0 'bounce))
|
||||
(dummy-22 self)
|
||||
)
|
||||
)
|
||||
)
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(the-as object (case event-type
|
||||
(('bonk 'bounce)
|
||||
(dummy-22 self)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
:trans (behavior ()
|
||||
(when (= (-> self path-pos) 1.0)
|
||||
@@ -845,13 +839,13 @@
|
||||
)
|
||||
|
||||
(defstate elevator-idle-at-fort (flutflut-plat)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(let ((v1-0 arg2))
|
||||
(the-as object (if (or (= v1-0 'bonk) (= v1-0 'bounce))
|
||||
(dummy-22 self)
|
||||
)
|
||||
)
|
||||
)
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(the-as object (case event-type
|
||||
(('bonk 'bounce)
|
||||
(dummy-22 self)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
:enter (behavior ()
|
||||
(set! (-> self path-pos) 1.0)
|
||||
@@ -862,7 +856,7 @@
|
||||
(when *target*
|
||||
(if (and (>= 798720.0 (-> (target-pos 0) y))
|
||||
(not (and (logtest? (-> *target* control unknown-surface00 flags) (surface-flags jump))
|
||||
(zero? (logand (-> *target* control status) (cshape-moving-flags onsurf)))
|
||||
(not (logtest? (-> *target* control status) (cshape-moving-flags onsurf)))
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -878,13 +872,13 @@
|
||||
)
|
||||
|
||||
(defstate elevator-travel-to-cave (flutflut-plat)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(let ((v1-0 arg2))
|
||||
(the-as object (if (or (= v1-0 'bonk) (= v1-0 'bounce))
|
||||
(dummy-22 self)
|
||||
)
|
||||
)
|
||||
)
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(the-as object (case event-type
|
||||
(('bonk 'bounce)
|
||||
(dummy-22 self)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
:trans (behavior ()
|
||||
(when (= (-> self path-pos) 0.0)
|
||||
@@ -1070,7 +1064,3 @@
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -152,7 +152,7 @@
|
||||
|
||||
(defpartgroup group-snow-yellow-eco-room-activate
|
||||
:id 511
|
||||
:duration 900
|
||||
:duration (seconds 3)
|
||||
:bounds (static-bspherem 0 -6 0 8)
|
||||
:parts ((sp-item 1994) (sp-item 1994) (sp-item 1995 :flags (bit1) :period 1200 :length 15))
|
||||
)
|
||||
@@ -289,19 +289,19 @@
|
||||
)
|
||||
|
||||
(defstate snow-eggtop-idle-up (snow-eggtop)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(let ((v1-0 arg2))
|
||||
(the-as object (when (= v1-0 'notify)
|
||||
(case (-> arg3 param 0)
|
||||
(('pickup)
|
||||
(if (type-type? (-> arg0 type) fuel-cell)
|
||||
(save-reminder (get-task-control (-> self entity extra perm task)) 1 4)
|
||||
)
|
||||
)
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(the-as object (case event-type
|
||||
(('notify)
|
||||
(case (-> event param 0)
|
||||
(('pickup)
|
||||
(if (type-type? (-> proc type) fuel-cell)
|
||||
(save-reminder (get-task-control (-> self entity extra perm task)) 1 4)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
:trans (behavior ()
|
||||
(if (and (not (-> self child)) (task-complete? *game-info* (-> self entity extra perm task)))
|
||||
@@ -324,18 +324,18 @@
|
||||
)
|
||||
|
||||
(defstate snow-eggtop-activate (snow-eggtop)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('notify)
|
||||
(when (= (-> arg0 type) snowcam)
|
||||
(when (= (-> proc type) snowcam)
|
||||
(cond
|
||||
((= (-> arg3 param 0) 'die)
|
||||
((= (-> event param 0) 'die)
|
||||
(if *target*
|
||||
(set! (-> *target* control trans y) (+ 1024.0 (-> *target* control trans y)))
|
||||
)
|
||||
(go snow-eggtop-idle-down)
|
||||
)
|
||||
((= (-> arg3 param 0) 'cut)
|
||||
((= (-> event param 0) 'cut)
|
||||
(stop! (-> self sound))
|
||||
(set! (-> self play-sound?) #f)
|
||||
#f
|
||||
@@ -523,14 +523,14 @@
|
||||
)
|
||||
|
||||
(defstate snowpusher-idle (snowpusher)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(let ((v1-0 arg2))
|
||||
(the-as object (when (= v1-0 'touch)
|
||||
(send-event arg0 'no-look-around (seconds 1.5))
|
||||
#f
|
||||
)
|
||||
)
|
||||
)
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(the-as object (case event-type
|
||||
(('touch)
|
||||
(send-event proc 'no-look-around (seconds 1.5))
|
||||
#f
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
:code (behavior ()
|
||||
(let ((gp-0 #f))
|
||||
@@ -645,14 +645,14 @@
|
||||
)
|
||||
|
||||
(defstate snow-spatula-idle (snow-spatula)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(let ((v1-0 arg2))
|
||||
(the-as object (when (= v1-0 'bonk)
|
||||
(dummy-22 self)
|
||||
(sound-play "snow-spat-short" :vol 75 :pitch 0.75)
|
||||
)
|
||||
)
|
||||
)
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(the-as object (case event-type
|
||||
(('bonk)
|
||||
(dummy-22 self)
|
||||
(sound-play "snow-spat-short" :vol 75 :pitch 0.75)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
:trans (the-as (function none :behavior snow-spatula) plat-trans)
|
||||
:code (behavior ()
|
||||
@@ -917,8 +917,8 @@
|
||||
)
|
||||
|
||||
(defstate snow-fort-gate-idle-closed (snow-fort-gate)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('notice)
|
||||
(go snow-fort-gate-activate)
|
||||
)
|
||||
@@ -926,13 +926,7 @@
|
||||
)
|
||||
:trans (behavior ()
|
||||
(when (and *target* (>= 61440.0 (vector-vector-distance (-> self root-override trans) (-> *target* control trans))))
|
||||
(level-hint-spawn
|
||||
(game-text-id snow-fort-hint)
|
||||
"sksp0345"
|
||||
(the-as entity #f)
|
||||
*entity-pool*
|
||||
(game-task none)
|
||||
)
|
||||
(level-hint-spawn (game-text-id snow-fort-hint) "sksp0345" (the-as entity #f) *entity-pool* (game-task none))
|
||||
(close-specific-task! (game-task snow-fort) (task-status need-hint))
|
||||
)
|
||||
(none)
|
||||
@@ -1196,8 +1190,8 @@
|
||||
)
|
||||
|
||||
(defstate snow-gears-idle (snow-gears)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('notice)
|
||||
(logclear! (-> self mask) (process-mask actor-pause))
|
||||
(process-entity-status! self (entity-perm-status bit-3) #t)
|
||||
@@ -1372,7 +1366,7 @@
|
||||
(local-vars (v1-1 symbol))
|
||||
(until v1-1
|
||||
(suspend)
|
||||
(set! v1-1 (or (not *target*) (zero? (logand (-> *target* state-flags) (state-flags grabbed)))))
|
||||
(set! v1-1 (or (not *target*) (not (logtest? (-> *target* state-flags) (state-flags grabbed)))))
|
||||
)
|
||||
(sound-play "prec-button1" :pitch -1)
|
||||
(let ((gp-1 (get-process *default-dead-pool* snowcam #x4000)))
|
||||
@@ -1532,8 +1526,8 @@
|
||||
)
|
||||
|
||||
(defstate snow-log-wait-for-master (snow-log)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('trigger)
|
||||
(go snow-log-activate)
|
||||
)
|
||||
@@ -1575,8 +1569,8 @@
|
||||
)
|
||||
|
||||
(defstate snow-log-hidden (snow-log)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('trigger)
|
||||
(logclear! (-> self mask) (process-mask actor-pause))
|
||||
(process-entity-status! self (entity-perm-status bit-3) #t)
|
||||
@@ -1860,7 +1854,3 @@
|
||||
)
|
||||
(none)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -255,7 +255,7 @@
|
||||
|
||||
(defpartgroup group-ram-boss-proj-fly
|
||||
:id 522
|
||||
:duration 300
|
||||
:duration (seconds 1)
|
||||
:bounds (static-bspherem 0 0 0 3)
|
||||
:parts ((sp-item 1910 :flags (launch-asap) :binding 1908)
|
||||
(sp-item 1908 :flags (start-dead) :binding 1909)
|
||||
@@ -379,7 +379,7 @@
|
||||
|
||||
(defpartgroup group-ram-boss-proj-hit
|
||||
:id 523
|
||||
:duration 5
|
||||
:duration (seconds 0.017)
|
||||
:flags (use-local-clock)
|
||||
:bounds (static-bspherem 0 0 0 8)
|
||||
:parts ((sp-item 1914) (sp-item 1915) (sp-item 1916))
|
||||
@@ -452,7 +452,7 @@
|
||||
|
||||
(defpartgroup group-ram-boss-proj-die
|
||||
:id 524
|
||||
:duration 5
|
||||
:duration (seconds 0.017)
|
||||
:flags (use-local-clock)
|
||||
:bounds (static-bspherem 0 0 0 8)
|
||||
:parts ((sp-item 1914))
|
||||
@@ -605,10 +605,10 @@
|
||||
|
||||
(defmethod dummy-28 ram-boss-proj ((obj ram-boss-proj))
|
||||
(when (and *target*
|
||||
(zero? (logand (-> *target* state-flags)
|
||||
(not (logtest? (-> *target* state-flags)
|
||||
(state-flags being-attacked invulnerable timed-invulnerable invuln-powerup do-not-notice dying)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((gp-0 (-> obj target)))
|
||||
(set! (-> gp-0 quad) (-> (target-pos 0) quad))
|
||||
@@ -631,8 +631,8 @@
|
||||
)
|
||||
|
||||
(defstate ram-boss-proj-growing (ram-boss-proj)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('launch)
|
||||
(let ((v1-1 (-> self parent-override)))
|
||||
(set! (-> v1-1 0 proj-stoked) #f)
|
||||
@@ -781,8 +781,8 @@
|
||||
|
||||
(defpartgroup group-ram-boss-foot-puff
|
||||
:id 574
|
||||
:duration 5
|
||||
:linger-duration 450
|
||||
:duration (seconds 0.017)
|
||||
:linger-duration (seconds 1.5)
|
||||
:bounds (static-bspherem 0 0 0 2)
|
||||
:parts ((sp-item 2367) (sp-item 2368) (sp-item 2369))
|
||||
)
|
||||
@@ -874,7 +874,7 @@
|
||||
v0-4
|
||||
)
|
||||
((begin
|
||||
(if (zero? (logand (-> self nav-enemy-flags) (nav-enemy-flags navenmf8)))
|
||||
(if (not (logtest? (-> self nav-enemy-flags) (nav-enemy-flags navenmf8)))
|
||||
(do-push-aways! (-> self collide-info))
|
||||
)
|
||||
(level-hint-spawn
|
||||
@@ -909,7 +909,7 @@
|
||||
)
|
||||
)
|
||||
(('touch)
|
||||
(if (zero? (logand (-> self nav-enemy-flags) (nav-enemy-flags navenmf8)))
|
||||
(if (not (logtest? (-> self nav-enemy-flags) (nav-enemy-flags navenmf8)))
|
||||
(do-push-aways! (-> self collide-info))
|
||||
)
|
||||
(cond
|
||||
@@ -1256,13 +1256,13 @@
|
||||
)
|
||||
|
||||
(defstate ram-boss-idle (ram-boss)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('jump)
|
||||
(go ram-boss-jump-down arg0)
|
||||
(go ram-boss-jump-down proc)
|
||||
)
|
||||
(('touch 'attack)
|
||||
(nav-enemy-send-attack arg0 (the-as touching-shapes-entry (-> arg3 param 0)) 'generic)
|
||||
(nav-enemy-send-attack proc (the-as touching-shapes-entry (-> event param 0)) 'generic)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -1302,10 +1302,10 @@
|
||||
)
|
||||
|
||||
(defstate ram-boss-jump-down (ram-boss)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('touch 'attack)
|
||||
(nav-enemy-send-attack arg0 (the-as touching-shapes-entry (-> arg3 param 0)) 'generic)
|
||||
(nav-enemy-send-attack proc (the-as touching-shapes-entry (-> event param 0)) 'generic)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -1613,10 +1613,10 @@
|
||||
)
|
||||
)
|
||||
(when (and (= (-> self proj-status) 2)
|
||||
(zero? (logand (-> *target* state-flags)
|
||||
(not (logtest? (-> *target* state-flags)
|
||||
(state-flags being-attacked invulnerable timed-invulnerable invuln-powerup do-not-notice dying)
|
||||
)
|
||||
)
|
||||
)
|
||||
(>= (- (-> *display* base-frame-counter) (-> self state-time)) (seconds 0.2))
|
||||
)
|
||||
(let ((gp-2 (new 'stack-no-clear 'vector))
|
||||
@@ -1905,7 +1905,3 @@
|
||||
(none)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -98,8 +98,8 @@
|
||||
|
||||
(defstate water-vol-idle (helix-dark-eco)
|
||||
:virtual #t
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('trigger)
|
||||
(let ((a0-1 (-> self sound)))
|
||||
(set! (-> a0-1 spec pitch-mod) 2057)
|
||||
@@ -107,7 +107,7 @@
|
||||
)
|
||||
)
|
||||
(else
|
||||
((-> (method-of-type water-anim water-vol-idle) event) arg0 arg1 arg2 arg3)
|
||||
((-> (method-of-type water-anim water-vol-idle) event) proc arg1 event-type event)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -144,8 +144,8 @@
|
||||
)
|
||||
|
||||
(defstate helix-slide-door-idle-open (helix-slide-door)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('trigger)
|
||||
(go helix-slide-door-close)
|
||||
)
|
||||
@@ -246,8 +246,8 @@
|
||||
)
|
||||
|
||||
(defstate helix-button-idle-up (helix-button)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('touch)
|
||||
(when *target*
|
||||
(when (logtest? (-> *target* control status) (cshape-moving-flags onsurf))
|
||||
@@ -285,7 +285,7 @@
|
||||
(send-event a0-1 'pickup)
|
||||
(until v1-7
|
||||
(suspend)
|
||||
(set! v1-7 (or (not *target*) (zero? (logand (-> *target* state-flags) (state-flags grabbed)))))
|
||||
(set! v1-7 (or (not *target*) (not (logtest? (-> *target* state-flags) (state-flags grabbed)))))
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -611,18 +611,16 @@
|
||||
)
|
||||
|
||||
(defstate helix-water-idle (helix-water)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(let ((v1-0 arg2))
|
||||
(the-as object (cond
|
||||
((= v1-0 'trigger)
|
||||
(go helix-water-activated)
|
||||
)
|
||||
((= v1-0 'music)
|
||||
(set-setting! 'music 'danger 0.0 0)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(the-as object (case event-type
|
||||
(('trigger)
|
||||
(go helix-water-activated)
|
||||
)
|
||||
(('music)
|
||||
(set-setting! 'music 'danger 0.0 0)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
:code (behavior ()
|
||||
(set! (-> self root trans y) (-> self start-y))
|
||||
@@ -640,10 +638,10 @@
|
||||
)
|
||||
|
||||
(defstate helix-water-activated (helix-water)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('notify)
|
||||
(when (= (-> arg0 type) launcherdoor)
|
||||
(when (= (-> proc type) launcherdoor)
|
||||
(remove-setting! 'music)
|
||||
(go helix-water-idle)
|
||||
)
|
||||
@@ -654,7 +652,7 @@
|
||||
(seek! (-> self root scale y) 0.8 (* 0.667 (-> *display* seconds-per-frame)))
|
||||
(when *target*
|
||||
(let ((f0-4 (-> (target-pos 0) y)))
|
||||
(when (zero? (logand (-> *target* state-flags) (state-flags grabbed)))
|
||||
(when (not (logtest? (-> *target* state-flags) (state-flags grabbed)))
|
||||
(let* ((f0-5 (- f0-4 (-> self root trans y)))
|
||||
(f0-6 (+ -40960.0 f0-5))
|
||||
(f0-7 (* 0.000024414063 f0-6))
|
||||
@@ -710,7 +708,7 @@
|
||||
(set! (-> obj end-y) (+ 851968.0 (-> obj start-y)))
|
||||
(set-vector! (-> obj root scale) 1.0 0.8 1.0 1.0)
|
||||
(let ((s4-0 (entity-actor-count arg0 'alt-actor)))
|
||||
(set! (-> obj alt-actors) (the-as (array entity-actor) (new 'process 'boxed-array entity-actor s4-0)))
|
||||
(set! (-> obj alt-actors) (new 'process 'boxed-array entity-actor s4-0))
|
||||
(dotimes (s3-0 s4-0)
|
||||
(set! (-> obj alt-actors s3-0) (entity-actor-lookup arg0 'alt-actor s3-0))
|
||||
)
|
||||
@@ -721,7 +719,3 @@
|
||||
(go helix-water-idle)
|
||||
(none)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -514,11 +514,11 @@
|
||||
)
|
||||
|
||||
(defstate sunken-pipegame-idle (sunken-pipegame)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('trigger)
|
||||
(when (= (-> arg0 type) sunken-pipegame-button)
|
||||
(set! (-> self challenge) (-> (the-as sunken-pipegame-button arg0) button-id))
|
||||
(when (= (-> proc type) sunken-pipegame-button)
|
||||
(set! (-> self challenge) (-> (the-as sunken-pipegame-button proc) button-id))
|
||||
(go sunken-pipegame-begin-play)
|
||||
)
|
||||
)
|
||||
@@ -533,10 +533,10 @@
|
||||
)
|
||||
|
||||
(defstate sunken-pipegame-begin-play (sunken-pipegame)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('notify)
|
||||
(case (-> arg0 type)
|
||||
(case (-> proc type)
|
||||
((fuel-cell buzzer)
|
||||
(go sunken-pipegame-beat-challenge)
|
||||
)
|
||||
@@ -549,7 +549,7 @@
|
||||
(set! (-> self abort-audio-if-beaten?) #f)
|
||||
(dotimes (gp-0 3)
|
||||
(let ((v1-4 (-> self button gp-0)))
|
||||
(if (and (!= gp-0 (-> self challenge)) (zero? (logand (ash 1 gp-0) (-> self challenges-mask))))
|
||||
(if (and (!= gp-0 (-> self challenge)) (not (logtest? (ash 1 gp-0) (-> self challenges-mask))))
|
||||
(send-event (ppointer->process v1-4) 'trigger)
|
||||
)
|
||||
)
|
||||
@@ -679,7 +679,7 @@
|
||||
)
|
||||
(until v1-112
|
||||
(suspend)
|
||||
(set! v1-112 (or (not *target*) (zero? (logand (-> *target* state-flags) (state-flags grabbed)))))
|
||||
(set! v1-112 (or (not *target*) (not (logtest? (-> *target* state-flags) (state-flags grabbed)))))
|
||||
)
|
||||
(set! (-> self state-time) (-> *display* base-frame-counter))
|
||||
(sleep (-> self ticker) (-> self prize (-> self challenge) puzzle-delay))
|
||||
@@ -830,7 +830,7 @@
|
||||
(set! (-> self abort-audio-if-beaten?) #f)
|
||||
(until v1-3
|
||||
(suspend)
|
||||
(set! v1-3 (or (not *target*) (zero? (logand (-> *target* state-flags) (state-flags grabbed)))))
|
||||
(set! v1-3 (or (not *target*) (not (logtest? (-> *target* state-flags) (state-flags grabbed)))))
|
||||
)
|
||||
(if (not (handle->process (-> self prize (-> self challenge) actor-handle)))
|
||||
(logior! (-> self challenges-mask) (ash 1 (-> self challenge)))
|
||||
@@ -838,7 +838,7 @@
|
||||
(set! (-> self challenge) -1)
|
||||
(dotimes (gp-0 3)
|
||||
(let ((v1-18 (-> self button gp-0)))
|
||||
(if (zero? (logand (ash 1 gp-0) (-> self challenges-mask)))
|
||||
(if (not (logtest? (ash 1 gp-0) (-> self challenges-mask)))
|
||||
(send-event (ppointer->process v1-18) 'untrigger)
|
||||
)
|
||||
)
|
||||
@@ -1045,7 +1045,3 @@
|
||||
(go sunken-pipegame-start-up)
|
||||
(none)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -425,13 +425,13 @@
|
||||
)
|
||||
|
||||
(defstate target-tube-start (target)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(cond
|
||||
((and (= arg2 'query) (= (-> arg3 param 0) 'mode))
|
||||
((and (= event-type 'query) (= (-> event param 0) 'mode))
|
||||
'tube
|
||||
)
|
||||
(else
|
||||
(case arg2
|
||||
(case event-type
|
||||
(('end-mode)
|
||||
(go
|
||||
target-jump
|
||||
@@ -441,20 +441,20 @@
|
||||
)
|
||||
)
|
||||
(('touched)
|
||||
(send-event arg0 'attack (-> arg3 param 0) 'tube 0 0)
|
||||
(send-event proc 'attack (-> event param 0) 'tube 0 0)
|
||||
#f
|
||||
)
|
||||
(('attack 'attack-or-shove 'attack-invinc)
|
||||
(target-attacked
|
||||
'attack-or-shove
|
||||
(the-as attack-info (-> arg3 param 1))
|
||||
arg0
|
||||
(the-as touching-shapes-entry (-> arg3 param 0))
|
||||
(the-as attack-info (-> event param 1))
|
||||
proc
|
||||
(the-as touching-shapes-entry (-> event param 0))
|
||||
target-tube-hit
|
||||
)
|
||||
)
|
||||
(else
|
||||
(target-generic-event-handler arg0 arg1 arg2 arg3)
|
||||
(target-generic-event-handler proc arg1 event-type event)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -725,7 +725,7 @@
|
||||
(set! (-> self state-time) (-> *display* base-frame-counter))
|
||||
(logior! (-> self state-flags) (state-flags being-attacked))
|
||||
(set! (-> self game hit-time) (-> *display* base-frame-counter))
|
||||
(when (zero? (logand (-> arg1 mask) (attack-mask vector)))
|
||||
(when (not (logtest? (-> arg1 mask) (attack-mask vector)))
|
||||
(vector-!
|
||||
(-> arg1 vector)
|
||||
(vector+float*! (new 'stack-no-clear 'vector) (-> self tube foretube) (-> self tube downtube) 20480.0)
|
||||
@@ -753,7 +753,7 @@
|
||||
)
|
||||
(when (and (logtest? (-> arg1 mask) (attack-mask mode))
|
||||
(= (-> arg1 mode) 'darkeco)
|
||||
(zero? (logand (-> arg1 mask) (attack-mask shove-up)))
|
||||
(not (logtest? (-> arg1 mask) (attack-mask shove-up)))
|
||||
)
|
||||
(set! (-> arg1 shove-up) 12288.0)
|
||||
(logior! (-> arg1 mask) (attack-mask shove-up))
|
||||
@@ -838,7 +838,7 @@
|
||||
(until (ja-done? 0)
|
||||
(compute-alignment! (-> self align))
|
||||
(let ((gp-2 (new 'stack-no-clear 'vector)))
|
||||
(when (zero? (logand (-> self align flags) (align-flags disabled)))
|
||||
(when (not (logtest? (-> self align flags) (align-flags disabled)))
|
||||
(vector-matrix*! gp-2 (the-as vector (-> self align delta)) (-> self control unknown-matrix01))
|
||||
(vector-float*! (-> self control transv) gp-2 (-> *display* frames-per-second))
|
||||
)
|
||||
@@ -952,13 +952,13 @@
|
||||
|
||||
(defstate slide-control-ride (slide-control)
|
||||
:virtual #t
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('end-mode)
|
||||
(go-virtual slide-control-watch)
|
||||
)
|
||||
(('update)
|
||||
(let* ((s4-0 arg0)
|
||||
(let* ((s4-0 proc)
|
||||
(gp-0 (if (and (nonzero? s4-0) (type-type? (-> s4-0 type) process-drawable))
|
||||
s4-0
|
||||
)
|
||||
@@ -967,10 +967,10 @@
|
||||
(if gp-0
|
||||
(find-target-point (-> (the-as process-drawable gp-0) root trans))
|
||||
)
|
||||
(set! (-> (the-as vector (-> arg3 param 0)) quad) (-> self trans quad))
|
||||
(set! (-> (the-as vector (-> arg3 param 1)) quad) (-> self rot quad))
|
||||
(set! (-> (the-as vector (-> arg3 param 2)) quad) (-> self side quad))
|
||||
(eval-path-curve-div! (-> self path) (the-as vector (-> arg3 param 3)) (+ 0.2 (-> self pos)) 'interp)
|
||||
(set! (-> (the-as vector (-> event param 0)) quad) (-> self trans quad))
|
||||
(set! (-> (the-as vector (-> event param 1)) quad) (-> self rot quad))
|
||||
(set! (-> (the-as vector (-> event param 2)) quad) (-> self side quad))
|
||||
(eval-path-curve-div! (-> self path) (the-as vector (-> event param 3)) (+ 0.2 (-> self pos)) 'interp)
|
||||
(if (>= (-> self pos) (+ -0.2 (the float (+ (-> self path curve num-cverts) -1))))
|
||||
(send-event gp-0 'end-mode)
|
||||
)
|
||||
@@ -1017,7 +1017,3 @@
|
||||
(go (method-of-object obj slide-control-watch))
|
||||
(none)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -90,8 +90,8 @@
|
||||
)
|
||||
|
||||
(defstate billy-snack-idle (billy-snack)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('eat)
|
||||
(go billy-snack-eat)
|
||||
)
|
||||
@@ -474,23 +474,23 @@
|
||||
)
|
||||
|
||||
(defstate billy-done (billy)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(let ((v1-0 arg2))
|
||||
(the-as object (when (= v1-0 'billy-rat-needs-destination)
|
||||
(let* ((gp-0 arg0)
|
||||
(v1-2 (if (and (nonzero? gp-0) (type-type? (-> gp-0 type) billy-rat))
|
||||
gp-0
|
||||
)
|
||||
)
|
||||
)
|
||||
(when v1-2
|
||||
(set! (-> (the-as billy-rat v1-2) dest-type) (the-as uint 1))
|
||||
(get-random-point (-> self path-waypts) (-> (the-as billy-rat v1-2) destination))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(the-as object (case event-type
|
||||
(('billy-rat-needs-destination)
|
||||
(let* ((gp-0 proc)
|
||||
(v1-2 (if (and (nonzero? gp-0) (type-type? (-> gp-0 type) billy-rat))
|
||||
gp-0
|
||||
)
|
||||
)
|
||||
)
|
||||
(when v1-2
|
||||
(set! (-> (the-as billy-rat v1-2) dest-type) (the-as uint 1))
|
||||
(get-random-point (-> self path-waypts) (-> (the-as billy-rat v1-2) destination))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
:enter (behavior ()
|
||||
(init!
|
||||
@@ -761,8 +761,8 @@
|
||||
)
|
||||
|
||||
(defstate billy-playing (billy)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('billy-rat-die)
|
||||
(+! (-> self num-rats) -1)
|
||||
(let* ((f0-2 (rand-float-gen))
|
||||
@@ -794,7 +794,7 @@
|
||||
)
|
||||
)
|
||||
(('billy-rat-needs-destination)
|
||||
(let* ((s5-0 arg0)
|
||||
(let* ((s5-0 proc)
|
||||
(gp-0 (if (and (nonzero? s5-0) (type-type? (-> s5-0 type) billy-rat))
|
||||
(the-as billy-rat s5-0)
|
||||
)
|
||||
@@ -869,10 +869,7 @@
|
||||
(+! (-> (the-as billy-snack s5-1) num-rats) 1)
|
||||
(set! (-> gp-0 dest-type) (the-as uint 2))
|
||||
(set! (-> gp-0 destination quad) (-> (the-as billy-snack s5-1) root trans quad))
|
||||
(let ((f0-8 (+ 6799.36 (-> gp-0 destination x))))
|
||||
(set! (-> gp-0 destination x) f0-8)
|
||||
f0-8
|
||||
)
|
||||
(set! (-> gp-0 destination x) (+ 6799.36 (-> gp-0 destination x)))
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -1095,7 +1092,7 @@
|
||||
(defmethod target-above-threshold? billy ((obj billy))
|
||||
(the-as
|
||||
symbol
|
||||
(and *target* (zero? (logand (-> *target* control root-prim prim-core action) (collide-action ca-14))))
|
||||
(and *target* (not (logtest? (-> *target* control root-prim prim-core action) (collide-action ca-14))))
|
||||
)
|
||||
)
|
||||
|
||||
@@ -1117,7 +1114,3 @@
|
||||
(dummy-42 obj)
|
||||
(none)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -87,14 +87,14 @@
|
||||
(-> *setting-control* current play-hints)
|
||||
(and (< 0.0 (-> *setting-control* current dialog-volume))
|
||||
(let ((a0-3 (entity-actor-lookup (-> self entity) 'alt-actor 0)))
|
||||
(or (not a0-3) (zero? (logand (-> a0-3 extra perm status) (entity-perm-status dead))))
|
||||
(or (not a0-3) (not (logtest? (-> a0-3 extra perm status) (entity-perm-status dead))))
|
||||
)
|
||||
)
|
||||
)
|
||||
(when (!= (-> self index) 6)
|
||||
(while (and *target*
|
||||
(logtest? (-> *target* control unknown-surface00 flags) (surface-flags jump))
|
||||
(zero? (logand (-> *target* control status) (cshape-moving-flags onsurf)))
|
||||
(not (logtest? (-> *target* control status) (cshape-moving-flags onsurf)))
|
||||
)
|
||||
(suspend)
|
||||
)
|
||||
@@ -140,13 +140,7 @@
|
||||
(let ((v1-61 (-> self index)))
|
||||
(cond
|
||||
((zero? v1-61)
|
||||
(level-hint-spawn
|
||||
(game-text-id training-money)
|
||||
"asstvb41"
|
||||
(the-as entity #f)
|
||||
*entity-pool*
|
||||
(game-task none)
|
||||
)
|
||||
(level-hint-spawn (game-text-id training-money) "asstvb41" (the-as entity #f) *entity-pool* (game-task none))
|
||||
(process-spawn pov-camera (-> self entity extra trans) *training-cam-sg* "orbcam" 0 #f '() :to self)
|
||||
)
|
||||
((= v1-61 1)
|
||||
@@ -420,7 +414,7 @@
|
||||
|
||||
(defpartgroup group-scarecrow-explode
|
||||
:id 143
|
||||
:duration 15
|
||||
:duration (seconds 0.05)
|
||||
:bounds (static-bspherem 0 0 0 1)
|
||||
:parts ((sp-item 2912) (sp-item 2913) (sp-item 2914) (sp-item 2915) (sp-item 2916))
|
||||
)
|
||||
@@ -568,14 +562,14 @@
|
||||
|
||||
(defpartgroup group-scarecrow-joint-explode
|
||||
:id 144
|
||||
:duration 15
|
||||
:duration (seconds 0.05)
|
||||
:bounds (static-bspherem 0 0 0 1)
|
||||
:parts ((sp-item 2912))
|
||||
)
|
||||
|
||||
(defpartgroup group-scarecrow-hit
|
||||
:id 145
|
||||
:duration 15
|
||||
:duration (seconds 0.05)
|
||||
:bounds (static-bspherem 0 0 0 1)
|
||||
:parts ((sp-item 2913))
|
||||
)
|
||||
@@ -624,98 +618,96 @@
|
||||
|
||||
(defstate idle (scarecrow-a)
|
||||
:virtual #t
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(let ((v1-0 arg2))
|
||||
(the-as
|
||||
object
|
||||
(cond
|
||||
((= v1-0 'attack)
|
||||
(let* ((s3-0 (-> arg3 param 2))
|
||||
(s4-0 (get-task-control (game-task training-gimmie)))
|
||||
(v1-2 (get-reminder s4-0 0))
|
||||
)
|
||||
(when (!= s3-0 (-> self incomming-attack-id))
|
||||
(set! (-> self incomming-attack-id) s3-0)
|
||||
(cond
|
||||
((= (-> self type) scarecrow-b)
|
||||
)
|
||||
((and (= (-> arg3 param 1) 'spin) (zero? v1-2))
|
||||
(save-reminder s4-0 1 0)
|
||||
1
|
||||
)
|
||||
((and (= (-> arg3 param 1) 'punch) (= v1-2 1))
|
||||
(save-reminder s4-0 2 0)
|
||||
2
|
||||
)
|
||||
((zero? v1-2)
|
||||
)
|
||||
((= v1-2 1)
|
||||
)
|
||||
)
|
||||
(let* ((s4-1 arg0)
|
||||
(v1-14 (if (and (nonzero? s4-1) (type-type? (-> s4-1 type) process-drawable))
|
||||
s4-1
|
||||
)
|
||||
)
|
||||
(f30-0
|
||||
(cond
|
||||
(v1-14
|
||||
(let ((s4-2 (-> self root-override))
|
||||
(s2-0 (-> (the-as process-drawable v1-14) root trans))
|
||||
)
|
||||
(deg-diff (y-angle s4-2) (vector-y-angle (vector-! (new 'stack-no-clear 'vector) s2-0 (-> s4-2 trans))))
|
||||
)
|
||||
)
|
||||
(else
|
||||
0.0
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(the-as
|
||||
object
|
||||
(case event-type
|
||||
(('attack)
|
||||
(let* ((s3-0 (-> event param 2))
|
||||
(s4-0 (get-task-control (game-task training-gimmie)))
|
||||
(v1-2 (get-reminder s4-0 0))
|
||||
)
|
||||
(when (!= s3-0 (-> self incomming-attack-id))
|
||||
(set! (-> self incomming-attack-id) s3-0)
|
||||
(cond
|
||||
((= (-> self type) scarecrow-b)
|
||||
)
|
||||
((and (= (-> event param 1) 'spin) (zero? v1-2))
|
||||
(save-reminder s4-0 1 0)
|
||||
1
|
||||
)
|
||||
((and (= (-> event param 1) 'punch) (= v1-2 1))
|
||||
(save-reminder s4-0 2 0)
|
||||
2
|
||||
)
|
||||
((zero? v1-2)
|
||||
)
|
||||
((= v1-2 1)
|
||||
)
|
||||
)
|
||||
(let* ((s4-1 proc)
|
||||
(v1-14 (if (and (nonzero? s4-1) (type-type? (-> s4-1 type) process-drawable))
|
||||
s4-1
|
||||
)
|
||||
)
|
||||
(f30-0
|
||||
(cond
|
||||
(v1-14
|
||||
(let ((s4-2 (-> self root-override))
|
||||
(s2-0 (-> (the-as process-drawable v1-14) root trans))
|
||||
)
|
||||
(deg-diff (y-angle s4-2) (vector-y-angle (vector-! (new 'stack-no-clear 'vector) s2-0 (-> s4-2 trans))))
|
||||
)
|
||||
)
|
||||
(else
|
||||
0.0
|
||||
)
|
||||
)
|
||||
(a0-24 ((method-of-type touching-shapes-entry prims-touching?)
|
||||
(the-as touching-shapes-entry (-> arg3 param 0))
|
||||
(the-as collide-shape-moving (-> self root-override))
|
||||
(the-as uint -1)
|
||||
)
|
||||
)
|
||||
)
|
||||
(go-virtual
|
||||
hit
|
||||
f30-0
|
||||
(if a0-24
|
||||
(get-middle-of-bsphere-overlap a0-24 (-> self intersection))
|
||||
(target-pos 0)
|
||||
)
|
||||
(the-as
|
||||
symbol
|
||||
(and ((method-of-type touching-shapes-entry prims-touching?)
|
||||
(the-as touching-shapes-entry (-> arg3 param 0))
|
||||
(the-as collide-shape-moving (-> self root-override))
|
||||
(the-as uint 2)
|
||||
(a0-24 ((method-of-type touching-shapes-entry prims-touching?)
|
||||
(the-as touching-shapes-entry (-> event param 0))
|
||||
(the-as collide-shape-moving (-> self root-override))
|
||||
(the-as uint -1)
|
||||
)
|
||||
)
|
||||
(or (= (-> self type) scarecrow-a)
|
||||
(and (= (-> arg0 type) target)
|
||||
(logtest? (-> (the-as target arg0) control unknown-surface00 flags) (surface-flags jump))
|
||||
(zero? (logand (-> (the-as target arg0) control status) (cshape-moving-flags onsurf)))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(go-virtual
|
||||
hit
|
||||
f30-0
|
||||
(if a0-24
|
||||
(get-middle-of-bsphere-overlap a0-24 (-> self intersection))
|
||||
(target-pos 0)
|
||||
)
|
||||
(the-as
|
||||
symbol
|
||||
(and ((method-of-type touching-shapes-entry prims-touching?)
|
||||
(the-as touching-shapes-entry (-> event param 0))
|
||||
(the-as collide-shape-moving (-> self root-override))
|
||||
(the-as uint 2)
|
||||
)
|
||||
(or (= (-> self type) scarecrow-a)
|
||||
(and (= (-> proc type) target)
|
||||
(logtest? (-> (the-as target proc) control unknown-surface00 flags) (surface-flags jump))
|
||||
(not (logtest? (-> (the-as target proc) control status) (cshape-moving-flags onsurf)))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
((= v1-0 'touch)
|
||||
(send-shove-back
|
||||
(-> self root-override)
|
||||
arg0
|
||||
(the-as touching-shapes-entry (-> arg3 param 0))
|
||||
0.7
|
||||
6144.0
|
||||
16384.0
|
||||
)
|
||||
)
|
||||
(('touch)
|
||||
(send-shove-back
|
||||
(-> self root-override)
|
||||
proc
|
||||
(the-as touching-shapes-entry (-> event param 0))
|
||||
0.7
|
||||
6144.0
|
||||
16384.0
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -998,7 +990,3 @@
|
||||
(go (method-of-object obj idle))
|
||||
(none)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -219,7 +219,7 @@
|
||||
)
|
||||
(when (and (< (vector-vector-xz-distance s5-1 (-> *target* control trans)) 18432.0)
|
||||
(and (not (and (logtest? (-> *target* control unknown-surface00 flags) (surface-flags jump))
|
||||
(zero? (logand (-> *target* control status) (cshape-moving-flags onsurf)))
|
||||
(not (logtest? (-> *target* control status) (cshape-moving-flags onsurf)))
|
||||
)
|
||||
)
|
||||
(and (< (+ -40960.0 (-> s5-1 y)) (-> *target* control trans y))
|
||||
@@ -419,10 +419,10 @@
|
||||
|
||||
(defstate idle (pistons)
|
||||
:virtual #t
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('update)
|
||||
(go-virtual active (process->handle arg0) #f)
|
||||
(go-virtual active (process->handle proc) #f)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -494,17 +494,17 @@
|
||||
|
||||
(defstate idle (gondolacables)
|
||||
:virtual #t
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(let ((v1-0 arg2))
|
||||
(the-as object (when (= v1-0 'update)
|
||||
(process-entity-status! self (entity-perm-status complete) #t)
|
||||
(let ((v0-0 1))
|
||||
(set! (-> self draw mgeo effect 0 effect-bits) (the-as uint v0-0))
|
||||
v0-0
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(the-as object (case event-type
|
||||
(('update)
|
||||
(process-entity-status! self (entity-perm-status complete) #t)
|
||||
(let ((v0-0 1))
|
||||
(set! (-> self draw mgeo effect 0 effect-bits) (the-as uint v0-0))
|
||||
v0-0
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
:code (behavior ()
|
||||
(loop
|
||||
@@ -535,7 +535,3 @@
|
||||
(go (method-of-object obj idle))
|
||||
(none)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -95,8 +95,8 @@
|
||||
|
||||
(defstate idle (warp-gate)
|
||||
:virtual #t
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('hide)
|
||||
(go-virtual hidden)
|
||||
)
|
||||
@@ -110,8 +110,8 @@
|
||||
(and (>= (-> self level-slot) 0)
|
||||
(not (movie?))
|
||||
(not (level-hint-displayed?))
|
||||
(zero? (logand (-> *target* control root-prim prim-core action) (collide-action ca-7 ca-8 ca-9 ca-12 ca-13 ca-14))
|
||||
)
|
||||
(not (logtest? (-> *target* control root-prim prim-core action) (collide-action ca-7 ca-8 ca-9 ca-12 ca-13 ca-14))
|
||||
)
|
||||
(let* ((v1-16 (-> self root))
|
||||
(a1-2 (-> *target* control trans))
|
||||
(f0-1 (vector-y-angle (vector-! (new 'stack-no-clear 'vector) a1-2 (-> v1-16 trans))))
|
||||
@@ -635,8 +635,8 @@
|
||||
|
||||
(defstate basebutton-up-idle (warp-gate-switch)
|
||||
:virtual #t
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('touch 'attack)
|
||||
(when (pressable? self)
|
||||
(TODO-RENAME-29 self (-> self event-going-down) (-> self notify-actor))
|
||||
@@ -644,10 +644,10 @@
|
||||
)
|
||||
)
|
||||
(('hide)
|
||||
(send-event (handle->process (-> self warp)) arg2)
|
||||
(send-event (handle->process (-> self warp)) event-type)
|
||||
)
|
||||
(else
|
||||
((-> (method-of-type basebutton basebutton-up-idle) event) arg0 arg1 arg2 arg3)
|
||||
((-> (method-of-type basebutton basebutton-up-idle) event) proc arg1 event-type event)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -754,13 +754,13 @@
|
||||
|
||||
(defstate basebutton-down-idle (warp-gate-switch)
|
||||
:virtual #t
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('hide)
|
||||
(send-event (handle->process (-> self warp)) arg2)
|
||||
(send-event (handle->process (-> self warp)) event-type)
|
||||
)
|
||||
(else
|
||||
((-> (method-of-type basebutton basebutton-down-idle) event) arg0 arg1 arg2 arg3)
|
||||
((-> (method-of-type basebutton basebutton-down-idle) event) proc arg1 event-type event)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -953,7 +953,7 @@
|
||||
)
|
||||
(while (and *target*
|
||||
(logtest? (-> *target* control unknown-surface00 flags) (surface-flags jump))
|
||||
(zero? (logand (-> *target* control status) (cshape-moving-flags onsurf)))
|
||||
(not (logtest? (-> *target* control status) (cshape-moving-flags onsurf)))
|
||||
)
|
||||
(suspend)
|
||||
)
|
||||
@@ -1149,7 +1149,3 @@
|
||||
(go (method-of-object obj idle))
|
||||
(none)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
)
|
||||
:trans (behavior ()
|
||||
(bot-method-223 self #f)
|
||||
(when (not (logtest? (-> self focus-status) (focus-status grabbed)))
|
||||
(when (not (focus-test? self grabbed))
|
||||
(cond
|
||||
((bot-method-214 self)
|
||||
(go-hostile self)
|
||||
@@ -368,7 +368,7 @@
|
||||
(none)
|
||||
)
|
||||
:trans (behavior ()
|
||||
(if (logtest? (-> self focus-status) (focus-status grabbed))
|
||||
(if (focus-test? self grabbed)
|
||||
(go-virtual waiting-idle)
|
||||
)
|
||||
(bot-method-223 self #f)
|
||||
|
||||
@@ -1148,7 +1148,7 @@
|
||||
(let ((f0-4 (ja-aframe-num 0)))
|
||||
(cond
|
||||
((>= f0-4 22.0)
|
||||
(when (logtest? (-> obj focus-status) (focus-status dangerous))
|
||||
(when (focus-test? obj dangerous)
|
||||
(if (logtest? (-> obj enemy-flags) (enemy-flag check-water))
|
||||
(logior! (-> obj focus-status) (focus-status dangerous))
|
||||
(logclear! (-> obj focus-status) (focus-status dangerous))
|
||||
@@ -1156,7 +1156,7 @@
|
||||
)
|
||||
)
|
||||
((>= f0-4 16.0)
|
||||
(when (not (logtest? (-> obj focus-status) (focus-status dangerous)))
|
||||
(when (not (focus-test? obj dangerous))
|
||||
(logior! (-> obj focus-status) (focus-status dangerous))
|
||||
(let* ((v1-42 *game-info*)
|
||||
(a0-34 (+ (-> v1-42 attack-id) 1))
|
||||
@@ -1179,7 +1179,7 @@
|
||||
(let ((f0-5 (ja-aframe-num 0)))
|
||||
(cond
|
||||
((>= f0-5 32.0)
|
||||
(when (logtest? (-> obj focus-status) (focus-status dangerous))
|
||||
(when (focus-test? obj dangerous)
|
||||
(if (logtest? (-> obj enemy-flags) (enemy-flag check-water))
|
||||
(logior! (-> obj focus-status) (focus-status dangerous))
|
||||
(logclear! (-> obj focus-status) (focus-status dangerous))
|
||||
@@ -1187,7 +1187,7 @@
|
||||
)
|
||||
)
|
||||
((>= f0-5 25.0)
|
||||
(when (not (logtest? (-> obj focus-status) (focus-status dangerous)))
|
||||
(when (not (focus-test? obj dangerous))
|
||||
(logior! (-> obj focus-status) (focus-status dangerous))
|
||||
(let* ((v1-62 *game-info*)
|
||||
(a0-47 (+ (-> v1-62 attack-id) 1))
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
(none)
|
||||
)
|
||||
:trans (behavior ()
|
||||
(if (and (not (logtest? (-> self focus-status) (focus-status grabbed)))
|
||||
(if (and (not (focus-test? self grabbed))
|
||||
(not (outside-spot-radius? self (the-as bot-spot #f) (the-as vector #f) #f))
|
||||
)
|
||||
(go-virtual traveling)
|
||||
@@ -89,7 +89,7 @@
|
||||
)
|
||||
:trans (behavior ()
|
||||
(bot-method-223 self #f)
|
||||
(when (not (logtest? (-> self focus-status) (focus-status grabbed)))
|
||||
(when (not (focus-test? self grabbed))
|
||||
(cond
|
||||
((bot-method-214 self)
|
||||
(go-hostile self)
|
||||
@@ -192,7 +192,7 @@
|
||||
)
|
||||
:trans (behavior ()
|
||||
(bot-method-223 self #f)
|
||||
(when (not (logtest? (-> self focus-status) (focus-status grabbed)))
|
||||
(when (not (focus-test? self grabbed))
|
||||
(cond
|
||||
((bot-method-214 self)
|
||||
(go-hostile self)
|
||||
@@ -323,7 +323,7 @@
|
||||
)
|
||||
:trans (behavior ()
|
||||
(bot-method-223 self #f)
|
||||
(when (not (logtest? (-> self focus-status) (focus-status grabbed)))
|
||||
(when (not (focus-test? self grabbed))
|
||||
(cond
|
||||
((bot-method-214 self)
|
||||
(go-hostile self)
|
||||
@@ -521,7 +521,7 @@
|
||||
)
|
||||
:trans (behavior ()
|
||||
(bot-method-223 self #f)
|
||||
(when (not (logtest? (-> self focus-status) (focus-status grabbed)))
|
||||
(when (not (focus-test? self grabbed))
|
||||
(cond
|
||||
((bot-method-214 self)
|
||||
(go-hostile self)
|
||||
@@ -674,7 +674,7 @@
|
||||
)
|
||||
:trans (behavior ()
|
||||
(bot-method-223 self #f)
|
||||
(when (not (logtest? (-> self focus-status) (focus-status grabbed)))
|
||||
(when (not (focus-test? self grabbed))
|
||||
(if (bot-method-214 self)
|
||||
(go-hostile self)
|
||||
)
|
||||
@@ -857,7 +857,7 @@
|
||||
)
|
||||
:trans (behavior ()
|
||||
(bot-method-223 self #f)
|
||||
(when (not (logtest? (-> self focus-status) (focus-status grabbed)))
|
||||
(when (not (focus-test? self grabbed))
|
||||
(cond
|
||||
((bot-method-214 self)
|
||||
(go-hostile self)
|
||||
@@ -1244,7 +1244,7 @@
|
||||
:frame-num 0.0
|
||||
)
|
||||
(until (ja-done? 0)
|
||||
(when (and (logtest? (-> self focus-status) (focus-status dangerous)) (< f30-0 (ja-aframe-num 0)))
|
||||
(when (and (focus-test? self dangerous) (< f30-0 (ja-aframe-num 0)))
|
||||
(if (logtest? (-> self enemy-flags) (enemy-flag check-water))
|
||||
(logior! (-> self focus-status) (focus-status dangerous))
|
||||
(logclear! (-> self focus-status) (focus-status dangerous))
|
||||
@@ -1728,13 +1728,13 @@
|
||||
(if (not (logtest? s5-0 1))
|
||||
(logclear! (-> self bot-flags) (bot-flags bf24))
|
||||
)
|
||||
(if (and (logtest? s5-0 1) (zero? (logand (bot-flags bf24) (-> self bot-flags))))
|
||||
(if (and (logtest? s5-0 1) (not (logtest? (bot-flags bf24) (-> self bot-flags))))
|
||||
(go-virtual sig-path-jump)
|
||||
)
|
||||
(if (logtest? s5-0 2)
|
||||
(go-virtual sig-path-shoot-jump)
|
||||
)
|
||||
(if (and (>= (- (-> self clock frame-counter) (-> self state-time)) (seconds 0.05)) (zero? (logand s5-0 4)))
|
||||
(if (and (>= (- (-> self clock frame-counter) (-> self state-time)) (seconds 0.05)) (not (logtest? s5-0 4)))
|
||||
(go-virtual sig-path-jump-land)
|
||||
)
|
||||
)
|
||||
@@ -1799,7 +1799,7 @@
|
||||
(if (not (logtest? s5-0 1))
|
||||
(logclear! (-> self bot-flags) (bot-flags bf24))
|
||||
)
|
||||
(if (and (logtest? s5-0 1) (zero? (logand (bot-flags bf24) (-> self bot-flags))))
|
||||
(if (and (logtest? s5-0 1) (not (logtest? (bot-flags bf24) (-> self bot-flags))))
|
||||
(go-virtual sig-path-jump)
|
||||
)
|
||||
(if (logtest? s5-0 2)
|
||||
@@ -1870,13 +1870,13 @@
|
||||
(if (not (logtest? s5-0 2))
|
||||
(logclear! (-> self bot-flags) (bot-flags bf24))
|
||||
)
|
||||
(if (and (logtest? s5-0 2) (zero? (logand (bot-flags bf24) (-> self bot-flags))))
|
||||
(if (and (logtest? s5-0 2) (not (logtest? (bot-flags bf24) (-> self bot-flags))))
|
||||
(go-virtual sig-path-shoot-jump)
|
||||
)
|
||||
(if (and (logtest? s5-0 1) (logtest? (bot-flags bf25) (-> self bot-flags)))
|
||||
(go-virtual sig-path-jump)
|
||||
)
|
||||
(if (and (>= (- (-> self clock frame-counter) (-> self state-time)) (seconds 0.05)) (zero? (logand s5-0 4)))
|
||||
(if (and (>= (- (-> self clock frame-counter) (-> self state-time)) (seconds 0.05)) (not (logtest? s5-0 4)))
|
||||
(go-virtual sig-path-shoot-jump-land)
|
||||
)
|
||||
)
|
||||
@@ -1946,7 +1946,7 @@
|
||||
(if (not (logtest? s5-0 2))
|
||||
(logclear! (-> self bot-flags) (bot-flags bf24))
|
||||
)
|
||||
(if (and (logtest? s5-0 2) (zero? (logand (bot-flags bf24) (-> self bot-flags))))
|
||||
(if (and (logtest? s5-0 2) (not (logtest? (bot-flags bf24) (-> self bot-flags))))
|
||||
(go-virtual sig-path-shoot-jump)
|
||||
)
|
||||
(if (logtest? s5-0 1)
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
(cond
|
||||
((and a1-10
|
||||
(attacked-by-player? arg0 (the-as process-focusable a1-10))
|
||||
(zero? (logand (-> arg0 focus-status) (focus-status grabbed)))
|
||||
(not (logtest? (-> arg0 focus-status) (focus-status grabbed)))
|
||||
)
|
||||
(get-task-by-type (-> arg0 ai-ctrl) sigt-fight-focus arg0)
|
||||
(ai-task-control-method-10 (-> arg0 ai-ctrl) arg0)
|
||||
@@ -66,7 +66,7 @@
|
||||
(let ((a1-1 (handle->process (-> arg0 focus handle))))
|
||||
(if (and a1-1
|
||||
(attacked-by-player? arg0 (the-as process-focusable a1-1))
|
||||
(zero? (logand (-> arg0 focus-status) (focus-status grabbed)))
|
||||
(not (logtest? (-> arg0 focus-status) (focus-status grabbed)))
|
||||
)
|
||||
(logior! (-> arg0 bot-flags) (bot-flags bf00))
|
||||
(ai-task-control-method-14 (-> arg0 ai-ctrl) obj arg0)
|
||||
@@ -90,7 +90,7 @@
|
||||
(let ((a1-4 (handle->process (-> arg0 focus handle))))
|
||||
(when (and a1-4
|
||||
(attacked-by-player? arg0 (the-as process-focusable a1-4))
|
||||
(zero? (logand (-> arg0 focus-status) (focus-status grabbed)))
|
||||
(not (logtest? (-> arg0 focus-status) (focus-status grabbed)))
|
||||
)
|
||||
(get-task-by-type (-> arg0 ai-ctrl) sigt-fight-focus arg0)
|
||||
(ai-task-control-method-10 (-> arg0 ai-ctrl) arg0)
|
||||
@@ -237,7 +237,7 @@
|
||||
(let ((a1-6 (handle->process (-> arg0 focus handle))))
|
||||
(when (and a1-6
|
||||
(attacked-by-player? arg0 (the-as process-focusable a1-6))
|
||||
(zero? (logand (-> arg0 focus-status) (focus-status grabbed)))
|
||||
(not (logtest? (-> arg0 focus-status) (focus-status grabbed)))
|
||||
)
|
||||
(get-task-by-type (-> arg0 ai-ctrl) sigt-fight-focus arg0)
|
||||
(ai-task-control-method-10 (-> arg0 ai-ctrl) arg0)
|
||||
@@ -407,7 +407,7 @@
|
||||
(let ((a1-14 (handle->process (-> (the-as sig arg0) focus handle))))
|
||||
(when (and a1-14
|
||||
(attacked-by-player? (the-as sig arg0) (the-as process-focusable a1-14))
|
||||
(zero? (logand (-> (the-as sig arg0) focus-status) (focus-status grabbed)))
|
||||
(not (logtest? (-> (the-as sig arg0) focus-status) (focus-status grabbed)))
|
||||
)
|
||||
(get-task-by-type (-> (the-as sig arg0) ai-ctrl) sigt-fight-focus (the-as sig arg0))
|
||||
(ai-task-control-method-10 (-> (the-as sig arg0) ai-ctrl) (the-as sig arg0))
|
||||
|
||||
@@ -362,26 +362,25 @@
|
||||
"Handles various events for the enemy
|
||||
@TODO - unsure if there is a pattern for the events and this should have a more specific name"
|
||||
(let ((v1-0 arg2))
|
||||
(the-as object (cond
|
||||
((= v1-0 'untrigger)
|
||||
(sig-plasma-method-11 (-> obj plasma) #t)
|
||||
)
|
||||
((= v1-0 'sig-path)
|
||||
(when (and (not (logtest? (-> obj focus-status) (focus-status dead)))
|
||||
(nonzero? (-> obj hit-points))
|
||||
(zero? (-> obj fated-time))
|
||||
)
|
||||
(let ((a1-2 (-> arg3 param 0)))
|
||||
(sig-method-249 obj (the-as sig-path a1-2))
|
||||
)
|
||||
(go (method-of-object obj sig-path-run))
|
||||
)
|
||||
)
|
||||
(else
|
||||
((method-of-type bot general-event-handler) obj arg0 arg1 arg2 arg3)
|
||||
)
|
||||
)
|
||||
)
|
||||
(the-as
|
||||
object
|
||||
(cond
|
||||
((= v1-0 'untrigger)
|
||||
(sig-plasma-method-11 (-> obj plasma) #t)
|
||||
)
|
||||
((= v1-0 'sig-path)
|
||||
(when (and (not (focus-test? obj dead)) (nonzero? (-> obj hit-points)) (zero? (-> obj fated-time)))
|
||||
(let ((a1-2 (-> arg3 param 0)))
|
||||
(sig-method-249 obj (the-as sig-path a1-2))
|
||||
)
|
||||
(go (method-of-object obj sig-path-run))
|
||||
)
|
||||
)
|
||||
(else
|
||||
((method-of-type bot general-event-handler) obj arg0 arg1 arg2 arg3)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -706,7 +705,7 @@
|
||||
(and (or (and (logtest? (-> obj bot-flags) (bot-flags attacked)) (= (-> obj focus-info fproc type) target))
|
||||
(and (>= 40960.0 (-> obj focus-info bullseye-xz-dist)) (= (-> obj focus-info los) 1))
|
||||
)
|
||||
(zero? (logand (bot-flags bf19) (-> obj bot-flags)))
|
||||
(not (logtest? (bot-flags bf19) (-> obj bot-flags)))
|
||||
)
|
||||
)
|
||||
|
||||
@@ -1146,7 +1145,7 @@
|
||||
((and (-> obj next-state) (= (-> obj next-state name) 'failed))
|
||||
(set-vector! arg0 0.0 4096.0 28672.0 1.0)
|
||||
)
|
||||
((logtest? (-> obj focus-status) (focus-status under-water))
|
||||
((focus-test? obj under-water)
|
||||
(set-vector! arg0 0.0 12288.0 28672.0 1.0)
|
||||
)
|
||||
(else
|
||||
@@ -1156,7 +1155,7 @@
|
||||
(vector<-cspace+vector! arg0 (-> obj node-list data 2) arg0)
|
||||
(the-as
|
||||
meters
|
||||
(if (logtest? (-> obj focus-status) (focus-status under-water))
|
||||
(if (focus-test? obj under-water)
|
||||
(set! (-> arg0 y) (+ (get-water-height obj) (-> *setting-control* cam-current target-height)))
|
||||
)
|
||||
)
|
||||
|
||||
@@ -212,7 +212,7 @@
|
||||
(when (logtest? (water-flags touch-water) s3-0)
|
||||
(set! (-> obj enemy-flags) (logior (enemy-flag directed-ready) (-> obj enemy-flags)))
|
||||
(set! (-> obj water-surface-height) (-> s5-0 trans y))
|
||||
(when (not (logtest? (-> obj focus-status) (focus-status touch-water under-water)))
|
||||
(when (not (focus-test? obj touch-water under-water))
|
||||
(let ((s2-0 (new 'stack-no-clear 'vector)))
|
||||
(set! (-> s2-0 quad) (-> obj root-override2 trans quad))
|
||||
(set! (-> s2-0 y) (+ 409.6 (-> s5-0 trans y)))
|
||||
@@ -266,7 +266,7 @@
|
||||
(let* ((v1-32 (-> s4-0 root-prim prim-core))
|
||||
(f0-5 (+ (-> v1-32 world-sphere y) (-> v1-32 world-sphere w)))
|
||||
)
|
||||
(if (logtest? (-> obj focus-status) (focus-status under-water))
|
||||
(if (focus-test? obj under-water)
|
||||
(set! f0-5 (+ -819.2 f0-5))
|
||||
)
|
||||
(if (< f0-5 (-> s5-0 trans y))
|
||||
@@ -354,10 +354,10 @@
|
||||
(with-pp
|
||||
(when (or (>= (- (-> pp clock frame-counter) (-> obj hit-focus-time)) (seconds 2))
|
||||
(and (handle->process (-> obj focus handle))
|
||||
(zero? (logand (-> (the-as process-focusable (handle->process (-> obj focus handle))) focus-status)
|
||||
(not (logtest? (-> (the-as process-focusable (handle->process (-> obj focus handle))) focus-status)
|
||||
(focus-status disable dead ignore grabbed)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((v0-0 (logclear (-> obj enemy-flags) (enemy-flag look-at-focus))))
|
||||
@@ -403,7 +403,7 @@
|
||||
(let ((v0-0 (handle->process (-> obj focus handle))))
|
||||
(if (and v0-0
|
||||
(not (and v0-0
|
||||
(zero? (logand (-> (the-as process-focusable v0-0) focus-status) (focus-status disable dead ignore grabbed)))
|
||||
(not (logtest? (-> (the-as process-focusable v0-0) focus-status) (focus-status disable dead ignore grabbed)))
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -441,7 +441,7 @@
|
||||
(defmethod enemy-method-108 enemy ((obj enemy) (arg0 enemy) (arg1 event-message-block))
|
||||
(let ((s4-0 (the-as touching-shapes-entry (-> arg1 param 0))))
|
||||
(when (and s4-0
|
||||
(and (logtest? (-> obj incoming penetrate-using) 4096) (zero? (logand (-> obj incoming penetrate-using) 32)))
|
||||
(and (logtest? (-> obj incoming penetrate-using) 4096) (not (logtest? (-> obj incoming penetrate-using) 32)))
|
||||
(begin
|
||||
(let ((s3-0 (-> s4-0 head)))
|
||||
(while s3-0
|
||||
@@ -674,7 +674,7 @@
|
||||
(when (enemy-method-53 obj (the-as process-focusable s5-0))
|
||||
(let ((v1-10 (handle->process (-> obj focus handle))))
|
||||
(when (or (= s5-0 v1-10) (and (not (logtest? (enemy-flag actor-pause-backup) (-> obj enemy-flags)))
|
||||
(or (not v1-10) (zero? (logand (-> obj focus flags) (enemy-flag lock-focus))))
|
||||
(or (not v1-10) (not (logtest? (-> obj focus flags) (enemy-flag lock-focus))))
|
||||
)
|
||||
)
|
||||
(enemy-method-63 obj (the-as process-focusable s5-0) (the-as enemy-aware #f))
|
||||
@@ -1169,7 +1169,7 @@
|
||||
(set! (-> obj mask) (logior (process-mask collectable) (-> obj mask)))
|
||||
(if (and (-> obj enemy-info move-to-ground)
|
||||
(not (logtest? (enemy-flag vulnerable-backup) (-> obj enemy-flags)))
|
||||
(zero? (logand (enemy-option ambush) (-> obj fact-info-override enemy-options)))
|
||||
(not (logtest? (enemy-option ambush) (-> obj fact-info-override enemy-options)))
|
||||
)
|
||||
(enemy-method-127 obj 40960.0 40960.0 #t (the-as collide-spec (-> obj gnd-collide)))
|
||||
)
|
||||
@@ -1337,10 +1337,10 @@ This commonly includes things such as:
|
||||
(when a1-0
|
||||
(let ((v1-4 (-> obj enemy-flags)))
|
||||
(cond
|
||||
((and a1-0 (zero? (logand (-> (the-as process-focusable a1-0) focus-status) (focus-status disable dead))))
|
||||
((and a1-0 (not (logtest? (-> (the-as process-focusable a1-0) focus-status) (focus-status disable dead))))
|
||||
(when (and (logtest? (enemy-flag trackable) v1-4)
|
||||
(not (logtest? (enemy-flag actor-pause-backup) v1-4))
|
||||
(zero? (logand (-> gp-0 flags) (enemy-flag lock-focus)))
|
||||
(not (logtest? (-> gp-0 flags) (enemy-flag lock-focus)))
|
||||
)
|
||||
(enemy-method-97 obj)
|
||||
(return #f)
|
||||
@@ -1396,7 +1396,7 @@ This commonly includes things such as:
|
||||
)
|
||||
)
|
||||
)
|
||||
(if (and a1-1 (and a1-1 (zero? (logand (-> a1-1 focus-status) (focus-status disable dead)))) (!= obj a1-1))
|
||||
(if (and a1-1 (and a1-1 (not (logtest? (-> a1-1 focus-status) (focus-status disable dead)))) (!= obj a1-1))
|
||||
(update-target-awareness! obj a1-1 gp-0)
|
||||
)
|
||||
)
|
||||
@@ -1423,7 +1423,7 @@ This commonly includes things such as:
|
||||
)
|
||||
)
|
||||
)
|
||||
(if (and a1-3 (and a1-3 (zero? (logand (-> a1-3 focus-status) (focus-status disable dead)))) (!= obj a1-3))
|
||||
(if (and a1-3 (and a1-3 (not (logtest? (-> a1-3 focus-status) (focus-status disable dead)))) (!= obj a1-3))
|
||||
(update-target-awareness! obj a1-3 gp-0)
|
||||
)
|
||||
)
|
||||
@@ -1449,7 +1449,7 @@ This commonly includes things such as:
|
||||
)
|
||||
)
|
||||
)
|
||||
(if (and a1-5 (and a1-5 (zero? (logand (-> a1-5 focus-status) (focus-status disable dead)))) (!= obj a1-5))
|
||||
(if (and a1-5 (and a1-5 (not (logtest? (-> a1-5 focus-status) (focus-status disable dead)))) (!= obj a1-5))
|
||||
(update-target-awareness! obj a1-5 gp-0)
|
||||
)
|
||||
)
|
||||
@@ -1495,7 +1495,7 @@ This commonly includes things such as:
|
||||
(if (< 1 (the-as int (-> obj focus aware)))
|
||||
(set! f0-1 (+ (the-as meters f0-1) (-> obj enemy-info notice-distance-delta)))
|
||||
)
|
||||
(when (or (< f30-0 f0-1) (zero? (logand (-> obj enemy-flags) (enemy-flag enable-on-notice))))
|
||||
(when (or (< f30-0 f0-1) (not (logtest? (-> obj enemy-flags) (enemy-flag enable-on-notice))))
|
||||
(set! s2-0 (in-aggro-range? obj arg0 (the-as vector #f)))
|
||||
(if s2-0
|
||||
(set! s3-1 #t)
|
||||
@@ -1716,7 +1716,7 @@ This commonly includes things such as:
|
||||
(when (!= (-> (the-as attack-info s2-0) id) (-> obj incoming attack-id))
|
||||
(cond
|
||||
((and (logtest? (-> obj enemy-flags) (enemy-flag enable-on-active))
|
||||
(zero? (logand (-> obj focus-status) (focus-status grabbed)))
|
||||
(not (logtest? (-> obj focus-status) (focus-status grabbed)))
|
||||
)
|
||||
(let* ((s1-0 obj)
|
||||
(s0-0 (method-of-object s1-0 enemy-method-106))
|
||||
@@ -1824,7 +1824,7 @@ This commonly includes things such as:
|
||||
((= arg2 'cue-chase)
|
||||
(when (and (> (-> obj hit-points) 0)
|
||||
(zero? (-> obj fated-time))
|
||||
(zero? (logand (-> obj focus-status) (focus-status grabbed)))
|
||||
(not (logtest? (-> obj focus-status) (focus-status grabbed)))
|
||||
)
|
||||
(let ((v1-162 (logtest? (enemy-flag alert) (-> obj enemy-flags))))
|
||||
(logclear! (-> obj enemy-flags) (enemy-flag enable-on-notice alert victory called-dying))
|
||||
@@ -1854,7 +1854,7 @@ This commonly includes things such as:
|
||||
((= arg2 'cue-wake)
|
||||
(when (and (> (-> obj hit-points) 0)
|
||||
(zero? (-> obj fated-time))
|
||||
(zero? (logand (-> obj focus-status) (focus-status grabbed)))
|
||||
(not (logtest? (-> obj focus-status) (focus-status grabbed)))
|
||||
)
|
||||
(logclear! (-> obj enemy-flags) (enemy-flag alert victory called-dying))
|
||||
(if (logtest? (enemy-option ambush) (-> obj fact-info-override enemy-options))
|
||||
@@ -1867,7 +1867,7 @@ This commonly includes things such as:
|
||||
((= arg2 'jump)
|
||||
(when (and (> (-> obj hit-points) 0)
|
||||
(zero? (-> obj fated-time))
|
||||
(zero? (logand (-> obj focus-status) (focus-status grabbed)))
|
||||
(not (logtest? (-> obj focus-status) (focus-status grabbed)))
|
||||
)
|
||||
(logclear! (-> obj mask) (process-mask actor-pause))
|
||||
(set! (-> obj jump-why) (-> arg3 param 0))
|
||||
@@ -1934,7 +1934,7 @@ This commonly includes things such as:
|
||||
(not (and (-> obj next-state) (= (-> obj next-state name) 'victory)))
|
||||
(> (-> obj hit-points) 0)
|
||||
(zero? (-> obj fated-time))
|
||||
(zero? (logand (-> obj focus-status) (focus-status grabbed)))
|
||||
(not (logtest? (-> obj focus-status) (focus-status grabbed)))
|
||||
)
|
||||
(go (method-of-object obj victory))
|
||||
)
|
||||
@@ -2061,8 +2061,8 @@ This commonly includes things such as:
|
||||
)
|
||||
(when (and s4-0 s3-0)
|
||||
(cond
|
||||
((and (logtest? (-> obj focus-status) (focus-status dangerous))
|
||||
(and s3-0 (zero? (logand (-> s3-0 focus-status) (focus-status disable dead ignore grabbed))))
|
||||
((and (focus-test? obj dangerous)
|
||||
(and s3-0 (not (logtest? (-> s3-0 focus-status) (focus-status disable dead ignore grabbed))))
|
||||
((method-of-type touching-shapes-entry prims-touching-action?)
|
||||
(the-as touching-shapes-entry s4-0)
|
||||
(-> obj root-override2)
|
||||
@@ -2090,7 +2090,7 @@ This commonly includes things such as:
|
||||
(collide-action no-standon)
|
||||
(collide-action)
|
||||
)
|
||||
(zero? (logand (-> obj root-override2 penetrated-by) (-> s3-0 root-override penetrate-using)))
|
||||
(not (logtest? (-> obj root-override2 penetrated-by) (-> s3-0 root-override penetrate-using)))
|
||||
)
|
||||
(if (send-shoves (-> obj root-override2) arg0 (the-as touching-shapes-entry s4-0) 0.7 6144.0 16384.0)
|
||||
(send-event obj 'bouncing-off arg0)
|
||||
@@ -2152,7 +2152,7 @@ This commonly includes things such as:
|
||||
(set! (-> self enemy-flags) (logior (enemy-flag directed) (-> self enemy-flags)))
|
||||
(let ((gp-0 (-> self root-override2)))
|
||||
(cond
|
||||
((logtest? (-> self focus-status) (focus-status under-water))
|
||||
((focus-test? self under-water)
|
||||
(enemy-method-47 self (-> gp-0 transv))
|
||||
)
|
||||
(else
|
||||
@@ -2189,7 +2189,7 @@ This commonly includes things such as:
|
||||
(defbehavior enemy-die-falling-post enemy ()
|
||||
(set! (-> self enemy-flags) (logior (enemy-flag directed) (-> self enemy-flags)))
|
||||
(let ((gp-0 (-> self root-override2)))
|
||||
(if (logtest? (-> self focus-status) (focus-status under-water))
|
||||
(if (focus-test? self under-water)
|
||||
(enemy-method-47 self (-> gp-0 transv))
|
||||
(vector-v++! (-> gp-0 transv) (compute-acc-due-to-gravity gp-0 (new-stack-vector0) 0.0))
|
||||
)
|
||||
@@ -3047,7 +3047,7 @@ This commonly includes things such as:
|
||||
)
|
||||
(when (not (logtest? (enemy-flag directed) (-> obj enemy-flags)))
|
||||
(let ((s5-0 (-> obj root-override2)))
|
||||
(if (logtest? (-> obj focus-status) (focus-status under-water))
|
||||
(if (focus-test? obj under-water)
|
||||
(enemy-method-47 obj (-> s5-0 transv))
|
||||
(+! (-> s5-0 transv y) (* (-> obj enemy-info movement-gravity) (-> pp clock seconds-per-frame)))
|
||||
)
|
||||
@@ -3067,7 +3067,7 @@ This commonly includes things such as:
|
||||
)
|
||||
)
|
||||
(logclear! (-> obj enemy-flags) (enemy-flag directed))
|
||||
(if (and (enemy-method-102 obj) (zero? (logand (-> obj focus-status) (focus-status dead))))
|
||||
(if (and (enemy-method-102 obj) (not (logtest? (-> obj focus-status) (focus-status dead))))
|
||||
(kill-prefer-falling obj)
|
||||
)
|
||||
(let ((s5-1 (-> obj root-override2))
|
||||
|
||||
@@ -454,7 +454,7 @@
|
||||
)
|
||||
:code (behavior ()
|
||||
(local-vars (v1-43 symbol))
|
||||
(let ((gp-1 (zero? (logand (-> self message flags) 2))))
|
||||
(let ((gp-1 (not (logtest? (-> self message flags) 2))))
|
||||
(while (or (and (nonzero? (-> self voice-id))
|
||||
(let ((v1-34 (get-status *gui-control* (-> self voice-id))))
|
||||
(or (= v1-34 (gui-status ready)) (= v1-34 (gui-status active)))
|
||||
|
||||
@@ -163,8 +163,7 @@
|
||||
)
|
||||
|
||||
|
||||
;; WARN: Failed store: (s.w! (+ v1-6 8) 0) at op 22
|
||||
;; WARN: Failed store: (s.w! (+ v1-6 12) 0) at op 23
|
||||
;; ERROR: Failed store: (s.w! (+ v1-6 8) 0) at op 22
|
||||
(defun cam-layout-print ((arg0 int) (arg1 int) (arg2 string))
|
||||
(with-dma-buffer-add-bucket ((s5-0 (-> *display* frames (-> *display* on-screen) debug-buf))
|
||||
(bucket-id debug2)
|
||||
@@ -366,7 +365,7 @@
|
||||
(cond
|
||||
((and (= gp-0 (-> self cur-volume))
|
||||
(= *camera-layout-blink* 'volume)
|
||||
(zero? (logand (-> *display* real-frame-clock integral-frame-counter) 8))
|
||||
(not (logtest? (-> *display* real-frame-clock integral-frame-counter) 8))
|
||||
)
|
||||
)
|
||||
(else
|
||||
@@ -3095,12 +3094,12 @@
|
||||
)
|
||||
((and (not (logtest? (-> arg0 options) 28))
|
||||
(logtest? (-> arg0 options) 1)
|
||||
(zero? (logand (-> *cpad-list* cpads 0 button0-rel 0) (-> arg0 button)))
|
||||
(not (logtest? (-> *cpad-list* cpads 0 button0-rel 0) (-> arg0 button)))
|
||||
)
|
||||
#f
|
||||
)
|
||||
((and (not (logtest? (-> arg0 options) 29))
|
||||
(zero? (logand (-> *cpad-list* cpads 0 button0-abs 0) (-> arg0 button)))
|
||||
(not (logtest? (-> *cpad-list* cpads 0 button0-abs 0) (-> arg0 button)))
|
||||
)
|
||||
#f
|
||||
)
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
(vector-reset! (-> self pitch-off))
|
||||
(set! (-> self upspeed) 0.0)
|
||||
(set! (-> self on-ground)
|
||||
(zero? (logand (-> (the-as process-focusable gp-0) focus-status) (focus-status in-air)))
|
||||
(not (logtest? (-> (the-as process-focusable gp-0) focus-status) (focus-status in-air)))
|
||||
)
|
||||
(set! (-> self on-pole) #f)
|
||||
(set! (-> self ease-t) 1.0)
|
||||
@@ -77,7 +77,7 @@
|
||||
)
|
||||
)
|
||||
(cond
|
||||
((logtest? (-> (the-as process-focusable gp-0) focus-status) (focus-status under-water))
|
||||
((focus-test? (the-as process-focusable gp-0) under-water)
|
||||
(set! (-> self under-water) 2)
|
||||
)
|
||||
(else
|
||||
@@ -135,7 +135,7 @@
|
||||
)
|
||||
)
|
||||
(cond
|
||||
((logtest? (-> (the-as target gp-0) focus-status) (focus-status under-water))
|
||||
((focus-test? (the-as target gp-0) under-water)
|
||||
(set! (-> self under-water) 2)
|
||||
)
|
||||
((> (-> self under-water) 0)
|
||||
@@ -174,7 +174,7 @@
|
||||
(set! (-> self tpos-curr quad) (-> (get-trans (the-as target gp-0) 4) quad))
|
||||
)
|
||||
)
|
||||
(when (logtest? (-> (the-as target gp-0) focus-status) (focus-status edge-grab))
|
||||
(when (focus-test? (the-as target gp-0) edge-grab)
|
||||
(if *display-cam-los-debug*
|
||||
(format *stdcon* "ride edge~%")
|
||||
)
|
||||
@@ -185,7 +185,7 @@
|
||||
(-> self local-down)
|
||||
(-> self settings target-height)
|
||||
)
|
||||
(vector-float*! (-> s5-6 move-dist) (the-as vector (&-> self stack 256)) 4915.2)
|
||||
(vector-float*! (-> s5-6 move-dist) (-> self tgt-rot-mat vector 2) 4915.2)
|
||||
(vector-! (-> s5-6 start-pos) (-> s5-6 start-pos) (-> s5-6 move-dist))
|
||||
(let ((s4-4 s5-6))
|
||||
(set! (-> s4-4 radius) 4300.8)
|
||||
@@ -202,12 +202,12 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> self on-ground) (zero? (logand (-> (the-as target gp-0) focus-status) (focus-status in-air))))
|
||||
(set! (-> self on-ground) (not (logtest? (-> (the-as target gp-0) focus-status) (focus-status in-air))))
|
||||
(let ((s5-7 (new-stack-vector0)))
|
||||
0.0
|
||||
(cond
|
||||
((and (logtest? (-> (the-as target gp-0) focus-status) (focus-status in-air))
|
||||
(zero? (logand (focus-status halfpipe super) (-> (the-as target gp-0) focus-status)))
|
||||
((and (focus-test? (the-as target gp-0) in-air)
|
||||
(not (logtest? (focus-status halfpipe super) (-> (the-as target gp-0) focus-status)))
|
||||
)
|
||||
(if *display-cam-los-debug*
|
||||
(format *stdcon* "air tracking~%")
|
||||
@@ -251,8 +251,8 @@
|
||||
(vector-! s5-7 (-> self tpos-curr) (-> self tpos-old))
|
||||
(let ((f0-34 (vector-dot s5-7 (-> self local-down))))
|
||||
(cond
|
||||
((and (logtest? (-> (the-as target gp-0) focus-status) (focus-status touch-water))
|
||||
(zero? (logand (focus-status mech) (-> (the-as target gp-0) focus-status)))
|
||||
((and (focus-test? (the-as target gp-0) touch-water)
|
||||
(not (logtest? (focus-status mech) (-> (the-as target gp-0) focus-status)))
|
||||
)
|
||||
(set! (-> self upspeed) 0.0)
|
||||
)
|
||||
@@ -288,8 +288,8 @@
|
||||
(if (not (logtest? (-> self settings slave-options) (cam-slave-options JUMP_PITCHES)))
|
||||
(reset-follow)
|
||||
)
|
||||
(when (and (logtest? (-> (the-as target gp-0) focus-status) (focus-status on-water under-water))
|
||||
(zero? (logand (focus-status mech) (-> (the-as target gp-0) focus-status)))
|
||||
(when (and (focus-test? (the-as target gp-0) on-water under-water)
|
||||
(not (logtest? (focus-status mech) (-> (the-as target gp-0) focus-status)))
|
||||
)
|
||||
(let ((f0-41 (- (get-water-height (the-as target gp-0)) (-> self settings target-height))))
|
||||
(if (< (-> self tpos-curr-adj y) f0-41)
|
||||
|
||||
@@ -301,7 +301,7 @@
|
||||
)
|
||||
:trans (behavior ()
|
||||
(if (or (not (handle->process (-> *camera* settings pov-handle)))
|
||||
(zero? (logand (-> *camera* master-options) (cam-master-options-u32 HAVE_TARGET)))
|
||||
(not (logtest? (-> *camera* master-options) (cam-master-options-u32 HAVE_TARGET)))
|
||||
)
|
||||
(cam-slave-go cam-free-floating)
|
||||
)
|
||||
@@ -509,7 +509,7 @@
|
||||
:exit (behavior ()
|
||||
(if (and *target*
|
||||
(logtest? (-> *camera* master-options) (cam-master-options-u32 HAVE_TARGET))
|
||||
(logtest? (-> *target* focus-status) (focus-status in-head))
|
||||
(focus-test? *target* in-head)
|
||||
)
|
||||
(send-event *target* 'end-mode)
|
||||
)
|
||||
@@ -2602,7 +2602,7 @@
|
||||
(vector-flatten! s5-3 (-> self butt-vector) (-> *camera* local-down))
|
||||
)
|
||||
(else
|
||||
(vector-flatten! s5-3 (the-as vector (&-> *camera* stack 256)) (-> *camera* local-down))
|
||||
(vector-flatten! s5-3 (-> *camera* tgt-rot-mat vector 2) (-> *camera* local-down))
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -2622,7 +2622,7 @@
|
||||
)
|
||||
(when (logtest? (-> *camera* settings slave-options) (cam-slave-options BIKE_MODE))
|
||||
(vector-normalize-copy! gp-3 (-> self view-flat) 1.0)
|
||||
(vector-flatten! s5-3 (the-as vector (&-> *camera* stack 256)) (-> *camera* local-down))
|
||||
(vector-flatten! s5-3 (-> *camera* tgt-rot-mat vector 2) (-> *camera* local-down))
|
||||
(vector-normalize! s5-3 -1.0)
|
||||
(let ((f0-97 (acos (vector-dot s5-3 gp-3))))
|
||||
(when (and (< (-> self max-angle-offset) f0-97) (< f0-97 32585.955))
|
||||
@@ -3451,7 +3451,7 @@
|
||||
((logtest? (-> self options) (cam-slave-options-u32 BUTT_CAM))
|
||||
(set-vector! s5-0 0.0 0.0 1.0 1.0)
|
||||
(vector-normalize-copy! s5-0 (-> self view-flat) 1.0)
|
||||
(set! (-> s3-0 quad) (-> (the-as vector (&-> *camera* stack 256)) quad))
|
||||
(set! (-> s3-0 quad) (-> (the-as vector (-> *camera* tgt-rot-mat vector 2)) quad))
|
||||
(vector-flatten! s3-0 s3-0 (-> *camera* local-down))
|
||||
(vector-negate! s3-0 s3-0)
|
||||
(set! (-> s4-0 quad) (-> s5-0 quad))
|
||||
@@ -3500,7 +3500,7 @@
|
||||
)
|
||||
|
||||
(defbehavior cam-calc-bike-follow! camera-slave ((arg0 cam-rotation-tracker) (arg1 vector) (arg2 symbol))
|
||||
(vector-float*! (-> arg0 follow-off) (the-as vector (&-> *camera* stack 320)) 155648.0)
|
||||
(vector-float*! (-> arg0 follow-off) (-> *camera* tgt-face-mat vector 2) 155648.0)
|
||||
(vector+! (-> arg0 follow-pt) (-> *camera* tpos-curr-adj) (-> arg0 follow-off))
|
||||
(vector--float*!
|
||||
(-> arg0 follow-pt)
|
||||
@@ -3517,7 +3517,7 @@
|
||||
(s5-0 (new-stack-vector0))
|
||||
)
|
||||
(vector-normalize-copy! gp-0 (-> self view-flat) 1.0)
|
||||
(vector-flatten! s5-0 (the-as vector (&-> *camera* stack 256)) (-> *camera* local-down))
|
||||
(vector-flatten! s5-0 (-> *camera* tgt-rot-mat vector 2) (-> *camera* local-down))
|
||||
(vector-normalize! s5-0 -1.0)
|
||||
(matrix-from-two-vectors-partial-linear! s4-0 gp-0 s5-0 0.2)
|
||||
)
|
||||
|
||||
@@ -170,7 +170,7 @@
|
||||
(when (= (-> s5-2 status) 'active)
|
||||
(cond
|
||||
((or *artist-fix-visible* *stats-bsp*)
|
||||
(set! (-> s5-2 render?) (zero? (logand *fix-visible-level-mask* (ash 1 (-> s5-2 index)))))
|
||||
(set! (-> s5-2 render?) (not (logtest? *fix-visible-level-mask* (ash 1 (-> s5-2 index)))))
|
||||
(format
|
||||
*stdcon*
|
||||
"~0kleaf-index ~8S ~C = ~d node ~d ~S ~S~%"
|
||||
@@ -195,7 +195,7 @@
|
||||
(set! (-> s5-2 render?) #t)
|
||||
)
|
||||
)
|
||||
(when (and *artist-fix-visible* (zero? (logand *fix-visible-level-mask* (ash 1 (-> s5-2 index)))))
|
||||
(when (and *artist-fix-visible* (not (logtest? *fix-visible-level-mask* (ash 1 (-> s5-2 index)))))
|
||||
(let ((s4-1 (-> s5-2 bsp current-leaf-idx))
|
||||
(s3-0 (-> s5-2 bsp vis-spheres))
|
||||
)
|
||||
|
||||
@@ -87,7 +87,7 @@
|
||||
(logtest? (-> arg0 flags) (water-flags can-ground))
|
||||
(logtest? (-> arg0 flags) (water-flags swim-ground under-water))
|
||||
(logtest? (water-flags over-water) (-> arg0 flags))
|
||||
(zero? (logand (water-flags jump-out) (-> arg0 flags)))
|
||||
(not (logtest? (water-flags jump-out) (-> arg0 flags)))
|
||||
)
|
||||
)
|
||||
(return #f)
|
||||
@@ -484,8 +484,6 @@
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 19 of type collide-cache
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod fill-from-fg-boxes collide-cache ((obj collide-cache))
|
||||
(let ((s5-0 (-> obj collide-with)))
|
||||
(set! *actor-list-length* 0)
|
||||
@@ -571,27 +569,19 @@
|
||||
0
|
||||
(none)
|
||||
)
|
||||
;; definition for method 10 of type collide-shape-prim
|
||||
|
||||
;; WARN: Return type mismatch object vs none.
|
||||
(defmethod add-fg-prim-using-box collide-shape-prim ((obj collide-shape-prim) (arg0 collide-cache))
|
||||
(format 0 "ERROR: Illegal collide-shape-prim type passed to collide-shape-prim::add-fg-prim-using-box!~%")
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for method 10 of type collide-shape-prim-mesh
|
||||
;; ERROR: function was not converted to expressions. Cannot decompile.
|
||||
(defmethod-mips2c "(method 10 collide-shape-prim-mesh)" 10 collide-shape-prim-mesh)
|
||||
|
||||
;; definition for method 10 of type collide-shape-prim-sphere
|
||||
;; ERROR: function was not converted to expressions. Cannot decompile.
|
||||
(defmethod-mips2c "(method 10 collide-shape-prim-sphere)" 10 collide-shape-prim-sphere)
|
||||
|
||||
;; definition for method 10 of type collide-shape-prim-group
|
||||
;; ERROR: function was not converted to expressions. Cannot decompile.
|
||||
(defmethod-mips2c "(method 10 collide-shape-prim-group)" 10 collide-shape-prim-group)
|
||||
|
||||
;; definition for method 20 of type collide-cache
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod fill-from-fg-line-sphere collide-cache ((obj collide-cache) (arg0 collide-query))
|
||||
(local-vars (v1-9 float))
|
||||
(rlet ((acc :class vf)
|
||||
@@ -719,7 +709,6 @@
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 11 of type collide-shape-prim
|
||||
;; WARN: Return type mismatch object vs none.
|
||||
(defmethod add-fg-prim-using-line-sphere collide-shape-prim ((obj collide-shape-prim) (arg0 collide-cache) (arg1 object))
|
||||
(format
|
||||
@@ -729,26 +718,17 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for method 11 of type collide-shape-prim-mesh
|
||||
;; ERROR: function was not converted to expressions. Cannot decompile.
|
||||
(defmethod-mips2c "(method 11 collide-shape-prim-mesh)" 11 collide-shape-prim-mesh)
|
||||
|
||||
;; definition for method 11 of type collide-shape-prim-sphere
|
||||
;; ERROR: function was not converted to expressions. Cannot decompile.
|
||||
(defmethod-mips2c "(method 11 collide-shape-prim-sphere)" 11 collide-shape-prim-sphere)
|
||||
|
||||
;; definition for method 11 of type collide-shape-prim-group
|
||||
;; ERROR: function was not converted to expressions. Cannot decompile.
|
||||
(defmethod-mips2c "(method 11 collide-shape-prim-group)" 11 collide-shape-prim-group)
|
||||
|
||||
|
||||
;; definition for method 10 of type collide-cache
|
||||
(defmethod fill-and-probe-using-line-sphere collide-cache ((obj collide-cache) (arg0 collide-query))
|
||||
(fill-using-line-sphere obj arg0)
|
||||
(probe-using-line-sphere obj arg0)
|
||||
)
|
||||
|
||||
;; definition of type collide-puls-work
|
||||
(deftype collide-puls-work (structure)
|
||||
((ignore-pat pat-surface :offset-assert 0)
|
||||
(bsphere sphere :inline :offset-assert 16)
|
||||
@@ -759,7 +739,7 @@
|
||||
:flag-assert #x900000030
|
||||
)
|
||||
|
||||
;; definition for method 16 of type collide-cache
|
||||
|
||||
(defmethod probe-using-line-sphere collide-cache ((obj collide-cache) (arg0 collide-query))
|
||||
(rlet ((vf0 :class vf)
|
||||
(vf2 :class vf)
|
||||
@@ -830,7 +810,6 @@
|
||||
)
|
||||
)
|
||||
|
||||
;; definition of type lsmi-work
|
||||
(deftype lsmi-work (structure)
|
||||
((best-u float :offset-assert 0)
|
||||
(orig-best-u float :offset-assert 4)
|
||||
@@ -842,23 +821,16 @@
|
||||
:flag-assert #x90000022c
|
||||
)
|
||||
|
||||
;; definition for method 9 of type collide-cache-prim
|
||||
;; ERROR: function was not converted to expressions. Cannot decompile.
|
||||
|
||||
(defmethod-mips2c "(method 9 collide-cache-prim)" 9 collide-cache-prim)
|
||||
|
||||
|
||||
;; definition for method 10 of type collide-cache-prim
|
||||
;; ERROR: function was not converted to expressions. Cannot decompile.
|
||||
(defmethod-mips2c "(method 10 collide-cache-prim)" 10 collide-cache-prim)
|
||||
|
||||
|
||||
;; definition for method 11 of type collide-cache
|
||||
(defmethod fill-and-probe-using-spheres collide-cache ((obj collide-cache) (arg0 collide-query))
|
||||
(fill-using-spheres obj arg0)
|
||||
(probe-using-spheres obj arg0)
|
||||
)
|
||||
|
||||
;; definition for method 14 of type collide-cache
|
||||
(defmethod fill-using-spheres collide-cache ((obj collide-cache) (arg0 collide-query))
|
||||
(new 'stack-no-clear 'bounding-box)
|
||||
(set-from-spheres!
|
||||
@@ -870,16 +842,10 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for method 17 of type collide-cache
|
||||
;; ERROR: function was not converted to expressions. Cannot decompile.
|
||||
(defmethod-mips2c "(method 17 collide-cache)" 17 collide-cache)
|
||||
|
||||
;; definition for method 9 of type collide-puss-work
|
||||
;; ERROR: function was not converted to expressions. Cannot decompile.
|
||||
(defmethod-mips2c "(method 9 collide-puss-work)" 9 collide-puss-work)
|
||||
|
||||
;; definition for method 10 of type collide-puss-work
|
||||
;; ERROR: function was not converted to expressions. Cannot decompile.
|
||||
(defmethod-mips2c "(method 10 collide-puss-work)" 10 collide-puss-work)
|
||||
|
||||
|
||||
|
||||
@@ -7,10 +7,9 @@
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
;; this file is debug only
|
||||
(declare-file (debug))
|
||||
|
||||
;; definition for method 9 of type collide-cache
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod debug-draw collide-cache ((obj collide-cache))
|
||||
(let ((gp-0 (the-as object (-> obj tris))))
|
||||
(countdown (s4-0 (-> obj num-tris))
|
||||
@@ -58,7 +57,6 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition of type col-rend-filter
|
||||
(deftype col-rend-filter (structure)
|
||||
((show-pat-set pat-surface :offset-assert 0)
|
||||
(show-pat-clear pat-surface :offset-assert 4)
|
||||
@@ -69,22 +67,7 @@
|
||||
:flag-assert #x90000000c
|
||||
)
|
||||
|
||||
;; definition for method 3 of type col-rend-filter
|
||||
(defmethod inspect col-rend-filter ((obj col-rend-filter))
|
||||
(when (not obj)
|
||||
(set! obj obj)
|
||||
(goto cfg-4)
|
||||
)
|
||||
(format #t "[~8x] ~A~%" obj 'col-rend-filter)
|
||||
(format #t "~1Tshow-pat-set: ~D~%" (-> obj show-pat-set))
|
||||
(format #t "~1Tshow-pat-clear: ~D~%" (-> obj show-pat-clear))
|
||||
(format #t "~1Tevent-mask: ~D~%" (-> obj event-mask))
|
||||
(label cfg-4)
|
||||
obj
|
||||
)
|
||||
|
||||
;; definition for function col-rend-draw
|
||||
;; INFO: Used lq/sq
|
||||
;; WARN: Return type mismatch symbol vs none.
|
||||
(defun col-rend-draw ((arg0 col-rend) (arg1 col-rend-filter))
|
||||
(let ((s4-0 (new 'stack-no-clear 'matrix)))
|
||||
@@ -98,7 +81,7 @@
|
||||
(let ((v1-9 (-> s3-1 pat)))
|
||||
(cond
|
||||
((and (or (zero? (-> arg1 show-pat-set)) (logtest? v1-9 (-> arg1 show-pat-set)))
|
||||
(or (zero? (-> arg1 show-pat-clear)) (zero? (logand v1-9 (-> arg1 show-pat-clear))))
|
||||
(or (zero? (-> arg1 show-pat-clear)) (not (logtest? v1-9 (-> arg1 show-pat-clear))))
|
||||
(or (zero? (-> arg1 event-mask)) (logtest? (-> arg1 event-mask) (ash 1 (-> v1-9 event))))
|
||||
)
|
||||
(let ((t1-0 (copy-and-set-field (-> *pat-mode-info* (-> v1-9 mode) color) a 64)))
|
||||
@@ -167,7 +150,7 @@
|
||||
(when (= (-> (the-as collide-cache-prim s5-1) prim-core prim-type) (prim-type sphere))
|
||||
(let ((v1-37 (-> (the-as collide-shape-prim-sphere (-> (the-as collide-cache-prim s5-1) prim)) pat)))
|
||||
(when (and (or (zero? (-> arg1 show-pat-set)) (logtest? v1-37 (-> arg1 show-pat-set)))
|
||||
(or (zero? (-> arg1 show-pat-clear)) (zero? (logand v1-37 (-> arg1 show-pat-clear))))
|
||||
(or (zero? (-> arg1 show-pat-clear)) (not (logtest? v1-37 (-> arg1 show-pat-clear))))
|
||||
(or (zero? (-> arg1 event-mask)) (logtest? (-> arg1 event-mask) (ash 1 (-> v1-37 event))))
|
||||
)
|
||||
(let ((t0-5 (copy-and-set-field (-> *pat-mode-info* (-> v1-37 mode) color) a 64)))
|
||||
@@ -188,8 +171,6 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for method 9 of type col-rend
|
||||
;; INFO: Used lq/sq
|
||||
(defmethod col-rend-method-9 col-rend ((obj col-rend))
|
||||
(with-pp
|
||||
(let ((s5-0 (new 'stack-no-clear 'collide-query)))
|
||||
@@ -312,6 +293,3 @@
|
||||
(none)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -875,7 +875,7 @@ it returns a triangle and normal direction to push in.
|
||||
)
|
||||
)
|
||||
)
|
||||
(if (and a0-14 (zero? (logand (focus-status rail) (-> (the-as process-focusable a0-14) focus-status))))
|
||||
(if (and a0-14 (not (logtest? (focus-status rail) (-> (the-as process-focusable a0-14) focus-status))))
|
||||
(set! (-> obj surf) *rail-surface*)
|
||||
)
|
||||
)
|
||||
@@ -921,7 +921,7 @@ it returns a triangle and normal direction to push in.
|
||||
(target-attack-up (the-as target (-> obj process)) 'attack-or-shove 'shockup)
|
||||
)
|
||||
(((pat-event burnup))
|
||||
(when (not (logtest? (focus-status pilot) (-> (the-as process-focusable (-> obj process)) focus-status)))
|
||||
(when (not (focus-test? (the-as process-focusable (-> obj process)) pilot))
|
||||
(set! s5-0 (logior s5-0 #x4000))
|
||||
(target-attack-up (the-as target (-> obj process)) 'attack-or-shove 'burnup)
|
||||
)
|
||||
@@ -1112,7 +1112,7 @@ it returns a triangle and normal direction to push in.
|
||||
(set! (-> a1-1 quad) (-> arg3 quad))
|
||||
;; check for impact:
|
||||
(when (and (not (logtest? (-> arg0 prev-status) (collide-status on-surface)))
|
||||
(zero? (logand (-> arg0 status) (collide-status touch-wall)))
|
||||
(not (logtest? (-> arg0 status) (collide-status touch-wall)))
|
||||
)
|
||||
;; do "impact friction"
|
||||
(let ((f0-1 (- 1.0 (-> arg0 surf impact-fric))))
|
||||
@@ -3174,10 +3174,9 @@ it returns a triangle and normal direction to push in.
|
||||
(.sub.vf vf6 vf4 vf5 :mask #b111)
|
||||
(.svf (&-> sv-176 quad) vf6)
|
||||
(vector-normalize! sv-176 1.0)
|
||||
(when (and (< arg2 (-> sv-176 y))
|
||||
(and (not (logtest? (focus-status dead hit board mech) (-> (the-as process-focusable gp-0) focus-status)))
|
||||
(< (-> (the-as process-focusable gp-0) root-override transv y) 4.096)
|
||||
)
|
||||
(when (and (< arg2 (-> sv-176 y)) (and (not (focus-test? (the-as process-focusable gp-0) dead hit board mech))
|
||||
(< (-> (the-as process-focusable gp-0) root-override transv y) 4.096)
|
||||
)
|
||||
)
|
||||
(let ((s2-1 (new 'stack-no-clear 'vector)))
|
||||
(set! (-> s2-1 quad) (-> (the-as process-focusable gp-0) root-override transv quad))
|
||||
@@ -3251,7 +3250,3 @@ it returns a triangle and normal direction to push in.
|
||||
)
|
||||
(the-as vector 0)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -93,6 +93,7 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch object vs touching-shapes-entry.
|
||||
(defmethod get-shapes-entry touching-list ((obj touching-list) (shape1 collide-shape) (shape2 collide-shape))
|
||||
(let ((entry (the-as touching-shapes-entry (-> obj touching-shapes))))
|
||||
(let ((v1-0 (the-as touching-shapes-entry #f)))
|
||||
@@ -147,6 +148,8 @@
|
||||
:flag-assert #x900000008
|
||||
)
|
||||
|
||||
|
||||
;; WARN: Function (method 9 touching-list) has a return type of none, but the expression builder found a return statement.
|
||||
(defmethod add-touching-prims touching-list ((obj touching-list)
|
||||
(arg0 collide-shape-prim)
|
||||
(arg1 collide-shape-prim)
|
||||
@@ -394,13 +397,14 @@
|
||||
(the-as touching-prims-entry #f)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch touching-prims-entry vs basic.
|
||||
(defmethod prims-touching-action? touching-shapes-entry ((obj touching-shapes-entry) (arg0 collide-shape) (arg1 collide-action) (arg2 collide-action))
|
||||
(cond
|
||||
((= (-> obj cshape1) arg0)
|
||||
(let ((v1-1 (-> obj head)))
|
||||
(while v1-1
|
||||
(let ((a0-1 (-> v1-1 prim1 cprim)))
|
||||
(if (and (logtest? arg1 (-> a0-1 prim-core action)) (zero? (logand arg2 (-> a0-1 prim-core action))))
|
||||
(if (and (logtest? arg1 (-> a0-1 prim-core action)) (not (logtest? arg2 (-> a0-1 prim-core action))))
|
||||
(return (the-as basic v1-1))
|
||||
)
|
||||
)
|
||||
@@ -412,7 +416,7 @@
|
||||
(let ((v1-4 (-> obj head)))
|
||||
(while v1-4
|
||||
(let ((a0-5 (-> v1-4 prim2 cprim)))
|
||||
(if (and (logtest? arg1 (-> a0-5 prim-core action)) (zero? (logand arg2 (-> a0-5 prim-core action))))
|
||||
(if (and (logtest? arg1 (-> a0-5 prim-core action)) (not (logtest? arg2 (-> a0-5 prim-core action))))
|
||||
(return (the-as basic v1-4))
|
||||
)
|
||||
)
|
||||
@@ -504,7 +508,3 @@
|
||||
)
|
||||
arg0
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
(lambda ((arg0 process-drawable))
|
||||
(with-pp
|
||||
(when (and (logtest? (process-mask crate enemy collectable guard) (-> arg0 mask))
|
||||
(zero? (logand (process-mask no-track) (-> arg0 mask)))
|
||||
(not (logtest? (process-mask no-track) (-> arg0 mask)))
|
||||
)
|
||||
(let* ((gp-0 *search-info*)
|
||||
(s4-0 arg0)
|
||||
@@ -85,7 +85,7 @@
|
||||
(if (and (type? s2-0 process-focusable)
|
||||
s2-0
|
||||
s2-0
|
||||
(zero? (logand (-> (the-as process-focusable s2-0) focus-status) (focus-status disable dead)))
|
||||
(not (logtest? (-> (the-as process-focusable s2-0) focus-status) (focus-status disable dead)))
|
||||
)
|
||||
(set! s4-2 (get-trans (the-as process-focusable s2-0) 3))
|
||||
)
|
||||
@@ -259,9 +259,9 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(when (and (and s3-0 (zero? (logand (-> (the-as process-focusable s3-0) focus-status) (focus-status disable dead))))
|
||||
(when (and (and s3-0 (not (logtest? (-> (the-as process-focusable s3-0) focus-status) (focus-status disable dead))))
|
||||
(and (logtest? (process-mask crate enemy collectable guard) (-> s3-0 mask))
|
||||
(zero? (logand (process-mask no-track) (-> s3-0 mask)))
|
||||
(not (logtest? (process-mask no-track) (-> s3-0 mask)))
|
||||
)
|
||||
)
|
||||
(let* ((s2-1 (get-trans (the-as process-focusable s3-0) 3))
|
||||
@@ -395,8 +395,3 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -226,7 +226,7 @@ eco-door-event-handler
|
||||
(when (and *target* (and (>= (-> self open-distance)
|
||||
(vector-vector-distance (-> self root-override trans) (-> *target* control trans))
|
||||
)
|
||||
(zero? (logand (focus-status teleporting) (-> *target* focus-status)))
|
||||
(not (logtest? (focus-status teleporting) (-> *target* focus-status)))
|
||||
)
|
||||
)
|
||||
(lock-according-to-task! self)
|
||||
@@ -296,7 +296,7 @@ eco-door-event-handler
|
||||
(or (not *target*) (or (< (-> self close-distance)
|
||||
(vector-vector-distance (-> self root-override trans) (-> *target* control trans))
|
||||
)
|
||||
(logtest? (focus-status teleporting) (-> *target* focus-status))
|
||||
(focus-test? *target* teleporting)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -647,7 +647,7 @@
|
||||
)
|
||||
)
|
||||
((and arg2 (and (< (+ 4096.0 (-> *FACT-bank* suck-bounce-dist)) f0-0)
|
||||
(zero? (logand (-> self flags) (collectable-flag suck-in)))
|
||||
(not (logtest? (-> self flags) (collectable-flag suck-in)))
|
||||
)
|
||||
)
|
||||
(go-virtual wait)
|
||||
@@ -884,7 +884,7 @@
|
||||
(if (and (logtest? (-> self fact options) (actor-option suck-in))
|
||||
(not (and (-> self next-state) (= (-> self next-state name) 'pickup)))
|
||||
*target*
|
||||
(zero? (logand (-> *target* focus-status) (focus-status dead)))
|
||||
(not (logtest? (-> *target* focus-status) (focus-status dead)))
|
||||
)
|
||||
(go-virtual suck (process->handle *target*))
|
||||
)
|
||||
@@ -919,7 +919,7 @@
|
||||
)
|
||||
(else
|
||||
(if (and (logtest? (-> self fact options) (actor-option suck-in))
|
||||
(zero? (logand (-> self flags) (collectable-flag no-eco-blue)))
|
||||
(not (logtest? (-> self flags) (collectable-flag no-eco-blue)))
|
||||
)
|
||||
(go-virtual notice-blue (process->handle *target*))
|
||||
)
|
||||
@@ -1025,7 +1025,7 @@
|
||||
)
|
||||
(or (or (not *target*)
|
||||
(or (< 204800.0 (vector-vector-distance (-> self root-override2 trans) (-> *target* control trans)))
|
||||
(logtest? (focus-status teleporting) (-> *target* focus-status))
|
||||
(focus-test? *target* teleporting)
|
||||
)
|
||||
)
|
||||
(logtest? (-> self flags) (collectable-flag no-distance-check-fadeout))
|
||||
@@ -1119,7 +1119,7 @@
|
||||
(set! (-> a1-0 message) 'query)
|
||||
(set! (-> a1-0 param 0) (the-as uint 'powerup))
|
||||
(set! (-> a1-0 param 1) (the-as uint 3))
|
||||
(if (and (not (send-event-function *target* a1-0)) (zero? (logand (-> self flags) (collectable-flag suck-in))))
|
||||
(if (and (not (send-event-function *target* a1-0)) (not (logtest? (-> self flags) (collectable-flag suck-in))))
|
||||
(go-virtual wait)
|
||||
)
|
||||
)
|
||||
@@ -1412,10 +1412,10 @@ This commonly includes things such as:
|
||||
:trans (behavior ()
|
||||
(if (and (and *target*
|
||||
(and (>= 32768.0 (vector-vector-distance (-> self root-override2 trans) (-> *target* control trans)))
|
||||
(zero? (logand (focus-status teleporting) (-> *target* focus-status)))
|
||||
(not (logtest? (focus-status teleporting) (-> *target* focus-status)))
|
||||
)
|
||||
)
|
||||
(and (not (logtest? (-> *target* focus-status) (focus-status dead hit)))
|
||||
(and (not (focus-test? *target* dead hit))
|
||||
(case (-> self fact pickup-type)
|
||||
(((pickup-type eco-pill-dark))
|
||||
(< (-> *game-info* eco-pill-dark) (-> *FACT-bank* eco-pill-dark-max-default))
|
||||
|
||||
@@ -459,7 +459,7 @@
|
||||
(defbehavior crate-standard-event-handler crate ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
(('track)
|
||||
(zero? (logand (actor-option no-track) (-> self fact options)))
|
||||
(not (logtest? (actor-option no-track) (-> self fact options)))
|
||||
)
|
||||
(('attack)
|
||||
(let* ((v1-3 (the-as attack-info (-> arg3 param 1)))
|
||||
@@ -472,7 +472,7 @@
|
||||
(('flop 'uppercut 'explode 'eco-yellow 'racer 'board 'tube 'flut-bonk 'flut-attack 'darkjak 'mech-punch)
|
||||
(if (and (logtest? (-> self fact options) (actor-option racer-only))
|
||||
(= (-> arg0 type) target)
|
||||
(zero? (logand (focus-status pilot) (-> (the-as target arg0) focus-status)))
|
||||
(not (logtest? (focus-status pilot) (-> (the-as target arg0) focus-status)))
|
||||
)
|
||||
(return #f)
|
||||
)
|
||||
@@ -642,7 +642,7 @@
|
||||
)
|
||||
(and *target*
|
||||
(and (>= 40960.0 (vector-vector-distance (-> self root-override2 trans) (-> *target* control trans)))
|
||||
(zero? (logand (focus-status teleporting) (-> *target* focus-status)))
|
||||
(not (logtest? (focus-status teleporting) (-> *target* focus-status)))
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -918,10 +918,7 @@
|
||||
(stop! (-> self sound))
|
||||
)
|
||||
(let ((v1-10 (handle->process (-> self target))))
|
||||
(if (and (and v1-10
|
||||
(= (-> v1-10 type) target)
|
||||
(logtest? (focus-status flut tube board pilot) (-> (the-as process-focusable v1-10) focus-status))
|
||||
)
|
||||
(if (and (and v1-10 (= (-> v1-10 type) target) (focus-test? (the-as process-focusable v1-10) flut tube board pilot))
|
||||
(and (!= (-> self fact pickup-type) 10) (not arg0))
|
||||
)
|
||||
(logior! (-> self fact options) (actor-option suck-in))
|
||||
|
||||
@@ -492,10 +492,10 @@ do so.
|
||||
(local-vars (zero float))
|
||||
(let ((target *target*))
|
||||
(when (and target
|
||||
(zero? (logand (focus-status dead inactive in-air grabbed edge-grab pole pilot-riding pilot teleporting)
|
||||
(not (logtest? (focus-status dead inactive in-air grabbed edge-grab pole pilot-riding pilot teleporting)
|
||||
(-> target focus-status)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! zero (the-as float 0.0))
|
||||
(when (and (find-closest-point-in-path! obj (get-trans target 0) (& zero) #t #t) (!= (-> obj move-pos 1) zero))
|
||||
@@ -572,7 +572,7 @@ do so.
|
||||
(set! (-> self ride-timer) (-> self clock frame-counter))
|
||||
(-> self params)
|
||||
(if (and (logtest? (-> self params flags) (elevator-flags elevator-flags-0))
|
||||
(zero? (logand (-> self params flags) (elevator-flags elevator-flags-3)))
|
||||
(not (logtest? (-> self params flags) (elevator-flags elevator-flags-3)))
|
||||
)
|
||||
(move-to-next-point! self)
|
||||
)
|
||||
@@ -732,7 +732,7 @@ do so.
|
||||
:trans (behavior ()
|
||||
(if (and (< (- (-> self ride-timer) (-> self sticky-player-last-ride-time)) (seconds 2))
|
||||
(begin *target* *target*)
|
||||
(logtest? (-> *target* focus-status) (focus-status in-air))
|
||||
(focus-test? *target* in-air)
|
||||
)
|
||||
(set! (-> self ride-timer) (-> self clock frame-counter))
|
||||
)
|
||||
|
||||
@@ -228,7 +228,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(and a0-7 (logtest? (-> (the-as process-focusable a0-7) focus-status) (focus-status pole)))
|
||||
(and a0-7 (focus-test? (the-as process-focusable a0-7) pole))
|
||||
)
|
||||
(move-along-path self)
|
||||
(suspend)
|
||||
@@ -1653,7 +1653,7 @@ This commonly includes things such as:
|
||||
)
|
||||
)
|
||||
)
|
||||
(the-as symbol (if (and a0-2 (logtest? (-> a0-2 focus-status) (focus-status grabbed)))
|
||||
(the-as symbol (if (and a0-2 (focus-test? a0-2 grabbed))
|
||||
(send-event a0-2 'end-mode)
|
||||
#t
|
||||
)
|
||||
@@ -2372,7 +2372,7 @@ This commonly includes things such as:
|
||||
(when (and *target* (and (>= (-> self active-distance)
|
||||
(vector-vector-distance (-> self root-override trans) (-> *target* control trans))
|
||||
)
|
||||
(zero? (logand (focus-status teleporting) (-> *target* focus-status)))
|
||||
(not (logtest? (focus-status teleporting) (-> *target* focus-status)))
|
||||
)
|
||||
)
|
||||
(cond
|
||||
@@ -2389,7 +2389,7 @@ This commonly includes things such as:
|
||||
)
|
||||
(if (and (and *target*
|
||||
(and (>= 32768.0 (vector-vector-distance (-> self root-override trans) (-> *target* control trans)))
|
||||
(zero? (logand (focus-status teleporting) (-> *target* focus-status)))
|
||||
(not (logtest? (focus-status teleporting) (-> *target* focus-status)))
|
||||
)
|
||||
)
|
||||
(not (send-event *target* 'query 'powerup (pickup-type eco-blue)))
|
||||
@@ -2436,7 +2436,7 @@ This commonly includes things such as:
|
||||
(if (or (or (not *target*) (or (< (-> self active-distance)
|
||||
(vector-vector-distance (-> self root-override trans) (-> *target* control trans))
|
||||
)
|
||||
(logtest? (focus-status teleporting) (-> *target* focus-status))
|
||||
(focus-test? *target* teleporting)
|
||||
)
|
||||
)
|
||||
(not (send-event *target* 'query 'powerup (pickup-type eco-blue)))
|
||||
@@ -2448,7 +2448,7 @@ This commonly includes things such as:
|
||||
(if (and (and *target* (and (>= (+ 2867.2 (-> self root-override root-prim prim-core world-sphere w))
|
||||
(vector-vector-distance (-> self root-override trans) (-> *target* control trans))
|
||||
)
|
||||
(zero? (logand (focus-status teleporting) (-> *target* focus-status)))
|
||||
(not (logtest? (focus-status teleporting) (-> *target* focus-status)))
|
||||
)
|
||||
)
|
||||
(< (- (-> self clock frame-counter) (-> self state-time)) (seconds 0.5))
|
||||
|
||||
@@ -256,7 +256,7 @@ This commonly includes things such as:
|
||||
)
|
||||
)
|
||||
(cond
|
||||
((and proc-focus (logtest? (-> proc-focus focus-status) (focus-status edge-grab)))
|
||||
((and proc-focus (focus-test? proc-focus edge-grab))
|
||||
(set! (-> self safe-time) (+ (-> self clock frame-counter) (seconds 0.2)))
|
||||
(return (the-as object #f))
|
||||
)
|
||||
|
||||
@@ -7,8 +7,6 @@
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
;; definition for function cloud-track
|
||||
;; INFO: Used lq/sq
|
||||
;; WARN: Return type mismatch symbol vs none.
|
||||
;; WARN: new jak 2 until loop case, check carefully
|
||||
(defbehavior cloud-track process ((arg0 process-tree)
|
||||
@@ -70,7 +68,6 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defpart 539
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x29 :page #xc))
|
||||
(sp-rnd-flt spt-num 1.0 1.0 1.0)
|
||||
@@ -89,7 +86,6 @@
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defpart 540
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :page #xc))
|
||||
(sp-rnd-flt spt-num 1.0 1.0 1.0)
|
||||
@@ -108,7 +104,6 @@
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defpart 541
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x9b :page #xb))
|
||||
(sp-rnd-flt spt-num 1.0 3.0 1.0)
|
||||
@@ -128,7 +123,6 @@
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defpart 543
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x9b :page #xb))
|
||||
(sp-rnd-flt spt-num 0.0 3.0 1.0)
|
||||
@@ -148,7 +142,6 @@
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defpart 542
|
||||
:init-specs ((sp-flt spt-r 64.0)
|
||||
(sp-flt spt-g 64.0)
|
||||
@@ -158,7 +151,6 @@
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defpart 544
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x29 :page #xc))
|
||||
(sp-flt spt-num 1.0)
|
||||
@@ -177,7 +169,6 @@
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defpartgroup group-blue-hit-ground-effect
|
||||
:id 123
|
||||
:duration (seconds 0.017)
|
||||
@@ -186,7 +177,6 @@
|
||||
:parts ((sp-item 545) (sp-item 546) (sp-item 547 :flags (is-3d)) (sp-item 548) (sp-item 549 :flags (is-3d)))
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defpart 548
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x29 :page #xc))
|
||||
(sp-flt spt-num 32.0)
|
||||
@@ -210,7 +200,6 @@
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defpart 550
|
||||
:init-specs ((sp-flt spt-r 0.0)
|
||||
(sp-rnd-flt spt-g 32.0 32.0 1.0)
|
||||
@@ -221,7 +210,6 @@
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defpart 549
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x2c :page #xc))
|
||||
(sp-flt spt-num 1.0)
|
||||
@@ -241,12 +229,10 @@
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defpart 551
|
||||
:init-specs ((sp-flt spt-fade-a -2.1333334))
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defpart 547
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x26 :page #xc))
|
||||
(sp-flt spt-num 1.0)
|
||||
@@ -267,12 +253,10 @@
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defpart 552
|
||||
:init-specs ((sp-flt spt-fade-a -1.4222223))
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defpart 545
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :page #xc))
|
||||
(sp-flt spt-num 32.0)
|
||||
@@ -297,7 +281,6 @@
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defpart 546
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :page #xc))
|
||||
(sp-flt spt-num 12.0)
|
||||
@@ -322,7 +305,6 @@
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defpart 553
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x29 :page #xc))
|
||||
(sp-rnd-flt spt-num 1.0 1.0 1.0)
|
||||
@@ -341,7 +323,6 @@
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defpart 554
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :page #xc))
|
||||
(sp-rnd-flt spt-num 1.0 1.0 1.0)
|
||||
@@ -360,7 +341,6 @@
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defpart 555
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #xc9 :page #xc))
|
||||
(sp-rnd-flt spt-num 0.5 2.0 1.0)
|
||||
@@ -388,12 +368,10 @@
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defpart 556
|
||||
:init-specs ((sp-flt spt-fade-r 0.0))
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defpart 557
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x29 :page #xc))
|
||||
(sp-rnd-flt spt-num 1.0 1.0 1.0)
|
||||
@@ -412,7 +390,6 @@
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defpart 558
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :page #xc))
|
||||
(sp-rnd-flt spt-num 1.0 1.0 1.0)
|
||||
@@ -431,7 +408,6 @@
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defpart 559
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #xc9 :page #xc))
|
||||
(sp-rnd-flt spt-num 0.5 2.0 1.0)
|
||||
@@ -459,12 +435,10 @@
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defpart 560
|
||||
:init-specs ((sp-flt spt-fade-r 0.0))
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defpart 561
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x29 :page #xc))
|
||||
(sp-rnd-flt spt-num 1.0 1.0 1.0)
|
||||
@@ -483,7 +457,6 @@
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defpart 562
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :page #xc))
|
||||
(sp-rnd-flt spt-num 1.0 1.0 1.0)
|
||||
@@ -502,7 +475,6 @@
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defpart 563
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #xc9 :page #xc))
|
||||
(sp-rnd-flt spt-num 0.5 2.0 1.0)
|
||||
@@ -530,14 +502,10 @@
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defpart 564
|
||||
:init-specs ((sp-flt spt-fade-g 0.0))
|
||||
)
|
||||
|
||||
;; definition for function eco-blue-glow
|
||||
;; INFO: Used lq/sq
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defun eco-blue-glow ((arg0 vector))
|
||||
(let ((t9-0 sp-launch-particles-var)
|
||||
(a0-1 *sp-particle-system-2d*)
|
||||
@@ -561,9 +529,6 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for function target-eco-process
|
||||
;; INFO: Used lq/sq
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defbehavior target-eco-process target ()
|
||||
(when (and (!= (-> (the-as fact-info-target (-> self fact-override)) eco-level) 0.0)
|
||||
(>= (- (-> *display* game-clock frame-counter)
|
||||
@@ -582,7 +547,7 @@
|
||||
(set! (-> self game eco-pill-dark) (-> *FACT-bank* eco-pill-dark-max-default))
|
||||
)
|
||||
(when (and (< 0.0 (-> (the-as fact-info-target (-> self fact-override)) eco-level))
|
||||
(not (logtest? (-> self focus-status) (focus-status in-head)))
|
||||
(not (focus-test? self in-head))
|
||||
(not (logtest? (-> self draw status) (draw-control-status no-draw no-draw-temp)))
|
||||
(not (movie?))
|
||||
(rand-vu-percent? (lerp-scale
|
||||
@@ -679,7 +644,7 @@
|
||||
(let ((v1-99 (rand-vu-int-range 3 (+ (-> self node-list length) -1))))
|
||||
(cond
|
||||
((and (logtest? (-> self control mod-surface flags) (surface-flag air))
|
||||
(zero? (logand (-> self control status) (collide-status on-surface)))
|
||||
(not (logtest? (-> self control status) (collide-status on-surface)))
|
||||
)
|
||||
(set! (-> *part-id-table* 543 init-specs 4 initial-valuef) 0.0)
|
||||
(set! (-> *part-id-table* 543 init-specs 4 random-rangef) 65536.0)
|
||||
@@ -782,9 +747,6 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for function target-color-effect-process
|
||||
;; INFO: Used lq/sq
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defbehavior target-color-effect-process target ()
|
||||
(when (and (-> self color-effect) (>= (- (-> self clock frame-counter) (-> self color-effect-start-time))
|
||||
(the-as time-frame (-> self color-effect-duration))
|
||||
@@ -889,12 +851,9 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for function target-powerup-process
|
||||
;; INFO: Used lq/sq
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defbehavior target-powerup-process target ()
|
||||
(let ((f30-0 (-> self control collision-spheres 0 prim-core world-sphere w)))
|
||||
(if (logtest? (focus-status board) (-> self focus-status))
|
||||
(if (focus-test? self board)
|
||||
(set! (-> self control collision-spheres 0 prim-core world-sphere w)
|
||||
(+ 4096.0 (-> self control collision-spheres 0 prim-core world-sphere w))
|
||||
)
|
||||
@@ -903,7 +862,7 @@
|
||||
(set! (-> self control collision-spheres 0 prim-core world-sphere w) f30-0)
|
||||
)
|
||||
(if (and (logtest? (-> self water flags) (water-flags under-water))
|
||||
(zero? (logand (-> self water flags) (water-flags swim-ground)))
|
||||
(not (logtest? (-> self water flags) (water-flags swim-ground)))
|
||||
)
|
||||
(set! (-> self control unknown-time-frame26) (-> self clock frame-counter))
|
||||
(set! (-> self control unknown-time-frame27) (-> self clock frame-counter))
|
||||
@@ -1105,7 +1064,7 @@
|
||||
(('sewer 'forest)
|
||||
(let ((f30-2 (-> self board camera-interp)))
|
||||
(cond
|
||||
((logtest? (focus-status board) (-> self focus-status))
|
||||
((focus-test? self board)
|
||||
(seek! (-> self board camera-interp) 1.0 (* 0.1 (-> self clock seconds-per-frame)))
|
||||
)
|
||||
((< (-> self control ctrl-xz-vel) 2048.0)
|
||||
@@ -1135,7 +1094,7 @@
|
||||
)
|
||||
)
|
||||
(logclear! (-> self focus-status) (focus-status super))
|
||||
(if (or (logtest? (-> self focus-status) (focus-status dead hit))
|
||||
(if (or (focus-test? self dead hit)
|
||||
(logtest? (state-flags sf2 tinvul1 sf5 tinvul2) (-> self state-flags))
|
||||
(-> *setting-control* user-current ignore-target)
|
||||
)
|
||||
@@ -1144,9 +1103,9 @@
|
||||
)
|
||||
(cond
|
||||
((or (and (logtest? (-> self control mod-surface flags) (surface-flag air))
|
||||
(zero? (logand (-> self control status) (collide-status on-surface)))
|
||||
(not (logtest? (-> self control status) (collide-status on-surface)))
|
||||
)
|
||||
(and (logtest? (focus-status board) (-> self focus-status))
|
||||
(and (focus-test? self board)
|
||||
(< (- (-> self clock frame-counter) (-> self board unknown-time-frame00)) (seconds 0.1))
|
||||
)
|
||||
)
|
||||
@@ -1174,7 +1133,7 @@
|
||||
(logclear! (-> self focus-status) (focus-status on-water))
|
||||
)
|
||||
(if (and (logtest? (-> self water flags) (water-flags under-water))
|
||||
(zero? (logand (-> self water flags) (water-flags swim-ground)))
|
||||
(not (logtest? (-> self water flags) (water-flags swim-ground)))
|
||||
)
|
||||
(logior! (-> self focus-status) (focus-status under-water))
|
||||
(logclear! (-> self focus-status) (focus-status under-water))
|
||||
@@ -1191,8 +1150,6 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for function target-powerup-effect
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defbehavior target-powerup-effect target ((arg0 symbol))
|
||||
(case arg0
|
||||
(('eco-blue)
|
||||
@@ -1205,8 +1162,6 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for function process-contact-action
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defbehavior process-contact-action target ((arg0 process))
|
||||
(when (logtest? (-> *game-info* features) (game-feature unk-game-feature-01))
|
||||
(if arg0
|
||||
@@ -1217,7 +1172,3 @@
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -263,7 +263,7 @@
|
||||
)
|
||||
(when (and v1-11
|
||||
(logtest? (-> v1-11 mask) (process-mask target))
|
||||
(zero? (logand (-> v1-11 focus-status) (focus-status on-water under-water)))
|
||||
(not (logtest? (-> v1-11 focus-status) (focus-status on-water under-water)))
|
||||
)
|
||||
(when (not (logtest? (-> obj flags) (rigid-body-object-flag player-impulse-force)))
|
||||
(logior! (-> obj flags) (rigid-body-object-flag player-contact-force))
|
||||
|
||||
@@ -260,7 +260,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(if (and a0-1 (logtest? (focus-status pilot) (-> a0-1 focus-status)))
|
||||
(if (and a0-1 (focus-test? a0-1 pilot))
|
||||
(send-event
|
||||
(ppointer->process (-> self parent-override))
|
||||
'set-dist
|
||||
@@ -472,9 +472,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(when (and s4-0
|
||||
(begin (send-event s5-2 'change-mode 'board #f) (logtest? (focus-status board) (-> s5-2 focus-status)))
|
||||
)
|
||||
(when (and s4-0 (begin (send-event s5-2 'change-mode 'board #f) (focus-test? s5-2 board)))
|
||||
(change-parent self (ppointer->process s4-0))
|
||||
(try-update-focus (-> self focus) s5-2)
|
||||
(#when PC_PORT
|
||||
|
||||
@@ -353,7 +353,7 @@
|
||||
(send-event (the-as process-tree gp-0) 'heat (* 10.0 (-> self clock seconds-per-frame)))
|
||||
)
|
||||
(('drown-death 'lava 'dark-eco-pool)
|
||||
(if (and (not (logtest? (focus-status board) (-> (the-as process-focusable gp-0) focus-status)))
|
||||
(if (and (not (focus-test? (the-as process-focusable gp-0) board))
|
||||
(let ((a1-10 (new 'stack-no-clear 'event-message-block)))
|
||||
(set! (-> a1-10 from) (process->ppointer self))
|
||||
(set! (-> a1-10 num-params) 2)
|
||||
@@ -371,7 +371,7 @@
|
||||
)
|
||||
)
|
||||
(else
|
||||
(if (and (not (logtest? (focus-status board) (-> (the-as process-focusable gp-0) focus-status)))
|
||||
(if (and (not (focus-test? (the-as process-focusable gp-0) board))
|
||||
(let ((a1-13 (new 'stack-no-clear 'event-message-block)))
|
||||
(set! (-> a1-13 from) (process->ppointer self))
|
||||
(set! (-> a1-13 num-params) 2)
|
||||
|
||||
@@ -787,7 +787,7 @@
|
||||
(set! (-> obj drip-speed) 15.0)
|
||||
)
|
||||
(if (and (not (logtest? (water-flags touch-water) (-> obj flags)))
|
||||
(zero? (logand (-> obj process focus-status) (focus-status touch-water)))
|
||||
(not (logtest? (-> obj process focus-status) (focus-status touch-water)))
|
||||
)
|
||||
(enter-water obj)
|
||||
)
|
||||
@@ -976,7 +976,7 @@
|
||||
)
|
||||
(if (and (logtest? (-> obj flags) (water-flags swim-ground))
|
||||
(and v1-237
|
||||
(zero? (logand (-> (the-as collide-shape-moving (-> obj process control)) status) (collide-status on-water)))
|
||||
(not (logtest? (-> (the-as collide-shape-moving (-> obj process control)) status) (collide-status on-water)))
|
||||
)
|
||||
)
|
||||
(set! (-> obj bob amp) (* 0.8 (-> obj bob amp)))
|
||||
@@ -1015,7 +1015,7 @@
|
||||
(cond
|
||||
((and (logtest? (-> obj flags) (water-flags swim-ground))
|
||||
(logtest? (-> (the-as collide-shape-moving (-> obj process control)) status) (collide-status touch-surface))
|
||||
(zero? (logand (water-flags jump-out) (-> obj flags)))
|
||||
(not (logtest? (water-flags jump-out) (-> obj flags)))
|
||||
)
|
||||
(let ((v1-260 (new 'stack-no-clear 'vector)))
|
||||
(set! (-> v1-260 quad) (-> obj bottom 0 quad))
|
||||
@@ -1023,7 +1023,7 @@
|
||||
(let ((s3-3 (the-as collide-shape-moving (-> obj process control))))
|
||||
(when (and (not (logtest? (-> s3-3 status) (collide-status touch-background)))
|
||||
(logtest? (water-flags swimming) (-> obj flags))
|
||||
(zero? (logand (focus-status board pilot) (-> obj process focus-status)))
|
||||
(not (logtest? (focus-status board pilot) (-> obj process focus-status)))
|
||||
)
|
||||
(let ((a1-42 (vector-! (new 'stack-no-clear 'vector) v1-260 (-> (the-as control-info s3-3) trans))))
|
||||
(vector-float*! a1-42 a1-42 (-> pp clock frames-per-second))
|
||||
@@ -1036,7 +1036,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
((and (< (-> obj bottom 0 y) f30-1) (zero? (logand (water-flags jump-out) (-> obj flags))))
|
||||
((and (< (-> obj bottom 0 y) f30-1) (not (logtest? (water-flags jump-out) (-> obj flags))))
|
||||
(logior! (-> obj flags) (water-flags under-water))
|
||||
)
|
||||
)
|
||||
@@ -1054,7 +1054,7 @@
|
||||
(send-event (-> obj process) 'wade)
|
||||
(set! (-> obj flags) (logior (water-flags wading) (-> obj flags)))
|
||||
)
|
||||
((and (< (-> obj bottom 0 y) f30-1) (zero? (logand (water-flags jump-out) (-> obj flags))))
|
||||
((and (< (-> obj bottom 0 y) f30-1) (not (logtest? (water-flags jump-out) (-> obj flags))))
|
||||
(logior! (-> obj flags) (water-flags under-water))
|
||||
)
|
||||
)
|
||||
@@ -1085,7 +1085,7 @@
|
||||
(when (and (logtest? (-> (the-as collide-shape-moving (-> obj process control)) status)
|
||||
(collide-status on-surface on-water)
|
||||
)
|
||||
(zero? (logand (focus-status board pilot) (-> obj process focus-status)))
|
||||
(not (logtest? (focus-status board pilot) (-> obj process focus-status)))
|
||||
)
|
||||
(when (< (-> obj process control trans y) (+ -1228.8 (-> obj base-height)))
|
||||
(send-event (-> obj process) 'no-look-around (seconds 1.5))
|
||||
@@ -1569,7 +1569,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(when (and a0-39 (zero? (logand (focus-status mech) (-> (the-as process-focusable a0-39) focus-status))))
|
||||
(when (and a0-39 (not (logtest? (focus-status mech) (-> (the-as process-focusable a0-39) focus-status))))
|
||||
(set! (-> arg0 flags) (water-flags))
|
||||
0
|
||||
)
|
||||
@@ -1653,7 +1653,7 @@
|
||||
(water-info<-region s3-0 (-> (scratchpad-object region-prim-area) region-prim-list items s2-1) obj arg1)
|
||||
(when (and (logtest? (-> s3-0 flags) (water-flags active))
|
||||
(logtest? (water-flags touch-water) (-> s3-0 flags))
|
||||
(zero? (logand (-> s3-0 extra-flags) 1))
|
||||
(not (logtest? (-> s3-0 extra-flags) 1))
|
||||
)
|
||||
(mem-copy! (the-as pointer arg0) (the-as pointer s3-0) 60)
|
||||
(set! arg0 arg0)
|
||||
|
||||
@@ -1111,7 +1111,7 @@
|
||||
(if (= arg1 (debug-menu-msg press))
|
||||
(logxor! (-> v1-0 flags) (prototype-flags disable))
|
||||
)
|
||||
(zero? (logand (-> v1-0 flags) (prototype-flags disable)))
|
||||
(not (logtest? (-> v1-0 flags) (prototype-flags disable)))
|
||||
)
|
||||
(else
|
||||
#f
|
||||
|
||||
@@ -164,7 +164,7 @@
|
||||
(.mov a0-1 vf10)
|
||||
(.pcgtw a0-2 0 a0-1)
|
||||
(.ppach a0-3 (the-as uint128 0) a0-2)
|
||||
(zero? (logand (the-as int v1-3) (the-as int a0-3)))
|
||||
(not (logtest? (the-as int v1-3) (the-as int a0-3)))
|
||||
)
|
||||
)
|
||||
|
||||
@@ -1026,7 +1026,7 @@
|
||||
(when (and (nonzero? (-> dc shadow-ctrl))
|
||||
(-> dc shadow-ctrl)
|
||||
(not (logtest? (-> dc shadow-ctrl settings flags) (shadow-flags disable-draw)))
|
||||
(zero? (logand (-> dc shadow-ctrl settings flags) (shadow-flags shdf07)))
|
||||
(not (logtest? (-> dc shadow-ctrl settings flags) (shadow-flags shdf07)))
|
||||
)
|
||||
(let ((target-shadow-dir (new 'stack-no-clear 'vector))
|
||||
(current-shadow-dir (-> dc shadow-ctrl settings shadow-dir))
|
||||
@@ -1603,25 +1603,7 @@
|
||||
(t1-2 (the-as object (-> t0-1 base)))
|
||||
)
|
||||
(set! (-> (the-as gs-gif-tag t1-2) tag) (new 'static 'gif-tag64 :nloop #x1 :eop #x1 :nreg #x9))
|
||||
(set! (-> (the-as gs-gif-tag t1-2) regs) (new 'static 'gif-tag-regs
|
||||
:regs0 (gif-reg-id a+d)
|
||||
:regs1 (gif-reg-id a+d)
|
||||
:regs2 (gif-reg-id a+d)
|
||||
:regs3 (gif-reg-id a+d)
|
||||
:regs4 (gif-reg-id a+d)
|
||||
:regs5 (gif-reg-id a+d)
|
||||
:regs6 (gif-reg-id a+d)
|
||||
:regs7 (gif-reg-id a+d)
|
||||
:regs8 (gif-reg-id a+d)
|
||||
:regs9 (gif-reg-id a+d)
|
||||
:regs10 (gif-reg-id a+d)
|
||||
:regs11 (gif-reg-id a+d)
|
||||
:regs12 (gif-reg-id a+d)
|
||||
:regs13 (gif-reg-id a+d)
|
||||
:regs14 (gif-reg-id a+d)
|
||||
:regs15 (gif-reg-id a+d)
|
||||
)
|
||||
)
|
||||
(set! (-> (the-as gs-gif-tag t1-2) regs) GIF_REGS_ALL_AD)
|
||||
(set! (-> t0-1 base) (&+ (the-as pointer t1-2) 16))
|
||||
)
|
||||
(let* ((t0-2 a0-8)
|
||||
@@ -1680,25 +1662,7 @@
|
||||
(t1-2 (the-as object (-> t0-2 base)))
|
||||
)
|
||||
(set! (-> (the-as gs-gif-tag t1-2) tag) (new 'static 'gif-tag64 :nloop #x1 :eop #x1 :nreg #x9))
|
||||
(set! (-> (the-as gs-gif-tag t1-2) regs) (new 'static 'gif-tag-regs
|
||||
:regs0 (gif-reg-id a+d)
|
||||
:regs1 (gif-reg-id a+d)
|
||||
:regs2 (gif-reg-id a+d)
|
||||
:regs3 (gif-reg-id a+d)
|
||||
:regs4 (gif-reg-id a+d)
|
||||
:regs5 (gif-reg-id a+d)
|
||||
:regs6 (gif-reg-id a+d)
|
||||
:regs7 (gif-reg-id a+d)
|
||||
:regs8 (gif-reg-id a+d)
|
||||
:regs9 (gif-reg-id a+d)
|
||||
:regs10 (gif-reg-id a+d)
|
||||
:regs11 (gif-reg-id a+d)
|
||||
:regs12 (gif-reg-id a+d)
|
||||
:regs13 (gif-reg-id a+d)
|
||||
:regs14 (gif-reg-id a+d)
|
||||
:regs15 (gif-reg-id a+d)
|
||||
)
|
||||
)
|
||||
(set! (-> (the-as gs-gif-tag t1-2) regs) GIF_REGS_ALL_AD)
|
||||
(set! (-> t0-2 base) (&+ (the-as pointer t1-2) 16))
|
||||
)
|
||||
(let* ((t0-3 a3-2)
|
||||
@@ -2224,4 +2188,3 @@
|
||||
(display-sync arg0)
|
||||
(none)
|
||||
)
|
||||
|
||||
|
||||
@@ -360,7 +360,7 @@
|
||||
)
|
||||
(dotimes (s3-0 s4-0)
|
||||
(let ((a0-3 (entity-actor-lookup (-> arg0 entity) 'alt-actor s3-0)))
|
||||
(if (or (not a0-3) (zero? (logand (-> a0-3 extra perm status) (entity-perm-status subtask-complete))))
|
||||
(if (or (not a0-3) (not (logtest? (-> a0-3 extra perm status) (entity-perm-status subtask-complete))))
|
||||
(+! gp-0 1)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -737,7 +737,7 @@
|
||||
)
|
||||
|
||||
(defun update-actor-vis-box ((arg0 process-drawable) (arg1 vector) (arg2 vector))
|
||||
(when (and arg0 (nonzero? (-> arg0 draw)) (zero? (logand (-> arg0 draw status) (draw-control-status no-draw))))
|
||||
(when (and arg0 (nonzero? (-> arg0 draw)) (not (logtest? (-> arg0 draw status) (draw-control-status no-draw))))
|
||||
(let ((v1-5 (-> arg0 draw origin))
|
||||
(f0-0 (-> arg0 draw bounds w))
|
||||
)
|
||||
@@ -2144,7 +2144,7 @@
|
||||
(dotimes (s2-0 s3-1)
|
||||
(let ((v1-54 (-> s4-2 data s2-0)))
|
||||
(cond
|
||||
((and (logtest? (-> v1-54 kill-mask) (task-mask special)) (zero? (logand (-> v1-54 kill-mask) sv-32)))
|
||||
((and (logtest? (-> v1-54 kill-mask) (task-mask special)) (not (logtest? (-> v1-54 kill-mask) sv-32)))
|
||||
(when (not (or (-> v1-54 process) (logtest? (-> v1-54 perm status) (entity-perm-status bit-0 dead))))
|
||||
(birth! (-> v1-54 entity))
|
||||
(set! sv-24 (+ sv-24 1))
|
||||
@@ -2156,7 +2156,7 @@
|
||||
(else
|
||||
(if (and (-> v1-54 process)
|
||||
(not (logtest? (-> v1-54 perm status) (entity-perm-status no-kill)))
|
||||
(zero? (logand (-> v1-54 process mask) (process-mask no-kill)))
|
||||
(not (logtest? (-> v1-54 process mask) (process-mask no-kill)))
|
||||
)
|
||||
(kill! (-> v1-54 entity))
|
||||
)
|
||||
@@ -2185,7 +2185,7 @@
|
||||
(else
|
||||
(if (and (-> v1-67 process)
|
||||
(not (logtest? (-> v1-67 perm status) (entity-perm-status no-kill)))
|
||||
(zero? (logand (-> v1-67 process mask) (process-mask no-kill)))
|
||||
(not (logtest? (-> v1-67 process mask) (process-mask no-kill)))
|
||||
)
|
||||
(kill! (-> v1-67 entity))
|
||||
)
|
||||
@@ -2204,7 +2204,7 @@
|
||||
(cond
|
||||
((and (< (vector-vector-distance (-> s1-0 trans) sv-16) (-> *ACTOR-bank* birth-dist))
|
||||
(not (logtest? (-> s1-0 perm status) (entity-perm-status bit-9 bit-10)))
|
||||
(zero? (logand (-> s1-0 kill-mask) sv-32))
|
||||
(not (logtest? (-> s1-0 kill-mask) sv-32))
|
||||
)
|
||||
(when (not (or (-> s1-0 process) (logtest? (-> s1-0 perm status) (entity-perm-status bit-0 dead))))
|
||||
(birth! (-> s1-0 entity))
|
||||
@@ -2217,7 +2217,7 @@
|
||||
(else
|
||||
(if (and (-> s1-0 process)
|
||||
(not (logtest? (-> s1-0 perm status) (entity-perm-status no-kill)))
|
||||
(zero? (logand (-> s1-0 process mask) (process-mask no-kill)))
|
||||
(not (logtest? (-> s1-0 process mask) (process-mask no-kill)))
|
||||
)
|
||||
(kill! (-> s1-0 entity))
|
||||
)
|
||||
@@ -2263,7 +2263,7 @@
|
||||
(else
|
||||
(when (and (-> sv-48 process)
|
||||
(not (logtest? (-> sv-48 perm status) (entity-perm-status no-kill)))
|
||||
(zero? (logand (-> sv-48 process mask) (process-mask no-kill)))
|
||||
(not (logtest? (-> sv-48 process mask) (process-mask no-kill)))
|
||||
)
|
||||
(kill! (-> sv-48 entity))
|
||||
(set! sv-24 (+ sv-24 1))
|
||||
|
||||
@@ -103,10 +103,10 @@
|
||||
)
|
||||
(when v1-33
|
||||
(cond
|
||||
((logtest? (-> v1-33 focus-status) (focus-status in-air))
|
||||
((focus-test? v1-33 in-air)
|
||||
(set! (-> arg0 reg 0) (the-as uint 126))
|
||||
)
|
||||
((logtest? (-> v1-33 focus-status) (focus-status touch-water))
|
||||
((focus-test? v1-33 touch-water)
|
||||
(set! (-> arg0 reg 0) (the-as uint 127))
|
||||
)
|
||||
(else
|
||||
@@ -1146,11 +1146,11 @@
|
||||
|
||||
(defbehavior target-land-effect target ()
|
||||
(cond
|
||||
((logtest? (-> self focus-status) (focus-status flut))
|
||||
((focus-test? self flut)
|
||||
(do-effect (-> self skel effect) 'effect-land-poof -1.0 -1)
|
||||
(do-effect (-> self skel effect) 'effect-flut-land -1.0 -1)
|
||||
)
|
||||
((logtest? (focus-status pilot) (-> self focus-status))
|
||||
((focus-test? self pilot)
|
||||
(sound-play-by-name
|
||||
(sound-name-with-material "zoom-land" (-> self control ground-pat) "")
|
||||
(new-sound-id)
|
||||
|
||||
@@ -241,7 +241,7 @@
|
||||
'pause
|
||||
)
|
||||
;; not debugging, not pressing start, should pause if possible
|
||||
((and (not *debug-segment*) (zero? (logand (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons start))))
|
||||
((and (not *debug-segment*) (not (logtest? (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons start))))
|
||||
(if (pause-allowed?)
|
||||
'pause
|
||||
*master-mode* ;; and if we can't, reject
|
||||
@@ -1224,7 +1224,7 @@
|
||||
(cond
|
||||
((and (= *kernel-boot-message* 'demo) (not *master-exit*))
|
||||
(let ((v1-109 (level-get-target-inside *level*)))
|
||||
(when (and v1-109 (!= (-> v1-109 name) 'demo) (zero? (logand (-> v1-109 info level-flags) 1)))
|
||||
(when (and v1-109 (!= (-> v1-109 name) 'demo) (not (logtest? (-> v1-109 info level-flags) 1)))
|
||||
(persist-with-delay *setting-control* 'sfx-volume (seconds 0.5) 'sfx-volume 'abs 0.0 0)
|
||||
(persist-with-delay *setting-control* 'music-volume (seconds 0.5) 'music-volume 'abs 0.0 0)
|
||||
(persist-with-delay *setting-control* 'dialog-volume (seconds 0.5) 'dialog-volume 'abs 0.0 0)
|
||||
|
||||
@@ -1269,7 +1269,7 @@
|
||||
(let ((s4-1 (-> obj cam-target)))
|
||||
(set! (-> s5-1 entity-or-mode-changed) #f)
|
||||
(if (and (not (name= (-> s5-1 entity-name) (-> s4-1 entity-name)))
|
||||
(or (not *target*) (zero? (logand (-> *target* focus-status) (-> s4-1 entity-mask))))
|
||||
(or (not *target*) (not (logtest? (-> *target* focus-status) (-> s4-1 entity-mask))))
|
||||
)
|
||||
(set! (-> s4-1 entity-or-mode-changed) #t)
|
||||
)
|
||||
|
||||
@@ -189,7 +189,6 @@
|
||||
0
|
||||
)
|
||||
|
||||
|
||||
(defmethod level-method-22 level ((obj level) (arg0 symbol))
|
||||
(if (= arg0 'none)
|
||||
(return 0)
|
||||
@@ -533,14 +532,14 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(if (or (and *target* (logtest? (-> *target* focus-status) (focus-status dead)) mgr-status) (= mgr-status 'busy))
|
||||
(if (or (and *target* (focus-test? *target* dead) mgr-status) (= mgr-status 'busy))
|
||||
(return (the-as int #f))
|
||||
)
|
||||
)
|
||||
(when restart?
|
||||
(let ((gp-1 0))
|
||||
(let ((cur-lev (level-get-target-inside *level*)))
|
||||
(when (and cur-lev (zero? (logand (-> cur-lev info level-flags) 1)))
|
||||
(when (and cur-lev (not (logtest? (-> cur-lev info level-flags) 1)))
|
||||
(let ((game-nodes (-> *game-info* sub-task-list)))
|
||||
(dotimes (i (-> game-nodes length))
|
||||
(when (nonzero? i)
|
||||
@@ -619,7 +618,7 @@
|
||||
(when (nonzero? i)
|
||||
(let ((node (-> game-nodes i)))
|
||||
(when (string= arg0 (-> node name))
|
||||
(let ((gp-2 (zero? (logand (-> node flags) (game-task-node-flag closed)))))
|
||||
(let ((gp-2 (not (logtest? (-> node flags) (game-task-node-flag closed)))))
|
||||
(close! node 'event)
|
||||
(return gp-2)
|
||||
)
|
||||
@@ -659,7 +658,7 @@
|
||||
(begin
|
||||
(dotimes (a3-3 4)
|
||||
(when (and (nonzero? (-> node parent-node a3-3))
|
||||
(zero? (logand (-> game-nodes (-> node parent-node a3-3) flags) (game-task-node-flag closed)))
|
||||
(not (logtest? (-> game-nodes (-> node parent-node a3-3) flags) (game-task-node-flag closed)))
|
||||
)
|
||||
(set! a3-4 #f)
|
||||
(goto cfg-14)
|
||||
@@ -820,7 +819,7 @@
|
||||
(begin
|
||||
(dotimes (ii 4)
|
||||
(when (and (nonzero? (-> node parent-node ii))
|
||||
(zero? (logand (-> game-nodes (-> node parent-node ii) flags) (game-task-node-flag closed)))
|
||||
(not (logtest? (-> game-nodes (-> node parent-node ii) flags) (game-task-node-flag closed)))
|
||||
)
|
||||
(set! v1-19 #t)
|
||||
(goto cfg-17)
|
||||
@@ -858,7 +857,7 @@
|
||||
(begin
|
||||
(dotimes (pi 4)
|
||||
(let ((t0-0 (-> node-info parent-node pi)))
|
||||
(when (and (nonzero? t0-0) (zero? (logand (-> game-nodes t0-0 flags) (game-task-node-flag closed))))
|
||||
(when (and (nonzero? t0-0) (not (logtest? (-> game-nodes t0-0 flags) (game-task-node-flag closed))))
|
||||
(set! a1-1 #f)
|
||||
(goto cfg-12)
|
||||
)
|
||||
@@ -975,7 +974,7 @@
|
||||
)
|
||||
(('life)
|
||||
(if (and (not (task-complete? *game-info* (-> node task)))
|
||||
(zero? (logand (-> node flags) (game-task-node-flag save-on-life)))
|
||||
(not (logtest? (-> node flags) (game-task-node-flag save-on-life)))
|
||||
)
|
||||
(logclear! (-> node flags) (game-task-node-flag closed))
|
||||
)
|
||||
@@ -1497,7 +1496,7 @@
|
||||
(none)
|
||||
)
|
||||
:code (behavior ()
|
||||
(when (and *target* (logtest? (-> *target* focus-status) (focus-status dead)))
|
||||
(when (and *target* (focus-test? *target* dead))
|
||||
(if (and (logtest? (-> self flags) (fail-mission-flags famflags-3)) (zero? (-> self message)))
|
||||
(deactivate self)
|
||||
)
|
||||
@@ -1508,7 +1507,7 @@
|
||||
(case (-> self message)
|
||||
(((fail-mission-message fammsg-0))
|
||||
(while (begin
|
||||
(if (and *target* (logtest? (-> *target* focus-status) (focus-status grabbed)))
|
||||
(if (and *target* (focus-test? *target* grabbed))
|
||||
(process-release? *target*)
|
||||
)
|
||||
(let ((a1-0 (new 'stack-no-clear 'event-message-block)))
|
||||
@@ -1526,10 +1525,7 @@
|
||||
(set! (-> v1-24 mode) 'bot)
|
||||
(set! (-> a1-0 param 1) (the-as uint v1-24))
|
||||
)
|
||||
(not (or (send-event-function *target* a1-0)
|
||||
(and *target* (logtest? (-> *target* focus-status) (focus-status dead)))
|
||||
)
|
||||
)
|
||||
(not (or (send-event-function *target* a1-0) (and *target* (focus-test? *target* dead))))
|
||||
)
|
||||
)
|
||||
(suspend)
|
||||
@@ -1713,7 +1709,7 @@
|
||||
(else
|
||||
(task-node-reset 'life)
|
||||
(update-task-masks 'life)
|
||||
(if (and *target* (logtest? (-> *target* focus-status) (focus-status dead grabbed)))
|
||||
(if (and *target* (focus-test? *target* dead grabbed))
|
||||
(send-event *target* 'end-mode)
|
||||
)
|
||||
)
|
||||
@@ -1759,7 +1755,7 @@
|
||||
(the-as process #f)
|
||||
)
|
||||
(when (not (logtest? (-> arg0 flags) (fail-mission-flags famflags-4)))
|
||||
(if (not (and *target* (logtest? (-> *target* focus-status) (focus-status dead)) (zero? (-> self message))))
|
||||
(if (not (and *target* (focus-test? *target* dead) (zero? (-> self message))))
|
||||
(set! (-> self stinger)
|
||||
(the-as uint (add-process *gui-control* *target* (gui-channel background) (gui-action play) "lose1" -99.0 0))
|
||||
)
|
||||
@@ -1831,7 +1827,7 @@
|
||||
(add-setting! 'task arg0 0 0)
|
||||
(add-setting! 'task-manager (process->ppointer self) 0 0)
|
||||
(set! (-> self intro-time) (-> self clock frame-counter))
|
||||
(set! (-> self fail-on-death?) (zero? (logand (-> arg0 flags) (game-task-node-flag no-fail-on-death))))
|
||||
(set! (-> self fail-on-death?) (not (logtest? (-> arg0 flags) (game-task-node-flag no-fail-on-death))))
|
||||
(when arg1
|
||||
(let* ((v1-15 (level-get *level* arg1))
|
||||
(a1-6 (if (and (nonzero? (-> v1-15 entity)) (> (-> v1-15 entity length) 0))
|
||||
@@ -2056,7 +2052,7 @@
|
||||
(or (zero? (-> obj info intro-delay))
|
||||
(>= (- (-> pp clock frame-counter) (-> obj intro-time)) (the-as time-frame (-> obj info intro-delay)))
|
||||
)
|
||||
(and *target* (zero? (logand (focus-status dead teleporting) (-> *target* focus-status))))
|
||||
(and *target* (not (logtest? (focus-status dead teleporting) (-> *target* focus-status))))
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -451,7 +451,7 @@ renderers that want a single matrix.
|
||||
(.add.vf vf28 vf28 vf30)
|
||||
(.max.x.vf vf28 vf28 vf0 :mask #b1000)
|
||||
(.svf (&-> arg0 quad) vf28)
|
||||
(zero? (logand clip 63))
|
||||
(not (logtest? clip 63))
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -525,7 +525,7 @@ renderers that want a single matrix.
|
||||
;; store result!
|
||||
(.svf (&-> arg0 quad) vf28)
|
||||
;; return result of clipping.
|
||||
(zero? (logand clip 63))
|
||||
(not (logtest? clip 63))
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
)
|
||||
|
||||
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defbehavior update-mood-default-interior time-of-day-proc ((arg0 mood-context))
|
||||
(update-mood-interior arg0)
|
||||
(cond
|
||||
@@ -50,7 +49,6 @@
|
||||
)
|
||||
|
||||
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defun update-vinroom-lights ((arg0 mood-context))
|
||||
(let ((v1-0 (-> arg0 light-group)))
|
||||
(set-vector! (-> arg0 current-env-color) 48.0 60.0 96.0 255.0)
|
||||
@@ -77,7 +75,6 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defbehavior update-mood-vinroom time-of-day-proc ((arg0 mood-context))
|
||||
(update-mood-interior arg0)
|
||||
(update-vinroom-lights arg0)
|
||||
@@ -136,7 +133,6 @@
|
||||
)
|
||||
|
||||
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defun update-hideout-lights ((arg0 mood-context))
|
||||
(let ((a2-0 (-> arg0 light-group))
|
||||
(a1-0 (-> arg0 light-group 1))
|
||||
@@ -177,7 +173,6 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defbehavior update-mood-hideout time-of-day-proc ((arg0 mood-context))
|
||||
(update-mood-interior arg0)
|
||||
(update-hideout-lights arg0)
|
||||
@@ -217,7 +212,6 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defbehavior update-mood-copy-hideout time-of-day-proc ((arg0 mood-context))
|
||||
(let ((v1-1 (level-get *level* 'hideout)))
|
||||
(if (and v1-1 (= (-> v1-1 status) 'active))
|
||||
@@ -419,7 +413,6 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defun update-hiphog-lights ((arg0 mood-context))
|
||||
(let ((t1-0 (-> arg0 light-group))
|
||||
(t0-0 (-> arg0 light-group 1))
|
||||
@@ -541,7 +534,6 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defbehavior update-mood-hiphog time-of-day-proc ((arg0 mood-context) (arg1 float))
|
||||
(update-mood-interior arg0)
|
||||
(update-hiphog-lights arg0)
|
||||
@@ -705,7 +697,7 @@
|
||||
(set! (-> s5-0 clock-sun) (the-as uint (the int (rand-vu-float-range 64.0 192.0))))
|
||||
(set! (-> s5-0 clock-moon) (the-as uint (the int (rand-vu-float-range 64.0 192.0))))
|
||||
)
|
||||
(if (and (-> s5-0 door) (zero? (logand (-> s5-0 door extra perm status) (entity-perm-status subtask-complete))))
|
||||
(if (and (-> s5-0 door) (not (logtest? (-> s5-0 door extra perm status) (entity-perm-status subtask-complete))))
|
||||
(set! (-> arg0 times 0 quad) (-> *level* default-level mood-context times 0 quad))
|
||||
)
|
||||
)
|
||||
@@ -728,7 +720,6 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defbehavior update-mood-copy-hiphog time-of-day-proc ((arg0 mood-context))
|
||||
(let ((v1-1 (level-get *level* 'hiphog)))
|
||||
(if (and v1-1 (= (-> v1-1 status) 'active))
|
||||
@@ -753,7 +744,6 @@
|
||||
)
|
||||
|
||||
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defun update-sewer-lights ((arg0 mood-context))
|
||||
(let ((v1-0 (-> arg0 light-group)))
|
||||
(set-vector! (-> v1-0 0 dir0 color) 0.822 0.694 0.613 1.0)
|
||||
@@ -834,7 +824,6 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defbehavior update-mood-sewer time-of-day-proc ((arg0 mood-context))
|
||||
(update-mood-interior arg0)
|
||||
(update-sewer-lights arg0)
|
||||
@@ -917,7 +906,6 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defbehavior update-mood-copy-sewerb time-of-day-proc ((arg0 mood-context))
|
||||
(let ((v1-1 (level-get *level* 'sewerb)))
|
||||
(if (and v1-1 (= (-> v1-1 status) 'active))
|
||||
@@ -928,7 +916,6 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defbehavior update-mood-copy-sewescb time-of-day-proc ((arg0 mood-context))
|
||||
(let ((v1-1 (level-get *level* 'sewescb)))
|
||||
(if (and v1-1 (= (-> v1-1 status) 'active))
|
||||
@@ -956,11 +943,8 @@
|
||||
(defun set-sewer-turret-flash! ()
|
||||
(let ((v1-1 (level-get *level* 'sewerb)))
|
||||
(when v1-1
|
||||
(let ((v1-2 (the-as sewer-states (-> v1-1 mood-context state)))
|
||||
(f0-0 1.0)
|
||||
)
|
||||
(set! (-> v1-2 turret-value) f0-0)
|
||||
f0-0
|
||||
(let ((v1-2 (the-as sewer-states (-> v1-1 mood-context state))))
|
||||
(set! (-> v1-2 turret-value) 1.0)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -969,11 +953,8 @@
|
||||
(defun set-sewesc-explosion! ()
|
||||
(let ((v1-1 (level-get *level* 'sewescb)))
|
||||
(when v1-1
|
||||
(let ((v1-2 (the-as sewer-states (-> v1-1 mood-context state)))
|
||||
(f0-0 1.9921875)
|
||||
)
|
||||
(set! (-> v1-2 explosion) f0-0)
|
||||
f0-0
|
||||
(let ((v1-2 (the-as sewer-states (-> v1-1 mood-context state))))
|
||||
(set! (-> v1-2 explosion) 1.9921875)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -993,7 +974,6 @@
|
||||
)
|
||||
|
||||
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defun update-onintent-lights ((arg0 mood-context))
|
||||
(let ((v1-0 (-> arg0 light-group)))
|
||||
(set-vector! (-> v1-0 0 dir0 color) 0.822 0.694 0.613 1.0)
|
||||
@@ -1003,7 +983,6 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defbehavior update-mood-onintent time-of-day-proc ((arg0 mood-context))
|
||||
(update-mood-interior arg0)
|
||||
(update-onintent-lights arg0)
|
||||
@@ -1054,7 +1033,6 @@
|
||||
#f
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defbehavior update-mood-oracle time-of-day-proc ((arg0 mood-context))
|
||||
(copy-mood-exterior-ambi arg0 #f)
|
||||
(update-mood-interior arg0)
|
||||
@@ -1124,7 +1102,6 @@
|
||||
)
|
||||
|
||||
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defun update-tomba-lights ((arg0 mood-context))
|
||||
(let ((v1-0 (-> arg0 current-fog)))
|
||||
(set! (-> v1-0 fog-color x) 0.0)
|
||||
@@ -1167,7 +1144,6 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defbehavior update-mood-tomba time-of-day-proc ((arg0 mood-context))
|
||||
(update-mood-interior arg0)
|
||||
(update-tomba-lights arg0)
|
||||
@@ -1203,7 +1179,6 @@
|
||||
)
|
||||
|
||||
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defun update-tombb-lights ((arg0 mood-context))
|
||||
(update-tomba-lights arg0)
|
||||
(let ((v1-0 (-> arg0 light-group 1)))
|
||||
@@ -1238,7 +1213,6 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defbehavior update-mood-tombb time-of-day-proc ((arg0 mood-context))
|
||||
(update-mood-interior arg0)
|
||||
(update-tombb-lights arg0)
|
||||
@@ -1272,15 +1246,11 @@
|
||||
|
||||
|
||||
(defun init-mood-tombc ((arg0 mood-context))
|
||||
(let ((v1-0 (the-as tombc-states (-> arg0 state)))
|
||||
(f0-0 1.0)
|
||||
)
|
||||
(set! (-> v1-0 electricity scale) f0-0)
|
||||
f0-0
|
||||
(let ((v1-0 (the-as tombc-states (-> arg0 state))))
|
||||
(set! (-> v1-0 electricity scale) 1.0)
|
||||
)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defbehavior update-mood-tombc time-of-day-proc ((arg0 mood-context))
|
||||
(update-mood-interior arg0)
|
||||
(update-tomba-lights arg0)
|
||||
@@ -1304,11 +1274,8 @@
|
||||
(defun set-tombc-electricity-scale! ((arg0 float))
|
||||
(let ((v1-1 (level-get *level* 'tombc)))
|
||||
(when v1-1
|
||||
(let ((v1-2 (the-as tombc-states (-> v1-1 mood-context state)))
|
||||
(f0-0 arg0)
|
||||
)
|
||||
(set! (-> v1-2 electricity scale) f0-0)
|
||||
f0-0
|
||||
(let ((v1-2 (the-as tombc-states (-> v1-1 mood-context state))))
|
||||
(set! (-> v1-2 electricity scale) arg0)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -1327,7 +1294,6 @@
|
||||
)
|
||||
|
||||
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defun update-tombd-lights ((arg0 mood-context))
|
||||
(let ((v1-0 (-> arg0 current-fog)))
|
||||
(set! (-> v1-0 fog-color x) 0.0)
|
||||
@@ -1363,7 +1329,6 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defbehavior update-mood-tombd time-of-day-proc ((arg0 mood-context))
|
||||
(update-mood-interior arg0)
|
||||
(update-tombd-lights arg0)
|
||||
@@ -1400,7 +1365,6 @@
|
||||
)
|
||||
|
||||
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defbehavior update-mood-tombe time-of-day-proc ((arg0 mood-context))
|
||||
(update-mood-interior arg0)
|
||||
(update-tomba-lights arg0)
|
||||
@@ -1435,7 +1399,6 @@
|
||||
)
|
||||
|
||||
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defun update-tombboss-lights ((arg0 mood-context))
|
||||
(let ((v1-0 (-> arg0 light-group)))
|
||||
(let ((a1-0 (-> v1-0 0)))
|
||||
@@ -1541,7 +1504,6 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defbehavior update-mood-tombboss time-of-day-proc ((arg0 mood-context))
|
||||
(update-mood-interior arg0)
|
||||
(update-tombboss-lights arg0)
|
||||
@@ -1574,11 +1536,8 @@
|
||||
(defun set-tombboss-gem-light! ((arg0 float))
|
||||
(let ((v1-1 (level-get *level* 'tombboss)))
|
||||
(when v1-1
|
||||
(let ((v1-2 (the-as tombboss-states (-> v1-1 mood-context state)))
|
||||
(f0-0 arg0)
|
||||
)
|
||||
(set! (-> v1-2 gem-light) f0-0)
|
||||
f0-0
|
||||
(let ((v1-2 (the-as tombboss-states (-> v1-1 mood-context state))))
|
||||
(set! (-> v1-2 gem-light) arg0)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -1593,7 +1552,6 @@
|
||||
)
|
||||
|
||||
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defun update-fortress-lights ((arg0 mood-context))
|
||||
(let ((a3-0 (-> arg0 light-group))
|
||||
(a2-0 (-> arg0 light-group 1))
|
||||
@@ -1638,7 +1596,6 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defbehavior update-mood-fortress time-of-day-proc ((arg0 mood-context))
|
||||
(update-mood-interior arg0)
|
||||
(update-fortress-lights arg0)
|
||||
@@ -1668,15 +1625,11 @@
|
||||
|
||||
|
||||
(defun init-mood-fordumpa ((arg0 mood-context))
|
||||
(let ((v1-0 (the-as fordumpa-states (-> arg0 state)))
|
||||
(f0-0 0.0)
|
||||
)
|
||||
(set! (-> v1-0 electricity scale) f0-0)
|
||||
f0-0
|
||||
(let ((v1-0 (the-as fordumpa-states (-> arg0 state))))
|
||||
(set! (-> v1-0 electricity scale) 0.0)
|
||||
)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defbehavior update-mood-fordumpa time-of-day-proc ((arg0 mood-context))
|
||||
(update-mood-interior arg0)
|
||||
(update-fortress-lights arg0)
|
||||
@@ -1709,11 +1662,8 @@
|
||||
(defun set-fordumpa-turret-flash! ((arg0 int))
|
||||
(let ((v1-1 (level-get *level* 'fordumpa)))
|
||||
(when v1-1
|
||||
(let ((v1-2 (the-as fordumpa-states (-> v1-1 mood-context state)))
|
||||
(f0-0 1.0)
|
||||
)
|
||||
(set! (-> v1-2 turret-value arg0) f0-0)
|
||||
f0-0
|
||||
(let ((v1-2 (the-as fordumpa-states (-> v1-1 mood-context state))))
|
||||
(set! (-> v1-2 turret-value arg0) 1.0)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -1722,11 +1672,8 @@
|
||||
(defun set-fordumpa-electricity-scale! ((arg0 float))
|
||||
(let ((v1-1 (level-get *level* 'fordumpa)))
|
||||
(when v1-1
|
||||
(let ((v1-2 (the-as fordumpa-states (-> v1-1 mood-context state)))
|
||||
(f0-0 arg0)
|
||||
)
|
||||
(set! (-> v1-2 electricity scale) f0-0)
|
||||
f0-0
|
||||
(let ((v1-2 (the-as fordumpa-states (-> v1-1 mood-context state))))
|
||||
(set! (-> v1-2 electricity scale) arg0)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -1749,7 +1696,6 @@
|
||||
#f
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defbehavior update-mood-fordumpc time-of-day-proc ((arg0 mood-context))
|
||||
(update-mood-interior arg0)
|
||||
(update-fortress-lights arg0)
|
||||
@@ -1799,14 +1745,10 @@
|
||||
(defun init-mood-forresca ((arg0 mood-context))
|
||||
(let ((v1-0 (the-as forresca-states (-> arg0 state))))
|
||||
(set! (-> v1-0 electricity 0 scale) 1.0)
|
||||
(let ((f0-1 1.0))
|
||||
(set! (-> v1-0 electricity 1 scale) f0-1)
|
||||
f0-1
|
||||
)
|
||||
(set! (-> v1-0 electricity 1 scale) 1.0)
|
||||
)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defbehavior update-mood-forresca time-of-day-proc ((arg0 mood-context))
|
||||
(update-mood-interior arg0)
|
||||
(update-fortress-lights arg0)
|
||||
@@ -1829,11 +1771,8 @@
|
||||
(defun set-forresca-electricity-scale! ((arg0 float) (arg1 int))
|
||||
(let ((v1-1 (level-get *level* 'forresca)))
|
||||
(when v1-1
|
||||
(let ((v1-2 (the-as object (-> v1-1 mood-context state)))
|
||||
(f0-0 arg0)
|
||||
)
|
||||
(set! (-> (the-as forresca-states v1-2) electricity arg1 scale) f0-0)
|
||||
f0-0
|
||||
(let ((v1-2 (the-as object (-> v1-1 mood-context state))))
|
||||
(set! (-> (the-as forresca-states v1-2) electricity arg1 scale) arg0)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -1852,14 +1791,10 @@
|
||||
(defun init-mood-forrescb ((arg0 mood-context))
|
||||
(let ((v1-0 (the-as forrescb-states (-> arg0 state))))
|
||||
(set! (-> v1-0 electricity 0 scale) 1.0)
|
||||
(let ((f0-1 1.0))
|
||||
(set! (-> v1-0 electricity 1 scale) f0-1)
|
||||
f0-1
|
||||
)
|
||||
(set! (-> v1-0 electricity 1 scale) 1.0)
|
||||
)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defbehavior update-mood-forrescb time-of-day-proc ((arg0 mood-context))
|
||||
(update-mood-interior arg0)
|
||||
(update-fortress-lights arg0)
|
||||
@@ -1892,11 +1827,8 @@
|
||||
(defun set-forrescb-turret-flash! ((arg0 int))
|
||||
(let ((v1-1 (level-get *level* 'forrescb)))
|
||||
(when v1-1
|
||||
(let ((v1-2 (-> v1-1 mood-context state))
|
||||
(f0-0 1.0)
|
||||
)
|
||||
(set! (-> (the-as forrescb-states (+ (* arg0 4) (the-as int v1-2))) turret 0) f0-0)
|
||||
f0-0
|
||||
(let ((v1-2 (-> v1-1 mood-context state)))
|
||||
(set! (-> (the-as forrescb-states (+ (* arg0 4) (the-as int v1-2))) turret 0) 1.0)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -1905,11 +1837,8 @@
|
||||
(defun set-forrescb-electricity-scale! ((arg0 float) (arg1 int))
|
||||
(let ((v1-1 (level-get *level* 'forrescb)))
|
||||
(when v1-1
|
||||
(let ((v1-2 (the-as object (-> v1-1 mood-context state)))
|
||||
(f0-0 arg0)
|
||||
)
|
||||
(set! (-> (the-as forrescb-states v1-2) electricity arg1 scale) f0-0)
|
||||
f0-0
|
||||
(let ((v1-2 (the-as object (-> v1-1 mood-context state))))
|
||||
(set! (-> (the-as forrescb-states v1-2) electricity arg1 scale) arg0)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -1927,7 +1856,6 @@
|
||||
)
|
||||
|
||||
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defun update-prison-lights ((arg0 mood-context))
|
||||
(let ((v1-0 (-> arg0 light-group)))
|
||||
(set-vector! (-> v1-0 0 dir0 color) 0.0 0.0 0.0 1.0)
|
||||
@@ -1941,14 +1869,10 @@
|
||||
(defun init-mood-prison ((arg0 mood-context))
|
||||
(let ((v1-0 (the-as prison-states (-> arg0 state))))
|
||||
(set! (-> v1-0 torture-flag) #f)
|
||||
(let ((f0-0 0.0))
|
||||
(set! (-> v1-0 torture) f0-0)
|
||||
f0-0
|
||||
)
|
||||
(set! (-> v1-0 torture) 0.0)
|
||||
)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defbehavior update-mood-prison time-of-day-proc ((arg0 mood-context))
|
||||
(update-mood-interior arg0)
|
||||
(update-prison-lights arg0)
|
||||
@@ -1986,7 +1910,6 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defbehavior update-mood-copy-prison time-of-day-proc ((arg0 mood-context))
|
||||
(let ((v1-1 (level-get *level* 'prison)))
|
||||
(if (and v1-1 (= (-> v1-1 status) 'active))
|
||||
@@ -2135,15 +2058,11 @@
|
||||
(set! (-> gp-1 dir0 extra x) 0.5)
|
||||
(set! (-> gp-1 dir1 extra x) 0.0)
|
||||
(set! (-> gp-1 dir2 extra x) 0.0)
|
||||
(let ((f0-90 0.5))
|
||||
(set! (-> gp-1 ambi extra x) f0-90)
|
||||
f0-90
|
||||
)
|
||||
(set! (-> gp-1 ambi extra x) 0.5)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defbehavior update-mood-under time-of-day-proc ((arg0 mood-context))
|
||||
(update-mood-interior arg0)
|
||||
(update-under-lights arg0)
|
||||
@@ -2180,7 +2099,6 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defbehavior update-mood-copy-underb time-of-day-proc ((arg0 mood-context))
|
||||
(let ((v1-1 (level-get *level* 'underb)))
|
||||
(if (and v1-1 (= (-> v1-1 status) 'active))
|
||||
@@ -2201,11 +2119,8 @@
|
||||
)
|
||||
(let ((v1-4 (level-get *level* 'underb)))
|
||||
(when v1-4
|
||||
(let ((v1-5 (the-as object (-> v1-4 mood-context state)))
|
||||
(f0-1 arg0)
|
||||
)
|
||||
(set! (-> (the-as under-states v1-5) laser) f0-1)
|
||||
f0-1
|
||||
(let ((v1-5 (the-as object (-> v1-4 mood-context state))))
|
||||
(set! (-> (the-as under-states v1-5) laser) arg0)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -2221,11 +2136,8 @@
|
||||
)
|
||||
(let ((v1-4 (level-get *level* 'underb)))
|
||||
(when v1-4
|
||||
(let ((v1-5 (the-as object (-> v1-4 mood-context state)))
|
||||
(f0-1 arg0)
|
||||
)
|
||||
(set! (-> (the-as under-states v1-5) fog-interp) f0-1)
|
||||
f0-1
|
||||
(let ((v1-5 (the-as object (-> v1-4 mood-context state))))
|
||||
(set! (-> (the-as under-states v1-5) fog-interp) arg0)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -2240,7 +2152,6 @@
|
||||
)
|
||||
|
||||
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defun update-gungame-lights ((arg0 mood-context))
|
||||
(let ((v1-0 (-> arg0 light-group)))
|
||||
(let ((a0-1 (-> v1-0 0)))
|
||||
@@ -2256,7 +2167,6 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defbehavior update-mood-gungame time-of-day-proc ((arg0 mood-context))
|
||||
(update-mood-interior arg0)
|
||||
(update-gungame-lights arg0)
|
||||
@@ -2286,15 +2196,11 @@
|
||||
|
||||
|
||||
(defun init-mood-dig1 ((arg0 mood-context))
|
||||
(let ((v1-0 (the-as object (-> arg0 state)))
|
||||
(f0-0 0.0)
|
||||
)
|
||||
(set! (-> (the-as dig1-states v1-0) explosion) f0-0)
|
||||
f0-0
|
||||
(let ((v1-0 (the-as object (-> arg0 state))))
|
||||
(set! (-> (the-as dig1-states v1-0) explosion) 0.0)
|
||||
)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defun update-dig1-lights ((arg0 mood-context))
|
||||
(let ((v1-0 (-> arg0 current-fog)))
|
||||
(set-vector! (-> v1-0 fog-color) 205.0 90.0 90.0 128.0)
|
||||
@@ -2439,7 +2345,6 @@
|
||||
;; ERROR: Stack slot load at 32 mismatch: defined as size 4, got size 16
|
||||
;; ERROR: Stack slot load at 16 mismatch: defined as size 4, got size 16
|
||||
;; ERROR: Stack slot load at 32 mismatch: defined as size 4, got size 16
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defbehavior update-mood-dig1 time-of-day-proc ((arg0 mood-context))
|
||||
(local-vars (sv-16 float) (sv-32 float))
|
||||
(update-mood-interior arg0)
|
||||
@@ -2505,11 +2410,8 @@
|
||||
(defun set-dig1-explosion! ((arg0 float))
|
||||
(let ((v1-1 (level-get *level* 'dig1)))
|
||||
(when v1-1
|
||||
(let ((v1-2 (the-as object (-> v1-1 mood-context state)))
|
||||
(f0-0 1.9921875)
|
||||
)
|
||||
(set! (-> (the-as dig1-states v1-2) explosion) f0-0)
|
||||
f0-0
|
||||
(let ((v1-2 (the-as object (-> v1-1 mood-context state))))
|
||||
(set! (-> (the-as dig1-states v1-2) explosion) 1.9921875)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -2533,14 +2435,12 @@
|
||||
)
|
||||
|
||||
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defun update-vortex-lights ((arg0 mood-context))
|
||||
(set-vector! (-> arg0 current-env-color) 96.0 48.0 196.0 255.0)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defbehavior update-mood-vortex time-of-day-proc ((arg0 mood-context))
|
||||
(update-mood-interior arg0)
|
||||
(update-vortex-lights arg0)
|
||||
@@ -2648,11 +2548,8 @@
|
||||
)
|
||||
(let ((v1-4 (level-get *level* 'lintcstb)))
|
||||
(when v1-4
|
||||
(let ((v1-5 (the-as object (-> v1-4 mood-context state)))
|
||||
(f0-1 1.0)
|
||||
)
|
||||
(set! (-> (the-as vortex-states v1-5) flash) f0-1)
|
||||
f0-1
|
||||
(let ((v1-5 (the-as object (-> v1-4 mood-context state))))
|
||||
(set! (-> (the-as vortex-states v1-5) flash) 1.0)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -2671,10 +2568,7 @@
|
||||
(when v1-4
|
||||
(let ((v1-5 (the-as vortex-states (-> v1-4 mood-context state))))
|
||||
(set! (-> v1-5 white) arg0)
|
||||
(let ((f0-1 0.0))
|
||||
(set! (-> v1-5 white-count) f0-1)
|
||||
f0-1
|
||||
)
|
||||
(set! (-> v1-5 white-count) 0.0)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -2713,7 +2607,6 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defbehavior update-mood-nestb time-of-day-proc ((arg0 mood-context) (arg1 object) (arg2 int))
|
||||
(copy-mood-exterior-ambi arg0 #f)
|
||||
(update-mood-interior arg0)
|
||||
@@ -2741,11 +2634,8 @@
|
||||
(defun set-nestb-purple! ((arg0 float))
|
||||
(let ((v1-1 (level-get *level* 'nestb)))
|
||||
(when v1-1
|
||||
(let ((v1-2 (the-as object (-> v1-1 mood-context state)))
|
||||
(f0-0 arg0)
|
||||
)
|
||||
(set! (-> (the-as nestb-states v1-2) purple) f0-0)
|
||||
f0-0
|
||||
(let ((v1-2 (the-as object (-> v1-1 mood-context state))))
|
||||
(set! (-> (the-as nestb-states v1-2) purple) arg0)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -2771,7 +2661,6 @@
|
||||
)
|
||||
|
||||
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defun init-mood-consiteb ((arg0 mood-context))
|
||||
(let ((v1-0 (the-as consiteb-states (-> arg0 state))))
|
||||
(set! (-> v1-0 flicker) 1.0)
|
||||
@@ -2781,7 +2670,6 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defbehavior update-mood-consiteb time-of-day-proc ((arg0 mood-context) (arg1 object) (arg2 int))
|
||||
(copy-mood-exterior-ambi arg0 #f)
|
||||
(update-mood-interior arg0)
|
||||
@@ -2847,7 +2735,6 @@
|
||||
)
|
||||
|
||||
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defun update-castle-lights ((arg0 mood-context))
|
||||
(let ((a2-0 (-> arg0 light-group))
|
||||
(a1-0 (-> arg0 light-group 1))
|
||||
@@ -2930,15 +2817,11 @@
|
||||
)
|
||||
|
||||
(defun init-mood-castle ((arg0 mood-context))
|
||||
(let ((v1-0 (the-as object (-> arg0 state)))
|
||||
(f0-0 1.0)
|
||||
)
|
||||
(set! (-> (the-as castle-states v1-0) electricity scale) f0-0)
|
||||
f0-0
|
||||
(let ((v1-0 (the-as object (-> arg0 state))))
|
||||
(set! (-> (the-as castle-states v1-0) electricity scale) 1.0)
|
||||
)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defbehavior update-mood-castle time-of-day-proc ((arg0 mood-context))
|
||||
(update-mood-interior arg0)
|
||||
(cond
|
||||
@@ -2974,11 +2857,8 @@
|
||||
(defun set-castle-electricity-scale! ((arg0 float))
|
||||
(let ((v1-1 (level-get *level* 'castle)))
|
||||
(when v1-1
|
||||
(let ((v1-2 (the-as object (-> v1-1 mood-context state)))
|
||||
(f0-0 arg0)
|
||||
)
|
||||
(set! (-> (the-as castle-states v1-2) electricity scale) f0-0)
|
||||
f0-0
|
||||
(let ((v1-2 (the-as object (-> v1-1 mood-context state))))
|
||||
(set! (-> (the-as castle-states v1-2) electricity scale) arg0)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -2997,7 +2877,6 @@
|
||||
#f
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defun update-garage-lights ((arg0 mood-context))
|
||||
(let ((a1-0 (-> *level* default-level mood-context))
|
||||
(a0-1 (-> arg0 current-fog))
|
||||
@@ -3021,7 +2900,6 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defbehavior update-mood-garage time-of-day-proc ((arg0 mood-context) (arg1 object) (arg2 int))
|
||||
(copy-mood-exterior-ambi arg0 #f)
|
||||
(update-mood-interior arg0)
|
||||
@@ -3038,7 +2916,6 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defbehavior update-mood-copy-garage time-of-day-proc ((arg0 mood-context))
|
||||
(let ((v1-1 (level-get *level* 'garage)))
|
||||
(if (and v1-1 (= (-> v1-1 status) 'active))
|
||||
@@ -3057,7 +2934,6 @@
|
||||
)
|
||||
|
||||
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defbehavior update-mood-palshaft time-of-day-proc ((arg0 mood-context))
|
||||
(copy-mood-exterior-ambi arg0 #f)
|
||||
(update-mood-interior arg0)
|
||||
@@ -3068,7 +2944,3 @@
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -155,7 +155,6 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
|
||||
(deftype particle-adgif-cache (basic)
|
||||
((used int32 :offset-assert 4)
|
||||
(last uint16 :offset-assert 8)
|
||||
@@ -274,7 +273,7 @@
|
||||
(matrix*! s5-0 s5-0 arg3)
|
||||
(vector3s-rotate*! (the-as vector3s (-> arg0 launchrot)) (the-as vector3s (-> arg0 launchrot)) s5-0)
|
||||
(vector3s-rotate*! (the-as vector3s (-> arg1 vel-sxvel)) (the-as vector3s (-> arg1 vel-sxvel)) s5-0)
|
||||
(if (zero? (logand (sp-cpuinfo-flag use-global-acc) (-> arg1 flags)))
|
||||
(if (not (logtest? (sp-cpuinfo-flag use-global-acc) (-> arg1 flags)))
|
||||
(vector3s-rotate*! (the-as vector3s (-> arg1 acc)) (the-as vector3s (-> arg1 acc)) s5-0)
|
||||
)
|
||||
(if (logtest? (sp-cpuinfo-flag set-conerot) (-> arg1 flags))
|
||||
@@ -358,7 +357,7 @@
|
||||
)
|
||||
(vector3s-rotate*! (the-as vector3s (-> arg0 launchrot)) (the-as vector3s (-> arg0 launchrot)) s5-0)
|
||||
(vector3s-rotate*! (the-as vector3s (-> arg1 vel-sxvel)) (the-as vector3s (-> arg1 vel-sxvel)) s5-0)
|
||||
(if (zero? (logand (sp-cpuinfo-flag use-global-acc) (-> arg1 flags)))
|
||||
(if (not (logtest? (sp-cpuinfo-flag use-global-acc) (-> arg1 flags)))
|
||||
(vector3s-rotate*! (the-as vector3s (-> arg1 acc)) (the-as vector3s (-> arg1 acc)) s5-0)
|
||||
)
|
||||
)
|
||||
@@ -527,8 +526,8 @@
|
||||
(set! (-> arg2 next-launcher) (the-as basic 0))
|
||||
(cond
|
||||
((and (logtest? (-> arg2 flags) (sp-cpuinfo-flag sp-cpuinfo-flag-12))
|
||||
(zero? (logand (-> arg2 flags) (sp-cpuinfo-flag distort)))
|
||||
(zero? (logand (-> arg2 flags) (sp-cpuinfo-flag glow)))
|
||||
(not (logtest? (-> arg2 flags) (sp-cpuinfo-flag distort)))
|
||||
(not (logtest? (-> arg2 flags) (sp-cpuinfo-flag glow)))
|
||||
)
|
||||
(let ((f20-0 (-> arg3 r-g-b-a x))
|
||||
(f22-0 (-> arg3 r-g-b-a y))
|
||||
|
||||
@@ -2775,7 +2775,7 @@ into 7 sections, which might explain the weird sizes in the center.
|
||||
)
|
||||
(string= (-> *game-info* current-continue name) (-> (the-as continue-point s1-0) name))
|
||||
)
|
||||
(zero? (logand (-> (the-as continue-point s1-0) flags) (continue-flags cf2 cf3)))
|
||||
(not (logtest? (-> (the-as continue-point s1-0) flags) (continue-flags cf2 cf3)))
|
||||
)
|
||||
(set! s3-0 (the-as continue-point s1-0))
|
||||
(if (string= (-> *game-info* current-continue name) (-> (the-as continue-point s1-0) name))
|
||||
@@ -2788,7 +2788,7 @@ into 7 sections, which might explain the weird sizes in the center.
|
||||
)
|
||||
(label cfg-59)
|
||||
(if (and (the-as continue-point s3-0)
|
||||
(zero? (logand (-> (the-as continue-point s3-0) flags) (continue-flags cf2 cf3)))
|
||||
(not (logtest? (-> (the-as continue-point s3-0) flags) (continue-flags cf2 cf3)))
|
||||
)
|
||||
(set-continue! *game-info* (the-as basic s3-0) #f)
|
||||
)
|
||||
|
||||
@@ -1519,7 +1519,7 @@
|
||||
)
|
||||
((= v1-0 (gui-channel query))
|
||||
(and (not (or (logtest? (-> *art-control* frame-mask) 28) (!= *master-mode* 'game)))
|
||||
(and *target* (zero? (logand (-> *target* focus-status) (focus-status dead hit))))
|
||||
(and *target* (not (logtest? (-> *target* focus-status) (focus-status dead hit))))
|
||||
)
|
||||
)
|
||||
(else
|
||||
|
||||
@@ -1310,7 +1310,7 @@ Note that this doesn't actually return the nav-control, but instead adds this pr
|
||||
(set! (-> v1-20 next-poly) (-> a1-9 poly-array sv-188))
|
||||
)
|
||||
(cond
|
||||
((and (-> v1-20 next-poly) (zero? (logand (-> v1-20 next-poly pat) (-> v1-20 ignore))))
|
||||
((and (-> v1-20 next-poly) (not (logtest? (-> v1-20 next-poly pat) (-> v1-20 ignore))))
|
||||
(set! (-> v1-20 current-poly) (-> v1-20 next-poly))
|
||||
)
|
||||
(else
|
||||
@@ -1610,7 +1610,7 @@ Note that this doesn't actually return the nav-control, but instead adds this pr
|
||||
(set! (-> v1-19 next-poly) (-> t3-8 poly-array sv-180))
|
||||
)
|
||||
(cond
|
||||
((and (-> v1-19 next-poly) (zero? (logand (-> v1-19 next-poly pat) (-> v1-19 ignore))))
|
||||
((and (-> v1-19 next-poly) (not (logtest? (-> v1-19 next-poly pat) (-> v1-19 ignore))))
|
||||
(set! (-> v1-19 current-poly) (-> v1-19 next-poly))
|
||||
)
|
||||
(else
|
||||
@@ -1864,7 +1864,6 @@ Note that this doesn't actually return the nav-control, but instead adds this pr
|
||||
)
|
||||
|
||||
(defmethod nav-state-method-10 nav-state ((obj nav-state))
|
||||
"Virtual/Stub"
|
||||
0
|
||||
(none)
|
||||
)
|
||||
@@ -2119,7 +2118,6 @@ Note that this doesn't actually return the nav-control, but instead adds this pr
|
||||
(defmethod-mips2c "(method 39 nav-state)" 39 nav-state)
|
||||
|
||||
(defmethod nav-state-method-50 nav-state ((obj nav-state))
|
||||
"Virtual/Stub"
|
||||
0
|
||||
(none)
|
||||
)
|
||||
@@ -2497,7 +2495,7 @@ Note that this doesn't actually return the nav-control, but instead adds this pr
|
||||
(set! (-> a3-5 next-poly) (-> t0-6 poly-array sv-148))
|
||||
)
|
||||
(cond
|
||||
((and (-> a3-5 next-poly) (zero? (logand (-> a3-5 next-poly pat) (-> a3-5 ignore))))
|
||||
((and (-> a3-5 next-poly) (not (logtest? (-> a3-5 next-poly pat) (-> a3-5 ignore))))
|
||||
(set! (-> a3-5 current-poly) (-> a3-5 next-poly))
|
||||
)
|
||||
(else
|
||||
@@ -2667,7 +2665,7 @@ Note that this doesn't actually return the nav-control, but instead adds this pr
|
||||
(set! (-> a1-6 next-poly) (-> a2-6 poly-array sv-244))
|
||||
)
|
||||
(cond
|
||||
((and (-> a1-6 next-poly) (zero? (logand (-> a1-6 next-poly pat) (-> a1-6 ignore))))
|
||||
((and (-> a1-6 next-poly) (not (logtest? (-> a1-6 next-poly pat) (-> a1-6 ignore))))
|
||||
(set! (-> a1-6 current-poly) (-> a1-6 next-poly))
|
||||
)
|
||||
(else
|
||||
@@ -3283,7 +3281,7 @@ Note that this doesn't actually return the nav-control, but instead adds this pr
|
||||
(set! (-> a2-5 next-poly) (-> a3-6 poly-array sv-244))
|
||||
)
|
||||
(cond
|
||||
((and (-> a2-5 next-poly) (zero? (logand (-> a2-5 next-poly pat) (-> a2-5 ignore))))
|
||||
((and (-> a2-5 next-poly) (not (logtest? (-> a2-5 next-poly pat) (-> a2-5 ignore))))
|
||||
(set! (-> a2-5 current-poly) (-> a2-5 next-poly))
|
||||
)
|
||||
(else
|
||||
|
||||
@@ -161,7 +161,7 @@
|
||||
)
|
||||
(when (not (logtest? (enemy-flag directed) (-> obj enemy-flags)))
|
||||
(let ((s5-0 (-> obj root-override2)))
|
||||
(if (logtest? (-> obj focus-status) (focus-status under-water))
|
||||
(if (focus-test? obj under-water)
|
||||
(enemy-method-47 obj (-> s5-0 transv))
|
||||
(+! (-> s5-0 transv y) (* (-> obj enemy-info-override movement-gravity) (-> pp clock seconds-per-frame)))
|
||||
)
|
||||
@@ -181,7 +181,7 @@
|
||||
)
|
||||
)
|
||||
(logclear! (-> obj enemy-flags) (enemy-flag directed))
|
||||
(if (and (enemy-method-102 obj) (zero? (logand (-> obj focus-status) (focus-status dead))))
|
||||
(if (and (enemy-method-102 obj) (not (logtest? (-> obj focus-status) (focus-status dead))))
|
||||
(kill-prefer-falling obj)
|
||||
)
|
||||
(the-as
|
||||
@@ -579,7 +579,7 @@
|
||||
)
|
||||
(cond
|
||||
((-> obj enemy-info-override move-to-ground)
|
||||
(if (logtest? (-> obj focus-status) (focus-status under-water))
|
||||
(if (focus-test? obj under-water)
|
||||
(enemy-method-47 obj (-> obj root-override2 transv))
|
||||
(+! (-> obj root-override2 transv y)
|
||||
(* (-> obj enemy-info-override movement-gravity) (-> pp clock seconds-per-frame))
|
||||
@@ -1232,9 +1232,9 @@
|
||||
(set! (-> obj root-override2 penetrated-by) (get-penetrate-info obj))
|
||||
(set! (-> s4-0 event-self) 'touched)
|
||||
)
|
||||
(set! (-> obj penetrated-flinch) (the-as penetrate (-> arg0 penetrate-flinch)))
|
||||
(set! (-> obj penetrated-knocked) (the-as penetrate (-> arg0 penetrate-knocked)))
|
||||
(set! (-> obj reaction-time) (get-rand-int-range obj 30 240))
|
||||
(set! (-> obj penetrated-flinch) (-> arg0 penetrate-flinch))
|
||||
(set! (-> obj penetrated-knocked) (-> arg0 penetrate-knocked))
|
||||
(set! (-> obj reaction-time) (the-as time-frame (get-rand-int-range obj 30 240)))
|
||||
(let* ((v1-113 (-> obj enemy-flags))
|
||||
(a0-47 (-> obj fact-info-override enemy-options))
|
||||
(v1-114 (logior (enemy-flag
|
||||
@@ -1261,7 +1261,7 @@
|
||||
(do-navigation-to-destination (-> obj nav state) (-> obj root-override2 trans))
|
||||
(if (and (-> obj enemy-info-override move-to-ground)
|
||||
(not (logtest? (enemy-flag vulnerable-backup) (-> obj enemy-flags)))
|
||||
(zero? (logand (enemy-option ambush) (-> obj fact-info-override enemy-options)))
|
||||
(not (logtest? (enemy-option ambush) (-> obj fact-info-override enemy-options)))
|
||||
)
|
||||
(enemy-method-127 obj 40960.0 40960.0 #t (the-as collide-spec (-> obj gnd-collide)))
|
||||
)
|
||||
@@ -2255,7 +2255,7 @@ This commonly includes things such as:
|
||||
(nav-enemy-method-165 self)
|
||||
(logclear! (-> self mask) (process-mask actor-pause))
|
||||
(set! (-> self move-dest quad) (-> self root-override2 trans quad))
|
||||
(set! (-> self state-timeout) (get-rand-int-range self 2100 3300))
|
||||
(set! (-> self state-timeout) (the-as time-frame (get-rand-int-range self 2100 3300)))
|
||||
(set! (-> self starting-time) (-> self clock frame-counter))
|
||||
(if (zero? (get-rand-int self 2))
|
||||
(set! (-> self enemy-flags) (the-as enemy-flag (logior (enemy-flag enemy-flag40) (-> self enemy-flags))))
|
||||
|
||||
@@ -544,7 +544,7 @@ and declared out of order (cannot use forward declared structures in inline arra
|
||||
(set! (-> ray next-poly) (-> obj poly-array sv-68))
|
||||
)
|
||||
(cond
|
||||
((and (-> ray next-poly) (zero? (logand (-> ray next-poly pat) (-> ray ignore))))
|
||||
((and (-> ray next-poly) (not (logtest? (-> ray next-poly pat) (-> ray ignore))))
|
||||
(set! (-> ray current-poly) (-> ray next-poly))
|
||||
)
|
||||
(else
|
||||
|
||||
@@ -1623,7 +1623,7 @@
|
||||
(set! v1-6 (and a0-3 (begin (b! (>= f0-0 (- (-> v1-5 vertex2 w) f1-0)) cfg-9 :delay (set! v1-6 #t)) #f)))
|
||||
)
|
||||
(label cfg-9)
|
||||
(when (and v1-6 (zero? (logand (-> sv-16 pat) (-> arg0 ignore))))
|
||||
(when (and v1-6 (not (logtest? (-> sv-16 pat) (-> arg0 ignore))))
|
||||
(if (point-in-poly? obj sv-16 (-> arg0 point))
|
||||
(return sv-16)
|
||||
)
|
||||
@@ -1941,7 +1941,7 @@
|
||||
)
|
||||
(b!
|
||||
(not (and (and (>= (+ (-> v1-6 vertex3 w) f1-0) f0-0) (>= f0-0 (- (-> v1-6 vertex2 w) f1-0)))
|
||||
(zero? (logand (-> sv-24 pat) (-> arg0 ignore)))
|
||||
(not (logtest? (-> sv-24 pat) (-> arg0 ignore)))
|
||||
)
|
||||
)
|
||||
cfg-16
|
||||
@@ -1989,7 +1989,7 @@
|
||||
(f1-2 (-> arg0 y-threshold))
|
||||
)
|
||||
(when (and (and (>= (+ (-> v1-22 vertex3 w) f1-2) f0-3) (>= f0-3 (- (-> v1-22 vertex2 w) f1-2)))
|
||||
(zero? (logand (-> sv-48 pat) (-> arg0 ignore)))
|
||||
(not (logtest? (-> sv-48 pat) (-> arg0 ignore)))
|
||||
)
|
||||
(set! sv-40 (+ sv-40 1))
|
||||
(set! sv-52 (point-poly-distance-min (-> obj work) (the-as nav-poly (-> arg0 point)) sv-28 sv-48))
|
||||
|
||||
@@ -1222,7 +1222,7 @@ This commonly includes things such as:
|
||||
(local-vars (v1-2 symbol))
|
||||
(b! (not (logtest? (process-mask target crate enemy) (-> arg0 mask))) cfg-5 :likely-delay (set! v1-2 #t))
|
||||
(b! (not (logtest? (-> arg0 mask) (process-mask target))) cfg-5 :likely-delay (set! v1-2 #f))
|
||||
(set! v1-2 (logtest? (focus-status dangerous pilot) (-> arg0 focus-status)))
|
||||
(set! v1-2 (focus-test? arg0 dangerous pilot))
|
||||
(label cfg-5)
|
||||
(b! v1-2 cfg-17 :delay (nop!))
|
||||
(let ((s5-0 (new 'stack-no-clear 'rigid-body-impact))
|
||||
@@ -1362,7 +1362,7 @@ This commonly includes things such as:
|
||||
)
|
||||
)
|
||||
)
|
||||
(zero? (logand (-> obj focus-status) (focus-status dead inactive)))
|
||||
(not (logtest? (-> obj focus-status) (focus-status dead inactive)))
|
||||
)
|
||||
(('ridden)
|
||||
(let ((v1-45 (the-as object (-> arg3 param 0))))
|
||||
@@ -1375,7 +1375,7 @@ This commonly includes things such as:
|
||||
)
|
||||
(when (and a0-34
|
||||
(logtest? (-> a0-34 mask) (process-mask target))
|
||||
(zero? (logand (-> a0-34 focus-status) (focus-status on-water under-water)))
|
||||
(not (logtest? (-> a0-34 focus-status) (focus-status on-water under-water)))
|
||||
)
|
||||
(when (not (logtest? (-> obj flags) (rigid-body-object-flag player-impulse-force)))
|
||||
(logior! (-> obj flags) (rigid-body-object-flag player-touching player-standing-on player-contact-force))
|
||||
@@ -1431,7 +1431,7 @@ This commonly includes things such as:
|
||||
(if (and *target* (and (>= (-> self info extra idle-distance)
|
||||
(vector-vector-distance (-> self root-override-2 trans) (-> *target* control trans))
|
||||
)
|
||||
(zero? (logand (focus-status teleporting) (-> *target* focus-status)))
|
||||
(not (logtest? (focus-status teleporting) (-> *target* focus-status)))
|
||||
)
|
||||
)
|
||||
(go-virtual active)
|
||||
@@ -1453,7 +1453,7 @@ This commonly includes things such as:
|
||||
(or (< (+ 4096.0 (-> self info extra idle-distance))
|
||||
(vector-vector-distance (-> self root-override-2 trans) (-> *target* control trans))
|
||||
)
|
||||
(logtest? (focus-status teleporting) (-> *target* focus-status))
|
||||
(focus-test? *target* teleporting)
|
||||
)
|
||||
)
|
||||
(go-virtual idle)
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(defmethod reset-to-collide-spec focus ((obj focus) (arg0 collide-spec))
|
||||
(set! (-> obj collide-with) arg0)
|
||||
(set! (-> obj handle) (the-as handle #f))
|
||||
@@ -31,14 +32,14 @@
|
||||
)
|
||||
|
||||
(defmethod collide-check? focus ((obj focus) (arg0 process-focusable))
|
||||
(when (and arg0 (zero? (logand (-> arg0 focus-status) (focus-status disable dead))))
|
||||
(let* ((s5-0 (-> arg0 root))
|
||||
(when (and arg0 (not (logtest? (-> arg0 focus-status) (focus-status disable dead))))
|
||||
(let* ((s5-0 (-> arg0 root-override))
|
||||
(v1-2 (if (type? s5-0 collide-shape)
|
||||
s5-0
|
||||
)
|
||||
)
|
||||
)
|
||||
(and v1-2 (logtest? (-> obj collide-with) (-> (the-as collide-shape v1-2) root-prim prim-core collide-as)))
|
||||
(and v1-2 (logtest? (-> obj collide-with) (-> v1-2 root-prim prim-core collide-as)))
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -55,7 +56,3 @@
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -780,8 +780,8 @@
|
||||
(let ((s4-0 v0-3))
|
||||
(let ((s3-1 (-> s3-0 art-group)))
|
||||
(cond
|
||||
((>= (the-as int (-> arg0 janim)) 0)
|
||||
(when (or (>= (the-as int (-> arg0 janim)) (-> s3-1 length))
|
||||
((>= (-> arg0 janim) 0)
|
||||
(when (or (>= (-> arg0 janim) (-> s3-1 length))
|
||||
(begin (set! v1-14 (-> s3-1 data (-> arg0 janim))) (not v1-14))
|
||||
(!= (-> v1-14 type) art-joint-anim)
|
||||
)
|
||||
@@ -1798,7 +1798,7 @@
|
||||
)
|
||||
|
||||
(defbehavior process-drawable-delay-player process-drawable ((arg0 time-frame))
|
||||
(while (and *target* (logtest? (-> *target* focus-status) (focus-status in-air)))
|
||||
(while (and *target* (focus-test? *target* in-air))
|
||||
(suspend)
|
||||
)
|
||||
(set! (-> self state-time) (-> self clock frame-counter))
|
||||
|
||||
@@ -111,3 +111,6 @@
|
||||
(defmethod get-notice-time process-focusable ((obj process-focusable))
|
||||
(the-as time-frame 0)
|
||||
)
|
||||
|
||||
(defmacro focus-test? (pfoc &rest status)
|
||||
`(logtest? (-> (the process-focusable ,pfoc) focus-status) (focus-status ,@status)))
|
||||
@@ -207,7 +207,7 @@ Seen take in - `true-func` which takes no args TODO - seems fishy
|
||||
(new 'static 'sound-id)
|
||||
)
|
||||
)
|
||||
(and (zero? (logand (focus-status dead in-air in-head pole flut tube pilot mech dark) (-> *target* focus-status)))
|
||||
(and (not (logtest? (focus-status dead in-air in-head pole flut tube pilot mech dark) (-> *target* focus-status)))
|
||||
(and (or (and (< (-> (target-pos 0) y) (+ (-> self root-override root-prim prim-core world-sphere y) (-> self talk-height)))
|
||||
(let ((s5-0 (get-trans self 2))
|
||||
(f30-0 (if (= (-> gp-0 distance) 0.0)
|
||||
|
||||
@@ -931,7 +931,7 @@
|
||||
(set-setting! 'bg-a-force 'abs #x3f800000 0)
|
||||
(apply-settings *setting-control*)
|
||||
)
|
||||
(if (or (not *target*) (or (logtest? (-> *target* focus-status) (focus-status grabbed))
|
||||
(if (or (not *target*) (or (focus-test? *target* grabbed)
|
||||
(begin
|
||||
(dotimes (v1-17 6)
|
||||
(when (= (-> *load-state* want v1-17 name) (-> *target* current-level name))
|
||||
@@ -949,7 +949,7 @@
|
||||
(set! arg0 #f)
|
||||
)
|
||||
(while (and arg0
|
||||
(or (logtest? (-> *target* focus-status) (focus-status in-air))
|
||||
(or (focus-test? *target* in-air)
|
||||
(and (-> *target* next-state) (= (-> *target* next-state name) 'target-flop-hit-ground))
|
||||
)
|
||||
(-> self scene)
|
||||
@@ -959,7 +959,7 @@
|
||||
)
|
||||
(suspend)
|
||||
(let ((s5-0 (-> self clock frame-counter)))
|
||||
(when (and *target* (zero? (logand (-> *target* focus-status) (focus-status grabbed))))
|
||||
(when (and *target* (not (logtest? (-> *target* focus-status) (focus-status grabbed))))
|
||||
(label cfg-44)
|
||||
(when (not (process-grab? *target* #f))
|
||||
(suspend)
|
||||
@@ -1044,7 +1044,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(if (and *target* (logtest? (focus-status in-head flut board pilot mech dark) (-> *target* focus-status)))
|
||||
(if (and *target* (focus-test? *target* in-head flut board pilot mech dark))
|
||||
(send-event *target* 'change-mode 'normal)
|
||||
)
|
||||
(when (< (-> self scene-index) (-> self scene-list length))
|
||||
@@ -1296,7 +1296,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(if (and (-> self wait) *target* (logtest? (-> *target* focus-status) (focus-status grabbed)))
|
||||
(if (and (-> self wait) *target* (focus-test? *target* grabbed))
|
||||
(go-virtual release)
|
||||
)
|
||||
(none)
|
||||
|
||||
@@ -279,10 +279,10 @@
|
||||
(let ((v1-3 *target*))
|
||||
(when v1-3
|
||||
(cond
|
||||
((logtest? (focus-status dark) (-> v1-3 focus-status))
|
||||
((focus-test? v1-3 dark)
|
||||
(speech-control-method-12 obj arg0 (speech-type speech-type-3))
|
||||
)
|
||||
((logtest? (focus-status pilot) (-> v1-3 focus-status))
|
||||
((focus-test? v1-3 pilot)
|
||||
(speech-control-method-12 obj arg0 (speech-type speech-type-0 speech-type-1 speech-type-2))
|
||||
)
|
||||
(else
|
||||
|
||||
@@ -262,7 +262,7 @@
|
||||
(and (logtest? (-> self game features) (game-feature board))
|
||||
(or (and (cpad-pressed? (-> self control cpad number) r2)
|
||||
(or (!= *cheat-mode* 'debug)
|
||||
(zero? (logand (-> *cpad-list* cpads (-> self control cpad number) button0-abs 0) (pad-buttons l2)))
|
||||
(not (logtest? (-> *cpad-list* cpads (-> self control cpad number) button0-abs 0) (pad-buttons l2)))
|
||||
)
|
||||
(not *pause-lock*)
|
||||
(>= (- (-> self clock frame-counter) (-> self control time-of-last-debug-heal)) (seconds 0.1))
|
||||
@@ -270,15 +270,14 @@
|
||||
)
|
||||
(-> self board latch?)
|
||||
)
|
||||
(not (logtest? (focus-status dead hit grabbed in-head edge-grab pole board pilot mech dark) (-> self focus-status))
|
||||
)
|
||||
(not (focus-test? self dead hit grabbed in-head edge-grab pole board pilot mech dark))
|
||||
(or (zero? (-> self board)) (>= (- (-> self clock frame-counter) (-> self board board-time)) (seconds 0.5)))
|
||||
(not (logtest? (state-flags prevent-board) (-> self state-flags)))
|
||||
(< (-> self board board-time) (-> self control list-time-on-ground))
|
||||
(not (logtest? (surface-flag no-board) (-> self control current-surface flags)))
|
||||
(or (not (logtest? (-> self control current-surface flags) (surface-flag duck))) (can-exit-duck? self))
|
||||
(not (and (logtest? (-> self water flags) (water-flags under-water))
|
||||
(zero? (logand (-> self water flags) (water-flags swim-ground)))
|
||||
(not (logtest? (-> self water flags) (water-flags swim-ground)))
|
||||
)
|
||||
)
|
||||
(not *artist-fix-visible*)
|
||||
@@ -289,7 +288,7 @@
|
||||
)
|
||||
(let ((v1-51 (new 'stack-no-clear 'vector)))
|
||||
(set! (-> v1-51 quad) (-> self control trans quad))
|
||||
(if (logtest? (-> self focus-status) (focus-status on-water))
|
||||
(if (focus-test? self on-water)
|
||||
(set! (-> v1-51 y) (-> self water height))
|
||||
)
|
||||
(set! (-> s5-0 0 quad) (-> v1-51 quad))
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user