[decomp] collectables + works ingame! (#971)

* decomp: `collectables`

* fix types

* `powerups` and fixes

* fixes

* Merge branch 'pr/929' into d/temp/collectables

* fix collide stuff

* update things...

* update

* update

* temp bump global heap mem

* fix `defstate` hooks wrong/unnecessary sets & collide stuff for collectables

* dumb mistakes :)

* stub out broken process-drawable stuff

* update refs

* add `:no-inspect` key and save some memory & remove birth logs

* Update kmachine.h

* clang

* add citadel

* fix no-inspect key

* fix tests!!

* fix stupid mistake in `collide-shape-prim-sphere` alloc

* comment annoying print

* feedback

* fix edge-case probably

* remove `:no-inspect`s
This commit is contained in:
ManDude 2021-11-23 23:25:57 +00:00 committed by GitHub
parent f642935d10
commit 25b0e1be7d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
246 changed files with 13131 additions and 2505 deletions

View File

@ -226,6 +226,7 @@ bool Type::common_type_info_equal(const Type& other) const {
m_allow_in_runtime == other.m_allow_in_runtime &&
m_runtime_name == other.m_runtime_name &&
m_is_boxed == other.m_is_boxed &&
m_generate_inspect == other.m_generate_inspect &&
m_heap_base == other.m_heap_base;
// clang-format on
}
@ -292,6 +293,10 @@ std::string Type::common_type_info_diff(const Type& other) const {
if (m_heap_base != other.m_heap_base) {
result += fmt::format("heap_base: {} vs. {}\n", m_heap_base, other.m_heap_base);
}
if (m_generate_inspect != other.m_generate_inspect) {
result +=
fmt::format("generate_inspect: {} vs. {}\n", m_generate_inspect, other.m_generate_inspect);
}
return result;
}

View File

@ -102,6 +102,8 @@ class Type {
int heap_base() const { return m_heap_base; }
bool gen_inspect() const { return m_generate_inspect; }
protected:
Type(std::string parent, std::string name, bool is_boxed, int heap_base);
virtual std::string diff_impl(const Type& other) const = 0;
@ -111,6 +113,7 @@ class Type {
std::map<std::string, TypeSpec> m_states;
MethodInfo m_new_method_info;
bool m_new_method_info_defined = false;
bool m_generate_inspect = true;
std::string m_parent; // the parent type (is empty for none and object)
std::string m_name;
@ -276,6 +279,7 @@ class StructureType : public ReferenceType {
bool is_packed() const { return m_pack; }
bool is_allowed_misalign() const { return m_allow_misalign; };
void set_allow_misalign(bool misalign) { m_allow_misalign = misalign; }
void set_gen_inspect(bool gen_inspect) { m_generate_inspect = gen_inspect; }
protected:
friend class TypeSystem;
@ -343,6 +347,7 @@ class BitFieldType : public ValueType {
bool operator==(const Type& other) const override;
const std::vector<BitField>& fields() const { return m_fields; }
std::string diff_impl(const Type& other) const override;
void set_gen_inspect(bool gen_inspect) { m_generate_inspect = gen_inspect; }
private:
friend class TypeSystem;

View File

@ -1633,6 +1633,9 @@ std::string TypeSystem::generate_deftype_footer(const Type* type) const {
flags.methods = method_count;
result.append(fmt::format(" :flag-assert #x{:x}\n ", flags.flag));
if (!type->gen_inspect()) {
result.append(":no-inspect\n ");
}
std::string methods_string;
auto new_info = type->get_new_method_defined_for_type();

View File

@ -335,6 +335,8 @@ StructureDefResult parse_structure_def(StructureType* type,
rest = cdr(rest);
} else if (opt_name == ":no-runtime-type") {
result.generate_runtime_type = false;
} else if (opt_name == ":no-inspect") {
type->set_gen_inspect(false);
} else if (opt_name == ":pack-me") {
result.pack_me = true;
} else if (opt_name == ":heap-base") {
@ -441,6 +443,8 @@ BitFieldTypeDefResult parse_bitfield_type_def(BitFieldType* type,
rest = cdr(rest);
} else if (opt_name == ":no-runtime-type") {
result.generate_runtime_type = false;
} else if (opt_name == ":no-inspect") {
type->set_gen_inspect(false);
} else if (opt_name == ":heap-base") {
u16 hb = get_int(car(rest));
rest = cdr(rest);

View File

@ -131,4 +131,20 @@ std::optional<TypeSpec> get_state_type_from_enter_and_code(const TypeSpec& enter
} else {
return {};
}
}
}
std::optional<TypeSpec> get_state_type_from_func(const TypeSpec& func_type,
const TypeSpec& proc_type) {
bool real_func = func_type.base_type() == "function" && func_type.arg_count() > 0;
if (real_func) {
TypeSpec result("state");
for (int i = 0; i < (int)func_type.arg_count() - 1; i++) {
result.add_arg(func_type.get_arg(i));
}
result.add_arg(proc_type);
return result;
} else {
return {};
}
}

View File

@ -20,4 +20,6 @@ TypeSpec get_state_handler_type(StateHandler kind, const TypeSpec& state_type);
std::optional<TypeSpec> get_state_type_from_enter_and_code(const TypeSpec& enter_func_type,
const TypeSpec& code_func_type,
const TypeSpec& proc_type,
const TypeSystem& ts);
const TypeSystem& ts);
std::optional<TypeSpec> get_state_type_from_func(const TypeSpec& func_type,
const TypeSpec& proc_type);

View File

@ -395,7 +395,7 @@ std::optional<RegisterAccess> rewrite_to_get_var(std::vector<FormElement*>& defa
auto cast = last_op_as_set->required_cast(env);
if (cast && cast == TypeSpec("none")) {
env.func->warnings.general_warning(
"rewrite_to_get_var got a none typed variable. Is there unreachable code?. [OP: {}]",
"rewrite_to_get_var got a none typed variable. Is there unreachable code? [OP: {}]",
last_op_as_set->dst().idx());
cast = std::nullopt;
}

View File

@ -628,7 +628,7 @@ std::string ObjectFileDB::ir2_to_file(ObjectFileData& data, const Config& config
try {
result += ir2_function_to_string(data, func, seg);
} catch (std::exception& e) {
result += "Failed to write";
result += "Failed to write ";
result += func.name();
result += ": ";
result += e.what();

View File

@ -163,9 +163,8 @@ void clean_up_return_final(const Function& f, ReturnElement* ir) {
}
if (!dead) {
lg::error("failed to recognize dead code after return, got {}",
ir->dead_code->to_string(f.ir2.env));
throw std::runtime_error("failed to recognize dead code");
throw std::runtime_error(fmt::format("failed to recognize dead code after return, got {}",
ir->dead_code->to_string(f.ir2.env)));
}
assert(dead);
auto src = dynamic_cast<SimpleExpressionElement*>(dead->src()->try_as_single_element());

File diff suppressed because it is too large Load Diff

View File

@ -848,9 +848,13 @@
[12, "(function symbol)"],
[13, "(function symbol)"],
[14, "(function vent symbol)"],
[38, "(function int none :behavior collectable)"],
[38, "(function game-task none :behavior collectable)"],
[69, "(function part-tracker vector)"]
],
"collide-edge-grab": [
[0, "(function surface object object int float)"]
],
"placeholder-do-not-add-below": []
}

View File

@ -234,46 +234,29 @@
"draw-boundary-polygon",
// collide-probe
"collide-probe-instance-tie",
"collide-probe-node",
// collide-mesh
"(method 10 collide-mesh)",
"(method 13 collide-mesh)",
"(method 9 collide-mesh-cache)",
"(method 15 collide-mesh)",
"(method 14 collide-mesh)",
"(method 11 collide-mesh)",
"(method 12 collide-mesh)",
"collide-probe-instance-tie", // CFG
"collide-probe-node", // CFG
// collide-edge-grab
"(method 13 collide-edge-work)",
"(method 17 collide-edge-work)",
"(method 15 collide-edge-work)",
"(method 16 collide-edge-work)",
"(method 9 edge-grab-info)", // maybe bug
"(method 18 collide-edge-work)",
"(method 10 collide-edge-hold-list)",
"(method 13 collide-edge-work)", // CFG
"(method 17 collide-edge-work)", // CFG
"(method 15 collide-edge-work)", // CFG
"(method 16 collide-edge-work)", // CFG
"(method 9 edge-grab-info)", // CFG
"(method 18 collide-edge-work)", // CFG
"(method 10 collide-edge-hold-list)", // CFG
// collide-shape
"(method 15 collide-shape-prim-mesh)", // BUG:
"(method 15 collide-shape-prim-sphere)", // BUG:
"(method 16 collide-shape-prim)",
"(method 15 collide-shape-prim-group)",
"(method 45 collide-shape)",
"(method 28 collide-shape-prim-mesh)", // BUG:
"(method 29 collide-shape-prim-group)",
"(method 20 collide-shape-prim-group)",
"(method 19 collide-shape-prim-sphere)",
"(method 15 collide-shape-prim-mesh)", // CFG
"(method 15 collide-shape-prim-sphere)", // CFG
"(method 16 collide-shape-prim)", // CFG
"(method 15 collide-shape-prim-group)", // CFG
"(method 18 collide-shape-prim-sphere)",
"(method 23 collide-shape-prim-sphere)",
"(method 23 collide-shape-prim-mesh)", // BUG: maybe
"(method 24 collide-shape-prim)",
"(method 23 collide-shape-prim-group)",
"(method 42 collide-shape)",
// collide-shape-rider
"(method 35 collide-shape)",
"(method 23 collide-shape-prim-sphere)", // CFG
"(method 23 collide-shape-prim-mesh)", // BUG - crash in variable pass
"(method 24 collide-shape-prim)", // CFG
"(method 23 collide-shape-prim-group)", // CFG
"(method 42 collide-shape)", // CFG
// process-drawable BUG
"cspace-inspect-tree",
@ -294,28 +277,24 @@
"(method 16 drawable-tree)",
// collide-cache
"(method 10 collide-puss-work)",
"(method 9 collide-puss-work)",
"(method 19 collide-cache)",
"(method 10 collide-cache-prim)",
"(method 9 collide-cache-prim)",
"(method 30 collide-cache)",
"(method 13 collide-shape-prim-group)",
"(method 13 collide-shape-prim-sphere)",
"(method 13 collide-shape-prim-mesh)",
"(method 14 collide-shape-prim-group)",
"(method 14 collide-shape-prim-sphere)",
"(method 14 collide-shape-prim-mesh)",
"(method 12 collide-shape-prim-group)", // BUG: maybe
"(method 12 collide-shape-prim-sphere)",
"(method 12 collide-shape-prim-mesh)",
"(method 29 collide-cache)",
"(method 27 collide-cache)",
"(method 14 collide-cache)",
"(method 28 collide-cache)",
"(method 26 collide-cache)",
"(method 21 collide-cache)",
"(method 32 collide-cache)",
"(method 10 collide-puss-work)", // CFG
"(method 9 collide-puss-work)", // decompiler crash
"(method 19 collide-cache)", // decompiler crash
"(method 10 collide-cache-prim)", // CFG
"(method 9 collide-cache-prim)", // CFG
"(method 30 collide-cache)", // unsupported asm - c.le.s
"(method 13 collide-shape-prim-group)", // CFG
"(method 13 collide-shape-prim-mesh)", // CFG
"(method 14 collide-shape-prim-group)", // CFG
"(method 14 collide-shape-prim-mesh)", // CFG
"(method 12 collide-shape-prim-group)", // CFG
"(method 12 collide-shape-prim-mesh)", // CFG
"(method 27 collide-cache)", // CFG
"(method 14 collide-cache)", // CFG
"(method 28 collide-cache)", // CFG
"(method 26 collide-cache)", // CFG
"(method 21 collide-cache)", // CFG
"(method 32 collide-cache)", // CFG
// memory-usage BUG
//"(method 14 level)",
@ -427,7 +406,8 @@
" misc ~192H~5DK ~280Hsprite~456H~5DK~%": 2,
"ERROR: <asg> ~A in spool anim loop for ~A ~D, but not loaded.~": 3,
"~0k~5d/~d ~6d/~d ~6d/~d ": 6,
"~0k~s~%": 1
"~0k~s~%": 1,
"money ~A was killed in pickup~%": 0
},
"blocks_ending_in_asm_branch": {
@ -504,7 +484,9 @@
"draw-drawable-tree-tfrag": [6, 8, 13, 15],
"draw-drawable-tree-trans-tfrag": [6, 8, 13, 15],
"draw-drawable-tree-dirt-tfrag": [6, 8, 13, 15],
"draw-drawable-tree-ice-tfrag": [6, 8, 13, 15]
"draw-drawable-tree-ice-tfrag": [6, 8, 13, 15],
"birth-pickup-at-point": [0]
},
// Sometimes the game might use format strings that are fetched dynamically,

View File

@ -1289,7 +1289,7 @@
["L660", "float", true],
["L661", "float", true],
["L662", "float", true],
["L663", "(pointer float)", 1],
["L663", "float", true],
["L664", "uint64", true],
["L666", "uint64", true],
["L665", "uint64", true],
@ -1447,6 +1447,46 @@
["L51", "attack-info"]
],
"collide-shape": [
["L399", "attack-info"],
["L408", "vector"],
["L410", "vector"],
["L411", "vector"],
["L413", "attack-info"],
["L414", "attack-info"],
["L415", "attack-info"],
["L416", "attack-info"],
["L417", "attack-info"],
["L418", "attack-info"],
["L419", "attack-info"],
["L420", "vector"],
["L421", "vector"]
],
"collide-planes": [
["L53", "vector4w"],
["L54", "vector4w"],
["L55", "vector4w"],
["L56", "vector4w"],
["L57", "vector4w"],
["L58", "vector4w"],
["L59", "vector4w"],
["L60", "vector4w"],
["L63", "vector4w"],
["L64", "vector4w"],
["L65", "vector4w"],
["L66", "vector4w"]
],
"collide-probe": [
["L100", "vector"],
["L102", "vector"]
],
"collide-cache": [
["L304", "vector"]
],
// please do not add things after this entry! git is dumb.
"object-file-that-doesnt-actually-exist-and-i-just-put-this-here-to-prevent-merge-conflicts-with-this-file": []
}

View File

@ -745,13 +745,6 @@
"(anon-function 9 plat-eco)": [[16, "event-message-block"]],
"default-collision-reaction": [
[16, "vector"],
[32, "vector"],
[48, "vector"],
[96, "vector"]
],
"(trans plat-button-move-downward sunken-elevator)": [
[16, "vector"],
[32, "vector"],
@ -4133,5 +4126,300 @@
[32, "event-message-block"]
],
"(method 12 touching-list)": [
[16, "event-message-block"]
],
"(method 9 touching-list)": [
[16, "touching-shapes-entry"]
],
"(method 11 touching-prims-entry)": [
[16, "vector"]
],
"(method 35 collide-shape)": [
[16, "pull-rider-info"],
[128, "matrix"],
[192, "event-message-block"],
[272, "collide-overlap-result"],
[384, "matrix"],
[448, "collide-overlap-result"],
[560, "matrix"],
[624, "collide-overlap-result"],
[736, "matrix"]
],
"(method 44 collide-shape)": [
[16, "pull-rider-info"]
],
"(method 12 collide-mesh)": [
[16, "matrix"]
],
"target-attack-up": [
[16, "vector"],
[32, "vector"],
[48, "vector"],
[64, "event-message-block"]
],
"(method 30 collide-shape)": [
[16, "vector"]
],
"(method 32 collide-shape)": [
[16, "bounding-box"]
],
"(method 33 collide-shape)": [
[16, "vector"]
],
"(method 57 collide-shape-moving)": [
[16, "vector"]
],
"(method 60 collide-shape-moving)": [
[16, "vector"],
[32, "collide-tri-result"]
],
"(method 59 collide-shape-moving)": [
[16, "collide-mesh-cache-tri"],
[112, "touching-shapes-entry"]
],
"(method 58 collide-shape-moving)": [
[16, "touching-shapes-entry"]
],
"simple-collision-reaction": [
[16, "vector"],
[32, "vector"]
],
"(method 62 collide-shape-moving)": [
[16, "vector"],
[32, "vector"]
],
"default-collision-reaction": [
[16, "vector"],
[32, "vector"],
[48, "vector"],
[96, "vector"],
[112, "vector"],
[144, "vector"]
],
"(method 56 collide-shape-moving)": [
[16, "event-message-block"]
],
"(method 63 collide-shape-moving)": [
[16, "collide-shape-intersect"],
[160, "vector"],
[176, "vector"]
],
"(method 37 control-info)": [
[16, "vector"],
[32, "vector"],
[48, "vector"],
[64, "vector"],
[80, "vector"],
[96, "vector"],
[112, "vector"],
[128, "vector"]
],
"(method 55 collide-shape)": [
[16, "vector"],
[32, "vector"],
[48, "vector"],
[64, "event-message-block"]
],
"(method 41 collide-shape)": [
[16, "vector"],
[32, "vector"]
],
"(method 45 collide-shape)": [
[16, "collide-work"],
[128, "vector"],
[144, "vector"],
[160, "collide-work"],
[272, "vector"],
[288, "vector"],
[304, "collide-work"],
[416, "vector"],
[432, "vector"],
[448, "collide-work"],
[560, "vector"],
[576, "vector"]
],
"collide-planes": [
[16, "bounding-box"],
[48, ["inline-array", "vector", 18]],
[336, ["inline-array", "bounding-box", 18]],
[928, "vector"],
[944, "vector"],
[960, "vector"],
[976, "vector"],
[992, "vector"],
[1008, "vector"],
[1024, "vector"],
[1040, "vector"],
[1056, "vector"],
[1072, "vector"]
],
"dma-add-process-drawable": [
[32, "vector"],
[48, "vector"],
[64, "vector"]
],
"marks-cam-restore": [
[16, "vector"],
[32, "matrix"],
[96, "event-message-block"]
],
"gregs-village1-cam-restore": [
[16, "vector"],
[32, "matrix"],
[96, "event-message-block"]
],
"gregs-texture-cam-restore": [
[16, "vector"],
[32, "matrix"],
[96, "event-message-block"]
],
"gregs-texture2-cam-restore": [
[16, "vector"],
[32, "matrix"],
[96, "event-message-block"]
],
"gregs-jungle-cam-restore": [
[16, "vector"],
[32, "matrix"],
[96, "event-message-block"]
],
"eddie-cam-restore": [
[16, "vector"],
[32, "matrix"]
],
"cave-cam-restore": [
[16, "vector"],
[32, "matrix"]
],
"paals-cam-restore": [
[16, "vector"],
[32, "matrix"]
],
"(method 20 target)": [
[16, "event-message-block"]
],
"(method 19 collide-edge-work)": [
[16, "vector"],
[32, "vector"],
[48, "collide-using-spheres-params"],
[80, "matrix"]
],
"(method 14 collide-edge-work)": [
[16, "vector"]
],
"(method 10 collide-edge-work)": [
[16, "vector"]
],
"(method 9 collide-edge-hold-list)": [
[16, "vector"]
],
"collide-shape-moving-angle-set!": [
[16, "vector"]
],
"poly-find-nearest-edge": [
[16, "vector"],
[64, "vector"]
],
"target-collision-reaction": [
[16, "vector"],
[32, "vector"],
[48, "vector"],
[112, "vector"],
[128, "vector"],
[144, "vector"],
[176, "vector"],
[192, "vector"],
[208, "vector"]
],
"(method 31 collide-cache)": [
[16, "vector"],
[32, "vector"]
],
"(method 43 collide-shape)": [
[16, "vector"],
[32, "vector"],
[48, "vector"],
[64, "vector"],
[80, "event-message-block"]
],
"(method 15 collide-cache)": [
[16, "bounding-box"]
],
"test-closest-pt-in-triangle": [
[16, "vector"],
[32, "vector"],
[48, "vector"],
[64, "vector"]
],
"(method 9 collide-mesh)": [
[16, "vector"],
[32, "vector"],
[48, "vector"]
],
"(method 10 collide-mesh)": [
[16, "matrix"]
],
"(method 22 collide-shape-prim-mesh)": [
[16, "collide-tri-result"]
],
"find-ground-point": [
[16, "vector"],
[32, "collide-mesh-cache-tri"],
[128, "bounding-box"],
[160, "vector"]
],
"(method 19 collide-shape-prim-sphere)": [[16, "collide-mesh-cache-tri"]],
"(method 37 collide-shape)": [[16, "vector"]],
"placeholder-do-not-add-below!": []
}

View File

@ -5100,7 +5100,7 @@
"(trans manipy-idle)": [
[57, "v1", "process-drawable"],
[66, "a0", "collide-shape"]
[[66, 73], "a0", "collide-shape"]
],
"(method 14 camera-tracker)": [
@ -5518,7 +5518,8 @@
],
"(event pickup eco-collectable)": [
[18, "a0", "vector"]
[18, "a0", "vector"],
[[15, 21], "v1", "vector"]
],
"(event fuel-cell-clone-anim)": [
@ -5549,6 +5550,7 @@
"(anon-function 69 collectables)": [
[2, "v1", "handle"],
[5, "v1", "handle"],
[8, "v1", "handle"],
[13, "s5", "eco-collectable"],
[33, "v1", "target"],
[38, "v1", "target"],
@ -5608,5 +5610,263 @@
[92, "v0", "(pointer float)"]
],
"(method 21 collectable)": [
[20, "v1", "int"],
[20, "a0", "int"],
[24, "a0", "int"]
],
"check-blue-suck": [
[25, "v1", "collide-shape"]
],
"(code die eco)": [
[53, "v1", "float"]
],
"(trans pickup fuel-cell)": [
[92, "v1", "float"]
],
"(enter notice-blue eco-collectable)": [
[13, "v1", "float"]
],
"(code pickup fuel-cell)": [
["_stack_", 96, "res-tag"],
[[131, 143], "v1", "(inline-array vector)"],
[438, "a0", "game-task"],
[456, "a0", "game-task"],
[474, "a0", "game-task"],
[492, "a0", "game-task"],
[509, "v1", "game-task"],
[513, "v1", "game-task"],
[517, "v1", "game-task"],
[521, "v1", "game-task"]
],
"(method 11 eco)": [
[13, "v0", "pickup-type"]
],
"target-powerup-process": [
[[200, 215], "v1", "sound-rpc-set-param"]
],
"(method 14 touching-list)": [
[5, "s5", "touching-shapes-entry"],
[10, "s5", "touching-shapes-entry"]
],
"(method 13 touching-list)": [
[5, "v0", "touching-shapes-entry"],
[10, "v0", "touching-shapes-entry"],
[17, "v0", "touching-shapes-entry"],
[26, "v0", "touching-shapes-entry"],
[46, "v0", "touching-shapes-entry"],
[47, "v0", "touching-shapes-entry"],
[48, "v0", "touching-shapes-entry"],
[50, "v0", "touching-shapes-entry"]
],
"(method 11 touching-list)": [
[8, "s5", "touching-shapes-entry"],
[10, "s5", "touching-shapes-entry"],
[11, "s5", "touching-shapes-entry"],
[13, "s5", "touching-shapes-entry"],
[32, "s5", "touching-shapes-entry"],
[47, "s5", "touching-shapes-entry"],
[49, "s5", "touching-shapes-entry"],
[51, "s5", "touching-shapes-entry"]
],
"(method 12 touching-list)": [
[4, "gp", "touching-shapes-entry"],
[6, "gp", "touching-shapes-entry"],
[67, "gp", "touching-shapes-entry"]
],
"(method 35 collide-shape)": [
[23, "v1", "connection"],
[24, "s2", "collide-shape"],
[33, "s2", "collide-shape"],
[48, "s2", "collide-shape"],
[62, "v1", "process-drawable"],
[80, "s2", "collide-shape"],
[117, "v1", "connection"],
[118, "s2", "collide-shape"],
[127, "s2", "collide-shape"],
[142, "s2", "collide-shape"],
[174, "s2", "collide-shape"],
[209, "v1", "connection"],
[210, "s2", "collide-shape"],
[219, "s2", "collide-shape"],
[234, "s2", "collide-shape"],
[266, "s2", "collide-shape"],
[301, "v1", "connection"],
[302, "s2", "collide-shape"],
[311, "s2", "collide-shape"],
[326, "s2", "collide-shape"],
[358, "s2", "collide-shape"]
],
"(method 56 collide-shape-moving)": [
[89, "v1", "target"]
],
"(method 20 collide-shape-prim-group)": [
[40, "a0", "collide-shape-prim-group"]
],
"(method 25 collide-shape-prim)": [
[43, "gp", "collide-shape-prim-group"],
[47, "gp", "collide-shape-prim-group"]
],
"(method 29 collide-shape-prim-group)": [
[13, "a0", "collide-shape-prim-group"]
],
"(method 28 collide-shape-prim-mesh)": [
[27, "s4", "collide-shape-prim-group"]
],
"(method 53 collide-shape)": [
[26, "a1", "collide-shape-prim-group"],
[36, "v1", "collide-shape-prim-group"]
],
"(method 54 collide-shape)": [
[22, "a1", "collide-shape-prim-group"],
[29, "v1", "collide-shape-prim-group"]
],
"(method 45 collide-shape)": [
[18, "v1", "connection"],
[[19, 146], "s3", "collide-shape-moving"],
[146, "v1", "connection"],
[[147, 272], "s3", "collide-shape-moving"],
[272, "v1", "connection"],
[[273, 398], "s3", "collide-shape-moving"],
[398, "v1", "connection"],
[[399, 497], "s3", "collide-shape-moving"]
],
"(method 55 collide-shape)": [
[33, "s5", "process-drawable"],
[54, "s5", "process-drawable"],
[59, "s5", "process-drawable"],
[68, "s5", "process-drawable"]
],
"collide-shape-draw-debug-marks": [
[24, "v1", "connection"],
[[33, 55], "s5", "collide-shape"],
[72, "v1", "connection"],
[[81, 103], "s5", "collide-shape"],
[120, "v1", "connection"],
[[129, 151], "s5", "collide-shape"],
[168, "v1", "connection"],
[[177, 199], "s5", "collide-shape"]
],
"(method 9 collide-edge-work)": [
[10, "s3", "collide-edge-edge"],
[16, "s4", "collide-edge-hold-item"],
[46, "s4", "(inline-array collide-edge-hold-item)"],
[48, "s3", "(inline-array collide-edge-edge)"]
],
"(method 19 collide-edge-work)": [
[150, "a1", "int"],
[150, "v1", "int"],
[[149, 162], "a0", "collide-shape-prim-group"]
],
"collide-probe-make-list": [
[18, "v1", "drawable-group"],
[29, "v1", "drawable-group"],
[45, "v1", "drawable-group"]
],
"(method 11 instance-tie)": [
[28, "s1", "collide-fragment"],
[38, "s1", "collide-fragment"],
[45, "s1", "(inline-array collide-fragment)"]
],
"(method 12 instance-tie)": [
[21, "s1", "collide-fragment"],
[31, "s1", "collide-fragment"],
[38, "s1", "(inline-array collide-fragment)"]
],
"(method 13 instance-tie)": [
[21, "s1", "collide-fragment"],
[29, "s1", "collide-fragment"],
[36, "s1", "(inline-array collide-fragment)"]
],
"(method 20 collide-cache)": [
[18, "s2", "collide-cache-prim"],
[23, "s2", "collide-cache-prim"],
[27, "s2", "collide-cache-prim"],
[33, "s2", "collide-cache-prim"],
[37, "s2", "collide-cache-prim"],
[38, "v1", "collide-shape-prim-sphere"], // could be sphere or mesh...?
[45, "s2", "collide-cache-prim"],
[48, "s2", "(inline-array collide-cache-prim)"]
],
"test-closest-pt-in-triangle": [
[19, "s5", "collide-cache-tri"],
[20, "s5", "collide-cache-tri"],
[21, "s5", "collide-cache-tri"],
[26, "s5", "collide-cache-tri"],
[47, "s5", "collide-cache-tri"],
[48, "s5", "(inline-array collide-cache-tri)"]
],
"(method 9 collide-cache)": [
[5, "gp", "collide-cache-tri"],
[19, "gp", "collide-cache-tri"],
[20, "gp", "collide-cache-tri"],
[21, "gp", "collide-cache-tri"],
[23, "gp", "(inline-array collide-cache-tri)"],
[33, "gp", "collide-cache-prim"],
[35, "gp", "collide-cache-prim"],
[50, "gp", "collide-cache-prim"],
[51, "gp", "collide-cache-prim"],
[55, "gp", "(inline-array collide-cache-prim)"]
],
"(method 9 collide-mesh)": [
[[17, 62], "s5", "collide-mesh-tri"],
[62, "s5", "(inline-array collide-mesh-tri)"]
],
"(method 22 collide-shape-prim-mesh)": [
[10, "s4", "collide-shape-prim-group"]
],
"(method 44 collide-shape)": [
[26, "a0", "process-drawable"]
],
"(method 43 collide-shape)": [
[58, "gp", "collide-shape-moving"],
[88, "gp", "collide-shape-moving"]
],
"find-instance-by-name": [
[21, "v1", "drawable-tree-instance-shrub"],
[48, "v1", "drawable-tree-instance-tie"]
],
"(method 63 collide-shape-moving)": [
[[33, 53], "s0", "collide-cache-prim"],
[53, "s0", "(inline-array collide-cache-prim)"]
],
"placeholder-do-not-add-below": []
}

View File

@ -3693,5 +3693,42 @@
}
},
"(code pickup fuel-cell)": {
"vars": {
"v1-34": ["v1-34", "(inline-array vector)"]
}
},
"(method 11 eco)": {
"vars": {
"v1-2": ["v1-2", "pickup-type"]
}
},
"(method 9 fact-info)": {
"vars": {
"s3-0": ["s3-0", "pickup-type"]
}
},
"(event pickup eco-collectable)": {
"vars": {
"v0-1": ["v0-1", "symbol"]
}
},
"cloud-track": {
"vars": {
"s1-1": ["s1-1", "handle"],
"s2-1": ["s2-1", "handle"]
}
},
"(method 63 collide-shape-moving)": {
"vars": {
"s0-0": ["s0-0", "collide-cache-prim"]
}
},
"aaaaaaaaaaaaaaaaaaaaaaa": {}
}

View File

