Merge branch 'master' of github.com:water111/jak-project into w/jak3-decomp15

This commit is contained in:
water
2024-03-23 09:28:12 -04:00
121 changed files with 61349 additions and 1032 deletions
+1 -1
View File
@@ -3447,7 +3447,7 @@ goos::Object DefpartElement::to_form_internal(const Env& env) const {
break;
}
item_forms.push_back(decompile_sparticle_field_init(e.data, e.field_id, e.flags, e.sound_spec,
e.userdata, env.dts->ts, env.version));
e.userdata, env.dts->ts, env.version, env));
}
if (!item_forms.empty()) {
forms.push_back(pretty_print::to_symbol(":init-specs"));
+30
View File
@@ -3300,6 +3300,36 @@ void FunctionCallElement::update_from_stack(const Env& env,
return;
}
// tpage and texture macros
{
auto func = Matcher::symbol("lookup-texture-by-id");
auto func_fast = Matcher::symbol("lookup-texture-by-id-fast");
auto mr = match(func, unstacked.at(0));
auto mr_fast = match(func_fast, unstacked.at(0));
if (mr.matched || mr_fast.matched) {
auto tex_id = Matcher::any_integer(0);
auto mr2 = match(tex_id, unstacked.at(1));
if (mr2.matched) {
auto id = mr2.maps.ints.at(0);
u16 tpage = (id & 0xfff00000) >> 20;
u16 idx = (id & 0x000fff00) >> 8;
auto fixed_id = tpage << 16 | idx;
if (!env.dts->textures.empty() &&
env.dts->textures.find(fixed_id) != env.dts->textures.end()) {
std::vector<Form*> macro_args;
auto tex = env.dts->textures.at(fixed_id);
macro_args.push_back(pool.form<ConstantTokenElement>(tex.name));
macro_args.push_back(pool.form<ConstantTokenElement>(tex.tpage_name));
auto macro = pool.alloc_element<GenericElement>(
GenericOperator::make_function(pool.form<ConstantTokenElement>("get-texture")),
macro_args);
result->push_back(macro);
return;
}
}
}
}
{
// deal with virtual method calls.
auto matcher = Matcher::op(GenericOpMatcher::fixed(FixedOperatorKind::METHOD_OF_OBJECT),
+29 -1
View File
@@ -717,7 +717,8 @@ void ObjectFileDB::find_and_write_scripts(const fs::path& output_dir) {
std::string ObjectFileDB::process_tpages(TextureDB& tex_db,
const fs::path& output_path,
const Config& cfg) {
const Config& cfg,
const fs::path& dump_out) {
lg::info("- Finding textures in tpages...");
std::string tpage_string = "tpage-";
int total = 0, success = 0;
@@ -766,6 +767,27 @@ std::string ObjectFileDB::process_tpages(TextureDB& tex_db,
lg::warn("Did not find tpage-dir.");
return {};
}
if (cfg.write_tpage_imports) {
file_util::create_dir_if_needed(dump_out);
std::string tpage_dump;
std::string tex_dump;
for (auto& tpage : tex_db.tpage_names) {
tpage_dump += print_tpage_for_dump(tpage.second, tpage.first);
}
for (auto& tex : tex_db.textures) {
auto tpage_name = tex_db.tpage_names[tex.second.page];
dts.textures.emplace(tex.first, TexInfo{tex.second.name, tpage_name, tex.first & 0x0000ffff});
tex_dump += print_tex_for_dump(tex.second.name, tpage_name, tex.first & 0x0000ffff);
}
auto tpage_dump_out = dump_out / "tpages.gc";
auto tex_dump_out = dump_out / "textures.gc";
file_util::write_text_file(tpage_dump_out, tpage_dump);
file_util::write_text_file(tex_dump_out, tex_dump);
}
return result;
}
@@ -1107,4 +1129,10 @@ std::string print_art_elt_for_dump(const std::string& group_name,
std::string print_jg_for_dump(const std::string& jg_name, const std::string& joint_name, int idx) {
return fmt::format("(def-joint-node {} \"{}\" {})\n", jg_name, joint_name, idx);
}
std::string print_tpage_for_dump(const std::string& debug_name, u32 id) {
return fmt::format("(defconstant {} {})\n", debug_name, id);
}
std::string print_tex_for_dump(const std::string& name, const std::string& page_name, u32 idx) {
return fmt::format("(def-tex {} {} {})\n", name, page_name, idx);
}
} // namespace decompiler
+6 -1
View File
@@ -254,7 +254,10 @@ class ObjectFileDB {
const std::vector<std::string>& imports,
const std::unordered_set<std::string>& skip_functions);
std::string process_tpages(TextureDB& tex_db, const fs::path& output_path, const Config& cfg);
std::string process_tpages(TextureDB& tex_db,
const fs::path& output_path,
const Config& cfg,
const fs::path& dump_out);
std::string process_game_count_file();
std::string process_game_text_files(const Config& cfg);
std::string process_all_spool_subtitles(const Config& cfg, const fs::path& image_out);
@@ -397,4 +400,6 @@ class ObjectFileDB {
std::string print_art_elt_for_dump(const std::string& group_name, const std::string& name, int idx);
std::string print_jg_for_dump(const std::string& jg_name, const std::string& joint_name, int idx);
std::string print_tpage_for_dump(const std::string& debug_name, u32 id);
std::string print_tex_for_dump(const std::string& name, const std::string& page_name, u32 idx);
} // namespace decompiler
+23 -1
View File
@@ -7,10 +7,23 @@
#include "decompiler/util/config_parsers.h"
#include "fmt/core.h"
#include "third-party/json.hpp"
namespace decompiler {
void from_json(const nlohmann::json& j, TexInfo& info) {
j.at("name").get_to(info.name);
j.at("tpage_name").get_to(info.tpage_name);
j.at("idx").get_to(info.idx);
}
void to_json(nlohmann::json& j, const TexInfo& info) {
j = {
{"name", info.name},
{"tpage_name", info.tpage_name},
{"idx", info.idx},
};
}
namespace {
/*!
* Read an entry from cfg containing the name of a json file, and parse that file.
@@ -64,6 +77,13 @@ Config make_config_via_json(nlohmann::json& json) {
config.jg_info_dump = serialized;
}
if (json.contains("tex_dump_file")) {
auto json_data = file_util::read_text_file(
file_util::get_file_path({json.at("tex_dump_file").get<std::string>()}));
std::unordered_map<u32, TexInfo> serialized = parse_commented_json(json_data, "tex_dump_file");
config.texture_info_dump = serialized;
}
if (json.contains("obj_file_name_map_file")) {
config.obj_file_name_map_file = json.at("obj_file_name_map_file").get<std::string>();
}
@@ -73,6 +93,7 @@ Config make_config_via_json(nlohmann::json& json) {
config.write_scripts = json.at("write_scripts").get<bool>();
config.disassemble_data = json.at("disassemble_data").get<bool>();
config.process_tpages = json.at("process_tpages").get<bool>();
config.write_tpage_imports = json.at("write_tpage_imports").get<bool>();
config.process_game_text = json.at("process_game_text").get<bool>();
config.process_game_count = json.at("process_game_count").get<bool>();
config.process_art_groups = json.at("process_art_groups").get<bool>();
@@ -84,6 +105,7 @@ Config make_config_via_json(nlohmann::json& json) {
}
config.dump_art_group_info = json.at("dump_art_group_info").get<bool>();
config.dump_joint_geo_info = json.at("dump_joint_geo_info").get<bool>();
config.dump_tex_info = json.at("dump_tex_info").get<bool>();
config.hexdump_code = json.at("hexdump_code").get<bool>();
config.hexdump_data = json.at("hexdump_data").get<bool>();
config.find_functions = json.at("find_functions").get<bool>();
+9
View File
@@ -11,8 +11,11 @@
#include "common/versions/versions.h"
#include "decompiler/Disasm/Register.h"
#include "decompiler/data/TextureDB.h"
#include "decompiler/data/game_text.h"
#include "third-party/json.hpp"
namespace decompiler {
struct RegisterTypeCast {
int atomic_op_idx = -1;
@@ -110,6 +113,7 @@ struct Config {
bool write_scripts = false;
bool disassemble_data = false;
bool process_tpages = false;
bool write_tpage_imports = false;
bool process_game_text = false;
bool process_game_count = false;
bool process_art_groups = false;
@@ -117,6 +121,7 @@ struct Config {
bool process_subtitle_images = false;
bool dump_art_group_info = false;
bool dump_joint_geo_info = false;
bool dump_tex_info = false;
bool rip_levels = false;
bool extract_collision = false;
bool find_functions = false;
@@ -176,6 +181,7 @@ struct Config {
art_group_file_override;
std::unordered_map<std::string, std::unordered_map<int, std::string>> art_group_info_dump;
std::unordered_map<std::string, std::unordered_map<int, std::string>> jg_info_dump;
std::unordered_map<u32, TexInfo> texture_info_dump;
std::unordered_map<std::string, std::string> joint_node_hacks;
std::unordered_map<std::string, int> process_stack_size_overrides;
@@ -188,4 +194,7 @@ Config read_config_file(const fs::path& path_to_config_file,
const std::string& config_game_version,
const std::string& override_json = "{}");
void from_json(const nlohmann::json& j, TexInfo& info);
void to_json(nlohmann::json& j, const TexInfo& info);
} // namespace decompiler
+5
View File
@@ -34,6 +34,8 @@
// unpack textures to assets folder
"process_tpages": true,
// write goal imports for tpages and textures
"write_tpage_imports": false,
// unpack game text to assets folder
"process_game_text": true,
// unpack game count to assets folder
@@ -44,6 +46,8 @@
"dump_art_group_info": false,
// write out a json file containing the joint node mapping, run this with all objects allowed
"dump_joint_geo_info": false,
// write out a json file containing tpage and texture mappings, run with all objects allowed
"dump_tex_info": false,
///////////////////////////
// WEIRD OPTIONS
@@ -91,6 +95,7 @@
"all_types_file": "decompiler/config/jak1/all-types.gc",
"art_group_dump_file": "decompiler/config/jak1/ntsc_v1/art-group-info.min.json",
"joint_node_dump_file": "decompiler/config/jak1/ntsc_v1/joint-node-info.min.json",
"tex_dump_file": "decompiler/config/jak1/ntsc_v1/tex-info.min.json",
"process_stack_size_file": "decompiler/config/jak1/ntsc_v1/process_stack_size_overrides.jsonc",
// optional: a predetermined object file name map from a file.
@@ -0,0 +1 @@
[]
+5
View File
@@ -34,6 +34,8 @@
// unpack textures to assets folder
"process_tpages": true,
// write goal imports for tpages and textures
"write_tpage_imports": false,
// unpack game text to assets folder
"process_game_text": true,
// unpack game count to assets folder
@@ -44,6 +46,8 @@
"dump_art_group_info": false,
// write out a json file containing the joint node mapping, run this with all objects allowed
"dump_joint_geo_info": false,
// write out a json file containing tpage and texture mappings, run with all objects allowed
"dump_tex_info": false,
// set to false to skip adding .STR files to the decompiler database
"read_spools": false,
@@ -101,6 +105,7 @@
"all_types_file": "decompiler/config/jak2/all-types.gc",
"art_group_dump_file": "decompiler/config/jak2/ntsc_v1/art-group-info.min.json",
"joint_node_dump_file": "decompiler/config/jak2/ntsc_v1/joint-node-info.min.json",
"tex_dump_file": "decompiler/config/jak2/ntsc_v1/tex-info.min.json",
"process_stack_size_file": "decompiler/config/jak2/ntsc_v1/process_stack_size_overrides.jsonc",
// optional: a predetermined object file name map from a file.
@@ -0,0 +1 @@
[]
File diff suppressed because it is too large Load Diff
+5
View File
@@ -34,6 +34,8 @@
// unpack textures to assets folder
"process_tpages": true,
// write goal imports for tpages and textures
"write_tpage_imports": false,
// unpack game text to assets folder
"process_game_text": true,
// unpack game count to assets folder
@@ -44,6 +46,8 @@
"dump_art_group_info": false,
// write out a json file containing the joint node mapping, run this with all objects allowed
"dump_joint_geo_info": false,
// write out a json file containing tpage and texture mappings, run with all objects allowed
"dump_tex_info": false,
// set to false to skip adding .STR files to the decompiler database
"read_spools": true,
@@ -100,6 +104,7 @@
"all_types_file": "decompiler/config/jak3/all-types.gc",
"art_group_dump_file": "decompiler/config/jak3/ntsc_v1/art-group-info.min.json",
"joint_node_dump_file": "decompiler/config/jak3/ntsc_v1/joint-node-info.min.json",
"tex_dump_file": "decompiler/config/jak3/ntsc_v1/tex-info.min.json",
"process_stack_size_file": "decompiler/config/jak3/ntsc_v1/process_stack_size_overrides.jsonc",
// optional: a predetermined object file name map from a file.
@@ -124,5 +124,6 @@
[77, "(function part-tracker vector)"],
[78, "(function part-tracker vector)"]
],
"trajectory": [[15, "(function trajectory none)"]]
"trajectory": [[15, "(function trajectory none)"]],
"progress": [[3, "(function int none :behavior process)"]]
}
+25 -2
View File
@@ -250,7 +250,9 @@
"~33L~C~34L~S~33L~C": 3,
"~35L~S ~33L~S~1L": 2,
"~33L~S ~35L~S~1L": 2,
"~33L~C": 1
"~33L~C": 1,
"~33L~S~44L ~S": 2,
"~44L~S ~33L~S": 2
},
"blocks_ending_in_asm_branch": {
@@ -320,6 +322,7 @@
"set-background-regs!": [4, 3],
"draw-drawable-tree-instance-shrub": [5, 7, 9, 11],
"draw-drawable-tree-instance-tie": [21, 23, 31, 33],
"(method 12 flow-control)": [3, 9, 22],
"(method 26 level-group)": [
40,
41,
@@ -333,7 +336,27 @@
// e.g. "function-name":[[op, argc], [op, argc], ...]
// where "op" is the op number for the call to format.
"dynamic_format_arg_counts": {
"auto-save-post": [[182, 1]]
"auto-save-post": [[182, 1]],
"(method 10 menu-secret-option)": [[289, 1]],
"(method 10 menu-create-game-option)": [[49, 1]],
"(method 10 menu-format-card-option)": [[49, 1]],
"(method 10 menu-card-removed-option)": [[49, 1]],
"(method 10 menu-insert-card-option)": [[49, 1]],
"(method 10 menu-hero-mode-message-option)": [[50, 1]],
"(method 10 menu-secrets-insufficient-space-option)": [[51, 1]],
"(method 10 menu-error-loading-option)": [
[65, 1],
[100, 1]
],
"(method 10 menu-insufficient-space-option)": [
[72, 1],
[112, 1]
],
"(method 10 menu-error-auto-saving-option)": [[73, 1]],
"(method 10 menu-loading-option)": [[113, 1]],
"(method 10 menu-icon-info-option)": [[150, 1]],
"(method 17 hud-goal)": [[71, 0]],
"(method 17 hud-miss)": [[71, 0]]
},
"mips2c_functions_by_name": [
@@ -355,6 +355,43 @@
["L271", "(pointer bucket-id)", 10],
["L270", "(pointer bucket-id)", 10]
],
"fma-sphere": [["L45", "attack-info"]],
"water": [
["L249", "attack-info"],
["L248", "attack-info"],
["L242", "(inline-array water-sphere)", 30]
],
"progress": [
["L970", "uint64", true],
["L944", "uint64", true],
["L954", "uint64", true],
["L949", "uint64", true],
["L948", "uint64", true],
["L947", "uint64", true],
["L955", "uint64", true],
["L950", "uint64", true],
["L957", "uint64", true],
["L958", "uint64", true],
["L945", "uint64", true],
["L951", "uint64", true],
["L953", "uint64", true],
["L959", "uint64", true],
["L961", "uint64", true],
["L956", "uint64", true],
["L946", "uint64", true],
["L952", "uint64", true],
["L960", "uint64", true]
],
"progress-draw": [
["L462", "uint64", true],
["L463", "uint64", true],
["L464", "uint64", true]
],
"hud": [["L240", "vector"]],
"hud-classes": [
["L205", "(inline-array hud-sprite)", 24],
["L214", "(inline-array vector)", 4]
],
"level": [
["L1004", "uint64", true]
]
@@ -359,5 +359,45 @@
[112, "vector"]
],
"(method 23 tracking-spline)": [[32, "vector"]],
"(method 21 tracking-spline)": [[16, "tracking-spline-sampler"]]
"(method 21 tracking-spline)": [[16, "tracking-spline-sampler"]],
"(method 18 light-trail)": [[16, "vector"]],
"ragdoll-joint-callback": [
[112, "vector"],
[128, "matrix"],
[192, "vector"],
[224, "vector"]
],
"ragdoll-matrix-interp": [
[16, "matrix"],
[144, "matrix"]
],
"(method 15 ragdoll)": [
[80, "matrix"],
[160, "vector"],
[304, "vector"],
[144, "vector"],
[176, "vector"],
[192, "vector"],
[208, "vector"],
[224, "vector"],
[240, "vector"]
],
"(method 14 ragdoll)": [[144, "vector"]],
"(method 14 light-trail)": [[16, "light-trail-breadcrumb"]],
"check-water-level-drop": [[16, "vector"]],
"check-water-level-drop-motion": [[16, "vector"]],
"(method 17 water-control)": [[16, "light-trail-tracker-spawn-params"]],
"(method 10 water-control)": [[288, "vector"]],
"(method 11 flow-control)": [
[80, "vector"],
[128, "vector"]
],
"(method 13 flow-control)": [
[64, "vector"],
[80, "vector"],
[96, "vector"],
[128, "vector"]
],
"progress-post": [[176, "hud-box"]],
"(method 15 hud-gun)": [[16, "hud-sprite"]]
}
File diff suppressed because one or more lines are too long
+253 -33
View File
@@ -1875,16 +1875,7 @@
"get-remaining-player-ammo": [[32, "v0", "float"]],
"target-gun-type-set!": [[6, "gp", "int"]],
"target-gun-joint-points": [[858, "a0", "int"]],
"(method 11 light-trail)": [
[19, "a0", "pointer"],
[50, "v1", "pointer"],
[96, "v1", "pointer"]
],
"(method 12 light-trail)": [
[18, "v1", "pointer"],
[23, "a0", "pointer"],
[176, "v1", "pointer"],
[542, "v1", "pointer"],
["_stack_", 88, "float"],
["_stack_", 92, "float"],
["_stack_", 96, "float"],
@@ -1892,7 +1883,8 @@
["_stack_", 144, "float"],
["_stack_", 148, "float"],
["_stack_", 152, "float"],
["_stack_", 156, "float"]
["_stack_", 156, "float"],
[556, "a0", "vector"]
],
"compute-trail-scaled-t": [[17, "v1", "float"]],
"board-post": [[[6, 153], "v1", "target"]],
@@ -2527,7 +2519,7 @@
[222, "v1", "(pointer uint128)"],
[223, "a1", "(pointer uint128)"],
[225, "a0", "(pointer uint128)"],
[[71, 168], "s1", "(pointer int8)"],
[[71, 168], "s1", "(pointer int8)"],
[72, "v1", "(pointer int8)"],
[[74, 169], "s0", "(pointer int8)"],
[[170, 193], "s1", "(pointer uint8)"],
@@ -2550,7 +2542,7 @@
[28, "a3", "(pointer int32)"]
],
"shrub-upload-view-data": [[[3, 17], "a0", "dma-packet"]],
"shrub-do-init-frame": [
"shrub-do-init-frame": [
[[12, 21], "a0", "dma-packet"],
[[26, 29], "a0", "dma-packet"],
[33, "v1", "(pointer vif-tag)"],
@@ -2560,24 +2552,24 @@
[52, "v1", "(pointer vif-tag)"],
[54, "v1", "(pointer uint32)"]
],
"shrub-init-frame": [
"shrub-init-frame": [
[[8, 12], "a0", "dma-packet"],
[[18, 21], "a0", "gs-gif-tag"],
[24, "v1", "(pointer gs-test)"],
[26, "v1", "(pointer gs-reg64)"]
],
"shrub-upload-model": [
"shrub-upload-model": [
[[17, 26], "a3", "dma-packet"],
[[33, 41], "a0", "dma-packet"],
[[47, 55], "a0", "dma-packet"]
],
"draw-prototype-inline-array-shrub": [
[387, "a0", "prototype-shrubbery"],
[481, "v1", "prototype-shrubbery"],
[[637, 646], "a1", "prototype-bucket-shrub"],
[[301, 392], "s1", "prototype-bucket-shrub"],
[[470, 515], "s1", "prototype-bucket-shrub"],
[[470, 658], "gp", "prototype-bucket-shrub"],
"draw-prototype-inline-array-shrub": [
[387, "a0", "prototype-shrubbery"],
[481, "v1", "prototype-shrubbery"],
[[637, 646], "a1", "prototype-bucket-shrub"],
[[301, 392], "s1", "prototype-bucket-shrub"],
[[470, 515], "s1", "prototype-bucket-shrub"],
[[470, 658], "gp", "prototype-bucket-shrub"],
[[13, 56], "v1", "prototype-bucket-shrub"]
// [[102, 114], "a0", "shrub-near-packet"],
// [[114, 117], "v1", "vector4w-3"],
@@ -2634,7 +2626,7 @@
[18, "v1", "drawable-inline-array-node"],
[20, "a0", "drawable-inline-array-node"]
],
"draw-drawable-tree-tfrag": [
"draw-drawable-tree-tfrag": [
[17, "v1", "drawable-inline-array-node"],
[19, "a0", "drawable-inline-array-node"]
],
@@ -2681,15 +2673,15 @@
[132, "v1", "int"],
[132, "a0", "int"]
],
"tie-init-buf": [
[[44, 51], "a0", "dma-packet"],
[[53, 60], "a0", "gs-gif-tag"],
[64, "a0", "(pointer gs-zbuf)"],
[66, "a0", "(pointer gs-reg64)"],
[[71, 79], "v1", "dma-packet"],
[[104, 110], "v1", "dma-packet"],
[112, "v1", "(pointer uint32)"]
],
"tie-init-buf": [
[[44, 51], "a0", "dma-packet"],
[[53, 60], "a0", "gs-gif-tag"],
[64, "a0", "(pointer gs-zbuf)"],
[66, "a0", "(pointer gs-reg64)"],
[[71, 79], "v1", "dma-packet"],
[[104, 110], "v1", "dma-packet"],
[112, "v1", "(pointer uint32)"]
],
"(method 13 drawable-tree-instance-tie)": [
[[51, 70], "t1", "tie-fragment"],
[[102, 120], "a3", "tie-fragment"],
@@ -2717,6 +2709,236 @@
[[15, 21], "v1", "connection"],
[[21, 25], "a0", "prim-strip"]
],
"(event tracking light-trail-tracker)": [[55, "v1", "float"]],
"(method 21 light-trail)": [[50, "v1", "light-trail-breadcrumb"]],
"(method 14 light-trail)": [[47, "a0", "uint"]],
"debug-menu-item-var-update-display-str": [
[48, "v1", "int"],
[63, "v1", "int"],
[68, "v1", "int"],
[46, "v1", "int"],
[45, "v1", "int"],
[65, "v1", "int"],
[66, "v1", "int"]
],
"debug-menu-rebuild": [[7, "a0", "debug-menu-item"]],
"debug-menu-func-decode": [[18, "a0", "symbol"]],
"debug-menu-find-from-template": [
[9, "s5", "string"],
[10, "s4", "debug-menu-item"],
[18, "s4", "debug-menu-item-submenu"],
[3, "s5", "debug-menu"]
],
"debug-menu-render": [[[118, 121], "v1", "dma-packet"]],
"debug-menu-send-msg": [
[17, "s2", "debug-menu-item-submenu"],
[12, "s2", "debug-menu-item"]
],
"debug-menu-item-var-joypad-handler": [
[206, "a1", "int"],
[207, "v1", "int"]
],
"debug-menu-item-get-max-width": [
[5, "a0", "debug-menu-item-submenu"],
[20, "a0", "debug-menu-item-var"]
],
"debug-menu-item-var-make-float": [[32, "f0", "int"]],
"ragdoll-joint-callback": [[92, "t9", "(function cspace transformq none)"]],
"(method 15 ragdoll)": [
[78, "s4", "ragdoll-edit-info"],
[92, "s4", "ragdoll-edit-info"],
[202, "s4", "ragdoll-edit-info"],
[216, "s4", "ragdoll-edit-info"],
[221, "s4", "ragdoll-edit-info"],
[362, "s4", "ragdoll-edit-info"],
[110, "s4", "ragdoll-edit-info"],
[115, "s4", "ragdoll-edit-info"]
],
"(trans tracking weapon-trail-tracker)": [
[36, "gp", "process-drawable"],
[45, "gp", "process-drawable"]
],
"(trans tracking tread-trail-tracker)": [
[27, "gp", "process-drawable"],
[30, "gp", "process-drawable"]
],
"(method 23 weapon-trail)": [
[62, "v1", "light-trail-breadcrumb"],
[65, "v1", "light-trail-breadcrumb"]
],
"(method 22 weapon-trail)": [[32, "v0", "light-trail-breadcrumb"]],
"(method 22 tread-trail)": [[19, "v0", "light-trail-breadcrumb"]],
"(method 23 tread-trail)": [
[51, "v1", "light-trail-breadcrumb"],
[67, "v0", "light-trail-breadcrumb"]
],
"(trans idle fma-sphere)": [[39, "a2", "process-drawable"]],
"part-water-splash-callback": [[3, "v1", "float"]],
"(method 15 water-control)": [[48, "v1", "float"]],
"(method 13 water-control)": [[158, "v1", "process-drawable"]],
"find-water-2": [
[8, "v1", "region-prim-area"],
[15, "a1", "region-prim-area"]
],
"find-water-1": [
[62, "a0", "region-prim-area"],
[40, "a1", "region-prim-area"],
[6, "v1", "region-prim-area"],
[8, "v1", "region-prim-area"],
[11, "a1", "region-prim-area"]
],
"water-info<-region": [
[62, "v1", "pair"],
[71, "v1", "pair"],
[72, "v1", "pair"],
[210, "v1", "pair"],
[211, "v1", "pair"],
[212, "v1", "pair"],
[213, "s1", "pair"],
[280, "s1", "pair"],
[281, "s1", "pair"],
[271, "a0", "process-focusable"],
[111, "v1", "pair"],
[112, "v1", "pair"],
[144, "s0", "process-drawable"],
[156, "v1", "pair"],
[157, "v1", "pair"],
[61, "s1", "pair"],
[70, "s1", "pair"],
[209, "s1", "pair"],
[110, "s1", "pair"],
[155, "s1", "pair"],
[290, "a0", "region-prim-area"]
],
"(method 10 flow-control)": [["_stack_", 48, "flow-section"]],
"(method 12 flow-control)": [
[23, "a0", "connection"],
[24, "a0", "collide-shape"],
[71, "a0", "connection"],
[72, "a0", "collide-shape"],
[148, "a1", "process-focusable"]
],
"(event idle water-flow)": [[15, "a0", "process-focusable"]],
"(method 9 menu-select-start-option)": [
[393, "s3", "pair"],
[394, "v1", "pair"]
],
"(method 24 progress)": [
[64, "v1", "menu-missions-option"],
[69, "v1", "menu-missions-option"]
],
"(method 31 progress)": [
[64, "v1", "menu-missions-option"],
[69, "v1", "menu-missions-option"]
],
"(method 9 menu-slider-option)": [[10, "v1", "(pointer float)"]],
"(method 33 progress)": [
[18, "v1", "vector"],
[17, "gp", "vector"]
],
"(method 32 progress)": [
[46, "v1", "paged-menu-option"],
[50, "v1", "paged-menu-option"],
[310, "v1", "menu-select-start-option"],
[315, "v1", "menu-select-start-option"],
[319, "v1", "menu-select-start-option"],
[330, "v1", "menu-select-scene-option"],
[335, "v1", "menu-select-scene-option"],
[339, "v1", "menu-select-scene-option"],
[405, "v1", "menu-missions-option"],
[410, "v1", "menu-missions-option"]
],
"(method 10 menu-memcard-slot-option)": [
[215, "v1", "vector"],
[[273, 276], "v1", "dma-packet"]
],
"(method 10 menu-picture-slider-option)": [[36, "v1", "pointer"]],
"(method 10 menu-sound-slider-option)": [[29, "v1", "pointer"]],
"(method 10 menu-center-screen-graphic-option)": [["_stack_", 16, "float"]],
"(method 52 progress)": [
[[284, 287], "v1", "dma-packet"],
[80, "v1", "texture"],
[132, "v1", "texture"]
],
"(method 9 progress-icon-array)": [[[108, 111], "v1", "dma-packet"]],
"hide-hud": [
[11, "v1", "connection"],
[23, "v1", "connection"]
],
"enable-hud": [[17, "v1", "connection"]],
"(method 13 hud-box)": [
[[84, 89], "t3", "(inline-array vector4w)"],
[[116, 121], "t7", "(inline-array vector4w)"],
[[122, 126], "t7", "(inline-array vector4w)"],
[[126, 131], "t5", "(inline-array vector4w)"],
[[131, 136], "t4", "(inline-array vector4w)"],
[137, "t4", "(inline-array vector4w)"],
[[177, 200], "t2", "(inline-array vector4w)"],
[[116, 132], "t4", "(inline-array vector4w)"]
],
"(method 9 hud-sprite)": [
[34, "s3", "texture"],
[63, "s3", "texture"],
[78, "s3", "texture"],
[96, "s3", "texture"],
[85, "s3", "texture"],
[[39, 42], "s2", "(inline-array vector4w)"],
[51, "a0", "(pointer uint64)"],
[58, "a0", "(pointer uint64)"],
[[185, 196], "v1", "(inline-array vector4w)"],
[[211, 218], "t5", "(inline-array vector)"],
[[222, 229], "t5", "(inline-array vector)"],
[[230, 240], "t5", "(inline-array vector)"],
[[244, 254], "t5", "(inline-array vector)"],
[[256, 262], "t5", "(inline-array vector4w)"],
[[264, 270], "a2", "(inline-array vector4w)"],
[[280, 286], "v1", "(inline-array vector4w)"],
[[272, 278], "a2", "(inline-array vector4w)"]
],
"(method 10 hud-box)": [[[31, 77], "v1", "(inline-array vector4w)"]],
"(method 11 hud-box)": [[[31, 77], "v1", "(inline-array vector4w)"]],
"(method 12 hud-box)": [[[31, 77], "v1", "(inline-array vector4w)"]],
"hud-create-icon": [
[33, "a0", "process-drawable"],
[38, "a0", "manipy"]
],
"hud-hidden?": [
[9, "v1", "connection"],
[10, "a0", "hud"],
[12, "a0", "hud"]
],
"ready-hud": [
[23, "v1", "connection"],
[37, "v1", "connection"]
],
"show-hud": [
[22, "v1", "connection"],
[34, "v1", "connection"]
],
"hide-hud-quick": [
[11, "v1", "connection"],
[23, "v1", "connection"]
],
"(method 9 hud-box)": [[[53, 84], "v1", "(inline-array vector4w)"]],
"(method 10 hud-sprite)": [
[32, "s0", "texture"],
[242, "s0", "texture"],
[243, "s0", "texture"],
[[39, 45], "v1", "(inline-array vector4w)"],
[[230, 242], "v1", "(inline-array vector4w)"],
[[275, 332], "v1", "(inline-array vector)"],
[45, "s0", "texture"]
],
"(method 50 progress)": [
["_stack_", 96, "float"],
["_stack_", 176, "float"]
],
"find-mission-text-at-index": [[157, "v1", "symbol"]],
"(method 11 controls-page-info)": [["_stack_", 64, "float"]],
"(method 16 hud)": [
[127, "v1", "int"],
[147, "v1", "int"]
],
"lookup-level-info": [
[11, "v1", "basic"],
[21, "a1", "symbol"],
@@ -2728,6 +2950,4 @@
"level-find-borrow-slot": [
[[204, 211], "a2", "level"]
]
}
@@ -1851,5 +1851,18 @@
"v1-161": "fade-enable",
"f0-11": "dist-until-gone"
}
},
"fma-sphere-init-by-other": {
"args": ["fma-parms"]
},
"(method 9 progress-list-level)": {
"vars": {
"s3-0": ["act", "game-task-node-flag"]
}
},
"(method 4 progress-list-level)": {
"vars": {
"s4-0": ["act", "game-task-node-flag"]
}
}
}
+7
View File
@@ -60,4 +60,11 @@ struct TextureDB {
std::string generate_texture_dest_adjustment_table() const;
};
// used by decompiler for texture macros
struct TexInfo {
std::string name;
std::string tpage_name;
u32 idx;
};
} // namespace decompiler
+2 -1
View File
@@ -169,9 +169,10 @@ void decompile(const fs::path& iso_data_path, const std::string& data_subfolder)
// textures
decompiler::TextureDB tex_db;
auto textures_out = out_folder / "textures";
auto dump_out = out_folder / "import";
file_util::create_dir_if_needed(textures_out);
file_util::write_text_file(textures_out / "tpage-dir.txt",
db.process_tpages(tex_db, textures_out, config));
db.process_tpages(tex_db, textures_out, config, dump_out));
// texture merges
// TODO - put all this stuff in somewhere common
+14 -2
View File
@@ -235,6 +235,10 @@ int main(int argc, char** argv) {
return 1;
}
if (config.process_tpages && !config.texture_info_dump.empty()) {
db.dts.textures = config.texture_info_dump;
}
// main decompile.
if (config.decompile_code) {
db.analyze_functions_ir2(out_folder, config, {}, {}, {});
@@ -284,16 +288,24 @@ int main(int argc, char** argv) {
mem_log("After spool handling: {} MB", get_peak_rss() / (1024 * 1024));
decompiler::TextureDB tex_db;
TextureDB tex_db;
if (config.process_tpages || config.levels_extract) {
auto textures_out = out_folder / "textures";
auto dump_out = out_folder / "import";
file_util::create_dir_if_needed(textures_out);
auto result = db.process_tpages(tex_db, textures_out, config);
auto result = db.process_tpages(tex_db, textures_out, config, dump_out);
if (!result.empty() && config.process_tpages) {
file_util::write_text_file(textures_out / "tpage-dir.txt", result);
file_util::write_text_file(textures_out / "tex-remap.txt",
tex_db.generate_texture_dest_adjustment_table());
}
if (config.dump_tex_info) {
auto texture_file_name = out_folder / "dump" / "tex-info.min.json";
nlohmann::json texture_json = db.dts.textures;
file_util::create_dir_if_needed_for_file(texture_file_name);
file_util::write_text_file(texture_file_name, texture_json.dump(-1));
lg::info("[DUMP] Dumped texture info to {}", texture_file_name.string());
}
}
mem_log("After textures: {} MB", get_peak_rss() / (1024 * 1024));
+2
View File
@@ -5,6 +5,7 @@
#include "common/type_system/TypeSystem.h"
#include "decompiler/Disasm/Register.h"
#include "decompiler/data/TextureDB.h"
namespace decompiler {
class TP_Type;
@@ -38,6 +39,7 @@ class DecompilerTypeSystem {
format_ops_with_dynamic_string_by_func_name;
std::unordered_map<std::string, std::unordered_map<int, std::string>> art_group_info;
std::unordered_map<std::string, std::unordered_map<int, std::string>> jg_info;
std::unordered_map<u32, TexInfo> textures;
void add_symbol(const std::string& name) {
if (symbols.find(name) == symbols.end()) {
+5
View File
@@ -1530,6 +1530,11 @@ goos::Object bitfield_defs_print(const TypeSpec& type,
result.push_back(pretty_print::to_symbol(fmt::format(
":{} {}", def.field_name,
bitfield_defs_print(def.nested_field->field_type, def.nested_field->fields).print())));
} else if (def.is_float) {
float f;
memcpy(&f, &def.value, 4);
result.push_back(
pretty_print::to_symbol(fmt::format(":{} {}", def.field_name, float_to_string(f, true))));
} else {
result.push_back(
pretty_print::to_symbol(fmt::format(":{} #x{:x}", def.field_name, def.value)));
+17 -3
View File
@@ -401,9 +401,22 @@ void assert_spec_flag_float(const std::vector<LinkedWord>& words, const std::str
std::string decompile_sparticle_texture(const std::vector<LinkedWord>& words,
const TypeSystem& ts,
const std::string& flag_name) {
const std::string& flag_name,
const Env& env) {
assert_spec_flag_int_single_field(words, flag_name);
// try to use texture constants
auto textures = env.dts->textures;
auto combo_id = words.at(1).data;
u16 tpage = (combo_id & 0xfff00000) >> 20;
u16 idx = (combo_id & 0x000fff00) >> 8;
auto fixed_id = tpage << 16 | idx;
if (!textures.empty() && textures.find(fixed_id) != textures.end()) {
auto tex = textures.at(fixed_id);
return pretty_print::build_list(tex.name, tex.tpage_name).print();
}
// default to texture id if it fails
const auto tex_id_type = TypeSpec("texture-id");
auto tex_id_str = bitfield_defs_print(
tex_id_type, decompile_bitfield_from_int(tex_id_type, ts, words.at(1).data));
@@ -660,7 +673,8 @@ goos::Object decompile_sparticle_field_init(const std::vector<decompiler::Linked
goos::Object sound_spec,
goos::Object userdata,
const TypeSystem& ts,
GameVersion version) {
GameVersion version,
const Env& env) {
auto field_name = decompile_int_enum_from_int(TypeSpec("sp-field-id"), ts, field_id);
const auto& field_info = field_kinds.at(version)[field_id];
if (!field_info.known) {
@@ -690,7 +704,7 @@ goos::Object decompile_sparticle_field_init(const std::vector<decompiler::Linked
// let's handle things on a more specific level now
switch (field_info.kind) {
case FieldKind::TEXTURE_ID:
result = decompile_sparticle_texture(words, ts, flag_name);
result = decompile_sparticle_texture(words, ts, flag_name, env);
break;
case FieldKind::FLOAT:
result = decompile_sparticle_float(words, flag_name, false);
+3 -1
View File
@@ -5,6 +5,7 @@
#include "common/type_system/TypeSystem.h"
#include "common/versions/versions.h"
#include "decompiler/IR2/Env.h"
#include "decompiler/ObjectFile/LinkedWord.h"
namespace decompiler {
@@ -14,5 +15,6 @@ goos::Object decompile_sparticle_field_init(const std::vector<decompiler::Linked
goos::Object sound_spec,
goos::Object userdata,
const TypeSystem& ts,
GameVersion version);
GameVersion version,
const Env& env);
} // namespace decompiler
+3 -3
View File
@@ -23,7 +23,7 @@
03000000c82d00001151000000000000,8BitDo Lite SE,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a3,righty:a4,start:b11,x:b4,y:b3,platform:Windows,
03000000c82d00000150000000000000,8BitDo M30,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftx:a0,lefty:a1,rightshoulder:b6,righttrigger:b7,rightx:a3,righty:a5,start:b11,x:b4,y:b3,platform:Windows,
03000000c82d00000151000000000000,8BitDo M30,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftx:a0,lefty:a2,rightshoulder:b6,righttrigger:b7,rightx:a3,righty:a5,start:b11,x:b3,y:b4,platform:Windows,
03000000c82d00000650000000000000,8BitDo M30,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b2,leftshoulder:b8,lefttrigger:b9,leftx:a0,lefty:a1,rightshoulder:b6,righttrigger:b7,start:b11,x:b3,y:b4,platform:Windows,
03000000c82d00000650000000000000,8BitDo M30,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b2,leftshoulder:b8,lefttrigger:b9,leftx:a0,lefty:a1,rightshoulder:b6,righttrigger:b7,rightx:a3,righty:a4,start:b11,x:b3,y:b4,platform:Windows,
03000000c82d00005106000000000000,8BitDo M30,a:b0,b:b1,back:b10,dpdown:+a2,dpleft:-a0,dpright:+a0,dpup:-a2,guide:b2,leftshoulder:b8,lefttrigger:b9,rightshoulder:b6,righttrigger:b7,start:b11,x:b3,y:b4,platform:Windows,
03000000c82d00002090000000000000,8BitDo Micro,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,righttrigger:b9,rightx:a3,righty:a4,start:b11,x:b4,y:b3,platform:Windows,
03000000c82d00000310000000000000,8BitDo N30,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftx:a0,lefty:a1,rightshoulder:b7,start:b11,x:b3,y:b4,platform:Windows,
@@ -816,7 +816,7 @@ xinput,XInput Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,
03000000c82d00001151000000020000,8BitDo Lite SE,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Mac OS X,
03000000a30c00002400000006020000,8BitDo M30,a:b2,b:b1,dpdown:+a4,dpleft:-a3,dpright:+a3,dpup:-a4,guide:b9,leftshoulder:b6,lefttrigger:b5,rightshoulder:b4,righttrigger:b7,start:b8,x:b3,y:b0,platform:Mac OS X,
03000000c82d00000151000000010000,8BitDo M30,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftx:a0,lefty:a1,rightshoulder:b6,righttrigger:b7,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Mac OS X,
03000000c82d00000650000001000000,8BitDo M30,a:b0,b:b1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b8,lefttrigger:b9,leftx:a0,lefty:a1,rightshoulder:b6,righttrigger:b7,start:b11,x:b3,y:b4,platform:Mac OS X,
03000000c82d00000650000001000000,8BitDo M30,a:b0,b:b1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b2,leftshoulder:b8,lefttrigger:b9,leftx:a0,lefty:a1,rightshoulder:b6,righttrigger:b7,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Mac OS X,
03000000c82d00005106000000010000,8BitDo M30,a:b1,b:b0,back:b10,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,guide:b2,leftshoulder:b6,lefttrigger:a5,rightshoulder:b7,righttrigger:a4,start:b11,x:b4,y:b3,platform:Mac OS X,
03000000c82d00002090000000010000,8BitDo Micro,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Mac OS X,
03000000c82d00000451000000010000,8BitDo N30,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftx:a0,lefty:a1,rightx:a2,righty:a3,start:b11,platform:Mac OS X,
@@ -1102,7 +1102,7 @@ xinput,XInput Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,
03000000c82d00001151000011010000,8BitDo Lite SE,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Linux,
05000000c82d00001151000000010000,8BitDo Lite SE,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Linux,
03000000c82d00000151000000010000,8BitDo M30,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftx:a0,lefty:a1,rightshoulder:b6,righttrigger:b7,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Linux,
03000000c82d00000650000011010000,8BitDo M30,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b2,leftshoulder:b6,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,righttrigger:b9,start:b11,x:b3,y:b4,platform:Linux,
03000000c82d00000650000011010000,8BitDo M30,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b2,leftshoulder:b6,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Linux,
05000000c82d00005106000000010000,8BitDo M30,a:b0,b:b1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b8,lefttrigger:b9,leftx:a0,lefty:a1,rightshoulder:b6,righttrigger:b7,start:b11,x:b3,y:b4,platform:Linux,
03000000c82d00002090000011010000,8BitDo Micro,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Linux,
05000000c82d00002090000000010000,8BitDo Micro,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Linux,
+32
View File
@@ -1208,6 +1208,38 @@
`(empty)
)
(defmacro def-tex (tex-name tpage idx)
"define a new texture for a tpage. adds it to a global map stored in goos."
;; grab data about the texture
(let* ((tpage-string (symbol->string tpage))
(tex-name-string tex-name)
(tpage-info-lookup (hash-table-try-ref *tpage-info* tpage))
(tpage-info-exists (car tpage-info-lookup))
(tpage-info (cdr tpage-info-lookup))
)
;; no tpage was found, make a new one and add it.
(when (not tpage-info-exists)
(set! tpage-info (make-string-hash-table))
(hash-table-set! *tpage-info* tpage-string tpage-info)
)
;; lookup name in our tpage
(let* ((tex-name-lookup (hash-table-try-ref tpage-info tex-name-string))
(tex-name-exists (car tex-name-lookup))
(tex-new (list tex-name idx))) ;; this is the format of the individual entries
;; found, check if valid
(if (and tex-name-exists (not (eq? (cdr tex-name-lookup) tex-new)))
(fmt #t "error redefining texture. data mismatch: {}\n" tex-new)
#f)
;; not found. add to the tpage.
(when (not tex-name-exists)
(hash-table-set! tpage-info tex-name-string tex-new)
)
)
)
`(defconstant ,(string->symbol-format "{}-{}" tex-name tpage)
(new 'static 'texture-id :page ,tpage :index ,idx))
)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; built-in type stuff
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+2
View File
@@ -496,6 +496,8 @@
;; a map for joint node names used by art loading code.
(define *jg-info* (make-string-hash-table))
;; a map for tpages used by texture macros.
(define *tpage-info* (make-string-hash-table))
;;;;;;;;;;;;;;;;;;;;;;;;
;; build system ;;
+268
View File
@@ -5,5 +5,273 @@
;; name in dgo: fma-sphere
;; dgos: GAME
;; +++fma-sphere-mode
(defenum fma-sphere-mode
:type uint32
:bitfield #t
(nav 0)
(kill-once 1)
(danger 2)
(deadly-overlap 3)
)
;; ---fma-sphere-mode
;; DECOMP BEGINS
(deftype fma-sphere-params (structure)
((mode fma-sphere-mode)
(proc process-focusable)
(track-joint int32)
(duration time-frame)
(sphere sphere)
(danger traffic-danger-info)
(nav-mesh-id uint32)
)
)
(deftype fma-sphere (process-drawable)
((root collide-shape :override)
(first-time? symbol)
(mode fma-sphere-mode)
(track-handle handle)
(track-joint int32)
(attack-id uint32)
(duration time-frame)
(sphere sphere :inline)
(danger traffic-danger-info :inline)
)
(:state-methods
idle
)
)
(defmethod run-logic? ((this fma-sphere))
"Should this process be run? Checked by execute-process-tree."
(or (logtest? *display-scene-control* (scene-controls display-controls))
(and *display-nav-marks* (logtest? (-> this mode) (fma-sphere-mode nav)))
(logtest? (-> this mode) (fma-sphere-mode deadly-overlap))
(>= (-> this track-joint) 0)
(-> this first-time?)
)
)
(defstate idle (fma-sphere)
:virtual #t
:event (behavior ((proc process) (argc int) (message symbol) (block event-message-block))
(case message
(('touched)
(let ((v1-1 (-> block param 0)))
(if v1-1
(send-event
proc
'attack
v1-1
(static-attack-info :mask (vehicle-impulse-factor) ((id (-> self attack-id))
(damage 2.0)
(vehicle-damage-factor 1.0)
(vehicle-impulse-factor 1.0)
(mode 'eco-red)
(attacker-velocity (-> self root transv))
(knock (knocked-type knocked-type-2))
)
)
)
)
)
)
)
)
:enter (behavior ()
(set-time! (-> self state-time))
(set! (-> self first-time?) #f)
(if (logtest? (-> self mode) (fma-sphere-mode kill-once))
(send-event *traffic-manager* 'kill-traffic-sphere (-> self sphere))
)
)
:trans (behavior ()
(local-vars (at-0 int))
(rlet ((vf0 :class vf)
(vf1 :class vf)
(vf2 :class vf)
)
(init-vf0-vector)
(let ((v1-0 (-> self duration)))
(if (and (nonzero? v1-0) (time-elapsed? (-> self state-time) v1-0))
(go empty-state)
)
)
(let ((v1-5 (-> self track-joint)))
(when (>= v1-5 0)
(let ((a2-0 (handle->process (-> self track-handle)))
(gp-0 (new 'stack-no-clear 'vector))
)
(when a2-0
(set! (-> gp-0 quad) (-> self sphere quad))
(set! (-> gp-0 w) 1.0)
(vector-matrix*! gp-0 gp-0 (-> (the-as process-drawable a2-0) node-list data v1-5 bone transform))
(let ((v1-9 (-> self root)))
(vector-! (-> v1-9 transv) gp-0 (-> v1-9 trans))
(let ((a0-12 (-> v1-9 transv)))
(.lvf vf1 (&-> (-> v1-9 transv) quad))
(let ((f0-1 (-> self clock frames-per-second)))
(.mov at-0 f0-1)
)
(.mov vf2 at-0)
(.mov.vf vf1 vf0 :mask #b1000)
(.mul.x.vf vf1 vf1 vf2 :mask #b111)
(.svf (&-> a0-12 quad) vf1)
)
)
(move-to-point! (-> self root) gp-0)
(set! (-> self danger sphere x) (-> gp-0 x))
(set! (-> self danger sphere y) (-> gp-0 y))
(set! (-> self danger sphere z) (-> gp-0 z))
)
)
)
)
(if (logtest? (-> self mode) (fma-sphere-mode danger))
(send-event *traffic-manager* 'add-danger-sphere (-> self danger))
)
(when (logtest? (-> self mode) (fma-sphere-mode deadly-overlap))
(let ((a1-10 (new 'stack-no-clear 'overlaps-others-params)))
(set! (-> a1-10 options) (overlaps-others-options))
(set! (-> a1-10 collide-with-filter) (the-as collide-spec -1))
(set! (-> a1-10 tlist) *touching-list*)
(find-overlapping-shapes (-> self root) a1-10)
)
)
(if (or (logtest? *display-scene-control* (scene-controls display-controls))
(and *display-nav-marks* (logtest? (-> self mode) (fma-sphere-mode nav)))
)
(add-debug-sphere
#t
(bucket-id bucket583)
(-> self root trans)
(-> self sphere r)
(new 'static 'rgba :r #x80 :g #x40 :a #x80)
)
)
)
)
:code sleep-code
)
(defbehavior fma-sphere-init-by-other fma-sphere ((fma-parms fma-sphere-params))
(set! (-> self mode) (-> fma-parms mode))
(set! (-> self first-time?) #t)
(set! (-> self duration) (-> fma-parms duration))
(cond
((and (-> fma-parms proc) (>= (-> fma-parms track-joint) 0))
(set! (-> self track-joint) (-> fma-parms track-joint))
(set! (-> self track-handle) (process->handle (-> fma-parms proc)))
)
(else
(set! (-> self track-joint) -1)
(set! (-> self track-handle) (the-as handle #f))
)
)
(cond
((-> fma-parms danger)
(mem-copy! (the-as pointer (-> self danger)) (the-as pointer (-> fma-parms danger)) 54)
(cond
(sphere
(set! (-> self sphere quad) (-> fma-parms sphere quad))
(set! (-> self danger sphere quad) (-> fma-parms sphere quad))
)
(else
(set! (-> self sphere quad) (-> self danger sphere quad))
)
)
)
(sphere
(set! (-> self sphere quad) (-> fma-parms sphere quad))
(when (logtest? (-> self mode) (fma-sphere-mode danger))
(set! (-> self danger sphere quad) (-> fma-parms sphere quad))
(set! (-> self danger velocity quad) (the-as uint128 0))
(set! (-> self danger notify-radius) (+ 40960.0 (-> self sphere r)))
(set! (-> self danger danger-level) 1.0)
(set! (-> self danger decay-rate) 0.0)
(set! (-> self danger flags) (the-as uint 1))
(set! (-> self danger danger-type) (the-as uint 4))
)
)
(else
(format 0 "ERROR: Initializing an fma-sphere without a sphere or danger info!~%")
(go empty-state)
)
)
(let ((s5-0 (new 'process 'collide-shape self (collide-list-enum hit-by-player))))
(let ((v1-32 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0))))
(set! (-> v1-32 prim-core collide-as) (collide-spec obstacle))
(set-vector! (-> v1-32 local-sphere) 0.0 0.0 0.0 4096.0)
(set! (-> s5-0 total-prims) (the-as uint 1))
(set! (-> s5-0 root-prim) v1-32)
)
(set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w)))
(let ((v1-35 (-> s5-0 root-prim)))
(set! (-> s5-0 backup-collide-as) (-> v1-35 prim-core collide-as))
(set! (-> s5-0 backup-collide-with) (-> v1-35 prim-core collide-with))
)
(set! (-> self root) s5-0)
)
(let ((s5-1 (-> self root)))
(set! (-> s5-1 nav-radius) (-> self sphere r))
(set! (-> s5-1 root-prim local-sphere w) (-> self sphere r))
(set! (-> s5-1 trans quad) (-> self sphere quad))
(set! (-> s5-1 trans w) 1.0)
(vector-identity! (-> s5-1 scale))
(quaternion-identity! (-> s5-1 quat))
(cond
((logtest? (-> self mode) (fma-sphere-mode deadly-overlap))
(set! (-> s5-1 event-self) 'touched)
(let ((v1-43 (-> s5-1 root-prim)))
(set! (-> v1-43 prim-core collide-with) (collide-spec crate civilian enemy hit-by-others-list))
(logior! (-> v1-43 prim-core action) (collide-action deadly))
)
)
(else
(let ((v1-44 (-> s5-1 root-prim)))
(set! (-> v1-44 prim-core collide-as) (collide-spec))
(set! (-> v1-44 prim-core collide-with) (collide-spec))
)
0
)
)
(update-transforms s5-1)
)
(logclear! (-> self mask) (process-mask actor-pause enemy))
(when (logtest? (-> self mode) (fma-sphere-mode nav))
(let ((a0-33 (if (zero? (-> fma-parms nav-mesh-id))
(find-nearest-nav-mesh (-> self root trans) (the-as float #x7f800000))
(get-nav-mesh (the-as actor-id (-> fma-parms nav-mesh-id)))
)
)
)
(cond
(a0-33
(let ((t9-10 (method-of-object a0-33 nav-mesh-method-31)))
self
(t9-10)
)
)
(else
(format 0 "ERROR: fma-sphere-init-by-other: failed to find nearest nav-mesh!~%")
(go empty-state)
)
)
)
)
(when (logtest? (-> self mode) (fma-sphere-mode deadly-overlap))
(let* ((v1-62 *game-info*)
(a0-37 (+ (-> v1-62 attack-id) 1))
)
(set! (-> v1-62 attack-id) a0-37)
(set! (-> self attack-id) a0-37)
)
)
(go-virtual idle)
)
+39
View File
@@ -7,3 +7,42 @@
;; DECOMP BEGINS
(defun cam-stop ()
(kill-by-name "camera-master" *active-pool*)
(kill-by-name "camera-slave" *active-pool*)
(kill-by-name "camera-combiner" *active-pool*)
(set! *camera* #f)
(set! *camera-combiner* #f)
#f
)
(defun cam-start ((arg0 symbol))
(cam-stop)
(set! *camera-combiner* (the-as camera-combiner (ppointer->process (process-spawn
camera-combiner
:init cam-combiner-init
:name "camera-combiner"
:from *camera-dead-pool*
:to *camera-pool*
)
)
)
)
(set! *camera* (the-as camera-master (ppointer->process (process-spawn
camera-master
:init cam-master-init
:name "camera-master"
:from *camera-master-dead-pool*
:to *camera-pool*
)
)
)
)
(if arg0
(reset-cameras)
)
0
(none)
)
(cam-start #f)
+3
View File
@@ -96,6 +96,9 @@
(define-extern cam-slave-options->string (function cam-slave-options object string))
(define-extern cam-index-options->string (function cam-index-options object string))
;; cam-start
(define-extern reset-cameras (function none))
;; DECOMP BEGINS
(deftype cam-index (structure)
@@ -338,7 +338,7 @@ Most [[process-drawable]]s have a [[collide-shape]] that represents their root t
(collide-shape-method-49 () none)
(collide-shape-method-50 () none)
(collide-shape-method-51 () none)
(collide-shape-method-52 () none)
(water-info-init! (_type_ water-info collide-action) water-info)
(collide-shape-method-53 () none)
(collide-shape-method-54 () none)
)
@@ -382,7 +382,7 @@ Most [[process-drawable]]s have a [[collide-shape]] that represents their root t
(collide-shape-moving-method-58 () none)
(collide-shape-moving-method-59 () none)
(collide-shape-moving-method-60 () none)
(collide-shape-moving-method-61 () none)
(move-to-ground-point (_type_ vector vector vector) none)
(compute-acc-due-to-gravity (_type_ vector float) vector)
(collide-shape-moving-method-63 () none)
(collide-shape-moving-method-64 () none)
+13 -13
View File
@@ -112,7 +112,7 @@
)
(defpart 810
:init-specs ((:texture (new 'static 'texture-id :page #x4))
:init-specs ((:texture (bigpuff level-default-sprite))
(:num 16.0)
(:y (meters 0.5) (meters 1))
(:scale-x (meters 1.5) (meters 1.5))
@@ -139,7 +139,7 @@
)
(defpart 812
:init-specs ((:texture (new 'static 'texture-id :index #x3e :page #x4))
:init-specs ((:texture (motion-blur-part level-default-sprite))
(:num 4.0)
(:y (meters 0.75))
(:scale-x (meters 6))
@@ -167,7 +167,7 @@
)
(defpart 814
:init-specs ((:texture (new 'static 'texture-id :index #x4b :page #x4))
:init-specs ((:texture (starflash level-default-sprite))
(:num 1.0)
(:y (meters 1))
(:scale-x (meters 8))
@@ -183,7 +183,7 @@
)
(defpart 815
:init-specs ((:texture (new 'static 'texture-id :index #x6 :page #x4))
:init-specs ((:texture (crate-wood-01-splinter level-default-sprite))
(:num 5.0)
(:x (meters -0.5) (meters 1))
(:y (meters 0.25) (meters 1.5))
@@ -215,7 +215,7 @@
)
(defpart 817
:init-specs ((:texture (new 'static 'texture-id :index #x5 :page #x4))
:init-specs ((:texture (crate-metalbolt-splinter level-default-sprite))
(:num 4.5)
(:x (meters -0.5) (meters 1))
(:y (meters 0.25) (meters 1.5))
@@ -310,7 +310,7 @@
)
(defpart 147
:init-specs ((:texture (new 'static 'texture-id :index #x18 :page #x4))
:init-specs ((:texture (hotdot level-default-sprite))
(:num 6.0)
(:scale-x (meters 0.2) (meters 0.4))
(:scale-y :copy scale-x)
@@ -338,7 +338,7 @@
)
(defpart 819
:init-specs ((:texture (new 'static 'texture-id :index #x18 :page #x4))
:init-specs ((:texture (hotdot level-default-sprite))
(:num 3.0)
(:scale-x (meters 0.2))
(:rot-z (degrees 0) (degrees 180))
@@ -355,7 +355,7 @@
)
(defpart 146
:init-specs ((:texture (new 'static 'texture-id :index #x4b :page #x4))
:init-specs ((:texture (starflash level-default-sprite))
(:num 1.0)
(:scale-x (meters 16))
(:scale-y :copy scale-x)
@@ -370,7 +370,7 @@
)
(defpart 148
:init-specs ((:texture (new 'static 'texture-id :page #x4))
:init-specs ((:texture (bigpuff level-default-sprite))
(:num 4.0)
(:scale-x (meters 2.5) (meters 1.5))
(:rot-z (degrees 0) (degrees 360))
@@ -394,7 +394,7 @@
)
(defpart 145
:init-specs ((:texture (new 'static 'texture-id :index #x4b :page #x4))
:init-specs ((:texture (starflash level-default-sprite))
(:num 16.0)
(:y (meters 1))
(:scale-x (meters 0.1))
@@ -411,7 +411,7 @@
)
(defpart 143
:init-specs ((:texture (new 'static 'texture-id :index #x18 :page #x4))
:init-specs ((:texture (hotdot level-default-sprite))
(:num 1.0)
(:y (meters 0) (meters 16))
(:z (meters 0.3) (meters 0.3))
@@ -435,7 +435,7 @@
)
(defpart 144
:init-specs ((:texture (new 'static 'texture-id :index #x18 :page #x4))
:init-specs ((:texture (hotdot level-default-sprite))
(:num 1.0)
(:scale-x (meters 0.3) (meters 0.1))
(:scale-y :copy scale-x)
@@ -455,7 +455,7 @@
)
(defpart 818
:init-specs ((:texture (new 'static 'texture-id :index #x5 :page #x4))
:init-specs ((:texture (crate-metalbolt-splinter level-default-sprite))
(:num 8.0 16.0)
(:x (meters -0.5) (meters 1))
(:y (meters 0.25) (meters 1.5))
+10 -10
View File
@@ -498,7 +498,7 @@
)
(('shadow-fade-dist)
(if (-> self draw shadow-ctrl)
(set! (-> self draw shadow-ctrl settings fade-vec x) (the-as float (-> block param 0)))
(set! (-> self draw shadow-ctrl settings fade-dist) (the-as float (-> block param 0)))
)
)
(('no-fog)
@@ -1353,7 +1353,7 @@
)
(defpart 57
:init-specs ((:texture (new 'static 'texture-id :index #x3d :page #x4))
:init-specs ((:texture (middot level-default-sprite))
(:num 1.0)
(:scale-x (meters 1))
(:scale-y :copy scale-x)
@@ -2167,7 +2167,7 @@
)
(defpart 59
:init-specs ((:texture (new 'static 'texture-id :index #x18 :page #x4))
:init-specs ((:texture (hotdot level-default-sprite))
(:num 1.0)
(:x (meters 0) (meters 1.8))
(:scale-x (meters 0.2))
@@ -2187,7 +2187,7 @@
)
(defpart 60
:init-specs ((:texture (new 'static 'texture-id :index #x18 :page #x4))
:init-specs ((:texture (hotdot level-default-sprite))
(:num 2.0)
(:x (meters 1.8) (meters 1))
(:scale-x (meters 0.2))
@@ -2207,7 +2207,7 @@
)
(defpart 61
:init-specs ((:texture (new 'static 'texture-id :index #x50 :page #x4))
:init-specs ((:texture (woodchip level-default-sprite))
(:num 1.5)
(:x (meters 2.9) (meters 2.5))
(:y (meters -0.5))
@@ -2231,7 +2231,7 @@
)
(defpart 62
:init-specs ((:texture (new 'static 'texture-id :page #x4))
:init-specs ((:texture (bigpuff level-default-sprite))
(:num 0.5)
(:x (meters 2.9) (meters 2.5))
(:y (meters -0.5))
@@ -2271,7 +2271,7 @@
)
(defpart 65
:init-specs ((:texture (new 'static 'texture-id :index #x18 :page #x4))
:init-specs ((:texture (hotdot level-default-sprite))
(:num 1.0)
(:x (meters 0) (meters 1.4))
(:scale-x (meters 0.2))
@@ -2291,7 +2291,7 @@
)
(defpart 66
:init-specs ((:texture (new 'static 'texture-id :index #x18 :page #x4))
:init-specs ((:texture (hotdot level-default-sprite))
(:num 2.0)
(:x (meters 1.4) (meters 0.9))
(:scale-x (meters 0.2))
@@ -2311,7 +2311,7 @@
)
(defpart 67
:init-specs ((:texture (new 'static 'texture-id :page #x4))
:init-specs ((:texture (bigpuff level-default-sprite))
(:num 0.5)
(:x (meters 2.9) (meters 2.5))
(:y (meters -0.5))
@@ -2347,7 +2347,7 @@
)
(defpart 68
:init-specs ((:texture (new 'static 'texture-id :page #x4))
:init-specs ((:texture (bigpuff level-default-sprite))
(:num 0.5)
(:x (meters 2.9) (meters 2.5))
(:y (meters -0.5))
@@ -7,3 +7,29 @@
;; DECOMP BEGINS
(deftype prim-beam-settings (structure)
((width float)
(color uint32)
(alpha float)
(tex-id uint32)
(num-tiles float)
)
)
(deftype prim-beam-params (structure)
((appearance prim-beam-settings)
)
)
(deftype prim-beam-tracker-params (prim-beam-params)
((track-obj1 handle)
(track-obj2 handle)
(track-joint1 int32)
(track-joint2 int32)
(pos0 vector)
(pos1 vector)
(duration time-frame)
)
)
+1 -1
View File
@@ -23,7 +23,7 @@
)
(defpart 407
:init-specs ((:texture (new 'static 'texture-id :index #x7a :page #x4))
:init-specs ((:texture (shockwave level-default-sprite))
(:birth-func 'birth-func-set-vel)
(:num 0.0 0.3)
(:y (meters 0.15))
@@ -7,3 +7,626 @@
;; DECOMP BEGINS
(defun ray-plane-equation-intersect ((arg0 vector) (arg1 vector) (arg2 vector) (arg3 vector))
(let* ((f0-1 (vector4-dot arg3 arg1))
(f1-1 (vector-dot arg3 arg2))
(f30-0 (/ (- f0-1) f1-1))
)
(vector-v*float+! arg0 arg1 arg2 f30-0)
f30-0
)
)
(deftype flow-section (structure)
((start vector :inline)
(trailing plane :inline)
(pull-dir vector :inline)
(radial-dir vector :inline)
(speed float)
)
)
(deftype flow-section-array (inline-array-class)
((data flow-section :inline :dynamic)
)
)
(set! (-> flow-section-array heap-base) (the-as uint 80))
(deftype flow-control (basic)
((path path-control)
(speed float)
(belt-radius float)
(sections flow-section-array)
(leading plane :inline)
(collide-bounds sphere :inline)
)
(:methods
(new (symbol type process-drawable res-lump) _type_)
(draw-path (_type_) none)
(setup (_type_ (pointer float) int) none)
(push-process (_type_ process-focusable) none)
(find-and-push-things (_type_) none)
(flow-control-method-13 (_type_ water-info vector) symbol)
)
)
(defmethod relocate ((this flow-control) (offset int))
(if (nonzero? (-> this sections))
(&+! (-> this sections) offset)
)
(if (nonzero? (-> this path))
(&+! (-> this path) offset)
)
(call-parent-method this offset)
)
(defmethod draw-path ((this flow-control))
(let ((a0-1 (-> this path)))
(if (nonzero? a0-1)
(path-control-method-9 a0-1)
)
)
0
(none)
)
(defmethod flow-control-method-13 ((this flow-control) (arg0 water-info) (arg1 vector))
(local-vars (v0-7 symbol) (sv-192 vector) (sv-208 vector) (sv-224 flow-section))
(rlet ((acc :class vf)
(vf0 :class vf)
(vf4 :class vf)
(vf5 :class vf)
(vf6 :class vf)
(vf7 :class vf)
)
(init-vf0-vector)
(let ((s5-0 (new 'stack-no-clear 'vector)))
(set! (-> s5-0 quad) (-> arg1 quad))
(set! (-> s5-0 w) 1.0)
(when (>= (vector4-dot s5-0 (the-as vector (-> this leading))) 0.0)
(let* ((s1-0 (-> this sections))
(s2-0 (-> s1-0 length))
(a3-0 (the-as object (-> this leading)))
)
(dotimes (s4-0 s2-0)
(let ((s3-0 (-> s1-0 data s4-0)))
(when (< (vector4-dot s5-0 (the-as vector (-> s3-0 trailing))) 0.0)
(let ((v1-10 (new 'stack-no-clear 'vector)))
(vector-! v1-10 s5-0 (-> s3-0 start))
(when (>= (-> this belt-radius) (fabs (vector-dot v1-10 (-> s3-0 radial-dir))))
(let* ((f0-7 (vector-dot v1-10 (-> s3-0 pull-dir)))
(f0-9 (- (-> v1-10 y) (* (-> s3-0 pull-dir y) f0-7)))
)
(when (and (>= f0-9 -41984.0) (>= 41779.2 f0-9))
(let ((a0-11 (new 'stack-no-clear 'vector)))
(set! sv-192 (new 'stack-no-clear 'vector))
(let* ((f30-0 (ray-plane-equation-intersect a0-11 s5-0 (-> s3-0 pull-dir) (the-as vector a3-0)))
(t9-1 ray-plane-equation-intersect)
(a1-5 s5-0)
(a2-4 (-> s3-0 pull-dir))
(a3-1 (-> s3-0 trailing))
(f0-10 (t9-1 sv-192 a1-5 a2-4 a3-1))
)
(let ((a1-6 (new 'stack-no-clear 'vector)))
(let ((v1-16 (-> s3-0 start)))
(let ((a0-13 (-> s3-0 pull-dir)))
(let ((a2-6 12288.0))
(.mov vf7 a2-6)
)
(.lvf vf5 (&-> a0-13 quad))
)
(.lvf vf4 (&-> v1-16 quad))
)
(.add.x.vf vf6 vf0 vf0 :mask #b1000)
(.mul.x.vf acc vf5 vf7 :mask #b111)
(.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111)
(.svf (&-> a1-6 quad) vf6)
)
0
(let ((f0-12 (/ f30-0 (- f30-0 f0-10))))
(set! sv-208 (new 'stack-no-clear 'vector))
(let ((t9-2 (method-of-object (-> this path) path-control-method-13)))
sv-208
(+ (the float (if (= s4-0 (+ s2-0 -1))
(+ s4-0 -1)
s4-0
)
)
f0-12
)
(t9-2)
)
)
)
)
(let ((v1-22 (new 'stack-no-clear 'vector)))
(let ((a0-15 v1-22)
(f0-15 (* (-> s3-0 speed) (seconds-per-frame)))
)
(vector-float*! a0-15 sv-208 f0-15)
)
(let ((a1-10 (new 'stack-no-clear 'vector)))
(let ((a0-17 s5-0))
(let ((a2-9 2048.0))
(.mov vf7 a2-9)
)
(.lvf vf5 (&-> v1-22 quad))
(.lvf vf4 (&-> a0-17 quad))
)
(.add.x.vf vf6 vf0 vf0 :mask #b1000)
(.mul.x.vf acc vf5 vf7 :mask #b111)
(.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111)
(.svf (&-> a1-10 quad) vf6)
)
)
0
(let ((s0-1 (-> s3-0 start)))
(set! sv-224 (-> s1-0 data (if (= s4-0 (+ s2-0 -1))
(+ s4-0 -1)
(+ s4-0 1)
)
)
)
(let ((s4-1 (new 'stack-no-clear 'vector)))
(let ((s2-1 (new 'stack-no-clear 'vector))
(s1-1 (new 'stack-no-clear 'vector))
)
(set! (-> s2-1 quad) (-> s3-0 pull-dir quad))
(vector-normalize! s2-1 1.0)
(vector-cross! s1-1 s2-1 *y-vector*)
(vector-normalize! s1-1 1.0)
(vector-cross! (-> arg0 normal) s2-1 s1-1)
)
(let ((t9-5 vector-segment-distance-point!)
(a3-2 s4-1)
)
(t9-5 s5-0 s0-1 (the-as vector sv-224) a3-2)
)
(set! (-> arg0 trans y) (-> s4-1 y))
)
)
(if (< (-> arg0 normal y) 0.0)
(vector-negate! (-> arg0 normal) (-> arg0 normal))
)
0
(return #t)
)
)
)
)
)
)
(set! a3-0 (+ (the-as uint (-> s1-0 data 0 trailing)) (* 80 s4-0)))
)
)
)
)
(return #f)
v0-7
)
)
;; WARN: Function (method 11 flow-control) has a return type of none, but the expression builder found a return statement.
(defmethod push-process ((this flow-control) (arg0 process-focusable))
(rlet ((acc :class vf)
(vf0 :class vf)
(vf4 :class vf)
(vf5 :class vf)
(vf6 :class vf)
(vf7 :class vf)
)
(init-vf0-vector)
(let ((s5-0 (new 'stack-no-clear 'vector)))
(set! (-> s5-0 quad) (-> (get-trans arg0 0) quad))
(set! (-> s5-0 w) 1.0)
(when (>= (vector4-dot s5-0 (the-as vector (-> this leading))) 0.0)
(let* ((v1-7 (-> this sections))
(a0-3 (-> v1-7 length))
(a3-0 (the-as object (-> this leading)))
)
(dotimes (s3-1 a0-3)
(let ((s2-0 (-> v1-7 data s3-1)))
(when (< (vector4-dot s5-0 (the-as vector (-> s2-0 trailing))) 0.0)
(let ((v1-8 (new 'stack-no-clear 'vector)))
(vector-! v1-8 s5-0 (-> s2-0 start))
(when (>= (-> this belt-radius) (fabs (vector-dot v1-8 (-> s2-0 radial-dir))))
(let* ((f0-7 (vector-dot v1-8 (-> s2-0 pull-dir)))
(f0-9 (- (-> v1-8 y) (* (-> s2-0 pull-dir y) f0-7)))
)
(when (and (>= f0-9 -41984.0) (>= 41779.2 f0-9))
(let* ((a0-11 (new 'stack-no-clear 'vector))
(s1-0 (new 'stack-no-clear 'vector))
(f30-0 (ray-plane-equation-intersect a0-11 s5-0 (-> s2-0 pull-dir) (the-as vector a3-0)))
(f0-10 (ray-plane-equation-intersect s1-0 s5-0 (-> s2-0 pull-dir) (-> s2-0 trailing)))
)
(let ((a1-13 (new 'stack-no-clear 'vector)))
(let ((v1-13 (-> s2-0 start)))
(let ((a0-13 (-> s2-0 pull-dir)))
(let ((a2-6 12288.0))
(.mov vf7 a2-6)
)
(.lvf vf5 (&-> a0-13 quad))
)
(.lvf vf4 (&-> v1-13 quad))
)
(.add.x.vf vf6 vf0 vf0 :mask #b1000)
(.mul.x.vf acc vf5 vf7 :mask #b111)
(.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111)
(.svf (&-> a1-13 quad) vf6)
)
0
(let ((f0-12 (/ f30-0 (- f30-0 f0-10)))
(s1-1 (new 'stack-no-clear 'vector))
)
(let ((t9-3 (method-of-object (-> this path) path-control-method-13)))
(+ (the float s3-1) f0-12)
(t9-3)
)
(let ((v1-17 (new 'stack-no-clear 'vector)))
(vector-float*! v1-17 s1-1 (* (-> s2-0 speed) (seconds-per-frame)))
(let ((a1-16 (new 'stack-no-clear 'vector)))
(let ((a0-17 v1-17))
(let ((a2-9 2048.0))
(.mov vf7 a2-9)
)
(.lvf vf5 (&-> a0-17 quad))
)
(.lvf vf4 (&-> s5-0 quad))
(.add.x.vf vf6 vf0 vf0 :mask #b1000)
(.mul.x.vf acc vf5 vf7 :mask #b111)
(.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111)
(.svf (&-> a1-16 quad) vf6)
)
0
(send-event arg0 'push-trans v1-17 (seconds 10))
)
)
)
)
)
)
)
(return #f)
)
)
(set! a3-0 (+ (the-as uint (-> v1-7 data 0 trailing)) (* 80 s3-1)))
)
)
)
)
0
(none)
)
)
(defmethod find-and-push-things ((this flow-control))
(local-vars (a0-10 float) (a2-5 float) (a2-12 float))
(rlet ((acc :class vf)
(vf0 :class vf)
(vf1 :class vf)
(vf2 :class vf)
(vf3 :class vf)
(vf4 :class vf)
)
(init-vf0-vector)
(set! *actor-list-length* 0)
(if #t
(set! *actor-list-length*
(fill-actor-list-for-box *actor-hash* (the-as bounding-box (-> this collide-bounds)) *actor-list* 256)
)
)
(when #t
(let ((a0-2 (-> *collide-player-list* alive-list next0)))
*collide-player-list*
(let ((v1-11 (-> a0-2 next0)))
(b! #t cfg-9 :delay (nop!))
(label cfg-4)
(let* ((a0-3 (-> (the-as connection a0-2) param1))
(a1-1 (-> (the-as collide-shape a0-3) root-prim))
)
(when (logtest? (-> a1-1 prim-core collide-as) (collide-spec jak bot enemy hit-by-others-list player-list))
(let ((a1-2 (-> a1-1 prim-core)))
(let ((a2-4 a1-2)
(a3-1 (-> this collide-bounds))
)
(.lvf vf2 (&-> a2-4 world-sphere quad))
(.lvf vf3 (&-> a3-1 quad))
)
(.sub.vf vf1 vf3 vf2)
(.mul.vf vf1 vf1 vf1)
(.add.y.vf vf1 vf1 vf1 :mask #b1)
(.add.z.vf vf1 vf1 vf1 :mask #b1)
(.mov a2-5 vf1)
(let ((f0-0 a2-5)
(f1-1 (+ (-> a1-2 world-sphere w) (-> this collide-bounds r)))
)
(when (< f0-0 (* f1-1 f1-1))
(when (< *actor-list-length* 256)
(set! (-> *actor-list* *actor-list-length*) (the-as collide-shape a0-3))
(set! *actor-list-length* (+ *actor-list-length* 1))
)
)
)
)
)
)
(set! a0-2 v1-11)
*collide-player-list*
(set! v1-11 (-> v1-11 next0))
)
(label cfg-9)
(b! (!= a0-2 (-> *collide-player-list* alive-list-end)) cfg-4 :delay (nop!))
)
)
(when #f
(let ((a0-5 (-> *collide-hit-by-player-list* alive-list next0)))
*collide-hit-by-player-list*
(let ((v1-18 (-> a0-5 next0)))
(while (!= a0-5 (-> *collide-hit-by-player-list* alive-list-end))
(let* ((a0-6 (-> (the-as connection a0-5) param1))
(a1-13 (-> (the-as collide-shape a0-6) root-prim))
)
(when (logtest? (-> a1-13 prim-core collide-as) (collide-spec jak bot enemy hit-by-others-list player-list))
(let ((a1-14 (-> a1-13 prim-core)))
(let ((a2-11 a1-14)
(a3-2 (-> this collide-bounds))
)
(.lvf vf2 (&-> a2-11 world-sphere quad))
(.lvf vf3 (&-> a3-2 quad))
)
(.sub.vf vf1 vf3 vf2)
(.mul.vf vf1 vf1 vf1)
(.add.y.vf vf1 vf1 vf1 :mask #b1)
(.add.z.vf vf1 vf1 vf1 :mask #b1)
(.mov a2-12 vf1)
(let ((f0-1 a2-12)
(f1-5 (+ (-> a1-14 world-sphere w) (-> this collide-bounds r)))
)
(when (< f0-1 (* f1-5 f1-5))
(when (< *actor-list-length* 256)
(set! (-> *actor-list* *actor-list-length*) (the-as collide-shape a0-6))
(set! *actor-list-length* (+ *actor-list-length* 1))
)
)
)
)
)
)
(set! a0-5 v1-18)
*collide-hit-by-player-list*
(set! v1-18 (-> v1-18 next0))
)
)
)
)
(dotimes (s5-0 *actor-list-length*)
(let* ((v1-23 (-> *actor-list* s5-0))
(a0-9 (-> v1-23 root-prim))
)
(when (logtest? (-> a0-9 prim-core collide-as) (collide-spec jak bot enemy hit-by-others-list player-list))
(.lvf vf1 (&-> this collide-bounds quad))
(.lvf vf2 (&-> a0-9 prim-core world-sphere quad))
(.sub.vf vf3 vf1 vf2)
(.add.w.vf vf4 vf1 vf2 :mask #b1000)
(.mul.vf vf3 vf3 vf3 :mask #b111)
(.mul.w.vf vf4 vf4 vf4 :mask #b1000)
(.mul.x.vf acc vf0 vf3 :mask #b1000)
(.add.mul.y.vf acc vf0 vf3 acc :mask #b1000)
(.add.mul.z.vf vf3 vf0 vf3 acc :mask #b1000)
(.sub.w.vf vf3 vf3 vf4 :mask #b1000)
(let ((f0-2 0.0))
(.add.w.vf vf3 vf0 vf3 :mask #b1)
(.mov a0-10 vf3)
(let ((s4-0 (-> v1-23 process)))
(b! (< f0-2 a0-10) cfg-30)
(let ((a1-29 (if (type? s4-0 process-focusable)
s4-0
)
)
)
(if (and a1-29 (not (logtest? (focus-status board) (-> (the-as process-focusable a1-29) focus-status))))
(push-process this (the-as process-focusable a1-29))
)
)
)
)
(label cfg-30)
0
)
)
)
0
(none)
)
)
(defmethod setup ((this flow-control) (arg0 (pointer float)) (arg1 int))
(local-vars (sv-32 int) (sv-48 flow-section) (sv-64 int) (sv-80 flow-section))
(let* ((s5-0 (-> this path))
(s4-0 (-> s5-0 curve num-cverts))
(s3-0 (new 'stack-no-clear 'vector))
)
(let ((s0-0 (new 'process 'flow-section-array (+ s4-0 -1))))
(set! (-> this sections) s0-0)
(set! (-> this collide-bounds quad) (the-as uint128 0))
(get-point-in-path! s5-0 s3-0 0.0 'interp)
(vector+! (the-as vector (-> this collide-bounds)) (the-as vector (-> this collide-bounds)) s3-0)
(set! sv-32 (+ s4-0 -1))
(set! sv-48 (the-as flow-section #f))
(set! sv-64 0)
(while (< sv-64 sv-32)
(set! sv-80 (-> s0-0 data sv-64))
(let ((f0-0 1.0))
(if (< sv-64 arg1)
(set! f0-0 (-> arg0 sv-64))
)
(if arg0
(set! (-> sv-80 speed) (* f0-0 (-> this speed)))
(set! (-> sv-80 speed) (-> this speed))
)
)
(set! (-> sv-80 start quad) (-> s3-0 quad))
(get-point-in-path! s5-0 s3-0 (the float (+ sv-64 1)) 'interp)
(vector+! (the-as vector (-> this collide-bounds)) (the-as vector (-> this collide-bounds)) s3-0)
(vector-! (-> sv-80 pull-dir) s3-0 (-> sv-80 start))
(vector-normalize! (-> sv-80 pull-dir) 1.0)
(set! (-> sv-80 trailing quad) (-> sv-80 pull-dir quad))
(set! (-> sv-80 trailing y) 0.0)
(vector-normalize! (-> sv-80 trailing) 1.0)
(set-vector! (-> sv-80 radial-dir) (- (-> sv-80 trailing z)) 0.0 (-> sv-80 trailing x) 1.0)
(set! (-> sv-80 trailing w) (- (vector-dot s3-0 (the-as vector (-> sv-80 trailing)))))
(when sv-48
(vector+!
(the-as vector (-> sv-48 trailing))
(the-as vector (-> sv-48 trailing))
(the-as vector (-> sv-80 trailing))
)
(vector-normalize! (-> sv-48 trailing) 1.0)
(set! (-> sv-48 trailing w) (- (vector-dot (-> sv-80 start) (the-as vector (-> sv-48 trailing)))))
)
(set! sv-48 sv-80)
sv-48
(set! sv-64 (+ sv-64 1))
)
)
(let ((s2-1 (-> this sections data)))
(set! (-> this leading quad) (-> s2-1 0 pull-dir quad))
(set! (-> this leading y) 0.0)
(vector-normalize! (-> this leading) 1.0)
(set! (-> this leading w) (- (vector-dot (the-as vector (-> s2-1 0)) (the-as vector (-> this leading)))))
)
(let ((f0-22 (/ 1.0 (the float s4-0)))
(f30-0 0.0)
)
(vector-float*! (the-as vector (-> this collide-bounds)) (the-as vector (-> this collide-bounds)) f0-22)
(dotimes (s2-2 s4-0)
(get-point-in-path! s5-0 s3-0 (the float s2-2) 'interp)
(let ((f0-25 (vector-vector-distance-squared s3-0 (-> this collide-bounds))))
(if (< f30-0 f0-25)
(set! f30-0 f0-25)
)
)
)
(set! (-> this collide-bounds r) (+ (sqrtf f30-0) (-> this belt-radius)))
)
)
0
(none)
)
(defmethod new flow-control ((allocation symbol) (type-to-make type) (arg0 process-drawable) (arg1 res-lump))
(local-vars (r0-0 uint128) (v1-16 uint128) (sv-16 int))
(if (not arg1)
(set! arg1 (-> arg0 entity))
)
(let ((gp-0 (object-new allocation type-to-make (the-as int (-> type-to-make size)))))
(when (nonzero? gp-0)
(let ((v1-6 (new 'process 'curve-control arg0 'flow -1000000000.0)))
(cond
((nonzero? v1-6)
(set! (-> gp-0 path) v1-6)
(logior! (-> v1-6 flags) (path-control-flag display draw-line draw-point draw-text))
(if (< (-> v1-6 curve num-cverts) 2)
(go process-drawable-art-error "bad flow path")
)
(set! (-> gp-0 speed) (res-lump-float arg1 'speed :default 12288.0))
(set! (-> gp-0 belt-radius) (res-lump-float arg1 'extra-radius :default 16384.0))
(set! sv-16 0)
(let* ((a1-6 (res-lump-data arg1 'scale-factor pointer :tag-ptr (the-as (pointer res-tag) (& sv-16))))
(a0-8 gp-0)
(t9-6 (method-of-object a0-8 setup))
)
(let ((v1-15 (the-as uint128 sv-16)))
(.pcpyud v1-16 v1-15 r0-0)
)
(t9-6 a0-8 (the-as (pointer float) a1-6) (shr (* (the-as int v1-16) 2) 49))
)
)
(else
(go process-drawable-art-error "no flow path")
)
)
)
)
gp-0
)
)
(deftype water-flow (process)
((root collide-shape)
(flow flow-control)
)
(:state-methods
idle
)
)
;; WARN: Return type mismatch process vs water-flow.
(defmethod relocate ((this water-flow) (offset int))
(if (nonzero? (-> this flow))
(&+! (-> this flow) offset)
)
(the-as water-flow ((method-of-type process relocate) this offset))
)
(defmethod run-logic? ((this water-flow))
"Should this process be run? Checked by execute-process-tree."
#t
)
(defstate idle (water-flow)
:virtual #t
:event (behavior ((proc process) (argc int) (message symbol) (block event-message-block))
(case message
(('water-info)
(let* ((gp-0 (-> block param 0))
(s5-0 proc)
(a0-2 (if (type? s5-0 process-focusable)
s5-0
)
)
)
(if (and a0-2 (focus-test? (the-as process-focusable a0-2) board))
#f
(flow-control-method-13 (-> self flow) (the-as water-info gp-0) (the-as vector (+ gp-0 0)))
)
)
)
(('touch-water)
(let* ((gp-1 (-> self flow))
(s5-1 proc)
(a1-8 (if (type? s5-1 process-focusable)
s5-1
)
)
)
(if (and (nonzero? gp-1) (and a1-8 (!= (-> a1-8 type) target) (< 0.0 (-> gp-1 speed))))
(push-process gp-1 (the-as process-focusable a1-8))
)
)
)
)
)
:code sleep-code
:post (behavior ()
(draw-path (-> self flow))
(if (and *target*
(focus-test? *target* touch-water)
(not (logtest? (focus-status board) (-> *target* focus-status)))
)
(push-process (-> self flow) *target*)
)
)
)
(defmethod init-from-entity! ((this water-flow) (arg0 entity-actor))
(set! (-> this root) (the-as collide-shape (new 'process 'trsqv)))
(process-drawable-from-entity! (the-as process-drawable this) arg0)
(set! (-> this flow) (new 'process 'flow-control (the-as process-drawable this) (the-as res-lump #f)))
(go (method-of-object this idle))
)
+7 -5
View File
@@ -5,6 +5,8 @@
;; name in dgo: water-h
;; dgos: GAME
(define-extern find-water-with-spheres (function (inline-array water-sphere) int water-info object))
;; DECOMP BEGINS
(deftype water-control (basic)
@@ -52,15 +54,15 @@
)
(:methods
(new (symbol type process int float float float) _type_)
(water-control-method-9 () none)
(water-control-method-10 () none)
(water-control-method-9 (_type_) none)
(water-control-method-10 (_type_) none)
(start-bobbing! (_type_ float int int) none)
(distance-from-surface (_type_) float)
(spawn-ripples (_type_ float vector int vector symbol) none)
(display-water-marks? (_type_) symbol)
(water-control-method-15 () none)
(water-control-method-16 () none)
(water-control-method-17 () none)
(enter-water (_type_) none)
(water-control-method-16 (_type_) none)
(water-control-method-17 (_type_) none)
)
)
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+779
View File
@@ -0,0 +1,779 @@
(defconstant desboss2-pris 2953)
(defconstant deshover-minimap 2727)
(defconstant deshover-sprite 1998)
(defconstant deshover-pris2 1989)
(defconstant deshover-warp 1935)
(defconstant deshover-pris 1598)
(defconstant lctyprot-sprite 3269)
(defconstant lctyprot-water 3264)
(defconstant lctyprot-pris 2592)
(defconstant ldax-pris 2130)
(defconstant wasstadb-minimap 1485)
(defconstant wasstadb-water 1309)
(defconstant wasstadb-tfrag 1085)
(defconstant volcanoa-vis-pris2 3053)
(defconstant volcanoa-vis-alpha 1634)
(defconstant volcanoa-vis-shrub 1633)
(defconstant volcanoa-vis-pris 1635)
(defconstant volcanoa-vis-tfrag 1632)
(defconstant lpatkcs-minimap 2359)
(defconstant lpatkcs-pris 1987)
(defconstant lpatkcs-tfrag 2205)
(defconstant comba-minimap 2676)
(defconstant comba-water 2496)
(defconstant comba-shrub 2889)
(defconstant comba-pris 1577)
(defconstant templeb-vis-shrub 2625)
(defconstant templeb-vis-tfrag 2617)
(defconstant arenacst-tfrag 1484)
(defconstant templex-vis-water 2326)
(defconstant templex-vis-shrub 2328)
(defconstant templex-vis-pris 2330)
(defconstant templex-vis-tfrag 2327)
(defconstant volcanox-tfrag 1938)
(defconstant loutro2-pris2 2746)
(defconstant loutro2-water 3070)
(defconstant loutro2-pris 3069)
(defconstant rubblea2-vis-shrub 2509)
(defconstant lcitysml-alpha 2606)
(defconstant lcitysml-tfrag 2605)
(defconstant mined-minimap 1612)
(defconstant mined-sprite 2776)
(defconstant mined-pris2 1623)
(defconstant mined-water 1622)
(defconstant mined-alpha 1691)
(defconstant mined-shrub 1651)
(defconstant mined-pris 1621)
(defconstant mined-tfrag 1620)
(defconstant lppatrol-vis-pris 3279)
(defconstant lppatrol-vis-tfrag 3280)
(defconstant lwlandm-pris 1550)
(defconstant lsig-pris2 1153)
(defconstant lsig-water 1154)
(defconstant wcaseem-pris2 1812)
(defconstant wasall-pris 325)
(defconstant wasseem-sprite 1975)
(defconstant wasseem-pris2 1468)
(defconstant wasseem-pris 1211)
(defconstant waspala-sprite 3132)
(defconstant waspala-water 968)
(defconstant waspala-alpha 933)
(defconstant waspala-shrub 980)
(defconstant waspala-pris 871)
(defconstant desliz-pris 1624)
(defconstant lsigjakc-pris2 1450)
(defconstant lsigjakc-water 1451)
(defconstant lsigjakc-pris 1449)
(defconstant combn-water 2211)
(defconstant combn-alpha 2595)
(defconstant combn-tfrag 2210)
(defconstant lgunrnc-pris 3171)
(defconstant lbbtcha1-sprite 3325)
(defconstant lbbtcha1-water 3378)
(defconstant desert-hfrag 976)
(defconstant ljakndax-pris 2362)
(defconstant desert-minimap 1253)
(defconstant desert-vis-pris 2304)
(defconstant ljkfeet-pris 2658)
(defconstant lnstobb-pris 1337)
(defconstant lctypalt-minimap 3093)
(defconstant lashelin-pris2 1222)
(defconstant lforring-sprite 1358)
(defconstant ctywide-sprite 123)
(defconstant railcst-pris2 2513)
(defconstant railcst-pris 2512)
(defconstant railcst-tfrag 2711)
(defconstant citycast-pris2 2095)
(defconstant deschase-minimap 3184)
(defconstant citycast-pris 2094)
(defconstant deschase-tfrag 3203)
(defconstant precurc-vis-water 2903)
(defconstant wasseem-water 1533)
(defconstant precurc-vis-shrub 2642)
(defconstant precurc-vis-tfrag 2640)
(defconstant ljndklev-pris 1247)
(defconstant ltrtwhls-pris 2356)
(defconstant combc-tfrag 2191)
(defconstant templec-minimap 3041)
(defconstant templec-sprite 2692)
(defconstant volcanox-pris 1517)
(defconstant templec-vis-shrub 2626)
(defconstant forestb-vis-water 821)
(defconstant forestb-vis-pris 820)
(defconstant forestb-vis-tfrag 819)
(defconstant desert-vis-tfrag 736)
(defconstant lbbring6-sprite 2954)
(defconstant ldesgcst-pris2 2661)
(defconstant ldesgcst-water 2662)
(defconstant lwlandm-water 1551)
(defconstant ldesgcst-pris 2660)
(defconstant vinroom-vis-tfrag 1026)
(defconstant loutro-pris2 2657)
(defconstant loutro-shrub 2812)
(defconstant nstb-sprite 646)
(defconstant desrescc-pris 1717)
(defconstant nstb-vis-water 608)
(defconstant nstb-vis-alpha 604)
(defconstant desinter-water 1713)
(defconstant desinter-pris 1712)
(defconstant lbbtcha2-sprite 3326)
(defconstant warpcast-pris 2270)
(defconstant lbbtcha2-water 3379)
(defconstant railc-tfrag 2484)
(defconstant gungame-sprite 1389)
(defconstant gungame-vis-pris2 1557)
(defconstant gungame-vis-pris 1391)
(defconstant gungame-vis-tfrag 1393)
(defconstant destrack-minimap 1666)
(defconstant railcst-shrub 2904)
(defconstant destrack-pris 1795)
(defconstant ljkcdmkl-pris2 1811)
(defconstant ljkcdmkl-pris 1810)
(defconstant lfacrm1-tfrag 1936)
(defconstant museum4-pris2 3386)
(defconstant museum4-water 3419)
(defconstant museum4-pris 3365)
(defconstant museum4-tfrag 3390)
(defconstant lbbring1-sprite 2767)
(defconstant museum-pris2 3297)
(defconstant ldampksm-pris 1092)
(defconstant museum-water 3310)
(defconstant lctyblow-water 2847)
(defconstant lctyblow-pris 2846)
(defconstant mineb-vis-shrub 928)
(defconstant mineb-vis-tfrag 926)
(defconstant stadiumb-vis-alpha 317)
(defconstant stadiumb-vis-shrub 1974)
(defconstant wasall-minimap 1427)
(defconstant stadiumb-vis-pris 318)
(defconstant stadiumb-vis-tfrag 319)
(defconstant destrack-sprite 2363)
(defconstant waswide-minimap 1254)
(defconstant waswide-vis-water 1075)
(defconstant waswide-vis-shrub 1956)
(defconstant waswide-vis-pris 874)
(defconstant rubblea-vis-pris2 2677)
(defconstant rubblea-vis-water 2416)
(defconstant loninsim-pris 3271)
(defconstant hangb-vis-tfrag 3028)
(defconstant ldmpckgn-pris 2348)
(defconstant ctygenb-minimap 219)
(defconstant ctygenb-sprite 222)
(defconstant ctygenb-vis-water 227)
(defconstant desliz-minimap 1654)
(defconstant desbcst-pris2 2763)
(defconstant deschase-pris 2961)
(defconstant sewb-vis-shrub 743)
(defconstant sewb-vis-pris 753)
(defconstant lbbring4-sprite 2906)
(defconstant forestx-vis-shrub 3316)
(defconstant lpattack-minimap 3235)
(defconstant ctyslumb-sprite 162)
(defconstant factorya-shrub 3011)
(defconstant factorya-pris 536)
(defconstant sewg-vis-pris 1133)
(defconstant sewg-vis-tfrag 1127)
(defconstant freecast-pris2 1968)
(defconstant freecast-pris 1967)
(defconstant ctyfarmb-sprite 253)
(defconstant ctyfarmb-vis-shrub 257)
(defconstant freehq-tfrag 798)
(defconstant ctyfarmb-vis-pris 256)
(defconstant ctyport-vis-tfrag 274)
(defconstant desertd-vis-shrub 1383)
(defconstant lfaccity-alpha 1951)
(defconstant wascityb-vis-water 842)
(defconstant factoryd-vis-shrub 2883)
(defconstant mhcitya-vis-tfrag 2342)
(defconstant wasleapr-water 1694)
(defconstant forestx-vis-alpha 3317)
(defconstant sewg-vis-water 1126)
(defconstant factoryc-vis-shrub 2235)
(defconstant precurd-vis-tfrag 2637)
(defconstant templeb-vis-pris 2628)
(defconstant lformach-vis-water 1519)
(defconstant ljkdxvin-pris 2601)
(defconstant templec-vis-water 2627)
(defconstant lformach-vis-pris 1518)
(defconstant lmhcityb-vis-tfrag 3141)
(defconstant desoasis-pris2 1605)
(defconstant precurb-vis-tfrag 2633)
(defconstant temp-shrub 3228)
(defconstant foresta-vis-alpha 1010)
(defconstant lwassig-sprite 1698)
(defconstant onintent-sprite 1157)
(defconstant intpfall-vis-water 1441)
(defconstant intpfall-vis-pris 1440)
(defconstant intpfall-vis-tfrag 1438)
(defconstant minee-tfrag 2140)
(defconstant lformach-sprite 3249)
(defconstant lbbsdrp3-sprite 3330)
(defconstant programmer 3)
(defconstant lctyhijk-tfrag 1580)
(defconstant slumbset-pris 2432)
(defconstant ldamklev-pris2 1323)
(defconstant ctyfarma-sprite 241)
(defconstant loutro3-shrub 3274)
(defconstant deswalk-vis-water 3134)
(defconstant templec-vis-tfrag 2620)
(defconstant hanga-sprite 1511)
(defconstant deswalk-vis-tfrag 2855)
(defconstant desertg-sprite 3409)
(defconstant desertg-vis-tfrag 1373)
(defconstant wasleapr-pris 1663)
(defconstant ctyport-vis-pris 272)
(defconstant desertd-vis-water 1381)
(defconstant lseemwca-pris2 2071)
(defconstant deserrol-water 3180)
(defconstant precurd-vis-pris 2639)
(defconstant lfacout-vis-alpha 3288)
(defconstant sewi-vis-pris 1130)
(defconstant desoasis-minimap 2408)
(defconstant ctyfarma-vis-pris 244)
(defconstant deserte-vis-tfrag 1380)
(defconstant lfacrm1-pris 2070)
(defconstant deserrol-pris 3179)
(defconstant precura-vis-pris 2638)
(defconstant sewi-vis-tfrag 1123)
(defconstant lfacout-vis-tfrag 3287)
(defconstant sewm-vis-shrub 1139)
(defconstant desert-sprite 1653)
(defconstant introcst-pris2 544)
(defconstant desbcst-pris 2762)
(defconstant sewm-vis-pris 1141)
(defconstant desbcst-water 2764)
(defconstant sewm-vis-tfrag 1138)
(defconstant desjump-water 2769)
(defconstant desjump-pris 2768)
(defconstant sewl-vis-pris 1145)
(defconstant deserta-vis-pris 3309)
(defconstant factorya-sprite 3102)
(defconstant introcst-sprite 1560)
(defconstant introcst-pris 540)
(defconstant ljak-pris 1527)
(defconstant precurb-vis-shrub 2636)
(defconstant mhctycst-water 2379)
(defconstant forestx-vis-tfrag 1838)
(defconstant sewh-vis-water 1131)
(defconstant sewh-vis-shrub 1129)
(defconstant sewh-vis-pris 1132)
(defconstant wasstada-sprite 591)
(defconstant ctyport-vis-shrub 273)
(defconstant desertd-vis-tfrag 1382)
(defconstant lfaccity-tfrag 1950)
(defconstant wascityb-vis-tfrag 841)
(defconstant factoryc-vis-alpha 2234)
(defconstant sewh-vis-tfrag 1125)
(defconstant stadiuma-vis-shrub 2815)
(defconstant hanga-hfrag 1503)
(defconstant deshover-tfrag 1920)
(defconstant hanga-vis-water 3029)
(defconstant hanga-vis-pris 3031)
(defconstant desrace2-pris 1408)
(defconstant hanga-vis-tfrag 3030)
(defconstant ldamklev-pris 1407)
(defconstant ljakcklv-pris 1542)
(defconstant towerb-vis-alpha 2651)
(defconstant towerb-vis-shrub 2652)
(defconstant forestx-vis-pris 1839)
(defconstant towerb-vis-pris 2948)
(defconstant ctyfarma-vis-alpha 243)
(defconstant sewf-vis-tfrag 757)
(defconstant factoryb-vis-pris 1866)
(defconstant lblowcst-pris 3032)
(defconstant desrace2-water 1409)
(defconstant lkeira-pris 2131)
(defconstant sewa-vis-shrub 800)
(defconstant ctyfarmb-vis-water 259)
(defconstant factoryd-sprite 2988)
(defconstant minec-vis-pris 932)
(defconstant freecast-water 1969)
(defconstant ctyslumc-sprite 170)
(defconstant combx-water 2334)
(defconstant volcanox-warp 2902)
(defconstant freehq-shrub 1793)
(defconstant museum3b-pris2 3416)
(defconstant wasstadc-water 1252)
(defconstant lctyhijk-pris 1835)
(defconstant lprecurc-vis-tfrag 2944)
(defconstant slumbset-water 2430)
(defconstant waschase-pris 1321)
(defconstant desboss2-pris2 3175)
(defconstant rubblea-vis-shrub 2066)
(defconstant ctypesa-pris 957)
(defconstant ldmpckgn-pris2 2349)
(defconstant ctysluma-minimap 131)
(defconstant wasintro-vis-tfrag 1213)
(defconstant level-default-sprite 4)
(defconstant minee-shrub 2141)
(defconstant lpattack-sprite 3250)
(defconstant lfacrm2-alpha 2168)
(defconstant ldampeck-pris 1086)
(defconstant ctypesc-pris 1244)
(defconstant ctysluma-vis-shrub 135)
(defconstant lfaccar-minimap 2867)
(defconstant ctypesb-pris 1758)
(defconstant lpattack-vis-tfrag 3408)
(defconstant towerc-tfrag 2299)
(defconstant forestb-vis-alpha 1117)
(defconstant sky-textures 8)
(defconstant desjump-tfrag 3220)
(defconstant templec-vis-pris 2706)
(defconstant deserte-vis-shrub 1597)
(defconstant arenacst-pris 1245)
(defconstant ctysluma-vis-tfrag 136)
(defconstant templea-vis-alpha 3057)
(defconstant level-default-minimap 9)
(defconstant desbattl-pris2 2173)
(defconstant lgunnorm-water 3170)
(defconstant factoryd-vis-tfrag 2881)
(defconstant mhcitya-vis-pris 2340)
(defconstant mhctycst-pris 2367)
(defconstant ljinx-pris 1826)
(defconstant templea-vis-pris2 2624)
(defconstant ctyslumb-vis-shrub 165)
(defconstant lvincst-warp 2870)
(defconstant sewa-vis-pris 741)
(defconstant destrack-water 1796)
(defconstant raila-shrub 2905)
(defconstant vinroom-sprite 1023)
(defconstant lkeira-water 2132)
(defconstant stadium-vis-tfrag 1591)
(defconstant templea-vis-pris 2621)
(defconstant wascityb-vis-shrub 843)
(defconstant sewo-vis-tfrag 1925)
(defconstant desertf-vis-tfrag 1384)
(defconstant templea-vis-tfrag 2616)
(defconstant ltowerb-vis-water 2655)
(defconstant loutro-pris 2682)
(defconstant desertc-vis-shrub 1573)
(defconstant lwassig-pris 1343)
(defconstant factoryd-vis-water 2885)
(defconstant ctyinda-vis-tfrag 180)
(defconstant oasiscst-pris 1600)
(defconstant desoasis-water 2114)
(defconstant towercst-tfrag 3223)
(defconstant towerc-pris 2302)
(defconstant templea-vis-water 2615)
(defconstant waswide-sprite 666)
(defconstant factoryd-vis-pris 2884)
(defconstant ctywide-vis-pris 125)
(defconstant mhcitya-vis-shrub 2343)
(defconstant ctyinda-vis-shrub 179)
(defconstant railb2-tfrag 2708)
(defconstant desresc-pris 1599)
(defconstant desertd-sprite 3384)
(defconstant gungame2-pris 2275)
(defconstant wasleapr-minimap 1707)
(defconstant stadiuma-vis-pris 2816)
(defconstant level-default-shrub 11)
(defconstant sewa-sprite 1411)
(defconstant lvincst-pris 2869)
(defconstant arenacst-pris2 1246)
(defconstant ltnjxhip-tfrag 2355)
(defconstant ljakc-pris 1466)
(defconstant minea-vis-pris 925)
(defconstant oasiscst-pris2 1601)
(defconstant towercst-shrub 3224)
(defconstant deswalk-vis-pris 2856)
(defconstant combe-tfrag 2599)
(defconstant ltowera-sprite 3248)
(defconstant desresc-water 1625)
(defconstant minec-vis-shrub 931)
(defconstant lblowcst-tfrag 3368)
(defconstant rubbleb-vis-shrub 2059)
(defconstant ctycarc-pris 950)
(defconstant level-default-water 5)
(defconstant minee-pris 2142)
(defconstant lprecurc-sprite 3251)
(defconstant ldampeck-pris2 1087)
(defconstant lwstdpck-pris 1367)
(defconstant ctyfarmb-vis-tfrag 258)
(defconstant forestb-vis-shrub 1116)
(defconstant level-default-pris 7)
(defconstant desoasis-pris 1603)
(defconstant precurd-vis-water 2712)
(defconstant templea-vis-shrub 2618)
(defconstant ltowera-vis-shrub 2645)
(defconstant ljaksig-pris 1536)
(defconstant lbbtcha3-water 3380)
(defconstant lbiped-pris 2901)
(defconstant ltowera-vis-tfrag 2644)
(defconstant ljakklev-pris 1541)
(defconstant towerb-vis-tfrag 2650)
(defconstant common 1)
(defconstant lbbsdrp1-sprite 3328)
(defconstant ctyfarmb-vis-alpha 255)
(defconstant sewb-vis-tfrag 742)
(defconstant templed-vis-pris2 2960)
(defconstant templed-vis-pris 2622)
(defconstant ctysluma-sprite 133)
(defconstant wasintro-vis-water 1215)
(defconstant desboss1-pris 1756)
(defconstant wasdoors-vis-tfrag 647)
(defconstant factoryd-vis-alpha 2882)
(defconstant ctyinda-sprite 177)
(defconstant lgunnorm-pris 3139)
(defconstant stadiuma-sprite 2598)
(defconstant rubblea-vis-tfrag 2065)
(defconstant ctypepa-pris 956)
(defconstant rubbleb-vis-water 2060)
(defconstant ctycarc-water 951)
(defconstant lprenme-pris 2956)
(defconstant lblowcst-water 3033)
(defconstant lfacrm2-tfrag 2167)
(defconstant lblowcst-sprite 3276)
(defconstant ltowera-vis-pris 2910)
(defconstant lprecurc-vis-pris 2964)
(defconstant sewd-vis-tfrag 746)
(defconstant templea-sprite 3043)
(defconstant level-default-warp 10)
(defconstant lblowcst-minimap 3094)
(defconstant minec-vis-tfrag 930)
(defconstant stadium-vis-pris 2553)
(defconstant ctyslumc-vis-shrub 173)
(defconstant factoryc-vis-water 2332)
(defconstant lctyhijk-water 1836)
(defconstant comba-tfrag 2431)
(defconstant wasdoors-vis-pris 1322)
(defconstant sewc-vis-pris 754)
(defconstant factoryb-vis-water 1863)
(defconstant hanga-minimap 1676)
(defconstant sewj-vis-tfrag 1135)
(defconstant wasdoors-vis-shrub 648)
(defconstant intpfall-vis-alpha 1439)
(defconstant wasdoors-minimap 1696)
(defconstant ljkdxvin-warp 2602)
(defconstant lnstoba-vis-pris 1520)
(defconstant lbbring3-sprite 2859)
(defconstant sewj-vis-pris 1137)
(defconstant wascityb-vis-pris 844)
(defconstant deserth-vis-tfrag 1385)
(defconstant sewo-vis-shrub 1926)
(defconstant loutro3-pris 3273)
(defconstant desresc-warp 1731)
(defconstant rubblec-vis-water 2057)
(defconstant ctycara-pris 948)
(defconstant ctyslumc-vis-tfrag 174)
(defconstant combx-tfrag 2333)
(defconstant wascityb-minimap 2360)
(defconstant wasstadc-pris 1251)
(defconstant railx-tfrag 2336)
(defconstant sewj-vis-shrub 1136)
(defconstant sewj-vis-water 1134)
(defconstant desert-vis-shrub 1702)
(defconstant nsta-vis-tfrag 593)
(defconstant factoryd-minimap 2736)
(defconstant desertf-vis-shrub 2871)
(defconstant ctyslumb-minimap 159)
(defconstant wasstadb-pris 1187)
(defconstant rublcst-vis-pris 3405)
(defconstant lmech-pris 2955)
(defconstant ctyfarmb-minimap 250)
(defconstant lctysnpr-tfrag 2220)
(defconstant environment-generic 2)
(defconstant lbbsdrp2-sprite 3329)
(defconstant gungame1-pris 2274)
(defconstant ltornsam-pris2 1165)
(defconstant nsta-vis-pris 795)
(defconstant towerb-vis-water 2949)
(defconstant nsta-vis-shrub 731)
(defconstant lwassig-minimap 1843)
(defconstant ctyslumb-vis-tfrag 166)
(defconstant lbombbot-minimap 2384)
(defconstant foresta-minimap 1302)
(defconstant desertf-vis-pris 2844)
(defconstant nsta-minimap 1072)
(defconstant lpattack-vis-pris 3263)
(defconstant lctysnpr-sprite 2154)
(defconstant lbbtcha3-sprite 3327)
(defconstant onintent-pris2 1163)
(defconstant ctyslumc-vis-water 1505)
(defconstant ctyslumc-minimap 167)
(defconstant lfreeout-tfrag 3158)
(defconstant ltnjxhip-pris 2049)
(defconstant museum3b-pris 3415)
(defconstant combx-pris 2306)
(defconstant factorya-water 535)
(defconstant towera-water 2699)
(defconstant lforplnt-vis-pris 2237)
(defconstant sewg-vis-shrub 1128)
(defconstant lctypatk-pris 1899)
(defconstant desjump-minimap 2766)
(defconstant deserth-vis-shrub 1995)
(defconstant factoryc-vis-pris 2305)
(defconstant precurd-sprite 3387)
(defconstant templex-sprite 2169)
(defconstant factoryc-sprite 3278)
(defconstant ctyindb-vis-pris 186)
(defconstant deshunt-water 1809)
(defconstant ctyindb-vis-shrub 187)
(defconstant ctyindb-minimap 181)
(defconstant ctywide-vis-tfrag 127)
(defconstant mhcityb-vis-tfrag 2345)
(defconstant lbbring2-sprite 2858)
(defconstant ltnfxhip-warp 2312)
(defconstant ltnfxhip-pris2 2311)
(defconstant lmhcitya-vis-tfrag 3142)
(defconstant minea-vis-tfrag 924)
(defconstant minea-vis-shrub 989)
(defconstant minea-vis-water 1727)
(defconstant mhcityb-vis-pris 2347)
(defconstant ctywide-vis-water 128)
(defconstant mhcityb-vis-shrub 2346)
(defconstant ldamsig-water 1089)
(defconstant outcast3-water 3307)
(defconstant mhcityb-minimap 2198)
(defconstant wasstadc-tfrag 1090)
(defconstant combd-tfrag 2199)
(defconstant lsigklv-water 2294)
(defconstant rublcst-vis-tfrag 3403)
(defconstant rublcst-vis-shrub 3404)
(defconstant rublcst-vis-pris2 3406)
(defconstant desrally-pris 2892)
(defconstant sewk-vis-shrub 1783)
(defconstant deschase-water 2962)
(defconstant sewc-vis-tfrag 744)
(defconstant desbattl-pris 1853)
(defconstant ctyindb-vis-tfrag 188)
(defconstant desbattl-minimap 2406)
(defconstant title-minimap 1324)
(defconstant sewe-vis-pris 756)
(defconstant factoryb-vis-alpha 1865)
(defconstant gamefont 12)
(defconstant sewk-vis-tfrag 1121)
(defconstant waspgame-pris 1662)
(defconstant desrally-water 2893)
(defconstant sewk-vis-pris 1784)
(defconstant ltornjnx-pris2 1479)
(defconstant lsnkwhls-pris 2588)
(defconstant slumbset-shrub 2429)
(defconstant lbombbot-pris 1320)
(defconstant ctyindb-sprite 184)
(defconstant lforplnt-minimap 2402)
(defconstant introcst-tfrag 1347)
(defconstant ctyfarma-minimap 238)
(defconstant level-default-tfrag 6)
(defconstant wasdefen-minimap 2224)
(defconstant lblowtmh-pris 2978)
(defconstant templed-vis-tfrag 2619)
(defconstant templed-vis-shrub 3101)
(defconstant ltowcity-tfrag 2530)
(defconstant ltowcity-alpha 2531)
(defconstant outrocst-pris 2596)
(defconstant powergd-water 3164)
(defconstant rubblec-vis-tfrag 2055)
(defconstant lwassig-water 1488)
(defconstant outrocst-pris2 2597)
(defconstant wascityb-sprite 947)
(defconstant rubblec-vis-shrub 2056)
(defconstant nstb-vis-tfrag 605)
(defconstant wascast-pris 1714)
(defconstant wascitya-vis-tfrag 632)
(defconstant lfacrm2-pris 3017)
(defconstant lkleever-pris 1394)
(defconstant lfacrm2-shrub 2282)
(defconstant waspgame-sprite 1561)
(defconstant desboss1-minimap 2643)
(defconstant desertg-vis-pris 1376)
(defconstant raile-tfrag 2485)
(defconstant desboss1-water 3172)
(defconstant rubblea-vis-pris 2067)
(defconstant ctypepb-pris 958)
(defconstant desboss1-pris2 3176)
(defconstant precura-vis-water 2635)
(defconstant deswalk-minimap 3385)
(defconstant freehq-pris 1167)
(defconstant sewm-vis-water 1140)
(defconstant powergd-pris 2249)
(defconstant ltnjxhip-pris2 2048)
(defconstant freehq-water 939)
(defconstant lfaccar-pris 2573)
(defconstant freehq-pris2 1464)
(defconstant waspala-tfrag 869)
(defconstant lctysnpr-minimap 3087)
(defconstant freehq-sprite 1035)
(defconstant ltorn-pris2 1463)
(defconstant wasleapr-sprite 1589)
(defconstant towera-pris 2698)
(defconstant vinroom-vis-pris 1024)
(defconstant lsamos-pris2 2133)
(defconstant stadium-vis-shrub 1592)
(defconstant halfpipe-water 510)
(defconstant arenacst-water 1248)
(defconstant lforplnt-sprite 2357)
(defconstant ctyfarma-vis-tfrag 246)
(defconstant ctyfarma-vis-shrub 245)
(defconstant ljinx-minimap 2552)
(defconstant desboss2-water 3036)
(defconstant sewo-vis-pris 1927)
(defconstant lctypatk-tfrag 1523)
(defconstant precura-vis-tfrag 2632)
(defconstant lctysnpr-pris 2091)
(defconstant precura-vis-shrub 2634)
(defconstant precura-minimap 2678)
(defconstant desert-vis-water 1744)
(defconstant wascitya-vis-pris 635)
(defconstant wascitya-vis-shrub 633)
(defconstant nstb-vis-shrub 606)
(defconstant placeholder 32767)
(defconstant desrescg-pris 1715)
(defconstant ctyslumb-vis-water 1743)
(defconstant wascitya-vis-water 634)
(defconstant nstb-vis-pris 607)
(defconstant desrescg-water 1716)
(defconstant templee-pris2 2909)
(defconstant sewc-vis-water 751)
(defconstant mineb-vis-pris 929)
(defconstant lctydest-tfrag 3147)
(defconstant lctydest-pris 2001)
(defconstant lctydest-water 2378)
(defconstant factoryb-vis-tfrag 1864)
(defconstant sewe-vis-water 755)
(defconstant lctydest-minimap 3197)
(defconstant sewe-vis-tfrag 748)
(defconstant title-pris 1830)
(defconstant precurd-vis-shrub 2912)
(defconstant gridcst-pris 2967)
(defconstant sewe-vis-shrub 749)
(defconstant deshunt-pris2 1808)
(defconstant waswide-vis-tfrag 873)
(defconstant raila-tfrag 3091)
(defconstant gungame-vis-shrub 1392)
(defconstant raila-pris 2501)
(defconstant waspala-pris2 872)
(defconstant raila-alpha 3090)
(defconstant raila-minimap 3015)
(defconstant sewc-vis-shrub 745)
(defconstant title-sprite 1854)
(defconstant ctyport-sprite 268)
(defconstant raild-tfrag 2486)
(defconstant desertb-vis-tfrag 1377)
(defconstant railb-tfrag 2487)
(defconstant desertb-vis-shrub 1378)
(defconstant desertb-vis-water 1379)
(defconstant lnstoba-vis-alpha 1521)
(defconstant lnstoba-vis-water 1522)
(defconstant sewl-vis-water 1142)
(defconstant museum3-pris 3360)
(defconstant sewl-vis-shrub 1144)
(defconstant museum3-water 3362)
(defconstant sewl-vis-tfrag 1143)
(defconstant museum3-pris2 3361)
(defconstant onintent-tfrag 1158)
(defconstant onintent-pris 1156)
(defconstant onintent-water 1159)
(defconstant stadium-vis-alpha 2514)
(defconstant sewn-vis-pris 1973)
(defconstant templed-vis-water 2623)
(defconstant wasstada-tfrag 405)
(defconstant wasstada-shrub 630)
(defconstant wasstada-alpha 609)
(defconstant museum-pris 3296)
(defconstant powergd-tfrag 2187)
(defconstant powergd-sprite 3181)
(defconstant slumbset-tfrag 2428)
(defconstant factoryb-minimap 1319)
(defconstant volcanox-shrub 1990)
(defconstant lctyass-pris 3099)
(defconstant mhcitya-sprite 2389)
(defconstant hiphog-vis-tfrag 1848)
(defconstant ctygenb-vis-shrub 225)
(defconstant ldamsig-pris2 1088)
(defconstant outcast3-pris 3306)
(defconstant mhcitya-minimap 2197)
(defconstant precurd-vis-pris2 3188)
(defconstant ltowerb-vis-pris 2653)
(defconstant ljkdmpk-pris2 1540)
(defconstant ltowerb-vis-alpha 2649)
(defconstant ltowerb-vis-pris2 2654)
(defconstant lnstcst-pris 1766)
(defconstant lnstcst-water 1768)
(defconstant lnstcst-pris2 1767)
(defconstant ltowera-vis-alpha 2646)
(defconstant ljaksig-pris2 1537)
(defconstant intpalrf-tfrag 428)
(defconstant ljkdmpk-pris 1539)
(defconstant ltowerb-vis-shrub 2648)
(defconstant intpalrf-alpha 430)
(defconstant towercst-pris 2983)
(defconstant intpfall-sprite 1007)
(defconstant towercst-alpha 3225)
(defconstant towercst-water 2985)
(defconstant towercst-pris2 2984)
(defconstant ctyport-minimap 265)
(defconstant desertg-vis-shrub 1374)
(defconstant railf-tfrag 2483)
(defconstant rubblea2-vis-water 2510)
(defconstant ctyinda-vis-pris 1401)
(defconstant ctyinda-minimap 175)
(defconstant ctyfarma-vis-water 247)
(defconstant waschase-minimap 1356)
(defconstant wascast-pris2 2323)
(defconstant wasintro-vis-shrub 1214)
(defconstant wasintro-hfrag 1037)
(defconstant ldampksm-pris2 1093)
(defconstant museum2-pris 3311)
(defconstant museum2-water 3313)
(defconstant museum2-pris2 3312)
(defconstant inttitle-minimap 1073)
(defconstant stadiuma-vis-tfrag 2814)
(defconstant stadiuma-minimap 2450)
(defconstant museum4b-pris 3417)
(defconstant desrace1-pris 1300)
(defconstant lnstobb-minimap 1867)
(defconstant desrally-minimap 2976)
(defconstant sewf-vis-shrub 758)
(defconstant rubbleb-vis-tfrag 2058)
(defconstant ctycarb-pris 949)
(defconstant sewf-vis-pris 759)
(defconstant lblowtkg-pris 2977)
(defconstant comba-alpha 2481)
(defconstant deserta-vis-tfrag 1372)
(defconstant templea-warp 2688)
(defconstant deserta-vis-shrub 1579)
(defconstant foresta-warp 3202)
(defconstant combb-tfrag 2189)
(defconstant wasstadc-minimap 1446)
(defconstant desertc-vis-tfrag 1371)
(defconstant intpalrf-shrub 429)
(defconstant ltowerb-vis-tfrag 2647)
(defconstant ljaksig-water 1538)
(defconstant sewi-vis-water 1122)
(defconstant halfpipe-tfrag 13)
(defconstant lctysnpr-water 2177)
(defconstant sewi-vis-shrub 1124)
(defconstant factoryc-vis-tfrag 2233)
(defconstant halfpipe-pris 15)
(defconstant wasdefen-pris 2527)
(defconstant desrace1-tfrag 1418)
(defconstant rubblea2-vis-tfrag 2508)
(defconstant desrace1-water 1399)
(defconstant sewn-vis-tfrag 1971)
(defconstant sewn-vis-shrub 1972)
(defconstant sewn-vis-water 1970)
(defconstant sewd-vis-pris 752)
(defconstant mineb-vis-water 1856)
(defconstant sewd-vis-shrub 747)
(defconstant gridcst-pris2 2968)
(defconstant sewd-vis-water 750)
(defconstant lsigklv-pris 2292)
(defconstant lfacctyb-vis-tfrag 3401)
(defconstant lsigklv-pris2 2293)
(defconstant lfacctyb-vis-alpha 3402)
(defconstant lformach-minimap 1555)
(defconstant nsta-sprite 446)
(defconstant lbbspid-pris 2664)
(defconstant foresta-vis-tfrag 773)
(defconstant foresta-vis-pris 774)
(defconstant volcanoa-sprite 2050)
(defconstant foresta-vis-shrub 941)
(defconstant foresta-vis-water 775)
(defconstant foresta-sprite 1357)
(defconstant lbbring5-sprite 2940)
(defconstant sewa-vis-tfrag 740)
(defconstant hiphog-vis-pris 1849)
(defconstant ctygenb-vis-tfrag 226)
(defconstant hiphog-sprite 895)
(defconstant ctygenb-vis-pris 224)
File diff suppressed because it is too large Load Diff
+22 -27
View File
@@ -55,12 +55,12 @@
)
(defmethod subtask-index-by-name ((this game-info) (arg0 string))
(let ((s5-0 (-> *game-info* sub-task-list)))
(dotimes (s4-0 (-> s5-0 length))
(when (nonzero? s4-0)
(let ((v1-4 (-> s5-0 s4-0)))
(let ((subtasks (-> *game-info* sub-task-list)))
(dotimes (i (-> subtasks length))
(when (nonzero? i)
(let ((v1-4 (-> subtasks i)))
(if (string= arg0 (-> v1-4 name))
(return s4-0)
(return i)
)
)
)
@@ -382,12 +382,7 @@
(when (or (and (-> subtask manager) (handle->process (-> subtask manager manager)))
(and (-> subtask manager)
(-> subtask manager level)
(let* ((a0-8 *level*)
(t9-2 (method-of-object a0-8 level-group-method-26))
(a1-1 (-> subtask manager level))
)
(= (t9-2 a0-8 a1-1) 'active)
)
(= (level-group-method-26 *level* (-> subtask manager level) (the-as int #f)) 'active)
)
(and (not (-> subtask manager)) (= (-> level info taskname) (-> subtask level)))
)
@@ -1964,39 +1959,39 @@
)
)
(defmethod get-rank ((this highscore-info) (arg0 float))
(let ((v0-0 0))
(defmethod get-rank ((this highscore-info) (score float))
(let ((place 0))
(cond
((logtest? (-> this flags) (highscore-flags time))
(cond
((= arg0 0.0)
((= score 0.0)
)
((>= (-> this gold-score) arg0)
(set! v0-0 3)
((>= (-> this gold-score) score)
(set! place 3)
)
((>= (-> this silver-score) arg0)
(set! v0-0 2)
((>= (-> this silver-score) score)
(set! place 2)
)
((>= (-> this bronze-score) arg0)
(set! v0-0 1)
((>= (-> this bronze-score) score)
(set! place 1)
)
)
)
(else
(cond
((>= arg0 (-> this gold-score))
(set! v0-0 3)
((>= score (-> this gold-score))
(set! place 3)
)
((>= arg0 (-> this silver-score))
(set! v0-0 2)
((>= score (-> this silver-score))
(set! place 2)
)
((>= arg0 (-> this bronze-score))
(set! v0-0 1)
((>= score (-> this bronze-score))
(set! place 1)
)
)
)
)
v0-0
place
)
)
+11 -12
View File
@@ -2308,7 +2308,7 @@
)
)
(print-game-text
(lookup-text! *common-text* (text-id text-00a0) #f)
(lookup-text! *common-text* (text-id progress-memcard-saving) #f)
gp-1
#f
44
@@ -2323,7 +2323,7 @@
(set! (-> v1-38 height) (the float 200))
)
(let ((s5-2 print-game-text))
(format (clear *temp-string*) (lookup-text! *common-text* (text-id text-00a4) #f) 1)
(format (clear *temp-string*) (lookup-text! *common-text* (text-id progress-memcard-remove-warn) #f) 1)
(s5-2 *temp-string* gp-1 #f 44 (bucket-id hud-draw-hud-alpha))
)
)
@@ -2334,13 +2334,7 @@
(let* ((s5-3 (-> *display* frames (-> *display* on-screen) global-buf))
(gp-2 (-> s5-3 base))
)
(let ((a0-39 (-> self icon))
(t9-14 (method-of-type hud-sprite draw))
(a1-12 s5-3)
(a2-10 (-> self level))
)
(t9-14 a0-39 a1-12 a2-10)
)
(draw (-> self icon) s5-3 (-> self level) #f)
(let ((a3-8 (-> s5-3 base)))
(when (!= gp-2 a3-8)
(let ((v1-55 (the-as object (-> s5-3 base))))
@@ -2403,7 +2397,12 @@
)
(set! (-> self starting-auto-save-status) (the-as basic (-> *setting-control* user-default auto-save)))
(set! (-> *setting-control* user-default auto-save) #f)
(set-vector! (-> self icon color) 128 128 128 128)
(let ((v1-61 (-> self icon color-ptr)))
(set! (-> v1-61 0) 128)
(set! (-> v1-61 1) 128)
(set! (-> v1-61 2) 128)
(set! (-> v1-61 3) 128)
)
(set! (-> self icon pos x) 440)
(set! (-> self icon pos y) 210)
(set! (-> self icon pos z) #xffffff)
@@ -2411,8 +2410,8 @@
(set! (-> self icon scale-x) 2.0)
(set! (-> self icon scale-y) 2.0)
(set! (-> self icon angle) 0.0)
(set! (-> self icon flags) (the-as uint 0))
(set! (-> self icon tex) (lookup-texture-by-id (new 'static 'texture-id :page #x9)))
(set! (-> self icon flags) (hud-sprite-flags))
(set! (-> self icon tid) (the-as texture-id (get-texture checkpoint level-default-minimap)))
(go-virtual get-heap)
)
+13 -10
View File
@@ -76,16 +76,16 @@
(defenum scene-controls
:type int64
:bitfield #t
; (channel)
; (anim-name)
; (dma-size)
; (bounds-spheres)
; (actors)
; (actor-marks)
; (special-fma-spheres)
; (scene-controls-7)
; (scene-controls-8)
; (display-controls)
(channel)
(anim-name)
(dma-size)
(bounds-spheres)
(actors)
(actor-marks)
(special-fma-spheres)
(scene-controls-7)
(scene-controls-8)
(display-controls)
)
;; ---main-h:scene-controls
@@ -168,6 +168,9 @@
)
;; ---main-h:ocean-height-hack
(define-extern *progress-cheat* symbol)
(define-extern *last-master-mode* symbol)
;; DECOMP BEGINS
(define *stats-poly* #f)
+1 -7
View File
@@ -1429,13 +1429,7 @@
(set! (-> s5-0 allow-error) (-> s4-0 allow-error))
(set! (-> s5-0 under-water-pitch-mod) (-> s4-0 under-water-pitch-mod))
(set! (-> s5-0 slow-time) (-> s4-0 slow-time))
(if (and (-> s4-0 mirror) (let* ((a0-55 *level*)
(t9-4 (method-of-object a0-55 level-group-method-26))
(a1-36 'ctywide)
)
(= (t9-4 a0-55 a1-36) 'active)
)
)
(if (and (-> s4-0 mirror) (= (level-group-method-26 *level* 'ctywide (the-as int #f)) 'active))
(set! (-> s5-0 mirror) #f)
(set! (-> s5-0 mirror) (-> s4-0 mirror))
)
@@ -52,6 +52,10 @@
(define-extern task-close! (function string symbol))
(define-extern task-node-index-by-name (function string int))
(define-extern restart-mission (function int))
(define-extern play-task (function game-task symbol symbol string))
(define-extern play-clean (function symbol int))
;; DECOMP BEGINS
(defun-debug game-task->string ((task game-task))
@@ -1434,13 +1438,13 @@
(text-name text-id)
(pre-play-node game-task-node)
(kiosk-play-node game-task-node)
(pre-play-continue string)
(pre-play-continue object)
(play-node game-task-node)
(play-continue string)
(kiosk-play-continue object)
)
(:methods
(game-task-info-method-9 (_type_) none)
(get-play-list-idx (_type_) int)
)
)
+1 -1
View File
@@ -33,7 +33,7 @@ These path-controls are typically allocated on a process heap."
(:methods
(new (symbol type process symbol float entity symbol) _type_)
(path-control-method-9 (_type_) none)
(path-control-method-10 () none)
(get-point-in-path! (_type_ vector float symbol) vector)
(path-control-method-11 () none)
(path-control-method-12 () none)
(path-control-method-13 () none)
+1
View File
@@ -16,6 +16,7 @@
(right 4)
(large 5)
(pc-hack 6)
(ff7 7)
)
;; ---font-flags
@@ -5,6 +5,7 @@
;; name in dgo: ripple
;; dgos: GAME
(define-extern ripple-find-height (function process-drawable int vector float))
(define-extern ripple-make-request (function ripple-wave merc-effect none))
;; DECOMP BEGINS
+2
View File
@@ -7,6 +7,8 @@
(define-extern set-graphics-mode (function none))
(define-extern get-video-mode (function symbol))
(define-extern get-aspect-ratio (function symbol))
(define-extern set-progressive-scan (function symbol none))
;; DECOMP BEGINS
+1 -1
View File
@@ -410,7 +410,7 @@
(wait-to-vu0 uint32)
)
(:methods
(ocean-method-11 () none)
(get-height (_type_ vector symbol) float)
(ocean-method-12 () none)
(ocean-method-13 () none)
(ocean-method-14 () none)
@@ -7,3 +7,228 @@
;; DECOMP BEGINS
(deftype color-array (inline-array-class)
((data rgbaf :inline :dynamic)
)
)
(set! (-> color-array heap-base) (the-as uint 16))
(deftype light-trail-composition (structure)
((color-mode uint64)
(color-curve curve-color-piecewise)
(color-repeat-dist float)
(alpha-1-mode uint64)
(alpha-2-mode uint64)
(base-alpha float)
(alpha-curve-1 curve2d-piecewise)
(alpha-curve-2 curve2d-piecewise)
(alpha-repeat-dist float)
(width-mode uint64)
(base-width float)
(width-curve curve2d-piecewise)
(width-repeat-dist float)
(uv-mode uint64)
(uv-repeat-dist float)
(max-age time-frame)
(tex-id uint32)
(lie-mode uint64)
(lie-vector vector :inline)
(zbuffer? symbol)
(use-tape-mode? symbol)
(blend-mode uint64)
(frame-stagger uint8)
)
)
(deftype light-trail-breadcrumb (structure)
((pos vector :inline)
(birth-time uint32 :overlay-at (-> pos data 3))
)
)
(deftype breadcrumb-array (inline-array-class)
((data light-trail-breadcrumb :dynamic)
)
)
(set! (-> breadcrumb-array heap-base) (the-as uint 16))
(deftype light-trail (basic)
((crumb-array (array light-trail-breadcrumb))
(crumb-size uint8)
(crumb-count int16)
(max-crumb-count int16)
(appearance light-trail-composition)
(start-marker uint64)
(end-marker uint64)
(decision uint64)
(total-distance-traveled float)
(strip prim-strip)
(strip2 prim-strip)
(cache-vector vector 4 :inline)
)
(:methods
(light-trail-method-9 (_type_ light-trail-composition int) none)
(light-trail-method-10 (_type_) none)
(light-trail-method-11 (_type_ vector time-frame) int)
(light-trail-method-12 (_type_) none)
(light-trail-method-13 (_type_) int)
(light-trail-method-14 (_type_) none)
(light-trail-method-15 (_type_) none)
(add-vert! (_type_ prim-strip vector float float float) none)
(light-trail-method-17 (_type_ vector float float vector float) symbol)
(light-trail-method-18 (_type_ light-trail-breadcrumb int vector vector) none)
(light-trail-method-19 (_type_ float int) none)
(reset-crumbs! (_type_) none)
(light-trail-method-21 (_type_ vector) none)
)
)
(deftype weapon-trail-crumb (light-trail-breadcrumb)
((offset vector :inline)
)
)
(deftype weapon-trail (light-trail)
()
(:methods
(weapon-trail-method-22 (_type_ vector vector) light-trail-breadcrumb)
(weapon-trail-method-23 (_type_ vector vector) none)
)
)
(deftype tread-trail-crumb (light-trail-breadcrumb)
((normal vector :inline)
)
)
(deftype tread-trail (light-trail)
()
(:methods
(tread-trail-method-22 (_type_ vector vector) light-trail-breadcrumb)
(tread-trail-method-23 (_type_ vector vector) light-trail-breadcrumb)
)
)
(deftype light-trail-tracker-spawn-params (structure)
((appearance light-trail-composition)
(max-num-crumbs int32)
(tracked-obj handle)
(track-immediately? symbol)
)
)
(deftype weapon-trail-tracker-spawn-params (light-trail-tracker-spawn-params)
((joint0 int16)
(joint1 int16)
)
)
(deftype light-trail-tracker (process)
((trail light-trail)
(tracked-object handle)
(offscreen? symbol)
(offscreen-start-time time-frame)
(next-line-check-time time-frame)
(last-add-frame-val uint32)
)
(:state-methods
tracking
die
)
(:methods
(light-trail-tracker-method-16 (_type_ process-focusable vector) vector)
(light-trail-tracker-method-17 (_type_ process-focusable) symbol)
(light-trail-tracker-method-18 (_type_ process-focusable) symbol)
(light-trail-tracker-method-19 (_type_) symbol)
(light-trail-tracker-method-20 (_type_ vector) none)
)
)
(deftype weapon-trail-tracker (light-trail-tracker)
((trail weapon-trail :override)
(joint0 int16)
(joint1 int16)
(state-time time-frame)
)
(:state-methods
hang-on
)
)
(deftype tread-trail-tracker (light-trail-tracker)
((trail tread-trail :override)
)
)
(defbehavior light-trail-tracker-init-by-other light-trail-tracker ((arg0 light-trail-tracker-spawn-params))
(stack-size-set! (-> self main-thread) 32)
(set! (-> self tracked-object) (-> arg0 tracked-obj))
(set! (-> self trail) (new 'process 'light-trail))
(set! (-> self next-line-check-time) 0)
(set! (-> self last-add-frame-val) (the-as uint 0))
(set! (-> self offscreen?) #f)
(light-trail-method-9 (-> self trail) (-> arg0 appearance) (-> arg0 max-num-crumbs))
(when (-> arg0 track-immediately?)
(let ((gp-1 (handle->process (-> self tracked-object))))
(if (light-trail-tracker-method-17 self (the-as process-focusable gp-1))
(light-trail-method-11
(-> self trail)
(light-trail-tracker-method-16 self (the-as process-focusable gp-1) (new 'stack-no-clear 'vector))
(seconds 10000)
)
)
)
)
(go-virtual tracking)
)
(defbehavior weapon-trail-tracker-init-by-other weapon-trail-tracker ((arg0 weapon-trail-tracker-spawn-params))
(set! (-> self tracked-object) (-> arg0 tracked-obj))
(set! (-> self trail) (new 'process 'weapon-trail))
(set! (-> self next-line-check-time) 0)
(set! (-> self last-add-frame-val) (the-as uint 0))
(set! (-> self joint0) (-> arg0 joint0))
(set! (-> self joint1) (-> arg0 joint1))
(set! (-> self offscreen?) #f)
(light-trail-method-9 (-> self trail) (-> arg0 appearance) (-> arg0 max-num-crumbs))
(go-virtual tracking)
)
(defbehavior tread-trail-tracker-init-by-other tread-trail-tracker ((arg0 light-trail-tracker-spawn-params))
(set! (-> self tracked-object) (-> arg0 tracked-obj))
(set! (-> self trail) (new 'process 'tread-trail))
(set! (-> self offscreen?) #f)
(set! (-> self next-line-check-time) 0)
(set! (-> self last-add-frame-val) (the-as uint 0))
(light-trail-method-9 (-> self trail) (-> arg0 appearance) (-> arg0 max-num-crumbs))
(go-virtual tracking)
)
(deftype light-trail-tracker-water (light-trail-tracker)
()
)
(deftype light-trail-tracker-projectile (light-trail-tracker)
((state-time time-frame)
)
(:state-methods
hang-on
)
)
File diff suppressed because it is too large Load Diff
@@ -38,6 +38,13 @@
;; ---sp-cpuinfo-flag
(defmacro .movz (result value check original)
`(if (= ,check 0)
(set! ,result (the-as int ,value))
(set! ,result (the-as int ,original))
)
)
;; DECOMP BEGINS
(define *sp-60-hz* #t)
@@ -117,5 +124,7 @@ There are separate systems for different modes of sprite rendering: 2D/billboard
)
)
(define-extern sp-kill-particle (function sparticle-system sparticle-cpuinfo symbol))
(define-extern *sp-particle-system-2d* sparticle-system)
(define-extern *sp-particle-system-3d* sparticle-system)
@@ -303,7 +303,10 @@
`(new 'static 'sp-field-init-spec :field (sp-field-id ,field-enum-name) :initial-value (sp-cpuinfo-flag ,@param0) :random-mult 1)
)
((eq? field-name 'texture)
`(new 'static 'sp-field-init-spec :field (sp-field-id ,field-enum-name) :tex ,param0 :flags (sp-flag int))
(if (eq? (car param0) 'new)
`(new 'static 'sp-field-init-spec :field (sp-field-id ,field-enum-name) :tex ,param0 :flags (sp-flag int))
`(new 'static 'sp-field-init-spec :field (sp-field-id ,field-enum-name) :tex ,(string->symbol-format "{}-{}" (car param0) (cadr param0)) :flags (sp-flag int))
)
)
((eq? field-name 'next-launcher)
`(new 'static 'sp-field-init-spec :field (sp-field-id ,field-enum-name) :initial-value ,param0 :flags (sp-flag launcher))
@@ -585,6 +588,7 @@ particle system itself. This type just holds the launching-related state."
(the float (sar (shl (the int (atan (-> arg0 y) (* -1.0 (-> arg0 x)))) 48) 48))
)
(define-extern sparticle-motion-blur (function sparticle-system sparticle-cpuinfo vector none))
(define-extern sp-launch-particles-var (function sparticle-system sparticle-launcher matrix sparticle-launch-state sparticle-launch-control float none))
(define-extern *part-id-table* (array sparticle-launcher))
(define-extern *part-group-id-table* (array sparticle-launch-group))
@@ -1279,3 +1279,10 @@ of the texture."
(define *grey-scale-base* (new 'static 'texture-base))
(define *map-texture-base* (new 'static 'texture-base))
(defmacro get-texture (name tpage)
`(lookup-texture-by-id ,(string->symbol-format "{}-{}" name tpage))
)
(import "goal_src/jak3/engine/data/tpages.gc")
(import "goal_src/jak3/engine/data/textures.gc")
+9 -9
View File
@@ -1436,9 +1436,9 @@
"Turn on masks for skull gem textures, so they will be uploaded."
(local-vars (v0-3 uint128) (v1-2 uint128) (v1-3 uint128))
(let ((gp-0 (-> *level* level-default texture-mask)))
(let* ((s5-0 (lookup-texture-by-id (new 'static 'texture-id :index #x17 :page #x6)))
(s4-0 (lookup-texture-by-id (new 'static 'texture-id :index #x18 :page #x6)))
(a0-4 (lookup-texture-by-id (new 'static 'texture-id :index #x19 :page #x6)))
(let* ((s5-0 (get-texture skull-gem-alpha-00 level-default-tfrag))
(s4-0 (get-texture skull-gem-alpha-01 level-default-tfrag))
(a0-4 (get-texture skull-gem-alpha-02 level-default-tfrag))
(v1-1 (-> gp-0 0 mask quad))
(a1-0 (-> s5-0 masks data 0 mask quad))
(a2-0 (-> s4-0 masks data 0 mask quad))
@@ -1655,7 +1655,7 @@
(set! (-> v1-6 base) (-> v1-6 data))
(set! (-> v1-6 end) (the-as pointer (+ (+ (-> v1-6 allocated-length) 28) (the-as int v1-6))))
)
(let ((s2-0 (lookup-texture-by-id (new 'static 'texture-id :index #x1 :page #xc)))
(let ((s2-0 (get-texture font.12lo gamefont))
(s1-0 #xc2000)
(s0-0 36)
)
@@ -1664,7 +1664,7 @@
(font-set-tex0 (the-as (pointer gs-tex0) (-> *font-work* small-font-0-tmpl)) s2-0 s1-0 s0-0 sv-20)
(font-set-tex0 (the-as (pointer gs-tex0) (-> *font-work* small-font-2-tmpl)) s2-0 s1-0 s0-0 sv-20)
)
(let ((s3-1 (lookup-texture-by-id (new 'static 'texture-id :page #xc)))
(let ((s3-1 (get-texture font.12hi gamefont))
(s2-1 #xc2000)
(s1-1 44)
)
@@ -1673,7 +1673,7 @@
(font-set-tex0 (the-as (pointer gs-tex0) (-> *font-work* small-font-1-tmpl)) s3-1 s2-1 s1-1 sv-20)
(font-set-tex0 (the-as (pointer gs-tex0) (-> *font-work* small-font-3-tmpl)) s3-1 s2-1 s1-1 sv-20)
)
(let ((s3-2 (lookup-texture-by-id (new 'static 'texture-id :index #x4 :page #xc)))
(let ((s3-2 (get-texture font.24lo gamefont))
(s2-2 #x90000)
(s1-2 36)
)
@@ -1681,7 +1681,7 @@
(texture-relocate s4-0 s3-2 s2-2 (the-as gs-psm s1-2) -1)
(font-set-tex0 (the-as (pointer gs-tex0) (-> *font-work* large-font-0-tmpl)) s3-2 s2-2 s1-2 sv-20)
)
(let ((s3-3 (lookup-texture-by-id (new 'static 'texture-id :index #x2 :page #xc)))
(let ((s3-3 (get-texture font.24hi gamefont))
(s2-3 #x90000)
(s1-3 44)
)
@@ -1689,7 +1689,7 @@
(texture-relocate s4-0 s3-3 s2-3 (the-as gs-psm s1-3) -1)
(font-set-tex0 (the-as (pointer gs-tex0) (-> *font-work* large-font-1-tmpl)) s3-3 s2-3 s1-3 sv-20)
)
(let ((s3-4 (lookup-texture-by-id (new 'static 'texture-id :index #x5 :page #xc)))
(let ((s3-4 (get-texture font.24lo2 gamefont))
(s2-4 #x5e000)
(s1-4 36)
)
@@ -1697,7 +1697,7 @@
(texture-relocate s4-0 s3-4 s2-4 (the-as gs-psm s1-4) -1)
(font-set-tex0 (the-as (pointer gs-tex0) (-> *font-work* large-font-2-tmpl)) s3-4 s2-4 s1-4 sv-20)
)
(let ((s3-5 (lookup-texture-by-id (new 'static 'texture-id :index #x3 :page #xc)))
(let ((s3-5 (get-texture font.24hi2 gamefont))
(s2-5 #x5e000)
(s1-5 44)
)
+1 -1
View File
@@ -479,7 +479,7 @@
(level-group-method-23 () none)
(level-group-method-24 () none)
(level-group-method-25 () none)
(level-group-method-26 (_type_ symbol) symbol)
(level-group-method-26 (_type_ symbol int) symbol)
(level-group-method-27 () none)
(level-group-method-28 (_type_) symbol)
(level-group-method-29 () none)
+3
View File
@@ -7,6 +7,7 @@
(declare-type grid-hash structure)
(declare-type sphere-hash structure)
(declare-type nav-mesh basic)
(defenum nav-mesh-flag
:type uint8
@@ -16,6 +17,8 @@
)
(define-extern nav-mesh-connect-from-ent (function process-drawable symbol))
(define-extern find-nearest-nav-mesh (function vector float nav-mesh))
(define-extern get-nav-mesh (function actor-id nav-mesh))
;; DECOMP BEGINS
+4 -3
View File
@@ -57,6 +57,7 @@
)
;; ---ragdoll-flag
(define-extern ragdoll-other-joint-callback (function cspace transformq none :behavior ragdoll-proc))
;; DECOMP BEGINS
@@ -186,9 +187,9 @@
(ragdoll-method-10 (_type_ process-drawable symbol vector symbol) none)
(turn-off-for-duration! (_type_ time-frame) none)
(get-parent-joint (_type_ (inline-array ragdoll-joint)) ragdoll-joint)
(ragdoll-method-13 (_type_ ragdoll-edit-info) none)
(ragdoll-method-14 (_type_) none)
(ragdoll-method-15 (_type_ process-drawable matrix) none)
(ragdoll-method-13 (_type_ ragdoll-edit-info ragdoll-joint matrix matrix) none)
(ragdoll-method-14 (_type_ process-drawable ragdoll-joint object matrix) none)
(ragdoll-method-15 (_type_ process-drawable ragdoll-edit-info) none)
(ragdoll-setup! (_type_ process-drawable ragdoll-setup) none)
(ragdoll-method-17 (_type_ process-drawable) none)
(ragdoll-method-18 (_type_) none)
File diff suppressed because it is too large Load Diff
@@ -21,6 +21,8 @@
(define-extern ja-frame-num (function int float :behavior process-drawable))
(define-extern ja-aframe (function float int float :behavior process-drawable))
(define-extern dma-add-process-drawable-hud (function process-drawable draw-control float dma-buffer none))
;; DECOMP BEGINS
;; WARN: Return type mismatch object vs cspace.
+4
View File
@@ -10,6 +10,10 @@
:type uint32
)
(declare-type scene-player process-drawable)
(define-extern scene-player-init (function object symbol string none :behavior scene-player))
;; DECOMP BEGINS
(deftype scene-actor (basic)
@@ -10,7 +10,7 @@
;; DECOMP BEGINS
(defpart 623
:init-specs ((:texture (new 'static 'texture-id :index #xf :page #x4))
:init-specs ((:texture (glow-soft level-default-sprite))
(:num 1.0)
(:scale-x (meters 3))
(:rot-x (degrees 2.25))
+2 -12
View File
@@ -658,12 +658,7 @@
(dotimes (s5-0 (-> arg0 want-count))
(when (not (or (not (-> arg0 want s5-0 name))
(not (-> arg0 want s5-0 display?))
(let* ((a0-73 *level*)
(t9-37 (method-of-object a0-73 level-group-method-26))
(a1-44 (-> arg0 want s5-0 name))
)
(= (t9-37 a0-73 a1-44) 'active)
)
(= (level-group-method-26 *level* (-> arg0 want s5-0 name) (the-as int #f)) 'active)
)
)
(set! v1-126 #t)
@@ -674,12 +669,7 @@
(dotimes (s4-0 10)
(when (not (or (not (-> s5-1 want s4-0 name))
(not (-> s5-1 want s4-0 display?))
(let* ((a0-75 *level*)
(t9-38 (method-of-object a0-75 level-group-method-26))
(a1-45 (-> s5-1 want s4-0 name))
)
(= (t9-38 a0-75 a1-45) 'active)
)
(= (level-group-method-26 *level* (-> s5-1 want s4-0 name) (the-as int #f)) 'active)
)
)
(set! v1-126 #t)
@@ -53,7 +53,7 @@
)
(defpart 661
:init-specs ((:texture (new 'static 'texture-id :index #x4b :page #x4))
:init-specs ((:texture (starflash level-default-sprite))
(:num 1.0)
(:scale-x (meters 5))
(:rot-x (degrees 2250))
@@ -73,7 +73,7 @@
)
(defpart 662
:init-specs ((:texture (new 'static 'texture-id :index #x3d :page #x4))
:init-specs ((:texture (middot level-default-sprite))
(:num 200.0)
(:scale-x (meters 0.05) (meters 0.05))
(:scale-y :copy scale-x)
@@ -94,7 +94,7 @@
)
(defpart 663
:init-specs ((:texture (new 'static 'texture-id :index #xa0 :page #x4))
:init-specs ((:texture (big-cloud level-default-sprite))
(:num 30.0)
(:scale-x (meters 1) (meters 2))
(:rot-z (degrees 0) (degrees 360))
+24 -24
View File
@@ -22,7 +22,7 @@
)
(defpart 630
:init-specs ((:texture (new 'static 'texture-id :index #x80 :page #x4))
:init-specs ((:texture (vol-light level-default-sprite))
(:num 1.0)
(:x (meters 0))
(:y (meters 0))
@@ -45,7 +45,7 @@
)
(defpart 631
:init-specs ((:texture (new 'static 'texture-id :index #x80 :page #x4))
:init-specs ((:texture (vol-light level-default-sprite))
(:num 1.0)
(:x (meters 0))
(:y (meters 0))
@@ -68,7 +68,7 @@
)
(defpart 632
:init-specs ((:texture (new 'static 'texture-id :index #x80 :page #x4))
:init-specs ((:texture (vol-light level-default-sprite))
(:num 1.0)
(:x (meters 0))
(:y (meters 0))
@@ -91,7 +91,7 @@
)
(defpart 633
:init-specs ((:texture (new 'static 'texture-id :index #x80 :page #x4))
:init-specs ((:texture (vol-light level-default-sprite))
(:num 1.0)
(:x (meters 0))
(:y (meters 0))
@@ -114,7 +114,7 @@
)
(defpart 634
:init-specs ((:texture (new 'static 'texture-id :index #x96 :page #x4))
:init-specs ((:texture (diamond-star level-default-sprite))
(:num 1.0)
(:x (meters -0.5) (meters 1))
(:y (meters 0) (meters 8))
@@ -149,7 +149,7 @@
)
(defpart 636
:init-specs ((:texture (new 'static 'texture-id :index #x93 :page #x4))
:init-specs ((:texture (colorflash level-default-sprite))
(:num 1.0)
(:scale-x (meters 20))
(:rot-x (degrees 22.5))
@@ -182,7 +182,7 @@
)
(defpart 637
:init-specs ((:texture (new 'static 'texture-id :index #x93 :page #x4))
:init-specs ((:texture (colorflash level-default-sprite))
(:num 1.0)
(:scale-x (meters 20))
(:rot-x (degrees 22.5))
@@ -204,7 +204,7 @@
)
(defpart 638
:init-specs ((:texture (new 'static 'texture-id :index #x94 :page #x4))
:init-specs ((:texture (rainbow-halo level-default-sprite))
(:num 1.0)
(:scale-x (meters 10))
(:rot-x (degrees 22.5))
@@ -226,7 +226,7 @@
)
(defpart 639
:init-specs ((:texture (new 'static 'texture-id :index #x3d :page #x4))
:init-specs ((:texture (middot level-default-sprite))
(:num 60.0)
(:y (meters -1.5) (meters 3))
(:scale-x (meters 0.05) (meters 0.05))
@@ -283,7 +283,7 @@
)
(defpart 642
:init-specs ((:texture (new 'static 'texture-id :index #x80 :page #x4))
:init-specs ((:texture (vol-light level-default-sprite))
(:num 0.1 0.1)
(:x (meters 0))
(:y (meters 0))
@@ -313,7 +313,7 @@
)
(defpart 643
:init-specs ((:texture (new 'static 'texture-id :index #x80 :page #x4))
:init-specs ((:texture (vol-light level-default-sprite))
(:num 0.1 0.1)
(:x (meters 0))
(:y (meters 0))
@@ -339,7 +339,7 @@
)
(defpart 644
:init-specs ((:texture (new 'static 'texture-id :index #x80 :page #x4))
:init-specs ((:texture (vol-light level-default-sprite))
(:num 0.1 0.1)
(:x (meters 0))
(:y (meters 0))
@@ -366,7 +366,7 @@
)
(defpart 645
:init-specs ((:texture (new 'static 'texture-id :index #x80 :page #x4))
:init-specs ((:texture (vol-light level-default-sprite))
(:num 0.1 0.1)
(:x (meters 0))
(:y (meters 0))
@@ -393,7 +393,7 @@
)
(defpart 646
:init-specs ((:texture (new 'static 'texture-id :index #x96 :page #x4))
:init-specs ((:texture (diamond-star level-default-sprite))
(:num 0.5 0.5)
(:x (meters -0.5) (meters 1))
(:y (meters 0) (meters 8))
@@ -420,7 +420,7 @@
)
(defpart 647
:init-specs ((:texture (new 'static 'texture-id :index #x64 :page #x4))
:init-specs ((:texture (laser-hit2 level-default-sprite))
(:num 1.0)
(:y (meters 2))
(:scale-x (meters 10) (meters 5))
@@ -439,7 +439,7 @@
)
(defpart 650
:init-specs ((:texture (new 'static 'texture-id :index #xf :page #x4))
:init-specs ((:texture (glow-soft level-default-sprite))
(:num 1.0)
(:y (meters -0.025))
(:scale-x (meters 0.2))
@@ -456,7 +456,7 @@
)
(defpart 651
:init-specs ((:texture (new 'static 'texture-id :index #xd :page #x4))
:init-specs ((:texture (glow level-default-sprite))
(:num 1.0)
(:scale-x (meters 10.5) (meters 0.25))
(:rot-x (degrees 11.25))
@@ -502,7 +502,7 @@
)
(defpart 653
:init-specs ((:texture (new 'static 'texture-id :index #x3d :page #x4))
:init-specs ((:texture (middot level-default-sprite))
(:num 1.0)
(:y (meters -1) (meters 2))
(:scale-x (meters 1))
@@ -517,7 +517,7 @@
)
(defpart 652
:init-specs ((:texture (new 'static 'texture-id :index #x3d :page #x4))
:init-specs ((:texture (middot level-default-sprite))
(:num 1.0 3.0)
(:z (meters 2) (meters 1))
(:scale-x (meters 0.05) (meters 0.05))
@@ -545,7 +545,7 @@
)
(defpart 654
:init-specs ((:texture (new 'static 'texture-id :index #x19 :page #x4))
:init-specs ((:texture (lakedrop level-default-sprite))
(:num 1.0)
(:scale-x (meters 6.1))
(:rot-x (degrees 11.25))
@@ -571,7 +571,7 @@
)
(defpart 655
:init-specs ((:texture (new 'static 'texture-id :index #xe :page #x4))
:init-specs ((:texture (glow-hotdot level-default-sprite))
(:num 1.0)
(:scale-x (meters 1.5))
(:scale-y :copy scale-x)
@@ -600,7 +600,7 @@
)
(defpart 658
:init-specs ((:texture (new 'static 'texture-id :index #x4b :page #x4))
:init-specs ((:texture (starflash level-default-sprite))
(:num 1.0)
(:scale-x (meters 5))
(:rot-x (degrees 2250))
@@ -620,7 +620,7 @@
)
(defpart 657
:init-specs ((:texture (new 'static 'texture-id :index #x3d :page #x4))
:init-specs ((:texture (middot level-default-sprite))
(:num 100.0)
(:scale-x (meters 0.1) (meters 0.1))
(:scale-y :copy scale-x)
@@ -641,7 +641,7 @@
)
(defpart 656
:init-specs ((:texture (new 'static 'texture-id :index #xa0 :page #x4))
:init-specs ((:texture (big-cloud level-default-sprite))
(:num 30.0)
(:scale-x (meters 1) (meters 2))
(:rot-z (degrees 0) (degrees 360))
+3 -3
View File
@@ -62,11 +62,11 @@
(new (symbol type) _type_)
(bigmap-method-9 () none)
(bigmap-method-10 () none)
(bigmap-method-11 () none)
(draw (_type_ int int int int) int)
(bigmap-method-12 () none)
(bigmap-method-13 () none)
(bigmap-method-14 () none)
(bigmap-method-15 () none)
(enable-drawing (_type_) none)
(disable-drawing (_type_) int)
(bigmap-method-16 (_type_) none)
(bigmap-method-17 () none)
(bigmap-method-18 () none)
File diff suppressed because it is too large Load Diff
+57 -32
View File
@@ -19,6 +19,30 @@
(define-extern hide-hud (function symbol none))
(define-extern show-hud (function object none))
;; +++hud-sprite-flags
(defenum hud-sprite-flags
:type uint32
:bitfield #t
(hsf0 0)
(hsf1 1)
(hsf2 2)
(hsf3 3)
(hsf4 4)
(hsf5 5)
(hsf6 6)
(hsf7 7)
(hsf8 8)
(hsf9 9)
(hsf10 10)
(hsf11 11)
(hsf12 12)
(hsf13 13)
(hsf14 14)
(hsf15 15)
)
;; ---hud-sprite-flags
;; DECOMP BEGINS
(deftype hud-string (structure)
@@ -33,21 +57,22 @@
(deftype hud-sprite (structure)
((pos vector4w :inline)
(offset-x float :overlay-at (-> pos data 0))
(offset-y float :overlay-at (-> pos data 1))
(color vector4w :inline)
(flags uint32)
(scale-x float)
(scale-y float)
(angle float)
(tex texture)
(tid uint32 :overlay-at tex)
((pos vector4w :inline)
(offset-x float :overlay-at (-> pos data 0))
(offset-y float :overlay-at (-> pos data 1))
(color vector4w :inline)
(color-ptr int32 4 :overlay-at (-> color data 0))
(flags hud-sprite-flags)
(scale-x float)
(scale-y float)
(angle float)
(tex texture)
(tid texture-id :overlay-at tex)
)
(:methods
(draw (_type_ dma-buffer level) none)
(hud-sprite-method-10 () none)
(hud-sprite-method-11 () none)
(draw (_type_ dma-buffer level symbol) none)
(hud-sprite-method-10 (_type_ dma-buffer level int int int int) object)
(hud-sprite-method-11 (_type_ hud-sprite vector4w int int) none)
)
)
@@ -59,11 +84,11 @@
(color vector4w :inline)
)
(:methods
(hud-box-method-9 () none)
(hud-box-method-10 () none)
(hud-box-method-11 () none)
(hud-box-method-12 () none)
(hud-box-method-13 () none)
(draw-box-prim-only (_type_ dma-buffer) none)
(draw-box-alpha-1 (_type_ dma-buffer) none)
(draw-box-alpha-2 (_type_ dma-buffer) none)
(draw-box-alpha-3 (_type_ dma-buffer) none)
(draw-scan-and-line (_type_ dma-buffer float) int)
)
)
@@ -102,25 +127,25 @@
(gui-id sound-id)
)
(:methods
(hud-method-14 () none)
(hud-method-15 () none)
(hud-method-16 () none)
(hud-method-17 () none)
(hud-method-18 () none)
(hud-method-19 () none)
(hud-method-20 () none)
(hud-method-21 () none)
(hud-method-22 () none)
(hud-method-23 () none)
(hud-method-24 () none)
(hud-method-25 () none)
(hud-method-26 () none)
(hidden? (_type_) object)
(draw (_type_) none)
(update-values! (_type_) none)
(init-callback (_type_) none)
(event-callback (_type_ process int symbol event-message-block) object)
(hud-method-19 (_type_) none)
(hud-method-20 (_type_) none)
(hud-method-21 (_type_) none)
(hud-method-22 (_type_) none)
(hud-method-23 (_type_) none)
(check-ready-and-maybe-show (_type_ symbol) symbol)
(update-value-callback (_type_ int int) none)
(alloc-string-if-needed (_type_ int) none)
)
(:states
hud-arriving
hud-hidden
hud-in
hud-leaving
(hud-leaving float)
)
)
File diff suppressed because it is too large Load Diff
+5 -5
View File
@@ -335,19 +335,19 @@
(add-icon! (_type_ process uint int vector int) connection-minimap)
(minimap-method-13 () none)
(minimap-method-14 () none)
(minimap-method-15 () none)
(draw-1 (_type_ dma-buffer vector4w symbol) none)
(minimap-method-16 () none)
(minimap-method-17 () none)
(minimap-method-18 () none)
(minimap-method-19 () none)
(minimap-method-20 () none)
(update! (_type_) symbol)
(minimap-method-21 () none)
(minimap-method-22 () none)
(minimap-method-23 () none)
(minimap-method-24 () none)
(minimap-method-25 () none)
(draw-sprite2 (_type_ dma-buffer vector4w symbol) none)
(set-race-texture (_type_ texture float level) none)
(minimap-method-26 () none)
(minimap-method-27 () none)
(set-race-corner (_type_ float float) none)
)
)
File diff suppressed because it is too large Load Diff
+62 -60
View File
@@ -146,7 +146,7 @@
(deftype progress-list (basic)
()
(:methods
(progress-list-method-9 () none)
(progress-list-method-9 (_type_ int) game-task-info)
)
)
@@ -226,41 +226,43 @@
(progress-id uint32)
(lock-tick-count int32)
)
(:state-methods
come-in
idle
go-away
gone
)
(:methods
(progress-method-20 () none)
(progress-method-21 () none)
(progress-method-22 () none)
(progress-method-23 () none)
(progress-method-24 () none)
(progress-method-25 () none)
(progress-method-26 () none)
(progress-method-27 () none)
(progress-method-28 () none)
(progress-method-29 () none)
(progress-method-30 () none)
(progress-method-31 () none)
(progress-method-32 () none)
(progress-method-33 () none)
(progress-method-34 () none)
(progress-method-35 () none)
(progress-method-36 () none)
(progress-method-37 () none)
(progress-method-38 () none)
(progress-method-39 () none)
(progress-method-40 () none)
(progress-method-41 () none)
(progress-method-42 () none)
(progress-method-43 () none)
(progress-method-44 () none)
(progress-method-45 () none)
(progress-method-46 () none)
(progress-method-47 () none)
(progress-method-48 () none)
(progress-method-49 () none)
(progress-method-50 () none)
(progress-method-51 () none)
(progress-method-52 () none)
(progress-method-53 () none)
(init-defaults (_type_) object)
(respond-to-cpad (_type_) none)
(gone? (_type_) object)
(can-go-back? (_type_) symbol)
(get-state-check-card (_type_ symbol) symbol)
(push-state (_type_) int)
(pop-state (_type_) int)
(set-next-state (_type_ symbol int) int)
(set-menu-options (_type_ symbol) int)
(progress-method-33 (_type_ progress-box) none)
(progress-method-34 (_type_) none)
(get-scissor-stack-top (_type_) vector)
(get-language-by-idx (_type_ int) int)
(progress-method-37 (_type_) none)
(progress-method-38 (_type_ font-context float) none)
(progress-method-39 (_type_) none)
(progress-method-40 (_type_ font-context int int float) none)
(progress-method-41 (_type_ progress-box float) none)
(progress-method-42 (_type_ progress-box float) none)
(progress-method-43 (_type_ progress-box float) none)
(progress-method-44 (_type_ font-context string) none)
(progress-method-45 (_type_ font-context float float string float float int) float)
(progress-method-46 (_type_ font-context float int) none)
(progress-method-47 (_type_ font-context symbol symbol) none)
(draw-prev-next-footer (_type_ font-context float) none)
(draw-yes-no-style-footer (_type_ font-context text-id text-id) none)
(progress-method-50 (_type_ font-context text-id text-id text-id symbol symbol float) none)
(progress-method-51 (_type_ font-context) none)
(progress-method-52 (_type_ font-context string float float float float float) none)
(progress-method-53 (_type_ font-context) none)
)
)
@@ -307,7 +309,7 @@
((icons progress-icon-part :dynamic :offset 16)
)
(:methods
(progress-icon-array-method-9 () none)
(draw-icon-array! (_type_ int int float float rgba float) none)
)
)
@@ -319,8 +321,8 @@
(box hud-box 1 :inline)
)
(:methods
(menu-option-method-9 () none)
(menu-option-method-10 () none)
(respond-progress (_type_ progress symbol) int)
(draw-option (_type_ progress font-context int symbol) none)
(menu-option-method-11 () none)
)
)
@@ -521,10 +523,10 @@
(icon-offsety float)
)
(:methods
(highscore-page-info-method-9 () none)
(highscore-page-info-method-10 () none)
(highscore-page-info-method-11 () none)
(highscore-page-info-method-12 () none)
(highscore-page-info-method-9 (_type_ progress font-context float float) none)
(highscore-page-info-method-10 (_type_ font-context float float float) none)
(highscore-page-info-method-11 (_type_ font-context int float float float) none)
(highscore-time->string (_type_ float) string)
)
)
@@ -533,11 +535,11 @@
((current-index float)
(target-index float)
(num-pages int32)
(pages highscore-page-info 16)
(info basic)
(pages paged-menu-option 16)
(info (array highscore-page-info))
)
(:methods
(menu-highscores-option-method-12 () none)
(menu-highscores-option-method-12 (_type_) int)
)
)
@@ -550,7 +552,7 @@
(vehicle game-vehicles)
)
(:methods
(controls-string-info-method-9 () none)
(controls-string-info-method-9 (_type_ progress font-context float float float float float) none)
)
)
@@ -563,14 +565,14 @@
(current-index float)
(target-index float)
(num-text int32)
(on-screen basic)
(text text-id 9)
(on-screen symbol)
(text game-text 9)
(strings (array controls-string-info))
)
(:methods
(controls-page-info-method-9 () none)
(controls-page-info-method-10 () none)
(controls-page-info-method-11 () none)
(init-text! (_type_) int)
(controls-page-info-method-10 (_type_) none)
(controls-page-info-method-11 (_type_ progress font-context float float) none)
)
)
@@ -579,10 +581,10 @@
((current-index float)
(target-index float)
(pages controls-page-info 7 :offset 76)
(info basic)
(info (array controls-page-info))
)
(:methods
(menu-controls-option-method-12 () none)
(menu-controls-option-method-12 (_type_) int)
)
)
@@ -596,8 +598,8 @@
(flags secret-item-option-flags)
)
(:methods
(secret-item-option-method-12 () none)
(secret-item-option-method-13 () none)
(secret-item-option-method-12 (_type_) int)
(secret-item-option-method-13 (_type_) game-vehicles)
)
)
@@ -704,8 +706,8 @@
(item game-items)
)
(:methods
(inventory-item-method-9 () none)
(inventory-item-method-10 () none)
(item-obtained? (_type_) symbol)
(inventory-item-method-10 (_type_ progress font-context float float symbol) none)
)
)
@@ -719,8 +721,8 @@
(items (array inventory-item))
)
(:methods
(inventory-item-group-method-9 () none)
(inventory-item-group-method-10 () none)
(have-items? (_type_) symbol)
(inventory-item-group-method-10 (_type_ progress font-context float float int) none)
)
)
@@ -731,7 +733,7 @@
(groups (array inventory-item-group))
)
(:methods
(inventory-screen-method-9 () none)
(inventory-screen-method-9 (_type_ progress font-context float float) none)
)
)
@@ -1135,9 +1135,12 @@
(new 'static 'boxed-array :type uint8 #x0 #x1 #x2 #x3 #x4 #x5 #x0 #x0 #x0 #x0 #x0 #xb)
)
(define *stereo-mode-name-remap*
(new 'static 'boxed-array :type text-id (text-id text-0005) (text-id text-0006) (text-id text-0007))
)
(define *stereo-mode-name-remap* (new 'static 'boxed-array :type text-id
(text-id progress-sound-mono)
(text-id progress-sound-stereo)
(text-id progress-sound-surround)
)
)
(define *hud-ring-graphic-remap*
(new 'static 'boxed-array :type uint64 #x40 #x80 #x10 #x400 #x8 #x4 #x20 #x100 #x200 #x2)
@@ -1152,7 +1155,7 @@
)
(define *hud-ring-demo-shared-graphic-remap*
(the-as array (new 'static 'boxed-array :type uint64 #x80 #x8 #x4 #x2 #x200 #x200 #x200 #x200 #x200 #x200))
(new 'static 'boxed-array :type uint64 #x80 #x8 #x4 #x2 #x200 #x200 #x200 #x200 #x200 #x200)
)
(deftype hud-scene-info (basic)
File diff suppressed because it is too large Load Diff
+90 -87
View File
@@ -9,23 +9,23 @@
(defenum text-id
:type uint32
(null #x0)
(text-0001 #x0001)
(text-0002 #x0002)
(progress-quit #x0001)
(progress-pause #x0002)
(progress-subtitle-language #x0003)
(progress-sound-format #x0004)
(text-0005 #x0005)
(text-0006 #x0006)
(text-0007 #x0007)
(progress-sound-mono #x0005)
(progress-sound-stereo #x0006)
(progress-sound-surround #x0007)
(progress-sfx-volume #x0008)
(progress-music-volume #x0009)
(progress-speech-volume #x000a)
(progress-language #x000b)
(progress-vibration #x000c)
(text-000d #x000d)
(progress-play-hints #x000d)
(progress-graphics-center-screen #x000e)
(text-000f #x000f)
(text-0010 #x0010)
(text-0011 #x0011)
(progress-on #x000f)
(progress-off #x0010)
(progress-graphics-center-screen-dpad #x0011)
(progress-language-english #x0012)
(progress-language-french #x0013)
(progress-language-german #x0014)
@@ -39,39 +39,39 @@
(progress-game-options #x001c)
(progress-graphic-options #x001d)
(progress-sound-options #x001e)
(text-001f #x001f)
(text-0020 #x0020)
(text-0021 #x0021)
(text-0022 #x0022)
(text-0023 #x0023)
(progress-aspect-4x3 #x001f)
(progress-aspect-16x9 #x0020)
(progress-refresh-60hz #x0021)
(progress-refresh-50hz #x0022)
(progress-jak3 #x0023)
(progress-exit-demo #x0024)
(text-0025 #x0025)
(text-0026 #x0026)
(progress-yes #x0025)
(progress-no #x0026)
(progress-back #x0027)
(text-0028 #x0028)
(text-0029 #x0029)
(text-002a #x002a)
(progress-ok #x0028)
(progress-next #x0029)
(progress-prev #x002a)
(progress-continue-without-save #x002b)
(text-002c #x002c)
(text-002d #x002d)
(progress-save-file-select #x002c)
(progress-load-file-select #x002d)
(progress-load-save #x002e)
(progress-save-game #x002f)
(text-0030 #x0030)
(progress-empty #x0030)
(progress-options #x0031)
(progress-title-new-game #x0032)
(text-0033 #x0033)
(progress-start-button #x0033)
(progress-quit-game #x0034)
(progress-bigmap #x0035)
(progress-select-start #x0036)
(progress-highscores #x0037)
(text-0038 #x0038)
(text-0039 #x0039)
(text-003a #x003a)
(text-003b #x003b)
(text-003c #x003c)
(text-003d #x003d)
(text-003e #x003e)
(text-003f #x003f)
(progress-highscores-first-place #x0038)
(progress-highscores-second-place #x0039)
(progress-highscores-third-place #x003a)
(progress-highscores-fourth-place #x003b)
(progress-highscores-fifth-place #x003c)
(progress-highscores-sixth-place #x003d)
(progress-highscores-seventh-place #x003e)
(progress-highscores-eighth-place #x003f)
(text-0040 #x0040)
(text-0041 #x0041)
(text-0042 #x0042)
@@ -103,8 +103,8 @@
(text-0065 #x0065)
(progress-secrets-big-head #x0066)
(progress-secrets-little-head #x0067)
(text-0068 #x0068)
(text-0069 #x0069)
(progress-secrets-orbs-available #x0068)
(progress-secrets-orbs-collected #x0069)
(progress-missions #x006a)
(progress-select-pre-start #x006b)
(progress-select-kiosk-start #x006c)
@@ -119,12 +119,12 @@
(text-0077 #x0077)
(text-0078 #x0078)
(text-0079 #x0079)
(text-007a #x007a)
(progress-graphics-center-screen-reset #x007a)
(text-007b #x007b)
(text-007c #x007c)
(text-007d #x007d)
(text-007e #x007e)
(text-007f #x007f)
(progress-missions-completed #x007d)
(progress-missions-todo #x007e)
(progress-memcard-insufficient-space-retry? #x007f)
(text-0080 #x0080)
(text-0081 #x0081)
(text-0082 #x0082)
@@ -137,49 +137,49 @@
(text-0089 #x0089)
(text-008a #x008a)
(text-008b #x008b)
(text-008c #x008c)
(text-008d #x008d)
(text-008e #x008e)
(text-008f #x008f)
(text-0090 #x0090)
(text-0091 #x0091)
(text-0092 #x0092)
(text-0093 #x0093)
(text-0094 #x0094)
(text-0095 #x0095)
(text-0096 #x0096)
(progress-graphics-prog-scan-change-notice #x008c)
(progress-graphics-prog-scan-warn-1 #x008d)
(progress-graphics-prog-scan-warn-2 #x008e)
(progress-graphics-60hz-change-notice #x008f)
(progress-graphics-60hz-change-complete #x0090)
(progress-graphics-prog-scan-change-complete #x0091)
(progress-graphics-prog-scan-keep #x0092)
(progress-disc-removed-notice #x0093)
(progress-disc-removed-prompt #x0094)
(progress-disc-read-error #x0095)
(progress-disc-read-error-prompt #x0096)
(text-0097 #x0097)
(text-0098 #x0098)
(text-0099 #x0099)
(text-009a #x009a)
(text-009b #x009b)
(text-009c #x009c)
(text-009d #x009d)
(text-009e #x009e)
(text-009f #x009f)
(text-00a0 #x00a0)
(text-00a1 #x00a1)
(text-00a2 #x00a2)
(text-00a3 #x00a3)
(text-00a4 #x00a4)
(text-00a5 #x00a5)
(text-00a6 #x00a6)
(text-00a7 #x00a7)
(text-00a8 #x00a8)
(text-00a9 #x00a9)
(text-00aa #x00aa)
(text-00ab #x00ab)
(text-00ac #x00ac)
(text-00ad #x00ad)
(text-00ae #x00ae)
(text-00af #x00af)
(text-00b0 #x00b0)
(text-00b1 #x00b1)
(text-00b2 #x00b2)
(text-00b3 #x00b3)
(text-00b4 #x00b4)
(text-00b5 #x00b5)
(text-00b6 #x00b6)
(progress-memcard-no-card-in-slot #x009a)
(progress-memcard-unformatted #x009b)
(progress-memcard-space-requirement #x009c)
(progress-memcard-insert-with-jak3-data #x009d)
(progress-memcard-insert-with-free-space #x009e)
(progress-memcard-formatting-required-notice #x009f)
(progress-memcard-saving #x00a0)
(progress-memcard-loading #x00a1)
(progress-memcard-formatting #x00a2)
(progress-memcard-creating-save-data #x00a3)
(progress-memcard-remove-warn #x00a4)
(progress-memcard-overwrite-warning #x00a5)
(progress-memcard-overwrite-confirm? #x00a6)
(progress-memcard-format? #x00a7)
(progress-memcard-continue? #x00a8)
(progress-memcard-go-back? #x00a9)
(progress-memcard-load-error #x00aa)
(progress-memcard-save-error #x00ab)
(progress-memcard-format-error #x00ac)
(progress-memcard-create-save-error #x00ad)
(progress-memcard-check #x00ae)
(progress-memcard-check-and-try-again #x00af)
(progress-memcard-removed #x00b0)
(progress-autosave-disabled #x00b1)
(progress-autosave-reenable-info #x00b2)
(progress-memcard-no-save-data #x00b3)
(progress-memcard-create-save-data? #x00b4)
(progress-autosave-notice #x00b5)
(progress-autosave-remove-warn #x00b6)
(text-012c #x012c)
(text-012d #x012d)
(text-012e #x012e)
@@ -218,7 +218,7 @@
(text-020b #x020b)
(text-020c #x020c)
(text-020d #x020d)
(text-020e #x020e)
(progress-continue #x020e)
(text-03bf #x03bf)
(text-03c0 #x03c0)
(text-03c1 #x03c1)
@@ -228,8 +228,8 @@
(text-03c5 #x03c5)
(text-03c6 #x03c6)
(text-03c7 #x03c7)
(text-03c8 #x03c8)
(text-03c9 #x03c9)
(progress-missions-todo-icon #x03c8)
(progress-missions-complete-icon #x03c9)
(text-03d1 #x03d1)
(text-0408 #x0408)
(text-0409 #x0409)
@@ -455,8 +455,8 @@
(text-05f9 #x05f9)
(progress-camera-horizontal #x05fa)
(progress-camera-vertical #x05fb)
(text-05fc #x05fc)
(text-05fd #x05fd)
(progress-camera-default #x05fc)
(progress-camera-flipped #x05fd)
(progress-camera-options #x05fe)
(text-05ff #x05ff)
(text-0600 #x0600)
@@ -741,8 +741,8 @@
(text-07cd #x07cd)
(text-07ce #x07ce)
(text-07cf #x07cf)
(text-07d0 #x07d0)
(text-07d1 #x07d1)
(progress-footer-next-r1 #x07d0)
(progress-footer-prev-l1 #x07d1)
(progress-title-commentary #x07d2)
(text-07d3 #x07d3)
(text-07d4 #x07d4)
@@ -852,9 +852,9 @@
(progress-title-level-select-act-2 #x084f)
(progress-title-level-select-act-3 #x0850)
(progress-secrets-button-invis #x0851)
(text-0852 #x0852)
(text-0853 #x0853)
(text-0856 #x0856)
(progress-secrets-cancel #x0852)
(progress-secrets-buy #x0853)
(progress-secrets-price #x0856)
(text-0857 #x0857)
(text-0858 #x0858)
(text-085a #x085a)
@@ -915,6 +915,9 @@
;; ---text-id
(define-extern print-game-text (function string font-context symbol int bucket-id float))
(define-extern disable-level-text-file-loading (function none))
(define-extern enable-level-text-file-loading (function none))
(define-extern load-level-text-files (function int none))
;; DECOMP BEGINS
+1 -1
View File
@@ -154,7 +154,7 @@ bool run_build_level(const std::string& input_file,
decompiler::TextureDB tex_db;
auto textures_out = file_util::get_jak_project_dir() / "decompiler_out/jak1/textures";
file_util::create_dir_if_needed(textures_out);
db.process_tpages(tex_db, textures_out, config);
db.process_tpages(tex_db, textures_out, config, "");
std::vector<std::string> processed_art_groups;
+1 -1
View File
@@ -141,7 +141,7 @@ bool run_build_level(const std::string& input_file,
decompiler::TextureDB tex_db;
auto textures_out = file_util::get_jak_project_dir() / "decompiler_out/jak2/textures";
file_util::create_dir_if_needed(textures_out);
db.process_tpages(tex_db, textures_out, config);
db.process_tpages(tex_db, textures_out, config, "");
// find all art groups used by the custom level in other dgos
if (level_json.contains("art_groups") && !level_json.at("art_groups").empty()) {
+18 -1
View File
@@ -170,7 +170,24 @@ void Compiler::generate_field_description(const goos::Object& form,
format_args.push_back(get_field_of_structure(type, reg, f.name(), env)->to_gpr(form, env));
} else if (m_ts.tc(m_ts.make_typespec("structure"), f.type())) {
// Structure
str_template += fmt::format("{}{}: #<{} @ #x~X>~%", tabs, f.name(), f.type().print());
auto ts = m_ts.lookup_type_no_throw(f.type());
if (ts) {
// try to use print method if the structure implements it
// TODO see if this can be done without a hardcoded list
std::vector<std::string> has_print = {
"vector", "vector2", "vector4w", "vec4s",
"connectable", "connection", "connection-minimap", "transform",
"transformq", "entity-links"};
if (ts->get_parent() == "basic" ||
(ts->get_parent() == "structure" &&
std::find(has_print.begin(), has_print.end(), f.type().print()) != has_print.end())) {
str_template += fmt::format("{}{}: ~`{}`P~%", tabs, f.name(), f.type().print());
} else {
str_template += fmt::format("{}{}: #<{} @ #x~X>~%", tabs, f.name(), f.type().print());
}
} else {
str_template += fmt::format("{}{}: #<{} @ #x~X>~%", tabs, f.name(), f.type().print());
}
format_args.push_back(get_field_of_structure(type, reg, f.name(), env)->to_gpr(form, env));
} else if (f.type() == TypeSpec("seconds")) {
// seconds
+19 -2
View File
@@ -1380,7 +1380,10 @@
`(new 'static 'sp-field-init-spec :field (sp-field-id ,field-enum-name) :initial-value (sp-cpuinfo-flag ,@param0) :random-mult 1)
)
((eq? field-name 'texture)
`(new 'static 'sp-field-init-spec :field (sp-field-id ,field-enum-name) :tex ,param0 :flags (sp-flag int))
(if (eq? (car param0) 'new)
`(new 'static 'sp-field-init-spec :field (sp-field-id ,field-enum-name) :tex ,param0 :flags (sp-flag int))
`(new 'static 'sp-field-init-spec :field (sp-field-id ,field-enum-name) :tex ,(string->symbol-format "{}-{}" (car param0) (cadr param0)) :flags (sp-flag int))
)
)
((eq? field-name 'next-launcher)
`(new 'static 'sp-field-init-spec :field (sp-field-id ,field-enum-name) :initial-value ,param0 :flags (sp-flag launcher))
@@ -1580,4 +1583,18 @@
:regs14 (gif-reg-id a+d)
:regs15 (gif-reg-id a+d)
)
)
)
(defmacro .movz (result value check original)
`(if (= ,check 0)
(set! ,result (the-as int ,value))
(set! ,result (the-as int ,original))
)
)
(defmacro get-texture (name tpage)
`(lookup-texture-by-id ,(string->symbol-format "{}-{}" name tpage))
)
(import "goal_src/jak3/engine/data/tpages.gc")
(import "goal_src/jak3/engine/data/textures.gc")
+307
View File
@@ -0,0 +1,307 @@
;;-*-Lisp-*-
(in-package goal)
;; definition of type fma-sphere-params
(deftype fma-sphere-params (structure)
((mode fma-sphere-mode)
(proc process-focusable)
(track-joint int32)
(duration time-frame)
(sphere sphere)
(danger traffic-danger-info)
(nav-mesh-id uint32)
)
)
;; definition for method 3 of type fma-sphere-params
(defmethod inspect ((this fma-sphere-params))
(when (not this)
(set! this this)
(goto cfg-4)
)
(format #t "[~8x] ~A~%" this 'fma-sphere-params)
(format #t "~1Tmode: ~D~%" (-> this mode))
(format #t "~1Tproc: ~A~%" (-> this proc))
(format #t "~1Ttrack-joint: ~D~%" (-> this track-joint))
(format #t "~1Tduration: ~D~%" (-> this duration))
(format #t "~1Tsphere: #<sphere @ #x~X>~%" (-> this sphere))
(format #t "~1Tdanger: #<traffic-danger-info @ #x~X>~%" (-> this danger))
(format #t "~1Tnav-mesh-id: ~D~%" (-> this nav-mesh-id))
(label cfg-4)
this
)
;; definition of type fma-sphere
(deftype fma-sphere (process-drawable)
((root collide-shape :override)
(first-time? symbol)
(mode fma-sphere-mode)
(track-handle handle)
(track-joint int32)
(attack-id uint32)
(duration time-frame)
(sphere sphere :inline)
(danger traffic-danger-info :inline)
)
(:state-methods
idle
)
)
;; definition for method 3 of type fma-sphere
(defmethod inspect ((this fma-sphere))
(when (not this)
(set! this this)
(goto cfg-4)
)
(let ((t9-0 (method-of-type process-drawable inspect)))
(t9-0 this)
)
(format #t "~2Tfirst-time?: ~A~%" (-> this first-time?))
(format #t "~2Tmode: ~D~%" (-> this mode))
(format #t "~2Ttrack-handle: ~D~%" (-> this track-handle))
(format #t "~2Ttrack-joint: ~D~%" (-> this track-joint))
(format #t "~2Tattack-id: ~D~%" (-> this attack-id))
(format #t "~2Tduration: ~D~%" (-> this duration))
(format #t "~2Tstate-time: ~D~%" (-> this state-time))
(format #t "~2Tsphere: #<sphere @ #x~X>~%" (-> this sphere))
(format #t "~2Tdanger: #<traffic-danger-info @ #x~X>~%" (-> this danger))
(label cfg-4)
this
)
;; definition for method 12 of type fma-sphere
(defmethod run-logic? ((this fma-sphere))
"Should this process be run? Checked by execute-process-tree."
(or (logtest? *display-scene-control* (scene-controls display-controls))
(and *display-nav-marks* (logtest? (-> this mode) (fma-sphere-mode nav)))
(logtest? (-> this mode) (fma-sphere-mode deadly-overlap))
(>= (-> this track-joint) 0)
(-> this first-time?)
)
)
;; failed to figure out what this is:
(defstate idle (fma-sphere)
:virtual #t
:event (behavior ((proc process) (argc int) (message symbol) (block event-message-block))
(case message
(('touched)
(let ((v1-1 (-> block param 0)))
(if v1-1
(send-event
proc
'attack
v1-1
(static-attack-info :mask (vehicle-impulse-factor) ((id (-> self attack-id))
(damage 2.0)
(vehicle-damage-factor 1.0)
(vehicle-impulse-factor 1.0)
(mode 'eco-red)
(attacker-velocity (-> self root transv))
(knock (knocked-type knocked-type-2))
)
)
)
)
)
)
)
)
:enter (behavior ()
(set-time! (-> self state-time))
(set! (-> self first-time?) #f)
(if (logtest? (-> self mode) (fma-sphere-mode kill-once))
(send-event *traffic-manager* 'kill-traffic-sphere (-> self sphere))
)
)
:trans (behavior ()
(local-vars (at-0 int))
(rlet ((vf0 :class vf)
(vf1 :class vf)
(vf2 :class vf)
)
(init-vf0-vector)
(let ((v1-0 (-> self duration)))
(if (and (nonzero? v1-0) (time-elapsed? (-> self state-time) v1-0))
(go empty-state)
)
)
(let ((v1-5 (-> self track-joint)))
(when (>= v1-5 0)
(let ((a2-0 (handle->process (-> self track-handle)))
(gp-0 (new 'stack-no-clear 'vector))
)
(when a2-0
(set! (-> gp-0 quad) (-> self sphere quad))
(set! (-> gp-0 w) 1.0)
(vector-matrix*! gp-0 gp-0 (-> (the-as process-drawable a2-0) node-list data v1-5 bone transform))
(let ((v1-9 (-> self root)))
(vector-! (-> v1-9 transv) gp-0 (-> v1-9 trans))
(let ((a0-12 (-> v1-9 transv)))
(.lvf vf1 (&-> (-> v1-9 transv) quad))
(let ((f0-1 (-> self clock frames-per-second)))
(.mov at-0 f0-1)
)
(.mov vf2 at-0)
(.mov.vf vf1 vf0 :mask #b1000)
(.mul.x.vf vf1 vf1 vf2 :mask #b111)
(.svf (&-> a0-12 quad) vf1)
)
)
(move-to-point! (-> self root) gp-0)
(set! (-> self danger sphere x) (-> gp-0 x))
(set! (-> self danger sphere y) (-> gp-0 y))
(set! (-> self danger sphere z) (-> gp-0 z))
)
)
)
)
(if (logtest? (-> self mode) (fma-sphere-mode danger))
(send-event *traffic-manager* 'add-danger-sphere (-> self danger))
)
(when (logtest? (-> self mode) (fma-sphere-mode deadly-overlap))
(let ((a1-10 (new 'stack-no-clear 'overlaps-others-params)))
(set! (-> a1-10 options) (overlaps-others-options))
(set! (-> a1-10 collide-with-filter) (the-as collide-spec -1))
(set! (-> a1-10 tlist) *touching-list*)
(find-overlapping-shapes (-> self root) a1-10)
)
)
(if (or (logtest? *display-scene-control* (scene-controls display-controls))
(and *display-nav-marks* (logtest? (-> self mode) (fma-sphere-mode nav)))
)
(add-debug-sphere
#t
(bucket-id bucket583)
(-> self root trans)
(-> self sphere r)
(new 'static 'rgba :r #x80 :g #x40 :a #x80)
)
)
)
)
:code sleep-code
)
;; definition for function fma-sphere-init-by-other
;; INFO: Used lq/sq
(defbehavior fma-sphere-init-by-other fma-sphere ((fma-parms fma-sphere-params))
(set! (-> self mode) (-> fma-parms mode))
(set! (-> self first-time?) #t)
(set! (-> self duration) (-> fma-parms duration))
(cond
((and (-> fma-parms proc) (>= (-> fma-parms track-joint) 0))
(set! (-> self track-joint) (-> fma-parms track-joint))
(set! (-> self track-handle) (process->handle (-> fma-parms proc)))
)
(else
(set! (-> self track-joint) -1)
(set! (-> self track-handle) (the-as handle #f))
)
)
(cond
((-> fma-parms danger)
(mem-copy! (the-as pointer (-> self danger)) (the-as pointer (-> fma-parms danger)) 54)
(cond
(sphere
(set! (-> self sphere quad) (-> fma-parms sphere quad))
(set! (-> self danger sphere quad) (-> fma-parms sphere quad))
)
(else
(set! (-> self sphere quad) (-> self danger sphere quad))
)
)
)
(sphere
(set! (-> self sphere quad) (-> fma-parms sphere quad))
(when (logtest? (-> self mode) (fma-sphere-mode danger))
(set! (-> self danger sphere quad) (-> fma-parms sphere quad))
(set! (-> self danger velocity quad) (the-as uint128 0))
(set! (-> self danger notify-radius) (+ 40960.0 (-> self sphere r)))
(set! (-> self danger danger-level) 1.0)
(set! (-> self danger decay-rate) 0.0)
(set! (-> self danger flags) (the-as uint 1))
(set! (-> self danger danger-type) (the-as uint 4))
)
)
(else
(format 0 "ERROR: Initializing an fma-sphere without a sphere or danger info!~%")
(go empty-state)
)
)
(let ((s5-0 (new 'process 'collide-shape self (collide-list-enum hit-by-player))))
(let ((v1-32 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0))))
(set! (-> v1-32 prim-core collide-as) (collide-spec obstacle))
(set-vector! (-> v1-32 local-sphere) 0.0 0.0 0.0 4096.0)
(set! (-> s5-0 total-prims) (the-as uint 1))
(set! (-> s5-0 root-prim) v1-32)
)
(set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w)))
(let ((v1-35 (-> s5-0 root-prim)))
(set! (-> s5-0 backup-collide-as) (-> v1-35 prim-core collide-as))
(set! (-> s5-0 backup-collide-with) (-> v1-35 prim-core collide-with))
)
(set! (-> self root) s5-0)
)
(let ((s5-1 (-> self root)))
(set! (-> s5-1 nav-radius) (-> self sphere r))
(set! (-> s5-1 root-prim local-sphere w) (-> self sphere r))
(set! (-> s5-1 trans quad) (-> self sphere quad))
(set! (-> s5-1 trans w) 1.0)
(vector-identity! (-> s5-1 scale))
(quaternion-identity! (-> s5-1 quat))
(cond
((logtest? (-> self mode) (fma-sphere-mode deadly-overlap))
(set! (-> s5-1 event-self) 'touched)
(let ((v1-43 (-> s5-1 root-prim)))
(set! (-> v1-43 prim-core collide-with) (collide-spec crate civilian enemy hit-by-others-list))
(logior! (-> v1-43 prim-core action) (collide-action deadly))
)
)
(else
(let ((v1-44 (-> s5-1 root-prim)))
(set! (-> v1-44 prim-core collide-as) (collide-spec))
(set! (-> v1-44 prim-core collide-with) (collide-spec))
)
0
)
)
(update-transforms s5-1)
)
(logclear! (-> self mask) (process-mask actor-pause enemy))
(when (logtest? (-> self mode) (fma-sphere-mode nav))
(let ((a0-33 (if (zero? (-> fma-parms nav-mesh-id))
(find-nearest-nav-mesh (-> self root trans) (the-as float #x7f800000))
(get-nav-mesh (the-as actor-id (-> fma-parms nav-mesh-id)))
)
)
)
(cond
(a0-33
(let ((t9-10 (method-of-object a0-33 nav-mesh-method-31)))
self
(t9-10)
)
)
(else
(format 0 "ERROR: fma-sphere-init-by-other: failed to find nearest nav-mesh!~%")
(go empty-state)
)
)
)
)
(when (logtest? (-> self mode) (fma-sphere-mode deadly-overlap))
(let* ((v1-62 *game-info*)
(a0-37 (+ (-> v1-62 attack-id) 1))
)
(set! (-> v1-62 attack-id) a0-37)
(set! (-> self attack-id) a0-37)
)
)
(go-virtual idle)
)
+50
View File
@@ -0,0 +1,50 @@
;;-*-Lisp-*-
(in-package goal)
;; definition for function cam-stop
(defun cam-stop ()
(kill-by-name "camera-master" *active-pool*)
(kill-by-name "camera-slave" *active-pool*)
(kill-by-name "camera-combiner" *active-pool*)
(set! *camera* #f)
(set! *camera-combiner* #f)
#f
)
;; definition for function cam-start
;; WARN: Return type mismatch int vs none.
(defun cam-start ((arg0 symbol))
(cam-stop)
(set! *camera-combiner* (the-as camera-combiner (ppointer->process (process-spawn
camera-combiner
:init cam-combiner-init
:name "camera-combiner"
:from *camera-dead-pool*
:to *camera-pool*
)
)
)
)
(set! *camera* (the-as camera-master (ppointer->process (process-spawn
camera-master
:init cam-master-init
:name "camera-master"
:from *camera-master-dead-pool*
:to *camera-pool*
)
)
)
)
(if arg0
(reset-cameras)
)
0
(none)
)
;; failed to figure out what this is:
(cam-start #f)
+2 -2
View File
@@ -1426,7 +1426,7 @@ Most [[process-drawable]]s have a [[collide-shape]] that represents their root t
(collide-shape-method-49 () none)
(collide-shape-method-50 () none)
(collide-shape-method-51 () none)
(collide-shape-method-52 () none)
(water-info-init! (_type_ water-info collide-action) water-info)
(collide-shape-method-53 () none)
(collide-shape-method-54 () none)
)
@@ -1511,7 +1511,7 @@ Most [[process-drawable]]s have a [[collide-shape]] that represents their root t
(collide-shape-moving-method-58 () none)
(collide-shape-moving-method-59 () none)
(collide-shape-moving-method-60 () none)
(collide-shape-moving-method-61 () none)
(move-to-ground-point (_type_ vector vector vector) none)
(compute-acc-due-to-gravity (_type_ vector float) vector)
(collide-shape-moving-method-63 () none)
(collide-shape-moving-method-64 () none)
+13 -13
View File
@@ -150,7 +150,7 @@
;; failed to figure out what this is:
(defpart 810
:init-specs ((:texture (new 'static 'texture-id :page #x4))
:init-specs ((:texture (bigpuff level-default-sprite))
(:num 16.0)
(:y (meters 0.5) (meters 1))
(:scale-x (meters 1.5) (meters 1.5))
@@ -179,7 +179,7 @@
;; failed to figure out what this is:
(defpart 812
:init-specs ((:texture (new 'static 'texture-id :index #x3e :page #x4))
:init-specs ((:texture (motion-blur-part level-default-sprite))
(:num 4.0)
(:y (meters 0.75))
(:scale-x (meters 6))
@@ -209,7 +209,7 @@
;; failed to figure out what this is:
(defpart 814
:init-specs ((:texture (new 'static 'texture-id :index #x4b :page #x4))
:init-specs ((:texture (starflash level-default-sprite))
(:num 1.0)
(:y (meters 1))
(:scale-x (meters 8))
@@ -226,7 +226,7 @@
;; failed to figure out what this is:
(defpart 815
:init-specs ((:texture (new 'static 'texture-id :index #x6 :page #x4))
:init-specs ((:texture (crate-wood-01-splinter level-default-sprite))
(:num 5.0)
(:x (meters -0.5) (meters 1))
(:y (meters 0.25) (meters 1.5))
@@ -260,7 +260,7 @@
;; failed to figure out what this is:
(defpart 817
:init-specs ((:texture (new 'static 'texture-id :index #x5 :page #x4))
:init-specs ((:texture (crate-metalbolt-splinter level-default-sprite))
(:num 4.5)
(:x (meters -0.5) (meters 1))
(:y (meters 0.25) (meters 1.5))
@@ -359,7 +359,7 @@
;; failed to figure out what this is:
(defpart 147
:init-specs ((:texture (new 'static 'texture-id :index #x18 :page #x4))
:init-specs ((:texture (hotdot level-default-sprite))
(:num 6.0)
(:scale-x (meters 0.2) (meters 0.4))
(:scale-y :copy scale-x)
@@ -389,7 +389,7 @@
;; failed to figure out what this is:
(defpart 819
:init-specs ((:texture (new 'static 'texture-id :index #x18 :page #x4))
:init-specs ((:texture (hotdot level-default-sprite))
(:num 3.0)
(:scale-x (meters 0.2))
(:rot-z (degrees 0) (degrees 180))
@@ -407,7 +407,7 @@
;; failed to figure out what this is:
(defpart 146
:init-specs ((:texture (new 'static 'texture-id :index #x4b :page #x4))
:init-specs ((:texture (starflash level-default-sprite))
(:num 1.0)
(:scale-x (meters 16))
(:scale-y :copy scale-x)
@@ -423,7 +423,7 @@
;; failed to figure out what this is:
(defpart 148
:init-specs ((:texture (new 'static 'texture-id :page #x4))
:init-specs ((:texture (bigpuff level-default-sprite))
(:num 4.0)
(:scale-x (meters 2.5) (meters 1.5))
(:rot-z (degrees 0) (degrees 360))
@@ -448,7 +448,7 @@
;; failed to figure out what this is:
(defpart 145
:init-specs ((:texture (new 'static 'texture-id :index #x4b :page #x4))
:init-specs ((:texture (starflash level-default-sprite))
(:num 16.0)
(:y (meters 1))
(:scale-x (meters 0.1))
@@ -466,7 +466,7 @@
;; failed to figure out what this is:
(defpart 143
:init-specs ((:texture (new 'static 'texture-id :index #x18 :page #x4))
:init-specs ((:texture (hotdot level-default-sprite))
(:num 1.0)
(:y (meters 0) (meters 16))
(:z (meters 0.3) (meters 0.3))
@@ -491,7 +491,7 @@
;; failed to figure out what this is:
(defpart 144
:init-specs ((:texture (new 'static 'texture-id :index #x18 :page #x4))
:init-specs ((:texture (hotdot level-default-sprite))
(:num 1.0)
(:scale-x (meters 0.3) (meters 0.1))
(:scale-y :copy scale-x)
@@ -512,7 +512,7 @@
;; failed to figure out what this is:
(defpart 818
:init-specs ((:texture (new 'static 'texture-id :index #x5 :page #x4))
:init-specs ((:texture (crate-metalbolt-splinter level-default-sprite))
(:num 8.0 16.0)
(:x (meters -0.5) (meters 1))
(:y (meters 0.25) (meters 1.5))
+9 -9
View File
@@ -1791,7 +1791,7 @@
;; failed to figure out what this is:
(defpart 57
:init-specs ((:texture (new 'static 'texture-id :index #x3d :page #x4))
:init-specs ((:texture (middot level-default-sprite))
(:num 1.0)
(:scale-x (meters 1))
(:scale-y :copy scale-x)
@@ -2670,7 +2670,7 @@
;; failed to figure out what this is:
(defpart 59
:init-specs ((:texture (new 'static 'texture-id :index #x18 :page #x4))
:init-specs ((:texture (hotdot level-default-sprite))
(:num 1.0)
(:x (meters 0) (meters 1.8))
(:scale-x (meters 0.2))
@@ -2691,7 +2691,7 @@
;; failed to figure out what this is:
(defpart 60
:init-specs ((:texture (new 'static 'texture-id :index #x18 :page #x4))
:init-specs ((:texture (hotdot level-default-sprite))
(:num 2.0)
(:x (meters 1.8) (meters 1))
(:scale-x (meters 0.2))
@@ -2712,7 +2712,7 @@
;; failed to figure out what this is:
(defpart 61
:init-specs ((:texture (new 'static 'texture-id :index #x50 :page #x4))
:init-specs ((:texture (woodchip level-default-sprite))
(:num 1.5)
(:x (meters 2.9) (meters 2.5))
(:y (meters -0.5))
@@ -2737,7 +2737,7 @@
;; failed to figure out what this is:
(defpart 62
:init-specs ((:texture (new 'static 'texture-id :page #x4))
:init-specs ((:texture (bigpuff level-default-sprite))
(:num 0.5)
(:x (meters 2.9) (meters 2.5))
(:y (meters -0.5))
@@ -2780,7 +2780,7 @@
;; failed to figure out what this is:
(defpart 65
:init-specs ((:texture (new 'static 'texture-id :index #x18 :page #x4))
:init-specs ((:texture (hotdot level-default-sprite))
(:num 1.0)
(:x (meters 0) (meters 1.4))
(:scale-x (meters 0.2))
@@ -2801,7 +2801,7 @@
;; failed to figure out what this is:
(defpart 66
:init-specs ((:texture (new 'static 'texture-id :index #x18 :page #x4))
:init-specs ((:texture (hotdot level-default-sprite))
(:num 2.0)
(:x (meters 1.4) (meters 0.9))
(:scale-x (meters 0.2))
@@ -2822,7 +2822,7 @@
;; failed to figure out what this is:
(defpart 67
:init-specs ((:texture (new 'static 'texture-id :page #x4))
:init-specs ((:texture (bigpuff level-default-sprite))
(:num 0.5)
(:x (meters 2.9) (meters 2.5))
(:y (meters -0.5))
@@ -2860,7 +2860,7 @@
;; failed to figure out what this is:
(defpart 68
:init-specs ((:texture (new 'static 'texture-id :page #x4))
:init-specs ((:texture (bigpuff level-default-sprite))
(:num 0.5)
(:x (meters 2.9) (meters 2.5))
(:y (meters -0.5))
+84
View File
@@ -0,0 +1,84 @@
;;-*-Lisp-*-
(in-package goal)
;; definition of type prim-beam-settings
(deftype prim-beam-settings (structure)
((width float)
(color uint32)
(alpha float)
(tex-id uint32)
(num-tiles float)
)
)
;; definition for method 3 of type prim-beam-settings
(defmethod inspect ((this prim-beam-settings))
(when (not this)
(set! this this)
(goto cfg-4)
)
(format #t "[~8x] ~A~%" this 'prim-beam-settings)
(format #t "~1Twidth: ~f~%" (-> this width))
(format #t "~1Tcolor: ~D~%" (-> this color))
(format #t "~1Talpha: ~f~%" (-> this alpha))
(format #t "~1Ttex-id: ~D~%" (-> this tex-id))
(format #t "~1Tnum-tiles: ~f~%" (-> this num-tiles))
(label cfg-4)
this
)
;; definition of type prim-beam-params
(deftype prim-beam-params (structure)
((appearance prim-beam-settings)
)
)
;; definition for method 3 of type prim-beam-params
(defmethod inspect ((this prim-beam-params))
(when (not this)
(set! this this)
(goto cfg-4)
)
(format #t "[~8x] ~A~%" this 'prim-beam-params)
(format #t "~1Tappearance: #<prim-beam-settings @ #x~X>~%" (-> this appearance))
(label cfg-4)
this
)
;; definition of type prim-beam-tracker-params
(deftype prim-beam-tracker-params (prim-beam-params)
((track-obj1 handle)
(track-obj2 handle)
(track-joint1 int32)
(track-joint2 int32)
(pos0 vector)
(pos1 vector)
(duration time-frame)
)
)
;; definition for method 3 of type prim-beam-tracker-params
(defmethod inspect ((this prim-beam-tracker-params))
(when (not this)
(set! this this)
(goto cfg-4)
)
(format #t "[~8x] ~A~%" this 'prim-beam-tracker-params)
(format #t "~1Tappearance: #<prim-beam-settings @ #x~X>~%" (-> this appearance))
(format #t "~1Ttrack-obj1: ~D~%" (-> this track-obj1))
(format #t "~1Ttrack-obj2: ~D~%" (-> this track-obj2))
(format #t "~1Ttrack-joint1: ~D~%" (-> this track-joint1))
(format #t "~1Ttrack-joint2: ~D~%" (-> this track-joint2))
(format #t "~1Tpos0: #<vector @ #x~X>~%" (-> this pos0))
(format #t "~1Tpos1: #<vector @ #x~X>~%" (-> this pos1))
(format #t "~1Tduration: ~D~%" (-> this duration))
(label cfg-4)
this
)
;; failed to figure out what this is:
0
+1 -1
View File
@@ -17,7 +17,7 @@
;; failed to figure out what this is:
(defpart 407
:init-specs ((:texture (new 'static 'texture-id :index #x7a :page #x4))
:init-specs ((:texture (shockwave level-default-sprite))
(:birth-func 'birth-func-set-vel)
(:num 0.0 0.3)
(:y (meters 0.15))
+713
View File
@@ -0,0 +1,713 @@
;;-*-Lisp-*-
(in-package goal)
;; definition for function ray-plane-equation-intersect
(defun ray-plane-equation-intersect ((arg0 vector) (arg1 vector) (arg2 vector) (arg3 vector))
(let* ((f0-1 (vector4-dot arg3 arg1))
(f1-1 (vector-dot arg3 arg2))
(f30-0 (/ (- f0-1) f1-1))
)
(vector-v*float+! arg0 arg1 arg2 f30-0)
f30-0
)
)
;; definition of type flow-section
(deftype flow-section (structure)
((start vector :inline)
(trailing plane :inline)
(pull-dir vector :inline)
(radial-dir vector :inline)
(speed float)
)
)
;; definition for method 3 of type flow-section
(defmethod inspect ((this flow-section))
(when (not this)
(set! this this)
(goto cfg-4)
)
(format #t "[~8x] ~A~%" this 'flow-section)
(format #t "~1Tstart: #<vector @ #x~X>~%" (-> this start))
(format #t "~1Ttrailing: #<plane @ #x~X>~%" (-> this trailing))
(format #t "~1Tpull-dir: #<vector @ #x~X>~%" (-> this pull-dir))
(format #t "~1Tradial-dir: #<vector @ #x~X>~%" (-> this radial-dir))
(format #t "~1Tspeed: ~f~%" (-> this speed))
(label cfg-4)
this
)
;; definition of type flow-section-array
(deftype flow-section-array (inline-array-class)
((data flow-section :inline :dynamic)
)
)
;; definition for method 3 of type flow-section-array
(defmethod inspect ((this flow-section-array))
(when (not this)
(set! this this)
(goto cfg-4)
)
(format #t "[~8x] ~A~%" this (-> this type))
(format #t "~1Tlength: ~D~%" (-> this length))
(format #t "~1Tallocated-length: ~D~%" (-> this allocated-length))
(format #t "~1Tdata[0] @ #x~X~%" (-> this data))
(label cfg-4)
this
)
;; failed to figure out what this is:
(set! (-> flow-section-array heap-base) (the-as uint 80))
;; definition of type flow-control
(deftype flow-control (basic)
((path path-control)
(speed float)
(belt-radius float)
(sections flow-section-array)
(leading plane :inline)
(collide-bounds sphere :inline)
)
(:methods
(new (symbol type process-drawable res-lump) _type_)
(draw-path (_type_) none)
(setup (_type_ (pointer float) int) none)
(push-process (_type_ process-focusable) none)
(find-and-push-things (_type_) none)
(flow-control-method-13 (_type_ water-info vector) symbol)
)
)
;; definition for method 3 of type flow-control
(defmethod inspect ((this flow-control))
(when (not this)
(set! this this)
(goto cfg-4)
)
(format #t "[~8x] ~A~%" this (-> this type))
(format #t "~1Tpath: ~A~%" (-> this path))
(format #t "~1Tspeed: ~f~%" (-> this speed))
(format #t "~1Tbelt-radius: ~f~%" (-> this belt-radius))
(format #t "~1Tsections: ~A~%" (-> this sections))
(format #t "~1Tleading: #<plane @ #x~X>~%" (-> this leading))
(format #t "~1Tcollide-bounds: #<sphere @ #x~X>~%" (-> this collide-bounds))
(label cfg-4)
this
)
;; definition for method 7 of type flow-control
(defmethod relocate ((this flow-control) (offset int))
(if (nonzero? (-> this sections))
(&+! (-> this sections) offset)
)
(if (nonzero? (-> this path))
(&+! (-> this path) offset)
)
(call-parent-method this offset)
)
;; definition for method 9 of type flow-control
;; WARN: Return type mismatch int vs none.
(defmethod draw-path ((this flow-control))
(let ((a0-1 (-> this path)))
(if (nonzero? a0-1)
(path-control-method-9 a0-1)
)
)
0
(none)
)
;; definition for method 13 of type flow-control
;; INFO: Used lq/sq
(defmethod flow-control-method-13 ((this flow-control) (arg0 water-info) (arg1 vector))
(local-vars (v0-7 symbol) (sv-192 vector) (sv-208 vector) (sv-224 flow-section))
(rlet ((acc :class vf)
(vf0 :class vf)
(vf4 :class vf)
(vf5 :class vf)
(vf6 :class vf)
(vf7 :class vf)
)
(init-vf0-vector)
(let ((s5-0 (new 'stack-no-clear 'vector)))
(set! (-> s5-0 quad) (-> arg1 quad))
(set! (-> s5-0 w) 1.0)
(when (>= (vector4-dot s5-0 (the-as vector (-> this leading))) 0.0)
(let* ((s1-0 (-> this sections))
(s2-0 (-> s1-0 length))
(a3-0 (the-as object (-> this leading)))
)
(dotimes (s4-0 s2-0)
(let ((s3-0 (-> s1-0 data s4-0)))
(when (< (vector4-dot s5-0 (the-as vector (-> s3-0 trailing))) 0.0)
(let ((v1-10 (new 'stack-no-clear 'vector)))
(vector-! v1-10 s5-0 (-> s3-0 start))
(when (>= (-> this belt-radius) (fabs (vector-dot v1-10 (-> s3-0 radial-dir))))
(let* ((f0-7 (vector-dot v1-10 (-> s3-0 pull-dir)))
(f0-9 (- (-> v1-10 y) (* (-> s3-0 pull-dir y) f0-7)))
)
(when (and (>= f0-9 -41984.0) (>= 41779.2 f0-9))
(let ((a0-11 (new 'stack-no-clear 'vector)))
(set! sv-192 (new 'stack-no-clear 'vector))
(let* ((f30-0 (ray-plane-equation-intersect a0-11 s5-0 (-> s3-0 pull-dir) (the-as vector a3-0)))
(t9-1 ray-plane-equation-intersect)
(a1-5 s5-0)
(a2-4 (-> s3-0 pull-dir))
(a3-1 (-> s3-0 trailing))
(f0-10 (t9-1 sv-192 a1-5 a2-4 a3-1))
)
(let ((a1-6 (new 'stack-no-clear 'vector)))
(let ((v1-16 (-> s3-0 start)))
(let ((a0-13 (-> s3-0 pull-dir)))
(let ((a2-6 12288.0))
(.mov vf7 a2-6)
)
(.lvf vf5 (&-> a0-13 quad))
)
(.lvf vf4 (&-> v1-16 quad))
)
(.add.x.vf vf6 vf0 vf0 :mask #b1000)
(.mul.x.vf acc vf5 vf7 :mask #b111)
(.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111)
(.svf (&-> a1-6 quad) vf6)
)
0
(let ((f0-12 (/ f30-0 (- f30-0 f0-10))))
(set! sv-208 (new 'stack-no-clear 'vector))
(let ((t9-2 (method-of-object (-> this path) path-control-method-13)))
sv-208
(+ (the float (if (= s4-0 (+ s2-0 -1))
(+ s4-0 -1)
s4-0
)
)
f0-12
)
(t9-2)
)
)
)
)
(let ((v1-22 (new 'stack-no-clear 'vector)))
(let ((a0-15 v1-22)
(f0-15 (* (-> s3-0 speed) (seconds-per-frame)))
)
(vector-float*! a0-15 sv-208 f0-15)
)
(let ((a1-10 (new 'stack-no-clear 'vector)))
(let ((a0-17 s5-0))
(let ((a2-9 2048.0))
(.mov vf7 a2-9)
)
(.lvf vf5 (&-> v1-22 quad))
(.lvf vf4 (&-> a0-17 quad))
)
(.add.x.vf vf6 vf0 vf0 :mask #b1000)
(.mul.x.vf acc vf5 vf7 :mask #b111)
(.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111)
(.svf (&-> a1-10 quad) vf6)
)
)
0
(let ((s0-1 (-> s3-0 start)))
(set! sv-224 (-> s1-0 data (if (= s4-0 (+ s2-0 -1))
(+ s4-0 -1)
(+ s4-0 1)
)
)
)
(let ((s4-1 (new 'stack-no-clear 'vector)))
(let ((s2-1 (new 'stack-no-clear 'vector))
(s1-1 (new 'stack-no-clear 'vector))
)
(set! (-> s2-1 quad) (-> s3-0 pull-dir quad))
(vector-normalize! s2-1 1.0)
(vector-cross! s1-1 s2-1 *y-vector*)
(vector-normalize! s1-1 1.0)
(vector-cross! (-> arg0 normal) s2-1 s1-1)
)
(let ((t9-5 vector-segment-distance-point!)
(a3-2 s4-1)
)
(t9-5 s5-0 s0-1 (the-as vector sv-224) a3-2)
)
(set! (-> arg0 trans y) (-> s4-1 y))
)
)
(if (< (-> arg0 normal y) 0.0)
(vector-negate! (-> arg0 normal) (-> arg0 normal))
)
0
(return #t)
)
)
)
)
)
)
(set! a3-0 (+ (the-as uint (-> s1-0 data 0 trailing)) (* 80 s4-0)))
)
)
)
)
(return #f)
v0-7
)
)
;; definition for method 11 of type flow-control
;; INFO: Used lq/sq
;; WARN: Return type mismatch int vs none.
;; WARN: Function (method 11 flow-control) has a return type of none, but the expression builder found a return statement.
(defmethod push-process ((this flow-control) (arg0 process-focusable))
(rlet ((acc :class vf)
(vf0 :class vf)
(vf4 :class vf)
(vf5 :class vf)
(vf6 :class vf)
(vf7 :class vf)
)
(init-vf0-vector)
(let ((s5-0 (new 'stack-no-clear 'vector)))
(set! (-> s5-0 quad) (-> (get-trans arg0 0) quad))
(set! (-> s5-0 w) 1.0)
(when (>= (vector4-dot s5-0 (the-as vector (-> this leading))) 0.0)
(let* ((v1-7 (-> this sections))
(a0-3 (-> v1-7 length))
(a3-0 (the-as object (-> this leading)))
)
(dotimes (s3-1 a0-3)
(let ((s2-0 (-> v1-7 data s3-1)))
(when (< (vector4-dot s5-0 (the-as vector (-> s2-0 trailing))) 0.0)
(let ((v1-8 (new 'stack-no-clear 'vector)))
(vector-! v1-8 s5-0 (-> s2-0 start))
(when (>= (-> this belt-radius) (fabs (vector-dot v1-8 (-> s2-0 radial-dir))))
(let* ((f0-7 (vector-dot v1-8 (-> s2-0 pull-dir)))
(f0-9 (- (-> v1-8 y) (* (-> s2-0 pull-dir y) f0-7)))
)
(when (and (>= f0-9 -41984.0) (>= 41779.2 f0-9))
(let* ((a0-11 (new 'stack-no-clear 'vector))
(s1-0 (new 'stack-no-clear 'vector))
(f30-0 (ray-plane-equation-intersect a0-11 s5-0 (-> s2-0 pull-dir) (the-as vector a3-0)))
(f0-10 (ray-plane-equation-intersect s1-0 s5-0 (-> s2-0 pull-dir) (-> s2-0 trailing)))
)
(let ((a1-13 (new 'stack-no-clear 'vector)))
(let ((v1-13 (-> s2-0 start)))
(let ((a0-13 (-> s2-0 pull-dir)))
(let ((a2-6 12288.0))
(.mov vf7 a2-6)
)
(.lvf vf5 (&-> a0-13 quad))
)
(.lvf vf4 (&-> v1-13 quad))
)
(.add.x.vf vf6 vf0 vf0 :mask #b1000)
(.mul.x.vf acc vf5 vf7 :mask #b111)
(.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111)
(.svf (&-> a1-13 quad) vf6)
)
0
(let ((f0-12 (/ f30-0 (- f30-0 f0-10)))
(s1-1 (new 'stack-no-clear 'vector))
)
(let ((t9-3 (method-of-object (-> this path) path-control-method-13)))
(+ (the float s3-1) f0-12)
(t9-3)
)
(let ((v1-17 (new 'stack-no-clear 'vector)))
(vector-float*! v1-17 s1-1 (* (-> s2-0 speed) (seconds-per-frame)))
(let ((a1-16 (new 'stack-no-clear 'vector)))
(let ((a0-17 v1-17))
(let ((a2-9 2048.0))
(.mov vf7 a2-9)
)
(.lvf vf5 (&-> a0-17 quad))
)
(.lvf vf4 (&-> s5-0 quad))
(.add.x.vf vf6 vf0 vf0 :mask #b1000)
(.mul.x.vf acc vf5 vf7 :mask #b111)
(.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111)
(.svf (&-> a1-16 quad) vf6)
)
0
(send-event arg0 'push-trans v1-17 (seconds 10))
)
)
)
)
)
)
)
(return #f)
)
)
(set! a3-0 (+ (the-as uint (-> v1-7 data 0 trailing)) (* 80 s3-1)))
)
)
)
)
0
(none)
)
)
;; definition for method 12 of type flow-control
;; WARN: Return type mismatch int vs none.
(defmethod find-and-push-things ((this flow-control))
(local-vars (a0-10 float) (a2-5 float) (a2-12 float))
(rlet ((acc :class vf)
(vf0 :class vf)
(vf1 :class vf)
(vf2 :class vf)
(vf3 :class vf)
(vf4 :class vf)
)
(init-vf0-vector)
(set! *actor-list-length* 0)
(if #t
(set! *actor-list-length*
(fill-actor-list-for-box *actor-hash* (the-as bounding-box (-> this collide-bounds)) *actor-list* 256)
)
)
(when #t
(let ((a0-2 (-> *collide-player-list* alive-list next0)))
*collide-player-list*
(let ((v1-11 (-> a0-2 next0)))
(b! #t cfg-9 :delay (nop!))
(label cfg-4)
(let* ((a0-3 (-> (the-as connection a0-2) param1))
(a1-1 (-> (the-as collide-shape a0-3) root-prim))
)
(when (logtest? (-> a1-1 prim-core collide-as) (collide-spec jak bot enemy hit-by-others-list player-list))
(let ((a1-2 (-> a1-1 prim-core)))
(let ((a2-4 a1-2)
(a3-1 (-> this collide-bounds))
)
(.lvf vf2 (&-> a2-4 world-sphere quad))
(.lvf vf3 (&-> a3-1 quad))
)
(.sub.vf vf1 vf3 vf2)
(.mul.vf vf1 vf1 vf1)
(.add.y.vf vf1 vf1 vf1 :mask #b1)
(.add.z.vf vf1 vf1 vf1 :mask #b1)
(.mov a2-5 vf1)
(let ((f0-0 a2-5)
(f1-1 (+ (-> a1-2 world-sphere w) (-> this collide-bounds r)))
)
(when (< f0-0 (* f1-1 f1-1))
(when (< *actor-list-length* 256)
(set! (-> *actor-list* *actor-list-length*) (the-as collide-shape a0-3))
(set! *actor-list-length* (+ *actor-list-length* 1))
)
)
)
)
)
)
(set! a0-2 v1-11)
*collide-player-list*
(set! v1-11 (-> v1-11 next0))
)
(label cfg-9)
(b! (!= a0-2 (-> *collide-player-list* alive-list-end)) cfg-4 :delay (nop!))
)
)
(when #f
(let ((a0-5 (-> *collide-hit-by-player-list* alive-list next0)))
*collide-hit-by-player-list*
(let ((v1-18 (-> a0-5 next0)))
(while (!= a0-5 (-> *collide-hit-by-player-list* alive-list-end))
(let* ((a0-6 (-> (the-as connection a0-5) param1))
(a1-13 (-> (the-as collide-shape a0-6) root-prim))
)
(when (logtest? (-> a1-13 prim-core collide-as) (collide-spec jak bot enemy hit-by-others-list player-list))
(let ((a1-14 (-> a1-13 prim-core)))
(let ((a2-11 a1-14)
(a3-2 (-> this collide-bounds))
)
(.lvf vf2 (&-> a2-11 world-sphere quad))
(.lvf vf3 (&-> a3-2 quad))
)
(.sub.vf vf1 vf3 vf2)
(.mul.vf vf1 vf1 vf1)
(.add.y.vf vf1 vf1 vf1 :mask #b1)
(.add.z.vf vf1 vf1 vf1 :mask #b1)
(.mov a2-12 vf1)
(let ((f0-1 a2-12)
(f1-5 (+ (-> a1-14 world-sphere w) (-> this collide-bounds r)))
)
(when (< f0-1 (* f1-5 f1-5))
(when (< *actor-list-length* 256)
(set! (-> *actor-list* *actor-list-length*) (the-as collide-shape a0-6))
(set! *actor-list-length* (+ *actor-list-length* 1))
)
)
)
)
)
)
(set! a0-5 v1-18)
*collide-hit-by-player-list*
(set! v1-18 (-> v1-18 next0))
)
)
)
)
(dotimes (s5-0 *actor-list-length*)
(let* ((v1-23 (-> *actor-list* s5-0))
(a0-9 (-> v1-23 root-prim))
)
(when (logtest? (-> a0-9 prim-core collide-as) (collide-spec jak bot enemy hit-by-others-list player-list))
(.lvf vf1 (&-> this collide-bounds quad))
(.lvf vf2 (&-> a0-9 prim-core world-sphere quad))
(.sub.vf vf3 vf1 vf2)
(.add.w.vf vf4 vf1 vf2 :mask #b1000)
(.mul.vf vf3 vf3 vf3 :mask #b111)
(.mul.w.vf vf4 vf4 vf4 :mask #b1000)
(.mul.x.vf acc vf0 vf3 :mask #b1000)
(.add.mul.y.vf acc vf0 vf3 acc :mask #b1000)
(.add.mul.z.vf vf3 vf0 vf3 acc :mask #b1000)
(.sub.w.vf vf3 vf3 vf4 :mask #b1000)
(let ((f0-2 0.0))
(.add.w.vf vf3 vf0 vf3 :mask #b1)
(.mov a0-10 vf3)
(let ((s4-0 (-> v1-23 process)))
(b! (< f0-2 a0-10) cfg-30)
(let ((a1-29 (if (type? s4-0 process-focusable)
s4-0
)
)
)
(if (and a1-29 (not (logtest? (focus-status board) (-> (the-as process-focusable a1-29) focus-status))))
(push-process this (the-as process-focusable a1-29))
)
)
)
)
(label cfg-30)
0
)
)
)
0
(none)
)
)
;; definition for method 10 of type flow-control
;; INFO: Used lq/sq
;; WARN: Return type mismatch int vs none.
(defmethod setup ((this flow-control) (arg0 (pointer float)) (arg1 int))
(local-vars (sv-32 int) (sv-48 flow-section) (sv-64 int) (sv-80 flow-section))
(let* ((s5-0 (-> this path))
(s4-0 (-> s5-0 curve num-cverts))
(s3-0 (new 'stack-no-clear 'vector))
)
(let ((s0-0 (new 'process 'flow-section-array (+ s4-0 -1))))
(set! (-> this sections) s0-0)
(set! (-> this collide-bounds quad) (the-as uint128 0))
(get-point-in-path! s5-0 s3-0 0.0 'interp)
(vector+! (the-as vector (-> this collide-bounds)) (the-as vector (-> this collide-bounds)) s3-0)
(set! sv-32 (+ s4-0 -1))
(set! sv-48 (the-as flow-section #f))
(set! sv-64 0)
(while (< sv-64 sv-32)
(set! sv-80 (-> s0-0 data sv-64))
(let ((f0-0 1.0))
(if (< sv-64 arg1)
(set! f0-0 (-> arg0 sv-64))
)
(if arg0
(set! (-> sv-80 speed) (* f0-0 (-> this speed)))
(set! (-> sv-80 speed) (-> this speed))
)
)
(set! (-> sv-80 start quad) (-> s3-0 quad))
(get-point-in-path! s5-0 s3-0 (the float (+ sv-64 1)) 'interp)
(vector+! (the-as vector (-> this collide-bounds)) (the-as vector (-> this collide-bounds)) s3-0)
(vector-! (-> sv-80 pull-dir) s3-0 (-> sv-80 start))
(vector-normalize! (-> sv-80 pull-dir) 1.0)
(set! (-> sv-80 trailing quad) (-> sv-80 pull-dir quad))
(set! (-> sv-80 trailing y) 0.0)
(vector-normalize! (-> sv-80 trailing) 1.0)
(set-vector! (-> sv-80 radial-dir) (- (-> sv-80 trailing z)) 0.0 (-> sv-80 trailing x) 1.0)
(set! (-> sv-80 trailing w) (- (vector-dot s3-0 (the-as vector (-> sv-80 trailing)))))
(when sv-48
(vector+!
(the-as vector (-> sv-48 trailing))
(the-as vector (-> sv-48 trailing))
(the-as vector (-> sv-80 trailing))
)
(vector-normalize! (-> sv-48 trailing) 1.0)
(set! (-> sv-48 trailing w) (- (vector-dot (-> sv-80 start) (the-as vector (-> sv-48 trailing)))))
)
(set! sv-48 sv-80)
sv-48
(set! sv-64 (+ sv-64 1))
)
)
(let ((s2-1 (-> this sections data)))
(set! (-> this leading quad) (-> s2-1 0 pull-dir quad))
(set! (-> this leading y) 0.0)
(vector-normalize! (-> this leading) 1.0)
(set! (-> this leading w) (- (vector-dot (the-as vector (-> s2-1 0)) (the-as vector (-> this leading)))))
)
(let ((f0-22 (/ 1.0 (the float s4-0)))
(f30-0 0.0)
)
(vector-float*! (the-as vector (-> this collide-bounds)) (the-as vector (-> this collide-bounds)) f0-22)
(dotimes (s2-2 s4-0)
(get-point-in-path! s5-0 s3-0 (the float s2-2) 'interp)
(let ((f0-25 (vector-vector-distance-squared s3-0 (-> this collide-bounds))))
(if (< f30-0 f0-25)
(set! f30-0 f0-25)
)
)
)
(set! (-> this collide-bounds r) (+ (sqrtf f30-0) (-> this belt-radius)))
)
)
0
(none)
)
;; definition for method 0 of type flow-control
;; INFO: Used lq/sq
(defmethod new flow-control ((allocation symbol) (type-to-make type) (arg0 process-drawable) (arg1 res-lump))
(local-vars (r0-0 uint128) (v1-16 uint128) (sv-16 int))
(if (not arg1)
(set! arg1 (-> arg0 entity))
)
(let ((gp-0 (object-new allocation type-to-make (the-as int (-> type-to-make size)))))
(when (nonzero? gp-0)
(let ((v1-6 (new 'process 'curve-control arg0 'flow -1000000000.0)))
(cond
((nonzero? v1-6)
(set! (-> gp-0 path) v1-6)
(logior! (-> v1-6 flags) (path-control-flag display draw-line draw-point draw-text))
(if (< (-> v1-6 curve num-cverts) 2)
(go process-drawable-art-error "bad flow path")
)
(set! (-> gp-0 speed) (res-lump-float arg1 'speed :default 12288.0))
(set! (-> gp-0 belt-radius) (res-lump-float arg1 'extra-radius :default 16384.0))
(set! sv-16 0)
(let* ((a1-6 (res-lump-data arg1 'scale-factor pointer :tag-ptr (the-as (pointer res-tag) (& sv-16))))
(a0-8 gp-0)
(t9-6 (method-of-object a0-8 setup))
)
(let ((v1-15 (the-as uint128 sv-16)))
(.pcpyud v1-16 v1-15 r0-0)
)
(t9-6 a0-8 (the-as (pointer float) a1-6) (shr (* (the-as int v1-16) 2) 49))
)
)
(else
(go process-drawable-art-error "no flow path")
)
)
)
)
gp-0
)
)
;; definition of type water-flow
(deftype water-flow (process)
((root collide-shape)
(flow flow-control)
)
(:state-methods
idle
)
)
;; definition for method 3 of type water-flow
(defmethod inspect ((this water-flow))
(when (not this)
(set! this this)
(goto cfg-4)
)
(let ((t9-0 (method-of-type process inspect)))
(t9-0 this)
)
(format #t "~2Troot: ~A~%" (-> this root))
(format #t "~2Tflow: ~A~%" (-> this flow))
(label cfg-4)
this
)
;; definition for method 7 of type water-flow
;; WARN: Return type mismatch process vs water-flow.
(defmethod relocate ((this water-flow) (offset int))
(if (nonzero? (-> this flow))
(&+! (-> this flow) offset)
)
(the-as water-flow ((method-of-type process relocate) this offset))
)
;; definition for method 12 of type water-flow
(defmethod run-logic? ((this water-flow))
"Should this process be run? Checked by execute-process-tree."
#t
)
;; failed to figure out what this is:
(defstate idle (water-flow)
:virtual #t
:event (behavior ((proc process) (argc int) (message symbol) (block event-message-block))
(case message
(('water-info)
(let* ((gp-0 (-> block param 0))
(s5-0 proc)
(a0-2 (if (type? s5-0 process-focusable)
s5-0
)
)
)
(if (and a0-2 (focus-test? (the-as process-focusable a0-2) board))
#f
(flow-control-method-13 (-> self flow) (the-as water-info gp-0) (the-as vector (+ gp-0 0)))
)
)
)
(('touch-water)
(let* ((gp-1 (-> self flow))
(s5-1 proc)
(a1-8 (if (type? s5-1 process-focusable)
s5-1
)
)
)
(if (and (nonzero? gp-1) (and a1-8 (!= (-> a1-8 type) target) (< 0.0 (-> gp-1 speed))))
(push-process gp-1 (the-as process-focusable a1-8))
)
)
)
)
)
:code sleep-code
:post (behavior ()
(draw-path (-> self flow))
(if (and *target*
(focus-test? *target* touch-water)
(not (logtest? (focus-status board) (-> *target* focus-status)))
)
(push-process (-> self flow) *target*)
)
)
)
;; definition for method 11 of type water-flow
(defmethod init-from-entity! ((this water-flow) (arg0 entity-actor))
(set! (-> this root) (the-as collide-shape (new 'process 'trsqv)))
(process-drawable-from-entity! (the-as process-drawable this) arg0)
(set! (-> this flow) (new 'process 'flow-control (the-as process-drawable this) (the-as res-lump #f)))
(go (method-of-object this idle))
)
+5 -5
View File
@@ -47,15 +47,15 @@
)
(:methods
(new (symbol type process int float float float) _type_)
(water-control-method-9 () none)
(water-control-method-10 () none)
(water-control-method-9 (_type_) none)
(water-control-method-10 (_type_) none)
(start-bobbing! (_type_ float int int) none)
(distance-from-surface (_type_) float)
(spawn-ripples (_type_ float vector int vector symbol) none)
(display-water-marks? (_type_) symbol)
(water-control-method-15 () none)
(water-control-method-16 () none)
(water-control-method-17 () none)
(enter-water (_type_) none)
(water-control-method-16 (_type_) none)
(water-control-method-17 (_type_) none)
)
)
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+1 -6
View File
@@ -385,12 +385,7 @@
(when (or (and (-> subtask manager) (handle->process (-> subtask manager manager)))
(and (-> subtask manager)
(-> subtask manager level)
(let* ((a0-8 *level*)
(t9-2 (method-of-object a0-8 level-group-method-26))
(a1-1 (-> subtask manager level))
)
(= (t9-2 a0-8 a1-1) 'active)
)
(= (level-group-method-26 *level* (-> subtask manager level) (the-as int #f)) 'active)
)
(and (not (-> subtask manager)) (= (-> level info taskname) (-> subtask level)))
)
+11 -12
View File
@@ -2301,7 +2301,7 @@
)
)
(print-game-text
(lookup-text! *common-text* (text-id text-00a0) #f)
(lookup-text! *common-text* (text-id progress-memcard-saving) #f)
gp-1
#f
44
@@ -2316,7 +2316,7 @@
(set! (-> v1-38 height) (the float 200))
)
(let ((s5-2 print-game-text))
(format (clear *temp-string*) (lookup-text! *common-text* (text-id text-00a4) #f) 1)
(format (clear *temp-string*) (lookup-text! *common-text* (text-id progress-memcard-remove-warn) #f) 1)
(s5-2 *temp-string* gp-1 #f 44 (bucket-id hud-draw-hud-alpha))
)
)
@@ -2327,13 +2327,7 @@
(let* ((s5-3 (-> *display* frames (-> *display* on-screen) global-buf))
(gp-2 (-> s5-3 base))
)
(let ((a0-39 (-> self icon))
(t9-14 (method-of-type hud-sprite draw))
(a1-12 s5-3)
(a2-10 (-> self level))
)
(t9-14 a0-39 a1-12 a2-10)
)
(draw (-> self icon) s5-3 (-> self level) #f)
(let ((a3-8 (-> s5-3 base)))
(when (!= gp-2 a3-8)
(let ((v1-55 (the-as object (-> s5-3 base))))
@@ -2397,7 +2391,12 @@
)
(set! (-> self starting-auto-save-status) (the-as basic (-> *setting-control* user-default auto-save)))
(set! (-> *setting-control* user-default auto-save) #f)
(set-vector! (-> self icon color) 128 128 128 128)
(let ((v1-61 (-> self icon color-ptr)))
(set! (-> v1-61 0) 128)
(set! (-> v1-61 1) 128)
(set! (-> v1-61 2) 128)
(set! (-> v1-61 3) 128)
)
(set! (-> self icon pos x) 440)
(set! (-> self icon pos y) 210)
(set! (-> self icon pos z) #xffffff)
@@ -2405,8 +2404,8 @@
(set! (-> self icon scale-x) 2.0)
(set! (-> self icon scale-y) 2.0)
(set! (-> self icon angle) 0.0)
(set! (-> self icon flags) (the-as uint 0))
(set! (-> self icon tex) (lookup-texture-by-id (new 'static 'texture-id :page #x9)))
(set! (-> self icon flags) (hud-sprite-flags))
(set! (-> self icon tid) (the-as texture-id (get-texture checkpoint level-default-minimap)))
(go-virtual get-heap)
)
+1 -7
View File
@@ -1429,13 +1429,7 @@
(set! (-> s5-0 allow-error) (-> s4-0 allow-error))
(set! (-> s5-0 under-water-pitch-mod) (-> s4-0 under-water-pitch-mod))
(set! (-> s5-0 slow-time) (-> s4-0 slow-time))
(if (and (-> s4-0 mirror) (let* ((a0-55 *level*)
(t9-4 (method-of-object a0-55 level-group-method-26))
(a1-36 'ctywide)
)
(= (t9-4 a0-55 a1-36) 'active)
)
)
(if (and (-> s4-0 mirror) (= (level-group-method-26 *level* 'ctywide (the-as int #f)) 'active))
(set! (-> s5-0 mirror) #f)
(set! (-> s5-0 mirror) (-> s4-0 mirror))
)
+2 -2
View File
@@ -1646,13 +1646,13 @@
(text-name text-id)
(pre-play-node game-task-node)
(kiosk-play-node game-task-node)
(pre-play-continue string)
(pre-play-continue object)
(play-node game-task-node)
(play-continue string)
(kiosk-play-continue object)
)
(:methods
(game-task-info-method-9 (_type_) none)
(get-play-list-idx (_type_) int)
)
)
+1 -1
View File
@@ -18,7 +18,7 @@ These path-controls are typically allocated on a process heap."
(:methods
(new (symbol type process symbol float entity symbol) _type_)
(path-control-method-9 (_type_) none)
(path-control-method-10 () none)
(get-point-in-path! (_type_ vector float symbol) vector)
(path-control-method-11 () none)
(path-control-method-12 () none)
(path-control-method-13 () none)
+1 -5
View File
@@ -895,7 +895,7 @@
(wait-to-vu0 uint32)
)
(:methods
(ocean-method-11 () none)
(get-height (_type_ vector symbol) float)
(ocean-method-12 () none)
(ocean-method-13 () none)
(ocean-method-14 () none)
@@ -1344,7 +1344,3 @@
;; failed to figure out what this is:
0

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