mirror of
https://github.com/open-goal/jak-project
synced 2026-07-10 15:14:15 -04:00
[decommp] generic-obs (#2013)
This commit is contained in:
@@ -67,6 +67,13 @@ struct FunctionName {
|
||||
|
||||
bool empty() const { return kind == FunctionKind::UNIDENTIFIED; }
|
||||
|
||||
bool is_handler() const {
|
||||
return kind == FunctionKind::NV_STATE || kind == FunctionKind::V_STATE;
|
||||
}
|
||||
bool is_handler(StateHandler shk) const { return is_handler() && handler_kind == shk; }
|
||||
|
||||
bool is_event_handler() const { return is_handler(StateHandler::EVENT); }
|
||||
|
||||
void set_as_top_level(const std::string& object_file_name) {
|
||||
kind = FunctionKind::TOP_LEVEL_INIT;
|
||||
object_name = object_file_name;
|
||||
|
||||
@@ -1982,15 +1982,22 @@ void SimpleExpressionElement::update_from_stack_logor_or_logand(const Env& env,
|
||||
return;
|
||||
}
|
||||
|
||||
// (-> (the-as process-drawable (-> v1-32 0)) pid)
|
||||
// (-> v1-61 0 pid)
|
||||
auto just_deref_matcher = Matcher::match_or(
|
||||
{Matcher::deref(Matcher::any_reg(0), false,
|
||||
{DerefTokenMatcher::integer(0), DerefTokenMatcher::string("pid")}),
|
||||
Matcher::deref({Matcher::cast_to_any(4, Matcher::deref(Matcher::any_reg(0), false,
|
||||
{DerefTokenMatcher::integer(0)}))},
|
||||
false, {DerefTokenMatcher::string("pid")})});
|
||||
|
||||
// jak 1:
|
||||
// (logior (shl (-> v1-61 0 pid) 32) (.asm.sllv.r0 v1-61))
|
||||
// jak 2:
|
||||
// (logior (if v1-61 (shl (-> v1-61 0 pid) 32) 0) (.asm.sllv.r0 v1-61))
|
||||
auto pid_deref_matcher = Matcher::op_fixed(
|
||||
FixedOperatorKind::SHL,
|
||||
{Matcher::deref(Matcher::any_reg(0), false,
|
||||
{DerefTokenMatcher::integer(0), DerefTokenMatcher::string("pid")}),
|
||||
Matcher::integer(32)});
|
||||
auto pid_deref_matcher =
|
||||
Matcher::op_fixed(FixedOperatorKind::SHL, {just_deref_matcher, Matcher::integer(32)});
|
||||
|
||||
auto make_handle_matcher = Matcher::op_fixed(
|
||||
FixedOperatorKind::LOGIOR,
|
||||
{env.version == GameVersion::Jak1
|
||||
@@ -2002,6 +2009,7 @@ void SimpleExpressionElement::update_from_stack_logor_or_logand(const Env& env,
|
||||
Matcher::op_fixed(FixedOperatorKind::ASM_SLLV_R0, {Matcher::any_reg(1)})});
|
||||
|
||||
auto handle_mr = match(make_handle_matcher, element);
|
||||
|
||||
if (handle_mr.matched) {
|
||||
auto var_a = handle_mr.maps.regs.at(0).value();
|
||||
auto var_b = handle_mr.maps.regs.at(1).value();
|
||||
@@ -2009,7 +2017,7 @@ void SimpleExpressionElement::update_from_stack_logor_or_logand(const Env& env,
|
||||
if (var_name == env.get_variable_name(var_b) &&
|
||||
(env.version == GameVersion::Jak1 ||
|
||||
var_name == env.get_variable_name(handle_mr.maps.regs.at(2).value())) &&
|
||||
env.dts->ts.tc(TypeSpec("pointer", {TypeSpec("process")}),
|
||||
env.dts->ts.tc(TypeSpec("pointer", {TypeSpec("process-tree")}),
|
||||
env.get_variable_type(var_a, true))) {
|
||||
auto* menv = const_cast<Env*>(&env);
|
||||
menv->disable_use(var_a);
|
||||
|
||||
@@ -73,6 +73,14 @@ Matcher Matcher::cast(const std::string& type, Matcher value) {
|
||||
return m;
|
||||
}
|
||||
|
||||
Matcher Matcher::cast_to_any(int type_out, Matcher value) {
|
||||
Matcher m;
|
||||
m.m_kind = Kind::CAST_TO_ANY;
|
||||
m.m_string_out_id = type_out;
|
||||
m.m_sub_matchers = {value};
|
||||
return m;
|
||||
}
|
||||
|
||||
Matcher Matcher::any(int match_id) {
|
||||
Matcher m;
|
||||
m.m_kind = Kind::ANY;
|
||||
@@ -335,6 +343,15 @@ bool Matcher::do_match(Form* input, MatchResult::Maps* maps_out) const {
|
||||
return false;
|
||||
} break;
|
||||
|
||||
case Kind::CAST_TO_ANY: {
|
||||
auto as_cast = dynamic_cast<CastElement*>(input->try_as_single_active_element());
|
||||
if (as_cast) {
|
||||
maps_out->strings[m_string_out_id] = as_cast->type().print();
|
||||
return m_sub_matchers.at(0).do_match(as_cast->source(), maps_out);
|
||||
}
|
||||
return false;
|
||||
} break;
|
||||
|
||||
case Kind::INT: {
|
||||
auto as_simple_atom = dynamic_cast<SimpleAtomElement*>(input->try_as_single_active_element());
|
||||
if (as_simple_atom) {
|
||||
|
||||
@@ -47,6 +47,7 @@ class Matcher {
|
||||
static Matcher set_var(const Matcher& src, int dst_match_id); // var-form
|
||||
static Matcher match_or(const std::vector<Matcher>& args);
|
||||
static Matcher cast(const std::string& type, Matcher value);
|
||||
static Matcher cast_to_any(int type_out, Matcher value);
|
||||
static Matcher any(int match_id = -1);
|
||||
static Matcher integer(std::optional<int> value);
|
||||
static Matcher any_integer(int match_id = -1);
|
||||
@@ -74,6 +75,7 @@ class Matcher {
|
||||
GENERIC_OP_WITH_REST,
|
||||
OR,
|
||||
CAST,
|
||||
CAST_TO_ANY,
|
||||
ANY,
|
||||
INT,
|
||||
ANY_INT,
|
||||
|
||||
@@ -907,6 +907,15 @@ FormElement* rewrite_as_case_no_else(LetElement* in, const Env& env, FormPool& p
|
||||
}
|
||||
|
||||
auto* cond = in->body()->try_as_element<CondNoElseElement>();
|
||||
std::optional<TypeSpec> cast_type;
|
||||
if (!cond) {
|
||||
auto* casted = in->body()->try_as_element<CastElement>();
|
||||
if (casted) {
|
||||
cast_type = casted->type();
|
||||
cond = casted->source()->try_as_element<CondNoElseElement>();
|
||||
}
|
||||
}
|
||||
|
||||
if (!cond) {
|
||||
return nullptr;
|
||||
}
|
||||
@@ -972,8 +981,12 @@ FormElement* rewrite_as_case_no_else(LetElement* in, const Env& env, FormPool& p
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
return pool.alloc_element<CaseElement>(in->entries().at(0).src, entries, nullptr);
|
||||
return nullptr;
|
||||
auto* case_elt = pool.alloc_element<CaseElement>(in->entries().at(0).src, entries, nullptr);
|
||||
if (cast_type) {
|
||||
return pool.alloc_element<CastElement>(*cast_type, pool.alloc_single_form(nullptr, case_elt));
|
||||
} else {
|
||||
return case_elt;
|
||||
}
|
||||
}
|
||||
|
||||
FormElement* rewrite_as_case_with_else(LetElement* in, const Env& env, FormPool& pool) {
|
||||
@@ -1496,7 +1509,8 @@ FormElement* rewrite_proc_new(LetElement* in, const Env& env, FormPool& pool) {
|
||||
args.push_back(as_func->elts().at(1));
|
||||
} else {
|
||||
auto init_func = as_func->elts().at(1)->to_form(env);
|
||||
if (init_func.is_symbol("manipy-init") && proc_type == "manipy") {
|
||||
if (init_func.is_symbol("manipy-init") && proc_type == "manipy" &&
|
||||
env.version == GameVersion::Jak1) {
|
||||
head = "manipy-spawn";
|
||||
} else {
|
||||
args.push_back(pool.form<ConstantTokenElement>(proc_type));
|
||||
|
||||
@@ -652,18 +652,37 @@ void SSA::remap(int) {
|
||||
}
|
||||
|
||||
namespace {
|
||||
|
||||
TP_Type lca_for_var_types(const TP_Type& existing,
|
||||
const TP_Type& add,
|
||||
const DecompilerTypeSystem& dts,
|
||||
bool event_handler_hack) {
|
||||
bool changed;
|
||||
auto normal = dts.tp_lca(existing, add, &changed);
|
||||
if (!event_handler_hack || normal.typespec().base_type() != "none") {
|
||||
return normal;
|
||||
}
|
||||
if (existing.typespec().base_type() == "none") {
|
||||
return add;
|
||||
} else if (add.typespec().base_type() == "none") {
|
||||
return existing;
|
||||
} else {
|
||||
return normal;
|
||||
}
|
||||
}
|
||||
|
||||
void update_var_info(VariableNames::VarInfo* info,
|
||||
Register reg,
|
||||
const TypeState& ts,
|
||||
int var_id,
|
||||
const DecompilerTypeSystem& dts) {
|
||||
const DecompilerTypeSystem& dts,
|
||||
bool event_handler_hack) {
|
||||
auto& type = ts.get(reg);
|
||||
if (info->initialized) {
|
||||
ASSERT(info->reg_id.id == var_id);
|
||||
ASSERT(info->reg_id.reg == reg);
|
||||
|
||||
bool changed;
|
||||
info->type = dts.tp_lca(info->type, type, &changed);
|
||||
info->type = lca_for_var_types(info->type, type, dts, event_handler_hack);
|
||||
|
||||
} else {
|
||||
info->reg_id.id = var_id;
|
||||
@@ -676,10 +695,11 @@ void update_var_info(VariableNames::VarInfo* info,
|
||||
|
||||
bool merge_infos(VariableNames::VarInfo* info1,
|
||||
VariableNames::VarInfo* info2,
|
||||
const DecompilerTypeSystem& dts) {
|
||||
const DecompilerTypeSystem& dts,
|
||||
bool event_handler_hack) {
|
||||
if (info1->initialized && info2->initialized) {
|
||||
bool changed;
|
||||
auto new_type = dts.tp_lca(info1->type, info2->type, &changed);
|
||||
auto new_type = lca_for_var_types(info1->type, info2->type, dts, event_handler_hack);
|
||||
|
||||
info1->type = new_type;
|
||||
info2->type = new_type;
|
||||
return true;
|
||||
@@ -690,12 +710,13 @@ bool merge_infos(VariableNames::VarInfo* info1,
|
||||
void merge_infos(
|
||||
std::unordered_map<Register, std::vector<VariableNames::VarInfo>, Register::hash>& info1,
|
||||
std::unordered_map<Register, std::vector<VariableNames::VarInfo>, Register::hash>& info2,
|
||||
const DecompilerTypeSystem& dts) {
|
||||
const DecompilerTypeSystem& dts,
|
||||
bool event_handler_hack) {
|
||||
for (auto& [reg, infos] : info1) {
|
||||
auto other = info2.find(reg);
|
||||
if (other != info2.end()) {
|
||||
for (size_t i = 0; i < std::min(other->second.size(), infos.size()); i++) {
|
||||
merge_infos(&infos.at(i), &other->second.at(i), dts);
|
||||
merge_infos(&infos.at(i), &other->second.at(i), dts, event_handler_hack);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -704,8 +725,13 @@ void merge_infos(
|
||||
|
||||
/*!
|
||||
* Create variable info for each variable.
|
||||
* Note: the "event_handler_hack" is supposed to help with the use of "none" typed variables
|
||||
* that are actually used. It's a hack because we don't really have enough information to know if
|
||||
* the none variables
|
||||
*/
|
||||
void SSA::make_vars(const Function& function, const DecompilerTypeSystem& dts) {
|
||||
bool event_handler_hack =
|
||||
function.ir2.env.version > GameVersion::Jak1 && function.guessed_name.is_event_handler();
|
||||
for (int block_id = 0; block_id < int(blocks.size()); block_id++) {
|
||||
const auto& block = blocks.at(block_id);
|
||||
const TypeState* init_types = &function.ir2.env.get_types_at_block_entry(block_id);
|
||||
@@ -720,13 +746,13 @@ void SSA::make_vars(const Function& function, const DecompilerTypeSystem& dts) {
|
||||
if (instr.dst.has_value()) {
|
||||
auto var_id = map.var_id(*instr.dst);
|
||||
auto* info = &program_write_vars[instr.dst->reg()].at(var_id);
|
||||
update_var_info(info, instr.dst->reg(), *end_types, var_id, dts);
|
||||
update_var_info(info, instr.dst->reg(), *end_types, var_id, dts, event_handler_hack);
|
||||
}
|
||||
|
||||
for (auto& src : instr.src) {
|
||||
auto var_id = map.var_id(src);
|
||||
auto* info = &program_read_vars[src.reg()].at(var_id);
|
||||
update_var_info(info, src.reg(), *init_types, var_id, dts);
|
||||
update_var_info(info, src.reg(), *init_types, var_id, dts, event_handler_hack);
|
||||
}
|
||||
|
||||
init_types = end_types;
|
||||
@@ -747,26 +773,7 @@ void SSA::make_vars(const Function& function, const DecompilerTypeSystem& dts) {
|
||||
}
|
||||
}
|
||||
|
||||
// if (function.type.last_arg() != TypeSpec("none")) {
|
||||
// auto return_var = function.ir2.atomic_ops->end_op().return_var();
|
||||
// auto return_reg = return_var.reg();
|
||||
// const auto& last_block = blocks.at(blocks.size() - 1);
|
||||
// const auto& last_ins = last_block.ins.at(last_block.ins.size() - 1);
|
||||
// ASSERT(last_ins.src.size() == 1);
|
||||
// auto return_idx = map.var_id(last_ins.src.at(0));
|
||||
//
|
||||
// if (!program_read_vars[return_reg].empty()) {
|
||||
// program_read_vars[return_reg].at(return_idx).type =
|
||||
// TP_Type::make_from_ts(function.type.last_arg());
|
||||
// }
|
||||
//
|
||||
// if (!program_write_vars[return_reg].empty()) {
|
||||
// program_write_vars[return_reg].at(return_idx).type =
|
||||
// TP_Type::make_from_ts(function.type.last_arg());
|
||||
// }
|
||||
// }
|
||||
|
||||
merge_infos(program_write_vars, program_read_vars, dts);
|
||||
merge_infos(program_write_vars, program_read_vars, dts, event_handler_hack);
|
||||
|
||||
// copy types from input argument coloring moves:
|
||||
for (auto& instr : blocks.at(0).ins) {
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
(define-extern stack-frame type)
|
||||
(define-extern global kheap)
|
||||
(define-extern kheap type)
|
||||
(define-extern pointer type)
|
||||
|
||||
(define-extern #t symbol)
|
||||
|
||||
@@ -7766,6 +7767,11 @@
|
||||
(VERTICAL_FOLLOW_MATCHES_CAMERA)
|
||||
(HAVE_BUTT_HANDLE))
|
||||
|
||||
(defenum cam-slave-options-u32
|
||||
:type uint32
|
||||
:bitfield #t
|
||||
:copy-entries cam-slave-options)
|
||||
|
||||
(defenum cam-master-options
|
||||
:type uint64
|
||||
:bitfield #t
|
||||
@@ -7779,6 +7785,11 @@
|
||||
(IMMEDIATE_STRING_MIN_MAX) ;; 80
|
||||
)
|
||||
|
||||
(defenum cam-master-options-u32
|
||||
:type uint32
|
||||
:bitfield #t
|
||||
:copy-entries cam-master-options)
|
||||
|
||||
(deftype cam-setting-data (structure)
|
||||
((fov degrees)
|
||||
(pov-handle handle :offset 16)
|
||||
@@ -8756,6 +8767,22 @@
|
||||
;; traffic-h ;;
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
(defenum traffic-danger-flags
|
||||
:type uint8
|
||||
:bitfield #t
|
||||
(tdf0 0)
|
||||
)
|
||||
|
||||
(defenum traffic-danger-type
|
||||
:type uint8
|
||||
(tdt0 0)
|
||||
(tdt1 1)
|
||||
(tdt2 2)
|
||||
(tdt3 3)
|
||||
(tdt4 4)
|
||||
(tdt5 5)
|
||||
)
|
||||
|
||||
(deftype traffic-danger-info (structure)
|
||||
((sphere sphere :inline :offset-assert 0)
|
||||
(velocity vector :inline :offset-assert 16)
|
||||
@@ -8763,8 +8790,8 @@
|
||||
(notify-radius float :offset-assert 40)
|
||||
(danger-level float :offset-assert 44)
|
||||
(decay-rate float :offset-assert 48)
|
||||
(flags uint8 :offset-assert 52)
|
||||
(danger-type uint8 :offset-assert 53)
|
||||
(flags traffic-danger-flags :offset-assert 52)
|
||||
(danger-type traffic-danger-type :offset-assert 53)
|
||||
)
|
||||
:method-count-assert 9
|
||||
:size-assert #x36
|
||||
@@ -11248,7 +11275,7 @@
|
||||
(get-skeleton-origin (_type_) vector 9)
|
||||
(lod-set! (_type_ int) none 10)
|
||||
(lods-assign! (_type_ lod-set) none 11)
|
||||
(setup-masks (_type_ uint int) none 12)
|
||||
(setup-masks (_type_ int int) none 12)
|
||||
(setup-cspace-and-add (_type_ art-joint-geo symbol) none 13)
|
||||
(do-joint-math (_type_ cspace-array joint-control) none 14)
|
||||
)
|
||||
@@ -12216,7 +12243,7 @@
|
||||
:size-assert #x60
|
||||
:flag-assert #xf00000060
|
||||
(:methods
|
||||
(new (symbol type float float float float float) _type_ 0)
|
||||
(new (symbol type float float float shadow-flags float) _type_ 0)
|
||||
(clear-offset-bit (shadow-control) int 9)
|
||||
(set-offset-bit (shadow-control) int 10)
|
||||
(set-top-plane-offset (shadow-control float) int 11)
|
||||
@@ -16369,10 +16396,12 @@
|
||||
(defenum manipy-options
|
||||
:bitfield #t
|
||||
:type uint32
|
||||
(mo-0 0)
|
||||
)
|
||||
|
||||
(deftype manipy (process-drawable)
|
||||
((new-trans-hook (function none) :offset-assert 200)
|
||||
((root-override collide-shape :offset 128 :score 1)
|
||||
(new-trans-hook (function none) :offset-assert 200)
|
||||
(cur-trans-hook (function none) :offset-assert 204)
|
||||
(cur-event-hook (function none) :offset-assert 208)
|
||||
(new-joint-anim art-joint-anim :offset-assert 212)
|
||||
@@ -16396,7 +16425,7 @@
|
||||
)
|
||||
:flag-assert #x1501000174
|
||||
(:methods
|
||||
(manipy-method-20 () none 20)
|
||||
(idle () _type_ :state 20)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -16413,8 +16442,8 @@
|
||||
:size-assert #xb0
|
||||
:flag-assert #x10003000b0
|
||||
(:methods
|
||||
(part-spawner-method-14 () none 14)
|
||||
(part-spawner-method-15 () none 15)
|
||||
(active () _type_ :state 14)
|
||||
(is-in-view? (_type_) symbol 15)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -16440,22 +16469,22 @@
|
||||
:flag-assert #x1000f00168
|
||||
;; field userdata uses ~A with a 64-bit load
|
||||
(:methods
|
||||
(part-tracker-method-14 () none 14)
|
||||
(part-tracker-method-15 () none 15)
|
||||
(active () _type_ :state 14)
|
||||
(notify-parent-of-death (_type_) none 15)
|
||||
)
|
||||
)
|
||||
|
||||
(deftype lightning-tracker (process)
|
||||
((ppointer-override (pointer lightning-tracker) :offset 28 :score 100)
|
||||
(root trsqv :offset-assert 128)
|
||||
(lightning lightning-spec :offset-assert 132)
|
||||
(lightning lightning-control :offset-assert 132)
|
||||
(callback (function lightning-tracker none) :offset-assert 136)
|
||||
(duration uint64 :offset-assert 144)
|
||||
(start-time time-frame :offset-assert 152)
|
||||
(offset0 vector :inline :offset-assert 160)
|
||||
(offset1 vector :inline :offset-assert 176)
|
||||
(target0 uint64 :offset-assert 192)
|
||||
(target1 uint64 :offset-assert 200)
|
||||
(target0 handle :offset-assert 192)
|
||||
(target1 handle :offset-assert 200)
|
||||
(target-joint0 int32 :offset-assert 208)
|
||||
(target-joint1 int32 :offset-assert 212)
|
||||
(sound uint32 :offset-assert 216)
|
||||
@@ -16469,14 +16498,15 @@
|
||||
:flag-assert #x1100b00130
|
||||
;; field userdata uses ~A with a 64-bit load
|
||||
(:methods
|
||||
(lightning-tracker-method-14 () none 14)
|
||||
(lightning-tracker-method-15 () none 15)
|
||||
(lightning-tracker-method-16 () none 16)
|
||||
(active () _type_ :state 14)
|
||||
(notify-parent-of-death (_type_) none 15)
|
||||
(update (_type_) none 16)
|
||||
)
|
||||
)
|
||||
|
||||
(deftype touch-tracker (process-drawable)
|
||||
((duration time-frame :offset-assert 200)
|
||||
((root-override collide-shape :offset 128 :score 1)
|
||||
(duration time-frame :offset-assert 200)
|
||||
(target handle :offset-assert 208)
|
||||
(event symbol :offset-assert 216) ;; guessed by decompiler
|
||||
(run-function (function object) :offset-assert 220) ;; guessed by decompiler
|
||||
@@ -16487,12 +16517,13 @@
|
||||
:size-assert #xe8
|
||||
:flag-assert #x15007000e8
|
||||
(:methods
|
||||
(touch-tracker-method-20 () none 20)
|
||||
(active () _type_ :state 20)
|
||||
)
|
||||
)
|
||||
|
||||
(deftype swingpole (process-drawable)
|
||||
((edge-length meters :offset-assert 200)
|
||||
((root-override collide-shape :offset 128 :score 1)
|
||||
(edge-length meters :offset-assert 200)
|
||||
(path-pos float :offset-assert 204)
|
||||
(joint-track int32 :offset-assert 208)
|
||||
(speed meters :offset-assert 212)
|
||||
@@ -16503,9 +16534,9 @@
|
||||
:size-assert #x11c
|
||||
:flag-assert #x1700a0011c
|
||||
(:methods
|
||||
(swingpole-method-20 () none 20)
|
||||
(swingpole-method-21 () none 21)
|
||||
(swingpole-method-22 () none 22)
|
||||
(idle () _type_ :state 20)
|
||||
(active (handle) _type_ :state 21)
|
||||
(move-along-path (_type_) none 22)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -16547,7 +16578,8 @@
|
||||
)
|
||||
|
||||
(deftype explosion (process-drawable)
|
||||
((start-time time-frame :offset-assert 200)
|
||||
((root-override collide-shape :offset 128 :score 1)
|
||||
(start-time time-frame :offset-assert 200)
|
||||
(duration uint32 :offset-assert 208)
|
||||
(linger-duration uint32 :offset-assert 212)
|
||||
(attack-id uint32 :offset-assert 216)
|
||||
@@ -16556,9 +16588,9 @@
|
||||
:size-assert #xdc
|
||||
:flag-assert #x17006000dc
|
||||
(:methods
|
||||
(explosion-method-20 () none 20)
|
||||
(explosion-method-21 () none 21)
|
||||
(explosion-method-22 () none 22)
|
||||
(explode () _type_ :state 20)
|
||||
(setup-explosion-collision (_type_) none 21)
|
||||
(explosion-method-22 (_type_) none 22)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -16566,7 +16598,7 @@
|
||||
((spawn-point vector :inline :offset-assert 0)
|
||||
(spawn-quat quaternion :inline :offset-assert 16)
|
||||
(radius float :offset-assert 32)
|
||||
(group basic :offset-assert 36)
|
||||
(group sparticle-launch-group :offset-assert 36)
|
||||
(collide-with collide-spec :offset-assert 40)
|
||||
(penetrate-using penetrate :offset-assert 48)
|
||||
)
|
||||
@@ -16582,7 +16614,7 @@
|
||||
:flag-assert #xf00000080
|
||||
;; Failed to read fields.
|
||||
(:methods
|
||||
(process-hidden-method-14 () none 14) ;; (die () _type_ :state 14)
|
||||
(die () _type_ :state 14)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -20016,6 +20048,7 @@
|
||||
(unk-5 5)
|
||||
(unk-6 6)
|
||||
(unk-7 7)
|
||||
(unk-8 8)
|
||||
)
|
||||
;; ---sparticle-launcher-h:sp-group-flag
|
||||
|
||||
@@ -20519,7 +20552,7 @@
|
||||
(fov0 float :offset-assert 148)
|
||||
(fov1 float :offset-assert 152)
|
||||
(fov-index cam-index :inline :offset-assert 160)
|
||||
(tracking cam-rotation-tracker :inline :offset-assert 208)
|
||||
(tracking cam-rotation-tracker :inline :offset-assert 208 :score 1)
|
||||
(view-off-param float :offset-assert 472)
|
||||
(view-off vector :inline :offset-assert 480)
|
||||
(joystick-saved-view-off vector :inline :offset-assert 496)
|
||||
@@ -20533,7 +20566,7 @@
|
||||
(circular-follow vector :inline :offset-assert 2256)
|
||||
(max-angle-offset float :offset-assert 2272)
|
||||
(max-angle-curr float :offset-assert 2276)
|
||||
(options uint32 :offset-assert 2280) ;; TODO - this is likely a cam-slave-options but the size is wrong?
|
||||
(options cam-slave-options-u32 :offset-assert 2280)
|
||||
(cam-entity entity :offset-assert 2284) ;; guessed by decompiler
|
||||
(butt-timer uint64 :offset-assert 2288)
|
||||
(butt-seek basic :offset-assert 2296)
|
||||
@@ -20597,7 +20630,7 @@
|
||||
cam-remote))
|
||||
|
||||
(deftype camera-master (process)
|
||||
((master-options uint32 :offset-assert 128)
|
||||
((master-options cam-master-options-u32 :offset-assert 128)
|
||||
(settings cam-setting-data :offset-assert 132)
|
||||
(slave (pointer camera-slave) :offset-assert 136) ;; guessed by decompiler
|
||||
(decel (pointer camera-slave) :offset-assert 140) ;; a total guess that is probably wrong!
|
||||
@@ -23836,7 +23869,7 @@
|
||||
;; foreground ;;
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
;; (define-extern foreground-vu0-block object)
|
||||
(define-extern foreground-vu0-block vu-function)
|
||||
;; (define-extern *bucket-map* object)
|
||||
;; (define-extern vu1-bucket-map function)
|
||||
;; (define-extern generic-bucket-state-init function)
|
||||
@@ -23847,7 +23880,7 @@
|
||||
(define-extern vu-lights<-light-group! (function vu-lights light-group none))
|
||||
;; (define-extern foreground-add-mtx-calc function)
|
||||
(define-extern foreground-wrapup (function none))
|
||||
;; (define-extern *default-shadow-settings* object) ;; shadow-settings
|
||||
(define-extern *default-shadow-settings* shadow-settings)
|
||||
;; (define-extern foreground-shadow function)
|
||||
;; (define-extern foreground-generic-merc-death function)
|
||||
;; (define-extern foreground-generic-merc-add-fragments function)
|
||||
@@ -26764,9 +26797,9 @@
|
||||
(define-extern cam-curve-setup (function vector none :behavior camera-slave))
|
||||
(define-extern cam-calc-follow! (function cam-rotation-tracker vector symbol vector))
|
||||
(define-extern mat-remove-z-rot (function matrix vector matrix))
|
||||
(define-extern slave-matrix-blend-2 (function matrix float vector matrix matrix))
|
||||
(define-extern slave-matrix-blend-2 (function matrix cam-slave-options-u32 vector matrix matrix))
|
||||
(define-extern vector-into-frustum-nosmooth! (function matrix vector float vector))
|
||||
(define-extern slave-set-rotation! (function cam-rotation-tracker vector float float symbol none))
|
||||
(define-extern slave-set-rotation! (function cam-rotation-tracker vector cam-slave-options-u32 float symbol none))
|
||||
(define-extern v-slrp2! (function vector vector vector float vector float vector))
|
||||
(define-extern v-slrp3! (function vector vector vector vector float vector))
|
||||
|
||||
@@ -27414,7 +27447,7 @@
|
||||
(define-extern vector<-cspace! (function vector cspace vector))
|
||||
(define-extern vector<-matrix! (function vector matrix vector))
|
||||
(define-extern vector<-cspace+vector! (function vector cspace vector vector))
|
||||
(define-extern cspace-children (function process-drawable int pair)) ;;
|
||||
(define-extern cspace-children (function process-drawable int pair)) ;;
|
||||
(define-extern cspace-inspect-tree (function process-drawable cspace int int object process-drawable))
|
||||
(define-extern execute-math-engine (function int))
|
||||
(define-extern draw-joint-axes (function process-drawable none))
|
||||
@@ -27543,7 +27576,6 @@
|
||||
;; generic-obs ;;
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
#|
|
||||
(deftype target-start (process-hidden)
|
||||
()
|
||||
:method-count-assert 15
|
||||
@@ -27553,11 +27585,9 @@
|
||||
(:methods
|
||||
)
|
||||
)
|
||||
|#
|
||||
|
||||
(declare-type camera-start basic)
|
||||
(define-extern camera-start type)
|
||||
#|
|
||||
(deftype camera-start (process-hidden)
|
||||
()
|
||||
:method-count-assert 15
|
||||
@@ -27567,13 +27597,11 @@
|
||||
(:methods
|
||||
)
|
||||
)
|
||||
|#
|
||||
|
||||
#|
|
||||
(deftype med-res-level (process-drawable)
|
||||
((level-name basic :offset-assert 196)
|
||||
(part-mode basic :offset-assert 200)
|
||||
(index int32 :offset-assert 204)
|
||||
((level-name basic :offset-assert 200)
|
||||
(part-mode basic :offset-assert 204)
|
||||
(index int32 :offset-assert 208)
|
||||
)
|
||||
:method-count-assert 21
|
||||
:size-assert #xd4
|
||||
@@ -27582,16 +27610,15 @@
|
||||
(idle () _type_ :state 20)
|
||||
)
|
||||
)
|
||||
|#
|
||||
|
||||
#|
|
||||
(deftype launcher (process-drawable)
|
||||
((spring-height meters :offset-assert 196)
|
||||
(camera state :offset-assert 200) ;; guessed by decompiler
|
||||
(active-distance float :offset-assert 204)
|
||||
(seek-time time-frame :offset-assert 212) ;; time-frame
|
||||
(dest vector :inline :offset-assert 220)
|
||||
(sound-id sound-id :offset-assert 236) ;; guessed by decompiler
|
||||
((root-override collide-shape :offset 128 :score 1)
|
||||
(spring-height meters :offset-assert 200)
|
||||
(camera state :offset-assert 204) ;; guessed by decompiler
|
||||
(active-distance float :offset-assert 208)
|
||||
(seek-time time-frame :offset-assert 216) ;; time-frame
|
||||
(dest vector :inline :offset-assert 224)
|
||||
(sound-id sound-id :offset-assert 240) ;; guessed by decompiler
|
||||
)
|
||||
:method-count-assert 23
|
||||
:size-assert #xf4
|
||||
@@ -27602,31 +27629,30 @@
|
||||
(deactivated () _type_ :state 22)
|
||||
)
|
||||
)
|
||||
|#
|
||||
|
||||
;; (define-extern entity-lookup-part-group function)
|
||||
(define-extern entity-lookup-part-group (function entity-actor (pointer string) symbol none))
|
||||
(define-extern clone-anim-once (function handle symbol string none :behavior process-drawable))
|
||||
(define-extern clone-anim (function handle symbol string none :behavior process-drawable))
|
||||
;; (define-extern swingpole-init function)
|
||||
;; (define-extern manipy-post function)
|
||||
(define-extern manipy-init (function vector entity-actor skeleton-group vector none :behavior manipy)) ;; (function vector entity-actor skeleton-group vector none :behavior manipy)
|
||||
(define-extern part-tracker-init (function sparticle-launch-group time-frame (function part-tracker none) (pointer process-drawable) process collide-prim-core none :behavior part-tracker))
|
||||
;; (define-extern part-tracker-track-root function) ;; (function sparticle-system sparticle-cpuinfo vector none)
|
||||
;; (define-extern part-tracker-move-to-target function) ;; (function part-tracker vector)
|
||||
;; (define-extern part-tracker-track-target function) ;; (function part-tracker vector)
|
||||
(define-extern lightning-tracker-init (function lightning-spec time-frame symbol process-drawable vector vector none))
|
||||
(define-extern swingpole-init (function int object :behavior swingpole))
|
||||
(define-extern manipy-post (function none :behavior manipy))
|
||||
(define-extern manipy-init (function vector entity-actor skeleton-group vector object none :behavior manipy)) ;; (function vector entity-actor skeleton-group vector none :behavior manipy)
|
||||
(define-extern part-tracker-init (function sparticle-launch-group time-frame (function part-tracker none) (pointer process-drawable) process matrix none :behavior part-tracker))
|
||||
(define-extern part-tracker-track-root (function sparticle-system sparticle-cpuinfo vector none))
|
||||
(define-extern part-tracker-move-to-target (function part-tracker vector))
|
||||
(define-extern part-tracker-track-target (function part-tracker vector))
|
||||
(define-extern lightning-tracker-init (function lightning-spec time-frame symbol process-drawable vector vector none :behavior lightning-tracker))
|
||||
(define-extern process-grab? (function process symbol symbol :behavior process))
|
||||
(define-extern process-release? (function process symbol :behavior process))
|
||||
;; (define-extern camera-look-at function) ;; (function pair uint process :behavior camera-tracker)
|
||||
(define-extern camera-look-at (function pair uint process))
|
||||
(define-extern ja-anim-done? (function process symbol)) ;;
|
||||
;; (define-extern camera-pov-from function) ;; (function pair uint process :behavior camera-tracker)
|
||||
;; (define-extern cam-launcher-joystick function) ;; (function vector :behavior camera-slave)
|
||||
;; (define-extern cam-launcher-shortfall state) ;; (state camera-slave)
|
||||
;; (define-extern cam-launcher-long-joystick function) ;; (function vector :behavior camera-slave)
|
||||
;; (define-extern cam-launcher-longfall state) ;; (state camera-slave)
|
||||
;; (define-extern launcher-init-by-other function) ;; (function vector float int float none :behavior launcher)
|
||||
(define-extern camera-pov-from (function pair uint process))
|
||||
(define-extern cam-launcher-joystick (function vector :behavior camera-slave))
|
||||
(define-extern cam-launcher-shortfall (state camera-slave))
|
||||
(define-extern cam-launcher-long-joystick(function vector :behavior camera-slave))
|
||||
(define-extern cam-launcher-longfall (state camera-slave))
|
||||
(define-extern launcher-init-by-other (function vector float int float none :behavior launcher))
|
||||
(define-extern touch-tracker-init (function vector float time-frame none :behavior touch-tracker))
|
||||
;; (define-extern explosion-init-by-other function)
|
||||
(define-extern explosion-init-by-other (function explosion-init-params object :behavior explosion))
|
||||
(define-extern explosion-spawn (function process-drawable type explosion-init-params none))
|
||||
(define-extern process-drawable-random-point! (function process-drawable vector vector))
|
||||
(define-extern process-drawable-pair-random-point! (function process-drawable process-drawable vector float vector))
|
||||
@@ -28298,12 +28324,12 @@
|
||||
;; target-part ;;
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
(define-extern birth-func-copy-target-y-rot (function int sparticle-cpuinfo sparticle-launchinfo none)) ;;
|
||||
(define-extern birth-func-copy-target-y-rot (function int sparticle-cpuinfo sparticle-launchinfo none)) ;;
|
||||
(define-extern birth-func-ground-orient (function int sparticle-cpuinfo sparticle-launchinfo none)) ;; (function int sparticle-cpuinfo sparticle-launchinfo none)
|
||||
(define-extern birth-func-target-orient (function int sparticle-cpuinfo sparticle-launchinfo none)) ;; (function int sparticle-cpuinfo sparticle-launchinfo none)
|
||||
(define-extern birth-func-vector-orient (function int sparticle-cpuinfo sparticle-launchinfo none)) ;; (function int sparticle-cpuinfo sparticle-launchinfo none)
|
||||
(define-extern birth-func-set-alpha-from-userdata (function int sparticle-cpuinfo sparticle-launchinfo float))
|
||||
(define-extern part-tracker-track-target-joint (function int sparticle-cpuinfo sparticle-launchinfo none)) ;;
|
||||
(define-extern part-tracker-track-target-joint (function int sparticle-cpuinfo sparticle-launchinfo none)) ;;
|
||||
(define-extern process-drawable-burn-effect (function time-frame rgbaf :behavior target)) ;;
|
||||
(define-extern lightning-probe-callback (function lightning-tracker none))
|
||||
(define-extern process-drawable-shock-effect (function process-drawable lightning-spec (function lightning-tracker none) sparticle-launcher int int float object)) ;; guess
|
||||
@@ -28326,7 +28352,7 @@
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
(define-extern poly-find-nearest-edge "TODO- Not 100% sure here, but unused" (function nav-poly (inline-array vector) vector vector nav-poly))
|
||||
(define-extern target-collision-low-coverage (function control-info collide-query vector (pointer uint32) (pointer int64) (pointer symbol) none)) ;;
|
||||
(define-extern target-collision-low-coverage (function control-info collide-query vector (pointer uint32) (pointer int64) (pointer symbol) none)) ;;
|
||||
(define-extern target-collision-reaction (function control-info collide-query vector vector collide-status :behavior target)) ;; (function control-info collide-shape-intersect vector vector collide-status)
|
||||
(define-extern target-collision-no-reaction (function control-info collide-query vector vector none)) ;; (function control-info collide-shape-intersect vector vector none)
|
||||
(define-extern *collide-edge-board-spec* collide-edge-spec)
|
||||
|
||||
@@ -463,5 +463,8 @@
|
||||
[13, "(function none :behavior target)"],
|
||||
[14, "(function none :behavior target)"],
|
||||
[15, "(function none :behavior target)"]
|
||||
],
|
||||
"generic-obs": [
|
||||
[9, "(function symbol :behavior touch-tracker)"]
|
||||
]
|
||||
}
|
||||
|
||||
@@ -519,5 +519,6 @@
|
||||
],
|
||||
"gun-part": [["L192", "(pointer rgba)", 36]],
|
||||
"target-part": [["L452", "uint64", true]],
|
||||
"target-anim": [["L423", "uint64", true]]
|
||||
"target-anim": [["L423", "uint64", true]],
|
||||
"generic-obs": [["L536", "attack-info"], ["L534", "attack-info"]]
|
||||
}
|
||||
|
||||
@@ -1189,5 +1189,9 @@
|
||||
"check-shell-level1": [[16, "vector"]],
|
||||
"check-shell-level2": [[16, "vector"]],
|
||||
"birth-func-target-orient": [[48, "vector"]],
|
||||
"birth-func-vector-orient": [[32, "vector"]]
|
||||
"birth-func-vector-orient": [[32, "vector"]],
|
||||
"(enter cam-launcher-longfall)": [[16, "vector"]],
|
||||
"explosion-init-by-other": [
|
||||
[16, "traffic-danger-info"]
|
||||
]
|
||||
}
|
||||
|
||||
@@ -4808,5 +4808,103 @@
|
||||
"target-edge-grab-anim": [
|
||||
[54, "v1", "art-joint-anim"],
|
||||
[111, "v1", "art-joint-anim"]
|
||||
],
|
||||
"entity-lookup-part-group": [
|
||||
["_stack_", 16, "res-tag"],
|
||||
[29, "s3", "basic"]
|
||||
],
|
||||
"(method 22 swingpole)": [
|
||||
[53, "v1", "process-drawable"]
|
||||
],
|
||||
"(code active swingpole)": [
|
||||
[34, "a0", "process-focusable"]
|
||||
],
|
||||
"swingpole-init": [
|
||||
[56, "a0", "swingpole"]
|
||||
],
|
||||
"(event idle manipy)": [
|
||||
[61, "v1", "joint"],
|
||||
[233, "v1", "process-drawable"],
|
||||
[360, "v1", "vector"],
|
||||
[368, "v1", "vector"],
|
||||
[402, "t9", "(function manipy object)"],
|
||||
[475, "a0", "process-drawable"],
|
||||
[498, "v1", "process-drawable"],
|
||||
[507, "a0", "process-drawable"],
|
||||
[535, "v1", "vector"],
|
||||
[408, "v1", "float"],
|
||||
[462, "v1", "float"],
|
||||
[686, "a0", "float"]
|
||||
],
|
||||
"(trans idle manipy)": [
|
||||
[57, "v1", "process-drawable"],
|
||||
[[64, 73], "a0", "collide-shape"]
|
||||
],
|
||||
"(code idle manipy)": [
|
||||
[61, "a1", "process-drawable"],
|
||||
[82, "gp", "process-drawable"],
|
||||
[88, "gp", "process-drawable"],
|
||||
[131, "a0", "process-drawable"],
|
||||
[193, "a0", "process-drawable"],
|
||||
[164, "a0", "process"],
|
||||
[[159, 190], "gp", "handle"]
|
||||
],
|
||||
"manipy-init": [
|
||||
[[142, 146], "a0", "collide-shape"],
|
||||
[214, "v1", "joint"]
|
||||
],
|
||||
"(code active part-tracker)": [
|
||||
[[29, 43], "v1", "process-drawable"],
|
||||
[[103, 117], "v1", "process-drawable"]
|
||||
],
|
||||
"(method 16 lightning-tracker)": [
|
||||
[[141, 158], "a0", "process-focusable"],
|
||||
[174, "a0", "process-drawable"],
|
||||
[[53, 70], "a0", "process-focusable"],
|
||||
[82, "a0", "process-focusable"]
|
||||
],
|
||||
"(code active lightning-tracker)": [
|
||||
[[71, 81], "v1", "process-drawable"]
|
||||
],
|
||||
"(exit active lightning-tracker)": [
|
||||
[4, "v0", "sound-rpc-set-param"]
|
||||
],
|
||||
"ja-anim-done?": [
|
||||
[30, "gp", "process-drawable"]
|
||||
],
|
||||
"camera-pov-from": [
|
||||
[[4, 41], "gp", "target"],
|
||||
[21, "v1", "joint"],
|
||||
[32, "v1", "joint"]
|
||||
],
|
||||
"(event active part-spawner)": [
|
||||
[25, "v1", "vector"]
|
||||
],
|
||||
"(exit active launcher)": [
|
||||
[2, "v0", "sound-rpc-set-param"]
|
||||
],
|
||||
"(method 11 launcher)": [
|
||||
[128, "v0", "vector"]
|
||||
],
|
||||
"launcher-init-by-other": [
|
||||
[136, "v0", "vector"]
|
||||
],
|
||||
"(event active touch-tracker)": [
|
||||
[71, "a0", "process"],
|
||||
[98, "t9", "(function touch-tracker object)"]
|
||||
],
|
||||
"(code active touch-tracker)": [
|
||||
[22, "a0", "process-drawable"],
|
||||
[32, "a0", "collide-shape"]
|
||||
],
|
||||
"(event explode explosion)": [
|
||||
[13, "v1", "process-drawable"],
|
||||
[18, "a0", "collide-shape"]
|
||||
],
|
||||
"process-drawable-random-point!": [
|
||||
[[29, 34], "s4", "collide-shape"]
|
||||
],
|
||||
"(method 11 part-spawner)": [
|
||||
[112, "a3", "vector"]
|
||||
]
|
||||
}
|
||||
|
||||
@@ -7,6 +7,22 @@
|
||||
|
||||
;; todo: some types, method names.
|
||||
|
||||
(defenum traffic-danger-flags
|
||||
:type uint8
|
||||
:bitfield #t
|
||||
(tdf0 0)
|
||||
)
|
||||
|
||||
(defenum traffic-danger-type
|
||||
:type uint8
|
||||
(tdt0 0)
|
||||
(tdt1 1)
|
||||
(tdt2 2)
|
||||
(tdt3 3)
|
||||
(tdt4 4)
|
||||
(tdt5 5)
|
||||
)
|
||||
|
||||
;; NOTE - for default-menu
|
||||
(define-extern traffic-start (function none))
|
||||
(define-extern traffic-kill (function none))
|
||||
@@ -22,14 +38,14 @@
|
||||
(define *race-vehicle-entity* (the-as object #f))
|
||||
|
||||
(deftype traffic-danger-info (structure)
|
||||
((sphere sphere :inline :offset-assert 0)
|
||||
(velocity vector :inline :offset-assert 16)
|
||||
(handle uint64 :offset-assert 32)
|
||||
(notify-radius float :offset-assert 40)
|
||||
(danger-level float :offset-assert 44)
|
||||
(decay-rate float :offset-assert 48)
|
||||
(flags uint8 :offset-assert 52)
|
||||
(danger-type uint8 :offset-assert 53)
|
||||
((sphere sphere :inline :offset-assert 0)
|
||||
(velocity vector :inline :offset-assert 16)
|
||||
(handle uint64 :offset-assert 32)
|
||||
(notify-radius float :offset-assert 40)
|
||||
(danger-level float :offset-assert 44)
|
||||
(decay-rate float :offset-assert 48)
|
||||
(flags traffic-danger-flags :offset-assert 52)
|
||||
(danger-type traffic-danger-type :offset-assert 53)
|
||||
)
|
||||
:method-count-assert 9
|
||||
:size-assert #x36
|
||||
|
||||
@@ -5,8 +5,6 @@
|
||||
;; name in dgo: fma-sphere
|
||||
;; dgos: ENGINE, GAME
|
||||
|
||||
;; og:ignore-form:(defbehavior fma-sphere-init-by-other
|
||||
|
||||
;; +++fma-sphere-mode
|
||||
(defenum fma-sphere-mode
|
||||
:type uint32
|
||||
@@ -191,8 +189,8 @@
|
||||
(set! (-> self danger notify-radius) (+ 40960.0 (-> self sphere r)))
|
||||
(set! (-> self danger danger-level) 1.0)
|
||||
(set! (-> self danger decay-rate) 0.0)
|
||||
(set! (-> self danger flags) (the-as uint 1))
|
||||
(set! (-> self danger danger-type) (the-as uint 4))
|
||||
(set! (-> self danger flags) (traffic-danger-flags tdf0))
|
||||
(set! (-> self danger danger-type) (traffic-danger-type tdt4))
|
||||
)
|
||||
)
|
||||
(else
|
||||
|
||||
@@ -17,13 +17,25 @@
|
||||
(cond
|
||||
((= (-> self tracking-status) 3)
|
||||
(cam-calc-follow! (-> self tracking) s1-0 #t)
|
||||
(slave-set-rotation! (-> self tracking) s1-0 (the-as float (-> self tracking-options)) (-> self fov) #t)
|
||||
(slave-set-rotation!
|
||||
(-> self tracking)
|
||||
s1-0
|
||||
(the-as cam-slave-options-u32 (-> self tracking-options))
|
||||
(-> self fov)
|
||||
#t
|
||||
)
|
||||
(set! sv-144 (-> self tracking))
|
||||
(set! s1-0 (-> self trans))
|
||||
)
|
||||
((= (-> self tracking-status) 2)
|
||||
(cam-calc-follow! (-> self tracking) s0-0 #t)
|
||||
(slave-set-rotation! (-> self tracking) s0-0 (the-as float (-> self tracking-options)) (-> self fov) #t)
|
||||
(slave-set-rotation!
|
||||
(-> self tracking)
|
||||
s0-0
|
||||
(the-as cam-slave-options-u32 (-> self tracking-options))
|
||||
(-> self fov)
|
||||
#t
|
||||
)
|
||||
(set! gp-0 (-> self tracking))
|
||||
(set! s0-0 (-> self trans))
|
||||
)
|
||||
@@ -89,9 +101,9 @@
|
||||
)
|
||||
(let ((f30-0 (acos (vector-dot (the-as vector (-> s2-0 vector)) (-> s2-0 vector 1)))))
|
||||
(cond
|
||||
((logtest? (-> *camera* master-options) 2)
|
||||
(set! (-> *camera* master-options) (logand -7 (-> *camera* master-options)))
|
||||
(when (and (< 8192.0 f30-0) (logtest? (-> *camera* master-options) 1))
|
||||
((logtest? (-> *camera* master-options) (cam-master-options-u32 SET_COMBINER_AXIS))
|
||||
(logclear! (-> *camera* master-options) (cam-master-options-u32 SET_COMBINER_AXIS FLIP_COMBINER))
|
||||
(when (and (< 8192.0 f30-0) (logtest? (-> *camera* master-options) (cam-master-options-u32 HAVE_TARGET)))
|
||||
(vector-! (the-as vector (-> s2-0 vector)) (-> *camera* tpos-curr) s1-0)
|
||||
(vector-! (-> s2-0 vector 1) s0-0 s1-0)
|
||||
(vector-flatten! (the-as vector (-> s2-0 vector)) (the-as vector (-> s2-0 vector)) (-> *camera* local-down))
|
||||
@@ -106,11 +118,11 @@
|
||||
)
|
||||
)
|
||||
((and (< 16384.0 f30-0) (< (vector-dot (-> self flip-control-axis) s4-0) 0.0))
|
||||
(logxor! (-> *camera* master-options) 4)
|
||||
(logxor! (-> *camera* master-options) (cam-master-options-u32 FLIP_COMBINER))
|
||||
)
|
||||
)
|
||||
(set! (-> self flip-control-axis quad) (-> s4-0 quad))
|
||||
(when (logtest? (-> *camera* master-options) 4)
|
||||
(when (logtest? (-> *camera* master-options) (cam-master-options-u32 FLIP_COMBINER))
|
||||
(set! f30-0 (- 65536.0 f30-0))
|
||||
(vector-negate! s4-0 s4-0)
|
||||
)
|
||||
@@ -126,147 +138,147 @@
|
||||
)
|
||||
|
||||
(defstate cam-combiner-active (camera-combiner)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(local-vars (v0-0 none))
|
||||
(let ((v1-0 arg2))
|
||||
(the-as
|
||||
object
|
||||
(cond
|
||||
((= v1-0 'fast-rot)
|
||||
(set! v0-0 (the-as none #t))
|
||||
(set! (-> self fast-rot) (the-as basic v0-0))
|
||||
v0-0
|
||||
)
|
||||
((= v1-0 'set-interpolation)
|
||||
(let ((f0-1 (the float (-> arg3 param 0))))
|
||||
(cond
|
||||
((>= 0.0 f0-1)
|
||||
(let ((f0-2 1.0))
|
||||
(set! (-> self interp-val) f0-2)
|
||||
f0-2
|
||||
)
|
||||
)
|
||||
(else
|
||||
(set! (-> self interp-val) 0.0)
|
||||
(let ((f0-3 (/ 5.0 f0-1)))
|
||||
(set! (-> self interp-step) f0-3)
|
||||
f0-3
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
((= v1-0 'teleport)
|
||||
(when (nonzero? (-> self tracking-status))
|
||||
(jump-to-target! (-> self tracking point-of-interest-blend) 0.0)
|
||||
(cam-calc-follow! (-> self tracking) (-> self trans) #f)
|
||||
(slave-set-rotation!
|
||||
(-> self tracking)
|
||||
(-> self trans)
|
||||
(the-as float (-> self tracking-options))
|
||||
(-> self fov)
|
||||
#f
|
||||
)
|
||||
)
|
||||
)
|
||||
((= v1-0 'stop-tracking)
|
||||
(set! (-> self tracking-status) (the-as uint 0))
|
||||
0
|
||||
)
|
||||
((= v1-0 'start-tracking)
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(local-vars (v0-0 object))
|
||||
(the-as
|
||||
object
|
||||
(case event-type
|
||||
(('fast-rot)
|
||||
(set! v0-0 #t)
|
||||
(set! (-> self fast-rot) (the-as basic v0-0))
|
||||
v0-0
|
||||
)
|
||||
(('set-interpolation)
|
||||
(let ((f0-1 (the float (-> event param 0))))
|
||||
(cond
|
||||
((< arg1 1)
|
||||
(let ((t9-3 format)
|
||||
(a0-14 0)
|
||||
(a1-4 "ERROR <GMJ>: missing camera-slave parameter to *camera-combiner* start-tracking~%")
|
||||
)
|
||||
(let ((v1-8 (-> arg3 param 0)))
|
||||
(rtype-of v1-8)
|
||||
)
|
||||
(t9-3 a0-14 a1-4)
|
||||
)
|
||||
)
|
||||
((not (type? (-> arg3 param 0) camera-slave))
|
||||
(let ((t9-5 format)
|
||||
(a0-16 0)
|
||||
(a1-6 "ERROR <GMJ>: invalid type '~A' to *camera-combiner* start-tracking~%")
|
||||
(v1-11 (-> arg3 param 0))
|
||||
)
|
||||
(t9-5 a0-16 a1-6 (rtype-of v1-11))
|
||||
)
|
||||
)
|
||||
((zero? (-> self tracking-status))
|
||||
(set! (-> self tracking-status) (the-as uint 1))
|
||||
(let ((gp-1 (the-as camera-slave (-> arg3 param 0))))
|
||||
(set! (-> self tracking-options) (the-as int (-> gp-1 options)))
|
||||
(set! (-> self tracking no-follow) (-> gp-1 tracking no-follow))
|
||||
(copy-to (-> self tracking tilt-adjust) (-> gp-1 tracking tilt-adjust))
|
||||
(copy-to (-> self tracking underwater-blend) (-> gp-1 tracking underwater-blend))
|
||||
(copy-to (-> self tracking point-of-interest-blend) (-> gp-1 tracking point-of-interest-blend))
|
||||
(let ((gp-2 (-> gp-1 trans)))
|
||||
(cam-calc-follow! (-> self tracking) gp-2 #f)
|
||||
(slave-set-rotation! (-> self tracking) gp-2 (the-as float (-> self tracking-options)) (-> self fov) #f)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
((= v1-0 'copy-tracking)
|
||||
(cond
|
||||
((< arg1 1)
|
||||
(let ((t9-11 format)
|
||||
(a0-23 0)
|
||||
(a1-12 "ERROR <GMJ>: missing camera-slave parameter to *camera-combiner* copy-tracking~%")
|
||||
)
|
||||
(let ((v1-23 (-> arg3 param 0)))
|
||||
(rtype-of v1-23)
|
||||
)
|
||||
(t9-11 a0-23 a1-12)
|
||||
)
|
||||
)
|
||||
((not (type? (-> arg3 param 0) camera-slave))
|
||||
(let ((t9-13 format)
|
||||
(a0-25 0)
|
||||
(a1-14 "ERROR <GMJ>: invalid type '~A' to *camera-combiner* copy-tracking~%")
|
||||
(v1-25 (-> arg3 param 0))
|
||||
)
|
||||
(t9-13 a0-25 a1-14 (rtype-of v1-25))
|
||||
)
|
||||
)
|
||||
((nonzero? (-> self tracking-status))
|
||||
#f
|
||||
((>= 0.0 f0-1)
|
||||
(set! (-> self interp-val) 1.0)
|
||||
)
|
||||
(else
|
||||
(set! (-> self tracking-status) (the-as uint 1))
|
||||
(let ((gp-3 (the-as camera-slave (-> arg3 param 0))))
|
||||
(set! (-> self tracking-options) (the-as int (-> gp-3 options)))
|
||||
(set! (-> self tracking no-follow) (-> gp-3 tracking no-follow))
|
||||
(copy-to (-> self tracking tilt-adjust) (-> gp-3 tracking tilt-adjust))
|
||||
(copy-to (-> self tracking underwater-blend) (-> gp-3 tracking underwater-blend))
|
||||
(set! (-> self tracking follow-off quad) (-> gp-3 tracking follow-off quad))
|
||||
(set! (-> self tracking follow-pt quad) (-> gp-3 tracking follow-pt quad))
|
||||
(let* ((a2-23 (-> self tracking))
|
||||
(a3-7 (-> gp-3 tracking))
|
||||
(v1-37 (-> a3-7 inv-mat vector 0 quad))
|
||||
(a0-32 (-> a3-7 inv-mat vector 1 quad))
|
||||
(a1-17 (-> a3-7 inv-mat vector 2 quad))
|
||||
(a3-8 (-> a3-7 inv-mat trans quad))
|
||||
)
|
||||
(set! (-> a2-23 inv-mat vector 0 quad) v1-37)
|
||||
(set! (-> a2-23 inv-mat vector 1 quad) a0-32)
|
||||
(set! (-> a2-23 inv-mat vector 2 quad) a1-17)
|
||||
(set! (-> a2-23 inv-mat trans quad) a3-8)
|
||||
)
|
||||
(copy-to (-> self tracking point-of-interest-blend) (-> gp-3 tracking point-of-interest-blend))
|
||||
(set! (-> self tracking looking-at quad) (-> gp-3 tracking looking-at quad))
|
||||
(set! v0-0 (the-as none (-> self tracking looking-interesting)))
|
||||
(set! (-> (the-as vector v0-0) quad) (-> gp-3 tracking looking-interesting quad))
|
||||
)
|
||||
v0-0
|
||||
(set! (-> self interp-val) 0.0)
|
||||
(set! (-> self interp-step) (/ 5.0 f0-1))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(('teleport)
|
||||
(when (nonzero? (-> self tracking-status))
|
||||
(jump-to-target! (-> self tracking point-of-interest-blend) 0.0)
|
||||
(cam-calc-follow! (-> self tracking) (-> self trans) #f)
|
||||
(the-as object (slave-set-rotation!
|
||||
(-> self tracking)
|
||||
(-> self trans)
|
||||
(the-as cam-slave-options-u32 (-> self tracking-options))
|
||||
(-> self fov)
|
||||
#f
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(('stop-tracking)
|
||||
(set! (-> self tracking-status) (the-as uint 0))
|
||||
0
|
||||
)
|
||||
(('start-tracking)
|
||||
(cond
|
||||
((< arg1 1)
|
||||
(let ((t9-3 format)
|
||||
(a0-14 0)
|
||||
(a1-4 "ERROR <GMJ>: missing camera-slave parameter to *camera-combiner* start-tracking~%")
|
||||
)
|
||||
(let ((v1-8 (-> event param 0)))
|
||||
(rtype-of v1-8)
|
||||
)
|
||||
(t9-3 a0-14 a1-4)
|
||||
)
|
||||
)
|
||||
((not (type? (-> event param 0) camera-slave))
|
||||
(let ((t9-5 format)
|
||||
(a0-16 0)
|
||||
(a1-6 "ERROR <GMJ>: invalid type '~A' to *camera-combiner* start-tracking~%")
|
||||
(v1-11 (-> event param 0))
|
||||
)
|
||||
(t9-5 a0-16 a1-6 (rtype-of v1-11))
|
||||
)
|
||||
)
|
||||
((zero? (-> self tracking-status))
|
||||
(set! (-> self tracking-status) (the-as uint 1))
|
||||
(let ((gp-1 (the-as camera-slave (-> event param 0))))
|
||||
(set! (-> self tracking-options) (the-as int (-> gp-1 options)))
|
||||
(set! (-> self tracking no-follow) (-> gp-1 tracking no-follow))
|
||||
(copy-to (-> self tracking tilt-adjust) (-> gp-1 tracking tilt-adjust))
|
||||
(copy-to (-> self tracking underwater-blend) (-> gp-1 tracking underwater-blend))
|
||||
(copy-to (-> self tracking point-of-interest-blend) (-> gp-1 tracking point-of-interest-blend))
|
||||
(let ((gp-2 (-> gp-1 trans)))
|
||||
(cam-calc-follow! (-> self tracking) gp-2 #f)
|
||||
(the-as object (slave-set-rotation!
|
||||
(-> self tracking)
|
||||
gp-2
|
||||
(the-as cam-slave-options-u32 (-> self tracking-options))
|
||||
(-> self fov)
|
||||
#f
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(('copy-tracking)
|
||||
(cond
|
||||
((< arg1 1)
|
||||
(let ((t9-11 format)
|
||||
(a0-23 0)
|
||||
(a1-12 "ERROR <GMJ>: missing camera-slave parameter to *camera-combiner* copy-tracking~%")
|
||||
)
|
||||
(let ((v1-23 (-> event param 0)))
|
||||
(rtype-of v1-23)
|
||||
)
|
||||
(t9-11 a0-23 a1-12)
|
||||
)
|
||||
)
|
||||
((not (type? (-> event param 0) camera-slave))
|
||||
(let ((t9-13 format)
|
||||
(a0-25 0)
|
||||
(a1-14 "ERROR <GMJ>: invalid type '~A' to *camera-combiner* copy-tracking~%")
|
||||
(v1-25 (-> event param 0))
|
||||
)
|
||||
(t9-13 a0-25 a1-14 (rtype-of v1-25))
|
||||
)
|
||||
)
|
||||
((nonzero? (-> self tracking-status))
|
||||
#f
|
||||
)
|
||||
(else
|
||||
(set! (-> self tracking-status) (the-as uint 1))
|
||||
(let ((gp-3 (the-as camera-slave (-> event param 0))))
|
||||
(set! (-> self tracking-options) (the-as int (-> gp-3 options)))
|
||||
(set! (-> self tracking no-follow) (-> gp-3 tracking no-follow))
|
||||
(copy-to (-> self tracking tilt-adjust) (-> gp-3 tracking tilt-adjust))
|
||||
(copy-to (-> self tracking underwater-blend) (-> gp-3 tracking underwater-blend))
|
||||
(set! (-> self tracking follow-off quad) (-> gp-3 tracking follow-off quad))
|
||||
(set! (-> self tracking follow-pt quad) (-> gp-3 tracking follow-pt quad))
|
||||
(let* ((a2-23 (-> self tracking))
|
||||
(a3-7 (-> gp-3 tracking))
|
||||
(v1-37 (-> a3-7 inv-mat vector 0 quad))
|
||||
(a0-32 (-> a3-7 inv-mat vector 1 quad))
|
||||
(a1-17 (-> a3-7 inv-mat vector 2 quad))
|
||||
(a3-8 (-> a3-7 inv-mat trans quad))
|
||||
)
|
||||
(set! (-> a2-23 inv-mat vector 0 quad) v1-37)
|
||||
(set! (-> a2-23 inv-mat vector 1 quad) a0-32)
|
||||
(set! (-> a2-23 inv-mat vector 2 quad) a1-17)
|
||||
(set! (-> a2-23 inv-mat trans quad) a3-8)
|
||||
)
|
||||
(copy-to (-> self tracking point-of-interest-blend) (-> gp-3 tracking point-of-interest-blend))
|
||||
(set! (-> self tracking looking-at quad) (-> gp-3 tracking looking-at quad))
|
||||
(set! v0-0 (-> self tracking looking-interesting))
|
||||
(set! (-> (the-as vector v0-0) quad) (-> gp-3 tracking looking-interesting quad))
|
||||
)
|
||||
v0-0
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -294,7 +306,9 @@
|
||||
)
|
||||
0
|
||||
)
|
||||
(when (and (zero? (logand (-> *camera* master-options) 1)) (!= (-> self tracking-status) 0))
|
||||
(when (and (not (logtest? (-> *camera* master-options) (cam-master-options-u32 HAVE_TARGET)))
|
||||
(!= (-> self tracking-status) 0)
|
||||
)
|
||||
(set! (-> self tracking-status) (the-as uint 0))
|
||||
0
|
||||
)
|
||||
@@ -318,7 +332,7 @@
|
||||
(slave-set-rotation!
|
||||
(-> self tracking)
|
||||
(-> self trans)
|
||||
(the-as float (-> self tracking-options))
|
||||
(the-as cam-slave-options-u32 (-> self tracking-options))
|
||||
(-> self fov)
|
||||
(not (-> self fast-rot))
|
||||
)
|
||||
@@ -371,7 +385,7 @@
|
||||
(slave-set-rotation!
|
||||
(-> self tracking)
|
||||
(-> self trans)
|
||||
(the-as float (-> self tracking-options))
|
||||
(the-as cam-slave-options-u32 (-> self tracking-options))
|
||||
(-> self fov)
|
||||
(not (-> self fast-rot))
|
||||
)
|
||||
@@ -475,7 +489,3 @@
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -172,10 +172,12 @@
|
||||
)
|
||||
)
|
||||
|
||||
;; WARN: Failed store: (s.w! (+ a0-2 8) 0) at op 78
|
||||
;; WARN: Failed store: (s.w! (+ a0-2 12) 0) at op 79
|
||||
(defun cam-line-dma ()
|
||||
(let* ((v1-5 (-> *display* frames (-> *display* on-screen) debug-buf))
|
||||
(a2-0 (-> v1-5 base))
|
||||
)
|
||||
(with-dma-buffer-add-bucket ((v1-5 (-> *display* frames (-> *display* on-screen) debug-buf))
|
||||
(bucket-id debug-no-zbuf1)
|
||||
)
|
||||
(let ((a0-1 (the-as object (-> v1-5 base))))
|
||||
(let* ((a1-0 v1-5)
|
||||
(a3-0 (the-as object (-> a1-0 base)))
|
||||
@@ -232,20 +234,6 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((a3-16 (-> v1-5 base)))
|
||||
(let ((a0-2 (the-as object (-> v1-5 base))))
|
||||
(set! (-> (the-as dma-packet a0-2) dma) (new 'static 'dma-tag :id (dma-tag-id next)))
|
||||
(set! (-> (the-as dma-packet a0-2) vif0) (new 'static 'vif-tag))
|
||||
(set! (-> (the-as dma-packet a0-2) vif1) (new 'static 'vif-tag))
|
||||
(set! (-> v1-5 base) (&+ (the-as pointer a0-2) 16))
|
||||
)
|
||||
(dma-bucket-insert-tag
|
||||
(-> *display* frames (-> *display* on-screen) bucket-group)
|
||||
(bucket-id debug-no-zbuf1)
|
||||
a2-0
|
||||
(the-as (pointer dma-tag) a3-16)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
@@ -89,12 +89,12 @@
|
||||
(cond
|
||||
((and *target* (not gp-0))
|
||||
(try-update-focus (-> self focus) *target*)
|
||||
(logior! (-> self master-options) 1)
|
||||
(logior! (-> self master-options) (cam-master-options-u32 HAVE_TARGET))
|
||||
(reset-target-tracking)
|
||||
)
|
||||
((and (logtest? (-> self master-options) 1) (not gp-0))
|
||||
(let ((v0-1 (the-as object (logand -2 (-> self master-options)))))
|
||||
(set! (-> self master-options) (the-as uint v0-1))
|
||||
((and (logtest? (-> self master-options) (cam-master-options-u32 HAVE_TARGET)) (not gp-0))
|
||||
(let ((v0-1 (the-as object (logclear (-> self master-options) (cam-master-options-u32 HAVE_TARGET)))))
|
||||
(set! (-> self master-options) (the-as cam-master-options-u32 v0-1))
|
||||
v0-1
|
||||
)
|
||||
)
|
||||
@@ -102,7 +102,7 @@
|
||||
#f
|
||||
)
|
||||
(gp-0
|
||||
(logior! (-> self master-options) 1)
|
||||
(logior! (-> self master-options) (cam-master-options-u32 HAVE_TARGET))
|
||||
(cond
|
||||
((>= (- (-> self clock frame-counter) (process-focusable-method-25 (the-as target gp-0)))
|
||||
(-> *CAMERA-bank* attack-timeout)
|
||||
@@ -137,14 +137,14 @@
|
||||
((< (-> self ease-t) 1.0)
|
||||
(new 'stack-no-clear 'vector)
|
||||
(cond
|
||||
((logtest? (-> self master-options) 8)
|
||||
((logtest? (-> self master-options) (cam-master-options-u32 HAVE_EASE_TO_POS))
|
||||
(vector-lerp!
|
||||
(-> self tpos-curr)
|
||||
(-> self ease-from)
|
||||
(-> self ease-to)
|
||||
(parameter-ease-sin-clamp (-> self ease-t))
|
||||
)
|
||||
(set! (-> self master-options) (logand -9 (-> self master-options)))
|
||||
(logclear! (-> self master-options) (cam-master-options-u32 HAVE_EASE_TO_POS))
|
||||
)
|
||||
(else
|
||||
(vector-lerp!
|
||||
@@ -312,7 +312,7 @@
|
||||
(defun setup-slave-for-hopefull ((arg0 camera-slave))
|
||||
(when (= (-> arg0 blend-to-type) (camera-blend-to-type unknown-2))
|
||||
(cam-calc-follow! (-> arg0 tracking) (-> arg0 trans) #f)
|
||||
(slave-set-rotation! (-> arg0 tracking) (-> arg0 trans) (the-as float (-> arg0 options)) (-> arg0 fov) #f)
|
||||
(slave-set-rotation! (-> arg0 tracking) (-> arg0 trans) (-> arg0 options) (-> arg0 fov) #f)
|
||||
)
|
||||
(none)
|
||||
)
|
||||
@@ -326,8 +326,8 @@
|
||||
#t
|
||||
)
|
||||
(else
|
||||
(< (vector-dot (the-as vector (&-> arg0 stack 112)) (-> *camera-combiner* inv-camera-rot vector 2))
|
||||
(vector-dot (the-as vector (&-> arg1 stack 112)) (-> *camera-combiner* inv-camera-rot vector 2))
|
||||
(< (vector-dot (-> arg0 tracking inv-mat vector 2) (-> *camera-combiner* inv-camera-rot vector 2))
|
||||
(vector-dot (-> arg1 tracking inv-mat vector 2) (-> *camera-combiner* inv-camera-rot vector 2))
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -584,7 +584,7 @@
|
||||
|
||||
(defstate cam-master-active (camera-master)
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(local-vars (v0-0 none) (v1-125 uint))
|
||||
(local-vars (v0-0 object) (v1-125 uint))
|
||||
(rlet ((vf0 :class vf))
|
||||
(init-vf0-vector)
|
||||
(let ((v1-0 event-type))
|
||||
@@ -656,7 +656,7 @@
|
||||
(forward-down->inv-matrix (-> *camera-combiner* inv-camera-rot) gp-2 (new 'static 'vector :y -1.0))
|
||||
)
|
||||
(send-event self 'teleport)
|
||||
(cam-master-activate-slave #f)
|
||||
(the-as object (cam-master-activate-slave #f))
|
||||
)
|
||||
((= v1-0 'teleport-to-vector-start-string)
|
||||
(when (> arg1 0)
|
||||
@@ -673,7 +673,7 @@
|
||||
(forward-down->inv-matrix (-> *camera-combiner* inv-camera-rot) gp-3 (new 'static 'vector :y -1.0))
|
||||
)
|
||||
(send-event self 'teleport)
|
||||
(cam-master-activate-slave #f)
|
||||
(the-as object (cam-master-activate-slave #f))
|
||||
)
|
||||
)
|
||||
((= v1-0 'change-target)
|
||||
@@ -681,11 +681,11 @@
|
||||
(cond
|
||||
((not a1-15)
|
||||
(clear-focused (-> self focus))
|
||||
(set! (-> self master-options) (logand -2 (-> self master-options)))
|
||||
(logclear! (-> self master-options) (cam-master-options-u32 HAVE_TARGET))
|
||||
)
|
||||
(else
|
||||
(try-update-focus (-> self focus) (the-as process-focusable a1-15))
|
||||
(logior! (-> self master-options) 1)
|
||||
(logior! (-> self master-options) (cam-master-options-u32 HAVE_TARGET))
|
||||
(reset-target-tracking)
|
||||
)
|
||||
)
|
||||
@@ -716,7 +716,7 @@
|
||||
)
|
||||
(when (and s5-1 (!= s5-1 gp-4))
|
||||
(set! (-> self slave) (the-as (pointer camera-slave) s5-1))
|
||||
(logior! (-> self master-options) 2)
|
||||
(logior! (-> self master-options) (cam-master-options-u32 SET_COMBINER_AXIS))
|
||||
(set! (-> *camera-combiner* tracking tilt-adjust target) (-> self slave 0 tracking tilt-adjust target))
|
||||
(cond
|
||||
((or (zero? s4-0) (not gp-4))
|
||||
@@ -807,7 +807,7 @@
|
||||
)
|
||||
)
|
||||
(if gp-4
|
||||
(deactivate (-> gp-4 0))
|
||||
(the-as object (deactivate (-> gp-4 0)))
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -816,24 +816,24 @@
|
||||
(cond
|
||||
((< arg1 1)
|
||||
(set! (-> self ease-t) 0.0)
|
||||
(set! (-> self master-options) (logand -9 (-> self master-options)))
|
||||
(logclear! (-> self master-options) (cam-master-options-u32 HAVE_EASE_TO_POS))
|
||||
)
|
||||
((< arg1 2)
|
||||
(if (< (the-as float (-> event param 0)) (-> self ease-t))
|
||||
(set! (-> self ease-t) (the-as float (-> event param 0)))
|
||||
)
|
||||
(set! (-> self master-options) (logand -9 (-> self master-options)))
|
||||
(logclear! (-> self master-options) (cam-master-options-u32 HAVE_EASE_TO_POS))
|
||||
)
|
||||
(else
|
||||
(if (< (the-as float (-> event param 0)) (-> self ease-t))
|
||||
(set! (-> self ease-t) (the-as float (-> event param 0)))
|
||||
)
|
||||
(set! (-> self ease-to quad) (-> (the-as vector (-> event param 1)) quad))
|
||||
(logior! (-> self master-options) 8)
|
||||
(logior! (-> self master-options) (cam-master-options-u32 HAVE_EASE_TO_POS))
|
||||
)
|
||||
)
|
||||
(set! (-> self ease-step) 0.033333335)
|
||||
(set! v0-0 (the-as none (-> self ease-from)))
|
||||
(set! v0-0 (-> self ease-from))
|
||||
(set! (-> (the-as vector v0-0) quad) (-> self tpos-curr-adj quad))
|
||||
v0-0
|
||||
)
|
||||
@@ -853,11 +853,11 @@
|
||||
((= v1-0 'toggle-slave-option)
|
||||
(logxor! (-> self slave-options) (-> event param 0))
|
||||
(if (-> self slave)
|
||||
(logxor! (-> self slave 0 options) (-> event param 0))
|
||||
(logxor! (-> self slave 0 options) (the-as uint (-> event param 0)))
|
||||
)
|
||||
(when (-> self decel)
|
||||
(set! v0-0 (the-as none (logxor (-> self decel 0 options) (-> event param 0))))
|
||||
(set! (-> self decel 0 options) (the-as uint v0-0))
|
||||
(set! v0-0 (logxor (-> self decel 0 options) (the-as uint (-> event param 0))))
|
||||
(set! (-> self decel 0 options) (the-as cam-slave-options-u32 v0-0))
|
||||
v0-0
|
||||
)
|
||||
)
|
||||
@@ -866,15 +866,15 @@
|
||||
)
|
||||
((= v1-0 'set-slave-option)
|
||||
(when (-> self slave)
|
||||
(set! v0-0 (the-as none (logior (-> self slave 0 options) (-> event param 0))))
|
||||
(set! (-> self slave 0 options) (the-as uint v0-0))
|
||||
(set! v0-0 (logior (-> self slave 0 options) (-> event param 0)))
|
||||
(set! (-> self slave 0 options) (the-as cam-slave-options-u32 v0-0))
|
||||
v0-0
|
||||
)
|
||||
)
|
||||
((= v1-0 'clear-slave-option)
|
||||
(when (-> self slave)
|
||||
(set! v0-0 (the-as none (logclear (-> self slave 0 options) (-> event param 0))))
|
||||
(set! (-> self slave 0 options) (the-as uint v0-0))
|
||||
(set! v0-0 (logclear (-> self slave 0 options) (-> event param 0)))
|
||||
(set! (-> self slave 0 options) (the-as cam-slave-options-u32 v0-0))
|
||||
v0-0
|
||||
)
|
||||
)
|
||||
@@ -884,7 +884,7 @@
|
||||
(vector-reset! (-> self slave 0 tracking follow-off))
|
||||
)
|
||||
(set! (-> *camera-combiner* tracking no-follow) (the-as basic #t))
|
||||
(set! v0-0 (the-as none (-> *camera-combiner* tracking follow-off)))
|
||||
(set! v0-0 (-> *camera-combiner* tracking follow-off))
|
||||
(.svf (&-> (the-as vector v0-0) quad) vf0)
|
||||
v0-0
|
||||
)
|
||||
@@ -1046,7 +1046,7 @@
|
||||
(defbehavior cam-master-init camera-master ()
|
||||
(stack-size-set! (-> self main-thread) 512)
|
||||
(logclear! (-> self mask) (process-mask menu))
|
||||
(set! (-> self master-options) (the-as uint 0))
|
||||
(set! (-> self master-options) (cam-master-options-u32))
|
||||
(set! (-> self settings) (-> *setting-control* cam-current))
|
||||
(set! (-> self slave) (the-as (pointer camera-slave) #f))
|
||||
(set! (-> self decel) (the-as (pointer camera-slave) #f))
|
||||
|
||||
@@ -20,11 +20,11 @@
|
||||
(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))
|
||||
(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 (if (= v1-0 'teleport)
|
||||
#f
|
||||
(cam-standard-event-handler arg0 arg1 arg2 arg3)
|
||||
(the-as symbol (cam-standard-event-handler proc arg1 event-type event))
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -42,7 +42,7 @@
|
||||
(let ((s5-0 (new-stack-vector0))
|
||||
(gp-0 (new-stack-vector0))
|
||||
)
|
||||
(when (zero? (logand (-> *camera* settings master-options) (cam-master-options IGNORE_ANALOG)))
|
||||
(when (not (logtest? (-> *camera* settings master-options) (cam-master-options IGNORE_ANALOG)))
|
||||
(let ((f28-0 (analog-input (the-as int (-> *cpad-list* cpads 0 leftx)) 128.0 48.0 110.0 -1.0))
|
||||
(f30-0 (analog-input (the-as int (-> *cpad-list* cpads 0 lefty)) 128.0 48.0 110.0 -1.0))
|
||||
(f26-0 (analog-input (the-as int (-> *cpad-list* cpads 0 rightx)) 128.0 48.0 110.0 -1.0))
|
||||
@@ -66,7 +66,7 @@
|
||||
(let ((s4-0 (new-stack-vector0)))
|
||||
(let ((s3-0 (new-stack-matrix0)))
|
||||
(matrix-axis-angle! s3-0 (the-as vector (-> self tracking)) (- (-> s5-0 x)))
|
||||
(vector-matrix*! s4-0 (the-as vector (&-> self stack 112)) s3-0)
|
||||
(vector-matrix*! s4-0 (-> self tracking inv-mat vector 2) s3-0)
|
||||
(matrix-axis-angle! s3-0 (-> *camera* local-down) (- (-> s5-0 y)))
|
||||
(vector-matrix*! s4-0 s4-0 s3-0)
|
||||
)
|
||||
@@ -126,18 +126,12 @@
|
||||
(+! (-> arg1 y) f26-0)
|
||||
(+! (-> arg1 z) f22-0)
|
||||
(+! (-> arg0 x) f24-0)
|
||||
(let ((f0-13 (+ (-> arg0 y) f0-12)))
|
||||
(set! (-> arg0 y) f0-13)
|
||||
f0-13
|
||||
)
|
||||
(set! (-> arg0 y) (+ (-> arg0 y) f0-12))
|
||||
)
|
||||
)
|
||||
(else
|
||||
(+! (-> arg0 y) (* (- (-> v1-0 x)) (-> *CAM_FREE-bank* rot-speed)))
|
||||
(let ((f0-17 (+ (-> arg0 x) (* (-> v1-0 y) (-> *CAM_FREE-bank* rot-speed)))))
|
||||
(set! (-> arg0 x) f0-17)
|
||||
f0-17
|
||||
)
|
||||
(set! (-> arg0 x) (+ (-> arg0 x) (* (-> v1-0 y) (-> *CAM_FREE-bank* rot-speed))))
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -145,17 +139,11 @@
|
||||
)
|
||||
((logtest? (-> *mouse* button0-abs 0) 2)
|
||||
(+! (-> arg1 x) (* (-> v1-0 x) (-> *CAM_FREE-bank* speed)))
|
||||
(let ((f0-21 (+ (-> arg1 z) (* (-> v1-0 y) (-> *CAM_FREE-bank* speed)))))
|
||||
(set! (-> arg1 z) f0-21)
|
||||
f0-21
|
||||
)
|
||||
(set! (-> arg1 z) (+ (-> arg1 z) (* (-> v1-0 y) (-> *CAM_FREE-bank* speed))))
|
||||
)
|
||||
((logtest? (-> *mouse* button0-abs 0) 4)
|
||||
(+! (-> arg1 x) (* (-> v1-0 x) (-> *CAM_FREE-bank* speed)))
|
||||
(let ((f0-25 (+ (-> arg1 y) (* (-> v1-0 y) (-> *CAM_FREE-bank* speed)))))
|
||||
(set! (-> arg1 y) f0-25)
|
||||
f0-25
|
||||
)
|
||||
(set! (-> arg1 y) (+ (-> arg1 y) (* (-> v1-0 y) (-> *CAM_FREE-bank* speed))))
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -356,7 +344,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(when (zero? (logand (-> *camera* settings master-options) (cam-master-options IGNORE_ANALOG)))
|
||||
(when (not (logtest? (-> *camera* settings master-options) (cam-master-options IGNORE_ANALOG)))
|
||||
(let ((f28-14 (analog-input (the-as int (-> *cpad-list* cpads arg3 leftx)) 128.0 48.0 110.0 -1.0))
|
||||
(f30-14 (analog-input (the-as int (-> *cpad-list* cpads arg3 lefty)) 128.0 48.0 110.0 -1.0))
|
||||
(f26-0 (analog-input (the-as int (-> *cpad-list* cpads arg3 rightx)) 128.0 48.0 110.0 -1.0))
|
||||
@@ -448,11 +436,11 @@
|
||||
)
|
||||
|
||||
(defstate cam-free-floating (camera-slave)
|
||||
: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 (if (= v1-0 'teleport)
|
||||
#f
|
||||
(cam-standard-event-handler arg0 arg1 arg2 arg3)
|
||||
(the-as symbol (cam-standard-event-handler proc arg1 event-type event))
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -468,7 +456,7 @@
|
||||
:code (behavior ()
|
||||
(until #f
|
||||
(let ((a2-0 (-> *camera* local-down)))
|
||||
(if (logtest? (-> self options) 8)
|
||||
(if (logtest? (-> self options) (cam-slave-options-u32 ALLOW_Z_ROT))
|
||||
(set! a2-0 (the-as vector #f))
|
||||
)
|
||||
(cam-free-floating-move
|
||||
@@ -484,7 +472,3 @@
|
||||
(none)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
(let ((v1-0 event-type))
|
||||
(the-as object (if (= v1-0 'teleport)
|
||||
#f
|
||||
(cam-standard-event-handler proc arg1 event-type event)
|
||||
(the-as symbol (cam-standard-event-handler proc arg1 event-type event))
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -42,7 +42,7 @@
|
||||
(let ((v1-0 event-type))
|
||||
(the-as object (if (= v1-0 'teleport)
|
||||
#f
|
||||
(cam-standard-event-handler proc arg1 event-type event)
|
||||
(the-as symbol (cam-standard-event-handler proc arg1 event-type event))
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -80,7 +80,7 @@
|
||||
(let ((v1-0 event-type))
|
||||
(the-as object (if (= v1-0 'teleport)
|
||||
#f
|
||||
(cam-standard-event-handler proc arg1 event-type event)
|
||||
(the-as symbol (cam-standard-event-handler proc arg1 event-type event))
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -118,7 +118,7 @@
|
||||
(let ((v1-0 event-type))
|
||||
(the-as object (if (= v1-0 'teleport)
|
||||
#f
|
||||
(cam-standard-event-handler proc arg1 event-type event)
|
||||
(the-as symbol (cam-standard-event-handler proc arg1 event-type event))
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -183,7 +183,7 @@
|
||||
(let ((v1-0 event-type))
|
||||
(the-as object (if (= v1-0 'teleport)
|
||||
#f
|
||||
(cam-standard-event-handler proc arg1 event-type event)
|
||||
(the-as symbol (cam-standard-event-handler proc arg1 event-type event))
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -259,8 +259,8 @@
|
||||
((and (< (vector-vector-distance s2-0 gp-0) 40960.0) (< (cos 3640.889) (vector-dot s5-0 s3-0)))
|
||||
(set! (-> self trans quad) (-> s2-0 quad))
|
||||
(vector-negate! (the-as vector (-> self tracking)) (the-as vector (-> s0-0 vector)))
|
||||
(set! (-> (the-as vector (&-> self stack 96)) quad) (-> s0-0 vector 1 quad))
|
||||
(vector-negate! (the-as vector (&-> self stack 112)) (-> s0-0 vector 2))
|
||||
(set! (-> (the-as vector (-> self tracking inv-mat vector 1)) quad) (-> s0-0 vector 1 quad))
|
||||
(vector-negate! (-> self tracking inv-mat vector 2) (-> s0-0 vector 2))
|
||||
(set! (-> self fov) (* 2.0 (atan (/ 12.700255 (* 20.3 (-> s1-0 x))) 1.0)))
|
||||
(vector-float*! (the-as vector (-> self tracking)) (the-as vector (-> self tracking)) (/ 1.0 (-> s1-0 x)))
|
||||
(vector-reset! (-> self tracking inv-mat trans))
|
||||
@@ -300,7 +300,9 @@
|
||||
(none)
|
||||
)
|
||||
:trans (behavior ()
|
||||
(if (or (not (handle->process (-> *camera* settings pov-handle))) (zero? (logand (-> *camera* master-options) 1)))
|
||||
(if (or (not (handle->process (-> *camera* settings pov-handle)))
|
||||
(zero? (logand (-> *camera* master-options) (cam-master-options-u32 HAVE_TARGET)))
|
||||
)
|
||||
(cam-slave-go cam-free-floating)
|
||||
)
|
||||
(none)
|
||||
@@ -375,7 +377,7 @@
|
||||
(cam-standoff-calc-trans)
|
||||
)
|
||||
(else
|
||||
(cam-standard-event-handler proc arg1 event-type event)
|
||||
(the-as vector (cam-standard-event-handler proc arg1 event-type event))
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -385,7 +387,7 @@
|
||||
(when (not (-> self enter-has-run))
|
||||
(vector-! (-> self pivot-pt) (-> self trans) (-> *camera* tpos-curr-adj))
|
||||
(cond
|
||||
((logtest? (-> self options) #x4000)
|
||||
((logtest? (-> self options) (cam-slave-options-u32 NO_ROTATE))
|
||||
(set! (-> self blend-from-type) (the-as uint 0))
|
||||
(set! (-> self blend-to-type) (camera-blend-to-type unknown-0))
|
||||
0
|
||||
@@ -400,7 +402,7 @@
|
||||
(none)
|
||||
)
|
||||
:trans (behavior ()
|
||||
(if (not (logtest? (-> *camera* master-options) 1))
|
||||
(if (not (logtest? (-> *camera* master-options) (cam-master-options-u32 HAVE_TARGET)))
|
||||
(cam-slave-go cam-free-floating)
|
||||
)
|
||||
(none)
|
||||
@@ -438,7 +440,7 @@
|
||||
(vector+! (-> self trans) (-> *camera* tpos-curr-adj) (-> self pivot-pt))
|
||||
(set! (-> self fov) (cam-slave-get-fov (-> self cam-entity)))
|
||||
(logior! (-> self options) (cam-slave-get-flags (-> self cam-entity) 'flags))
|
||||
(if (logtest? (-> self options) #x4000)
|
||||
(if (logtest? (-> self options) (cam-slave-options-u32 NO_ROTATE))
|
||||
(cam-slave-get-rot (the-as entity-actor (-> self cam-entity)) (the-as matrix (-> self tracking)))
|
||||
(set! (-> self tracking tilt-adjust target)
|
||||
(cam-slave-get-float (-> self cam-entity) 'tiltAdjust (-> *CAMERA-bank* default-tilt-adjust))
|
||||
@@ -484,7 +486,7 @@
|
||||
(let ((v1-0 event-type))
|
||||
(the-as object (if (= v1-0 'teleport)
|
||||
#f
|
||||
(cam-standard-event-handler proc arg1 event-type event)
|
||||
(the-as symbol (cam-standard-event-handler proc arg1 event-type event))
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -506,7 +508,7 @@
|
||||
)
|
||||
:exit (behavior ()
|
||||
(if (and *target*
|
||||
(logtest? (-> *camera* master-options) 1)
|
||||
(logtest? (-> *camera* master-options) (cam-master-options-u32 HAVE_TARGET))
|
||||
(logtest? (-> *target* focus-status) (focus-status in-head))
|
||||
)
|
||||
(send-event *target* 'end-mode)
|
||||
@@ -514,7 +516,7 @@
|
||||
(none)
|
||||
)
|
||||
:trans (behavior ()
|
||||
(if (not (logtest? (-> *camera* master-options) 1))
|
||||
(if (not (logtest? (-> *camera* master-options) (cam-master-options-u32 HAVE_TARGET)))
|
||||
(go cam-free-floating)
|
||||
)
|
||||
(none)
|
||||
@@ -576,16 +578,16 @@
|
||||
)
|
||||
(matrix-axis-angle! s5-0 (-> *camera* local-down) (-> s4-0 y))
|
||||
(matrix*! (the-as matrix (-> self tracking)) (the-as matrix (-> self tracking)) s5-0)
|
||||
(when (not (logtest? (-> self options) 8))
|
||||
(if (< (vector-dot (the-as vector (&-> self stack 96)) (-> *camera* local-down)) 0.0)
|
||||
(when (not (logtest? (-> self options) (cam-slave-options-u32 ALLOW_Z_ROT)))
|
||||
(if (< (vector-dot (-> self tracking inv-mat vector 1) (-> *camera* local-down)) 0.0)
|
||||
(forward-down->inv-matrix
|
||||
(the-as matrix (-> self tracking))
|
||||
(the-as vector (&-> self stack 112))
|
||||
(-> self tracking inv-mat vector 2)
|
||||
(-> *camera* local-down)
|
||||
)
|
||||
(forward-down->inv-matrix
|
||||
(the-as matrix (-> self tracking))
|
||||
(the-as vector (&-> self stack 112))
|
||||
(-> self tracking inv-mat vector 2)
|
||||
(vector-negate! (new-stack-vector0) (-> *camera* local-down))
|
||||
)
|
||||
)
|
||||
@@ -593,34 +595,34 @@
|
||||
(matrix-axis-angle! s5-0 (the-as vector (-> self tracking)) (- (-> s4-0 x)))
|
||||
(matrix*! (the-as matrix (-> self tracking)) (the-as matrix (-> self tracking)) s5-0)
|
||||
)
|
||||
(when (not (logtest? (-> self options) 8))
|
||||
(let ((f30-1 (vector-dot (-> *camera* local-down) (the-as vector (&-> self stack 112)))))
|
||||
(when (not (logtest? (-> self options) (cam-slave-options-u32 ALLOW_Z_ROT)))
|
||||
(let ((f30-1 (vector-dot (-> *camera* local-down) (-> self tracking inv-mat vector 2))))
|
||||
(set! (-> (new 'stack-no-clear 'vector) quad) (the-as uint128 0))
|
||||
(when (< (sin (-> *CAM_EYE-bank* max-degrees)) (fabs f30-1))
|
||||
(vector--float*!
|
||||
(the-as vector (&-> self stack 112))
|
||||
(the-as vector (&-> self stack 112))
|
||||
(-> self tracking inv-mat vector 2)
|
||||
(-> self tracking inv-mat vector 2)
|
||||
(-> *camera* local-down)
|
||||
f30-1
|
||||
)
|
||||
(vector-normalize! (the-as vector (&-> self stack 112)) (cos (-> *CAM_EYE-bank* max-degrees)))
|
||||
(vector-normalize! (-> self tracking inv-mat vector 2) (cos (-> *CAM_EYE-bank* max-degrees)))
|
||||
(if (< f30-1 0.0)
|
||||
(vector--float*!
|
||||
(the-as vector (&-> self stack 112))
|
||||
(the-as vector (&-> self stack 112))
|
||||
(-> self tracking inv-mat vector 2)
|
||||
(-> self tracking inv-mat vector 2)
|
||||
(-> *camera* local-down)
|
||||
(sin (-> *CAM_EYE-bank* max-degrees))
|
||||
)
|
||||
(vector+float*!
|
||||
(the-as vector (&-> self stack 112))
|
||||
(the-as vector (&-> self stack 112))
|
||||
(-> self tracking inv-mat vector 2)
|
||||
(-> self tracking inv-mat vector 2)
|
||||
(-> *camera* local-down)
|
||||
(sin (-> *CAM_EYE-bank* max-degrees))
|
||||
)
|
||||
)
|
||||
(vector-cross!
|
||||
(the-as vector (&-> self stack 96))
|
||||
(the-as vector (&-> self stack 112))
|
||||
(-> self tracking inv-mat vector 1)
|
||||
(-> self tracking inv-mat vector 2)
|
||||
(the-as vector (-> self tracking))
|
||||
)
|
||||
(set! (-> self tracking inv-mat vector 1 w) 0.0)
|
||||
@@ -655,7 +657,7 @@
|
||||
(let ((gp-0 (new-stack-vector0)))
|
||||
(set! (-> self fov) (cam-slave-get-fov (-> self cam-entity)))
|
||||
(logior! (-> self options) (cam-slave-get-flags (-> self cam-entity) 'flags))
|
||||
(if (logtest? (-> self options) #x4000)
|
||||
(if (logtest? (-> self options) (cam-slave-options-u32 NO_ROTATE))
|
||||
(cam-slave-get-rot (the-as entity-actor (-> self cam-entity)) (the-as matrix (-> self tracking)))
|
||||
(set! (-> self tracking tilt-adjust target)
|
||||
(cam-slave-get-float (-> self cam-entity) 'tiltAdjust (-> *CAMERA-bank* default-tilt-adjust))
|
||||
@@ -702,7 +704,7 @@
|
||||
)
|
||||
(cam-curve-pos (-> self trans) (the-as vector #f) (the-as curve #f) #t)
|
||||
(cond
|
||||
((logtest? (-> self options) #x4000)
|
||||
((logtest? (-> self options) (cam-slave-options-u32 NO_ROTATE))
|
||||
(set! (-> self blend-from-type) (the-as uint 0))
|
||||
(set! (-> self blend-to-type) (camera-blend-to-type unknown-0))
|
||||
0
|
||||
@@ -720,7 +722,7 @@
|
||||
(none)
|
||||
)
|
||||
:trans (behavior ()
|
||||
(if (not (logtest? (-> *camera* master-options) 1))
|
||||
(if (not (logtest? (-> *camera* master-options) (cam-master-options-u32 HAVE_TARGET)))
|
||||
(cam-slave-go cam-free-floating)
|
||||
)
|
||||
(none)
|
||||
@@ -745,7 +747,7 @@
|
||||
(let ((v1-0 event-type))
|
||||
(the-as object (if (= v1-0 'teleport)
|
||||
#f
|
||||
(cam-standard-event-handler proc arg1 event-type event)
|
||||
(the-as symbol (cam-standard-event-handler proc arg1 event-type event))
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -799,7 +801,7 @@
|
||||
(let ((v1-0 event-type))
|
||||
(the-as object (if (= v1-0 'teleport)
|
||||
#f
|
||||
(cam-standard-event-handler proc arg1 event-type event)
|
||||
(the-as symbol (cam-standard-event-handler proc arg1 event-type event))
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -931,7 +933,7 @@
|
||||
)
|
||||
(vector-matrix*! arg0 arg1 s4-0)
|
||||
)
|
||||
((and (logtest? (-> self options) 2)
|
||||
((and (logtest? (-> self options) (cam-slave-options-u32 SAME_SIDE))
|
||||
(or (and (>= f26-0 (+ -8192.0 f30-0)) (>= f30-0 (+ -8192.0 (-> self pivot-rad))))
|
||||
(and (>= (+ 8192.0 f30-0) f26-0) (>= (+ 8192.0 (-> self pivot-rad)) f30-0))
|
||||
)
|
||||
@@ -949,7 +951,7 @@
|
||||
)
|
||||
(else
|
||||
(set! (-> arg0 quad) (-> arg1 quad))
|
||||
(if (logtest? (-> self options) 2048)
|
||||
(if (logtest? (-> self options) (cam-slave-options-u32 SHRINK_MAX_ANGLE))
|
||||
(set! (-> self max-angle-curr) f28-0)
|
||||
)
|
||||
)
|
||||
@@ -961,17 +963,17 @@
|
||||
(defbehavior cam-circular-position camera-slave ((arg0 symbol))
|
||||
(let ((gp-0 (new 'stack-no-clear 'vector)))
|
||||
(let ((s5-0 (new 'stack-no-clear 'vector)))
|
||||
(if (logtest? (-> self options) 130)
|
||||
(if (logtest? (-> self options) (cam-slave-options-u32 SAME_SIDE DRAG))
|
||||
(vector-! gp-0 (-> self circular-follow) (-> self pivot-pt))
|
||||
(vector-! gp-0 (-> self pivot-pt) (-> self circular-follow))
|
||||
)
|
||||
(vector-! s5-0 (-> self trans) (-> self pivot-pt))
|
||||
(when (not (logtest? (-> self options) 4))
|
||||
(when (not (logtest? (-> self options) (cam-slave-options-u32 MOVE_SPHERICAL)))
|
||||
(vector-flatten! gp-0 gp-0 (-> *camera* local-down))
|
||||
(vector-flatten! s5-0 s5-0 (-> *camera* local-down))
|
||||
)
|
||||
(cond
|
||||
((logtest? (-> self options) 128)
|
||||
((logtest? (-> self options) (cam-slave-options-u32 DRAG))
|
||||
(let ((f30-0 (- (vector-length gp-0) (-> self pivot-rad))))
|
||||
(when (< 0.0001 (-> *camera-combiner* tracking point-of-interest-blend value))
|
||||
(let ((s5-1 (new 'stack-no-clear 'vector))
|
||||
@@ -1024,7 +1026,7 @@
|
||||
(let ((a2-1 (new-stack-vector0)))
|
||||
(vector-! a2-1 (-> *camera* tpos-curr-adj) (-> self pivot-pt))
|
||||
(vector-! (-> self circular-follow) (-> self circular-follow) (-> self pivot-pt))
|
||||
(if (logtest? (-> self options) 4)
|
||||
(if (logtest? (-> self options) (cam-slave-options-u32 MOVE_SPHERICAL))
|
||||
(v-slrp3!
|
||||
(-> self circular-follow)
|
||||
(-> self circular-follow)
|
||||
@@ -1059,14 +1061,14 @@
|
||||
(let ((v1-0 event-type))
|
||||
(the-as object (cond
|
||||
((= v1-0 'teleport)
|
||||
#f
|
||||
(the-as vector #f)
|
||||
)
|
||||
((= v1-0 'outro-done)
|
||||
(set! (-> self trans quad) (-> *camera-combiner* trans quad))
|
||||
(cam-circular-position #f)
|
||||
)
|
||||
(else
|
||||
(cam-standard-event-handler proc arg1 event-type event)
|
||||
(the-as vector (cam-standard-event-handler proc arg1 event-type event))
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -1141,7 +1143,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
((logtest? (-> self options) 128)
|
||||
((logtest? (-> self options) (cam-slave-options-u32 DRAG))
|
||||
(vector-! (-> self pivot-pt) (-> *camera* tpos-curr-adj) (-> self trans))
|
||||
(vector-flatten! (-> self pivot-pt) (-> self pivot-pt) (-> *camera* local-down))
|
||||
(set! (-> self pivot-rad) (vector-length (-> self pivot-pt)))
|
||||
@@ -1160,7 +1162,7 @@
|
||||
)
|
||||
(cam-circular-position #f)
|
||||
(cond
|
||||
((logtest? (-> self options) #x4000)
|
||||
((logtest? (-> self options) (cam-slave-options-u32 NO_ROTATE))
|
||||
(set! (-> self blend-from-type) (the-as uint 0))
|
||||
(set! (-> self blend-to-type) (camera-blend-to-type unknown-0))
|
||||
(cam-slave-get-rot (the-as entity-actor (-> self cam-entity)) (the-as matrix (-> self tracking)))
|
||||
@@ -1175,7 +1177,7 @@
|
||||
(none)
|
||||
)
|
||||
:trans (behavior ()
|
||||
(if (not (logtest? (-> *camera* master-options) 1))
|
||||
(if (not (logtest? (-> *camera* master-options) (cam-master-options-u32 HAVE_TARGET)))
|
||||
(cam-slave-go cam-free-floating)
|
||||
)
|
||||
(none)
|
||||
@@ -1205,7 +1207,7 @@
|
||||
(none)
|
||||
)
|
||||
:trans (behavior ()
|
||||
(if (not (logtest? (-> *camera* master-options) 1))
|
||||
(if (not (logtest? (-> *camera* master-options) (cam-master-options-u32 HAVE_TARGET)))
|
||||
(cam-slave-go cam-free-floating)
|
||||
)
|
||||
(none)
|
||||
@@ -1282,7 +1284,7 @@
|
||||
#f
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch uint vs cam-slave-options.
|
||||
;; WARN: Return type mismatch cam-slave-options-u32 vs cam-slave-options.
|
||||
(defbehavior cam-string-set-position-rel! camera-slave ((arg0 vector))
|
||||
(vector-flatten! (-> self view-flat) arg0 (-> *camera* local-down))
|
||||
(set! (-> self min-z-override) (vector-length (-> self view-flat)))
|
||||
@@ -1290,7 +1292,7 @@
|
||||
(set! (-> self string-trans quad) (-> self desired-pos quad))
|
||||
(tracking-spline-method-10 (-> self position-spline) (-> self desired-pos))
|
||||
(vector-reset! (-> self velocity))
|
||||
(let ((v0-2 (logand -4097 (-> self options))))
|
||||
(let ((v0-2 (logclear (-> self options) (cam-slave-options-u32 GOTO_GOOD_POINT))))
|
||||
(set! (-> self options) v0-2)
|
||||
(the-as cam-slave-options v0-2)
|
||||
)
|
||||
@@ -1925,7 +1927,7 @@
|
||||
(set! (-> self los-tgt-spline-pt-incarnation)
|
||||
(-> *camera* target-spline point (-> self los-tgt-spline-pt) incarnation)
|
||||
)
|
||||
(logior! (-> self options) 4096)
|
||||
(logior! (-> self options) (cam-slave-options-u32 GOTO_GOOD_POINT))
|
||||
(set! (-> self good-point quad)
|
||||
(-> *camera* target-spline point (-> *camera* target-spline used-point) position quad)
|
||||
)
|
||||
@@ -2006,7 +2008,7 @@
|
||||
(set! (-> self los-tgt-spline-pt-incarnation)
|
||||
(-> *camera* target-spline point (-> self los-tgt-spline-pt) incarnation)
|
||||
)
|
||||
(logior! (-> self options) 4096)
|
||||
(logior! (-> self options) (cam-slave-options-u32 GOTO_GOOD_POINT))
|
||||
(set! (-> self good-point quad) (-> *camera* target-spline point s2-2 position quad))
|
||||
(set! (-> self los-last-pos quad) (-> self good-point quad))
|
||||
(when *debug-segment*
|
||||
@@ -2105,7 +2107,7 @@
|
||||
(format 0 "going because u(~f) > 0 frame ~D~%" f30-2 (-> self clock frame-counter))
|
||||
(format *stdcon* " going because u(~f) > 0 frame ~D~%" f30-2 (-> self clock frame-counter))
|
||||
)
|
||||
(logior! (-> self options) 4096)
|
||||
(logior! (-> self options) (cam-slave-options-u32 GOTO_GOOD_POINT))
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -2127,7 +2129,7 @@
|
||||
(cam-los-setup-lateral arg2 s4-1 arg1)
|
||||
)
|
||||
(cond
|
||||
((not (logtest? (-> self options) 1024))
|
||||
((not (logtest? (-> self options) (cam-slave-options-u32 MOVEMENT_BLOCKED)))
|
||||
)
|
||||
((= (-> self string-vel-dir) 5)
|
||||
)
|
||||
@@ -2174,7 +2176,7 @@
|
||||
(defbehavior cam-string-follow camera-slave ()
|
||||
(let ((f30-0 (vector-length (-> self view-flat))))
|
||||
(cond
|
||||
((logtest? (-> self options) #x8000)
|
||||
((logtest? (-> self options) (cam-slave-options-u32 STICKY_ANGLE))
|
||||
(let ((gp-0 (new 'stack-no-clear 'vector)))
|
||||
(let ((s5-0 (new 'stack-no-clear 'vector)))
|
||||
(vector-cross! s5-0 (-> self view-flat) (-> *camera* local-down))
|
||||
@@ -2306,7 +2308,7 @@
|
||||
)
|
||||
|
||||
(defbehavior cam-string-joystick camera-slave ()
|
||||
(set! (-> self options) (logand -257 (-> self options)))
|
||||
(logclear! (-> self options) (cam-slave-options-u32 PLAYER_MOVING_CAMERA))
|
||||
(when (-> self string-relative)
|
||||
(let ((s5-0 (new 'stack-no-clear 'vector))
|
||||
(gp-0 (new 'stack-no-clear 'vector))
|
||||
@@ -2344,7 +2346,7 @@
|
||||
)
|
||||
(f30-1 (-> self view-off-param))
|
||||
)
|
||||
(if (logtest? #x10000 (-> self options))
|
||||
(if (logtest? (cam-slave-options-u32 BLOCK_RIGHT_STICK) (-> self options))
|
||||
(set! f28-0 0.0)
|
||||
)
|
||||
(if (-> self have-phony-joystick)
|
||||
@@ -2355,7 +2357,7 @@
|
||||
)
|
||||
(set! f28-0 0.05)
|
||||
)
|
||||
(when (logtest? #x40000 (-> self options))
|
||||
(when (logtest? (cam-slave-options-u32 GUN_CAM) (-> self options))
|
||||
(if (and (or (< (-> *cpad-list* cpads 0 rightx) (the-as uint 64))
|
||||
(< (the-as uint 192) (-> *cpad-list* cpads 0 rightx))
|
||||
)
|
||||
@@ -2367,7 +2369,7 @@
|
||||
)
|
||||
)
|
||||
(if (!= f28-0 0.0)
|
||||
(logior! (-> self options) 256)
|
||||
(logior! (-> self options) (cam-slave-options-u32 PLAYER_MOVING_CAMERA))
|
||||
)
|
||||
(let ((f26-0 (fmin 1.0 f0-22)))
|
||||
(let ((f0-23 f26-0))
|
||||
@@ -2409,7 +2411,7 @@
|
||||
(or (= (-> self los-state) (slave-los-state ccw)) (= (-> self los-state) (slave-los-state cw)))
|
||||
)
|
||||
)
|
||||
((and (logtest? #x40000 (-> self options)) (< 0.0 f28-0))
|
||||
((and (logtest? (cam-slave-options-u32 GUN_CAM) (-> self options)) (< 0.0 f28-0))
|
||||
(set! (-> self string-min-val y)
|
||||
(fmax (-> *camera* settings gun-min-height) (- (-> self string-min-val y) (* 24576.0 f28-0)))
|
||||
)
|
||||
@@ -2420,7 +2422,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
((and (logtest? #x40000 (-> self options)) (< f28-0 0.0))
|
||||
((and (logtest? (cam-slave-options-u32 GUN_CAM) (-> self options)) (< f28-0 0.0))
|
||||
(set! (-> self string-max-val y)
|
||||
(fmin (-> *camera* settings gun-max-height) (- (-> self string-max-val y) (* 24576.0 f28-0)))
|
||||
)
|
||||
@@ -2431,7 +2433,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
((logtest? #x40000 (-> self options))
|
||||
((logtest? (cam-slave-options-u32 GUN_CAM) (-> self options))
|
||||
(set! (-> self string-max-val y)
|
||||
(fmax
|
||||
(+ 8192.0 (-> *camera* settings gun-min-height))
|
||||
@@ -2468,7 +2470,7 @@
|
||||
)
|
||||
)
|
||||
(cond
|
||||
((logtest? #x40000 (-> self options))
|
||||
((logtest? (cam-slave-options-u32 GUN_CAM) (-> self options))
|
||||
)
|
||||
((= f28-0 0.0)
|
||||
(set! (-> self view-off z) (-> self string-max-val z))
|
||||
@@ -2489,10 +2491,12 @@
|
||||
128.0
|
||||
32.0
|
||||
110.0
|
||||
(* 182.04445 (-> self clock seconds-per-frame) (if (logtest? #x40000 (-> self options))
|
||||
120.0
|
||||
120.0
|
||||
)
|
||||
(* 182.04445
|
||||
(-> self clock seconds-per-frame)
|
||||
(if (logtest? (cam-slave-options-u32 GUN_CAM) (-> self options))
|
||||
120.0
|
||||
120.0
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -2500,7 +2504,7 @@
|
||||
(gp-3 (new-stack-vector0))
|
||||
(s5-3 (new-stack-vector0))
|
||||
)
|
||||
(if (logtest? #x10000 (-> self options))
|
||||
(if (logtest? (cam-slave-options-u32 BLOCK_RIGHT_STICK) (-> self options))
|
||||
(set! f30-2 0.0)
|
||||
)
|
||||
(if (-> *setting-control* user-default unknowng-symbol-00)
|
||||
@@ -2509,7 +2513,7 @@
|
||||
(if (-> self have-phony-joystick)
|
||||
(set! f30-2 (* 21845.334 (-> self phony-joystick-x) (-> self clock seconds-per-frame)))
|
||||
)
|
||||
(when (logtest? #x20000 (-> self options))
|
||||
(when (logtest? (cam-slave-options-u32 ALLOW_SHIFT_BUTTONS) (-> self options))
|
||||
(when (logtest? (-> *camera* settings master-options) (cam-master-options READ_BUTTONS))
|
||||
(if (cpad-hold? (-> *CAMERA-bank* joypad) r1)
|
||||
(+! f30-2 (+ (* 10922.667 (-> self clock seconds-per-frame))
|
||||
@@ -2560,27 +2564,28 @@
|
||||
)
|
||||
(cond
|
||||
((!= f30-2 0.0)
|
||||
(logior! (-> self options) 256)
|
||||
(logior! (-> self options) (cam-slave-options-u32 PLAYER_MOVING_CAMERA))
|
||||
(matrix-axis-angle! s4-0 (-> *camera* local-down) f30-2)
|
||||
(vector-matrix*! (-> self view-flat) (-> self view-flat) s4-0)
|
||||
(set! (-> self butt-timer) (the-as uint 0))
|
||||
(set! (-> self butt-seek) #f)
|
||||
(when (logtest? #x800000 (-> self options))
|
||||
(when (logtest? (cam-slave-options-u32 HAVE_BUTT_HANDLE) (-> self options))
|
||||
(kill-persister *setting-control* (the-as engine-pers 'butt-handle) 'butt-handle)
|
||||
(set! (-> self options) (logand -8388609 (-> self options)))
|
||||
(logclear! (-> self options) (cam-slave-options-u32 HAVE_BUTT_HANDLE))
|
||||
)
|
||||
)
|
||||
((or (logtest? (-> self options) 1) (let ((s3-0 (handle->process (-> *camera* settings butt-handle))))
|
||||
(if (type? s3-0 process-drawable)
|
||||
s3-0
|
||||
)
|
||||
)
|
||||
((or (logtest? (-> self options) (cam-slave-options-u32 BUTT_CAM))
|
||||
(let ((s3-0 (handle->process (-> *camera* settings butt-handle))))
|
||||
(if (type? s3-0 process-drawable)
|
||||
s3-0
|
||||
)
|
||||
)
|
||||
)
|
||||
(vector-normalize-copy! gp-3 (-> self view-flat) 1.0)
|
||||
(let ((v1-283 (handle->process (-> *camera* settings butt-handle))))
|
||||
(cond
|
||||
(v1-283
|
||||
(set! (-> self options) (logior #x800000 (-> self options)))
|
||||
(set! (-> self options) (logior (cam-slave-options-u32 HAVE_BUTT_HANDLE) (-> self options)))
|
||||
(let* ((s3-1 (quaternion->matrix (new 'stack-no-clear 'matrix) (-> (the-as process-drawable v1-283) root quat)))
|
||||
(a2-18 (matrix-axis-angle!
|
||||
(new 'stack-no-clear 'matrix)
|
||||
@@ -2602,15 +2607,17 @@
|
||||
)
|
||||
)
|
||||
(vector-normalize! s5-3 -1.0)
|
||||
(when (and (logtest? #x800000 (-> self options)) (< (cos 910.2222) (vector-dot gp-3 s5-3)))
|
||||
(when (and (logtest? (cam-slave-options-u32 HAVE_BUTT_HANDLE) (-> self options))
|
||||
(< (cos 910.2222) (vector-dot gp-3 s5-3))
|
||||
)
|
||||
(kill-persister *setting-control* (the-as engine-pers 'butt-handle) 'butt-handle)
|
||||
(set! (-> self options) (logand -8388609 (-> self options)))
|
||||
(logclear! (-> self options) (cam-slave-options-u32 HAVE_BUTT_HANDLE))
|
||||
)
|
||||
(matrix-from-two-vectors-max-angle! s4-0 gp-3 s5-3 546.13336)
|
||||
(vector-matrix*! (-> self view-flat) (-> self view-flat) s4-0)
|
||||
)
|
||||
(else
|
||||
(set! (-> self options) (logand -8388609 (-> self options)))
|
||||
(logclear! (-> self options) (cam-slave-options-u32 HAVE_BUTT_HANDLE))
|
||||
)
|
||||
)
|
||||
(when (logtest? (-> *camera* settings slave-options) (cam-slave-options BIKE_MODE))
|
||||
@@ -2762,7 +2769,7 @@
|
||||
)
|
||||
(let ((f28-0
|
||||
(cond
|
||||
((logtest? (-> self options) 32)
|
||||
((logtest? (-> self options) (cam-slave-options-u32 COLLIDE))
|
||||
(set! (-> s5-1 start-pos quad) (-> self string-trans quad))
|
||||
(let ((s2-0 s5-1))
|
||||
(set! (-> s2-0 radius) (-> *CAMERA-bank* collide-move-rad))
|
||||
@@ -2806,13 +2813,13 @@
|
||||
)
|
||||
(cond
|
||||
((zero? gp-1)
|
||||
(set! (-> self options) (logand -1025 (-> self options)))
|
||||
(logclear! (-> self options) (cam-slave-options-u32 MOVEMENT_BLOCKED))
|
||||
(if *display-cam-los-debug*
|
||||
(format *stdcon* "not blocked~%")
|
||||
)
|
||||
)
|
||||
(else
|
||||
(logior! (-> self options) 1024)
|
||||
(logior! (-> self options) (cam-slave-options-u32 MOVEMENT_BLOCKED))
|
||||
(if *display-cam-los-debug*
|
||||
(format *stdcon* "blocked ~D ~f~%" gp-1 f30-2)
|
||||
)
|
||||
@@ -2851,7 +2858,7 @@
|
||||
(cam-debug-reset-coll-tri)
|
||||
)
|
||||
(cam-string-follow)
|
||||
(if (logtest? (-> self options) 512)
|
||||
(if (logtest? (-> self options) (cam-slave-options-u32 LINE_OF_SIGHT))
|
||||
(cam-string-line-of-sight)
|
||||
)
|
||||
(if (not (paused?))
|
||||
@@ -2867,18 +2874,18 @@
|
||||
(vector+! (-> self desired-pos) (-> *camera* tpos-curr-adj) gp-0)
|
||||
)
|
||||
(set! (-> self desired-pos y) (fmin (-> self desired-pos y) (-> *camera* settings string-camera-ceiling)))
|
||||
(if (logtest? (-> self options) 64)
|
||||
(if (logtest? (-> self options) (cam-slave-options-u32 FIND_HIDDEN_TARGET))
|
||||
(cam-string-find-hidden)
|
||||
)
|
||||
(cond
|
||||
((logtest? (-> self options) 4096)
|
||||
((logtest? (-> self options) (cam-slave-options-u32 GOTO_GOOD_POINT))
|
||||
(when *debug-segment*
|
||||
(let ((a1-1 (new 'stack-no-clear 'vector)))
|
||||
(vector-! a1-1 (-> self good-point) (-> self string-trans))
|
||||
(cam-collision-record-save (-> self string-trans) a1-1 -2 'jump self)
|
||||
)
|
||||
)
|
||||
(set! (-> self options) (logand -4097 (-> self options)))
|
||||
(logclear! (-> self options) (cam-slave-options-u32 GOTO_GOOD_POINT))
|
||||
(set! (-> self desired-pos quad) (-> self good-point quad))
|
||||
(cam-string-move)
|
||||
(vector-! (-> self view-flat) (-> self string-trans) (-> *camera* tpos-curr-adj))
|
||||
@@ -2911,14 +2918,14 @@
|
||||
(tracking-spline-method-21 (-> self position-spline) (-> self trans) 4096.0 40960.0 0.1)
|
||||
)
|
||||
((and (logtest? (-> *camera* settings slave-options) (cam-slave-options BIKE_MODE))
|
||||
(logtest? (-> self options) 256)
|
||||
(logtest? (-> self options) (cam-slave-options-u32 PLAYER_MOVING_CAMERA))
|
||||
)
|
||||
(tracking-spline-method-21 (-> self position-spline) (-> self trans) 102.4 4096.0 0.1)
|
||||
)
|
||||
((logtest? (-> *camera* settings slave-options) (cam-slave-options BIKE_MODE))
|
||||
(tracking-spline-method-21 (-> self position-spline) (-> self trans) 40.96 4096.0 0.1)
|
||||
)
|
||||
((logtest? (-> self options) 256)
|
||||
((logtest? (-> self options) (cam-slave-options-u32 PLAYER_MOVING_CAMERA))
|
||||
(tracking-spline-method-21
|
||||
(-> self position-spline)
|
||||
(-> self trans)
|
||||
@@ -2944,7 +2951,7 @@
|
||||
)
|
||||
|
||||
(defbehavior set-string-params camera-slave ()
|
||||
(when (not (or (-> self string-val-locked) (logtest? #x40000 (-> self options))))
|
||||
(when (not (or (-> self string-val-locked) (logtest? (cam-slave-options-u32 GUN_CAM) (-> self options))))
|
||||
(set! (-> self string-min-val quad) (-> *camera* string-min value quad))
|
||||
(let ((v0-0 (-> self string-max-val)))
|
||||
(set! (-> v0-0 quad) (-> *camera* string-max value quad))
|
||||
@@ -2955,7 +2962,7 @@
|
||||
|
||||
(defstate cam-string (camera-slave)
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(local-vars (v0-0 none))
|
||||
(local-vars (v0-0 object))
|
||||
(let ((v1-0 event-type))
|
||||
(the-as
|
||||
object
|
||||
@@ -2963,7 +2970,7 @@
|
||||
((= v1-0 'get-behind)
|
||||
(set! (-> self butt-timer) (the-as uint (+ (-> self clock frame-counter) (seconds 0.25))))
|
||||
(set! (-> self butt-seek) (the-as basic #t))
|
||||
(set! v0-0 (the-as none (-> self butt-vector)))
|
||||
(set! v0-0 (-> self butt-vector))
|
||||
(set! (-> (the-as vector v0-0) quad) (-> (the-as vector (-> event param 0)) quad))
|
||||
v0-0
|
||||
)
|
||||
@@ -2976,7 +2983,7 @@
|
||||
((= v1-0 'joystick)
|
||||
(set! (-> self phony-joystick-x) (the-as float (-> event param 0)))
|
||||
(set! (-> self phony-joystick-y) (the-as float (-> event param 1)))
|
||||
(set! v0-0 (the-as none #t))
|
||||
(set! v0-0 #t)
|
||||
(set! (-> self have-phony-joystick) (the-as basic v0-0))
|
||||
v0-0
|
||||
)
|
||||
@@ -3047,7 +3054,7 @@
|
||||
((-> event param 0)
|
||||
(set! (-> self string-val-locked) (the-as basic #t))
|
||||
(set! (-> self string-relative) (the-as basic #t))
|
||||
(set! v0-0 (the-as none (-> self relative-position)))
|
||||
(set! v0-0 (-> self relative-position))
|
||||
(set! (-> (the-as vector v0-0) quad) (-> (the-as vector (-> event param 0)) quad))
|
||||
v0-0
|
||||
)
|
||||
@@ -3065,7 +3072,7 @@
|
||||
(-> self los-state)
|
||||
)
|
||||
(else
|
||||
(cam-standard-event-handler proc arg1 event-type event)
|
||||
(the-as object (cam-standard-event-handler proc arg1 event-type event))
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -3113,7 +3120,7 @@
|
||||
(vector-length (-> self view-flat))
|
||||
)
|
||||
(else
|
||||
(vector-flatten! (-> self view-flat) (the-as vector (&-> self stack 112)) (-> *camera* local-down))
|
||||
(vector-flatten! (-> self view-flat) (-> self tracking inv-mat vector 2) (-> *camera* local-down))
|
||||
(vector-negate! (-> self view-flat) (-> self view-flat))
|
||||
(-> self view-off z)
|
||||
)
|
||||
@@ -3228,7 +3235,7 @@
|
||||
(none)
|
||||
)
|
||||
:trans (behavior ()
|
||||
(if (not (logtest? (-> *camera* master-options) 1))
|
||||
(if (not (logtest? (-> *camera* master-options) (cam-master-options-u32 HAVE_TARGET)))
|
||||
(cam-slave-go cam-free-floating)
|
||||
)
|
||||
(none)
|
||||
@@ -3298,7 +3305,7 @@
|
||||
(vector-float*! s5-0 (-> self velocity) f30-0)
|
||||
(let ((f28-0
|
||||
(cond
|
||||
((logtest? (-> self options) 32)
|
||||
((logtest? (-> self options) (cam-slave-options-u32 COLLIDE))
|
||||
(set! (-> gp-2 start-pos quad) (-> self trans quad))
|
||||
(let ((s1-0 gp-2))
|
||||
(set! (-> s1-0 radius) (-> *CAMERA-bank* collide-move-rad))
|
||||
@@ -3363,7 +3370,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(slave-set-rotation! (-> self tracking) (-> self trans) (the-as float (-> self options)) (-> self fov) #t)
|
||||
(slave-set-rotation! (-> self tracking) (-> self trans) (-> self options) (-> self fov) #t)
|
||||
(none)
|
||||
)
|
||||
|
||||
@@ -3383,7 +3390,7 @@
|
||||
(lerp (-> *CAM_STICK-bank* min-z) (-> *CAM_STICK-bank* max-z) (-> self view-off-param))
|
||||
)
|
||||
(cam-calc-follow! (-> self tracking) (-> self trans) #f)
|
||||
(vector-flatten! (-> self view-flat) (the-as vector (&-> self stack 112)) (-> *camera* local-down))
|
||||
(vector-flatten! (-> self view-flat) (-> self tracking inv-mat vector 2) (-> *camera* local-down))
|
||||
(vector-negate! (-> self view-flat) (-> self view-flat))
|
||||
(vector-normalize! (-> self view-flat) (-> self view-off z))
|
||||
(vector--float*! (-> self desired-pos) (-> self view-flat) (-> *camera* local-down) (-> self view-off y))
|
||||
@@ -3392,12 +3399,12 @@
|
||||
(vector-reset! (-> self velocity))
|
||||
(set! (-> self blend-from-type) (the-as uint 2))
|
||||
(set! (-> self blend-to-type) (camera-blend-to-type unknown-2))
|
||||
(slave-set-rotation! (-> self tracking) (-> self trans) (the-as float (-> self options)) (-> self fov) #f)
|
||||
(slave-set-rotation! (-> self tracking) (-> self trans) (-> self options) (-> self fov) #f)
|
||||
)
|
||||
(none)
|
||||
)
|
||||
:trans (behavior ()
|
||||
(if (not (logtest? (-> *camera* master-options) 1))
|
||||
(if (not (logtest? (-> *camera* master-options) (cam-master-options-u32 HAVE_TARGET)))
|
||||
(cam-slave-go cam-free-floating)
|
||||
)
|
||||
(when (not (paused?))
|
||||
@@ -3441,7 +3448,7 @@
|
||||
(matrix-axis-angle! gp-0 (-> *camera* local-down) f0-16)
|
||||
(vector-matrix*! (-> self view-flat) (-> self view-flat) gp-0)
|
||||
)
|
||||
((logtest? (-> self options) 1)
|
||||
((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))
|
||||
@@ -3562,7 +3569,7 @@
|
||||
(vector-float*! s5-3 (-> self velocity) f30-1)
|
||||
(let ((f28-0
|
||||
(cond
|
||||
((logtest? (-> self options) 32)
|
||||
((logtest? (-> self options) (cam-slave-options-u32 COLLIDE))
|
||||
(set! (-> gp-3 start-pos quad) (-> self trans quad))
|
||||
(let ((s3-2 gp-3))
|
||||
(set! (-> s3-2 radius) 4096.0)
|
||||
@@ -3601,7 +3608,7 @@
|
||||
)
|
||||
)
|
||||
(cam-calc-bike-follow! (-> self tracking) (-> self trans) #t)
|
||||
(slave-set-rotation! (-> self tracking) (-> self trans) (the-as float (-> self options)) (-> self fov) #t)
|
||||
(slave-set-rotation! (-> self tracking) (-> self trans) (-> self options) (-> self fov) #t)
|
||||
(none)
|
||||
)
|
||||
|
||||
@@ -3617,7 +3624,7 @@
|
||||
(set! (-> self view-off x) 0.0)
|
||||
(set! (-> self view-off y) (-> *CAM_BIKE-bank* max-y))
|
||||
(set! (-> self view-off z) (-> *CAM_BIKE-bank* max-z))
|
||||
(vector-flatten! (-> self view-flat) (the-as vector (&-> self stack 112)) (-> *camera* local-down))
|
||||
(vector-flatten! (-> self view-flat) (-> self tracking inv-mat vector 2) (-> *camera* local-down))
|
||||
(vector-negate! (-> self view-flat) (-> self view-flat))
|
||||
(vector-normalize! (-> self view-flat) (-> self view-off z))
|
||||
(vector--float*! (-> self desired-pos) (-> self view-flat) (-> *camera* local-down) (-> self view-off y))
|
||||
@@ -3627,7 +3634,7 @@
|
||||
(set! (-> self blend-from-type) (the-as uint 0))
|
||||
(set! (-> self blend-to-type) (camera-blend-to-type unknown-1))
|
||||
(cam-calc-bike-follow! (-> self tracking) (-> self trans) #f)
|
||||
(slave-set-rotation! (-> self tracking) (-> self trans) (the-as float (-> self options)) (-> self fov) #f)
|
||||
(slave-set-rotation! (-> self tracking) (-> self trans) (-> self options) (-> self fov) #f)
|
||||
)
|
||||
(none)
|
||||
)
|
||||
@@ -3637,7 +3644,7 @@
|
||||
(none)
|
||||
)
|
||||
:trans (behavior ()
|
||||
(if (not (logtest? (-> *camera* master-options) 1))
|
||||
(if (not (logtest? (-> *camera* master-options) (cam-master-options-u32 HAVE_TARGET)))
|
||||
(cam-slave-go cam-free-floating)
|
||||
)
|
||||
(none)
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
;; NOTE - for camera
|
||||
(declare-type cam-rotation-tracker structure)
|
||||
(define-extern cam-calc-follow! (function cam-rotation-tracker vector symbol vector))
|
||||
(define-extern slave-set-rotation! (function cam-rotation-tracker vector float float symbol none))
|
||||
(define-extern slave-set-rotation! (function cam-rotation-tracker vector cam-slave-options-u32 float symbol none))
|
||||
|
||||
;; NOTE - for cam-start
|
||||
(declare-type camera-master process)
|
||||
@@ -320,61 +320,61 @@
|
||||
|
||||
|
||||
(deftype camera-slave (process)
|
||||
((trans vector :inline :offset-assert 128)
|
||||
(fov float :offset-assert 144)
|
||||
(fov0 float :offset-assert 148)
|
||||
(fov1 float :offset-assert 152)
|
||||
(fov-index cam-index :inline :offset-assert 160)
|
||||
(tracking cam-rotation-tracker :inline :offset-assert 208)
|
||||
(view-off-param float :offset-assert 472)
|
||||
(view-off vector :inline :offset-assert 480)
|
||||
(joystick-saved-view-off vector :inline :offset-assert 496)
|
||||
(min-z-override float :offset-assert 512)
|
||||
(view-flat vector :inline :offset-assert 528)
|
||||
(string-vel-dir uint32 :offset-assert 544)
|
||||
(string-trans vector :inline :offset-assert 560)
|
||||
(position-spline tracking-spline :inline :offset-assert 576)
|
||||
(pivot-pt vector :inline :offset-assert 2224)
|
||||
(pivot-rad float :offset-assert 2240)
|
||||
(circular-follow vector :inline :offset-assert 2256)
|
||||
(max-angle-offset float :offset-assert 2272)
|
||||
(max-angle-curr float :offset-assert 2276)
|
||||
(options uint32 :offset-assert 2280)
|
||||
(cam-entity entity :offset-assert 2284)
|
||||
(butt-timer uint64 :offset-assert 2288)
|
||||
(butt-seek basic :offset-assert 2296)
|
||||
(butt-vector vector :inline :offset-assert 2304)
|
||||
(velocity vector :inline :offset-assert 2320)
|
||||
(desired-pos vector :inline :offset-assert 2336)
|
||||
(time-dist-too-far uint32 :offset-assert 2352)
|
||||
(los-state slave-los-state :offset-assert 2356)
|
||||
(good-point vector :inline :offset-assert 2368)
|
||||
(los-tgt-spline-pt int32 :offset-assert 2384)
|
||||
(los-tgt-spline-pt-incarnation int32 :offset-assert 2388)
|
||||
(los-last-pos vector :inline :offset-assert 2400)
|
||||
(intro-curve curve :inline :offset-assert 2416)
|
||||
(intro-offset vector :inline :offset-assert 2448)
|
||||
(intro-t float :offset-assert 2464)
|
||||
(intro-t-step float :offset-assert 2468)
|
||||
(outro-exit-value float :offset-assert 2472)
|
||||
(spline-exists basic :offset-assert 2476)
|
||||
(spline-curve curve :inline :offset-assert 2480)
|
||||
(spline-offset vector :inline :offset-assert 2512)
|
||||
(index cam-index :inline :offset-assert 2528)
|
||||
(saved-pt vector :inline :offset-assert 2576)
|
||||
(spline-tt float :offset-assert 2592)
|
||||
(spline-follow-dist float :offset-assert 2596)
|
||||
(enter-has-run symbol :offset-assert 2600)
|
||||
(blend-from-type uint64 :offset-assert 2608)
|
||||
(blend-to-type camera-blend-to-type :offset-assert 2616)
|
||||
(have-phony-joystick basic :offset-assert 2624)
|
||||
(phony-joystick-x float :offset-assert 2628)
|
||||
(phony-joystick-y float :offset-assert 2632)
|
||||
(string-min-val vector :inline :offset-assert 2640)
|
||||
(string-max-val vector :inline :offset-assert 2656)
|
||||
(string-val-locked basic :offset-assert 2672)
|
||||
(relative-position vector :inline :offset-assert 2688)
|
||||
(string-relative basic :offset-assert 2704)
|
||||
((trans vector :inline :offset-assert 128)
|
||||
(fov float :offset-assert 144)
|
||||
(fov0 float :offset-assert 148)
|
||||
(fov1 float :offset-assert 152)
|
||||
(fov-index cam-index :inline :offset-assert 160)
|
||||
(tracking cam-rotation-tracker :inline :offset-assert 208)
|
||||
(view-off-param float :offset-assert 472)
|
||||
(view-off vector :inline :offset-assert 480)
|
||||
(joystick-saved-view-off vector :inline :offset-assert 496)
|
||||
(min-z-override float :offset-assert 512)
|
||||
(view-flat vector :inline :offset-assert 528)
|
||||
(string-vel-dir uint32 :offset-assert 544)
|
||||
(string-trans vector :inline :offset-assert 560)
|
||||
(position-spline tracking-spline :inline :offset-assert 576)
|
||||
(pivot-pt vector :inline :offset-assert 2224)
|
||||
(pivot-rad float :offset-assert 2240)
|
||||
(circular-follow vector :inline :offset-assert 2256)
|
||||
(max-angle-offset float :offset-assert 2272)
|
||||
(max-angle-curr float :offset-assert 2276)
|
||||
(options cam-slave-options-u32 :offset-assert 2280)
|
||||
(cam-entity entity :offset-assert 2284)
|
||||
(butt-timer uint64 :offset-assert 2288)
|
||||
(butt-seek basic :offset-assert 2296)
|
||||
(butt-vector vector :inline :offset-assert 2304)
|
||||
(velocity vector :inline :offset-assert 2320)
|
||||
(desired-pos vector :inline :offset-assert 2336)
|
||||
(time-dist-too-far uint32 :offset-assert 2352)
|
||||
(los-state slave-los-state :offset-assert 2356)
|
||||
(good-point vector :inline :offset-assert 2368)
|
||||
(los-tgt-spline-pt int32 :offset-assert 2384)
|
||||
(los-tgt-spline-pt-incarnation int32 :offset-assert 2388)
|
||||
(los-last-pos vector :inline :offset-assert 2400)
|
||||
(intro-curve curve :inline :offset-assert 2416)
|
||||
(intro-offset vector :inline :offset-assert 2448)
|
||||
(intro-t float :offset-assert 2464)
|
||||
(intro-t-step float :offset-assert 2468)
|
||||
(outro-exit-value float :offset-assert 2472)
|
||||
(spline-exists basic :offset-assert 2476)
|
||||
(spline-curve curve :inline :offset-assert 2480)
|
||||
(spline-offset vector :inline :offset-assert 2512)
|
||||
(index cam-index :inline :offset-assert 2528)
|
||||
(saved-pt vector :inline :offset-assert 2576)
|
||||
(spline-tt float :offset-assert 2592)
|
||||
(spline-follow-dist float :offset-assert 2596)
|
||||
(enter-has-run symbol :offset-assert 2600)
|
||||
(blend-from-type uint64 :offset-assert 2608)
|
||||
(blend-to-type camera-blend-to-type :offset-assert 2616)
|
||||
(have-phony-joystick basic :offset-assert 2624)
|
||||
(phony-joystick-x float :offset-assert 2628)
|
||||
(phony-joystick-y float :offset-assert 2632)
|
||||
(string-min-val vector :inline :offset-assert 2640)
|
||||
(string-max-val vector :inline :offset-assert 2656)
|
||||
(string-val-locked basic :offset-assert 2672)
|
||||
(relative-position vector :inline :offset-assert 2688)
|
||||
(string-relative basic :offset-assert 2704)
|
||||
)
|
||||
:heap-base #xa20
|
||||
:method-count-assert 14
|
||||
@@ -407,7 +407,7 @@
|
||||
|
||||
|
||||
(deftype camera-master (process)
|
||||
((master-options uint32 :offset-assert 128)
|
||||
((master-options cam-master-options-u32 :offset-assert 128)
|
||||
(settings cam-setting-data :offset-assert 132)
|
||||
(slave (pointer camera-slave) :offset-assert 136)
|
||||
(decel (pointer camera-slave) :offset-assert 140)
|
||||
|
||||
@@ -915,10 +915,10 @@
|
||||
(defbehavior cam-slave-init-vars camera-slave ()
|
||||
(cond
|
||||
(*camera*
|
||||
(set! (-> self options) (-> *camera* slave-options))
|
||||
(set! (-> self options) (the-as cam-slave-options-u32 (-> *camera* slave-options)))
|
||||
)
|
||||
(else
|
||||
(set! (-> self options) (the-as uint 0))
|
||||
(set! (-> self options) (cam-slave-options-u32))
|
||||
0
|
||||
)
|
||||
)
|
||||
@@ -1036,7 +1036,7 @@
|
||||
(('teleport)
|
||||
(jump-to-target! (-> self tracking point-of-interest-blend) 0.0)
|
||||
(cam-calc-follow! (-> self tracking) (-> self trans) #f)
|
||||
(slave-set-rotation! (-> self tracking) (-> self trans) (the-as float (-> self options)) (-> self fov) #f)
|
||||
(slave-set-rotation! (-> self tracking) (-> self trans) (-> self options) (-> self fov) #f)
|
||||
)
|
||||
)
|
||||
(none)
|
||||
@@ -1085,7 +1085,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(if (logtest? #x200000 (-> self options))
|
||||
(if (logtest? (cam-slave-options-u32 EASE_SPLINE_IDX) (-> self options))
|
||||
(set! f0-18 (parameter-ease-sin-clamp f0-18))
|
||||
)
|
||||
(curve-get-pos! s5-0 f0-18 (-> self spline-curve))
|
||||
@@ -1345,7 +1345,7 @@
|
||||
arg0
|
||||
)
|
||||
|
||||
(defun slave-matrix-blend-2 ((arg0 matrix) (arg1 float) (arg2 vector) (arg3 matrix))
|
||||
(defun slave-matrix-blend-2 ((arg0 matrix) (arg1 cam-slave-options-u32) (arg2 vector) (arg3 matrix))
|
||||
(with-pp
|
||||
(let ((s1-0 (new-stack-vector0))
|
||||
(s4-0 (new-stack-quaternion0))
|
||||
@@ -1355,7 +1355,7 @@
|
||||
)
|
||||
0.0
|
||||
(let* ((f0-1 (cond
|
||||
((logtest? (the-as int arg1) 4)
|
||||
((logtest? arg1 (cam-slave-options-u32 MOVE_SPHERICAL))
|
||||
(vector-length arg2)
|
||||
)
|
||||
(else
|
||||
@@ -1536,7 +1536,7 @@
|
||||
;; ERROR: Unsupported inline assembly instruction kind - [mula.s f0, f3]
|
||||
;; ERROR: Unsupported inline assembly instruction kind - [madda.s f1, f4]
|
||||
;; ERROR: Unsupported inline assembly instruction kind - [madd.s f0, f2, f5]
|
||||
(defun slave-set-rotation! ((arg0 cam-rotation-tracker) (arg1 vector) (arg2 float) (arg3 float) (arg4 symbol))
|
||||
(defun slave-set-rotation! ((arg0 cam-rotation-tracker) (arg1 vector) (arg2 cam-slave-options-u32) (arg3 float) (arg4 symbol))
|
||||
(local-vars
|
||||
(f0-9 float)
|
||||
(sv-208 vector)
|
||||
|
||||
@@ -146,12 +146,12 @@
|
||||
(defbehavior plat-event base-plat ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
"Handles platform related events. Presently all this does is:
|
||||
- if `event-type` is [['bonk]], then call [[base-plat:29]]"
|
||||
(let ((evt-type event-type))
|
||||
(the-as object (if (= evt-type 'bonk)
|
||||
(start-bouncing! self)
|
||||
)
|
||||
)
|
||||
)
|
||||
(the-as object (case event-type
|
||||
(('bonk)
|
||||
(start-bouncing! self)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(deftype eco-door (process-drawable)
|
||||
@@ -191,23 +191,23 @@
|
||||
and play the respective sound
|
||||
|
||||
@unused - likely a leftover from Jak 1"
|
||||
(let ((evt-type event-type))
|
||||
(the-as object (when (= evt-type 'trigger)
|
||||
(set! (-> self locked) (not (-> self locked)))
|
||||
(cond
|
||||
((-> self locked)
|
||||
(if (and (-> self next-state) (= (-> self next-state name) 'door-closed))
|
||||
(sound-play "door-lock")
|
||||
)
|
||||
)
|
||||
(else
|
||||
(sound-play "door-unlock")
|
||||
)
|
||||
(the-as object (case event-type
|
||||
(('trigger)
|
||||
(set! (-> self locked) (not (-> self locked)))
|
||||
(cond
|
||||
((-> self locked)
|
||||
(if (and (-> self next-state) (= (-> self next-state name) 'door-closed))
|
||||
(sound-play "door-lock")
|
||||
)
|
||||
)
|
||||
#t
|
||||
)
|
||||
)
|
||||
)
|
||||
(else
|
||||
(sound-play "door-unlock")
|
||||
)
|
||||
)
|
||||
#t
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
eco-door-event-handler
|
||||
|
||||
@@ -82,37 +82,37 @@
|
||||
(defstate up-idle (basebutton)
|
||||
:virtual #t
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(let ((v1-0 event-type))
|
||||
(the-as object (cond
|
||||
((= v1-0 'attack)
|
||||
(let ((attack (the-as attack-info (-> event param 1))))
|
||||
(case (-> attack mode)
|
||||
(('flop 'spin 'punch 'eco-yellow 'eco-red 'eco-blue 'eco-dark)
|
||||
(when (or (not (or (= (-> attack mode) 'spin) (= (-> attack mode) 'punch)))
|
||||
(logtest? (-> self button-status) (button-status button-status-3))
|
||||
)
|
||||
(send-event! self (-> self event-going-down))
|
||||
(go-virtual going-down)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(the-as
|
||||
object
|
||||
(case event-type
|
||||
(('attack)
|
||||
(let ((attack (the-as attack-info (-> event param 1))))
|
||||
(case (-> attack mode)
|
||||
(('flop 'spin 'punch 'eco-yellow 'eco-red 'eco-blue 'eco-dark)
|
||||
(when (or (not (or (= (-> attack mode) 'spin) (= (-> attack mode) 'punch)))
|
||||
(logtest? (-> self button-status) (button-status button-status-3))
|
||||
)
|
||||
((= v1-0 'trigger)
|
||||
(sound-play "silo-button")
|
||||
(go-virtual going-down)
|
||||
)
|
||||
((= v1-0 'touch)
|
||||
(when (logtest? (-> self button-status) (button-status button-status-4))
|
||||
(send-event! self (-> self event-going-down))
|
||||
(go-virtual going-down)
|
||||
)
|
||||
)
|
||||
((= v1-0 'move-to)
|
||||
(move-to! self (the-as vector (-> event param 0)) (the-as quaternion (-> event param 1)))
|
||||
)
|
||||
)
|
||||
(send-event! self (-> self event-going-down))
|
||||
(go-virtual going-down)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(('trigger)
|
||||
(sound-play "silo-button")
|
||||
(go-virtual going-down)
|
||||
)
|
||||
(('touch)
|
||||
(when (logtest? (-> self button-status) (button-status button-status-4))
|
||||
(send-event! self (-> self event-going-down))
|
||||
(go-virtual going-down)
|
||||
)
|
||||
)
|
||||
(('move-to)
|
||||
(the-as object (move-to! self (the-as vector (-> event param 0)) (the-as quaternion (-> event param 1))))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
:enter (behavior ()
|
||||
@@ -140,16 +140,16 @@
|
||||
(defstate going-down (basebutton)
|
||||
:virtual #t
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(let ((evt-type event-type))
|
||||
(the-as object (cond
|
||||
((= evt-type 'untrigger)
|
||||
(go-virtual going-up)
|
||||
)
|
||||
((= evt-type 'move-to)
|
||||
(move-to! self (the-as vector (-> event param 0)) (the-as quaternion (-> event param 1)))
|
||||
)
|
||||
)
|
||||
)
|
||||
(the-as
|
||||
object
|
||||
(case event-type
|
||||
(('untrigger)
|
||||
(go-virtual going-up)
|
||||
)
|
||||
(('move-to)
|
||||
(the-as object (move-to! self (the-as vector (-> event param 0)) (the-as quaternion (-> event param 1))))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
:enter (behavior ()
|
||||
@@ -189,16 +189,16 @@
|
||||
(defstate down-idle (basebutton)
|
||||
:virtual #t
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(let ((evt-type event-type))
|
||||
(the-as object (cond
|
||||
((= evt-type 'untrigger)
|
||||
(go-virtual going-up)
|
||||
)
|
||||
((= evt-type 'move-to)
|
||||
(move-to! self (the-as vector (-> event param 0)) (the-as quaternion (-> event param 1)))
|
||||
)
|
||||
)
|
||||
)
|
||||
(the-as
|
||||
object
|
||||
(case event-type
|
||||
(('untrigger)
|
||||
(go-virtual going-up)
|
||||
)
|
||||
(('move-to)
|
||||
(the-as object (move-to! self (the-as vector (-> event param 0)) (the-as quaternion (-> event param 1))))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
:enter (behavior ()
|
||||
@@ -242,16 +242,16 @@
|
||||
(defstate going-up (basebutton)
|
||||
:virtual #t
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(let ((v1-0 event-type))
|
||||
(the-as object (cond
|
||||
((= v1-0 'move-to)
|
||||
(move-to! self (the-as vector (-> event param 0)) (the-as quaternion (-> event param 1)))
|
||||
)
|
||||
((= v1-0 'trigger)
|
||||
(go-virtual going-down)
|
||||
)
|
||||
)
|
||||
)
|
||||
(the-as
|
||||
object
|
||||
(case event-type
|
||||
(('move-to)
|
||||
(the-as object (move-to! self (the-as vector (-> event param 0)) (the-as quaternion (-> event param 1))))
|
||||
)
|
||||
(('trigger)
|
||||
(go-virtual going-down)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
:enter (behavior ()
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
)
|
||||
|
||||
|
||||
(defskelgroup skel-blocking-plane blocking-plane 0 2
|
||||
((1 (meters 999999)))
|
||||
(defskelgroup skel-blocking-plane blocking-plane blocking-plane-lod0-jg blocking-plane-idle-ja
|
||||
((blocking-plane-lod0-mg (meters 999999)))
|
||||
:bounds (static-spherem 0 0 0 100.1)
|
||||
:texture-level 6
|
||||
)
|
||||
@@ -30,61 +30,59 @@
|
||||
(defstate idle (blocking-plane)
|
||||
:virtual #t
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(let ((evt-type event-type))
|
||||
(the-as object (cond
|
||||
((= evt-type 'on)
|
||||
(cond
|
||||
((nonzero? (-> self root-override))
|
||||
(let ((prim (-> self root-override root-prim)))
|
||||
(set! (-> prim prim-core collide-as) (-> self root-override backup-collide-as))
|
||||
(let ((v0-0 (the-as int (-> self root-override backup-collide-with))))
|
||||
(set! (-> prim prim-core collide-with) (the-as collide-spec v0-0))
|
||||
v0-0
|
||||
)
|
||||
(the-as object (case event-type
|
||||
(('on)
|
||||
(cond
|
||||
((nonzero? (-> self root-override))
|
||||
(let ((prim (-> self root-override root-prim)))
|
||||
(set! (-> prim prim-core collide-as) (-> self root-override backup-collide-as))
|
||||
(let ((v0-0 (the-as int (-> self root-override backup-collide-with))))
|
||||
(set! (-> prim prim-core collide-with) (the-as collide-spec v0-0))
|
||||
v0-0
|
||||
)
|
||||
)
|
||||
(else
|
||||
(let ((proc-child-ptr-0 (-> self child)))
|
||||
(while proc-child-ptr-0
|
||||
(let ((proc-child-0 (ppointer->process proc-child-ptr-0)))
|
||||
(set! proc-child-ptr-0 (-> proc-child-ptr-0 0 brother))
|
||||
(if (type? proc-child-0 blocking-plane)
|
||||
(send-event proc-child-0 'on)
|
||||
)
|
||||
)
|
||||
)
|
||||
(else
|
||||
(let ((proc-child-ptr-0 (-> self child)))
|
||||
(while proc-child-ptr-0
|
||||
(let ((proc-child-0 (ppointer->process proc-child-ptr-0)))
|
||||
(set! proc-child-ptr-0 (-> proc-child-ptr-0 0 brother))
|
||||
(if (type? proc-child-0 blocking-plane)
|
||||
(send-event proc-child-0 'on)
|
||||
)
|
||||
)
|
||||
)
|
||||
(the-as int #f)
|
||||
)
|
||||
(the-as int #f)
|
||||
)
|
||||
)
|
||||
((= evt-type 'off)
|
||||
(cond
|
||||
((nonzero? (-> self root-override))
|
||||
(let ((v1-13 (-> self root-override root-prim)))
|
||||
(set! (-> v1-13 prim-core collide-as) (collide-spec))
|
||||
(set! (-> v1-13 prim-core collide-with) (collide-spec))
|
||||
)
|
||||
0
|
||||
)
|
||||
(('off)
|
||||
(cond
|
||||
((nonzero? (-> self root-override))
|
||||
(let ((v1-13 (-> self root-override root-prim)))
|
||||
(set! (-> v1-13 prim-core collide-as) (collide-spec))
|
||||
(set! (-> v1-13 prim-core collide-with) (collide-spec))
|
||||
)
|
||||
(else
|
||||
(let ((proc-child-ptr-1 (-> self child)))
|
||||
(while proc-child-ptr-1
|
||||
(let ((proc-child-1 (ppointer->process proc-child-ptr-1)))
|
||||
(set! proc-child-ptr-1 (-> proc-child-ptr-1 0 brother))
|
||||
(if (type? proc-child-1 blocking-plane)
|
||||
(send-event proc-child-1 'off)
|
||||
)
|
||||
)
|
||||
0
|
||||
)
|
||||
(else
|
||||
(let ((proc-child-ptr-1 (-> self child)))
|
||||
(while proc-child-ptr-1
|
||||
(let ((proc-child-1 (ppointer->process proc-child-ptr-1)))
|
||||
(set! proc-child-ptr-1 (-> proc-child-ptr-1 0 brother))
|
||||
(if (type? proc-child-1 blocking-plane)
|
||||
(send-event proc-child-1 'off)
|
||||
)
|
||||
)
|
||||
)
|
||||
(the-as int #f)
|
||||
)
|
||||
(the-as int #f)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
:code (the-as (function none :behavior blocking-plane) sleep-code)
|
||||
)
|
||||
|
||||
@@ -705,17 +705,15 @@
|
||||
(defstate fall (crate)
|
||||
:virtual #t
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(let ((v1-0 event-type))
|
||||
(the-as object (cond
|
||||
((= v1-0 'carry-info)
|
||||
(-> self carry)
|
||||
)
|
||||
((or (= v1-0 'carry?) (= v1-0 'pickup))
|
||||
(the-as carry-info #f)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(the-as object (case event-type
|
||||
(('carry-info)
|
||||
(-> self carry)
|
||||
)
|
||||
(('carry? 'pickup)
|
||||
(the-as carry-info #f)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
:enter (behavior ()
|
||||
(if (handle->process (-> self carry other))
|
||||
@@ -1108,32 +1106,32 @@
|
||||
(defstate special-contents-die (crate)
|
||||
:virtual #t
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(let ((v1-0 event-type))
|
||||
(the-as object (when (= v1-0 'notify)
|
||||
(case (-> event param 0)
|
||||
(('pickup)
|
||||
(let ((gp-0 (-> self entity extra perm)))
|
||||
(logior! (-> gp-0 status) (entity-perm-status bit-5))
|
||||
(set! (-> gp-0 user-int8 1) (min 127 (+ (-> gp-0 user-int8 1) 1)))
|
||||
(+! (-> self child-count) -1)
|
||||
(when (<= (-> self child-count) 0)
|
||||
(if (or (= (-> self defense) 'iron) (= (-> self defense) 'steel))
|
||||
(process-entity-status! self (entity-perm-status bit-4) #f)
|
||||
)
|
||||
(process-entity-status! self (entity-perm-status dead) #t)
|
||||
(process-entity-status! self (entity-perm-status subtask-complete) #t)
|
||||
(set! (-> gp-0 user-int8 0) 2)
|
||||
(let ((v0-0 (logclear (-> self mask) (process-mask sleep))))
|
||||
(set! (-> self mask) v0-0)
|
||||
v0-0
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(the-as object (case event-type
|
||||
(('notify)
|
||||
(case (-> event param 0)
|
||||
(('pickup)
|
||||
(let ((gp-0 (-> self entity extra perm)))
|
||||
(logior! (-> gp-0 status) (entity-perm-status bit-5))
|
||||
(set! (-> gp-0 user-int8 1) (min 127 (+ (-> gp-0 user-int8 1) 1)))
|
||||
(+! (-> self child-count) -1)
|
||||
(when (<= (-> self child-count) 0)
|
||||
(if (or (= (-> self defense) 'iron) (= (-> self defense) 'steel))
|
||||
(process-entity-status! self (entity-perm-status bit-4) #f)
|
||||
)
|
||||
(process-entity-status! self (entity-perm-status dead) #t)
|
||||
(process-entity-status! self (entity-perm-status subtask-complete) #t)
|
||||
(set! (-> gp-0 user-int8 0) 2)
|
||||
(let ((v0-0 (logclear (-> self mask) (process-mask sleep))))
|
||||
(set! (-> self mask) v0-0)
|
||||
v0-0
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
:trans (-> (method-of-type crate die) trans)
|
||||
:code (behavior ()
|
||||
|
||||
@@ -8,56 +8,47 @@
|
||||
(defenum manipy-options
|
||||
:bitfield #t
|
||||
:type uint32
|
||||
(mo-0 0)
|
||||
)
|
||||
|
||||
(declare-type sparticle-launch-group basic)
|
||||
|
||||
;; NOTE - for gun-blue-shot
|
||||
(declare-type part-tracker process)
|
||||
(define-extern part-tracker-init (function sparticle-launch-group time-frame (function part-tracker none) (pointer process-drawable) process collide-prim-core none :behavior part-tracker))
|
||||
|
||||
;; NOTE - for gun-red-shot
|
||||
(declare-type manipy process-drawable)
|
||||
(define-extern manipy-init (function vector entity-actor skeleton-group vector none :behavior manipy))
|
||||
(define-extern lightning-tracker-init (function lightning-spec time-frame symbol process-drawable vector vector none))
|
||||
|
||||
(declare-type sparticle-launch-group basic)
|
||||
(define-extern part-tracker-init (function sparticle-launch-group time-frame (function part-tracker none) (pointer process-drawable) process matrix none :behavior part-tracker))
|
||||
(define-extern manipy-init (function vector entity-actor skeleton-group vector object none :behavior manipy))
|
||||
(define-extern lightning-tracker-init (function lightning-spec time-frame symbol process-drawable vector vector none :behavior lightning-tracker))
|
||||
(define-extern birth-pickup-at-point (function vector pickup-type float symbol process-tree fact-info (pointer process) :behavior process))
|
||||
|
||||
;; NOTE - for process-drawable
|
||||
(define-extern process-grab? (function process symbol symbol :behavior process))
|
||||
(define-extern process-release? (function process symbol :behavior process))
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(deftype manipy (process-drawable)
|
||||
((new-trans-hook (function none) :offset-assert 200)
|
||||
(cur-trans-hook (function none) :offset-assert 204)
|
||||
(cur-event-hook (function none) :offset-assert 208)
|
||||
(new-joint-anim art-joint-anim :offset-assert 212)
|
||||
(new-joint-anim-blend uint64 :offset-assert 216)
|
||||
(anim-mode symbol :offset-assert 224)
|
||||
(cur-grab-handle handle :offset-assert 232)
|
||||
(cur-target-handle handle :offset-assert 240)
|
||||
(old-grab-pos vector :inline :offset-assert 256)
|
||||
(joint joint-mod 4 :offset-assert 272)
|
||||
(new-post-hook (function none) :offset-assert 288)
|
||||
(cur-post-hook (function none) :offset-assert 292)
|
||||
(clone-copy-trans symbol :offset-assert 296)
|
||||
(shadow-backup basic :offset-assert 300)
|
||||
(draw? symbol :offset-assert 304)
|
||||
(userdata uint64 :offset-assert 312)
|
||||
(prefix basic :offset-assert 320)
|
||||
(shadow-volume-joint int32 :offset-assert 324)
|
||||
(speed float :offset-assert 328)
|
||||
(user-uint64 uint64 4 :offset-assert 336)
|
||||
(options manipy-options :offset-assert 368)
|
||||
((root-override collide-shape :offset 128 :score 1)
|
||||
(new-trans-hook (function none) :offset-assert 200)
|
||||
(cur-trans-hook (function none) :offset-assert 204)
|
||||
(cur-event-hook (function none) :offset-assert 208)
|
||||
(new-joint-anim art-joint-anim :offset-assert 212)
|
||||
(new-joint-anim-blend uint64 :offset-assert 216)
|
||||
(anim-mode symbol :offset-assert 224)
|
||||
(cur-grab-handle handle :offset-assert 232)
|
||||
(cur-target-handle handle :offset-assert 240)
|
||||
(old-grab-pos vector :inline :offset-assert 256)
|
||||
(joint joint-mod 4 :offset-assert 272)
|
||||
(new-post-hook (function none) :offset-assert 288)
|
||||
(cur-post-hook (function none) :offset-assert 292)
|
||||
(clone-copy-trans symbol :offset-assert 296)
|
||||
(shadow-backup basic :offset-assert 300)
|
||||
(draw? symbol :offset-assert 304)
|
||||
(userdata uint64 :offset-assert 312)
|
||||
(prefix basic :offset-assert 320)
|
||||
(shadow-volume-joint int32 :offset-assert 324)
|
||||
(speed float :offset-assert 328)
|
||||
(user-uint64 uint64 4 :offset-assert 336)
|
||||
(options manipy-options :offset-assert 368)
|
||||
)
|
||||
:heap-base #x100
|
||||
:method-count-assert 21
|
||||
:size-assert #x174
|
||||
:flag-assert #x1501000174
|
||||
:flag-assert #x1501000174
|
||||
(:methods
|
||||
(manipy-method-20 () none 20)
|
||||
(idle () _type_ :state 20)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -76,8 +67,8 @@
|
||||
:size-assert #xb0
|
||||
:flag-assert #x10003000b0
|
||||
(:methods
|
||||
(part-spawner-method-14 () none 14)
|
||||
(part-spawner-method-15 () none 15)
|
||||
(active () _type_ :state 14)
|
||||
(is-in-view? (_type_) symbol 15)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -104,8 +95,8 @@
|
||||
:size-assert #x168
|
||||
:flag-assert #x1000f00168
|
||||
(:methods
|
||||
(part-tracker-method-14 () none 14)
|
||||
(part-tracker-method-15 () none 15)
|
||||
(active () _type_ :state 14)
|
||||
(notify-parent-of-death (_type_) none 15)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -113,14 +104,14 @@
|
||||
(deftype lightning-tracker (process)
|
||||
((ppointer-override (pointer lightning-tracker) :offset 28)
|
||||
(root trsqv :offset-assert 128)
|
||||
(lightning lightning-spec :offset-assert 132)
|
||||
(lightning lightning-control :offset-assert 132)
|
||||
(callback (function lightning-tracker none) :offset-assert 136)
|
||||
(duration uint64 :offset-assert 144)
|
||||
(start-time time-frame :offset-assert 152)
|
||||
(offset0 vector :inline :offset-assert 160)
|
||||
(offset1 vector :inline :offset-assert 176)
|
||||
(target0 uint64 :offset-assert 192)
|
||||
(target1 uint64 :offset-assert 200)
|
||||
(target0 handle :offset-assert 192)
|
||||
(target1 handle :offset-assert 200)
|
||||
(target-joint0 int32 :offset-assert 208)
|
||||
(target-joint1 int32 :offset-assert 212)
|
||||
(sound uint32 :offset-assert 216)
|
||||
@@ -134,47 +125,49 @@
|
||||
:size-assert #x130
|
||||
:flag-assert #x1100b00130
|
||||
(:methods
|
||||
(lightning-tracker-method-14 () none 14)
|
||||
(lightning-tracker-method-15 () none 15)
|
||||
(lightning-tracker-method-16 () none 16)
|
||||
(active () _type_ :state 14)
|
||||
(notify-parent-of-death (_type_) none 15)
|
||||
(update (_type_) none 16)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype touch-tracker (process-drawable)
|
||||
((duration time-frame :offset-assert 200)
|
||||
(target handle :offset-assert 208)
|
||||
(event symbol :offset-assert 216)
|
||||
(run-function (function object) :offset-assert 220)
|
||||
(callback (function touch-tracker none) :offset-assert 224)
|
||||
(event-mode basic :offset-assert 228)
|
||||
((root-override collide-shape :offset 128)
|
||||
(duration time-frame :offset-assert 200)
|
||||
(target handle :offset-assert 208)
|
||||
(event symbol :offset-assert 216)
|
||||
(run-function (function object) :offset-assert 220)
|
||||
(callback (function touch-tracker none) :offset-assert 224)
|
||||
(event-mode basic :offset-assert 228)
|
||||
)
|
||||
:heap-base #x70
|
||||
:method-count-assert 21
|
||||
:size-assert #xe8
|
||||
:flag-assert #x15007000e8
|
||||
(:methods
|
||||
(touch-tracker-method-20 () none 20)
|
||||
(active () _type_ :state 20)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype swingpole (process-drawable)
|
||||
((edge-length meters :offset-assert 200)
|
||||
(path-pos float :offset-assert 204)
|
||||
(joint-track int32 :offset-assert 208)
|
||||
(speed meters :offset-assert 212)
|
||||
(dir vector :inline :offset-assert 224)
|
||||
(sync sync-eased :inline :offset-assert 240)
|
||||
((root-override collide-shape :offset 128)
|
||||
(edge-length meters :offset-assert 200)
|
||||
(path-pos float :offset-assert 204)
|
||||
(joint-track int32 :offset-assert 208)
|
||||
(speed meters :offset-assert 212)
|
||||
(dir vector :inline :offset-assert 224)
|
||||
(sync sync-eased :inline :offset-assert 240)
|
||||
)
|
||||
:heap-base #xa0
|
||||
:method-count-assert 23
|
||||
:size-assert #x11c
|
||||
:flag-assert #x1700a0011c
|
||||
(:methods
|
||||
(swingpole-method-20 () none 20)
|
||||
(swingpole-method-21 () none 21)
|
||||
(swingpole-method-22 () none 22)
|
||||
(idle () _type_ :state 20)
|
||||
(active (handle) _type_ :state 21)
|
||||
(move-along-path (_type_) none 22)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -220,30 +213,31 @@
|
||||
|
||||
|
||||
(deftype explosion (process-drawable)
|
||||
((start-time time-frame :offset-assert 200)
|
||||
(duration uint32 :offset-assert 208)
|
||||
(linger-duration uint32 :offset-assert 212)
|
||||
(attack-id uint32 :offset-assert 216)
|
||||
((root-override collide-shape :offset 128)
|
||||
(start-time time-frame :offset-assert 200)
|
||||
(duration uint32 :offset-assert 208)
|
||||
(linger-duration uint32 :offset-assert 212)
|
||||
(attack-id uint32 :offset-assert 216)
|
||||
)
|
||||
:heap-base #x60
|
||||
:method-count-assert 23
|
||||
:size-assert #xdc
|
||||
:flag-assert #x17006000dc
|
||||
(:methods
|
||||
(explosion-method-20 () none 20)
|
||||
(explosion-method-21 () none 21)
|
||||
(explosion-method-22 () none 22)
|
||||
(explode () _type_ :state 20)
|
||||
(setup-explosion-collision (_type_) none 21)
|
||||
(explosion-method-22 (_type_) none 22)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype explosion-init-params (structure)
|
||||
((spawn-point vector :inline :offset-assert 0)
|
||||
(spawn-quat quaternion :inline :offset-assert 16)
|
||||
(radius float :offset-assert 32)
|
||||
(group basic :offset-assert 36)
|
||||
(collide-with collide-spec :offset-assert 40)
|
||||
(penetrate-using penetrate :offset-assert 48)
|
||||
((spawn-point vector :inline :offset-assert 0)
|
||||
(spawn-quat quaternion :inline :offset-assert 16)
|
||||
(radius float :offset-assert 32)
|
||||
(group sparticle-launch-group :offset-assert 36)
|
||||
(collide-with collide-spec :offset-assert 40)
|
||||
(penetrate-using penetrate :offset-assert 48)
|
||||
)
|
||||
:method-count-assert 9
|
||||
:size-assert #x38
|
||||
@@ -257,6 +251,6 @@
|
||||
:size-assert #x80
|
||||
:flag-assert #xf00000080
|
||||
(:methods
|
||||
(process-hidden-method-14 () none 14)
|
||||
(die () _type_ :state 14)
|
||||
)
|
||||
)
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -347,7 +347,10 @@
|
||||
:event (-> cam-string event)
|
||||
:enter (-> cam-string enter)
|
||||
:trans (behavior ()
|
||||
(if (or (not *camera*) (not (logtest? (-> *camera* master-options) 1)) (not (-> self child)))
|
||||
(if (or (not *camera*)
|
||||
(not (logtest? (-> *camera* master-options) (cam-master-options-u32 HAVE_TARGET)))
|
||||
(not (-> self child))
|
||||
)
|
||||
(deactivate self)
|
||||
)
|
||||
(none)
|
||||
|
||||
@@ -93,18 +93,18 @@
|
||||
:bounds (static-spherem -20 0 0 110)
|
||||
)
|
||||
|
||||
(defskelgroup skel-water-anim-under-pool water-anim-under 0 -1
|
||||
((1 (meters 999999)))
|
||||
(defskelgroup skel-water-anim-under-pool water-anim-under water-anim-under-pool-lod0-jg -1
|
||||
((water-anim-under-pool-lod0-mg (meters 999999)))
|
||||
:bounds (static-spherem 0 0 0 51)
|
||||
)
|
||||
|
||||
(defskelgroup skel-water-anim-under-drainout water-anim-under 2 -1
|
||||
((3 (meters 999999)))
|
||||
(defskelgroup skel-water-anim-under-drainout water-anim-under water-anim-under-drainout-lod0-jg -1
|
||||
((water-anim-under-drainout-lod0-mg (meters 999999)))
|
||||
:bounds (static-spherem 0 0 0 20)
|
||||
)
|
||||
|
||||
(defskelgroup skel-water-anim-under-fillup water-anim-under 4 -1
|
||||
((5 (meters 999999)))
|
||||
(defskelgroup skel-water-anim-under-fillup water-anim-under water-anim-under-fillup-lod0-jg -1
|
||||
((water-anim-under-fillup-lod0-mg (meters 999999)))
|
||||
:bounds (static-spherem 0 0 0 23)
|
||||
)
|
||||
|
||||
@@ -309,109 +309,107 @@
|
||||
;; WARN: rewrite_to_get_var got a none typed variable. Is there unreachable code? [OP: 210]
|
||||
(defbehavior water-anim-event-handler water-anim ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(local-vars (v0-1 none))
|
||||
(let ((v1-0 arg2))
|
||||
(the-as
|
||||
object
|
||||
(cond
|
||||
((= v1-0 'move-to)
|
||||
(move-to-point! self (the-as vector (-> arg3 param 0)))
|
||||
(set! v0-1 (the-as none (logclear (-> self mask) (process-mask sleep-code))))
|
||||
(set! (-> self mask) (the-as process-mask v0-1))
|
||||
v0-1
|
||||
(the-as
|
||||
object
|
||||
(case arg2
|
||||
(('move-to)
|
||||
(move-to-point! self (the-as vector (-> arg3 param 0)))
|
||||
(set! v0-1 (the-as none (logclear (-> self mask) (process-mask sleep-code))))
|
||||
(set! (-> self mask) (the-as process-mask v0-1))
|
||||
v0-1
|
||||
)
|
||||
(('move-to-y)
|
||||
(let ((a1-2 (new 'stack-no-clear 'vector)))
|
||||
(set! (-> a1-2 quad) (-> self root trans quad))
|
||||
(set! (-> a1-2 y) (the-as float (-> arg3 param 0)))
|
||||
(move-to-point! self a1-2)
|
||||
)
|
||||
((= v1-0 'move-to-y)
|
||||
(let ((a1-2 (new 'stack-no-clear 'vector)))
|
||||
(set! (-> a1-2 quad) (-> self root trans quad))
|
||||
(set! (-> a1-2 y) (the-as float (-> arg3 param 0)))
|
||||
(move-to-point! self a1-2)
|
||||
)
|
||||
(set! v0-1 (the-as none (logclear (-> self mask) (process-mask sleep-code))))
|
||||
(set! (-> self mask) (the-as process-mask v0-1))
|
||||
v0-1
|
||||
)
|
||||
((= v1-0 'water)
|
||||
(let* ((s5-0 (the-as object (-> arg3 param 0)))
|
||||
(s4-0 (the-as object (-> arg3 param 1)))
|
||||
(gp-0 (if (type? (the-as process s4-0) process-focusable)
|
||||
(the-as uint s4-0)
|
||||
)
|
||||
)
|
||||
(set! v0-1 (the-as none (logclear (-> self mask) (process-mask sleep-code))))
|
||||
(set! (-> self mask) (the-as process-mask v0-1))
|
||||
v0-1
|
||||
)
|
||||
(('water)
|
||||
(let* ((s5-0 (the-as object (-> arg3 param 0)))
|
||||
(s4-0 (the-as object (-> arg3 param 1)))
|
||||
(gp-0 (if (type? (the-as process s4-0) process-focusable)
|
||||
(the-as uint s4-0)
|
||||
)
|
||||
)
|
||||
)
|
||||
(when (and (logtest? (-> self flags) (water-flags deadly))
|
||||
(logtest? (water-flags touch-water) (-> (the-as water-info s5-0) flags))
|
||||
(the-as uint gp-0)
|
||||
)
|
||||
(let ((v1-15 (-> self attack-event)))
|
||||
(case v1-15
|
||||
((#f)
|
||||
)
|
||||
(when (and (logtest? (-> self flags) (water-flags deadly))
|
||||
(logtest? (water-flags touch-water) (-> (the-as water-info s5-0) flags))
|
||||
(the-as uint gp-0)
|
||||
)
|
||||
(let ((v1-15 (-> self attack-event)))
|
||||
(case v1-15
|
||||
((#f)
|
||||
)
|
||||
(('heat)
|
||||
(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)))
|
||||
(let ((a1-10 (new 'stack-no-clear 'event-message-block)))
|
||||
(set! (-> a1-10 from) (process->ppointer self))
|
||||
(set! (-> a1-10 num-params) 2)
|
||||
(set! (-> a1-10 message) 'attack-invinc)
|
||||
(set! (-> a1-10 param 0) (the-as uint #f))
|
||||
(let ((a2-4 (new 'static 'attack-info :mask (attack-info-mask mode id))))
|
||||
(set! (-> a2-4 id) (-> self attack-id))
|
||||
(set! (-> a2-4 mode) v1-15)
|
||||
(set! (-> a1-10 param 1) (the-as uint a2-4))
|
||||
)
|
||||
(send-event-function (the-as process-focusable gp-0) a1-10)
|
||||
(('heat)
|
||||
(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)))
|
||||
(let ((a1-10 (new 'stack-no-clear 'event-message-block)))
|
||||
(set! (-> a1-10 from) (process->ppointer self))
|
||||
(set! (-> a1-10 num-params) 2)
|
||||
(set! (-> a1-10 message) 'attack-invinc)
|
||||
(set! (-> a1-10 param 0) (the-as uint #f))
|
||||
(let ((a2-4 (new 'static 'attack-info :mask (attack-info-mask mode id))))
|
||||
(set! (-> a2-4 id) (-> self attack-id))
|
||||
(set! (-> a2-4 mode) v1-15)
|
||||
(set! (-> a1-10 param 1) (the-as uint a2-4))
|
||||
)
|
||||
(send-event-function (the-as process-focusable gp-0) a1-10)
|
||||
)
|
||||
(send-event self 'notify 'attack)
|
||||
)
|
||||
)
|
||||
(else
|
||||
(if (and (not (logtest? (focus-status board) (-> (the-as process-focusable gp-0) focus-status)))
|
||||
(let ((a1-13 (new 'stack-no-clear 'event-message-block)))
|
||||
(set! (-> a1-13 from) (process->ppointer self))
|
||||
(set! (-> a1-13 num-params) 2)
|
||||
(set! (-> a1-13 message) 'attack)
|
||||
(set! (-> a1-13 param 0) (the-as uint #f))
|
||||
(let ((a2-6 (new 'static 'attack-info :mask (attack-info-mask mode id))))
|
||||
(set! (-> a2-6 id) (-> self attack-id))
|
||||
(set! (-> a2-6 mode) v1-15)
|
||||
(set! (-> a1-13 param 1) (the-as uint a2-6))
|
||||
)
|
||||
(send-event-function (the-as process-tree gp-0) a1-13)
|
||||
)
|
||||
(send-event self 'notify 'attack)
|
||||
)
|
||||
)
|
||||
(else
|
||||
(if (and (not (logtest? (focus-status board) (-> (the-as process-focusable gp-0) focus-status)))
|
||||
(let ((a1-13 (new 'stack-no-clear 'event-message-block)))
|
||||
(set! (-> a1-13 from) (process->ppointer self))
|
||||
(set! (-> a1-13 num-params) 2)
|
||||
(set! (-> a1-13 message) 'attack)
|
||||
(set! (-> a1-13 param 0) (the-as uint #f))
|
||||
(let ((a2-6 (new 'static 'attack-info :mask (attack-info-mask mode id))))
|
||||
(set! (-> a2-6 id) (-> self attack-id))
|
||||
(set! (-> a2-6 mode) v1-15)
|
||||
(set! (-> a1-13 param 1) (the-as uint a2-6))
|
||||
)
|
||||
(send-event-function (the-as process-tree gp-0) a1-13)
|
||||
)
|
||||
(send-event self 'notify 'attack)
|
||||
)
|
||||
)
|
||||
)
|
||||
(send-event self 'notify 'attack)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(when (and (logtest? (-> self flags) (water-flags flow))
|
||||
(logtest? (water-flags touch-water) (-> (the-as water-info s5-0) flags))
|
||||
)
|
||||
(let ((a0-40 (-> self flow)))
|
||||
(if (nonzero? a0-40)
|
||||
(push-process a0-40 (the-as process-focusable gp-0))
|
||||
)
|
||||
)
|
||||
)
|
||||
(when (and (logtest? (-> self flags) (water-flags flow))
|
||||
(logtest? (water-flags touch-water) (-> (the-as water-info s5-0) flags))
|
||||
)
|
||||
(let ((a0-40 (-> self flow)))
|
||||
(if (nonzero? a0-40)
|
||||
(push-process a0-40 (the-as process-focusable gp-0))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
((= v1-0 'visible)
|
||||
(cond
|
||||
((-> arg3 param 0)
|
||||
(set! (-> self visible) #t)
|
||||
)
|
||||
(else
|
||||
(set! (-> self visible) #f)
|
||||
(logior! (-> self draw status) (draw-control-status no-draw))
|
||||
)
|
||||
)
|
||||
(('visible)
|
||||
(cond
|
||||
((-> arg3 param 0)
|
||||
(set! (-> self visible) #t)
|
||||
)
|
||||
(else
|
||||
(set! (-> self visible) #f)
|
||||
(logior! (-> self draw status) (draw-control-status no-draw))
|
||||
)
|
||||
(logclear! (-> self mask) (process-mask sleep-code))
|
||||
#t
|
||||
)
|
||||
)
|
||||
(logclear! (-> self mask) (process-mask sleep-code))
|
||||
#t
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -701,7 +701,7 @@
|
||||
|
||||
(defmethod water-control-method-10 water-control ((obj water-control))
|
||||
(local-vars
|
||||
(sv-272 (function vector entity-actor skeleton-group vector none :behavior manipy))
|
||||
(sv-272 (function vector entity-actor skeleton-group vector object none :behavior manipy))
|
||||
(sv-288 vector)
|
||||
(sv-304 entity-actor)
|
||||
)
|
||||
@@ -818,9 +818,17 @@
|
||||
(set! sv-304 (-> obj process entity))
|
||||
(let ((t0-0 (art-group-get-by-name *level* "skel-generic-ripples" (the-as (pointer uint32) #f)))
|
||||
(t1-0 #f)
|
||||
(t2-0 0)
|
||||
)
|
||||
0
|
||||
((the-as (function object object object object object object none) s2-1) s0-0 sv-272 sv-288 sv-304 t0-0 t1-0)
|
||||
((the-as (function object object object object object object object none) s2-1)
|
||||
s0-0
|
||||
sv-272
|
||||
sv-288
|
||||
sv-304
|
||||
t0-0
|
||||
t1-0
|
||||
t2-0
|
||||
)
|
||||
)
|
||||
)
|
||||
(-> s1-0 ppointer)
|
||||
@@ -1439,26 +1447,18 @@
|
||||
)
|
||||
(when (and arg4 (>= (- (-> pp clock frame-counter) (-> obj distort-time)) (seconds 0.3)))
|
||||
(set! (-> obj distort-time) (-> pp clock frame-counter))
|
||||
(let* ((s2-0 (get-process *default-dead-pool* manipy #x4000))
|
||||
(s3-1
|
||||
(when s2-0
|
||||
(let ((t9-2 (method-of-type manipy activate)))
|
||||
(t9-2 (the-as manipy s2-0) (-> obj process) (symbol->string (-> manipy symbol)) (the-as pointer #x70004000))
|
||||
)
|
||||
(let ((s3-2 run-function-in-process)
|
||||
(s1-0 s2-0)
|
||||
(s0-0 manipy-init)
|
||||
(s5-1 (-> obj process entity))
|
||||
(t0-1 (art-group-get-by-name *level* "skel-generic-ripples" (the-as (pointer uint32) #f)))
|
||||
(t1-1 #f)
|
||||
)
|
||||
0
|
||||
((the-as (function object object object object object object none) s3-2) s1-0 s0-0 s4-1 s5-1 t0-1 t1-1)
|
||||
)
|
||||
(-> s2-0 ppointer)
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((s3-1 (process-spawn
|
||||
manipy
|
||||
:init manipy-init
|
||||
s4-1
|
||||
(-> obj process entity)
|
||||
(art-group-get-by-name *level* "skel-generic-ripples" (the-as (pointer uint32) #f))
|
||||
#f
|
||||
0
|
||||
:to (-> obj process)
|
||||
)
|
||||
)
|
||||
)
|
||||
(when s3-1
|
||||
(send-event (ppointer->process s3-1) 'anim-mode 'play1)
|
||||
(send-event (ppointer->process s3-1) 'anim "idle")
|
||||
|
||||
@@ -391,7 +391,7 @@
|
||||
(get-skeleton-origin (_type_) vector 9)
|
||||
(lod-set! (_type_ int) none 10)
|
||||
(lods-assign! (_type_ lod-set) none 11)
|
||||
(setup-masks (_type_ uint int) none 12)
|
||||
(setup-masks (_type_ int int) none 12)
|
||||
(setup-cspace-and-add (_type_ art-joint-geo symbol) none 13)
|
||||
(do-joint-math (_type_ cspace-array joint-control) none 14)
|
||||
)
|
||||
|
||||
@@ -1508,272 +1508,273 @@
|
||||
(defstate idle (editable-player)
|
||||
:virtual #t
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(local-vars (v0-0 none))
|
||||
(let ((v1-0 event-type))
|
||||
(the-as
|
||||
object
|
||||
(cond
|
||||
((= v1-0 'execute)
|
||||
(let ((a2-1 (-> event param 0)))
|
||||
(case a2-1
|
||||
((28 27 35 29 31 32)
|
||||
(editable-array-method-13
|
||||
(-> self current)
|
||||
(the-as uint 15)
|
||||
(the-as basic a2-1)
|
||||
"click on the point to insert at (up target, down camera)"
|
||||
(local-vars (v0-0 object))
|
||||
(the-as
|
||||
object
|
||||
(case event-type
|
||||
(('execute)
|
||||
(let ((a2-1 (-> event param 0)))
|
||||
(case a2-1
|
||||
((28 27 35 29 31 32)
|
||||
(the-as object (editable-array-method-13
|
||||
(-> self current)
|
||||
(the-as uint 15)
|
||||
(the-as basic a2-1)
|
||||
"click on the point to insert at (up target, down camera)"
|
||||
)
|
||||
)
|
||||
)
|
||||
((51 1 47 36 55 56)
|
||||
(if (not (-> self left-handed))
|
||||
(the-as object (editable-array-method-13
|
||||
(-> self current)
|
||||
(the-as uint 16)
|
||||
(the-as basic a2-1)
|
||||
"press x to confirm, square to cancel"
|
||||
)
|
||||
)
|
||||
(the-as object (editable-array-method-13
|
||||
(-> self current)
|
||||
(the-as uint 16)
|
||||
(the-as basic a2-1)
|
||||
"press down to confirm, left to cancel"
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
((51 1 47 36 55 56)
|
||||
(if (not (-> self left-handed))
|
||||
(editable-array-method-13
|
||||
(-> self current)
|
||||
(the-as uint 16)
|
||||
(the-as basic a2-1)
|
||||
"press x to confirm, square to cancel"
|
||||
)
|
||||
(editable-array-method-13
|
||||
(-> self current)
|
||||
(the-as uint 16)
|
||||
(the-as basic a2-1)
|
||||
"press down to confirm, left to cancel"
|
||||
)
|
||||
)
|
||||
)
|
||||
(else
|
||||
(editable-array-method-9 (-> self current) (the-as editable-command a2-1) (the-as editable-array *mouse*))
|
||||
)
|
||||
)
|
||||
(else
|
||||
(editable-array-method-9 (-> self current) (the-as editable-command a2-1) (the-as editable-array *mouse*))
|
||||
)
|
||||
)
|
||||
)
|
||||
((= v1-0 'exit)
|
||||
(deactivate self)
|
||||
)
|
||||
((= v1-0 'menu)
|
||||
(set! v0-0 (the-as none (+ (-> self clock frame-counter) (the-as time-frame (-> event param 0)))))
|
||||
(set! (-> self close-menu-time) (the-as time-frame v0-0))
|
||||
v0-0
|
||||
)
|
||||
((or (= v1-0 'on-enter) (= v1-0 'on-exit) (= v1-0 'on-inside))
|
||||
(let ((s4-0 (-> self current region)))
|
||||
(when s4-0
|
||||
(let ((gp-1 (-> event param 0)))
|
||||
(set! (-> *syntax-context* got-error?) #f)
|
||||
(eval! *syntax-context* (the-as pair gp-1))
|
||||
(when (not (-> *syntax-context* got-error?))
|
||||
(set! (-> s4-0 changed) #t)
|
||||
(cond
|
||||
((= event-type 'on-enter)
|
||||
(set! (-> s4-0 on-enter) (the-as string gp-1))
|
||||
)
|
||||
((= event-type 'on-inside)
|
||||
(set! (-> s4-0 on-inside) (the-as string gp-1))
|
||||
)
|
||||
((= event-type 'on-exit)
|
||||
(set! (-> s4-0 on-exit) (the-as string gp-1))
|
||||
)
|
||||
)
|
||||
)
|
||||
(('exit)
|
||||
(the-as object (deactivate self))
|
||||
)
|
||||
(('menu)
|
||||
(set! v0-0 (+ (-> self clock frame-counter) (the-as time-frame (-> event param 0))))
|
||||
(set! (-> self close-menu-time) (the-as time-frame v0-0))
|
||||
v0-0
|
||||
)
|
||||
(('on-enter 'on-exit 'on-inside)
|
||||
(let ((s4-0 (-> self current region)))
|
||||
(when s4-0
|
||||
(let ((gp-1 (-> event param 0)))
|
||||
(set! (-> *syntax-context* got-error?) #f)
|
||||
(eval! *syntax-context* (the-as pair gp-1))
|
||||
(when (not (-> *syntax-context* got-error?))
|
||||
(set! (-> s4-0 changed) #t)
|
||||
(cond
|
||||
((= event-type 'on-enter)
|
||||
(set! (-> s4-0 on-enter) (the-as string gp-1))
|
||||
)
|
||||
((= event-type 'on-inside)
|
||||
(set! (-> s4-0 on-inside) (the-as string gp-1))
|
||||
)
|
||||
((= event-type 'on-exit)
|
||||
(set! (-> s4-0 on-exit) (the-as string gp-1))
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! v0-0 (the-as none (editable-region-method-12 s4-0)))
|
||||
(set! (-> s4-0 filter) (the-as editable-filter v0-0))
|
||||
v0-0
|
||||
)
|
||||
(set! v0-0 (editable-region-method-12 s4-0))
|
||||
(set! (-> s4-0 filter) (the-as editable-filter v0-0))
|
||||
v0-0
|
||||
)
|
||||
)
|
||||
)
|
||||
(('select)
|
||||
(let ((gp-2 (-> event param 0)))
|
||||
(editable-array-method-9 (-> self current) (editable-command select-none) (the-as editable-array #f))
|
||||
(let* ((s5-1 (-> self current length))
|
||||
(s4-1 0)
|
||||
(a0-36 (-> self current data s4-1))
|
||||
)
|
||||
(while (< s4-1 s5-1)
|
||||
(when (and a0-36 (or (and (logtest? (-> a0-36 region filter) (-> self current filter 0))
|
||||
(logtest? (-> a0-36 region filter) (-> self current filter 1))
|
||||
)
|
||||
(logtest? (-> a0-36 flags) (editable-flag selected))
|
||||
)
|
||||
)
|
||||
(when (and (-> a0-36 region) (= gp-2 (-> a0-36 region id)))
|
||||
(set! (-> self current region) (-> a0-36 region))
|
||||
(select-editable! a0-36 #t)
|
||||
)
|
||||
)
|
||||
(+! s4-1 1)
|
||||
(set! a0-36 (-> self current data s4-1))
|
||||
)
|
||||
)
|
||||
)
|
||||
((= v1-0 'select)
|
||||
(let ((gp-2 (-> event param 0)))
|
||||
(editable-array-method-9 (-> self current) (editable-command select-none) (the-as editable-array #f))
|
||||
(let* ((s5-1 (-> self current length))
|
||||
(s4-1 0)
|
||||
(a0-36 (-> self current data s4-1))
|
||||
)
|
||||
(while (< s4-1 s5-1)
|
||||
(when (and a0-36 (or (and (logtest? (-> a0-36 region filter) (-> self current filter 0))
|
||||
(logtest? (-> a0-36 region filter) (-> self current filter 1))
|
||||
)
|
||||
(logtest? (-> a0-36 flags) (editable-flag selected))
|
||||
)
|
||||
#f
|
||||
)
|
||||
(('name)
|
||||
(let* ((s5-2 (-> self current length))
|
||||
(s4-2 0)
|
||||
(s3-0 (-> self current data s4-2))
|
||||
)
|
||||
(while (< s4-2 s5-2)
|
||||
(when (and s3-0 (logtest? (-> s3-0 flags) (editable-flag selected)))
|
||||
(let ((v1-60 (if (type? s3-0 editable)
|
||||
s3-0
|
||||
)
|
||||
)
|
||||
(when (and (-> a0-36 region) (= gp-2 (-> a0-36 region id)))
|
||||
(set! (-> self current region) (-> a0-36 region))
|
||||
(select-editable! a0-36 #t)
|
||||
)
|
||||
(when v1-60
|
||||
(set! (-> v1-60 name) (the-as string (-> event param 0)))
|
||||
(logior! (-> v1-60 flags) (editable-flag changed))
|
||||
(let ((v1-61 (-> v1-60 region)))
|
||||
(if v1-61
|
||||
(set! (-> v1-61 changed) #t)
|
||||
)
|
||||
)
|
||||
)
|
||||
(+! s4-1 1)
|
||||
(set! a0-36 (-> self current data s4-1))
|
||||
)
|
||||
)
|
||||
(+! s4-2 1)
|
||||
(set! s3-0 (-> self current data s4-2))
|
||||
)
|
||||
#f
|
||||
)
|
||||
((= v1-0 'name)
|
||||
(let* ((s5-2 (-> self current length))
|
||||
(s4-2 0)
|
||||
(s3-0 (-> self current data s4-2))
|
||||
)
|
||||
(while (< s4-2 s5-2)
|
||||
(when (and s3-0 (logtest? (-> s3-0 flags) (editable-flag selected)))
|
||||
(let ((v1-60 (if (type? s3-0 editable)
|
||||
s3-0
|
||||
)
|
||||
)
|
||||
#f
|
||||
)
|
||||
(('level)
|
||||
(let ((gp-3 (lookup-level-info (the-as symbol (-> event param 0)))))
|
||||
(when (-> gp-3 dbname)
|
||||
(let* ((s5-3 (-> self current length))
|
||||
(s4-3 0)
|
||||
(s3-1 (-> self current data s4-3))
|
||||
)
|
||||
(while (< s4-3 s5-3)
|
||||
(when (and s3-1 (logtest? (-> s3-1 flags) (editable-flag selected)))
|
||||
(let ((v1-73 (if (type? s3-1 editable)
|
||||
s3-1
|
||||
)
|
||||
)
|
||||
)
|
||||
(when (and v1-73 (-> v1-73 region))
|
||||
(set! (-> v1-73 region level) (the-as string (-> gp-3 dbname)))
|
||||
(set! (-> v1-73 region changed) #t)
|
||||
)
|
||||
(when v1-60
|
||||
(set! (-> v1-60 name) (the-as string (-> event param 0)))
|
||||
(logior! (-> v1-60 flags) (editable-flag changed))
|
||||
(let ((v1-61 (-> v1-60 region)))
|
||||
(if v1-61
|
||||
(set! (-> v1-61 changed) #t)
|
||||
)
|
||||
)
|
||||
(+! s4-3 1)
|
||||
(set! s3-1 (-> self current data s4-3))
|
||||
)
|
||||
)
|
||||
#f
|
||||
)
|
||||
)
|
||||
)
|
||||
(('get-level)
|
||||
(-> self current level)
|
||||
)
|
||||
(('direction)
|
||||
(let* ((f30-0 (the-as float (-> event param 0)))
|
||||
(f28-0 (the-as float (-> event param 1)))
|
||||
(f26-0 (the-as float (-> event param 2)))
|
||||
(f24-0 (if (and (zero? (-> event param 0)) (zero? (-> event param 1)) (zero? (-> event param 2)))
|
||||
0.0
|
||||
1.0
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(+! s4-2 1)
|
||||
(set! s3-0 (-> self current data s4-2))
|
||||
)
|
||||
)
|
||||
#f
|
||||
)
|
||||
((= v1-0 'level)
|
||||
(let ((gp-3 (lookup-level-info (the-as symbol (-> event param 0)))))
|
||||
(when (-> gp-3 dbname)
|
||||
(let* ((s5-3 (-> self current length))
|
||||
(s4-3 0)
|
||||
(s3-1 (-> self current data s4-3))
|
||||
)
|
||||
(while (< s4-3 s5-3)
|
||||
(when (and s3-1 (logtest? (-> s3-1 flags) (editable-flag selected)))
|
||||
(let ((v1-73 (if (type? s3-1 editable)
|
||||
s3-1
|
||||
)
|
||||
)
|
||||
(gp-4 (-> self current length))
|
||||
(s5-4 0)
|
||||
(s4-4 (-> self current data s5-4))
|
||||
)
|
||||
(while (< s5-4 gp-4)
|
||||
(when (and s4-4 (logtest? (-> s4-4 flags) (editable-flag selected)))
|
||||
(let ((s3-2 (if (type? s4-4 editable-light)
|
||||
(the-as editable-light s4-4)
|
||||
)
|
||||
)
|
||||
(when (and v1-73 (-> v1-73 region))
|
||||
(set! (-> v1-73 region level) (the-as string (-> gp-3 dbname)))
|
||||
(set! (-> v1-73 region changed) #t)
|
||||
)
|
||||
)
|
||||
)
|
||||
(+! s4-3 1)
|
||||
(set! s3-1 (-> self current data s4-3))
|
||||
(when s3-2
|
||||
(set-vector! (-> s3-2 direction) f30-0 f28-0 f26-0 f24-0)
|
||||
(vector-normalize! (-> s3-2 direction) 1.0)
|
||||
(logior! (-> s3-2 flags) (editable-flag changed))
|
||||
(let ((a0-73 (-> s3-2 region)))
|
||||
(if a0-73
|
||||
(set! (-> a0-73 changed) #t)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
#f
|
||||
)
|
||||
(+! s5-4 1)
|
||||
(set! s4-4 (-> self current data s5-4))
|
||||
)
|
||||
)
|
||||
((= v1-0 'get-level)
|
||||
(-> self current level)
|
||||
)
|
||||
((= v1-0 'direction)
|
||||
(let* ((f30-0 (the-as float (-> event param 0)))
|
||||
(f28-0 (the-as float (-> event param 1)))
|
||||
(f26-0 (the-as float (-> event param 2)))
|
||||
(f24-0 (if (and (zero? (-> event param 0)) (zero? (-> event param 1)) (zero? (-> event param 2)))
|
||||
0.0
|
||||
1.0
|
||||
)
|
||||
)
|
||||
(gp-4 (-> self current length))
|
||||
(s5-4 0)
|
||||
(s4-4 (-> self current data s5-4))
|
||||
)
|
||||
(while (< s5-4 gp-4)
|
||||
(when (and s4-4 (logtest? (-> s4-4 flags) (editable-flag selected)))
|
||||
(let ((s3-2 (if (type? s4-4 editable-light)
|
||||
(the-as editable-light s4-4)
|
||||
#f
|
||||
)
|
||||
(('color)
|
||||
(let* ((f30-1 (the-as float (-> event param 0)))
|
||||
(f28-1 (the-as float (-> event param 1)))
|
||||
(f26-1 (the-as float (-> event param 2)))
|
||||
(f24-1 (the-as float (-> event param 3)))
|
||||
(gp-5 (-> self current length))
|
||||
(s5-5 0)
|
||||
(s4-5 (-> self current data s5-5))
|
||||
)
|
||||
(while (< s5-5 gp-5)
|
||||
(when (and s4-5 (logtest? (-> s4-5 flags) (editable-flag selected)))
|
||||
(let ((v1-114 (if (type? s4-5 editable-light)
|
||||
(the-as editable-light s4-5)
|
||||
)
|
||||
)
|
||||
)
|
||||
(when s3-2
|
||||
(set-vector! (-> s3-2 direction) f30-0 f28-0 f26-0 f24-0)
|
||||
(vector-normalize! (-> s3-2 direction) 1.0)
|
||||
(logior! (-> s3-2 flags) (editable-flag changed))
|
||||
(let ((a0-73 (-> s3-2 region)))
|
||||
(if a0-73
|
||||
(set! (-> a0-73 changed) #t)
|
||||
)
|
||||
)
|
||||
)
|
||||
(when v1-114
|
||||
(set-vector! (-> v1-114 color) f30-1 f28-1 f26-1 f24-1)
|
||||
(logior! (-> v1-114 flags) (editable-flag changed))
|
||||
(let ((v1-115 (-> v1-114 region)))
|
||||
(if v1-115
|
||||
(set! (-> v1-115 changed) #t)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(+! s5-4 1)
|
||||
(set! s4-4 (-> self current data s5-4))
|
||||
)
|
||||
(+! s5-5 1)
|
||||
(set! s4-5 (-> self current data s5-5))
|
||||
)
|
||||
#f
|
||||
)
|
||||
((= v1-0 'color)
|
||||
(let* ((f30-1 (the-as float (-> event param 0)))
|
||||
(f28-1 (the-as float (-> event param 1)))
|
||||
(f26-1 (the-as float (-> event param 2)))
|
||||
(f24-1 (the-as float (-> event param 3)))
|
||||
(gp-5 (-> self current length))
|
||||
(s5-5 0)
|
||||
(s4-5 (-> self current data s5-5))
|
||||
)
|
||||
(while (< s5-5 gp-5)
|
||||
(when (and s4-5 (logtest? (-> s4-5 flags) (editable-flag selected)))
|
||||
(let ((v1-114 (if (type? s4-5 editable-light)
|
||||
(the-as editable-light s4-5)
|
||||
)
|
||||
)
|
||||
)
|
||||
(when v1-114
|
||||
(set-vector! (-> v1-114 color) f30-1 f28-1 f26-1 f24-1)
|
||||
(logior! (-> v1-114 flags) (editable-flag changed))
|
||||
(let ((v1-115 (-> v1-114 region)))
|
||||
(if v1-115
|
||||
(set! (-> v1-115 changed) #t)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(+! s5-5 1)
|
||||
(set! s4-5 (-> self current data s5-5))
|
||||
#f
|
||||
)
|
||||
(('param)
|
||||
(let ((s5-6 (-> event param 0))
|
||||
(f30-2 (the-as float (-> event param 1)))
|
||||
)
|
||||
)
|
||||
#f
|
||||
)
|
||||
((= v1-0 'param)
|
||||
(let ((s5-6 (-> event param 0))
|
||||
(f30-2 (the-as float (-> event param 1)))
|
||||
)
|
||||
(when (and (>= (the-as int s5-6) 0) (>= 2 (the-as int s5-6)))
|
||||
(let* ((gp-6 (-> self current length))
|
||||
(s4-6 0)
|
||||
(s3-3 (-> self current data s4-6))
|
||||
)
|
||||
(while (< s4-6 gp-6)
|
||||
(when (and s3-3 (logtest? (-> s3-3 flags) (editable-flag selected)))
|
||||
(let ((v1-129 (if (type? s3-3 editable-light)
|
||||
s3-3
|
||||
)
|
||||
)
|
||||
)
|
||||
(when v1-129
|
||||
(set! (-> (the-as editable-light (+ (* s5-6 4) (the-as uint v1-129))) decay-start) f30-2)
|
||||
(logior! (-> v1-129 flags) (editable-flag changed))
|
||||
(let ((v1-130 (-> v1-129 region)))
|
||||
(if v1-130
|
||||
(set! (-> v1-130 changed) #t)
|
||||
)
|
||||
)
|
||||
(when (and (>= (the-as int s5-6) 0) (>= 2 (the-as int s5-6)))
|
||||
(let* ((gp-6 (-> self current length))
|
||||
(s4-6 0)
|
||||
(s3-3 (-> self current data s4-6))
|
||||
)
|
||||
(while (< s4-6 gp-6)
|
||||
(when (and s3-3 (logtest? (-> s3-3 flags) (editable-flag selected)))
|
||||
(let ((v1-129 (if (type? s3-3 editable-light)
|
||||
s3-3
|
||||
)
|
||||
)
|
||||
)
|
||||
(when v1-129
|
||||
(set! (-> (the-as editable-light (+ (* s5-6 4) (the-as uint v1-129))) decay-start) f30-2)
|
||||
(logior! (-> v1-129 flags) (editable-flag changed))
|
||||
(let ((v1-130 (-> v1-129 region)))
|
||||
(if v1-130
|
||||
(set! (-> v1-130 changed) #t)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(+! s4-6 1)
|
||||
(set! s3-3 (-> self current data s4-6))
|
||||
)
|
||||
(+! s4-6 1)
|
||||
(set! s3-3 (-> self current data s4-6))
|
||||
)
|
||||
#f
|
||||
)
|
||||
#f
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -47,6 +47,16 @@
|
||||
(IMMEDIATE_STRING_MIN_MAX) ;; 80
|
||||
)
|
||||
|
||||
(defenum cam-slave-options-u32
|
||||
:type uint32
|
||||
:bitfield #t
|
||||
:copy-entries cam-slave-options)
|
||||
|
||||
(defenum cam-master-options-u32
|
||||
:type uint32
|
||||
:bitfield #t
|
||||
:copy-entries cam-master-options)
|
||||
|
||||
(declare-type setting-control basic)
|
||||
(define-extern *setting-control* setting-control)
|
||||
|
||||
|
||||
@@ -7,3 +7,5 @@
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
;; this is wrong, just a placeholder
|
||||
(define *default-shadow-settings* (new 'static 'shadow-settings))
|
||||
@@ -44,7 +44,7 @@
|
||||
:size-assert #x60
|
||||
:flag-assert #xf00000060
|
||||
(:methods
|
||||
(new (symbol type float float float float float) _type_ 0)
|
||||
(new (symbol type float float float shadow-flags float) _type_ 0)
|
||||
(clear-offset-bit (shadow-control) int 9)
|
||||
(set-offset-bit (shadow-control) int 10)
|
||||
(set-top-plane-offset (shadow-control float) int 11)
|
||||
@@ -242,9 +242,16 @@
|
||||
)
|
||||
|
||||
|
||||
(defmethod new shadow-control ((allocation symbol) (type-to-make type) (arg0 float) (arg1 float) (arg2 float) (arg3 float) (arg4 float))
|
||||
(defmethod new shadow-control ((allocation symbol)
|
||||
(type-to-make type)
|
||||
(arg0 float)
|
||||
(arg1 float)
|
||||
(arg2 float)
|
||||
(arg3 shadow-flags)
|
||||
(arg4 float)
|
||||
)
|
||||
(let ((v0-0 (object-new allocation type-to-make (the-as int (-> type-to-make size)))))
|
||||
(set! (-> v0-0 settings flags) (the-as shadow-flags arg3))
|
||||
(set! (-> v0-0 settings flags) arg3)
|
||||
(set-vector! (-> v0-0 settings shadow-dir) 0.0 -1.0 0.0 arg2)
|
||||
(set-vector! (-> v0-0 settings bot-plane) 0.0 1.0 0.0 (- arg0))
|
||||
(set-vector! (-> v0-0 settings top-plane) 0.0 1.0 0.0 (- arg1))
|
||||
|
||||
@@ -32,6 +32,7 @@
|
||||
;; ---lightning-mode
|
||||
|
||||
(declare-type lightning-spec basic)
|
||||
(declare-type lightning-tracker process)
|
||||
(define-extern *lightning-spec-id-table* (array lightning-spec))
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
@@ -150,87 +150,84 @@
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate time-of-day-tick (time-of-day-proc)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(let ((v1-0 arg2))
|
||||
(the-as
|
||||
object
|
||||
(cond
|
||||
((= v1-0 'change)
|
||||
(case (-> arg3 param 0)
|
||||
(('ratio)
|
||||
(let ((a0-5 (-> *display* bg-clock))
|
||||
(f0-0 (the-as float (-> arg3 param 1)))
|
||||
)
|
||||
(set! (-> self time-ratio) f0-0)
|
||||
(set! (-> self dest-time-ratio) f0-0)
|
||||
(update-rates! a0-5 f0-0)
|
||||
)
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(the-as
|
||||
object
|
||||
(case event-type
|
||||
(('change)
|
||||
(case (-> event param 0)
|
||||
(('ratio)
|
||||
(let ((a0-5 (-> *display* bg-clock))
|
||||
(f0-0 (the-as float (-> event param 1)))
|
||||
)
|
||||
(set! (-> self time-ratio) f0-0)
|
||||
(set! (-> self dest-time-ratio) f0-0)
|
||||
(update-rates! a0-5 f0-0)
|
||||
)
|
||||
(('hour)
|
||||
(update-counters)
|
||||
(let ((v1-7 (-> *display* bg-clock frame-counter))
|
||||
(a0-7 #x69780)
|
||||
(a1-5 (/ (the int (* 1080000.0 (the float (-> arg3 param 1)))) 60))
|
||||
)
|
||||
(set! (-> *display* bg-clock frame-counter) (+ (- v1-7 (the-as time-frame (mod v1-7 a0-7))) a0-7 a1-5))
|
||||
)
|
||||
(update-counters)
|
||||
(-> self hours)
|
||||
(kill-and-free-particles (-> self sun))
|
||||
(spawn (-> self sun) (math-camera-pos))
|
||||
(set! (-> self sun-count) 1)
|
||||
(kill-and-free-particles (-> self green-sun))
|
||||
(spawn (-> self green-sun) (math-camera-pos))
|
||||
(set! (-> self green-sun-count) 1)
|
||||
(kill-and-free-particles (-> self moon))
|
||||
(spawn (-> self moon) (math-camera-pos))
|
||||
(let ((v0-0 (the-as number 1)))
|
||||
(set! (-> self moon-count) (the-as int v0-0))
|
||||
v0-0
|
||||
)
|
||||
)
|
||||
(('hour)
|
||||
(update-counters)
|
||||
(let ((v1-7 (-> *display* bg-clock frame-counter))
|
||||
(a0-7 #x69780)
|
||||
(a1-5 (/ (the int (* 1080000.0 (the float (-> event param 1)))) 60))
|
||||
)
|
||||
(set! (-> *display* bg-clock frame-counter) (+ (- v1-7 (the-as time-frame (mod v1-7 a0-7))) a0-7 a1-5))
|
||||
)
|
||||
(update-counters)
|
||||
(-> self hours)
|
||||
(kill-and-free-particles (-> self sun))
|
||||
(spawn (-> self sun) (math-camera-pos))
|
||||
(set! (-> self sun-count) 1)
|
||||
(kill-and-free-particles (-> self green-sun))
|
||||
(spawn (-> self green-sun) (math-camera-pos))
|
||||
(set! (-> self green-sun-count) 1)
|
||||
(kill-and-free-particles (-> self moon))
|
||||
(spawn (-> self moon) (math-camera-pos))
|
||||
(let ((v0-0 (the-as number 1)))
|
||||
(set! (-> self moon-count) (the-as int v0-0))
|
||||
v0-0
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(('ratio)
|
||||
(-> self time-ratio)
|
||||
)
|
||||
(('day-length)
|
||||
(if (= (-> self time-ratio) 0.0)
|
||||
0
|
||||
(/ 25920000.0 (-> self time-ratio))
|
||||
)
|
||||
)
|
||||
((= v1-0 'ratio)
|
||||
(-> self time-ratio)
|
||||
)
|
||||
((= v1-0 'day-length)
|
||||
(if (= (-> self time-ratio) 0.0)
|
||||
0
|
||||
(/ 25920000.0 (-> self time-ratio))
|
||||
)
|
||||
(('time-frame)
|
||||
(-> self frames)
|
||||
)
|
||||
(('time-of-day)
|
||||
(-> self time-of-day)
|
||||
)
|
||||
(('time-of-day-norm)
|
||||
(* 0.041666668 (-> self time-of-day))
|
||||
)
|
||||
(('hour)
|
||||
(-> self hours)
|
||||
)
|
||||
(('minute)
|
||||
(-> self minutes)
|
||||
)
|
||||
(('second)
|
||||
(-> self seconds)
|
||||
)
|
||||
(('dest-clock-ratio-set)
|
||||
(set! (-> self dest-time-ratio) (the-as float (-> event param 0)))
|
||||
(let ((f0-12 (-> self time-ratio))
|
||||
(f1-5 (-> self dest-time-ratio))
|
||||
(f2-1 (/ 300.0 (the float (-> event param 1))))
|
||||
)
|
||||
(set! (-> self dest-time-delta) (* (fabs (- f0-12 f1-5)) f2-1 (-> *display* real-clock seconds-per-frame)))
|
||||
)
|
||||
((= v1-0 'time-frame)
|
||||
(-> self frames)
|
||||
)
|
||||
((= v1-0 'time-of-day)
|
||||
(-> self time-of-day)
|
||||
)
|
||||
((= v1-0 'time-of-day-norm)
|
||||
(* 0.041666668 (-> self time-of-day))
|
||||
)
|
||||
((= v1-0 'hour)
|
||||
(-> self hours)
|
||||
)
|
||||
((= v1-0 'minute)
|
||||
(-> self minutes)
|
||||
)
|
||||
((= v1-0 'second)
|
||||
(-> self seconds)
|
||||
)
|
||||
((= v1-0 'dest-clock-ratio-set)
|
||||
(set! (-> self dest-time-ratio) (the-as float (-> arg3 param 0)))
|
||||
(let ((f0-12 (-> self time-ratio))
|
||||
(f1-5 (-> self dest-time-ratio))
|
||||
(f2-1 (/ 300.0 (the float (-> arg3 param 1))))
|
||||
)
|
||||
(set! (-> self dest-time-delta) (* (fabs (- f0-12 f1-5)) f2-1 (-> *display* real-clock seconds-per-frame)))
|
||||
)
|
||||
(-> self dest-time-ratio)
|
||||
)
|
||||
)
|
||||
(-> self dest-time-ratio)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -133,6 +133,7 @@
|
||||
(unk-5 5)
|
||||
(unk-6 6)
|
||||
(unk-7 7)
|
||||
(unk-8 8)
|
||||
)
|
||||
;; ---sp-group-flag
|
||||
|
||||
|
||||
@@ -60,6 +60,19 @@
|
||||
(init-vf0-vector)
|
||||
(.lvf vf2 (&-> (-> arg1 bone) transform trans quad))
|
||||
(.div.vf Q vf0 vf2 :fsf #b11 :ftf #b11)
|
||||
|
||||
;; ADDED (also added in jak1)
|
||||
;; there's a bug in swamp-blimp where they vector<-cspace!
|
||||
;; on some default-initialized-to-zero bones
|
||||
;; we have to return 0s for this to avoid NaNs getting everywhere.
|
||||
(let ((temp (new-stack-vector0)))
|
||||
(.svf (&-> temp quad) vf2)
|
||||
(when (= (-> temp w) 0.0)
|
||||
(set-vector! arg0 0. 0. 0. 1.)
|
||||
(return arg0)
|
||||
)
|
||||
)
|
||||
|
||||
(.wait.vf)
|
||||
(.mul.vf vf2 vf2 Q :mask #b111)
|
||||
(.nop.vf)
|
||||
@@ -198,7 +211,7 @@
|
||||
(set! (-> obj mgeo) (-> obj lod-set lod v1-1 geo))
|
||||
(set! (-> obj cur-lod) v1-1)
|
||||
(if (nonzero? (-> obj seg-mask))
|
||||
(setup-masks obj (the-as uint 0) 0)
|
||||
(setup-masks obj 0 0)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -216,7 +229,7 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod setup-masks draw-control ((obj draw-control) (arg0 uint) (arg1 int))
|
||||
(defmethod setup-masks draw-control ((obj draw-control) (arg0 int) (arg1 int))
|
||||
(local-vars (v1-4 int) (a2-1 (array uint64)))
|
||||
(let ((a1-2 (logior (logclear (-> obj seg-mask) arg0) arg1)))
|
||||
(set! (-> obj seg-mask) a1-2)
|
||||
|
||||
@@ -76,15 +76,15 @@
|
||||
(defstate hide (process-taskable)
|
||||
:virtual #t
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(let ((v1-0 event-type))
|
||||
(the-as object (when (= v1-0 'say)
|
||||
(let ((v0-0 (-> self clock frame-counter)))
|
||||
(set! (-> self want-to-say) v0-0)
|
||||
v0-0
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(the-as object (case event-type
|
||||
(('say)
|
||||
(let ((v0-0 (-> self clock frame-counter)))
|
||||
(set! (-> self want-to-say) v0-0)
|
||||
v0-0
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
:enter (behavior ()
|
||||
(set! (-> self state-time) (-> self clock frame-counter))
|
||||
@@ -430,7 +430,7 @@
|
||||
(set! (-> obj talk-height) (res-lump-float (-> obj entity) 'height :default 8192.0))
|
||||
(set! (-> obj slave) (the-as handle #f))
|
||||
(set! (-> obj draw shadow-ctrl)
|
||||
(new 'process 'shadow-control 0.0 0.0 614400.0 0.000000000000000000000000000000000000000000084 245760.0)
|
||||
(new 'process 'shadow-control 0.0 0.0 614400.0 (shadow-flags shdf02 shdf03 shdf04 disable-draw) 245760.0)
|
||||
)
|
||||
(let ((s5-0 0))
|
||||
(let ((v1-15 (the-as joint (get-art-by-name-method (-> obj draw jgeo) "main" (the-as type #f)))))
|
||||
@@ -472,26 +472,8 @@
|
||||
(format (clear *temp-string*) "skel-~S" (-> obj draw art-group name))
|
||||
(let ((s4-3 (s4-2 s5-1 *temp-string* (the-as (pointer uint32) #f))))
|
||||
(when s4-3
|
||||
(let* ((s3-2 (get-process *default-dead-pool* manipy #x4000))
|
||||
(s5-2
|
||||
(when s3-2
|
||||
(let ((t9-12 (method-of-type manipy activate)))
|
||||
(t9-12 (the-as manipy s3-2) obj (symbol->string (-> manipy symbol)) (the-as pointer #x70004000))
|
||||
)
|
||||
(let ((t9-13 run-function-in-process)
|
||||
(a0-14 s3-2)
|
||||
(a1-10 manipy-init)
|
||||
(a2-9 (-> obj root-override trans))
|
||||
(a3-3 (-> obj entity))
|
||||
(t1-2 #f)
|
||||
)
|
||||
0
|
||||
((the-as (function object object object object object object none) t9-13) a0-14 a1-10 a2-9 a3-3 s4-3 t1-2)
|
||||
)
|
||||
(-> s3-2 ppointer)
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((s5-2 (process-spawn manipy :init manipy-init (-> obj root-override trans) (-> obj entity) s4-3 #f 0 :to obj))
|
||||
)
|
||||
(send-event (ppointer->process s5-2) 'anim-mode 'mirror)
|
||||
(send-event (ppointer->process s5-2) 'mirror #t)
|
||||
)
|
||||
@@ -503,5 +485,3 @@
|
||||
(go (method-of-object obj hide))
|
||||
(none)
|
||||
)
|
||||
|
||||
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
|
||||
|
||||
(defmethod get-trans simple-focus ((obj simple-focus) (arg0 int))
|
||||
"@returns the `trans` [[vector]] from the process's `root` (typically either a [[trsqv]] or a [[collide-shape]]"
|
||||
(-> obj root trans)
|
||||
"@returns the `trans` [[vector]] from the process's `root` (typically either a [[trsqv]] or a [[collide-shape]])"
|
||||
(-> obj root-override trans)
|
||||
)
|
||||
|
||||
(defmethod run-logic? simple-focus ((obj simple-focus))
|
||||
@@ -35,15 +35,15 @@
|
||||
(defstate idle (simple-focus)
|
||||
:virtual #t
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(let ((v1-0 event-type))
|
||||
(the-as object (when (= v1-0 'move-trans)
|
||||
(let ((v0-0 (-> self root trans)))
|
||||
(set! (-> v0-0 quad) (-> (the-as vector (-> event param 0)) quad))
|
||||
v0-0
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(the-as object (case event-type
|
||||
(('move-trans)
|
||||
(let ((v0-0 (-> self root-override trans)))
|
||||
(set! (-> v0-0 quad) (-> (the-as vector (-> event param 0)) quad))
|
||||
v0-0
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
:code (the-as (function none :behavior simple-focus) sleep-code)
|
||||
)
|
||||
@@ -52,7 +52,7 @@
|
||||
(defbehavior simple-focus-init-by-other simple-focus ()
|
||||
"Initializes the new [[simple-focus]]. `first-time?` will be set to [[#t]]"
|
||||
(let ((root (new 'process 'trsqv)))
|
||||
(set! (-> self root) root)
|
||||
(set! (-> self root-override) (the-as collide-shape root))
|
||||
(vector-identity! (-> root scale))
|
||||
(quaternion-identity! (-> root quat))
|
||||
)
|
||||
|
||||
@@ -92,27 +92,24 @@
|
||||
)
|
||||
)
|
||||
(set! sv-96 (get-process *default-dead-pool* manipy #x4000))
|
||||
(set! s4-0
|
||||
(when sv-96
|
||||
(let ((t9-7 (method-of-type manipy activate)))
|
||||
(t9-7 (the-as manipy sv-96) arg0 (-> obj name) (the-as pointer #x70004000))
|
||||
)
|
||||
(let ((t9-8 run-function-in-process)
|
||||
(a0-11 sv-96)
|
||||
(a1-9 manipy-init)
|
||||
(a2-3 (-> arg0 root trans))
|
||||
(a3-1 s1-1)
|
||||
(t0-0 s2-0)
|
||||
(t1-0 #f)
|
||||
)
|
||||
(if (and s3-0 (logtest? (game-secrets big-head little-head) (-> *game-info* secrets)))
|
||||
1
|
||||
0
|
||||
)
|
||||
((the-as (function object object object object object object none) t9-8) a0-11 a1-9 a2-3 a3-1 t0-0 t1-0)
|
||||
)
|
||||
(-> sv-96 ppointer)
|
||||
)
|
||||
(set! s4-0 (when sv-96
|
||||
(let ((t9-7 (method-of-type manipy activate)))
|
||||
(t9-7 (the-as manipy sv-96) arg0 (-> obj name) (the-as pointer #x70004000))
|
||||
)
|
||||
(run-now-in-process
|
||||
sv-96
|
||||
manipy-init
|
||||
(-> arg0 root trans)
|
||||
s1-1
|
||||
s2-0
|
||||
#f
|
||||
(if (and s3-0 (logtest? (game-secrets big-head little-head) (-> *game-info* secrets)))
|
||||
1
|
||||
0
|
||||
)
|
||||
)
|
||||
(-> sv-96 ppointer)
|
||||
)
|
||||
)
|
||||
(set! (-> arg0 level) s0-0)
|
||||
(send-event (ppointer->process s4-0) 'anim-mode 'clone-anim)
|
||||
@@ -172,23 +169,14 @@
|
||||
)
|
||||
(when (and s4-0 (logtest? (-> obj flags) 2))
|
||||
(set! sv-112 (get-process *default-dead-pool* manipy #x4000))
|
||||
(let ((s0-1
|
||||
(when sv-112
|
||||
(let ((t9-24 (method-of-type manipy activate)))
|
||||
(t9-24 (the-as manipy sv-112) (ppointer->process s4-0) (-> obj name) (the-as pointer #x70004000))
|
||||
)
|
||||
(let ((t9-25 run-function-in-process)
|
||||
(a0-51 sv-112)
|
||||
(a1-26 manipy-init)
|
||||
(a2-8 (-> arg0 root trans))
|
||||
(t1-1 #f)
|
||||
(let ((s0-1 (when sv-112
|
||||
(let ((t9-24 (method-of-type manipy activate)))
|
||||
(t9-24 (the-as manipy sv-112) (ppointer->process s4-0) (-> obj name) (the-as pointer #x70004000))
|
||||
)
|
||||
0
|
||||
((the-as (function object object object object object object none) t9-25) a0-51 a1-26 a2-8 s1-1 s2-0 t1-1)
|
||||
(run-now-in-process sv-112 manipy-init (-> arg0 root trans) s1-1 s2-0 #f 0)
|
||||
(-> sv-112 ppointer)
|
||||
)
|
||||
)
|
||||
(-> sv-112 ppointer)
|
||||
)
|
||||
)
|
||||
)
|
||||
(send-event (ppointer->process s0-1) 'mirror #t)
|
||||
(send-event (ppointer->process s0-1) 'anim-mode 'mirror)
|
||||
@@ -346,42 +334,40 @@
|
||||
;; WARN: Return type mismatch basic vs scene.
|
||||
(defun scene-lookup ((arg0 basic))
|
||||
"TODO - basic can be a string or a scene"
|
||||
(let ((v1-0 (-> arg0 type)))
|
||||
(the-as
|
||||
scene
|
||||
(cond
|
||||
((= v1-0 string)
|
||||
(let ((s5-0 (art-group-get-by-name *level* (the-as string arg0) (the-as (pointer uint32) #f))))
|
||||
(when (type? s5-0 scene)
|
||||
(let ((gp-0 (get-level-by-heap-ptr-and-status *level* (the-as pointer s5-0) 'active)))
|
||||
(when (and s5-0 gp-0)
|
||||
(let ((v1-5 (scene-decode-continue (-> s5-0 data 17))))
|
||||
(when v1-5
|
||||
(dotimes (a0-6 6)
|
||||
(if (= (-> gp-0 name) (-> v1-5 want a0-6 name))
|
||||
(goto cfg-15)
|
||||
)
|
||||
)
|
||||
(format
|
||||
0
|
||||
"WARNING: can not find scene level ~A in continue ~A, dropping scene until after load~%"
|
||||
(-> gp-0 name)
|
||||
(-> v1-5 name)
|
||||
)
|
||||
(return (the-as scene #f))
|
||||
(the-as
|
||||
scene
|
||||
(case (-> arg0 type)
|
||||
((string)
|
||||
(let ((s5-0 (art-group-get-by-name *level* (the-as string arg0) (the-as (pointer uint32) #f))))
|
||||
(when (type? s5-0 scene)
|
||||
(let ((gp-0 (get-level-by-heap-ptr-and-status *level* (the-as pointer s5-0) 'active)))
|
||||
(when (and s5-0 gp-0)
|
||||
(let ((v1-5 (scene-decode-continue (-> s5-0 data 17))))
|
||||
(when v1-5
|
||||
(dotimes (a0-6 6)
|
||||
(if (= (-> gp-0 name) (-> v1-5 want a0-6 name))
|
||||
(goto cfg-15)
|
||||
)
|
||||
)
|
||||
(format
|
||||
0
|
||||
"WARNING: can not find scene level ~A in continue ~A, dropping scene until after load~%"
|
||||
(-> gp-0 name)
|
||||
(-> v1-5 name)
|
||||
)
|
||||
(return (the-as scene #f))
|
||||
)
|
||||
)
|
||||
)
|
||||
(label cfg-15)
|
||||
s5-0
|
||||
)
|
||||
(label cfg-15)
|
||||
s5-0
|
||||
)
|
||||
)
|
||||
((= v1-0 scene)
|
||||
arg0
|
||||
)
|
||||
)
|
||||
)
|
||||
((scene)
|
||||
arg0
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -409,26 +409,18 @@
|
||||
(-> s5-0 ppointer)
|
||||
)
|
||||
)
|
||||
(let* ((s4-0 (get-process *default-dead-pool* manipy #x4000))
|
||||
(s5-1
|
||||
(when s4-0
|
||||
(let ((t9-13 (method-of-type manipy activate)))
|
||||
(t9-13 (the-as manipy s4-0) self (symbol->string (-> manipy symbol)) (the-as pointer #x70004000))
|
||||
)
|
||||
(let ((s5-2 run-function-in-process)
|
||||
(s3-0 s4-0)
|
||||
(s2-0 manipy-init)
|
||||
(s1-0 (-> self entity))
|
||||
(t0-2 (art-group-get-by-name *level* "skel-generic-blast" (the-as (pointer uint32) #f)))
|
||||
(t1-1 #f)
|
||||
)
|
||||
0
|
||||
((the-as (function object object object object object object none) s5-2) s3-0 s2-0 gp-0 s1-0 t0-2 t1-1)
|
||||
)
|
||||
(-> s4-0 ppointer)
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((s5-1 (process-spawn
|
||||
manipy
|
||||
:init manipy-init
|
||||
gp-0
|
||||
(-> self entity)
|
||||
(art-group-get-by-name *level* "skel-generic-blast" (the-as (pointer uint32) #f))
|
||||
#f
|
||||
0
|
||||
:to self
|
||||
)
|
||||
)
|
||||
)
|
||||
(when s5-1
|
||||
(quaternion-copy! (-> (the-as board (-> s5-1 0)) root quat) (-> self control quat-for-control))
|
||||
(send-event (ppointer->process s5-1) 'anim-mode 'play1)
|
||||
@@ -893,7 +885,7 @@
|
||||
)
|
||||
:enter (behavior ((arg0 meters) (arg1 meters) (arg2 symbol))
|
||||
(local-vars
|
||||
(sv-144 (function vector entity-actor skeleton-group vector none :behavior manipy))
|
||||
(sv-144 (function vector entity-actor skeleton-group vector object none :behavior manipy))
|
||||
(sv-160 entity-actor)
|
||||
)
|
||||
(if (= arg2 'hit)
|
||||
@@ -968,9 +960,17 @@
|
||||
(set! sv-160 (-> self entity))
|
||||
(let ((t0-2 (art-group-get-by-name *level* "skel-generic-blast" (the-as (pointer uint32) #f)))
|
||||
(t1-1 #f)
|
||||
(t2-1 0)
|
||||
)
|
||||
0
|
||||
((the-as (function object object object object object object none) s2-3) s0-1 sv-144 s3-2 sv-160 t0-2 t1-1)
|
||||
((the-as (function object object object object object object object none) s2-3)
|
||||
s0-1
|
||||
sv-144
|
||||
s3-2
|
||||
sv-160
|
||||
t0-2
|
||||
t1-1
|
||||
t2-1
|
||||
)
|
||||
)
|
||||
)
|
||||
(-> s1-1 ppointer)
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
(define-extern history-draw (function history-iterator none))
|
||||
(define-extern target-sidekick-setup (function symbol none :behavior target))
|
||||
(define-extern target-board-setup (function symbol none :behavior target))
|
||||
(define-extern manipy-init (function vector entity-actor skeleton-group vector none :behavior manipy))
|
||||
(define-extern target-float (state target))
|
||||
(define-extern target-timed-invulnerable-off (function target int none))
|
||||
(define-extern target-gun-joint-pre (function none :behavior target))
|
||||
@@ -1665,27 +1664,18 @@
|
||||
(set! (-> self mirror) (the-as (pointer process-drawable) #f))
|
||||
)
|
||||
(else
|
||||
(let* ((s5-0 (get-process *default-dead-pool* manipy #x4000))
|
||||
(gp-1
|
||||
(when s5-0
|
||||
(let ((t9-12 (method-of-type manipy activate)))
|
||||
(t9-12 (the-as manipy s5-0) self (symbol->string (-> manipy symbol)) (the-as pointer #x70004000))
|
||||
)
|
||||
(let ((gp-2 run-function-in-process)
|
||||
(s4-0 s5-0)
|
||||
(s3-0 manipy-init)
|
||||
(s2-0 (-> self control trans))
|
||||
(s1-0 (-> self entity))
|
||||
(t0-0 (art-group-get-by-name *level* "skel-jchar" (the-as (pointer uint32) #f)))
|
||||
(t1-0 #f)
|
||||
)
|
||||
0
|
||||
((the-as (function object object object object object object none) gp-2) s4-0 s3-0 s2-0 s1-0 t0-0 t1-0)
|
||||
)
|
||||
(-> s5-0 ppointer)
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((gp-1 (process-spawn
|
||||
manipy
|
||||
:init manipy-init
|
||||
(-> self control trans)
|
||||
(-> self entity)
|
||||
(art-group-get-by-name *level* "skel-jchar" (the-as (pointer uint32) #f))
|
||||
#f
|
||||
0
|
||||
:to self
|
||||
)
|
||||
)
|
||||
)
|
||||
(send-event (ppointer->process gp-1) 'anim-mode 'mirror)
|
||||
(send-event (ppointer->process gp-1) 'mirror #t)
|
||||
(set! (-> self mirror) (the-as (pointer process-drawable) gp-1))
|
||||
@@ -1825,11 +1815,11 @@
|
||||
(when (!= (-> self beard?) v1-248)
|
||||
(cond
|
||||
(v1-248
|
||||
(setup-masks (-> self draw) (the-as uint 2) 0)
|
||||
(setup-masks (-> self draw) 2 0)
|
||||
(set! (-> self beard?) #t)
|
||||
)
|
||||
(else
|
||||
(setup-masks (-> self draw) (the-as uint 0) 2)
|
||||
(setup-masks (-> self draw) 0 2)
|
||||
(set! (-> self beard?) #f)
|
||||
)
|
||||
)
|
||||
@@ -2252,14 +2242,14 @@
|
||||
(let ((s5-0 (new 'stack-no-clear 'vector)))
|
||||
(let ((s4-1 (vector+float*!
|
||||
(new 'stack-no-clear 'vector)
|
||||
(-> (the-as swingpole s2-0) root trans)
|
||||
(-> (the-as swingpole s2-0) root-override trans)
|
||||
gp-0
|
||||
(the-as float (-> (the-as swingpole s2-0) edge-length))
|
||||
)
|
||||
)
|
||||
(s3-1 (vector+float*!
|
||||
(new 'stack-no-clear 'vector)
|
||||
(-> (the-as swingpole s2-0) root trans)
|
||||
(-> (the-as swingpole s2-0) root-override trans)
|
||||
gp-0
|
||||
(- (-> (the-as swingpole s2-0) edge-length))
|
||||
)
|
||||
@@ -2282,7 +2272,7 @@
|
||||
(add-debug-vector
|
||||
#t
|
||||
(bucket-id debug-no-zbuf1)
|
||||
(-> (the-as swingpole s2-0) root trans)
|
||||
(-> (the-as swingpole s2-0) root-override trans)
|
||||
(-> (the-as swingpole s2-0) dir)
|
||||
(meters 3)
|
||||
(new 'static 'rgba :r #xff :b #xff :a #x80)
|
||||
|
||||
@@ -464,25 +464,22 @@
|
||||
)
|
||||
(else
|
||||
(let* ((s5-3 (get-process *default-dead-pool* manipy #x4000))
|
||||
(gp-4
|
||||
(when s5-3
|
||||
(let ((t9-22 (method-of-type manipy activate)))
|
||||
(t9-22 (the-as manipy s5-3) self (symbol->string (-> manipy symbol)) (the-as pointer #x70004000))
|
||||
)
|
||||
(let ((gp-5 run-function-in-process)
|
||||
(s4-3 s5-3)
|
||||
(s3-1 manipy-init)
|
||||
(s2-0 (-> self root trans))
|
||||
(s1-0 (-> self entity))
|
||||
(t0-4 (art-group-get-by-name *level* "skel-sidekick" (the-as (pointer uint32) #f)))
|
||||
(t1-1 #f)
|
||||
(gp-4 (when s5-3
|
||||
(let ((t9-22 (method-of-type manipy activate)))
|
||||
(t9-22 (the-as manipy s5-3) self (symbol->string (-> manipy symbol)) (the-as pointer #x70004000))
|
||||
)
|
||||
0
|
||||
((the-as (function object object object object object object none) gp-5) s4-3 s3-1 s2-0 s1-0 t0-4 t1-1)
|
||||
(run-now-in-process
|
||||
s5-3
|
||||
manipy-init
|
||||
(-> self root trans)
|
||||
(-> self entity)
|
||||
(art-group-get-by-name *level* "skel-sidekick" (the-as (pointer uint32) #f))
|
||||
#f
|
||||
0
|
||||
)
|
||||
(the-as (pointer process-drawable) (-> s5-3 ppointer))
|
||||
)
|
||||
)
|
||||
(the-as (pointer process-drawable) (-> s5-3 ppointer))
|
||||
)
|
||||
)
|
||||
)
|
||||
(send-event (ppointer->process gp-4) 'anim-mode 'mirror)
|
||||
(send-event (ppointer->process gp-4) 'mirror #t)
|
||||
|
||||
@@ -89,7 +89,7 @@
|
||||
(define-extern smack-surface? (function symbol symbol :behavior target))
|
||||
(define-extern target-height-above-ground (function float :behavior target))
|
||||
(define-extern target-align-vel-z-adjust (function float float :behavior target))
|
||||
(define-extern part-tracker-init (function sparticle-launch-group time-frame (function part-tracker none) (pointer process-drawable) process collide-prim-core none :behavior part-tracker))
|
||||
(define-extern part-tracker-init (function sparticle-launch-group time-frame (function part-tracker none) (pointer process-drawable) process matrix none :behavior part-tracker))
|
||||
(define-extern target-bonk-event-handler (function process int symbol event-message-block object :behavior target))
|
||||
(define-extern target-attack-air-anim (function none :behavior target))
|
||||
(define-extern *uppercut-mods* surface)
|
||||
|
||||
@@ -2849,21 +2849,21 @@
|
||||
:tiltvvf 15.0
|
||||
:mult-hook (lambda :behavior target
|
||||
((arg0 surface) (arg1 object) (arg2 object) (arg3 int))
|
||||
(let ((v1-0 arg3))
|
||||
(the-as symbol (when (= v1-0 1)
|
||||
(if (and (>= (-> self gun fire-pending) 2) (< (-> self gun fire-pending) 5))
|
||||
(logclear! (-> arg0 flags) (surface-flag gun-direct))
|
||||
)
|
||||
(case (-> self control ground-pat event)
|
||||
(((pat-event slide))
|
||||
(set! (-> arg0 seek0) 0.05)
|
||||
(set! (-> arg0 seek90) 0.05)
|
||||
(set! (-> arg0 seek180) 0.05)
|
||||
(the-as symbol (case arg3
|
||||
((1)
|
||||
(if (and (>= (-> self gun fire-pending) 2) (< (-> self gun fire-pending) 5))
|
||||
(logclear! (-> arg0 flags) (surface-flag gun-direct))
|
||||
)
|
||||
(case (-> self control ground-pat event)
|
||||
(((pat-event slide))
|
||||
(set! (-> arg0 seek0) 0.05)
|
||||
(set! (-> arg0 seek90) 0.05)
|
||||
(set! (-> arg0 seek180) 0.05)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
:mode 'air
|
||||
:flags (surface-flag check-edge air attack spin gun-direct laser-hide)
|
||||
|
||||
@@ -208,42 +208,51 @@
|
||||
(set! (-> self draw color-mult z) 0.8)
|
||||
(logior! (-> self draw global-effect) (draw-control-global-effect title-light))
|
||||
(logior! (-> self draw status) (draw-control-status hud))
|
||||
(setup-masks (-> self draw) (the-as uint 1) 0)
|
||||
(setup-masks (-> self draw) (the-as uint 0) 2046)
|
||||
(setup-masks (-> self draw) 1 0)
|
||||
(setup-masks (-> self draw) 0 2046)
|
||||
(cond
|
||||
((and (= *cheat-mode* #f) (= *kernel-boot-message* 'kiosk))
|
||||
(setup-masks
|
||||
(-> self draw)
|
||||
(-> *hud-ring-kiosk-graphic-remap*
|
||||
(mod
|
||||
(+ (-> self graphic-index) (-> (the-as progress (-> self parent-override 0)) graphic-index))
|
||||
(-> *hud-ring-kiosk-graphic-remap* length)
|
||||
(the-as
|
||||
int
|
||||
(-> *hud-ring-kiosk-graphic-remap*
|
||||
(mod
|
||||
(+ (-> self graphic-index) (-> (the-as progress (-> self parent-override 0)) graphic-index))
|
||||
(-> *hud-ring-kiosk-graphic-remap* length)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
0
|
||||
)
|
||||
)
|
||||
((and (= *cheat-mode* #f) (demo?))
|
||||
(setup-masks
|
||||
(-> self draw)
|
||||
(-> *hud-ring-demo-graphic-remap*
|
||||
(mod
|
||||
(+ (-> self graphic-index) (-> (the-as progress (-> self parent-override 0)) graphic-index))
|
||||
(-> *hud-ring-kiosk-graphic-remap* length)
|
||||
(the-as
|
||||
int
|
||||
(-> *hud-ring-demo-graphic-remap*
|
||||
(mod
|
||||
(+ (-> self graphic-index) (-> (the-as progress (-> self parent-override 0)) graphic-index))
|
||||
(-> *hud-ring-kiosk-graphic-remap* length)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
0
|
||||
)
|
||||
)
|
||||
(else
|
||||
(setup-masks
|
||||
(-> self draw)
|
||||
(-> *hud-ring-graphic-remap*
|
||||
(mod
|
||||
(+ (-> self graphic-index) (-> (the-as progress (-> self parent-override 0)) graphic-index))
|
||||
(-> *hud-ring-graphic-remap* length)
|
||||
(the-as
|
||||
int
|
||||
(-> *hud-ring-graphic-remap*
|
||||
(mod
|
||||
(+ (-> self graphic-index) (-> (the-as progress (-> self parent-override 0)) graphic-index))
|
||||
(-> *hud-ring-graphic-remap* length)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
0
|
||||
)
|
||||
)
|
||||
@@ -267,41 +276,50 @@
|
||||
(-> (the-as progress (-> self parent-override 0)) node-list data (-> self joint-idx))
|
||||
)
|
||||
(when (-> (the-as progress (-> self parent-override 0)) main-menu)
|
||||
(setup-masks (-> self draw) (the-as uint 0) 2046)
|
||||
(setup-masks (-> self draw) 0 2046)
|
||||
(cond
|
||||
((and (= *cheat-mode* #f) (= *kernel-boot-message* 'kiosk))
|
||||
(setup-masks
|
||||
(-> self draw)
|
||||
(-> *hud-ring-kiosk-graphic-remap*
|
||||
(mod
|
||||
(+ (-> self graphic-index) (-> (the-as progress (-> self parent-override 0)) graphic-index))
|
||||
(-> *hud-ring-kiosk-graphic-remap* length)
|
||||
(the-as
|
||||
int
|
||||
(-> *hud-ring-kiosk-graphic-remap*
|
||||
(mod
|
||||
(+ (-> self graphic-index) (-> (the-as progress (-> self parent-override 0)) graphic-index))
|
||||
(-> *hud-ring-kiosk-graphic-remap* length)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
0
|
||||
)
|
||||
)
|
||||
((and (= *cheat-mode* #f) (demo?))
|
||||
(setup-masks
|
||||
(-> self draw)
|
||||
(-> *hud-ring-demo-graphic-remap*
|
||||
(mod
|
||||
(+ (-> self graphic-index) (-> (the-as progress (-> self parent-override 0)) graphic-index))
|
||||
(-> *hud-ring-kiosk-graphic-remap* length)
|
||||
(the-as
|
||||
int
|
||||
(-> *hud-ring-demo-graphic-remap*
|
||||
(mod
|
||||
(+ (-> self graphic-index) (-> (the-as progress (-> self parent-override 0)) graphic-index))
|
||||
(-> *hud-ring-kiosk-graphic-remap* length)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
0
|
||||
)
|
||||
)
|
||||
(else
|
||||
(setup-masks
|
||||
(-> self draw)
|
||||
(-> *hud-ring-graphic-remap*
|
||||
(mod
|
||||
(+ (-> self graphic-index) (-> (the-as progress (-> self parent-override 0)) graphic-index))
|
||||
(-> *hud-ring-graphic-remap* length)
|
||||
(the-as
|
||||
int
|
||||
(-> *hud-ring-graphic-remap*
|
||||
(mod
|
||||
(+ (-> self graphic-index) (-> (the-as progress (-> self parent-override 0)) graphic-index))
|
||||
(-> *hud-ring-graphic-remap* length)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
0
|
||||
)
|
||||
)
|
||||
@@ -1441,206 +1459,206 @@
|
||||
(defstate idle (progress)
|
||||
:virtual #t
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(let ((v1-0 event-type))
|
||||
(the-as
|
||||
object
|
||||
(when (= v1-0 'notify)
|
||||
(cond
|
||||
((= (-> event param 0) 'done)
|
||||
(let ((t9-0 format)
|
||||
(a0-3 #t)
|
||||
(a1-1 "DONE NOTIFY: ~S ~S~%")
|
||||
(v1-3 (the-as mc-status-code (-> event param 1)))
|
||||
)
|
||||
(t9-0
|
||||
a0-3
|
||||
a1-1
|
||||
(cond
|
||||
((= v1-3 (mc-status-code bad-version))
|
||||
"bad-version"
|
||||
)
|
||||
((= v1-3 (mc-status-code no-save))
|
||||
"no-save"
|
||||
)
|
||||
((= v1-3 (mc-status-code no-last))
|
||||
"no-last"
|
||||
)
|
||||
((= v1-3 (mc-status-code no-space))
|
||||
"no-space"
|
||||
)
|
||||
((= v1-3 (mc-status-code internal-error))
|
||||
"internal-error"
|
||||
)
|
||||
((= v1-3 (mc-status-code no-memory))
|
||||
"no-memory"
|
||||
)
|
||||
((= v1-3 (mc-status-code bad-handle))
|
||||
"bad-handle"
|
||||
)
|
||||
((= v1-3 (mc-status-code busy))
|
||||
"busy"
|
||||
)
|
||||
((= v1-3 (mc-status-code write-error))
|
||||
"write-error"
|
||||
)
|
||||
((= v1-3 (mc-status-code read-error))
|
||||
"read-error"
|
||||
)
|
||||
((= v1-3 (mc-status-code no-card))
|
||||
"no-card"
|
||||
)
|
||||
((= v1-3 (mc-status-code no-format))
|
||||
"no-format"
|
||||
)
|
||||
((= v1-3 (mc-status-code ok))
|
||||
"ok"
|
||||
)
|
||||
((= v1-3 (mc-status-code no-process))
|
||||
"no-process"
|
||||
)
|
||||
((= v1-3 (mc-status-code no-auto-save))
|
||||
"no-auto-save"
|
||||
)
|
||||
((= v1-3 (mc-status-code no-file))
|
||||
"no-file"
|
||||
)
|
||||
((= v1-3 (mc-status-code format-failed))
|
||||
"format-failed"
|
||||
)
|
||||
((= v1-3 (mc-status-code new-game))
|
||||
"new-game"
|
||||
)
|
||||
(else
|
||||
"*unknown*"
|
||||
)
|
||||
)
|
||||
(symbol->string (-> self current))
|
||||
)
|
||||
)
|
||||
(case (-> self current)
|
||||
(('saving)
|
||||
(the-as
|
||||
object
|
||||
(case event-type
|
||||
(('notify)
|
||||
(cond
|
||||
((= (-> event param 0) 'done)
|
||||
(let ((t9-0 format)
|
||||
(a0-3 #t)
|
||||
(a1-1 "DONE NOTIFY: ~S ~S~%")
|
||||
(v1-3 (the-as mc-status-code (-> event param 1)))
|
||||
)
|
||||
(t9-0
|
||||
a0-3
|
||||
a1-1
|
||||
(cond
|
||||
((= (-> self state-stack 0) 'title)
|
||||
(let ((gp-1 (-> *setting-control* user-default auto-save)))
|
||||
(sound-volume-off)
|
||||
(let ((v0-0 (progress-intro-start (logtest? (-> *game-info* purchase-secrets) (game-secrets hero-mode)))))
|
||||
(set! (-> *setting-control* user-default auto-save) gp-1)
|
||||
v0-0
|
||||
)
|
||||
)
|
||||
((= v1-3 (mc-status-code bad-version))
|
||||
"bad-version"
|
||||
)
|
||||
((= v1-3 (mc-status-code no-save))
|
||||
"no-save"
|
||||
)
|
||||
((= v1-3 (mc-status-code no-last))
|
||||
"no-last"
|
||||
)
|
||||
((= v1-3 (mc-status-code no-space))
|
||||
"no-space"
|
||||
)
|
||||
((= v1-3 (mc-status-code internal-error))
|
||||
"internal-error"
|
||||
)
|
||||
((= v1-3 (mc-status-code no-memory))
|
||||
"no-memory"
|
||||
)
|
||||
((= v1-3 (mc-status-code bad-handle))
|
||||
"bad-handle"
|
||||
)
|
||||
((= v1-3 (mc-status-code busy))
|
||||
"busy"
|
||||
)
|
||||
((= v1-3 (mc-status-code write-error))
|
||||
"write-error"
|
||||
)
|
||||
((= v1-3 (mc-status-code read-error))
|
||||
"read-error"
|
||||
)
|
||||
((= v1-3 (mc-status-code no-card))
|
||||
"no-card"
|
||||
)
|
||||
((= v1-3 (mc-status-code no-format))
|
||||
"no-format"
|
||||
)
|
||||
((= v1-3 (mc-status-code ok))
|
||||
"ok"
|
||||
)
|
||||
((= v1-3 (mc-status-code no-process))
|
||||
"no-process"
|
||||
)
|
||||
((= v1-3 (mc-status-code no-auto-save))
|
||||
"no-auto-save"
|
||||
)
|
||||
((= v1-3 (mc-status-code no-file))
|
||||
"no-file"
|
||||
)
|
||||
((= v1-3 (mc-status-code format-failed))
|
||||
"format-failed"
|
||||
)
|
||||
((= v1-3 (mc-status-code new-game))
|
||||
"new-game"
|
||||
)
|
||||
(else
|
||||
(progress-method-30 self)
|
||||
"*unknown*"
|
||||
)
|
||||
)
|
||||
(symbol->string (-> self current))
|
||||
)
|
||||
(('formatting)
|
||||
(set-next-state self 'creating 0)
|
||||
)
|
||||
(('creating)
|
||||
(if (= (-> self state-stack 0) 'title)
|
||||
(set-next-state self 'select-save-title 0)
|
||||
(set-next-state self 'select-save 0)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
((= (-> event param 0) 'error)
|
||||
(let ((t9-7 format)
|
||||
(a0-18 #t)
|
||||
(a1-5 "ERROR NOTIFY: ~S ~S ~S~%")
|
||||
(v1-19 (the-as mc-status-code (-> event param 1)))
|
||||
)
|
||||
(t9-7
|
||||
a0-18
|
||||
a1-5
|
||||
(cond
|
||||
((= v1-19 (mc-status-code bad-version))
|
||||
"bad-version"
|
||||
)
|
||||
((= v1-19 (mc-status-code no-save))
|
||||
"no-save"
|
||||
)
|
||||
((= v1-19 (mc-status-code no-last))
|
||||
"no-last"
|
||||
)
|
||||
((= v1-19 (mc-status-code no-space))
|
||||
"no-space"
|
||||
)
|
||||
((= v1-19 (mc-status-code internal-error))
|
||||
"internal-error"
|
||||
)
|
||||
((= v1-19 (mc-status-code no-memory))
|
||||
"no-memory"
|
||||
)
|
||||
((= v1-19 (mc-status-code bad-handle))
|
||||
"bad-handle"
|
||||
)
|
||||
((= v1-19 (mc-status-code busy))
|
||||
"busy"
|
||||
)
|
||||
((= v1-19 (mc-status-code write-error))
|
||||
"write-error"
|
||||
)
|
||||
((= v1-19 (mc-status-code read-error))
|
||||
"read-error"
|
||||
)
|
||||
((= v1-19 (mc-status-code no-card))
|
||||
"no-card"
|
||||
)
|
||||
((= v1-19 (mc-status-code no-format))
|
||||
"no-format"
|
||||
)
|
||||
((= v1-19 (mc-status-code ok))
|
||||
"ok"
|
||||
)
|
||||
((= v1-19 (mc-status-code no-process))
|
||||
"no-process"
|
||||
)
|
||||
((= v1-19 (mc-status-code no-auto-save))
|
||||
"no-auto-save"
|
||||
)
|
||||
((= v1-19 (mc-status-code no-file))
|
||||
"no-file"
|
||||
)
|
||||
((= v1-19 (mc-status-code format-failed))
|
||||
"format-failed"
|
||||
)
|
||||
((= v1-19 (mc-status-code new-game))
|
||||
"new-game"
|
||||
)
|
||||
(else
|
||||
"*unknown*"
|
||||
)
|
||||
)
|
||||
(-> self current)
|
||||
(-> self next)
|
||||
)
|
||||
)
|
||||
(case (-> event param 1)
|
||||
((14)
|
||||
(set-next-state self 'insufficient-space 0)
|
||||
)
|
||||
(else
|
||||
(case (-> self current)
|
||||
(('formatting 'format-card)
|
||||
(set-next-state self 'error-formatting 0)
|
||||
)
|
||||
(('creating)
|
||||
(set-next-state self 'error-creating 0)
|
||||
)
|
||||
(('saving 'select-save 'select-save-title 'select-save-title-hero)
|
||||
(set-next-state self 'error-saving 0)
|
||||
)
|
||||
(('loading 'select-load)
|
||||
(set-next-state self 'error-loading 0)
|
||||
)
|
||||
(case (-> self current)
|
||||
(('saving)
|
||||
(cond
|
||||
((= (-> self state-stack 0) 'title)
|
||||
(let ((gp-1 (-> *setting-control* user-default auto-save)))
|
||||
(sound-volume-off)
|
||||
(let ((v0-0 (progress-intro-start (logtest? (-> *game-info* purchase-secrets) (game-secrets hero-mode)))))
|
||||
(set! (-> *setting-control* user-default auto-save) gp-1)
|
||||
v0-0
|
||||
)
|
||||
)
|
||||
)
|
||||
(else
|
||||
(progress-method-30 self)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(('formatting)
|
||||
(set-next-state self 'creating 0)
|
||||
)
|
||||
(('creating)
|
||||
(if (= (-> self state-stack 0) 'title)
|
||||
(set-next-state self 'select-save-title 0)
|
||||
(set-next-state self 'select-save 0)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
((= (-> event param 0) 'error)
|
||||
(let ((t9-7 format)
|
||||
(a0-18 #t)
|
||||
(a1-5 "ERROR NOTIFY: ~S ~S ~S~%")
|
||||
(v1-19 (the-as mc-status-code (-> event param 1)))
|
||||
)
|
||||
(t9-7
|
||||
a0-18
|
||||
a1-5
|
||||
(cond
|
||||
((= v1-19 (mc-status-code bad-version))
|
||||
"bad-version"
|
||||
)
|
||||
((= v1-19 (mc-status-code no-save))
|
||||
"no-save"
|
||||
)
|
||||
((= v1-19 (mc-status-code no-last))
|
||||
"no-last"
|
||||
)
|
||||
((= v1-19 (mc-status-code no-space))
|
||||
"no-space"
|
||||
)
|
||||
((= v1-19 (mc-status-code internal-error))
|
||||
"internal-error"
|
||||
)
|
||||
((= v1-19 (mc-status-code no-memory))
|
||||
"no-memory"
|
||||
)
|
||||
((= v1-19 (mc-status-code bad-handle))
|
||||
"bad-handle"
|
||||
)
|
||||
((= v1-19 (mc-status-code busy))
|
||||
"busy"
|
||||
)
|
||||
((= v1-19 (mc-status-code write-error))
|
||||
"write-error"
|
||||
)
|
||||
((= v1-19 (mc-status-code read-error))
|
||||
"read-error"
|
||||
)
|
||||
((= v1-19 (mc-status-code no-card))
|
||||
"no-card"
|
||||
)
|
||||
((= v1-19 (mc-status-code no-format))
|
||||
"no-format"
|
||||
)
|
||||
((= v1-19 (mc-status-code ok))
|
||||
"ok"
|
||||
)
|
||||
((= v1-19 (mc-status-code no-process))
|
||||
"no-process"
|
||||
)
|
||||
((= v1-19 (mc-status-code no-auto-save))
|
||||
"no-auto-save"
|
||||
)
|
||||
((= v1-19 (mc-status-code no-file))
|
||||
"no-file"
|
||||
)
|
||||
((= v1-19 (mc-status-code format-failed))
|
||||
"format-failed"
|
||||
)
|
||||
((= v1-19 (mc-status-code new-game))
|
||||
"new-game"
|
||||
)
|
||||
(else
|
||||
"*unknown*"
|
||||
)
|
||||
)
|
||||
(-> self current)
|
||||
(-> self next)
|
||||
)
|
||||
)
|
||||
(case (-> event param 1)
|
||||
((14)
|
||||
(set-next-state self 'insufficient-space 0)
|
||||
)
|
||||
(else
|
||||
(case (-> self current)
|
||||
(('formatting 'format-card)
|
||||
(set-next-state self 'error-formatting 0)
|
||||
)
|
||||
(('creating)
|
||||
(set-next-state self 'error-creating 0)
|
||||
)
|
||||
(('saving 'select-save 'select-save-title 'select-save-title-hero)
|
||||
(set-next-state self 'error-saving 0)
|
||||
)
|
||||
(('loading 'select-load)
|
||||
(set-next-state self 'error-loading 0)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -361,69 +361,67 @@
|
||||
:bounds (static-spherem 0 5 0 14)
|
||||
)
|
||||
|
||||
(defskelgroup skel-com-airlock-inner com-airlock-inner 0 2
|
||||
((1 (meters 999999)))
|
||||
(defskelgroup skel-com-airlock-inner com-airlock-inner com-airlock-inner-lod0-jg com-airlock-inner-idle-ja
|
||||
((com-airlock-inner-lod0-mg (meters 999999)))
|
||||
:bounds (static-spherem 0 5 0 14)
|
||||
)
|
||||
|
||||
(defstate close (com-airlock)
|
||||
:virtual #t
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(let ((v1-0 event-type))
|
||||
(the-as
|
||||
object
|
||||
(cond
|
||||
((= v1-0 'close)
|
||||
(set! (-> self latch-closed-time) (+ (-> self clock frame-counter) (if (>= arg1 1)
|
||||
(the-as int (-> event param 0))
|
||||
3000
|
||||
)
|
||||
)
|
||||
)
|
||||
(if (and (>= arg1 2) (and (= (-> event param 1) #t) (not (want-cross-airlock? self))))
|
||||
(ja :group! (get-art-by-name (-> self draw art-group) "idle" art-joint-anim) :num! min)
|
||||
)
|
||||
(and (-> self next-state) (= (-> self next-state name) 'open))
|
||||
)
|
||||
((= v1-0 'open)
|
||||
(set! (-> self latch-open-time) (+ (-> self clock frame-counter) (if (>= arg1 1)
|
||||
(the-as
|
||||
object
|
||||
(case event-type
|
||||
(('close)
|
||||
(set! (-> self latch-closed-time) (+ (-> self clock frame-counter) (if (>= arg1 1)
|
||||
(the-as int (-> event param 0))
|
||||
3000
|
||||
)
|
||||
)
|
||||
)
|
||||
(if (and (>= arg1 2) (and (= (-> event param 1) #t) (want-cross-airlock? self) (destination-loaded? self #f)))
|
||||
(ja :group! (get-art-by-name (-> self draw art-group) "idle" art-joint-anim)
|
||||
:num! (identity
|
||||
(the float (+ (-> (get-art-by-name (-> self draw art-group) "idle" art-joint-anim) frames num-frames) -1))
|
||||
)
|
||||
)
|
||||
(if (and (>= arg1 2) (and (= (-> event param 1) #t) (not (want-cross-airlock? self))))
|
||||
(ja :group! (get-art-by-name (-> self draw art-group) "idle" art-joint-anim) :num! min)
|
||||
)
|
||||
(and (-> self next-state) (= (-> self next-state name) 'open))
|
||||
)
|
||||
(('open)
|
||||
(set! (-> self latch-open-time) (+ (-> self clock frame-counter) (if (>= arg1 1)
|
||||
(the-as int (-> event param 0))
|
||||
3000
|
||||
)
|
||||
)
|
||||
)
|
||||
(if (and (>= arg1 2) (and (= (-> event param 1) #t) (want-cross-airlock? self) (destination-loaded? self #f)))
|
||||
(ja :group! (get-art-by-name (-> self draw art-group) "idle" art-joint-anim)
|
||||
:num! (identity
|
||||
(the float (+ (-> (get-art-by-name (-> self draw art-group) "idle" art-joint-anim) frames num-frames) -1))
|
||||
)
|
||||
)
|
||||
(and (-> self next-state) (= (-> self next-state name) 'close))
|
||||
)
|
||||
((= v1-0 'front)
|
||||
(let ((f30-0 (check-crossing-distance self (target-pos 0) #f))
|
||||
(f0-3 (check-crossing-distance self (camera-pos) #f))
|
||||
)
|
||||
(and (< 2048.0 f30-0) (>= (* f30-0 f0-3) 0.0))
|
||||
)
|
||||
)
|
||||
((= v1-0 'back)
|
||||
(let ((f30-1 (check-crossing-distance self (target-pos 0) #f))
|
||||
(f0-5 (check-crossing-distance self (camera-pos) #f))
|
||||
)
|
||||
(and (< f30-1 -2048.0) (>= (* f30-1 f0-5) 0.0))
|
||||
)
|
||||
)
|
||||
((= v1-0 'sound)
|
||||
(if (>= (check-crossing-distance self (target-pos 0) #f) 0.0)
|
||||
(play-city-voice-sound self (the-as symbol (-> event param 0)))
|
||||
(and (-> self next-state) (= (-> self next-state name) 'close))
|
||||
)
|
||||
(('front)
|
||||
(let ((f30-0 (check-crossing-distance self (target-pos 0) #f))
|
||||
(f0-3 (check-crossing-distance self (camera-pos) #f))
|
||||
)
|
||||
(and (< 2048.0 f30-0) (>= (* f30-0 f0-3) 0.0))
|
||||
)
|
||||
((= v1-0 'distance)
|
||||
(* (the int (check-crossing-distance self (target-pos 0) #f)) 8)
|
||||
)
|
||||
(('back)
|
||||
(let ((f30-1 (check-crossing-distance self (target-pos 0) #f))
|
||||
(f0-5 (check-crossing-distance self (camera-pos) #f))
|
||||
)
|
||||
(and (< f30-1 -2048.0) (>= (* f30-1 f0-5) 0.0))
|
||||
)
|
||||
)
|
||||
)
|
||||
(('sound)
|
||||
(if (>= (check-crossing-distance self (target-pos 0) #f) 0.0)
|
||||
(the-as object (play-city-voice-sound self (the-as symbol (-> event param 0))))
|
||||
)
|
||||
)
|
||||
(('distance)
|
||||
(* (the int (check-crossing-distance self (target-pos 0) #f)) 8)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -1015,7 +1013,10 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
(defskelgroup skel-hip-door-a hip-door-a 0 2 ((1 (meters 999999))) :bounds (static-spherem 0 2 0 5))
|
||||
(defskelgroup skel-hip-door-a hip-door-a hip-door-a-lod0-jg hip-door-a-idle-ja
|
||||
((hip-door-a-lod0-mg (meters 999999)))
|
||||
:bounds (static-spherem 0 2 0 5)
|
||||
)
|
||||
|
||||
(deftype hip-door-a (com-airlock)
|
||||
()
|
||||
@@ -1257,7 +1258,10 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
(defskelgroup skel-under-door hip-door-a 0 2 ((1 (meters 999999))) :bounds (static-spherem 0 2 0 5))
|
||||
(defskelgroup skel-under-door hip-door-a hip-door-a-lod0-jg hip-door-a-idle-ja
|
||||
((hip-door-a-lod0-mg (meters 999999)))
|
||||
:bounds (static-spherem 0 2 0 5)
|
||||
)
|
||||
|
||||
(deftype under-door (com-airlock)
|
||||
()
|
||||
|
||||
@@ -742,72 +742,70 @@
|
||||
;; WARN: rewrite_to_get_var got a none typed variable. Is there unreachable code? [OP: 122]
|
||||
;; WARN: rewrite_to_get_var got a none typed variable. Is there unreachable code? [OP: 147]
|
||||
(defbehavior battle-event-handler battle ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(let ((v1-0 arg2))
|
||||
(the-as object (cond
|
||||
((= v1-0 'query)
|
||||
(case (-> arg3 param 0)
|
||||
(('beaten)
|
||||
(and (-> self next-state) (= (-> self next-state name) 'beaten))
|
||||
)
|
||||
(('hostile)
|
||||
(and (-> self next-state) (= (-> self next-state name) 'hostile))
|
||||
)
|
||||
(('idle)
|
||||
(and (-> self next-state) (= (-> self next-state name) 'idle))
|
||||
)
|
||||
(('die-count)
|
||||
(-> self die-count)
|
||||
)
|
||||
(else
|
||||
#f
|
||||
)
|
||||
(the-as object (case arg2
|
||||
(('query)
|
||||
(case (-> arg3 param 0)
|
||||
(('beaten)
|
||||
(and (-> self next-state) (= (-> self next-state name) 'beaten))
|
||||
)
|
||||
(('hostile)
|
||||
(and (-> self next-state) (= (-> self next-state name) 'hostile))
|
||||
)
|
||||
(('idle)
|
||||
(and (-> self next-state) (= (-> self next-state name) 'idle))
|
||||
)
|
||||
(('die-count)
|
||||
(-> self die-count)
|
||||
)
|
||||
(else
|
||||
#f
|
||||
)
|
||||
)
|
||||
((= v1-0 'child-die)
|
||||
(+! (-> self die-count) 1)
|
||||
(let ((v1-14 (battle-method-30 self arg0)))
|
||||
(when v1-14
|
||||
(set! (-> v1-14 creature) (the-as handle #f))
|
||||
#f
|
||||
)
|
||||
)
|
||||
(('child-die)
|
||||
(+! (-> self die-count) 1)
|
||||
(let ((v1-14 (battle-method-30 self arg0)))
|
||||
(when v1-14
|
||||
(set! (-> v1-14 creature) (the-as handle #f))
|
||||
#f
|
||||
)
|
||||
)
|
||||
((= v1-0 'child-hit)
|
||||
(let ((a1-3 (battle-method-30 self arg0)))
|
||||
(when a1-3
|
||||
(logior! (-> a1-3 flags) 1)
|
||||
(battle-method-42 self a1-3 (the-as touch-tracker arg0))
|
||||
)
|
||||
)
|
||||
(('child-hit)
|
||||
(let ((a1-3 (battle-method-30 self arg0)))
|
||||
(when a1-3
|
||||
(logior! (-> a1-3 flags) 1)
|
||||
(battle-method-42 self a1-3 (the-as touch-tracker arg0))
|
||||
)
|
||||
)
|
||||
((= v1-0 'child-jumped)
|
||||
(let ((a1-5 (battle-method-30 self arg0)))
|
||||
(if a1-5
|
||||
(battle-method-44 self a1-5)
|
||||
)
|
||||
)
|
||||
(('child-jumped)
|
||||
(let ((a1-5 (battle-method-30 self arg0)))
|
||||
(if a1-5
|
||||
(battle-method-44 self a1-5)
|
||||
)
|
||||
)
|
||||
)
|
||||
(('trigger)
|
||||
(if (and (-> self next-state) (= (-> self next-state name) 'idle))
|
||||
(go-virtual notice)
|
||||
)
|
||||
)
|
||||
((= v1-0 'trigger)
|
||||
(if (and (-> self next-state) (= (-> self next-state name) 'idle))
|
||||
(go-virtual notice)
|
||||
)
|
||||
)
|
||||
((= v1-0 'beaten)
|
||||
(set! (-> self flags) (the-as uint (logior (the-as int (-> self flags)) 4)))
|
||||
(if (and (-> self next-state) (= (-> self next-state name) 'idle))
|
||||
(go-virtual beaten)
|
||||
)
|
||||
)
|
||||
((= v1-0 'resume)
|
||||
(set! (-> self flags) (the-as uint (logand -5 (-> self flags))))
|
||||
(process-entity-status! self (entity-perm-status subtask-complete) #f)
|
||||
(if (and (-> self next-state) (= (-> self next-state name) 'beaten))
|
||||
(go-virtual hostile)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(('beaten)
|
||||
(set! (-> self flags) (the-as uint (logior (the-as int (-> self flags)) 4)))
|
||||
(if (and (-> self next-state) (= (-> self next-state name) 'idle))
|
||||
(go-virtual beaten)
|
||||
)
|
||||
)
|
||||
(('resume)
|
||||
(set! (-> self flags) (the-as uint (logand -5 (-> self flags))))
|
||||
(process-entity-status! self (entity-perm-status subtask-complete) #f)
|
||||
(if (and (-> self next-state) (= (-> self next-state name) 'beaten))
|
||||
(go-virtual hostile)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod battle-method-27 battle ((obj battle))
|
||||
|
||||
@@ -131,18 +131,18 @@
|
||||
|
||||
(defmethod idle-state-transition cty-guard-turret-button ((obj cty-guard-turret-button))
|
||||
"If `button-status` has [[button-status:0]] set, transition to [[basebutton::27]] otherwise, [[basebutton::30]]"
|
||||
(setup-masks (-> obj draw) (the-as uint 0) -1)
|
||||
(setup-masks (-> obj draw) 0 -1)
|
||||
(cond
|
||||
((logtest? (-> obj button-status) (button-status pressed))
|
||||
(format #t "off~%")
|
||||
(setup-masks (-> obj draw) (the-as uint 4) 0)
|
||||
(setup-masks (-> obj draw) (the-as uint 1) 0)
|
||||
(setup-masks (-> obj draw) 4 0)
|
||||
(setup-masks (-> obj draw) 1 0)
|
||||
(go (method-of-object obj down-idle))
|
||||
)
|
||||
(else
|
||||
(format #t "on~%")
|
||||
(setup-masks (-> obj draw) (the-as uint 4) 0)
|
||||
(setup-masks (-> obj draw) (the-as uint 2) 0)
|
||||
(setup-masks (-> obj draw) 4 0)
|
||||
(setup-masks (-> obj draw) 2 0)
|
||||
(go (method-of-object obj pop-up))
|
||||
)
|
||||
)
|
||||
@@ -153,9 +153,9 @@
|
||||
:enter (behavior ()
|
||||
(sound-play "gturret-button")
|
||||
(format #t "going-down off~%")
|
||||
(setup-masks (-> self draw) (the-as uint 0) -1)
|
||||
(setup-masks (-> self draw) (the-as uint 4) 0)
|
||||
(setup-masks (-> self draw) (the-as uint 1) 0)
|
||||
(setup-masks (-> self draw) 0 -1)
|
||||
(setup-masks (-> self draw) 4 0)
|
||||
(setup-masks (-> self draw) 1 0)
|
||||
(press! self #t)
|
||||
(none)
|
||||
)
|
||||
|
||||
@@ -344,7 +344,9 @@
|
||||
)
|
||||
:trans (behavior ()
|
||||
(local-vars
|
||||
(sv-176 (function lightning-spec time-frame symbol process-drawable vector vector none))
|
||||
(sv-176
|
||||
(function lightning-spec time-frame symbol process-drawable vector vector none :behavior lightning-tracker)
|
||||
)
|
||||
(sv-192 lightning-spec)
|
||||
(sv-208 int)
|
||||
(sv-224 symbol)
|
||||
|
||||
@@ -33,92 +33,91 @@
|
||||
(defstate idle (bouncer)
|
||||
:virtual #t
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(let ((evt-type event-type))
|
||||
(the-as
|
||||
object
|
||||
(cond
|
||||
((= evt-type 'bonk)
|
||||
(when ((method-of-type touching-shapes-entry prims-touching?)
|
||||
(the-as touching-shapes-entry (-> event param 0))
|
||||
(the-as collide-shape (-> self root))
|
||||
(the-as uint 1)
|
||||
)
|
||||
(when (send-event proc 'jump (-> self spring-height) (-> self spring-height) (-> self mods))
|
||||
(sound-play "trampoline")
|
||||
(go-virtual fire)
|
||||
)
|
||||
(the-as
|
||||
object
|
||||
(case event-type
|
||||
(('bonk)
|
||||
(when ((method-of-type touching-shapes-entry prims-touching?)
|
||||
(the-as touching-shapes-entry (-> event param 0))
|
||||
(the-as collide-shape (-> self root))
|
||||
(the-as uint 1)
|
||||
)
|
||||
(when (send-event proc 'jump (-> self spring-height) (-> self spring-height) (-> self mods))
|
||||
(sound-play "trampoline")
|
||||
(go-virtual fire)
|
||||
)
|
||||
)
|
||||
((= evt-type 'touch)
|
||||
(let ((gp-2 (-> event param 0)))
|
||||
(cond
|
||||
(((method-of-type touching-shapes-entry prims-touching-action?)
|
||||
(the-as touching-shapes-entry gp-2)
|
||||
(the-as collide-shape (-> self root))
|
||||
(collide-action solid)
|
||||
(collide-action)
|
||||
)
|
||||
(when ((method-of-type touching-shapes-entry prims-touching?)
|
||||
(the-as touching-shapes-entry gp-2)
|
||||
(the-as collide-shape (-> self root))
|
||||
(the-as uint 1)
|
||||
)
|
||||
(if (not (and (-> self next-state) (let ((v1-21 (-> self next-state name)))
|
||||
(or (= v1-21 'smush) (= v1-21 'fire))
|
||||
)
|
||||
)
|
||||
)
|
||||
(go-virtual smush)
|
||||
)
|
||||
)
|
||||
)
|
||||
(((method-of-type touching-shapes-entry prims-touching?)
|
||||
(the-as touching-shapes-entry gp-2)
|
||||
(the-as collide-shape (-> self root))
|
||||
(the-as uint 4)
|
||||
)
|
||||
(persist-with-delay
|
||||
*setting-control*
|
||||
(the-as symbol (process->ppointer self))
|
||||
(seconds 0.05)
|
||||
'double-jump
|
||||
#f
|
||||
0.0
|
||||
0
|
||||
)
|
||||
)
|
||||
)
|
||||
(('touch)
|
||||
(let ((gp-2 (-> event param 0)))
|
||||
(cond
|
||||
(((method-of-type touching-shapes-entry prims-touching-action?)
|
||||
(the-as touching-shapes-entry gp-2)
|
||||
(the-as collide-shape (-> self root))
|
||||
(collide-action solid)
|
||||
(collide-action)
|
||||
)
|
||||
)
|
||||
)
|
||||
((= evt-type 'attack)
|
||||
(let ((v1-28 (the-as object (-> event param 1)))
|
||||
(a0-17 (-> event param 0))
|
||||
(a2-7 0)
|
||||
)
|
||||
(cond
|
||||
((= (-> (the-as attack-info v1-28) mode) 'flop)
|
||||
(set! a2-7 1)
|
||||
)
|
||||
((= (-> (the-as attack-info v1-28) mode) 'board)
|
||||
(set! a2-7 9)
|
||||
)
|
||||
)
|
||||
(when (and (nonzero? a2-7)
|
||||
(and ((method-of-type touching-shapes-entry prims-touching?)
|
||||
(the-as touching-shapes-entry a0-17)
|
||||
(the-as collide-shape (-> self root))
|
||||
(the-as uint a2-7)
|
||||
(when ((method-of-type touching-shapes-entry prims-touching?)
|
||||
(the-as touching-shapes-entry gp-2)
|
||||
(the-as collide-shape (-> self root))
|
||||
(the-as uint 1)
|
||||
)
|
||||
(if (not (and (-> self next-state) (let ((v1-21 (-> self next-state name)))
|
||||
(or (= v1-21 'smush) (= v1-21 'fire))
|
||||
)
|
||||
)
|
||||
(send-event proc 'jump (-> self spring-height) (-> self spring-height) (-> self mods))
|
||||
)
|
||||
)
|
||||
(sound-play "trampoline")
|
||||
(go-virtual fire)
|
||||
#f
|
||||
)
|
||||
(go-virtual smush)
|
||||
)
|
||||
)
|
||||
)
|
||||
(((method-of-type touching-shapes-entry prims-touching?)
|
||||
(the-as touching-shapes-entry gp-2)
|
||||
(the-as collide-shape (-> self root))
|
||||
(the-as uint 4)
|
||||
)
|
||||
(the-as object (persist-with-delay
|
||||
*setting-control*
|
||||
(the-as symbol (process->ppointer self))
|
||||
(seconds 0.05)
|
||||
'double-jump
|
||||
#f
|
||||
0.0
|
||||
0
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(('attack)
|
||||
(let ((v1-28 (the-as object (-> event param 1)))
|
||||
(a0-17 (-> event param 0))
|
||||
(a2-7 0)
|
||||
)
|
||||
(cond
|
||||
((= (-> (the-as attack-info v1-28) mode) 'flop)
|
||||
(set! a2-7 1)
|
||||
)
|
||||
((= (-> (the-as attack-info v1-28) mode) 'board)
|
||||
(set! a2-7 9)
|
||||
)
|
||||
)
|
||||
(when (and (nonzero? a2-7)
|
||||
(and ((method-of-type touching-shapes-entry prims-touching?)
|
||||
(the-as touching-shapes-entry a0-17)
|
||||
(the-as collide-shape (-> self root))
|
||||
(the-as uint a2-7)
|
||||
)
|
||||
(send-event proc 'jump (-> self spring-height) (-> self spring-height) (-> self mods))
|
||||
)
|
||||
)
|
||||
(sound-play "trampoline")
|
||||
(go-virtual fire)
|
||||
#f
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -256,21 +256,19 @@
|
||||
(defstate active (guard-conversation)
|
||||
:virtual #t
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(let ((v1-0 event-type))
|
||||
(the-as object (cond
|
||||
((= v1-0 'trigger)
|
||||
(let ((v0-0 #t))
|
||||
(set! (-> self triggered?) v0-0)
|
||||
v0-0
|
||||
)
|
||||
(the-as object (case event-type
|
||||
(('trigger)
|
||||
(let ((v0-0 #t))
|
||||
(set! (-> self triggered?) v0-0)
|
||||
v0-0
|
||||
)
|
||||
((= v1-0 'untrigger)
|
||||
(set! (-> self triggered?) #f)
|
||||
#f
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(('untrigger)
|
||||
(set! (-> self triggered?) #f)
|
||||
#f
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
:trans (behavior ()
|
||||
(let ((gp-0 #t))
|
||||
|
||||
@@ -547,8 +547,8 @@
|
||||
(set! (-> v1-5 notify-radius) 122880.0)
|
||||
(set! (-> v1-5 danger-level) 1.0)
|
||||
(set! (-> v1-5 decay-rate) 0.0)
|
||||
(set! (-> v1-5 flags) (the-as uint 1))
|
||||
(set! (-> v1-5 danger-type) (the-as uint 0))
|
||||
(set! (-> v1-5 flags) (traffic-danger-flags tdf0))
|
||||
(set! (-> v1-5 danger-type) (traffic-danger-type tdt0))
|
||||
(set! (-> v1-5 handle) (the-as uint #f))
|
||||
(send-event *traffic-manager* 'add-danger-sphere v1-5)
|
||||
)
|
||||
@@ -680,8 +680,8 @@
|
||||
)
|
||||
|
||||
|
||||
(defskelgroup skel-vehicle-grenade eco-canister 0 2
|
||||
((1 (meters 999999)))
|
||||
(defskelgroup skel-vehicle-grenade eco-canister eco-canister-dark-lod0-jg eco-canister-dark-idle-ja
|
||||
((eco-canister-dark-lod0-mg (meters 999999)))
|
||||
:bounds (static-spherem 0 0 0 0.3)
|
||||
:texture-level 6
|
||||
)
|
||||
@@ -792,25 +792,25 @@
|
||||
(defstate impact (vehicle-grenade)
|
||||
:virtual #t
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(let ((v1-0 event-type))
|
||||
(the-as object (when (= v1-0 'touched)
|
||||
(let ((a1-2 (new 'stack-no-clear 'event-message-block)))
|
||||
(set! (-> a1-2 from) (process->ppointer self))
|
||||
(set! (-> a1-2 num-params) 2)
|
||||
(set! (-> a1-2 message) 'attack)
|
||||
(set! (-> a1-2 param 0) (-> event param 0))
|
||||
(let ((v1-5 (new 'static 'attack-info :mask (attack-info-mask mode id))))
|
||||
(set! (-> v1-5 id) (-> self attack-id))
|
||||
(set! (-> v1-5 mode) 'explode)
|
||||
(set! (-> a1-2 param 1) (the-as uint v1-5))
|
||||
)
|
||||
(if (send-event-function proc a1-2)
|
||||
#t
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(the-as object (case event-type
|
||||
(('touched)
|
||||
(let ((a1-2 (new 'stack-no-clear 'event-message-block)))
|
||||
(set! (-> a1-2 from) (process->ppointer self))
|
||||
(set! (-> a1-2 num-params) 2)
|
||||
(set! (-> a1-2 message) 'attack)
|
||||
(set! (-> a1-2 param 0) (-> event param 0))
|
||||
(let ((v1-5 (new 'static 'attack-info :mask (attack-info-mask mode id))))
|
||||
(set! (-> v1-5 id) (-> self attack-id))
|
||||
(set! (-> v1-5 mode) 'explode)
|
||||
(set! (-> a1-2 param 1) (the-as uint v1-5))
|
||||
)
|
||||
(if (send-event-function proc a1-2)
|
||||
#t
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
:code (behavior ()
|
||||
(let ((gp-0 (new 'stack-no-clear 'explosion-init-params)))
|
||||
|
||||
@@ -10,14 +10,14 @@
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(defskelgroup skel-scenecamera scenecamera 0 -1
|
||||
((1 (meters 999999)))
|
||||
(defskelgroup skel-scenecamera scenecamera scenecamera-lod0-jg -1
|
||||
((scenecamera-lod0-mg (meters 999999)))
|
||||
:bounds (static-spherem 0 0 0 4)
|
||||
:texture-level 6
|
||||
)
|
||||
|
||||
(defskelgroup skel-particleman particleman 0 -1
|
||||
((1 (meters 999999)))
|
||||
(defskelgroup skel-particleman particleman particleman-lod0-jg -1
|
||||
((particleman-lod0-mg (meters 999999)))
|
||||
:bounds (static-spherem 0 0 0 10)
|
||||
:origin-joint-index 3
|
||||
)
|
||||
@@ -31,8 +31,8 @@
|
||||
:shadow-joint-index 3
|
||||
)
|
||||
|
||||
(defskelgroup skel-darkjak-highres darkjak-highres 0 -1
|
||||
((1 (meters 999999)))
|
||||
(defskelgroup skel-darkjak-highres darkjak-highres darkjak-highres-lod0-jg -1
|
||||
((darkjak-highres-lod0-mg (meters 999999)))
|
||||
:bounds (static-spherem 0 0 0 3.2)
|
||||
:longest-edge (meters 1)
|
||||
:sort 1
|
||||
@@ -57,10 +57,10 @@
|
||||
:origin-joint-index 3
|
||||
)
|
||||
|
||||
(defskelgroup skel-samos-highres samos-highres 0 3
|
||||
((1 (meters 999999)))
|
||||
(defskelgroup skel-samos-highres samos-highres samos-highres-lod0-jg samos-highres-idle-ja
|
||||
((samos-highres-lod0-mg (meters 999999)))
|
||||
:bounds (static-spherem 0 0 0 3.2)
|
||||
:shadow 2
|
||||
:shadow samos-highres-shadow-mg
|
||||
:origin-joint-index 3
|
||||
)
|
||||
|
||||
@@ -127,10 +127,10 @@
|
||||
:origin-joint-index 3
|
||||
)
|
||||
|
||||
(defskelgroup skel-onin-highres onin-highres 0 3
|
||||
((1 (meters 200)))
|
||||
(defskelgroup skel-onin-highres onin-highres onin-highres-lod0-jg onin-highres-idle-ja
|
||||
((onin-highres-lod0-mg (meters 200)))
|
||||
:bounds (static-spherem 0 0 0 5)
|
||||
:shadow 2
|
||||
:shadow onin-highres-shadow-mg
|
||||
:origin-joint-index 3
|
||||
)
|
||||
|
||||
@@ -170,10 +170,10 @@
|
||||
:origin-joint-index 3
|
||||
)
|
||||
|
||||
(defskelgroup skel-crimson-guard-hover crimson-guard-hover 0 -1
|
||||
((1 (meters 20)) (2 (meters 999999)))
|
||||
(defskelgroup skel-crimson-guard-hover crimson-guard-hover crimson-guard-hover-lod0-jg -1
|
||||
((crimson-guard-hover-lod0-mg (meters 20)) (crimson-guard-hover-lod1-mg (meters 999999)))
|
||||
:bounds (static-spherem 0 0 0 7.5)
|
||||
:shadow 3
|
||||
:shadow crimson-guard-hover-shadow-mg
|
||||
:origin-joint-index 3
|
||||
)
|
||||
|
||||
@@ -234,17 +234,17 @@
|
||||
:origin-joint-index 3
|
||||
)
|
||||
|
||||
(defskelgroup skel-tess-highres tess-highres 0 3
|
||||
((1 (meters 999999)))
|
||||
(defskelgroup skel-tess-highres tess-highres tess-highres-lod0-jg tess-highres-idle-ja
|
||||
((tess-highres-lod0-mg (meters 999999)))
|
||||
:bounds (static-spherem 0 0 0 3)
|
||||
:shadow 2
|
||||
:shadow tess-highres-shadow-mg
|
||||
:origin-joint-index 3
|
||||
)
|
||||
|
||||
(defskelgroup skel-keira-highres keira-highres 0 3
|
||||
((1 (meters 200)))
|
||||
(defskelgroup skel-keira-highres keira-highres keira-highres-lod0-jg keira-highres-idle-ja
|
||||
((keira-highres-lod0-mg (meters 200)))
|
||||
:bounds (static-spherem 0 0 0 5)
|
||||
:shadow 2
|
||||
:shadow keira-highres-shadow-mg
|
||||
:origin-joint-index 3
|
||||
:shadow-joint-index 3
|
||||
)
|
||||
@@ -348,75 +348,48 @@
|
||||
(the-as pair 0)
|
||||
)
|
||||
(set! (-> obj draw light-index) (the-as uint 10))
|
||||
(let* ((s5-2 (get-process *default-dead-pool* manipy #x4000))
|
||||
(s4-1
|
||||
(when s5-2
|
||||
(let ((t9-5 (method-of-type manipy activate)))
|
||||
(t9-5 (the-as manipy s5-2) obj (symbol->string (-> manipy symbol)) (the-as pointer #x70004000))
|
||||
)
|
||||
(let ((s4-2 run-function-in-process)
|
||||
(s3-0 s5-2)
|
||||
(s2-0 manipy-init)
|
||||
(s1-0 (-> obj root trans))
|
||||
(s0-0 (-> obj entity))
|
||||
(t0-0 (art-group-get-by-name *level* "skel-metalkor-highres-lowtorso" (the-as (pointer uint32) #f)))
|
||||
(t1-0 #f)
|
||||
)
|
||||
0
|
||||
((the-as (function object object object object object object none) s4-2) s3-0 s2-0 s1-0 s0-0 t0-0 t1-0)
|
||||
)
|
||||
(-> s5-2 ppointer)
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((s4-1 (process-spawn
|
||||
manipy
|
||||
:init manipy-init
|
||||
(-> obj root trans)
|
||||
(-> obj entity)
|
||||
(art-group-get-by-name *level* "skel-metalkor-highres-lowtorso" (the-as (pointer uint32) #f))
|
||||
#f
|
||||
0
|
||||
:to obj
|
||||
)
|
||||
)
|
||||
)
|
||||
(send-event (ppointer->process s4-1) 'anim-mode 'clone-anim)
|
||||
(send-event (ppointer->process s4-1) 'prefix "lowtorso-")
|
||||
)
|
||||
(let* ((s5-3 (get-process *default-dead-pool* manipy #x4000))
|
||||
(s4-3
|
||||
(when s5-3
|
||||
(let ((t9-11 (method-of-type manipy activate)))
|
||||
(t9-11 (the-as manipy s5-3) obj (symbol->string (-> manipy symbol)) (the-as pointer #x70004000))
|
||||
)
|
||||
(let ((s4-4 run-function-in-process)
|
||||
(s3-1 s5-3)
|
||||
(s2-1 manipy-init)
|
||||
(s1-1 (-> obj root trans))
|
||||
(s0-1 (-> obj entity))
|
||||
(t0-1 (art-group-get-by-name *level* "skel-metalkor-highres-legs" (the-as (pointer uint32) #f)))
|
||||
(t1-1 #f)
|
||||
)
|
||||
0
|
||||
((the-as (function object object object object object object none) s4-4) s3-1 s2-1 s1-1 s0-1 t0-1 t1-1)
|
||||
)
|
||||
(-> s5-3 ppointer)
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((s4-3 (process-spawn
|
||||
manipy
|
||||
:init manipy-init
|
||||
(-> obj root trans)
|
||||
(-> obj entity)
|
||||
(art-group-get-by-name *level* "skel-metalkor-highres-legs" (the-as (pointer uint32) #f))
|
||||
#f
|
||||
0
|
||||
:to obj
|
||||
)
|
||||
)
|
||||
)
|
||||
(send-event (ppointer->process s4-3) 'anim-mode 'clone-anim)
|
||||
(send-event (ppointer->process s4-3) 'prefix "legs-")
|
||||
)
|
||||
(let* ((s5-4 (get-process *default-dead-pool* manipy #x4000))
|
||||
(s4-5
|
||||
(when s5-4
|
||||
(let ((t9-17 (method-of-type manipy activate)))
|
||||
(t9-17 (the-as manipy s5-4) obj (symbol->string (-> manipy symbol)) (the-as pointer #x70004000))
|
||||
)
|
||||
(let ((s4-6 run-function-in-process)
|
||||
(s3-2 s5-4)
|
||||
(s2-2 manipy-init)
|
||||
(s1-2 (-> obj root trans))
|
||||
(s0-2 (-> obj entity))
|
||||
(t0-2 (art-group-get-by-name *level* "skel-metalkor-highres-wings" (the-as (pointer uint32) #f)))
|
||||
(t1-2 #f)
|
||||
)
|
||||
0
|
||||
((the-as (function object object object object object object none) s4-6) s3-2 s2-2 s1-2 s0-2 t0-2 t1-2)
|
||||
)
|
||||
(-> s5-4 ppointer)
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((s4-5 (process-spawn
|
||||
manipy
|
||||
:init manipy-init
|
||||
(-> obj root trans)
|
||||
(-> obj entity)
|
||||
(art-group-get-by-name *level* "skel-metalkor-highres-wings" (the-as (pointer uint32) #f))
|
||||
#f
|
||||
0
|
||||
:to obj
|
||||
)
|
||||
)
|
||||
)
|
||||
(send-event (ppointer->process s4-5) 'anim-mode 'clone-anim)
|
||||
(send-event (ppointer->process s4-5) 'prefix "wings-")
|
||||
)
|
||||
@@ -1005,8 +978,8 @@
|
||||
(-> obj draw art-group data 3)
|
||||
)
|
||||
|
||||
(defskelgroup skel-prsn-torture prsn-torture 0 2
|
||||
((1 (meters 999999)))
|
||||
(defskelgroup skel-prsn-torture prsn-torture prsn-torture-lod0-jg prsn-torture-idle-ja
|
||||
((prsn-torture-lod0-mg (meters 999999)))
|
||||
:bounds (static-spherem 0 0 0 20)
|
||||
:origin-joint-index 3
|
||||
)
|
||||
@@ -1041,14 +1014,14 @@
|
||||
:origin-joint-index 3
|
||||
)
|
||||
|
||||
(defskelgroup skel-talk-box talk-box 0 2
|
||||
((1 (meters 999999)))
|
||||
(defskelgroup skel-talk-box talk-box talk-box-lod0-jg talk-box-idle-ja
|
||||
((talk-box-lod0-mg (meters 999999)))
|
||||
:bounds (static-spherem 0 0 0 2)
|
||||
:origin-joint-index 3
|
||||
)
|
||||
|
||||
(defskelgroup skel-rift-ring rift-ring 0 -1
|
||||
((1 (meters 999999)))
|
||||
(defskelgroup skel-rift-ring rift-ring rift-ring-lod0-jg -1
|
||||
((rift-ring-lod0-mg (meters 999999)))
|
||||
:bounds (static-spherem 0 0 0 60)
|
||||
:origin-joint-index 6
|
||||
)
|
||||
|
||||
+31
-35
@@ -363,15 +363,15 @@
|
||||
(apply-settings *setting-control*)
|
||||
(set! (-> self event-hook) (lambda :behavior level-hint
|
||||
((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(let ((v1-0 arg2))
|
||||
(the-as object (when (or (= v1-0 'die) (= v1-0 'exit))
|
||||
(if (= (ppointer->process *hint-semaphore*) self)
|
||||
(set! *hint-semaphore* (the-as (pointer level-hint) #f))
|
||||
)
|
||||
(deactivate self)
|
||||
)
|
||||
)
|
||||
)
|
||||
(the-as object (case arg2
|
||||
(('die 'exit)
|
||||
(if (= (ppointer->process *hint-semaphore*) self)
|
||||
(set! *hint-semaphore* (the-as (pointer level-hint) #f))
|
||||
)
|
||||
(deactivate self)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(go level-hint-ambient-sound arg0)
|
||||
@@ -409,17 +409,15 @@
|
||||
;; failed to figure out what this is:
|
||||
(defstate level-hint-normal (level-hint)
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(let ((v1-0 event-type))
|
||||
(the-as object (cond
|
||||
((= v1-0 'exit)
|
||||
(go level-hint-exit)
|
||||
)
|
||||
((= v1-0 'die)
|
||||
(deactivate self)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(the-as object (case event-type
|
||||
(('exit)
|
||||
(go level-hint-exit)
|
||||
)
|
||||
(('die)
|
||||
(deactivate self)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
:exit (behavior ()
|
||||
(if (= (ppointer->process *hint-semaphore*) self)
|
||||
@@ -469,22 +467,20 @@
|
||||
;; failed to figure out what this is:
|
||||
(defstate level-hint-sidekick (level-hint)
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(let ((v1-0 event-type))
|
||||
(the-as object (cond
|
||||
((= v1-0 'exit)
|
||||
(when (nonzero? (-> self sound-id))
|
||||
(sound-stop (-> self sound-id))
|
||||
(set! (-> self sound-id) (new 'static 'sound-id))
|
||||
0
|
||||
)
|
||||
(go level-hint-exit)
|
||||
(the-as object (case event-type
|
||||
(('exit)
|
||||
(when (nonzero? (-> self sound-id))
|
||||
(sound-stop (-> self sound-id))
|
||||
(set! (-> self sound-id) (new 'static 'sound-id))
|
||||
0
|
||||
)
|
||||
((= v1-0 'die)
|
||||
(deactivate self)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(go level-hint-exit)
|
||||
)
|
||||
(('die)
|
||||
(deactivate self)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
:exit (behavior ()
|
||||
(if (nonzero? (-> self sound-id))
|
||||
|
||||
+137
-139
@@ -4,159 +4,157 @@
|
||||
;; failed to figure out what this is:
|
||||
(defstate cam-combiner-active (camera-combiner)
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(let ((v1-0 event-type))
|
||||
(the-as
|
||||
object
|
||||
(cond
|
||||
((= v1-0 'point-of-interest)
|
||||
(cond
|
||||
((-> event param 0)
|
||||
(set! (-> self tracking use-point-of-interest) #t)
|
||||
(set! (-> self tracking point-of-interest quad) (-> (the-as vector (-> event param 0)) quad))
|
||||
(set! (-> self tracking point-of-interest-blend target) 1.0)
|
||||
)
|
||||
(else
|
||||
(set! (-> self tracking use-point-of-interest) #f)
|
||||
(set! (-> self tracking point-of-interest-blend target) 0.0)
|
||||
)
|
||||
(the-as
|
||||
object
|
||||
(case event-type
|
||||
(('point-of-interest)
|
||||
(cond
|
||||
((-> event param 0)
|
||||
(set! (-> self tracking use-point-of-interest) #t)
|
||||
(set! (-> self tracking point-of-interest quad) (-> (the-as vector (-> event param 0)) quad))
|
||||
(set! (-> self tracking point-of-interest-blend target) 1.0)
|
||||
)
|
||||
(else
|
||||
(set! (-> self tracking use-point-of-interest) #f)
|
||||
(set! (-> self tracking point-of-interest-blend target) 0.0)
|
||||
)
|
||||
)
|
||||
((= v1-0 'set-interpolation)
|
||||
(set! (-> self interp-val) 0.0)
|
||||
(set! (-> self interp-step) (/ 5.0 (the float (-> event param 0))))
|
||||
)
|
||||
((= v1-0 'teleport)
|
||||
(when (nonzero? (-> self tracking-status))
|
||||
(cam-calc-follow! (-> self tracking) (-> self trans) #f)
|
||||
(slave-set-rotation!
|
||||
(-> self tracking)
|
||||
(-> self trans)
|
||||
(the-as float (-> self tracking-options))
|
||||
(-> self fov)
|
||||
#f
|
||||
)
|
||||
)
|
||||
(('set-interpolation)
|
||||
(set! (-> self interp-val) 0.0)
|
||||
(set! (-> self interp-step) (/ 5.0 (the float (-> event param 0))))
|
||||
)
|
||||
(('teleport)
|
||||
(when (nonzero? (-> self tracking-status))
|
||||
(cam-calc-follow! (-> self tracking) (-> self trans) #f)
|
||||
(slave-set-rotation!
|
||||
(-> self tracking)
|
||||
(-> self trans)
|
||||
(the-as float (-> self tracking-options))
|
||||
(-> self fov)
|
||||
#f
|
||||
)
|
||||
)
|
||||
((= v1-0 'stop-tracking)
|
||||
(set! (-> self tracking-status) (the-as uint 0))
|
||||
0
|
||||
)
|
||||
(('stop-tracking)
|
||||
(set! (-> self tracking-status) (the-as uint 0))
|
||||
0
|
||||
)
|
||||
(('start-tracking)
|
||||
(cond
|
||||
((< arg1 1)
|
||||
(let ((t9-2 format)
|
||||
(a0-15 0)
|
||||
(a1-3 "ERROR <GMJ>: missing camera-slave parameter to *camera-combiner* start-tracking~%")
|
||||
)
|
||||
(let ((v1-7 (-> event param 0)))
|
||||
(rtype-of v1-7)
|
||||
)
|
||||
(t9-2 a0-15 a1-3)
|
||||
)
|
||||
)
|
||||
((let ((t9-3 type-type?)
|
||||
(v1-8 (-> event param 0))
|
||||
)
|
||||
(not (t9-3 (rtype-of v1-8) camera-slave))
|
||||
)
|
||||
(let ((t9-4 format)
|
||||
(a0-18 0)
|
||||
(a1-5 "ERROR <GMJ>: invalid type '~A' to *camera-combiner* start-tracking~%")
|
||||
(v1-10 (-> event param 0))
|
||||
)
|
||||
(t9-4 a0-18 a1-5 (rtype-of v1-10))
|
||||
)
|
||||
)
|
||||
((zero? (-> self tracking-status))
|
||||
(set! (-> self tracking-status) (the-as uint 1))
|
||||
(let ((gp-1 (the-as object (-> event param 0))))
|
||||
(set! (-> self tracking-options) (the-as int (-> (the-as camera-slave gp-1) options)))
|
||||
(set! (-> self tracking no-follow) (-> (the-as camera-slave gp-1) tracking no-follow))
|
||||
(copy-cam-float-seeker (-> self tracking tilt-adjust) (-> (the-as camera-slave gp-1) tracking tilt-adjust))
|
||||
(copy-cam-float-seeker
|
||||
(-> self tracking underwater-blend)
|
||||
(-> (the-as camera-slave gp-1) tracking underwater-blend)
|
||||
)
|
||||
(set! (-> self tracking use-point-of-interest) (-> (the-as camera-slave gp-1) tracking use-point-of-interest))
|
||||
(set! (-> self tracking point-of-interest quad)
|
||||
(-> (the-as camera-slave gp-1) tracking point-of-interest quad)
|
||||
)
|
||||
(copy-cam-float-seeker
|
||||
(-> self tracking point-of-interest-blend)
|
||||
(-> (the-as camera-slave gp-1) tracking point-of-interest-blend)
|
||||
)
|
||||
(let ((gp-2 (+ (the-as uint gp-1) 108)))
|
||||
(cam-calc-follow! (-> self tracking) (the-as vector gp-2) #f)
|
||||
(slave-set-rotation!
|
||||
(-> self tracking)
|
||||
(the-as vector gp-2)
|
||||
(the-as float (-> self tracking-options))
|
||||
(-> self fov)
|
||||
#f
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
((= v1-0 'start-tracking)
|
||||
(cond
|
||||
((< arg1 1)
|
||||
(let ((t9-2 format)
|
||||
(a0-15 0)
|
||||
(a1-3 "ERROR <GMJ>: missing camera-slave parameter to *camera-combiner* start-tracking~%")
|
||||
)
|
||||
(let ((v1-7 (-> event param 0)))
|
||||
(rtype-of v1-7)
|
||||
)
|
||||
(('copy-tracking)
|
||||
(cond
|
||||
((< arg1 1)
|
||||
(let ((t9-10 format)
|
||||
(a0-27 0)
|
||||
(a1-11 "ERROR <GMJ>: missing camera-slave parameter to *camera-combiner* copy-tracking~%")
|
||||
)
|
||||
(t9-2 a0-15 a1-3)
|
||||
(let ((v1-23 (-> event param 0)))
|
||||
(rtype-of v1-23)
|
||||
)
|
||||
(t9-10 a0-27 a1-11)
|
||||
)
|
||||
((let ((t9-3 type-type?)
|
||||
(v1-8 (-> event param 0))
|
||||
)
|
||||
(not (t9-3 (rtype-of v1-8) camera-slave))
|
||||
)
|
||||
(let ((t9-4 format)
|
||||
(a0-18 0)
|
||||
(a1-5 "ERROR <GMJ>: invalid type '~A' to *camera-combiner* start-tracking~%")
|
||||
(v1-10 (-> event param 0))
|
||||
)
|
||||
(t9-4 a0-18 a1-5 (rtype-of v1-10))
|
||||
)
|
||||
)
|
||||
((zero? (-> self tracking-status))
|
||||
(set! (-> self tracking-status) (the-as uint 1))
|
||||
(let ((gp-1 (the-as object (-> event param 0))))
|
||||
(set! (-> self tracking-options) (the-as int (-> (the-as camera-slave gp-1) options)))
|
||||
(set! (-> self tracking no-follow) (-> (the-as camera-slave gp-1) tracking no-follow))
|
||||
(copy-cam-float-seeker (-> self tracking tilt-adjust) (-> (the-as camera-slave gp-1) tracking tilt-adjust))
|
||||
(copy-cam-float-seeker
|
||||
(-> self tracking underwater-blend)
|
||||
(-> (the-as camera-slave gp-1) tracking underwater-blend)
|
||||
)
|
||||
((let ((t9-11 type-type?)
|
||||
(v1-24 (-> event param 0))
|
||||
)
|
||||
(set! (-> self tracking use-point-of-interest) (-> (the-as camera-slave gp-1) tracking use-point-of-interest))
|
||||
(set! (-> self tracking point-of-interest quad)
|
||||
(-> (the-as camera-slave gp-1) tracking point-of-interest quad)
|
||||
(not (t9-11 (rtype-of v1-24) camera-slave))
|
||||
)
|
||||
(let ((t9-12 format)
|
||||
(a0-30 0)
|
||||
(a1-13 "ERROR <GMJ>: invalid type '~A' to *camera-combiner* copy-tracking~%")
|
||||
(v1-25 (-> event param 0))
|
||||
)
|
||||
(t9-12 a0-30 a1-13 (rtype-of v1-25))
|
||||
)
|
||||
)
|
||||
((nonzero? (-> self tracking-status))
|
||||
#f
|
||||
)
|
||||
(else
|
||||
(set! (-> self tracking-status) (the-as uint 1))
|
||||
(let ((gp-3 (the-as camera-slave (-> event param 0))))
|
||||
(set! (-> self tracking-options) (the-as int (-> gp-3 options)))
|
||||
(set! (-> self tracking no-follow) (-> gp-3 tracking no-follow))
|
||||
(copy-cam-float-seeker (-> self tracking tilt-adjust) (-> gp-3 tracking tilt-adjust))
|
||||
(copy-cam-float-seeker (-> self tracking underwater-blend) (-> gp-3 tracking underwater-blend))
|
||||
(set! (-> self tracking follow-off quad) (-> gp-3 tracking follow-off quad))
|
||||
(set! (-> self tracking follow-pt quad) (-> gp-3 tracking follow-pt quad))
|
||||
(let* ((a2-17 (-> self tracking))
|
||||
(a3-3 (-> gp-3 tracking))
|
||||
(v1-36 (-> a3-3 inv-mat vector 0 quad))
|
||||
(a0-37 (-> a3-3 inv-mat vector 1 quad))
|
||||
(a1-16 (-> a3-3 inv-mat vector 2 quad))
|
||||
(a3-4 (-> a3-3 inv-mat vector 3 quad))
|
||||
)
|
||||
(copy-cam-float-seeker
|
||||
(-> self tracking point-of-interest-blend)
|
||||
(-> (the-as camera-slave gp-1) tracking point-of-interest-blend)
|
||||
)
|
||||
(let ((gp-2 (+ (the-as uint gp-1) 108)))
|
||||
(cam-calc-follow! (-> self tracking) (the-as vector gp-2) #f)
|
||||
(slave-set-rotation!
|
||||
(-> self tracking)
|
||||
(the-as vector gp-2)
|
||||
(the-as float (-> self tracking-options))
|
||||
(-> self fov)
|
||||
#f
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
((= v1-0 'copy-tracking)
|
||||
(cond
|
||||
((< arg1 1)
|
||||
(let ((t9-10 format)
|
||||
(a0-27 0)
|
||||
(a1-11 "ERROR <GMJ>: missing camera-slave parameter to *camera-combiner* copy-tracking~%")
|
||||
)
|
||||
(let ((v1-23 (-> event param 0)))
|
||||
(rtype-of v1-23)
|
||||
)
|
||||
(t9-10 a0-27 a1-11)
|
||||
)
|
||||
)
|
||||
((let ((t9-11 type-type?)
|
||||
(v1-24 (-> event param 0))
|
||||
)
|
||||
(not (t9-11 (rtype-of v1-24) camera-slave))
|
||||
)
|
||||
(let ((t9-12 format)
|
||||
(a0-30 0)
|
||||
(a1-13 "ERROR <GMJ>: invalid type '~A' to *camera-combiner* copy-tracking~%")
|
||||
(v1-25 (-> event param 0))
|
||||
)
|
||||
(t9-12 a0-30 a1-13 (rtype-of v1-25))
|
||||
)
|
||||
)
|
||||
((nonzero? (-> self tracking-status))
|
||||
#f
|
||||
)
|
||||
(else
|
||||
(set! (-> self tracking-status) (the-as uint 1))
|
||||
(let ((gp-3 (the-as camera-slave (-> event param 0))))
|
||||
(set! (-> self tracking-options) (the-as int (-> gp-3 options)))
|
||||
(set! (-> self tracking no-follow) (-> gp-3 tracking no-follow))
|
||||
(copy-cam-float-seeker (-> self tracking tilt-adjust) (-> gp-3 tracking tilt-adjust))
|
||||
(copy-cam-float-seeker (-> self tracking underwater-blend) (-> gp-3 tracking underwater-blend))
|
||||
(set! (-> self tracking follow-off quad) (-> gp-3 tracking follow-off quad))
|
||||
(set! (-> self tracking follow-pt quad) (-> gp-3 tracking follow-pt quad))
|
||||
(let* ((a2-17 (-> self tracking))
|
||||
(a3-3 (-> gp-3 tracking))
|
||||
(v1-36 (-> a3-3 inv-mat vector 0 quad))
|
||||
(a0-37 (-> a3-3 inv-mat vector 1 quad))
|
||||
(a1-16 (-> a3-3 inv-mat vector 2 quad))
|
||||
(a3-4 (-> a3-3 inv-mat vector 3 quad))
|
||||
)
|
||||
(set! (-> a2-17 inv-mat vector 0 quad) v1-36)
|
||||
(set! (-> a2-17 inv-mat vector 1 quad) a0-37)
|
||||
(set! (-> a2-17 inv-mat vector 2 quad) a1-16)
|
||||
(set! (-> a2-17 inv-mat vector 3 quad) a3-4)
|
||||
)
|
||||
(set! (-> self tracking use-point-of-interest) (-> gp-3 tracking use-point-of-interest))
|
||||
(set! (-> self tracking point-of-interest quad) (-> gp-3 tracking point-of-interest quad))
|
||||
(copy-cam-float-seeker (-> self tracking point-of-interest-blend) (-> gp-3 tracking point-of-interest-blend))
|
||||
(set! (-> a2-17 inv-mat vector 0 quad) v1-36)
|
||||
(set! (-> a2-17 inv-mat vector 1 quad) a0-37)
|
||||
(set! (-> a2-17 inv-mat vector 2 quad) a1-16)
|
||||
(set! (-> a2-17 inv-mat vector 3 quad) a3-4)
|
||||
)
|
||||
(set! (-> self tracking use-point-of-interest) (-> gp-3 tracking use-point-of-interest))
|
||||
(set! (-> self tracking point-of-interest quad) (-> gp-3 tracking point-of-interest quad))
|
||||
(copy-cam-float-seeker (-> self tracking point-of-interest-blend) (-> gp-3 tracking point-of-interest-blend))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
+39
-41
@@ -1083,54 +1083,52 @@
|
||||
;; WARN: rewrite_to_get_var got a none typed variable. Is there unreachable code? [OP: 45]
|
||||
;; WARN: rewrite_to_get_var got a none typed variable. Is there unreachable code? [OP: 50]
|
||||
(defbehavior cam-standard-event-handler camera-slave ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(let ((v1-0 arg2))
|
||||
(the-as
|
||||
object
|
||||
(cond
|
||||
((= v1-0 'go)
|
||||
(let ((v1-1 (-> arg3 param 0))
|
||||
(t9-0 (the-as (function object) enter-state))
|
||||
(the-as
|
||||
object
|
||||
(case arg2
|
||||
(('go)
|
||||
(let ((v1-1 (-> arg3 param 0))
|
||||
(t9-0 (the-as (function object) enter-state))
|
||||
)
|
||||
(set! (-> self next-state) (the-as state v1-1))
|
||||
(t9-0)
|
||||
)
|
||||
)
|
||||
(('change-state 'change-state-no-go)
|
||||
(let ((s5-0 (the-as object (-> arg3 param 0))))
|
||||
(cam-slave-init-vars)
|
||||
(let ((t9-2 (the-as (function object) (-> (the-as state s5-0) enter))))
|
||||
(if t9-2
|
||||
(t9-2)
|
||||
)
|
||||
(set! (-> self next-state) (the-as state v1-1))
|
||||
(t9-0)
|
||||
)
|
||||
)
|
||||
((or (= v1-0 'change-state) (= v1-0 'change-state-no-go))
|
||||
(let ((s5-0 (the-as object (-> arg3 param 0))))
|
||||
(cam-slave-init-vars)
|
||||
(let ((t9-2 (the-as (function object) (-> (the-as state s5-0) enter))))
|
||||
(if t9-2
|
||||
(t9-2)
|
||||
)
|
||||
)
|
||||
(set! (-> self enter-has-run) #t)
|
||||
(set! (-> self event-hook) (-> (the-as state s5-0) event))
|
||||
(when (= arg2 'change-state)
|
||||
(let ((t9-3 (the-as (function object) enter-state)))
|
||||
(set! (-> self next-state) (the-as state s5-0))
|
||||
(t9-3)
|
||||
)
|
||||
(set! (-> self enter-has-run) #t)
|
||||
(set! (-> self event-hook) (-> (the-as state s5-0) event))
|
||||
(when (= arg2 'change-state)
|
||||
(let ((t9-3 (the-as (function object) enter-state)))
|
||||
(set! (-> self next-state) (the-as state s5-0))
|
||||
(t9-3)
|
||||
)
|
||||
)
|
||||
)
|
||||
((= v1-0 'point-of-interest)
|
||||
(cond
|
||||
((-> arg3 param 0)
|
||||
(set! (-> self tracking use-point-of-interest) #t)
|
||||
(set! (-> self tracking point-of-interest quad) (-> (the-as vector (-> arg3 param 0)) quad))
|
||||
(set! (-> self tracking point-of-interest-blend target) 1.0)
|
||||
)
|
||||
(else
|
||||
(set! (-> self tracking use-point-of-interest) #f)
|
||||
(set! (-> self tracking point-of-interest-blend target) 0.0)
|
||||
)
|
||||
)
|
||||
(('point-of-interest)
|
||||
(cond
|
||||
((-> arg3 param 0)
|
||||
(set! (-> self tracking use-point-of-interest) #t)
|
||||
(set! (-> self tracking point-of-interest quad) (-> (the-as vector (-> arg3 param 0)) quad))
|
||||
(set! (-> self tracking point-of-interest-blend target) 1.0)
|
||||
)
|
||||
(else
|
||||
(set! (-> self tracking use-point-of-interest) #f)
|
||||
(set! (-> self tracking point-of-interest-blend target) 0.0)
|
||||
)
|
||||
)
|
||||
((= v1-0 'teleport)
|
||||
(cam-calc-follow! (-> self tracking) (-> self trans) #f)
|
||||
(slave-set-rotation! (-> self tracking) (-> self trans) (the-as float (-> self options)) (-> self fov) #f)
|
||||
)
|
||||
)
|
||||
)
|
||||
(('teleport)
|
||||
(cam-calc-follow! (-> self tracking) (-> self trans) #f)
|
||||
(slave-set-rotation! (-> self tracking) (-> self trans) (the-as float (-> self options)) (-> self fov) #f)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
+14
-16
@@ -236,23 +236,21 @@
|
||||
(set! (-> self event-hook)
|
||||
(lambda :behavior pov-camera
|
||||
((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(let ((v1-0 arg2))
|
||||
(the-as object (cond
|
||||
((= v1-0 'mask)
|
||||
(let ((v0-0 (the-as number (-> arg3 param 0))))
|
||||
(set! (-> self mask-to-clear) (the-as process-mask v0-0))
|
||||
v0-0
|
||||
)
|
||||
(the-as object (case arg2
|
||||
(('mask)
|
||||
(let ((v0-0 (the-as number (-> arg3 param 0))))
|
||||
(set! (-> self mask-to-clear) (the-as process-mask v0-0))
|
||||
v0-0
|
||||
)
|
||||
((= v1-0 'music-movie-volume)
|
||||
(set! (-> self music-volume-movie) (the-as float (-> arg3 param 0)))
|
||||
)
|
||||
((= v1-0 'sfx-movie-volume)
|
||||
(set! (-> self sfx-volume-movie) (the-as float (-> arg3 param 0)))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(('music-movie-volume)
|
||||
(set! (-> self music-volume-movie) (the-as float (-> arg3 param 0)))
|
||||
)
|
||||
(('sfx-movie-volume)
|
||||
(set! (-> self sfx-volume-movie) (the-as float (-> arg3 param 0)))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(pre-startup-callback self)
|
||||
|
||||
+46
-50
@@ -733,41 +733,39 @@
|
||||
(defstate pickup (eco-collectable)
|
||||
:virtual #t
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(let ((v1-0 event-type))
|
||||
(the-as
|
||||
object
|
||||
(cond
|
||||
((= v1-0 'set-movie-pos)
|
||||
(let ((v1-3 (res-lump-struct (-> self entity) 'movie-pos vector :time (the-as float -1000000000.0))))
|
||||
(the-as symbol (when v1-3
|
||||
(set! (-> v1-3 quad) (-> (the-as vector (-> event param 0)) quad))
|
||||
(the-as symbol v1-3)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
((= v1-0 'actor-pause)
|
||||
(the-as symbol (cond
|
||||
((-> event param 0)
|
||||
(logior! (-> self mask) (process-mask actor-pause))
|
||||
(let ((v0-1 #t))
|
||||
(set! (-> self actor-pause) v0-1)
|
||||
v0-1
|
||||
)
|
||||
)
|
||||
(else
|
||||
(logclear! (-> self mask) (process-mask actor-pause))
|
||||
(set! (-> self actor-pause) #f)
|
||||
#f
|
||||
)
|
||||
(the-as
|
||||
object
|
||||
(case event-type
|
||||
(('set-movie-pos)
|
||||
(let ((v1-3 (res-lump-struct (-> self entity) 'movie-pos vector :time (the-as float -1000000000.0))))
|
||||
(the-as symbol (when v1-3
|
||||
(set! (-> v1-3 quad) (-> (the-as vector (-> event param 0)) quad))
|
||||
(the-as symbol v1-3)
|
||||
)
|
||||
)
|
||||
)
|
||||
((= v1-0 'fade)
|
||||
(process-entity-status! self (entity-perm-status dead) #t)
|
||||
(the-as symbol (deactivate self))
|
||||
)
|
||||
)
|
||||
)
|
||||
(('actor-pause)
|
||||
(the-as symbol (cond
|
||||
((-> event param 0)
|
||||
(logior! (-> self mask) (process-mask actor-pause))
|
||||
(let ((v0-1 #t))
|
||||
(set! (-> self actor-pause) v0-1)
|
||||
v0-1
|
||||
)
|
||||
)
|
||||
(else
|
||||
(logclear! (-> self mask) (process-mask actor-pause))
|
||||
(set! (-> self actor-pause) #f)
|
||||
#f
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(('fade)
|
||||
(process-entity-status! self (entity-perm-status dead) #t)
|
||||
(the-as symbol (deactivate self))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -945,18 +943,16 @@
|
||||
(defstate die (eco)
|
||||
:virtual #t
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(let ((v1-0 event-type))
|
||||
(the-as object (cond
|
||||
((= v1-0 'fade)
|
||||
(process-entity-status! self (entity-perm-status dead) #t)
|
||||
(deactivate self)
|
||||
)
|
||||
((= v1-0 'die)
|
||||
(go-virtual die)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(the-as object (case event-type
|
||||
(('fade)
|
||||
(process-entity-status! self (entity-perm-status dead) #t)
|
||||
(deactivate self)
|
||||
)
|
||||
(('die)
|
||||
(go-virtual die)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
:exit (behavior ()
|
||||
(process-entity-status! self (entity-perm-status bit-3) #f)
|
||||
@@ -2339,12 +2335,12 @@
|
||||
(defstate pickup (buzzer)
|
||||
:virtual #t
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(let ((v1-0 event-type))
|
||||
(the-as object (if (= v1-0 'notify)
|
||||
(process-entity-status! self (entity-perm-status dead) #t)
|
||||
)
|
||||
)
|
||||
)
|
||||
(the-as object (case event-type
|
||||
(('notify)
|
||||
(process-entity-status! self (entity-perm-status dead) #t)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
:enter (behavior ((arg0 object) (arg1 handle))
|
||||
(set! (-> self pickup-handle) arg1)
|
||||
|
||||
+25
-25
@@ -986,32 +986,32 @@
|
||||
(defstate special-contents-die (crate)
|
||||
:virtual #t
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(let ((v1-0 event-type))
|
||||
(the-as object (when (= v1-0 'notify)
|
||||
(case (-> event param 0)
|
||||
(('pickup)
|
||||
(let ((gp-0 (-> self entity extra perm)))
|
||||
(logior! (-> gp-0 status) (entity-perm-status user-set-from-cstage))
|
||||
(set! (-> gp-0 user-int8 1) (min 127 (+ (-> gp-0 user-int8 1) 1)))
|
||||
(+! (-> self child-count) -1)
|
||||
(when (<= (-> self child-count) 0)
|
||||
(if (or (= (-> self defense) 'iron) (= (-> self defense) 'steel))
|
||||
(process-entity-status! self (entity-perm-status bit-4) #f)
|
||||
)
|
||||
(process-entity-status! self (entity-perm-status dead) #t)
|
||||
(process-entity-status! self (entity-perm-status complete) #t)
|
||||
(set! (-> gp-0 user-int8 0) 2)
|
||||
(let ((v0-0 (logclear (-> self mask) (process-mask sleep))))
|
||||
(set! (-> self mask) v0-0)
|
||||
v0-0
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(the-as object (case event-type
|
||||
(('notify)
|
||||
(case (-> event param 0)
|
||||
(('pickup)
|
||||
(let ((gp-0 (-> self entity extra perm)))
|
||||
(logior! (-> gp-0 status) (entity-perm-status user-set-from-cstage))
|
||||
(set! (-> gp-0 user-int8 1) (min 127 (+ (-> gp-0 user-int8 1) 1)))
|
||||
(+! (-> self child-count) -1)
|
||||
(when (<= (-> self child-count) 0)
|
||||
(if (or (= (-> self defense) 'iron) (= (-> self defense) 'steel))
|
||||
(process-entity-status! self (entity-perm-status bit-4) #f)
|
||||
)
|
||||
(process-entity-status! self (entity-perm-status dead) #t)
|
||||
(process-entity-status! self (entity-perm-status complete) #t)
|
||||
(set! (-> gp-0 user-int8 0) 2)
|
||||
(let ((v0-0 (logclear (-> self mask) (process-mask sleep))))
|
||||
(set! (-> self mask) v0-0)
|
||||
v0-0
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
:trans (-> (method-of-type crate die) trans)
|
||||
:code (behavior ()
|
||||
|
||||
+9
-11
@@ -1729,17 +1729,15 @@ auto-save-post
|
||||
(defstate error (auto-save)
|
||||
:virtual #t
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(let ((v1-0 event-type))
|
||||
(the-as object (cond
|
||||
((= v1-0 'progress-allowed?)
|
||||
#t
|
||||
)
|
||||
((= v1-0 'die)
|
||||
(deactivate self)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(the-as object (case event-type
|
||||
(('progress-allowed?)
|
||||
#t
|
||||
)
|
||||
(('die)
|
||||
(deactivate self)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
:code (behavior ((arg0 mc-status-code))
|
||||
(if (-> self buffer)
|
||||
|
||||
+99
-103
@@ -1164,26 +1164,24 @@
|
||||
(defstate camera-tracker-process (camera-tracker)
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(local-vars (v0-0 uint))
|
||||
(let ((v1-0 event-type))
|
||||
(the-as object (cond
|
||||
((= v1-0 'message)
|
||||
(set! v0-0 (-> event param 0))
|
||||
(set! (-> self message) (the-as basic v0-0))
|
||||
v0-0
|
||||
)
|
||||
((= v1-0 'mask)
|
||||
(set! v0-0 (-> event param 0))
|
||||
(set! (-> self mask-to-clear) (the-as process-mask v0-0))
|
||||
v0-0
|
||||
)
|
||||
((= v1-0 'border)
|
||||
(set! v0-0 (-> event param 0))
|
||||
(set! (-> self border-value) (the-as basic v0-0))
|
||||
v0-0
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(the-as object (case event-type
|
||||
(('message)
|
||||
(set! v0-0 (-> event param 0))
|
||||
(set! (-> self message) (the-as basic v0-0))
|
||||
v0-0
|
||||
)
|
||||
(('mask)
|
||||
(set! v0-0 (-> event param 0))
|
||||
(set! (-> self mask-to-clear) (the-as process-mask v0-0))
|
||||
v0-0
|
||||
)
|
||||
(('border)
|
||||
(set! v0-0 (-> event param 0))
|
||||
(set! (-> self border-value) (the-as basic v0-0))
|
||||
v0-0
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
:enter (behavior ()
|
||||
(if (-> self entity)
|
||||
@@ -2242,100 +2240,98 @@
|
||||
(defstate touch-tracker-idle (touch-tracker)
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(local-vars (v0-0 none))
|
||||
(let ((v1-0 event-type))
|
||||
(the-as object (cond
|
||||
((= v1-0 'touched)
|
||||
(let ((v1-1 (ppointer->process (-> self parent))))
|
||||
(when (!= v1-1 proc)
|
||||
(cond
|
||||
((= (-> self event) 'attack)
|
||||
(cond
|
||||
((= (-> proc type) target)
|
||||
(send-event
|
||||
proc
|
||||
(-> self event)
|
||||
:from (the-as process v1-1)
|
||||
#f
|
||||
(static-attack-info ((mode (the-as symbol (-> self event-mode)))))
|
||||
)
|
||||
(the-as object (case event-type
|
||||
(('touched)
|
||||
(let ((v1-1 (ppointer->process (-> self parent))))
|
||||
(when (!= v1-1 proc)
|
||||
(cond
|
||||
((= (-> self event) 'attack)
|
||||
(cond
|
||||
((= (-> proc type) target)
|
||||
(send-event
|
||||
proc
|
||||
(-> self event)
|
||||
:from (the-as process v1-1)
|
||||
#f
|
||||
(static-attack-info ((mode (the-as symbol (-> self event-mode)))))
|
||||
)
|
||||
((= (-> v1-1 type) target)
|
||||
(send-event
|
||||
proc
|
||||
(-> self event)
|
||||
:from (the-as process v1-1)
|
||||
#f
|
||||
(-> self event-mode)
|
||||
(-> *target* control unknown-dword50)
|
||||
(-> *target* control unknown-dword51)
|
||||
)
|
||||
)
|
||||
((= (-> v1-1 type) target)
|
||||
(send-event
|
||||
proc
|
||||
(-> self event)
|
||||
:from (the-as process v1-1)
|
||||
#f
|
||||
(-> self event-mode)
|
||||
(-> *target* control unknown-dword50)
|
||||
(-> *target* control unknown-dword51)
|
||||
)
|
||||
(else
|
||||
(let ((a1-5 (new 'stack-no-clear 'event-message-block)))
|
||||
(set! (-> a1-5 from) (the-as process v1-1))
|
||||
(set! (-> a1-5 num-params) 4)
|
||||
(set! (-> a1-5 message) (-> self event))
|
||||
(set! (-> a1-5 param 0) (the-as uint #f))
|
||||
(set! (-> a1-5 param 1) (the-as uint (-> self event-mode)))
|
||||
(let ((v1-19 (+ *global-attack-id* 1)))
|
||||
(set! *global-attack-id* v1-19)
|
||||
(set! (-> a1-5 param 2) (the-as uint v1-19))
|
||||
)
|
||||
(set! (-> a1-5 param 3) (the-as uint 0))
|
||||
(send-event-function proc a1-5)
|
||||
)
|
||||
(else
|
||||
(let ((a1-5 (new 'stack-no-clear 'event-message-block)))
|
||||
(set! (-> a1-5 from) (the-as process v1-1))
|
||||
(set! (-> a1-5 num-params) 4)
|
||||
(set! (-> a1-5 message) (-> self event))
|
||||
(set! (-> a1-5 param 0) (the-as uint #f))
|
||||
(set! (-> a1-5 param 1) (the-as uint (-> self event-mode)))
|
||||
(let ((v1-19 (+ *global-attack-id* 1)))
|
||||
(set! *global-attack-id* v1-19)
|
||||
(set! (-> a1-5 param 2) (the-as uint v1-19))
|
||||
)
|
||||
(set! (-> a1-5 param 3) (the-as uint 0))
|
||||
(send-event-function proc a1-5)
|
||||
)
|
||||
)
|
||||
)
|
||||
((-> self event)
|
||||
(send-event proc (-> self event) :from (the-as process v1-1))
|
||||
)
|
||||
(else
|
||||
(let ((t0-5 (new 'stack-no-clear 'event-message-block)))
|
||||
(set! (-> t0-5 from) proc)
|
||||
(set! (-> t0-5 num-params) arg1)
|
||||
(set! (-> t0-5 message) event-type)
|
||||
(set! (-> t0-5 param 0) (-> event param 0))
|
||||
(set! (-> t0-5 param 1) (-> event param 1))
|
||||
(set! (-> t0-5 param 2) (-> event param 2))
|
||||
(set! (-> t0-5 param 3) (-> event param 3))
|
||||
(set! (-> t0-5 param 4) (-> event param 4))
|
||||
(set! (-> t0-5 param 5) (-> event param 5))
|
||||
(set! (-> t0-5 param 6) (-> event param 6))
|
||||
(send-event-function v1-1 t0-5)
|
||||
)
|
||||
)
|
||||
((-> self event)
|
||||
(send-event proc (-> self event) :from (the-as process v1-1))
|
||||
)
|
||||
(else
|
||||
(let ((t0-5 (new 'stack-no-clear 'event-message-block)))
|
||||
(set! (-> t0-5 from) proc)
|
||||
(set! (-> t0-5 num-params) arg1)
|
||||
(set! (-> t0-5 message) event-type)
|
||||
(set! (-> t0-5 param 0) (-> event param 0))
|
||||
(set! (-> t0-5 param 1) (-> event param 1))
|
||||
(set! (-> t0-5 param 2) (-> event param 2))
|
||||
(set! (-> t0-5 param 3) (-> event param 3))
|
||||
(set! (-> t0-5 param 4) (-> event param 4))
|
||||
(set! (-> t0-5 param 5) (-> event param 5))
|
||||
(set! (-> t0-5 param 6) (-> event param 6))
|
||||
(send-event-function v1-1 t0-5)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
((= v1-0 'target)
|
||||
(set! v0-0 (the-as none (process->handle (the-as process (-> event param 0)))))
|
||||
(set! (-> self target) (the-as handle v0-0))
|
||||
v0-0
|
||||
)
|
||||
((= v1-0 'event)
|
||||
(set! (-> self event) (the-as symbol (-> event param 0)))
|
||||
(set! v0-0 (the-as none (-> event param 1)))
|
||||
(set! (-> self event-mode) (the-as basic v0-0))
|
||||
v0-0
|
||||
)
|
||||
((= v1-0 'exit)
|
||||
(set! v0-0 (the-as none (-> event param 0)))
|
||||
(set! (-> self run-function) (the-as (function object) v0-0))
|
||||
v0-0
|
||||
)
|
||||
((= v1-0 'eval)
|
||||
((the-as (function touch-tracker none) (-> event param 0)) self)
|
||||
)
|
||||
((= v1-0 'function)
|
||||
(set! v0-0 (the-as none (-> event param 0)))
|
||||
(set! (-> self callback) (the-as (function touch-tracker none) v0-0))
|
||||
v0-0
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(('target)
|
||||
(set! v0-0 (the-as none (process->handle (the-as process (-> event param 0)))))
|
||||
(set! (-> self target) (the-as handle v0-0))
|
||||
v0-0
|
||||
)
|
||||
(('event)
|
||||
(set! (-> self event) (the-as symbol (-> event param 0)))
|
||||
(set! v0-0 (the-as none (-> event param 1)))
|
||||
(set! (-> self event-mode) (the-as basic v0-0))
|
||||
v0-0
|
||||
)
|
||||
(('exit)
|
||||
(set! v0-0 (the-as none (-> event param 0)))
|
||||
(set! (-> self run-function) (the-as (function object) v0-0))
|
||||
v0-0
|
||||
)
|
||||
(('eval)
|
||||
((the-as (function touch-tracker none) (-> event param 0)) self)
|
||||
)
|
||||
(('function)
|
||||
(set! v0-0 (the-as none (-> event param 0)))
|
||||
(set! (-> self callback) (the-as (function touch-tracker none) v0-0))
|
||||
v0-0
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
:code (behavior ()
|
||||
(set! (-> self state-time) (-> *display* base-frame-counter))
|
||||
|
||||
+66
-70
@@ -794,43 +794,41 @@
|
||||
(defstate be-clone (process-taskable)
|
||||
:virtual #t
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(let ((v1-0 event-type))
|
||||
(the-as shadow-geo (cond
|
||||
((= v1-0 'shadow)
|
||||
(the-as shadow-geo (cond
|
||||
((-> event param 0)
|
||||
(let ((v0-0 (-> self shadow-backup)))
|
||||
(set! (-> self draw shadow) v0-0)
|
||||
v0-0
|
||||
)
|
||||
(the-as shadow-geo (case event-type
|
||||
(('shadow)
|
||||
(the-as shadow-geo (cond
|
||||
((-> event param 0)
|
||||
(let ((v0-0 (-> self shadow-backup)))
|
||||
(set! (-> self draw shadow) v0-0)
|
||||
v0-0
|
||||
)
|
||||
(else
|
||||
(set! (-> self draw shadow) #f)
|
||||
(the-as shadow-geo #f)
|
||||
)
|
||||
)
|
||||
(else
|
||||
(set! (-> self draw shadow) #f)
|
||||
(the-as shadow-geo #f)
|
||||
)
|
||||
)
|
||||
)
|
||||
((= v1-0 'shadow-min-max)
|
||||
(let ((v1-5 (-> self draw shadow-ctrl)))
|
||||
(let ((a0-5 v1-5))
|
||||
(set! (-> a0-5 settings bot-plane w) (- (the-as float (-> event param 0))))
|
||||
)
|
||||
0
|
||||
(set! (-> v1-5 settings top-plane w) (- (the-as float (-> event param 1))))
|
||||
)
|
||||
)
|
||||
)
|
||||
(('shadow-min-max)
|
||||
(let ((v1-5 (-> self draw shadow-ctrl)))
|
||||
(let ((a0-5 v1-5))
|
||||
(set! (-> a0-5 settings bot-plane w) (- (the-as float (-> event param 0))))
|
||||
)
|
||||
(the-as shadow-geo 0)
|
||||
0
|
||||
(set! (-> v1-5 settings top-plane w) (- (the-as float (-> event param 1))))
|
||||
)
|
||||
((= v1-0 'end-mode)
|
||||
(the-as shadow-geo (if (should-display? self)
|
||||
(the-as shadow-geo (go-virtual idle))
|
||||
(the-as shadow-geo (go-virtual hidden))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(the-as shadow-geo 0)
|
||||
)
|
||||
(('end-mode)
|
||||
(the-as shadow-geo (if (should-display? self)
|
||||
(the-as shadow-geo (go-virtual idle))
|
||||
(the-as shadow-geo (go-virtual hidden))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
:enter (behavior ((arg0 handle))
|
||||
(logior! (-> self skel status) (janim-status blerc))
|
||||
@@ -871,46 +869,44 @@
|
||||
(defstate idle (process-taskable)
|
||||
:virtual #t
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(let ((v1-0 event-type))
|
||||
(the-as
|
||||
object
|
||||
(cond
|
||||
((= v1-0 'attack)
|
||||
(the-as
|
||||
symbol
|
||||
(if (-> self bounce-away)
|
||||
(the-as
|
||||
symbol
|
||||
(send-event proc 'shove #f (static-attack-info ((shove-back (meters 3)) (shove-up (meters 1)))))
|
||||
)
|
||||
(the-as
|
||||
object
|
||||
(case event-type
|
||||
(('attack)
|
||||
(the-as
|
||||
symbol
|
||||
(if (-> self bounce-away)
|
||||
(the-as
|
||||
symbol
|
||||
(send-event proc 'shove #f (static-attack-info ((shove-back (meters 3)) (shove-up (meters 1)))))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
((= v1-0 'touch)
|
||||
(the-as symbol (send-shove-back
|
||||
(-> self root-override)
|
||||
proc
|
||||
(the-as touching-shapes-entry (-> event param 0))
|
||||
0.7
|
||||
6144.0
|
||||
16384.0
|
||||
)
|
||||
)
|
||||
)
|
||||
(('touch)
|
||||
(the-as symbol (send-shove-back
|
||||
(-> self root-override)
|
||||
proc
|
||||
(the-as touching-shapes-entry (-> event param 0))
|
||||
0.7
|
||||
6144.0
|
||||
16384.0
|
||||
)
|
||||
)
|
||||
)
|
||||
(('clone)
|
||||
(the-as symbol (go-virtual be-clone (the-as handle (-> event param 0))))
|
||||
)
|
||||
(('play-anim)
|
||||
(logclear! (-> self mask) (process-mask actor-pause))
|
||||
(let ((v0-0 #t))
|
||||
(set! (-> self been-kicked) v0-0)
|
||||
v0-0
|
||||
)
|
||||
((= v1-0 'clone)
|
||||
(the-as symbol (go-virtual be-clone (the-as handle (-> event param 0))))
|
||||
)
|
||||
((= v1-0 'play-anim)
|
||||
(logclear! (-> self mask) (process-mask actor-pause))
|
||||
(let ((v0-0 #t))
|
||||
(set! (-> self been-kicked) v0-0)
|
||||
v0-0
|
||||
)
|
||||
)
|
||||
((= v1-0 'hidden-other)
|
||||
(the-as symbol (go-virtual hidden-other))
|
||||
)
|
||||
)
|
||||
)
|
||||
(('hidden-other)
|
||||
(the-as symbol (go-virtual hidden-other))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
+6
-6
@@ -1362,12 +1362,12 @@
|
||||
(defstate water-vol-idle (water-vol)
|
||||
:virtual #t
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(let ((v1-0 event-type))
|
||||
(the-as object (if (= v1-0 'update)
|
||||
(TODO-RENAME-26 self)
|
||||
)
|
||||
)
|
||||
)
|
||||
(the-as object (case event-type
|
||||
(('update)
|
||||
(TODO-RENAME-26 self)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
:exit (behavior ()
|
||||
(dummy-27 self)
|
||||
|
||||
+5
-19
@@ -722,11 +722,7 @@
|
||||
(set! (-> obj preload-stream name) arg0)
|
||||
(set! (-> obj preload-stream parts) arg1)
|
||||
(set! (-> obj preload-stream priority) arg3)
|
||||
(let ((v1-8 (process->ppointer arg2)))
|
||||
(set! (-> obj preload-stream owner)
|
||||
(new 'static 'handle :process v1-8 :pid (-> (the-as process (-> v1-8 0)) pid))
|
||||
)
|
||||
)
|
||||
(set! (-> obj preload-stream owner) (process->handle arg2))
|
||||
)
|
||||
0
|
||||
)
|
||||
@@ -771,26 +767,20 @@
|
||||
(set! (-> obj rec 0 name) arg0)
|
||||
(set! (-> obj rec 0 parts) arg1)
|
||||
(set! (-> obj rec 0 priority) arg3)
|
||||
(let ((v1-34 (process->ppointer arg2)))
|
||||
(set! (-> obj rec 0 owner) (new 'static 'handle :process v1-34 :pid (-> (the-as process (-> v1-34 0)) pid)))
|
||||
)
|
||||
(set! (-> obj rec 0 owner) (process->handle arg2))
|
||||
)
|
||||
((< arg3 (-> obj rec 1 priority))
|
||||
(mem-copy! (&-> (-> obj rec 2) type) (&-> (-> obj rec 1) type) 44)
|
||||
(set! (-> obj rec 1 name) arg0)
|
||||
(set! (-> obj rec 1 parts) arg1)
|
||||
(set! (-> obj rec 1 priority) arg3)
|
||||
(let ((v1-40 (process->ppointer arg2)))
|
||||
(set! (-> obj rec 1 owner) (new 'static 'handle :process v1-40 :pid (-> (the-as process (-> v1-40 0)) pid)))
|
||||
)
|
||||
(set! (-> obj rec 1 owner) (process->handle arg2))
|
||||
)
|
||||
((< arg3 (-> obj rec 2 priority))
|
||||
(set! (-> obj rec 2 name) arg0)
|
||||
(set! (-> obj rec 2 parts) arg1)
|
||||
(set! (-> obj rec 2 priority) arg3)
|
||||
(let ((v1-44 (process->ppointer arg2)))
|
||||
(set! (-> obj rec 2 owner) (new 'static 'handle :process v1-44 :pid (-> (the-as process (-> v1-44 0)) pid)))
|
||||
)
|
||||
(set! (-> obj rec 2 owner) (process->handle arg2))
|
||||
)
|
||||
)
|
||||
0
|
||||
@@ -853,11 +843,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((v1-46 (process->ppointer self)))
|
||||
(set! (-> *art-control* spool-lock)
|
||||
(new 'static 'handle :process v1-46 :pid (-> (the-as process (-> v1-46 0)) pid))
|
||||
)
|
||||
)
|
||||
(set! (-> *art-control* spool-lock) (process->handle self))
|
||||
(set! sv-48 (the-as int (-> *display* base-frame-counter)))
|
||||
(while (< spool-part (-> arg0 parts))
|
||||
(spool-push *art-control* (-> arg0 name) spool-part self -20.0)
|
||||
|
||||
+247
-249
@@ -30,275 +30,273 @@
|
||||
;; WARN: rewrite_to_get_var got a none typed variable. Is there unreachable code? [OP: 563]
|
||||
(defbehavior target-generic-event-handler target ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(local-vars (v0-0 none))
|
||||
(let ((v1-0 arg2))
|
||||
(the-as
|
||||
object
|
||||
(cond
|
||||
((= v1-0 'get-pickup)
|
||||
(when (not (logtest? (-> self state-flags) (state-flags dying)))
|
||||
(let ((s4-0 (-> arg3 param 0))
|
||||
(f28-0 (the-as float (-> arg3 param 1)))
|
||||
)
|
||||
(if (!= (pickup-collectable!
|
||||
(-> self fact-info-target)
|
||||
(the-as pickup-type s4-0)
|
||||
(the-as float 0.0)
|
||||
(the-as handle #f)
|
||||
)
|
||||
(pickup-collectable! (-> self fact-info-target) (the-as pickup-type s4-0) f28-0 (process->handle arg0))
|
||||
(the-as
|
||||
object
|
||||
(case arg2
|
||||
(('get-pickup)
|
||||
(when (not (logtest? (-> self state-flags) (state-flags dying)))
|
||||
(let ((s4-0 (-> arg3 param 0))
|
||||
(f28-0 (the-as float (-> arg3 param 1)))
|
||||
)
|
||||
(if (!= (pickup-collectable!
|
||||
(-> self fact-info-target)
|
||||
(the-as pickup-type s4-0)
|
||||
(the-as float 0.0)
|
||||
(the-as handle #f)
|
||||
)
|
||||
#t
|
||||
'full
|
||||
)
|
||||
)
|
||||
(pickup-collectable! (-> self fact-info-target) (the-as pickup-type s4-0) f28-0 (process->handle arg0))
|
||||
)
|
||||
#t
|
||||
'full
|
||||
)
|
||||
)
|
||||
)
|
||||
((= v1-0 'reset-pickup)
|
||||
(reset! (-> self fact-info-target) (the-as symbol (-> arg3 param 0)))
|
||||
)
|
||||
(('reset-pickup)
|
||||
(reset! (-> self fact-info-target) (the-as symbol (-> arg3 param 0)))
|
||||
)
|
||||
(('reset-collide)
|
||||
(cond
|
||||
((-> self control unknown-symbol00)
|
||||
(target-collide-set! (-> self control unknown-symbol00) (-> self control unknown-float90))
|
||||
)
|
||||
((-> self control unknown-symbol30)
|
||||
(target-danger-set! (-> self control unknown-symbol30) #f)
|
||||
)
|
||||
)
|
||||
((= v1-0 'reset-collide)
|
||||
(cond
|
||||
((-> self control unknown-symbol00)
|
||||
(target-collide-set! (-> self control unknown-symbol00) (-> self control unknown-float90))
|
||||
)
|
||||
((-> self control unknown-symbol30)
|
||||
(target-danger-set! (-> self control unknown-symbol30) #f)
|
||||
)
|
||||
)
|
||||
)
|
||||
((= v1-0 'level-deactivate)
|
||||
#f
|
||||
)
|
||||
((= v1-0 'level-enter)
|
||||
(let ((v1-21 (level-get *level* (the-as symbol (-> arg3 param 0)))))
|
||||
(when v1-21
|
||||
(let ((s5-1 (-> v1-21 info)))
|
||||
(let ((v1-22 (-> s5-1 buzzer)))
|
||||
(if (zero? v1-22)
|
||||
(set! (-> self fact-info-target buzzer) 0.0)
|
||||
(set! (-> self fact-info-target buzzer) (pickup-collectable!
|
||||
(-> self fact-info-target)
|
||||
(pickup-type buzzer)
|
||||
(the float (logior -65536 v1-22))
|
||||
(the-as handle #f)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(if (and (zero? (-> *game-info* enter-level-time (-> s5-1 index)))
|
||||
(>= (-> *level-task-data-remap* length) (-> s5-1 index))
|
||||
)
|
||||
(set! (-> *game-info* enter-level-time (-> *level-task-data-remap* (+ (-> s5-1 index) -1)))
|
||||
(-> *display* base-frame-counter)
|
||||
)
|
||||
(('level-deactivate)
|
||||
#f
|
||||
)
|
||||
(('level-enter)
|
||||
(let ((v1-21 (level-get *level* (the-as symbol (-> arg3 param 0)))))
|
||||
(when v1-21
|
||||
(let ((s5-1 (-> v1-21 info)))
|
||||
(let ((v1-22 (-> s5-1 buzzer)))
|
||||
(if (zero? v1-22)
|
||||
(set! (-> self fact-info-target buzzer) 0.0)
|
||||
(set! (-> self fact-info-target buzzer) (pickup-collectable!
|
||||
(-> self fact-info-target)
|
||||
(pickup-type buzzer)
|
||||
(the float (logior -65536 v1-22))
|
||||
(the-as handle #f)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(send-event (ppointer->process (-> *hud-parts* buzzers)) 'sync)
|
||||
(format #t "GAMEPLAY: enter ~A~%" (-> arg3 param 0))
|
||||
(if (and (zero? (-> *game-info* enter-level-time (-> s5-1 index)))
|
||||
(>= (-> *level-task-data-remap* length) (-> s5-1 index))
|
||||
)
|
||||
(set! (-> *game-info* enter-level-time (-> *level-task-data-remap* (+ (-> s5-1 index) -1)))
|
||||
(-> *display* base-frame-counter)
|
||||
)
|
||||
)
|
||||
)
|
||||
(send-event (ppointer->process (-> *hud-parts* buzzers)) 'sync)
|
||||
(format #t "GAMEPLAY: enter ~A~%" (-> arg3 param 0))
|
||||
)
|
||||
)
|
||||
)
|
||||
(('get-attack-count)
|
||||
(set! v0-0 (the-as none (+ (-> self control unknown-dword51) (-> arg3 param 0))))
|
||||
(set! (-> self control unknown-dword51) (the-as int v0-0))
|
||||
v0-0
|
||||
)
|
||||
(('continue)
|
||||
(go target-continue (the-as continue-point (-> arg3 param 0)))
|
||||
)
|
||||
(('query)
|
||||
(case (-> arg3 param 0)
|
||||
(('powerup)
|
||||
(and (= (-> self fact-info-target eco-type) (-> arg3 param 1)) (< 0.0 (-> self fact-info-target eco-level)))
|
||||
)
|
||||
(('pickup)
|
||||
(pickup-collectable!
|
||||
(-> self fact-info-target)
|
||||
(the-as pickup-type (-> arg3 param 1))
|
||||
(the-as float 0.0)
|
||||
(the-as handle #f)
|
||||
)
|
||||
)
|
||||
(('ground-height)
|
||||
(target-height-above-ground)
|
||||
)
|
||||
)
|
||||
)
|
||||
(('trans)
|
||||
(case (-> arg3 param 0)
|
||||
(('save)
|
||||
(set! (-> self alt-cam-pos quad) (-> self control trans quad))
|
||||
(set! (-> self state-flags) (logior (state-flags has-saved-position) (-> self state-flags)))
|
||||
(mem-copy! (the-as pointer (-> arg3 param 1)) (the-as pointer (-> self control trans)) 48)
|
||||
)
|
||||
(('restore)
|
||||
(logclear! (-> self state-flags) (state-flags has-saved-position))
|
||||
(let ((gp-1 (-> arg3 param 1)))
|
||||
(move-to-point! (-> self control) (the-as vector (+ gp-1 0)))
|
||||
(quaternion-copy! (-> self control quat) (the-as quaternion (+ gp-1 16)))
|
||||
)
|
||||
(rot->dir-targ! (-> self control))
|
||||
(logior! (-> self control status) (cshape-moving-flags onsurf onground tsurf))
|
||||
(set! v0-0 (the-as none (-> *display* base-frame-counter)))
|
||||
(set! (-> self control unknown-dword11) (the-as time-frame v0-0))
|
||||
v0-0
|
||||
)
|
||||
(('reset)
|
||||
(set! v0-0 (the-as none (logclear (-> self state-flags) (state-flags has-saved-position))))
|
||||
(set! (-> self state-flags) (the-as state-flags v0-0))
|
||||
v0-0
|
||||
)
|
||||
)
|
||||
)
|
||||
(('effect)
|
||||
(target-powerup-effect (the-as symbol (-> arg3 param 0)))
|
||||
)
|
||||
(('do-effect)
|
||||
(dummy-10 (-> self skel effect) (the-as symbol (-> arg3 param 0)) (the-as float (-> arg3 param 1)) -1)
|
||||
(if (-> self sidekick)
|
||||
(dummy-10
|
||||
(-> self sidekick 0 skel effect)
|
||||
(the-as symbol (-> arg3 param 0))
|
||||
(the-as float (-> arg3 param 1))
|
||||
-1
|
||||
)
|
||||
)
|
||||
)
|
||||
((= v1-0 'get-attack-count)
|
||||
(set! v0-0 (the-as none (+ (-> self control unknown-dword51) (-> arg3 param 0))))
|
||||
(set! (-> self control unknown-dword51) (the-as int v0-0))
|
||||
v0-0
|
||||
)
|
||||
((= v1-0 'continue)
|
||||
(go target-continue (the-as continue-point (-> arg3 param 0)))
|
||||
)
|
||||
((= v1-0 'query)
|
||||
(case (-> arg3 param 0)
|
||||
(('powerup)
|
||||
(and (= (-> self fact-info-target eco-type) (-> arg3 param 1)) (< 0.0 (-> self fact-info-target eco-level)))
|
||||
)
|
||||
(('pickup)
|
||||
(pickup-collectable!
|
||||
(-> self fact-info-target)
|
||||
(the-as pickup-type (-> arg3 param 1))
|
||||
(the-as float 0.0)
|
||||
(the-as handle #f)
|
||||
)
|
||||
)
|
||||
(('ground-height)
|
||||
(target-height-above-ground)
|
||||
)
|
||||
)
|
||||
(('neck)
|
||||
(set! (-> self neck flex-blend) (the-as float (-> arg3 param 0)))
|
||||
(cond
|
||||
((-> arg3 param 1)
|
||||
(set! (-> self state-flags) (logior (state-flags looking-at-enemy) (-> self state-flags)))
|
||||
(set! (-> self alt-neck-pos quad) (-> (the-as vector (-> arg3 param 1)) quad))
|
||||
(look-at-enemy! (-> self neck) (-> self alt-neck-pos) 'force arg0)
|
||||
)
|
||||
(else
|
||||
(set! v0-0 (the-as none (logclear (-> self state-flags) (state-flags looking-at-enemy))))
|
||||
(set! (-> self state-flags) (the-as state-flags v0-0))
|
||||
v0-0
|
||||
)
|
||||
)
|
||||
((= v1-0 'trans)
|
||||
(case (-> arg3 param 0)
|
||||
(('save)
|
||||
(set! (-> self alt-cam-pos quad) (-> self control trans quad))
|
||||
(set! (-> self state-flags) (logior (state-flags has-saved-position) (-> self state-flags)))
|
||||
(mem-copy! (the-as pointer (-> arg3 param 1)) (the-as pointer (-> self control trans)) 48)
|
||||
)
|
||||
(('restore)
|
||||
(logclear! (-> self state-flags) (state-flags has-saved-position))
|
||||
(let ((gp-1 (-> arg3 param 1)))
|
||||
(move-to-point! (-> self control) (the-as vector (+ gp-1 0)))
|
||||
(quaternion-copy! (-> self control quat) (the-as quaternion (+ gp-1 16)))
|
||||
)
|
||||
(rot->dir-targ! (-> self control))
|
||||
(logior! (-> self control status) (cshape-moving-flags onsurf onground tsurf))
|
||||
(set! v0-0 (the-as none (-> *display* base-frame-counter)))
|
||||
(set! (-> self control unknown-dword11) (the-as time-frame v0-0))
|
||||
v0-0
|
||||
)
|
||||
(('reset)
|
||||
(set! v0-0 (the-as none (logclear (-> self state-flags) (state-flags has-saved-position))))
|
||||
(set! (-> self state-flags) (the-as state-flags v0-0))
|
||||
v0-0
|
||||
)
|
||||
)
|
||||
)
|
||||
((= v1-0 'effect)
|
||||
(target-powerup-effect (the-as symbol (-> arg3 param 0)))
|
||||
)
|
||||
((= v1-0 'do-effect)
|
||||
(dummy-10 (-> self skel effect) (the-as symbol (-> arg3 param 0)) (the-as float (-> arg3 param 1)) -1)
|
||||
(if (-> self sidekick)
|
||||
(dummy-10
|
||||
(-> self sidekick 0 skel effect)
|
||||
(the-as symbol (-> arg3 param 0))
|
||||
(the-as float (-> arg3 param 1))
|
||||
-1
|
||||
)
|
||||
)
|
||||
)
|
||||
((= v1-0 'neck)
|
||||
(set! (-> self neck flex-blend) (the-as float (-> arg3 param 0)))
|
||||
(cond
|
||||
((-> arg3 param 1)
|
||||
(set! (-> self state-flags) (logior (state-flags looking-at-enemy) (-> self state-flags)))
|
||||
(set! (-> self alt-neck-pos quad) (-> (the-as vector (-> arg3 param 1)) quad))
|
||||
(look-at-enemy! (-> self neck) (-> self alt-neck-pos) 'force arg0)
|
||||
)
|
||||
(else
|
||||
(set! v0-0 (the-as none (logclear (-> self state-flags) (state-flags looking-at-enemy))))
|
||||
(set! (-> self state-flags) (the-as state-flags v0-0))
|
||||
v0-0
|
||||
)
|
||||
)
|
||||
)
|
||||
((= v1-0 'sidekick)
|
||||
(cond
|
||||
((and (-> arg3 param 0) (not (-> self sidekick)))
|
||||
(let ((gp-2 (get-process *default-dead-pool* sidekick #x4000)))
|
||||
(set! v0-0 (when gp-2
|
||||
(let ((t9-21 (method-of-type sidekick activate)))
|
||||
(t9-21 (the-as sidekick gp-2) self 'sidekick (the-as pointer #x70004000))
|
||||
)
|
||||
(run-now-in-process gp-2 init-sidekick)
|
||||
(-> gp-2 ppointer)
|
||||
)
|
||||
(('sidekick)
|
||||
(cond
|
||||
((and (-> arg3 param 0) (not (-> self sidekick)))
|
||||
(let ((gp-2 (get-process *default-dead-pool* sidekick #x4000)))
|
||||
(set! v0-0 (when gp-2
|
||||
(let ((t9-21 (method-of-type sidekick activate)))
|
||||
(t9-21 (the-as sidekick gp-2) self 'sidekick (the-as pointer #x70004000))
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> self sidekick) (the-as (pointer sidekick) v0-0))
|
||||
v0-0
|
||||
(run-now-in-process gp-2 init-sidekick)
|
||||
(-> gp-2 ppointer)
|
||||
)
|
||||
)
|
||||
)
|
||||
((and (not (-> arg3 param 0)) (-> self sidekick))
|
||||
(deactivate (-> self sidekick 0))
|
||||
(set! (-> self sidekick) (the-as (pointer sidekick) #f))
|
||||
#f
|
||||
(set! (-> self sidekick) (the-as (pointer sidekick) v0-0))
|
||||
v0-0
|
||||
)
|
||||
((and (not (-> arg3 param 0)) (-> self sidekick))
|
||||
(deactivate (-> self sidekick 0))
|
||||
(set! (-> self sidekick) (the-as (pointer sidekick) #f))
|
||||
#f
|
||||
)
|
||||
)
|
||||
)
|
||||
(('blend-shape)
|
||||
(if (-> arg3 param 0)
|
||||
(logior! (-> self skel status) (janim-status blerc))
|
||||
(logclear! (-> self skel status) (janim-status blerc))
|
||||
)
|
||||
(let ((v1-105 (new 'stack-no-clear 'event-message-block)))
|
||||
(set! (-> v1-105 from) arg0)
|
||||
(set! (-> v1-105 num-params) arg1)
|
||||
(set! (-> v1-105 message) arg2)
|
||||
(set! (-> v1-105 param 0) (-> arg3 param 0))
|
||||
(set! (-> v1-105 param 1) (-> arg3 param 1))
|
||||
(set! (-> v1-105 param 2) (-> arg3 param 2))
|
||||
(set! (-> v1-105 param 3) (-> arg3 param 3))
|
||||
(set! (-> v1-105 param 4) (-> arg3 param 4))
|
||||
(set! (-> v1-105 param 5) (-> arg3 param 5))
|
||||
(set! (-> v1-105 param 6) (-> arg3 param 6))
|
||||
(send-event-function (ppointer->process (-> self sidekick)) v1-105)
|
||||
)
|
||||
)
|
||||
(('shadow)
|
||||
(cond
|
||||
((-> arg3 param 0)
|
||||
(let ((v1-108 (-> self draw shadow-ctrl)))
|
||||
(logclear! (-> v1-108 settings flags) (shadow-flags disable-draw))
|
||||
)
|
||||
)
|
||||
)
|
||||
((= v1-0 'blend-shape)
|
||||
(if (-> arg3 param 0)
|
||||
(logior! (-> self skel status) (janim-status blerc))
|
||||
(logclear! (-> self skel status) (janim-status blerc))
|
||||
0
|
||||
)
|
||||
(else
|
||||
(let ((v1-110 (-> self draw shadow-ctrl)))
|
||||
(logior! (-> v1-110 settings flags) (shadow-flags disable-draw))
|
||||
)
|
||||
(let ((v1-105 (new 'stack-no-clear 'event-message-block)))
|
||||
(set! (-> v1-105 from) arg0)
|
||||
(set! (-> v1-105 num-params) arg1)
|
||||
(set! (-> v1-105 message) arg2)
|
||||
(set! (-> v1-105 param 0) (-> arg3 param 0))
|
||||
(set! (-> v1-105 param 1) (-> arg3 param 1))
|
||||
(set! (-> v1-105 param 2) (-> arg3 param 2))
|
||||
(set! (-> v1-105 param 3) (-> arg3 param 3))
|
||||
(set! (-> v1-105 param 4) (-> arg3 param 4))
|
||||
(set! (-> v1-105 param 5) (-> arg3 param 5))
|
||||
(set! (-> v1-105 param 6) (-> arg3 param 6))
|
||||
(send-event-function (ppointer->process (-> self sidekick)) v1-105)
|
||||
0
|
||||
)
|
||||
)
|
||||
((= v1-0 'shadow)
|
||||
(cond
|
||||
((-> arg3 param 0)
|
||||
(let ((v1-108 (-> self draw shadow-ctrl)))
|
||||
(logclear! (-> v1-108 settings flags) (shadow-flags disable-draw))
|
||||
)
|
||||
0
|
||||
)
|
||||
(else
|
||||
(let ((v1-110 (-> self draw shadow-ctrl)))
|
||||
(logior! (-> v1-110 settings flags) (shadow-flags disable-draw))
|
||||
)
|
||||
0
|
||||
)
|
||||
(('rotate-y-angle)
|
||||
(quaternion-rotate-y!
|
||||
(-> self control unknown-quaternion00)
|
||||
(-> self control unknown-quaternion00)
|
||||
(the-as float (-> arg3 param 0))
|
||||
)
|
||||
(if (= (-> *cpad-list* cpads (-> self control unknown-cpad-info00 number) stick0-speed) 0.0)
|
||||
(rot->dir-targ! (-> self control))
|
||||
)
|
||||
)
|
||||
(('touched)
|
||||
(send-event arg0 'touch (-> arg3 param 0))
|
||||
)
|
||||
(('dry)
|
||||
(set! (-> self water drip-wetness) 0.0)
|
||||
)
|
||||
(('reset-height)
|
||||
(set! (-> self control unknown-vector52 quad) (-> self control trans quad))
|
||||
#f
|
||||
)
|
||||
(('draw)
|
||||
(if (-> arg3 param 0)
|
||||
(logclear! (-> self draw status) (draw-status skip-bones))
|
||||
(logior! (-> self draw status) (draw-status skip-bones))
|
||||
)
|
||||
(let ((v1-132 (new 'stack-no-clear 'event-message-block)))
|
||||
(set! (-> v1-132 from) arg0)
|
||||
(set! (-> v1-132 num-params) arg1)
|
||||
(set! (-> v1-132 message) arg2)
|
||||
(set! (-> v1-132 param 0) (-> arg3 param 0))
|
||||
(set! (-> v1-132 param 1) (-> arg3 param 1))
|
||||
(set! (-> v1-132 param 2) (-> arg3 param 2))
|
||||
(set! (-> v1-132 param 3) (-> arg3 param 3))
|
||||
(set! (-> v1-132 param 4) (-> arg3 param 4))
|
||||
(set! (-> v1-132 param 5) (-> arg3 param 5))
|
||||
(set! (-> v1-132 param 6) (-> arg3 param 6))
|
||||
(send-event-function (ppointer->process (-> self manipy)) v1-132)
|
||||
)
|
||||
)
|
||||
(('no-load-wait)
|
||||
(set! v0-0 (the-as none (+ (-> *display* base-frame-counter) (the-as time-frame (-> arg3 param 0)))))
|
||||
(set! (-> self no-load-wait) (the-as time-frame v0-0))
|
||||
v0-0
|
||||
)
|
||||
(('no-look-around)
|
||||
(set! (-> self no-look-around-wait)
|
||||
(+ (-> *display* base-frame-counter) (the-as time-frame (-> arg3 param 0)))
|
||||
)
|
||||
(if (= (-> self next-state name) 'target-look-around)
|
||||
(send-event self 'end-mode)
|
||||
)
|
||||
)
|
||||
(('change-state)
|
||||
(go
|
||||
(the-as (state object object object object target) (-> arg3 param 0))
|
||||
(-> arg3 param 1)
|
||||
(-> arg3 param 2)
|
||||
(-> arg3 param 3)
|
||||
(-> arg3 param 4)
|
||||
)
|
||||
((= v1-0 'rotate-y-angle)
|
||||
(quaternion-rotate-y!
|
||||
(-> self control unknown-quaternion00)
|
||||
(-> self control unknown-quaternion00)
|
||||
(the-as float (-> arg3 param 0))
|
||||
)
|
||||
(if (= (-> *cpad-list* cpads (-> self control unknown-cpad-info00 number) stick0-speed) 0.0)
|
||||
(rot->dir-targ! (-> self control))
|
||||
)
|
||||
)
|
||||
((= v1-0 'touched)
|
||||
(send-event arg0 'touch (-> arg3 param 0))
|
||||
)
|
||||
((= v1-0 'dry)
|
||||
(set! (-> self water drip-wetness) 0.0)
|
||||
)
|
||||
((= v1-0 'reset-height)
|
||||
(set! (-> self control unknown-vector52 quad) (-> self control trans quad))
|
||||
#f
|
||||
)
|
||||
((= v1-0 'draw)
|
||||
(if (-> arg3 param 0)
|
||||
(logclear! (-> self draw status) (draw-status skip-bones))
|
||||
(logior! (-> self draw status) (draw-status skip-bones))
|
||||
)
|
||||
(let ((v1-132 (new 'stack-no-clear 'event-message-block)))
|
||||
(set! (-> v1-132 from) arg0)
|
||||
(set! (-> v1-132 num-params) arg1)
|
||||
(set! (-> v1-132 message) arg2)
|
||||
(set! (-> v1-132 param 0) (-> arg3 param 0))
|
||||
(set! (-> v1-132 param 1) (-> arg3 param 1))
|
||||
(set! (-> v1-132 param 2) (-> arg3 param 2))
|
||||
(set! (-> v1-132 param 3) (-> arg3 param 3))
|
||||
(set! (-> v1-132 param 4) (-> arg3 param 4))
|
||||
(set! (-> v1-132 param 5) (-> arg3 param 5))
|
||||
(set! (-> v1-132 param 6) (-> arg3 param 6))
|
||||
(send-event-function (ppointer->process (-> self manipy)) v1-132)
|
||||
)
|
||||
)
|
||||
((= v1-0 'no-load-wait)
|
||||
(set! v0-0 (the-as none (+ (-> *display* base-frame-counter) (the-as time-frame (-> arg3 param 0)))))
|
||||
(set! (-> self no-load-wait) (the-as time-frame v0-0))
|
||||
v0-0
|
||||
)
|
||||
((= v1-0 'no-look-around)
|
||||
(set! (-> self no-look-around-wait)
|
||||
(+ (-> *display* base-frame-counter) (the-as time-frame (-> arg3 param 0)))
|
||||
)
|
||||
(if (= (-> self next-state name) 'target-look-around)
|
||||
(send-event self 'end-mode)
|
||||
)
|
||||
)
|
||||
((= v1-0 'change-state)
|
||||
(go
|
||||
(the-as (state object object object object target) (-> arg3 param 0))
|
||||
(-> arg3 param 1)
|
||||
(-> arg3 param 2)
|
||||
(-> arg3 param 3)
|
||||
(-> arg3 param 4)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
+143
-145
@@ -1941,162 +1941,160 @@
|
||||
(defstate progress-normal (progress)
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(local-vars (v0-0 none))
|
||||
(let ((v1-0 event-type))
|
||||
(the-as object (cond
|
||||
((= v1-0 'go-away)
|
||||
(go progress-going-out)
|
||||
)
|
||||
((= v1-0 'notify)
|
||||
(cond
|
||||
((= (-> event param 0) 'done)
|
||||
(case (-> self display-state)
|
||||
(((progress-screen memcard-saving))
|
||||
(cond
|
||||
((= (-> self display-state-stack 0) (progress-screen title))
|
||||
(let ((gp-1 (-> *setting-control* default auto-save)))
|
||||
(sound-volume-off)
|
||||
(set! (-> *game-info* mode) 'play)
|
||||
(initialize! *game-info* 'game (the-as game-save #f) "intro-start")
|
||||
(set! (-> *setting-control* default auto-save) gp-1)
|
||||
)
|
||||
(set-master-mode 'game)
|
||||
(the-as object (case event-type
|
||||
(('go-away)
|
||||
(go progress-going-out)
|
||||
)
|
||||
(('notify)
|
||||
(cond
|
||||
((= (-> event param 0) 'done)
|
||||
(case (-> self display-state)
|
||||
(((progress-screen memcard-saving))
|
||||
(cond
|
||||
((= (-> self display-state-stack 0) (progress-screen title))
|
||||
(let ((gp-1 (-> *setting-control* default auto-save)))
|
||||
(sound-volume-off)
|
||||
(set! (-> *game-info* mode) 'play)
|
||||
(initialize! *game-info* 'game (the-as game-save #f) "intro-start")
|
||||
(set! (-> *setting-control* default auto-save) gp-1)
|
||||
)
|
||||
(else
|
||||
(set! v0-0 (the-as none -1))
|
||||
(set! (-> self next-display-state) (the-as progress-screen v0-0))
|
||||
v0-0
|
||||
)
|
||||
(set-master-mode 'game)
|
||||
)
|
||||
(else
|
||||
(set! v0-0 (the-as none -1))
|
||||
(set! (-> self next-display-state) (the-as progress-screen v0-0))
|
||||
v0-0
|
||||
)
|
||||
)
|
||||
(((progress-screen memcard-formatting))
|
||||
(set! (-> self force-transition) #t)
|
||||
(set! v0-0 (the-as none 15))
|
||||
(set! (-> self next-display-state) (the-as progress-screen v0-0))
|
||||
v0-0
|
||||
)
|
||||
(((progress-screen memcard-creating))
|
||||
(cond
|
||||
((= (-> self display-state-stack 0) (progress-screen title))
|
||||
(set! v0-0 (the-as none 18))
|
||||
(set! (-> self next-display-state) (the-as progress-screen v0-0))
|
||||
)
|
||||
(else
|
||||
(set! v0-0 (the-as none 17))
|
||||
(set! (-> self next-display-state) (the-as progress-screen v0-0))
|
||||
)
|
||||
)
|
||||
(((progress-screen memcard-formatting))
|
||||
(set! (-> self force-transition) #t)
|
||||
(set! v0-0 (the-as none 15))
|
||||
(set! (-> self next-display-state) (the-as progress-screen v0-0))
|
||||
v0-0
|
||||
)
|
||||
(((progress-screen memcard-creating))
|
||||
(cond
|
||||
((= (-> self display-state-stack 0) (progress-screen title))
|
||||
(set! v0-0 (the-as none 18))
|
||||
(set! (-> self next-display-state) (the-as progress-screen v0-0))
|
||||
)
|
||||
(else
|
||||
(set! v0-0 (the-as none 17))
|
||||
(set! (-> self next-display-state) (the-as progress-screen v0-0))
|
||||
)
|
||||
v0-0
|
||||
)
|
||||
v0-0
|
||||
)
|
||||
)
|
||||
)
|
||||
((= (-> event param 0) 'error)
|
||||
(let ((t9-4 format)
|
||||
(a0-17 #t)
|
||||
(a1-2 "ERROR NOTIFY: ~S ~D~%")
|
||||
(v1-13 (-> event param 1))
|
||||
)
|
||||
(t9-4
|
||||
a0-17
|
||||
a1-2
|
||||
(cond
|
||||
((= v1-13 17)
|
||||
"no-auto-save"
|
||||
)
|
||||
((= v1-13 16)
|
||||
"no-process"
|
||||
)
|
||||
((= v1-13 15)
|
||||
"bad-version"
|
||||
)
|
||||
((= v1-13 14)
|
||||
"no-space"
|
||||
)
|
||||
((= v1-13 13)
|
||||
"no-save"
|
||||
)
|
||||
((= v1-13 12)
|
||||
"no-file"
|
||||
)
|
||||
((= v1-13 11)
|
||||
"no-format"
|
||||
)
|
||||
((= v1-13 10)
|
||||
"no-last"
|
||||
)
|
||||
((= v1-13 9)
|
||||
"no-card"
|
||||
)
|
||||
((= v1-13 8)
|
||||
"no-memory"
|
||||
)
|
||||
((= v1-13 7)
|
||||
"new-game"
|
||||
)
|
||||
((= v1-13 6)
|
||||
"read-error"
|
||||
)
|
||||
((= v1-13 5)
|
||||
"write-error"
|
||||
)
|
||||
((= v1-13 4)
|
||||
"internal-error"
|
||||
)
|
||||
((= v1-13 3)
|
||||
"format-failed"
|
||||
)
|
||||
((= v1-13 2)
|
||||
"bad-handle"
|
||||
)
|
||||
((= v1-13 1)
|
||||
"ok"
|
||||
)
|
||||
((zero? v1-13)
|
||||
"busy"
|
||||
)
|
||||
(else
|
||||
"*unknown*"
|
||||
)
|
||||
)
|
||||
(-> self display-state)
|
||||
)
|
||||
)
|
||||
((= (-> event param 0) 'error)
|
||||
(let ((t9-4 format)
|
||||
(a0-17 #t)
|
||||
(a1-2 "ERROR NOTIFY: ~S ~D~%")
|
||||
(v1-13 (-> event param 1))
|
||||
)
|
||||
(t9-4
|
||||
a0-17
|
||||
a1-2
|
||||
(cond
|
||||
((= v1-13 17)
|
||||
"no-auto-save"
|
||||
)
|
||||
((= v1-13 16)
|
||||
"no-process"
|
||||
)
|
||||
((= v1-13 15)
|
||||
"bad-version"
|
||||
)
|
||||
((= v1-13 14)
|
||||
"no-space"
|
||||
)
|
||||
((= v1-13 13)
|
||||
"no-save"
|
||||
)
|
||||
((= v1-13 12)
|
||||
"no-file"
|
||||
)
|
||||
((= v1-13 11)
|
||||
"no-format"
|
||||
)
|
||||
((= v1-13 10)
|
||||
"no-last"
|
||||
)
|
||||
((= v1-13 9)
|
||||
"no-card"
|
||||
)
|
||||
((= v1-13 8)
|
||||
"no-memory"
|
||||
)
|
||||
((= v1-13 7)
|
||||
"new-game"
|
||||
)
|
||||
((= v1-13 6)
|
||||
"read-error"
|
||||
)
|
||||
((= v1-13 5)
|
||||
"write-error"
|
||||
)
|
||||
((= v1-13 4)
|
||||
"internal-error"
|
||||
)
|
||||
((= v1-13 3)
|
||||
"format-failed"
|
||||
)
|
||||
((= v1-13 2)
|
||||
"bad-handle"
|
||||
)
|
||||
((= v1-13 1)
|
||||
"ok"
|
||||
)
|
||||
((zero? v1-13)
|
||||
"busy"
|
||||
)
|
||||
(else
|
||||
"*unknown*"
|
||||
)
|
||||
)
|
||||
(-> self display-state)
|
||||
)
|
||||
)
|
||||
(case (-> event param 1)
|
||||
((14)
|
||||
(set! v0-0 (the-as none 7))
|
||||
(set! (-> self next-display-state) (the-as progress-screen v0-0))
|
||||
v0-0
|
||||
)
|
||||
(else
|
||||
(case (-> self display-state)
|
||||
(((progress-screen memcard-formatting))
|
||||
(set! v0-0 (the-as none 24))
|
||||
(set! (-> self next-display-state) (the-as progress-screen v0-0))
|
||||
v0-0
|
||||
)
|
||||
(((progress-screen memcard-creating))
|
||||
(set! v0-0 (the-as none 25))
|
||||
(set! (-> self next-display-state) (the-as progress-screen v0-0))
|
||||
v0-0
|
||||
)
|
||||
(((progress-screen memcard-saving))
|
||||
(set! v0-0 (the-as none 21))
|
||||
(set! (-> self next-display-state) (the-as progress-screen v0-0))
|
||||
v0-0
|
||||
)
|
||||
(((progress-screen memcard-loading))
|
||||
(set! v0-0 (the-as none 20))
|
||||
(set! (-> self next-display-state) (the-as progress-screen v0-0))
|
||||
v0-0
|
||||
)
|
||||
)
|
||||
(case (-> event param 1)
|
||||
((14)
|
||||
(set! v0-0 (the-as none 7))
|
||||
(set! (-> self next-display-state) (the-as progress-screen v0-0))
|
||||
v0-0
|
||||
)
|
||||
(else
|
||||
(case (-> self display-state)
|
||||
(((progress-screen memcard-formatting))
|
||||
(set! v0-0 (the-as none 24))
|
||||
(set! (-> self next-display-state) (the-as progress-screen v0-0))
|
||||
v0-0
|
||||
)
|
||||
(((progress-screen memcard-creating))
|
||||
(set! v0-0 (the-as none 25))
|
||||
(set! (-> self next-display-state) (the-as progress-screen v0-0))
|
||||
v0-0
|
||||
)
|
||||
(((progress-screen memcard-saving))
|
||||
(set! v0-0 (the-as none 21))
|
||||
(set! (-> self next-display-state) (the-as progress-screen v0-0))
|
||||
v0-0
|
||||
)
|
||||
(((progress-screen memcard-loading))
|
||||
(set! v0-0 (the-as none 20))
|
||||
(set! (-> self next-display-state) (the-as progress-screen v0-0))
|
||||
v0-0
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
:code (behavior ()
|
||||
(loop
|
||||
|
||||
+64
-70
@@ -232,26 +232,24 @@
|
||||
;; failed to figure out what this is:
|
||||
(defstate pelican-circle (pelican)
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(let ((v1-0 event-type))
|
||||
(the-as
|
||||
object
|
||||
(cond
|
||||
((= v1-0 'dive)
|
||||
(let ((v0-0 (the-as structure #t)))
|
||||
(set! (-> self state-object) (the-as symbol v0-0))
|
||||
v0-0
|
||||
)
|
||||
(the-as
|
||||
object
|
||||
(case event-type
|
||||
(('dive)
|
||||
(let ((v0-0 (the-as structure #t)))
|
||||
(set! (-> self state-object) (the-as symbol v0-0))
|
||||
v0-0
|
||||
)
|
||||
((= v1-0 'fuel-cell)
|
||||
(handle->process (-> self fuel-cell))
|
||||
)
|
||||
(('fuel-cell)
|
||||
(handle->process (-> self fuel-cell))
|
||||
)
|
||||
(('position)
|
||||
(set! (-> self path-pos) (the-as float (-> event param 0)))
|
||||
(let ((a1-3 (TODO-RENAME-12 (-> self path) (new 'stack-no-clear 'vector) (-> self path-pos))))
|
||||
(set-heading-vec! (-> self root-override) a1-3)
|
||||
)
|
||||
((= v1-0 'position)
|
||||
(set! (-> self path-pos) (the-as float (-> event param 0)))
|
||||
(let ((a1-3 (TODO-RENAME-12 (-> self path) (new 'stack-no-clear 'vector) (-> self path-pos))))
|
||||
(set-heading-vec! (-> self root-override) a1-3)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -371,17 +369,15 @@
|
||||
;; failed to figure out what this is:
|
||||
(defstate pelican-dive (pelican)
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(let ((v1-0 event-type))
|
||||
(the-as object (cond
|
||||
((= v1-0 'got-cell?)
|
||||
(-> self state-object)
|
||||
)
|
||||
((= v1-0 'fuel-cell)
|
||||
(handle->process (-> self fuel-cell))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(the-as object (case event-type
|
||||
(('got-cell?)
|
||||
(-> self state-object)
|
||||
)
|
||||
(('fuel-cell)
|
||||
(handle->process (-> self fuel-cell))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
:enter (behavior ((arg0 path-control) (arg1 curve-control) (arg2 time-frame))
|
||||
(init! (-> self query) (the-as string #f) 40 150 25 #t (the-as string #f))
|
||||
@@ -490,53 +486,51 @@
|
||||
;; failed to figure out what this is:
|
||||
(defstate pelican-wait-at-nest (pelican)
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(let ((v1-0 event-type))
|
||||
(the-as
|
||||
object
|
||||
(cond
|
||||
((= v1-0 'attack)
|
||||
(case (-> event param 1)
|
||||
(('explode)
|
||||
(let ((a0-2 (handle->process (-> self fuel-cell))))
|
||||
(if a0-2
|
||||
(send-event a0-2 'trans (-> self root-override trans))
|
||||
)
|
||||
)
|
||||
(go pelican-explode #f)
|
||||
#f
|
||||
(the-as
|
||||
object
|
||||
(case event-type
|
||||
(('attack)
|
||||
(case (-> event param 1)
|
||||
(('explode)
|
||||
(let ((a0-2 (handle->process (-> self fuel-cell))))
|
||||
(if a0-2
|
||||
(send-event a0-2 'trans (-> self root-override trans))
|
||||
)
|
||||
)
|
||||
(else
|
||||
(let* ((gp-0 proc)
|
||||
(v1-13 (if (and (nonzero? gp-0) (type-type? (-> gp-0 type) process-drawable))
|
||||
gp-0
|
||||
)
|
||||
)
|
||||
(f30-0 8192.0)
|
||||
(gp-1 (-> self root-override))
|
||||
(s4-0 (-> (the-as process-drawable v1-13) root trans))
|
||||
)
|
||||
(if (< f30-0
|
||||
(fabs
|
||||
(deg-diff (y-angle gp-1) (vector-y-angle (vector-! (new 'stack-no-clear 'vector) s4-0 (-> gp-1 trans))))
|
||||
)
|
||||
(go pelican-explode #f)
|
||||
#f
|
||||
)
|
||||
(else
|
||||
(let* ((gp-0 proc)
|
||||
(v1-13 (if (and (nonzero? gp-0) (type-type? (-> gp-0 type) process-drawable))
|
||||
gp-0
|
||||
)
|
||||
)
|
||||
(f30-0 8192.0)
|
||||
(gp-1 (-> self root-override))
|
||||
(s4-0 (-> (the-as process-drawable v1-13) root trans))
|
||||
)
|
||||
(if (< f30-0
|
||||
(fabs
|
||||
(deg-diff (y-angle gp-1) (vector-y-angle (vector-! (new 'stack-no-clear 'vector) s4-0 (-> gp-1 trans))))
|
||||
)
|
||||
(go pelican-spit)
|
||||
)
|
||||
)
|
||||
)
|
||||
(go pelican-spit)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
((= v1-0 'touch)
|
||||
(send-shove-back
|
||||
(-> self root-override)
|
||||
proc
|
||||
(the-as touching-shapes-entry (-> event 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
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
+7
-7
@@ -483,13 +483,13 @@
|
||||
;; failed to figure out what this is:
|
||||
(defstate citb-disc-idle (citb-disc)
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(let ((v1-0 event-type))
|
||||
(the-as object (when (= v1-0 'touch)
|
||||
(send-event proc 'no-look-around (seconds 0.25))
|
||||
#f
|
||||
)
|
||||
)
|
||||
)
|
||||
(the-as object (case event-type
|
||||
(('touch)
|
||||
(send-event proc 'no-look-around (seconds 0.25))
|
||||
#f
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
:trans (the-as (function none :behavior citb-disc) rider-trans)
|
||||
:code (behavior ()
|
||||
|
||||
+25
-27
@@ -107,34 +107,32 @@
|
||||
(defstate citb-sagecage-idle (citb-sagecage)
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(local-vars (v0-3 none))
|
||||
(let ((v1-0 event-type))
|
||||
(the-as object (cond
|
||||
((= v1-0 'disable-bars)
|
||||
(stop! (-> self sound))
|
||||
(sound-play "sagecage-off")
|
||||
(set! (-> self bars-on) #f)
|
||||
(citb-sagecage-update-collision)
|
||||
(the-as object (case event-type
|
||||
(('disable-bars)
|
||||
(stop! (-> self sound))
|
||||
(sound-play "sagecage-off")
|
||||
(set! (-> self bars-on) #f)
|
||||
(citb-sagecage-update-collision)
|
||||
)
|
||||
(('enable-bars)
|
||||
(set! (-> self bars-on) #t)
|
||||
(citb-sagecage-update-collision)
|
||||
)
|
||||
(('start-cloning)
|
||||
(set! v0-3 (the-as none #t))
|
||||
(set! (-> self cloning) (the-as symbol v0-3))
|
||||
v0-3
|
||||
)
|
||||
(('stop-cloning)
|
||||
(set! (-> self cloning) #f)
|
||||
(let ((v1-7 (-> self skel root-channel 0)))
|
||||
(set! v0-3 (the-as none (-> self draw art-group data 3)))
|
||||
(set! (-> v1-7 frame-group) (the-as art-joint-anim v0-3))
|
||||
)
|
||||
((= v1-0 'enable-bars)
|
||||
(set! (-> self bars-on) #t)
|
||||
(citb-sagecage-update-collision)
|
||||
)
|
||||
((= v1-0 'start-cloning)
|
||||
(set! v0-3 (the-as none #t))
|
||||
(set! (-> self cloning) (the-as symbol v0-3))
|
||||
v0-3
|
||||
)
|
||||
((= v1-0 'stop-cloning)
|
||||
(set! (-> self cloning) #f)
|
||||
(let ((v1-7 (-> self skel root-channel 0)))
|
||||
(set! v0-3 (the-as none (-> self draw art-group data 3)))
|
||||
(set! (-> v1-7 frame-group) (the-as art-joint-anim v0-3))
|
||||
)
|
||||
v0-3
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
v0-3
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
:trans (the-as (function none :behavior citb-sagecage) rider-trans)
|
||||
:code (behavior ()
|
||||
|
||||
+11
-13
@@ -546,20 +546,18 @@
|
||||
;; failed to figure out what this is:
|
||||
(defstate citb-drop-plat-active (citb-drop-plat)
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(let ((v1-0 event-type))
|
||||
(the-as object (cond
|
||||
((= v1-0 'player-stepped)
|
||||
(when (>= (- (-> *display* base-frame-counter) (-> self drop-time)) (seconds 0.2))
|
||||
(set! (-> self drop-time) (-> *display* base-frame-counter))
|
||||
(citb-drop-plat-drop-children (the-as int (-> event param 0)))
|
||||
)
|
||||
(the-as object (case event-type
|
||||
(('player-stepped)
|
||||
(when (>= (- (-> *display* base-frame-counter) (-> self drop-time)) (seconds 0.2))
|
||||
(set! (-> self drop-time) (-> *display* base-frame-counter))
|
||||
(citb-drop-plat-drop-children (the-as int (-> event param 0)))
|
||||
)
|
||||
((= v1-0 'trigger)
|
||||
(go citb-drop-plat-idle)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(('trigger)
|
||||
(go citb-drop-plat-idle)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
:code (behavior ()
|
||||
(set! (-> self state-time) (-> *display* base-frame-counter))
|
||||
|
||||
+10
-10
@@ -344,16 +344,16 @@
|
||||
(defstate citb-base-plat-idle (citb-stair-plat)
|
||||
:virtual #t
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(let ((v1-0 event-type))
|
||||
(the-as object (when (= v1-0 'trigger)
|
||||
(logclear! (-> self mask) (process-mask actor-pause))
|
||||
(let ((v0-0 #t))
|
||||
(set! (-> self rise) v0-0)
|
||||
v0-0
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(the-as object (case event-type
|
||||
(('trigger)
|
||||
(logclear! (-> self mask) (process-mask actor-pause))
|
||||
(let ((v0-0 #t))
|
||||
(set! (-> self rise) v0-0)
|
||||
v0-0
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
:trans (the-as (function none :behavior citb-stair-plat) #f)
|
||||
:code (behavior ()
|
||||
|
||||
+22
-22
@@ -123,12 +123,12 @@
|
||||
;; definition for function plat-event
|
||||
;; INFO: Return type mismatch none vs object.
|
||||
(defbehavior plat-event baseplat ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(let ((v1-0 arg2))
|
||||
(the-as object (if (= v1-0 'bonk)
|
||||
(dummy-22 self)
|
||||
)
|
||||
)
|
||||
)
|
||||
(the-as object (case arg2
|
||||
(('bonk)
|
||||
(dummy-22 self)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
;; definition of type eco-door
|
||||
@@ -184,23 +184,23 @@
|
||||
;; definition for function eco-door-event-handler
|
||||
;; INFO: Return type mismatch symbol vs object.
|
||||
(defbehavior eco-door-event-handler eco-door ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(let ((v1-0 arg2))
|
||||
(the-as object (when (= v1-0 'trigger)
|
||||
(set! (-> self locked) (not (-> self locked)))
|
||||
(cond
|
||||
((-> self locked)
|
||||
(if (= (-> self next-state name) 'door-closed)
|
||||
(sound-play "door-lock")
|
||||
)
|
||||
)
|
||||
(else
|
||||
(sound-play "door-unlock")
|
||||
)
|
||||
(the-as object (case arg2
|
||||
(('trigger)
|
||||
(set! (-> self locked) (not (-> self locked)))
|
||||
(cond
|
||||
((-> self locked)
|
||||
(if (= (-> self next-state name) 'door-closed)
|
||||
(sound-play "door-lock")
|
||||
)
|
||||
)
|
||||
#t
|
||||
)
|
||||
)
|
||||
)
|
||||
(else
|
||||
(sound-play "door-unlock")
|
||||
)
|
||||
)
|
||||
#t
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
|
||||
+14
-14
@@ -554,20 +554,20 @@
|
||||
(defstate water-vol-idle (water-anim)
|
||||
:virtual #t
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(let ((v1-0 event-type))
|
||||
(the-as object (when (= v1-0 'move-to)
|
||||
(set! (-> self root trans quad) (-> (the-as vector (-> event param 0)) quad))
|
||||
(set! (-> self water-height) (-> self root trans y))
|
||||
(if (nonzero? (-> self sound))
|
||||
(update-trans! (-> self sound) (-> self root trans))
|
||||
)
|
||||
(let ((v0-0 (logclear (-> self mask) (process-mask sleep-code))))
|
||||
(set! (-> self mask) v0-0)
|
||||
v0-0
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(the-as object (case event-type
|
||||
(('move-to)
|
||||
(set! (-> self root trans quad) (-> (the-as vector (-> event param 0)) quad))
|
||||
(set! (-> self water-height) (-> self root trans y))
|
||||
(if (nonzero? (-> self sound))
|
||||
(update-trans! (-> self sound) (-> self root trans))
|
||||
)
|
||||
(let ((v0-0 (logclear (-> self mask) (process-mask sleep-code))))
|
||||
(set! (-> self mask) v0-0)
|
||||
v0-0
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
:trans (behavior ()
|
||||
(let ((t9-0 (-> (method-of-type water-vol water-vol-idle) trans)))
|
||||
|
||||
+16
-16
@@ -146,23 +146,23 @@
|
||||
;; failed to figure out what this is:
|
||||
(defstate cavecrystal-active (cavecrystal)
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(let ((v1-0 event-type))
|
||||
(the-as object (when (= v1-0 'attack)
|
||||
(let ((v1-1 (-> event param 2)))
|
||||
(cond
|
||||
((!= v1-1 (-> self player-attack-id))
|
||||
(set! (-> self player-attack-id) v1-1)
|
||||
(set! (-> self activated-time) (-> *display* game-frame-counter))
|
||||
#t
|
||||
)
|
||||
(else
|
||||
#f
|
||||
)
|
||||
(the-as object (case event-type
|
||||
(('attack)
|
||||
(let ((v1-1 (-> event param 2)))
|
||||
(cond
|
||||
((!= v1-1 (-> self player-attack-id))
|
||||
(set! (-> self player-attack-id) v1-1)
|
||||
(set! (-> self activated-time) (-> *display* game-frame-counter))
|
||||
#t
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(else
|
||||
#f
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
:enter (behavior ()
|
||||
(logclear! (-> self mask) (process-mask actor-pause))
|
||||
|
||||
+17
-17
@@ -108,23 +108,23 @@
|
||||
(defstate open (final-door)
|
||||
:virtual #t
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(let ((v1-0 event-type))
|
||||
(the-as object (when (= v1-0 'brightness)
|
||||
(let ((f0-0 (the-as float (-> event param 0)))
|
||||
(f1-0 (the-as float (-> event param 1)))
|
||||
)
|
||||
(set-vector! (-> self draw color-mult) f0-0 f0-0 f0-0 f0-0)
|
||||
(let ((v0-0 (-> self draw color-emissive)))
|
||||
(set! (-> v0-0 x) f1-0)
|
||||
(set! (-> v0-0 y) f1-0)
|
||||
(set! (-> v0-0 z) f1-0)
|
||||
(set! (-> v0-0 w) f1-0)
|
||||
v0-0
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(the-as object (case event-type
|
||||
(('brightness)
|
||||
(let ((f0-0 (the-as float (-> event param 0)))
|
||||
(f1-0 (the-as float (-> event param 1)))
|
||||
)
|
||||
(set-vector! (-> self draw color-mult) f0-0 f0-0 f0-0 f0-0)
|
||||
(let ((v0-0 (-> self draw color-emissive)))
|
||||
(set! (-> v0-0 x) f1-0)
|
||||
(set! (-> v0-0 y) f1-0)
|
||||
(set! (-> v0-0 z) f1-0)
|
||||
(set! (-> v0-0 w) f1-0)
|
||||
v0-0
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
:code (behavior ((arg0 symbol))
|
||||
(case (-> self type)
|
||||
|
||||
+23
-25
@@ -707,32 +707,30 @@
|
||||
;; definition for function light-eco-mother-default-event-handler
|
||||
;; INFO: Return type mismatch object vs int.
|
||||
(defbehavior light-eco-mother-default-event-handler light-eco-mother ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(let ((v1-0 arg2))
|
||||
(the-as
|
||||
int
|
||||
(cond
|
||||
((= v1-0 'untrigger)
|
||||
(the-as int (when (= (-> arg0 type) light-eco-child)
|
||||
(let* ((a1-3 (-> arg3 param 0))
|
||||
(v0-0 (logxor (-> self angle-mask) (ash 1 a1-3)))
|
||||
)
|
||||
(set! (-> self angle-mask) v0-0)
|
||||
v0-0
|
||||
)
|
||||
(the-as
|
||||
int
|
||||
(case arg2
|
||||
(('untrigger)
|
||||
(the-as int (when (= (-> arg0 type) light-eco-child)
|
||||
(let* ((a1-3 (-> arg3 param 0))
|
||||
(v0-0 (logxor (-> self angle-mask) (ash 1 a1-3)))
|
||||
)
|
||||
(set! (-> self angle-mask) v0-0)
|
||||
v0-0
|
||||
)
|
||||
)
|
||||
)
|
||||
((= v1-0 'trigger)
|
||||
(the-as int (when (not (-> self player-got-eco?))
|
||||
(set! (-> self player-got-eco?) #t)
|
||||
(the-as int (send-event (ppointer->process (-> self parent)) 'white-eco-picked-up))
|
||||
)
|
||||
)
|
||||
)
|
||||
((= v1-0 'beam-off)
|
||||
(the-as int (go light-eco-mother-discipate))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(('trigger)
|
||||
(the-as int (when (not (-> self player-got-eco?))
|
||||
(set! (-> self player-got-eco?) #t)
|
||||
(the-as int (send-event (ppointer->process (-> self parent)) 'white-eco-picked-up))
|
||||
)
|
||||
)
|
||||
)
|
||||
(('beam-off)
|
||||
(the-as int (go light-eco-mother-discipate))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
+49
-51
@@ -181,59 +181,57 @@
|
||||
;; WARN: rewrite_to_get_var got a none typed variable. Is there unreachable code? [OP: 28]
|
||||
;; WARN: rewrite_to_get_var got a none typed variable. Is there unreachable code? [OP: 79]
|
||||
(defbehavior ecoclaw-handler ecoclaw ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(let ((v1-0 arg2))
|
||||
(the-as
|
||||
object
|
||||
(cond
|
||||
((= v1-0 'open)
|
||||
(let ((gp-1 (-> arg3 param 0)))
|
||||
(set! (-> self particles 0 kind)
|
||||
(the-as basic (if (and (nonzero? gp-1) (type-type? (rtype-of gp-1) sparticle-launch-group))
|
||||
gp-1
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> self particles 0 trans quad) (-> self root trans quad))
|
||||
(set! (-> self particles 0 trans y) (+ 12288.0 (-> self particles 0 trans y)))
|
||||
)
|
||||
((= v1-0 'beam-on)
|
||||
(let ((s5-0 (-> arg3 param 0)))
|
||||
(set! (-> self particles 1 kind)
|
||||
(the-as basic (if (and (nonzero? s5-0) (type-type? (rtype-of s5-0) sparticle-launch-group))
|
||||
s5-0
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> self particles 1 trans quad) (-> self root trans quad))
|
||||
(set! (-> self particles 1 trans y) (+ 24576.0 (-> self particles 1 trans y)))
|
||||
(let ((s5-1 (-> arg3 param 1)))
|
||||
(set! (-> self particles 2 kind)
|
||||
(the-as basic (if (and (nonzero? s5-1) (type-type? (rtype-of s5-1) sparticle-launch-group))
|
||||
s5-1
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> self particles 2 trans quad) (-> (the-as vector (-> arg3 param 2)) quad))
|
||||
(set! (-> self particles 2 trans y) (+ 81920.0 (-> self particles 2 trans y)))
|
||||
)
|
||||
((= v1-0 'beam-off)
|
||||
(set! (-> self particles 1 kind) #f)
|
||||
(set! (-> self particles 2 kind) #f)
|
||||
(let ((a0-10 (handle->process (-> self particles 1 tracker))))
|
||||
(if a0-10
|
||||
(deactivate a0-10)
|
||||
(the-as
|
||||
object
|
||||
(case arg2
|
||||
(('open)
|
||||
(let ((gp-1 (-> arg3 param 0)))
|
||||
(set! (-> self particles 0 kind)
|
||||
(the-as basic (if (and (nonzero? gp-1) (type-type? (rtype-of gp-1) sparticle-launch-group))
|
||||
gp-1
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((a0-14 (handle->process (-> self particles 2 tracker))))
|
||||
(if a0-14
|
||||
(deactivate a0-14)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> self particles 0 trans quad) (-> self root trans quad))
|
||||
(set! (-> self particles 0 trans y) (+ 12288.0 (-> self particles 0 trans y)))
|
||||
)
|
||||
(('beam-on)
|
||||
(let ((s5-0 (-> arg3 param 0)))
|
||||
(set! (-> self particles 1 kind)
|
||||
(the-as basic (if (and (nonzero? s5-0) (type-type? (rtype-of s5-0) sparticle-launch-group))
|
||||
s5-0
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> self particles 1 trans quad) (-> self root trans quad))
|
||||
(set! (-> self particles 1 trans y) (+ 24576.0 (-> self particles 1 trans y)))
|
||||
(let ((s5-1 (-> arg3 param 1)))
|
||||
(set! (-> self particles 2 kind)
|
||||
(the-as basic (if (and (nonzero? s5-1) (type-type? (rtype-of s5-1) sparticle-launch-group))
|
||||
s5-1
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> self particles 2 trans quad) (-> (the-as vector (-> arg3 param 2)) quad))
|
||||
(set! (-> self particles 2 trans y) (+ 81920.0 (-> self particles 2 trans y)))
|
||||
)
|
||||
(('beam-off)
|
||||
(set! (-> self particles 1 kind) #f)
|
||||
(set! (-> self particles 2 kind) #f)
|
||||
(let ((a0-10 (handle->process (-> self particles 1 tracker))))
|
||||
(if a0-10
|
||||
(deactivate a0-10)
|
||||
)
|
||||
)
|
||||
(let ((a0-14 (handle->process (-> self particles 2 tracker))))
|
||||
(if a0-14
|
||||
(deactivate a0-14)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
+24
-26
@@ -403,38 +403,36 @@
|
||||
;; definition for function robotboss-handler
|
||||
;; INFO: Return type mismatch number vs object.
|
||||
(defbehavior robotboss-handler robotboss ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(let ((v1-0 arg2))
|
||||
(the-as object (cond
|
||||
((= v1-0 'flash)
|
||||
(set! (-> self palette-val) (* 0.0078125 (the-as float (-> arg3 param 0))))
|
||||
)
|
||||
((= v1-0 'attack)
|
||||
(when (>= arg1 2)
|
||||
(case (-> arg3 param 1)
|
||||
(('eco-yellow)
|
||||
(let ((a0-5 (-> arg3 param 0)))
|
||||
(when (and a0-5 ((method-of-type touching-shapes-entry prims-touching?)
|
||||
(the-as touching-shapes-entry a0-5)
|
||||
(-> self root-override)
|
||||
(the-as uint (-> self vulnerable))
|
||||
)
|
||||
)
|
||||
(when (> (-> self hits-to-go) 0)
|
||||
(set! (-> self took-hit) #t)
|
||||
(let ((v0-0 (the-as number (+ (-> self hits-to-go) -1))))
|
||||
(set! (-> self hits-to-go) (the-as int v0-0))
|
||||
v0-0
|
||||
)
|
||||
(the-as object (case arg2
|
||||
(('flash)
|
||||
(set! (-> self palette-val) (* 0.0078125 (the-as float (-> arg3 param 0))))
|
||||
)
|
||||
(('attack)
|
||||
(when (>= arg1 2)
|
||||
(case (-> arg3 param 1)
|
||||
(('eco-yellow)
|
||||
(let ((a0-5 (-> arg3 param 0)))
|
||||
(when (and a0-5 ((method-of-type touching-shapes-entry prims-touching?)
|
||||
(the-as touching-shapes-entry a0-5)
|
||||
(-> self root-override)
|
||||
(the-as uint (-> self vulnerable))
|
||||
)
|
||||
)
|
||||
(when (> (-> self hits-to-go) 0)
|
||||
(set! (-> self took-hit) #t)
|
||||
(let ((v0-0 (the-as number (+ (-> self hits-to-go) -1))))
|
||||
(set! (-> self hits-to-go) (the-as int v0-0))
|
||||
v0-0
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
|
||||
+13
-13
@@ -203,12 +203,12 @@
|
||||
;; failed to figure out what this is:
|
||||
(defstate spike-up (spike)
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(let ((v1-0 event-type))
|
||||
(the-as object (if (= v1-0 'go-spike-up)
|
||||
#t
|
||||
)
|
||||
)
|
||||
)
|
||||
(the-as object (case event-type
|
||||
(('go-spike-up)
|
||||
#t
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
:trans (behavior ()
|
||||
(when (nonzero? (-> self num-alts))
|
||||
@@ -255,13 +255,13 @@
|
||||
;; failed to figure out what this is:
|
||||
(defstate spike-down (spike)
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(let ((v1-0 event-type))
|
||||
(the-as object (when (= v1-0 'go-spike-up)
|
||||
(go spike-up)
|
||||
#t
|
||||
)
|
||||
)
|
||||
)
|
||||
(the-as object (case event-type
|
||||
(('go-spike-up)
|
||||
(go spike-up)
|
||||
#t
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
:trans (behavior ()
|
||||
(when (nonzero? (-> self num-alts))
|
||||
|
||||
+15
-17
@@ -93,24 +93,22 @@
|
||||
(defstate wait-for-start (flutflut)
|
||||
:virtual #t
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(let ((v1-0 event-type))
|
||||
(the-as
|
||||
object
|
||||
(cond
|
||||
((= v1-0 'trans)
|
||||
(vector+! (the-as vector (-> event param 0)) (-> self root-override trans) (-> self extra-trans))
|
||||
(the-as
|
||||
object
|
||||
(case event-type
|
||||
(('trans)
|
||||
(vector+! (the-as vector (-> event param 0)) (-> self root-override trans) (-> self extra-trans))
|
||||
)
|
||||
(('notify)
|
||||
(let ((v0-1 (the-as structure #t)))
|
||||
(set! (-> self auto-get-off) (the-as symbol v0-1))
|
||||
v0-1
|
||||
)
|
||||
((= v1-0 'notify)
|
||||
(let ((v0-1 (the-as structure #t)))
|
||||
(set! (-> self auto-get-off) (the-as symbol v0-1))
|
||||
v0-1
|
||||
)
|
||||
)
|
||||
((or (= v1-0 'touch) (= v1-0 'attack))
|
||||
(set! (-> self touch-time) (-> *display* base-frame-counter))
|
||||
#f
|
||||
)
|
||||
)
|
||||
)
|
||||
(('touch 'attack)
|
||||
(set! (-> self touch-time) (-> *display* base-frame-counter))
|
||||
#f
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
+22
-24
@@ -142,35 +142,33 @@
|
||||
;; WARN: rewrite_to_get_var got a none typed variable. Is there unreachable code? [OP: 50]
|
||||
;; WARN: rewrite_to_get_var got a none typed variable. Is there unreachable code? [OP: 52]
|
||||
(defbehavior darkvine-event-handler darkvine ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(let ((v1-0 arg2))
|
||||
(the-as object (cond
|
||||
((= v1-0 'touch)
|
||||
(do-push-aways! (-> self root-override))
|
||||
(when (-> self dangerous)
|
||||
(if (send-event arg0 'attack (-> arg3 param 0) (new 'static 'attack-info))
|
||||
(set-collide-offense (-> self root-override) 2 (collide-offense no-offense))
|
||||
)
|
||||
)
|
||||
(the-as object (case arg2
|
||||
(('touch)
|
||||
(do-push-aways! (-> self root-override))
|
||||
(when (-> self dangerous)
|
||||
(if (send-event arg0 'attack (-> arg3 param 0) (new 'static 'attack-info))
|
||||
(set-collide-offense (-> self root-override) 2 (collide-offense no-offense))
|
||||
)
|
||||
)
|
||||
((= v1-0 'attack)
|
||||
(let ((v1-10 (-> arg3 param 2)))
|
||||
(cond
|
||||
((!= v1-10 (-> self player-attack-id))
|
||||
(set! (-> self player-attack-id) (the-as int v1-10))
|
||||
(when (-> self vulnerable)
|
||||
(do-push-aways! (-> self root-override))
|
||||
(go darkvine-retreat)
|
||||
)
|
||||
)
|
||||
(('attack)
|
||||
(let ((v1-10 (-> arg3 param 2)))
|
||||
(cond
|
||||
((!= v1-10 (-> self player-attack-id))
|
||||
(set! (-> self player-attack-id) (the-as int v1-10))
|
||||
(when (-> self vulnerable)
|
||||
(do-push-aways! (-> self root-override))
|
||||
(go darkvine-retreat)
|
||||
)
|
||||
(else
|
||||
'push
|
||||
)
|
||||
)
|
||||
(else
|
||||
'push
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
|
||||
+21
-23
@@ -1824,29 +1824,27 @@
|
||||
:virtual #t
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(local-vars (v0-0 rgbaf))
|
||||
(let ((v1-0 event-type))
|
||||
(the-as object (cond
|
||||
((= v1-0 'emissive-on)
|
||||
(set-vector! (-> self draw color-mult) 0.6 0.6 0.6 1.0)
|
||||
(set! v0-0 (-> self draw color-emissive))
|
||||
(set! (-> v0-0 x) 0.6)
|
||||
(set! (-> v0-0 y) 0.6)
|
||||
(set! (-> v0-0 z) 0.6)
|
||||
(set! (-> v0-0 w) 0.0)
|
||||
v0-0
|
||||
)
|
||||
((= v1-0 'emissive-off)
|
||||
(set-vector! (-> self draw color-mult) 1.0 1.0 1.0 1.0)
|
||||
(set! v0-0 (-> self draw color-emissive))
|
||||
(set! (-> v0-0 x) 0.0)
|
||||
(set! (-> v0-0 y) 0.0)
|
||||
(set! (-> v0-0 z) 0.0)
|
||||
(set! (-> v0-0 w) 0.0)
|
||||
v0-0
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(the-as object (case event-type
|
||||
(('emissive-on)
|
||||
(set-vector! (-> self draw color-mult) 0.6 0.6 0.6 1.0)
|
||||
(set! v0-0 (-> self draw color-emissive))
|
||||
(set! (-> v0-0 x) 0.6)
|
||||
(set! (-> v0-0 y) 0.6)
|
||||
(set! (-> v0-0 z) 0.6)
|
||||
(set! (-> v0-0 w) 0.0)
|
||||
v0-0
|
||||
)
|
||||
(('emissive-off)
|
||||
(set-vector! (-> self draw color-mult) 1.0 1.0 1.0 1.0)
|
||||
(set! v0-0 (-> self draw color-emissive))
|
||||
(set! (-> v0-0 x) 0.0)
|
||||
(set! (-> v0-0 y) 0.0)
|
||||
(set! (-> v0-0 z) 0.0)
|
||||
(set! (-> v0-0 w) 0.0)
|
||||
v0-0
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
:trans (behavior ()
|
||||
(when (-> self training)
|
||||
|
||||
+41
-41
@@ -211,13 +211,13 @@
|
||||
;; failed to figure out what this is:
|
||||
(defstate lurkerm-tall-sail-idle (lurkerm-tall-sail)
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(let ((v1-0 event-type))
|
||||
(the-as object (when (= v1-0 'stop)
|
||||
(process-entity-status! self (entity-perm-status complete) #t)
|
||||
(set! (-> self speed) 0.0)
|
||||
)
|
||||
)
|
||||
)
|
||||
(the-as object (case event-type
|
||||
(('stop)
|
||||
(process-entity-status! self (entity-perm-status complete) #t)
|
||||
(set! (-> self speed) 0.0)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
:trans (the-as (function none :behavior lurkerm-tall-sail) rider-trans)
|
||||
:code (behavior ()
|
||||
@@ -317,13 +317,13 @@
|
||||
;; failed to figure out what this is:
|
||||
(defstate lurkerm-short-sail-idle (lurkerm-short-sail)
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(let ((v1-0 event-type))
|
||||
(the-as object (when (= v1-0 'stop)
|
||||
(process-entity-status! self (entity-perm-status complete) #t)
|
||||
(set! (-> self speed) 0.0)
|
||||
)
|
||||
)
|
||||
)
|
||||
(the-as object (case event-type
|
||||
(('stop)
|
||||
(process-entity-status! self (entity-perm-status complete) #t)
|
||||
(set! (-> self speed) 0.0)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
:trans (the-as (function none :behavior lurkerm-short-sail) rider-trans)
|
||||
:code (behavior ()
|
||||
@@ -446,13 +446,13 @@
|
||||
;; failed to figure out what this is:
|
||||
(defstate lurkerm-piston-idle (lurkerm-piston)
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(let ((v1-0 event-type))
|
||||
(the-as object (when (= v1-0 'stop)
|
||||
(process-entity-status! self (entity-perm-status complete) #t)
|
||||
(set! (-> self speed) 0.0)
|
||||
)
|
||||
)
|
||||
)
|
||||
(the-as object (case event-type
|
||||
(('stop)
|
||||
(process-entity-status! self (entity-perm-status complete) #t)
|
||||
(set! (-> self speed) 0.0)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
:trans (the-as (function none :behavior lurkerm-piston) rider-trans)
|
||||
:code (behavior ()
|
||||
@@ -573,13 +573,13 @@
|
||||
;; failed to figure out what this is:
|
||||
(defstate accordian-idle (accordian)
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(let ((v1-0 event-type))
|
||||
(the-as object (when (= v1-0 'stop)
|
||||
(process-entity-status! self (entity-perm-status complete) #t)
|
||||
(set! (-> self speed) 0.0)
|
||||
)
|
||||
)
|
||||
)
|
||||
(the-as object (case event-type
|
||||
(('stop)
|
||||
(process-entity-status! self (entity-perm-status complete) #t)
|
||||
(set! (-> self speed) 0.0)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
:code (behavior ()
|
||||
(ja-no-eval :num! (loop!) :frame-num 0.0)
|
||||
@@ -838,19 +838,19 @@
|
||||
;; failed to figure out what this is:
|
||||
(defstate precurbridge-active (precurbridge)
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(let ((v1-0 event-type))
|
||||
(the-as
|
||||
object
|
||||
(when (= v1-0 'bonk)
|
||||
(let* ((gp-0 (the-as object (-> event param 0)))
|
||||
(a0-2 (-> (the-as touching-shapes-entry gp-0) head))
|
||||
(s5-0 (-> self root-override))
|
||||
)
|
||||
(get-touched-prim a0-2 s5-0 (the-as touching-shapes-entry gp-0))
|
||||
((method-of-type touching-shapes-entry get-touched-shape) (the-as touching-shapes-entry gp-0) s5-0)
|
||||
)
|
||||
(activate! (-> self smush) -1.0 150 600 1.0 1.0)
|
||||
)
|
||||
(the-as
|
||||
object
|
||||
(case event-type
|
||||
(('bonk)
|
||||
(let* ((gp-0 (the-as object (-> event param 0)))
|
||||
(a0-2 (-> (the-as touching-shapes-entry gp-0) head))
|
||||
(s5-0 (-> self root-override))
|
||||
)
|
||||
(get-touched-prim a0-2 s5-0 (the-as touching-shapes-entry gp-0))
|
||||
((method-of-type touching-shapes-entry get-touched-shape) (the-as touching-shapes-entry gp-0) s5-0)
|
||||
)
|
||||
(activate! (-> self smush) -1.0 150 600 1.0 1.0)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
+11
-11
@@ -199,18 +199,18 @@
|
||||
;; failed to figure out what this is:
|
||||
(defstate eggtop-idle (eggtop)
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(let ((v1-0 event-type))
|
||||
(the-as object (when (= v1-0 'notify)
|
||||
(case (-> event param 0)
|
||||
(('pickup)
|
||||
(if (type-type? (-> proc type) fuel-cell)
|
||||
(save-reminder (get-task-control (-> self entity extra perm task)) 1 0)
|
||||
)
|
||||
)
|
||||
(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 0)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
:exit (behavior ()
|
||||
(sound-stop (-> self sound-id))
|
||||
|
||||
+10
-12
@@ -51,18 +51,16 @@
|
||||
;; failed to figure out what this is:
|
||||
(defstate plat-flip-idle (plat-flip)
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(let ((v1-0 event-type))
|
||||
(the-as object (cond
|
||||
((= v1-0 'bonk)
|
||||
(activate! (-> self smush) -1.0 90 300 1.0 1.0)
|
||||
)
|
||||
((= v1-0 'touch)
|
||||
(send-event proc 'no-look-around (seconds 1.5))
|
||||
(the-as smush-control #f)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(the-as object (case event-type
|
||||
(('bonk)
|
||||
(activate! (-> self smush) -1.0 90 300 1.0 1.0)
|
||||
)
|
||||
(('touch)
|
||||
(send-event proc 'no-look-around (seconds 1.5))
|
||||
(the-as smush-control #f)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
:trans (the-as (function none :behavior plat-flip) rider-trans)
|
||||
:code (behavior ()
|
||||
|
||||
+40
-40
@@ -426,12 +426,12 @@
|
||||
;; definition for function energydoor-open-handler
|
||||
;; INFO: Return type mismatch symbol vs object.
|
||||
(defbehavior energydoor-open-handler energydoor ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(let ((v1-0 arg2))
|
||||
(the-as object (if (= v1-0 'open?)
|
||||
#t
|
||||
)
|
||||
)
|
||||
)
|
||||
(the-as object (case arg2
|
||||
(('open?)
|
||||
#t
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for function energydoor-closed-handler
|
||||
@@ -862,28 +862,28 @@
|
||||
;; failed to figure out what this is:
|
||||
(defstate energyball-idle (energyball)
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(let ((v1-0 event-type))
|
||||
(the-as object (when (= v1-0 'attack)
|
||||
(when (and (>= arg1 2) (= (-> event param 1) 'eco-yellow))
|
||||
(increment-success-for-hint (game-text-id lavatube-balls))
|
||||
(sound-play "dcrate-break")
|
||||
(process-spawn
|
||||
part-tracker
|
||||
:init part-tracker-init
|
||||
(-> *part-group-id-table* 546)
|
||||
600
|
||||
#f
|
||||
#f
|
||||
#f
|
||||
(-> self root-override trans)
|
||||
:to *entity-pool*
|
||||
)
|
||||
(cleanup-for-death self)
|
||||
(deactivate self)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(the-as object (case event-type
|
||||
(('attack)
|
||||
(when (and (>= arg1 2) (= (-> event param 1) 'eco-yellow))
|
||||
(increment-success-for-hint (game-text-id lavatube-balls))
|
||||
(sound-play "dcrate-break")
|
||||
(process-spawn
|
||||
part-tracker
|
||||
:init part-tracker-init
|
||||
(-> *part-group-id-table* 546)
|
||||
600
|
||||
#f
|
||||
#f
|
||||
#f
|
||||
(-> self root-override trans)
|
||||
:to *entity-pool*
|
||||
)
|
||||
(cleanup-for-death self)
|
||||
(deactivate self)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
:trans (behavior ()
|
||||
(rider-trans)
|
||||
@@ -1351,12 +1351,12 @@
|
||||
;; failed to figure out what this is:
|
||||
(defstate energyhub-stop (energyhub)
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(let ((v1-0 event-type))
|
||||
(the-as object (if (= v1-0 'flash)
|
||||
(set! (-> self palette-val) 1.9921875)
|
||||
)
|
||||
)
|
||||
)
|
||||
(the-as object (case event-type
|
||||
(('flash)
|
||||
(set! (-> self palette-val) 1.9921875)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
:enter (behavior ()
|
||||
(set! (-> self rotation-speed target) 0.0)
|
||||
@@ -1433,12 +1433,12 @@
|
||||
;; failed to figure out what this is:
|
||||
(defstate energyhub-idle (energyhub)
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(let ((v1-0 event-type))
|
||||
(the-as object (if (= v1-0 'flash)
|
||||
(set! (-> self palette-val) 1.9921875)
|
||||
)
|
||||
)
|
||||
)
|
||||
(the-as object (case event-type
|
||||
(('flash)
|
||||
(set! (-> self palette-val) 1.9921875)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
:trans (behavior ()
|
||||
(if (nonzero? (-> self sound))
|
||||
|
||||
+32
-32
@@ -1224,14 +1224,14 @@
|
||||
;; failed to figure out what this is:
|
||||
(defstate gnawer-dying-give-pickups (gnawer)
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(let ((v1-0 event-type))
|
||||
(the-as object (when (= v1-0 'notify)
|
||||
(if (and (= (-> proc type) money) (= (-> event param 0) 'pickup))
|
||||
(dummy-30 self (the-as process-drawable proc))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(the-as object (case event-type
|
||||
(('notify)
|
||||
(if (and (= (-> proc type) money) (= (-> event param 0) 'pickup))
|
||||
(dummy-30 self (the-as process-drawable proc))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
:trans (behavior ()
|
||||
(spool-push *art-control* "maincavecam-gnawer-fuel-cell" 0 self -1.0)
|
||||
@@ -1296,23 +1296,23 @@
|
||||
;; failed to figure out what this is:
|
||||
(defstate gnawer-give-fuel-cell (gnawer)
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(let ((v1-0 event-type))
|
||||
(the-as object (when (= v1-0 'notify)
|
||||
(cond
|
||||
((and (= (-> proc type) maincavecam) (= (-> event param 0) 'die))
|
||||
(process-entity-status! self (entity-perm-status bit-3) #f)
|
||||
(let ((v0-0 (the-as uint (logior (-> self mask) (process-mask actor-pause)))))
|
||||
(set! (-> self mask) (the-as process-mask v0-0))
|
||||
v0-0
|
||||
)
|
||||
)
|
||||
((and (= (-> proc type) money) (= (-> event param 0) 'pickup))
|
||||
(dummy-30 self (the-as process-drawable proc))
|
||||
)
|
||||
(the-as object (case event-type
|
||||
(('notify)
|
||||
(cond
|
||||
((and (= (-> proc type) maincavecam) (= (-> event param 0) 'die))
|
||||
(process-entity-status! self (entity-perm-status bit-3) #f)
|
||||
(let ((v0-0 (the-as uint (logior (-> self mask) (process-mask actor-pause)))))
|
||||
(set! (-> self mask) (the-as process-mask v0-0))
|
||||
v0-0
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
((and (= (-> proc type) money) (= (-> event param 0) 'pickup))
|
||||
(dummy-30 self (the-as process-drawable proc))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
:code (behavior ()
|
||||
(when (not (task-complete? *game-info* (-> self entity extra perm task)))
|
||||
@@ -1365,14 +1365,14 @@
|
||||
;; failed to figure out what this is:
|
||||
(defstate gnawer-put-items-at-dest (gnawer)
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(let ((v1-0 event-type))
|
||||
(the-as object (when (= v1-0 'notify)
|
||||
(if (and (= (-> proc type) money) (= (-> event param 0) 'pickup))
|
||||
(dummy-30 self (the-as process-drawable proc))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(the-as object (case event-type
|
||||
(('notify)
|
||||
(if (and (= (-> proc type) money) (= (-> event param 0) 'pickup))
|
||||
(dummy-30 self (the-as process-drawable proc))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
:code (behavior ()
|
||||
(set! (-> self draw origin-joint-index) (the-as uint 0))
|
||||
|
||||
+38
-38
@@ -162,21 +162,21 @@
|
||||
;; failed to figure out what this is:
|
||||
(defstate cavecrusher-idle (cavecrusher)
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(let ((v1-0 event-type))
|
||||
(the-as object (when (or (= v1-0 'touch) (= v1-0 '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)
|
||||
(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
|
||||
@@ -1066,12 +1066,12 @@
|
||||
;; failed to figure out what this is:
|
||||
(defstate caveelevator-cycle-active (caveelevator)
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(let ((v1-0 event-type))
|
||||
(the-as object (if (= v1-0 'bonk)
|
||||
(activate! (-> self smush) -1.0 60 150 1.0 1.0)
|
||||
)
|
||||
)
|
||||
)
|
||||
(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))
|
||||
@@ -1149,12 +1149,12 @@
|
||||
;; failed to figure out what this is:
|
||||
(defstate caveelevator-one-way-travel-to-end (caveelevator)
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(let ((v1-0 event-type))
|
||||
(the-as object (if (= v1-0 'bonk)
|
||||
(activate! (-> self smush) -1.0 60 150 1.0 1.0)
|
||||
)
|
||||
)
|
||||
)
|
||||
(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))
|
||||
@@ -1189,12 +1189,12 @@
|
||||
;; failed to figure out what this is:
|
||||
(defstate caveelevator-one-way-idle-end (caveelevator)
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(let ((v1-0 event-type))
|
||||
(the-as object (if (= v1-0 'bonk)
|
||||
(activate! (-> self smush) -1.0 60 150 1.0 1.0)
|
||||
)
|
||||
)
|
||||
)
|
||||
(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))
|
||||
@@ -1232,12 +1232,12 @@
|
||||
;; failed to figure out what this is:
|
||||
(defstate caveelevator-one-way-travel-to-start (caveelevator)
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(let ((v1-0 event-type))
|
||||
(the-as object (if (= v1-0 'bonk)
|
||||
(activate! (-> self smush) -1.0 60 150 1.0 1.0)
|
||||
)
|
||||
)
|
||||
)
|
||||
(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))
|
||||
|
||||
+15
-17
@@ -289,24 +289,22 @@
|
||||
;; failed to figure out what this is:
|
||||
(defstate mother-spider-egg-on-ground (mother-spider-egg)
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(let ((v1-0 event-type))
|
||||
(the-as object (cond
|
||||
((= v1-0 'touch)
|
||||
(send-shove-back
|
||||
(-> self root-override)
|
||||
proc
|
||||
(the-as touching-shapes-entry (-> event param 0))
|
||||
0.7
|
||||
6144.0
|
||||
16384.0
|
||||
)
|
||||
(the-as object (case event-type
|
||||
(('touch)
|
||||
(send-shove-back
|
||||
(-> self root-override)
|
||||
proc
|
||||
(the-as touching-shapes-entry (-> event param 0))
|
||||
0.7
|
||||
6144.0
|
||||
16384.0
|
||||
)
|
||||
((= v1-0 'attack)
|
||||
(go mother-spider-egg-die)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(('attack)
|
||||
(go mother-spider-egg-die)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
:enter (behavior ()
|
||||
(set! (-> self state-time) (-> *display* base-frame-counter))
|
||||
|
||||
+12
-12
@@ -126,18 +126,18 @@
|
||||
;; definition for function bonelurker-stunned-event-handler
|
||||
;; INFO: Return type mismatch symbol vs object.
|
||||
(defbehavior bonelurker-stunned-event-handler bonelurker ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(let ((v1-0 arg2))
|
||||
(the-as object (when (= v1-0 'attack)
|
||||
(when (>= (- (-> *display* base-frame-counter) (-> self state-time)) (seconds 0.5))
|
||||
(nav-enemy-set-hit-from-direction arg0)
|
||||
(send-event arg0 'get-attack-count 1)
|
||||
(logclear! (-> self mask) (process-mask actor-pause))
|
||||
(go-virtual nav-enemy-die)
|
||||
'die
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(the-as object (case arg2
|
||||
(('attack)
|
||||
(when (>= (- (-> *display* base-frame-counter) (-> self state-time)) (seconds 0.5))
|
||||
(nav-enemy-set-hit-from-direction arg0)
|
||||
(send-event arg0 'get-attack-count 1)
|
||||
(logclear! (-> self mask) (process-mask actor-pause))
|
||||
(go-virtual nav-enemy-die)
|
||||
'die
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
|
||||
+21
-21
@@ -169,27 +169,27 @@
|
||||
;; definition for function keg-event-handler
|
||||
;; INFO: Return type mismatch none vs object.
|
||||
(defbehavior keg-event-handler keg ((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 (send-event arg0 'attack (-> arg3 param 0) (new 'static 'attack-info))
|
||||
(sound-play "icrate-break")
|
||||
(process-spawn
|
||||
part-tracker
|
||||
:init part-tracker-init
|
||||
(-> *part-group-id-table* 71)
|
||||
20
|
||||
#f
|
||||
#f
|
||||
#f
|
||||
(-> self root-override trans)
|
||||
:to *entity-pool*
|
||||
)
|
||||
(sound-stop (-> self sound-id))
|
||||
(deactivate self)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(the-as object (case arg2
|
||||
(('touch 'attack)
|
||||
(when (send-event arg0 'attack (-> arg3 param 0) (new 'static 'attack-info))
|
||||
(sound-play "icrate-break")
|
||||
(process-spawn
|
||||
part-tracker
|
||||
:init part-tracker-init
|
||||
(-> *part-group-id-table* 71)
|
||||
20
|
||||
#f
|
||||
#f
|
||||
#f
|
||||
(-> self root-override trans)
|
||||
:to *entity-pool*
|
||||
)
|
||||
(sound-stop (-> self sound-id))
|
||||
(deactivate self)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for function keg-post
|
||||
|
||||
+15
-15
@@ -1813,21 +1813,21 @@
|
||||
;; failed to figure out what this is:
|
||||
(defstate mistycannon-waiting-for-player-to-fuck-off (mistycannon)
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(let ((v1-0 event-type))
|
||||
(the-as object (when (= v1-0 'touch)
|
||||
(when ((method-of-type touching-shapes-entry prims-touching?)
|
||||
(the-as touching-shapes-entry (-> event param 0))
|
||||
(-> self root-override)
|
||||
(the-as uint 1)
|
||||
)
|
||||
(let ((v0-0 (-> *display* base-frame-counter)))
|
||||
(set! (-> self state-time) v0-0)
|
||||
v0-0
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(the-as object (case event-type
|
||||
(('touch)
|
||||
(when ((method-of-type touching-shapes-entry prims-touching?)
|
||||
(the-as touching-shapes-entry (-> event param 0))
|
||||
(-> self root-override)
|
||||
(the-as uint 1)
|
||||
)
|
||||
(let ((v0-0 (-> *display* base-frame-counter)))
|
||||
(set! (-> self state-time) v0-0)
|
||||
v0-0
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
:enter (behavior ()
|
||||
(set! (-> self state-time) (-> *display* base-frame-counter))
|
||||
|
||||
+90
-92
@@ -173,15 +173,15 @@
|
||||
;; failed to figure out what this is:
|
||||
(defstate plunger-lurker-flee (plunger-lurker)
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(let ((v1-0 event-type))
|
||||
(the-as object (when (= v1-0 'attack)
|
||||
(let ((v0-0 #t))
|
||||
(set! (-> self got-hit) v0-0)
|
||||
v0-0
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(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)
|
||||
@@ -642,105 +642,103 @@
|
||||
;; failed to figure out what this is:
|
||||
(defstate flying-lurker-fly (flying-lurker)
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(let ((v1-0 event-type))
|
||||
(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
|
||||
(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 (-> event param 0)) "")
|
||||
)
|
||||
((= v1-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
|
||||
(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) 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
|
||||
(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) 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
|
||||
(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)
|
||||
|
||||
+35
-35
@@ -509,17 +509,17 @@
|
||||
(defstate rigid-body-platform-idle (ogre-plat)
|
||||
:virtual #t
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(let ((v1-0 event-type))
|
||||
(the-as object (when (= v1-0 'trigger)
|
||||
(set! (-> self triggered) (the-as entity-actor #t))
|
||||
(set! (-> self delay) (the-as time-frame (-> event param 0)))
|
||||
(let ((v0-0 (-> *display* base-frame-counter)))
|
||||
(set! (-> self state-time) v0-0)
|
||||
v0-0
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(the-as object (case event-type
|
||||
(('trigger)
|
||||
(set! (-> self triggered) (the-as entity-actor #t))
|
||||
(set! (-> self delay) (the-as time-frame (-> event param 0)))
|
||||
(let ((v0-0 (-> *display* base-frame-counter)))
|
||||
(set! (-> self state-time) v0-0)
|
||||
v0-0
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
:trans (behavior ()
|
||||
(cond
|
||||
@@ -1116,30 +1116,30 @@
|
||||
;; failed to figure out what this is:
|
||||
(defstate ogre-bridge-break (ogre-bridge)
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(let ((v1-0 event-type))
|
||||
(the-as object (when (= v1-0 'effect)
|
||||
(when (= (-> event param 0) 'splash)
|
||||
(let ((gp-0 (new 'stack-no-clear 'vector)))
|
||||
(let ((a1-1 (-> event param 2)))
|
||||
(set! (-> gp-0 quad) (-> self node-list data a1-1 bone transform vector 3 quad))
|
||||
)
|
||||
(set! (-> gp-0 y) 118784.0)
|
||||
(process-spawn
|
||||
part-tracker
|
||||
:init part-tracker-init
|
||||
(-> *part-group-id-table* 466)
|
||||
-1
|
||||
#f
|
||||
#f
|
||||
#f
|
||||
gp-0
|
||||
:to *entity-pool*
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(the-as object (case event-type
|
||||
(('effect)
|
||||
(when (= (-> event param 0) 'splash)
|
||||
(let ((gp-0 (new 'stack-no-clear 'vector)))
|
||||
(let ((a1-1 (-> event param 2)))
|
||||
(set! (-> gp-0 quad) (-> self node-list data a1-1 bone transform vector 3 quad))
|
||||
)
|
||||
(set! (-> gp-0 y) 118784.0)
|
||||
(process-spawn
|
||||
part-tracker
|
||||
:init part-tracker-init
|
||||
(-> *part-group-id-table* 466)
|
||||
-1
|
||||
#f
|
||||
#f
|
||||
#f
|
||||
gp-0
|
||||
:to *entity-pool*
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
:code (behavior ()
|
||||
(ja-no-eval :group! (-> self draw art-group data 4) :num! (seek!) :frame-num 0.0)
|
||||
|
||||
+32
-32
@@ -1752,41 +1752,41 @@
|
||||
;; definition for function ogreboss-attack-event-handler
|
||||
;; INFO: Return type mismatch symbol vs object.
|
||||
(defbehavior ogreboss-attack-event-handler ogreboss ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(let ((v1-0 arg2))
|
||||
(the-as object (when (= v1-0 'attack)
|
||||
(when (-> self vulnerable)
|
||||
(if ((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 128)
|
||||
)
|
||||
(ja :chan 1 :group! ogreboss-hit-crotch-ja :num! min :frame-interp 0.0)
|
||||
(ja :chan 1 :group! ogreboss-hit-chest-ja :num! min :frame-interp 0.0)
|
||||
(the-as object (case arg2
|
||||
(('attack)
|
||||
(when (-> self vulnerable)
|
||||
(if ((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 128)
|
||||
)
|
||||
(set! (-> self hit-time) (-> *display* base-frame-counter))
|
||||
(let ((v1-17 (rand-vu-int-range 0 2)))
|
||||
(cond
|
||||
((zero? v1-17)
|
||||
(sound-play "ogre-grunt1" :position (the-as symbol (-> self root-override trans)))
|
||||
)
|
||||
((= v1-17 1)
|
||||
(sound-play "ogre-grunt2" :position (the-as symbol (-> self root-override trans)))
|
||||
)
|
||||
(else
|
||||
(sound-play "ogre-grunt3" :position (the-as symbol (-> self root-override trans)))
|
||||
)
|
||||
(ja :chan 1 :group! ogreboss-hit-crotch-ja :num! min :frame-interp 0.0)
|
||||
(ja :chan 1 :group! ogreboss-hit-chest-ja :num! min :frame-interp 0.0)
|
||||
)
|
||||
(set! (-> self hit-time) (-> *display* base-frame-counter))
|
||||
(let ((v1-17 (rand-vu-int-range 0 2)))
|
||||
(cond
|
||||
((zero? v1-17)
|
||||
(sound-play "ogre-grunt1" :position (the-as symbol (-> self root-override trans)))
|
||||
)
|
||||
)
|
||||
(+! (-> self hit-count) 1)
|
||||
(if (>= (-> self hit-count) (-> self max-hit-count))
|
||||
(go ogreboss-stage3-hit)
|
||||
((= v1-17 1)
|
||||
(sound-play "ogre-grunt2" :position (the-as symbol (-> self root-override trans)))
|
||||
)
|
||||
(send-event (handle->process (-> self boulder)) 'speedup)
|
||||
)
|
||||
#t
|
||||
)
|
||||
)
|
||||
)
|
||||
(else
|
||||
(sound-play "ogre-grunt3" :position (the-as symbol (-> self root-override trans)))
|
||||
)
|
||||
)
|
||||
)
|
||||
(+! (-> self hit-count) 1)
|
||||
(if (>= (-> self hit-count) (-> self max-hit-count))
|
||||
(go ogreboss-stage3-hit)
|
||||
)
|
||||
(send-event (handle->process (-> self boulder)) 'speedup)
|
||||
)
|
||||
#t
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
|
||||
+22
-24
@@ -101,32 +101,30 @@
|
||||
:virtual #t
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(local-vars (v0-1 structure))
|
||||
(let ((v1-0 event-type))
|
||||
(the-as
|
||||
object
|
||||
(cond
|
||||
((= v1-0 'trans)
|
||||
(vector+! (the-as vector (-> event 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
|
||||
((-> 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
|
||||
)
|
||||
(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
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
+22
-24
@@ -52,31 +52,29 @@
|
||||
(defstate spider-egg-idle (spider-egg)
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(local-vars (v0-0 none))
|
||||
(let ((v1-0 event-type))
|
||||
(the-as object (cond
|
||||
((= v1-0 'touch)
|
||||
(send-shove-back
|
||||
(-> self root-override)
|
||||
proc
|
||||
(the-as touching-shapes-entry (-> event param 0))
|
||||
0.7
|
||||
6144.0
|
||||
16384.0
|
||||
)
|
||||
(the-as object (case event-type
|
||||
(('touch)
|
||||
(send-shove-back
|
||||
(-> self root-override)
|
||||
proc
|
||||
(the-as touching-shapes-entry (-> event param 0))
|
||||
0.7
|
||||
6144.0
|
||||
16384.0
|
||||
)
|
||||
((= v1-0 'can-spawn?)
|
||||
(return (the-as object #t))
|
||||
v0-0
|
||||
)
|
||||
((= v1-0 'notify-spawned)
|
||||
(go spider-egg-hatch)
|
||||
)
|
||||
((= v1-0 'attack)
|
||||
(go spider-egg-die)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(('can-spawn?)
|
||||
(return (the-as object #t))
|
||||
v0-0
|
||||
)
|
||||
(('notify-spawned)
|
||||
(go spider-egg-hatch)
|
||||
)
|
||||
(('attack)
|
||||
(go spider-egg-die)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
:enter (behavior ((arg0 symbol))
|
||||
(set! (-> self state-time) (-> *display* base-frame-counter))
|
||||
|
||||
+9
-9
@@ -1300,15 +1300,15 @@
|
||||
;; failed to figure out what this is:
|
||||
(defstate peeper-wait (peeper)
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(let ((v1-0 event-type))
|
||||
(the-as object (when (= v1-0 'hide)
|
||||
(let ((v0-0 (-> *display* base-frame-counter)))
|
||||
(set! (-> self state-time) v0-0)
|
||||
v0-0
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(the-as object (case event-type
|
||||
(('hide)
|
||||
(let ((v0-0 (-> *display* base-frame-counter)))
|
||||
(set! (-> self state-time) v0-0)
|
||||
v0-0
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
:enter (behavior ()
|
||||
(if (nonzero? (-> self sound))
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user