@ -1010,7 +1010,13 @@ goos::Object decompile_value(const TypeSpec& type,
float value;
memcpy(&value, bytes.data(), 4);
double meters = (double)value / METER_LENGTH;
return pretty_print::build_list("meters", pretty_print::float_representation(meters));
auto rep = pretty_print::float_representation(meters);
if (rep.print().find("the-as") != std::string::npos) {
return rep;
// return pretty_print::build_list("the-as", "meters", rep);
} else {
return pretty_print::build_list("meters", rep);
}
} else if (type == TypeSpec("degrees")) {
assert(bytes.size() == 4);
float value;

View File

@ -25,4 +25,15 @@ FIN.DGO out/iso/FIN.DGO
FIC.DGO out/iso/FIC.DGO
JUN.DGO out/iso/JUN.DGO
MAI.DGO out/iso/MAI.DGO
BEA.DGO out/iso/BEA.DGO
BEA.DGO out/iso/BEA.DGO
CIT.DGO out/iso/CIT.DGO
FUCVICTO.STR out/iso/FUCVICTO.STR
FUCV2.STR out/iso/FUCV2.STR
FUCV3.STR out/iso/FUCV3.STR
FUCV4.STR out/iso/FUCV4.STR
FUCV5.STR out/iso/FUCV5.STR
FUCV6.STR out/iso/FUCV6.STR
FUCV7.STR out/iso/FUCV7.STR
FUCV8.STR out/iso/FUCV8.STR
FUCFV1.STR out/iso/FUCFV1.STR
FUCRV1.STR out/iso/FUCRV1.STR

View File

@ -18,7 +18,7 @@ constexpr u32 DEBUG_HEAP_SPACE_FOR_STACK = 0x10000;
constexpr u32 HEAP_START = 0x13fd20;
//! Where to end the global heap so it doesn't overlap with the stack.
constexpr u32 GLOBAL_HEAP_END = 0x1ffc000;
constexpr u32 GLOBAL_HEAP_END = 0x1ffc000 + (0x1ffc000 - HEAP_START); // doubled
//! Location of kglobalheap, kdebugheap kheapinfo structures.
constexpr u32 GLOBAL_HEAP_INFO_ADDR = 0x13AD00;
@ -128,4 +128,4 @@ struct FileStream {
// static_assert(offsetof(CpadInfo, new_pad) == 76, "cpad type offset");
void vif_interrupt_callback();
u32 offset_of_s7();
u32 offset_of_s7();

View File

@ -156,6 +156,6 @@ void* RPC_STR(unsigned int fno, void* _cmd, int y) {
void* RPC_PLAY(unsigned int fno, void* _cmd, int y) {
(void)fno;
(void)y;
printf("[RPC_PLAY] ignoring...\n");
// printf("[RPC_PLAY] ignoring...\n");
return _cmd;
}
}

54
goal_src/dgos/cit.gd Normal file
View File

@ -0,0 +1,54 @@
("CIT.DGO"
("villagep-obs.o" "villagep-obs")
("oracle.o" "oracle")
("battlecontroller.o" "battlecontroller")
("citadel-part.o" "citadel-part")
("citadel-obs.o" "citadel-obs")
("citb-plat.o" "citb-plat")
("citadel-sages.o" "citadel-sages")
("snow-bunny.o" "snow-bunny")
("citb-bunny.o" "citb-bunny")
("citb-drop-plat-CIT.o" "citb-drop-plat")
("assistant-citadel.o" "assistant-citadel")
("tpage-1415.go" "tpage-1415")
("tpage-1417.go" "tpage-1417")
("tpage-1416.go" "tpage-1416")
("tpage-1414.go" "tpage-1414")
("assistant-lavatube-end-ag.go" "assistant-lavatube-end")
("babak-ag.go" "babak")
("bluesage-ag.go" "bluesage")
("citadelcam-ag.go" "citadelcam")
("citb-arm-ag.go" "citb-arm")
("citb-arm-shoulder-ag.go" "citb-arm-shoulder")
("citb-bunny-ag.go" "citb-bunny")
("citb-button-ag.go" "citb-button")
("citb-chain-plat-ag.go" "citb-chain-plat")
("citb-chains-ag.go" "citb-chains")
("citb-coil-ag.go" "citb-coil")
("citb-disc-ag.go" "citb-disc")
("citb-donut-ag.go" "citb-donut")
("citb-drop-plat-ag.go" "citb-drop-plat")
("citb-exit-plat-ag.go" "citb-exit-plat")
("citb-firehose-ag.go" "citb-firehose")
("citb-generator-ag.go" "citb-generator")
("citb-hose-ag.go" "citb-hose")
("citb-iris-door-ag.go" "citb-iris-door")
("citb-launcher-ag.go" "citb-launcher")
("citb-robotboss-ag.go" "citb-robotboss")
("citb-rotatebox-ag.go" "citb-rotatebox")
("citb-sagecage-ag.go" "citb-sagecage")
("citb-stopbox-ag.go" "citb-stopbox")
("ecovalve-ag-CIT.go" "ecovalve")
("evilbro-citadel-ag.go" "evilbro-citadel")
("evilsis-citadel-ag.go" "evilsis-citadel")
("green-sagecage-ag.go" "green-sagecage")
("orb-cache-top-ag-CIT.go" "orb-cache-top")
("plat-citb-ag.go" "plat-citb")
("plat-eco-citb-ag.go" "plat-eco-citb")
("redsage-ag.go" "redsage")
("warp-gate-switch-ag-CIT.go" "warp-gate-switch")
("warpgate-ag.go" "warpgate")
("yellowsage-ag.go" "yellowsage")
("citadel-vis.go" "citadel-vis")
)

View File

@ -5,15 +5,19 @@
;; name in dgo: collide-cache-h
;; dgos: GAME, ENGINE
(define-extern collide-cache-using-line-sphere-test (function vector symbol))
(define-extern collide-cache-using-y-probe-test (function vector symbol))
(define-extern collide-cache-using-box-test (function vector symbol))
;; DECOMP BEGINS
(deftype collide-using-spheres-params (structure)
((spheres uint32 :offset-assert 0)
(num-spheres uint32 :offset-assert 4)
(collide-with uint64 :offset-assert 8)
(proc basic :offset-assert 16)
(ignore-pat uint32 :offset-assert 20)
(solid-only basic :offset-assert 24)
((spheres (pointer sphere) :offset-assert 0)
(num-spheres uint32 :offset-assert 4)
(collide-with uint64 :offset-assert 8)
(proc process-drawable :offset-assert 16)
(ignore-pat uint32 :offset-assert 20)
(solid-only basic :offset-assert 24)
)
:method-count-assert 9
:size-assert #x1c
@ -75,24 +79,24 @@
(deftype collide-cache-prim (structure)
((prim-core collide-prim-core :inline :offset-assert 0)
(ccache collide-cache :offset-assert 32)
(prim collide-shape-prim :offset-assert 36)
(first-tri uint16 :offset-assert 40)
(num-tris uint16 :offset-assert 42)
(unused uint8 4 :offset-assert 44)
(world-sphere vector :inline :offset 0)
(collide-as uint64 :offset 16)
(action uint32 :offset 24)
(offense int8 :offset 28)
(prim-type int8 :offset 29)
((prim-core collide-prim-core :inline :offset-assert 0)
(ccache collide-cache :offset-assert 32)
(prim (pointer collide-shape-prim) :offset-assert 36)
(first-tri uint16 :offset-assert 40)
(num-tris uint16 :offset-assert 42)
(unused uint8 4 :offset-assert 44)
(world-sphere vector :inline :offset 0)
(collide-as uint64 :offset 16)
(action uint32 :offset 24)
(offense int8 :offset 28)
(prim-type int8 :offset 29)
)
:method-count-assert 11
:size-assert #x30
:flag-assert #xb00000030
(:methods
(dummy-9 (_type_ float pointer (pointer collide-cache) float int) float 9)
(dummy-10 (_type_ float pointer (pointer collide-cache) float int) float 10)
(dummy-9 (_type_ collide-mesh-cache-tri collide-prim-core vector float int) float 9)
(dummy-10 (_type_ collide-mesh-cache-tri collide-prim-core vector float int) float 10)
)
)
@ -116,25 +120,25 @@
(dummy-10 (_type_ vector vector float int process collide-mesh-cache-tri int) float 10)
(dummy-11 (_type_ collide-using-spheres-params) none 11)
(fill-and-probe-using-y-probe (_type_ vector float uint process collide-tri-result uint) float 12)
(dummy-13 (_type_ int uint process-drawable uint) none 13)
(dummy-13 (_type_ bounding-box uint process-drawable uint) none 13)
(dummy-14 (_type_ vector vector float int process int) none 14)
(dummy-15 (_type_ int) none 15)
(dummy-16 (_type_ vector float uint process uint) none 16)
(dummy-15 (_type_ collide-using-spheres-params) none 15)
(dummy-16 (_type_ vector float uint process-drawable uint) none 16)
(initialize (_type_) none 17)
(dummy-18 (_type_ vector vector float int collide-mesh-cache-tri int) float 18)
(probe-using-spheres (_type_) none 19)
(dummy-20 (_type_ vector float uint collide-tri-result uint) float 20)
(dummy-21 (_type_) none 21)
(dummy-21 (_type_ (function bsp-header int collide-list none) (function collide-cache none)) none 21)
(dummy-22 (_type_) none 22)
(dummy-23 (_type_) none 23)
(dummy-24 (_type_) none 24)
(dummy-25 (_type_) none 25)
(dummy-25 (_type_ water-control) none 25)
(dummy-26 (_type_) none 26)
(dummy-27 (_type_) none 27)
(dummy-28 (_type_) none 28)
(dummy-29 (_type_) none 29)
(dummy-29 (_type_ collide-frag-mesh) none 29)
(dummy-30 (_type_) none 30)
(dummy-31 (_type_) none 31)
(dummy-31 (_type_ collide-puyp-work collide-cache-prim) vector 31)
(dummy-32 (_type_) none 32)
)
)
@ -170,10 +174,13 @@
:flag-assert #x900000070
)
(define-perm *collide-work* collide-work (new 'global 'collide-work))
(define-perm *collide-cache* collide-cache (new 'global 'collide-cache))
(define-perm *collide-list* collide-list (new 'global 'collide-list))
(define-extern collide-cache-using-box-test (function vector symbol))
(define-extern collide-cache-using-y-probe-test (function vector symbol))
(define-extern collide-cache-using-line-sphere-test (function vector symbol))

View File

@ -5,3 +5,37 @@
;; name in dgo: collide-cache
;; dgos: GAME, ENGINE
;; TODO this doesnt work properly due to qmfc2 bugs
(defun collide-cache-using-box-test ((arg0 vector))
(local-vars (v1-1 float))
(rlet ((acc :class vf)
(vf0 :class vf)
(vf1 :class vf)
(vf2 :class vf)
(vf3 :class vf)
)
(init-vf0-vector)
(nop!)
(.max.w.vf vf3 vf0 vf0)
(let ((v1-0 *collide-work*))
(nop!)
(.lvf vf1 (&-> arg0 quad))
(nop!)
(.lvf vf2 (&-> v1-0 collide-sphere-neg-r quad))
)
(.sub.vf vf1 vf1 vf2)
(nop!)
(.mul.vf vf1 vf1 vf1)
(nop!)
(.mul.x.vf acc vf3 vf1)
(nop!)
(.add.mul.y.vf acc vf3 vf1 acc)
(nop!)
(.add.mul.z.vf acc vf3 vf1 acc)
(nop!)
(.sub.mul.w.vf vf1 vf3 vf1 acc)
(nop!)
(.mov v1-1 vf1)
(<= (the-as int v1-1) 0)
)
)

View File

@ -9,7 +9,7 @@
((world-vertex vector 6 :inline :offset-assert 0)
(local-vertex vector 6 :inline :offset-assert 96)
(actor-cshape-prim-offset int32 :offset-assert 192)
(actor-handle uint64 :offset-assert 200)
(actor-handle handle :offset-assert 200)
(hanging-matrix matrix :inline :offset-assert 208)
(edge-vertex vector 2 :inline :offset 0)
(center-hold vector :inline :offset 32)
@ -41,7 +41,7 @@
(deftype collide-edge-edge (structure)
((ignore basic :offset-assert 0)
(etri collide-edge-tri :offset-assert 4)
(vertex-ptr vector 2 :offset-assert 8)
(vertex-ptr (inline-array vector) 2 :offset-assert 8)
(outward vector :inline :offset-assert 16)
(edge-vec-norm vector :inline :offset-assert 32)
)
@ -74,54 +74,56 @@
:size-assert #x810
:flag-assert #xb00000810
(:methods
(dummy-9 () none 9)
(debug-draw (_type_) object 9)
(dummy-10 () none 10)
)
)
(declare-type collide-cache basic)
(declare-type collide-shape basic)
(deftype collide-edge-work (structure)
((ccache basic :offset-assert 0)
(cshape basic :offset-assert 4)
(num-verts uint32 :offset-assert 8)
(num-edges uint32 :offset-assert 12)
(num-tris uint32 :offset-assert 16)
(cache-fill-box bounding-box :inline :offset-assert 32)
(within-reach-box bounding-box :inline :offset-assert 64)
(within-reach-box4w bounding-box4w :inline :offset-assert 96)
(search-pt vector :inline :offset-assert 128)
(search-dir-vec vector :inline :offset-assert 144)
(max-dist-sqrd-to-outward-pt float :offset-assert 160)
(max-dir-cosa-delta float :offset-assert 164)
(split-dists float 2 :offset-assert 168)
(outward-offset vector :inline :offset-assert 176)
(local-cache-fill-box bounding-box :inline :offset-assert 192)
(local-within-reach-box bounding-box :inline :offset-assert 224)
(local-player-spheres sphere 12 :inline :offset-assert 256)
(world-player-spheres sphere 12 :inline :offset-assert 448)
(local-player-hanging-spheres sphere 6 :inline :offset 256)
(world-player-hanging-spheres sphere 6 :inline :offset 448)
(local-player-leap-up-spheres sphere 6 :inline :offset 352)
(world-player-leap-up-spheres sphere 6 :inline :offset 544)
(verts vector 64 :inline :offset-assert 640)
(edges collide-edge-edge 96 :inline :offset-assert 1664)
(tris collide-edge-tri 48 :inline :offset-assert 6272)
(hold-list collide-edge-hold-list :inline :offset-assert 7808)
((ccache collide-cache :offset-assert 0)
(cshape collide-shape :offset-assert 4)
(num-verts uint32 :offset-assert 8)
(num-edges uint32 :offset-assert 12)
(num-tris uint32 :offset-assert 16)
(cache-fill-box bounding-box :inline :offset-assert 32)
(within-reach-box bounding-box :inline :offset-assert 64)
(within-reach-box4w bounding-box4w :inline :offset-assert 96)
(search-pt vector :inline :offset-assert 128)
(search-dir-vec vector :inline :offset-assert 144)
(max-dist-sqrd-to-outward-pt float :offset-assert 160)
(max-dir-cosa-delta float :offset-assert 164)
(split-dists float 2 :offset-assert 168)
(outward-offset vector :inline :offset-assert 176)
(local-cache-fill-box bounding-box :inline :offset-assert 192)
(local-within-reach-box bounding-box :inline :offset-assert 224)
(local-player-spheres sphere 12 :inline :offset-assert 256)
(world-player-spheres sphere 12 :inline :offset-assert 448)
(local-player-hanging-spheres sphere 6 :inline :offset 256)
(world-player-hanging-spheres sphere 6 :inline :offset 448)
(local-player-leap-up-spheres sphere 6 :inline :offset 352)
(world-player-leap-up-spheres sphere 6 :inline :offset 544)
(verts vector 64 :inline :offset-assert 640)
(edges collide-edge-edge 96 :inline :offset-assert 1664)
(tris collide-edge-tri 48 :inline :offset-assert 6272)
(hold-list collide-edge-hold-list :inline :offset-assert 7808)
)
:method-count-assert 20
:size-assert #x2690
:flag-assert #x1400002690
(:methods
(dummy-9 () none 9)
(dummy-10 () none 10)
(dummy-11 () none 11)
(dummy-12 () none 12)
(dummy-13 () none 13)
(dummy-14 () none 14)
(dummy-15 () none 15)
(dummy-16 () none 16)
(dummy-17 () none 17)
(dummy-18 () none 18)
(dummy-19 () none 19)
(dummy-9 (_type_ collide-edge-hold-list) symbol 9)
(debug-draw-edges (_type_) object 10)
(dummy-11 (_type_) none 11)
(debug-draw-sphere (_type_) symbol 12)
(dummy-13 (_type_) none 13)
(dummy-14 (_type_ vector vector int) float 14)
(dummy-15 (_type_) none 15)
(dummy-16 (_type_) none 16)
(dummy-17 (_type_) none 17)
(dummy-18 (_type_) none 18)
(dummy-19 (_type_ collide-edge-hold-item edge-grab-info) symbol 19)
)
)

View File

@ -5,3 +5,84 @@
;; name in dgo: collide-edge-grab
;; dgos: GAME, ENGINE
;; failed to figure out what this is:
(let
((v1-1
(new 'static 'surface
:name '*rotate-surface*
:turnv 1.0
:turnvv 1.0
:tiltv 1.0
:tiltvv 1.0
:transv-max 1.0
:target-speed 1.0
:seek0 153600.0
:seek90 153600.0
:seek180 256000.0
:fric 153600.0
:nonlin-fric-dist 5120.0
:slip-factor 1.0
:slope-down-factor 10240.0
:slope-slip-angle 8192.0
:impact-fric 1.0
:bend-factor 0.8
:bend-speed 4.0
:alignv 1.0
:slope-up-traction 1.0
:align-speed 1.0
:flags #x4000
)
)
)
(define *rotate-surface* v1-1)
(set!
(-> v1-1 mult-hook)
(the-as
(function surface surface surface int none)
(lambda ((arg0 surface) (arg1 object) (arg2 object) (arg3 int))
(when (= arg3 1)
(let ((f0-0 151756.8))
(set! (-> arg0 fric) f0-0)
f0-0
)
)
)
)
)
(set! (-> v1-1 touch-hook) nothing)
(set! (-> v1-1 active-hook) nothing)
)
;; failed to figure out what this is:
(let
((v1-2
(new 'static 'surface
:name '*no-walk-surface*
:turnv 0.5
:turnvv 1.0
:tiltv 1.0
:tiltvv 1.0
:transv-max 0.7
:target-speed 0.7
:seek0 24576.0
:seek90 24576.0
:seek180 24576.0
:fric 23756.8
:nonlin-fric-dist 4091904.0
:slope-slip-angle 16384.0
:bend-speed 4.0
:alignv 0.5
:slope-up-traction 0.9
:align-speed 1.0
:flags #x28
)
)
)
(define *no-walk-surface* v1-2)
(set!
(-> v1-2 mult-hook)
(the-as (function surface surface surface int none) nothing)
)
(set! (-> v1-2 touch-hook) nothing)
(set! (-> v1-2 active-hook) nothing)
)

View File

@ -27,6 +27,7 @@
:flag-assert #x900000008
)
(declare-type collide-mesh-cache-tri structure)
(deftype collide-mesh (basic)
((joint-id int32 :offset-assert 4)
(num-tris uint32 :offset-assert 8)
@ -38,13 +39,13 @@
:size-assert #x28
:flag-assert #x1000000028
(:methods
(dummy-9 () none 9)
(dummy-10 () none 10)
(dummy-11 () none 11)
(dummy-12 () none 12)
(dummy-13 () none 13)
(dummy-14 () none 14)
(dummy-15 () none 15)
(debug-draw-tris (_type_ process-drawable int) none 9)
(dummy-10 (_type_ object vector) none 10) ;; what is the second arg!?
(dummy-11 (_type_) none 11)
(dummy-12 (_type_ collide-mesh-cache-tri collide-tri-result vector float) float 12)
(dummy-13 (_type_) none 13)
(dummy-14 (_type_) none 14)
(dummy-15 (_type_) none 15)
)
)
@ -60,7 +61,7 @@
:size-assert #xa020
:flag-assert #xc0000a020
(:methods
(dummy-9 () none 9)
(dummy-9 (_type_) none 9)
(is-id? (_type_ int) symbol 10)
(next-id! (_type_) uint 11)
)

View File

@ -5,3 +5,66 @@
;; name in dgo: collide-probe
;; dgos: GAME, ENGINE
(defun
interpolate
((arg0 float) (arg1 float) (arg2 float) (arg3 float) (arg4 float))
(let ((f0-1 (- arg3 arg1))
(f1-2 (- arg4 arg2))
(f3-1 (- arg0 arg1))
)
(+ arg2 (/ (* f3-1 f1-2) f0-1))
)
)
(defun distc ((arg0 vector) (arg1 vector))
(let* ((f0-1 (- (-> arg0 x) (-> arg1 x)))
(f0-3 (* f0-1 f0-1))
(f1-2 (- (-> arg0 z) (-> arg1 z)))
)
(sqrtf (+ f0-3 (* f1-2 f1-2)))
)
)
(defun misty-ambush-height ((arg0 vector))
(let* ((a1-0 (new 'static 'vector :x -808960.0 :y 111656.96 :z 3924992.0))
(f0-0 (distc arg0 a1-0))
)
(cond
((< f0-0 52019.2)
111656.96
)
((>= 58982.4 f0-0)
(interpolate f0-0 52019.2 111656.96 58982.4 116776.96)
)
((>= 124436.48 f0-0)
(interpolate f0-0 58982.4 116776.96 124436.48 114688.0)
)
((>= 219217.92 f0-0)
(interpolate f0-0 124436.48 114688.0 219217.92 113254.4)
)
(else
113254.4
)
)
)
)
(defun misty-ambush-height-probe ((arg0 vector) (arg1 float))
(let ((f0-0 (misty-ambush-height arg0)))
(cond
((< f0-0 (-> arg0 y))
(/ (- (-> arg0 y) f0-0) arg1)
)
(else
(format
0
"WARNING: ~%height = ~f, pos.y = ~f"
(* 0.00024414062 f0-0)
(* 0.00024414062 (-> arg0 y))
)
-1.0
)
)
)
)

View File

@ -6,5 +6,5 @@
;; dgos: GAME, ENGINE
;; TODO - for logic-target
(define-extern target-collision-reaction function)
(define-extern target-collision-no-reaction function)
(define-extern target-collision-reaction (function control-info collide-shape-intersect vector vector none))
(define-extern target-collision-no-reaction (function control-info collide-shape-intersect vector vector none))

View File

@ -7,11 +7,12 @@
(declare-type touching-list structure)
(declare-type collide-shape-prim basic)
;; Represents a collision between the "rider" (zoomer?) and a primitive shape.
;; collisions are "sticky", meaning these structures stick around.
(deftype collide-sticky-rider (structure)
((rider-handle handle :offset-assert 0)
(sticky-prim basic :offset-assert 8)
(sticky-prim collide-shape-prim :offset-assert 8)
(prim-ry float :offset-assert 12)
(rider-local-pos vector :inline :offset-assert 16)
)
@ -42,7 +43,7 @@
:flag-assert #xb00000030
(:methods
(new (symbol type int) _type_ 0)
(dummy-9 () none 9)
(add-rider! (_type_ process-drawable) collide-sticky-rider 9)
(reset! (_type_) int 10)
)
)
@ -55,7 +56,7 @@
(deftype pull-rider-info (structure)
((rider collide-sticky-rider :offset-assert 0)
(rider-cshape basic :offset-assert 4)
(rider-cshape collide-shape-prim :offset-assert 4)
(rider-delta-ry float :offset-assert 8)
(rider-dest vector :inline :offset-assert 16)
)
@ -64,7 +65,6 @@
:flag-assert #x900000020
)
(declare-type collide-shape-prim basic)
(deftype collide-shape-intersect (basic)
((move-vec vector :inline :offset-assert 16)
(best-u float :offset-assert 32)
@ -76,7 +76,7 @@
:size-assert #x8c
:flag-assert #xa0000008c
(:methods
(dummy-9 () none 9)
(init! (_type_ vector) symbol 9)
)
)
@ -133,47 +133,47 @@
:flag-assert #x900000020
)
(declare-type collide-shape basic)
(declare-type collide-cache-prim structure)
;; the base class for collision shapes.
(deftype collide-shape-prim (basic)
((cshape basic :offset-assert 4)
((cshape collide-shape :offset-assert 4)
(prim-id uint32 :offset-assert 8)
(transform-index int8 :offset-assert 12)
(prim-core collide-prim-core :inline :offset-assert 16)
(local-sphere vector :inline :offset-assert 48)
(collide-with uint64 :offset-assert 64)
;; overlays of the prim-core
(world-sphere vector :inline :offset 16)
(collide-as uint64 :offset 32)
(action uint32 :offset 40)
(offense int8 :offset 44)
(prim-type int8 :offset 45)
;; overlay of the local-sphere w
(radius meters :offset 60)
)
:method-count-assert 28
:size-assert #x48
:flag-assert #x1c00000048
(:methods
(new (symbol type basic uint int) _type_ 0)
(dummy-9 () none 9)
(new (symbol type collide-shape uint int) _type_ 0)
(dummy-9 (_type_ vector) object 9) ;; ret - symbol | float
(dummy-10 (_type_ uint) collide-shape-prim 10)
(dummy-11 () none 11)
(add-fg-prim-using-box (_type_) none 12)
(add-fg-prim-using-line-sphere (_type_) none 13)
(add-fg-prim-using-y-probe (_type_) none 14)
(dummy-15 () none 15)
(debug-draw-world-sphere (_type_) symbol 11)
(add-fg-prim-using-box (_type_ process-drawable) none 12)
(add-fg-prim-using-line-sphere (_type_ process-drawable) none 13)
(add-fg-prim-using-y-probe (_type_ process-drawable) none 14)
(overlaps-others-test (_type_) symbol 15)
(dummy-16 () none 16)
(dummy-17 () none 17)
(dummy-18 () none 18)
(dummy-19 () none 19)
(dummy-20 () none 20)
(dummy-21 () none 21)
(dummy-22 () none 22)
(dummy-23 () none 23)
(collide-with-collide-cache-prim-mesh (_type_ collide-shape-intersect collide-cache-prim) none 18)
(collide-with-collide-cache-prim-sphere (_type_ collide-shape-intersect collide-cache-prim) none 19)
(dummy-20 (_type_ uint) symbol 20)
(num-mesh (_type_ collide-shape-prim) int 21)
(on-platform-test (_type_ _type_ collide-overlap-result float) pat-surface 22)
(should-push-away-test () none 23)
(dummy-24 () none 24)
(dummy-25 () none 25)
(dummy-26 () none 26)
(dummy-27 () none 27)
(dummy-25 (_type_ process-drawable) symbol 25)
(set-collide-as! (_type_ handle) none 26)
(set-collide-with! (_type_ handle) none 27)
)
)
@ -186,7 +186,7 @@
:size-assert #x4c
:flag-assert #x1c0000004c
(:methods
(new (symbol type basic uint) _type_ 0)
(new (symbol type collide-shape uint) _type_ 0)
)
)
@ -202,8 +202,8 @@
:size-assert #x5c
:flag-assert #x1d0000005c
(:methods
(new (symbol type basic uint uint) _type_ 0)
(dummy-28 (_type_ int) none 28)
(new (symbol type collide-shape uint uint) _type_ 0)
(change-mesh (_type_ int) none 28)
)
)
@ -218,9 +218,9 @@
:size-assert #x54
:flag-assert #x1e00000054
(:methods
(new (symbol type basic uint int) _type_ 0)
(dummy-28 (_type_) none 28)
(dummy-29 () none 29)
(new (symbol type collide-shape uint int) _type_ 0)
(append-prim (_type_ collide-shape-prim) none 28)
(dummy-29 (_type_ uint) none 29)
)
)
@ -230,10 +230,13 @@
(hit-by-others)
(player)
)
(declare-type collide-work structure)
(declare-type touching-shapes-entry structure)
;; an actual instance of a collision primitive.
;; it's based on a transform (q means quaternion, v means with derivatives)
(deftype collide-shape (trsqv)
((process process :offset-assert 140)
((process process-drawable :offset-assert 140)
(max-iteration-count uint8 :offset-assert 144)
(nav-flags uint8 :offset-assert 145)
(pad-byte uint8 2 :offset-assert 146)
@ -249,35 +252,35 @@
:size-assert #xb8
:flag-assert #x38000000b8
(:methods
(new (symbol type process collide-list-enum) _type_)
(TODO-RENAME-28 (_type_) none 28)
(new (symbol type process-drawable collide-list-enum) _type_)
(TODO-RENAME-28 (_type_ vector) none 28)
(dummy-29 (_type_ int) none 29)
(TODO-RENAME-30 (_type_ vector) none 30)
(dummy-31 () none 31)
(dummy-32 (_type_ float uint) none 32)
(dummy-31 (_type_) none 31)
(dummy-32 (_type_ object uint) none 32)
(dummy-33 (_type_ vector uint) none 33)
(dummy-34 (_type_ uint) collide-shape-prim 34)
(dummy-35 (_type_) none 35)
(dummy-36 () none 36)
(dummy-35 (_type_) symbol 35)
(dummy-36 (_type_ bounding-box float uint) symbol 36)
(dummy-37 (_type_ vector) none 37)
(dummy-38 () none 38)
(dummy-39 () none 39)
(find-collision-meshes (_type_) symbol 38)
(dummy-39 (_type_ collide-shape collide-overlap-result) symbol 39)
(dummy-40 (_type_ structure) none 40) ;; ?? - I've seen overlaps-others-params | collide-edge-hold-list
(dummy-41 (_type_ attack-info float) none 41)
(dummy-42 () none 42)
(dummy-43 () none 43)
(dummy-44 (_type_) none 44)
(dummy-45 (_type_) none 45)
(dummy-46 (_type_) none 46)
(dummy-47 (_type_) none 47)
(dummy-48 (_type_) none 48)
(dummy-49 (_type_) none 49)
(dummy-50 (_type_) none 50)
(dummy-51 () none 51)
(dummy-52 () none 52)
(dummy-41 (_type_ attack-info float) vector 41)
(dummy-42 (_type_ collide-shape collide-work) none 42) ; collide-work is a guess
(dummy-43 (_type_ pull-rider-info) none 43)
(dummy-44 (_type_) symbol 44)
(dummy-45 (_type_) symbol 45)
(set-root-prim! (_type_ collide-shape-prim) collide-shape-prim 46)
(dummy-47 (_type_) symbol 47)
(clear-collide-with-as (_type_) none 48)
(restore-collide-with-as (_type_) none 49)
(backup-collide-with-as (_type_) none 50)
(set-root-prim-collide-with! (_type_ handle) none 51)
(set-root-prim-collide-as! (_type_ handle) none 52)
(dummy-53 (_type_ int int int) none 53)
(dummy-54 (_type_ int int) none 54)
(dummy-55 (_type_ process uint float float float) none 55)
(dummy-55 (_type_ process touching-shapes-entry float float float) none 55)
)
)
@ -293,8 +296,8 @@
(old-status uint64 :offset-assert 280)
(prev-status uint64 :offset-assert 288)
(reaction-flag uint32 :offset-assert 296)
(reaction function :offset-assert 300)
(no-reaction function :offset-assert 304)
(reaction (function collide-shape-moving collide-shape-intersect vector vector none) :offset-assert 300)
(no-reaction (function collide-shape-moving collide-shape-intersect vector vector none) :offset-assert 304)
(local-normal vector :inline :offset-assert 320)
(surface-normal vector :inline :offset-assert 336)
(poly-normal vector :inline :offset-assert 352)
@ -315,17 +318,17 @@
(:methods
(dummy-56 (_type_ pat-surface) none 56)
(dummy-57 (_type_ vector) none 57)
(dummy-58 (_type_ vector) none 58)
(dummy-58 (_type_ vector) symbol 58)
(dummy-59 (_type_ vector uint float symbol symbol symbol) none 59)
(dummy-60 (_type_ float float symbol uint) none 60)
(dummy-60 (_type_ float float symbol uint) symbol 60)
(TODO-RENAME-61 (_type_ vector vector vector) none 61)
(dummy-62 (_type_ vector float) vector 62)
(dummy-63 () none 63)
(dummy-64 () none 64)
(dummy-63 (_type_ vector vector float) float 63)
(dummy-64 (_type_ collide-tri-result vector) none 64)
)
)
(defmethod new collide-shape-prim ((allocation symbol) (type-to-make type) (cshape basic) (prim-id uint) (size-bytes int))
(defmethod new collide-shape-prim ((allocation symbol) (type-to-make type) (cshape collide-shape) (prim-id uint) (size-bytes int))
"Allocate a new collide-shape-prim. It is expected that children of collide-shape-prim override this.
NOTE: uses the size-bytes as the TOTAL size of the structure."
@ -345,17 +348,17 @@
)
(defmethod new collide-shape-prim-sphere ((allocation symbol) (type-to-make type) (cshape basic) (prim-id uint))
(defmethod new collide-shape-prim-sphere ((allocation symbol) (type-to-make type) (cshape collide-shape) (prim-id uint))
"Allocate a new sphere primitive"
(let ((obj (the collide-shape-prim-sphere ((method-of-type collide-shape-prim new) allocation type-to-make cshape prim-id (size-of collide-shape-prim-mesh)))))
(let ((obj (the collide-shape-prim-sphere ((method-of-type collide-shape-prim new) allocation type-to-make cshape prim-id (size-of collide-shape-prim-sphere)))))
(set! (-> obj pat) (new 'static 'pat-surface :mode (pat-mode obstacle)))
(set! (-> obj prim-core prim-type) -1)
obj
)
)
(defmethod new collide-shape-prim-mesh ((allocation symbol) (type-to-make type) (cshape basic) (mesh-id uint) (prim-id uint))
(defmethod new collide-shape-prim-mesh ((allocation symbol) (type-to-make type) (cshape collide-shape) (mesh-id uint) (prim-id uint))
"Allocate a new mesh primitive"
(let ((obj (the collide-shape-prim-mesh ((method-of-type collide-shape-prim new) allocation type-to-make cshape prim-id (size-of collide-shape-prim-mesh)))))
@ -367,7 +370,7 @@
)
)
(defmethod new collide-shape-prim-group ((allocation symbol) (type-to-make type) (cshape basic) (elt-count uint) (prim-id int))
(defmethod new collide-shape-prim-group ((allocation symbol) (type-to-make type) (cshape collide-shape) (elt-count uint) (prim-id int))
"Allocate a group of primitives."
(let ((obj (the collide-shape-prim-group ((method-of-type collide-shape-prim new) allocation type-to-make cshape (the uint prim-id) (the int (+ (-> type-to-make size) (* (+ elt-count -1) 4)))))))
@ -390,12 +393,10 @@
(defmethod asize-of collide-shape-prim-group ((obj collide-shape-prim-group))
"How big is this in memory?"
(the-as int
(+ (-> obj type size) (the-as uint (* (+ (-> obj allocated-prims) -1) 4)))
)
(the-as int (+ (-> obj type size) (* (+ (-> obj allocated-prims) -1) 4)))
)
(defmethod new collide-shape ((allocation symbol) (type-to-make type) (proc process) (collide-list-kind collide-list-enum))
(defmethod new collide-shape ((allocation symbol) (type-to-make type) (proc process-drawable) (collide-list-kind collide-list-enum))
"Allocate a new collide-shape and add to a collide-list"
(let ((obj (object-new allocation type-to-make (the int (-> type-to-make size)))))
@ -464,9 +465,7 @@
)
(defmethod asize-of collide-sticky-rider-group ((obj collide-sticky-rider-group))
(the-as int
(+ (-> obj type size) (the-as uint (* (1- (-> obj allocated-riders)) (size-of collide-sticky-rider))))
)
(the-as int (+ (-> obj type size) (* (+ (-> obj allocated-riders) -1) 32)))
)
(define *collide-shape-prim-backgnd*

File diff suppressed because it is too large Load Diff

View File

@ -43,7 +43,10 @@
(unknown-vector10 vector :inline :offset 544) ;; from - logic-target::flat-setup
(unknown-vector11 vector :inline :offset 560) ;; from - logic-target::target-no-move-post
(unknown-vector12 vector :inline :offset 576)
(unknown-vector13 vector :inline :offset 608) ;; from - logic-target::target-no-move-post
(unknown-vector13 vector :inline :offset 592) ;; from - collide-shape::method-37
(unknown-vector14 vector :inline :offset 608) ;; from - logic-target::target-no-move-post
(unknown-vector15 vector :inline :offset 624) ;; from - collide-shape::method-37
(unknown-vector16 vector :inline :offset 640) ;; from - collide-shape::method-37
(unknown-dynamics00 dynamics :offset 656) ;; from - logic-target::bend-gravity
(unknown-surface00 surface :offset 660)
(unknown-surface01 surface :offset 664) ;; not a symbol - target-util::target-align-vel-z-adjust
@ -78,7 +81,8 @@
(unknown-vector53 vector :inline :offset 1232)
(unknown-vector54 vector :inline :offset 1248)
(unknown-vector55 vector :inline :offset 1264)
(unknown-dword10 int64 :offset 1288) ;; from - target-util::can-jump?
(unknown-dword10 int64 :offset 1280) ;; from - collide-reaction-target::target-collision-reaction
(unknown-dword11 int64 :offset 1288) ;; from - target-util::can-jump?
(unknown-float60 float :offset 1300) ;; from - target-util::can-duck?
(unknown-float61 float :offset 1304) ;; from - target-util::target-align-vel-z-adjust
(unknown-float62 float :offset 1308) ;; from - target-util::target-print-stats
@ -89,8 +93,10 @@
(unknown-vector60 vector :inline :offset 1456) ;; from - logic-target::add-thrust
(unknown-vector61 vector :inline :offset 1504) ;; from - logic-target::add-thrust
(unknown-float70 float :offset 1520) ;; from - logic-target::add-thrust
(unknown-float71 float :offset 1524) ;; from - collide-shape::method-37
(unknown-vector70 vector :inline :offset 1536) ;; from - logic-target::add-thrust
(unknown-vector71 vector :inline :offset 1552) ;; from - target-tube::tube-thrust
(unknown-vector72 vector :inline :offset 1584) ;; from - collide-reaction-target::target-collision-reaction
(unknown-handle00 handle :offset 1600) ;; from logic-target::reset-target-state
(unknown-sphere-array00 collide-shape-prim-sphere 3 :offset 1608) ;; from target-util::target-collide-set! and from target-util::target-danger-set!
(unknown-sphere00 collide-shape-prim-sphere :offset 1632) ;; from target-util::target-danger-set!
@ -105,7 +111,7 @@
(unknown-float82 float :offset 1732) ;; from logic-target::bend-gravity
(unknown-vector80 vector :inline :offset 1744) ;; from logic-target::joint-points
(unknown-cspace00 cspace :inline :offset 1760) ;; from logic-target::joint-points
(unknown-vector90 vector :inline :offset 1776) ;; from logic-target::target-compute-edge
(unknown-vector90 vector :score 100 :inline :offset 1776) ;; from logic-target::target-compute-edge
(unknown-vector91 vector :inline :offset 1792) ;; from logic-target::target-compute-edge
(unknown-vector92 vector :inline :offset 1824) ;; from logic-target::joint-points
(unknown-cspace10 cspace :inline :offset 1808) ;; from logic-target::joint-points
@ -141,11 +147,13 @@
;; these were determined from racer-collision-reaction.
(history-length int16 :offset 2490)
(history-data collide-history 128 :inline :offset-assert 2496)
(unknown-float140 float :offset 18944)
(unknown-dword60 int64 :offset 18952) ;; from logic-target::add-thrust
(unknown-int40 int32 :offset 18880) ;; from logic-target::flag-setup
(unknown-dword70 int64 :offset 18888) ;; from logic-target::post-flag-setup
(unknown-dword71 int64 :offset 18896) ;; from logic-target::post-flag-setup
(unknown-dword72 int64 :offset 18912) ;; from logic-target::reset-target-state
(unknown-vector120 vector :offset 18928) ;; from collide-shape::method-37
(unknown-int50 uint32 :offset 18976) ;; from logic-target::print-target-stats
(unknown-soundid00 sound-id :offset 18980) ;; from powerups::target-powerup-process
(unknown-float130 float :offset 18984) ;; from powerups::target-powerup-process

View File

@ -5,167 +5,153 @@
;; name in dgo: collide-touch-h
;; dgos: GAME, ENGINE
(declare-type touching-shapes-entry structure)
;; DECOMP BEGINS
(deftype touching-prim (structure)
((cprim collide-shape-prim :offset-assert 0)
(has-tri? symbol :offset-assert 4)
(tri collide-tri-result :inline :offset-assert 16)
((cprim collide-shape-prim :offset-assert 0) ;; a big guess, there's a few that meet this name
(has-tri? symbol :offset-assert 4)
(tri collide-tri-result :inline :offset-assert 16)
)
:method-count-assert 9
:size-assert #x64
:flag-assert #x900000064
)
(deftype touching-prims-entry (structure)
((next touching-prims-entry :offset-assert 0)
(prev touching-prims-entry :offset-assert 4)
(allocated? symbol :offset-assert 8)
(u float :offset-assert 12)
(prim1 touching-prim :inline :offset-assert 16)
((next touching-prims-entry :offset-assert 0)
(prev touching-prims-entry :offset-assert 4)
(allocated? symbol :offset-assert 8)
(u float :offset-assert 12)
(prim1 touching-prim :inline :offset-assert 16)
(prim2 touching-prim :inline :offset-assert 128)
)
:method-count-assert 13
:size-assert #xe4
:flag-assert #xd000000e4
(:methods
(touched-prim (_type_ collide-shape-moving touching-shapes-entry) collide-shape-prim 9)
(get-touched-prim (_type_ trsqv touching-prims-entry) collide-shape-prim 9)
(dummy-10 () none 10)
(dummy-11 (_type_ vector) vector 11)
(dummy-12 () none 12)
(get-touched-tri (_type_ touching-prims-entry touching-prims-entry) collide-tri-result 12)
)
)
(deftype touching-prims-entry-pool (structure)
((head touching-prims-entry :offset-assert 0)
(nodes touching-prims-entry 64 :inline :offset-assert 16)
((head touching-prims-entry :offset-assert 0)
(nodes touching-prims-entry 64 :inline :offset-assert 16)
)
:method-count-assert 13
:size-assert #x3c10
:flag-assert #xd00003c10
(:methods
(new (symbol type) _type_ 0)
(dummy-9 () none 9)
(dummy-10 () none 10)
(alloc-node (_type_) touching-prims-entry 9)
(get-size (_type_) int 10)
(init-list! (_type_) none 11)
(dummy-12 () none 12)
(free-node (_type_ touching-prims-entry) touching-prims-entry 12)
)
)
(defmethod init-list! touching-prims-entry-pool ((obj touching-prims-entry-pool))
"Initialize all entries to be not allocated and in a linked list."
(let ((prev (the-as touching-prims-entry #f)))
(let ((current (the-as touching-prims-entry (-> obj nodes))))
(set! (-> obj head) current)
(countdown (a0-1 64)
(set! (-> current prev) prev)
(let ((next (&+ current 240)))
(set! (-> current next) (the-as touching-prims-entry next))
(set! (-> current allocated?) #f)
(set! prev current)
(set! current (the-as touching-prims-entry next))
(let ((current (the-as touching-prims-entry (-> obj nodes))))
(set! (-> obj head) current)
(countdown (a0-1 64)
(set! (-> current prev) prev)
(let ((next (&+ current 240)))
(set! (-> current next) (the-as touching-prims-entry next))
(set! (-> current allocated?) #f)
(set! prev current)
(set! current (the-as touching-prims-entry next))
)
)
)
)
(set! (-> prev next) #f)
)
(set! (-> prev next) #f)
)
(none)
)
(defmethod
new
touching-prims-entry-pool
((allocation symbol) (type-to-make type))
(let ((t9-0 (method-of-type structure new))
(v1-1 type-to-make)
)
(-> type-to-make size)
(let ((gp-0 (t9-0 allocation v1-1)))
((method-of-type touching-prims-entry-pool init-list!)
(the-as touching-prims-entry-pool gp-0)
)
(the-as touching-prims-entry-pool gp-0)
(defmethod new touching-prims-entry-pool ((allocation symbol) (type-to-make type))
"Allocate a new touching-prims-entry-pool"
;; Note - the original code passed (-> type-to-make size) as an argument.
;; however, the new method of structure doesn't have this argument.
;; it uses the same value for the size so it doesn't really matter.
(let ((obj (the touching-prims-entry-pool ((method-of-type structure new)
allocation
type-to-make
;; (-> type-to-make size) see note
)
)))
(init-list! obj)
obj
)
)
)
(deftype touching-shapes-entry (structure)
((cshape1 collide-shape :offset-assert 0)
(cshape2 collide-shape :offset-assert 4)
(resolve-u int8 :offset-assert 8)
(head touching-prims-entry :offset-assert 12)
((cshape1 collide-shape :offset-assert 0)
(cshape2 collide-shape :offset-assert 4)
(resolve-u int8 :offset-assert 8)
(head touching-prims-entry :offset-assert 12)
)
:allow-misaligned :method-count-assert 18
:allow-misaligned
:method-count-assert 18
:size-assert #x10
:flag-assert #x1200000010
(:methods
(dummy-9 () none 9)
(touched-shape (_type_ collide-shape-moving) collide-shape 10)
(dummy-9 (_type_) none 9)
(get-touched-shape (_type_ collide-shape) collide-shape 10)
(dummy-11 () none 11)
(prims-touching? (_type_ collide-shape-moving uint) touching-prims-entry 12)
(dummy-13 (_type_ control-info int int) none 13)
(dummy-14 () none 14)
(dummy-15 () none 15)
(prims-touching? (_type_ collide-shape-moving uint) touching-prims-entry 12) ; this one!
(prims-touching-action? (_type_ collide-shape uint uint) touching-prims-entry 13)
(free-list () none 14)
(free-entry-list (_type_) symbol 15)
(get-head (_type_) touching-prims-entry 16)
(unknown1 (_type_ (pointer uint32)) uint 17)
)
)
(deftype touching-list (structure)
((num-touching-shapes int32 :offset-assert 0)
(resolve-u int8 :offset-assert 4)
(touching-shapes touching-shapes-entry 32 :inline :offset-assert 8)
((num-touching-shapes int32 :offset-assert 0)
(resolve-u int8 :offset-assert 4)
(touching-shapes touching-shapes-entry 32 :inline :offset-assert 8)
)
:method-count-assert 15
:size-assert #x208
:flag-assert #xf00000208
(:methods
(new (symbol type) _type_ 0)
(dummy-9 () none 9)
(dummy-9 (_type_ collide-shape-prim collide-shape-prim float collide-shape collide-mesh-cache-tri) none 9)
(dummy-10 () none 10)
(dummy-11 () none 11)
(dummy-12 () none 12)
(dummy-13 () none 13)
(dummy-11 (_type_ float) none 11)
(dummy-12 (_type_) none 12)
(get-shapes-entry (_type_ collide-shape collide-shape) touching-shapes-entry 13)
(dummy-14 (_type_) none 14)
)
)
(defmethod new touching-list ((allocation symbol) (type-to-make type))
(let ((t9-0 (method-of-type structure new))
(v1-1 type-to-make)
)
(-> type-to-make size)
(let ((obj (the-as touching-list (t9-0 allocation v1-1))))
"See note in touching-prims-entry-pool"
(let ((obj (the touching-list ((method-of-type structure new)
allocation
type-to-make
;; (-> type-to-make size) see note
)
)))
(set! (-> obj num-touching-shapes) 0)
(set! (-> obj resolve-u) 0)
obj
)
)
)
(defmethod get-head touching-shapes-entry ((obj touching-shapes-entry))
(-> obj head)
)
(defmethod
unknown1
touching-shapes-entry
((obj touching-shapes-entry) (arg0 (pointer uint32)))
(defmethod unknown1 touching-shapes-entry ((obj touching-shapes-entry) (arg0 (pointer uint32)))
(-> arg0 0)
)
(define-perm *touching-prims-entry-pool* touching-prims-entry-pool
(new 'global 'touching-prims-entry-pool)
)
(define-perm *touching-prims-entry-pool* touching-prims-entry-pool (new 'global 'touching-prims-entry-pool))
(define-perm *touching-list* touching-list (new 'global 'touching-list))

View File

@ -5,3 +5,569 @@
;; name in dgo: collide-touch
;; dgos: GAME, ENGINE
;; DECOMP BEGINS
(defmethod get-size touching-prims-entry-pool ((obj touching-prims-entry-pool))
(let ((v0-0 0))
(let ((v1-0 (-> obj head)))
(while v1-0
(+! v0-0 1)
(set! v1-0 (-> v1-0 next))
(nop!)
(nop!)
(nop!)
)
)
v0-0
)
)
(defmethod alloc-node touching-prims-entry-pool ((obj touching-prims-entry-pool))
(let ((gp-0 (-> obj head)))
(cond
(gp-0
(let ((v1-0 (-> gp-0 next)))
(set! (-> obj head) v1-0)
(if v1-0
(set! (-> v1-0 prev) #f)
)
)
(set! (-> gp-0 allocated?) #t)
(set! (-> gp-0 next) #f)
(set! (-> gp-0 prev) #f)
)
(else
(format 0 "ERROR: touching-prims-entry-pool::alloc-node() failed!~%")
)
)
gp-0
)
)
(defmethod
free-node
touching-prims-entry-pool
((obj touching-prims-entry-pool) (arg0 touching-prims-entry))
(when (-> arg0 allocated?)
(set! (-> arg0 allocated?) #f)
(let ((v1-1 (-> obj head)))
(set! (-> arg0 next) v1-1)
(set! (-> arg0 prev) #f)
(set! (-> obj head) arg0)
(when v1-1
(set! (-> v1-1 prev) arg0)
arg0
)
)
)
)
(defmethod free-entry-list touching-shapes-entry ((obj touching-shapes-entry))
(when (-> obj cshape1)
(set! (-> obj cshape1) #f)
(let ((gp-0 (-> obj head)))
(when gp-0
(set! (-> obj head) #f)
(let ((s5-0 *touching-prims-entry-pool*))
(while gp-0
(let ((a1-0 gp-0))
(set! gp-0 (-> a1-0 next))
(free-node s5-0 a1-0)
)
)
)
#f
)
)
)
)
(defmethod dummy-14 touching-list ((obj touching-list))
(let ((s5-0 (the-as object (-> obj touching-shapes))))
(countdown (s4-0 (-> obj num-touching-shapes))
(free-entry-list (the-as touching-shapes-entry s5-0))
(set! s5-0 (&+ (the-as touching-shapes-entry s5-0) 16))
)
)
(set! (-> obj num-touching-shapes) 0)
(set! (-> obj resolve-u) 0)
0
(none)
)
(defmethod
get-shapes-entry
touching-list
((obj touching-list) (arg0 collide-shape) (arg1 collide-shape))
(let ((v0-0 (the-as object (-> obj touching-shapes))))
(let ((v1-0 (the-as object #f)))
(countdown (a3-0 (-> obj num-touching-shapes))
(let ((t0-0 (-> (the-as touching-shapes-entry v0-0) cshape1)))
(set! v1-0 (cond
(t0-0
(if
(or
(and
(= t0-0 arg0)
(= (-> (the-as touching-shapes-entry v0-0) cshape2) arg1)
)
(and
(= t0-0 arg1)
(= (-> (the-as touching-shapes-entry v0-0) cshape2) arg0)
)
)
(return (the-as touching-shapes-entry v0-0))
)
v1-0
)
(else
v0-0
)
)
)
)
(set! v0-0 (&+ (the-as touching-shapes-entry v0-0) 16))
)
(cond
(v1-0
(set! v0-0 v1-0)
)
(else
(when (>= (-> obj num-touching-shapes) 32)
(format 0 "ERROR: touching-list::get-shapes-entry() failed!~%")
(return (the-as touching-shapes-entry #f))
)
(+! (-> obj num-touching-shapes) 1)
)
)
)
(set! (-> (the-as touching-shapes-entry v0-0) cshape1) arg0)
(set! (-> (the-as touching-shapes-entry v0-0) cshape2) arg1)
(set! (-> (the-as touching-shapes-entry v0-0) head) #f)
(set! (-> (the-as touching-shapes-entry v0-0) resolve-u) 1)
(set! (-> obj resolve-u) 1)
(the-as touching-shapes-entry v0-0)
)
)
(deftype add-prims-touching-work (structure)
((tri1 collide-tri-result :offset-assert 0)
(tri2 collide-tri-result :offset-assert 4)
)
:method-count-assert 9
:size-assert #x8
:flag-assert #x900000008
)
;; WARN: Expression building failed: Function (method 9 touching-list) has a return type of none, but the expression builder found a return statement.
(defmethod
dummy-9
touching-list
((obj touching-list)
(arg0 collide-shape-prim)
(arg1 collide-shape-prim)
(arg2 float)
(arg3 collide-shape)
(arg4 collide-mesh-cache-tri)
)
(let ((gp-0 (new 'stack-no-clear 'touching-shapes-entry)))
(set! (-> gp-0 cshape1) arg3)
(set! (-> gp-0 cshape2) (the-as collide-shape arg4))
(let ((s2-0 (get-shapes-entry obj (-> arg0 cshape) (-> arg1 cshape))))
(when s2-0
(when (= (-> s2-0 cshape1) (-> arg1 cshape))
(let ((v1-4 arg0))
(set! arg0 arg1)
(set! arg1 v1-4)
)
)
(let ((s0-0 (-> s2-0 head)))
(while s0-0
(when (and (= (-> s0-0 prim1 cprim) arg0) (= (-> s0-0 prim2 cprim) arg1))
(when (< arg2 (-> s0-0 u))
(-> s0-0 u)
(let ((v1-12 (-> s0-0 prim1))
(a1-2 (-> gp-0 cshape1))
)
(cond
(a1-2
(set! (-> v1-12 has-tri?) #t)
(mem-copy! (the-as pointer (-> v1-12 tri)) (the-as pointer a1-2) 84)
)
(else
(set! (-> v1-12 has-tri?) #f)
)
)
)
(let ((v1-15 (-> s0-0 prim2))
(a1-3 (-> gp-0 cshape2))
)
(cond
(a1-3
(set! (-> v1-15 has-tri?) #t)
(mem-copy! (the-as pointer (-> v1-15 tri)) (the-as pointer a1-3) 84)
)
(else
(set! (-> v1-15 has-tri?) #f)
)
)
)
)
(return 0)
)
(set! s0-0 (-> s0-0 next))
)
)
(let ((s0-1 (alloc-node *touching-prims-entry-pool*)))
(when s0-1
(let ((v1-22 (-> s2-0 head)))
(set! (-> s0-1 next) v1-22)
(set! (-> s0-1 prev) #f)
(set! (-> s2-0 head) s0-1)
(if v1-22
(set! (-> v1-22 prev) s0-1)
)
)
(set! (-> s0-1 u) arg2)
(when (>= arg2 0.0)
(set! (-> s2-0 resolve-u) 1)
(set! (-> obj resolve-u) 1)
)
(let ((v1-26 (-> s0-1 prim1))
(a1-4 (-> gp-0 cshape1))
)
(set! (-> v1-26 cprim) arg0)
(cond
(a1-4
(set! (-> v1-26 has-tri?) #t)
(mem-copy! (the-as pointer (-> v1-26 tri)) (the-as pointer a1-4) 84)
)
(else
(set! (-> v1-26 has-tri?) #f)
)
)
)
(let ((v1-29 (-> s0-1 prim2))
(a1-5 (-> gp-0 cshape2))
)
(set! (-> v1-29 cprim) arg1)
(cond
(a1-5
(set! (-> v1-29 has-tri?) #t)
(mem-copy! (the-as pointer (-> v1-29 tri)) (the-as pointer a1-5) 84)
)
(else
(set! (-> v1-29 has-tri?) #f)
)
)
)
)
)
)
)
)
0
(none)
)
(defmethod dummy-11 touching-list ((obj touching-list) (arg0 float))
(when (nonzero? (-> obj resolve-u))
(set! (-> obj resolve-u) 0)
(let ((s5-0 (the-as object (-> obj touching-shapes))))
(countdown (s4-0 (-> obj num-touching-shapes))
(when (nonzero? (-> (the-as touching-shapes-entry s5-0) resolve-u))
(set! (-> (the-as touching-shapes-entry s5-0) resolve-u) 0)
(when (-> (the-as touching-shapes-entry s5-0) cshape1)
(let ((s3-0 (-> (the-as touching-shapes-entry s5-0) head)))
(while s3-0
(let ((f0-0 (-> s3-0 u)))
(set! s3-0 (cond
((>= f0-0 0.0)
(cond
((>= arg0 f0-0)
(set! (-> s3-0 u) -1.0)
(set! s3-0 (-> s3-0 next))
)
(else
(let ((a1-1 s3-0))
(let ((v1-7 (-> s3-0 next)))
(let ((a0-1 (-> s3-0 prev)))
(if a0-1
(set! (-> a0-1 next) v1-7)
(set!
(-> (the-as touching-shapes-entry s5-0) head)
v1-7
)
)
(if v1-7
(set! (-> v1-7 prev) a0-1)
)
)
(set! s3-0 v1-7)
)
(free-node *touching-prims-entry-pool* a1-1)
)
)
)
s3-0
)
(else
(-> s3-0 next)
)
)
)
)
)
)
(if (not (-> (the-as touching-shapes-entry s5-0) head))
(set! (-> (the-as touching-shapes-entry s5-0) cshape1) #f)
)
)
)
(set! s5-0 (&+ (the-as touching-shapes-entry s5-0) 16))
)
)
)
0
(none)
)
(defmethod dummy-12 touching-list ((obj touching-list))
(let ((gp-0 (the-as object (-> obj touching-shapes))))
(countdown (s5-0 (-> obj num-touching-shapes))
(let ((s4-0 (-> (the-as touching-shapes-entry gp-0) cshape1)))
(when s4-0
(let ((s3-0 (-> (the-as touching-shapes-entry gp-0) cshape2)))
(when (= (-> s3-0 process type) target)
(let ((v1-2 s4-0))
(set! s4-0 s3-0)
(set! s3-0 v1-2)
)
)
(let ((v1-4 (-> s4-0 event-self)))
(when v1-4
(let ((a1-0 (new 'stack-no-clear 'event-message-block)))
(set! (-> a1-0 from) (-> s3-0 process))
(set! (-> a1-0 num-params) 1)
(set! (-> a1-0 message) (the-as symbol v1-4))
(set! (-> a1-0 param 0) (the-as uint gp-0))
(send-event-function (-> s4-0 process) a1-0)
)
)
)
(let ((v1-5 (-> s4-0 event-other)))
(when v1-5
(let ((a1-1 (new 'stack-no-clear 'event-message-block)))
(set! (-> a1-1 from) (-> s4-0 process))
(set! (-> a1-1 num-params) 1)
(set! (-> a1-1 message) (the-as symbol v1-5))
(set! (-> a1-1 param 0) (the-as uint gp-0))
(send-event-function (-> s3-0 process) a1-1)
)
)
)
(let ((v1-6 (-> s3-0 event-self)))
(when v1-6
(let ((a1-2 (new 'stack-no-clear 'event-message-block)))
(set! (-> a1-2 from) (-> s4-0 process))
(set! (-> a1-2 num-params) 1)
(set! (-> a1-2 message) (the-as symbol v1-6))
(set! (-> a1-2 param 0) (the-as uint gp-0))
(send-event-function (-> s3-0 process) a1-2)
)
)
)
(let ((v1-7 (-> s3-0 event-other)))
(when v1-7
(let ((a1-3 (new 'stack-no-clear 'event-message-block)))
(set! (-> a1-3 from) (-> s3-0 process))
(set! (-> a1-3 num-params) 1)
(set! (-> a1-3 message) (the-as symbol v1-7))
(set! (-> a1-3 param 0) (the-as uint gp-0))
(send-event-function (-> s4-0 process) a1-3)
)
)
)
)
)
)
(set! gp-0 (&+ (the-as touching-shapes-entry gp-0) 16))
)
)
0
(none)
)
(defmethod
prims-touching?
touching-shapes-entry
((obj touching-shapes-entry) (arg0 collide-shape-moving) (arg1 uint))
(cond
((= (-> obj cshape1) arg0)
(let ((v1-1 (-> obj head)))
(while v1-1
(if (logtest? (-> v1-1 prim1 cprim prim-id) arg1)
(return v1-1)
)
(set! v1-1 (-> v1-1 next))
)
)
)
((= (-> obj cshape2) arg0)
(let ((v1-4 (-> obj head)))
(while v1-4
(if (logtest? (-> v1-4 prim2 cprim prim-id) arg1)
(return v1-4)
)
(set! v1-4 (-> v1-4 next))
)
)
)
(else
(format
0
"ERROR: touching-shapes-entry::prims-touching? : Bogus cshape value!~%"
)
)
)
(the-as touching-prims-entry #f)
)
(defmethod
prims-touching-action?
touching-shapes-entry
((obj touching-shapes-entry) (arg0 collide-shape) (arg1 uint) (arg2 uint))
(cond
((= (-> obj cshape1) arg0)
(let ((v1-1 (-> obj head)))
(while v1-1
(let ((a0-1 (-> v1-1 prim1 cprim)))
(if
(and
(logtest? arg1 (-> a0-1 prim-core action))
(zero? (logand arg2 (-> a0-1 prim-core action)))
)
(return v1-1)
)
)
(set! v1-1 (-> v1-1 next))
)
)
)
((= (-> obj cshape2) arg0)
(let ((v1-4 (-> obj head)))
(while v1-4
(let ((a0-5 (-> v1-4 prim2 cprim)))
(if
(and
(logtest? arg1 (-> a0-5 prim-core action))
(zero? (logand arg2 (-> a0-5 prim-core action)))
)
(return v1-4)
)
)
(set! v1-4 (-> v1-4 next))
)
)
)
(else
(format
0
"ERROR: touching-shapes-entry::prims-touching-action? : Bogus cshape value!~%"
)
)
)
(the-as touching-prims-entry #f)
)
(defmethod
get-touched-shape
touching-shapes-entry
((obj touching-shapes-entry) (arg0 collide-shape))
(cond
((= (-> obj cshape1) arg0)
(return (-> obj cshape2))
)
((= (-> obj cshape2) arg0)
(return (-> obj cshape1))
)
)
(the-as collide-shape #f)
)
(defmethod
get-touched-prim
touching-prims-entry
((obj touching-prims-entry) (arg0 trsqv) (arg1 touching-prims-entry))
(cond
((= (-> arg1 next) arg0)
(return (-> obj prim1 cprim))
)
((= (-> arg1 prev) arg0)
(return (-> obj prim2 cprim))
)
)
(the-as collide-shape-prim #f)
)
(defmethod
get-touched-tri
touching-prims-entry
((obj touching-prims-entry)
(arg0 touching-prims-entry)
(arg1 touching-prims-entry)
)
(let ((v0-0 (the-as collide-tri-result #f)))
(cond
((= (-> arg1 next) arg0)
(let ((v1-2 (-> obj prim1)))
(if (-> v1-2 has-tri?)
(set! v0-0 (-> v1-2 tri))
)
)
)
((= (-> arg1 prev) arg0)
(let ((v1-5 (-> obj prim2)))
(if (-> v1-5 has-tri?)
(set! v0-0 (-> v1-5 tri))
)
)
)
)
v0-0
)
)
(defmethod
dummy-11
touching-prims-entry
((obj touching-prims-entry) (arg0 vector))
(let* ((s4-0 (-> obj prim1 cprim))
(s3-0 (-> obj prim2 cprim))
(gp-1
(vector-!
(new 'stack-no-clear 'vector)
(the-as vector (-> s3-0 prim-core))
(the-as vector (-> s4-0 prim-core))
)
)
)
(let
((f1-2
(-
(- (vector-length gp-1) (-> s3-0 prim-core world-sphere w))
(-> s4-0 prim-core world-sphere w)
)
)
)
(vector-normalize! gp-1 (+ (-> s4-0 prim-core world-sphere w) (* 0.5 f1-2)))
)
(vector+! arg0 gp-1 (the-as vector (-> s4-0 prim-core)))
)
arg0
)

View File

@ -6,9 +6,9 @@
;; dgos: GAME, ENGINE
;; Forward declarations for stuff we haven't written yet:
(define-extern find-instance-by-name (function string instance))
(define-extern find-instance-by-name (function string prototype-bucket))
(define-extern *edit-instance* string)
(define-extern prototype-bucket-recalc-fields (function instance none))
(define-extern prototype-bucket-recalc-fields (function instance instance))
;; Necessary forward declarations
(define-extern cam-robotboss (state camera-slave))
@ -487,9 +487,9 @@
(let ((v1-0 (find-instance-by-name *edit-instance*)))
(when v1-0
(if (= arg1 4)
(set! (-> v1-0 unknown) (logxor (-> v1-0 unknown) (the-as uint arg0)))
(set! (-> v1-0 flags) (logxor (-> v1-0 flags) (the-as uint arg0)))
)
(logtest? (-> v1-0 unknown) arg0)
(logtest? (-> v1-0 flags) arg0)
)
)
)
@ -603,9 +603,9 @@
(cond
(v1-0
(if (= arg1 4)
(set! (-> v1-0 unknown) (logxor (-> v1-0 unknown) 1))
(set! (-> v1-0 flags) (logxor (-> v1-0 flags) 1))
)
(zero? (logand (-> v1-0 unknown) 1))
(zero? (logand (-> v1-0 flags) 1))
)
(else
#f

View File

@ -15,6 +15,7 @@
;; In many cases, "draw" simply adds data to a buffer that must later be converted to dma in finish-background
;; or similar.
(declare-type drawable-error drawable)
(deftype drawable (basic)
((id int16 :offset-assert 4) ;; ID number (not always used)
(bsphere vector :inline :offset-assert 16) ;; bounding sphere
@ -24,7 +25,7 @@
:flag-assert #x1200000020
(:methods
(login (_type_) _type_ 9)
(draw (_type_ drawable display-frame) none 10)
(draw (_type_ drawable display-frame) none 10) ;; display-frame is from the method inspect tool
(collide-with-box (_type_ int collide-list) none 11)
(collide-y-probe (_type_ int collide-list) none 12)
(collide-ray (_type_ int collide-list) none 13)
@ -39,7 +40,7 @@
;; A drawable that simply draws a sphere and an error message at the origin of the bounding sphere.
(deftype drawable-error (drawable)
((name basic :offset-assert 32)
((name string :offset-assert 32)
)
:method-count-assert 18
:size-assert #x24

View File

@ -5,7 +5,8 @@
;; name in dgo: process-drawable
;; dgos: GAME, ENGINE
;; definition for function cspace-by-name
;; DECOMP BEGINS
(defun cspace-by-name ((arg0 process-drawable) (arg1 string))
(let* ((s4-0 (-> arg0 node-list length))
(s3-0 0)
@ -22,7 +23,6 @@
(the-as cspace #f)
)
;; definition for function cspace-index-by-name
(defun cspace-index-by-name ((arg0 process-drawable) (arg1 string))
(let* ((s4-0 0)
(s3-0 (-> arg0 node-list length))
@ -41,7 +41,6 @@
-1
)
;; definition for function vector<-cspace!
(defun vector<-cspace! ((arg0 vector) (arg1 cspace))
(rlet ((Q :class vf)
(vf0 :class vf)
@ -60,12 +59,10 @@
)
)
;; definition for function vector<-cspace+vector!
(defun vector<-cspace+vector! ((arg0 vector) (arg1 cspace) (arg2 vector))
(vector-matrix*! arg0 arg2 (-> arg1 bone transform))
)
;; definition (debug) for function cspace-children
(defun-debug cspace-children ((arg0 process-drawable) (arg1 int))
(let ((a3-0 '()))
(countdown (s4-0 (-> arg0 node-list length))
@ -77,9 +74,8 @@
)
)
;; definition (debug) for function cspace-inspect-tree
;; ERROR: function was not converted to expressions. Cannot decompile.
;; definition for method 0 of type draw-control
(defmethod
new
draw-control
@ -95,8 +91,6 @@
)
)
;; definition for method 10 of type draw-control
;; INFO: Return type mismatch int vs none.
(defmethod lod-set! draw-control ((obj draw-control) (arg0 int))
(let ((v1-1 (max 0 (min arg0 (-> obj lod-set max-lod)))))
(set! (-> obj desired-lod) v1-1)
@ -109,8 +103,6 @@
(none)
)
;; definition for method 11 of type draw-control
;; INFO: Return type mismatch int vs none.
(defmethod lods-assign! draw-control ((obj draw-control) (arg0 lod-set))
(mem-copy! (the-as pointer (-> obj lod-set)) (the-as pointer arg0) 33)
(let ((a1-2 (min (-> obj cur-lod) (-> obj lod-set max-lod))))
@ -121,8 +113,6 @@
(none)
)
;; definition for method 9 of type lod-set
;; Used lq/sq
(defmethod
dummy-9
lod-set
@ -192,7 +182,6 @@
obj
)
;; definition for symbol *default-skel-template*, type pair
(define
*default-skel-template*
'(
@ -200,7 +189,6 @@
)
)
;; definition for function make-nodes-from-jg
(defbehavior
make-nodes-from-jg process-drawable
((arg0 art-joint-geo) (arg1 pair) (arg2 symbol))
@ -287,7 +275,6 @@
)
)
;; definition for function fill-skeleton-cache
;; WARN: Unsupported inline assembly instruction kind - [sync.l]
;; WARN: Unsupported inline assembly instruction kind - [cache dxwbin a2, 0]
;; WARN: Unsupported inline assembly instruction kind - [sync.l]
@ -329,7 +316,6 @@
0
)
;; definition for function execute-math-engine
(defun execute-math-engine ()
(let ((gp-0 *matrix-engine*))
(countdown (s5-0 (-> gp-0 length))
@ -345,12 +331,9 @@
0
)
;; definition for method 17 of type process-drawable
;; INFO: Return type mismatch int vs none.
;; Used lq/sq
(defmethod dummy-17 process-drawable ((obj process-drawable))
(cond
((logtest? (-> obj draw status) 6)
(#t;;(logtest? (-> obj draw status) 6)
)
((zero? (-> obj skel))
(matrix<-transformq+trans!
@ -461,11 +444,9 @@
(none)
)
;; definition for method 18 of type process-drawable
;; INFO: Return type mismatch int vs none.
(defmethod dummy-18 process-drawable ((obj process-drawable))
(if (type-type? (-> obj root type) collide-shape)
(dummy-48 (the-as collide-shape (-> obj root)))
(clear-collide-with-as (the-as collide-shape (-> obj root)))
)
(if (nonzero? (-> obj skel))
(ja-channel-set! 0)
@ -474,8 +455,6 @@
(none)
)
;; definition for function draw-joint-spheres
;; Used lq/sq
(defun draw-joint-spheres ((arg0 process-drawable))
(dotimes (s5-0 (-> arg0 node-list length))
(let
@ -492,7 +471,6 @@
#f
)
;; definition for method 10 of type process-drawable
(defmethod deactivate process-drawable ((obj process-drawable))
(if (nonzero? (-> obj part))
(kill-and-free-particles (-> obj part))
@ -504,7 +482,6 @@
(none)
)
;; failed to figure out what this is:
(defstate process-drawable-art-error (process-drawable)
:code
(behavior ((arg0 string))
@ -539,7 +516,6 @@
(define-extern ja-post (function none :behavior process-drawable))
(define-extern anim-loop (function none :behavior process-drawable))
;; failed to figure out what this is:
(defstate process-drawable-idle (process-drawable)
:code
anim-loop
@ -547,12 +523,9 @@
ja-post
)
;; definition for method 14 of type process-drawable
;; WARN: Stack slot offset 20 signed mismatch
;; WARN: Stack slot offset 20 signed mismatch
;; WARN: Stack slot offset 20 signed mismatch
;; INFO: Return type mismatch draw-control vs none.
;; Used lq/sq
(defmethod
initialize-skeleton
process-drawable
@ -737,7 +710,7 @@
(->
(the-as
vector
((method-of-type res-lump get-property-struct)
(get-property-struct
(-> sv-16 extra)
'trans-offset
'interp
@ -758,14 +731,13 @@
(let
((gp-1 (the-as collide-shape (-> (the-as collide-shape obj) dir-targ x))))
(if (and gp-1 (nonzero? gp-1) (type-type? (-> gp-1 type) collide-shape))
((method-of-object gp-1 dummy-38))
(find-collision-meshes gp-1)
)
)
(label cfg-59)
(none)
)
;; definition for method 15 of type process-drawable
(defmethod
dummy-15
process-drawable
@ -782,8 +754,6 @@
obj
)
;; definition for method 16 of type process-drawable
;; INFO: Return type mismatch trsqv vs collide-shape.
(defmethod
dummy-16
process-drawable
@ -866,7 +836,6 @@
(the-as collide-shape (-> obj root))
)
;; definition for function ja-done?
(defbehavior ja-done? process-drawable ((arg0 int))
(let ((v1-2 (-> self skel root-channel arg0)))
(cond
@ -883,12 +852,10 @@
)
)
;; definition for function ja-min?
(defbehavior ja-min? process-drawable ((arg0 int))
(= (-> self skel root-channel arg0 frame-num) 0.0)
)
;; definition for function ja-max?
(defbehavior ja-max? process-drawable ((arg0 int))
(let ((v1-2 (-> self skel root-channel arg0)))
(>=
@ -898,17 +865,14 @@
)
)
;; definition for function ja-num-frames
(defbehavior ja-num-frames process-drawable ((arg0 int))
(+ (-> self skel root-channel arg0 frame-group data 0 length) -1)
)
;; definition for function ja-frame-num
(defbehavior ja-frame-num process-drawable ((arg0 int))
(-> self skel root-channel arg0 frame-num)
)
;; definition for function ja-aframe-num
(defbehavior ja-aframe-num process-drawable ((arg0 int))
(let* ((a0-2 (-> self skel root-channel arg0))
(v1-2 (-> a0-2 frame-group))
@ -923,7 +887,6 @@
)
)
;; definition for function ja-aframe
(defbehavior ja-aframe process-drawable ((arg0 float) (arg1 int))
(let ((v1-3 (-> self skel root-channel arg1 frame-group)))
(/ (- arg0 (if (and v1-3 (nonzero? v1-3))
@ -939,17 +902,14 @@
)
)
;; definition for function ja-speed
(defbehavior ja-speed process-drawable ((arg0 int))
(-> self skel root-channel arg0 frame-group speed)
)
;; definition for function ja-step
(defbehavior ja-step process-drawable ((arg0 int))
(-> self skel root-channel arg0 frame-group artist-step)
)
;; definition for function ja-channel-set!
(defbehavior ja-channel-set! process-drawable ((arg0 int))
(set! (-> self skel active-channels) arg0)
(set! (-> self skel root-channel) (-> self skel channel))
@ -975,7 +935,6 @@
arg0
)
;; definition for function ja-channel-push!
(defbehavior ja-channel-push! process-drawable ((arg0 int) (arg1 int))
(cond
((or
@ -1068,8 +1027,6 @@
)
)
;; definition for function joint-control-reset!
;; INFO: Return type mismatch int vs none.
(defbehavior
joint-control-reset! process-drawable
((arg0 joint-control) (arg1 joint-control-channel))
@ -1121,7 +1078,6 @@
(none)
)
;; definition for function ja-group-size
(defbehavior ja-group-size process-drawable ()
(if
(<
@ -1133,7 +1089,6 @@
)
)
;; definition for function ja-eval
(defbehavior ja-eval process-drawable ()
(let ((gp-0 (-> self skel root-channel 0))
(s5-0 (-> self skel channel (-> self skel active-channels)))
@ -1155,7 +1110,6 @@
0
)
;; definition for function ja-blend-eval
(defbehavior ja-blend-eval process-drawable ()
(let ((gp-0 (-> self skel root-channel))
(s5-0 (the-as joint-control-channel (-> self skel channel)))
@ -1179,17 +1133,14 @@
0
)
;; definition for method 19 of type process-drawable
;; ERROR: function was not converted to expressions. Cannot decompile.
;; definition for function ja-post
;; INFO: Return type mismatch int vs none.
;; WARN: Expression building failed: Function ja-post has a return type of none, but the expression builder found a return statement.
(defbehavior ja-post process-drawable ()
(when (nonzero? (-> self draw))
(let ((gp-1 (logtest? (-> self draw status) 16)))
(set! (-> self draw status) (logand -21 (-> self draw status)))
(when (nonzero? (-> self skel))
(when #f ;;(nonzero? (-> self skel)) TODO this stuff is not done
(dummy-19 self)
(when (or (logtest? (-> self skel status) 1) gp-1)
(dummy-17 self)
@ -1209,8 +1160,6 @@
(none)
)
;; definition for method 9 of type joint-control
;; INFO: Return type mismatch float vs none.
(defmethod dummy-9 joint-control ((obj joint-control))
(cond
((<
@ -1253,7 +1202,6 @@
(none)
)
;; definition for function anim-loop
(defbehavior anim-loop process-drawable ()
(logior! (-> self mask) (process-mask sleep-code))
(while #t
@ -1263,20 +1211,17 @@
(none)
)
;; definition for function transform-post
(defbehavior transform-post process-drawable ()
(ja-post)
(dummy-47 (the-as collide-shape (-> self root)))
0
)
;; definition for function rider-trans
(defbehavior rider-trans process-drawable ()
(dummy-35 (the-as collide-shape (-> self root)))
0
)
;; definition for function rider-post
(defbehavior rider-post process-drawable ()
(ja-post)
(let ((gp-0 (the-as collide-shape (-> self root))))
@ -1287,7 +1232,6 @@
0
)
;; definition for function pusher-post
(defbehavior pusher-post process-drawable ()
(ja-post)
(let ((gp-0 (the-as collide-shape (-> self root))))
@ -1297,7 +1241,6 @@
0
)
;; definition for function process-drawable-delay-player
(defbehavior process-drawable-delay-player process-drawable ((arg0 int))
(while
(and
@ -1326,8 +1269,6 @@
0
)
;; definition for function process-drawable-fuel-cell-handler
;; INFO: Return type mismatch int vs none.
(defbehavior
process-drawable-fuel-cell-handler process-drawable
((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
@ -1345,10 +1286,7 @@
(none)
)
;; definition for function process-drawable-birth-fuel-cell
;; WARN: Found some very strange gotos. Check result carefully, this is not well tested.
;; INFO: Return type mismatch int vs none.
;; Used lq/sq
(defbehavior
process-drawable-birth-fuel-cell process-drawable
((arg0 entity) (arg1 vector) (arg2 symbol))
@ -1365,13 +1303,20 @@
(let ((s5-0 (-> v1-0 extra perm task))
(s4-0 (new 'static 'fact-info))
)
(set! (-> s4-0 options) (the-as uint 0))
(set! (-> s4-0 options) (fact-options))
(if arg2
(set! (-> s4-0 options) (the-as uint 64))
(set! (-> s4-0 options) (fact-options fop6))
)
(when (and (nonzero? s5-0) (not (task-complete? *game-info* s5-0)))
(label cfg-12)
(birth-pickup-at-point gp-0 6 (the float s5-0) #f self s4-0)
(birth-pickup-at-point
gp-0
(pickup-type fuel-cell)
(the float s5-0)
#f
self
s4-0
)
(when (not (-> self child))
(suspend)
(goto cfg-12)
@ -1385,11 +1330,9 @@
;; this part is debug only
(when *debug-segment*
;; definition for symbol *valid-con*, type string
(define *valid-con* (new 'debug 'string #x4000 (the-as string #f)))
)
;; definition (debug) for function process-drawable-valid?
(defun-debug process-drawable-valid? ((arg0 process-drawable))
(let ((s5-0 #t))
(clear *valid-con*)

View File

@ -1443,7 +1443,7 @@
(set! (-> proc entity) ent)
(set! (-> ent extra process) proc)
(birth-log "activated: ~A ~A, now doing init ~A~%" proc ent (method-of-object proc init-from-entity!))
;;(birth-log "activated: ~A ~A, now doing init ~A~%" proc ent (method-of-object proc init-from-entity!))
;; run the initializer
(run-now-in-process proc (method-of-object proc init-from-entity!) proc ent)
@ -1455,17 +1455,26 @@
;; TODO
(define-extern birth-viewer (function process entity object))
(declare-type collectable process-drawable)
(declare-type ecovalve basic)
(declare-type eco-collectable process-drawable)
(declare-type eco eco-collectable)
(defmethod birth! entity-actor ((obj entity-actor))
"Create a process for this entity and start it."
;; temp
(unless (type-type? (-> obj etype) part-spawner)
(birth-log "rejecting ~A birth because it is not a part-spawner (was ~A)~%" obj (-> obj etype))
(unless (or (type-type? (-> obj etype) part-spawner)
(type-type? (-> obj etype) collectable)
(type-type? (-> obj etype) vent)
(type-type? (-> obj etype) ecovalve)
;(type-type? (-> obj etype) eco)
)
;;(birth-log "rejecting ~A birth because yes (was ~A)~%" obj (-> obj etype))
(logior! (-> obj extra perm status) (entity-perm-status bit-0))
(return obj)
)
(birth-log "call to birth! on ~A~%" obj)
;;(birth-log "call to birth! on ~A~%" obj)
(let* ((entity-type (-> obj etype))
(info (entity-info-lookup entity-type))
@ -1565,12 +1574,12 @@
;; NOTE: we don't actually birth the actors. It is too slow.
;; so it gets spread over multiple frames later.
(when (nonzero? (-> obj actors))
(birth-log "add-to-level! for ~D actors for ~A~%" (-> obj actors length) obj)
;;(birth-log "add-to-level! for ~D actors for ~A~%" (-> obj actors length) obj)
(dotimes (birth-idx (-> obj actors length))
(let* ((idx-to-birth (-> obj actor-birth-order birth-idx))
(actor-to-birth (-> obj actors data (logand idx-to-birth #xffff) actor))
)
(birth-log "now adding to level: ~D ~D ~A~%" birth-idx idx-to-birth actor-to-birth)
;;(birth-log "now adding to level: ~D ~D ~A~%" birth-idx idx-to-birth actor-to-birth)
(add-to-level! actor-to-birth *level* (-> obj level) (the-as actor-id (-> actor-to-birth aid)))
)
)
@ -1622,7 +1631,7 @@
(let ((cams (-> obj cameras)))
(when (nonzero? cams)
(dotimes (s3-1 (-> cams length))
(birth-log "birth cam: ~A~%" (-> cams s3-1))
;;(birth-log "birth cam: ~A~%" (-> cams s3-1))
(birth! (-> cams s3-1))
)
)

File diff suppressed because it is too large Load Diff

View File

@ -65,6 +65,31 @@
(enum->string pickup-type arg0)
)
(defenum fact-options
:bitfield #t
:type uint64
(vent-blocked 0)
(fop1 1)
(vent-valve 2)
(fop3 3)
(fop4 4)
(fop5 5)
(fop6 6)
(fop7 7)
(can-collect 8)
(fade 9)
(large 10)
(fop11 11)
(powerup 12)
(fop13 13)
(fop14 14)
(fop15 15)
(fop16 16)
(fop17 17)
(eco-blocked 18)
(respawn 19)
)
;; Each individual enemy and pickup process will allocate a fact-info on its process heap
;; The settings may be different per object - for example some eco pickups may have different
;; amounts or timings
@ -74,15 +99,15 @@
(pickup-type pickup-type :offset-assert 8)
(pickup-amount float :offset-assert 12) ;; eco increment on pickup
(pickup-spawn-amount float :offset-assert 16)
(options uint64 :offset-assert 24) ;; actually bitfield enum
(fade-time uint64 :offset-assert 32)
(options fact-options :offset-assert 24)
(fade-time int64 :offset-assert 32)
)
:method-count-assert 12
:size-assert #x28
:flag-assert #xc00000028
(:methods
(new (symbol type process-drawable pickup-type float) _type_ 0)
(TODO-RENAME-9 (_type_ symbol process-tree fact-info int) uint 9) ;; See nav-enemy::process-drawable-death-event-handler
(drop-pickup (_type_ symbol process-tree fact-info int) none 9)
(reset! (_type_ symbol) none 10)
(pickup-collectable! (_type_ pickup-type float handle) float 11)
)
@ -179,11 +204,11 @@
)
;; read the options
(set! (-> obj options) (res-lump-value ent 'options uint))
(set! (-> obj options) (res-lump-value ent 'options fact-options))
;; TODO - some enum bitfield here.
(if (nonzero? (logand #x80200 (the-as int (-> obj options))))
(set! (-> obj fade-time) (the-as uint (the int (* 300.0 (res-lump-float ent 'timeout)))))
(set! (-> obj fade-time) (the int (* 300.0 (res-lump-float ent 'timeout))))
)
)

View File

@ -17,7 +17,7 @@
(define-extern fuel-cell type)
(define-extern birth-pickup-at-point (function vector int float symbol process-drawable fact-info (pointer process)))
(define-extern birth-pickup-at-point (function vector pickup-type float symbol process-drawable fact-info (pointer process) :behavior process))
(declare-type collide-shape-moving basic)
(declare-type sparticle-launch-group basic)
@ -28,6 +28,8 @@
(declare-type touch-tracker process-drawable)
(define-extern touch-tracker-init (function vector float uint none :behavior touch-tracker)) ;; last arg is a handle to `target`
(define-extern eco-blue-glow (function vector none))
;; DECOMP BEGINS
(deftype manipy (process-drawable)

View File

@ -139,13 +139,13 @@
(<
(vector-vector-distance
(-> self root trans)
(the-as vector (&-> (-> *target* control) unknown-cspace00 bone))
(-> *target* control unknown-vector90)
)
(-> self range)
)
(logtest? (-> *target* control root-prim prim-core action) 64)
(<
(the-as float (-> *target* control unknown-cspace00 param0))
(-> *target* control unknown-vector90 y)
(+ (-> self root trans y) (* 0.5 (-> self range)))
)
)
@ -187,12 +187,12 @@
)
(defmethod init-from-entity! swingpole ((obj swingpole) (arg0 entity-actor))
"Copy defaults from the entity."
(stack-size-set! (-> obj main-thread) 128)
(logior! (-> obj mask) (process-mask actor-pause))
(set! (-> obj root) (new 'process 'trsq))
(set! (-> obj root trans quad) (-> arg0 extra trans quad))
(quaternion-copy! (-> obj root quat) (-> (the-as entity-actor arg0) quat))
(quaternion-copy! (-> obj root quat) (-> arg0 quat))
(vector-identity! (-> obj root scale))
(vector-y-quaternion! (-> obj dir) (-> obj root quat))
(set! (-> obj dir y) 0.0)
@ -209,8 +209,11 @@
(the-as (function none :behavior process-hidden) nothing)
)
(defmethod init-from-entity! process-hidden ((obj process-hidden) (arg0 entity-actor))
(defmethod
init-from-entity!
process-hidden
((obj process-hidden) (arg0 entity-actor))
"Copy defaults from the entity."
(process-entity-status! obj (entity-perm-status dead) #t)
(go (method-of-object obj die))
(none)
@ -556,23 +559,15 @@
(let ((v1-20 (handle->process (-> self cur-grab-handle))))
(when v1-20
(let ((gp-1 (-> (the-as process-drawable v1-20) root trans)))
(cond
((type-type? (-> self root type) collide-shape)
(let* ((a0-13 (-> self root))
(t9-3
(method-of-object (the-as collide-shape a0-13) TODO-RENAME-28)
)
)
(vector-! (new 'stack-no-clear 'vector) gp-1 (-> self old-grab-pos))
(t9-3 (the-as collide-shape a0-13))
)
(if (type-type? (-> self root type) collide-shape)
(TODO-RENAME-28
(the-as collide-shape (-> self root))
(vector-! (new 'stack-no-clear 'vector) gp-1 (-> self old-grab-pos))
)
(else
(vector+!
(-> self root trans)
(-> self root trans)
(vector-! (new 'stack-no-clear 'vector) gp-1 (-> self old-grab-pos))
)
(vector+!
(-> self root trans)
(-> self root trans)
(vector-! (new 'stack-no-clear 'vector) gp-1 (-> self old-grab-pos))
)
)
(set! (-> self old-grab-pos quad) (-> gp-1 quad))
@ -729,20 +724,20 @@
)
(set! (-> s4-1 dynam) (copy *standard-dynamics* 'process))
(set! (-> s4-1 reaction) default-collision-reaction)
(set! (-> s4-1 no-reaction) nothing)
(set-vector!
(->
(new 'process 'collide-shape-prim-sphere s4-1 (the-as uint 0))
local-sphere
(set!
(-> s4-1 no-reaction)
(the-as
(function collide-shape-moving collide-shape-intersect vector vector none)
nothing
)
0.0
0.0
0.0
4096.0
)
(dummy-46 s4-1)
(let
((s3-1 (new 'process 'collide-shape-prim-sphere s4-1 (the-as uint 0))))
(set-vector! (-> s3-1 local-sphere) 0.0 0.0 0.0 4096.0)
(set-root-prim! s4-1 s3-1)
)
(set! (-> s4-1 nav-radius) (* 0.75 (-> s4-1 root-prim local-sphere w)))
(dummy-50 s4-1)
(backup-collide-with-as s4-1)
(set! (-> self root) s4-1)
)
)
@ -763,10 +758,10 @@
(-> arg3 z)
(-> arg3 w)
)
(set-root-prim! s4-2 s2-0)
)
(dummy-46 s4-2)
(set! (-> s4-2 nav-radius) (* 0.75 (-> s4-2 root-prim local-sphere w)))
(dummy-50 s4-2)
(backup-collide-with-as s4-2)
(set! (-> self root) s4-2)
)
)
@ -1741,7 +1736,10 @@
(define *lev-string* (new 'global 'string 64 (the-as string #f)))
(defmethod init-from-entity! med-res-level ((obj med-res-level) (arg0 entity-actor))
(defmethod
init-from-entity!
med-res-level
((obj med-res-level) (arg0 entity-actor))
(local-vars (sv-16 res-tag))
(stack-size-set! (-> obj main-thread) 128)
"#f"
@ -1857,7 +1855,10 @@
)
)
(defmethod init-from-entity! part-spawner ((obj part-spawner) (arg0 entity-actor))
(defmethod
init-from-entity!
part-spawner
((obj part-spawner) (arg0 entity-actor))
(local-vars (sv-16 res-tag))
(stack-size-set! (-> obj main-thread) 128)
(set! (-> obj mask) (logior (process-mask ambient) (-> obj mask)))
@ -2544,19 +2545,13 @@
(defstate launcher-idle (launcher)
:event
(behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
(let ((v1-0 arg2))
(the-as object (cond
((= v1-0 'instant-death)
(go launcher-deactivated)
)
((= v1-0 'trans)
(TODO-RENAME-30
(-> self root-override)
(the-as vector (-> arg3 param 0))
)
(dummy-47 (-> self root-override))
)
)
(case arg2
(('instant-death)
(go launcher-deactivated)
)
(('trans)
(TODO-RENAME-30 (-> self root-override) (the-as vector (-> arg3 param 0)))
(dummy-47 (-> self root-override))
)
)
)
@ -2648,18 +2643,14 @@
(-> self seek-time)
)
)
(the-as object (cond
((= arg2 'instant-death)
(go launcher-deactivated)
)
((= arg2 'trans)
(TODO-RENAME-30
(-> self root-override)
(the-as vector (-> arg3 param 0))
)
(dummy-47 (-> self root-override))
)
)
(cond
((= arg2 'instant-death)
(go launcher-deactivated)
)
((= arg2 'trans)
(TODO-RENAME-30 (-> self root-override) (the-as vector (-> arg3 param 0)))
(dummy-47 (-> self root-override))
)
)
)
:exit
@ -2764,10 +2755,10 @@
(set! (-> s3-0 prim-core collide-as) (the-as uint 256))
(set! (-> s3-0 collide-with) (the-as uint 16))
(set-vector! (-> s3-0 local-sphere) 0.0 0.0 0.0 12288.0)
(set-root-prim! s4-0 s3-0)
)
(dummy-46 s4-0)
(set! (-> s4-0 nav-radius) 13926.4)
(dummy-50 s4-0)
(backup-collide-with-as s4-0)
(set! (-> obj root-override) s4-0)
)
(process-drawable-from-entity! obj arg0)
@ -2830,10 +2821,10 @@
(set! (-> s1-0 prim-core collide-as) (the-as uint 256))
(set! (-> s1-0 collide-with) (the-as uint 16))
(set-vector! (-> s1-0 local-sphere) 0.0 0.0 0.0 12288.0)
(set-root-prim! s2-0 s1-0)
)
(dummy-46 s2-0)
(set! (-> s2-0 nav-radius) (* 0.75 (-> s2-0 root-prim local-sphere w)))
(dummy-50 s2-0)
(backup-collide-with-as s2-0)
(set! (-> self root-override) s2-0)
)
(set! (-> self root-override trans quad) (-> arg0 quad))
@ -3061,7 +3052,7 @@
)
(suspend)
)
(dummy-48 (-> self root-override))
(clear-collide-with-as (-> self root-override))
(suspend)
0
(none)
@ -3078,16 +3069,22 @@
)
(set! (-> s4-0 dynam) (copy *standard-dynamics* 'process))
(set! (-> s4-0 reaction) default-collision-reaction)
(set! (-> s4-0 no-reaction) nothing)
(set!
(-> s4-0 no-reaction)
(the-as
(function collide-shape-moving collide-shape-intersect vector vector none)
nothing
)
)
(let ((s2-0 (new 'process 'collide-shape-prim-sphere s4-0 (the-as uint 0))))
(set! (-> s2-0 prim-core collide-as) (the-as uint 272))
(set! (-> s2-0 collide-with) (the-as uint 3022))
(set! (-> s2-0 prim-core offense) 4)
(set-vector! (-> s2-0 local-sphere) 0.0 0.0 0.0 arg1)
(set-root-prim! s4-0 s2-0)
)
(dummy-46 s4-0)
(set! (-> s4-0 nav-radius) (* 0.75 (-> s4-0 root-prim local-sphere w)))
(dummy-50 s4-0)
(backup-collide-with-as s4-0)
(set! (-> s4-0 event-self) 'touched)
(set! (-> self root-override) s4-0)
)

View File

@ -544,17 +544,22 @@
;; blerc
;; texscroll
;; ripple
;; music pick
;; sound/flava
(set! *weather-off* #f)
;; music
(set! (-> *setting-control* default sound-flava) (the-as uint 49))
(set! (-> *setting-control* default sound-flava-priority) 0.0)
;; do ambients
;; math engine.
(add-ee-profile-frame 'draw :r #x40 :b #x40)
(execute-math-engine)
;; DEBUG PROF
(add-ee-profile-frame 'draw :r #x80)
(add-ee-profile-frame 'draw :r #x40 :b #x40)
;; debug hook
(main-cheats)
(add-ee-profile-frame 'draw :r #x20 :g #x20)
(update-camera)
(add-ee-profile-frame 'draw :r #x40 :b #x40)
(*draw-hook*)
(add-ee-profile-frame 'draw :g #x80)
@ -654,9 +659,16 @@
)
;; added
; (format *stdcon* "~3Lglobal heap at ~,,2fK remaining~0L~%"
; (* (1/ 1024) (&- (-> global top) (-> global current))))
(format *stdcon* "~3Lglob: ~d free debug: ~d free~0L~%"
(let (
(remain (&- (-> global top) (-> global current)))
(total (&- (-> global top) (-> global base)))
)
(format *stdcon* "~3Lglobal heap ~,,2fK/~,,2fK (~,,2f%) remain~0L~%"
(* (1/ 1024) remain) (* (1/ 1024) total)
(* 100.0 (/ (the float remain) (the float total)))
)
)
(format *stdcon* "~3LDMA global: ~d debug: ~d~0L~%"
(dma-buffer-free (-> disp frames (-> disp on-screen) frame global-buf))
(dma-buffer-free (-> disp frames (-> disp on-screen) frame debug-buf))
)

File diff suppressed because it is too large Load Diff

View File

@ -215,12 +215,10 @@
(set! sv-72 (new 'stack-no-clear 'matrix))
(set! sv-80 0)
(set! (-> sv-72 vector 0 quad) (-> arg3 quad))
(vector-float*!
(new 'stack-no-clear 'vector)
(-> arg1 move-vec)
(-> arg1 best-u)
(let ((a1-1 (new 'stack-no-clear 'vector)))
(vector-float*! a1-1 (-> arg1 move-vec) (-> arg1 best-u))
(TODO-RENAME-28 arg0 a1-1)
)
(TODO-RENAME-28 arg0)
(dummy-56 arg0 (-> arg1 best-tri pat))
(case (-> arg1 best-tri pat material)
(((pat-material stopproj))
@ -239,8 +237,9 @@
(set! (-> sv-68 quad) v1-22)
)
(when (= (-> arg1 best-u) 0.0)
(vector-float*! (new 'stack-no-clear 'vector) sv-68 32.0)
(TODO-RENAME-28 arg0)
(let ((a1-7 (vector-float*! (new 'stack-no-clear 'vector) sv-68 32.0)))
(TODO-RENAME-28 arg0 a1-7)
)
)
(set! (-> arg0 surface-normal quad) (-> sv-68 quad))
(set! (-> arg0 poly-normal quad) (-> arg1 best-tri normal quad))
@ -1187,17 +1186,23 @@
)
(set! (-> s5-0 dynam) (copy *standard-dynamics* 'process))
(set! (-> s5-0 reaction) projectile-collision-reaction)
(set! (-> s5-0 no-reaction) nothing)
(set!
(-> s5-0 no-reaction)
(the-as
(function collide-shape-moving collide-shape-intersect vector vector none)
nothing
)
)
(let ((s4-0 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0))))
(set! (-> s4-0 prim-core collide-as) (the-as uint 1024))
(set! (-> s4-0 collide-with) (the-as uint 2957))
(set! (-> s4-0 prim-core action) (the-as uint 1))
(set! (-> s4-0 prim-core offense) 3)
(set-vector! (-> s4-0 local-sphere) 0.0 5324.8 0.0 5324.8)
(set-root-prim! s5-0 s4-0)
)
(dummy-46 s5-0)
(set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w)))
(dummy-50 s5-0)
(backup-collide-with-as s5-0)
(set! (-> s5-0 max-iteration-count) (the-as uint 2))
(set! (-> s5-0 event-self) 'touched)
(set! (-> obj root-override) s5-0)
@ -1682,17 +1687,23 @@
)
(set! (-> s5-0 dynam) (copy *standard-dynamics* 'process))
(set! (-> s5-0 reaction) projectile-collision-reaction)
(set! (-> s5-0 no-reaction) nothing)
(set!
(-> s5-0 no-reaction)
(the-as
(function collide-shape-moving collide-shape-intersect vector vector none)
nothing
)
)
(let ((s4-0 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0))))
(set! (-> s4-0 prim-core collide-as) (the-as uint 1024))
(set! (-> s4-0 collide-with) (the-as uint 1))
(set! (-> s4-0 prim-core action) (the-as uint 1))
(set! (-> s4-0 prim-core offense) 3)
(set-vector! (-> s4-0 local-sphere) 0.0 5324.8 0.0 5324.8)
(set-root-prim! s5-0 s4-0)
)
(dummy-46 s5-0)
(set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w)))
(dummy-50 s5-0)
(backup-collide-with-as s5-0)
(set! (-> s5-0 max-iteration-count) (the-as uint 2))
(set! (-> s5-0 event-self) 'touched)
(set! (-> obj root-override) s5-0)

View File

@ -936,7 +936,7 @@
)
0
(process-taskable-clean-up-after-talking)
(dummy-48 (-> self root-override))
(clear-collide-with-as (-> self root-override))
(ja-channel-set! 0)
(the-as int (ja-post))
)
@ -951,7 +951,7 @@
(let ((gp-0 (-> self skel root-channel 0)))
(set! (-> gp-0 frame-group) (the-as art-joint-anim (get-art-elem self)))
)
(dummy-49 (-> self root-override))
(restore-collide-with-as (-> self root-override))
(process-entity-status! self (entity-perm-status bit-3) #t)
(let ((v1-7 (-> self draw shadow-ctrl)))
(set! (-> v1-7 settings flags) (logand -33 (-> v1-7 settings flags)))
@ -1198,7 +1198,7 @@
(dummy-55
(-> self root-override)
arg0
(-> arg3 param 0)
(the-as touching-shapes-entry (-> arg3 param 0))
0.7
6144.0
16384.0
@ -1440,10 +1440,10 @@
(-> arg1 z)
(-> arg1 w)
)
(set-root-prim! s5-0 s4-0)
)
(dummy-46 s5-0)
(set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w)))
(dummy-50 s5-0)
(backup-collide-with-as s5-0)
(set! (-> obj root-override) s5-0)
)
0

View File

@ -5,7 +5,8 @@
;; name in dgo: shrub-work
;; dgos: GAME, ENGINE
;; definition for symbol *instance-shrub-work*, type instance-shrub-work
;; DECOMP BEGINS
(define
*instance-shrub-work*
(new 'static 'instance-shrub-work
@ -590,10 +591,7 @@
(new 'static 'vector :x 0.5 :y 100.0 :z 0.0166 :w -1.0)
:constants (new 'static 'vector :x 128.0 :y 1.0)
:color-constant
(new 'static 'vector4w
:data
(new 'static 'array int32 4 #x47000000 #x47000000 #x47000000 0)
)
(new 'static 'vector4w :x #x47000000 :y #x47000000 :z #x47000000)
:start-bank
(new 'static 'array uint8 20
#x0
@ -620,14 +618,10 @@
)
)
;; failed to figure out what this is:
(set! (-> *instance-shrub-work* mscalf-tmpl vif0 imm) 103)
;; failed to figure out what this is:
(set! (-> *instance-shrub-work* mscalf-ret-tmpl vif0 imm) 103)
;; definition for function upload-generic-shrub
;; Used lq/sq
(defun
upload-generic-shrub
((arg0 dma-buffer) (arg1 generic-shrub-fragment) (arg2 int) (arg3 int))
@ -664,7 +658,7 @@
(set! (-> v1-1 vector 2 quad) t2-4)
(set! (-> v1-1 vector 3 quad) t3-1)
)
(set! (-> arg0 base) (&+ (-> arg0 base) 64))
(&+! (-> arg0 base) 64)
(let* ((v1-4 arg0)
(t0-4 (the-as object (-> v1-4 base)))
)

View File

@ -72,6 +72,7 @@
:flag-assert #x90000000c
)
(declare-type drawable-inline-array-collide-fragment drawable-inline-array)
(deftype prototype-bucket-tie (prototype-bucket)
((generic-count uint16 4 :offset-assert 88)
(generic-next uint32 4 :offset-assert 96)
@ -81,8 +82,8 @@
(envmap-rfade float :offset-assert 128)
(envmap-fade-far float :offset-assert 132)
(envmap-shader adgif-shader :offset-assert 136)
(collide-frag basic :offset-assert 140)
(tie-colors basic :offset-assert 144)
(collide-frag drawable-inline-array-collide-fragment :offset-assert 140)
(tie-colors time-of-day-palette :offset-assert 144)
(data uint32 :dynamic :offset-assert 148)
(color-index-qwc uint32 :dynamic :offset-assert 148)
(generic-next-clear uint128 :offset 96)
@ -115,7 +116,7 @@
(deftype instance (drawable)
((bucket-index uint16 :offset 6)
(unknown uint32 :offset 8) ; TODO - from default-menu
(error (pointer drawable-error) :offset 8) ;; - from default-menu::build-instance-list
(origin matrix4h :inline :offset-assert 32) ; TODO - this can also be a float, default-menu::lambda_62
(unknown-vector vector :inline :offset 32) ;; todo, this might not be right.
(wind-index uint16 :offset 62)

View File

@ -5,42 +5,46 @@
;; name in dgo: tie-h
;; dgos: GAME, ENGINE
;; DECOMP BEGINS
(deftype tie-fragment (drawable)
((gif-ref uint32 :offset 4)
(point-ref uint32 :offset 8)
(color-index uint16 :offset 12)
(base-colors uint8 :offset 14)
(tex-count uint16 :offset-assert 32)
(gif-count uint16 :offset-assert 34)
(vertex-count uint16 :offset-assert 36)
(color-count uint16 :offset-assert 38)
(num-tris uint16 :offset-assert 40)
(num-dverts uint16 :offset-assert 42)
(dp-ref uint32 :offset-assert 44)
(dp-qwc uint32 :offset-assert 48)
(generic-ref uint32 :offset-assert 52)
(generic-count uint32 :offset-assert 56)
(debug-lines basic :offset-assert 60)
((gif-ref uint32 :offset 4)
(point-ref uint32 :offset 8)
(color-index uint16 :offset 12)
(base-colors uint8 :offset 14)
(tex-count uint16 :offset-assert 32)
(gif-count uint16 :offset-assert 34)
(vertex-count uint16 :offset-assert 36)
(color-count uint16 :offset-assert 38)
(num-tris uint16 :offset-assert 40)
(num-dverts uint16 :offset-assert 42)
(dp-ref uint32 :offset-assert 44)
(dp-qwc uint32 :offset-assert 48)
(generic-ref uint32 :offset-assert 52)
(generic-count uint32 :offset-assert 56)
(debug-lines basic :offset-assert 60)
)
:method-count-assert 18
:size-assert #x40
:flag-assert #x1200000040
)
(deftype instance-tie (instance)
((color-indices uint32 :offset 8)
(bucket-ptr basic :offset 12)
(max-scale uint16 :offset 38)
(flags uint16 :offset 46)
((color-indices uint32 :offset 8)
(bucket-ptr prototype-bucket-tie :offset 12)
(max-scale uint16 :offset 38)
(flags uint16 :offset 46)
)
:method-count-assert 18
:size-assert #x40
:flag-assert #x1200000040
)
(deftype drawable-inline-array-instance-tie (drawable-inline-array)
((data instance-tie 1 :inline :offset-assert 32)
(pad uint32 :offset-assert 96)
((data instance-tie 1 :inline :offset-assert 32)
(pad uint32 :offset-assert 96)
)
:method-count-assert 18
:size-assert #x64
@ -48,16 +52,17 @@
)
(deftype drawable-tree-instance-tie (drawable-tree)
((prototypes proxy-prototype-array-tie :offset 8)
((prototypes proxy-prototype-array-tie :offset 8)
)
:method-count-assert 18
:size-assert #x24
:flag-assert #x1200000024
)
(deftype prototype-tie (drawable-inline-array)
((data instance-tie 1 :inline :offset-assert 32)
(pad uint32 :offset-assert 96)
((data instance-tie 1 :inline :offset-assert 32)
(pad uint32 :offset-assert 96)
)
:method-count-assert 18
:size-assert #x64
@ -65,23 +70,24 @@
)
(deftype tie-matrix (structure)
((mat matrix :inline :offset-assert 0)
(morph qword :inline :offset-assert 64)
(fog qword :inline :offset-assert 80)
((mat matrix :inline :offset-assert 0)
(morph qword :inline :offset-assert 64)
(fog qword :inline :offset-assert 80)
)
:method-count-assert 9
:size-assert #x60
:flag-assert #x900000060
)
(deftype instance-tie-work (structure)
((wind-const vector :inline :offset-assert 0)
(hmge-d vector :inline :offset-assert 16)
(hvdf-offset vector :inline :offset-assert 32)
(wind-force vector :inline :offset-assert 48)
(constant vector :inline :offset-assert 64)
(far-morph vector :inline :offset-assert 80)
(dist-test vector :inline :offset-assert 96)
((wind-const vector :inline :offset-assert 0)
(hmge-d vector :inline :offset-assert 16)
(hvdf-offset vector :inline :offset-assert 32)
(wind-force vector :inline :offset-assert 48)
(constant vector :inline :offset-assert 64)
(far-morph vector :inline :offset-assert 80)
(dist-test vector :inline :offset-assert 96)
(min-dist vector :inline :offset-assert 112)
(guard-plane plane 4 :inline :offset-assert 128)
(upload-color-0 dma-packet :inline :offset-assert 192)
@ -115,26 +121,28 @@
:flag-assert #x9000001c0
)
(deftype instance-tie-dma (structure)
((banka instance-tie 32 :inline :offset-assert 0)
((banka instance-tie 32 :inline :offset-assert 0)
(bankb instance-tie 32 :inline :offset-assert 2048)
(outa uint128 256 :offset-assert 4096)
(outb uint128 256 :offset-assert 8192)
(work instance-tie-work :dynamic :offset-assert 12288) ;; something weird here, this falls off the end of the type.
(work instance-tie-work :dynamic :offset-assert 12288)
)
:method-count-assert 9
:size-assert #x3000
:flag-assert #x900003000
)
(deftype prototype-tie-work (structure)
((upload-palette-0 dma-packet :inline :offset-assert 0)
(upload-palette-1 dma-packet :inline :offset-assert 16)
(upload-model-0 dma-packet :inline :offset-assert 32)
(upload-model-1 dma-packet :inline :offset-assert 48)
(upload-model-2 dma-packet :inline :offset-assert 64)
(upload-model-3 dma-packet :inline :offset-assert 80)
(upload-model-near-0 dma-packet :inline :offset-assert 96)
((upload-palette-0 dma-packet :inline :offset-assert 0)
(upload-palette-1 dma-packet :inline :offset-assert 16)
(upload-model-0 dma-packet :inline :offset-assert 32)
(upload-model-1 dma-packet :inline :offset-assert 48)
(upload-model-2 dma-packet :inline :offset-assert 64)
(upload-model-3 dma-packet :inline :offset-assert 80)
(upload-model-near-0 dma-packet :inline :offset-assert 96)
(upload-model-near-1 dma-packet :inline :offset-assert 112)
(upload-model-near-2 dma-packet :inline :offset-assert 128)
(upload-model-near-3 dma-packet :inline :offset-assert 144)
@ -159,24 +167,25 @@
:flag-assert #x900000134
)
(deftype prototype-tie-dma (structure)
((colora rgba 256 :offset-assert 0)
(colorb rgba 256 :offset-assert 1024)
(outa uint128 256 :offset-assert 2048)
(outb uint128 256 :offset-assert 6144)
(length uint32 :offset-assert 10240)
(dma-buffer basic :offset-assert 10244)
(this-frag-count uint32 :offset-assert 10248)
(next uint32 4 :offset 10256)
(geometry uint32 4 :offset-assert 10272)
(frag-count uint8 4 :offset-assert 10288)
((colora rgba 256 :offset-assert 0)
(colorb rgba 256 :offset-assert 1024)
(outa uint128 256 :offset-assert 2048)
(outb uint128 256 :offset-assert 6144)
(length uint32 :offset-assert 10240)
(dma-buffer basic :offset-assert 10244)
(this-frag-count uint32 :offset-assert 10248)
(next uint32 4 :offset 10256)
(geometry uint32 4 :offset-assert 10272)
(frag-count uint8 4 :offset-assert 10288)
)
:method-count-assert 9
:size-assert #x2834
:flag-assert #x900002834
)
;; probably a more specific type.
(define *instance-tie-work-copy* (the-as instance-tie-work #f))
(define-extern *instance-tie-work* instance-tie-work)
(define-extern tie-near-make-perspective-matrix (function matrix none))

View File

@ -193,7 +193,7 @@
;; Vector of 4 signed words
(deftype vector4w (structure)
((data int32 4 :score -9999 :offset-assert 0)
((data uint32 4 :score -9999 :offset-assert 0)
(x int32 :offset 0)
(y int32 :offset 4)
(z int32 :offset 8)

View File

@ -43,7 +43,7 @@
(set! (-> obj elt-size) elt-size)
(set! (-> obj elt-count) elt-count)
(set! (-> obj elt-used) 0)
(set! (-> obj busy) '#f)
(set! (-> obj busy) #f)
;(set! (-> obj base) (logand -64 (+ (the uint obj) 28 63)))
;; base is the 64-byte aligned buffer.
(set! (-> obj base) (the pointer (logand -64 (+ (the uint (-> obj data)) 63))))
@ -81,7 +81,7 @@
(set! (-> obj buffer 0) (new 'global 'rpc-buffer elt-size elt-count))
(set! (-> obj buffer 1) (new 'global 'rpc-buffer elt-size elt-count))
(set! (-> obj current) (-> obj buffer 0))
(set! (-> obj last-recv-buffer) (the pointer '#f))
(set! (-> obj last-recv-buffer) (the pointer #f))
(set! (-> obj rpc-port) rpc-port)
obj
)
@ -111,7 +111,7 @@
)
(else
;; not actually busy, clear the flag!
(set! (-> active-buffer busy) '#f)
(set! (-> active-buffer busy) #f)
(set! (-> active-buffer elt-used) 0)
)
)
@ -130,13 +130,13 @@
)))
(when (-> active-buffer busy)
(if (!= 0 (rpc-busy? (-> obj rpc-port)))
(return-from #f '#t)
(return-from #f #t)
)
(set! (-> active-buffer busy) '#f)
(set! (-> active-buffer busy) #f)
(set! (-> active-buffer elt-used) 0)
)
)
'#f
#f
)
@ -162,7 +162,7 @@
)
)
;; not busy.
(set! (-> active-buffer busy) '#f)
(set! (-> active-buffer busy) #f)
(set! (-> active-buffer elt-used) 0)
)
;; now we've cleared the last RPC call, we can do another
@ -177,7 +177,7 @@
(the uint recv-buff)
(the int recv-size)
)
(set! (-> current-buffer busy) '#t)
(set! (-> current-buffer busy) #t)
(set! (-> obj last-recv-buffer) recv-buff)
(set! (-> obj current) active-buffer)
)
@ -190,7 +190,7 @@
;; method 14
(defmethod pop-last-received rpc-buffer-pair ((obj rpc-buffer-pair))
(let ((result (-> obj last-recv-buffer)))
(set! (-> obj last-recv-buffer) (the pointer '#f))
(set! (-> obj last-recv-buffer) (the pointer #f))
result
)
)

View File

@ -557,7 +557,7 @@
arg1
"~0ky:~,,2M t:~d cy: ~,,2M my: ~,,2M impv:~,,2M "
(-> arg0 control unknown-vector52 y)
(- (-> *display* base-frame-counter) (-> arg0 control unknown-dword10))
(- (-> *display* base-frame-counter) (-> arg0 control unknown-dword11))
(- (-> arg0 control trans y) (-> arg0 control unknown-vector52 y))
(-
(-> arg0 control unknown-vector111 y)
@ -1350,7 +1350,7 @@
((-> self control unknown-surface01 active-hook))
(cond
((logtest? (-> self control status) 1)
(set! (-> self control unknown-dword10) (-> *display* base-frame-counter))
(set! (-> self control unknown-dword11) (-> *display* base-frame-counter))
(set! (-> self control unknown-vector52 quad) (-> self control trans quad))
(if
(and
@ -1571,7 +1571,7 @@
(when
(and
(>=
(- (-> *display* base-frame-counter) (-> self control unknown-dword10))
(- (-> *display* base-frame-counter) (-> self control unknown-dword11))
600
)
(and
@ -1763,7 +1763,7 @@
(vector-!
(new-stack-vector0)
(-> s5-0 center-hold)
(the-as vector (&-> (-> self control) unknown-cspace00 bone))
(-> self control unknown-vector90)
)
)
)
@ -1777,7 +1777,7 @@
)
)
(vector-normalize! s4-1 1228.8)
(TODO-RENAME-28 (-> self control))
(TODO-RENAME-28 (-> self control) s4-1)
(vector-float*!
(-> self control rider-last-move)
s4-1
@ -1880,13 +1880,13 @@
a1-7
(-> *display* frames-per-second)
)
(set!
(-> self control rider-time)
(the-as uint (-> *display* base-frame-counter))
)
(TODO-RENAME-28 (-> self control) a1-7)
)
)
(set!
(-> self control rider-time)
(the-as uint (-> *display* base-frame-counter))
)
(TODO-RENAME-28 (-> self control))
(set! (-> self control unknown-float110) 0.0)
(dummy-17 self)
(none)
@ -1923,7 +1923,7 @@
(send-event *camera* 'ease-in 0.5 v1-8)
)
(vector-segment-distance-point!
(the-as vector (&-> (-> self control) unknown-cspace00 bone))
(-> self control unknown-vector90)
s3-0
s2-0
s5-0
@ -1947,7 +1947,7 @@
(add-debug-sphere
#t
(bucket-id debug-draw0)
(the-as vector (&-> (-> self control) unknown-cspace00 bone))
(-> self control unknown-vector90)
819.2
(new 'static 'rgba :r #xff :a #x80)
)
@ -1976,11 +1976,7 @@
)
(let
((s4-2
(vector-!
(new-stack-vector0)
s5-0
(the-as vector (&-> (-> self control) unknown-cspace00 bone))
)
(vector-! (new-stack-vector0) s5-0 (-> self control unknown-vector90))
)
)
(cond
@ -1988,12 +1984,7 @@
(< 2457.6 (vector-length s4-2))
(not (-> self control unknown-int20))
)
(let* ((s5-1 (-> self control))
(s3-1 (method-of-object s5-1 TODO-RENAME-28))
)
(vector-normalize! s4-2 2457.6)
(s3-1 s5-1)
)
(TODO-RENAME-28 (-> self control) (vector-normalize! s4-2 2457.6))
)
(else
(set! (-> self control unknown-int20) (the-as int #t))
@ -2209,15 +2200,11 @@
s5-0
(the-as cspace (-> self control unknown-cspace00 joint))
)
(vector-average!
(the-as vector (&-> (-> self control) unknown-cspace00 bone))
gp-0
s5-0
)
(vector-average! (-> self control unknown-vector90) gp-0 s5-0)
)
(vector-!
(-> self control unknown-vector91)
(the-as vector (&-> (-> self control) unknown-cspace00 bone))
(-> self control unknown-vector90)
(-> self control trans)
)
(cond
@ -2496,7 +2483,7 @@
(vector-!
(-> self control unknown-vector12)
(-> self control unknown-vector11)
(-> self control unknown-vector13)
(-> self control unknown-vector14)
)
(let ((a1-3 (new 'stack-no-clear 'collide-edge-hold-list)))
(set! (-> a1-3 num-allocs) (the-as uint 1))
@ -2620,7 +2607,7 @@
(vector-!
(-> self control unknown-vector12)
(-> self control unknown-vector11)
(-> self control unknown-vector13)
(-> self control unknown-vector14)
)
(let ((a1-2 (new 'stack-no-clear 'collide-edge-hold-list)))
(set! (-> a1-2 num-allocs) (the-as uint 1))
@ -2656,7 +2643,7 @@
)
(quaternion-identity! (-> self control unknown-quaternion01))
(set! (-> self control unknown-float00) 0.0)
(set! (-> self control unknown-dword10) (-> *display* base-frame-counter))
(set! (-> self control unknown-dword11) (-> *display* base-frame-counter))
(set! (-> self control unknown-float80) 0.0)
(set! (-> self control unknown-float82) 32.0)
(set! (-> self cam-user-mode) 'normal)
@ -2690,13 +2677,13 @@
(set! (-> s4-0 collide-with) (the-as uint #x2bef))
(set! (-> s4-0 prim-core offense) 1)
(set! (-> s4-0 prim-core action) (the-as uint 5))
(dummy-46 s5-0)
(set-root-prim! s5-0 s4-0)
(let ((s3-0 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 6))))
(set! (-> s3-0 prim-core action) (the-as uint 5))
(set! (-> s3-0 prim-core collide-as) (the-as uint 16))
(set! (-> s3-0 collide-with) (the-as uint #x2bef))
(set! (-> s3-0 prim-core offense) 1)
(dummy-28 s4-0)
(append-prim s4-0 s3-0)
(set! (-> s5-0 unknown-sphere-array00 0) s3-0)
)
(let
@ -2705,7 +2692,7 @@
(set! (-> s3-1 prim-core collide-as) (the-as uint 16))
(set! (-> s3-1 collide-with) (the-as uint #x2bef))
(set! (-> s3-1 prim-core offense) 1)
(dummy-28 s4-0)
(append-prim s4-0 s3-1)
(set! (-> s5-0 unknown-sphere-array00 1) s3-1)
)
(let
@ -2714,28 +2701,28 @@
(set! (-> s3-2 prim-core collide-as) (the-as uint 16))
(set! (-> s3-2 collide-with) (the-as uint #x2bef))
(set! (-> s3-2 prim-core offense) 1)
(dummy-28 s4-0)
(append-prim s4-0 s3-2)
(set! (-> s5-0 unknown-sphere-array00 2) s3-2)
)
(let
((s3-3 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 32))))
(dummy-28 s4-0)
(append-prim s4-0 s3-3)
(set! (-> s5-0 unknown-sphere00) s3-3)
)
(let
((s3-4 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 64))))
(dummy-28 s4-0)
(append-prim s4-0 s3-4)
(set! (-> s5-0 unknown-sphere01) s3-4)
)
(let
((s3-5 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 128))))
(dummy-28 s4-0)
(append-prim s4-0 s3-5)
(set! (-> s5-0 unknown-sphere02) s3-5)
)
)
)
(target-collide-set! 'normal 0.0)
(dummy-50 (-> self control))
(backup-collide-with-as (-> self control))
(set! (-> self game) *game-info*)
(TODO-RENAME-30 (-> self control) (-> arg0 trans))
(set! (-> (&-> (-> self control) unknown-qword00) 0) (-> arg0 trans quad))
@ -2850,11 +2837,11 @@
0
)
;; hack
;; TODO temp hack
(defun start ((arg0 symbol) (arg1 continue-point))
(set! *target* #f)
(return *target*)
(set! (-> *level* border?) #f)
(set! (-> *setting-control* default border-mode) #f)
(stop arg0)

View File

@ -993,7 +993,7 @@
(the-as (function surface surface surface int none) nothing)
)
(set! (-> v1-41 touch-hook) nothing)
(set! (-> v1-41 active-hook) nothing)
(set! (-> v1-41 active-hook) (the-as (function none) nothing))
)
(let ((v1-42
@ -1025,7 +1025,7 @@
(the-as (function surface surface surface int none) nothing)
)
(set! (-> v1-42 touch-hook) nothing)
(set! (-> v1-42 active-hook) nothing)
(set! (-> v1-42 active-hook) (the-as (function none) nothing))
)
(let ((v1-43
@ -1059,7 +1059,7 @@
(the-as (function surface surface surface int none) nothing)
)
(set! (-> v1-43 touch-hook) nothing)
(set! (-> v1-43 active-hook) nothing)
(set! (-> v1-43 active-hook) (the-as (function none) nothing))
)
(let ((v1-44
@ -1094,7 +1094,7 @@
(the-as (function surface surface surface int none) nothing)
)
(set! (-> v1-44 touch-hook) nothing)
(set! (-> v1-44 active-hook) nothing)
(set! (-> v1-44 active-hook) (the-as (function none) nothing))
)
(let ((v1-45
@ -1129,7 +1129,7 @@
(the-as (function surface surface surface int none) nothing)
)
(set! (-> v1-45 touch-hook) nothing)
(set! (-> v1-45 active-hook) nothing)
(set! (-> v1-45 active-hook) (the-as (function none) nothing))
)
(let ((v1-46
@ -1164,7 +1164,7 @@
(the-as (function surface surface surface int none) nothing)
)
(set! (-> v1-46 touch-hook) nothing)
(set! (-> v1-46 active-hook) nothing)
(set! (-> v1-46 active-hook) (the-as (function none) nothing))
)
(let ((v1-47
@ -1196,7 +1196,7 @@
(the-as (function surface surface surface int none) nothing)
)
(set! (-> v1-47 touch-hook) nothing)
(set! (-> v1-47 active-hook) nothing)
(set! (-> v1-47 active-hook) (the-as (function none) nothing))
)
(let ((v1-48
@ -1228,7 +1228,7 @@
(the-as (function surface surface surface int none) nothing)
)
(set! (-> v1-48 touch-hook) nothing)
(set! (-> v1-48 active-hook) nothing)
(set! (-> v1-48 active-hook) (the-as (function none) nothing))
)
(let ((v1-49
@ -1262,8 +1262,10 @@
(the-as (function surface surface surface int none) nothing)
)
(set! (-> v1-49 touch-hook) nothing)
(set! (-> v1-49 active-hook) nothing)
(set! (-> v1-49 active-hook) (the-as (function none) nothing))
)
(define *standard-ground-surface* *stone-surface*)
(define *swim-surface* *stone-surface*)
(define-extern *race-track-surface* surface)

View File

@ -70,7 +70,7 @@
:size-assert #x248
:flag-assert #x1501e00248
(:methods
(dummy-20 (_type_ collide-cache) none 20)
(dummy-20 (_type_ collide-cache) object 20)
)
(:states
target-clone-anim

View File

@ -831,7 +831,7 @@
(or
(logtest? (-> self control status) 1)
(<
(- (-> *display* base-frame-counter) (-> self control unknown-dword10))
(- (-> *display* base-frame-counter) (-> self control unknown-dword11))
(the-as int (-> *TARGET-bank* ground-timeout))
)
(and
@ -875,7 +875,7 @@
(and
(zero? (logand (-> self control status) 1))
(>=
(- (-> *display* base-frame-counter) (-> self control unknown-dword10))
(- (-> *display* base-frame-counter) (-> self control unknown-dword11))
(the-as int (-> *TARGET-bank* ground-timeout))
)
(>=
@ -925,7 +925,7 @@
(and
(zero? (logand (-> self control status) 129))
(>=
(- (-> *display* base-frame-counter) (-> self control unknown-dword10))
(- (-> *display* base-frame-counter) (-> self control unknown-dword11))
(the-as int (-> *TARGET-bank* ground-timeout))
)
(logtest? (-> self control status) 4)
@ -993,7 +993,7 @@
(set! (-> s5-0 1 quad) (-> self control trans quad))
(set! (-> s5-0 1 y) (+ 2867.2 (-> *TARGET-bank* body-radius) (-> s5-0 1 y)))
(set! (-> s5-0 1 w) (-> *TARGET-bank* body-radius))
(set! (-> gp-0 spheres) (the-as uint s5-0))
(set! (-> gp-0 spheres) (the-as (pointer sphere) s5-0))
)
(set! (-> gp-0 num-spheres) (the-as uint 2))
(set! (-> gp-0 collide-with) (-> self control root-prim collide-with))
@ -1045,7 +1045,7 @@
(not arg0)
(and
(<
(- (-> *display* base-frame-counter) (-> self control unknown-dword10))
(- (-> *display* base-frame-counter) (-> self control unknown-dword11))
(the-as int (-> *TARGET-bank* ground-timeout))
)
(< (-> self control unknown-float61) 0.7)

View File

@ -194,6 +194,7 @@
(yakow-owed-powercell #x297)
(misty-teetertotter-bonk-dax-tutorial #x2a4)
(sidekick-hint-misty-get-red-eco #x2a5)
(daxter-blue-eco-plat-tutorial #x2a7)
(misty-bone-bridge-hint #x2aa)

View File

@ -113,10 +113,8 @@
(none)
)
#|
(define *wasd-camera-transform* (new 'global 'transform))
(defun wasd-camera-update ()
(let ((local-trans (new-stack-vector0))
(trans *wasd-camera-transform*)
@ -270,6 +268,7 @@
"Kill all processes started by launch-test-process"
(kill-by-name "test" *active-pool*)
)
|#
(set! *display-profile* #t)
; (set! *display-split-boxes* #t)

View File

@ -67,7 +67,7 @@
)
)
(defmacro cgo (output-name desc-file-name &rest objs)
(defmacro cgo (output-name desc-file-name)
"Add a CGO with the given output name (in out/iso) and input name (in goal_src/dgos)"
`(defstep :in ,(string-append "goal_src/dgos/" desc-file-name)
:tool 'dgo
@ -218,6 +218,24 @@
"out/iso/JUN.DGO"
"out/iso/MAI.DGO"
"out/iso/BEA.DGO"
"out/iso/CIT.DGO"
)
;;;;;;;;;;;;;;;;;;;;;
;; hub1 Group
;;;;;;;;;;;;;;;;;;;;;
;; the hub1 group is a group of files required to play the first hub (village1, jungle, beach, misty, training, firecanyon)
(group "hub1"
"out/iso/0COMMON.TXT"
"out/iso/KERNEL.CGO"
"out/iso/GAME.CGO"
"out/iso/VI1.DGO"
"out/iso/TRA.DGO"
"out/iso/FIC.DGO"
"out/iso/JUN.DGO"
"out/iso/BEA.DGO"
)
;;;;;;;;;;;;;;;;;;;;;;;;
@ -251,6 +269,8 @@
"common/launcherdoor.gc"
"common/mistycannon.gc"
"common/babak-with-cannon.gc"
"common/snow-bunny.gc"
"common/battlecontroller.gc"
"racer_common/target-racer-h-FIC-LAV-MIS-OGR-ROL.gc"
"racer_common/racer-part.gc"
@ -680,6 +700,65 @@
; "darkcave/darkcave-obs.gc"
; )
;;;;;;;;;;;;;;;;;;;;;
;; citadel
;;;;;;;;;;;;;;;;;;;;;
(cgo "CIT.DGO" "cit.gd")
(goal-src-sequence
"levels/citadel/"
:deps ("out/obj/default-menu.o")
"citadel-part.gc"
"citadel-obs.gc"
"citb-plat.gc"
"citadel-sages.gc"
"citb-bunny.gc"
"citb-drop-plat-CIT.gc"
"assistant-citadel.gc"
)
(copy-textures 1415 1417 1416 1414)
(copy-gos
"babak-ag-CIT"
"ecovalve-ag-CIT"
"orb-cache-top-ag-CIT"
"assistant-lavatube-end-ag"
"bluesage-ag"
"citadelcam-ag"
"citb-arm-ag"
"citb-arm-shoulder-ag"
"citb-bunny-ag"
"citb-button-ag"
"citb-chain-plat-ag"
"citb-chains-ag"
"citb-coil-ag"
"citb-disc-ag"
"citb-donut-ag"
"citb-drop-plat-ag"
"citb-exit-plat-ag"
"citb-firehose-ag"
"citb-generator-ag"
"citb-hose-ag"
"citb-iris-door-ag"
"citb-launcher-ag"
"citb-robotboss-ag"
"citb-rotatebox-ag"
"citb-sagecage-ag"
"citb-stopbox-ag"
"evilbro-citadel-ag"
"evilsis-citadel-ag"
"green-sagecage-ag"
"plat-citb-ag"
"plat-eco-citb-ag"
"redsage-ag"
"warp-gate-switch-ag-CIT"
"yellowsage-ag"
"citadel-vis"
)
;;;;;;;;;;;;;;;;;;;;;
;; Final Boss
;;;;;;;;;;;;;;;;;;;;;
@ -710,7 +789,6 @@
"ecovalve-ag-FIN"
"finalbosscam-ag"
"green-eco-lurker-ag"
"green-sagecage-ag"
"greenshot-ag"
"jak-white-ag"
"light-eco-ag"

View File

@ -724,6 +724,11 @@
"Make ISO"
`(make-group "iso")
)
(defmacro mh1 ()
"Make hub1"
`(make-group "hub1")
)
;;;;;;;;;;;;;;;;;;;
;; enum stuff
;;;;;;;;;;;;;;;;;;;

View File

@ -413,7 +413,7 @@
(defmacro handle->process (handle)
;; the actual implementation is more clever than this.
;; Checks PID.
`(let ((the-handle ,handle))
`(let ((the-handle (the-as handle ,handle)))
(if (-> the-handle process) ;; if we don't point to a process, kernel sets this to #f
(let ((proc (-> (-> the-handle process))))
(if (= (-> the-handle pid) (-> proc pid)) ;; make sure it's the same process

View File

@ -119,19 +119,19 @@
(#cond
(PC_PORT
;; We will move stacks on the scratchpad to here.
;; it might be possible to also throw them on the *dram-stack*, but they might depend on these
;; not overlapping. We can spare the 16k of memory.
(define *fake-scratchpad-stack* (new 'global 'array 'uint8 (* 16 1024)))
;; similar thing for the scratchpad data.
(let* ((mem (new 'global 'array 'uint8 (* (+ 16 8) 1024)))
(aligned (logand (&+ mem 8192) (lognot 8191)))
)
(define *fake-scratchpad-data* aligned)
)
;; We will move stacks on the scratchpad to here.
;; it might be possible to also throw them on the *dram-stack*, but they might depend on these
;; not overlapping. We can spare the 16k of memory.
(define *fake-scratchpad-stack* *fake-scratchpad-data*)
;;(define *fake-scratchpad-stack* (new 'global 'array 'uint8 (* 16 1024)))
(defmacro scratchpad-start()
@ -1370,7 +1370,7 @@
(let ((proc (-> gap next process))
(size (gap-size obj gap)))
(unless (zero? size)
(format #t "[kernel] Relocating process ~A by ~D.~%" proc (- size))
;;(format #t "[kernel] Relocating process ~A by ~D.~%" proc (- size))
(when (< size 0)
;; bug!
(break)

View File

@ -140,14 +140,15 @@ It type checks the arguments for the entry function.
(set! *defstate-type-stack* '())
`(none)
)
;; *no-state* is just used for the compiler to know whether a handler was actually set or not
(defmacro defstate (state-name parents
&key (virtual #f)
&key (event #f)
&key (enter #f)
&key (trans #f)
&key (exit #f)
&key (code #f)
&key (post #f)
&key (event *no-state*)
&key (enter *no-state*)
&key (trans *no-state*)
&key (exit *no-state*)
&key (code *no-state*)
&key (post *no-state*)
)
"Define a new state!"

View File

@ -626,7 +626,7 @@
(vector<-cspace! s5-0 (-> obj node-list data 8))
(birth-pickup-at-point
s5-0
6
(pickup-type fuel-cell)
(the float (the-as int (-> obj entity extra perm task)))
#f
obj
@ -660,7 +660,13 @@
)
(set! (-> s4-0 dynam) (copy *standard-dynamics* 'process))
(set! (-> s4-0 reaction) default-collision-reaction)
(set! (-> s4-0 no-reaction) nothing)
(set!
(-> s4-0 no-reaction)
(the-as
(function collide-shape-moving collide-shape-intersect vector vector none)
nothing
)
)
(let
((s3-0
(new
@ -678,10 +684,10 @@
(set! (-> s3-0 prim-core offense) 4)
(set! (-> s3-0 transform-index) 4)
(set-vector! (-> s3-0 local-sphere) 0.0 0.0 0.0 24576.0)
(set-root-prim! s4-0 s3-0)
)
(dummy-46 s4-0)
(set! (-> s4-0 nav-radius) (* 0.75 (-> s4-0 root-prim local-sphere w)))
(dummy-50 s4-0)
(backup-collide-with-as s4-0)
(set! (-> obj root-override) s4-0)
)
(process-drawable-from-entity! obj arg0)

View File

@ -116,7 +116,14 @@
'generic
)
)
(dummy-55 (-> obj collide-info) arg0 (-> arg1 param 0) 0.7 6144.0 16384.0)
(dummy-55
(-> obj collide-info)
arg0
(the-as touching-shapes-entry (-> arg1 param 0))
0.7
6144.0
16384.0
)
(the-as object (if (zero? (logand (-> obj nav-enemy-flags) 256))
(dummy-45 (-> obj collide-info))
)
@ -1132,40 +1139,46 @@ nav-enemy-default-event-handler
)
(set! (-> s4-0 dynam) (copy *standard-dynamics* 'process))
(set! (-> s4-0 reaction) default-collision-reaction)
(set! (-> s4-0 no-reaction) nothing)
(set!
(-> s4-0 no-reaction)
(the-as
(function collide-shape-moving collide-shape-intersect vector vector none)
nothing
)
)
(let ((s3-0 (new 'process 'collide-shape-prim-group s4-0 (the-as uint 3) 0)))
(set! (-> s3-0 prim-core collide-as) (the-as uint 256))
(set! (-> s3-0 collide-with) (the-as uint 16))
(set! (-> s3-0 prim-core action) (the-as uint 1))
(set-vector! (-> s3-0 local-sphere) 0.0 10240.0 0.0 12288.0)
(dummy-46 s4-0)
(set-root-prim! s4-0 s3-0)
(let ((s2-0 (new 'process 'collide-shape-prim-sphere s4-0 (the-as uint 2))))
(set! (-> s2-0 prim-core collide-as) (the-as uint 256))
(set! (-> s2-0 collide-with) (the-as uint 16))
(set! (-> s2-0 prim-core action) (the-as uint 1))
(set! (-> s2-0 prim-core offense) 4)
(set-vector! (-> s2-0 local-sphere) 0.0 4915.2 0.0 4096.0)
(append-prim s3-0 s2-0)
)
(dummy-28 s3-0)
(let ((s2-1 (new 'process 'collide-shape-prim-sphere s4-0 (the-as uint 1))))
(set! (-> s2-1 prim-core collide-as) (the-as uint 256))
(set! (-> s2-1 collide-with) (the-as uint 16))
(set! (-> s2-1 prim-core offense) 2)
(set! (-> s2-1 transform-index) 16)
(set-vector! (-> s2-1 local-sphere) 0.0 0.0 0.0 1638.4)
(append-prim s3-0 s2-1)
)
(dummy-28 s3-0)
(let ((s2-2 (new 'process 'collide-shape-prim-sphere s4-0 (the-as uint 1))))
(set! (-> s2-2 prim-core collide-as) (the-as uint 256))
(set! (-> s2-2 collide-with) (the-as uint 16))
(set! (-> s2-2 prim-core offense) 2)
(set! (-> s2-2 transform-index) 21)
(set-vector! (-> s2-2 local-sphere) 0.0 0.0 0.0 1638.4)
(append-prim s3-0 s2-2)
)
(dummy-28 s3-0)
)
(set! (-> s4-0 nav-radius) 4096.0)
(dummy-50 s4-0)
(backup-collide-with-as s4-0)
(set! (-> obj collide-info) s4-0)
)
(process-drawable-from-entity! obj arg0)

View File

@ -590,17 +590,23 @@ nav-enemy-default-event-handler
)
(set! (-> s5-0 dynam) (copy *standard-dynamics* 'process))
(set! (-> s5-0 reaction) default-collision-reaction)
(set! (-> s5-0 no-reaction) nothing)
(set!
(-> s5-0 no-reaction)
(the-as
(function collide-shape-moving collide-shape-intersect vector vector none)
nothing
)
)
(let ((s4-0 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 3))))
(set! (-> s4-0 prim-core collide-as) (the-as uint 256))
(set! (-> s4-0 collide-with) (the-as uint 16))
(set! (-> s4-0 prim-core action) (the-as uint 1))
(set! (-> s4-0 prim-core offense) 2)
(set-vector! (-> s4-0 local-sphere) 0.0 0.0 0.0 4915.2)
(set-root-prim! s5-0 s4-0)
)
(dummy-46 s5-0)
(set! (-> s5-0 nav-radius) 2048.0)
(dummy-50 s5-0)
(backup-collide-with-as s5-0)
(set! (-> obj collide-info) s5-0)
)
0

View File

@ -869,13 +869,19 @@ lurkerworm-default-post-behavior
)
(set! (-> s4-0 dynam) (copy *standard-dynamics* 'process))
(set! (-> s4-0 reaction) default-collision-reaction)
(set! (-> s4-0 no-reaction) nothing)
(set!
(-> s4-0 no-reaction)
(the-as
(function collide-shape-moving collide-shape-intersect vector vector none)
nothing
)
)
(let ((s3-0 (new 'process 'collide-shape-prim-group s4-0 (the-as uint 6) 0)))
(set! (-> s3-0 prim-core collide-as) (the-as uint 256))
(set! (-> s3-0 collide-with) (the-as uint 16))
(set! (-> s3-0 prim-core action) (the-as uint 1))
(set-vector! (-> s3-0 local-sphere) 0.0 10240.0 0.0 24576.0)
(dummy-46 s4-0)
(set-root-prim! s4-0 s3-0)
(let ((s2-0 (new 'process 'collide-shape-prim-sphere s4-0 (the-as uint 0))))
(set! (-> s2-0 prim-core collide-as) (the-as uint 256))
(set! (-> s2-0 collide-with) (the-as uint 16))
@ -883,8 +889,8 @@ lurkerworm-default-post-behavior
(set! (-> s2-0 prim-core offense) 4)
(set! (-> s2-0 transform-index) 3)
(set-vector! (-> s2-0 local-sphere) 0.0 0.0 0.0 4096.0)
(append-prim s3-0 s2-0)
)
(dummy-28 s3-0)
(let ((s2-1 (new 'process 'collide-shape-prim-sphere s4-0 (the-as uint 0))))
(set! (-> s2-1 prim-core collide-as) (the-as uint 256))
(set! (-> s2-1 collide-with) (the-as uint 16))
@ -892,8 +898,8 @@ lurkerworm-default-post-behavior
(set! (-> s2-1 prim-core offense) 4)
(set! (-> s2-1 transform-index) 5)
(set-vector! (-> s2-1 local-sphere) 0.0 0.0 0.0 4096.0)
(append-prim s3-0 s2-1)
)
(dummy-28 s3-0)
(let ((s2-2 (new 'process 'collide-shape-prim-sphere s4-0 (the-as uint 0))))
(set! (-> s2-2 prim-core collide-as) (the-as uint 256))
(set! (-> s2-2 collide-with) (the-as uint 16))
@ -901,8 +907,8 @@ lurkerworm-default-post-behavior
(set! (-> s2-2 prim-core offense) 4)
(set! (-> s2-2 transform-index) 6)
(set-vector! (-> s2-2 local-sphere) 0.0 0.0 0.0 4096.0)
(append-prim s3-0 s2-2)
)
(dummy-28 s3-0)
(let ((s2-3 (new 'process 'collide-shape-prim-sphere s4-0 (the-as uint 0))))
(set! (-> s2-3 prim-core collide-as) (the-as uint 256))
(set! (-> s2-3 collide-with) (the-as uint 16))
@ -910,8 +916,8 @@ lurkerworm-default-post-behavior
(set! (-> s2-3 prim-core offense) 4)
(set! (-> s2-3 transform-index) 7)
(set-vector! (-> s2-3 local-sphere) 0.0 0.0 0.0 4096.0)
(append-prim s3-0 s2-3)
)
(dummy-28 s3-0)
(let ((s2-4 (new 'process 'collide-shape-prim-sphere s4-0 (the-as uint 0))))
(set! (-> s2-4 prim-core collide-as) (the-as uint 256))
(set! (-> s2-4 collide-with) (the-as uint 16))
@ -919,19 +925,19 @@ lurkerworm-default-post-behavior
(set! (-> s2-4 prim-core offense) 4)
(set! (-> s2-4 transform-index) 8)
(set-vector! (-> s2-4 local-sphere) 0.0 0.0 0.0 4096.0)
(append-prim s3-0 s2-4)
)
(dummy-28 s3-0)
(let ((s2-5 (new 'process 'collide-shape-prim-sphere s4-0 (the-as uint 1))))
(set! (-> s2-5 prim-core collide-as) (the-as uint 256))
(set! (-> s2-5 collide-with) (the-as uint 16))
(set! (-> s2-5 prim-core offense) 2)
(set! (-> s2-5 transform-index) 11)
(set-vector! (-> s2-5 local-sphere) 0.0 0.0 0.0 6144.0)
(append-prim s3-0 s2-5)
)
(dummy-28 s3-0)
)
(set! (-> s4-0 nav-radius) (* 0.75 (-> s4-0 root-prim local-sphere w)))
(dummy-50 s4-0)
(backup-collide-with-as s4-0)
(set! (-> obj root-override) s4-0)
)
(process-drawable-from-entity! obj arg0)

View File

@ -221,8 +221,8 @@
:post
(behavior ()
(if (logtest? (-> self draw status) 2)
(dummy-48 (-> self root-override))
(dummy-49 (-> self root-override))
(clear-collide-with-as (-> self root-override))
(restore-collide-with-as (-> self root-override))
)
(rider-post)
(none)
@ -237,7 +237,13 @@
)
(set! (-> s5-0 dynam) (copy *standard-dynamics* 'process))
(set! (-> s5-0 reaction) default-collision-reaction)
(set! (-> s5-0 no-reaction) nothing)
(set!
(-> s5-0 no-reaction)
(the-as
(function collide-shape-moving collide-shape-intersect vector vector none)
nothing
)
)
(dummy-29 s5-0 1)
(let
((s4-0
@ -256,10 +262,10 @@
(set! (-> s4-0 prim-core offense) 4)
(set! (-> s4-0 transform-index) 3)
(set-vector! (-> s4-0 local-sphere) 0.0 0.0 0.0 40960.0)
(set-root-prim! s5-0 s4-0)
)
(dummy-46 s5-0)
(set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w)))
(dummy-50 s5-0)
(backup-collide-with-as s5-0)
(set! (-> obj root-override) s5-0)
)
0
@ -492,7 +498,13 @@
)
(set! (-> s5-0 dynam) (copy *standard-dynamics* 'process))
(set! (-> s5-0 reaction) default-collision-reaction)
(set! (-> s5-0 no-reaction) nothing)
(set!
(-> s5-0 no-reaction)
(the-as
(function collide-shape-moving collide-shape-intersect vector vector none)
nothing
)
)
(dummy-29 s5-0 1)
(let
((s4-0
@ -511,10 +523,10 @@
(set! (-> s4-0 prim-core offense) 4)
(set! (-> s4-0 transform-index) 0)
(set-vector! (-> s4-0 local-sphere) 0.0 0.0 0.0 49152.0)
(set-root-prim! s5-0 s4-0)
)
(dummy-46 s5-0)
(set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w)))
(dummy-50 s5-0)
(backup-collide-with-as s5-0)
(set! (-> obj root-override) s5-0)
)
0
@ -661,10 +673,10 @@
(set! (-> s4-0 prim-core offense) 4)
(set! (-> s4-0 transform-index) 0)
(set-vector! (-> s4-0 local-sphere) 0.0 0.0 0.0 16384.0)
(set-root-prim! s5-0 s4-0)
)
(dummy-46 s5-0)
(set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w)))
(dummy-50 s5-0)
(backup-collide-with-as s5-0)
(set! (-> obj root-override) s5-0)
)
0
@ -707,7 +719,13 @@
)
(set! (-> s5-0 dynam) (copy *standard-dynamics* 'process))
(set! (-> s5-0 reaction) default-collision-reaction)
(set! (-> s5-0 no-reaction) nothing)
(set!
(-> s5-0 no-reaction)
(the-as
(function collide-shape-moving collide-shape-intersect vector vector none)
nothing
)
)
(let
((s4-0
(new
@ -725,10 +743,10 @@
(set! (-> s4-0 prim-core offense) 4)
(set! (-> s4-0 transform-index) 3)
(set-vector! (-> s4-0 local-sphere) 0.0 0.0 0.0 12288.0)
(set-root-prim! s5-0 s4-0)
)
(dummy-46 s5-0)
(set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w)))
(dummy-50 s5-0)
(backup-collide-with-as s5-0)
(set! (-> obj root-override) s5-0)
)
(the-as collide-shape-moving 0)
@ -1319,10 +1337,10 @@
(set! (-> s3-0 prim-core offense) 4)
(set! (-> s3-0 transform-index) 3)
(set-vector! (-> s3-0 local-sphere) 0.0 81920.0 0.0 143360.0)
(set-root-prim! s4-0 s3-0)
)
(dummy-46 s4-0)
(set! (-> s4-0 nav-radius) (* 0.75 (-> s4-0 root-prim local-sphere w)))
(dummy-50 s4-0)
(backup-collide-with-as s4-0)
(set! (-> obj root-override) s4-0)
)
(process-drawable-from-entity! obj arg0)
@ -2136,10 +2154,10 @@
(set! (-> s4-0 prim-core action) (the-as uint 1))
(set! (-> s4-0 prim-core offense) 4)
(set-vector! (-> s4-0 local-sphere) 0.0 4096.0 0.0 4096.0)
(set-root-prim! s5-0 s4-0)
)
(dummy-46 s5-0)
(set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w)))
(dummy-50 s5-0)
(backup-collide-with-as s5-0)
(set! (-> obj root-override) s5-0)
)
0

View File

@ -99,7 +99,7 @@
)
(defbehavior citb-sagecage-update-collision citb-sagecage ()
(dummy-28
(change-mesh
(the-as collide-shape-prim-mesh (-> self root-override root-prim))
(if (-> self bars-on)
0
@ -206,7 +206,13 @@
)
(set! (-> s5-0 dynam) (copy *standard-dynamics* 'process))
(set! (-> s5-0 reaction) default-collision-reaction)
(set! (-> s5-0 no-reaction) nothing)
(set!
(-> s5-0 no-reaction)
(the-as
(function collide-shape-moving collide-shape-intersect vector vector none)
nothing
)
)
(dummy-29 s5-0 1)
(let
((s4-0
@ -225,10 +231,10 @@
(set! (-> s4-0 prim-core offense) 4)
(set! (-> s4-0 transform-index) 3)
(set-vector! (-> s4-0 local-sphere) 0.0 20480.0 0.0 28672.0)
(set-root-prim! s5-0 s4-0)
)
(dummy-46 s5-0)
(set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w)))
(dummy-50 s5-0)
(backup-collide-with-as s5-0)
(set! (-> obj root-override) s5-0)
)
0

View File

@ -365,7 +365,13 @@
)
(set! (-> s5-0 dynam) (copy *standard-dynamics* 'process))
(set! (-> s5-0 reaction) default-collision-reaction)
(set! (-> s5-0 no-reaction) nothing)
(set!
(-> s5-0 no-reaction)
(the-as
(function collide-shape-moving collide-shape-intersect vector vector none)
nothing
)
)
(dummy-29 s5-0 1)
(let
((s4-0
@ -384,10 +390,10 @@
(set! (-> s4-0 prim-core offense) 4)
(set! (-> s4-0 transform-index) 0)
(set-vector! (-> s4-0 local-sphere) 0.0 0.0 0.0 12288.0)
(set-root-prim! s5-0 s4-0)
)
(dummy-46 s5-0)
(set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w)))
(dummy-50 s5-0)
(backup-collide-with-as s5-0)
(set! (-> obj root-override) s5-0)
)
0

View File

@ -615,7 +615,7 @@ nav-enemy-default-event-handler
:code
(behavior ()
(ja-channel-set! 0)
(dummy-48 (-> self collide-info))
(clear-collide-with-as (-> self collide-info))
(ja-post)
(when (not (task-complete? *game-info* (-> self entity extra perm task)))
(when
@ -639,7 +639,7 @@ nav-enemy-default-event-handler
(if (not (-> self child))
(birth-pickup-at-point
(-> self collide-info trans)
6
(pickup-type fuel-cell)
(the float (-> self entity extra perm task))
#f
self
@ -686,7 +686,7 @@ nav-enemy-default-event-handler
(logtest? (-> obj entity extra perm status) (entity-perm-status complete))
)
)
(zero? (logand (-> obj enemy-info options) 2))
(zero? (logand (-> obj enemy-info options) (fact-options fop1)))
)
(go (method-of-object obj nav-enemy-idle))
)

View File

@ -613,40 +613,46 @@
)
(set! (-> s5-0 dynam) (copy *standard-dynamics* 'process))
(set! (-> s5-0 reaction) default-collision-reaction)
(set! (-> s5-0 no-reaction) nothing)
(set!
(-> s5-0 no-reaction)
(the-as
(function collide-shape-moving collide-shape-intersect vector vector none)
nothing
)
)
(let ((s4-0 (new 'process 'collide-shape-prim-group s5-0 (the-as uint 3) 0)))
(set! (-> s4-0 prim-core collide-as) (the-as uint 256))
(set! (-> s4-0 collide-with) (the-as uint 16))
(set! (-> s4-0 prim-core action) (the-as uint 1))
(set-vector! (-> s4-0 local-sphere) 0.0 8192.0 0.0 12288.0)
(dummy-46 s5-0)
(set-root-prim! s5-0 s4-0)
(let ((s3-0 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 3))))
(set! (-> s3-0 prim-core collide-as) (the-as uint 256))
(set! (-> s3-0 collide-with) (the-as uint 16))
(set! (-> s3-0 prim-core action) (the-as uint 1))
(set! (-> s3-0 prim-core offense) 1)
(set-vector! (-> s3-0 local-sphere) 0.0 4096.0 0.0 3072.0)
(append-prim s4-0 s3-0)
)
(dummy-28 s4-0)
(let ((s3-1 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 3))))
(set! (-> s3-1 prim-core collide-as) (the-as uint 256))
(set! (-> s3-1 collide-with) (the-as uint 16))
(set! (-> s3-1 prim-core action) (the-as uint 1))
(set! (-> s3-1 prim-core offense) 1)
(set-vector! (-> s3-1 local-sphere) 0.0 9830.4 0.0 3072.0)
(append-prim s4-0 s3-1)
)
(dummy-28 s4-0)
(let ((s3-2 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 1))))
(set! (-> s3-2 prim-core collide-as) (the-as uint 256))
(set! (-> s3-2 collide-with) (the-as uint 16))
(set! (-> s3-2 prim-core offense) 2)
(set! (-> s3-2 transform-index) 6)
(set-vector! (-> s3-2 local-sphere) 0.0 0.0 0.0 2048.0)
(append-prim s4-0 s3-2)
)
(dummy-28 s4-0)
)
(set! (-> s5-0 nav-radius) 6144.0)
(dummy-50 s5-0)
(backup-collide-with-as s5-0)
(set! (-> s5-0 max-iteration-count) (the-as uint 2))
(set! (-> obj collide-info) s5-0)
)
@ -671,11 +677,11 @@
(-> obj entity)
(logtest? (-> obj entity extra perm status) (entity-perm-status complete))
)
(logtest? (-> obj enemy-info options) 2)
(logtest? (-> obj enemy-info options) (fact-options fop1))
)
(go (method-of-object obj nav-enemy-fuel-cell))
)
((logtest? (-> obj enemy-info options) 32)
((logtest? (-> obj enemy-info options) (fact-options fop5))
(go (method-of-object obj nav-enemy-wait-for-cue))
)
(else

View File

@ -505,14 +505,20 @@
)
(set! (-> s5-0 dynam) (copy *standard-dynamics* 'process))
(set! (-> s5-0 reaction) default-collision-reaction)
(set! (-> s5-0 no-reaction) nothing)
(set!
(-> s5-0 no-reaction)
(the-as
(function collide-shape-moving collide-shape-intersect vector vector none)
nothing
)
)
(dummy-29 s5-0 1)
(let ((s4-0 (new 'process 'collide-shape-prim-group s5-0 (the-as uint 2) 0)))
(set! (-> s4-0 prim-core collide-as) (the-as uint 2048))
(set! (-> s4-0 collide-with) (the-as uint 16))
(set! (-> s4-0 prim-core action) (the-as uint 3))
(set-vector! (-> s4-0 local-sphere) 0.0 0.0 0.0 12288.0)
(dummy-46 s5-0)
(set-root-prim! s5-0 s4-0)
(let
((s3-0
(new
@ -530,8 +536,8 @@
(set! (-> s3-0 prim-core offense) 4)
(set! (-> s3-0 transform-index) 4)
(set-vector! (-> s3-0 local-sphere) 0.0 0.0 0.0 12288.0)
(append-prim s4-0 s3-0)
)
(dummy-28 s4-0)
(let
((s3-1
(new
@ -549,11 +555,11 @@
(set! (-> s3-1 prim-core offense) 4)
(set! (-> s3-1 transform-index) 3)
(set-vector! (-> s3-1 local-sphere) 0.0 0.0 0.0 12288.0)
(append-prim s4-0 s3-1)
)
(dummy-28 s4-0)
)
(set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w)))
(dummy-50 s5-0)
(backup-collide-with-as s5-0)
(set! (-> obj root-override) s5-0)
s5-0
)
@ -876,7 +882,7 @@
)
)
)
(dummy-48 (-> self control))
(clear-collide-with-as (-> self control))
(set! (-> self state-time) (-> *display* base-frame-counter))
(set!
(-> self trans-hook)

View File

@ -283,7 +283,7 @@ eco-door-event-handler
)
)
(sound-play-by-name (-> self open-sound) (new-sound-id) 1024 0 0 1 #t)
(dummy-48 (-> self root-override))
(clear-collide-with-as (-> self root-override))
(until (ja-done? 0)
(let ((a0-9 (-> self skel root-channel 0)))
(set!
@ -318,7 +318,7 @@ eco-door-event-handler
(behavior ()
(set! (-> self state-time) (-> *display* base-frame-counter))
(process-entity-status! self (entity-perm-status complete) #t)
(dummy-48 (-> self root-override))
(clear-collide-with-as (-> self root-override))
(let ((v1-6 (-> self skel root-channel 0)))
(set! (-> v1-6 num-func) num-func-identity)
(set!
@ -365,7 +365,7 @@ eco-door-event-handler
eco-door-event-handler
:code
(behavior ()
(dummy-49 (-> self root-override))
(restore-collide-with-as (-> self root-override))
(set! (-> self draw status) (logand -3 (-> self draw status)))
(let ((gp-0 (new 'stack 'overlaps-others-params)))
(set! (-> gp-0 options) (the-as uint 1))
@ -440,10 +440,10 @@ eco-door-event-handler
(set! (-> s4-0 prim-core offense) 4)
(set! (-> s4-0 transform-index) 0)
(set-vector! (-> s4-0 local-sphere) 0.0 0.0 0.0 16384.0)
(set-root-prim! s5-0 s4-0)
)
(dummy-46 s5-0)
(set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w)))
(dummy-50 s5-0)
(backup-collide-with-as s5-0)
(set! (-> obj root-override) s5-0)
)
0

View File

@ -268,11 +268,11 @@ battlecontroller-default-event-handler
(-> (the-as (pointer nav-enemy) gp-0) 0 enemy-info pickup-spawn-amount)
0.0
)
(logior! (-> (the-as (pointer nav-enemy) gp-0) 0 enemy-info options) 512)
(set!
(-> (the-as (pointer nav-enemy) gp-0) 0 enemy-info fade-time)
(the-as uint 1200)
(logior!
(-> (the-as (pointer nav-enemy) gp-0) 0 enemy-info options)
(fact-options fade)
)
(set! (-> (the-as (pointer nav-enemy) gp-0) 0 enemy-info fade-time) 1200)
)
)
)
@ -691,7 +691,7 @@ battlecontroller-default-event-handler
(label cfg-15)
(birth-pickup-at-point
(-> self final-pickup-spawn-point)
(the-as int (-> self final-pickup-type))
(-> self final-pickup-type)
(the float (-> self entity extra perm task))
#f
self

View File

@ -75,10 +75,10 @@
(set! (-> s3-1 prim-core offense) 4)
(set! (-> s3-1 transform-index) 3)
(set-vector! (-> s3-1 local-sphere) 0.0 0.0 0.0 (fmax 122880.0 f30-1))
(set-root-prim! s4-1 s3-1)
)
(dummy-46 s4-1)
(set! (-> s4-1 nav-radius) (* 0.75 (-> s4-1 root-prim local-sphere w)))
(dummy-50 s4-1)
(backup-collide-with-as s4-1)
(set! (-> self root) s4-1)
)
(let ((s4-2 (new-stack-matrix0)))

View File

@ -305,15 +305,13 @@
((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
(case arg2
(('death-start)
(TODO-RENAME-9 (-> self fact) #t *entity-pool* (-> self fact) 0)
(drop-pickup (-> self fact) #t *entity-pool* (-> self fact) 0)
)
(('death-end)
(let ((v0-0 (logior (-> self draw status) 2)))
(set! (-> self draw status) v0-0)
v0-0
)
(logior! (-> self draw status) 2)
)
)
(none)
)
nav-enemy-default-event-handler
@ -2183,7 +2181,7 @@ nav-enemy-default-event-handler
:code
(behavior ()
(ja-channel-push! 1 22)
(dummy-48 (-> self collide-info))
(clear-collide-with-as (-> self collide-info))
(nav-enemy-fall-and-play-death-anim
(the-as
art-joint-anim
@ -2195,7 +2193,7 @@ nav-enemy-default-event-handler
600
)
(send-event self 'death-end)
(if (logtest? (-> self enemy-info options) 2)
(if (logtest? (-> self enemy-info options) (fact-options fop1))
(go-virtual nav-enemy-fuel-cell)
)
(while (-> self child)
@ -2218,14 +2216,14 @@ nav-enemy-default-event-handler
:code
(behavior ()
(ja-channel-set! 0)
(dummy-48 (-> self collide-info))
(clear-collide-with-as (-> self collide-info))
(ja-post)
(process-entity-status! self (entity-perm-status complete) #t)
(when (not (task-complete? *game-info* (-> self entity extra perm task)))
(label cfg-1)
(birth-pickup-at-point
(-> self collide-info trans)
6
(pickup-type fuel-cell)
(the float (the-as int (-> self entity extra perm task)))
#f
self

View File

@ -468,7 +468,13 @@
)
(set! (-> s4-0 dynam) (copy *standard-dynamics* 'process))
(set! (-> s4-0 reaction) default-collision-reaction)
(set! (-> s4-0 no-reaction) nothing)
(set!
(-> s4-0 no-reaction)
(the-as
(function collide-shape-moving collide-shape-intersect vector vector none)
nothing
)
)
(dummy-29 s4-0 1)
(let
((s3-0
@ -487,10 +493,10 @@
(set! (-> s3-0 prim-core offense) 4)
(set! (-> s3-0 transform-index) 0)
(set-vector! (-> s3-0 local-sphere) 0.0 0.0 0.0 11468.8)
(set-root-prim! s4-0 s3-0)
)
(dummy-46 s4-0)
(set! (-> s4-0 nav-radius) (* 0.75 (-> s4-0 root-prim local-sphere w)))
(dummy-50 s4-0)
(backup-collide-with-as s4-0)
(set! (-> obj root-override) s4-0)
)
(process-drawable-from-entity! obj arg0)

View File

@ -543,7 +543,13 @@
)
(set! (-> s5-0 dynam) (copy *standard-dynamics* 'process))
(set! (-> s5-0 reaction) default-collision-reaction)
(set! (-> s5-0 no-reaction) nothing)
(set!
(-> s5-0 no-reaction)
(the-as
(function collide-shape-moving collide-shape-intersect vector vector none)
nothing
)
)
(dummy-29 s5-0 1)
(let ((s4-0 (new 'process 'collide-shape-prim-group s5-0 (the-as uint 2) 0)))
(set! (-> s4-0 prim-core collide-as) (the-as uint 2048))
@ -551,7 +557,7 @@
(set! (-> s4-0 prim-core action) (the-as uint 3))
(set! (-> s4-0 transform-index) 0)
(set-vector! (-> s4-0 local-sphere) 0.0 -4096.0 0.0 27033.6)
(dummy-46 s5-0)
(set-root-prim! s5-0 s4-0)
(let
((s3-0
(new
@ -569,8 +575,8 @@
(set! (-> s3-0 prim-core offense) 4)
(set! (-> s3-0 transform-index) 4)
(set-vector! (-> s3-0 local-sphere) 0.0 -3072.0 0.0 7372.8)
(append-prim s4-0 s3-0)
)
(dummy-28 s4-0)
(let
((s3-1
(new
@ -588,11 +594,11 @@
(set! (-> s3-1 prim-core offense) 4)
(set! (-> s3-1 transform-index) 3)
(set-vector! (-> s3-1 local-sphere) 0.0 -4096.0 0.0 27033.6)
(append-prim s4-0 s3-1)
)
(dummy-28 s4-0)
)
(set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w)))
(dummy-50 s5-0)
(backup-collide-with-as s5-0)
(set! (-> obj root-override) s5-0)
s5-0
)

View File

@ -164,7 +164,13 @@
)
(set! (-> s5-0 dynam) (copy *standard-dynamics* 'process))
(set! (-> s5-0 reaction) default-collision-reaction)
(set! (-> s5-0 no-reaction) nothing)
(set!
(-> s5-0 no-reaction)
(the-as
(function collide-shape-moving collide-shape-intersect vector vector none)
nothing
)
)
(dummy-29 s5-0 1)
(let
((s4-0
@ -183,10 +189,10 @@
(set! (-> s4-0 prim-core offense) 4)
(set! (-> s4-0 transform-index) 0)
(set-vector! (-> s4-0 local-sphere) 0.0 0.0 0.0 13107.2)
(set-root-prim! s5-0 s4-0)
)
(dummy-46 s5-0)
(set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w)))
(dummy-50 s5-0)
(backup-collide-with-as s5-0)
(set! (-> obj root-override) s5-0)
)
0
@ -290,10 +296,12 @@
)
:trans
(behavior ()
(set! (-> self path-pos) (if (logtest? (-> self fact options) 8)
(get-current-phase (-> self sync))
(get-current-phase-with-mirror (-> self sync))
)
(set!
(-> self path-pos)
(if (logtest? (-> self fact options) (fact-options fop3))
(get-current-phase (-> self sync))
(get-current-phase-with-mirror (-> self sync))
)
)
(eval-path-curve!
(-> self path)
@ -360,10 +368,12 @@
)
)
((> (-> obj sync period) 0)
(set! (-> obj path-pos) (if (logtest? (-> obj fact options) 8)
(get-current-phase (-> obj sync))
(get-current-phase-with-mirror (-> obj sync))
)
(set!
(-> obj path-pos)
(if (logtest? (-> obj fact options) (fact-options fop3))
(get-current-phase (-> obj sync))
(get-current-phase-with-mirror (-> obj sync))
)
)
(eval-path-curve!
(-> obj path)

View File

@ -945,7 +945,13 @@
)
(set! (-> s5-0 dynam) (copy *standard-dynamics* 'process))
(set! (-> s5-0 reaction) default-collision-reaction)
(set! (-> s5-0 no-reaction) nothing)
(set!
(-> s5-0 no-reaction)
(the-as
(function collide-shape-moving collide-shape-intersect vector vector none)
nothing
)
)
(dummy-29 s5-0 1)
(let
((s4-0
@ -964,10 +970,10 @@
(set! (-> s4-0 prim-core offense) 4)
(set! (-> s4-0 transform-index) 0)
(set-vector! (-> s4-0 local-sphere) 0.0 0.0 0.0 20480.0)
(set-root-prim! s5-0 s4-0)
)
(dummy-46 s5-0)
(set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w)))
(dummy-50 s5-0)
(backup-collide-with-as s5-0)
(set! (-> obj root-overlay) s5-0)
)
0

View File

@ -1166,16 +1166,22 @@ nav-enemy-default-event-handler
)
(set! (-> s4-0 dynam) (copy *standard-dynamics* 'process))
(set! (-> s4-0 reaction) default-collision-reaction)
(set! (-> s4-0 no-reaction) nothing)
(set!
(-> s4-0 no-reaction)
(the-as
(function collide-shape-moving collide-shape-intersect vector vector none)
nothing
)
)
(let ((s3-0 (new 'process 'collide-shape-prim-sphere s4-0 (the-as uint 1))))
(set! (-> s3-0 prim-core collide-as) (the-as uint 256))
(set! (-> s3-0 collide-with) (the-as uint 16))
(set! (-> s3-0 prim-core offense) 2)
(set-vector! (-> s3-0 local-sphere) 0.0 0.0 0.0 (* 6144.0 (-> obj scale)))
(set-root-prim! s4-0 s3-0)
)
(dummy-46 s4-0)
(set! (-> s4-0 nav-radius) (* 0.75 (-> s4-0 root-prim local-sphere w)))
(dummy-50 s4-0)
(backup-collide-with-as s4-0)
(set! (-> obj collide-info) s4-0)
)
(process-drawable-from-entity! obj arg0)

View File

@ -298,10 +298,10 @@
(set! (-> s3-0 prim-core offense) 4)
(set! (-> s3-0 transform-index) 0)
(set-vector! (-> s3-0 local-sphere) 0.0 19251.2 0.0 22118.4)
(set-root-prim! s4-0 s3-0)
)
(dummy-46 s4-0)
(set! (-> s4-0 nav-radius) 4915.2)
(dummy-50 s4-0)
(backup-collide-with-as s4-0)
(set! (-> obj root-override) s4-0)
)
(set! (-> obj link) (new 'process 'actor-link-info obj))

View File

@ -211,7 +211,13 @@
)
(set! (-> s4-0 dynam) (copy *standard-dynamics* 'process))
(set! (-> s4-0 reaction) default-collision-reaction)
(set! (-> s4-0 no-reaction) nothing)
(set!
(-> s4-0 no-reaction)
(the-as
(function collide-shape-moving collide-shape-intersect vector vector none)
nothing
)
)
(let
((s3-0
(new
@ -229,10 +235,10 @@
(set! (-> s3-0 prim-core offense) 4)
(set! (-> s3-0 transform-index) 3)
(set-vector! (-> s3-0 local-sphere) 0.0 45056.0 0.0 49152.0)
(set-root-prim! s4-0 s3-0)
)
(dummy-46 s4-0)
(set! (-> s4-0 nav-radius) (* 0.75 (-> s4-0 root-prim local-sphere w)))
(dummy-50 s4-0)
(backup-collide-with-as s4-0)
(set! (-> obj root) s4-0)
)
(process-drawable-from-entity! obj arg0)
@ -469,15 +475,21 @@
)
(set! (-> s3-0 dynam) (copy *standard-dynamics* 'process))
(set! (-> s3-0 reaction) default-collision-reaction)
(set! (-> s3-0 no-reaction) nothing)
(set!
(-> s3-0 no-reaction)
(the-as
(function collide-shape-moving collide-shape-intersect vector vector none)
nothing
)
)
(let ((s2-0 (new 'process 'collide-shape-prim-sphere s3-0 (the-as uint 0))))
(set! (-> s2-0 prim-core collide-as) (the-as uint 64))
(set! (-> s2-0 collide-with) (the-as uint 16))
(set-vector! (-> s2-0 local-sphere) 0.0 0.0 0.0 4915.2)
(set-root-prim! s3-0 s2-0)
)
(dummy-46 s3-0)
(set! (-> s3-0 nav-radius) (* 0.75 (-> s3-0 root-prim local-sphere w)))
(dummy-50 s3-0)
(backup-collide-with-as s3-0)
(set! (-> self root-override) s3-0)
)
(set! (-> self root-override trans quad) (-> arg1 quad))

View File

@ -499,13 +499,13 @@
:enter
(behavior ()
(logior! (-> self draw status) 2)
(dummy-48 (-> self collide-info))
(clear-collide-with-as (-> self collide-info))
(none)
)
:exit
(behavior ()
(set! (-> self draw status) (logand -3 (-> self draw status)))
(dummy-49 (-> self collide-info))
(restore-collide-with-as (-> self collide-info))
(none)
)
:trans
@ -1112,73 +1112,79 @@
)
(set! (-> s5-0 dynam) (copy *standard-dynamics* 'process))
(set! (-> s5-0 reaction) default-collision-reaction)
(set! (-> s5-0 no-reaction) nothing)
(set!
(-> s5-0 no-reaction)
(the-as
(function collide-shape-moving collide-shape-intersect vector vector none)
nothing
)
)
(let ((s4-0 (new 'process 'collide-shape-prim-group s5-0 (the-as uint 7) 0)))
(set! (-> s4-0 prim-core collide-as) (the-as uint 256))
(set! (-> s4-0 collide-with) (the-as uint 16))
(set! (-> s4-0 prim-core action) (the-as uint 1))
(set! (-> s4-0 transform-index) 4)
(set-vector! (-> s4-0 local-sphere) 0.0 0.0 -4096.0 20480.0)
(dummy-46 s5-0)
(set-root-prim! s5-0 s4-0)
(let ((s3-0 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 3))))
(set! (-> s3-0 prim-core collide-as) (the-as uint 256))
(set! (-> s3-0 collide-with) (the-as uint 16))
(set! (-> s3-0 prim-core action) (the-as uint 1))
(set! (-> s3-0 prim-core offense) 1)
(set-vector! (-> s3-0 local-sphere) 0.0 2785.28 0.0 3276.8)
(append-prim s4-0 s3-0)
)
(dummy-28 s4-0)
(let ((s3-1 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 3))))
(set! (-> s3-1 prim-core collide-as) (the-as uint 256))
(set! (-> s3-1 collide-with) (the-as uint 16))
(set! (-> s3-1 prim-core action) (the-as uint 1))
(set! (-> s3-1 prim-core offense) 1)
(set-vector! (-> s3-1 local-sphere) 0.0 6615.04 0.0 3276.8)
(append-prim s4-0 s3-1)
)
(dummy-28 s4-0)
(let ((s3-2 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 3))))
(set! (-> s3-2 prim-core collide-as) (the-as uint 256))
(set! (-> s3-2 collide-with) (the-as uint 16))
(set! (-> s3-2 prim-core action) (the-as uint 1))
(set! (-> s3-2 prim-core offense) 1)
(set-vector! (-> s3-2 local-sphere) 0.0 10444.8 0.0 3276.8)
(append-prim s4-0 s3-2)
)
(dummy-28 s4-0)
(let ((s3-3 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 1))))
(set! (-> s3-3 prim-core collide-as) (the-as uint 256))
(set! (-> s3-3 collide-with) (the-as uint 16))
(set! (-> s3-3 prim-core offense) 2)
(set! (-> s3-3 transform-index) 6)
(set-vector! (-> s3-3 local-sphere) 0.0 0.0 0.0 3276.8)
(append-prim s4-0 s3-3)
)
(dummy-28 s4-0)
(let ((s3-4 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 1))))
(set! (-> s3-4 prim-core collide-as) (the-as uint 256))
(set! (-> s3-4 collide-with) (the-as uint 16))
(set! (-> s3-4 prim-core offense) 2)
(set! (-> s3-4 transform-index) 4)
(set-vector! (-> s3-4 local-sphere) 0.0 -3276.8 -2048.0 5734.4)
(append-prim s4-0 s3-4)
)
(dummy-28 s4-0)
(let ((s3-5 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 1))))
(set! (-> s3-5 prim-core collide-as) (the-as uint 256))
(set! (-> s3-5 collide-with) (the-as uint 16))
(set! (-> s3-5 prim-core offense) 2)
(set! (-> s3-5 transform-index) 12)
(set-vector! (-> s3-5 local-sphere) 0.0 0.0 0.0 2457.6)
(append-prim s4-0 s3-5)
)
(dummy-28 s4-0)
(let ((s3-6 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 1))))
(set! (-> s3-6 prim-core collide-as) (the-as uint 256))
(set! (-> s3-6 collide-with) (the-as uint 16))
(set! (-> s3-6 prim-core offense) 2)
(set! (-> s3-6 transform-index) 16)
(set-vector! (-> s3-6 local-sphere) 0.0 0.0 0.0 2457.6)
(append-prim s4-0 s3-6)
)
(dummy-28 s4-0)
)
(set! (-> s5-0 nav-radius) 8192.0)
(dummy-50 s5-0)
(backup-collide-with-as s5-0)
(set! (-> s5-0 max-iteration-count) (the-as uint 2))
(set! (-> obj collide-info) s5-0)
)

View File

@ -735,7 +735,7 @@
'untrigger
(-> self angle-bit)
)
(dummy-48 (-> self root-override))
(clear-collide-with-as (-> self root-override))
(logior! (-> self draw status) 2)
(set! (-> self state-time) (-> *display* base-frame-counter))
(until (>= (- (-> *display* base-frame-counter) (-> self state-time)) 30)
@ -782,10 +782,10 @@
(set! (-> s3-0 collide-with) (the-as uint 16))
(set! (-> s3-0 prim-core offense) 0)
(set-vector! (-> s3-0 local-sphere) 0.0 0.0 0.0 4096.0)
(set-root-prim! s4-2 s3-0)
)
(dummy-46 s4-2)
(set! (-> s4-2 nav-radius) (* 0.75 (-> s4-2 root-prim local-sphere w)))
(dummy-50 s4-2)
(backup-collide-with-as s4-2)
(set! (-> self root-override) s4-2)
)
(set! (-> self root-override trans quad) (-> arg1 quad))

View File

@ -170,8 +170,8 @@
(none)
)
;; 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]
;; 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))
@ -575,7 +575,13 @@
)
(set! (-> s4-0 dynam) (copy *standard-dynamics* 'process))
(set! (-> s4-0 reaction) default-collision-reaction)
(set! (-> s4-0 no-reaction) nothing)
(set!
(-> s4-0 no-reaction)
(the-as
(function collide-shape-moving collide-shape-intersect vector vector none)
nothing
)
)
(dummy-29 s4-0 1)
(let ((s3-0 (new 'process 'collide-shape-prim-group s4-0 (the-as uint 4) 0)))
(set! (-> s3-0 prim-core collide-as) (the-as uint 2048))
@ -583,7 +589,7 @@
(set! (-> s3-0 prim-core action) (the-as uint 3))
(set! (-> s3-0 transform-index) 0)
(set-vector! (-> s3-0 local-sphere) 0.0 0.0 0.0 102400.0)
(dummy-46 s4-0)
(set-root-prim! s4-0 s3-0)
(let
((s2-0
(new
@ -601,8 +607,8 @@
(set! (-> s2-0 prim-core offense) 4)
(set! (-> s2-0 transform-index) 5)
(set-vector! (-> s2-0 local-sphere) 0.0 0.0 0.0 102400.0)
(append-prim s3-0 s2-0)
)
(dummy-28 s3-0)
(let
((s2-1
(new
@ -620,8 +626,8 @@
(set! (-> s2-1 prim-core offense) 4)
(set! (-> s2-1 transform-index) 4)
(set-vector! (-> s2-1 local-sphere) 0.0 0.0 0.0 102400.0)
(append-prim s3-0 s2-1)
)
(dummy-28 s3-0)
(let
((s2-2
(new
@ -639,8 +645,8 @@
(set! (-> s2-2 prim-core offense) 4)
(set! (-> s2-2 transform-index) 7)
(set-vector! (-> s2-2 local-sphere) 0.0 0.0 0.0 102400.0)
(append-prim s3-0 s2-2)
)
(dummy-28 s3-0)
(let
((s2-3
(new
@ -658,11 +664,11 @@
(set! (-> s2-3 prim-core offense) 4)
(set! (-> s2-3 transform-index) 6)
(set-vector! (-> s2-3 local-sphere) 0.0 0.0 0.0 102400.0)
(append-prim s3-0 s2-3)
)
(dummy-28 s3-0)
)
(set! (-> s4-0 nav-radius) (* 0.75 (-> s4-0 root-prim local-sphere w)))
(dummy-50 s4-0)
(backup-collide-with-as s4-0)
(set! (-> obj root) s4-0)
)
(process-drawable-from-entity! obj arg0)

View File

@ -778,7 +778,13 @@
)
(set! (-> s1-0 dynam) (copy *standard-dynamics* 'process))
(set! (-> s1-0 reaction) default-collision-reaction)
(set! (-> s1-0 no-reaction) nothing)
(set!
(-> s1-0 no-reaction)
(the-as
(function collide-shape-moving collide-shape-intersect vector vector none)
nothing
)
)
(let ((s0-0 (new 'process 'collide-shape-prim-sphere s1-0 (the-as uint 0))))
(set! (-> s0-0 prim-core collide-as) (the-as uint 512))
(set! (-> s0-0 collide-with) (the-as uint 16))
@ -786,10 +792,10 @@
(set! (-> s0-0 prim-core offense) 4)
(set! (-> s0-0 transform-index) 3)
(set-vector! (-> s0-0 local-sphere) 0.0 0.0 0.0 16384.0)
(set-root-prim! s1-0 s0-0)
)
(dummy-46 s1-0)
(set! (-> s1-0 nav-radius) (* 0.75 (-> s1-0 root-prim local-sphere w)))
(dummy-50 s1-0)
(backup-collide-with-as s1-0)
(set! (-> self root) s1-0)
)
(set! (-> self root trans quad) (-> arg0 quad))
@ -937,16 +943,22 @@
)
(set! (-> s2-0 dynam) (copy *standard-dynamics* 'process))
(set! (-> s2-0 reaction) default-collision-reaction)
(set! (-> s2-0 no-reaction) nothing)
(set!
(-> s2-0 no-reaction)
(the-as
(function collide-shape-moving collide-shape-intersect vector vector none)
nothing
)
)
(let ((s1-0 (new 'process 'collide-shape-prim-sphere s2-0 (the-as uint 0))))
(set! (-> s1-0 prim-core collide-as) (the-as uint 256))
(set! (-> s1-0 collide-with) (the-as uint 16))
(set! (-> s1-0 prim-core offense) 4)
(set-vector! (-> s1-0 local-sphere) 0.0 8192.0 0.0 8192.0)
(set-root-prim! s2-0 s1-0)
)
(dummy-46 s2-0)
(set! (-> s2-0 nav-radius) (* 0.75 (-> s2-0 root-prim local-sphere w)))
(dummy-50 s2-0)
(backup-collide-with-as s2-0)
(set! (-> self root) s2-0)
)
(set! (-> self root trans quad) (-> arg0 quad))
@ -1267,7 +1279,13 @@
)
(set! (-> s0-0 dynam) (copy *standard-dynamics* 'process))
(set! (-> s0-0 reaction) default-collision-reaction)
(set! (-> s0-0 no-reaction) nothing)
(set!
(-> s0-0 no-reaction)
(the-as
(function collide-shape-moving collide-shape-intersect vector vector none)
nothing
)
)
(set! sv-16 (new 'process 'collide-shape-prim-sphere s0-0 (the-as uint 0)))
(set! (-> sv-16 prim-core collide-as) (the-as uint 512))
(set! (-> sv-16 collide-with) (the-as uint 16))
@ -1275,14 +1293,9 @@
(set! (-> sv-16 prim-core offense) 4)
(set! (-> sv-16 transform-index) 4)
(set-vector! (-> sv-16 local-sphere) 0.0 0.0 0.0 12288.0)
(let* ((a0-9 s0-0)
(t9-3 (method-of-object a0-9 dummy-46))
)
sv-16
(t9-3 a0-9)
)
(set-root-prim! s0-0 sv-16)
(set! (-> s0-0 nav-radius) (* 0.75 (-> s0-0 root-prim local-sphere w)))
(dummy-50 s0-0)
(backup-collide-with-as s0-0)
(set! (-> self root) s0-0)
)
(set! (-> self root trans quad) (-> arg0 quad))
@ -1408,17 +1421,23 @@
)
(set! (-> s2-0 dynam) (copy *standard-dynamics* 'process))
(set! (-> s2-0 reaction) default-collision-reaction)
(set! (-> s2-0 no-reaction) nothing)
(set!
(-> s2-0 no-reaction)
(the-as
(function collide-shape-moving collide-shape-intersect vector vector none)
nothing
)
)
(let ((s1-0 (new 'process 'collide-shape-prim-sphere s2-0 (the-as uint 0))))
(set! (-> s1-0 prim-core collide-as) (the-as uint 512))
(set! (-> s1-0 collide-with) (the-as uint 16))
(set! (-> s1-0 prim-core action) (the-as uint 1))
(set! (-> s1-0 prim-core offense) 4)
(set-vector! (-> s1-0 local-sphere) 0.0 0.0 0.0 12288.0)
(set-root-prim! s2-0 s1-0)
)
(dummy-46 s2-0)
(set! (-> s2-0 nav-radius) (* 0.75 (-> s2-0 root-prim local-sphere w)))
(dummy-50 s2-0)
(backup-collide-with-as s2-0)
(set! (-> self root) s2-0)
)
(set! (-> self root trans quad) (-> arg0 quad))

View File

@ -5628,7 +5628,13 @@
)
(set! (-> s4-0 dynam) (copy *standard-dynamics* 'process))
(set! (-> s4-0 reaction) default-collision-reaction)
(set! (-> s4-0 no-reaction) nothing)
(set!
(-> s4-0 no-reaction)
(the-as
(function collide-shape-moving collide-shape-intersect vector vector none)
nothing
)
)
(let
((s3-0 (new 'process 'collide-shape-prim-group s4-0 (the-as uint 19) 0)))
(set! (-> s3-0 prim-core collide-as) (the-as uint 2048))
@ -5636,7 +5642,7 @@
(set! (-> s3-0 prim-core action) (the-as uint 1))
(set! (-> s3-0 transform-index) 0)
(set-vector! (-> s3-0 local-sphere) 0.0 0.0 0.0 368640.0)
(dummy-46 s4-0)
(set-root-prim! s4-0 s3-0)
(let
((s2-0
(new
@ -5654,8 +5660,8 @@
(set! (-> s2-0 prim-core offense) 4)
(set! (-> s2-0 transform-index) 7)
(set-vector! (-> s2-0 local-sphere) 0.0 0.0 0.0 32768.0)
(append-prim s3-0 s2-0)
)
(dummy-28 s3-0)
(let
((s2-1
(new
@ -5673,8 +5679,8 @@
(set! (-> s2-1 prim-core offense) 4)
(set! (-> s2-1 transform-index) 6)
(set-vector! (-> s2-1 local-sphere) 0.0 0.0 0.0 57344.0)
(append-prim s3-0 s2-1)
)
(dummy-28 s3-0)
(let
((s2-2
(new
@ -5692,8 +5698,8 @@
(set! (-> s2-2 prim-core offense) 4)
(set! (-> s2-2 transform-index) 6)
(set-vector! (-> s2-2 local-sphere) 0.0 -57344.0 61440.0 73728.0)
(append-prim s3-0 s2-2)
)
(dummy-28 s3-0)
(let
((s2-3
(new
@ -5711,8 +5717,8 @@
(set! (-> s2-3 prim-core offense) 4)
(set! (-> s2-3 transform-index) 16)
(set-vector! (-> s2-3 local-sphere) 0.0 -20480.0 69632.0 237568.0)
(append-prim s3-0 s2-3)
)
(dummy-28 s3-0)
(let
((s2-4
(new
@ -5730,8 +5736,8 @@
(set! (-> s2-4 prim-core offense) 4)
(set! (-> s2-4 transform-index) 14)
(set-vector! (-> s2-4 local-sphere) 0.0 0.0 0.0 81920.0)
(append-prim s3-0 s2-4)
)
(dummy-28 s3-0)
(let
((s2-5
(new
@ -5749,8 +5755,8 @@
(set! (-> s2-5 prim-core offense) 4)
(set! (-> s2-5 transform-index) 39)
(set-vector! (-> s2-5 local-sphere) 0.0 0.0 0.0 69632.0)
(append-prim s3-0 s2-5)
)
(dummy-28 s3-0)
(let
((s2-6
(new
@ -5768,8 +5774,8 @@
(set! (-> s2-6 prim-core offense) 4)
(set! (-> s2-6 transform-index) 31)
(set-vector! (-> s2-6 local-sphere) 0.0 -57344.0 0.0 90112.0)
(append-prim s3-0 s2-6)
)
(dummy-28 s3-0)
(let
((s2-7
(new
@ -5787,8 +5793,8 @@
(set! (-> s2-7 prim-core offense) 4)
(set! (-> s2-7 transform-index) 30)
(set-vector! (-> s2-7 local-sphere) 0.0 24576.0 0.0 81920.0)
(append-prim s3-0 s2-7)
)
(dummy-28 s3-0)
(let
((s2-8
(new
@ -5806,8 +5812,8 @@
(set! (-> s2-8 prim-core offense) 4)
(set! (-> s2-8 transform-index) 57)
(set-vector! (-> s2-8 local-sphere) 0.0 0.0 0.0 81920.0)
(append-prim s3-0 s2-8)
)
(dummy-28 s3-0)
(let
((s2-9
(new
@ -5825,8 +5831,8 @@
(set! (-> s2-9 prim-core offense) 4)
(set! (-> s2-9 transform-index) 68)
(set-vector! (-> s2-9 local-sphere) 0.0 0.0 0.0 49152.0)
(append-prim s3-0 s2-9)
)
(dummy-28 s3-0)
(let
((s2-10
(new
@ -5844,8 +5850,8 @@
(set! (-> s2-10 prim-core offense) 4)
(set! (-> s2-10 transform-index) 4)
(set-vector! (-> s2-10 local-sphere) 0.0 24576.0 0.0 102400.0)
(append-prim s3-0 s2-10)
)
(dummy-28 s3-0)
(let
((s2-11
(new
@ -5863,8 +5869,8 @@
(set! (-> s2-11 prim-core offense) 4)
(set! (-> s2-11 transform-index) 77)
(set-vector! (-> s2-11 local-sphere) 0.0 0.0 0.0 73728.0)
(append-prim s3-0 s2-11)
)
(dummy-28 s3-0)
(let
((s2-12
(new
@ -5882,8 +5888,8 @@
(set! (-> s2-12 prim-core offense) 4)
(set! (-> s2-12 transform-index) 75)
(set-vector! (-> s2-12 local-sphere) 0.0 24576.0 0.0 81920.0)
(append-prim s3-0 s2-12)
)
(dummy-28 s3-0)
(let
((s2-13
(new
@ -5901,8 +5907,8 @@
(set! (-> s2-13 prim-core offense) 4)
(set! (-> s2-13 transform-index) 74)
(set-vector! (-> s2-13 local-sphere) 0.0 40960.0 0.0 73728.0)
(append-prim s3-0 s2-13)
)
(dummy-28 s3-0)
(let
((s2-14
(new
@ -5920,8 +5926,8 @@
(set! (-> s2-14 prim-core offense) 4)
(set! (-> s2-14 transform-index) 73)
(set-vector! (-> s2-14 local-sphere) 0.0 32768.0 0.0 61440.0)
(append-prim s3-0 s2-14)
)
(dummy-28 s3-0)
(let
((s2-15
(new
@ -5939,8 +5945,8 @@
(set! (-> s2-15 prim-core offense) 4)
(set! (-> s2-15 transform-index) 84)
(set-vector! (-> s2-15 local-sphere) 0.0 40960.0 -8192.0 98304.0)
(append-prim s3-0 s2-15)
)
(dummy-28 s3-0)
(let
((s2-16
(new
@ -5958,8 +5964,8 @@
(set! (-> s2-16 prim-core offense) 4)
(set! (-> s2-16 transform-index) 83)
(set-vector! (-> s2-16 local-sphere) 0.0 65536.0 0.0 73728.0)
(append-prim s3-0 s2-16)
)
(dummy-28 s3-0)
(let
((s2-17
(new
@ -5977,8 +5983,8 @@
(set! (-> s2-17 prim-core offense) 4)
(set! (-> s2-17 transform-index) 82)
(set-vector! (-> s2-17 local-sphere) 0.0 32768.0 0.0 61440.0)
(append-prim s3-0 s2-17)
)
(dummy-28 s3-0)
(let
((s2-18
(new
@ -5996,11 +6002,11 @@
(set! (-> s2-18 prim-core offense) 4)
(set! (-> s2-18 transform-index) 3)
(set-vector! (-> s2-18 local-sphere) 0.0 0.0 0.0 61440.0)
(append-prim s3-0 s2-18)
)
(dummy-28 s3-0)
)
(set! (-> s4-0 nav-radius) 4096.0)
(dummy-50 s4-0)
(backup-collide-with-as s4-0)
(set! (-> obj root-override) s4-0)
)
(process-drawable-from-entity! obj arg0)

View File

@ -129,7 +129,7 @@
:code
(behavior ()
(ja-channel-set! 0)
(dummy-48 (-> self root-override))
(clear-collide-with-as (-> self root-override))
(ja-post)
(sound-play-by-name
(static-sound-name "cool-balloon")
@ -246,10 +246,10 @@
(set! (-> s3-0 collide-with) (the-as uint 16))
(set! (-> s3-0 prim-core offense) 4)
(set-vector! (-> s3-0 local-sphere) 0.0 8192.0 0.0 8192.0)
(set-root-prim! s4-0 s3-0)
)
(dummy-46 s4-0)
(set! (-> s4-0 nav-radius) (* 0.75 (-> s4-0 root-prim local-sphere w)))
(dummy-50 s4-0)
(backup-collide-with-as s4-0)
(set! (-> obj root-override) s4-0)
)
(process-drawable-from-entity! obj arg0)
@ -508,7 +508,7 @@
(set! (-> s3-0 prim-core offense) 4)
(set! (-> s3-0 transform-index) 3)
(set-vector! (-> s3-0 local-sphere) 0.0 24576.0 0.0 40960.0)
(dummy-46 s4-0)
(set-root-prim! s4-0 s3-0)
(let ((s2-0 (new 'process 'collide-shape-prim-sphere s4-0 (the-as uint 0))))
(set! (-> s2-0 prim-core collide-as) (the-as uint 256))
(set! (-> s2-0 collide-with) (the-as uint 16))
@ -516,8 +516,8 @@
(set! (-> s2-0 prim-core offense) 4)
(set! (-> s2-0 transform-index) 3)
(set-vector! (-> s2-0 local-sphere) 0.0 8192.0 0.0 16384.0)
(append-prim s3-0 s2-0)
)
(dummy-28 s3-0)
(let ((s2-1 (new 'process 'collide-shape-prim-sphere s4-0 (the-as uint 0))))
(set! (-> s2-1 prim-core collide-as) (the-as uint 256))
(set! (-> s2-1 collide-with) (the-as uint 16))
@ -525,8 +525,8 @@
(set! (-> s2-1 prim-core offense) 4)
(set! (-> s2-1 transform-index) 3)
(set-vector! (-> s2-1 local-sphere) 0.0 20480.0 0.0 16384.0)
(append-prim s3-0 s2-1)
)
(dummy-28 s3-0)
(let ((s2-2 (new 'process 'collide-shape-prim-sphere s4-0 (the-as uint 0))))
(set! (-> s2-2 prim-core collide-as) (the-as uint 256))
(set! (-> s2-2 collide-with) (the-as uint 16))
@ -534,8 +534,8 @@
(set! (-> s2-2 prim-core offense) 4)
(set! (-> s2-2 transform-index) 3)
(set-vector! (-> s2-2 local-sphere) 0.0 32768.0 0.0 16384.0)
(append-prim s3-0 s2-2)
)
(dummy-28 s3-0)
(let ((s2-3 (new 'process 'collide-shape-prim-sphere s4-0 (the-as uint 0))))
(set! (-> s2-3 prim-core collide-as) (the-as uint 256))
(set! (-> s2-3 collide-with) (the-as uint 16))
@ -543,11 +543,11 @@
(set! (-> s2-3 prim-core offense) 4)
(set! (-> s2-3 transform-index) 3)
(set-vector! (-> s2-3 local-sphere) 0.0 45056.0 0.0 16384.0)
(append-prim s3-0 s2-3)
)
(dummy-28 s3-0)
)
(set! (-> s4-0 nav-radius) (* 0.75 (-> s4-0 root-prim local-sphere w)))
(dummy-50 s4-0)
(backup-collide-with-as s4-0)
(set! (-> obj root-override) s4-0)
)
(process-drawable-from-entity! obj arg0)
@ -817,7 +817,7 @@
:code
(behavior ()
(ja-channel-set! 0)
(dummy-48 (-> self root-override))
(clear-collide-with-as (-> self root-override))
(ja-post)
(sound-play-by-name
(static-sound-name "dcrate-break")
@ -915,10 +915,10 @@
(set! (-> s3-0 prim-core offense) 1)
(set! (-> s3-0 transform-index) 3)
(set-vector! (-> s3-0 local-sphere) 0.0 6553.6 0.0 13516.8)
(set-root-prim! s4-0 s3-0)
)
(dummy-46 s4-0)
(set! (-> s4-0 nav-radius) (* 0.75 (-> s4-0 root-prim local-sphere w)))
(dummy-50 s4-0)
(backup-collide-with-as s4-0)
(set! (-> obj root-override) s4-0)
)
(process-drawable-from-entity! obj arg0)

View File

@ -198,7 +198,7 @@
(-> self root-override trans)
(new 'static 'vector :y 8192.0 :w 1.0)
)
6
(pickup-type fuel-cell)
(the float (-> self entity extra perm task))
#f
self
@ -487,15 +487,21 @@
)
(set! (-> s4-0 dynam) (copy *standard-dynamics* 'process))
(set! (-> s4-0 reaction) default-collision-reaction)
(set! (-> s4-0 no-reaction) nothing)
(set!
(-> s4-0 no-reaction)
(the-as
(function collide-shape-moving collide-shape-intersect vector vector none)
nothing
)
)
(let ((s3-0 (new 'process 'collide-shape-prim-sphere s4-0 (the-as uint 0))))
(set! (-> s3-0 prim-core collide-as) (the-as uint 512))
(set! (-> s3-0 collide-with) (the-as uint 16))
(set-vector! (-> s3-0 local-sphere) 0.0 6144.0 0.0 6144.0)
(set-root-prim! s4-0 s3-0)
)
(dummy-46 s4-0)
(set! (-> s4-0 nav-radius) (* 0.75 (-> s4-0 root-prim local-sphere w)))
(dummy-50 s4-0)
(backup-collide-with-as s4-0)
(set! (-> obj root-override) s4-0)
)
(process-drawable-from-entity! obj arg0)

View File

@ -231,7 +231,13 @@
)
(set! (-> s4-0 dynam) (copy *standard-dynamics* 'process))
(set! (-> s4-0 reaction) default-collision-reaction)
(set! (-> s4-0 no-reaction) nothing)
(set!
(-> s4-0 no-reaction)
(the-as
(function collide-shape-moving collide-shape-intersect vector vector none)
nothing
)
)
(let
((s3-0
(new
@ -249,10 +255,10 @@
(set! (-> s3-0 prim-core offense) 4)
(set! (-> s3-0 transform-index) 0)
(set-vector! (-> s3-0 local-sphere) 0.0 3072.0 0.0 6963.2)
(set-root-prim! s4-0 s3-0)
)
(dummy-46 s4-0)
(set! (-> s4-0 nav-radius) (* 0.75 (-> s4-0 root-prim local-sphere w)))
(dummy-50 s4-0)
(backup-collide-with-as s4-0)
(set! (-> obj root) s4-0)
)
(process-drawable-from-entity! obj arg0)

View File

@ -2153,7 +2153,7 @@
(set-setting! *setting-control* self 'ambient-volume 'rel 50.0 0)
(send-event *target* 'reset-pickup 'eco)
(ja-channel-set! 0)
(dummy-48 (-> self root-override))
(clear-collide-with-as (-> self root-override))
(let ((gp-0 (get-process *default-dead-pool* process #x4000)))
(when gp-0
(let ((t9-5 (method-of-type process activate)))
@ -2206,7 +2206,7 @@
(set! (-> *camera-other-fov* data) (-> *camera-combiner* fov))
(set! (-> *camera-other-trans* quad) (-> *camera-combiner* trans quad))
(set! (-> *camera-other-root* quad) (-> self root-override trans quad))
(dummy-49 (-> self root-override))
(restore-collide-with-as (-> self root-override))
(send-event *camera* 'blend-from-as-fixed)
(send-event *camera* 'change-state *camera-base-mode* 0)
(send-event *camera* 'clear-entity)
@ -2777,7 +2777,7 @@
(set! (-> s4-0 prim-core action) (the-as uint 1))
(set! (-> s4-0 prim-core offense) 4)
(set-vector! (-> s4-0 local-sphere) 6144.0 0.0 4096.0 14336.0)
(dummy-46 s5-0)
(set-root-prim! s5-0 s4-0)
(let ((s2-0 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0))))
(set! (-> s2-0 prim-core collide-as) (the-as uint 256))
(set! (-> s2-0 collide-with) (the-as uint 16))
@ -2785,8 +2785,8 @@
(set! (-> s2-0 prim-core offense) 4)
(set! (-> s2-0 transform-index) arg0)
(set-vector! (-> s2-0 local-sphere) 0.0 0.0 0.0 6553.6)
(append-prim s4-0 s2-0)
)
(dummy-28 s4-0)
(let ((s3-1 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0))))
(set! (-> s3-1 prim-core collide-as) (the-as uint 256))
(set! (-> s3-1 collide-with) (the-as uint 16))
@ -2794,11 +2794,11 @@
(set! (-> s3-1 prim-core offense) 4)
(set! (-> s3-1 transform-index) 57)
(set-vector! (-> s3-1 local-sphere) 0.0 4096.0 0.0 4096.0)
(append-prim s4-0 s3-1)
)
(dummy-28 s4-0)
)
(set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w)))
(dummy-50 s5-0)
(backup-collide-with-as s5-0)
(set! (-> obj root-override) s5-0)
)
0

View File

@ -647,32 +647,38 @@ nav-enemy-default-event-handler
)
(set! (-> s5-0 dynam) (copy *standard-dynamics* 'process))
(set! (-> s5-0 reaction) default-collision-reaction)
(set! (-> s5-0 no-reaction) nothing)
(set!
(-> s5-0 no-reaction)
(the-as
(function collide-shape-moving collide-shape-intersect vector vector none)
nothing
)
)
(let ((s4-0 (new 'process 'collide-shape-prim-group s5-0 (the-as uint 2) 0)))
(set! (-> s4-0 prim-core collide-as) (the-as uint 256))
(set! (-> s4-0 collide-with) (the-as uint 16))
(set! (-> s4-0 prim-core action) (the-as uint 1))
(set-vector! (-> s4-0 local-sphere) 0.0 4096.0 0.0 10240.0)
(dummy-46 s5-0)
(set-root-prim! s5-0 s4-0)
(let ((s3-0 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 3))))
(set! (-> s3-0 prim-core collide-as) (the-as uint 256))
(set! (-> s3-0 collide-with) (the-as uint 16))
(set! (-> s3-0 prim-core action) (the-as uint 1))
(set! (-> s3-0 prim-core offense) 1)
(set-vector! (-> s3-0 local-sphere) 0.0 4096.0 0.0 4096.0)
(append-prim s4-0 s3-0)
)
(dummy-28 s4-0)
(let ((s3-1 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 3))))
(set! (-> s3-1 prim-core collide-as) (the-as uint 256))
(set! (-> s3-1 collide-with) (the-as uint 16))
(set! (-> s3-1 prim-core action) (the-as uint 1))
(set! (-> s3-1 prim-core offense) 1)
(set-vector! (-> s3-1 local-sphere) 0.0 6963.2 0.0 4096.0)
(append-prim s4-0 s3-1)
)
(dummy-28 s4-0)
)
(set! (-> s5-0 nav-radius) 6144.0)
(dummy-50 s5-0)
(backup-collide-with-as s5-0)
(set! (-> s5-0 max-iteration-count) (the-as uint 2))
(set! (-> obj collide-info) s5-0)
)

View File

@ -72,10 +72,10 @@
)
)
(vector-! gp-0 (-> self root-override trans) s5-0)
)
(when (< (-> self path-pos) 0.9)
(TODO-RENAME-28 (-> *target* control))
(send-event *target* 'reset-height)
(when (< (-> self path-pos) 0.9)
(TODO-RENAME-28 (-> *target* control) gp-0)
(send-event *target* 'reset-height)
)
)
(if
(and

View File

@ -169,7 +169,13 @@
)
(set! (-> s4-0 dynam) (copy *standard-dynamics* 'process))
(set! (-> s4-0 reaction) default-collision-reaction)
(set! (-> s4-0 no-reaction) nothing)
(set!
(-> s4-0 no-reaction)
(the-as
(function collide-shape-moving collide-shape-intersect vector vector none)
nothing
)
)
(let
((s3-0
(new
@ -185,10 +191,10 @@
(set! (-> s3-0 collide-with) (the-as uint 16))
(set! (-> s3-0 transform-index) 6)
(set-vector! (-> s3-0 local-sphere) 0.0 0.0 0.0 19251.2)
(set-root-prim! s4-0 s3-0)
)
(dummy-46 s4-0)
(set! (-> s4-0 nav-radius) (* 0.75 (-> s4-0 root-prim local-sphere w)))
(dummy-50 s4-0)
(backup-collide-with-as s4-0)
(set! (-> obj root-override) s4-0)
)
(process-drawable-from-entity! obj arg0)
@ -395,7 +401,13 @@
)
(set! (-> s4-0 dynam) (copy *standard-dynamics* 'process))
(set! (-> s4-0 reaction) default-collision-reaction)
(set! (-> s4-0 no-reaction) nothing)
(set!
(-> s4-0 no-reaction)
(the-as
(function collide-shape-moving collide-shape-intersect vector vector none)
nothing
)
)
(dummy-29 s4-0 1)
(let ((s3-0 (new 'process 'collide-shape-prim-group s4-0 (the-as uint 1) 0)))
(set! (-> s3-0 prim-core collide-as) (the-as uint 2048))
@ -403,7 +415,7 @@
(set! (-> s3-0 prim-core action) (the-as uint 3))
(set! (-> s3-0 transform-index) 0)
(set-vector! (-> s3-0 local-sphere) 0.0 36044.8 0.0 47104.0)
(dummy-46 s4-0)
(set-root-prim! s4-0 s3-0)
(let
((s2-0
(new
@ -421,11 +433,11 @@
(set! (-> s2-0 prim-core offense) 4)
(set! (-> s2-0 transform-index) 3)
(set-vector! (-> s2-0 local-sphere) 39321.6 0.0 0.0 43417.6)
(append-prim s3-0 s2-0)
)
(dummy-28 s3-0)
)
(set! (-> s4-0 nav-radius) (* 0.75 (-> s4-0 root-prim local-sphere w)))
(dummy-50 s4-0)
(backup-collide-with-as s4-0)
(set! (-> obj root-override) s4-0)
)
(process-drawable-from-entity! obj arg0)
@ -555,14 +567,20 @@
)
(set! (-> s4-0 dynam) (copy *standard-dynamics* 'process))
(set! (-> s4-0 reaction) default-collision-reaction)
(set! (-> s4-0 no-reaction) nothing)
(set!
(-> s4-0 no-reaction)
(the-as
(function collide-shape-moving collide-shape-intersect vector vector none)
nothing
)
)
(dummy-29 s4-0 1)
(let ((s3-0 (new 'process 'collide-shape-prim-group s4-0 (the-as uint 3) 0)))
(set! (-> s3-0 prim-core collide-as) (the-as uint 2048))
(set! (-> s3-0 collide-with) (the-as uint 16))
(set! (-> s3-0 prim-core action) (the-as uint 3))
(set-vector! (-> s3-0 local-sphere) 0.0 40960.0 0.0 49152.0)
(dummy-46 s4-0)
(set-root-prim! s4-0 s3-0)
(let
((s2-0
(new
@ -580,8 +598,8 @@
(set! (-> s2-0 prim-core offense) 4)
(set! (-> s2-0 transform-index) 4)
(set-vector! (-> s2-0 local-sphere) 0.0 0.0 0.0 36864.0)
(append-prim s3-0 s2-0)
)
(dummy-28 s3-0)
(let
((s2-1
(new
@ -599,8 +617,8 @@
(set! (-> s2-1 prim-core offense) 4)
(set! (-> s2-1 transform-index) 3)
(set-vector! (-> s2-1 local-sphere) 40960.0 0.0 0.0 24576.0)
(append-prim s3-0 s2-1)
)
(dummy-28 s3-0)
(let
((s2-2
(new
@ -618,11 +636,11 @@
(set! (-> s2-2 prim-core offense) 4)
(set! (-> s2-2 transform-index) 3)
(set-vector! (-> s2-2 local-sphere) 40960.0 0.0 0.0 24576.0)
(append-prim s3-0 s2-2)
)
(dummy-28 s3-0)
)
(set! (-> s4-0 nav-radius) (* 0.75 (-> s4-0 root-prim local-sphere w)))
(dummy-50 s4-0)
(backup-collide-with-as s4-0)
(set! (-> obj root-override) s4-0)
)
(process-drawable-from-entity! obj arg0)
@ -762,7 +780,13 @@
)
(set! (-> s4-0 dynam) (copy *standard-dynamics* 'process))
(set! (-> s4-0 reaction) default-collision-reaction)
(set! (-> s4-0 no-reaction) nothing)
(set!
(-> s4-0 no-reaction)
(the-as
(function collide-shape-moving collide-shape-intersect vector vector none)
nothing
)
)
(dummy-29 s4-0 1)
(let
((s3-0
@ -781,10 +805,10 @@
(set! (-> s3-0 prim-core offense) 4)
(set! (-> s3-0 transform-index) 3)
(set-vector! (-> s3-0 local-sphere) 24576.0 0.0 0.0 20480.0)
(set-root-prim! s4-0 s3-0)
)
(dummy-46 s4-0)
(set! (-> s4-0 nav-radius) (* 0.75 (-> s4-0 root-prim local-sphere w)))
(dummy-50 s4-0)
(backup-collide-with-as s4-0)
(set! (-> obj root-override) s4-0)
)
(process-drawable-from-entity! obj arg0)
@ -1221,12 +1245,12 @@
(a0-2 (-> (the-as touching-shapes-entry gp-0) head))
(s5-0 (-> self root-override))
)
(touched-prim
(get-touched-prim
a0-2
s5-0
(the-as touching-shapes-entry gp-0)
(the-as touching-prims-entry gp-0)
)
((method-of-type touching-shapes-entry touched-shape)
((method-of-type touching-shapes-entry get-touched-shape)
(the-as touching-shapes-entry gp-0)
s5-0
)
@ -1336,7 +1360,13 @@
)
(set! (-> s4-0 dynam) (copy *standard-dynamics* 'process))
(set! (-> s4-0 reaction) default-collision-reaction)
(set! (-> s4-0 no-reaction) nothing)
(set!
(-> s4-0 no-reaction)
(the-as
(function collide-shape-moving collide-shape-intersect vector vector none)
nothing
)
)
(dummy-29 s4-0 1)
(let
((s3-0 (new 'process 'collide-shape-prim-group s4-0 (the-as uint 16) 0)))
@ -1345,7 +1375,7 @@
(set! (-> s3-0 prim-core action) (the-as uint 3))
(set! (-> s3-0 transform-index) 0)
(set-vector! (-> s3-0 local-sphere) 0.0 0.0 0.0 81920.0)
(dummy-46 s4-0)
(set-root-prim! s4-0 s3-0)
(let
((s2-0
(new
@ -1363,8 +1393,8 @@
(set! (-> s2-0 prim-core offense) 4)
(set! (-> s2-0 transform-index) 5)
(set-vector! (-> s2-0 local-sphere) -6144.0 0.0 0.0 17203.2)
(append-prim s3-0 s2-0)
)
(dummy-28 s3-0)
(let
((s2-1
(new
@ -1382,8 +1412,8 @@
(set! (-> s2-1 prim-core offense) 4)
(set! (-> s2-1 transform-index) 7)
(set-vector! (-> s2-1 local-sphere) 6144.0 0.0 0.0 17203.2)
(append-prim s3-0 s2-1)
)
(dummy-28 s3-0)
(let
((s2-2
(new
@ -1401,8 +1431,8 @@
(set! (-> s2-2 prim-core offense) 4)
(set! (-> s2-2 transform-index) 9)
(set-vector! (-> s2-2 local-sphere) -6144.0 0.0 0.0 17203.2)
(append-prim s3-0 s2-2)
)
(dummy-28 s3-0)
(let
((s2-3
(new
@ -1420,8 +1450,8 @@
(set! (-> s2-3 prim-core offense) 4)
(set! (-> s2-3 transform-index) 11)
(set-vector! (-> s2-3 local-sphere) 6144.0 0.0 0.0 17203.2)
(append-prim s3-0 s2-3)
)
(dummy-28 s3-0)
(let
((s2-4
(new
@ -1439,8 +1469,8 @@
(set! (-> s2-4 prim-core offense) 4)
(set! (-> s2-4 transform-index) 13)
(set-vector! (-> s2-4 local-sphere) -6144.0 0.0 0.0 17203.2)
(append-prim s3-0 s2-4)
)
(dummy-28 s3-0)
(let
((s2-5
(new
@ -1458,8 +1488,8 @@
(set! (-> s2-5 prim-core offense) 4)
(set! (-> s2-5 transform-index) 15)
(set-vector! (-> s2-5 local-sphere) 6144.0 0.0 0.0 17203.2)
(append-prim s3-0 s2-5)
)
(dummy-28 s3-0)
(let
((s2-6
(new
@ -1477,8 +1507,8 @@
(set! (-> s2-6 prim-core offense) 4)
(set! (-> s2-6 transform-index) 17)
(set-vector! (-> s2-6 local-sphere) -6144.0 0.0 0.0 17203.2)
(append-prim s3-0 s2-6)
)
(dummy-28 s3-0)
(let
((s2-7
(new
@ -1496,8 +1526,8 @@
(set! (-> s2-7 prim-core offense) 4)
(set! (-> s2-7 transform-index) 19)
(set-vector! (-> s2-7 local-sphere) 6144.0 0.0 0.0 17203.2)
(append-prim s3-0 s2-7)
)
(dummy-28 s3-0)
(let
((s2-8
(new
@ -1515,8 +1545,8 @@
(set! (-> s2-8 prim-core offense) 4)
(set! (-> s2-8 transform-index) 4)
(set-vector! (-> s2-8 local-sphere) -4096.0 0.0 0.0 9011.2)
(append-prim s3-0 s2-8)
)
(dummy-28 s3-0)
(let
((s2-9
(new
@ -1534,8 +1564,8 @@
(set! (-> s2-9 prim-core offense) 4)
(set! (-> s2-9 transform-index) 6)
(set-vector! (-> s2-9 local-sphere) 4096.0 0.0 0.0 9011.2)
(append-prim s3-0 s2-9)
)
(dummy-28 s3-0)
(let
((s2-10
(new
@ -1553,8 +1583,8 @@
(set! (-> s2-10 prim-core offense) 4)
(set! (-> s2-10 transform-index) 8)
(set-vector! (-> s2-10 local-sphere) -4096.0 0.0 0.0 9011.2)
(append-prim s3-0 s2-10)
)
(dummy-28 s3-0)
(let
((s2-11
(new
@ -1572,8 +1602,8 @@
(set! (-> s2-11 prim-core offense) 4)
(set! (-> s2-11 transform-index) 10)
(set-vector! (-> s2-11 local-sphere) 4096.0 0.0 0.0 9011.2)
(append-prim s3-0 s2-11)
)
(dummy-28 s3-0)
(let
((s2-12
(new
@ -1591,8 +1621,8 @@
(set! (-> s2-12 prim-core offense) 4)
(set! (-> s2-12 transform-index) 12)
(set-vector! (-> s2-12 local-sphere) -4096.0 0.0 0.0 9011.2)
(append-prim s3-0 s2-12)
)
(dummy-28 s3-0)
(let
((s2-13
(new
@ -1610,8 +1640,8 @@
(set! (-> s2-13 prim-core offense) 4)
(set! (-> s2-13 transform-index) 14)
(set-vector! (-> s2-13 local-sphere) 4096.0 0.0 0.0 9011.2)
(append-prim s3-0 s2-13)
)
(dummy-28 s3-0)
(let
((s2-14
(new
@ -1629,8 +1659,8 @@
(set! (-> s2-14 prim-core offense) 4)
(set! (-> s2-14 transform-index) 16)
(set-vector! (-> s2-14 local-sphere) -4096.0 0.0 0.0 9011.2)
(append-prim s3-0 s2-14)
)
(dummy-28 s3-0)
(let
((s2-15
(new
@ -1648,11 +1678,11 @@
(set! (-> s2-15 prim-core offense) 4)
(set! (-> s2-15 transform-index) 18)
(set-vector! (-> s2-15 local-sphere) 4096.0 0.0 0.0 9011.2)
(append-prim s3-0 s2-15)
)
(dummy-28 s3-0)
)
(set! (-> s4-0 nav-radius) (* 0.75 (-> s4-0 root-prim local-sphere w)))
(dummy-50 s4-0)
(backup-collide-with-as s4-0)
(set! (-> obj root-override) s4-0)
)
(process-drawable-from-entity! obj arg0)
@ -1852,10 +1882,10 @@
(set! (-> s3-0 prim-core offense) 4)
(set! (-> s3-0 transform-index) 0)
(set-vector! (-> s3-0 local-sphere) 0.0 0.0 0.0 24576.0)
(set-root-prim! s4-0 s3-0)
)
(dummy-46 s4-0)
(set! (-> s4-0 nav-radius) (* 0.75 (-> s4-0 root-prim local-sphere w)))
(dummy-50 s4-0)
(backup-collide-with-as s4-0)
(set! (-> obj root-override) s4-0)
)
(process-drawable-from-entity! obj arg0)
@ -1925,10 +1955,10 @@
(set! (-> s4-0 prim-core offense) 4)
(set! (-> s4-0 transform-index) 2)
(set-vector! (-> s4-0 local-sphere) 0.0 0.0 0.0 14336.0)
(set-root-prim! s5-0 s4-0)
)
(dummy-46 s5-0)
(set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w)))
(dummy-50 s5-0)
(backup-collide-with-as s5-0)
(set! (-> obj root-override) s5-0)
)
0
@ -2025,14 +2055,20 @@
)
(set! (-> s4-0 dynam) (copy *standard-dynamics* 'process))
(set! (-> s4-0 reaction) default-collision-reaction)
(set! (-> s4-0 no-reaction) nothing)
(set!
(-> s4-0 no-reaction)
(the-as
(function collide-shape-moving collide-shape-intersect vector vector none)
nothing
)
)
(let ((s3-0 (new 'process 'collide-shape-prim-group s4-0 (the-as uint 2) 0)))
(set! (-> s3-0 prim-core collide-as) (the-as uint 2048))
(set! (-> s3-0 collide-with) (the-as uint 16))
(set! (-> s3-0 prim-core action) (the-as uint 3))
(set! (-> s3-0 transform-index) 0)
(set-vector! (-> s3-0 local-sphere) -32768.0 -8192.0 0.0 32768.0)
(dummy-46 s4-0)
(set-root-prim! s4-0 s3-0)
(let
((s2-0
(new
@ -2050,8 +2086,8 @@
(set! (-> s2-0 prim-core offense) 4)
(set! (-> s2-0 transform-index) 4)
(set-vector! (-> s2-0 local-sphere) 8192.0 0.0 0.0 20480.0)
(append-prim s3-0 s2-0)
)
(dummy-28 s3-0)
(let
((s2-1
(new
@ -2069,12 +2105,12 @@
(set! (-> s2-1 prim-core offense) 4)
(set! (-> s2-1 transform-index) 4)
(set-vector! (-> s2-1 local-sphere) 36864.0 0.0 0.0 20480.0)
(dummy-28 s3-0)
(append-prim s3-0 s2-1)
(set! (-> obj back-prim) s2-1)
)
)
(set! (-> s4-0 nav-radius) (* 0.75 (-> s4-0 root-prim local-sphere w)))
(dummy-50 s4-0)
(backup-collide-with-as s4-0)
(set! (-> obj root) s4-0)
)
(process-drawable-from-entity! obj arg0)

View File

@ -597,17 +597,23 @@ nav-enemy-default-event-handler
)
(set! (-> s4-0 dynam) (copy *standard-dynamics* 'process))
(set! (-> s4-0 reaction) default-collision-reaction)
(set! (-> s4-0 no-reaction) nothing)
(set!
(-> s4-0 no-reaction)
(the-as
(function collide-shape-moving collide-shape-intersect vector vector none)
nothing
)
)
(let ((s3-0 (new 'process 'collide-shape-prim-sphere s4-0 (the-as uint 3))))
(set! (-> s3-0 prim-core collide-as) (the-as uint 256))
(set! (-> s3-0 collide-with) (the-as uint 16))
(set! (-> s3-0 prim-core action) (the-as uint 1))
(set! (-> s3-0 prim-core offense) 1)
(set-vector! (-> s3-0 local-sphere) 0.0 3276.8 0.0 2457.6)
(set-root-prim! s4-0 s3-0)
)
(dummy-46 s4-0)
(set! (-> s4-0 nav-radius) (* 0.75 (-> s4-0 root-prim local-sphere w)))
(dummy-50 s4-0)
(backup-collide-with-as s4-0)
(set! (-> obj collide-info) s4-0)
)
(process-drawable-from-entity! obj arg0)

View File

@ -946,7 +946,7 @@ junglesnake-default-event-handler
:code
(behavior ()
(logclear! (-> self mask) (process-mask actor-pause))
(dummy-48 (-> self root-override))
(clear-collide-with-as (-> self root-override))
(ja-channel-push! 1 45)
(let ((a0-3 (-> self skel root-channel 0)))
(set!
@ -1114,7 +1114,7 @@ junglesnake-default-event-handler
(set! (-> s3-0 collide-with) (the-as uint 16))
(set! (-> s3-0 prim-core action) (the-as uint 1))
(set-vector! (-> s3-0 local-sphere) 0.0 16384.0 0.0 30720.0)
(dummy-46 s4-0)
(set-root-prim! s4-0 s3-0)
(let ((s2-0 (new 'process 'collide-shape-prim-sphere s4-0 (the-as uint 1))))
(set! (-> s2-0 prim-core collide-as) (the-as uint 256))
(set! (-> s2-0 collide-with) (the-as uint 16))
@ -1122,8 +1122,8 @@ junglesnake-default-event-handler
(set! (-> s2-0 prim-core offense) 1)
(set! (-> s2-0 transform-index) 25)
(set-vector! (-> s2-0 local-sphere) 0.0 2048.0 0.0 4096.0)
(append-prim s3-0 s2-0)
)
(dummy-28 s3-0)
(let ((s2-1 (new 'process 'collide-shape-prim-sphere s4-0 (the-as uint 0))))
(set! (-> s2-1 prim-core collide-as) (the-as uint 256))
(set! (-> s2-1 collide-with) (the-as uint 16))
@ -1131,8 +1131,8 @@ junglesnake-default-event-handler
(set! (-> s2-1 prim-core offense) 1)
(set! (-> s2-1 transform-index) 21)
(set-vector! (-> s2-1 local-sphere) 0.0 0.0 0.0 3276.8)
(append-prim s3-0 s2-1)
)
(dummy-28 s3-0)
(let ((s2-2 (new 'process 'collide-shape-prim-sphere s4-0 (the-as uint 0))))
(set! (-> s2-2 prim-core collide-as) (the-as uint 256))
(set! (-> s2-2 collide-with) (the-as uint 16))
@ -1140,8 +1140,8 @@ junglesnake-default-event-handler
(set! (-> s2-2 prim-core offense) 1)
(set! (-> s2-2 transform-index) 20)
(set-vector! (-> s2-2 local-sphere) 0.0 0.0 0.0 3276.8)
(append-prim s3-0 s2-2)
)
(dummy-28 s3-0)
(let ((s2-3 (new 'process 'collide-shape-prim-sphere s4-0 (the-as uint 0))))
(set! (-> s2-3 prim-core collide-as) (the-as uint 256))
(set! (-> s2-3 collide-with) (the-as uint 16))
@ -1149,8 +1149,8 @@ junglesnake-default-event-handler
(set! (-> s2-3 prim-core offense) 1)
(set! (-> s2-3 transform-index) 19)
(set-vector! (-> s2-3 local-sphere) 0.0 0.0 0.0 3276.8)
(append-prim s3-0 s2-3)
)
(dummy-28 s3-0)
(let ((s2-4 (new 'process 'collide-shape-prim-sphere s4-0 (the-as uint 0))))
(set! (-> s2-4 prim-core collide-as) (the-as uint 256))
(set! (-> s2-4 collide-with) (the-as uint 16))
@ -1158,8 +1158,8 @@ junglesnake-default-event-handler
(set! (-> s2-4 prim-core offense) 1)
(set! (-> s2-4 transform-index) 18)
(set-vector! (-> s2-4 local-sphere) 0.0 0.0 0.0 3276.8)
(append-prim s3-0 s2-4)
)
(dummy-28 s3-0)
(let ((s2-5 (new 'process 'collide-shape-prim-sphere s4-0 (the-as uint 0))))
(set! (-> s2-5 prim-core collide-as) (the-as uint 256))
(set! (-> s2-5 collide-with) (the-as uint 16))
@ -1167,8 +1167,8 @@ junglesnake-default-event-handler
(set! (-> s2-5 prim-core offense) 1)
(set! (-> s2-5 transform-index) 17)
(set-vector! (-> s2-5 local-sphere) 0.0 0.0 0.0 3276.8)
(append-prim s3-0 s2-5)
)
(dummy-28 s3-0)
(let ((s2-6 (new 'process 'collide-shape-prim-sphere s4-0 (the-as uint 0))))
(set! (-> s2-6 prim-core collide-as) (the-as uint 256))
(set! (-> s2-6 collide-with) (the-as uint 16))
@ -1176,8 +1176,8 @@ junglesnake-default-event-handler
(set! (-> s2-6 prim-core offense) 1)
(set! (-> s2-6 transform-index) 16)
(set-vector! (-> s2-6 local-sphere) 0.0 0.0 0.0 3276.8)
(append-prim s3-0 s2-6)
)
(dummy-28 s3-0)
(let ((s2-7 (new 'process 'collide-shape-prim-sphere s4-0 (the-as uint 0))))
(set! (-> s2-7 prim-core collide-as) (the-as uint 256))
(set! (-> s2-7 collide-with) (the-as uint 16))
@ -1185,8 +1185,8 @@ junglesnake-default-event-handler
(set! (-> s2-7 prim-core offense) 1)
(set! (-> s2-7 transform-index) 15)
(set-vector! (-> s2-7 local-sphere) 0.0 0.0 0.0 3276.8)
(append-prim s3-0 s2-7)
)
(dummy-28 s3-0)
(let ((s2-8 (new 'process 'collide-shape-prim-sphere s4-0 (the-as uint 0))))
(set! (-> s2-8 prim-core collide-as) (the-as uint 256))
(set! (-> s2-8 collide-with) (the-as uint 16))
@ -1194,11 +1194,11 @@ junglesnake-default-event-handler
(set! (-> s2-8 prim-core offense) 1)
(set! (-> s2-8 transform-index) 14)
(set-vector! (-> s2-8 local-sphere) 0.0 0.0 0.0 3276.8)
(append-prim s3-0 s2-8)
)
(dummy-28 s3-0)
)
(set! (-> s4-0 nav-radius) (* 0.75 (-> s4-0 root-prim local-sphere w)))
(dummy-50 s4-0)
(backup-collide-with-as s4-0)
(set! (-> obj root-override) s4-0)
)
(process-drawable-from-entity! obj arg0)

View File

@ -588,17 +588,23 @@
)
(set! (-> s5-0 dynam) (copy *standard-dynamics* 'process))
(set! (-> s5-0 reaction) default-collision-reaction)
(set! (-> s5-0 no-reaction) nothing)
(set!
(-> s5-0 no-reaction)
(the-as
(function collide-shape-moving collide-shape-intersect vector vector none)
nothing
)
)
(let ((s4-0 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 3))))
(set! (-> s4-0 prim-core collide-as) (the-as uint 256))
(set! (-> s4-0 collide-with) (the-as uint 16))
(set! (-> s4-0 prim-core action) (the-as uint 1))
(set! (-> s4-0 prim-core offense) 1)
(set-vector! (-> s4-0 local-sphere) 0.0 4096.0 0.0 4096.0)
(set-root-prim! s5-0 s4-0)
)
(dummy-46 s5-0)
(set! (-> s5-0 nav-radius) 6144.0)
(dummy-50 s5-0)
(backup-collide-with-as s5-0)
(set! (-> s5-0 max-iteration-count) (the-as uint 2))
(set! (-> obj collide-info) s5-0)
)

View File

@ -630,7 +630,13 @@
)
(set! (-> s4-0 dynam) (copy *standard-dynamics* 'process))
(set! (-> s4-0 reaction) default-collision-reaction)
(set! (-> s4-0 no-reaction) nothing)
(set!
(-> s4-0 no-reaction)
(the-as
(function collide-shape-moving collide-shape-intersect vector vector none)
nothing
)
)
(dummy-29 s4-0 1)
(let
((s3-0
@ -649,10 +655,10 @@
(set! (-> s3-0 prim-core offense) 4)
(set! (-> s3-0 transform-index) 4)
(set-vector! (-> s3-0 local-sphere) 0.0 0.0 -7372.8 16384.0)
(set-root-prim! s4-0 s3-0)
)
(dummy-46 s4-0)
(set! (-> s4-0 nav-radius) (* 0.75 (-> s4-0 root-prim local-sphere w)))
(dummy-50 s4-0)
(backup-collide-with-as s4-0)
(set! (-> obj root-override) s4-0)
)
(process-drawable-from-entity! obj arg0)
@ -675,7 +681,7 @@
(-> obj root-override trans)
(new 'static 'vector :y 6144.0 :w 1.0)
)
6
(pickup-type fuel-cell)
(the float (-> obj entity extra perm task))
#f
obj
@ -724,10 +730,10 @@
(set! (-> s4-0 prim-core offense) 4)
(set! (-> s4-0 transform-index) 0)
(set-vector! (-> s4-0 local-sphere) 0.0 0.0 0.0 16384.0)
(set-root-prim! s5-0 s4-0)
)
(dummy-46 s5-0)
(set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w)))
(dummy-50 s5-0)
(backup-collide-with-as s5-0)
(set! (-> obj root-override) s5-0)
)
0

View File

@ -213,7 +213,13 @@
)
(set! (-> s4-0 dynam) (copy *standard-dynamics* 'process))
(set! (-> s4-0 reaction) default-collision-reaction)
(set! (-> s4-0 no-reaction) nothing)
(set!
(-> s4-0 no-reaction)
(the-as
(function collide-shape-moving collide-shape-intersect vector vector none)
nothing
)
)
(dummy-29 s4-0 1)
(let
((s3-0
@ -232,10 +238,10 @@
(set! (-> s3-0 prim-core offense) 4)
(set! (-> s3-0 transform-index) 3)
(set-vector! (-> s3-0 local-sphere) 0.0 0.0 0.0 11468.8)
(set-root-prim! s4-0 s3-0)
)
(dummy-46 s4-0)
(set! (-> s4-0 nav-radius) (* 0.75 (-> s4-0 root-prim local-sphere w)))
(dummy-50 s4-0)
(backup-collide-with-as s4-0)
(set! (-> obj root-override) s4-0)
)
(process-drawable-from-entity! obj arg0)

View File

@ -232,7 +232,7 @@
)
)
;; WARN: rewrite_to_get_var got a none typed variable. Is there unreachable code?
;; WARN: rewrite_to_get_var got a none typed variable. Is there unreachable code? [OP: 7]
(defbehavior
baby-spider-default-event-handler baby-spider
((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
@ -1076,17 +1076,23 @@ baby-spider-default-event-handler
)
(set! (-> s5-0 dynam) (copy *standard-dynamics* 'process))
(set! (-> s5-0 reaction) default-collision-reaction)
(set! (-> s5-0 no-reaction) nothing)
(set!
(-> s5-0 no-reaction)
(the-as
(function collide-shape-moving collide-shape-intersect vector vector none)
nothing
)
)
(let ((s4-0 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 3))))
(set! (-> s4-0 prim-core collide-as) (the-as uint 256))
(set! (-> s4-0 collide-with) (the-as uint 16))
(set! (-> s4-0 prim-core action) (the-as uint 1))
(set! (-> s4-0 prim-core offense) 2)
(set-vector! (-> s4-0 local-sphere) 0.0 0.0 0.0 4096.0)
(set-root-prim! s5-0 s4-0)
)
(dummy-46 s5-0)
(set! (-> s5-0 nav-radius) 4096.0)
(dummy-50 s5-0)
(backup-collide-with-as s5-0)
(set! (-> obj collide-info) s5-0)
)
0

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