mirror of
https://github.com/open-goal/jak-project
synced 2026-07-09 06:53:45 -04:00
[decomp2] game-info, game-task and task-control (#1884)
And everything else needed for them! A couple functions are bad currently. - fixes #1929 - untested on linux - fixes #1924 - now you need to type `,` before a lambda you want to put in a pair. - fix debugger symbol table in jak 2 - made the decompiler output `(meters 2)` instead of `(meters 2.0)` - fixed a bug with the bitfield enum special -1 case - made bad game text decomp not exit the decompiler - added `editable-player` and `script`
This commit is contained in:
@@ -84,6 +84,20 @@
|
||||
"name": "Game - Runtime (boot no debug)",
|
||||
"args": ["-boot", "-fakeiso", "-v"]
|
||||
},
|
||||
{
|
||||
"type": "default",
|
||||
"project": "CMakeLists.txt",
|
||||
"projectTarget": "gk.exe (bin\\gk.exe)",
|
||||
"name": "Game 2 - Runtime (boot)",
|
||||
"args": ["-boot", "-fakeiso", "-debug", "-v", "-jak2"]
|
||||
},
|
||||
{
|
||||
"type": "default",
|
||||
"project": "CMakeLists.txt",
|
||||
"projectTarget": "gk.exe (bin\\gk.exe)",
|
||||
"name": "Game 2 - Runtime (no boot)",
|
||||
"args": ["-fakeiso", "-debug", "-v", "-jak2"]
|
||||
},
|
||||
{
|
||||
"type": "default",
|
||||
"project": "CMakeLists.txt",
|
||||
|
||||
@@ -29,11 +29,14 @@ struct Node {
|
||||
std::string atom_str;
|
||||
|
||||
// number of quotes this is wrapped in.
|
||||
u32 quoted = 0;
|
||||
enum class QuoteKind { QUOTE, UNQUOTE, QUASIQUOTE, UNQUOTE_SPLICING };
|
||||
std::vector<QuoteKind> quotes;
|
||||
|
||||
Node* parent = nullptr;
|
||||
u32 my_depth = 0;
|
||||
|
||||
int get_quote_length() const;
|
||||
|
||||
void link(Node* this_parent, std::vector<Node*>* bfs_order, u32 depth) {
|
||||
parent = this_parent;
|
||||
my_depth = depth;
|
||||
@@ -86,6 +89,30 @@ struct Node {
|
||||
u8 sub_elt_indent = 0;
|
||||
};
|
||||
|
||||
inline const std::string quote_symbol(Node::QuoteKind kind) {
|
||||
switch (kind) {
|
||||
case Node::QuoteKind::QUOTE:
|
||||
return "'";
|
||||
case Node::QuoteKind::QUASIQUOTE:
|
||||
return "`";
|
||||
case Node::QuoteKind::UNQUOTE:
|
||||
return ",";
|
||||
case Node::QuoteKind::UNQUOTE_SPLICING:
|
||||
return ",@";
|
||||
default:
|
||||
ASSERT_MSG(false, fmt::format("invalid quote kind {}", kind));
|
||||
return "[invalid]";
|
||||
}
|
||||
}
|
||||
|
||||
int Node::get_quote_length() const {
|
||||
int out = 0;
|
||||
for (auto& q : quotes) {
|
||||
out += quote_symbol(q).length();
|
||||
}
|
||||
return out;
|
||||
}
|
||||
|
||||
Node to_node(const goos::Object& obj) {
|
||||
switch (obj.type) {
|
||||
case goos::ObjectType::EMPTY_LIST:
|
||||
@@ -100,13 +127,22 @@ Node to_node(const goos::Object& obj) {
|
||||
return Node(obj.print());
|
||||
|
||||
case goos::ObjectType::PAIR: {
|
||||
// we've got three cases: quoted thing, proper list, improper list.
|
||||
// we've got four cases: quoted thing, unquoted thing, proper list, improper list.
|
||||
|
||||
// there's probably a better way to do this but i am lazy
|
||||
auto& first = obj.as_pair()->car;
|
||||
if (first.is_symbol() && first.as_symbol()->name == "quote") {
|
||||
if (first.is_symbol("quote")) {
|
||||
auto& second = obj.as_pair()->cdr;
|
||||
if (second.is_pair() && second.as_pair()->cdr.is_empty_list()) {
|
||||
Node result = to_node(second.as_pair()->car);
|
||||
result.quoted++;
|
||||
result.quotes.push_back(Node::QuoteKind::QUOTE);
|
||||
return result;
|
||||
}
|
||||
} else if (first.is_symbol("unquote")) {
|
||||
auto& second = obj.as_pair()->cdr;
|
||||
if (second.is_pair() && second.as_pair()->cdr.is_empty_list()) {
|
||||
Node result = to_node(second.as_pair()->car);
|
||||
result.quotes.push_back(Node::QuoteKind::UNQUOTE);
|
||||
return result;
|
||||
}
|
||||
}
|
||||
@@ -148,13 +184,13 @@ void recompute_lengths(const std::vector<Node*>& bfs_order) {
|
||||
Node* node = *it;
|
||||
switch (node->kind) {
|
||||
case Node::Kind::ATOM:
|
||||
node->text_len = node->atom_str.length() + node->quoted;
|
||||
node->text_len = node->atom_str.length() + node->get_quote_length();
|
||||
break;
|
||||
case Node::Kind::IMPROPER_LIST:
|
||||
case Node::Kind::LIST: {
|
||||
if (node->break_list) {
|
||||
// special case compute first line length
|
||||
int first_line_len = 1 + node->quoted; // open paren + quotes
|
||||
int first_line_len = 1 + node->get_quote_length(); // open paren + quotes
|
||||
int nodes_on_first_line =
|
||||
std::min(int(node->child_nodes.size()), int(node->top_line_count));
|
||||
if (nodes_on_first_line > 0) {
|
||||
@@ -176,7 +212,7 @@ void recompute_lengths(const std::vector<Node*>& bfs_order) {
|
||||
|
||||
node->text_len = max_line_len;
|
||||
} else {
|
||||
node->text_len = 1 + node->quoted; // open paren + quotes
|
||||
node->text_len = 1 + node->get_quote_length(); // open paren + quotes
|
||||
for (auto& child : node->child_nodes) {
|
||||
node->text_len += (child.text_len + 1); // space or close paren.
|
||||
}
|
||||
@@ -292,7 +328,7 @@ int run_algorithm(const std::vector<Node*>& bfs_order, int line_length) {
|
||||
// - too long
|
||||
// - not already split.
|
||||
// the "magic" of v2 is:
|
||||
// the "too long" check above igores the sublist.
|
||||
// the "too long" check above ignores the sublist.
|
||||
|
||||
int num_broken = 0;
|
||||
std::optional<s32> min_depth;
|
||||
@@ -334,8 +370,8 @@ void append_node_to_string(const Node* node,
|
||||
for (int i = 0; i < init_indent_level; i++) {
|
||||
str.push_back(' ');
|
||||
}
|
||||
for (u32 i = 0; i < node->quoted; i++) {
|
||||
str.push_back('\'');
|
||||
for (auto q : node->quotes) {
|
||||
str.append(quote_symbol(q));
|
||||
}
|
||||
switch (node->kind) {
|
||||
case Node::Kind::ATOM:
|
||||
@@ -347,7 +383,7 @@ void append_node_to_string(const Node* node,
|
||||
str.push_back('(');
|
||||
size_t node_idx = 0;
|
||||
|
||||
int listing_indent = next_indent_level + node->quoted + node->sub_elt_indent;
|
||||
int listing_indent = next_indent_level + node->get_quote_length() + node->sub_elt_indent;
|
||||
int extra_indent = 0;
|
||||
int old_indent = listing_indent;
|
||||
if (node->top_line_count) {
|
||||
@@ -401,7 +437,7 @@ void append_node_to_string(const Node* node,
|
||||
} else {
|
||||
str.push_back('(');
|
||||
ASSERT(!node->child_nodes.empty());
|
||||
int listing_indent = next_indent_level + node->quoted;
|
||||
int listing_indent = next_indent_level + node->get_quote_length();
|
||||
int extra_indent = 1;
|
||||
int c0 = 0;
|
||||
for (auto& child : node->child_nodes) {
|
||||
|
||||
@@ -149,7 +149,7 @@ Form* try_cast_simplify(Form* in,
|
||||
if (div * METER_LENGTH == *fc) {
|
||||
return pool.form<GenericElement>(
|
||||
GenericOperator::make_function(pool.form<ConstantTokenElement>("meters")),
|
||||
pool.form<ConstantFloatElement>(div));
|
||||
pool.form<ConstantTokenElement>(float_to_string(div, false)));
|
||||
} else {
|
||||
lg::error("Floating point value {} could not be converted to meters.", *fc);
|
||||
}
|
||||
|
||||
@@ -950,10 +950,10 @@ Form* cast_to_bitfield_enum(const EnumType* type_info,
|
||||
s64 in,
|
||||
bool no_head) {
|
||||
ASSERT(type_info->is_bitfield());
|
||||
auto elts = decompile_bitfield_enum_from_int(TypeSpec(type_info->get_name()), env.dts->ts, in);
|
||||
if (in == -1) {
|
||||
return nullptr;
|
||||
}
|
||||
auto elts = decompile_bitfield_enum_from_int(TypeSpec(type_info->get_name()), env.dts->ts, in);
|
||||
if (no_head) {
|
||||
ASSERT(elts.size() >= 1);
|
||||
}
|
||||
|
||||
@@ -680,34 +680,39 @@ std::string ObjectFileDB::process_tpages(TextureDB& tex_db, const fs::path& outp
|
||||
}
|
||||
|
||||
std::string ObjectFileDB::process_game_text_files(const Config& cfg) {
|
||||
lg::info("- Finding game text...");
|
||||
std::string text_string = "COMMON";
|
||||
Timer timer;
|
||||
int file_count = 0;
|
||||
int string_count = 0;
|
||||
int char_count = 0;
|
||||
std::unordered_map<int, std::unordered_map<int, std::string>> text_by_language_by_id;
|
||||
try {
|
||||
lg::info("- Finding game text...");
|
||||
std::string text_string = "COMMON";
|
||||
Timer timer;
|
||||
int file_count = 0;
|
||||
int string_count = 0;
|
||||
int char_count = 0;
|
||||
std::unordered_map<int, std::unordered_map<int, std::string>> text_by_language_by_id;
|
||||
|
||||
for_each_obj([&](ObjectFileData& data) {
|
||||
if (data.name_in_dgo.substr(1) == text_string) {
|
||||
file_count++;
|
||||
auto statistics = process_game_text(data, cfg.text_version);
|
||||
string_count += statistics.total_text;
|
||||
char_count += statistics.total_chars;
|
||||
if (text_by_language_by_id.find(statistics.language) != text_by_language_by_id.end()) {
|
||||
ASSERT(false);
|
||||
for_each_obj([&](ObjectFileData& data) {
|
||||
if (data.name_in_dgo.substr(1) == text_string) {
|
||||
file_count++;
|
||||
auto statistics = process_game_text(data, cfg.text_version);
|
||||
string_count += statistics.total_text;
|
||||
char_count += statistics.total_chars;
|
||||
if (text_by_language_by_id.find(statistics.language) != text_by_language_by_id.end()) {
|
||||
ASSERT(false);
|
||||
}
|
||||
text_by_language_by_id[statistics.language] = std::move(statistics.text);
|
||||
}
|
||||
text_by_language_by_id[statistics.language] = std::move(statistics.text);
|
||||
});
|
||||
|
||||
lg::info("Processed {} text files ({} strings, {} characters) in {:.2f} ms", file_count,
|
||||
string_count, char_count, timer.getMs());
|
||||
|
||||
if (text_by_language_by_id.empty()) {
|
||||
return {};
|
||||
}
|
||||
});
|
||||
|
||||
lg::info("Processed {} text files ({} strings, {} characters) in {:.2f} ms", file_count,
|
||||
string_count, char_count, timer.getMs());
|
||||
|
||||
if (text_by_language_by_id.empty()) {
|
||||
return write_game_text(cfg.text_version, text_by_language_by_id);
|
||||
} catch (std::runtime_error& e) {
|
||||
lg::warn("Error when extracting game text: {}", e.what());
|
||||
return {};
|
||||
}
|
||||
return write_game_text(cfg.text_version, text_by_language_by_id);
|
||||
}
|
||||
|
||||
std::string ObjectFileDB::process_game_count_file() {
|
||||
|
||||
+1031
-344
File diff suppressed because it is too large
Load Diff
@@ -237,6 +237,46 @@
|
||||
[25, "(function editable symbol symbol)"],
|
||||
[28, "(function editable symbol)"]
|
||||
],
|
||||
"game-info": [
|
||||
[8, "(function string none :behavior process)"],
|
||||
[14, "(function symbol symbol int none :behavior target)"],
|
||||
[
|
||||
19,
|
||||
"(function symbol symbol continue-point game-save none :behavior process)"
|
||||
]
|
||||
],
|
||||
"game-task": [
|
||||
[0, "(function game-task-node-info symbol)"],
|
||||
[1, "(function game-task-node-info symbol)"],
|
||||
[2, "(function game-task-node-info symbol)"],
|
||||
[3, "(function game-task-node-info symbol)"],
|
||||
[4, "(function game-task-node-info symbol)"],
|
||||
[5, "(function game-task-node-info symbol)"],
|
||||
[6, "(function game-task-node-info symbol)"],
|
||||
[7, "(function game-task-node-info symbol)"],
|
||||
[8, "(function game-task-node-info symbol)"],
|
||||
[9, "(function game-task-node-info symbol)"],
|
||||
[10, "(function game-task-node-info symbol)"],
|
||||
[11, "(function game-task-node-info symbol)"],
|
||||
[12, "(function game-task-node-info symbol)"],
|
||||
[13, "(function game-task-node-info symbol)"],
|
||||
[14, "(function game-task-node-info symbol)"],
|
||||
[15, "(function game-task-node-info symbol)"],
|
||||
[16, "(function game-task-node-info symbol)"],
|
||||
[17, "(function game-task-node-info symbol)"],
|
||||
[18, "(function game-task-node-info symbol)"],
|
||||
[19, "(function game-task-node-info symbol)"],
|
||||
[20, "(function game-task-node-info symbol)"],
|
||||
[21, "(function game-task-node-info symbol)"],
|
||||
[22, "(function game-task-node-info symbol)"],
|
||||
[23, "(function game-task-node-info symbol)"],
|
||||
[24, "(function game-task-node-info symbol)"]
|
||||
],
|
||||
"task-control": [
|
||||
[43, "(function game-task-node-info object)"],
|
||||
[44, "(function game-task-node-info object)"],
|
||||
[55, "(function pair symbol)"]
|
||||
],
|
||||
"script": [
|
||||
[0, "(function script-context none)"],
|
||||
[1, "(function script-context int)"],
|
||||
|
||||
@@ -36,7 +36,6 @@
|
||||
"asm_functions_by_name": [
|
||||
// checking boxed type is different now - these make the cfg stuff sad
|
||||
"name=",
|
||||
"(method 21 game-info)",
|
||||
"cspace-inspect-tree",
|
||||
"scene-player-init",
|
||||
"(method 77 spyder)",
|
||||
@@ -146,7 +145,6 @@
|
||||
"(anon-function 24 grenadier)",
|
||||
// no longer bug or asm, not done yet
|
||||
"particle-adgif-callback",
|
||||
"editable-menu-context-make-menus", // label guesser can't handle pairs
|
||||
|
||||
// texture
|
||||
"adgif-shader<-texture!"
|
||||
@@ -215,6 +213,11 @@
|
||||
"execute-select",
|
||||
"(method 29 editable)",
|
||||
"(method 25 editable)",
|
||||
// game-info
|
||||
"(method 20 game-info)",
|
||||
"print-continues",
|
||||
// task-control
|
||||
"(anon-function 55 task-control)",
|
||||
"(method 17 load-state)",
|
||||
"(method 12 level)",
|
||||
"bg",
|
||||
@@ -290,8 +293,9 @@
|
||||
"start-perf-stat-collection": [26],
|
||||
"end-perf-stat-collection": [0],
|
||||
"upload-vis-bits": [2, 6, 3, 0],
|
||||
"set-background-regs!":[4, 3],
|
||||
"draw-drawable-tree-instance-tie": [21, 23, 31, 33]
|
||||
"set-background-regs!": [4, 3],
|
||||
"draw-drawable-tree-instance-tie": [21, 23, 31, 33],
|
||||
"command-get-process": [43]
|
||||
},
|
||||
|
||||
// Sometimes the game might use format strings that are fetched dynamically,
|
||||
@@ -299,7 +303,13 @@
|
||||
// Add information about those format instructions here.
|
||||
// e.g. "function-name":[[op, argc], [op, argc], ...]
|
||||
// where "op" is the op number for the call to format.
|
||||
"dynamic_format_arg_counts": {},
|
||||
"dynamic_format_arg_counts": {
|
||||
"(method 16 fail-mission)": [
|
||||
[68, 1],
|
||||
[101, 1],
|
||||
[130, 1]
|
||||
]
|
||||
},
|
||||
|
||||
"mips2c_functions_by_name": [
|
||||
"collide-do-primitives",
|
||||
|
||||
@@ -184,9 +184,5 @@
|
||||
|
||||
"streamed_audio_file_names": [],
|
||||
|
||||
"levels_to_extract": [
|
||||
"PRI.DGO",
|
||||
"CTA.DGO",
|
||||
"CWI.DGO"
|
||||
]
|
||||
"levels_to_extract": ["PRI.DGO", "CTA.DGO", "CWI.DGO"]
|
||||
}
|
||||
|
||||
@@ -189,6 +189,26 @@
|
||||
["L896", "(pointer uint64)", 1],
|
||||
["L897", "(pointer uint64)", 1]
|
||||
],
|
||||
"nav-mesh": [["L347", "(inline-array vector)", 2]],
|
||||
// far label crap
|
||||
"game-info": [
|
||||
["L406", "uint64", true],
|
||||
["L407", "uint64", true],
|
||||
["L408", "uint64", true],
|
||||
["L409", "uint64", true],
|
||||
["L410", "uint64", true],
|
||||
["L411", "uint64", true],
|
||||
["L412", "uint64", true],
|
||||
["L413", "uint64", true],
|
||||
["L414", "uint64", true],
|
||||
["L415", "uint64", true],
|
||||
["L416", "uint64", true],
|
||||
["L417", "uint64", true],
|
||||
["L545", "uint64", true],
|
||||
["L546", "uint64", true],
|
||||
["L547", "uint64", true]
|
||||
],
|
||||
"task-control": [["L518", "attack-info"]],
|
||||
"tfrag-methods": [["L119", "(inline-array tfrag-init-data)", 6]],
|
||||
"nav-mesh": [["L347", "(inline-array vector)", 2]],
|
||||
"progress": [
|
||||
|
||||
@@ -771,6 +771,9 @@
|
||||
"(method 10 editable-face)": [[16, ["inline-array", "vector", 6]]],
|
||||
"(method 11 editable)": [[16, "collide-query"]],
|
||||
"(method 10 editable-plane)": [[16, "matrix"]],
|
||||
"(method 9 game-task-node-info)": [[16, ["inline-array", "qword", 8]]],
|
||||
"(code retry task-manager)": [[16, "event-message-block"]],
|
||||
"(code complete task-manager)": [[16, "event-message-block"]],
|
||||
"(method 9 script-context)": [[16, "script-context"]],
|
||||
"(anon-function 32 script)": [
|
||||
[16, "vector"],
|
||||
@@ -905,7 +908,5 @@
|
||||
[32, "vector"],
|
||||
[48, "vector"]
|
||||
],
|
||||
"target-board-pre-move": [[112, "vector"]],
|
||||
// placeholder
|
||||
"placeholder-do-not-add-below": []
|
||||
"target-board-pre-move": [[112, "vector"]]
|
||||
}
|
||||
|
||||
@@ -431,10 +431,17 @@
|
||||
"(method 0 fact-info-enemy)": [
|
||||
[[0, 196], "gp", "fact-info-enemy"],
|
||||
["_stack_", 16, "res-tag"],
|
||||
["_stack_", 32, "res-tag"]
|
||||
["_stack_", 32, "res-tag"],
|
||||
[[11, 177], "s5", "res-lump"]
|
||||
],
|
||||
"(method 0 fact-info)": [
|
||||
[87, "v1", "(pointer int32)"],
|
||||
[11, "v1", "res-lump"]
|
||||
],
|
||||
"(method 0 fact-info-crate)": [
|
||||
[[0, 17], "gp", "fact-info-crate"],
|
||||
[14, "a0", "res-lump"]
|
||||
],
|
||||
"(method 0 fact-info)": [[87, "v1", "(pointer int32)"]],
|
||||
"(method 0 fact-info-crate)": [[[0, 17], "gp", "fact-info-crate"]],
|
||||
"(method 0 fact-info-target)": [[[0, 17], "gp", "fact-info-target"]],
|
||||
"joint-channel-float-delete!": [
|
||||
[7, "a0", "pointer"],
|
||||
@@ -2141,6 +2148,68 @@
|
||||
[12, "a3", "int"]
|
||||
],
|
||||
"debug-menu-func-decode": [[18, "a0", "symbol"]],
|
||||
"(method 20 game-info)": [
|
||||
[8, "v1", "symbol"],
|
||||
[9, "v1", "level-load-info"],
|
||||
[[11, 18], "s3", "continue-point"]
|
||||
],
|
||||
"(method 30 game-info)": [
|
||||
[[4, 26], "s3", "game-task"],
|
||||
[[4, 26], "s2", "game-task"],
|
||||
[[37, 53], "s5", "game-task"],
|
||||
[[37, 53], "s4", "game-task"]
|
||||
],
|
||||
"(method 10 fact-info-target)": [[67, "v1", "target"]],
|
||||
"(method 11 fact-info-target)": [
|
||||
[143, "v1", "target"],
|
||||
[264, "a0", "target"],
|
||||
[322, "v1", "target"],
|
||||
[410, "a0", "target"],
|
||||
[458, "v1", "target"],
|
||||
[499, "v1", "target"],
|
||||
[540, "v1", "target"],
|
||||
[558, "v1", "target"],
|
||||
[572, "v1", "target"],
|
||||
[588, "v1", "target"],
|
||||
[599, "v1", "target"],
|
||||
[674, "v1", "target"],
|
||||
[702, "v1", "target"],
|
||||
[737, "v1", "target"],
|
||||
[271, "a0", "target"],
|
||||
[413, "a0", "target"]
|
||||
],
|
||||
"print-continues": [
|
||||
[3, "v1", "symbol"],
|
||||
[4, "v1", "level-load-info"],
|
||||
[[6, 14], "v1", "continue-point"]
|
||||
],
|
||||
"(method 23 game-info)": [
|
||||
[178, "a0", "(pointer game-save-tag)"],
|
||||
[329, "s3", "game-save-tag"],
|
||||
[662, "a2", "game-save-tag"]
|
||||
],
|
||||
"(anon-function 55 task-control)": [
|
||||
[14, "v1", "symbol"],
|
||||
[20, "s2", "level-load-info"]
|
||||
],
|
||||
"(method 12 minimap)": [[18, "v0", "connection-minimap"]],
|
||||
"update-task-masks": [[30, "s5", "connection-minimap"]],
|
||||
"(method 10 fail-mission)": [[43, "t9", "(function process process)"]],
|
||||
"restart-mission": [
|
||||
[8, "v1", "connection"],
|
||||
[5, "v1", "connection"],
|
||||
[8, "a0", "process"],
|
||||
[12, "a0", "process"],
|
||||
[15, "a0", "process"],
|
||||
[39, "a0", "process"],
|
||||
[47, "a0", "connection"],
|
||||
[46, "s4", "connection"],
|
||||
[44, "s4", "connection"],
|
||||
[6, "s4", "connection"],
|
||||
[47, "s4", "connection"],
|
||||
[50, "v1", "connection"]
|
||||
],
|
||||
"(code resetting fail-mission)": [[19, "v0", "sound-rpc-set-param"]],
|
||||
"(anon-function 6 script)": [[17, "v1", "pair"]],
|
||||
"(anon-function 16 script)": [
|
||||
[10, "s4", "game-task-node-info"],
|
||||
@@ -2222,9 +2291,22 @@
|
||||
[43, "s5", "process-drawable"],
|
||||
[32, "s5", "process-drawable"],
|
||||
[105, "v0", "joint"],
|
||||
[145, "v0", "joint"]
|
||||
[145, "v0", "joint"],
|
||||
[[42, 221], "s4", "process-drawable"]
|
||||
],
|
||||
"command-get-process": [
|
||||
[37, "gp", "entity-actor"],
|
||||
[76, "a0", "connection"],
|
||||
[79, "a0", "connection"],
|
||||
[83, "a0", "connection"],
|
||||
[83, "a1", "connection"],
|
||||
[74, "a1", "connection"],
|
||||
[73, "a0", "connection"],
|
||||
[77, "a2", "game-task-node-info"],
|
||||
[97, "v1", "connection"],
|
||||
[94, "v1", "connection"],
|
||||
[162, "s3", "process-drawable"]
|
||||
],
|
||||
"command-get-process": [[37, "gp", "entity-actor"]],
|
||||
"command-get-float": [[20, "gp", "bfloat"]],
|
||||
"command-get-int": [[17, "gp", "bfloat"]],
|
||||
"(anon-function 54 script)": [[66, "v1", "entity-actor"]],
|
||||
@@ -2306,6 +2388,7 @@
|
||||
[151, "a0", "uint"],
|
||||
["_stack_", 24, "pat-surface"]
|
||||
],
|
||||
"(code complete task-manager)": [[119, "gp", "handle"]],
|
||||
"(method 14 drawable-group)": [[19, "s5", "drawable-group"]],
|
||||
"(method 15 drawable-tree)": [
|
||||
[[1, 4], "v1", "drawable-inline-array-node"],
|
||||
@@ -2417,7 +2500,7 @@
|
||||
[[37, 45], "a0", "dma-packet"],
|
||||
[[47, 54], "a0", "dma-packet"],
|
||||
[[57, 64], "v1", "vector"],
|
||||
[[65,72], "v1", "(pointer vif-tag)"]
|
||||
[[65, 72], "v1", "(pointer vif-tag)"]
|
||||
],
|
||||
"tie-end-buffer": [
|
||||
[[1, 8], "a1", "dma-packet"],
|
||||
@@ -2474,7 +2557,6 @@
|
||||
[1403, "a0", "(pointer uint64)"],
|
||||
[[51, 57], "a0", "dma-packet"],
|
||||
[[164, 170], "a0", "dma-packet"]
|
||||
|
||||
],
|
||||
"tie-floats": [[[3, 73], "gp", "(pointer uint32)"]],
|
||||
"tie-init-buf": [
|
||||
@@ -2494,7 +2576,6 @@
|
||||
"(enter othercam-running)": [[[50, 60], "gp", "process-drawable"]],
|
||||
"(code othercam-running)": [[[2, 65], "s2", "process-drawable"]],
|
||||
"(method 10 progress)": [[45, "t9", "(function progress none)"]],
|
||||
|
||||
"hud-ring-cell-init-by-other": [
|
||||
[36, "a0", "progress"],
|
||||
[45, "v1", "progress"],
|
||||
@@ -2503,7 +2584,6 @@
|
||||
[159, "a1", "progress"],
|
||||
[178, "a1", "progress"]
|
||||
],
|
||||
|
||||
"(post idle hud-ring-cell)": [
|
||||
[8, "a1", "progress"],
|
||||
[13, "v1", "progress"],
|
||||
@@ -2515,10 +2595,7 @@
|
||||
[137, "v1", "progress"],
|
||||
[159, "v1", "progress"]
|
||||
],
|
||||
|
||||
"end-scan": [
|
||||
[[18, 22], "v1", "dma-packet"]
|
||||
],
|
||||
"end-scan": [[[18, 22], "v1", "dma-packet"]],
|
||||
"(code target-board-jump)": [[17, "v1", "art-joint-anim"]],
|
||||
"(code target-board-get-on)": [[55, "v1", "art-joint-anim"]],
|
||||
"(code target-board-jump-kick)": [[15, "v1", "art-joint-anim"]],
|
||||
@@ -2665,6 +2742,14 @@
|
||||
[46, "s5", "collide-shape"],
|
||||
[107, "v1", "manipy"]
|
||||
],
|
||||
"service-cpads": [[[207, 312], "s3", "pad-buttons"]],
|
||||
"dm-editable-boolean-toggle-pick-func": [[5, "v1", "(pointer symbol)"]],
|
||||
"dm-editable-light-float-func": [
|
||||
[36, "a0", "(pointer float)"],
|
||||
[88, "v1", "(pointer float)"]
|
||||
],
|
||||
"(anon-function 46 script)": [[24, "v0", "float"]],
|
||||
"(anon-function 4 script)": [[13, "v1", "int"]],
|
||||
"(method 13 sync-linear)": [
|
||||
["_stack_", 16, "res-tag"],
|
||||
[35, "v1", "(pointer float)"]
|
||||
@@ -2676,7 +2761,5 @@
|
||||
"(method 13 sync-paused)": [
|
||||
["_stack_", 16, "res-tag"],
|
||||
[[29, 45], "v1", "(pointer float)"]
|
||||
],
|
||||
// placeholder
|
||||
"placeholder-do-not-add-below": []
|
||||
]
|
||||
}
|
||||
|
||||
@@ -982,6 +982,230 @@
|
||||
"t4-1": "dist-past-end"
|
||||
}
|
||||
},
|
||||
"(method 9 border-plane)": {
|
||||
"vars": {
|
||||
"s5-0": "plane-color"
|
||||
}
|
||||
},
|
||||
"(method 10 border-plane)": {
|
||||
"vars": {
|
||||
"arg0": "pt"
|
||||
}
|
||||
},
|
||||
"(method 12 game-info)": {
|
||||
"vars": {
|
||||
"s5-0": "subtasks",
|
||||
"s4-0": "i"
|
||||
}
|
||||
},
|
||||
"(method 13 game-info)": {
|
||||
"vars": {
|
||||
"v1-2": "subtask"
|
||||
}
|
||||
},
|
||||
"(method 19 game-info)": {
|
||||
"vars": {
|
||||
"gp-0": "dfault"
|
||||
}
|
||||
},
|
||||
"(method 20 game-info)": {
|
||||
"vars": {
|
||||
"s3-0": "cont",
|
||||
"s4-0": "continues"
|
||||
}
|
||||
},
|
||||
"(method 30 game-info)": {
|
||||
"vars": {
|
||||
"s5-0": "story-total",
|
||||
"s4-0": "story-complete",
|
||||
"f30-0": "percent",
|
||||
"s3-0": "story-min",
|
||||
"s2-0": "story-max",
|
||||
"s5-1": "bbush-min",
|
||||
"s4-1": "bbush-max"
|
||||
}
|
||||
},
|
||||
"(method 10 game-info)": {
|
||||
"vars": {
|
||||
"s5-1": "task",
|
||||
"f30-0": "ammo-max",
|
||||
"s4-1": "ammo-kind"
|
||||
}
|
||||
},
|
||||
"(method 11 fact-info-target)": {
|
||||
"vars": {
|
||||
"s3-10": "ammo-kind"
|
||||
}
|
||||
},
|
||||
"(method 14 game-info)": {
|
||||
"vars": {
|
||||
"v1-0": "game-perms",
|
||||
"a0-1": "i"
|
||||
}
|
||||
},
|
||||
"(method 16 game-info)": {
|
||||
"vars": {
|
||||
"s5-0": "game-perms",
|
||||
"s4-0": "level-entities",
|
||||
"s2-0": "entity-perm",
|
||||
"s3-0": "i",
|
||||
"v1-10": "actor-perm"
|
||||
}
|
||||
},
|
||||
"(method 17 game-info)": {
|
||||
"vars": {
|
||||
"s5-0": "level-entities",
|
||||
"s4-0": "i",
|
||||
"s3-0": "entity-perm",
|
||||
"v1-7": "actor-perm"
|
||||
}
|
||||
},
|
||||
"bug-report-display": {
|
||||
"vars": {
|
||||
"s5-0": "conts"
|
||||
}
|
||||
},
|
||||
"print-continues": {
|
||||
"vars": {
|
||||
"s5-0": "conts",
|
||||
"gp-0": "levels",
|
||||
"v1-2": "cont"
|
||||
}
|
||||
},
|
||||
"(method 18 game-info)": {
|
||||
"vars": {
|
||||
"v1-7": "game-subtasks",
|
||||
"a0-6": "i",
|
||||
"a1-8": "subtasks",
|
||||
"s5-1": "game-perms"
|
||||
}
|
||||
},
|
||||
"(method 25 game-info)": {
|
||||
"vars": {
|
||||
"gp-0": "game-subtasks",
|
||||
"s5-0": "i",
|
||||
"s4-0": "subtask",
|
||||
"v1-11": "cur-lev",
|
||||
"v1-17": "suck-death-count",
|
||||
"f0-2": "suck-death-stage"
|
||||
}
|
||||
},
|
||||
"(method 21 game-info)": {
|
||||
"vars": {
|
||||
"s3-3": "dfault"
|
||||
}
|
||||
},
|
||||
"update-task-masks": {
|
||||
"vars": {
|
||||
"s5-1": "borrow-eval",
|
||||
"s4-1": "game-nodes",
|
||||
"s3-0": "i",
|
||||
"s2-0": "node",
|
||||
"s1-0": "node-open?",
|
||||
"s1-1": "node-ev-i",
|
||||
"v1-66": "node-open-ev",
|
||||
"s5-2": "lev-i",
|
||||
"a0-30": "lev"
|
||||
}
|
||||
},
|
||||
"(method 22 level)": {
|
||||
"vars": {
|
||||
"v1-7": "name",
|
||||
"a0-2": "game-subtasks",
|
||||
"a1-1": "i",
|
||||
"a2-3": "subtask"
|
||||
}
|
||||
},
|
||||
"task-node-by-name": {
|
||||
"vars": {
|
||||
"s5-0": "game-nodes",
|
||||
"s4-0": "i",
|
||||
"s3-0": "node"
|
||||
}
|
||||
},
|
||||
"task-resolution-close!": {
|
||||
"vars": {
|
||||
"v1-1": "game-nodes",
|
||||
"a1-0": "i",
|
||||
"a2-3": "node"
|
||||
}
|
||||
},
|
||||
"task-close!": {
|
||||
"vars": {
|
||||
"s5-0": "game-nodes",
|
||||
"s4-0": "i",
|
||||
"s3-0": "node"
|
||||
}
|
||||
},
|
||||
"task-closed?": {
|
||||
"vars": {
|
||||
"s5-0": "game-nodes",
|
||||
"s4-0": "i",
|
||||
"s3-0": "node"
|
||||
}
|
||||
},
|
||||
"open-task-nodes": {
|
||||
"vars": {
|
||||
"v1-1": "game-nodes",
|
||||
"a1-0": "i",
|
||||
"a2-3": "node"
|
||||
}
|
||||
},
|
||||
"(method 9 game-task-node-info)": {
|
||||
"vars": {
|
||||
"s4-0": "task-node-close-func",
|
||||
"s2-0": "p-node-count",
|
||||
"s0-0": "p-i",
|
||||
"s5-1": "game-nodes",
|
||||
"s4-1": "i",
|
||||
"s3-1": "node"
|
||||
}
|
||||
},
|
||||
"task-node-closed?": {
|
||||
"vars": {
|
||||
"v1-2": "node"
|
||||
}
|
||||
},
|
||||
"(method 10 game-task-node-info)": {
|
||||
"vars": {
|
||||
"s5-0": "game-nodes",
|
||||
"s4-0": "i",
|
||||
"a0-4": "node",
|
||||
"v1-20": "ii"
|
||||
}
|
||||
},
|
||||
"task-node-open?": {
|
||||
"vars": {
|
||||
"v1-1": "game-nodes"
|
||||
}
|
||||
},
|
||||
"(method 11 game-task-node-info)": {
|
||||
"vars": {
|
||||
"a1-0": "game-nodes",
|
||||
"a2-2": "pi",
|
||||
"v1-1": "node-info"
|
||||
}
|
||||
},
|
||||
"task-node-open!": {
|
||||
"vars": {
|
||||
"gp-0": "game-node",
|
||||
"s5-0": "p-i"
|
||||
}
|
||||
},
|
||||
"task-node-reset": {
|
||||
"vars": {
|
||||
"s5-0": "game-nodes",
|
||||
"s4-0": "i",
|
||||
"s3-0": "node"
|
||||
}
|
||||
},
|
||||
"(method 9 game-task-control)": {
|
||||
"vars": {
|
||||
"s2-0": "game-nodes",
|
||||
"s3-0": "i",
|
||||
"s1-0": "node"
|
||||
}
|
||||
},
|
||||
"(method 15 mysql-nav-graph)": {
|
||||
"args": ["obj", "edge-id", "node-id"]
|
||||
},
|
||||
@@ -1109,6 +1333,19 @@
|
||||
"t1-2": "back-idx"
|
||||
}
|
||||
},
|
||||
"restart-mission": {
|
||||
"vars": {
|
||||
"a0-2": ["task-mgr", "process"],
|
||||
"s4-0": ["s4-0", "connection"],
|
||||
"v1-1": ["v1-1", "connection"],
|
||||
"s5-1": "cur-lev",
|
||||
"s4-1": "game-nodes",
|
||||
"s3-0": "i",
|
||||
"s2-0": "node",
|
||||
"gp-0": "restart?",
|
||||
"s5-0": "mgr-status"
|
||||
}
|
||||
},
|
||||
"(method 0 drawable-group)": {
|
||||
"args": ["allocation", "type-to-make", "length"],
|
||||
"vars": {
|
||||
@@ -1291,5 +1528,14 @@
|
||||
"f0-1": "angle",
|
||||
"s5-0": "sin-cos-result"
|
||||
}
|
||||
},
|
||||
"service-cpads": {
|
||||
"vars": {
|
||||
"s3-0": "buzz-i",
|
||||
"gp-0": "pads",
|
||||
"s5-0": "i",
|
||||
"s4-0": "pad",
|
||||
"s3-1": ["buttons-pushed", "pad-buttons"]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
// if you want to filter to only some object names.
|
||||
// it will make the decompiler much faster.
|
||||
"allowed_objects": [],
|
||||
"banned_objects": ["effect-control", "time-of-day"],
|
||||
"banned_objects": ["effect-control", "time-of-day", "target-util", "ctywide-scenes"],
|
||||
|
||||
////////////////////////////
|
||||
// CODE ANALYSIS OPTIONS
|
||||
|
||||
@@ -160,12 +160,18 @@ goos::Object decompile_at_label_guess_type(const DecompilerLabel& label,
|
||||
}
|
||||
|
||||
goos::Object decompile_function_at_label(const DecompilerLabel& label,
|
||||
const LinkedObjectFile* file) {
|
||||
const LinkedObjectFile* file,
|
||||
bool in_static_pair) {
|
||||
if (file) {
|
||||
auto other_func = file->try_get_function_at_label(label);
|
||||
if (other_func && other_func->ir2.env.has_local_vars() && other_func->ir2.top_form &&
|
||||
other_func->ir2.expressions_succeeded) {
|
||||
return final_output_lambda(*other_func);
|
||||
auto out = final_output_lambda(*other_func);
|
||||
if (in_static_pair) {
|
||||
return pretty_print::build_list("unquote", out);
|
||||
} else {
|
||||
return out;
|
||||
}
|
||||
}
|
||||
}
|
||||
return pretty_print::to_symbol(fmt::format("<lambda at {}>", label.name));
|
||||
@@ -180,13 +186,14 @@ goos::Object decompile_at_label(const TypeSpec& type,
|
||||
const std::vector<DecompilerLabel>& labels,
|
||||
const std::vector<std::vector<LinkedWord>>& words,
|
||||
const TypeSystem& ts,
|
||||
const LinkedObjectFile* file) {
|
||||
const LinkedObjectFile* file,
|
||||
bool in_static_pair) {
|
||||
if (type == TypeSpec("string")) {
|
||||
return decompile_string_at_label(label, words);
|
||||
}
|
||||
|
||||
if (ts.tc(TypeSpec("function"), type)) {
|
||||
return decompile_function_at_label(label, file);
|
||||
return decompile_function_at_label(label, file, in_static_pair);
|
||||
}
|
||||
|
||||
if (ts.tc(TypeSpec("array"), type)) {
|
||||
@@ -721,6 +728,7 @@ goos::Object decompile_sound_spec(const TypeSpec& type,
|
||||
// volume is fixed point, and floats should round towards zero, so we convert specific ints
|
||||
// to better-looking floats that end up being the same value.
|
||||
// there should be a more automated way to do this, but i am a bit lazy.
|
||||
// TODO try fixed point print i made some time ago
|
||||
switch (volume) {
|
||||
case 0x2cc:
|
||||
volf = 70;
|
||||
@@ -1528,13 +1536,13 @@ goos::Object decompile_pair_elt(const LinkedWord& word,
|
||||
return decompile_pair(label, labels, words, ts, false, file);
|
||||
}
|
||||
|
||||
return decompile_at_label(*guessed_type, label, labels, words, ts, file);
|
||||
return decompile_at_label(*guessed_type, label, labels, words, ts, file, true);
|
||||
} else if (word.kind() == LinkedWord::PLAIN_DATA && word.data == 0) {
|
||||
// do nothing, the default is zero?
|
||||
return pretty_print::to_symbol("0");
|
||||
} else if (word.kind() == LinkedWord::SYM_PTR) {
|
||||
// never quote symbols in a list.
|
||||
return pretty_print::to_symbol(fmt::format("{}", word.symbol_name()));
|
||||
return pretty_print::to_symbol(word.symbol_name());
|
||||
} else if (word.kind() == LinkedWord::EMPTY_PTR) {
|
||||
return pretty_print::to_symbol("'()");
|
||||
} else if (word.kind() == LinkedWord::PLAIN_DATA && (word.data & 0b111) == 0) {
|
||||
@@ -1556,12 +1564,14 @@ goos::Object decompile_pair(const DecompilerLabel& label,
|
||||
const LinkedObjectFile* file) {
|
||||
if ((label.offset % 8) != 2) {
|
||||
if ((label.offset % 4) != 0) {
|
||||
throw std::runtime_error(fmt::format("Invalid alignment for pair {}\n", label.offset % 16));
|
||||
throw std::runtime_error(
|
||||
fmt::format("Invalid alignment for pair {} at {}\n", label.offset % 16, label.name));
|
||||
} else {
|
||||
auto& word = words.at(label.target_segment).at(label.offset / 4);
|
||||
if (word.kind() != LinkedWord::EMPTY_PTR) {
|
||||
throw std::runtime_error(
|
||||
fmt::format("Based on alignment, expected to get empty list for pair, but didn't"));
|
||||
fmt::format("Based on alignment, expected to get empty list for pair at {}, but didn't",
|
||||
label.name));
|
||||
}
|
||||
return pretty_print::to_symbol("'()");
|
||||
}
|
||||
|
||||
@@ -24,7 +24,8 @@ goos::Object decompile_at_label(const TypeSpec& type,
|
||||
const std::vector<DecompilerLabel>& labels,
|
||||
const std::vector<std::vector<LinkedWord>>& words,
|
||||
const TypeSystem& ts,
|
||||
const LinkedObjectFile* file);
|
||||
const LinkedObjectFile* file,
|
||||
bool in_static_pair = false);
|
||||
goos::Object decompile_at_label_with_hint(const LabelInfo& hint,
|
||||
const DecompilerLabel& label,
|
||||
const std::vector<DecompilerLabel>& labels,
|
||||
|
||||
+20
-29
@@ -253,7 +253,7 @@ _mips2c_call_windows:
|
||||
ret
|
||||
|
||||
|
||||
;; Call C++ code on windows, from GOAL. Pug arguments on the stack and put a pointer to this array in the first arg.
|
||||
;; Call C++ code on windows, from GOAL. Put arguments on the stack and put a pointer to this array in the first arg.
|
||||
global _stack_call_win32
|
||||
_stack_call_win32:
|
||||
pop rax
|
||||
@@ -334,18 +334,18 @@ _call_goal_asm_linux:
|
||||
;; RDI - first arg
|
||||
;; RSI - second arg
|
||||
;; RDX - third arg
|
||||
;; RCX - function pointer (goes in r13)
|
||||
;; R8 - st (goes in r14)
|
||||
;; RCX - function pointer
|
||||
;; R8 - st (goes in r14 and r13)
|
||||
;; R9 - off (goes in r15)
|
||||
|
||||
;; set GOAL function pointer
|
||||
mov r13, rcx
|
||||
;; offset
|
||||
mov r14, r8
|
||||
;; set GOAL process
|
||||
mov r13, r8
|
||||
;; symbol table
|
||||
mov r14, r8
|
||||
;; offset
|
||||
mov r15, r9
|
||||
;; call GOAL by function pointer
|
||||
call r13
|
||||
call rcx
|
||||
|
||||
;; retore x86 registers.
|
||||
pop r15
|
||||
@@ -401,8 +401,8 @@ _call_goal_on_stack_asm_linux:
|
||||
;; RDI - stack pointer
|
||||
;; RSI - unused
|
||||
;; RDX - unused
|
||||
;; RCX - function pointer (goes in r13)
|
||||
;; R8 - st (goes in r14)
|
||||
;; RCX - function pointer
|
||||
;; R8 - st (goes in r14 and r13)
|
||||
;; R9 - off (goes in r15)
|
||||
|
||||
;; x86 saved registers we need to modify for GOAL should be saved
|
||||
@@ -418,13 +418,13 @@ _call_goal_on_stack_asm_linux:
|
||||
push rsi
|
||||
|
||||
;; set GOAL function pointer
|
||||
mov r13, rcx
|
||||
;; offset
|
||||
mov r14, r8
|
||||
mov r13, r8
|
||||
;; symbol table
|
||||
mov r14, r8
|
||||
;; offset
|
||||
mov r15, r9
|
||||
;; call GOAL by function pointer
|
||||
call r13
|
||||
call rcx
|
||||
|
||||
;; get old stack pointer
|
||||
pop rsi
|
||||
@@ -472,11 +472,11 @@ _call_goal_asm_win32:
|
||||
mov rdi, rcx ;; rdi is GOAL first argument, rcx is windows first argument
|
||||
mov rsi, rdx ;; rsi is GOAL second argument, rdx is windows second argument
|
||||
mov rdx, r8 ;; rdx is GOAL third argument, r8 is windows third argument
|
||||
mov r13, r9 ;; r13 is GOAL fp, r9 is windows fourth argument
|
||||
mov r15, [rsp + 184] ;; symbol table
|
||||
mov r14, [rsp + 176] ;; offset
|
||||
mov r15, [rsp + 184] ;; offset
|
||||
mov r14, [rsp + 176] ;; symbol table
|
||||
mov r13, r14 ;; r13 is GOAL process, set to #f (same as symbol table) TODO: verify on PS2
|
||||
|
||||
call r13
|
||||
call r9 ;; r9 is GOAL t9, r9 is windows fourth argument (not sure this is correct. maybe rax instead?)
|
||||
|
||||
movups xmm7, [rsp]
|
||||
add rsp, 16
|
||||
@@ -521,15 +521,6 @@ _call_goal8_asm_win32:
|
||||
sub rsp, 16
|
||||
movups [rsp], xmm7
|
||||
|
||||
;; mov rdi, rcx ;; rdi is GOAL first argument, rcx is windows first argument
|
||||
;; mov rsi, rdx ;; rsi is GOAL second argument, rdx is windows second argument
|
||||
;; mov rdx, r8 ;; rdx is GOAL third argument, r8 is windows third argument
|
||||
;; mov r13, r9 ;; r13 is GOAL fp, r9 is windows fourth argument
|
||||
;; mov r15, [rsp + 184] ;; symbol table
|
||||
;; mov r14, [rsp + 176] ;; offset
|
||||
|
||||
;; call r13
|
||||
|
||||
mov r13, r9 ;; pp
|
||||
mov r15, [rsp + 184] ;; symbol table
|
||||
mov r14, [rsp + 176] ;; offset
|
||||
@@ -606,11 +597,11 @@ _call_goal_on_stack_asm_win32:
|
||||
mov rsp, rcx
|
||||
push rsi
|
||||
|
||||
mov r13, rdx ;; fp
|
||||
mov r13, r8 ;; pp
|
||||
mov r14, r8 ;; st
|
||||
mov r15, r9 ;; offset
|
||||
|
||||
call r13
|
||||
call rdx
|
||||
|
||||
;; restore stack
|
||||
pop rsi
|
||||
|
||||
@@ -424,11 +424,13 @@ int ShutdownMachine() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
Ptr<MouseInfo> MouseGetData(Ptr<MouseInfo> mouse) {
|
||||
u32 MouseGetData(u32 _mouse) {
|
||||
// stubbed out in the actual game
|
||||
static double px = 0;
|
||||
static double py = 0;
|
||||
|
||||
auto mouse = Ptr<MouseInfo>(_mouse).c();
|
||||
|
||||
mouse->active = offset_of_s7() + jak2_symbols::FIX_SYM_TRUE;
|
||||
mouse->valid = offset_of_s7() + jak2_symbols::FIX_SYM_TRUE;
|
||||
mouse->status = 1;
|
||||
@@ -442,7 +444,7 @@ Ptr<MouseInfo> MouseGetData(Ptr<MouseInfo> mouse) {
|
||||
mouse->deltay = last_cursor_y_position - py;
|
||||
px = last_cursor_x_position;
|
||||
py = last_cursor_y_position;
|
||||
return mouse;
|
||||
return _mouse;
|
||||
}
|
||||
|
||||
/*!
|
||||
|
||||
@@ -969,12 +969,10 @@
|
||||
;;;; user stuf
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
(defmacro __get-user ()
|
||||
(defmacro get-user ()
|
||||
`(quote ,*user*)
|
||||
)
|
||||
|
||||
(defconstant *user* (__get-user))
|
||||
|
||||
(defmacro user? (&rest users)
|
||||
(cond
|
||||
((null? users) #f)
|
||||
|
||||
@@ -1013,7 +1013,6 @@
|
||||
)
|
||||
)
|
||||
(-> arg0 value)
|
||||
(none)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -3357,8 +3356,8 @@
|
||||
(flag "Use menu subdiv" *artist-use-menu-subdiv* dm-boolean-toggle-pick-func)
|
||||
(float-var "Subdiv Close" close dm-subdiv-float 10 1 #t 1 200 1)
|
||||
(float-var "Subdiv Far" far dm-subdiv-float 10 1 #t 1 200 1)
|
||||
(function "Target Start" #f (lambda () (start 'debug (get-or-create-continue! *game-info*))))
|
||||
(function "Target Stop" #f (lambda () (stop 'debug)))
|
||||
(function "Target Start" #f ,(lambda () (start 'debug (get-or-create-continue! *game-info*))))
|
||||
(function "Target Stop" #f ,(lambda () (stop 'debug)))
|
||||
(menu
|
||||
"Anim Tester"
|
||||
(int-var "Speed" anim-speed dm-subdiv-int 10 10 #t -300 1000)
|
||||
@@ -3387,34 +3386,34 @@
|
||||
(function
|
||||
"New Game"
|
||||
#f
|
||||
(lambda () (initialize! *game-info* 'game (the-as game-save #f) (the-as string #f)) (none))
|
||||
,(lambda () (initialize! *game-info* 'game (the-as game-save #f) (the-as string #f)) (none))
|
||||
)
|
||||
(function
|
||||
"New Life"
|
||||
#f
|
||||
(lambda () (initialize! *game-info* 'die (the-as game-save #f) (the-as string #f)) (none))
|
||||
,(lambda () (initialize! *game-info* 'die (the-as game-save #f) (the-as string #f)) (none))
|
||||
)
|
||||
(function
|
||||
"Reset Game"
|
||||
#f
|
||||
(lambda ()
|
||||
(set! (-> *game-info* mode) 'debug)
|
||||
(initialize! *game-info* 'game (the-as game-save #f) (the-as string #f))
|
||||
(none)
|
||||
)
|
||||
,(lambda ()
|
||||
(set! (-> *game-info* mode) 'debug)
|
||||
(initialize! *game-info* 'game (the-as game-save #f) (the-as string #f))
|
||||
(none)
|
||||
)
|
||||
)
|
||||
(function "Reset Actors" #f (lambda () (reset-actors 'debug) (none)))
|
||||
(function "Save Game" #f (lambda () (auto-save-command 'save 0 0 *default-pool*) (none)))
|
||||
(function "Load Game" #f (lambda () (auto-save-command 'restore 0 0 *default-pool*) (none)))
|
||||
(flag "Target" #f (lambda ((arg0 int) (arg1 debug-menu-msg))
|
||||
(when (= arg1 (debug-menu-msg press))
|
||||
(if *target*
|
||||
(stop 'debug)
|
||||
(start 'debug (get-or-create-continue! *game-info*))
|
||||
)
|
||||
)
|
||||
*target*
|
||||
)
|
||||
(function "Reset Actors" #f ,(lambda () (reset-actors 'debug) (none)))
|
||||
(function "Save Game" #f ,(lambda () (auto-save-command 'save 0 0 *default-pool*) (none)))
|
||||
(function "Load Game" #f ,(lambda () (auto-save-command 'restore 0 0 *default-pool*) (none)))
|
||||
(flag "Target" #f ,(lambda ((arg0 int) (arg1 debug-menu-msg))
|
||||
(when (= arg1 (debug-menu-msg press))
|
||||
(if *target*
|
||||
(stop 'debug)
|
||||
(start 'debug (get-or-create-continue! *game-info*))
|
||||
)
|
||||
)
|
||||
*target*
|
||||
)
|
||||
)
|
||||
(flag "Game Mode" play dm-game-mode-pick-func)
|
||||
(flag "Debug Mode" debug dm-game-mode-pick-func)
|
||||
@@ -3424,19 +3423,19 @@
|
||||
(float-var
|
||||
"sfx-volume"
|
||||
#f
|
||||
(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float))
|
||||
(cond
|
||||
((= arg1 (debug-menu-msg press))
|
||||
(let ((f0-0 arg2))
|
||||
(set! (-> *setting-control* default sfx-volume) f0-0)
|
||||
f0-0
|
||||
,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float))
|
||||
(cond
|
||||
((= arg1 (debug-menu-msg press))
|
||||
(let ((f0-0 arg2))
|
||||
(set! (-> *setting-control* default sfx-volume) f0-0)
|
||||
f0-0
|
||||
)
|
||||
)
|
||||
(else
|
||||
(-> *setting-control* default sfx-volume)
|
||||
)
|
||||
)
|
||||
(else
|
||||
(-> *setting-control* default sfx-volume)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
2
|
||||
1
|
||||
#t
|
||||
@@ -3447,19 +3446,19 @@
|
||||
(float-var
|
||||
"music-volume"
|
||||
#f
|
||||
(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float))
|
||||
(cond
|
||||
((= arg1 (debug-menu-msg press))
|
||||
(let ((f0-0 arg2))
|
||||
(set! (-> *setting-control* default music-volume) f0-0)
|
||||
f0-0
|
||||
,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float))
|
||||
(cond
|
||||
((= arg1 (debug-menu-msg press))
|
||||
(let ((f0-0 arg2))
|
||||
(set! (-> *setting-control* default music-volume) f0-0)
|
||||
f0-0
|
||||
)
|
||||
)
|
||||
(else
|
||||
(-> *setting-control* default music-volume)
|
||||
)
|
||||
)
|
||||
(else
|
||||
(-> *setting-control* default music-volume)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
2
|
||||
1
|
||||
#t
|
||||
@@ -3470,19 +3469,19 @@
|
||||
(float-var
|
||||
"dialog-volume"
|
||||
#f
|
||||
(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float))
|
||||
(cond
|
||||
((= arg1 (debug-menu-msg press))
|
||||
(let ((f0-0 arg2))
|
||||
(set! (-> *setting-control* default dialog-volume) f0-0)
|
||||
f0-0
|
||||
,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float))
|
||||
(cond
|
||||
((= arg1 (debug-menu-msg press))
|
||||
(let ((f0-0 arg2))
|
||||
(set! (-> *setting-control* default dialog-volume) f0-0)
|
||||
f0-0
|
||||
)
|
||||
)
|
||||
(else
|
||||
(-> *setting-control* default dialog-volume)
|
||||
)
|
||||
)
|
||||
(else
|
||||
(-> *setting-control* default dialog-volume)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
2
|
||||
1
|
||||
#t
|
||||
@@ -3503,32 +3502,32 @@
|
||||
(flag
|
||||
"play-hints "
|
||||
#f
|
||||
(lambda ((arg0 int) (arg1 debug-menu-msg))
|
||||
(if (= arg1 (debug-menu-msg press))
|
||||
(set! (-> *setting-control* default play-hints) (not (-> *setting-control* default play-hints)))
|
||||
)
|
||||
(-> *setting-control* default play-hints)
|
||||
)
|
||||
,(lambda ((arg0 int) (arg1 debug-menu-msg))
|
||||
(if (= arg1 (debug-menu-msg press))
|
||||
(set! (-> *setting-control* default play-hints) (not (-> *setting-control* default play-hints)))
|
||||
)
|
||||
(-> *setting-control* default play-hints)
|
||||
)
|
||||
)
|
||||
(flag
|
||||
"vibration"
|
||||
#f
|
||||
(lambda ((arg0 int) (arg1 debug-menu-msg))
|
||||
(if (= arg1 (debug-menu-msg press))
|
||||
(set! (-> *setting-control* default vibration) (not (-> *setting-control* default vibration)))
|
||||
)
|
||||
(-> *setting-control* default vibration)
|
||||
)
|
||||
,(lambda ((arg0 int) (arg1 debug-menu-msg))
|
||||
(if (= arg1 (debug-menu-msg press))
|
||||
(set! (-> *setting-control* default vibration) (not (-> *setting-control* default vibration)))
|
||||
)
|
||||
(-> *setting-control* default vibration)
|
||||
)
|
||||
)
|
||||
(flag
|
||||
"border-mode"
|
||||
#f
|
||||
(lambda ((arg0 int) (arg1 debug-menu-msg))
|
||||
(if (= arg1 (debug-menu-msg press))
|
||||
(set! (-> *setting-control* default border-mode) (not (-> *setting-control* default border-mode)))
|
||||
)
|
||||
(-> *setting-control* default border-mode)
|
||||
)
|
||||
,(lambda ((arg0 int) (arg1 debug-menu-msg))
|
||||
(if (= arg1 (debug-menu-msg press))
|
||||
(set! (-> *setting-control* default border-mode) (not (-> *setting-control* default border-mode)))
|
||||
)
|
||||
(-> *setting-control* default border-mode)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -3696,7 +3695,7 @@
|
||||
'(menu
|
||||
"Actor"
|
||||
(flag "Spawn Actors" *spawn-actors* dm-boolean-toggle-pick-func)
|
||||
(function "Reset Actors" #f (lambda () (reset-actors 'debug) (none)))
|
||||
(function "Reset Actors" #f ,(lambda () (reset-actors 'debug) (none)))
|
||||
(menu
|
||||
"Actor Compaction"
|
||||
(flag "off" #f dm-compact-actor-pick-func)
|
||||
@@ -3738,63 +3737,63 @@
|
||||
'(menu
|
||||
"Target"
|
||||
(flag "Target Stats" *stats-target* dm-boolean-toggle-pick-func)
|
||||
(function "Play" #f (lambda () (play #t #t)))
|
||||
(function "Start" #f (lambda () (the-as int (start 'debug (get-or-create-continue! *game-info*)))))
|
||||
(function "Stop" #f (lambda () (stop 'debug)))
|
||||
(function "Play" #f ,(lambda () (play #t #t)))
|
||||
(function "Start" #f ,(lambda () (the-as int (start 'debug (get-or-create-continue! *game-info*)))))
|
||||
(function "Stop" #f ,(lambda () (stop 'debug)))
|
||||
(flag
|
||||
"Invulnerable"
|
||||
#f
|
||||
(lambda ((arg0 int) (arg1 debug-menu-msg))
|
||||
(when (= arg1 (debug-menu-msg press))
|
||||
(if *target*
|
||||
(logxor! (-> *target* state-flags) (state-flags invulnerable))
|
||||
)
|
||||
)
|
||||
(the-as symbol (and *target* (logtest? (-> *target* state-flags) (state-flags invulnerable))))
|
||||
)
|
||||
,(lambda ((arg0 int) (arg1 debug-menu-msg))
|
||||
(when (= arg1 (debug-menu-msg press))
|
||||
(if *target*
|
||||
(logxor! (-> *target* state-flags) (state-flags invulnerable))
|
||||
)
|
||||
)
|
||||
(the-as symbol (and *target* (logtest? (-> *target* state-flags) (state-flags invulnerable))))
|
||||
)
|
||||
)
|
||||
(function
|
||||
"Reset Trans"
|
||||
#f
|
||||
(lambda () (when *target*
|
||||
(position-in-front-of-camera! (target-pos 0) (the-as float 40960.0) (the-as float 4096.0))
|
||||
(set! (-> *target* control transv quad) (the-as uint128 0))
|
||||
(quaternion-identity! (-> *target* control quat))
|
||||
(quaternion-identity! (-> *target* control unknown-quaternion00))
|
||||
(quaternion-identity! (-> *target* control dir-targ))
|
||||
)
|
||||
)
|
||||
,(lambda () (when *target*
|
||||
(position-in-front-of-camera! (target-pos 0) (the-as float 40960.0) (the-as float 4096.0))
|
||||
(set! (-> *target* control transv quad) (the-as uint128 0))
|
||||
(quaternion-identity! (-> *target* control quat))
|
||||
(quaternion-identity! (-> *target* control unknown-quaternion00))
|
||||
(quaternion-identity! (-> *target* control dir-targ))
|
||||
)
|
||||
)
|
||||
)
|
||||
(function "Zero Trans" #f (lambda () (when *target*
|
||||
(set-vector! (-> *target* control trans) 0.0 163840.0 0.0 1.0)
|
||||
(set! (-> *target* control transv quad) (the-as uint128 0))
|
||||
(quaternion-identity! (-> *target* control quat))
|
||||
(quaternion-identity! (-> *target* control unknown-quaternion00))
|
||||
(quaternion-identity! (-> *target* control dir-targ))
|
||||
)
|
||||
)
|
||||
(function "Zero Trans" #f ,(lambda () (when *target*
|
||||
(set-vector! (-> *target* control trans) 0.0 163840.0 0.0 1.0)
|
||||
(set! (-> *target* control transv quad) (the-as uint128 0))
|
||||
(quaternion-identity! (-> *target* control quat))
|
||||
(quaternion-identity! (-> *target* control unknown-quaternion00))
|
||||
(quaternion-identity! (-> *target* control dir-targ))
|
||||
)
|
||||
)
|
||||
)
|
||||
(menu
|
||||
"Mode"
|
||||
(function "normal" #f (lambda () (send-event *target* 'end-mode)))
|
||||
(function "racing" #f (lambda () (send-event *target* 'change-mode 'racing #f)))
|
||||
(function "snowball" #f (lambda () (send-event *target* 'change-mode 'snowball #f)))
|
||||
(function "normal" #f ,(lambda () (send-event *target* 'end-mode)))
|
||||
(function "racing" #f ,(lambda () (send-event *target* 'change-mode 'racing #f)))
|
||||
(function "snowball" #f ,(lambda () (send-event *target* 'change-mode 'snowball #f)))
|
||||
)
|
||||
(flag "Slow Frame Rate" *slow-frame-rate* dm-boolean-toggle-pick-func)
|
||||
(function "Print Pos" #f (lambda ()
|
||||
(let ((v1-0 (target-pos 0)))
|
||||
(format #t "~6,,2m ~6,,2m ~6,,2m~%" (-> v1-0 x) (-> v1-0 y) (-> v1-0 z))
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
(function "Print Pos" #f ,(lambda ()
|
||||
(let ((v1-0 (target-pos 0)))
|
||||
(format #t "~6,,2m ~6,,2m ~6,,2m~%" (-> v1-0 x) (-> v1-0 y) (-> v1-0 z))
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
)
|
||||
(function "Save Continue" #f (lambda ()
|
||||
(if *target*
|
||||
(trsq->continue-point (-> *target* control))
|
||||
)
|
||||
(none)
|
||||
)
|
||||
(function "Save Continue" #f ,(lambda ()
|
||||
(if *target*
|
||||
(trsq->continue-point (-> *target* control))
|
||||
)
|
||||
(none)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -3856,7 +3855,7 @@
|
||||
(flag "Amb Snd Class" *ambient-sound-class* dm-boolean-toggle-pick-func)
|
||||
(flag "Amb Spheres" *execute-ambients* dm-boolean-toggle-pick-func)
|
||||
(flag "Sound channels" *display-iop-info* dm-boolean-toggle-pick-func)
|
||||
(function "List Sounds" #f (lambda () (list-sounds)))
|
||||
(function "List Sounds" #f ,(lambda () (list-sounds)))
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -3875,48 +3874,48 @@
|
||||
'(main-menu
|
||||
"Popup"
|
||||
(flag "Cam 1" pad-1 dm-cam-externalize)
|
||||
(flag "Target" #f (lambda ((arg0 int) (arg1 debug-menu-msg))
|
||||
(when (= arg1 (debug-menu-msg press))
|
||||
(if *target*
|
||||
(stop 'debug)
|
||||
(start 'debug (get-or-create-continue! *game-info*))
|
||||
)
|
||||
)
|
||||
*target*
|
||||
)
|
||||
)
|
||||
(flag "Game" #f (lambda ((arg0 int) (arg1 debug-menu-msg))
|
||||
(when (= arg1 (debug-menu-msg press))
|
||||
(let ((v1-3 (-> *game-info* mode)))
|
||||
(set! (-> *game-info* mode) (cond
|
||||
((= v1-3 'play)
|
||||
'debug
|
||||
)
|
||||
((= v1-3 'debug)
|
||||
'play
|
||||
)
|
||||
(else
|
||||
(-> *game-info* mode)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(= (-> *game-info* mode) 'play)
|
||||
)
|
||||
)
|
||||
(function "Clean" #f (lambda ((arg0 int) (arg1 debug-menu-msg))
|
||||
(if (time-of-day-setup #f)
|
||||
(time-of-day-setup #t)
|
||||
(flag "Target" #f ,(lambda ((arg0 int) (arg1 debug-menu-msg))
|
||||
(when (= arg1 (debug-menu-msg press))
|
||||
(if *target*
|
||||
(stop 'debug)
|
||||
(start 'debug (get-or-create-continue! *game-info*))
|
||||
)
|
||||
(set! *display-entity-errors* #f)
|
||||
(set! *display-profile* #f)
|
||||
(set! *display-actor-marks* #f)
|
||||
#f
|
||||
)
|
||||
*target*
|
||||
)
|
||||
)
|
||||
(flag "Game" #f ,(lambda ((arg0 int) (arg1 debug-menu-msg))
|
||||
(when (= arg1 (debug-menu-msg press))
|
||||
(let ((v1-3 (-> *game-info* mode)))
|
||||
(set! (-> *game-info* mode) (cond
|
||||
((= v1-3 'play)
|
||||
'debug
|
||||
)
|
||||
((= v1-3 'debug)
|
||||
'play
|
||||
)
|
||||
(else
|
||||
(-> *game-info* mode)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(= (-> *game-info* mode) 'play)
|
||||
)
|
||||
)
|
||||
(function "Clean" #f ,(lambda ((arg0 int) (arg1 debug-menu-msg))
|
||||
(if (time-of-day-setup #f)
|
||||
(time-of-day-setup #t)
|
||||
)
|
||||
(set! *display-entity-errors* #f)
|
||||
(set! *display-profile* #f)
|
||||
(set! *display-actor-marks* #f)
|
||||
#f
|
||||
)
|
||||
)
|
||||
(flag "Stats" *stats-target* dm-boolean-toggle-pick-func)
|
||||
(function "Reset" #f (lambda () (reset-actors 'debug) (none)))
|
||||
(function "Reset" #f ,(lambda () (reset-actors 'debug) (none)))
|
||||
)
|
||||
)
|
||||
arg0
|
||||
@@ -4542,155 +4541,155 @@
|
||||
'(menu "PC Settings"
|
||||
(flag "Debug" #f ,(dm-lambda-boolean-flag (-> *pc-settings* debug?)))
|
||||
(flag "Use native vis" #f ,(dm-lambda-boolean-flag (-> *pc-settings* use-vis?)))
|
||||
(function "Toggle game aspect" #f (lambda ()
|
||||
(cond
|
||||
((= (-> *setting-control* default aspect-ratio) 'aspect4x3)
|
||||
(set! (-> *setting-control* default aspect-ratio) 'aspect16x9)
|
||||
(function "Toggle game aspect" #f ,(lambda ()
|
||||
(cond
|
||||
((= (-> *setting-control* default aspect-ratio) 'aspect4x3)
|
||||
(set! (-> *setting-control* default aspect-ratio) 'aspect16x9)
|
||||
)
|
||||
(else
|
||||
(set! (-> *setting-control* default aspect-ratio) 'aspect4x3)
|
||||
)
|
||||
)
|
||||
(else
|
||||
(set! (-> *setting-control* default aspect-ratio) 'aspect4x3)
|
||||
)
|
||||
)
|
||||
(set-aspect-ratio (-> *setting-control* default aspect-ratio))
|
||||
))
|
||||
(set-aspect-ratio (-> *setting-control* default aspect-ratio))
|
||||
))
|
||||
(flag "Auto aspect" #f ,(dm-lambda-boolean-flag (-> *pc-settings* aspect-ratio-auto?)))
|
||||
(menu "Aspect test"
|
||||
(function "4 x 3" #f (lambda () (set-aspect! *pc-settings* 4 3)))
|
||||
(function "16 x 9" #f (lambda () (set-aspect! *pc-settings* 16 9)))
|
||||
(function "64 x 27 (21:9)" #f (lambda () (set-aspect! *pc-settings* 64 27)))
|
||||
(function "16 x 10" #f (lambda () (set-aspect! *pc-settings* 16 10)))
|
||||
(function "2 x 1" #f (lambda () (set-aspect! *pc-settings* 2 1)))
|
||||
(function "37 x 20" #f (lambda () (set-aspect! *pc-settings* 37 20)))
|
||||
(function "21 x 9" #f (lambda () (set-aspect! *pc-settings* 21 9)))
|
||||
(function "64 x 18" #f (lambda () (set-aspect! *pc-settings* 64 18)))
|
||||
(function "4 x 3" #f ,(lambda () (set-aspect! *pc-settings* 4 3)))
|
||||
(function "16 x 9" #f ,(lambda () (set-aspect! *pc-settings* 16 9)))
|
||||
(function "64 x 27 (21:9)" #f ,(lambda () (set-aspect! *pc-settings* 64 27)))
|
||||
(function "16 x 10" #f ,(lambda () (set-aspect! *pc-settings* 16 10)))
|
||||
(function "2 x 1" #f ,(lambda () (set-aspect! *pc-settings* 2 1)))
|
||||
(function "37 x 20" #f ,(lambda () (set-aspect! *pc-settings* 37 20)))
|
||||
(function "21 x 9" #f ,(lambda () (set-aspect! *pc-settings* 21 9)))
|
||||
(function "64 x 18" #f ,(lambda () (set-aspect! *pc-settings* 64 18)))
|
||||
(int-var "Custom aspect X" #f ,(dm-lambda-int-var (-> *pc-settings* aspect-custom-x)) 20 1 #t 1 1000)
|
||||
(int-var "Custom aspect Y" #f ,(dm-lambda-int-var (-> *pc-settings* aspect-custom-y)) 20 1 #t 1 1000)
|
||||
(function "Custom" #f (lambda () (set-aspect! *pc-settings* (-> *pc-settings* aspect-custom-x) (-> *pc-settings* aspect-custom-y))))
|
||||
(function "Custom" #f ,(lambda () (set-aspect! *pc-settings* (-> *pc-settings* aspect-custom-x) (-> *pc-settings* aspect-custom-y))))
|
||||
)
|
||||
(menu "Fullscreen"
|
||||
(function "Windowed" #f (lambda () (set-display-mode! *pc-settings* 'windowed)))
|
||||
(function "Fullscreen" #f (lambda () (set-display-mode! *pc-settings* 'fullscreen)))
|
||||
(function "Borderless" #f (lambda () (set-display-mode! *pc-settings* 'borderless)))
|
||||
(function "Windowed" #f ,(lambda () (set-display-mode! *pc-settings* 'windowed)))
|
||||
(function "Fullscreen" #f ,(lambda () (set-display-mode! *pc-settings* 'fullscreen)))
|
||||
(function "Borderless" #f ,(lambda () (set-display-mode! *pc-settings* 'borderless)))
|
||||
)
|
||||
(menu "Sizes"
|
||||
(function "640 x 480" #f (lambda () (set-size! *pc-settings* 640 480)))
|
||||
(function "640 x 360" #f (lambda () (set-size! *pc-settings* 640 360)))
|
||||
(function "720 x 540" #f (lambda () (set-size! *pc-settings* 720 540)))
|
||||
(function "960 x 540" #f (lambda () (set-size! *pc-settings* 960 540)))
|
||||
(function "800 x 600" #f (lambda () (set-size! *pc-settings* 800 600)))
|
||||
(function "960 x 720" #f (lambda () (set-size! *pc-settings* 960 720)))
|
||||
(function "1280 x 720" #f (lambda () (set-size! *pc-settings* 1280 720)))
|
||||
(function "1024 x 768" #f (lambda () (set-size! *pc-settings* 1024 768)))
|
||||
(function "1366 x 768" #f (lambda () (set-size! *pc-settings* 1366 768)))
|
||||
(function "1280 x 960" #f (lambda () (set-size! *pc-settings* 1280 960)))
|
||||
(function "1440 x 1080" #f (lambda () (set-size! *pc-settings* 1440 1080)))
|
||||
(function "1920 x 1080" #f (lambda () (set-size! *pc-settings* 1920 1080)))
|
||||
(function "1920 x 1440" #f (lambda () (set-size! *pc-settings* 1920 1440)))
|
||||
(function "2560 x 1440" #f (lambda () (set-size! *pc-settings* 2560 1440)))
|
||||
(function "2880 x 2160" #f (lambda () (set-size! *pc-settings* 2880 2160)))
|
||||
(function "3840 x 2160" #f (lambda () (set-size! *pc-settings* 3840 2160)))
|
||||
(function "512 x 224" #f (lambda () (set-size! *pc-settings* 512 224)))
|
||||
(function "512 x 256" #f (lambda () (set-size! *pc-settings* 512 256)))
|
||||
(function "512 x 448" #f (lambda () (set-size! *pc-settings* 512 448)))
|
||||
(function "512 x 512" #f (lambda () (set-size! *pc-settings* 512 512)))
|
||||
(function "640 x 480" #f ,(lambda () (set-size! *pc-settings* 640 480)))
|
||||
(function "640 x 360" #f ,(lambda () (set-size! *pc-settings* 640 360)))
|
||||
(function "720 x 540" #f ,(lambda () (set-size! *pc-settings* 720 540)))
|
||||
(function "960 x 540" #f ,(lambda () (set-size! *pc-settings* 960 540)))
|
||||
(function "800 x 600" #f ,(lambda () (set-size! *pc-settings* 800 600)))
|
||||
(function "960 x 720" #f ,(lambda () (set-size! *pc-settings* 960 720)))
|
||||
(function "1280 x 720" #f ,(lambda () (set-size! *pc-settings* 1280 720)))
|
||||
(function "1024 x 768" #f ,(lambda () (set-size! *pc-settings* 1024 768)))
|
||||
(function "1366 x 768" #f ,(lambda () (set-size! *pc-settings* 1366 768)))
|
||||
(function "1280 x 960" #f ,(lambda () (set-size! *pc-settings* 1280 960)))
|
||||
(function "1440 x 1080" #f ,(lambda () (set-size! *pc-settings* 1440 1080)))
|
||||
(function "1920 x 1080" #f ,(lambda () (set-size! *pc-settings* 1920 1080)))
|
||||
(function "1920 x 1440" #f ,(lambda () (set-size! *pc-settings* 1920 1440)))
|
||||
(function "2560 x 1440" #f ,(lambda () (set-size! *pc-settings* 2560 1440)))
|
||||
(function "2880 x 2160" #f ,(lambda () (set-size! *pc-settings* 2880 2160)))
|
||||
(function "3840 x 2160" #f ,(lambda () (set-size! *pc-settings* 3840 2160)))
|
||||
(function "512 x 224" #f ,(lambda () (set-size! *pc-settings* 512 224)))
|
||||
(function "512 x 256" #f ,(lambda () (set-size! *pc-settings* 512 256)))
|
||||
(function "512 x 448" #f ,(lambda () (set-size! *pc-settings* 512 448)))
|
||||
(function "512 x 512" #f ,(lambda () (set-size! *pc-settings* 512 512)))
|
||||
)
|
||||
(menu "Secrets"
|
||||
(menu "PC cheats"
|
||||
(flag "Big head jak" #f (lambda (arg (msg debug-menu-msg))
|
||||
(when (= msg (debug-menu-msg press))
|
||||
(pc-cheat-toggle-and-tune (-> *pc-settings* cheats) big-head)
|
||||
)
|
||||
(pc-cheats? (-> *pc-settings* cheats) big-head)))
|
||||
(flag "Small head jak" #f (lambda (arg (msg debug-menu-msg))
|
||||
(when (= msg (debug-menu-msg press))
|
||||
(pc-cheat-toggle-and-tune (-> *pc-settings* cheats) small-head)
|
||||
)
|
||||
(pc-cheats? (-> *pc-settings* cheats) small-head)))
|
||||
(flag "Big fist jak" #f (lambda (arg (msg debug-menu-msg))
|
||||
(when (= msg (debug-menu-msg press))
|
||||
(pc-cheat-toggle-and-tune (-> *pc-settings* cheats) big-fist)
|
||||
)
|
||||
(pc-cheats? (-> *pc-settings* cheats) big-fist)))
|
||||
(flag "Big head npcs" #f (lambda (arg (msg debug-menu-msg))
|
||||
(when (= msg (debug-menu-msg press))
|
||||
(pc-cheat-toggle-and-tune (-> *pc-settings* cheats) big-head-npc)
|
||||
)
|
||||
(pc-cheats? (-> *pc-settings* cheats) big-head-npc)))
|
||||
(flag "Huge head jak" #f (lambda (arg (msg debug-menu-msg))
|
||||
(when (= msg (debug-menu-msg press))
|
||||
(pc-cheat-toggle-and-tune (-> *pc-settings* cheats) huge-head)
|
||||
)
|
||||
(pc-cheats? (-> *pc-settings* cheats) huge-head)))
|
||||
(flag "Mirrored mode" #f (lambda (arg (msg debug-menu-msg))
|
||||
(when (= msg (debug-menu-msg press))
|
||||
(pc-cheat-toggle-and-tune (-> *pc-settings* cheats) mirror)
|
||||
)
|
||||
(pc-cheats? (-> *pc-settings* cheats) mirror)))
|
||||
(flag "Blue eco" #f (lambda (arg (msg debug-menu-msg))
|
||||
(when (= msg (debug-menu-msg press))
|
||||
(logclear! (-> *pc-settings* cheats) (pc-cheats eco-red eco-yellow eco-green))
|
||||
(pc-cheat-toggle-and-tune (-> *pc-settings* cheats) eco-blue)
|
||||
)
|
||||
(pc-cheats? (-> *pc-settings* cheats) eco-blue)))
|
||||
(flag "Red eco" #f (lambda (arg (msg debug-menu-msg))
|
||||
(when (= msg (debug-menu-msg press))
|
||||
(logclear! (-> *pc-settings* cheats) (pc-cheats eco-blue eco-yellow eco-green))
|
||||
(pc-cheat-toggle-and-tune (-> *pc-settings* cheats) eco-red)
|
||||
)
|
||||
(pc-cheats? (-> *pc-settings* cheats) eco-red)))
|
||||
(flag "Green eco" #f (lambda (arg (msg debug-menu-msg))
|
||||
(flag "Big head jak" #f ,(lambda (arg (msg debug-menu-msg))
|
||||
(when (= msg (debug-menu-msg press))
|
||||
(pc-cheat-toggle-and-tune (-> *pc-settings* cheats) big-head)
|
||||
)
|
||||
(pc-cheats? (-> *pc-settings* cheats) big-head)))
|
||||
(flag "Small head jak" #f ,(lambda (arg (msg debug-menu-msg))
|
||||
(when (= msg (debug-menu-msg press))
|
||||
(pc-cheat-toggle-and-tune (-> *pc-settings* cheats) small-head)
|
||||
)
|
||||
(pc-cheats? (-> *pc-settings* cheats) small-head)))
|
||||
(flag "Big fist jak" #f ,(lambda (arg (msg debug-menu-msg))
|
||||
(when (= msg (debug-menu-msg press))
|
||||
(pc-cheat-toggle-and-tune (-> *pc-settings* cheats) big-fist)
|
||||
)
|
||||
(pc-cheats? (-> *pc-settings* cheats) big-fist)))
|
||||
(flag "Big head npcs" #f ,(lambda (arg (msg debug-menu-msg))
|
||||
(when (= msg (debug-menu-msg press))
|
||||
(pc-cheat-toggle-and-tune (-> *pc-settings* cheats) big-head-npc)
|
||||
)
|
||||
(pc-cheats? (-> *pc-settings* cheats) big-head-npc)))
|
||||
(flag "Huge head jak" #f ,(lambda (arg (msg debug-menu-msg))
|
||||
(when (= msg (debug-menu-msg press))
|
||||
(pc-cheat-toggle-and-tune (-> *pc-settings* cheats) huge-head)
|
||||
)
|
||||
(pc-cheats? (-> *pc-settings* cheats) huge-head)))
|
||||
(flag "Mirrored mode" #f ,(lambda (arg (msg debug-menu-msg))
|
||||
(when (= msg (debug-menu-msg press))
|
||||
(pc-cheat-toggle-and-tune (-> *pc-settings* cheats) mirror)
|
||||
)
|
||||
(pc-cheats? (-> *pc-settings* cheats) mirror)))
|
||||
(flag "Blue eco" #f ,(lambda (arg (msg debug-menu-msg))
|
||||
(when (= msg (debug-menu-msg press))
|
||||
(logclear! (-> *pc-settings* cheats) (pc-cheats eco-red eco-yellow eco-blue))
|
||||
(pc-cheat-toggle-and-tune (-> *pc-settings* cheats) eco-green)
|
||||
(logclear! (-> *pc-settings* cheats) (pc-cheats eco-red eco-yellow eco-green))
|
||||
(pc-cheat-toggle-and-tune (-> *pc-settings* cheats) eco-blue)
|
||||
)
|
||||
(pc-cheats? (-> *pc-settings* cheats) eco-blue)))
|
||||
(flag "Red eco" #f ,(lambda (arg (msg debug-menu-msg))
|
||||
(when (= msg (debug-menu-msg press))
|
||||
(logclear! (-> *pc-settings* cheats) (pc-cheats eco-blue eco-yellow eco-green))
|
||||
(pc-cheat-toggle-and-tune (-> *pc-settings* cheats) eco-red)
|
||||
)
|
||||
(pc-cheats? (-> *pc-settings* cheats) eco-green)))
|
||||
(flag "Yellow eco" #f (lambda (arg (msg debug-menu-msg))
|
||||
(pc-cheats? (-> *pc-settings* cheats) eco-red)))
|
||||
(flag "Green eco" #f ,(lambda (arg (msg debug-menu-msg))
|
||||
(when (= msg (debug-menu-msg press))
|
||||
(logclear! (-> *pc-settings* cheats) (pc-cheats eco-red eco-blue eco-green))
|
||||
(pc-cheat-toggle-and-tune (-> *pc-settings* cheats) eco-yellow)
|
||||
)
|
||||
(pc-cheats? (-> *pc-settings* cheats) eco-yellow)))
|
||||
(flag "Invincibility" #f (lambda (arg (msg debug-menu-msg))
|
||||
(when (= msg (debug-menu-msg press))
|
||||
(logclear! (-> *target* state-flags) 16)
|
||||
(pc-cheat-toggle-and-tune (-> *pc-settings* cheats) invinc)
|
||||
)
|
||||
(pc-cheats? (-> *pc-settings* cheats) invinc)))
|
||||
(flag "Blue sidekick" #f (lambda (arg (msg debug-menu-msg))
|
||||
(when (= msg (debug-menu-msg press))
|
||||
(pc-cheat-toggle-and-tune (-> *pc-settings* cheats) sidekick-blue)
|
||||
)
|
||||
(pc-cheats? (-> *pc-settings* cheats) sidekick-blue)))
|
||||
(flag "All flavas" #f (lambda (arg (msg debug-menu-msg))
|
||||
(when (= msg (debug-menu-msg press))
|
||||
(pc-cheat-toggle-and-tune (-> *pc-settings* cheats) tunes)
|
||||
)
|
||||
(pc-cheats? (-> *pc-settings* cheats) tunes)))
|
||||
(flag "Real time tod" #f (lambda (arg (msg debug-menu-msg))
|
||||
(when (= msg (debug-menu-msg press))
|
||||
(pc-cheat-toggle-and-tune (-> *pc-settings* cheats) sky)
|
||||
)
|
||||
(pc-cheats? (-> *pc-settings* cheats) sky)))
|
||||
(flag "No textures" #f (lambda (arg (msg debug-menu-msg))
|
||||
(when (= msg (debug-menu-msg press))
|
||||
(pc-cheat-toggle-and-tune (-> *pc-settings* cheats) no-tex)
|
||||
)
|
||||
(pc-cheats? (-> *pc-settings* cheats) no-tex)))
|
||||
(flag "Boods" #f (lambda (arg (msg debug-menu-msg))
|
||||
(when (= msg (debug-menu-msg press))
|
||||
(pc-cheat-toggle-and-tune (-> *pc-settings* cheats) oh-my-goodness)
|
||||
)
|
||||
(pc-cheats? (-> *pc-settings* cheats) oh-my-goodness)))
|
||||
;; (flag "Hard rats" #f (lambda (arg (msg debug-menu-msg))
|
||||
;; (when (= msg (debug-menu-msg press))
|
||||
;; (pc-cheat-toggle-and-tune (-> *pc-settings* cheats) hard-rats)
|
||||
;; )
|
||||
;; (pc-cheats? (-> *pc-settings* cheats) hard-rats)))
|
||||
;; (flag "Hero mode" #f (lambda (arg (msg debug-menu-msg))
|
||||
;; (when (= msg (debug-menu-msg press))
|
||||
;; (pc-cheat-toggle-and-tune (-> *pc-settings* cheats) hero-mode)
|
||||
;; )
|
||||
;; (pc-cheats? (-> *pc-settings* cheats) hero-mode)))
|
||||
(logclear! (-> *pc-settings* cheats) (pc-cheats eco-red eco-yellow eco-blue))
|
||||
(pc-cheat-toggle-and-tune (-> *pc-settings* cheats) eco-green)
|
||||
)
|
||||
(pc-cheats? (-> *pc-settings* cheats) eco-green)))
|
||||
(flag "Yellow eco" #f ,(lambda (arg (msg debug-menu-msg))
|
||||
(when (= msg (debug-menu-msg press))
|
||||
(logclear! (-> *pc-settings* cheats) (pc-cheats eco-red eco-blue eco-green))
|
||||
(pc-cheat-toggle-and-tune (-> *pc-settings* cheats) eco-yellow)
|
||||
)
|
||||
(pc-cheats? (-> *pc-settings* cheats) eco-yellow)))
|
||||
(flag "Invincibility" #f ,(lambda (arg (msg debug-menu-msg))
|
||||
(when (= msg (debug-menu-msg press))
|
||||
(logclear! (-> *target* state-flags) 16)
|
||||
(pc-cheat-toggle-and-tune (-> *pc-settings* cheats) invinc)
|
||||
)
|
||||
(pc-cheats? (-> *pc-settings* cheats) invinc)))
|
||||
(flag "Blue sidekick" #f ,(lambda (arg (msg debug-menu-msg))
|
||||
(when (= msg (debug-menu-msg press))
|
||||
(pc-cheat-toggle-and-tune (-> *pc-settings* cheats) sidekick-blue)
|
||||
)
|
||||
(pc-cheats? (-> *pc-settings* cheats) sidekick-blue)))
|
||||
(flag "All flavas" #f ,(lambda (arg (msg debug-menu-msg))
|
||||
(when (= msg (debug-menu-msg press))
|
||||
(pc-cheat-toggle-and-tune (-> *pc-settings* cheats) tunes)
|
||||
)
|
||||
(pc-cheats? (-> *pc-settings* cheats) tunes)))
|
||||
(flag "Real time tod" #f ,(lambda (arg (msg debug-menu-msg))
|
||||
(when (= msg (debug-menu-msg press))
|
||||
(pc-cheat-toggle-and-tune (-> *pc-settings* cheats) sky)
|
||||
)
|
||||
(pc-cheats? (-> *pc-settings* cheats) sky)))
|
||||
(flag "No textures" #f ,(lambda (arg (msg debug-menu-msg))
|
||||
(when (= msg (debug-menu-msg press))
|
||||
(pc-cheat-toggle-and-tune (-> *pc-settings* cheats) no-tex)
|
||||
)
|
||||
(pc-cheats? (-> *pc-settings* cheats) no-tex)))
|
||||
(flag "Boods" #f ,(lambda (arg (msg debug-menu-msg))
|
||||
(when (= msg (debug-menu-msg press))
|
||||
(pc-cheat-toggle-and-tune (-> *pc-settings* cheats) oh-my-goodness)
|
||||
)
|
||||
(pc-cheats? (-> *pc-settings* cheats) oh-my-goodness)))
|
||||
;; (flag "Hard rats" #f ,(lambda (arg (msg debug-menu-msg))
|
||||
;; (when (= msg (debug-menu-msg press))
|
||||
;; (pc-cheat-toggle-and-tune (-> *pc-settings* cheats) hard-rats)
|
||||
;; )
|
||||
;; (pc-cheats? (-> *pc-settings* cheats) hard-rats)))
|
||||
;; (flag "Hero mode" #f ,(lambda (arg (msg debug-menu-msg))
|
||||
;; (when (= msg (debug-menu-msg press))
|
||||
;; (pc-cheat-toggle-and-tune (-> *pc-settings* cheats) hero-mode)
|
||||
;; )
|
||||
;; (pc-cheats? (-> *pc-settings* cheats) hero-mode)))
|
||||
)
|
||||
)
|
||||
(flag "Letterbox" #f ,(dm-lambda-boolean-flag (-> *pc-settings* letterbox?)))
|
||||
@@ -4737,36 +4736,36 @@
|
||||
(int-var "LOD Tie" 1 dm-lod-int 0 1 #t 0 3)
|
||||
;(int-var "LOD Ocean" 2 dm-lod-int 0 1 #t 0 3)
|
||||
(int-var "LOD Actor" 3 dm-lod-int 0 1 #t 0 3)
|
||||
(function "Best quality" #f (lambda () (set! (-> *pc-settings* lod-force-tfrag) 0)
|
||||
(set! (-> *pc-settings* lod-force-tie) 0)
|
||||
;(set! (-> *pc-settings* lod-force-ocean) 0)
|
||||
(set! (-> *pc-settings* lod-force-actor) 0)
|
||||
))
|
||||
(function "Worst quality" #f (lambda () (set! (-> *pc-settings* lod-force-tfrag) 2)
|
||||
(set! (-> *pc-settings* lod-force-tie) 3)
|
||||
;(set! (-> *pc-settings* lod-force-ocean) 2)
|
||||
(set! (-> *pc-settings* lod-force-actor) 3)
|
||||
))
|
||||
(function "Best quality" #f ,(lambda () (set! (-> *pc-settings* lod-force-tfrag) 0)
|
||||
(set! (-> *pc-settings* lod-force-tie) 0)
|
||||
;(set! (-> *pc-settings* lod-force-ocean) 0)
|
||||
(set! (-> *pc-settings* lod-force-actor) 0)
|
||||
))
|
||||
(function "Worst quality" #f ,(lambda () (set! (-> *pc-settings* lod-force-tfrag) 2)
|
||||
(set! (-> *pc-settings* lod-force-tie) 3)
|
||||
;(set! (-> *pc-settings* lod-force-ocean) 2)
|
||||
(set! (-> *pc-settings* lod-force-actor) 3)
|
||||
))
|
||||
)
|
||||
(menu "Framerate"
|
||||
(flag "60" #f (lambda (arg (msg debug-menu-msg)) (when (= msg (debug-menu-msg press)) (set-frame-rate! *pc-settings* 60))
|
||||
(= (-> *pc-settings* target-fps) 60)))
|
||||
(flag "100" #f (lambda (arg (msg debug-menu-msg)) (when (= msg (debug-menu-msg press)) (set-frame-rate! *pc-settings* 100))
|
||||
(= (-> *pc-settings* target-fps) 100)))
|
||||
(flag "150" #f (lambda (arg (msg debug-menu-msg)) (when (= msg (debug-menu-msg press)) (set-frame-rate! *pc-settings* 150))
|
||||
(= (-> *pc-settings* target-fps) 150)))
|
||||
(flag "60" #f ,(lambda (arg (msg debug-menu-msg)) (when (= msg (debug-menu-msg press)) (set-frame-rate! *pc-settings* 60))
|
||||
(= (-> *pc-settings* target-fps) 60)))
|
||||
(flag "100" #f ,(lambda (arg (msg debug-menu-msg)) (when (= msg (debug-menu-msg press)) (set-frame-rate! *pc-settings* 100))
|
||||
(= (-> *pc-settings* target-fps) 100)))
|
||||
(flag "150" #f ,(lambda (arg (msg debug-menu-msg)) (when (= msg (debug-menu-msg press)) (set-frame-rate! *pc-settings* 150))
|
||||
(= (-> *pc-settings* target-fps) 150)))
|
||||
)
|
||||
(menu "MSAA"
|
||||
(flag "Off" #f (lambda (arg (msg debug-menu-msg)) (when (= msg (debug-menu-msg press)) (set! (-> *pc-settings* gfx-msaa) 1))
|
||||
(= (-> *pc-settings* gfx-msaa) 1)))
|
||||
(flag "x2" #f (lambda (arg (msg debug-menu-msg)) (when (= msg (debug-menu-msg press)) (set! (-> *pc-settings* gfx-msaa) 2))
|
||||
(= (-> *pc-settings* gfx-msaa) 2)))
|
||||
(flag "x4" #f (lambda (arg (msg debug-menu-msg)) (when (= msg (debug-menu-msg press)) (set! (-> *pc-settings* gfx-msaa) 4))
|
||||
(= (-> *pc-settings* gfx-msaa) 4)))
|
||||
(flag "x8" #f (lambda (arg (msg debug-menu-msg)) (when (= msg (debug-menu-msg press)) (set! (-> *pc-settings* gfx-msaa) 8))
|
||||
(= (-> *pc-settings* gfx-msaa) 8)))
|
||||
(flag "x16" #f (lambda (arg (msg debug-menu-msg)) (when (= msg (debug-menu-msg press)) (set! (-> *pc-settings* gfx-msaa) 16))
|
||||
(= (-> *pc-settings* gfx-msaa) 16)))
|
||||
(flag "Off" #f ,(lambda (arg (msg debug-menu-msg)) (when (= msg (debug-menu-msg press)) (set! (-> *pc-settings* gfx-msaa) 1))
|
||||
(= (-> *pc-settings* gfx-msaa) 1)))
|
||||
(flag "x2" #f ,(lambda (arg (msg debug-menu-msg)) (when (= msg (debug-menu-msg press)) (set! (-> *pc-settings* gfx-msaa) 2))
|
||||
(= (-> *pc-settings* gfx-msaa) 2)))
|
||||
(flag "x4" #f ,(lambda (arg (msg debug-menu-msg)) (when (= msg (debug-menu-msg press)) (set! (-> *pc-settings* gfx-msaa) 4))
|
||||
(= (-> *pc-settings* gfx-msaa) 4)))
|
||||
(flag "x8" #f ,(lambda (arg (msg debug-menu-msg)) (when (= msg (debug-menu-msg press)) (set! (-> *pc-settings* gfx-msaa) 8))
|
||||
(= (-> *pc-settings* gfx-msaa) 8)))
|
||||
(flag "x16" #f ,(lambda (arg (msg debug-menu-msg)) (when (= msg (debug-menu-msg press)) (set! (-> *pc-settings* gfx-msaa) 16))
|
||||
(= (-> *pc-settings* gfx-msaa) 16)))
|
||||
)
|
||||
(flag "V-sync" #f ,(dm-lambda-boolean-flag (-> *pc-settings* vsync?)))
|
||||
;(flag "Alt load boundaries" #f ,(dm-lambda-boolean-flag (-> *pc-settings* new-lb?)))
|
||||
@@ -4776,9 +4775,9 @@
|
||||
(flag "Extra hud elements" #f ,(dm-lambda-boolean-flag (-> *pc-settings* extra-hud?)))
|
||||
(flag "Music fadein" #f ,(dm-lambda-boolean-flag (-> *pc-settings* music-fadein?)))
|
||||
(flag "Music fadeout" #f ,(dm-lambda-boolean-flag (-> *pc-settings* music-fadeout?)))
|
||||
(function "Reset" #f (lambda () (reset *pc-settings*)))
|
||||
(function "Save" #f (lambda () (commit-to-file *pc-settings*)))
|
||||
(function "Load" #f (lambda () (load-settings *pc-settings*)))
|
||||
(function "Reset" #f ,(lambda () (reset *pc-settings*)))
|
||||
(function "Save" #f ,(lambda () (commit-to-file *pc-settings*)))
|
||||
(function "Load" #f ,(lambda () (load-settings *pc-settings*)))
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -376,6 +376,8 @@
|
||||
|
||||
(define-extern pc-prof (function string pc-prof-event none))
|
||||
|
||||
(defconstant *user* (get-user))
|
||||
|
||||
;; Constants generated within the C++ runtime
|
||||
(define-extern *pc-user-dir-base-path* string)
|
||||
(define-extern *pc-settings-folder* string)
|
||||
|
||||
@@ -369,13 +369,13 @@
|
||||
(271 joint "camera")
|
||||
(269 send-event self activate-particle 5)
|
||||
(272 send-event self flash)
|
||||
(272 eval (lambda :behavior sage-finalboss
|
||||
()
|
||||
(let ((a0-1 (get-task-control (game-task finalboss-movies))))
|
||||
(save-reminder a0-1 (logior (get-reminder a0-1 0) 1) 0)
|
||||
)
|
||||
(none)
|
||||
)
|
||||
(272 eval ,(lambda :behavior sage-finalboss
|
||||
()
|
||||
(let ((a0-1 (get-task-control (game-task finalboss-movies))))
|
||||
(save-reminder a0-1 (logior (get-reminder a0-1 0) 1) 0)
|
||||
)
|
||||
(none)
|
||||
)
|
||||
)
|
||||
(273 send-event self deactivate-particle 5)
|
||||
(333 joint "cameraB")
|
||||
|
||||
@@ -5,5 +5,7 @@
|
||||
;; name in dgo: ambient
|
||||
;; dgos: ENGINE, GAME
|
||||
|
||||
(define-extern string->talker-speech (function string talker-speech-class))
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
|
||||
@@ -7,3 +7,31 @@
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
|
||||
(defenum fma-sphere-mode
|
||||
:type uint32
|
||||
:bitfield #t
|
||||
(nav 0)
|
||||
(kill-once 1)
|
||||
(danger 2)
|
||||
(deadly-overlap 3))
|
||||
|
||||
(deftype fma-sphere (process-drawable)
|
||||
((first-time? symbol :offset-assert 200)
|
||||
(mode fma-sphere-mode :offset-assert 204)
|
||||
(track-handle handle :offset-assert 208)
|
||||
(track-joint int32 :offset-assert 216)
|
||||
(attack-id uint32 :offset-assert 220)
|
||||
(duration time-frame :offset-assert 224)
|
||||
(sphere sphere :inline :offset-assert 240)
|
||||
(danger traffic-danger-info :inline :offset-assert 256)
|
||||
)
|
||||
:method-count-assert 21
|
||||
:size-assert #x136
|
||||
:flag-assert #x1500c00136
|
||||
(:methods
|
||||
(idle () _type_ :state 20)
|
||||
)
|
||||
)
|
||||
|
||||
(define-extern fma-sphere-init-by-other (function fma-sphere-mode process-drawable int time-frame object object fma-sphere))
|
||||
|
||||
@@ -126,7 +126,7 @@
|
||||
|
||||
|
||||
(defun-debug joint-mod-debug-draw ((arg0 joint-mod))
|
||||
(add-debug-matrix #t (bucket-id debug-no-zbuf1) (-> arg0 joint bone transform) (meters 2.0))
|
||||
(add-debug-matrix #t (bucket-id debug-no-zbuf1) (-> arg0 joint bone transform) (meters 2))
|
||||
0
|
||||
(none)
|
||||
)
|
||||
@@ -639,10 +639,3 @@
|
||||
(enable-set! (_type_ symbol) none 10)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
0
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -7,6 +7,8 @@
|
||||
|
||||
(define-extern camera-pos (function vector))
|
||||
|
||||
(define-extern position-in-front-of-camera! (function vector float float vector))
|
||||
|
||||
;; NOTE - for sparticle-launcher
|
||||
(define-extern math-camera-matrix
|
||||
"Returns [[*math-camera*]]'s `inv-camera-rot`"
|
||||
|
||||
@@ -36,23 +36,6 @@
|
||||
:flag-assert #x90000001c
|
||||
)
|
||||
|
||||
;; definition for method 3 of type cam-layout-bank
|
||||
(defmethod inspect cam-layout-bank ((obj cam-layout-bank))
|
||||
(when (not obj)
|
||||
(set! obj obj)
|
||||
(goto cfg-4)
|
||||
)
|
||||
(format #t "[~8x] ~A~%" obj (-> obj type))
|
||||
(format #t "~1Tspline-t: ~f~%" (-> obj spline-t))
|
||||
(format #t "~1Tspline-step: ~f~%" (-> obj spline-step))
|
||||
(format #t "~1Tintro-t: ~f~%" (-> obj intro-t))
|
||||
(format #t "~1Tintro-step: ~f~%" (-> obj intro-step))
|
||||
(format #t "~1Tdebug-t: ~f~%" (-> obj debug-t))
|
||||
(format #t "~1Tdebug-step: ~f~%" (-> obj debug-step))
|
||||
(label cfg-4)
|
||||
obj
|
||||
)
|
||||
|
||||
;; definition for symbol *CAM_LAYOUT-bank*, type cam-layout-bank
|
||||
(define *CAM_LAYOUT-bank* (new 'static 'cam-layout-bank
|
||||
:spline-t 0.01
|
||||
@@ -75,17 +58,6 @@
|
||||
:flag-assert #x900000004
|
||||
)
|
||||
|
||||
;; definition for method 3 of type clm-basic
|
||||
(defmethod inspect clm-basic ((obj clm-basic))
|
||||
(when (not obj)
|
||||
(set! obj obj)
|
||||
(goto cfg-4)
|
||||
)
|
||||
(format #t "[~8x] ~A~%" obj (-> obj type))
|
||||
(label cfg-4)
|
||||
obj
|
||||
)
|
||||
|
||||
;; definition of type clm-item-action
|
||||
(deftype clm-item-action (structure)
|
||||
((button uint64 :offset-assert 0)
|
||||
@@ -102,22 +74,6 @@
|
||||
:flag-assert #x90000001c
|
||||
)
|
||||
|
||||
;; definition for method 3 of type clm-item-action
|
||||
(defmethod inspect clm-item-action ((obj clm-item-action))
|
||||
(when (not obj)
|
||||
(set! obj obj)
|
||||
(goto cfg-4)
|
||||
)
|
||||
(format #t "[~8x] ~A~%" obj 'clm-item-action)
|
||||
(format #t "~1Tbutton: ~D~%" (-> obj button))
|
||||
(format #t "~1Toptions: ~D~%" (-> obj options))
|
||||
(format #t "~1Tfunc: ~A~%" (-> obj func))
|
||||
(format #t "~1Tparm0: ~A~%" (-> obj parm0))
|
||||
(format #t "~1Tparm1: ~A~%" (-> obj parm1))
|
||||
(label cfg-4)
|
||||
obj
|
||||
)
|
||||
|
||||
;; definition of type clm-item
|
||||
(deftype clm-item (clm-basic)
|
||||
((description string :offset-assert 4)
|
||||
@@ -129,20 +85,6 @@
|
||||
:flag-assert #x90000002c
|
||||
)
|
||||
|
||||
;; definition for method 3 of type clm-item
|
||||
(defmethod inspect clm-item ((obj clm-item))
|
||||
(when (not obj)
|
||||
(set! obj obj)
|
||||
(goto cfg-4)
|
||||
)
|
||||
(format #t "[~8x] ~A~%" obj (-> obj type))
|
||||
(format #t "~1Tdescription: ~A~%" (-> obj description))
|
||||
(format #t "~1Tbutton-symbol: ~A~%" (-> obj button-symbol))
|
||||
(format #t "~1Taction: #<clm-item-action @ #x~X>~%" (-> obj action))
|
||||
(label cfg-4)
|
||||
obj
|
||||
)
|
||||
|
||||
;; definition of type clm-list-item
|
||||
(deftype clm-list-item (basic)
|
||||
((description string :offset-assert 4)
|
||||
@@ -160,23 +102,6 @@
|
||||
:flag-assert #x90000001c
|
||||
)
|
||||
|
||||
;; definition for method 3 of type clm-list-item
|
||||
(defmethod inspect clm-list-item ((obj clm-list-item))
|
||||
(when (not obj)
|
||||
(set! obj obj)
|
||||
(goto cfg-4)
|
||||
)
|
||||
(format #t "[~8x] ~A~%" obj (-> obj type))
|
||||
(format #t "~1Tdescription: ~A~%" (-> obj description))
|
||||
(format #t "~1Ttrack-val: ~A~%" (-> obj track-val))
|
||||
(format #t "~1Tval-func: ~A~%" (-> obj val-func))
|
||||
(format #t "~1Tval-parm0: ~A~%" (-> obj val-parm0))
|
||||
(format #t "~1Tval-parm1: ~A~%" (-> obj val-parm1))
|
||||
(format #t "~1Tactions: ~A~%" (-> obj actions))
|
||||
(label cfg-4)
|
||||
obj
|
||||
)
|
||||
|
||||
;; definition of type clm-list
|
||||
(deftype clm-list (clm-basic)
|
||||
((tracker symbol :offset-assert 4)
|
||||
@@ -188,20 +113,6 @@
|
||||
:flag-assert #x900000010
|
||||
)
|
||||
|
||||
;; definition for method 3 of type clm-list
|
||||
(defmethod inspect clm-list ((obj clm-list))
|
||||
(when (not obj)
|
||||
(set! obj obj)
|
||||
(goto cfg-4)
|
||||
)
|
||||
(format #t "[~8x] ~A~%" obj (-> obj type))
|
||||
(format #t "~1Ttracker: ~A~%" (-> obj tracker))
|
||||
(format #t "~1Tcur-list-item: ~D~%" (-> obj cur-list-item))
|
||||
(format #t "~1Titems: ~A~%" (-> obj items))
|
||||
(label cfg-4)
|
||||
obj
|
||||
)
|
||||
|
||||
;; definition of type clm
|
||||
(deftype clm (basic)
|
||||
((title string :offset-assert 4)
|
||||
@@ -212,19 +123,6 @@
|
||||
:flag-assert #x90000000c
|
||||
)
|
||||
|
||||
;; definition for method 3 of type clm
|
||||
(defmethod inspect clm ((obj clm))
|
||||
(when (not obj)
|
||||
(set! obj obj)
|
||||
(goto cfg-4)
|
||||
)
|
||||
(format #t "[~8x] ~A~%" obj (-> obj type))
|
||||
(format #t "~1Ttitle: ~A~%" (-> obj title))
|
||||
(format #t "~1Titems: ~A~%" (-> obj items))
|
||||
(label cfg-4)
|
||||
obj
|
||||
)
|
||||
|
||||
;; definition for symbol *volume-point-current*, type int
|
||||
(define *volume-point-current* 0)
|
||||
|
||||
@@ -246,20 +144,6 @@
|
||||
:flag-assert #x900000010
|
||||
)
|
||||
|
||||
;; definition for method 3 of type volume-descriptor-array
|
||||
(defmethod inspect volume-descriptor-array ((obj volume-descriptor-array))
|
||||
(when (not obj)
|
||||
(set! obj obj)
|
||||
(goto cfg-4)
|
||||
)
|
||||
(format #t "[~8x] ~A~%" obj (-> obj type))
|
||||
(format #t "~1Tlength: ~D~%" (-> obj length))
|
||||
(format #t "~1Tallocated-length: ~D~%" (-> obj allocated-length))
|
||||
(format #t "~1Tdata[0] @ #x~X~%" (-> obj data))
|
||||
(label cfg-4)
|
||||
obj
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(set! (-> volume-descriptor-array heap-base) (the-as uint 24))
|
||||
|
||||
@@ -289,27 +173,6 @@
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 3 of type cam-layout
|
||||
(defmethod inspect cam-layout ((obj cam-layout))
|
||||
(when (not obj)
|
||||
(set! obj obj)
|
||||
(goto cfg-4)
|
||||
)
|
||||
(let ((t9-0 (method-of-type process inspect)))
|
||||
(t9-0 obj)
|
||||
)
|
||||
(format #t "~2Tcam-entity: ~A~%" (-> obj cam-entity))
|
||||
(format #t "~2Tnum-entities: ~D~%" (-> obj num-entities))
|
||||
(format #t "~2Tcur-entity: ~D~%" (-> obj cur-entity))
|
||||
(format #t "~2Tnum-volumes: ~D~%" (-> obj num-volumes))
|
||||
(format #t "~2Tcur-volume: ~D~%" (-> obj cur-volume))
|
||||
(format #t "~2Tfirst-pvol: ~D~%" (-> obj first-pvol))
|
||||
(format #t "~2Tfirst-cutoutvol: ~D~%" (-> obj first-cutoutvol))
|
||||
(format #t "~2Tres-key: ~f~%" (-> obj res-key))
|
||||
(label cfg-4)
|
||||
obj
|
||||
)
|
||||
|
||||
;; definition for function cam-layout-print
|
||||
(defun cam-layout-print ((arg0 int) (arg1 int) (arg2 string))
|
||||
(let* ((s5-0 (-> *display* frames (-> *display* on-screen) debug-buf))
|
||||
@@ -635,23 +498,6 @@
|
||||
:flag-assert #x90000003c
|
||||
)
|
||||
|
||||
;; definition for method 3 of type interp-test-info
|
||||
(defmethod inspect interp-test-info ((obj interp-test-info))
|
||||
(when (not obj)
|
||||
(set! obj obj)
|
||||
(goto cfg-4)
|
||||
)
|
||||
(format #t "[~8x] ~A~%" obj 'interp-test-info)
|
||||
(format #t "~1Tfrom: #<vector @ #x~X>~%" (-> obj from))
|
||||
(format #t "~1Tto: #<vector @ #x~X>~%" (-> obj to))
|
||||
(format #t "~1Torigin: #<vector @ #x~X>~%" (-> obj origin))
|
||||
(format #t "~1Tcolor: #<vector4w @ #x~X>~%" (-> obj color))
|
||||
(format #t "~1Taxis: #<vector @ #x~X>~%" (-> obj axis))
|
||||
(format #t "~1Tdisp: ~A~%" (-> obj disp))
|
||||
(label cfg-4)
|
||||
obj
|
||||
)
|
||||
|
||||
;; definition for function interp-test
|
||||
;; INFO: Used lq/sq
|
||||
(defun interp-test ((arg0 (function vector vector vector float vector float none)) (arg1 interp-test-info))
|
||||
@@ -670,13 +516,7 @@
|
||||
(format *stdcon* "~S ~f~%" (-> arg1 disp) (vector-length s5-0))
|
||||
(vector+! s5-0 s5-0 (-> arg1 origin))
|
||||
(camera-line (-> arg1 origin) s5-0 (-> arg1 color))
|
||||
(camera-cross
|
||||
(new 'static 'vector :y 1024.0)
|
||||
(new 'static 'vector :z 1024.0)
|
||||
s5-0
|
||||
(-> arg1 color)
|
||||
(meters 1.0)
|
||||
)
|
||||
(camera-cross (new 'static 'vector :y 1024.0) (new 'static 'vector :z 1024.0) s5-0 (-> arg1 color) (meters 1))
|
||||
)
|
||||
(none)
|
||||
)
|
||||
@@ -699,13 +539,7 @@
|
||||
(format *stdcon* "~S ~f~%" (-> arg1 disp) (vector-length s5-0))
|
||||
(vector+! s5-0 s5-0 (-> arg1 origin))
|
||||
(camera-line (-> arg1 origin) s5-0 (-> arg1 color))
|
||||
(camera-cross
|
||||
(new 'static 'vector :y 1024.0)
|
||||
(new 'static 'vector :z 1024.0)
|
||||
s5-0
|
||||
(-> arg1 color)
|
||||
(meters 1.0)
|
||||
)
|
||||
(camera-cross (new 'static 'vector :y 1024.0) (new 'static 'vector :z 1024.0) s5-0 (-> arg1 color) (meters 1))
|
||||
)
|
||||
(none)
|
||||
)
|
||||
@@ -736,7 +570,7 @@
|
||||
(new 'static 'vector :z 1024.0)
|
||||
s5-1
|
||||
(new 'static 'vector4w :x #x80 :w #x80)
|
||||
(meters 1.0)
|
||||
(meters 1)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -749,7 +583,7 @@
|
||||
(new 'static 'vector :z 1024.0)
|
||||
s5-2
|
||||
(new 'static 'vector4w :y #x80 :w #x80)
|
||||
(meters 1.0)
|
||||
(meters 1)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -764,7 +598,7 @@
|
||||
(new 'static 'vector :z 1024.0)
|
||||
s5-3
|
||||
(new 'static 'vector4w :x #x80 :z #x80 :w #x80)
|
||||
(meters 1.0)
|
||||
(meters 1)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -815,7 +649,7 @@
|
||||
(new 'static 'vector :z 1024.0)
|
||||
s5-4
|
||||
(new 'static 'vector4w :x #xff :y #xff :w #x80)
|
||||
(meters 1.0)
|
||||
(meters 1)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -858,7 +692,7 @@
|
||||
(new 'static 'vector :z 1024.0)
|
||||
s5-5
|
||||
(new 'static 'vector4w :z #xff :w #x80)
|
||||
(meters 1.0)
|
||||
(meters 1)
|
||||
)
|
||||
(curve-get-pos! s5-5 (cam-slave-get-float arg0 'intro-exitValue 0.0) s3-2)
|
||||
(vector+! s5-5 s5-5 s4-2)
|
||||
@@ -867,7 +701,7 @@
|
||||
(new 'static 'vector :z 1024.0)
|
||||
s5-5
|
||||
(new 'static 'vector4w :z #xff :w #x80)
|
||||
(meters 1.0)
|
||||
(meters 1)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -897,7 +731,7 @@
|
||||
(new 'static 'vector :z 1024.0)
|
||||
s5-6
|
||||
(new 'static 'vector4w :x #xff :y #xff :w #x80)
|
||||
(meters 1.0)
|
||||
(meters 1)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -923,7 +757,7 @@
|
||||
(new 'static 'vector :z 1024.0)
|
||||
s5-7
|
||||
(new 'static 'vector4w :y #xff :z #xff :w #x80)
|
||||
(meters 1.0)
|
||||
(meters 1)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -2306,20 +2140,6 @@
|
||||
:flag-assert #x90000000c
|
||||
)
|
||||
|
||||
;; definition for method 3 of type clmf-cam-flag-toggle-info
|
||||
(defmethod inspect clmf-cam-flag-toggle-info ((obj clmf-cam-flag-toggle-info))
|
||||
(when (not obj)
|
||||
(set! obj obj)
|
||||
(goto cfg-4)
|
||||
)
|
||||
(format #t "[~8x] ~A~%" obj 'clmf-cam-flag-toggle-info)
|
||||
(format #t "~1Tkey: ~f~%" (-> obj key))
|
||||
(format #t "~1Tforce-on: ~D~%" (-> obj force-on))
|
||||
(format #t "~1Tforce-off: ~D~%" (-> obj force-off))
|
||||
(label cfg-4)
|
||||
obj
|
||||
)
|
||||
|
||||
;; definition for function clmf-cam-flag-toggle
|
||||
(defbehavior clmf-cam-flag-toggle cam-layout ((arg0 int) (arg1 int))
|
||||
(let ((s4-0 (/ arg0 8))
|
||||
|
||||
@@ -12,6 +12,10 @@
|
||||
|
||||
(declare-type sparticle-launch-group basic)
|
||||
|
||||
(define-extern lightning-tracker-init (function lightning-spec time-frame symbol process-drawable vector vector none))
|
||||
|
||||
(define-extern birth-pickup-at-point (function vector pickup-type float symbol process-tree fact-info (pointer process) :behavior process))
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(deftype manipy (process-drawable)
|
||||
|
||||
@@ -8,6 +8,8 @@
|
||||
(define-extern ja-post (function none :behavior process-drawable))
|
||||
(define-extern merc-blend-shape (function process-drawable object))
|
||||
(define-extern merc-eye-anim (function process-drawable none))
|
||||
(define-extern process-grab? (function process symbol :behavior process))
|
||||
(define-extern process-release? (function process symbol :behavior process))
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
|
||||
+1454
-1431
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -121,7 +121,6 @@
|
||||
|
||||
;; ERROR: function was not converted to expressions. Cannot decompile.
|
||||
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod editable-region-method-11 editable-region ((obj editable-region) (arg0 vector) (arg1 int))
|
||||
(local-vars (sv-32 vector2h))
|
||||
(set! sv-32 (new 'stack 'vector2h))
|
||||
@@ -247,7 +246,6 @@
|
||||
#t
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod editable-method-28 editable ((obj editable) (arg0 editable-filter))
|
||||
(let* ((s5-0 (-> obj owner))
|
||||
(a0-1 (car s5-0))
|
||||
@@ -276,7 +274,6 @@
|
||||
(the-as symbol 0)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod editable-method-21 editable ((obj editable) (arg0 editable-region))
|
||||
(when (not (and (-> obj region) (-> obj region locked)))
|
||||
(if arg0
|
||||
@@ -323,7 +320,6 @@
|
||||
)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod editable-method-10 editable ((obj editable))
|
||||
(when (logtest? (-> obj flags) (editable-flag selected))
|
||||
(let ((s5-0 (new 'stack-no-clear 'vector)))
|
||||
@@ -343,7 +339,6 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod select-editable! editable ((obj editable) (arg0 symbol))
|
||||
(case arg0
|
||||
(('toggle)
|
||||
@@ -365,7 +360,6 @@
|
||||
-1.0
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod editable-method-20 editable ((obj editable) (arg0 vector) (arg1 vector) (arg2 vector) (arg3 vector))
|
||||
(local-vars (sv-48 vector) (sv-52 vector))
|
||||
(set! sv-48 (new 'stack-no-clear 'vector))
|
||||
@@ -407,13 +401,11 @@
|
||||
)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod editable-method-24 editable ((obj editable))
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod editable-method-17 editable ((obj editable) (arg0 vector))
|
||||
0
|
||||
(none)
|
||||
@@ -423,19 +415,16 @@
|
||||
#t
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod editable-method-15 editable ((obj editable) (arg0 vector) (arg1 int))
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod edit-coord! editable ((obj editable) (arg0 vector) (arg1 editable-flag))
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod editable-method-18 editable ((obj editable) (arg0 vector) (arg1 matrix))
|
||||
0
|
||||
(none)
|
||||
@@ -446,19 +435,16 @@
|
||||
*null-vector*
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod editable-method-19 editable ((obj editable) (arg0 vector))
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod editable-method-26 editable ((obj editable) (arg0 editable) (arg1 editable-array))
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod editable-method-25 editable ((obj editable) (arg0 editable-array))
|
||||
(let ((v1-0 (-> obj region)))
|
||||
(if v1-0
|
||||
@@ -538,7 +524,6 @@
|
||||
obj
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
;; WARN: Function (method 28 editable-point) has a return type of none, but the expression builder found a return statement.
|
||||
(defmethod editable-method-28 editable-point ((obj editable-point) (arg0 editable-filter))
|
||||
(if (logtest? arg0 (editable-filter water-command))
|
||||
@@ -584,7 +569,6 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod editable-method-15 editable-point ((obj editable-point) (arg0 vector) (arg1 int))
|
||||
(let ((v1-0 (-> obj region)))
|
||||
(if v1-0
|
||||
@@ -598,7 +582,6 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod edit-coord! editable-point ((obj editable-point) (arg0 vector) (arg1 editable-flag))
|
||||
(let ((v1-0 (-> obj region)))
|
||||
(if v1-0
|
||||
@@ -625,7 +608,6 @@
|
||||
(-> obj trans)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod editable-method-18 editable-point ((obj editable-point) (arg0 vector) (arg1 matrix))
|
||||
(let ((v1-0 (-> obj region)))
|
||||
(if v1-0
|
||||
@@ -696,7 +678,6 @@
|
||||
-1.0
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod editable-method-19 editable-point ((obj editable-point) (arg0 vector))
|
||||
(let ((v1-0 (-> obj region)))
|
||||
(if v1-0
|
||||
@@ -738,7 +719,6 @@
|
||||
)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod editable-method-17 editable-sphere ((obj editable-sphere) (arg0 vector))
|
||||
(let ((v1-0 (-> obj region)))
|
||||
(if v1-0
|
||||
@@ -830,7 +810,6 @@
|
||||
#t
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defun update-light-sphere-from-editable-light ((arg0 editable-light))
|
||||
(let ((v1-0 (lookup-light-sphere-by-name (-> arg0 name) *light-hash*)))
|
||||
(when v1-0
|
||||
@@ -848,7 +827,6 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod editable-method-17 editable-light ((obj editable-light) (arg0 vector))
|
||||
(let ((v1-0 (-> obj region)))
|
||||
(if v1-0
|
||||
@@ -869,7 +847,6 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod editable-method-15 editable-light ((obj editable-light) (arg0 vector) (arg1 int))
|
||||
(let ((v1-0 (-> obj region)))
|
||||
(if v1-0
|
||||
@@ -884,7 +861,6 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
;; WARN: Function (method 25 editable-light) has a return type of none, but the expression builder found a return statement.
|
||||
(defmethod editable-method-25 editable-light ((obj editable-light) (arg0 editable-array))
|
||||
((the-as (function editable-light editable-array none) (find-parent-method editable-light 25)) obj arg0)
|
||||
@@ -1095,7 +1071,6 @@
|
||||
)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod editable-method-24 editable-face ((obj editable-face))
|
||||
(logxor! (-> obj flags) (editable-flag orient))
|
||||
(editable-face-method-31 obj (-> obj normal))
|
||||
@@ -1163,7 +1138,7 @@
|
||||
(bucket-id debug-no-zbuf1)
|
||||
(edit-get-trans obj)
|
||||
s1-0
|
||||
(the-as meters #x46000000)
|
||||
(meters 2)
|
||||
(the-as rgba (-> (new 'static 'array uint64 1 #x8000ffff) 0))
|
||||
)
|
||||
)
|
||||
@@ -1277,7 +1252,6 @@
|
||||
)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod editable-method-24 editable-plane ((obj editable-plane))
|
||||
(let ((s5-1
|
||||
(vector-! (new 'stack-no-clear 'vector) (edit-get-trans (-> obj vertex 1)) (edit-get-trans (-> obj vertex 0)))
|
||||
@@ -1463,7 +1437,6 @@
|
||||
arg0
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod editable-method-10 editable-plane ((obj editable-plane))
|
||||
(let ((gp-0 (new 'stack-no-clear 'matrix)))
|
||||
(dotimes (v1-0 4)
|
||||
@@ -1504,7 +1477,6 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod editable-method-17 editable-plane ((obj editable-plane) (arg0 vector))
|
||||
(let ((v1-0 (-> obj region)))
|
||||
(if v1-0
|
||||
@@ -1651,7 +1623,6 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod editable-array-method-15 editable-array ((obj editable-array) (arg0 editable))
|
||||
(let ((gp-0 (-> arg0 region)))
|
||||
(when gp-0
|
||||
@@ -1688,7 +1659,6 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod editable-array-method-13 editable-array ((obj editable-array) (arg0 uint) (arg1 basic) (arg2 string))
|
||||
(set! (-> obj target) #f)
|
||||
(set! (-> obj target-mode) arg0)
|
||||
@@ -1698,7 +1668,6 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod editable-array-method-16 editable-array ((obj editable-array))
|
||||
(cond
|
||||
((-> obj edit-plane)
|
||||
@@ -1732,10 +1701,6 @@
|
||||
arg0
|
||||
)
|
||||
|
||||
(format 0 "SKIP: editable setup~%")
|
||||
(format #t "SKIP: editable setup~%")
|
||||
|
||||
#|
|
||||
(when (zero? *editable-sample-region*)
|
||||
(let ((v1-4 (new 'debug 'editable-region)))
|
||||
(set! (-> v1-4 locked) #t)
|
||||
@@ -1759,10 +1724,5 @@
|
||||
(set! *editable-entity-region* v0-84)
|
||||
)
|
||||
)
|
||||
|#
|
||||
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -107,6 +107,7 @@
|
||||
:flag-assert #x900000030
|
||||
)
|
||||
|
||||
|
||||
(deftype history-iterator (basic)
|
||||
((max-age uint32 :offset-assert 4)
|
||||
(owner uint8 :offset-assert 8)
|
||||
@@ -127,6 +128,7 @@
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype history (basic)
|
||||
((alloc-index int32 :offset-assert 4)
|
||||
(allocated-length int32 :offset-assert 8)
|
||||
@@ -142,10 +144,12 @@
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(defmethod length history ((obj history))
|
||||
(-> obj allocated-length)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch uint vs int.
|
||||
(defmethod asize-of history ((obj history))
|
||||
(the-as int (+ (-> obj type size) (* 48 (-> obj allocated-length))))
|
||||
)
|
||||
@@ -434,6 +438,7 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
;; WARN: new jak 2 until loop case, check carefully
|
||||
(defun history-draw ((arg0 history-iterator))
|
||||
(local-vars (sv-16 vector) (sv-20 vector) (sv-24 pat-surface))
|
||||
(set! sv-16 (the-as vector #f))
|
||||
@@ -519,7 +524,7 @@
|
||||
(bucket-id debug-no-zbuf1)
|
||||
(-> s5-0 origin)
|
||||
(-> s5-0 vector)
|
||||
(meters 1.0)
|
||||
(meters 1)
|
||||
(the-as rgba (logior t1-7 (shl v1-8 24)))
|
||||
)
|
||||
)
|
||||
@@ -552,4 +557,7 @@
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
0
|
||||
|
||||
)
|
||||
|
||||
@@ -1091,3 +1091,6 @@
|
||||
(display-sync arg0)
|
||||
(none)
|
||||
)
|
||||
|
||||
|
||||
(define-extern prototypes-game-visible-set! (function pair symbol int))
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
;; WARN: Return type mismatch entity vs entity-actor.
|
||||
(defun entity-actor-lookup ((arg0 res-lump) (arg1 symbol) (arg2 int))
|
||||
(local-vars (sv-16 res-tag))
|
||||
(set! sv-16 (new 'static 'res-tag))
|
||||
@@ -27,6 +28,7 @@
|
||||
)
|
||||
)
|
||||
|
||||
;; WARN: Check prologue - tricky store of r0
|
||||
(defun entity-actor-count ((arg0 res-lump) (arg1 symbol))
|
||||
(local-vars (sv-16 res-tag))
|
||||
(set! sv-16 (new 'static 'res-tag))
|
||||
@@ -66,6 +68,7 @@
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(defmethod next-actor entity-actor ((obj entity-actor))
|
||||
(entity-actor-lookup obj 'next-actor 0)
|
||||
)
|
||||
@@ -99,10 +102,12 @@
|
||||
(-> obj prev)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch basic vs process.
|
||||
(defmethod get-next-process actor-link-info ((obj actor-link-info))
|
||||
(the-as process (and (-> obj next) (-> obj next extra process)))
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch basic vs process.
|
||||
(defmethod get-prev-process actor-link-info ((obj actor-link-info))
|
||||
(the-as process (and (-> obj prev) (-> obj prev extra process)))
|
||||
)
|
||||
@@ -149,7 +154,7 @@
|
||||
(set! s4-0 (entity-actor-lookup s4-0 'prev-actor 0))
|
||||
)
|
||||
(while s4-0
|
||||
(if (arg0 (the-as entity-actor s4-0) arg1)
|
||||
(if (arg0 s4-0 arg1)
|
||||
(return (the-as int #f))
|
||||
)
|
||||
(let ((a0-4 s4-0))
|
||||
@@ -206,6 +211,7 @@
|
||||
)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch symbol vs none.
|
||||
(defmethod send-to-next actor-link-info ((obj actor-link-info) (arg0 symbol))
|
||||
(let ((a0-1 (-> obj next)))
|
||||
(when a0-1
|
||||
@@ -219,6 +225,7 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch symbol vs none.
|
||||
(defmethod send-to-prev actor-link-info ((obj actor-link-info) (arg0 symbol))
|
||||
(let ((a0-1 (-> obj prev)))
|
||||
(when a0-1
|
||||
@@ -232,12 +239,14 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch symbol vs none.
|
||||
(defmethod send-to-next-and-prev actor-link-info ((obj actor-link-info) (arg0 symbol))
|
||||
(send-to-next obj arg0)
|
||||
(send-to-prev obj arg0)
|
||||
(none)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch symbol vs none.
|
||||
(defmethod send-to-all actor-link-info ((obj actor-link-info) (arg0 symbol))
|
||||
(send-to-all-after obj arg0)
|
||||
(send-to-all-before obj arg0)
|
||||
@@ -264,7 +273,7 @@
|
||||
)
|
||||
|
||||
(defmethod get-matching-actor-type-mask actor-link-info ((obj actor-link-info) (arg0 type))
|
||||
(let ((s3-0 (the-as entity-actor (-> obj process entity)))
|
||||
(let ((s3-0 (-> obj process entity))
|
||||
(s5-0 0)
|
||||
)
|
||||
(let ((s4-0 1))
|
||||
@@ -359,7 +368,3 @@
|
||||
gp-0
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
(defenum entity-perm-status
|
||||
:bitfield #t
|
||||
:type uint16
|
||||
(bit-0 0)
|
||||
(bit-0 0) ;; blocks birth
|
||||
(bit-1 1)
|
||||
(dead 2)
|
||||
(no-kill 3)
|
||||
@@ -19,7 +19,8 @@
|
||||
(complete 8)
|
||||
(bit-9 9)
|
||||
(bit-10 10)
|
||||
(entity-perm-status-12 12)
|
||||
(save 11)
|
||||
(bit-12 12)
|
||||
)
|
||||
|
||||
(declare-type race-mesh basic)
|
||||
@@ -38,6 +39,10 @@
|
||||
(define-extern debug-actor (function string none))
|
||||
(define-extern reset-actors (function symbol none))
|
||||
|
||||
(define-extern process-by-ename (function string process))
|
||||
|
||||
(define-extern entity-birth-no-kill (function entity process))
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(define *generate-actor-vis* #f)
|
||||
@@ -66,7 +71,7 @@
|
||||
:size-assert #x10
|
||||
:flag-assert #xa00000010
|
||||
(:methods
|
||||
(update-perm! (_type_ symbol entity-perm-status) _type_ 9)
|
||||
(update (_type_ symbol entity-perm-status) _type_ 9)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -232,9 +237,3 @@
|
||||
|
||||
|
||||
(define *ACTOR-bank* (new 'static 'actor-bank :pause-dist (meters 50) :birth-dist (meters 220) :birth-max 10))
|
||||
|
||||
0
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -12,9 +12,12 @@
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(define *spawn-actors* #t)
|
||||
|
||||
(define *compact-actors* #t)
|
||||
|
||||
(define *vis-actors* #t)
|
||||
|
||||
;; WARN: Return type mismatch int vs drawable-actor.
|
||||
(defmethod mem-usage drawable-actor ((obj drawable-actor) (arg0 memory-usage-block) (arg1 int))
|
||||
(set! (-> arg0 length) (max 44 (-> arg0 length)))
|
||||
(set! (-> arg0 data 43 name) "entity")
|
||||
@@ -27,6 +30,7 @@
|
||||
(the-as drawable-actor 0)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch int vs drawable-inline-array-actor.
|
||||
(defmethod mem-usage drawable-inline-array-actor ((obj drawable-inline-array-actor) (arg0 memory-usage-block) (arg1 int))
|
||||
(set! (-> arg0 length) (max 1 (-> arg0 length)))
|
||||
(set! (-> arg0 data 0 name) (symbol->string 'drawable-group))
|
||||
@@ -68,35 +72,22 @@
|
||||
obj
|
||||
)
|
||||
|
||||
(defmethod inspect actor-group ((obj actor-group))
|
||||
(format #t "[~8x] ~A~%" obj (-> obj type))
|
||||
(format #t "~Tlength: ~D~%" (-> obj length))
|
||||
(format #t "~Tallocated-length: ~D~%" (-> obj allocated-length))
|
||||
(format #t "~Tdata[~D]: @ #x~X~%" (-> obj length) (-> obj data))
|
||||
(dotimes (s5-0 (-> obj length))
|
||||
(format #t "~T [~D] ~A / ~D~%" s5-0 (-> obj data s5-0 actor) (-> obj data s5-0 id))
|
||||
)
|
||||
obj
|
||||
)
|
||||
|
||||
(defmethod birth! entity ((obj entity))
|
||||
(format #t "birth ~A~%" obj)
|
||||
obj
|
||||
)
|
||||
|
||||
;; definition for method 23 of type entity
|
||||
(defmethod kill! entity ((obj entity))
|
||||
(format #t "kill ~A~%" obj)
|
||||
obj
|
||||
)
|
||||
|
||||
;; definition for method 2 of type entity
|
||||
(defmethod print entity ((obj entity))
|
||||
(format #t "#<~A :name ~S @ #x~X>" (-> obj type) (res-lump-struct obj 'name structure) obj)
|
||||
obj
|
||||
)
|
||||
|
||||
;; definition for method 26 of type entity
|
||||
(defmethod get-level entity ((obj entity))
|
||||
(dotimes (v1-0 (-> *level* length))
|
||||
(let ((a1-3 (-> *level* level v1-0)))
|
||||
@@ -112,7 +103,6 @@
|
||||
(-> *level* default-level)
|
||||
)
|
||||
|
||||
;; definition for function entity-by-name
|
||||
(defun entity-by-name ((arg0 string))
|
||||
(dotimes (s5-0 (-> *level* length))
|
||||
(let ((s4-0 (-> *level* level s5-0)))
|
||||
@@ -167,7 +157,6 @@
|
||||
(the-as entity #f)
|
||||
)
|
||||
|
||||
;; definition for function entity-by-type
|
||||
(defun entity-by-type ((arg0 type))
|
||||
(dotimes (s5-0 (-> *level* length))
|
||||
(let ((v1-3 (-> *level* level s5-0)))
|
||||
@@ -189,7 +178,6 @@
|
||||
(the-as entity-actor #f)
|
||||
)
|
||||
|
||||
;; definition for function entity-by-aid
|
||||
(defun entity-by-aid ((arg0 uint))
|
||||
(dotimes (v1-0 (-> *level* length))
|
||||
(let ((a1-3 (-> *level* level v1-0)))
|
||||
@@ -227,7 +215,6 @@
|
||||
(the-as entity #f)
|
||||
)
|
||||
|
||||
;; definition for function entity-actor-from-level-name
|
||||
;; WARN: Return type mismatch entity vs entity-actor.
|
||||
(defun entity-actor-from-level-name ((arg0 level))
|
||||
(let ((v0-0 (the-as entity #f)))
|
||||
@@ -251,8 +238,6 @@
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 18 of type level-group
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod level-group-method-18 level-group ((obj level-group))
|
||||
(when (not (paused?))
|
||||
(dotimes (s5-0 (-> obj length))
|
||||
@@ -273,7 +258,6 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for function entity-nav-mesh-by-aid
|
||||
(defun entity-nav-mesh-by-aid ((arg0 actor-id))
|
||||
(dotimes (v1-0 (-> *level* length))
|
||||
(let ((a1-3 (-> *level* level v1-0)))
|
||||
@@ -311,7 +295,6 @@
|
||||
(the-as entity-nav-mesh #f)
|
||||
)
|
||||
|
||||
;; definition for function nav-mesh-from-res-tag
|
||||
(defun nav-mesh-from-res-tag ((arg0 entity) (arg1 symbol) (arg2 int))
|
||||
(let ((v1-1 (res-lump-data arg0 arg1 pointer))
|
||||
(gp-0 (the-as nav-mesh #f))
|
||||
@@ -332,7 +315,6 @@
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for function entity-by-meters
|
||||
(defun entity-by-meters ((arg0 float) (arg1 float) (arg2 float))
|
||||
(dotimes (v1-0 (-> *level* length))
|
||||
(let ((a3-3 (-> *level* level v1-0)))
|
||||
@@ -359,7 +341,6 @@
|
||||
(the-as entity-actor #f)
|
||||
)
|
||||
|
||||
;; definition for function process-by-ename
|
||||
(defun process-by-ename ((arg0 string))
|
||||
(let ((v1-0 (entity-by-name arg0)))
|
||||
(if v1-0
|
||||
@@ -368,7 +349,6 @@
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for function entity-process-count
|
||||
(defun entity-process-count ((arg0 symbol))
|
||||
(let ((gp-0 0))
|
||||
(dotimes (s4-0 (-> *level* length))
|
||||
@@ -399,7 +379,6 @@
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for function entity-count
|
||||
(defun entity-count ()
|
||||
(let ((v0-0 0))
|
||||
(dotimes (v1-0 (-> *level* length))
|
||||
@@ -418,8 +397,6 @@
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for function entity-remap-names
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defun entity-remap-names ((arg0 pair))
|
||||
(let ((s5-0 (car arg0)))
|
||||
(while (not (null? arg0))
|
||||
@@ -446,8 +423,6 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition (debug) for function process-status-bits
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defun-debug process-status-bits ((arg0 process) (arg1 symbol))
|
||||
(let* ((s5-0 arg0)
|
||||
(s3-0 (if (type? s5-0 process-drawable)
|
||||
@@ -509,8 +484,7 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for function process-entity-set!
|
||||
(defun process-entity-set! ((arg0 process) (arg1 entity))
|
||||
(defun process-entity-set! ((arg0 process) (arg1 entity-actor))
|
||||
(set! (-> arg0 entity) arg1)
|
||||
(if arg1
|
||||
(set! (-> arg0 level) (-> arg1 extra level))
|
||||
@@ -519,12 +493,10 @@
|
||||
arg1
|
||||
)
|
||||
|
||||
;; definition for function process-task-mask
|
||||
(defun process-task-mask ((arg0 process))
|
||||
(-> arg0 level task-mask)
|
||||
)
|
||||
|
||||
;; definition for method 2 of type process
|
||||
(defmethod print process ((obj process))
|
||||
(cond
|
||||
((and (-> obj top-thread) (!= (-> obj status) 'dead))
|
||||
@@ -560,96 +532,9 @@
|
||||
obj
|
||||
)
|
||||
|
||||
;; definition for method 3 of type entity
|
||||
(defmethod inspect entity ((obj entity))
|
||||
((the-as (function entity entity) (find-parent-method entity 3)) obj)
|
||||
(format #t "~Ttrans: ~`vector`P~%" (-> obj trans))
|
||||
(format #t "~Taid: ~D~%" (-> obj aid))
|
||||
obj
|
||||
)
|
||||
|
||||
;; definition for method 3 of type entity-nav-mesh
|
||||
(defmethod inspect entity-nav-mesh ((obj entity-nav-mesh))
|
||||
((the-as (function object object) (find-parent-method entity-nav-mesh 3)) obj)
|
||||
(format #t "~Tnav-mesh ~A~%" (-> obj nav-mesh))
|
||||
(if (and (-> obj nav-mesh) (nonzero? (-> obj nav-mesh)))
|
||||
(inspect (-> obj nav-mesh))
|
||||
)
|
||||
obj
|
||||
)
|
||||
|
||||
;; definition for method 3 of type entity-actor
|
||||
(defmethod inspect entity-actor ((obj entity-actor))
|
||||
((the-as (function entity entity) (find-parent-method entity-actor 3)) obj)
|
||||
(format #t "~Tetype: ~A~%" (-> obj etype))
|
||||
(format #t "~Ttask: ~d~%" (-> obj task))
|
||||
(format #t "~Tkill-mask: #x~X : (" (-> obj kill-mask))
|
||||
(let ((s5-0 (-> obj kill-mask)))
|
||||
(if (= (logand s5-0 (task-mask task0)) (task-mask task0))
|
||||
(format #t "task0 ")
|
||||
)
|
||||
(if (= (logand s5-0 (task-mask task2)) (task-mask task2))
|
||||
(format #t "task2 ")
|
||||
)
|
||||
(if (= (logand s5-0 (task-mask task4)) (task-mask task4))
|
||||
(format #t "task4 ")
|
||||
)
|
||||
(if (= (logand s5-0 (task-mask task6)) (task-mask task6))
|
||||
(format #t "task6 ")
|
||||
)
|
||||
(if (= (logand s5-0 (task-mask ctywide)) (task-mask ctywide))
|
||||
(format #t "ctywide ")
|
||||
)
|
||||
(if (= (logand s5-0 (task-mask never)) (task-mask never))
|
||||
(format #t "never ")
|
||||
)
|
||||
(if (= (logand (task-mask movie1) s5-0) (task-mask movie1))
|
||||
(format #t "movie1 ")
|
||||
)
|
||||
(if (= (logand s5-0 (task-mask dummy1)) (task-mask dummy1))
|
||||
(format #t "dummy1 ")
|
||||
)
|
||||
(if (= (logand s5-0 (task-mask primary0)) (task-mask primary0))
|
||||
(format #t "primary0 ")
|
||||
)
|
||||
(if (= (logand s5-0 (task-mask task1)) (task-mask task1))
|
||||
(format #t "task1 ")
|
||||
)
|
||||
(if (= (logand s5-0 (task-mask task3)) (task-mask task3))
|
||||
(format #t "task3 ")
|
||||
)
|
||||
(if (= (logand s5-0 (task-mask task5)) (task-mask task5))
|
||||
(format #t "task5 ")
|
||||
)
|
||||
(if (= (logand s5-0 (task-mask task7)) (task-mask task7))
|
||||
(format #t "task7 ")
|
||||
)
|
||||
(if (= (logand (task-mask movie2) s5-0) (task-mask movie2))
|
||||
(format #t "movie2 ")
|
||||
)
|
||||
(if (= (logand s5-0 (task-mask dummy2)) (task-mask dummy2))
|
||||
(format #t "dummy2 ")
|
||||
)
|
||||
(if (= (logand s5-0 (task-mask done)) (task-mask done))
|
||||
(format #t "done ")
|
||||
)
|
||||
(if (= (logand s5-0 (task-mask special)) (task-mask special))
|
||||
(format #t "special ")
|
||||
)
|
||||
(if (= (logand (task-mask movie0) s5-0) (task-mask movie0))
|
||||
(format #t "movie0 ")
|
||||
)
|
||||
(if (= (logand s5-0 (task-mask dummy0)) (task-mask dummy0))
|
||||
(format #t "dummy0 ")
|
||||
)
|
||||
)
|
||||
(format #t ")~%")
|
||||
(format #t "~Tvis-id: ~d~%" (-> obj vis-id))
|
||||
(format #t "~Tquat: ~`vector`P~%" (-> obj quat))
|
||||
obj
|
||||
)
|
||||
|
||||
;; definition for method 29 of type entity-actor
|
||||
;; WARN: Return type mismatch entity-actor vs none.
|
||||
(defmethod debug-print entity-actor ((obj entity-actor) (arg0 symbol) (arg1 type))
|
||||
(let ((s4-0 (-> obj etype)))
|
||||
@@ -723,8 +608,6 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for method 14 of type level-group
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod debug-print-entities level-group ((obj level-group) (arg0 symbol) (arg1 type))
|
||||
(let ((t9-0 format)
|
||||
(a0-1 #t)
|
||||
@@ -762,8 +645,6 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for method 24 of type entity-actor
|
||||
;; INFO: Used lq/sq
|
||||
;; WARN: Return type mismatch entity-actor vs none.
|
||||
(defmethod add-to-level! entity-actor ((obj entity-actor) (arg0 level-group) (arg1 level) (arg2 actor-id))
|
||||
(let ((v1-4 (-> arg1 entity data (-> arg1 entity length))))
|
||||
@@ -836,7 +717,6 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for method 25 of type entity
|
||||
(defmethod remove-from-level! entity ((obj entity) (arg0 level-group))
|
||||
(let ((v1-0 (-> obj extra)))
|
||||
(cond
|
||||
@@ -855,8 +735,6 @@
|
||||
obj
|
||||
)
|
||||
|
||||
;; definition for function update-actor-vis-box
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defun update-actor-vis-box ((arg0 process-drawable) (arg1 vector) (arg2 vector))
|
||||
(when (and arg0 (nonzero? (-> arg0 draw)) (zero? (logand (-> arg0 draw status) (draw-control-status no-draw))))
|
||||
(let ((v1-5 (-> arg0 draw origin))
|
||||
@@ -874,8 +752,6 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for method 25 of type level-group
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod update-vis-volumes level-group ((obj level-group))
|
||||
(local-vars (sv-16 pointer) (sv-20 pointer) (sv-24 pointer) (sv-28 process))
|
||||
(dotimes (s5-0 (-> obj length))
|
||||
@@ -923,8 +799,6 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for function expand-bounding-box
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defun expand-bounding-box ((arg0 vector) (arg1 vector) (arg2 vector) (arg3 vector))
|
||||
(set! (-> arg0 x) (fmin (-> arg0 x) (-> arg2 x)))
|
||||
(set! (-> arg0 y) (fmin (-> arg0 y) (-> arg2 y)))
|
||||
@@ -936,8 +810,6 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for method 26 of type level-group
|
||||
;; INFO: Used lq/sq
|
||||
;; WARN: Stack slot offset 28 signed mismatch
|
||||
;; WARN: Stack slot offset 28 signed mismatch
|
||||
;; WARN: Stack slot offset 28 signed mismatch
|
||||
@@ -974,7 +846,6 @@
|
||||
;; WARN: Stack slot offset 32 signed mismatch
|
||||
;; WARN: Stack slot offset 32 signed mismatch
|
||||
;; WARN: Stack slot offset 32 signed mismatch
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod update-vis-volumes-from-nav-mesh level-group ((obj level-group))
|
||||
(local-vars
|
||||
(sv-16 pointer)
|
||||
@@ -1072,15 +943,12 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for method 27 of type level-group
|
||||
;; INFO: Used lq/sq
|
||||
;; WARN: Stack slot offset 20 signed mismatch
|
||||
;; WARN: Stack slot offset 20 signed mismatch
|
||||
;; WARN: Stack slot offset 20 signed mismatch
|
||||
;; WARN: Stack slot offset 20 signed mismatch
|
||||
;; WARN: Stack slot offset 20 signed mismatch
|
||||
;; WARN: Stack slot offset 20 signed mismatch
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod print-volume-sizes level-group ((obj level-group))
|
||||
(local-vars
|
||||
(sv-16 pointer)
|
||||
@@ -1161,8 +1029,6 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for function expand-vis-box-with-point
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defun expand-vis-box-with-point ((arg0 entity) (arg1 vector))
|
||||
(let ((v1-1 (res-lump-data arg0 'visvol (inline-array vector))))
|
||||
(when v1-1
|
||||
@@ -1182,7 +1048,6 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition of type debug-actor-info
|
||||
(deftype debug-actor-info (basic)
|
||||
((name basic :offset-assert 4)
|
||||
(handle handle :offset-assert 8)
|
||||
@@ -1194,29 +1059,11 @@
|
||||
:flag-assert #x900000018
|
||||
)
|
||||
|
||||
;; definition for method 3 of type debug-actor-info
|
||||
(defmethod inspect debug-actor-info ((obj debug-actor-info))
|
||||
(when (not obj)
|
||||
(set! obj obj)
|
||||
(goto cfg-4)
|
||||
)
|
||||
(format #t "[~8x] ~A~%" obj (-> obj type))
|
||||
(format #t "~1Tname: ~A~%" (-> obj name))
|
||||
(format #t "~1Thandle: ~D~%" (-> obj handle))
|
||||
(format #t "~1Tprocess: ~A~%" (-> obj process))
|
||||
(format #t "~1Tpid: ~D~%" (-> obj pid))
|
||||
(label cfg-4)
|
||||
obj
|
||||
)
|
||||
|
||||
;; definition for symbol *debug-actor-info*, type debug-actor-info
|
||||
(define *debug-actor-info* (new 'static 'debug-actor-info :name #f))
|
||||
|
||||
;; definition for symbol *pid-string*, type string
|
||||
(define *pid-string* (new 'global 'string 128 (the-as string #f)))
|
||||
|
||||
;; definition (debug) for function debug-actor
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defun-debug debug-actor ((arg0 string))
|
||||
(let ((gp-0 *debug-actor-info*))
|
||||
(set! (-> gp-0 name) #f)
|
||||
@@ -1253,10 +1100,8 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition (debug) for function draw-actor-marks
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defun-debug draw-actor-marks ((arg0 process))
|
||||
(local-vars (sv-16 entity) (sv-20 (pointer int32)))
|
||||
(local-vars (sv-16 entity-actor) (sv-20 (pointer int32)))
|
||||
(b!
|
||||
(not (and (or (type? arg0 process-drawable) (= (-> arg0 type) part-tracker) (type? arg0 part-spawner))
|
||||
(nonzero? (-> (the-as part-spawner arg0) root))
|
||||
@@ -1388,9 +1233,6 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for method 15 of type level-group
|
||||
;; INFO: Used lq/sq
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod debug-draw-actors level-group ((obj level-group) (arg0 symbol))
|
||||
(local-vars
|
||||
(sv-16 symbol)
|
||||
@@ -1769,19 +1611,16 @@
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 22 of type entity-camera
|
||||
(defmethod birth! entity-camera ((obj entity-camera))
|
||||
(add-connection *camera-engine* *camera* nothing obj #f #f)
|
||||
obj
|
||||
)
|
||||
|
||||
;; definition for method 23 of type entity-camera
|
||||
(defmethod kill! entity-camera ((obj entity-camera))
|
||||
(remove-by-param1 *camera-engine* (the-as int obj))
|
||||
obj
|
||||
)
|
||||
|
||||
;; definition for function init-entity
|
||||
;; WARN: Return type mismatch process vs none.
|
||||
(defun init-entity ((arg0 process) (arg1 entity-actor))
|
||||
(activate arg0 *entity-pool* (res-lump-struct arg1 'name basic) (the-as pointer #x70004000))
|
||||
@@ -1792,7 +1631,6 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for method 22 of type entity-actor
|
||||
(defmethod birth! entity-actor ((obj entity-actor))
|
||||
(let* ((s5-0 (-> obj etype))
|
||||
(v1-0 (entity-info-lookup s5-0))
|
||||
@@ -1823,7 +1661,6 @@
|
||||
obj
|
||||
)
|
||||
|
||||
;; definition for function entity-deactivate-handler
|
||||
;; WARN: Return type mismatch symbol vs none.
|
||||
(defun entity-deactivate-handler ((arg0 process) (arg1 entity-actor))
|
||||
(when (= arg0 (-> arg1 extra process))
|
||||
@@ -1833,7 +1670,6 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for method 23 of type entity-actor
|
||||
(defmethod kill! entity-actor ((obj entity-actor))
|
||||
(let ((a0-1 (-> obj extra process)))
|
||||
(if a0-1
|
||||
@@ -1844,8 +1680,6 @@
|
||||
obj
|
||||
)
|
||||
|
||||
;; definition for method 17 of type bsp-header
|
||||
;; INFO: Used lq/sq
|
||||
;; WARN: Return type mismatch bsp-header vs none.
|
||||
;; ERROR: Unsupported inline assembly instruction kind - [mfc0 s5, Count]
|
||||
;; ERROR: Unsupported inline assembly instruction kind - [mfc0 v1, Count]
|
||||
@@ -1921,8 +1755,6 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for function check-for-rougue-process
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defun check-for-rougue-process ((arg0 process) (arg1 int) (arg2 int) (arg3 level))
|
||||
(cond
|
||||
((-> arg0 entity)
|
||||
@@ -2027,7 +1859,6 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for method 18 of type bsp-header
|
||||
;; WARN: Return type mismatch bsp-header vs none.
|
||||
(defmethod deactivate-entities bsp-header ((obj bsp-header))
|
||||
(let ((v1-1 (-> obj level heap base))
|
||||
@@ -2115,9 +1946,6 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for function process-drawable-scale-from-entity!
|
||||
;; INFO: Used lq/sq
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defun process-drawable-scale-from-entity! ((arg0 process-drawable) (arg1 entity))
|
||||
(let ((v1-1 (res-lump-struct arg1 'scale structure)))
|
||||
(if v1-1
|
||||
@@ -2129,8 +1957,6 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for function process-drawable-from-entity!
|
||||
;; INFO: Used lq/sq
|
||||
;; WARN: Return type mismatch process-drawable vs none.
|
||||
(defun process-drawable-from-entity! ((arg0 process-drawable) (arg1 entity-actor))
|
||||
(logior! (-> arg0 mask) (process-mask actor-pause))
|
||||
@@ -2140,8 +1966,7 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for method 9 of type entity-perm
|
||||
(defmethod update-perm! entity-perm ((obj entity-perm) (arg0 symbol) (arg1 entity-perm-status))
|
||||
(defmethod update entity-perm ((obj entity-perm) (arg0 symbol) (arg1 entity-perm-status))
|
||||
(cond
|
||||
((= arg0 'game)
|
||||
(logclear! (-> obj status) arg1)
|
||||
@@ -2171,8 +1996,6 @@
|
||||
obj
|
||||
)
|
||||
|
||||
;; definition for function reset-actors
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defun reset-actors ((arg0 symbol))
|
||||
(let* ((v1-0 arg0)
|
||||
(s5-0 (cond
|
||||
@@ -2205,7 +2028,7 @@
|
||||
(if (not (and (-> s0-0 extra process) (logtest? (-> s0-0 extra process mask) (process-mask no-kill))))
|
||||
(kill! s0-0)
|
||||
)
|
||||
(update-perm! (-> s0-0 extra perm) arg0 (the-as entity-perm-status s5-0))
|
||||
(update (-> s0-0 extra perm) arg0 (the-as entity-perm-status s5-0))
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -2214,13 +2037,13 @@
|
||||
)
|
||||
(let ((s3-1 (-> s4-0 task-perm-list)))
|
||||
(dotimes (s2-1 (-> s3-1 length))
|
||||
(update-perm! (-> s3-1 data s2-1) arg0 (the-as entity-perm-status s5-0))
|
||||
(update (-> s3-1 data s2-1) arg0 (the-as entity-perm-status s5-0))
|
||||
)
|
||||
(logior! (-> s3-1 data 1 status) (entity-perm-status complete))
|
||||
)
|
||||
(let ((s4-1 (-> s4-0 perm-list)))
|
||||
(dotimes (s3-2 (-> s4-1 length))
|
||||
(update-perm! (-> s4-1 data s3-2) arg0 (the-as entity-perm-status s5-0))
|
||||
(update (-> s4-1 data s3-2) arg0 (the-as entity-perm-status s5-0))
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -2257,8 +2080,6 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for function reset-cameras
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defun reset-cameras ()
|
||||
(remove-all *camera-engine*)
|
||||
(dotimes (gp-0 (-> *level* length))
|
||||
@@ -2278,7 +2099,6 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for method 12 of type process-drawable
|
||||
(defmethod run-logic? process-drawable ((obj process-drawable))
|
||||
(or (zero? (logand (-> obj mask) (process-mask actor-pause)))
|
||||
(or (>= (+ (-> *ACTOR-bank* pause-dist) (-> obj root pause-adjust-distance))
|
||||
@@ -2290,20 +2110,16 @@
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 9 of type entity-links
|
||||
(defmethod birth? entity-links ((obj entity-links) (arg0 vector))
|
||||
(and (zero? (logand (-> obj perm status) (entity-perm-status bit-0 dead)))
|
||||
(< (vector-vector-distance (-> obj trans) arg0) (-> *ACTOR-bank* birth-dist))
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 17 of type level-group
|
||||
;; INFO: Used lq/sq
|
||||
;; ERROR: Stack slot load at 96 mismatch: defined as size 4, got size 16
|
||||
;; ERROR: Stack slot load at 96 mismatch: defined as size 4, got size 16
|
||||
;; ERROR: Stack slot load at 96 mismatch: defined as size 4, got size 16
|
||||
;; ERROR: Stack slot load at 96 mismatch: defined as size 4, got size 16
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
;; WARN: Function (method 17 level-group) has a return type of none, but the expression builder found a return statement.
|
||||
(defmethod actors-update level-group ((obj level-group))
|
||||
(local-vars
|
||||
@@ -2511,7 +2327,6 @@
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for function entity-birth-no-kill
|
||||
(defun entity-birth-no-kill ((arg0 entity))
|
||||
(let ((gp-0 (-> arg0 extra)))
|
||||
(logior! (-> gp-0 perm status) (entity-perm-status no-kill))
|
||||
@@ -2522,8 +2337,6 @@
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for function entity-task-complete-on
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defun entity-task-complete-on ((arg0 entity))
|
||||
(let ((v1-0 (-> arg0 extra)))
|
||||
(if (nonzero? (-> v1-0 perm task))
|
||||
@@ -2534,8 +2347,6 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for function entity-task-complete-off
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defun entity-task-complete-off ((arg0 entity))
|
||||
(let ((v1-0 (-> arg0 extra)))
|
||||
(if (!= (-> v1-0 perm task) 1)
|
||||
@@ -2546,7 +2357,6 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for method 30 of type entity-actor
|
||||
;; WARN: Return type mismatch entity-perm-status vs none.
|
||||
(defmethod toggle-status entity-actor ((obj entity-actor) (arg0 entity-perm-status) (arg1 symbol))
|
||||
(let ((v1-0 (-> obj extra)))
|
||||
@@ -2559,7 +2369,6 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for function process-entity-status!
|
||||
(defun process-entity-status! ((arg0 process) (arg1 entity-perm-status) (arg2 symbol))
|
||||
(cond
|
||||
((and (-> arg0 entity) arg0 (= arg0 (-> arg0 entity extra process)))
|
||||
@@ -2577,7 +2386,6 @@
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for function find-nearest-entity
|
||||
;; WARN: Return type mismatch entity-actor vs entity.
|
||||
(defun find-nearest-entity ((arg0 vector) (arg1 type))
|
||||
(local-vars (v1-9 object))
|
||||
@@ -2618,7 +2426,6 @@
|
||||
)
|
||||
)
|
||||
|
||||
;; definition (debug) for function entity-speed-test
|
||||
;; WARN: Return type mismatch entity vs none.
|
||||
;; ERROR: Unsupported inline assembly instruction kind - [mtc0 Count, r0]
|
||||
;; ERROR: Unsupported inline assembly instruction kind - [sync.p]
|
||||
@@ -2643,9 +2450,6 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition (debug) for function dump-entity-remap
|
||||
;; INFO: Used lq/sq
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defun-debug dump-entity-remap ((arg0 object) (arg1 object))
|
||||
(local-vars
|
||||
(sv-16 symbol)
|
||||
@@ -2729,7 +2533,3 @@
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -112,6 +112,7 @@
|
||||
)
|
||||
|
||||
(declare-type entity res-lump)
|
||||
(declare-type entity-actor entity)
|
||||
(declare-type target process-focusable)
|
||||
(define-extern process-task-mask (function process task-mask))
|
||||
|
||||
@@ -158,6 +159,7 @@
|
||||
:flag-assert #x9000000a0
|
||||
)
|
||||
|
||||
|
||||
(define *FACT-bank* (new 'static 'fact-bank
|
||||
:eco-level-max 2.0
|
||||
:eco-single-inc 1.0
|
||||
@@ -217,12 +219,13 @@
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype fact-info-target (fact-info)
|
||||
((eco-type int32 :offset-assert 40)
|
||||
(eco-level float :offset-assert 44)
|
||||
(eco-pickup-time time-frame :offset-assert 48)
|
||||
(eco-timeout time-frame :offset-assert 56)
|
||||
(eco-source uint64 :offset-assert 64)
|
||||
(eco-source handle :offset-assert 64)
|
||||
(eco-source-time time-frame :offset-assert 72)
|
||||
(health float :offset-assert 80)
|
||||
(health-max float :offset-assert 84)
|
||||
@@ -262,6 +265,7 @@
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype fact-info-enemy (fact-info)
|
||||
((speed float :offset-assert 40)
|
||||
(idle-distance meters :offset-assert 44)
|
||||
@@ -285,21 +289,24 @@
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype fact-info-crate (fact-info)
|
||||
((suck-count int32 :offset-assert 40)
|
||||
)
|
||||
(:methods
|
||||
(new (symbol type process pickup-type float) _type_ 0)
|
||||
)
|
||||
:method-count-assert 12
|
||||
:size-assert #x2c
|
||||
:flag-assert #xc0000002c
|
||||
(:methods
|
||||
(new (symbol type process pickup-type float) _type_ 0)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
;; WARN: Return type mismatch object vs fact-info.
|
||||
(defmethod new fact-info ((allocation symbol) (type-to-make type) (arg0 process) (arg1 pickup-type) (arg2 float))
|
||||
(local-vars (sv-16 fact-info) (sv-20 entity) (sv-24 task-mask))
|
||||
(local-vars (sv-16 fact-info) (sv-20 res-lump) (sv-24 task-mask))
|
||||
(set! sv-16 (object-new allocation type-to-make (the-as int (-> type-to-make size))))
|
||||
(set! sv-20 (-> arg0 entity))
|
||||
(set! sv-20 (the-as res-lump (-> arg0 entity)))
|
||||
(set! sv-24 (process-task-mask arg0))
|
||||
(when (zero? sv-16)
|
||||
(go process-drawable-art-error "memory")
|
||||
@@ -308,7 +315,7 @@
|
||||
(set! (-> sv-16 process) arg0)
|
||||
(set! (-> sv-16 pickup-type) arg1)
|
||||
(set! (-> sv-16 pickup-amount) arg2)
|
||||
(let ((s4-1 (-> ((method-of-type res-lump lookup-tag-idx) sv-20 'eco-info 'base -1000000000.0) lo)))
|
||||
(let ((s4-1 (-> (lookup-tag-idx sv-20 'eco-info 'base -1000000000.0) lo)))
|
||||
(when (>= (the-as int s4-1) 0)
|
||||
(let ((s3-0 (the-as int s4-1))
|
||||
(s2-0 (-> sv-20 tag s4-1))
|
||||
@@ -356,6 +363,7 @@
|
||||
:flag-assert #x900000008
|
||||
)
|
||||
|
||||
|
||||
(define *fact-info-enemy-defaults* (new 'static 'fact-info-enemy-defaults :idle-distance (meters 80)))
|
||||
|
||||
(defmethod new fact-info-enemy ((allocation symbol)
|
||||
@@ -367,7 +375,7 @@
|
||||
)
|
||||
(local-vars (sv-16 res-tag) (sv-32 res-tag))
|
||||
(let ((gp-0 (the-as fact-info-enemy ((method-of-type fact-info new) allocation type-to-make arg0 arg2 arg3))))
|
||||
(let ((s5-0 (the res-lump (-> gp-0 process entity))))
|
||||
(let ((s5-0 (the-as res-lump (-> gp-0 process entity))))
|
||||
(set! (-> gp-0 speed) (res-lump-float s5-0 'speed :default 1.0))
|
||||
(set! (-> gp-0 idle-distance) (res-lump-float s5-0 'idle-distance :default (-> arg1 0)))
|
||||
(set! (-> gp-0 notice-top) (res-lump-float s5-0 'notice-top :default 4096000.0))
|
||||
@@ -378,7 +386,7 @@
|
||||
(set! (-> gp-0 enemy-options) (res-lump-value s5-0 'enemy-options enemy-option :time -1000000000.0))
|
||||
(let ((s4-1 0))
|
||||
(set! sv-16 (new 'static 'res-tag))
|
||||
(let ((v1-11 (res-lump-data s5-0 'trigger pointer :tag-ptr (& sv-16) :time -1000000000.0)))
|
||||
(let ((v1-11 (res-lump-data s5-0 'trigger pointer :tag-ptr (& sv-16))))
|
||||
(when v1-11
|
||||
(set! (-> gp-0 enemy-options) (logior (enemy-option has-trigger) (-> gp-0 enemy-options)))
|
||||
(let ((a0-13 0))
|
||||
@@ -402,7 +410,7 @@
|
||||
)
|
||||
(when (logtest? s4-1 2)
|
||||
(set! sv-32 (new 'static 'res-tag))
|
||||
(let ((v1-20 (res-lump-data s5-0 'trig-ag pointer :tag-ptr (& sv-32) :time -1000000000.0)))
|
||||
(let ((v1-20 (res-lump-data s5-0 'trig-ag pointer :tag-ptr (& sv-32))))
|
||||
(if (and v1-20 (nonzero? (-> sv-32 elt-count)))
|
||||
(set! (-> gp-0 trig-actor-group) (the-as uint v1-20))
|
||||
(clear-mask-bits gp-0 2)
|
||||
@@ -427,7 +435,7 @@
|
||||
|
||||
(defmethod new fact-info-crate ((allocation symbol) (type-to-make type) (arg0 process) (arg1 pickup-type) (arg2 float))
|
||||
(let ((gp-0 (the-as fact-info-crate ((method-of-type fact-info new) allocation type-to-make arg0 arg1 arg2))))
|
||||
(let ((a0-1 (the res-lump (-> gp-0 process entity))))
|
||||
(let ((a0-1 (the-as res-lump (-> gp-0 process entity))))
|
||||
(set! (-> gp-0 suck-count) (res-lump-value a0-1 'suck-count int :time -1000000000.0))
|
||||
)
|
||||
gp-0
|
||||
@@ -436,10 +444,8 @@
|
||||
|
||||
(defmethod new fact-info-target ((allocation symbol) (type-to-make type) (arg0 process-drawable) (arg1 pickup-type) (arg2 float))
|
||||
(let ((gp-0 (the-as fact-info-target ((method-of-type fact-info new) allocation type-to-make arg0 arg1 arg2))))
|
||||
(set! (-> gp-0 eco-source) (the-as uint #f))
|
||||
(set! (-> gp-0 eco-source) (the-as handle #f))
|
||||
(reset! gp-0 #f)
|
||||
gp-0
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
|
||||
@@ -68,37 +68,6 @@
|
||||
(cf30 30)
|
||||
)
|
||||
|
||||
(defenum game-feature
|
||||
:type uint64
|
||||
:bitfield #t
|
||||
(unk-game-feature-01)
|
||||
(unk-game-feature-02)
|
||||
(unk-game-feature-03)
|
||||
(unk-game-feature-04)
|
||||
(unk-game-feature-05)
|
||||
(unk-game-feature-06)
|
||||
(gun-yellow)
|
||||
(gun-red)
|
||||
(gun-blue)
|
||||
(gun-dark)
|
||||
(board)
|
||||
(carry)
|
||||
(sidekick)
|
||||
(darkjak)
|
||||
(gun-upgrade-speed)
|
||||
(gun-upgrade-ammo)
|
||||
(gun-upgrade-damage)
|
||||
(unk-game-feature-18)
|
||||
(pass-red)
|
||||
(pass-green)
|
||||
(pass-yellow)
|
||||
(unk-game-feature-22)
|
||||
(darkjak-bomb0)
|
||||
(darkjak-bomb1)
|
||||
(darkjak-invinc)
|
||||
(darkjak-giant)
|
||||
(board-training))
|
||||
|
||||
(defenum game-secrets
|
||||
:type uint32
|
||||
:bitfield #t
|
||||
@@ -113,6 +82,7 @@
|
||||
(level-select)
|
||||
(scrap-book-1)
|
||||
(scrap-book-2)
|
||||
(scrap-book-3)
|
||||
(gungame-blue)
|
||||
(gungame-dark)
|
||||
(reverse-races)
|
||||
@@ -120,6 +90,34 @@
|
||||
(big-head)
|
||||
(little-head))
|
||||
|
||||
(defenum game-score
|
||||
(none)
|
||||
(race-1)
|
||||
(race-2)
|
||||
(race-3)
|
||||
(gungame-red)
|
||||
(gungame-yellow)
|
||||
(gungame-blue)
|
||||
(gungame-dark)
|
||||
(onin-game)
|
||||
(whack)
|
||||
(judge-skatea)
|
||||
(bush-race-1)
|
||||
(bush-race-2)
|
||||
(bush-race-3)
|
||||
(bush-port)
|
||||
(bush-errol)
|
||||
(reverse-race-1)
|
||||
(reverse-race-2)
|
||||
(reverse-race-3)
|
||||
)
|
||||
|
||||
(defenum highscore-flags
|
||||
:bitfield #t
|
||||
:type uint8
|
||||
(time)
|
||||
)
|
||||
|
||||
(declare-type game-info basic)
|
||||
(define-extern *game-info* game-info)
|
||||
(declare-type process-drawable process)
|
||||
@@ -127,8 +125,11 @@
|
||||
(define-extern part-group-pointer? (function pointer symbol))
|
||||
|
||||
;; NOTE - for default-menu
|
||||
(define-extern bug-report-display (function none))
|
||||
(define-extern trsq->continue-point (function trsq none))
|
||||
(define-extern bug-report-display (function symbol int))
|
||||
(define-extern trsq->continue-point (function trsq int))
|
||||
|
||||
(declare-type entity-perm structure)
|
||||
(define-extern *task-level* (array symbol))
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
@@ -164,17 +165,17 @@
|
||||
)
|
||||
|
||||
(deftype highscore-info (structure)
|
||||
((flags uint8 :offset-assert 0)
|
||||
(award-scores float 3 :offset-assert 4)
|
||||
(bronze-score float :offset 4)
|
||||
(silver-score float :offset 8)
|
||||
(gold-score float :offset 12)
|
||||
((flags highscore-flags :offset-assert 0)
|
||||
(award-scores float 3 :offset-assert 4)
|
||||
(bronze-score float :offset 4)
|
||||
(silver-score float :offset 8)
|
||||
(gold-score float :offset 12)
|
||||
)
|
||||
:method-count-assert 10
|
||||
:size-assert #x10
|
||||
:flag-assert #xa00000010
|
||||
(:methods
|
||||
(highscore-info-method-9 () none 9)
|
||||
(get-rank (_type_ float) int 9)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -233,7 +234,7 @@
|
||||
(trans vector :inline :offset-assert 16)
|
||||
(quat vector :inline :offset-assert 32)
|
||||
(camera-trans vector :inline :offset-assert 48)
|
||||
(camera-rot float 9 :offset-assert 64)
|
||||
(camera-rot vector3s 3 :inline :offset-assert 64)
|
||||
(on-goto pair :offset-assert 100)
|
||||
(vis-nick symbol :offset-assert 104)
|
||||
(want level-buffer-state 6 :inline :offset-assert 108)
|
||||
@@ -243,9 +244,9 @@
|
||||
:size-assert #xd8
|
||||
:flag-assert #xc000000d8
|
||||
(:methods
|
||||
(continue-point-method-9 () none 9)
|
||||
(continue-point-method-10 () none 10)
|
||||
(continue-point-method-11 (_type_) none 11)
|
||||
(debug-draw (_type_) int 9)
|
||||
(continue-point-method-10 (_type_ load-state) continue-point 10)
|
||||
(move-camera! (_type_) none 11)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -278,10 +279,10 @@
|
||||
(gun-ammo float 4 :offset-assert 164)
|
||||
(shield float :offset-assert 180)
|
||||
(score float :offset-assert 184)
|
||||
(score-owner uint64 :offset-assert 192)
|
||||
(timer uint64 :offset-assert 200)
|
||||
(timer-owner uint64 :offset-assert 208)
|
||||
(timer-flash basic :offset-assert 216)
|
||||
(score-owner handle :offset-assert 192)
|
||||
(timer time-frame :offset-assert 200)
|
||||
(timer-owner handle :offset-assert 208)
|
||||
(timer-flash symbol :offset-assert 216)
|
||||
(counter float :offset-assert 220)
|
||||
(counter-flash basic :offset-assert 224)
|
||||
(attack-id uint32 :offset-assert 228)
|
||||
@@ -291,9 +292,9 @@
|
||||
(last-continue continue-point :offset-assert 244)
|
||||
(play-list (array game-task-info) :offset-assert 248)
|
||||
(sub-task-list (array game-task-node-info) :offset-assert 252)
|
||||
(unknown-pad5 array :offset-assert 256)
|
||||
(unknown-pad5 (array game-task-node-info) :offset-assert 256)
|
||||
(task-counter uint32 :offset-assert 260)
|
||||
(unknown-pad6 uint32 :offset-assert 264)
|
||||
(unknown-pad6 (array uint16) :offset-assert 264)
|
||||
(level-opened uint8 32 :offset-assert 268)
|
||||
(total-deaths int32 :offset-assert 300)
|
||||
(continue-deaths int32 :offset-assert 304)
|
||||
@@ -304,9 +305,9 @@
|
||||
(death-time time-frame :offset-assert 336)
|
||||
(hit-time time-frame :offset-assert 344)
|
||||
(task-pickup-time time-frame :offset-assert 352)
|
||||
(unknown-array1 (array uint64) :offset-assert 360)
|
||||
(unknown-array2 (array uint64) :offset-assert 364)
|
||||
(unknown-array3 (array uint64) :offset-assert 368)
|
||||
(unknown-array1 (array time-frame) :offset-assert 360)
|
||||
(task-enter-times (array time-frame) :offset-assert 364)
|
||||
(task-in-times (array time-frame) :offset-assert 368)
|
||||
(death-pos vector-array :offset 372)
|
||||
(stop-watch-start uint64 :offset-assert 376)
|
||||
(stop-watch-stop uint64 :offset-assert 384)
|
||||
@@ -322,8 +323,8 @@
|
||||
(auto-save-card int32 :offset-assert 452)
|
||||
(auto-save-which int32 :offset-assert 456)
|
||||
(auto-save-count int32 :offset-assert 460)
|
||||
(pov-camera-handle uint64 :offset-assert 464)
|
||||
(other-camera-handle uint64 :offset-assert 472)
|
||||
(pov-camera-handle handle :offset-assert 464)
|
||||
(other-camera-handle handle :offset-assert 472)
|
||||
(controller handle 2 :offset-assert 480)
|
||||
(race-timer uint64 :offset-assert 496)
|
||||
(race-current-lap-count int32 :offset-assert 504)
|
||||
@@ -336,11 +337,11 @@
|
||||
(distance float :offset-assert 540)
|
||||
(kiosk-timeout uint64 :offset-assert 544)
|
||||
(pause-start-time time-frame :offset-assert 552)
|
||||
(game-score (array highscore-info) :offset-assert 560)
|
||||
(game-score (array float) :offset-assert 560)
|
||||
(goal float :offset-assert 564)
|
||||
(miss float :offset-assert 568)
|
||||
(miss-max float :offset-assert 572)
|
||||
(unknown-array4 (array uint64) :offset-assert 576)
|
||||
(task-close-times (array time-frame) :offset-assert 576)
|
||||
(live-eco-pill-count int32 :offset-assert 580)
|
||||
(live-gem-count int32 :offset-assert 584)
|
||||
(air-supply float :offset-assert 588)
|
||||
@@ -353,27 +354,27 @@
|
||||
:flag-assert #x1f0000025c
|
||||
(:methods
|
||||
(initialize! (_type_ symbol game-save string) _type_ 9)
|
||||
(game-info-method-10 () none 10)
|
||||
(give (_type_ symbol float handle) float 10)
|
||||
(task-complete? (_type_ game-task) symbol 11)
|
||||
(game-info-method-12 (_type_) none 12)
|
||||
(game-info-method-13 () none 13)
|
||||
(game-info-method-14 () none 14)
|
||||
(game-info-method-15 () none 15)
|
||||
(copy-perms-from-level! (_type_ level) none 16)
|
||||
(copy-perms-to-level! (_type_ level) none 17)
|
||||
(game-info-method-18 () none 18)
|
||||
(get-current-continue-point (_type_) continue-point 19)
|
||||
(subtask-index-by-name (_type_ string) int 12)
|
||||
(set-subtask-hook! (_type_ int int function) function 13)
|
||||
(actor-perm (_type_ actor-id) entity-perm 14)
|
||||
(task-perm-by-index (_type_ int) entity-perm 15)
|
||||
(copy-perms-from-level! (_type_ level) int 16)
|
||||
(copy-perms-to-level! (_type_ level) int 17)
|
||||
(game-info-method-18 (_type_ symbol) _type_ 18)
|
||||
(get-current-continue-forced (_type_) continue-point 19)
|
||||
(get-continue-by-name (_type_ string) continue-point 20)
|
||||
(set-continue! (_type_ basic object) continue-point 21)
|
||||
(game-info-method-22 () none 22)
|
||||
(game-info-method-23 () none 23)
|
||||
(game-info-method-24 () none 24)
|
||||
(game-info-method-25 () none 25)
|
||||
(game-info-method-26 () none 26)
|
||||
(set-continue! (_type_ basic symbol) continue-point 21)
|
||||
(game-info-method-22 (_type_) int 22)
|
||||
(game-info-method-23 (_type_ game-save string) int 23)
|
||||
(game-info-method-24 (_type_ game-save) none 24)
|
||||
(you-suck-stage (_type_ symbol) int 25)
|
||||
(you-suck-scale (_type_) float 26)
|
||||
(get-next-attack-id (_type_) uint 27)
|
||||
(game-info-method-28 () none 28)
|
||||
(game-info-method-29 () none 29)
|
||||
(game-info-method-30 () none 30)
|
||||
(game-info-method-28 (_type_ game-score float) int 28)
|
||||
(get-game-score-ref (_type_ int) (pointer float) 29)
|
||||
(calculate-percentage (_type_) float 30)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -385,17 +386,14 @@
|
||||
)
|
||||
)
|
||||
|
||||
(set! gp-0 (when (or (not *game-info*) (zero? *game-info*))
|
||||
(set! gp-0 (new 'static 'game-info :mode 'debug :current-continue #f :last-continue #f))
|
||||
(set! (-> gp-0 unknown-array1) (new 'global 'boxed-array uint64 110))
|
||||
(set! (-> gp-0 unknown-array4) (new 'global 'boxed-array uint64 110))
|
||||
(set! (-> gp-0 unknown-array2) (new 'global 'boxed-array uint64 32))
|
||||
(set! (-> gp-0 unknown-array3) (new 'global 'boxed-array uint64 32))
|
||||
(set! *game-info* gp-0)
|
||||
gp-0
|
||||
)
|
||||
(set! gp-0
|
||||
(when (or (not *game-info*) (zero? *game-info*))
|
||||
(set! gp-0 (new 'static 'game-info :mode 'debug :current-continue #f :last-continue #f))
|
||||
(set! (-> gp-0 unknown-array1) (the-as (array time-frame) (new 'global 'boxed-array uint64 110)))
|
||||
(set! (-> gp-0 task-close-times) (the-as (array time-frame) (new 'global 'boxed-array uint64 110)))
|
||||
(set! (-> gp-0 task-enter-times) (the-as (array time-frame) (new 'global 'boxed-array uint64 32)))
|
||||
(set! (-> gp-0 task-in-times) (the-as (array time-frame) (new 'global 'boxed-array uint64 32)))
|
||||
(set! *game-info* gp-0)
|
||||
gp-0
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -76,6 +76,37 @@
|
||||
`(remove-setting *setting-control* (with-pp pp) ,s)
|
||||
)
|
||||
|
||||
(defenum game-feature
|
||||
:type uint64
|
||||
:bitfield #t
|
||||
(unk-game-feature-01)
|
||||
(unk-game-feature-02)
|
||||
(unk-game-feature-03)
|
||||
(unk-game-feature-04)
|
||||
(unk-game-feature-05)
|
||||
(unk-game-feature-06)
|
||||
(gun-yellow)
|
||||
(gun-red)
|
||||
(gun-blue)
|
||||
(gun-dark)
|
||||
(board)
|
||||
(carry)
|
||||
(sidekick)
|
||||
(darkjak)
|
||||
(gun-upgrade-speed)
|
||||
(gun-upgrade-ammo)
|
||||
(gun-upgrade-damage)
|
||||
(unk-game-feature-18)
|
||||
(pass-red)
|
||||
(pass-green)
|
||||
(pass-yellow)
|
||||
(pass-blue)
|
||||
(darkjak-bomb0)
|
||||
(darkjak-bomb1)
|
||||
(darkjak-invinc)
|
||||
(darkjak-giant)
|
||||
(board-training))
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(deftype user-setting-data (structure)
|
||||
@@ -119,7 +150,7 @@
|
||||
(board symbol :offset-assert 156)
|
||||
(jump symbol :offset-assert 160)
|
||||
(speed-mult float :offset-assert 164)
|
||||
(features uint64 :offset-assert 168)
|
||||
(features game-feature :offset-assert 168)
|
||||
(sfx-volume float :offset-assert 176)
|
||||
(sfx-movie-volume float :offset-assert 180)
|
||||
(music-volume float :offset-assert 184)
|
||||
@@ -146,7 +177,7 @@
|
||||
(allow-continue symbol :offset-assert 268)
|
||||
(spotlight-color rgba :offset-assert 272)
|
||||
(subtitle symbol :offset-assert 276)
|
||||
(borrow symbol :offset-assert 280)
|
||||
(borrow pair :offset-assert 280)
|
||||
(doorway symbol :offset-assert 284)
|
||||
(gen symbol :offset-assert 288)
|
||||
(half-speed symbol :offset-assert 292)
|
||||
@@ -298,9 +329,3 @@
|
||||
s4-0
|
||||
)
|
||||
)
|
||||
|
||||
0
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -446,7 +446,7 @@
|
||||
(logclear! (-> obj features) arg3)
|
||||
)
|
||||
(('abs)
|
||||
(set! (-> obj features) arg3)
|
||||
(set! (-> obj features) (the-as game-feature arg3))
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -470,7 +470,7 @@
|
||||
(set! (-> obj race-minimap) (the-as int arg3))
|
||||
)
|
||||
(('borrow)
|
||||
(set! (-> obj borrow) arg1)
|
||||
(set! (-> obj borrow) (the-as pair arg1))
|
||||
)
|
||||
(('half-speed)
|
||||
(set! (-> obj half-speed) arg1)
|
||||
@@ -806,7 +806,6 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod add-setting setting-control ((obj setting-control) (arg0 process) (arg1 symbol) (arg2 object) (arg3 object) (arg4 object))
|
||||
"Originally called `setting-set` see (anon-function 48 script)"
|
||||
(add-connection (-> obj engine) arg0 arg1 arg2 arg3 arg4)
|
||||
@@ -814,7 +813,6 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod set-setting setting-control ((obj setting-control) (arg0 process) (arg1 symbol) (arg2 object) (arg3 object) (arg4 object))
|
||||
(remove-setting obj arg0 arg1)
|
||||
(add-connection (-> obj engine) arg0 arg1 arg2 arg3 arg4)
|
||||
@@ -822,7 +820,6 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod persist-with-delay setting-control ((obj setting-control) (arg0 symbol) (arg1 time-frame) (arg2 symbol) (arg3 symbol) (arg4 float) (arg5 int))
|
||||
"Originally called `setting-pers` see (anon-function 46 script)"
|
||||
(let ((v1-1 (schedule-callback (-> obj engine-pers) arg0 arg1)))
|
||||
@@ -837,7 +834,6 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod remove-setting setting-control ((obj setting-control) (arg0 process) (arg1 symbol))
|
||||
(when arg0
|
||||
(let ((s5-0 (-> obj engine))
|
||||
@@ -857,7 +853,6 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod kill-persister setting-control ((obj setting-control) (arg0 engine-pers) (arg1 object))
|
||||
"Calls [[engine-pers::kill-matching]]"
|
||||
(kill-matching
|
||||
@@ -889,7 +884,6 @@
|
||||
(the-as connectable #f)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod remove-setting-by-arg0 setting-control ((obj setting-control) (arg0 object))
|
||||
"Calls [[engine::remove-by-param0]] on `engine-hi`"
|
||||
(remove-by-param0 (-> obj engine-hi) arg0)
|
||||
@@ -904,12 +898,7 @@
|
||||
)
|
||||
|
||||
(defmethod apply-settings setting-control ((obj setting-control))
|
||||
;; added
|
||||
(when (nonzero? *speech-control*)
|
||||
*speech-control*
|
||||
((method-of-type speech-control speech-control-method-11))
|
||||
)
|
||||
|
||||
;; (speech-control-method-11 *speech-control*)
|
||||
(let ((s5-0 (-> obj user-current)))
|
||||
(let ((s4-0 (-> obj user-target)))
|
||||
(mem-copy! (the-as pointer s4-0) (the-as pointer (-> obj user-default)) 528)
|
||||
@@ -1408,7 +1397,7 @@
|
||||
(set! (-> gp-0 allow-look-around) #t)
|
||||
(set! (-> gp-0 border-mode) #f)
|
||||
(set! (-> gp-0 region-mode) #t)
|
||||
(set! (-> gp-0 borrow) (the-as symbol '()))
|
||||
(set! (-> gp-0 borrow) '())
|
||||
(set! (-> gp-0 sfx-volume) (* 0.01000001 f0-1))
|
||||
(set! (-> gp-0 music-volume) (* 0.01000001 f0-1))
|
||||
(set! (-> gp-0 dialog-volume) (* 0.01000001 f0-1))
|
||||
@@ -1484,7 +1473,7 @@
|
||||
(set! (-> gp-0 speed-mult) 1.0)
|
||||
(set! (-> gp-0 rain) 0.0)
|
||||
(set! (-> gp-0 snow) 0.0)
|
||||
(set! (-> gp-0 features) (the-as uint -1))
|
||||
(set! (-> gp-0 features) (the-as game-feature -1))
|
||||
(set! (-> gp-0 sound-flava) (the-as uint 0))
|
||||
(set! (-> gp-0 sound-flava-priority) 0.0)
|
||||
(set! (-> gp-0 sound-reverb) 0.0)
|
||||
@@ -1654,7 +1643,3 @@
|
||||
(set! (-> v1-127 extra-follow-height) 0.0)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -125,13 +125,333 @@
|
||||
|
||||
;; +++game-task-node
|
||||
(defenum game-task-node
|
||||
:type uint32
|
||||
:type uint16
|
||||
:bitfield #f
|
||||
(dig-knock-down-resolution 113)
|
||||
(tomb-boss-torches 167)
|
||||
(fortress-save-friends-resolution 172)
|
||||
(drill-mech-resolution 204)
|
||||
(drill-mech-started-smashing 205))
|
||||
(none)
|
||||
(fortress-escape-start)
|
||||
(fortress-escape-introduction)
|
||||
(fortress-escape-resolution)
|
||||
(city-help-kid-introduction)
|
||||
(city-help-kid-battle)
|
||||
(city-help-kid-resolution)
|
||||
(city-vehicle-training-map)
|
||||
(city-vehicle-training-hover-zone-1)
|
||||
(city-vehicle-training-hover-zone-2)
|
||||
(city-vehicle-training-resolution)
|
||||
(ruins-tower-introduction)
|
||||
(ruins-tower-resolution)
|
||||
(ruins-tower-exit)
|
||||
(atoll-water-introduction)
|
||||
(atoll-water-find)
|
||||
(atoll-water-valve)
|
||||
(atoll-water-resolution)
|
||||
(atoll-water-exit)
|
||||
(fortress-dump-introduction)
|
||||
(fortress-dump-deal)
|
||||
(fortress-dump-missile)
|
||||
(fortress-dump-resolution)
|
||||
(city-krew-delivery-introduction)
|
||||
(city-krew-delivery-delivery)
|
||||
(city-krew-delivery-resolution)
|
||||
(city-red-gun-training-introduction)
|
||||
(city-red-gun-training-try-once)
|
||||
(city-red-gun-training-resolution)
|
||||
(city-red-gun-training-bronze)
|
||||
(city-red-gun-training-silver)
|
||||
(city-red-gun-training-gold)
|
||||
(atoll-sig-introduction)
|
||||
(atoll-sig-sig-introduction)
|
||||
(atoll-sig-tank)
|
||||
(atoll-sig-sniper-a)
|
||||
(atoll-sig-sniper-b)
|
||||
(atoll-sig-sniper-c)
|
||||
(atoll-sig-sniper-d)
|
||||
(atoll-sig-resolution)
|
||||
(sewer-enemy-introduction)
|
||||
(sewer-enemy-blow-up-turrets)
|
||||
(sewer-enemy-talk-to-krew)
|
||||
(sewer-enemy-resolution)
|
||||
(strip-rescue-introduction)
|
||||
(strip-rescue-battle)
|
||||
(strip-rescue-resolution)
|
||||
(atoll-battle-introduction)
|
||||
(atoll-battle-rescue)
|
||||
(atoll-battle-battle)
|
||||
(atoll-battle-resolution)
|
||||
(mountain-lens-introduction)
|
||||
(mountain-lens-started)
|
||||
(mountain-lens-intermediate)
|
||||
(mountain-lens-resolution)
|
||||
(mountain-gear-find)
|
||||
(mountain-gear-resolution)
|
||||
(mountain-shard-dice)
|
||||
(mountain-shard-resolution)
|
||||
(mountain-collection-resolution)
|
||||
(city-keira-delivery-introduction)
|
||||
(city-keira-delivery-delivery)
|
||||
(city-keira-delivery-resolution)
|
||||
(stadium-board1-introduction)
|
||||
(stadium-board1-board)
|
||||
(stadium-board1-training)
|
||||
(stadium-board1-training-judge)
|
||||
(stadium-board1-done)
|
||||
(stadium-board1-resolution)
|
||||
(stadium-board1-bronze)
|
||||
(stadium-board1-silver)
|
||||
(stadium-board1-gold)
|
||||
(city-krew-collection-introduction)
|
||||
(city-krew-collection-collection)
|
||||
(city-krew-collection-resolution)
|
||||
(city-yellow-gun-training-introduction)
|
||||
(city-yellow-gun-training-resolution)
|
||||
(city-yellow-gun-training-bronze)
|
||||
(city-yellow-gun-training-silver)
|
||||
(city-yellow-gun-training-gold)
|
||||
(drill-eggs-introduction)
|
||||
(drill-eggs-eggs-0)
|
||||
(drill-eggs-eggs-1)
|
||||
(drill-eggs-eggs-2)
|
||||
(drill-eggs-resolution)
|
||||
(city-power-introduction)
|
||||
(city-power-vinroom)
|
||||
(city-power-resolution)
|
||||
(city-power-post-win)
|
||||
(palace-cable-introduction)
|
||||
(palace-cable-resolution)
|
||||
(palace-boss-introduction)
|
||||
(palace-boss-battle)
|
||||
(palace-boss-resolution)
|
||||
(city-shuttle-introduction)
|
||||
(city-shuttle-shuttle)
|
||||
(city-shuttle-resolution)
|
||||
(ruins-enemy-introduction)
|
||||
(ruins-enemy-resolution)
|
||||
(ruins-enemy-exit)
|
||||
(city-blue-gun-training-bronze)
|
||||
(city-blue-gun-training-silver)
|
||||
(city-blue-gun-training-gold)
|
||||
(forest-scouts-pre-intro)
|
||||
(forest-scouts-introduction)
|
||||
(forest-scouts-voicebox)
|
||||
(forest-scouts-get-board)
|
||||
(forest-scouts-pegasus)
|
||||
(forest-scouts-resolution)
|
||||
(city-escort-kid-pre-intro)
|
||||
(city-escort-kid-introduction)
|
||||
(city-escort-kid-resolution)
|
||||
(dig-knock-down-introduction)
|
||||
(dig-knock-down-resolution)
|
||||
(strip-grenade-introduction)
|
||||
(strip-grenade-explode)
|
||||
(strip-grenade-resolution)
|
||||
(drill-ship-introduction)
|
||||
(drill-ship-resolution)
|
||||
(city-port-run-introduction)
|
||||
(city-port-run-resolution)
|
||||
(city-port-run-post-win)
|
||||
(city-meet-brutter-pre-intro)
|
||||
(city-meet-brutter-introduction)
|
||||
(city-meet-brutter-meet-brutter)
|
||||
(city-meet-brutter-resolution)
|
||||
(sewer-board-introduction)
|
||||
(sewer-board-drain)
|
||||
(sewer-board-resolution)
|
||||
(forest-hunt-introduction)
|
||||
(forest-hunt-resolution)
|
||||
(city-intercept-tanker-roof-explode)
|
||||
(city-intercept-tanker-introduction)
|
||||
(city-intercept-tanker-battle)
|
||||
(city-intercept-tanker-resolution)
|
||||
(stadium-race-class3-introduction)
|
||||
(stadium-race-class3-race)
|
||||
(stadium-race-class3-resolution)
|
||||
(stadium-race-class3-select-bush)
|
||||
(city-protect-water-slums-introduction)
|
||||
(city-protect-water-slums-get-seal)
|
||||
(city-protect-water-slums-fight)
|
||||
(city-protect-water-slums-resolution)
|
||||
(dig-find-totem-introduction)
|
||||
(dig-find-totem-raise-log)
|
||||
(dig-find-totem-resolution)
|
||||
(city-destroy-guard-vehicles-introduction)
|
||||
(city-destroy-guard-vehicles-destroy)
|
||||
(city-destroy-guard-vehicles-resolution)
|
||||
(city-play-onin-game-introduction)
|
||||
(city-play-onin-game-wait)
|
||||
(city-play-onin-game-resolution)
|
||||
(city-play-onin-game-skill)
|
||||
(city-play-onin-game-post-game)
|
||||
(canyon-insert-items-introduction)
|
||||
(canyon-insert-items-door)
|
||||
(canyon-insert-items-gear)
|
||||
(canyon-insert-items-shard)
|
||||
(canyon-insert-items-resolution)
|
||||
(tomb-poles-introduction)
|
||||
(tomb-poles-block)
|
||||
(tomb-poles-poles)
|
||||
(tomb-poles-boulder)
|
||||
(tomb-poles-poles2)
|
||||
(tomb-poles-resolution)
|
||||
(tomb-water-vibe)
|
||||
(tomb-water-resolution)
|
||||
(tomb-boss-torches)
|
||||
(tomb-boss-door)
|
||||
(tomb-boss-introduction)
|
||||
(tomb-boss-resolution)
|
||||
(fortress-save-friends-introduction)
|
||||
(fortress-save-friends-resolution)
|
||||
(sewer-escort-introduction)
|
||||
(sewer-escort-explode-wall1)
|
||||
(sewer-escort-explode-wall2)
|
||||
(sewer-escort-resolution)
|
||||
(sewer-escort-get-gun)
|
||||
(city-dark-gun-training-bronze)
|
||||
(city-dark-gun-training-silver)
|
||||
(city-dark-gun-training-gold)
|
||||
(stadium-race-class2-introduction)
|
||||
(stadium-race-class2-race)
|
||||
(stadium-race-class2-resolution)
|
||||
(stadium-race-class2-select-bush)
|
||||
(city-stop-bomb-bots-introduction)
|
||||
(city-stop-bomb-bots-destroy)
|
||||
(city-stop-bomb-bots-resolution)
|
||||
(city-errol-challenge-introduction)
|
||||
(city-errol-challenge-race)
|
||||
(city-errol-challenge-resolution)
|
||||
(strip-drop-introduction)
|
||||
(strip-drop-resolution)
|
||||
(ruins-mech-introduction)
|
||||
(ruins-mech-break-wall-1)
|
||||
(ruins-mech-move-block-1)
|
||||
(ruins-mech-throw-block-1)
|
||||
(ruins-mech-resolution)
|
||||
(forest-protect-introduction)
|
||||
(forest-protect-meeting)
|
||||
(forest-protect-resolution)
|
||||
(forest-protect-post-game)
|
||||
(drill-mech-introduction)
|
||||
(drill-mech-started-smashing)
|
||||
(drill-mech-smash-consoles)
|
||||
(drill-mech-resolution)
|
||||
(city-save-lurkers-introduction)
|
||||
(city-save-lurkers-save-lurkers)
|
||||
(city-save-lurkers-resolution)
|
||||
(stadium-race-class1-introduction)
|
||||
(stadium-race-class1-race)
|
||||
(stadium-race-class1-resolution)
|
||||
(stadium-race-class1-select-bush)
|
||||
(palace-sneak-in-introduction)
|
||||
(palace-sneak-in-meeting)
|
||||
(palace-sneak-in-palace-3)
|
||||
(palace-sneak-in-door)
|
||||
(palace-sneak-in-resolution)
|
||||
(castle-break-in-introduction)
|
||||
(castle-break-in-castle-1)
|
||||
(castle-break-in-resolution)
|
||||
(castle-boss-introduction)
|
||||
(castle-boss-resolution)
|
||||
(city-whack-pre-intro)
|
||||
(city-whack-introduction)
|
||||
(city-whack-wait)
|
||||
(city-whack-resolution)
|
||||
(city-whack-post-game)
|
||||
(under-mech-introduction)
|
||||
(under-mech-resolution)
|
||||
(under-sig-introduction)
|
||||
(under-sig-centipede1-start)
|
||||
(under-sig-centipede1-end)
|
||||
(under-sig-centipede2-start)
|
||||
(under-sig-resolution)
|
||||
(city-defend-stadium-pre-intro)
|
||||
(city-defend-stadium-introduction)
|
||||
(city-defend-stadium-resolution)
|
||||
(consite-find-baron-introduction)
|
||||
(consite-find-baron-resolution)
|
||||
(nest-get-to-gun-introduction)
|
||||
(nest-get-to-gun-resolution)
|
||||
(nest-enter-introduction)
|
||||
(nest-enter-resolution)
|
||||
(nest-boss-introduction)
|
||||
(nest-boss-resolution)
|
||||
(city-win-pre-intro)
|
||||
(city-win-introduction)
|
||||
(city-win-resolution)
|
||||
(city-oracle-introduction)
|
||||
(city-oracle-level0)
|
||||
(city-oracle-level0-training)
|
||||
(city-oracle-level1)
|
||||
(city-oracle-level1-training)
|
||||
(city-oracle-level2)
|
||||
(city-oracle-level2-training)
|
||||
(city-oracle-level3)
|
||||
(city-oracle-level3-training)
|
||||
(city-burning-bush-ring-1-introduction)
|
||||
(city-burning-bush-ring-1-resolution)
|
||||
(city-burning-bush-get-to-1-introduction)
|
||||
(city-burning-bush-get-to-1-resolution)
|
||||
(city-burning-bush-get-to-2-introduction)
|
||||
(city-burning-bush-get-to-2-resolution)
|
||||
(city-burning-bush-get-to-3-introduction)
|
||||
(city-burning-bush-get-to-3-resolution)
|
||||
(city-burning-bush-get-to-4-introduction)
|
||||
(city-burning-bush-get-to-4-resolution)
|
||||
(city-burning-bush-collection-1-introduction)
|
||||
(city-burning-bush-collection-1-resolution)
|
||||
(city-burning-bush-racepoint-1-introduction)
|
||||
(city-burning-bush-racepoint-1-resolution)
|
||||
(city-burning-bush-ring-2-introduction)
|
||||
(city-burning-bush-ring-2-resolution)
|
||||
(city-burning-bush-get-to-5-introduction)
|
||||
(city-burning-bush-get-to-5-resolution)
|
||||
(city-burning-bush-get-to-6-introduction)
|
||||
(city-burning-bush-get-to-6-resolution)
|
||||
(city-burning-bush-shuttle-1-introduction)
|
||||
(city-burning-bush-shuttle-1-resolution)
|
||||
(city-burning-bush-get-to-7-introduction)
|
||||
(city-burning-bush-get-to-7-resolution)
|
||||
(city-burning-bush-get-to-8-introduction)
|
||||
(city-burning-bush-get-to-8-resolution)
|
||||
(city-burning-bush-get-to-9-introduction)
|
||||
(city-burning-bush-get-to-9-resolution)
|
||||
(city-burning-bush-collection-2-introduction)
|
||||
(city-burning-bush-collection-2-resolution)
|
||||
(city-burning-bush-get-to-10-introduction)
|
||||
(city-burning-bush-get-to-10-resolution)
|
||||
(city-burning-bush-get-to-11-introduction)
|
||||
(city-burning-bush-get-to-11-resolution)
|
||||
(city-burning-bush-ring-3-introduction)
|
||||
(city-burning-bush-ring-3-resolution)
|
||||
(city-burning-bush-get-to-12-introduction)
|
||||
(city-burning-bush-get-to-12-resolution)
|
||||
(city-burning-bush-bombbot-1-introduction)
|
||||
(city-burning-bush-bombbot-1-resolution)
|
||||
(city-burning-bush-get-to-13-introduction)
|
||||
(city-burning-bush-get-to-13-resolution)
|
||||
(city-burning-bush-get-to-14-introduction)
|
||||
(city-burning-bush-get-to-14-resolution)
|
||||
(city-burning-bush-get-to-15-introduction)
|
||||
(city-burning-bush-get-to-15-resolution)
|
||||
(city-burning-bush-collection-3-introduction)
|
||||
(city-burning-bush-collection-3-resolution)
|
||||
(city-burning-bush-race-errol-introduction)
|
||||
(city-burning-bush-race-errol-resolution)
|
||||
(city-burning-bush-race-port-introduction)
|
||||
(city-burning-bush-race-port-resolution)
|
||||
(stadium-burning-bush-race-board-introduction)
|
||||
(stadium-burning-bush-race-board-resolution)
|
||||
(stadium-burning-bush-race-class3-introduction)
|
||||
(stadium-burning-bush-race-class3-resolution)
|
||||
(stadium-burning-bush-race-class2-introduction)
|
||||
(stadium-burning-bush-race-class2-resolution)
|
||||
(stadium-burning-bush-race-class1-introduction)
|
||||
(stadium-burning-bush-race-class1-resolution)
|
||||
(stadium-burning-bush-race-class3-r-introduction)
|
||||
(stadium-burning-bush-race-class3-r-resolution)
|
||||
(stadium-burning-bush-race-class2-r-introduction)
|
||||
(stadium-burning-bush-race-class2-r-resolution)
|
||||
(stadium-burning-bush-race-class1-r-introduction)
|
||||
(stadium-burning-bush-race-class1-r-resolution)
|
||||
)
|
||||
;; ---game-task-node
|
||||
|
||||
;; NOTE - for mood-funcs
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -5,7 +5,7 @@
|
||||
;; name in dgo: task-control-h
|
||||
;; dgos: ENGINE, GAME
|
||||
|
||||
(define-extern task-node-reset (function symbol none))
|
||||
(define-extern task-node-reset (function symbol int))
|
||||
|
||||
(defenum game-task-actor
|
||||
:bitfield #f
|
||||
@@ -94,11 +94,85 @@
|
||||
)
|
||||
|
||||
(defenum game-task-flags
|
||||
:bitfield #t
|
||||
:type uint8
|
||||
(gatflag-00)
|
||||
(gatflag-01)
|
||||
(gatflag-02)
|
||||
)
|
||||
|
||||
(defenum game-task-icon
|
||||
:type uint16
|
||||
:type uint8
|
||||
(gaticon-00)
|
||||
(gaticon-01)
|
||||
(gaticon-02)
|
||||
(gaticon-03)
|
||||
(gaticon-04)
|
||||
(gaticon-05)
|
||||
(gaticon-06)
|
||||
(gaticon-07)
|
||||
(gaticon-08)
|
||||
(gaticon-09)
|
||||
(gaticon-10)
|
||||
(gaticon-11)
|
||||
(gaticon-12)
|
||||
(gaticon-13)
|
||||
(gaticon-14)
|
||||
(gaticon-15)
|
||||
(gaticon-16)
|
||||
(gaticon-17)
|
||||
(gaticon-18)
|
||||
(gaticon-19)
|
||||
(gaticon-20)
|
||||
(gaticon-21)
|
||||
(gaticon-22)
|
||||
(gaticon-23)
|
||||
(gaticon-24)
|
||||
(gaticon-25)
|
||||
(gaticon-26)
|
||||
(gaticon-27)
|
||||
(gaticon-28)
|
||||
(gaticon-29)
|
||||
(gaticon-30)
|
||||
(gaticon-31)
|
||||
(gaticon-32)
|
||||
(gaticon-33)
|
||||
(gaticon-34)
|
||||
(gaticon-35)
|
||||
(gaticon-36)
|
||||
(gaticon-37)
|
||||
(gaticon-38)
|
||||
(gaticon-39)
|
||||
(gaticon-40)
|
||||
(gaticon-41)
|
||||
(gaticon-42)
|
||||
(gaticon-43)
|
||||
(gaticon-44)
|
||||
(gaticon-45)
|
||||
(gaticon-46)
|
||||
(gaticon-47)
|
||||
(gaticon-48)
|
||||
(gaticon-49)
|
||||
(gaticon-50)
|
||||
(gaticon-51)
|
||||
(gaticon-52)
|
||||
(gaticon-53)
|
||||
(gaticon-54)
|
||||
(gaticon-55)
|
||||
(gaticon-56)
|
||||
(gaticon-57)
|
||||
(gaticon-58)
|
||||
(gaticon-59)
|
||||
(gaticon-60)
|
||||
(gaticon-61)
|
||||
(gaticon-62)
|
||||
(gaticon-63)
|
||||
(gaticon-64)
|
||||
(gaticon-65)
|
||||
(gaticon-66)
|
||||
(gaticon-67)
|
||||
(gaticon-68)
|
||||
(gaticon-69)
|
||||
)
|
||||
|
||||
(defenum task-manager-mask
|
||||
@@ -167,13 +241,12 @@
|
||||
)
|
||||
|
||||
;; NOTE - for settings
|
||||
(define-extern update-task-masks (function symbol none))
|
||||
(define-extern update-task-masks (function symbol int))
|
||||
|
||||
;; NOTE - for default-menu
|
||||
(define-extern play-clean (function symbol none))
|
||||
(define-extern task-node-open! (function game-task none))
|
||||
(define-extern task-node-close! (function game-task none))
|
||||
(define-extern task-node-open? (function game-task symbol))
|
||||
(define-extern task-node-open! (function game-task-node int))
|
||||
(define-extern task-node-close! (function game-task-node int))
|
||||
(define-extern task-node-open? (function game-task-node symbol))
|
||||
(define-extern play-task (function game-task symbol symbol string))
|
||||
|
||||
;; DECOMP BEGINS
|
||||
@@ -1109,7 +1182,8 @@
|
||||
(deftype game-task-event (basic)
|
||||
((actor game-task-actor :offset-assert 4)
|
||||
(action game-task-action :offset-assert 5)
|
||||
(icon game-task-icon :offset 6)
|
||||
(tex game-task-icon :offset-assert 6)
|
||||
(icon uint16 :offset 6)
|
||||
(flags game-task-flags :offset 7)
|
||||
(scene basic :offset 8)
|
||||
(distance meters :offset-assert 12)
|
||||
@@ -1121,33 +1195,34 @@
|
||||
|
||||
|
||||
(deftype task-manager-info (structure)
|
||||
((mask task-manager-mask :offset-assert 0)
|
||||
(level basic :offset-assert 4)
|
||||
(manager handle :offset-assert 8)
|
||||
(fail-message uint32 :offset-assert 16)
|
||||
(retry-message uint32 :offset-assert 20)
|
||||
(intro-scene basic :offset-assert 24)
|
||||
(resolution-scene basic :offset-assert 28)
|
||||
(resolution-scene-continue basic :offset-assert 32)
|
||||
(retry-continue basic :offset-assert 36)
|
||||
(fail-continue basic :offset-assert 40)
|
||||
(init-hook basic :offset-assert 44)
|
||||
(cleanup-hook basic :offset-assert 48)
|
||||
(update-hook basic :offset-assert 52)
|
||||
(code-hook basic :offset-assert 56)
|
||||
(complete-hook basic :offset-assert 60)
|
||||
(fail-hook basic :offset-assert 64)
|
||||
(event-hook basic :offset-assert 68)
|
||||
(final-node uint16 :offset-assert 72)
|
||||
(time-limit int32 :offset-assert 76)
|
||||
(sphere-count int8 :offset-assert 80)
|
||||
(index int8 :offset-assert 81)
|
||||
(intro-delay uint16 :offset-assert 82)
|
||||
(sphere-array uint32 :offset-assert 84)
|
||||
(on-complete basic :offset-assert 88)
|
||||
(on-fail basic :offset-assert 92)
|
||||
(begin-sphere sphere :inline :offset-assert 96)
|
||||
(end-sphere sphere :inline :offset-assert 112)
|
||||
((mask task-manager-mask :offset-assert 0)
|
||||
(level symbol :offset-assert 4)
|
||||
(manager handle :offset-assert 8)
|
||||
(fail-message game-text-id :offset-assert 16)
|
||||
(retry-message game-text-id :offset-assert 20)
|
||||
(intro-scene string :offset-assert 24)
|
||||
(resolution-scene string :offset-assert 28)
|
||||
(resolution-scene-continue string :offset-assert 32)
|
||||
(retry-continue string :offset-assert 36)
|
||||
(fail-continue string :offset-assert 40)
|
||||
(init-hook (function object) :offset-assert 44)
|
||||
(cleanup-hook (function object) :offset-assert 48)
|
||||
(update-hook (function object) :offset-assert 52)
|
||||
(code-hook (function object) :offset-assert 56)
|
||||
(complete-hook (function object) :offset-assert 60)
|
||||
(fail-hook (function object) :offset-assert 64)
|
||||
(event-hook (function process int symbol event-message-block object) :offset-assert 68)
|
||||
(hooks (function object) 7 :offset 44)
|
||||
(final-node game-task-node :offset-assert 72)
|
||||
(time-limit int32 :offset-assert 76)
|
||||
(sphere-count int8 :offset-assert 80)
|
||||
(index int8 :offset-assert 81)
|
||||
(intro-delay uint16 :offset-assert 82)
|
||||
(sphere-array uint32 :offset-assert 84)
|
||||
(on-complete pair :offset-assert 88)
|
||||
(on-fail pair :offset-assert 92)
|
||||
(begin-sphere sphere :inline :offset-assert 96)
|
||||
(end-sphere sphere :inline :offset-assert 112)
|
||||
)
|
||||
:method-count-assert 9
|
||||
:size-assert #x80
|
||||
@@ -1155,7 +1230,6 @@
|
||||
)
|
||||
|
||||
|
||||
;; WARN: Return type mismatch object vs none.
|
||||
(defun-debug game-task-node-flag->string ((arg0 game-task-node-flag))
|
||||
(if (= (logand arg0 (game-task-node-flag clear-task-mask)) (game-task-node-flag clear-task-mask))
|
||||
(format #t "clear-task-mask ")
|
||||
@@ -1217,7 +1291,6 @@
|
||||
(if (= (logand (game-task-node-flag no-audio) arg0) (game-task-node-flag no-audio))
|
||||
(format #t "no-audio ")
|
||||
)
|
||||
(none)
|
||||
)
|
||||
|
||||
(defun-debug game-task-node-command->string ((arg0 game-task-node-command))
|
||||
@@ -1298,48 +1371,48 @@
|
||||
)
|
||||
|
||||
(deftype game-task-node-info (basic)
|
||||
((level basic :offset-assert 4)
|
||||
(task game-task :offset-assert 8)
|
||||
(name string :offset-assert 12)
|
||||
(when-open array :offset-assert 16)
|
||||
(flags game-task-node-flag :offset-assert 20)
|
||||
(parent-node uint16 4 :offset-assert 24)
|
||||
(task-mask task-mask :offset-assert 32)
|
||||
(on-open basic :offset-assert 36)
|
||||
(info task-manager-info :offset-assert 40)
|
||||
(borrow basic :offset-assert 44)
|
||||
(open? symbol :offset-assert 48)
|
||||
(on-close basic :offset-assert 52)
|
||||
(close-time time-frame :offset-assert 56)
|
||||
(death-count uint16 :offset-assert 64)
|
||||
(gem-count uint16 :offset-assert 66)
|
||||
(skill-count uint16 :offset-assert 68)
|
||||
(suck-death-count uint8 :offset-assert 70)
|
||||
(add game-task-node-command :offset-assert 71)
|
||||
(description uint32 :offset-assert 72)
|
||||
((level symbol :offset-assert 4)
|
||||
(task game-task :offset-assert 8)
|
||||
(name string :offset-assert 12)
|
||||
(when-open (array game-task-event) :offset-assert 16)
|
||||
(flags game-task-node-flag :offset-assert 20)
|
||||
(parent-node game-task-node 4 :offset-assert 24)
|
||||
(task-mask task-mask :offset-assert 32)
|
||||
(on-open pair :offset-assert 36)
|
||||
(info task-manager-info :offset-assert 40)
|
||||
(borrow pair :offset-assert 44)
|
||||
(open? (function game-task-node-info symbol) :offset-assert 48)
|
||||
(on-close pair :offset-assert 52)
|
||||
(close-time time-frame :offset-assert 56)
|
||||
(death-count uint16 :offset-assert 64)
|
||||
(gem-count uint16 :offset-assert 66)
|
||||
(skill-count uint16 :offset-assert 68)
|
||||
(suck-death-count uint8 :offset-assert 70)
|
||||
(add game-task-node-command :offset-assert 71)
|
||||
(description game-text-id :offset-assert 72)
|
||||
)
|
||||
:method-count-assert 14
|
||||
:size-assert #x4c
|
||||
:flag-assert #xe0000004c
|
||||
(:methods
|
||||
(dummy-9 () none 9)
|
||||
(dummy-10 () none 10)
|
||||
(dummy-11 () none 11)
|
||||
(dummy-12 () none 12)
|
||||
(dummy-13 () none 13)
|
||||
(close! (_type_ symbol) int 9)
|
||||
(open! (_type_ symbol) int 10)
|
||||
(open? (_type_) symbol 11)
|
||||
(copy-hooks! (_type_ game-task-node-info) game-task-node-info 12)
|
||||
(eval-add (_type_) int 13)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype game-task-info (basic)
|
||||
((name string :offset-assert 4)
|
||||
(text-name uint32 :offset-assert 8)
|
||||
(pre-play-node uint16 :offset-assert 12)
|
||||
(kiosk-play-node uint16 :offset-assert 14)
|
||||
(pre-play-continue string :offset-assert 16)
|
||||
(play-node uint16 :offset-assert 20)
|
||||
(play-continue string :offset-assert 24)
|
||||
(kiosk-play-continue string :offset-assert 28)
|
||||
((name string :offset-assert 4)
|
||||
(text-name game-text-id :offset-assert 8)
|
||||
(pre-play-node game-task-node :offset-assert 12)
|
||||
(kiosk-play-node game-task-node :offset-assert 14)
|
||||
(pre-play-continue string :offset-assert 16)
|
||||
(play-node game-task-node :offset-assert 20)
|
||||
(play-continue string :offset-assert 24)
|
||||
(kiosk-play-continue string :offset-assert 28)
|
||||
)
|
||||
:method-count-assert 9
|
||||
:size-assert #x20
|
||||
@@ -1350,65 +1423,66 @@
|
||||
(deftype game-task-control (basic)
|
||||
((counter uint32 :offset-assert 4)
|
||||
(actor game-task-actor :offset-assert 8)
|
||||
(current-node uint16 :offset-assert 10)
|
||||
(current-event uint32 :offset-assert 12)
|
||||
(current-node game-task-node :offset-assert 10)
|
||||
(current-event game-task-event :offset-assert 12)
|
||||
)
|
||||
:method-count-assert 10
|
||||
:size-assert #x10
|
||||
:flag-assert #xa00000010
|
||||
(:methods
|
||||
(dummy-9 () none 9)
|
||||
(new (symbol type game-task-actor) _type_ 0)
|
||||
(game-task-control-method-9 (_type_) game-task-event 9)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype task-manager (process)
|
||||
((node-info basic :offset-assert 128)
|
||||
(info task-manager-info :offset-assert 132)
|
||||
(lev-name basic :offset-assert 136)
|
||||
(fail-on-death? symbol :offset-assert 140)
|
||||
(fail-now basic :offset-assert 144)
|
||||
(retry-now basic :offset-assert 148)
|
||||
(allow-fail basic :offset-assert 152)
|
||||
(state-time time-frame :offset-assert 160)
|
||||
(count int16 :offset-assert 168)
|
||||
(max-count int16 :offset-assert 170)
|
||||
(sub-state uint32 :offset-assert 172)
|
||||
(slave uint64 32 :offset-assert 176)
|
||||
(arrow uint64 :offset-assert 432)
|
||||
(link uint32 :offset-assert 440)
|
||||
(start-time time-frame :offset-assert 448)
|
||||
(total-time time-frame :offset-assert 456)
|
||||
(beep-time time-frame :offset-assert 464)
|
||||
(time-limit time-frame :offset-assert 472)
|
||||
(begin-pos vector :inline :offset-assert 480)
|
||||
(end-pos vector :inline :offset-assert 496)
|
||||
(data-int8 int8 32 :offset-assert 512)
|
||||
(data-int32 int32 32 :offset-assert 544)
|
||||
(data-float float 32 :offset-assert 672)
|
||||
(data-vector vector 32 :inline :offset-assert 800)
|
||||
(actor-group uint32 4 :offset-assert 1312)
|
||||
(minimap uint32 8 :offset-assert 1328)
|
||||
(hud uint64 4 :offset-assert 1360)
|
||||
(hud-timer time-frame :offset 1360)
|
||||
(hud-counter int64 :offset 1368)
|
||||
(sound-id uint32 4 :offset-assert 1392)
|
||||
(intro-time time-frame :offset-assert 1408)
|
||||
((node-info game-task-node-info :offset-assert 128)
|
||||
(info task-manager-info :offset-assert 132)
|
||||
(lev-name symbol :offset-assert 136)
|
||||
(fail-on-death? symbol :offset-assert 140)
|
||||
(fail-now symbol :offset-assert 144)
|
||||
(retry-now symbol :offset-assert 148)
|
||||
(allow-fail symbol :offset-assert 152)
|
||||
(state-time time-frame :offset-assert 160)
|
||||
(count int16 :offset-assert 168)
|
||||
(max-count int16 :offset-assert 170)
|
||||
(sub-state uint32 :offset-assert 172)
|
||||
(slave handle 32 :offset-assert 176)
|
||||
(arrow handle :offset-assert 432)
|
||||
(link uint32 :offset-assert 440)
|
||||
(start-time time-frame :offset-assert 448)
|
||||
(total-time time-frame :offset-assert 456)
|
||||
(beep-time time-frame :offset-assert 464)
|
||||
(time-limit time-frame :offset-assert 472)
|
||||
(begin-pos vector :inline :offset-assert 480)
|
||||
(end-pos vector :inline :offset-assert 496)
|
||||
(data-int8 int8 32 :offset-assert 512)
|
||||
(data-int32 int32 32 :offset-assert 544)
|
||||
(data-float float 32 :offset-assert 672)
|
||||
(data-vector vector 32 :inline :offset-assert 800)
|
||||
(actor-group uint32 4 :offset-assert 1312)
|
||||
(minimap uint32 8 :offset-assert 1328)
|
||||
(hud handle 4 :offset-assert 1360)
|
||||
(hud-timer handle :offset 1360)
|
||||
(hud-counter handle :offset 1368)
|
||||
(sound-id sound-id 4 :offset-assert 1392)
|
||||
(intro-time time-frame :offset-assert 1408)
|
||||
)
|
||||
:heap-base #x510
|
||||
:method-count-assert 23
|
||||
:size-assert #x588
|
||||
:flag-assert #x1705100588
|
||||
(:methods
|
||||
(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-20 () none 20)
|
||||
(dummy-21 () none 21)
|
||||
(dummy-22 () none 22)
|
||||
(wait () _type_ :state 14)
|
||||
(active () _type_ :state 15)
|
||||
(complete () _type_ :state 16)
|
||||
(fail () _type_ :state 17)
|
||||
(retry () _type_ :state 18)
|
||||
(initialize! (_type_) int 19)
|
||||
(kill-all-children (_type_) int 20)
|
||||
(check-time (_type_) int 21)
|
||||
(task-manager-method-22 (_type_) symbol 22)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -1431,8 +1505,6 @@
|
||||
|
||||
(define *traffic-engine* (the-as object #f))
|
||||
|
||||
0
|
||||
|
||||
|
||||
|
||||
(define-extern task-manager-init-by-other (function game-task-node-info symbol object :behavior task-manager))
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -5,10 +5,10 @@
|
||||
;; name in dgo: geometry-h
|
||||
;; dgos: ENGINE, GAME
|
||||
|
||||
(define-extern quaternion-from-two-vectors-max-angle! (function quaternion vector vector float quaternion))
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
;; A 3 dimensional polynomial spline with arbitrarily placed knot points
|
||||
;; It's used for camera paths and similar and can be generated by offline tools.
|
||||
(deftype curve (structure)
|
||||
((cverts (inline-array vector) :offset-assert 0)
|
||||
(num-cverts int32 :offset-assert 4)
|
||||
@@ -21,7 +21,7 @@
|
||||
:flag-assert #x900000014
|
||||
)
|
||||
|
||||
;; unused plane type that would likely trigger some action on crossing.
|
||||
|
||||
(deftype border-plane (basic)
|
||||
((name symbol :offset-assert 4)
|
||||
(action basic :offset-assert 8)
|
||||
@@ -33,10 +33,7 @@
|
||||
:size-assert #x30
|
||||
:flag-assert #xb00000030
|
||||
(:methods
|
||||
(debug-draw! (_type_) none 9)
|
||||
(debug-draw (_type_) int 9)
|
||||
(point-past-plane? (_type_ vector) symbol 10)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(define-extern quaternion-from-two-vectors-max-angle! (function quaternion vector vector float quaternion))
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defbehavior update-mood-default time-of-day-proc ((arg0 mood-context) (arg1 float) (arg2 int))
|
||||
(copy-mood-exterior arg0)
|
||||
0
|
||||
@@ -57,7 +56,6 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defbehavior update-mood-ruins time-of-day-proc ((arg0 mood-context) (arg1 float) (arg2 int))
|
||||
(copy-mood-exterior arg0)
|
||||
(when (and (= (-> *level* level arg2 status) 'active)
|
||||
@@ -117,7 +115,6 @@
|
||||
)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defbehavior update-mood-strip time-of-day-proc ((arg0 mood-context) (arg1 float) (arg2 int))
|
||||
(copy-mood-exterior arg0)
|
||||
(when (and (= (-> *level* level arg2 status) 'active)
|
||||
@@ -156,7 +153,6 @@
|
||||
)
|
||||
|
||||
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defbehavior update-mood-ctywide time-of-day-proc ((arg0 mood-context) (arg1 float) (arg2 int))
|
||||
(copy-mood-exterior arg0)
|
||||
(when (and (= (-> *level* level arg2 status) 'active)
|
||||
@@ -170,7 +166,6 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defbehavior update-mood-copy-ctywide time-of-day-proc ((arg0 mood-context) (arg1 float) (arg2 int))
|
||||
(let ((v1-1 (level-get *level* 'ctywide)))
|
||||
(cond
|
||||
@@ -198,7 +193,6 @@
|
||||
)
|
||||
|
||||
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defbehavior update-mood-ctyind time-of-day-proc ((arg0 mood-context) (arg1 float) (arg2 int))
|
||||
(copy-mood-exterior arg0)
|
||||
(when (and (= (-> *level* level arg2 status) 'active)
|
||||
@@ -258,14 +252,10 @@
|
||||
(set! (-> gp-0 spec-1) (get-field-spec-by-id a0-2 (sp-field-id spt-a)))
|
||||
)
|
||||
)
|
||||
(let ((f0-0 (rand-vu-float-range 0.8 1.0)))
|
||||
(set! (-> gp-0 neon-min-bright) f0-0)
|
||||
f0-0
|
||||
)
|
||||
(set! (-> gp-0 neon-min-bright) (rand-vu-float-range 0.8 1.0))
|
||||
)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defbehavior update-mood-ctysluma time-of-day-proc ((arg0 mood-context) (arg1 float) (arg2 int))
|
||||
(copy-mood-exterior arg0)
|
||||
(when (and (!= arg2 -1)
|
||||
@@ -327,7 +317,6 @@
|
||||
)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defbehavior update-mood-ctyslumb time-of-day-proc ((arg0 mood-context) (arg1 float) (arg2 int))
|
||||
(copy-mood-exterior arg0)
|
||||
(when (and (= (-> *level* level arg2 status) 'active)
|
||||
@@ -381,7 +370,6 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defbehavior update-mood-ctyslumc time-of-day-proc ((arg0 mood-context) (arg1 float) (arg2 int))
|
||||
(copy-mood-exterior arg0)
|
||||
(when (and (= (-> *level* level arg2 status) 'active)
|
||||
@@ -429,14 +417,12 @@
|
||||
)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defun init-mood-ctyport-no-part ((arg0 mood-context))
|
||||
(set! (-> (the-as ctyport-states (-> arg0 state)) spec-0) (the-as sp-field-init-spec 0))
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defbehavior update-mood-ctyport time-of-day-proc ((arg0 mood-context) (arg1 float) (arg2 int))
|
||||
(copy-mood-exterior arg0)
|
||||
(when (and (!= arg2 -1)
|
||||
@@ -476,7 +462,6 @@
|
||||
)
|
||||
|
||||
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defbehavior update-mood-ctymarka time-of-day-proc ((arg0 mood-context) (arg1 float) (arg2 int))
|
||||
(copy-mood-exterior arg0)
|
||||
(when (and (= (-> *level* level arg2 status) 'active)
|
||||
@@ -510,7 +495,6 @@
|
||||
)
|
||||
|
||||
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defbehavior update-mood-ctymarkb time-of-day-proc ((arg0 mood-context) (arg1 float) (arg2 int))
|
||||
(copy-mood-exterior arg0)
|
||||
(when (and (!= arg2 -1)
|
||||
@@ -556,15 +540,11 @@
|
||||
|
||||
|
||||
(defun init-mood-palcab ((arg0 mood-context))
|
||||
(let ((v1-0 (the-as object (-> arg0 state)))
|
||||
(f0-0 1.0)
|
||||
)
|
||||
(set! (-> (the-as palcab-states v1-0) electricity scale) f0-0)
|
||||
f0-0
|
||||
(let ((v1-0 (the-as object (-> arg0 state))))
|
||||
(set! (-> (the-as palcab-states v1-0) electricity scale) 1.0)
|
||||
)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defbehavior update-mood-palcab time-of-day-proc ((arg0 mood-context) (arg1 float) (arg2 int))
|
||||
(copy-mood-exterior arg0)
|
||||
(when (and (!= arg2 -1)
|
||||
@@ -582,7 +562,12 @@
|
||||
(let ((a0-9 (new 'stack-no-clear 'sphere))
|
||||
(a1-3 (-> *math-camera* trans))
|
||||
)
|
||||
(set-vector! a0-9 786432.0 1818624.0 2498560.0 1.0)
|
||||
(let ((v1-12 a0-9))
|
||||
(set! (-> v1-12 x) 786432.0)
|
||||
(set! (-> v1-12 y) 1818624.0)
|
||||
(set! (-> v1-12 z) 2498560.0)
|
||||
(set! (-> v1-12 r) 1.0)
|
||||
)
|
||||
(let ((f0-8 (- 1.0 (get-sphere-interp a0-9 a1-3 1024000.0 2048000.0))))
|
||||
(update-mood-weather! *mood-control* (+ 0.25 (* 0.75 f0-8)) (+ 0.5 (* 0.5 f0-8)) 30.0 30.0)
|
||||
)
|
||||
@@ -595,11 +580,8 @@
|
||||
(defun set-palcab-turret-flash! ((arg0 float))
|
||||
(let ((v1-1 (level-get *level* 'palcab)))
|
||||
(when v1-1
|
||||
(let ((v1-2 (the-as object (-> v1-1 mood-context state)))
|
||||
(f0-0 arg0)
|
||||
)
|
||||
(set! (-> (the-as palcab-states v1-2) turret-value) f0-0)
|
||||
f0-0
|
||||
(let ((v1-2 (the-as object (-> v1-1 mood-context state))))
|
||||
(set! (-> (the-as palcab-states v1-2) turret-value) arg0)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -615,7 +597,6 @@
|
||||
)
|
||||
|
||||
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defun update-stadium-lights ((arg0 mood-context))
|
||||
(let ((a1-0 (-> arg0 light-group))
|
||||
(gp-0 (-> arg0 light-group 2))
|
||||
@@ -629,7 +610,6 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defbehavior update-mood-stadium time-of-day-proc ((arg0 mood-context) (arg1 float) (arg2 int))
|
||||
(copy-mood-exterior arg0)
|
||||
(update-stadium-lights arg0)
|
||||
@@ -645,7 +625,6 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defbehavior update-mood-copy-stadium time-of-day-proc ((arg0 mood-context) (arg1 float) (arg2 int))
|
||||
(let ((v1-1 (level-get *level* 'stadium)))
|
||||
(cond
|
||||
@@ -676,7 +655,6 @@
|
||||
)
|
||||
|
||||
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defun update-stadiumb-lights ((arg0 mood-context))
|
||||
(let ((gp-0 (-> arg0 light-group)))
|
||||
(let ((a0-1 (-> arg0 light-group 1)))
|
||||
@@ -690,7 +668,6 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defbehavior update-mood-stadiumb time-of-day-proc ((arg0 mood-context) (arg1 float) (arg2 int))
|
||||
(copy-mood-exterior arg0)
|
||||
(update-stadiumb-lights arg0)
|
||||
@@ -721,7 +698,6 @@
|
||||
)
|
||||
|
||||
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defbehavior update-mood-skatea time-of-day-proc ((arg0 mood-context) (arg1 float) (arg2 int))
|
||||
(copy-mood-exterior arg0)
|
||||
(when (and (= (-> *level* level arg2 status) 'active)
|
||||
@@ -747,7 +723,6 @@
|
||||
)
|
||||
|
||||
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defun update-ltentout-lights ((arg0 mood-context))
|
||||
(let ((v1-0 (-> arg0 light-group 2)))
|
||||
(set-vector! (-> v1-0 dir0 color) 0.822 0.694 0.613 1.0)
|
||||
@@ -757,7 +732,6 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defbehavior update-mood-ltentout time-of-day-proc ((arg0 mood-context) (arg1 float) (arg2 int))
|
||||
(copy-mood-exterior arg0)
|
||||
(update-ltentout-lights arg0)
|
||||
@@ -849,7 +823,6 @@
|
||||
)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defbehavior update-mood-mountain time-of-day-proc ((arg0 mood-context) (arg1 float) (arg2 int))
|
||||
(copy-mood-exterior arg0)
|
||||
(when (and (= (-> *level* level arg2 status) 'active)
|
||||
@@ -900,7 +873,6 @@
|
||||
)
|
||||
|
||||
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defbehavior update-mood-forest time-of-day-proc ((arg0 mood-context) (arg1 float) (arg2 int))
|
||||
(copy-mood-exterior arg0)
|
||||
(when (and (= (-> *level* level arg2 status) 'active)
|
||||
@@ -924,15 +896,11 @@
|
||||
|
||||
|
||||
(defun init-mood-atoll ((arg0 mood-context))
|
||||
(let ((v1-0 (the-as object (-> arg0 state)))
|
||||
(f0-0 0.0)
|
||||
)
|
||||
(set! (-> (the-as atoll-states v1-0) explosion) f0-0)
|
||||
f0-0
|
||||
(let ((v1-0 (the-as object (-> arg0 state))))
|
||||
(set! (-> (the-as atoll-states v1-0) explosion) 0.0)
|
||||
)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defbehavior update-mood-atoll time-of-day-proc ((arg0 mood-context) (arg1 float) (arg2 int))
|
||||
(copy-mood-exterior arg0)
|
||||
(when (and (= (-> *level* level arg2 status) 'active)
|
||||
@@ -953,17 +921,13 @@
|
||||
(defun set-atoll-explosion! ((arg0 float))
|
||||
(let ((v1-1 (level-get *level* 'atoll)))
|
||||
(when v1-1
|
||||
(let ((v1-2 (the-as object (-> v1-1 mood-context state)))
|
||||
(f0-0 arg0)
|
||||
)
|
||||
(set! (-> (the-as atoll-states v1-2) explosion) f0-0)
|
||||
f0-0
|
||||
(let ((v1-2 (the-as object (-> v1-1 mood-context state))))
|
||||
(set! (-> (the-as atoll-states v1-2) explosion) arg0)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defbehavior update-mood-atollext time-of-day-proc ((arg0 mood-context) (arg1 float) (arg2 int))
|
||||
(copy-mood-exterior-ambi arg0 #t)
|
||||
(when (and (= (-> *level* level arg2 status) 'active)
|
||||
@@ -1001,7 +965,6 @@
|
||||
#f
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defun update-drill-lights ((arg0 mood-context))
|
||||
(let ((a1-0 (-> arg0 light-group))
|
||||
(s5-0 (-> arg0 light-group 1))
|
||||
@@ -1026,7 +989,6 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defbehavior update-mood-drill time-of-day-proc ((arg0 mood-context) (arg1 object) (arg2 int))
|
||||
(copy-mood-exterior-ambi arg0 #t)
|
||||
(update-drill-lights arg0)
|
||||
@@ -1039,8 +1001,8 @@
|
||||
(set! (-> arg0 times 5 w) 1.0)
|
||||
(set! (-> arg0 times 4 w) (-> gp-1 fire-floor))
|
||||
(update-mood-flames arg0 6 1 12 0.9 0.0009765625 2.0)
|
||||
(if (and (task-node-closed? (game-task-node drill-mech-resolution))
|
||||
(not (task-node-closed? (game-task-node drill-mech-started-smashing)))
|
||||
(if (and (task-node-closed? (game-task-node drill-mech-smash-consoles))
|
||||
(not (task-node-closed? (game-task-node drill-mech-resolution)))
|
||||
)
|
||||
(update-mood-pulse arg0 7 52 0.75 0.25 (* 65536.0 (-> self clock seconds-per-frame)) 16384.0)
|
||||
)
|
||||
@@ -1083,17 +1045,13 @@
|
||||
)
|
||||
(let ((v1-5 (level-get *level* 'drillmid)))
|
||||
(when v1-5
|
||||
(let ((v1-6 (the-as object (-> v1-5 mood-context state)))
|
||||
(f0-1 arg0)
|
||||
)
|
||||
(set! (-> (the-as drill-states v1-6) electricity arg1 scale) f0-1)
|
||||
f0-1
|
||||
(let ((v1-6 (the-as object (-> v1-5 mood-context state))))
|
||||
(set! (-> (the-as drill-states v1-6) electricity arg1 scale) arg0)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defbehavior update-mood-drillmnt time-of-day-proc ((arg0 mood-context) (arg1 float) (arg2 int))
|
||||
(copy-mood-exterior-ambi arg0 #t)
|
||||
(update-drill-lights arg0)
|
||||
@@ -1133,7 +1091,6 @@
|
||||
#f
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defbehavior update-mood-drillb time-of-day-proc ((arg0 mood-context))
|
||||
(copy-mood-exterior-ambi arg0 #f)
|
||||
(update-drill-lights arg0)
|
||||
@@ -1145,8 +1102,8 @@
|
||||
(let ((gp-0 (the-as drillb-states (-> arg0 state))))
|
||||
(set! (-> arg0 times 1 w) 1.0)
|
||||
(set! (-> arg0 times 4 w) (-> gp-0 fire-floor))
|
||||
(if (and (task-node-closed? (game-task-node drill-mech-resolution))
|
||||
(not (task-node-closed? (game-task-node drill-mech-started-smashing)))
|
||||
(if (and (task-node-closed? (game-task-node drill-mech-smash-consoles))
|
||||
(not (task-node-closed? (game-task-node drill-mech-resolution)))
|
||||
)
|
||||
(update-mood-pulse arg0 7 12 0.75 0.25 (* 65536.0 (-> self clock seconds-per-frame)) 16384.0)
|
||||
)
|
||||
@@ -1211,14 +1168,10 @@
|
||||
(set-vector! (-> gp-0 ambi color) 0.2 0.2 0.25 1.0)
|
||||
(set! (-> gp-0 dir0 extra x) 0.65)
|
||||
(set! (-> gp-0 dir1 extra x) 1.0)
|
||||
(let ((f0-38 0.7))
|
||||
(set! (-> gp-0 ambi extra x) f0-38)
|
||||
f0-38
|
||||
)
|
||||
(set! (-> gp-0 ambi extra x) 0.7)
|
||||
)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defbehavior update-mood-casboss time-of-day-proc ((arg0 mood-context) (arg1 float) (arg2 int))
|
||||
(copy-mood-exterior arg0)
|
||||
(update-casboss-lights arg0)
|
||||
@@ -1241,11 +1194,8 @@
|
||||
(defun set-casboss-explosion! ()
|
||||
(let ((v1-1 (level-get *level* 'ctywide)))
|
||||
(when v1-1
|
||||
(let ((v1-2 (the-as object (-> v1-1 mood-context state)))
|
||||
(f0-0 1.0)
|
||||
)
|
||||
(set! (-> (the-as casboss-states v1-2) explosion) f0-0)
|
||||
f0-0
|
||||
(let ((v1-2 (the-as object (-> v1-1 mood-context state))))
|
||||
(set! (-> (the-as casboss-states v1-2) explosion) 1.0)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -1263,7 +1213,6 @@
|
||||
)
|
||||
|
||||
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defbehavior update-mood-caspad time-of-day-proc ((arg0 mood-context) (arg1 float) (arg2 int))
|
||||
(copy-mood-exterior arg0)
|
||||
(when (and (= (-> *level* level arg2 status) 'active)
|
||||
@@ -1312,7 +1261,6 @@
|
||||
)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defbehavior update-mood-palout time-of-day-proc ((arg0 mood-context) (arg1 float) (arg2 int))
|
||||
(copy-mood-exterior-ambi arg0 #t)
|
||||
(when (and (= (-> *level* level arg2 status) 'active)
|
||||
@@ -1347,14 +1295,10 @@
|
||||
(defun init-mood-palroof ((arg0 mood-context))
|
||||
(let ((v1-0 (the-as palroof-states (-> arg0 state))))
|
||||
(set! (-> v1-0 electricity 0 scale) 1.0)
|
||||
(let ((f0-1 1.0))
|
||||
(set! (-> v1-0 electricity 1 scale) f0-1)
|
||||
f0-1
|
||||
)
|
||||
(set! (-> v1-0 electricity 1 scale) 1.0)
|
||||
)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defbehavior update-mood-palroof time-of-day-proc ((arg0 mood-context) (arg1 object) (arg2 int))
|
||||
(copy-mood-exterior arg0)
|
||||
(when (and (= (-> *level* level arg2 status) 'active)
|
||||
@@ -1372,11 +1316,8 @@
|
||||
(defun set-palroof-electricity-scale! ((arg0 float) (arg1 int))
|
||||
(let ((v1-1 (level-get *level* 'palroof)))
|
||||
(when v1-1
|
||||
(let ((v1-2 (the-as object (-> v1-1 mood-context state)))
|
||||
(f0-0 arg0)
|
||||
)
|
||||
(set! (-> (the-as palroof-states v1-2) electricity arg1 scale) f0-0)
|
||||
f0-0
|
||||
(let ((v1-2 (the-as object (-> v1-1 mood-context state))))
|
||||
(set! (-> (the-as palroof-states v1-2) electricity arg1 scale) arg0)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -1392,7 +1333,6 @@
|
||||
)
|
||||
|
||||
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defbehavior update-mood-palent time-of-day-proc ((arg0 mood-context) (arg1 float) (arg2 int))
|
||||
(copy-mood-exterior arg0)
|
||||
(when (and (= (-> *level* level arg2 status) 'active)
|
||||
@@ -1414,11 +1354,8 @@
|
||||
(defun set-palent-turret-flash! ((arg0 float))
|
||||
(let ((v1-1 (level-get *level* 'palent)))
|
||||
(when v1-1
|
||||
(let ((v1-2 (the-as object (-> v1-1 mood-context state)))
|
||||
(f0-1 (* 0.5 arg0))
|
||||
)
|
||||
(set! (-> (the-as palent-states v1-2) turret-value) f0-1)
|
||||
f0-1
|
||||
(let ((v1-2 (the-as object (-> v1-1 mood-context state))))
|
||||
(set! (-> (the-as palent-states v1-2) turret-value) (* 0.5 arg0))
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -1449,7 +1386,6 @@
|
||||
(mem-copy! (the-as pointer (-> arg0 light-group 1)) (the-as pointer (-> arg0 light-group)) 192)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defbehavior update-mood-nest time-of-day-proc ((arg0 mood-context) (arg1 float) (arg2 int))
|
||||
(copy-mood-exterior arg0)
|
||||
(update-nest-lights arg0)
|
||||
@@ -1509,14 +1445,10 @@
|
||||
(set! (-> v1-0 0 dir0 extra x) (* 0.5 (-> v1-0 0 dir0 extra x)))
|
||||
(set! (-> v1-0 0 dir1 extra x) (* 0.5 (-> v1-0 0 dir1 extra x)))
|
||||
(set! (-> v1-0 0 dir2 extra x) (* 0.5 (-> v1-0 0 dir2 extra x)))
|
||||
(let ((f0-7 (* 0.75 (-> v1-0 0 ambi extra x))))
|
||||
(set! (-> v1-0 0 ambi extra x) f0-7)
|
||||
f0-7
|
||||
)
|
||||
(set! (-> v1-0 0 ambi extra x) (* 0.75 (-> v1-0 0 ambi extra x)))
|
||||
)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defbehavior update-mood-village1 time-of-day-proc ((arg0 mood-context) (arg1 float) (arg2 int))
|
||||
(copy-mood-exterior arg0)
|
||||
(update-village1-lights arg0)
|
||||
@@ -1542,7 +1474,6 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defbehavior update-mood-copy-village1 time-of-day-proc ((arg0 mood-context) (arg1 float) (arg2 int))
|
||||
(let ((v1-1 (level-get *level* 'village1)))
|
||||
(if (and v1-1 (= (-> v1-1 status) 'active))
|
||||
@@ -1588,7 +1519,6 @@
|
||||
)
|
||||
|
||||
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defbehavior update-mood-consite time-of-day-proc ((arg0 mood-context) (arg1 float) (arg2 int))
|
||||
(copy-mood-exterior arg0)
|
||||
(when (and (= (-> *level* level arg2 status) 'active)
|
||||
@@ -1625,11 +1555,8 @@
|
||||
(defun set-consite-flash! ()
|
||||
(let ((v1-1 (level-get *level* 'consite)))
|
||||
(when v1-1
|
||||
(let ((v1-2 (the-as object (-> v1-1 mood-context state)))
|
||||
(f0-0 2.0)
|
||||
)
|
||||
(set! (-> (the-as consite-states v1-2) flash) f0-0)
|
||||
f0-0
|
||||
(let ((v1-2 (the-as object (-> v1-1 mood-context state))))
|
||||
(set! (-> (the-as consite-states v1-2) flash) 2.0)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -1644,7 +1571,6 @@
|
||||
)
|
||||
|
||||
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defbehavior update-mood-mincan time-of-day-proc ((arg0 mood-context) (arg1 float) (arg2 int))
|
||||
(copy-mood-exterior arg0)
|
||||
(when (and (= (-> *level* level arg2 status) 'active)
|
||||
@@ -1662,16 +1588,9 @@
|
||||
(defun set-mincan-beam! ((arg0 int) (arg1 float))
|
||||
(let ((v1-1 (level-get *level* 'mincan)))
|
||||
(when v1-1
|
||||
(let ((v1-2 (-> v1-1 mood-context state))
|
||||
(f0-0 arg1)
|
||||
)
|
||||
(set! (-> (the-as mincan-states (+ (* arg0 4) (the-as int v1-2))) beams 0) f0-0)
|
||||
f0-0
|
||||
(let ((v1-2 (-> v1-1 mood-context state)))
|
||||
(set! (-> (the-as mincan-states (+ (* arg0 4) (the-as int v1-2))) beams 0) arg1)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -7,3 +7,5 @@
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(defun time-of-day-setup ((arg0 symbol))
|
||||
#f)
|
||||
@@ -24,6 +24,7 @@
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
;; WARN: Return type mismatch int vs sparticle-launcher.
|
||||
|
||||
(kmemopen global "part-tables")
|
||||
|
||||
@@ -51,6 +52,7 @@
|
||||
(the-as sparticle-launch-group #f)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch (pointer sparticle-launch-group) vs (pointer object).
|
||||
(defun lookup-part-group-pointer-by-name ((arg0 string))
|
||||
"Similar to [[lookup-part-group-by-name]] but returns a pointer instead"
|
||||
(let* ((s4-0 *part-group-id-table*)
|
||||
@@ -159,7 +161,7 @@
|
||||
|
||||
;; ERROR: function was not converted to expressions. Cannot decompile.
|
||||
|
||||
;; ERROR: function has no type analysis. Cannot decompile.
|
||||
;; ERROR: function was not converted to expressions. Cannot decompile.
|
||||
|
||||
(defun sp-queue-launch ((arg0 sparticle-system) (arg1 sparticle-launcher) (arg2 matrix))
|
||||
(let ((v1-0 *sp-launch-queue*))
|
||||
@@ -651,6 +653,7 @@
|
||||
)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch object vs sparticle-launch-control.
|
||||
(defmethod create-launch-control sparticle-launch-group ((obj sparticle-launch-group) (arg0 process))
|
||||
(let ((gp-0 (the-as object (new 'process 'sparticle-launch-control (-> obj length)))))
|
||||
(when (zero? (the-as sparticle-launch-control gp-0))
|
||||
@@ -688,7 +691,7 @@
|
||||
|
||||
(defmethod sparticle-launch-control-method-10 sparticle-launch-control ((obj sparticle-launch-control) (arg0 vector))
|
||||
(let* ((v1-0 (-> obj group))
|
||||
(f0-0 (-> v1-0 bounds w))
|
||||
(f0-0 (-> v1-0 bounds r))
|
||||
)
|
||||
(cond
|
||||
((= f0-0 0.0)
|
||||
@@ -708,7 +711,7 @@
|
||||
(-> s5-1 w)
|
||||
(new 'static 'rgba :g #xff :a #x80)
|
||||
)
|
||||
(add-debug-matrix *display-sprite-marks* (bucket-id debug2) (-> obj origin) (meters 2.0))
|
||||
(add-debug-matrix *display-sprite-marks* (bucket-id debug2) (-> obj origin) (meters 2))
|
||||
)
|
||||
(sphere-in-view-frustum? (the-as sphere s5-1))
|
||||
)
|
||||
@@ -1040,6 +1043,7 @@
|
||||
;; ERROR: Unsupported inline assembly instruction kind - [mula.s f0, f3]
|
||||
;; ERROR: Unsupported inline assembly instruction kind - [madd.s f0, f2, f5]
|
||||
|
||||
;; WARN: Return type mismatch int vs object.
|
||||
|
||||
(defun sparticle-set-conerot ((arg0 sparticle-launcher) (arg1 vector))
|
||||
(let ((s5-0 (get-field-spec-by-id arg0 (sp-field-id spt-conerot-x)))
|
||||
@@ -1067,14 +1071,12 @@
|
||||
(let ((f0-1 (+ (-> arg1 key origin trans y) (-> arg1 user-float))))
|
||||
(when (and (< (-> arg2 launchrot y) f0-1) (< (-> arg1 vel-sxvel y) 0.0))
|
||||
(set! (-> arg2 launchrot y) f0-1)
|
||||
(let ((f0-4 (* (-> arg1 vel-sxvel y) (- (rand-vu-float-range 0.6 0.8)))))
|
||||
(set! (-> arg1 vel-sxvel y) f0-4)
|
||||
f0-4
|
||||
)
|
||||
(set! (-> arg1 vel-sxvel y) (* (-> arg1 vel-sxvel y) (- (rand-vu-float-range 0.6 0.8))))
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch symbol vs none.
|
||||
(defun check-drop-group-center ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo))
|
||||
(let ((f0-0 (-> arg1 key origin trans y)))
|
||||
(if (< (-> arg2 launchrot y) f0-0)
|
||||
@@ -1204,7 +1206,3 @@
|
||||
)
|
||||
|
||||
;; ERROR: failed type prop at 45: Could not figure out load: (set! v1 (l.w (+ gp 12)))
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
(define-extern *draw-index* int)
|
||||
(define-extern *level-index* int)
|
||||
(define-extern *print-login* symbol)
|
||||
(define-extern *level-load-list* pair)
|
||||
|
||||
(defmacro start-debug (str &rest args)
|
||||
`(format 0 ,(string-append "[START] " str) ,@args)
|
||||
@@ -319,7 +320,7 @@
|
||||
(login-begin (_type_) _type_ 19)
|
||||
(debug-print-region-splitbox (_type_ vector object) none 20)
|
||||
(get-art-group-by-name (_type_ string) art-group 21)
|
||||
(level-method-22 () none 22)
|
||||
(level-method-22 (_type_ symbol) int 22)
|
||||
(lookup-text (_type_ game-text-id symbol) string 23)
|
||||
(level-method-24 () none 24)
|
||||
(birth (_type_) _type_ 25)
|
||||
@@ -495,9 +496,3 @@
|
||||
(set! *level-index* 0)
|
||||
0
|
||||
)
|
||||
|
||||
0
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1424,10 +1424,8 @@
|
||||
(birth (-> obj bsp))
|
||||
(set! (-> obj status) 'alive)
|
||||
(set! (-> obj render?) #t)
|
||||
(format 0 "SKIP: copy-perms-to-level~%")
|
||||
(format #t "SKIP: copy-perms-to-level~%")
|
||||
|
||||
;(copy-perms-to-level! *game-info* obj)
|
||||
(copy-perms-to-level! *game-info* obj)
|
||||
(send-event *camera* 'level-activate (-> obj name))
|
||||
(send-event *target* 'level-activate (-> obj name))
|
||||
(when (and (-> obj info login-func) s1-0)
|
||||
@@ -1440,7 +1438,7 @@
|
||||
)
|
||||
(let ((s1-2 (-> obj status)))
|
||||
(set! (-> obj status) 'active)
|
||||
(when (nonzero? update-task-masks) (update-task-masks 'level)) ;; added nonzero check
|
||||
(update-task-masks 'level)
|
||||
(assign-draw-indices *level*)
|
||||
(let ((s0-0 (-> obj bsp nav-meshes)))
|
||||
(when (nonzero? s0-0)
|
||||
@@ -2225,10 +2223,9 @@
|
||||
)
|
||||
(start-debug "PLAY: starting dproc~%")
|
||||
(on #t)
|
||||
(format 0 "SKIP: initialize game info~%")
|
||||
; (if arg1
|
||||
; (initialize! *game-info* 'game (the-as game-save #f) (the-as string #f))
|
||||
; )
|
||||
(if arg1
|
||||
(initialize! *game-info* 'game (the-as game-save #f) (the-as string #f))
|
||||
)
|
||||
(kmemclose)
|
||||
(kmemclose)
|
||||
0
|
||||
|
||||
@@ -133,3 +133,8 @@
|
||||
:size-assert #x504
|
||||
:flag-assert #x900000504
|
||||
)
|
||||
|
||||
|
||||
(define-extern region-prim-lookup-by-id (function int drawable-region-prim))
|
||||
(define-extern region-lookup-by-id (function int region))
|
||||
|
||||
|
||||
@@ -132,6 +132,7 @@
|
||||
0
|
||||
)
|
||||
|
||||
;; WARN: Function (method 16 load-state) has a return type of none, but the expression builder found a return statement.
|
||||
(defmethod want-force-inside load-state ((obj load-state) (arg0 symbol) (arg1 symbol))
|
||||
(dotimes (v1-0 6)
|
||||
(when (= (-> obj want v1-0 name) arg0)
|
||||
@@ -294,14 +295,14 @@
|
||||
((pair? (car s3-0))
|
||||
(let ((a1-4 (car s3-0)))
|
||||
(while (not (null? s3-0))
|
||||
(eval! s4-0 (the-as structure a1-4))
|
||||
(eval! s4-0 (the-as pair a1-4))
|
||||
(set! s3-0 (cdr s3-0))
|
||||
(set! a1-4 (car s3-0))
|
||||
)
|
||||
)
|
||||
)
|
||||
(else
|
||||
(eval! s4-0 (the-as structure s3-0))
|
||||
(eval! s4-0 s3-0)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -320,7 +321,3 @@
|
||||
(define-perm *load-state* load-state (new 'global 'load-state))
|
||||
|
||||
(kmemclose)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -537,6 +537,7 @@
|
||||
(y float :offset 4)
|
||||
(z float :offset 8)
|
||||
)
|
||||
:pack-me ;; removeme
|
||||
:method-count-assert 9
|
||||
:size-assert #xc
|
||||
:flag-assert #x90000000c
|
||||
|
||||
@@ -39,6 +39,7 @@
|
||||
:flag-assert #x900000044
|
||||
)
|
||||
|
||||
|
||||
(deftype mc-slot-info (structure)
|
||||
((handle int32 :offset-assert 0)
|
||||
(known int32 :offset-assert 4)
|
||||
@@ -49,11 +50,13 @@
|
||||
(mem-actual int32 :offset-assert 24)
|
||||
(file mc-file-info 4 :inline :offset-assert 28)
|
||||
)
|
||||
:pack-me
|
||||
:method-count-assert 9
|
||||
:size-assert #x12c
|
||||
:flag-assert #x90000012c
|
||||
)
|
||||
|
||||
|
||||
(defun mc-sync ()
|
||||
(let ((v0-0 0))
|
||||
(while (zero? v0-0)
|
||||
|
||||
+160
-159
@@ -35,15 +35,16 @@
|
||||
(circle 13)
|
||||
(x 14)
|
||||
(square 15)
|
||||
(pb16 16)
|
||||
(pb17 17)
|
||||
(pb18 18)
|
||||
(pb19 19)
|
||||
(pb20 20)
|
||||
(pb21 21)
|
||||
(pb22 22)
|
||||
(pb23 23)
|
||||
(pb24 24)
|
||||
;; only 16 buttons are mapped to hardware, the rest are 'actions' or something else
|
||||
(l-analog-down 16)
|
||||
(l-analog-right 17)
|
||||
(l-analog-up 18)
|
||||
(l-analog-left 19)
|
||||
(r-analog-down 20)
|
||||
(r-analog-right 21)
|
||||
(r-analog-up 22)
|
||||
(r-analog-left 23)
|
||||
(confirm 24)
|
||||
)
|
||||
|
||||
(defenum pad-type
|
||||
@@ -54,6 +55,7 @@
|
||||
(namco-gun 6)
|
||||
)
|
||||
|
||||
;; decomp begins
|
||||
|
||||
(deftype scf-time (structure)
|
||||
((stat uint8 :offset-assert 0)
|
||||
@@ -130,7 +132,7 @@
|
||||
:flag-assert #xa00000090
|
||||
(:methods
|
||||
(new (symbol type int) _type_ 0)
|
||||
(invert-analog-if-needed (_type_) none 9)
|
||||
(adjust-to-screen-flip (_type_) int 9)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -200,6 +202,7 @@
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(defmethod new cpad-list ((allocation symbol) (type-to-make type))
|
||||
"Create a cpad-list for 2 controllers. It's fine to do this even if one or both controllers
|
||||
aren't connected yet."
|
||||
@@ -264,166 +267,166 @@
|
||||
|
||||
(defun service-cpads ()
|
||||
"Read from cpads and update vibration"
|
||||
(let ((gp-0 *cpad-list*))
|
||||
(dotimes (s5-0 (-> gp-0 num-cpads))
|
||||
(let ((s4-0 (-> *cpad-list* cpads s5-0)))
|
||||
(set! (-> s4-0 old-leftx 1) (-> s4-0 old-leftx 0))
|
||||
(set! (-> s4-0 old-leftx 0) (-> s4-0 leftx))
|
||||
(set! (-> s4-0 old-lefty 1) (-> s4-0 old-lefty 0))
|
||||
(set! (-> s4-0 old-lefty 0) (-> s4-0 lefty))
|
||||
(set! (-> s4-0 old-rightx 1) (-> s4-0 old-rightx 0))
|
||||
(set! (-> s4-0 old-rightx 0) (-> s4-0 rightx))
|
||||
(set! (-> s4-0 old-righty 1) (-> s4-0 old-righty 0))
|
||||
(set! (-> s4-0 old-righty 0) (-> s4-0 righty))
|
||||
(cpad-get-data s4-0)
|
||||
(invert-analog-if-needed s4-0)
|
||||
(let ((pads *cpad-list*))
|
||||
(dotimes (i (-> pads num-cpads))
|
||||
(let ((pad (-> *cpad-list* cpads i)))
|
||||
(set! (-> pad old-leftx 1) (-> pad old-leftx 0))
|
||||
(set! (-> pad old-leftx 0) (-> pad leftx))
|
||||
(set! (-> pad old-lefty 1) (-> pad old-lefty 0))
|
||||
(set! (-> pad old-lefty 0) (-> pad lefty))
|
||||
(set! (-> pad old-rightx 1) (-> pad old-rightx 0))
|
||||
(set! (-> pad old-rightx 0) (-> pad rightx))
|
||||
(set! (-> pad old-righty 1) (-> pad old-righty 0))
|
||||
(set! (-> pad old-righty 0) (-> pad righty))
|
||||
(cpad-get-data pad)
|
||||
(adjust-to-screen-flip pad)
|
||||
(cond
|
||||
((zero? (logand (-> s4-0 valid) 128))
|
||||
(dotimes (s3-0 2)
|
||||
((zero? (logand (-> pad valid) 128))
|
||||
(dotimes (buzz-i 2)
|
||||
(cond
|
||||
((and (-> s4-0 buzz) (< (get-current-time) (-> s4-0 buzz-time s3-0)) (= *master-mode* 'game))
|
||||
(let ((v1-20 s3-0))
|
||||
((and (-> pad buzz) (< (get-current-time) (-> pad buzz-time buzz-i)) (= *master-mode* 'game))
|
||||
(let ((v1-20 buzz-i))
|
||||
(cond
|
||||
((zero? v1-20)
|
||||
(set! (-> s4-0 direct s3-0)
|
||||
(logand (ash (-> s4-0 buzz-val s3-0) (- (the-as int (logand (get-integral-current-time) 7)))) 1)
|
||||
(set! (-> pad direct buzz-i)
|
||||
(logand (ash (-> pad buzz-val buzz-i) (- (the-as int (logand (get-integral-current-time) 7)))) 1)
|
||||
)
|
||||
)
|
||||
((= v1-20 1)
|
||||
(set! (-> s4-0 direct s3-0) (-> s4-0 buzz-val s3-0))
|
||||
(set! (-> pad direct buzz-i) (-> pad buzz-val buzz-i))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
((and (zero? s3-0) (> (-> s4-0 buzz-pause-time) 0))
|
||||
(set! (-> s4-0 direct s3-0)
|
||||
(logand (ash (-> s4-0 buzz-pause-val s3-0) (- (the-as int (logand (get-integral-current-time) 7)))) 1)
|
||||
((and (zero? buzz-i) (> (-> pad buzz-pause-time) 0))
|
||||
(set! (-> pad direct buzz-i)
|
||||
(logand (ash (-> pad buzz-pause-val buzz-i) (- (the-as int (logand (get-integral-current-time) 7)))) 1)
|
||||
)
|
||||
(+! (-> s4-0 buzz-pause-time) -1)
|
||||
(+! (-> pad buzz-pause-time) -1)
|
||||
)
|
||||
(else
|
||||
(set! (-> s4-0 buzz-val s3-0) (the-as uint 0))
|
||||
(set! (-> s4-0 direct s3-0) (the-as uint 0))
|
||||
(when (zero? s3-0)
|
||||
(set! (-> s4-0 buzz-pause-time) (the-as uint 0))
|
||||
(set! (-> pad buzz-val buzz-i) (the-as uint 0))
|
||||
(set! (-> pad direct buzz-i) (the-as uint 0))
|
||||
(when (zero? buzz-i)
|
||||
(set! (-> pad buzz-pause-time) (the-as uint 0))
|
||||
0
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(when (< (the-as uint 192) (-> s4-0 direct 1))
|
||||
(set! (-> s4-0 direct 0) (the-as uint 0))
|
||||
(when (< (the-as uint 192) (-> pad direct 1))
|
||||
(set! (-> pad direct 0) (the-as uint 0))
|
||||
0
|
||||
)
|
||||
(set! (-> s4-0 button0-abs 2) (-> s4-0 button0-abs 1))
|
||||
(set! (-> s4-0 button0-abs 1) (-> s4-0 button0-shadow-abs 0))
|
||||
(set! (-> s4-0 button0-rel 2) (-> s4-0 button0-rel 1))
|
||||
(set! (-> s4-0 button0-rel 1) (-> s4-0 button0-rel 0))
|
||||
(when (= (-> s4-0 status) 115)
|
||||
(set! (-> s4-0 abutton 0) (the-as uint (if (logtest? (-> s4-0 button0-abs 0) (pad-buttons right))
|
||||
(set! (-> pad button0-abs 2) (-> pad button0-abs 1))
|
||||
(set! (-> pad button0-abs 1) (-> pad button0-shadow-abs 0))
|
||||
(set! (-> pad button0-rel 2) (-> pad button0-rel 1))
|
||||
(set! (-> pad button0-rel 1) (-> pad button0-rel 0))
|
||||
(when (= (-> pad status) 115)
|
||||
(set! (-> pad abutton 0) (the-as uint (if (logtest? (-> pad button0-abs 0) (pad-buttons right))
|
||||
255
|
||||
0
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> pad abutton 1) (the-as uint (if (logtest? (-> pad button0-abs 0) (pad-buttons left))
|
||||
255
|
||||
0
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> pad abutton 2) (the-as uint (if (logtest? (-> pad button0-abs 0) (pad-buttons up))
|
||||
255
|
||||
0
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> pad abutton 3) (the-as uint (if (logtest? (-> pad button0-abs 0) (pad-buttons down))
|
||||
255
|
||||
0
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> pad abutton 6) (the-as uint (if (logtest? (-> pad button0-abs 0) (pad-buttons x))
|
||||
255
|
||||
0
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> pad abutton 5) (the-as uint (if (logtest? (-> pad button0-abs 0) (pad-buttons circle))
|
||||
255
|
||||
0
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> pad abutton 4) (the-as uint (if (logtest? (-> pad button0-abs 0) (pad-buttons triangle))
|
||||
255
|
||||
0
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> pad abutton 7) (the-as uint (if (logtest? (-> pad button0-abs 0) (pad-buttons square))
|
||||
255
|
||||
0
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> pad abutton 8) (the-as uint (if (logtest? (-> pad button0-abs 0) (pad-buttons l1))
|
||||
255
|
||||
0
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> pad abutton 10) (the-as uint (if (logtest? (-> pad button0-abs 0) (pad-buttons l2))
|
||||
255
|
||||
0
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> s4-0 abutton 1) (the-as uint (if (logtest? (-> s4-0 button0-abs 0) (pad-buttons left))
|
||||
(set! (-> pad abutton 9) (the-as uint (if (logtest? (-> pad button0-abs 0) (pad-buttons r1))
|
||||
255
|
||||
0
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> pad abutton 11) (the-as uint (if (logtest? (-> pad button0-abs 0) (pad-buttons r2))
|
||||
255
|
||||
0
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> s4-0 abutton 2) (the-as uint (if (logtest? (-> s4-0 button0-abs 0) (pad-buttons up))
|
||||
255
|
||||
0
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> s4-0 abutton 3) (the-as uint (if (logtest? (-> s4-0 button0-abs 0) (pad-buttons down))
|
||||
255
|
||||
0
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> s4-0 abutton 6) (the-as uint (if (logtest? (-> s4-0 button0-abs 0) (pad-buttons x))
|
||||
255
|
||||
0
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> s4-0 abutton 5) (the-as uint (if (logtest? (-> s4-0 button0-abs 0) (pad-buttons circle))
|
||||
255
|
||||
0
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> s4-0 abutton 4) (the-as uint (if (logtest? (-> s4-0 button0-abs 0) (pad-buttons triangle))
|
||||
255
|
||||
0
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> s4-0 abutton 7) (the-as uint (if (logtest? (-> s4-0 button0-abs 0) (pad-buttons square))
|
||||
255
|
||||
0
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> s4-0 abutton 8) (the-as uint (if (logtest? (-> s4-0 button0-abs 0) (pad-buttons l1))
|
||||
255
|
||||
0
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> s4-0 abutton 10) (the-as uint (if (logtest? (-> s4-0 button0-abs 0) (pad-buttons l2))
|
||||
255
|
||||
0
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> s4-0 abutton 9) (the-as uint (if (logtest? (-> s4-0 button0-abs 0) (pad-buttons r1))
|
||||
255
|
||||
0
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> s4-0 abutton 11) (the-as uint (if (logtest? (-> s4-0 button0-abs 0) (pad-buttons r2))
|
||||
255
|
||||
0
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((s3-1 (-> s4-0 button0)))
|
||||
(let ((buttons-pushed (the-as pad-buttons (-> pad button0))))
|
||||
(cond
|
||||
((< (-> s4-0 lefty) (the-as uint 30))
|
||||
(set! s3-1 (logior s3-1 #x10000))
|
||||
((< (-> pad lefty) (the-as uint 30))
|
||||
(set! buttons-pushed (logior (pad-buttons l-analog-down) buttons-pushed))
|
||||
)
|
||||
((< (the-as uint 225) (-> s4-0 lefty))
|
||||
(set! s3-1 (logior s3-1 #x40000))
|
||||
((< (the-as uint 225) (-> pad lefty))
|
||||
(set! buttons-pushed (logior (pad-buttons l-analog-up) buttons-pushed))
|
||||
)
|
||||
)
|
||||
(cond
|
||||
((< (-> s4-0 leftx) (the-as uint 30))
|
||||
(set! s3-1 (logior s3-1 #x80000))
|
||||
((< (-> pad leftx) (the-as uint 30))
|
||||
(set! buttons-pushed (logior (pad-buttons l-analog-left) buttons-pushed))
|
||||
)
|
||||
((< (the-as uint 225) (-> s4-0 leftx))
|
||||
(set! s3-1 (logior s3-1 #x20000))
|
||||
((< (the-as uint 225) (-> pad leftx))
|
||||
(set! buttons-pushed (logior (pad-buttons l-analog-right) buttons-pushed))
|
||||
)
|
||||
)
|
||||
(cond
|
||||
((< (-> s4-0 righty) (the-as uint 30))
|
||||
(set! s3-1 (logior s3-1 #x100000))
|
||||
((< (-> pad righty) (the-as uint 30))
|
||||
(set! buttons-pushed (logior (pad-buttons r-analog-down) buttons-pushed))
|
||||
)
|
||||
((< (the-as uint 225) (-> s4-0 righty))
|
||||
(set! s3-1 (logior s3-1 #x400000))
|
||||
((< (the-as uint 225) (-> pad righty))
|
||||
(set! buttons-pushed (logior (pad-buttons r-analog-up) buttons-pushed))
|
||||
)
|
||||
)
|
||||
(cond
|
||||
((< (-> s4-0 rightx) (the-as uint 30))
|
||||
(set! s3-1 (logior s3-1 #x800000))
|
||||
((< (-> pad rightx) (the-as uint 30))
|
||||
(set! buttons-pushed (logior (pad-buttons r-analog-left) buttons-pushed))
|
||||
)
|
||||
((< (the-as uint 225) (-> s4-0 rightx))
|
||||
(set! s3-1 (logior s3-1 #x200000))
|
||||
((< (the-as uint 225) (-> pad rightx))
|
||||
(set! buttons-pushed (logior (pad-buttons r-analog-right) buttons-pushed))
|
||||
)
|
||||
)
|
||||
(let ((v1-123 (get-current-language)))
|
||||
@@ -431,13 +434,13 @@
|
||||
((or (= v1-123 (language-enum japanese)) (= v1-123 (language-enum korean)))
|
||||
(case (scf-get-territory)
|
||||
((2 3)
|
||||
(if (logtest? s3-1 8192)
|
||||
(set! s3-1 (logior s3-1 #x1000000))
|
||||
(if (logtest? buttons-pushed (pad-buttons circle))
|
||||
(set! buttons-pushed (logior (pad-buttons confirm) buttons-pushed))
|
||||
)
|
||||
)
|
||||
(else
|
||||
(if (logtest? s3-1 #x6000)
|
||||
(set! s3-1 (logior s3-1 #x1000000))
|
||||
(if (logtest? buttons-pushed (pad-buttons circle x))
|
||||
(set! buttons-pushed (logior (pad-buttons confirm) buttons-pushed))
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -445,55 +448,55 @@
|
||||
((let ((v1-135 (scf-get-territory)))
|
||||
(or (= v1-135 2) (= v1-135 3))
|
||||
)
|
||||
(if (logtest? s3-1 #x6000)
|
||||
(set! s3-1 (logior s3-1 #x1000000))
|
||||
(if (logtest? buttons-pushed (pad-buttons circle x))
|
||||
(set! buttons-pushed (logior (pad-buttons confirm) buttons-pushed))
|
||||
)
|
||||
)
|
||||
(else
|
||||
(if (logtest? s3-1 #x4000)
|
||||
(set! s3-1 (logior s3-1 #x1000000))
|
||||
(if (logtest? buttons-pushed (pad-buttons x))
|
||||
(set! buttons-pushed (logior (pad-buttons confirm) buttons-pushed))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> s4-0 button0-shadow-abs 0) (the-as pad-buttons s3-1))
|
||||
(set! (-> s4-0 button0-abs 0) (the-as pad-buttons s3-1))
|
||||
(set! (-> pad button0-shadow-abs 0) buttons-pushed)
|
||||
(set! (-> pad button0-abs 0) buttons-pushed)
|
||||
)
|
||||
(set! (-> s4-0 button0-rel 0) (logclear (-> s4-0 button0-abs 0) (-> s4-0 button0-abs 1)))
|
||||
(set! (-> pad button0-rel 0) (logclear (-> pad button0-abs 0) (-> pad button0-abs 1)))
|
||||
(when *cpad-debug*
|
||||
(set! (-> s4-0 leftx) (the-as uint 255))
|
||||
(set! (-> s4-0 rightx) (the-as uint 255))
|
||||
(set! (-> pad leftx) (the-as uint 255))
|
||||
(set! (-> pad rightx) (the-as uint 255))
|
||||
)
|
||||
(set! (-> s4-0 stick0-speed) 1.0)
|
||||
(set! (-> pad stick0-speed) 1.0)
|
||||
(cond
|
||||
((= (shr (-> s4-0 status) 4) 7)
|
||||
(let ((f30-0 (* 0.0078125 (the float (+ (-> s4-0 leftx) -128))))
|
||||
(f28-0 (* 0.0078125 (the float (- 127 (the-as int (-> s4-0 lefty))))))
|
||||
((= (shr (-> pad status) 4) 7)
|
||||
(let ((f30-0 (* 0.0078125 (the float (+ (-> pad leftx) -128))))
|
||||
(f28-0 (* 0.0078125 (the float (- 127 (the-as int (-> pad lefty))))))
|
||||
)
|
||||
(set! (-> s4-0 stick0-dir) (atan (- f30-0) f28-0))
|
||||
(set! (-> s4-0 stick0-speed) (fmin 1.0 (sqrtf (+ (* f30-0 f30-0) (* f28-0 f28-0)))))
|
||||
(set! (-> pad stick0-dir) (atan (- f30-0) f28-0))
|
||||
(set! (-> pad stick0-speed) (fmin 1.0 (sqrtf (+ (* f30-0 f30-0) (* f28-0 f28-0)))))
|
||||
)
|
||||
(if (< (-> s4-0 stick0-speed) 0.3)
|
||||
(set! (-> s4-0 stick0-speed) 0.0)
|
||||
(if (< (-> pad stick0-speed) 0.3)
|
||||
(set! (-> pad stick0-speed) 0.0)
|
||||
)
|
||||
)
|
||||
(else
|
||||
(set! (-> s4-0 leftx) (the-as uint 128))
|
||||
(set! (-> s4-0 lefty) (the-as uint 128))
|
||||
(set! (-> s4-0 rightx) (the-as uint 128))
|
||||
(set! (-> s4-0 righty) (the-as uint 128))
|
||||
(set! (-> s4-0 stick0-dir) 0.0)
|
||||
(set! (-> s4-0 stick0-speed) 0.0)
|
||||
(set! (-> pad leftx) (the-as uint 128))
|
||||
(set! (-> pad lefty) (the-as uint 128))
|
||||
(set! (-> pad rightx) (the-as uint 128))
|
||||
(set! (-> pad righty) (the-as uint 128))
|
||||
(set! (-> pad stick0-dir) 0.0)
|
||||
(set! (-> pad stick0-speed) 0.0)
|
||||
)
|
||||
)
|
||||
(if (or (!= (-> s4-0 button0-abs 0) (-> s4-0 button0-abs 1))
|
||||
(or (< 0.3 (-> s4-0 stick0-speed)) (zero? (-> s4-0 change-time)))
|
||||
(if (or (!= (-> pad button0-abs 0) (-> pad button0-abs 1))
|
||||
(or (< 0.3 (-> pad stick0-speed)) (zero? (-> pad change-time)))
|
||||
)
|
||||
(set! (-> s4-0 change-time) (get-current-time))
|
||||
(set! (-> pad change-time) (get-current-time))
|
||||
)
|
||||
)
|
||||
(else
|
||||
(cpad-invalid! s4-0)
|
||||
(cpad-invalid! pad)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -567,6 +570,7 @@
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(defmethod new mouse-info ((allocation symbol) (type-to-make type))
|
||||
"Allocate a new mouse."
|
||||
(let ((v0-0 (object-new allocation type-to-make (the-as int (-> type-to-make size)))))
|
||||
@@ -579,6 +583,7 @@
|
||||
|
||||
(define *mouse* (new 'global 'mouse-info))
|
||||
|
||||
;; WARN: Return type mismatch mouse-info vs none.
|
||||
(defun service-mouse ()
|
||||
"Update the mouse, and draw the cursor."
|
||||
(let ((gp-0 *mouse*))
|
||||
@@ -623,7 +628,3 @@
|
||||
)
|
||||
(none)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -87,7 +87,7 @@
|
||||
(:methods
|
||||
(speech-control-method-9 () none 9)
|
||||
(speech-control-method-10 () none 10)
|
||||
(speech-control-method-11 () none 11)
|
||||
(speech-control-method-11 (_type_) none 11)
|
||||
(speech-control-method-12 () none 12)
|
||||
(speech-control-method-13 () none 13)
|
||||
(speech-control-method-14 () none 14)
|
||||
|
||||
@@ -19,10 +19,8 @@
|
||||
(define-extern target-clone-anim (state handle target))
|
||||
(define-extern clone-anim (function handle symbol string none :behavior process-drawable))
|
||||
(define-extern lightning-probe-callback (function lightning-tracker none))
|
||||
(define-extern process-drawable-shock-effect (function process-drawable lightning-spec (function lightning-tracker none) sparticle-launcher int int float none))
|
||||
(define-extern target-death (state symbol target))
|
||||
(define-extern target-hit-effect (function attack-info none :behavior target))
|
||||
(define-extern demo? (function symbol))
|
||||
(define-extern hide-hud-quick (function symbol none))
|
||||
(define-extern *smack-mods* surface)
|
||||
(define-extern target-hit-orient (function attack-info vector symbol :behavior target))
|
||||
@@ -32,9 +30,6 @@
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(format 0 "SKIP: target-board-clone-anim in board-states~%")
|
||||
|
||||
;; definition for function vector-vector-angle
|
||||
(defun vector-vector-angle ((arg0 vector) (arg1 vector))
|
||||
(let ((s4-0 (new 'stack-no-clear 'matrix))
|
||||
(gp-0 (new 'stack-no-clear 'matrix))
|
||||
@@ -47,7 +42,6 @@
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for function target-board-anim-trans
|
||||
;; WARN: Return type mismatch float vs none.
|
||||
(defbehavior target-board-anim-trans target ()
|
||||
(let ((f26-0 (deg-
|
||||
@@ -129,8 +123,6 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for function target-board-spin-check
|
||||
;; INFO: Used lq/sq
|
||||
;; WARN: Return type mismatch object vs none.
|
||||
(defbehavior target-board-spin-check target ()
|
||||
(when (and (or (cpad-pressed? (-> self control unknown-cpad-info00 number) r1)
|
||||
@@ -353,8 +345,6 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for function target-board-ground-check
|
||||
;; INFO: Used lq/sq
|
||||
;; WARN: Return type mismatch symbol vs none.
|
||||
;; ERROR: Function may read a register that is not set: a0
|
||||
;; ERROR: Function may read a register that is not set: a1
|
||||
@@ -957,7 +947,7 @@
|
||||
:enter (behavior ((arg0 meters) (arg1 meters) (arg2 symbol))
|
||||
(local-vars
|
||||
(sv-144 (function vector entity-actor skeleton-group vector none :behavior manipy))
|
||||
(sv-160 entity)
|
||||
(sv-160 entity-actor)
|
||||
)
|
||||
(if (= arg2 'hit)
|
||||
(set! arg2 #f)
|
||||
@@ -3178,34 +3168,33 @@
|
||||
:post target-board-post
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
; (defstate target-board-clone-anim (target)
|
||||
; :event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
; (if (and (= arg2 'trans) (= (-> arg3 param 0) 'restore))
|
||||
; (set! (-> self control unknown-word04) (the-as uint #f))
|
||||
; )
|
||||
; ((-> target-board-grab event) arg0 arg1 arg2 arg3)
|
||||
; )
|
||||
; :enter (-> target-clone-anim enter)
|
||||
; :exit (behavior ()
|
||||
; (set! (-> self control unknown-vector04 y) (the-as float (-> self control unknown-word04)))
|
||||
; (set! (-> self control unknown-vector05 y) (-> self control unknown-vector04 y))
|
||||
; (send-event (ppointer->process (-> self sidekick)) 'matrix 'board)
|
||||
; ((-> target-clone-anim exit))
|
||||
; ((-> target-board-start exit))
|
||||
; (vector-reset! (-> self control transv))
|
||||
; (none)
|
||||
; )
|
||||
; :code (behavior ((arg0 handle))
|
||||
; (set! (-> self control unknown-word04) (the-as uint (-> self control unknown-vector04 y)))
|
||||
; (set! (-> self control unknown-vector04 y) 0.0)
|
||||
; (send-event (ppointer->process (-> self sidekick)) 'matrix 'play-anim)
|
||||
; (clone-anim arg0 #t "")
|
||||
; (go target-board-stance)
|
||||
; (none)
|
||||
; )
|
||||
; :post target-no-ja-move-post
|
||||
; )
|
||||
(defstate target-board-clone-anim (target)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(if (and (= arg2 'trans) (= (-> arg3 param 0) 'restore))
|
||||
(set! (-> self control unknown-word04) (the-as uint #f))
|
||||
)
|
||||
((-> target-board-grab event) arg0 arg1 arg2 arg3)
|
||||
)
|
||||
:enter (-> target-clone-anim enter)
|
||||
:exit (behavior ()
|
||||
(set! (-> self control unknown-vector04 y) (the-as float (-> self control unknown-word04)))
|
||||
(set! (-> self control unknown-vector05 y) (-> self control unknown-vector04 y))
|
||||
(send-event (ppointer->process (-> self sidekick)) 'matrix 'board)
|
||||
((-> target-clone-anim exit))
|
||||
((-> target-board-start exit))
|
||||
(vector-reset! (-> self control transv))
|
||||
(none)
|
||||
)
|
||||
:code (behavior ((arg0 handle))
|
||||
(set! (-> self control unknown-word04) (the-as uint (-> self control unknown-vector04 y)))
|
||||
(set! (-> self control unknown-vector04 y) 0.0)
|
||||
(send-event (ppointer->process (-> self sidekick)) 'matrix 'play-anim)
|
||||
(clone-anim arg0 #t "")
|
||||
(go target-board-stance)
|
||||
(none)
|
||||
)
|
||||
:post target-no-ja-move-post
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate target-board-hit (target)
|
||||
|
||||
@@ -178,7 +178,6 @@
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(set! (-> *board-duck-mods* mult-hook) (-> *board-walk-mods* mult-hook))
|
||||
|
||||
;; definition for symbol *board-air-mods*, type surface
|
||||
@@ -292,7 +291,6 @@
|
||||
;; definition for symbol *board-duck-jump-mods*, type surface
|
||||
(define *board-duck-jump-mods* *board-jump-mods*)
|
||||
|
||||
;; definition for symbol *board-spin-mods*, type surface
|
||||
(define *board-spin-mods* (copy *board-jump-mods* 'global))
|
||||
|
||||
;; failed to figure out what this is:
|
||||
@@ -309,7 +307,6 @@
|
||||
(set! (-> v1-10 tiltvf) 0.0)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(let ((v1-12 (copy *board-jump-mods* 'global)))
|
||||
(set! (-> v1-12 seek0) 0.0)
|
||||
(set! (-> v1-12 seek90) 0.0)
|
||||
@@ -318,7 +315,6 @@
|
||||
(set! *board-spin-post-mods* v1-12)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(let ((v1-14 (copy *board-duck-jump-mods* 'global)))
|
||||
(set! (-> v1-14 flags) (surface-flag no-turn-around turn-to-vel air))
|
||||
(set! (-> v1-14 seek0) 0.0)
|
||||
@@ -431,7 +427,6 @@
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(set! (-> *board-turn-to-mods* mult-hook) (-> *board-walk-mods* mult-hook))
|
||||
|
||||
;; definition for symbol *board-ride-mods*, type surface
|
||||
@@ -510,11 +505,8 @@
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for function target-board-handler
|
||||
;; ERROR: function was not converted to expressions. Cannot decompile.
|
||||
|
||||
;; definition for function target-board-setup
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defbehavior target-board-setup target ((arg0 symbol))
|
||||
(when (zero? (-> self board))
|
||||
(set! (-> self board) (new 'process 'board-info))
|
||||
@@ -1711,7 +1703,7 @@
|
||||
(bucket-id debug-no-zbuf1)
|
||||
(-> self control trans)
|
||||
s5-0
|
||||
(meters 2.0)
|
||||
(meters 2)
|
||||
(the-as rgba (-> (new 'static 'array uint64 1 #x8000ff00) 0))
|
||||
)
|
||||
)
|
||||
@@ -1966,9 +1958,7 @@
|
||||
#f
|
||||
)
|
||||
|
||||
;; definition for function target-board-compute-edge
|
||||
;; WARN: Found some very strange gotos. Check result carefully, this is not well tested.
|
||||
;; INFO: Used lq/sq
|
||||
(defbehavior target-board-compute-edge target ()
|
||||
(local-vars (sv-768 int))
|
||||
(let ((s4-0 *edge-grab-info*)
|
||||
@@ -2489,7 +2479,7 @@
|
||||
(set! (-> a2-4 ignore-process1) #f)
|
||||
(set! (-> a2-4 ignore-pat) (-> v1-103 pat-ignore-mask))
|
||||
(set! (-> a2-4 action-mask) (collide-action solid))
|
||||
(collide-shape-method-32 v1-103 (-> v1-103 transv) a2-4 (meters 1.0))
|
||||
(collide-shape-method-32 v1-103 (-> v1-103 transv) a2-4 (meters 1))
|
||||
)
|
||||
(when (logtest? (-> self control root-prim prim-core action) (collide-action check-edge))
|
||||
(set! (-> *collide-edge-board-spec* flags) (logand -5 (-> *collide-edge-board-spec* flags)))
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
(die () _type_ :state 23)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
|
||||
(deftype gun-info (basic)
|
||||
((process (pointer target) :offset-assert 4)
|
||||
@@ -124,6 +124,7 @@
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(defbehavior want-to-gun? process ((arg0 target) (arg1 symbol))
|
||||
(local-vars (v1-36 symbol))
|
||||
(and (logtest? (-> arg0 game features) (game-feature unk-game-feature-06))
|
||||
@@ -131,7 +132,7 @@
|
||||
(zero? (logand (focus-status dead hit board mech dark teleporting) (-> arg0 focus-status)))
|
||||
(zero? (logand (surface-flag gun-inactive gun-hide gun-off) (-> arg0 control unknown-surface01 flags)))
|
||||
(zero? (logand (state-flags sf18) (-> arg0 state-flags)))
|
||||
(logtest? (the-as game-feature (logand (-> *setting-control* user-current features) 960))
|
||||
(logtest? (logand (-> *setting-control* user-current features) (game-feature gun-yellow gun-red gun-blue gun-dark))
|
||||
(-> arg0 game features)
|
||||
)
|
||||
(or (zero? (logand (-> arg0 control unknown-surface01 flags) (surface-flag duck))) (can-exit-duck?))
|
||||
|
||||
@@ -30,8 +30,6 @@
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
;; definition for function build-conversions
|
||||
;; INFO: Used lq/sq
|
||||
(defbehavior build-conversions target ((arg0 vector))
|
||||
(when (!= (-> self control unknown-surface02) (-> self control surf))
|
||||
(set! (-> self control unknown-surface02) (-> self control surf))
|
||||
@@ -86,8 +84,6 @@
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for function vector-turn-to
|
||||
;; INFO: Used lq/sq
|
||||
(defbehavior vector-turn-to target ((arg0 vector))
|
||||
(forward-up-nopitch->quaternion
|
||||
(-> self control dir-targ)
|
||||
@@ -98,7 +94,6 @@
|
||||
(build-conversions (-> self control transv))
|
||||
)
|
||||
|
||||
;; definition for function reverse-conversions
|
||||
;; WARN: Return type mismatch cshape-moving-flags vs none.
|
||||
(defbehavior reverse-conversions target ((arg0 vector))
|
||||
(let ((v1-1 (-> self control unknown-vector00)))
|
||||
@@ -109,7 +104,6 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition (debug) for function draw-history
|
||||
(defun-debug draw-history ((arg0 control-info))
|
||||
(when (nonzero? *display-collide-history*)
|
||||
(when (cpad-pressed? 0 l3)
|
||||
@@ -148,11 +142,8 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition (debug) for function target-history-print
|
||||
;; ERROR: function was not converted to expressions. Cannot decompile.
|
||||
|
||||
;; definition (debug) for function target-print-stats
|
||||
;; INFO: Used lq/sq
|
||||
(defun-debug target-print-stats ((arg0 target) (arg1 symbol))
|
||||
(local-vars
|
||||
(sv-64 int)
|
||||
@@ -536,8 +527,6 @@
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for function read-pad
|
||||
;; INFO: Used lq/sq
|
||||
(defbehavior read-pad target ((arg0 vector))
|
||||
(when (!= (-> self control unknown-dword01) (-> *display* real-clock frame-counter))
|
||||
(set! (-> self control unknown-vector13 quad) (-> self control unknown-vector12 quad))
|
||||
@@ -571,7 +560,6 @@
|
||||
(vector-matrix*! arg0 arg0 (-> self control unknown-matrix03))
|
||||
)
|
||||
|
||||
;; definition for function set-pad
|
||||
(defbehavior set-pad target ((arg0 vector))
|
||||
(set! (-> self control unknown-float12) (vector-length arg0))
|
||||
(let ((s5-0 vector-matrix*!)
|
||||
@@ -585,16 +573,12 @@
|
||||
arg0
|
||||
)
|
||||
|
||||
;; definition for function warp-vector-into-surface!
|
||||
;; INFO: Used lq/sq
|
||||
(defun warp-vector-into-surface! ((arg0 vector) (arg1 vector) (arg2 vector) (arg3 matrix))
|
||||
(let ((a2-1 (matrix-from-two-vectors! (new-stack-matrix0) (-> arg3 vector 1) arg2)))
|
||||
(vector-matrix*! arg0 arg1 a2-1)
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for function vector<-pad-in-surface!
|
||||
;; INFO: Used lq/sq
|
||||
(defbehavior vector<-pad-in-surface! target ((arg0 vector) (arg1 symbol))
|
||||
(let ((a1-1 (read-pad (new-stack-vector0))))
|
||||
(warp-vector-into-surface! arg0 a1-1 (-> self control local-normal) (-> self control unknown-matrix03))
|
||||
@@ -605,7 +589,6 @@
|
||||
arg0
|
||||
)
|
||||
|
||||
;; definition for function vector<-pad-in-matrix!
|
||||
;; WARN: Return type mismatch vector vs none.
|
||||
(defun vector<-pad-in-matrix! ((arg0 vector) (arg1 cpad-info) (arg2 matrix))
|
||||
(let ((gp-0 (new 'stack-no-clear 'vector))
|
||||
@@ -628,8 +611,6 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for function local-pad-angle
|
||||
;; INFO: Used lq/sq
|
||||
(defbehavior local-pad-angle target ()
|
||||
(let ((a0-1 (vector<-pad-in-surface! (new-stack-vector0) #f)))
|
||||
(vector-dot
|
||||
@@ -639,8 +620,6 @@
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for function turn-around?
|
||||
;; INFO: Used lq/sq
|
||||
(defbehavior turn-around? target ()
|
||||
(let* ((a0-1 (vector<-pad-in-surface! (new-stack-vector0) #f))
|
||||
(gp-0 (vector-normalize! a0-1 1.0))
|
||||
@@ -689,8 +668,6 @@
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for function wall-hide?
|
||||
;; INFO: Used lq/sq
|
||||
(defbehavior wall-hide? target ()
|
||||
(when (and (< 0.7 (-> self control unknown-float12))
|
||||
(< 0.7 (-> self control unknown-float27))
|
||||
@@ -762,9 +739,6 @@
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for function target-log-trans
|
||||
;; INFO: Used lq/sq
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defbehavior target-log-trans target ()
|
||||
(let ((v1-1 (-> self control unknown-word00)))
|
||||
(set! (-> self control unknown-time-frame-array00 v1-1) (-> self clock frame-counter))
|
||||
@@ -775,8 +749,6 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for function target-move-dist
|
||||
;; INFO: Used lq/sq
|
||||
(defbehavior target-move-dist target ((arg0 time-frame))
|
||||
(let ((s5-0 (new-stack-vector0))
|
||||
(f30-0 0.0)
|
||||
@@ -807,8 +779,6 @@
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for function turn-to-vector
|
||||
;; INFO: Used lq/sq
|
||||
(defbehavior turn-to-vector target ((arg0 vector) (arg1 float))
|
||||
(let ((gp-0 (new-stack-vector0)))
|
||||
(warp-vector-into-surface! gp-0 arg0 (-> self control local-normal) (-> self control unknown-matrix03))
|
||||
@@ -856,7 +826,6 @@
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for function target-bend-vel-turn
|
||||
(defbehavior target-bend-vel-turn target ((arg0 vector))
|
||||
(cond
|
||||
((= (-> self control unknown-surface01 vel-turn) 0.0)
|
||||
@@ -884,8 +853,6 @@
|
||||
arg0
|
||||
)
|
||||
|
||||
;; definition for function target-add-slide-factor
|
||||
;; INFO: Used lq/sq
|
||||
(defbehavior target-add-slide-factor target ((arg0 vector))
|
||||
(let* ((a1-2 (vector-flatten!
|
||||
(new 'stack-no-clear 'vector)
|
||||
@@ -945,8 +912,6 @@
|
||||
arg0
|
||||
)
|
||||
|
||||
;; definition for function add-thrust
|
||||
;; INFO: Used lq/sq
|
||||
(defbehavior add-thrust target ()
|
||||
(let ((s5-0 (-> self control unknown-vector01))
|
||||
(gp-0 (-> self control unknown-vector00))
|
||||
@@ -1106,8 +1071,6 @@
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for function add-gravity
|
||||
;; INFO: Used lq/sq
|
||||
(defbehavior add-gravity target ()
|
||||
(let ((s5-0 (new-stack-vector0))
|
||||
(gp-0 (new-stack-vector0))
|
||||
@@ -1150,7 +1113,6 @@
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for function target-compute-slopes
|
||||
(defbehavior target-compute-slopes target ((arg0 vector))
|
||||
(let ((gp-0 (new 'stack-no-clear 'vector))
|
||||
(s4-0 (vector-y-quaternion! (new 'stack-no-clear 'vector) (-> self control unknown-quaternion00)))
|
||||
@@ -1182,7 +1144,6 @@
|
||||
0
|
||||
)
|
||||
|
||||
;; definition for function do-rotations1
|
||||
(defbehavior do-rotations1 target ()
|
||||
(rotate-toward-orientation!
|
||||
(-> self control)
|
||||
@@ -1195,8 +1156,6 @@
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for function do-rotations2
|
||||
;; INFO: Used lq/sq
|
||||
(defbehavior do-rotations2 target ()
|
||||
(let ((gp-0 (vector-z-quaternion! (new-stack-vector0) (-> self control dir-targ)))
|
||||
(s5-0
|
||||
@@ -1261,7 +1220,7 @@
|
||||
(bucket-id debug-no-zbuf1)
|
||||
(-> self control trans)
|
||||
gp-0
|
||||
(meters 2.0)
|
||||
(meters 2)
|
||||
(the-as rgba (-> (new 'static 'array uint64 1 #x8000ffff) 0))
|
||||
)
|
||||
(add-debug-vector
|
||||
@@ -1269,7 +1228,7 @@
|
||||
(bucket-id debug-no-zbuf1)
|
||||
(-> self control trans)
|
||||
s5-0
|
||||
(meters 2.0)
|
||||
(meters 2)
|
||||
(the-as rgba (-> (new 'static 'array uint64 1 #x800080ff) 0))
|
||||
)
|
||||
)
|
||||
@@ -1278,7 +1237,7 @@
|
||||
(bucket-id debug-no-zbuf1)
|
||||
(-> self control trans)
|
||||
(-> self control unknown-matrix01 vector 2)
|
||||
(meters 2.0)
|
||||
(meters 2)
|
||||
(the-as rgba (-> (new 'static 'array uint64 1 #x80ff00ff) 0))
|
||||
)
|
||||
(rotate-toward-orientation!
|
||||
@@ -1311,8 +1270,6 @@
|
||||
(target-compute-slopes (-> self control dynam gravity-normal))
|
||||
)
|
||||
|
||||
;; definition for function leg-ik-callback
|
||||
;; INFO: Used lq/sq
|
||||
(defun leg-ik-callback ((arg0 joint-mod-ik) (arg1 object) (arg2 object) (arg3 vector))
|
||||
(rlet ((acc :class vf)
|
||||
(vf0 :class vf)
|
||||
@@ -1411,9 +1368,6 @@
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for function target-update-ik
|
||||
;; INFO: Used lq/sq
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defbehavior target-update-ik target ()
|
||||
(rlet ((acc :class vf)
|
||||
(vf0 :class vf)
|
||||
@@ -1586,9 +1540,6 @@
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for function pre-collide-setup
|
||||
;; INFO: Used lq/sq
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defbehavior pre-collide-setup target ()
|
||||
(if (>= (-> self clock frame-counter) (-> self control unknown-time-frame04))
|
||||
(vector-normalize!
|
||||
@@ -1623,13 +1574,11 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for function level-setup
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defbehavior level-setup target ()
|
||||
(let ((gp-0 (-> self current-level)))
|
||||
(set! (-> self current-level) (level-get-target-inside *level*))
|
||||
(if (-> self current-level)
|
||||
(+! (-> self game unknown-array3 (-> self current-level info task-level))
|
||||
(+! (-> self game task-in-times (-> self current-level info task-level))
|
||||
(- (-> self clock frame-counter) (-> self clock old-frame-counter))
|
||||
)
|
||||
)
|
||||
@@ -1641,9 +1590,6 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for function flag-setup
|
||||
;; INFO: Used lq/sq
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defbehavior flag-setup target ()
|
||||
(cond
|
||||
((= (-> *cpad-list* cpads (-> self control unknown-cpad-info00 number) stick0-speed) 0.0)
|
||||
@@ -1910,8 +1856,6 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for function post-flag-setup
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defbehavior post-flag-setup target ()
|
||||
(if (logtest? (-> self control status) (cshape-moving-flags t-wall t-act))
|
||||
(set! (-> self control unknown-time-frame07) (-> self clock frame-counter))
|
||||
@@ -2000,8 +1944,6 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for function bend-gravity
|
||||
;; INFO: Used lq/sq
|
||||
(defbehavior bend-gravity target ()
|
||||
(if (and (logtest? (-> self control root-prim prim-core action) (collide-action no-normal-reset))
|
||||
(zero? (logand (-> self control status) (cshape-moving-flags on-surface)))
|
||||
@@ -2058,7 +2000,7 @@
|
||||
(bucket-id debug-no-zbuf1)
|
||||
(-> self control trans)
|
||||
gp-0
|
||||
(meters 2.0)
|
||||
(meters 2)
|
||||
(new 'static 'rgba :b #xff :a #x80)
|
||||
)
|
||||
)
|
||||
@@ -2068,7 +2010,7 @@
|
||||
(bucket-id debug-no-zbuf1)
|
||||
(-> self control trans)
|
||||
(-> self control local-normal)
|
||||
(meters 2.0)
|
||||
(meters 2)
|
||||
(the-as rgba (-> (new 'static 'array uint64 1 #x800000ff) 0))
|
||||
)
|
||||
(add-debug-vector
|
||||
@@ -2084,7 +2026,7 @@
|
||||
(bucket-id debug-no-zbuf1)
|
||||
(-> self control trans)
|
||||
(-> self control dynam gravity-normal)
|
||||
(meters 3.0)
|
||||
(meters 3)
|
||||
(the-as rgba (-> (new 'static 'array uint64 1 #x80ff00ff) 0))
|
||||
)
|
||||
(add-debug-vector
|
||||
@@ -2092,7 +2034,7 @@
|
||||
(bucket-id debug-no-zbuf1)
|
||||
(-> self control trans)
|
||||
(-> self control unknown-vector02)
|
||||
(meters 3.0)
|
||||
(meters 3)
|
||||
(the-as rgba (-> (new 'static 'array uint64 1 #x80ff00ff) 0))
|
||||
)
|
||||
(add-debug-vector
|
||||
@@ -2100,13 +2042,11 @@
|
||||
(bucket-id debug-no-zbuf1)
|
||||
(-> self control trans)
|
||||
(vector-y-quaternion! (new 'stack-no-clear 'vector) (-> self control unknown-quaternion00))
|
||||
(meters 3.0)
|
||||
(meters 3)
|
||||
(the-as rgba (-> (new 'static 'array uint64 1 #x800000ff) 0))
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for function target-compute-edge
|
||||
;; INFO: Used lq/sq
|
||||
(defbehavior target-compute-edge target ()
|
||||
(let ((s5-0 *edge-grab-info*))
|
||||
(cond
|
||||
@@ -2256,8 +2196,6 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for function target-compute-edge-rider
|
||||
;; INFO: Used lq/sq
|
||||
(defbehavior target-compute-edge-rider target ()
|
||||
(let ((gp-0 *edge-grab-info*))
|
||||
(cond
|
||||
@@ -2322,8 +2260,6 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for function target-compute-pole
|
||||
;; INFO: Used lq/sq
|
||||
(defbehavior target-compute-pole target ()
|
||||
(let* ((s2-0 (handle->process (-> self control unknown-handle01)))
|
||||
(gp-0 (-> (the-as swingpole s2-0) dir))
|
||||
@@ -2426,9 +2362,6 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for function target-calc-camera-pos
|
||||
;; INFO: Used lq/sq
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defbehavior target-calc-camera-pos target ()
|
||||
(let ((s5-0 (new 'stack-no-clear 'vector))
|
||||
(gp-0 (new 'stack-no-clear 'vector))
|
||||
@@ -2519,9 +2452,6 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for function joint-points
|
||||
;; INFO: Used lq/sq
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defbehavior joint-points target ()
|
||||
(let ((f0-1 (* 0.00078125 (the float (-> self neck loock-at-count)))))
|
||||
(if (!= f0-1 0.0)
|
||||
@@ -2616,9 +2546,6 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for function do-target-gspot
|
||||
;; INFO: Used lq/sq
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defbehavior do-target-gspot target ()
|
||||
(cond
|
||||
((and (logtest? (-> self control status) (cshape-moving-flags on-surface))
|
||||
@@ -2650,8 +2577,6 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for function target-real-post
|
||||
;; INFO: Used lq/sq
|
||||
(defbehavior target-real-post target ()
|
||||
(let ((f30-0 (-> self clock clock-ratio)))
|
||||
(let ((gp-1 (max 1 (the int (-> self clock time-adjust-ratio)))))
|
||||
@@ -2739,7 +2664,7 @@
|
||||
(set! (-> a2-3 ignore-pat) (-> v1-52 pat-ignore-mask))
|
||||
)
|
||||
(set! (-> a2-3 action-mask) (collide-action solid))
|
||||
(collide-shape-method-32 (-> self control) (-> self control transv) a2-3 (meters 1.0))
|
||||
(collide-shape-method-32 (-> self control) (-> self control transv) a2-3 (meters 1))
|
||||
)
|
||||
(if (and (logtest? (-> self control root-prim prim-core action) (collide-action check-edge))
|
||||
(>= (vector-dot
|
||||
@@ -2818,14 +2743,11 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for function target-post
|
||||
(defbehavior target-post target ()
|
||||
(target-real-post)
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for function target-swim-post
|
||||
;; INFO: Used lq/sq
|
||||
(defbehavior target-swim-post target ()
|
||||
(let ((f30-0 (-> self clock clock-ratio)))
|
||||
(let ((gp-1 (max 1 (the int (-> self clock time-adjust-ratio)))))
|
||||
@@ -2875,7 +2797,7 @@
|
||||
(set! (-> a2-0 ignore-pat) (-> v1-30 pat-ignore-mask))
|
||||
)
|
||||
(set! (-> a2-0 action-mask) (collide-action solid))
|
||||
(collide-shape-method-32 (-> self control) (-> self control transv) a2-0 (meters 1.0))
|
||||
(collide-shape-method-32 (-> self control) (-> self control transv) a2-0 (meters 1))
|
||||
)
|
||||
(if (and (logtest? (-> self control root-prim prim-core action) (collide-action check-edge))
|
||||
(>= (vector-dot
|
||||
@@ -2953,8 +2875,6 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for function target-no-stick-post
|
||||
;; INFO: Used lq/sq
|
||||
(defbehavior target-no-stick-post target ()
|
||||
(let ((f30-0 (-> self clock clock-ratio)))
|
||||
(let ((gp-1 (max 1 (the int (-> self clock time-adjust-ratio)))))
|
||||
@@ -3004,7 +2924,7 @@
|
||||
(set! (-> a2-0 ignore-pat) (-> v1-29 pat-ignore-mask))
|
||||
)
|
||||
(set! (-> a2-0 action-mask) (collide-action solid))
|
||||
(collide-shape-method-32 (-> self control) (-> self control transv) a2-0 (meters 1.0))
|
||||
(collide-shape-method-32 (-> self control) (-> self control transv) a2-0 (meters 1))
|
||||
)
|
||||
(if (and (logtest? (-> self control root-prim prim-core action) (collide-action check-edge))
|
||||
(>= (vector-dot
|
||||
@@ -3083,8 +3003,6 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for function target-no-move-post
|
||||
;; INFO: Used lq/sq
|
||||
(defbehavior target-no-move-post target ()
|
||||
(let ((f30-0 (-> self clock clock-ratio)))
|
||||
(let ((gp-1 (max 1 (the int (-> self clock time-adjust-ratio)))))
|
||||
@@ -3182,7 +3100,6 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for function target-no-ja-move-post
|
||||
(defbehavior target-no-ja-move-post target ()
|
||||
(vector-!
|
||||
(-> self control unknown-vector05)
|
||||
@@ -3202,8 +3119,6 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for function reset-target-state
|
||||
;; INFO: Used lq/sq
|
||||
(defbehavior reset-target-state target ((arg0 symbol))
|
||||
(when arg0
|
||||
(vector-identity! (-> self control scale))
|
||||
@@ -3233,9 +3148,6 @@
|
||||
self
|
||||
)
|
||||
|
||||
;; definition for method 28 of type target
|
||||
;; INFO: Used lq/sq
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod init-target target ((obj target) (arg0 continue-point) (arg1 symbol))
|
||||
(local-vars (s1-0 int) (s2-0 int) (s3-0 int) (s4-0 int) (sv-16 collide-shape-prim-group))
|
||||
(set! (-> obj tobot?) arg1)
|
||||
@@ -3247,7 +3159,7 @@
|
||||
(set! (-> *setting-control* cam-default mode-name) 'cam-string)
|
||||
(apply-settings *setting-control*)
|
||||
(if (not arg0)
|
||||
(set! arg0 (get-current-continue-point *game-info*))
|
||||
(set! arg0 (get-current-continue-forced *game-info*))
|
||||
)
|
||||
(set-continue! *game-info* arg0 #f)
|
||||
(stack-size-set! (-> obj main-thread) 1024)
|
||||
@@ -3470,7 +3382,6 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for function target-init
|
||||
;; WARN: Return type mismatch object vs none.
|
||||
(defbehavior target-init target ((arg0 continue-point))
|
||||
(init-target self arg0 #f)
|
||||
@@ -3480,7 +3391,6 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for function tobot-init
|
||||
;; WARN: Return type mismatch object vs none.
|
||||
(defbehavior tobot-init target ((arg0 symbol))
|
||||
(init-target self (the-as continue-point #f) 'tobot)
|
||||
@@ -3491,7 +3401,6 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for method 10 of type target
|
||||
(defmethod deactivate target ((obj target))
|
||||
(kill-persister *setting-control* (the-as engine-pers 'bg-a-speed) 'bg-a-speed)
|
||||
(if (nonzero? (-> obj darkjak))
|
||||
@@ -3503,7 +3412,6 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for function stop
|
||||
(defun stop ((arg0 symbol))
|
||||
(when *target*
|
||||
(kill-by-name "target" *active-pool*)
|
||||
@@ -3513,7 +3421,6 @@
|
||||
0
|
||||
)
|
||||
|
||||
;; definition for function start
|
||||
(defun start ((arg0 symbol) (arg1 continue-point))
|
||||
(let ((v1-0 arg0))
|
||||
(set! (-> *level* play?) (if (= v1-0 'play)
|
||||
@@ -3544,7 +3451,6 @@
|
||||
*target*
|
||||
)
|
||||
|
||||
;; definition for function tobot-start
|
||||
;; WARN: Return type mismatch (pointer process) vs target.
|
||||
(defun tobot-start ((arg0 symbol))
|
||||
(the-as target (process-spawn
|
||||
@@ -3558,7 +3464,6 @@
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for function tobot-stop
|
||||
(defun tobot-stop ()
|
||||
(kill-by-name "tobot" *active-pool*)
|
||||
0
|
||||
|
||||
@@ -7,3 +7,7 @@
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(defstate target-clone-anim (target)
|
||||
:code (behavior ((hnd handle))
|
||||
(looping-code))
|
||||
)
|
||||
@@ -499,3 +499,8 @@
|
||||
:size-assert #xba4
|
||||
:flag-assert #x1b0b300ba4
|
||||
)
|
||||
|
||||
|
||||
(define-extern hud-init-by-other (function object :behavior hud))
|
||||
|
||||
(define-extern show-hud (function object none))
|
||||
|
||||
@@ -6,4 +6,3 @@
|
||||
;; dgos: ENGINE, GAME
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
;; name: minimap-h.gc
|
||||
;; name in dgo: minimap-h
|
||||
;; dgos: ENGINE, GAME
|
||||
|
||||
(defenum minimap-flag
|
||||
:bitfield #t
|
||||
:type uint16
|
||||
@@ -118,6 +119,7 @@
|
||||
:flag-assert #x900000024
|
||||
)
|
||||
|
||||
|
||||
(deftype connection-minimap (connection-pers)
|
||||
((handle handle :offset 8)
|
||||
(position vector :offset 16)
|
||||
@@ -134,6 +136,7 @@
|
||||
:flag-assert #x900000050
|
||||
)
|
||||
|
||||
|
||||
(deftype engine-minimap (engine-pers)
|
||||
((alive-list-override connection-minimap :offset 24)
|
||||
(dead-list-override connection-minimap :offset 28)
|
||||
@@ -143,6 +146,7 @@
|
||||
:flag-assert #xf00000020
|
||||
)
|
||||
|
||||
|
||||
(deftype minimap-trail (structure)
|
||||
((used-by connection-minimap :offset-assert 0)
|
||||
(search-id uint32 :offset-assert 4)
|
||||
@@ -162,6 +166,7 @@
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype minimap-draw-work (structure)
|
||||
((buf basic :offset-assert 0)
|
||||
(justify-right basic :offset-assert 4)
|
||||
@@ -174,6 +179,7 @@
|
||||
:flag-assert #x9000000a0
|
||||
)
|
||||
|
||||
|
||||
(deftype minimap (structure)
|
||||
((draw-tmpl dma-gif-packet :inline :offset-assert 0)
|
||||
(draw2-tmpl dma-gif-packet :inline :offset-assert 32)
|
||||
@@ -192,7 +198,7 @@
|
||||
(ctywide basic :offset-assert 268)
|
||||
(inv-scale float :offset 212)
|
||||
(fade float :offset 220)
|
||||
(engine basic :offset-assert 272)
|
||||
(engine engine-minimap :offset-assert 272)
|
||||
(engine-key uint32 :offset-assert 276)
|
||||
(trail minimap-trail 6 :inline :offset-assert 288)
|
||||
(race-tex basic :offset-assert 1536)
|
||||
@@ -210,7 +216,7 @@
|
||||
(minimap-method-9 () none 9)
|
||||
(minimap-method-10 () none 10)
|
||||
(minimap-method-11 () none 11)
|
||||
(minimap-method-12 () none 12)
|
||||
(minimap-method-12 (_type_ process uint int vector int) connection-minimap 12)
|
||||
(minimap-method-13 () none 13)
|
||||
(minimap-method-14 () none 14)
|
||||
(minimap-method-15 () none 15)
|
||||
@@ -229,3 +235,6 @@
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(define-extern *minimap* minimap)
|
||||
|
||||
|
||||
@@ -11,6 +11,217 @@
|
||||
:type uint32
|
||||
:bitfield #f
|
||||
;; GAME-TEXT-ID ENUM BEGINS
|
||||
(pause 257)
|
||||
(null 0)
|
||||
|
||||
(pause #x0101)
|
||||
|
||||
(text-x180 #x0180)
|
||||
(text-x181 #x0181)
|
||||
(text-x182 #x0182)
|
||||
(text-x183 #x0183)
|
||||
(text-x184 #x0184)
|
||||
(text-x185 #x0185)
|
||||
(text-x186 #x0186)
|
||||
(text-x187 #x0187)
|
||||
(text-x188 #x0188)
|
||||
(text-x189 #x0189)
|
||||
(text-x18a #x018a)
|
||||
(text-x18b #x018b)
|
||||
(text-x18c #x018c)
|
||||
(text-x18d #x018d)
|
||||
(text-x18e #x018e)
|
||||
(text-x18f #x018f)
|
||||
(text-x190 #x0190)
|
||||
(text-x191 #x0191)
|
||||
(text-x192 #x0192)
|
||||
(text-x193 #x0193)
|
||||
(text-x194 #x0194)
|
||||
(text-x195 #x0195)
|
||||
(text-x196 #x0196)
|
||||
(text-x197 #x0197)
|
||||
(text-x198 #x0198)
|
||||
(text-x199 #x0199)
|
||||
(text-x19a #x019a)
|
||||
(text-x19b #x019b)
|
||||
(text-x19c #x019c)
|
||||
(text-x19d #x019d)
|
||||
(text-x19e #x019e)
|
||||
(text-x19f #x019f)
|
||||
(text-x1a0 #x01a0)
|
||||
(text-x1a1 #x01a1)
|
||||
(text-x1a2 #x01a2)
|
||||
(text-x1a3 #x01a3)
|
||||
(text-x1a4 #x01a4)
|
||||
(text-x1a5 #x01a5)
|
||||
(text-x1a6 #x01a6)
|
||||
(text-x1a7 #x01a7)
|
||||
(text-x1a8 #x01a8)
|
||||
(text-x1a9 #x01a9)
|
||||
(text-x1aa #x01aa)
|
||||
(text-x1ab #x01ab)
|
||||
(text-x1ac #x01ac)
|
||||
(text-x1ad #x01ad)
|
||||
(text-x1ae #x01ae)
|
||||
(text-x1af #x01af)
|
||||
(text-x1b0 #x01b0)
|
||||
(text-x1b1 #x01b1)
|
||||
(text-x1b2 #x01b2)
|
||||
(text-x1b3 #x01b3)
|
||||
(text-x1b4 #x01b4)
|
||||
(text-x1b5 #x01b5)
|
||||
(text-x1b6 #x01b6)
|
||||
(text-x1b7 #x01b7)
|
||||
(text-x1b8 #x01b8)
|
||||
(text-x1b9 #x01b9)
|
||||
(text-x1ba #x01ba)
|
||||
(text-x1bb #x01bb)
|
||||
(text-x1bc #x01bc)
|
||||
(text-x1bd #x01bd)
|
||||
(text-x1be #x01be)
|
||||
(text-x1bf #x01bf)
|
||||
(text-x1c0 #x01c0)
|
||||
(text-x1c1 #x01c1)
|
||||
(text-x1c2 #x01c2)
|
||||
(text-x1c3 #x01c3)
|
||||
(text-x1c4 #x01c4)
|
||||
(text-x1c5 #x01c5)
|
||||
(text-x1c6 #x01c6)
|
||||
(text-x1c7 #x01c7)
|
||||
(text-x1c8 #x01c8)
|
||||
(text-x1c9 #x01c9)
|
||||
(text-x1ca #x01ca)
|
||||
(text-x1cb #x01cb)
|
||||
(text-x1cc #x01cc)
|
||||
(text-x1cd #x01cd)
|
||||
(text-x1ce #x01ce)
|
||||
(text-x1cf #x01cf)
|
||||
(text-x1d0 #x01d0)
|
||||
(text-x1d1 #x01d1)
|
||||
(text-x1d2 #x01d2)
|
||||
(text-x1d3 #x01d3)
|
||||
(text-x1d4 #x01d4)
|
||||
(text-x1d5 #x01d5)
|
||||
(text-x1d6 #x01d6)
|
||||
(text-x1d7 #x01d7)
|
||||
(text-x1d8 #x01d8)
|
||||
(text-x1d9 #x01d9)
|
||||
(text-x1da #x01da)
|
||||
(text-x1db #x01db)
|
||||
(text-x1dc #x01dc)
|
||||
(text-x1dd #x01dd)
|
||||
(text-x1de #x01de)
|
||||
(text-x1df #x01df)
|
||||
(text-x1e0 #x01e0)
|
||||
(text-x1e1 #x01e1)
|
||||
(text-x1e2 #x01e2)
|
||||
(text-x1e3 #x01e3)
|
||||
(text-x1e4 #x01e4)
|
||||
(text-x1e5 #x01e5)
|
||||
(text-x1e6 #x01e6)
|
||||
(text-x1e7 #x01e7)
|
||||
(text-x1e8 #x01e8)
|
||||
(text-x1e9 #x01e9)
|
||||
(text-x1ea #x01ea)
|
||||
(text-x1eb #x01eb)
|
||||
(text-x1ec #x01ec)
|
||||
(text-x1ed #x01ed)
|
||||
(text-x1ee #x01ee)
|
||||
(text-x1ef #x01ef)
|
||||
(text-x1f0 #x01f0)
|
||||
(text-x1f1 #x01f1)
|
||||
(text-x1f2 #x01f2)
|
||||
(text-x1f3 #x01f3)
|
||||
(text-x1f4 #x01f4)
|
||||
(text-x1f5 #x01f5)
|
||||
(text-x1f6 #x01f6)
|
||||
(text-x1f7 #x01f7)
|
||||
(text-x1f8 #x01f8)
|
||||
(text-x1f9 #x01f9)
|
||||
(text-x1fa #x01fa)
|
||||
(text-x1fb #x01fb)
|
||||
(text-x1fc #x01fc)
|
||||
(text-x1fd #x01fd)
|
||||
(text-x1fe #x01fe)
|
||||
(text-x1ff #x01ff)
|
||||
(text-x200 #x0200)
|
||||
(text-x201 #x0201)
|
||||
(text-x202 #x0202)
|
||||
(text-x203 #x0203)
|
||||
(text-x204 #x0204)
|
||||
(text-x205 #x0205)
|
||||
(text-x206 #x0206)
|
||||
(text-x207 #x0207)
|
||||
(text-x208 #x0208)
|
||||
(text-x209 #x0209)
|
||||
(text-x20a #x020a)
|
||||
(text-x20b #x020b)
|
||||
(text-x20c #x020c)
|
||||
(text-x20d #x020d)
|
||||
(text-x20e #x020e)
|
||||
(text-x20f #x020f)
|
||||
(text-x210 #x0210)
|
||||
(text-x211 #x0211)
|
||||
(text-x212 #x0212)
|
||||
(text-x213 #x0213)
|
||||
(text-x214 #x0214)
|
||||
(text-x215 #x0215)
|
||||
(text-x216 #x0216)
|
||||
(text-x217 #x0217)
|
||||
(text-x218 #x0218)
|
||||
(text-x219 #x0219)
|
||||
(text-x21a #x021a)
|
||||
(text-x21b #x021b)
|
||||
(text-x21c #x021c)
|
||||
(text-x21d #x021d)
|
||||
(text-x21e #x021e)
|
||||
(text-x21f #x021f)
|
||||
(text-x220 #x0220)
|
||||
(text-x221 #x0221)
|
||||
(text-x222 #x0222)
|
||||
(text-x223 #x0223)
|
||||
(text-x224 #x0224)
|
||||
(text-x225 #x0225)
|
||||
(text-x226 #x0226)
|
||||
(text-x227 #x0227)
|
||||
(text-x228 #x0228)
|
||||
(text-x229 #x0229)
|
||||
(text-x22a #x022a)
|
||||
(text-x22b #x022b)
|
||||
(text-x22c #x022c)
|
||||
(text-x22d #x022d)
|
||||
(text-x22e #x022e)
|
||||
(text-x22f #x022f)
|
||||
(text-x230 #x0230)
|
||||
(text-x231 #x0231)
|
||||
(text-x232 #x0232)
|
||||
(text-x233 #x0233)
|
||||
(text-x234 #x0234)
|
||||
(text-x235 #x0235)
|
||||
(text-x236 #x0236)
|
||||
(text-x237 #x0237)
|
||||
(text-x238 #x0238)
|
||||
(text-x239 #x0239)
|
||||
(text-x23a #x023a)
|
||||
(text-x23b #x023b)
|
||||
(text-x23c #x023c)
|
||||
(text-x23d #x023d)
|
||||
(text-x23e #x023e)
|
||||
(text-x23f #x023f)
|
||||
(text-x240 #x0240)
|
||||
(text-x241 #x0241)
|
||||
(text-x242 #x0242)
|
||||
(text-x243 #x0243)
|
||||
(text-x244 #x0244)
|
||||
(text-x245 #x0245)
|
||||
(text-x246 #x0246)
|
||||
(text-x247 #x0247)
|
||||
(text-x248 #x0248)
|
||||
(text-x249 #x0249)
|
||||
(text-x24a #x024a)
|
||||
(text-x24b #x024b)
|
||||
(text-x24c #x024c)
|
||||
(text-x24d #x024d)
|
||||
(text-x24e #x024e)
|
||||
(text-x24f #x024f)
|
||||
;; GAME-TEXT-ID ENUM ENDS
|
||||
)
|
||||
)
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
:flag-assert #xc000000a0
|
||||
(:methods
|
||||
(new (symbol type basic process vector) _type_ 0)
|
||||
(eval! (_type_ object) object 9)
|
||||
(eval! (_type_ pair) object 9)
|
||||
(script-context-method-10 (_type_ object pair) object 10)
|
||||
(script-context-method-11 (_type_ pair pair symbol) symbol 11)
|
||||
)
|
||||
@@ -74,9 +74,3 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
0
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -142,6 +142,7 @@
|
||||
(define-extern kmalloc (function kheap int kmalloc-flags string pointer))
|
||||
|
||||
(define-extern *kernel-boot-message* symbol)
|
||||
(define-extern *user* symbol)
|
||||
|
||||
(define-extern new-dynamic-structure (function symbol type int structure))
|
||||
|
||||
|
||||
@@ -273,7 +273,7 @@
|
||||
(pid int32 ) ;; globally unique ID, never reused for another
|
||||
(main-thread cpu-thread :offset-assert 48) ;; suspendable main thread
|
||||
(top-thread cpu-thread :offset-assert 52) ;; currently running thread
|
||||
(entity entity :offset-assert 56) ;; if we were spawned from an entity, that entity
|
||||
(entity entity-actor :offset-assert 56) ;; if we were spawned from an entity, that entity
|
||||
(level level :offset-assert 60) ;; if we're associated with a level, that level
|
||||
(state state :offset-assert 64) ;; current state, if we're in one
|
||||
(next-state state :offset-assert 68) ;; set if we have a pending (go)
|
||||
|
||||
@@ -87,7 +87,7 @@
|
||||
|
||||
(defmethod init-airlock! com-airlock ((obj com-airlock))
|
||||
(process-entity-status! obj (entity-perm-status subtask-complete) #f)
|
||||
(process-drawable-from-entity! obj (the-as entity-actor (-> obj entity)))
|
||||
(process-drawable-from-entity! obj (-> obj entity))
|
||||
(logclear! (-> obj mask) (process-mask actor-pause))
|
||||
(set! (-> obj were-behind?) #f)
|
||||
(set! (-> obj inner?)
|
||||
@@ -149,7 +149,10 @@
|
||||
(when (and (< f30-0 0.0) (< 0.0 (-> obj last-distance)))
|
||||
(let ((s5-1 (res-lump-struct (-> obj entity) 'on-cross structure)))
|
||||
(if s5-1
|
||||
(eval! (new 'stack 'script-context (the-as basic (process->ppointer self)) self (the-as vector #f)) s5-1)
|
||||
(eval!
|
||||
(new 'stack 'script-context (the-as basic (process->ppointer self)) self (the-as vector #f))
|
||||
(the-as pair s5-1)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -202,7 +205,7 @@
|
||||
)
|
||||
(and (eval!
|
||||
(new 'stack 'script-context (the-as basic (process->ppointer self)) self (the-as vector #f))
|
||||
(-> obj open-test)
|
||||
(the-as pair (-> obj open-test))
|
||||
)
|
||||
(-> *setting-control* user-current airlock)
|
||||
)
|
||||
@@ -230,7 +233,7 @@
|
||||
(with-pp
|
||||
(let ((gp-1 (eval!
|
||||
(new 'stack 'script-context (the-as basic (process->ppointer pp)) pp (the-as vector #f))
|
||||
(-> obj level-name)
|
||||
(the-as pair (-> obj level-name))
|
||||
)
|
||||
)
|
||||
(s4-0 #f)
|
||||
@@ -322,9 +325,8 @@
|
||||
(-> obj gear-rotv)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod play-city-voice-sound com-airlock ((obj com-airlock) (arg0 symbol))
|
||||
(let ((gp-0 (the-as array #f)))
|
||||
(let ((gp-0 (the-as (array string) #f)))
|
||||
(case arg0
|
||||
(('enter)
|
||||
(set! gp-0 (new 'static 'boxed-array :type string "cityv005" "cityv006" "cityv007" "cityv008" "cityv009"))
|
||||
@@ -490,7 +492,10 @@
|
||||
(begin
|
||||
(let ((gp-0 (res-lump-struct (-> self entity) 'on-activate structure)))
|
||||
(if gp-0
|
||||
(eval! (new 'stack 'script-context (the-as basic (process->ppointer self)) self (the-as vector #f)) gp-0)
|
||||
(eval!
|
||||
(new 'stack 'script-context (the-as basic (process->ppointer self)) self (the-as vector #f))
|
||||
(the-as pair gp-0)
|
||||
)
|
||||
)
|
||||
)
|
||||
(destination-loaded? self #f)
|
||||
@@ -555,7 +560,10 @@
|
||||
()
|
||||
(let ((gp-0 (res-lump-struct (-> self entity) 'on-exit structure)))
|
||||
(if (and gp-0 (not *scene-player*))
|
||||
(eval! (new 'stack 'script-context (the-as basic (process->ppointer self)) self (the-as vector #f)) gp-0)
|
||||
(eval!
|
||||
(new 'stack 'script-context (the-as basic (process->ppointer self)) self (the-as vector #f))
|
||||
(the-as pair gp-0)
|
||||
)
|
||||
)
|
||||
)
|
||||
(the-as
|
||||
@@ -564,7 +572,10 @@
|
||||
(let ((gp-1 (res-lump-struct (-> self entity) 'on-inside structure)))
|
||||
(set! (-> self were-behind?) #f)
|
||||
(if (and gp-1 (not *scene-player*))
|
||||
(eval! (new 'stack 'script-context (the-as basic (process->ppointer self)) self (the-as vector #f)) gp-1)
|
||||
(eval!
|
||||
(new 'stack 'script-context (the-as basic (process->ppointer self)) self (the-as vector #f))
|
||||
(the-as pair gp-1)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -621,7 +632,10 @@
|
||||
(when (< 0.0 (check-crossing-distance self (target-pos 0) #f))
|
||||
(let ((gp-3 (res-lump-struct (-> self entity) 'on-deactivate structure)))
|
||||
(if (and gp-3 (not *scene-player*))
|
||||
(eval! (new 'stack 'script-context (the-as basic (process->ppointer self)) self (the-as vector #f)) gp-3)
|
||||
(eval!
|
||||
(new 'stack 'script-context (the-as basic (process->ppointer self)) self (the-as vector #f))
|
||||
(the-as pair gp-3)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -755,7 +769,10 @@
|
||||
(process-entity-status! self (entity-perm-status subtask-complete) #t)
|
||||
(let ((s5-10 (res-lump-struct (-> self entity) 'on-enter structure)))
|
||||
(if s5-10
|
||||
(eval! (new 'stack 'script-context (the-as basic (process->ppointer self)) self (the-as vector #f)) s5-10)
|
||||
(eval!
|
||||
(new 'stack 'script-context (the-as basic (process->ppointer self)) self (the-as vector #f))
|
||||
(the-as pair s5-10)
|
||||
)
|
||||
)
|
||||
)
|
||||
(if (and (-> self sound-open)
|
||||
@@ -1473,7 +1490,3 @@
|
||||
(go (method-of-object obj close) #t)
|
||||
(none)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -586,14 +586,14 @@ StaticResult Compiler::compile_static_no_eval_for_pairs(const goos::Object& form
|
||||
bool can_macro) {
|
||||
auto fie = env->file_env();
|
||||
if (form.is_pair()) {
|
||||
if (form.as_pair()->car.is_symbol() && (form.as_pair()->car.as_symbol()->name == "new" ||
|
||||
form.as_pair()->car.as_symbol()->name == "the" ||
|
||||
form.as_pair()->car.as_symbol()->name == "lambda")) {
|
||||
if (form.as_pair()->car.is_symbol("new") || form.as_pair()->car.is_symbol("the") ||
|
||||
(can_macro && form.as_pair()->car.is_symbol("lambda"))) {
|
||||
return compile_static(form, env);
|
||||
}
|
||||
if (form.as_pair()->car.is_symbol() && form.as_pair()->car.as_symbol()->name == "unquote") {
|
||||
// ,(macro-name args...) is actually (unquote (macro-name args...))
|
||||
// decompile the arg as macro if possible.
|
||||
// ,(lambda ...) is also a special case.
|
||||
auto& unq_arg_pair = form.as_pair()->cdr;
|
||||
if (unq_arg_pair.is_empty_list()) {
|
||||
throw_compiler_error(form, "Cannot unquote empty list");
|
||||
@@ -603,7 +603,8 @@ StaticResult Compiler::compile_static_no_eval_for_pairs(const goos::Object& form
|
||||
throw_compiler_error(form, "Cannot unquote non-list");
|
||||
}
|
||||
goos::Object macro_obj;
|
||||
if (!try_getting_macro_from_goos(unq_arg.as_pair()->car, ¯o_obj)) {
|
||||
if (!unq_arg.as_pair()->car.is_symbol("lambda") &&
|
||||
!try_getting_macro_from_goos(unq_arg.as_pair()->car, ¯o_obj)) {
|
||||
throw_compiler_error(form, "Macro {} not found", unq_arg.as_pair()->car.print());
|
||||
}
|
||||
return compile_static_no_eval_for_pairs(form.as_pair()->cdr.as_pair()->car, env, seg, true);
|
||||
|
||||
@@ -668,7 +668,7 @@ void Debugger::read_symbol_table_jak2() {
|
||||
str_buff[127] = '\0';
|
||||
|
||||
// GOAL sym - s7
|
||||
auto sym_offset = s32(offset + st_base + BASIC_OFFSET) - s32(m_debug_context.s7);
|
||||
auto sym_offset = s32(offset + st_base) - s32(m_debug_context.s7);
|
||||
ASSERT(sym_offset >= -SYM_TABLE_MEM_SIZE / 4);
|
||||
ASSERT(sym_offset < SYM_TABLE_MEM_SIZE / 4);
|
||||
|
||||
@@ -1100,8 +1100,7 @@ std::string Debugger::disassemble_x86_with_symbols(int len, u64 base_addr) const
|
||||
pos += op_mov_string.length();
|
||||
auto r14_pos = result.find(sym_false_string, pos);
|
||||
if (r14_pos < result.find(op_mov_string, pos)) {
|
||||
result.replace(r14_pos, sym_false_string.length(),
|
||||
fmt::format(", '{}", get_symbol_name_from_offset(0)));
|
||||
result.replace(r14_pos, sym_false_string.length(), fmt::format(", '#f"));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
@echo off
|
||||
cd ..\..
|
||||
out\build\Release\bin\gk -boot -fakeiso -debug -v -jak2
|
||||
pause
|
||||
@@ -0,0 +1,4 @@
|
||||
@echo off
|
||||
cd ..\..
|
||||
out\build\Release\bin\gk -fakeiso -debug -v -jak2
|
||||
pause
|
||||
@@ -1,6 +1,6 @@
|
||||
@echo off
|
||||
cd ..\..
|
||||
out\build\Release\bin\offline-test -d --iso_data_path iso_data\jak1\ --game jak1
|
||||
scripts\update_decomp_reference.py failures\ test\decompiler\reference\jak1\
|
||||
python3 scripts\update_decomp_reference.py failures\ test\decompiler\reference\ --game jak1
|
||||
RMDIR /Q/S failures
|
||||
pause
|
||||
@@ -1,6 +1,6 @@
|
||||
@echo off
|
||||
cd ..\..
|
||||
out\build\Release\bin\offline-test -d --iso_data_path iso_data\jak2\ --game jak2
|
||||
scripts\update_decomp_reference.py failures\ test\decompiler\reference\jak2\
|
||||
python3 scripts\update_decomp_reference.py failures\ test\decompiler\reference\ --game jak2
|
||||
RMDIR /Q/S failures
|
||||
pause
|
||||
@@ -0,0 +1,4 @@
|
||||
@echo off
|
||||
cd ..\..
|
||||
python3 scripts\gsrc\update-gsrc-via-refs.py --game jak2 --decompiler out\build\Release\bin\decompiler.exe --decompiler_config .\decompiler\config\jak2_ntsc_v1.jsonc
|
||||
pause
|
||||
+10
-22
@@ -595,13 +595,7 @@
|
||||
(format *stdcon* "~S ~f~%" (-> arg1 disp) (vector-length gp-0))
|
||||
(vector+! gp-0 gp-0 (-> arg1 origin))
|
||||
(camera-line (-> arg1 origin) gp-0 (-> arg1 color))
|
||||
(camera-cross
|
||||
(new 'static 'vector :y 1024.0)
|
||||
(new 'static 'vector :z 1024.0)
|
||||
gp-0
|
||||
(-> arg1 color)
|
||||
(meters 1.0)
|
||||
)
|
||||
(camera-cross (new 'static 'vector :y 1024.0) (new 'static 'vector :z 1024.0) gp-0 (-> arg1 color) (meters 1))
|
||||
)
|
||||
)
|
||||
|
||||
@@ -623,13 +617,7 @@
|
||||
(format *stdcon* "~S ~f~%" (-> arg1 disp) (vector-length gp-0))
|
||||
(vector+! gp-0 gp-0 (-> arg1 origin))
|
||||
(camera-line (-> arg1 origin) gp-0 (-> arg1 color))
|
||||
(camera-cross
|
||||
(new 'static 'vector :y 1024.0)
|
||||
(new 'static 'vector :z 1024.0)
|
||||
gp-0
|
||||
(-> arg1 color)
|
||||
(meters 1.0)
|
||||
)
|
||||
(camera-cross (new 'static 'vector :y 1024.0) (new 'static 'vector :z 1024.0) gp-0 (-> arg1 color) (meters 1))
|
||||
)
|
||||
)
|
||||
|
||||
@@ -665,7 +653,7 @@
|
||||
(new 'static 'vector :z 1024.0)
|
||||
s5-1
|
||||
(new 'static 'vector4w :x #x80 :w #x80)
|
||||
(meters 1.0)
|
||||
(meters 1)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -678,7 +666,7 @@
|
||||
(new 'static 'vector :z 1024.0)
|
||||
s5-2
|
||||
(new 'static 'vector4w :y #x80 :w #x80)
|
||||
(meters 1.0)
|
||||
(meters 1)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -691,7 +679,7 @@
|
||||
(new 'static 'vector :z 1024.0)
|
||||
s5-3
|
||||
(new 'static 'vector4w :x #x80 :z #x80 :w #x80)
|
||||
(meters 1.0)
|
||||
(meters 1)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -742,7 +730,7 @@
|
||||
(new 'static 'vector :z 1024.0)
|
||||
s5-4
|
||||
(new 'static 'vector4w :x #xff :y #xff :w #x80)
|
||||
(meters 1.0)
|
||||
(meters 1)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -785,7 +773,7 @@
|
||||
(new 'static 'vector :z 1024.0)
|
||||
s5-5
|
||||
(new 'static 'vector4w :z #xff :w #x80)
|
||||
(meters 1.0)
|
||||
(meters 1)
|
||||
)
|
||||
(curve-get-pos! s5-5 (cam-slave-get-float arg0 'intro-exitValue (the-as float 0.0)) s3-2)
|
||||
(vector+! s5-5 s5-5 s4-2)
|
||||
@@ -794,7 +782,7 @@
|
||||
(new 'static 'vector :z 1024.0)
|
||||
s5-5
|
||||
(new 'static 'vector4w :z #xff :w #x80)
|
||||
(meters 1.0)
|
||||
(meters 1)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -822,7 +810,7 @@
|
||||
(new 'static 'vector :z 1024.0)
|
||||
s5-6
|
||||
(new 'static 'vector4w :x #xff :y #xff :w #x80)
|
||||
(meters 1.0)
|
||||
(meters 1)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -846,7 +834,7 @@
|
||||
(new 'static 'vector :z 1024.0)
|
||||
s5-7
|
||||
(new 'static 'vector4w :y #xff :z #xff :w #x80)
|
||||
(meters 1.0)
|
||||
(meters 1)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
+7
-7
@@ -995,7 +995,7 @@
|
||||
arg1
|
||||
(-> arg2 vector 3)
|
||||
(the-as vector (-> arg2 vector))
|
||||
(meters 2.0)
|
||||
(meters 2)
|
||||
(new 'static 'rgba :r #xff :a #x80)
|
||||
)
|
||||
(add-debug-vector
|
||||
@@ -1003,7 +1003,7 @@
|
||||
arg1
|
||||
(-> arg2 vector 3)
|
||||
(-> arg2 vector 1)
|
||||
(meters 2.0)
|
||||
(meters 2)
|
||||
(new 'static 'rgba :g #xff :a #x80)
|
||||
)
|
||||
(add-debug-vector
|
||||
@@ -1011,7 +1011,7 @@
|
||||
arg1
|
||||
(-> arg2 vector 3)
|
||||
(-> arg2 vector 2)
|
||||
(meters 2.0)
|
||||
(meters 2)
|
||||
(new 'static 'rgba :b #xff :a #x80)
|
||||
)
|
||||
arg2
|
||||
@@ -1024,11 +1024,11 @@
|
||||
arg1
|
||||
arg3
|
||||
(the-as vector (-> arg2 vector))
|
||||
(meters 2.0)
|
||||
(meters 2)
|
||||
(new 'static 'rgba :r #xff :a #x80)
|
||||
)
|
||||
(add-debug-vector arg0 arg1 arg3 (-> arg2 vector 1) (meters 2.0) (new 'static 'rgba :g #xff :a #x80))
|
||||
(add-debug-vector arg0 arg1 arg3 (-> arg2 vector 2) (meters 2.0) (new 'static 'rgba :b #xff :a #x80))
|
||||
(add-debug-vector arg0 arg1 arg3 (-> arg2 vector 1) (meters 2) (new 'static 'rgba :g #xff :a #x80))
|
||||
(add-debug-vector arg0 arg1 arg3 (-> arg2 vector 2) (meters 2) (new 'static 'rgba :b #xff :a #x80))
|
||||
arg2
|
||||
)
|
||||
|
||||
@@ -1291,7 +1291,7 @@
|
||||
arg1
|
||||
arg3
|
||||
(-> arg2 direction)
|
||||
(meters 3.0)
|
||||
(meters 3)
|
||||
(new 'static 'rgba :r #xff :g #xff :b #xff :a #x80)
|
||||
)
|
||||
(let ((s2-1 (vector+*! (new-stack-vector0) arg3 (-> arg2 direction) (* 12288.0 (-> arg2 levels x))))
|
||||
|
||||
+140
-140
@@ -3424,8 +3424,8 @@
|
||||
(flag "Use menu subdiv" *artist-use-menu-subdiv* dm-boolean-toggle-pick-func)
|
||||
(float-var "Subdiv Close" close dm-subdiv-float 10 1 #t 1 200 1)
|
||||
(float-var "Subdiv Far" far dm-subdiv-float 10 1 #t 1 200 1)
|
||||
(function "Target Start" #f (lambda () (start 'debug (get-or-create-continue! *game-info*))))
|
||||
(function "Target Stop" #f (lambda () (stop 'debug)))
|
||||
(function "Target Start" #f ,(lambda () (start 'debug (get-or-create-continue! *game-info*))))
|
||||
(function "Target Stop" #f ,(lambda () (stop 'debug)))
|
||||
(menu
|
||||
"Anim Tester"
|
||||
(int-var "Speed" anim-speed dm-subdiv-int 10 10 #t -300 1000)
|
||||
@@ -3454,34 +3454,34 @@
|
||||
(function
|
||||
"New Game"
|
||||
#f
|
||||
(lambda () (initialize! *game-info* 'game (the-as game-save #f) (the-as string #f)) (none))
|
||||
,(lambda () (initialize! *game-info* 'game (the-as game-save #f) (the-as string #f)) (none))
|
||||
)
|
||||
(function
|
||||
"New Life"
|
||||
#f
|
||||
(lambda () (initialize! *game-info* 'die (the-as game-save #f) (the-as string #f)) (none))
|
||||
,(lambda () (initialize! *game-info* 'die (the-as game-save #f) (the-as string #f)) (none))
|
||||
)
|
||||
(function
|
||||
"Reset Game"
|
||||
#f
|
||||
(lambda ()
|
||||
(set! (-> *game-info* mode) 'debug)
|
||||
(initialize! *game-info* 'game (the-as game-save #f) (the-as string #f))
|
||||
(none)
|
||||
)
|
||||
,(lambda ()
|
||||
(set! (-> *game-info* mode) 'debug)
|
||||
(initialize! *game-info* 'game (the-as game-save #f) (the-as string #f))
|
||||
(none)
|
||||
)
|
||||
)
|
||||
(function "Reset Actors" #f (lambda () (reset-actors 'debug) (none)))
|
||||
(function "Save Game" #f (lambda () (auto-save-command 'save 0 0 *default-pool*) (none)))
|
||||
(function "Load Game" #f (lambda () (auto-save-command 'restore 0 0 *default-pool*) (none)))
|
||||
(flag "Target" #f (lambda ((arg0 int) (arg1 debug-menu-msg))
|
||||
(when (= arg1 (debug-menu-msg press))
|
||||
(if *target*
|
||||
(stop 'debug)
|
||||
(start 'debug (get-or-create-continue! *game-info*))
|
||||
)
|
||||
)
|
||||
*target*
|
||||
)
|
||||
(function "Reset Actors" #f ,(lambda () (reset-actors 'debug) (none)))
|
||||
(function "Save Game" #f ,(lambda () (auto-save-command 'save 0 0 *default-pool*) (none)))
|
||||
(function "Load Game" #f ,(lambda () (auto-save-command 'restore 0 0 *default-pool*) (none)))
|
||||
(flag "Target" #f ,(lambda ((arg0 int) (arg1 debug-menu-msg))
|
||||
(when (= arg1 (debug-menu-msg press))
|
||||
(if *target*
|
||||
(stop 'debug)
|
||||
(start 'debug (get-or-create-continue! *game-info*))
|
||||
)
|
||||
)
|
||||
*target*
|
||||
)
|
||||
)
|
||||
(flag "Game Mode" play dm-game-mode-pick-func)
|
||||
(flag "Debug Mode" debug dm-game-mode-pick-func)
|
||||
@@ -3491,12 +3491,12 @@
|
||||
(float-var
|
||||
"sfx-volume"
|
||||
#f
|
||||
(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float))
|
||||
(if (= arg1 (debug-menu-msg press))
|
||||
(set! (-> *setting-control* default sfx-volume) arg2)
|
||||
(-> *setting-control* default sfx-volume)
|
||||
)
|
||||
)
|
||||
,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float))
|
||||
(if (= arg1 (debug-menu-msg press))
|
||||
(set! (-> *setting-control* default sfx-volume) arg2)
|
||||
(-> *setting-control* default sfx-volume)
|
||||
)
|
||||
)
|
||||
2
|
||||
1
|
||||
#t
|
||||
@@ -3507,12 +3507,12 @@
|
||||
(float-var
|
||||
"music-volume"
|
||||
#f
|
||||
(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float))
|
||||
(if (= arg1 (debug-menu-msg press))
|
||||
(set! (-> *setting-control* default music-volume) arg2)
|
||||
(-> *setting-control* default music-volume)
|
||||
)
|
||||
)
|
||||
,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float))
|
||||
(if (= arg1 (debug-menu-msg press))
|
||||
(set! (-> *setting-control* default music-volume) arg2)
|
||||
(-> *setting-control* default music-volume)
|
||||
)
|
||||
)
|
||||
2
|
||||
1
|
||||
#t
|
||||
@@ -3523,12 +3523,12 @@
|
||||
(float-var
|
||||
"dialog-volume"
|
||||
#f
|
||||
(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float))
|
||||
(if (= arg1 (debug-menu-msg press))
|
||||
(set! (-> *setting-control* default dialog-volume) arg2)
|
||||
(-> *setting-control* default dialog-volume)
|
||||
)
|
||||
)
|
||||
,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float))
|
||||
(if (= arg1 (debug-menu-msg press))
|
||||
(set! (-> *setting-control* default dialog-volume) arg2)
|
||||
(-> *setting-control* default dialog-volume)
|
||||
)
|
||||
)
|
||||
2
|
||||
1
|
||||
#t
|
||||
@@ -3549,32 +3549,32 @@
|
||||
(flag
|
||||
"play-hints "
|
||||
#f
|
||||
(lambda ((arg0 int) (arg1 debug-menu-msg))
|
||||
(if (= arg1 (debug-menu-msg press))
|
||||
(set! (-> *setting-control* default play-hints) (not (-> *setting-control* default play-hints)))
|
||||
)
|
||||
(-> *setting-control* default play-hints)
|
||||
)
|
||||
,(lambda ((arg0 int) (arg1 debug-menu-msg))
|
||||
(if (= arg1 (debug-menu-msg press))
|
||||
(set! (-> *setting-control* default play-hints) (not (-> *setting-control* default play-hints)))
|
||||
)
|
||||
(-> *setting-control* default play-hints)
|
||||
)
|
||||
)
|
||||
(flag
|
||||
"vibration"
|
||||
#f
|
||||
(lambda ((arg0 int) (arg1 debug-menu-msg))
|
||||
(if (= arg1 (debug-menu-msg press))
|
||||
(set! (-> *setting-control* default vibration) (not (-> *setting-control* default vibration)))
|
||||
)
|
||||
(-> *setting-control* default vibration)
|
||||
)
|
||||
,(lambda ((arg0 int) (arg1 debug-menu-msg))
|
||||
(if (= arg1 (debug-menu-msg press))
|
||||
(set! (-> *setting-control* default vibration) (not (-> *setting-control* default vibration)))
|
||||
)
|
||||
(-> *setting-control* default vibration)
|
||||
)
|
||||
)
|
||||
(flag
|
||||
"border-mode"
|
||||
#f
|
||||
(lambda ((arg0 int) (arg1 debug-menu-msg))
|
||||
(if (= arg1 (debug-menu-msg press))
|
||||
(set! (-> *setting-control* default border-mode) (not (-> *setting-control* default border-mode)))
|
||||
)
|
||||
(-> *setting-control* default border-mode)
|
||||
)
|
||||
,(lambda ((arg0 int) (arg1 debug-menu-msg))
|
||||
(if (= arg1 (debug-menu-msg press))
|
||||
(set! (-> *setting-control* default border-mode) (not (-> *setting-control* default border-mode)))
|
||||
)
|
||||
(-> *setting-control* default border-mode)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -3742,7 +3742,7 @@
|
||||
'(menu
|
||||
"Actor"
|
||||
(flag "Spawn Actors" *spawn-actors* dm-boolean-toggle-pick-func)
|
||||
(function "Reset Actors" #f (lambda () (reset-actors 'debug) (none)))
|
||||
(function "Reset Actors" #f ,(lambda () (reset-actors 'debug) (none)))
|
||||
(menu
|
||||
"Actor Compaction"
|
||||
(flag "off" #f dm-compact-actor-pick-func)
|
||||
@@ -3784,63 +3784,63 @@
|
||||
'(menu
|
||||
"Target"
|
||||
(flag "Target Stats" *stats-target* dm-boolean-toggle-pick-func)
|
||||
(function "Play" #f (lambda () (play #t #t)))
|
||||
(function "Start" #f (lambda () (the-as int (start 'debug (get-or-create-continue! *game-info*)))))
|
||||
(function "Stop" #f (lambda () (stop 'debug)))
|
||||
(function "Play" #f ,(lambda () (play #t #t)))
|
||||
(function "Start" #f ,(lambda () (the-as int (start 'debug (get-or-create-continue! *game-info*)))))
|
||||
(function "Stop" #f ,(lambda () (stop 'debug)))
|
||||
(flag
|
||||
"Invulnerable"
|
||||
#f
|
||||
(lambda ((arg0 int) (arg1 debug-menu-msg))
|
||||
(when (= arg1 (debug-menu-msg press))
|
||||
(if *target*
|
||||
(logxor! (-> *target* state-flags) (state-flags invulnerable))
|
||||
)
|
||||
)
|
||||
(the-as symbol (and *target* (logtest? (-> *target* state-flags) (state-flags invulnerable))))
|
||||
)
|
||||
,(lambda ((arg0 int) (arg1 debug-menu-msg))
|
||||
(when (= arg1 (debug-menu-msg press))
|
||||
(if *target*
|
||||
(logxor! (-> *target* state-flags) (state-flags invulnerable))
|
||||
)
|
||||
)
|
||||
(the-as symbol (and *target* (logtest? (-> *target* state-flags) (state-flags invulnerable))))
|
||||
)
|
||||
)
|
||||
(function
|
||||
"Reset Trans"
|
||||
#f
|
||||
(lambda () (when *target*
|
||||
(position-in-front-of-camera! (target-pos 0) (the-as float 40960.0) (the-as float 4096.0))
|
||||
(set! (-> *target* control transv quad) (the-as uint128 0))
|
||||
(quaternion-identity! (-> *target* control quat))
|
||||
(quaternion-identity! (-> *target* control unknown-quaternion00))
|
||||
(quaternion-identity! (-> *target* control dir-targ))
|
||||
)
|
||||
)
|
||||
,(lambda () (when *target*
|
||||
(position-in-front-of-camera! (target-pos 0) (the-as float 40960.0) (the-as float 4096.0))
|
||||
(set! (-> *target* control transv quad) (the-as uint128 0))
|
||||
(quaternion-identity! (-> *target* control quat))
|
||||
(quaternion-identity! (-> *target* control unknown-quaternion00))
|
||||
(quaternion-identity! (-> *target* control dir-targ))
|
||||
)
|
||||
)
|
||||
)
|
||||
(function "Zero Trans" #f (lambda () (when *target*
|
||||
(set-vector! (-> *target* control trans) 0.0 163840.0 0.0 1.0)
|
||||
(set! (-> *target* control transv quad) (the-as uint128 0))
|
||||
(quaternion-identity! (-> *target* control quat))
|
||||
(quaternion-identity! (-> *target* control unknown-quaternion00))
|
||||
(quaternion-identity! (-> *target* control dir-targ))
|
||||
)
|
||||
)
|
||||
(function "Zero Trans" #f ,(lambda () (when *target*
|
||||
(set-vector! (-> *target* control trans) 0.0 163840.0 0.0 1.0)
|
||||
(set! (-> *target* control transv quad) (the-as uint128 0))
|
||||
(quaternion-identity! (-> *target* control quat))
|
||||
(quaternion-identity! (-> *target* control unknown-quaternion00))
|
||||
(quaternion-identity! (-> *target* control dir-targ))
|
||||
)
|
||||
)
|
||||
)
|
||||
(menu
|
||||
"Mode"
|
||||
(function "normal" #f (lambda () (send-event *target* 'end-mode)))
|
||||
(function "racing" #f (lambda () (send-event *target* 'change-mode 'racing #f)))
|
||||
(function "snowball" #f (lambda () (send-event *target* 'change-mode 'snowball #f)))
|
||||
(function "normal" #f ,(lambda () (send-event *target* 'end-mode)))
|
||||
(function "racing" #f ,(lambda () (send-event *target* 'change-mode 'racing #f)))
|
||||
(function "snowball" #f ,(lambda () (send-event *target* 'change-mode 'snowball #f)))
|
||||
)
|
||||
(flag "Slow Frame Rate" *slow-frame-rate* dm-boolean-toggle-pick-func)
|
||||
(function "Print Pos" #f (lambda ()
|
||||
(let ((v1-0 (target-pos 0)))
|
||||
(format #t "~6,,2m ~6,,2m ~6,,2m~%" (-> v1-0 x) (-> v1-0 y) (-> v1-0 z))
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
(function "Print Pos" #f ,(lambda ()
|
||||
(let ((v1-0 (target-pos 0)))
|
||||
(format #t "~6,,2m ~6,,2m ~6,,2m~%" (-> v1-0 x) (-> v1-0 y) (-> v1-0 z))
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
)
|
||||
(function "Save Continue" #f (lambda ()
|
||||
(if *target*
|
||||
(trsq->continue-point (-> *target* control))
|
||||
)
|
||||
(none)
|
||||
)
|
||||
(function "Save Continue" #f ,(lambda ()
|
||||
(if *target*
|
||||
(trsq->continue-point (-> *target* control))
|
||||
)
|
||||
(none)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -3902,7 +3902,7 @@
|
||||
(flag "Amb Snd Class" *ambient-sound-class* dm-boolean-toggle-pick-func)
|
||||
(flag "Amb Spheres" *execute-ambients* dm-boolean-toggle-pick-func)
|
||||
(flag "Sound channels" *display-iop-info* dm-boolean-toggle-pick-func)
|
||||
(function "List Sounds" #f (lambda () (list-sounds)))
|
||||
(function "List Sounds" #f ,(lambda () (list-sounds)))
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -3923,48 +3923,48 @@
|
||||
'(main-menu
|
||||
"Popup"
|
||||
(flag "Cam 1" pad-1 dm-cam-externalize)
|
||||
(flag "Target" #f (lambda ((arg0 int) (arg1 debug-menu-msg))
|
||||
(when (= arg1 (debug-menu-msg press))
|
||||
(if *target*
|
||||
(stop 'debug)
|
||||
(start 'debug (get-or-create-continue! *game-info*))
|
||||
)
|
||||
)
|
||||
*target*
|
||||
)
|
||||
)
|
||||
(flag "Game" #f (lambda ((arg0 int) (arg1 debug-menu-msg))
|
||||
(when (= arg1 (debug-menu-msg press))
|
||||
(let ((v1-3 (-> *game-info* mode)))
|
||||
(set! (-> *game-info* mode) (cond
|
||||
((= v1-3 'play)
|
||||
'debug
|
||||
)
|
||||
((= v1-3 'debug)
|
||||
'play
|
||||
)
|
||||
(else
|
||||
(-> *game-info* mode)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(= (-> *game-info* mode) 'play)
|
||||
)
|
||||
)
|
||||
(function "Clean" #f (lambda ((arg0 int) (arg1 debug-menu-msg))
|
||||
(if (time-of-day-setup #f)
|
||||
(time-of-day-setup #t)
|
||||
(flag "Target" #f ,(lambda ((arg0 int) (arg1 debug-menu-msg))
|
||||
(when (= arg1 (debug-menu-msg press))
|
||||
(if *target*
|
||||
(stop 'debug)
|
||||
(start 'debug (get-or-create-continue! *game-info*))
|
||||
)
|
||||
(set! *display-entity-errors* #f)
|
||||
(set! *display-profile* #f)
|
||||
(set! *display-actor-marks* #f)
|
||||
#f
|
||||
)
|
||||
*target*
|
||||
)
|
||||
)
|
||||
(flag "Game" #f ,(lambda ((arg0 int) (arg1 debug-menu-msg))
|
||||
(when (= arg1 (debug-menu-msg press))
|
||||
(let ((v1-3 (-> *game-info* mode)))
|
||||
(set! (-> *game-info* mode) (cond
|
||||
((= v1-3 'play)
|
||||
'debug
|
||||
)
|
||||
((= v1-3 'debug)
|
||||
'play
|
||||
)
|
||||
(else
|
||||
(-> *game-info* mode)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(= (-> *game-info* mode) 'play)
|
||||
)
|
||||
)
|
||||
(function "Clean" #f ,(lambda ((arg0 int) (arg1 debug-menu-msg))
|
||||
(if (time-of-day-setup #f)
|
||||
(time-of-day-setup #t)
|
||||
)
|
||||
(set! *display-entity-errors* #f)
|
||||
(set! *display-profile* #f)
|
||||
(set! *display-actor-marks* #f)
|
||||
#f
|
||||
)
|
||||
)
|
||||
(flag "Stats" *stats-target* dm-boolean-toggle-pick-func)
|
||||
(function "Reset" #f (lambda () (reset-actors 'debug) (none)))
|
||||
(function "Reset" #f ,(lambda () (reset-actors 'debug) (none)))
|
||||
)
|
||||
)
|
||||
arg0
|
||||
|
||||
+2
-2
@@ -12,7 +12,7 @@
|
||||
)
|
||||
)
|
||||
(add-debug-text-sphere #t (bucket-id debug-no-zbuf) (-> obj trans) 819.2 (symbol->string (-> obj name)) s5-0)
|
||||
(add-debug-vector #t (bucket-id debug-no-zbuf) (-> obj trans) (-> obj normal) (meters 2.0) s5-0)
|
||||
(add-debug-vector #t (bucket-id debug-no-zbuf) (-> obj trans) (-> obj normal) (meters 2) s5-0)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
@@ -743,7 +743,7 @@
|
||||
(bucket-id debug-no-zbuf)
|
||||
(-> obj trans)
|
||||
a3-2
|
||||
(meters 2.0)
|
||||
(meters 2)
|
||||
(new 'static 'rgba :r #xff :g #x80 :a #x80)
|
||||
)
|
||||
)
|
||||
|
||||
+1
-1
@@ -145,7 +145,7 @@
|
||||
)
|
||||
|
||||
;; definition for symbol *subdivide-settings*, type subdivide-settings
|
||||
(define *subdivide-settings* (new 'global 'subdivide-settings (meters 30.0) (meters 70.0)))
|
||||
(define *subdivide-settings* (new 'global 'subdivide-settings (meters 30) (meters 70)))
|
||||
|
||||
;; definition for function set-tfrag-dists!
|
||||
;; INFO: Return type mismatch tfrag-dists vs none.
|
||||
|
||||
+2
-2
@@ -1735,8 +1735,8 @@
|
||||
(-> s5-0 bounds w)
|
||||
(new 'static 'rgba :r #xff :g #xff :a #x20)
|
||||
)
|
||||
(add-debug-vector #t (bucket-id debug-no-zbuf) (-> s5-0 origin) *x-vector* (meters 1.0) *color-red*)
|
||||
(add-debug-vector #t (bucket-id debug-no-zbuf) (-> s5-0 origin) *z-vector* (meters 1.0) *color-blue*)
|
||||
(add-debug-vector #t (bucket-id debug-no-zbuf) (-> s5-0 origin) *x-vector* (meters 1) *color-red*)
|
||||
(add-debug-vector #t (bucket-id debug-no-zbuf) (-> s5-0 origin) *z-vector* (meters 1) *color-blue*)
|
||||
(when (logtest? (-> obj flags) (nav-control-flags navcf2))
|
||||
(dotimes (s3-0 (-> s5-0 vertex-count))
|
||||
(add-debug-x
|
||||
|
||||
+9
-9
@@ -126,7 +126,7 @@
|
||||
(bucket-id debug-no-zbuf)
|
||||
(-> s2-0 intersect)
|
||||
(-> s2-0 surface-normal)
|
||||
(meters 1.0)
|
||||
(meters 1)
|
||||
(the-as rgba (+ s1-1 (shl s4-0 24)))
|
||||
)
|
||||
(add-debug-vector
|
||||
@@ -134,7 +134,7 @@
|
||||
(bucket-id debug-no-zbuf)
|
||||
(-> s2-0 intersect)
|
||||
(-> s2-0 local-normal)
|
||||
(meters 1.0)
|
||||
(meters 1)
|
||||
(the-as rgba (+ s1-1 (shl s4-0 24)))
|
||||
)
|
||||
)
|
||||
@@ -966,7 +966,7 @@
|
||||
(bucket-id debug-no-zbuf)
|
||||
(-> self control trans)
|
||||
gp-0
|
||||
(meters 2.0)
|
||||
(meters 2)
|
||||
(new 'static 'rgba :r #xff :g #xff :b #xff :a #x80)
|
||||
)
|
||||
(add-debug-vector
|
||||
@@ -974,7 +974,7 @@
|
||||
(bucket-id debug-no-zbuf)
|
||||
(-> self control trans)
|
||||
s5-0
|
||||
(meters 2.0)
|
||||
(meters 2)
|
||||
(new 'static 'rgba :r #xff :a #x80)
|
||||
)
|
||||
)
|
||||
@@ -983,7 +983,7 @@
|
||||
(bucket-id debug-no-zbuf)
|
||||
(-> self control trans)
|
||||
(-> self control unknown-matrix01 vector 2)
|
||||
(meters 2.0)
|
||||
(meters 2)
|
||||
(new 'static 'rgba :r #xff :b #xff :a #x80)
|
||||
)
|
||||
(rotate-toward-orientation!
|
||||
@@ -1231,7 +1231,7 @@
|
||||
(bucket-id debug-no-zbuf)
|
||||
(-> self control trans)
|
||||
(-> self control ground-poly-normal)
|
||||
(meters 2.0)
|
||||
(meters 2)
|
||||
(new 'static 'rgba :b #xff :a #x80)
|
||||
)
|
||||
(add-debug-vector
|
||||
@@ -1239,7 +1239,7 @@
|
||||
(bucket-id debug-no-zbuf)
|
||||
(-> self control trans)
|
||||
(-> self control local-normal)
|
||||
(meters 2.0)
|
||||
(meters 2)
|
||||
(new 'static 'rgba :b #xff :a #x80)
|
||||
)
|
||||
(add-debug-vector
|
||||
@@ -1255,7 +1255,7 @@
|
||||
(bucket-id debug-no-zbuf)
|
||||
(-> self control trans)
|
||||
(-> self control dynam gravity-normal)
|
||||
(meters 3.0)
|
||||
(meters 3)
|
||||
(new 'static 'rgba :r #xff :b #xff :a #x80)
|
||||
)
|
||||
)
|
||||
@@ -1386,7 +1386,7 @@
|
||||
(bucket-id debug-no-zbuf)
|
||||
(-> (the-as swingpole s4-0) root trans)
|
||||
(the-as vector (&-> s4-0 stack 16))
|
||||
(meters 3.0)
|
||||
(meters 3)
|
||||
(new 'static 'rgba :r #xff :b #xff :a #x80)
|
||||
)
|
||||
(add-debug-sphere
|
||||
|
||||
+7
-7
@@ -426,13 +426,13 @@
|
||||
(271 joint "camera")
|
||||
(269 send-event self activate-particle 5)
|
||||
(272 send-event self flash)
|
||||
(272 eval (lambda :behavior sage-finalboss
|
||||
()
|
||||
(let ((a0-1 (get-task-control (game-task finalboss-movies))))
|
||||
(save-reminder a0-1 (logior (get-reminder a0-1 0) 1) 0)
|
||||
)
|
||||
(none)
|
||||
)
|
||||
(272 eval ,(lambda :behavior sage-finalboss
|
||||
()
|
||||
(let ((a0-1 (get-task-control (game-task finalboss-movies))))
|
||||
(save-reminder a0-1 (logior (get-reminder a0-1 0) 1) 0)
|
||||
)
|
||||
(none)
|
||||
)
|
||||
)
|
||||
(273 send-event self deactivate-particle 5)
|
||||
(333 joint "cameraB")
|
||||
|
||||
+1
-1
@@ -1335,7 +1335,7 @@
|
||||
)
|
||||
(!= (-> self control unknown-uint31) 1)
|
||||
)
|
||||
(target-shoved (meters 2.0) (-> *TARGET-bank* smack-surface-height) (the-as process #f) target-flut-hit)
|
||||
(target-shoved (meters 2) (-> *TARGET-bank* smack-surface-height) (the-as process #f) target-flut-hit)
|
||||
)
|
||||
(if (and (logtest? (-> self water flags) (water-flags wt09))
|
||||
(zero? (mod (- (-> *display* base-frame-counter) (-> self state-time)) 21))
|
||||
|
||||
+1
-1
@@ -750,7 +750,7 @@
|
||||
:trans (behavior ()
|
||||
(dummy-20 self)
|
||||
(when (not (movie?))
|
||||
(flying-lurker-calc-speed (meters 15.0) (meters 30.0) (meters 0.11666667) (meters 0.083333336))
|
||||
(flying-lurker-calc-speed (meters 15) (meters 30) (meters 0.11666667) (meters 0.083333336))
|
||||
(flying-lurker-move)
|
||||
(flying-lurker-rotate)
|
||||
(when (and (-> self alt-actor)
|
||||
|
||||
+2
-2
@@ -281,7 +281,7 @@
|
||||
(bucket-id debug-no-zbuf)
|
||||
(-> self control trans)
|
||||
s3-1
|
||||
(meters 2.0)
|
||||
(meters 2)
|
||||
(new 'static 'rgba :r #xff :g #xff :a #x80)
|
||||
)
|
||||
(vector-matrix*! s3-1 s3-1 (-> self control unknown-matrix00))
|
||||
@@ -294,7 +294,7 @@
|
||||
(bucket-id debug-no-zbuf)
|
||||
(-> self control trans)
|
||||
s4-2
|
||||
(meters 2.0)
|
||||
(meters 2)
|
||||
(new 'static 'rgba :r #xff :g #x80 :b #x40 :a #x80)
|
||||
)
|
||||
(vector-matrix*! s4-2 s4-2 (-> self control unknown-matrix00))
|
||||
|
||||
+1
-1
@@ -965,4 +965,4 @@
|
||||
:fo-curve ,fo-curve
|
||||
:mask (sound-mask ,@snd-mask)
|
||||
))
|
||||
)
|
||||
)
|
||||
|
||||
+1
-1
@@ -156,7 +156,7 @@
|
||||
;; definition (debug) for function joint-mod-debug-draw
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defun-debug joint-mod-debug-draw ((arg0 joint-mod))
|
||||
(add-debug-matrix #t (bucket-id debug-no-zbuf1) (-> arg0 joint bone transform) (meters 2.0))
|
||||
(add-debug-matrix #t (bucket-id debug-no-zbuf1) (-> arg0 joint bone transform) (meters 2))
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
+10
-22
@@ -655,13 +655,7 @@
|
||||
(format *stdcon* "~S ~f~%" (-> arg1 disp) (vector-length s5-0))
|
||||
(vector+! s5-0 s5-0 (-> arg1 origin))
|
||||
(camera-line (-> arg1 origin) s5-0 (-> arg1 color))
|
||||
(camera-cross
|
||||
(new 'static 'vector :y 1024.0)
|
||||
(new 'static 'vector :z 1024.0)
|
||||
s5-0
|
||||
(-> arg1 color)
|
||||
(meters 1.0)
|
||||
)
|
||||
(camera-cross (new 'static 'vector :y 1024.0) (new 'static 'vector :z 1024.0) s5-0 (-> arg1 color) (meters 1))
|
||||
)
|
||||
(none)
|
||||
)
|
||||
@@ -684,13 +678,7 @@
|
||||
(format *stdcon* "~S ~f~%" (-> arg1 disp) (vector-length s5-0))
|
||||
(vector+! s5-0 s5-0 (-> arg1 origin))
|
||||
(camera-line (-> arg1 origin) s5-0 (-> arg1 color))
|
||||
(camera-cross
|
||||
(new 'static 'vector :y 1024.0)
|
||||
(new 'static 'vector :z 1024.0)
|
||||
s5-0
|
||||
(-> arg1 color)
|
||||
(meters 1.0)
|
||||
)
|
||||
(camera-cross (new 'static 'vector :y 1024.0) (new 'static 'vector :z 1024.0) s5-0 (-> arg1 color) (meters 1))
|
||||
)
|
||||
(none)
|
||||
)
|
||||
@@ -721,7 +709,7 @@
|
||||
(new 'static 'vector :z 1024.0)
|
||||
s5-1
|
||||
(new 'static 'vector4w :x #x80 :w #x80)
|
||||
(meters 1.0)
|
||||
(meters 1)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -734,7 +722,7 @@
|
||||
(new 'static 'vector :z 1024.0)
|
||||
s5-2
|
||||
(new 'static 'vector4w :y #x80 :w #x80)
|
||||
(meters 1.0)
|
||||
(meters 1)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -749,7 +737,7 @@
|
||||
(new 'static 'vector :z 1024.0)
|
||||
s5-3
|
||||
(new 'static 'vector4w :x #x80 :z #x80 :w #x80)
|
||||
(meters 1.0)
|
||||
(meters 1)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -800,7 +788,7 @@
|
||||
(new 'static 'vector :z 1024.0)
|
||||
s5-4
|
||||
(new 'static 'vector4w :x #xff :y #xff :w #x80)
|
||||
(meters 1.0)
|
||||
(meters 1)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -843,7 +831,7 @@
|
||||
(new 'static 'vector :z 1024.0)
|
||||
s5-5
|
||||
(new 'static 'vector4w :z #xff :w #x80)
|
||||
(meters 1.0)
|
||||
(meters 1)
|
||||
)
|
||||
(curve-get-pos! s5-5 (cam-slave-get-float arg0 'intro-exitValue 0.0) s3-2)
|
||||
(vector+! s5-5 s5-5 s4-2)
|
||||
@@ -852,7 +840,7 @@
|
||||
(new 'static 'vector :z 1024.0)
|
||||
s5-5
|
||||
(new 'static 'vector4w :z #xff :w #x80)
|
||||
(meters 1.0)
|
||||
(meters 1)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -882,7 +870,7 @@
|
||||
(new 'static 'vector :z 1024.0)
|
||||
s5-6
|
||||
(new 'static 'vector4w :x #xff :y #xff :w #x80)
|
||||
(meters 1.0)
|
||||
(meters 1)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -908,7 +896,7 @@
|
||||
(new 'static 'vector :z 1024.0)
|
||||
s5-7
|
||||
(new 'static 'vector4w :y #xff :z #xff :w #x80)
|
||||
(meters 1.0)
|
||||
(meters 1)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
+5
-5
@@ -1283,11 +1283,11 @@
|
||||
bucket
|
||||
position
|
||||
(the-as vector (-> mat vector))
|
||||
(meters 2.0)
|
||||
(meters 2)
|
||||
(new 'static 'rgba :r #xff :a #x80)
|
||||
)
|
||||
(add-debug-vector enable bucket position (-> mat vector 1) (meters 2.0) (new 'static 'rgba :g #xff :a #x80))
|
||||
(add-debug-vector enable bucket position (-> mat vector 2) (meters 2.0) (new 'static 'rgba :b #xff :a #x80))
|
||||
(add-debug-vector enable bucket position (-> mat vector 1) (meters 2) (new 'static 'rgba :g #xff :a #x80))
|
||||
(add-debug-vector enable bucket position (-> mat vector 2) (meters 2) (new 'static 'rgba :b #xff :a #x80))
|
||||
mat
|
||||
)
|
||||
|
||||
@@ -1305,7 +1305,7 @@
|
||||
|
||||
;; definition (debug) for function add-debug-cspace
|
||||
(defun-debug add-debug-cspace ((enable symbol) (bucket bucket-id) (csp cspace))
|
||||
(add-debug-matrix enable bucket (-> csp bone transform) (meters 2.0))
|
||||
(add-debug-matrix enable bucket (-> csp bone transform) (meters 2))
|
||||
csp
|
||||
)
|
||||
|
||||
@@ -1636,7 +1636,7 @@
|
||||
bucket
|
||||
position
|
||||
(-> light direction)
|
||||
(meters 3.0)
|
||||
(meters 3)
|
||||
(new 'static 'rgba :r #xff :g #xff :b #xff :a #x80)
|
||||
)
|
||||
(let ((sphere-pos (new-stack-vector0)))
|
||||
|
||||
+1382
-1382
File diff suppressed because it is too large
Load Diff
+237
-203
@@ -1686,7 +1686,7 @@
|
||||
(when s4-0
|
||||
(let ((gp-1 (-> arg3 param 0)))
|
||||
(set! (-> *syntax-context* got-error?) #f)
|
||||
(eval! *syntax-context* gp-1)
|
||||
(eval! *syntax-context* (the-as pair gp-1))
|
||||
(when (not (-> *syntax-context* got-error?))
|
||||
(set! (-> s4-0 changed) #t)
|
||||
(cond
|
||||
@@ -2285,192 +2285,67 @@
|
||||
)
|
||||
|
||||
;; definition for function dm-editable-light-float-func
|
||||
;; ERROR: failed type prop at 36: add failed: editable uint
|
||||
|
||||
;; WARN: Return type mismatch symbol vs object.
|
||||
(defun dm-editable-light-float-func ((a0-0 object) (a1-0 debug-menu-msg) (a2-0 float) (a3-0 symbol))
|
||||
(local-vars
|
||||
(v0-0 symbol)
|
||||
(v0-1 symbol)
|
||||
(v0-2 none)
|
||||
(v0-3 none)
|
||||
(v1-0 (pointer editable-player))
|
||||
(v1-1 int)
|
||||
(v1-2 (pointer editable-player))
|
||||
(v1-3 editable-player)
|
||||
(v1-4 editable-array)
|
||||
(v1-5 int)
|
||||
(v1-6 int)
|
||||
(v1-7 symbol)
|
||||
(v1-8 symbol)
|
||||
(v1-11 uint)
|
||||
(v1-12 none)
|
||||
(v1-13 none)
|
||||
(v1-14 none)
|
||||
(v1-15 none)
|
||||
(v1-17 none)
|
||||
(v1-18 none)
|
||||
(v1-19 none)
|
||||
(v1-21 none)
|
||||
(v1-22 none)
|
||||
(v1-23 none)
|
||||
(v1-24 none)
|
||||
(v1-25 none)
|
||||
(v1-26 none)
|
||||
(v1-27 none)
|
||||
(v1-29 none)
|
||||
(v1-30 none)
|
||||
(v1-31 none)
|
||||
(v1-32 none)
|
||||
(v1-33 none)
|
||||
(a0-1 (pointer editable-player))
|
||||
(a0-2 editable-player)
|
||||
(a0-3 editable-array)
|
||||
(a0-4 editable-flag)
|
||||
(a0-5 editable-flag)
|
||||
(a0-6 editable)
|
||||
(a0-7 editable)
|
||||
(a0-8 none)
|
||||
(a0-9 none)
|
||||
(a0-10 none)
|
||||
(a0-11 none)
|
||||
(a0-12 none)
|
||||
(a0-13 none)
|
||||
(a0-14 none)
|
||||
(a0-15 none)
|
||||
(a0-18 none)
|
||||
(a0-20 none)
|
||||
(a0-21 none)
|
||||
(a0-22 none)
|
||||
(a1-1 type)
|
||||
(a1-3 none)
|
||||
(a1-4 none)
|
||||
(s2-0 editable)
|
||||
(s3-0 int)
|
||||
(s3-1 none)
|
||||
(s4-0 int)
|
||||
(s4-1 none)
|
||||
(s5-1 none)
|
||||
(t9-0 (function object type symbol))
|
||||
(t9-1 none)
|
||||
(t9-2 none)
|
||||
(f0-0 float)
|
||||
(f30-0 none)
|
||||
)
|
||||
(defun dm-editable-light-float-func ((arg0 int) (arg1 debug-menu-msg) (arg2 float) (arg3 float))
|
||||
(cond
|
||||
((begin (set! v1-0 *editable*) (not v1-0))
|
||||
(set! v0-0 a3-0)
|
||||
((not *editable*)
|
||||
arg3
|
||||
)
|
||||
((begin (set! v1-1 4) (= a1-0 v1-1))
|
||||
(set! v1-2 *editable*)
|
||||
(set! v1-3 (-> v1-2 0))
|
||||
(set! v1-4 (-> v1-3 current))
|
||||
(set! s4-0 (-> v1-4 length))
|
||||
(set! s3-0 0)
|
||||
(set! v1-5 (sll s3-0 2))
|
||||
(set! a0-1 *editable*)
|
||||
(set! a0-2 (-> a0-1 0))
|
||||
(set! a0-3 (-> a0-2 current))
|
||||
(set! v1-6 (+ v1-5 a0-3))
|
||||
(set! s2-0 (dynamic-array-field-access v1-6 data PLACEHOLDER))
|
||||
(while (<.si s3-0 s4-0)
|
||||
(when (begin
|
||||
(and s2-0
|
||||
(begin (set! v1-8 #t) (set! a0-4 (-> s2-0 flags)) (set! a0-5 (logand a0-4 1)) (cmove-#f-zero v1-7 a0-5 v1-8))
|
||||
)
|
||||
v1-7
|
||||
)
|
||||
(when (begin
|
||||
(if (begin (set! t9-0 type?) (set! a0-6 s2-0) (set! a1-1 editable-light) (set! v0-1 (call! a0-6 a1-1)) v0-1)
|
||||
(set! a0-7 s2-0)
|
||||
)
|
||||
a0-7
|
||||
((= arg1 (debug-menu-msg press))
|
||||
(let* ((s4-0 (-> *editable* 0 current length))
|
||||
(s3-0 0)
|
||||
(s2-0 (-> *editable* 0 current data s3-0))
|
||||
)
|
||||
(while (< s3-0 s4-0)
|
||||
(when (and s2-0 (logtest? (-> s2-0 flags) (editable-flag selected)))
|
||||
(let ((a0-7 (if (type? s2-0 editable-light)
|
||||
s2-0
|
||||
)
|
||||
)
|
||||
)
|
||||
(when (begin
|
||||
(set! f0-0 (gpr->fpr a2-0))
|
||||
(set! v1-11 (sra a0-0 3))
|
||||
(set! v1-12 (the-as none (+ a0-7 v1-11)))
|
||||
(s.f! v1-12 f0-0)
|
||||
(set! v1-13 (the-as none (-> a0-7 flags)))
|
||||
(set! v1-14 (the-as none (logior v1-13 2048)))
|
||||
(set! (-> a0-7 flags) (the-as editable-flag v1-14))
|
||||
(set! v1-15 (the-as none (-> a0-7 region)))
|
||||
v1-15
|
||||
)
|
||||
(set! a1-3 (the-as none #t))
|
||||
(s.w! v1-15 a1-3)
|
||||
(when (the-as editable a0-7)
|
||||
(set! (-> (&+ (the-as (pointer float) a0-7) (/ arg0 8)) 0) arg2)
|
||||
(logior! (-> (the-as editable a0-7) flags) (editable-flag changed))
|
||||
(let ((v1-15 (-> (the-as editable a0-7) region)))
|
||||
(if v1-15
|
||||
(set! (-> v1-15 changed) #t)
|
||||
)
|
||||
)
|
||||
(update-light-sphere-from-editable-light (the-as editable-light a0-7))
|
||||
)
|
||||
)
|
||||
(set! t9-1 (the-as none update-light-sphere-from-editable-light))
|
||||
(call!)
|
||||
(set! v1-16 (the-as none v0-2))
|
||||
)
|
||||
(+! s3-0 1)
|
||||
(set! s2-0 (-> *editable* 0 current data s3-0))
|
||||
)
|
||||
(set! s3-0 (the-as int (+ s3-0 1)))
|
||||
(set! v1-17 (the-as none (sll s3-0 2)))
|
||||
(set! a0-8 (the-as none *editable*))
|
||||
(set! a0-9 (the-as none (l.wu a0-8)))
|
||||
(set! a0-10 (the-as none (l.wu (+ a0-9 196))))
|
||||
(set! v1-18 (the-as none (+ v1-17 a0-10)))
|
||||
(set! v1-19 (the-as none (l.wu (+ v1-18 120))))
|
||||
(set! s2-0 (the-as editable v1-19))
|
||||
)
|
||||
(set! v0-0 #f)
|
||||
(the-as float #f)
|
||||
)
|
||||
(else
|
||||
(set! f30-0 (the-as none (gpr->fpr a3-0)))
|
||||
(set! v1-21 (the-as none *editable*))
|
||||
(set! v1-22 (the-as none (l.wu v1-21)))
|
||||
(set! v1-23 (the-as none (l.wu (+ v1-22 196))))
|
||||
(set! s5-1 (the-as none (l.w (+ v1-23 4))))
|
||||
(set! s4-1 (the-as none 0))
|
||||
(set! v1-24 (the-as none (sll s4-1 2)))
|
||||
(set! a0-11 (the-as none *editable*))
|
||||
(set! a0-12 (the-as none (l.wu a0-11)))
|
||||
(set! a0-13 (the-as none (l.wu (+ a0-12 196))))
|
||||
(set! v1-25 (the-as none (+ v1-24 a0-13)))
|
||||
(set! s3-1 (the-as none (l.wu (+ v1-25 120))))
|
||||
(while (<.si s4-1 s5-1)
|
||||
(when (begin
|
||||
(and s3-1 (begin
|
||||
(set! v1-27 (the-as none #t))
|
||||
(set! a0-14 (the-as none (l.wu s3-1)))
|
||||
(set! a0-15 (the-as none (logand a0-14 1)))
|
||||
(cmove-#f-zero v1-26 a0-15 v1-27)
|
||||
)
|
||||
)
|
||||
v1-26
|
||||
(let ((f30-0 arg3))
|
||||
(let* ((s5-1 (-> *editable* 0 current length))
|
||||
(s4-1 0)
|
||||
(s3-1 (-> *editable* 0 current data s4-1))
|
||||
)
|
||||
(while (< s4-1 s5-1)
|
||||
(when (and s3-1 (logtest? (-> s3-1 flags) (editable-flag selected)))
|
||||
(let ((v1-29 (if (type? s3-1 editable-light)
|
||||
s3-1
|
||||
)
|
||||
)
|
||||
)
|
||||
(if (the-as editable v1-29)
|
||||
(set! f30-0 (-> (&+ (the-as (pointer float) v1-29) (/ arg0 8)) 0))
|
||||
)
|
||||
)
|
||||
(when (begin
|
||||
(if (begin
|
||||
(set! t9-2 (the-as none type?))
|
||||
(set! a0-16 (the-as none s3-1))
|
||||
(set! a1-4 (the-as none editable-light))
|
||||
(set! v0-3 (the-as none (call!)))
|
||||
v0-3
|
||||
)
|
||||
(set! v1-29 (the-as none s3-1))
|
||||
)
|
||||
v1-29
|
||||
)
|
||||
(set! a0-18 (the-as none (sra a0-0 3)))
|
||||
(set! v1-30 (the-as none (+ v1-29 a0-18)))
|
||||
(set! f30-0 (the-as none (l.f v1-30)))
|
||||
(set! a0-19 (the-as none (fpr->gpr f30-0)))
|
||||
)
|
||||
(+! s4-1 1)
|
||||
(set! s3-1 (-> *editable* 0 current data s4-1))
|
||||
)
|
||||
)
|
||||
(set! s4-1 (the-as none (+ s4-1 1)))
|
||||
(set! v1-31 (the-as none (sll s4-1 2)))
|
||||
(set! a0-20 (the-as none *editable*))
|
||||
(set! a0-21 (the-as none (l.wu a0-20)))
|
||||
(set! a0-22 (the-as none (l.wu (+ a0-21 196))))
|
||||
(set! v1-32 (the-as none (+ v1-31 a0-22)))
|
||||
(set! v1-33 (the-as none (l.wu (+ v1-32 120))))
|
||||
(set! s3-1 (the-as none v1-33))
|
||||
f30-0
|
||||
)
|
||||
(set! v0-0 (the-as symbol (fpr->gpr f30-0)))
|
||||
)
|
||||
)
|
||||
(ret-value v0-0)
|
||||
)
|
||||
|
||||
;; definition for function dm-cam-externalize2
|
||||
@@ -2503,44 +2378,203 @@
|
||||
)
|
||||
|
||||
;; definition for function dm-editable-boolean-toggle-pick-func
|
||||
;; ERROR: failed type prop at 5: add failed: editable-player int
|
||||
|
||||
(defun dm-editable-boolean-toggle-pick-func ((a0-0 int) (a1-0 debug-menu-msg))
|
||||
(local-vars
|
||||
(v0-0 none)
|
||||
(v1-0 (pointer editable-player))
|
||||
(v1-1 (pointer editable-player))
|
||||
(v1-2 editable-player)
|
||||
(v1-3 none)
|
||||
(a0-1 int)
|
||||
(a0-2 none)
|
||||
(a0-4 none)
|
||||
(a0-5 none)
|
||||
)
|
||||
(defun dm-editable-boolean-toggle-pick-func ((arg0 int) (arg1 debug-menu-msg))
|
||||
(cond
|
||||
((begin (set! v1-0 *editable*) v1-0)
|
||||
(when (begin
|
||||
(set! v1-1 *editable*)
|
||||
(set! v1-2 (-> v1-1 0))
|
||||
(set! a0-1 (sra a0-0 3))
|
||||
(set! v1-3 (the-as none (+ v1-2 a0-1)))
|
||||
(set! a0-2 (the-as none 4))
|
||||
(= a1-0 a0-2)
|
||||
)
|
||||
(set! a0-4 (the-as none (l.wu v1-3)))
|
||||
(set! a0-5 (the-as none (not a0-4)))
|
||||
(s.w! v1-3 a0-5)
|
||||
)
|
||||
(set! v0-0 (the-as none (l.wu v1-3)))
|
||||
)
|
||||
(*editable*
|
||||
(let ((v1-3 (&+ (the-as (pointer symbol) (-> *editable* 0)) (/ arg0 8))))
|
||||
(if (= arg1 (debug-menu-msg press))
|
||||
(set! (-> v1-3 0) (not (-> v1-3 0)))
|
||||
)
|
||||
(-> v1-3 0)
|
||||
)
|
||||
)
|
||||
(else
|
||||
#f
|
||||
)
|
||||
)
|
||||
(ret-none)
|
||||
)
|
||||
|
||||
;; definition for function editable-menu-context-make-menus
|
||||
;; ERROR: function was not converted to expressions. Cannot decompile.
|
||||
(defun editable-menu-context-make-menus ((arg0 debug-menu-context))
|
||||
(debug-menu-make-from-template
|
||||
arg0
|
||||
'(main-menu
|
||||
"Editable"
|
||||
(flag "Cam 1" pad-1 dm-cam-externalize2)
|
||||
(flag "Left Handed" 212 dm-editable-boolean-toggle-pick-func)
|
||||
(menu
|
||||
"Insert"
|
||||
(function "Sphere" 27 editable-menu-command)
|
||||
(function "Point" 28 editable-menu-command)
|
||||
(function "Sample" 29 editable-menu-command)
|
||||
(function "Light" 31 editable-menu-command)
|
||||
(function "Entity" 32 editable-menu-command)
|
||||
(function "Face" 33 editable-menu-command)
|
||||
(function "Plane" 34 editable-menu-command)
|
||||
(function "Box" 35 editable-menu-command)
|
||||
(function "Edit-Plane Set" 45 editable-menu-command)
|
||||
(function "Edit-Plane Clear" 46 editable-menu-command)
|
||||
)
|
||||
(menu
|
||||
"Select"
|
||||
(function "None" 6 editable-menu-command)
|
||||
(function "All" 5 editable-menu-command)
|
||||
(function "Owner" 10 editable-menu-command)
|
||||
(function "Current Region" 11 editable-menu-command)
|
||||
(function "Current Face" 12 editable-menu-command)
|
||||
(function "Current Prim" 13 editable-menu-command)
|
||||
)
|
||||
(menu
|
||||
"Selection"
|
||||
(function "Copy" 37 editable-menu-command)
|
||||
(function "Delete" 36 editable-menu-command)
|
||||
(function "Flip Side" 42 editable-menu-command)
|
||||
(function "Snap to Ground" 39 editable-menu-command)
|
||||
(function "Snap XZ" 40 editable-menu-command)
|
||||
(function "Snap Y" 41 editable-menu-command)
|
||||
(function "Resize to Param" 38 editable-menu-command)
|
||||
(function "Set to current Region" 43 editable-menu-command)
|
||||
(function "Set to new Region" 44 editable-menu-command)
|
||||
(flag "No Save" 2 dm-editable-flag-pick-func)
|
||||
(flag "Top Set" 512 dm-editable-flag-pick-func)
|
||||
(flag "Bot Set" 1024 dm-editable-flag-pick-func)
|
||||
)
|
||||
(menu
|
||||
"Region"
|
||||
(function "Print Info" 53 editable-menu-command)
|
||||
(function "Copy" 48 editable-menu-command)
|
||||
(function "Delete" 47 editable-menu-command)
|
||||
(function "Add to current Region" 49 editable-menu-command)
|
||||
(flag
|
||||
"Region Lock"
|
||||
#f
|
||||
,(lambda ((arg0 int) (arg1 float) (arg2 float))
|
||||
(if (= arg1 4)
|
||||
(set! (-> *editable* 0 current region-lock?) (not (-> *editable* 0 current region-lock?)))
|
||||
)
|
||||
(-> *editable* 0 current region-lock?)
|
||||
)
|
||||
)
|
||||
(flag "Camera" camera dm-region-tree-pick-func)
|
||||
(flag "Target" target dm-region-tree-pick-func)
|
||||
(flag "Water" water dm-region-tree-pick-func)
|
||||
(flag "Data" data dm-region-tree-pick-func)
|
||||
(flag "City Vis" city_vis dm-region-tree-pick-func)
|
||||
)
|
||||
(menu
|
||||
"Filter"
|
||||
(flag "None" 1 dm-editable-filter0-pick-func)
|
||||
(flag "Unknown" 2 dm-editable-filter0-pick-func)
|
||||
(flag "Sound" 4 dm-editable-filter0-pick-func)
|
||||
(flag "Part" 8 dm-editable-filter0-pick-func)
|
||||
(flag "Load" 64 dm-editable-filter0-pick-func)
|
||||
(flag "User Setting" 16 dm-editable-filter0-pick-func)
|
||||
(flag "Cam Setting" 32 dm-editable-filter0-pick-func)
|
||||
(flag "Camera" 256 dm-editable-filter1-pick-func)
|
||||
(flag "Target" 512 dm-editable-filter1-pick-func)
|
||||
(flag "Water" 1024 dm-editable-filter1-pick-func)
|
||||
(flag "Data" 2048 dm-editable-filter1-pick-func)
|
||||
(flag "Sample" 8192 dm-editable-filter1-pick-func)
|
||||
(flag "Light" 16384 dm-editable-filter1-pick-func)
|
||||
(flag "Entity" 32768 dm-editable-filter1-pick-func)
|
||||
(flag "City Vis" 4096 dm-editable-filter1-pick-func)
|
||||
)
|
||||
(menu
|
||||
"Light"
|
||||
(flag "Show Light Names" 216 dm-editable-boolean-toggle-pick-func)
|
||||
(float-var
|
||||
"Red"
|
||||
60
|
||||
dm-editable-light-float-func
|
||||
2
|
||||
(new 'static 'bfloat :data 0.00390625)
|
||||
#t
|
||||
0
|
||||
(new 'static 'bfloat :data 1.9921875)
|
||||
0
|
||||
)
|
||||
(float-var
|
||||
"Green"
|
||||
64
|
||||
dm-editable-light-float-func
|
||||
2
|
||||
(new 'static 'bfloat :data 0.00390625)
|
||||
#t
|
||||
0
|
||||
(new 'static 'bfloat :data 1.9921875)
|
||||
0
|
||||
)
|
||||
(float-var
|
||||
"Blue"
|
||||
68
|
||||
dm-editable-light-float-func
|
||||
2
|
||||
(new 'static 'bfloat :data 0.00390625)
|
||||
#t
|
||||
0
|
||||
(new 'static 'bfloat :data 1.9921875)
|
||||
0
|
||||
)
|
||||
(float-var
|
||||
"Palette Index"
|
||||
72
|
||||
dm-editable-light-float-func
|
||||
2
|
||||
(new 'static 'bfloat :data 1.0)
|
||||
#t
|
||||
(new 'static 'bfloat :data -1.0)
|
||||
(new 'static 'bfloat :data 7.0)
|
||||
0
|
||||
)
|
||||
(float-var "Decay Start" 76 dm-editable-light-float-func 2 (new 'static 'bfloat :data 0.00390625) #t 0 1 0)
|
||||
(float-var
|
||||
"Ambient Point Ratio"
|
||||
80
|
||||
dm-editable-light-float-func
|
||||
2
|
||||
(new 'static 'bfloat :data 0.00390625)
|
||||
#t
|
||||
0
|
||||
1
|
||||
0
|
||||
)
|
||||
(float-var "Brightness" 84 dm-editable-light-float-func 2 (new 'static 'bfloat :data 0.00390625) #t 0 1 0)
|
||||
)
|
||||
(float-var
|
||||
"Param"
|
||||
#f
|
||||
,(lambda ((arg0 int) (arg1 float) (arg2 float)) (cond
|
||||
((= arg1 4)
|
||||
(if (and *editable* (nonzero? *editable*))
|
||||
(set! (-> *editable* 0 current edit-param0) arg2)
|
||||
)
|
||||
)
|
||||
((or (not *editable*) (zero? *editable*))
|
||||
0.0
|
||||
)
|
||||
(else
|
||||
(-> *editable* 0 current edit-param0)
|
||||
)
|
||||
)
|
||||
)
|
||||
3
|
||||
(new 'static 'bfloat :data 0.5)
|
||||
#t
|
||||
0
|
||||
500
|
||||
1
|
||||
)
|
||||
(function "Rotate Level" 55 editable-menu-command)
|
||||
(function "Trans Y Level" 56 editable-menu-command)
|
||||
(function "Revert" 51 editable-menu-command)
|
||||
(function "Save" 50 editable-menu-command-no-close)
|
||||
(function "Update Game" 52 editable-menu-command-no-close)
|
||||
(function "Cancel" 17 editable-menu-command)
|
||||
(function "Exit" 1 editable-menu-command)
|
||||
)
|
||||
)
|
||||
arg0
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(editable-menu-context-make-menus *editable-menu-context*)
|
||||
|
||||
+1
-1
@@ -1390,7 +1390,7 @@
|
||||
(bucket-id debug-no-zbuf1)
|
||||
(edit-get-trans obj)
|
||||
s1-0
|
||||
(meters 2.0)
|
||||
(meters 2)
|
||||
(the-as rgba (-> (new 'static 'array uint64 1 #x8000ffff) 0))
|
||||
)
|
||||
)
|
||||
|
||||
+1
-4
@@ -713,7 +713,7 @@
|
||||
(bucket-id debug-no-zbuf1)
|
||||
(-> s5-0 origin)
|
||||
(-> s5-0 vector)
|
||||
(meters 1.0)
|
||||
(meters 1)
|
||||
(the-as rgba (logior t1-7 (shl v1-8 24)))
|
||||
)
|
||||
)
|
||||
@@ -751,6 +751,3 @@
|
||||
0
|
||||
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
+2
-2
@@ -173,7 +173,7 @@
|
||||
(set! s4-0 (entity-actor-lookup s4-0 'prev-actor 0))
|
||||
)
|
||||
(while s4-0
|
||||
(if (arg0 (the-as entity-actor s4-0) arg1)
|
||||
(if (arg0 s4-0 arg1)
|
||||
(return (the-as int #f))
|
||||
)
|
||||
(let ((a0-4 s4-0))
|
||||
@@ -300,7 +300,7 @@
|
||||
|
||||
;; definition for method 9 of type actor-link-info
|
||||
(defmethod get-matching-actor-type-mask actor-link-info ((obj actor-link-info) (arg0 type))
|
||||
(let ((s3-0 (the-as entity-actor (-> obj process entity)))
|
||||
(let ((s3-0 (-> obj process entity))
|
||||
(s5-0 0)
|
||||
)
|
||||
(let ((s4-0 1))
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user