Merge branch 'master' of github.com:water111/jak-project into w/overlord-stereo-dsync

This commit is contained in:
water
2023-05-19 19:38:20 -04:00
613 changed files with 119949 additions and 45251 deletions
+114 -110
View File
@@ -10,124 +10,128 @@
#include "third-party/fmt/ranges.h"
#include "third-party/json.hpp"
bool write_subtitle_db_to_files(const GameSubtitleDB& db) {
// Write the subtitles out
std::vector<int> completed_banks = {};
for (const auto& [id, bank] : db.m_banks) {
// If we've done the bank before, skip it
auto it = find(completed_banks.begin(), completed_banks.end(), bank->m_lang_id);
if (it != completed_banks.end()) {
continue;
}
// Check to see if this bank is shared by any other, if so do it at the same time
// and skip it
// This is basically just to deal with US/UK english in a not so hacky way
std::vector<int> banks = {};
for (const auto& [_id, _bank] : db.m_banks) {
if (_bank->file_path == bank->file_path) {
banks.push_back(_bank->m_lang_id);
completed_banks.push_back(_bank->m_lang_id);
SubtitleMetadataFile dump_bank_as_meta_json(std::shared_ptr<GameSubtitleBank> bank) {
auto meta_file = SubtitleMetadataFile();
auto font = get_font_bank(bank->m_text_version);
for (const auto& [scene_name, scene_info] : bank->m_scenes) {
if (scene_info.m_kind == SubtitleSceneKind::Movie) {
std::vector<SubtitleCutsceneLineMetadata> lines;
for (const auto& line : scene_info.m_lines) {
auto line_meta = SubtitleCutsceneLineMetadata();
line_meta.frame = line.frame;
if (line.line.empty()) {
line_meta.clear = true;
} else {
auto line_speaker = font->convert_game_to_utf8(line.speaker.c_str());
line_meta.offscreen = line.offscreen;
line_meta.speaker = line_speaker;
}
lines.push_back(line_meta);
}
}
std::string file_contents = "";
file_contents += fmt::format("(language-id {})\n", fmt::join(banks, " "));
auto file_ver = parse_text_only_version(bank->file_path);
auto font = get_font_bank(file_ver);
file_contents += fmt::format("(text-version {})\n", get_text_version_name(file_ver));
for (const auto& group_name : db.m_subtitle_groups->m_group_order) {
bool last_was_single = false;
file_contents +=
fmt::format("\n;; -----------------\n;; {}\n;; -----------------\n", group_name);
std::vector<GameSubtitleSceneInfo> all_scenes;
for (const auto& [scene_name, scene] : bank->scenes()) {
all_scenes.push_back(scene);
meta_file.cutscenes[scene_name] = lines;
} else if (scene_info.m_kind == SubtitleSceneKind::Hint ||
scene_info.m_kind == SubtitleSceneKind::HintNamed) {
SubtitleHintMetadata hint;
hint.id = fmt::format("{:x}", scene_info.m_id);
std::vector<SubtitleHintLineMetadata> lines;
for (const auto& line : scene_info.m_lines) {
auto line_meta = SubtitleHintLineMetadata();
line_meta.frame = line.frame;
if (line.line.empty()) {
line_meta.clear = true;
} else {
auto line_speaker = font->convert_game_to_utf8(line.speaker.c_str());
line_meta.speaker = line_speaker;
}
lines.push_back(line_meta);
}
std::sort(all_scenes.begin(), all_scenes.end(),
[](const GameSubtitleSceneInfo& a, const GameSubtitleSceneInfo& b) {
if (a.kind() != b.kind()) {
return a.kind() < b.kind();
}
if (a.kind() == SubtitleSceneKind::Movie) {
return a.name() < b.name();
} else if (a.kind() == SubtitleSceneKind::HintNamed) {
if (a.id() == b.id()) {
return a.name() < b.name();
} else {
return a.id() < b.id();
}
} else if (a.kind() == SubtitleSceneKind::Hint) {
return a.id() < b.id();
}
return false;
});
for (const auto& scene : all_scenes) {
if (scene.m_sorting_group != group_name) {
hint.lines = lines;
meta_file.hints[scene_name] = hint;
}
}
return meta_file;
}
SubtitleFile dump_bank_as_json(std::shared_ptr<GameSubtitleBank> bank) {
SubtitleFile file;
auto font = get_font_bank(bank->m_text_version);
// Figure out speakers
for (const auto& [scene_name, scene_info] : bank->m_scenes) {
for (const auto& line : scene_info.m_lines) {
if (line.line.empty()) {
continue;
}
auto line_speaker = font->convert_game_to_utf8(line.speaker.c_str());
file.speakers[line_speaker] = line_speaker;
}
}
// Hints
for (const auto& [scene_name, scene_info] : bank->m_scenes) {
if (scene_info.m_kind == SubtitleSceneKind::Hint ||
scene_info.m_kind == SubtitleSceneKind::HintNamed) {
file.hints[scene_name] = {};
for (const auto& scene_line : scene_info.m_lines) {
if (scene_line.line.empty()) {
continue;
}
if (last_was_single && scene.lines().size() == 1) {
file_contents += fmt::format("(\"{}\"", scene.name());
} else {
file_contents += fmt::format("\n(\"{}\"", scene.name());
}
if (scene.kind() == SubtitleSceneKind::Hint) {
file_contents += " :hint #x0";
} else if (scene.kind() == SubtitleSceneKind::HintNamed) {
file_contents += fmt::format(" :hint #x{0:x}", scene.id());
}
// more compact formatting for single-line entries
if (scene.lines().size() == 1) {
const auto& line = scene.lines().at(0);
if (line.line.empty()) {
file_contents += fmt::format(" ({})", line.frame);
} else {
file_contents += fmt::format(" ({}", line.frame);
if (line.offscreen && scene.kind() == SubtitleSceneKind::Movie) {
file_contents += " :offscreen";
}
file_contents +=
fmt::format(" \"{}\"", font->convert_game_to_utf8(line.speaker.c_str()));
file_contents += fmt::format(" \"{}\")", font->convert_game_to_utf8(line.line.c_str()));
}
file_contents += ")\n";
last_was_single = true;
} else {
file_contents += "\n";
for (auto& line : scene.lines()) {
// Clear screen entries
if (line.line.empty()) {
file_contents += fmt::format(" ({})\n", line.frame);
} else {
file_contents += fmt::format(" ({}", line.frame);
if (line.offscreen && scene.kind() == SubtitleSceneKind::Movie) {
file_contents += " :offscreen";
}
file_contents +=
fmt::format(" \"{}\"", font->convert_game_to_utf8(line.speaker.c_str()));
file_contents +=
fmt::format(" \"{}\")\n", font->convert_game_to_utf8(line.line.c_str()));
}
}
file_contents += " )\n";
last_was_single = false;
}
auto line_utf8 = font->convert_game_to_utf8(scene_line.line.c_str());
file.hints[scene_name].push_back(line_utf8);
}
}
// Commit it to the file
std::string full_path = (file_util::get_jak_project_dir() / fs::path(bank->file_path)).string();
file_util::write_text_file(full_path, file_contents);
}
// Write the subtitle group info out
nlohmann::json json(db.m_subtitle_groups->m_groups);
json[db.m_subtitle_groups->group_order_key] = nlohmann::json(db.m_subtitle_groups->m_group_order);
std::string file_path = (file_util::get_jak_project_dir() / "game" / "assets" / "jak1" /
"subtitle" / "subtitle-groups.json")
.string();
file_util::write_text_file(file_path, json.dump(2));
// Cutscenes
for (const auto& [scene_name, scene_info] : bank->m_scenes) {
if (scene_info.m_kind == SubtitleSceneKind::Movie) {
file.cutscenes[scene_name] = {};
for (const auto& scene_line : scene_info.m_lines) {
if (scene_line.line.empty()) {
continue;
}
auto line_utf8 = font->convert_game_to_utf8(scene_line.line.c_str());
file.cutscenes[scene_name].push_back(line_utf8);
}
}
}
return file;
}
const std::vector<std::string> locale_lookup = {
"en-US", "fr-FR", "de-DE", "es-ES", "it-IT", "jp-JP", "en-GB", "pt-PT", "fi-FI",
"sv-SE", "da-DK", "no-NO", "nl-NL", "pt-BR", "hu-HU", "ca-ES", "is-IS"};
bool write_subtitle_db_to_files(const GameSubtitleDB& db, const GameVersion game_version) {
try {
for (const auto& [language_id, bank] : db.m_banks) {
auto meta_file = dump_bank_as_meta_json(bank);
std::string dump_path = (file_util::get_jak_project_dir() / "game" / "assets" /
version_to_game_name(game_version) / "subtitle" /
fmt::format("subtitle_meta_{}.json", locale_lookup.at(language_id)))
.string();
json data = meta_file;
file_util::write_text_file(dump_path, data.dump(2));
// Now dump the actual subtitles
auto subtitle_file = dump_bank_as_json(bank);
dump_path = (file_util::get_jak_project_dir() / "game" / "assets" /
version_to_game_name(game_version) / "subtitle" /
fmt::format("subtitle_lines_{}.json", locale_lookup.at(language_id)))
.string();
data = subtitle_file;
file_util::write_text_file(dump_path, data.dump(2));
}
// Write the subtitle group info out
nlohmann::json json(db.m_subtitle_groups->m_groups);
json[db.m_subtitle_groups->group_order_key] =
nlohmann::json(db.m_subtitle_groups->m_group_order);
std::string file_path =
(file_util::get_jak_project_dir() / "game" / "assets" / version_to_game_name(game_version) /
"subtitle" / "subtitle-groups.json")
.string();
file_util::write_text_file(file_path, json.dump(2));
} catch (std::exception& ex) {
lg::error(ex.what());
return false;
}
return true;
}
@@ -2,4 +2,4 @@
#include "common/serialization/subtitles/subtitles_ser.h"
bool write_subtitle_db_to_files(const GameSubtitleDB& db);
bool write_subtitle_db_to_files(const GameSubtitleDB& db, const GameVersion game_version);
+460 -13
View File
@@ -291,10 +291,8 @@ void parse_subtitle(const goos::Object& data, GameSubtitleDB& db, const std::str
if (!db.bank_exists(lang)) {
// database has no lang yet
banks[lang] = db.add_bank(std::make_shared<GameSubtitleBank>(lang));
banks[lang]->file_path = file_path;
} else {
banks[lang] = db.bank_by_id(lang);
banks[lang]->file_path = file_path;
}
});
} else if (head.is_symbol("text-version")) {
@@ -306,7 +304,6 @@ void parse_subtitle(const goos::Object& data, GameSubtitleDB& db, const std::str
if (!ver_name.is_symbol()) {
throw std::runtime_error("invalid text version entry");
}
font = get_font_bank(ver_name.as_symbol()->name);
}
@@ -341,8 +338,6 @@ void parse_subtitle(const goos::Object& data, GameSubtitleDB& db, const std::str
id = head.as_int();
}
scene.set_id(id);
scene.m_sorting_group = db.m_subtitle_groups->find_group(scene.name());
scene.m_sorting_group_idx = db.m_subtitle_groups->find_group_index(scene.m_sorting_group);
for_each_in_list(entries, [&](const goos::Object& entry) {
if (entry.is_pair()) {
@@ -414,6 +409,172 @@ void parse_subtitle(const goos::Object& data, GameSubtitleDB& db, const std::str
}
}
void parse_subtitle_json(GameSubtitleDB& db, const GameSubtitleDefinitionFile& file_info) {
// TODO - some validation
// Init Settings
std::shared_ptr<GameSubtitleBank> bank;
if (!db.bank_exists(file_info.language_id)) {
// database has no lang yet
bank = db.add_bank(std::make_shared<GameSubtitleBank>(file_info.language_id));
} else {
bank = db.bank_by_id(file_info.language_id);
}
bank->m_text_version = file_info.text_version;
bank->m_file_path = file_info.lines_path;
const GameTextFontBank* font = get_font_bank(file_info.text_version);
// Parse the file
SubtitleMetadataFile meta_file;
SubtitleFile lines_file;
try {
// If we have a base file defined, load that and merge it
if (file_info.meta_base_path) {
auto base_data =
parse_commented_json(file_util::read_text_file(file_util::get_jak_project_dir() /
file_info.meta_base_path.value()),
"subtitle_meta_base_path");
auto data = parse_commented_json(
file_util::read_text_file(file_util::get_jak_project_dir() / file_info.meta_path),
"subtitle_meta_path");
base_data.at("cutscenes").update(data.at("cutscenes"));
base_data.at("hints").update(data.at("hints"));
meta_file = base_data;
} else {
meta_file = parse_commented_json(
file_util::read_text_file(file_util::get_jak_project_dir() / file_info.meta_path),
"subtitle_meta_path");
}
if (file_info.lines_base_path) {
auto base_data =
parse_commented_json(file_util::read_text_file(file_util::get_jak_project_dir() /
file_info.lines_base_path.value()),
"subtitle_line_base_path");
auto data = parse_commented_json(
file_util::read_text_file(file_util::get_jak_project_dir() / file_info.lines_path),
"subtitle_line_path");
base_data.at("cutscenes").update(data.at("cutscenes"));
base_data.at("hints").update(data.at("hints"));
base_data.at("speakers").update(data.at("speakers"));
auto test = base_data.dump();
lines_file = base_data;
} else {
lines_file = parse_commented_json(
file_util::read_text_file(file_util::get_jak_project_dir() / file_info.lines_path),
"subtitle_line_path");
}
} catch (std::exception& e) {
lg::error("Unable to parse subtitle json entry, couldn't successfully load files - {}",
e.what());
throw;
}
// Iterate through the metadata file as blank lines are no omitted from the lines file now
// Cutscenes First
for (const auto& [cutscene_name, cutscene_lines] : meta_file.cutscenes) {
GameSubtitleSceneInfo scene(SubtitleSceneKind::Movie);
scene.set_name(cutscene_name);
scene.m_sorting_group = db.m_subtitle_groups->find_group(cutscene_name);
scene.m_sorting_group_idx = db.m_subtitle_groups->find_group_index(scene.m_sorting_group);
// Iterate the lines, grab the actual text from the lines file if it's not a clear screen entry
int line_idx = 0;
int lines_added = 0;
for (const auto& line : cutscene_lines) {
if (line.clear) {
scene.add_clear_entry(line.frame);
lines_added++;
} else {
if (lines_file.speakers.find(line.speaker) == lines_file.speakers.end() ||
lines_file.cutscenes.find(cutscene_name) == lines_file.cutscenes.end() ||
lines_file.cutscenes.at(cutscene_name).size() < line_idx) {
lg::warn(
"{} Couldn't find {} in line file, or line list is too small, or speaker could not "
"be resolved {}!",
file_info.language_id, cutscene_name, line.speaker);
} else {
// NOTE - the convert_utf8_to_game function is really really slow (about 80-90% of the
// time loading the subtitle files)
// TODO - improve that as a follow up sometime in the future
scene.add_line(
line.frame,
font->convert_utf8_to_game(lines_file.cutscenes.at(cutscene_name).at(line_idx)),
font->convert_utf8_to_game(lines_file.speakers.at(line.speaker)), line.offscreen);
lines_added++;
}
line_idx++;
}
}
// Verify we added the amount of lines we expected to
if (lines_added != cutscene_lines.size()) {
throw std::runtime_error(
fmt::format("Cutscene: '{}' has a mismatch in metadata lines vs text lines. Expected {} "
"only added {} lines",
cutscene_name, cutscene_lines.size(), lines_added));
}
// TODO - add scene, can't we just use an emplace here?
if (!bank->scene_exists(scene.name())) {
bank->add_scene(scene);
} else {
auto& old_scene = bank->scene_by_name(scene.name());
old_scene.from_other_scene(scene);
}
}
// Now hints
for (const auto& [hint_name, hint_info] : meta_file.hints) {
GameSubtitleSceneInfo scene(SubtitleSceneKind::Hint);
scene.set_name(hint_name);
/*scene.m_sorting_group = db.m_subtitle_groups->find_group(hint_name);
scene.m_sorting_group_idx = db.m_subtitle_groups->find_group_index(scene.m_sorting_group);*/
if (hint_info.id == "0") {
scene.m_kind = SubtitleSceneKind::HintNamed;
} else {
scene.set_id(std::stoi(hint_info.id, nullptr, 16));
}
// Iterate the lines, grab the actual text from the lines file if it's not a clear screen entry
int line_idx = 0;
int lines_added = 0;
for (const auto& line : hint_info.lines) {
if (line.clear) {
scene.add_clear_entry(line.frame);
lines_added++;
} else {
if (lines_file.speakers.find(line.speaker) == lines_file.speakers.end() ||
lines_file.hints.find(hint_name) == lines_file.hints.end() ||
lines_file.hints.at(hint_name).size() < line_idx) {
lg::warn(
"{} Couldn't find {} in line file, or line list is too small, or speaker could not "
"be resolved {}!",
file_info.language_id, hint_name, line.speaker);
} else {
// NOTE - the convert_utf8_to_game function is really really slow (about 80-90% of the
// time loading the subtitle files)
// TODO - improve that as a follow up sometime in the future
scene.add_line(line.frame,
font->convert_utf8_to_game(lines_file.hints.at(hint_name).at(line_idx)),
font->convert_utf8_to_game(lines_file.speakers.at(line.speaker)), true);
lines_added++;
}
line_idx++;
}
}
// Verify we added the amount of lines we expected to
if (lines_added != hint_info.lines.size()) {
throw std::runtime_error(
fmt::format("Hint: '{}' has a mismatch in metadata lines vs text lines. Expected {} "
"only added {} lines",
hint_name, hint_info.lines.size(), lines_added));
}
// TODO - add scene, can't we just use an emplace here?
if (!bank->scene_exists(scene.name())) {
bank->add_scene(scene);
} else {
auto& old_scene = bank->scene_by_name(scene.name());
old_scene.from_other_scene(scene);
}
}
}
GameTextVersion parse_text_only_version(const std::string& filename) {
goos::Reader reader;
return parse_text_only_version(reader.read_from_file({filename}));
@@ -557,6 +718,244 @@ void open_text_project(const std::string& kind,
});
}
void open_subtitle_project(const std::string& kind,
const std::string& filename,
std::vector<GameSubtitleDefinitionFile>& subtitle_files) {
goos::Reader reader;
auto& proj = reader.read_from_file({filename}).as_pair()->cdr.as_pair()->car;
if (!proj.is_pair() || !proj.as_pair()->car.is_symbol() ||
proj.as_pair()->car.as_symbol()->name != kind) {
throw std::runtime_error(fmt::format("invalid {} project", kind));
}
goos::for_each_in_list(proj.as_pair()->cdr, [&](const goos::Object& o) {
if (o.is_pair() && o.as_pair()->cdr.is_pair()) {
auto args = o.as_pair();
auto& action = args->car.as_symbol()->name;
args = args->cdr.as_pair();
if (action == "file") {
auto& file_path = args->car.as_string()->data;
auto new_file = GameSubtitleDefinitionFile();
new_file.format = GameSubtitleDefinitionFile::Format::GOAL;
new_file.lines_path = file_path;
subtitle_files.push_back(new_file);
} else if (action == "file-json") {
auto new_file = GameSubtitleDefinitionFile();
new_file.format = GameSubtitleDefinitionFile::Format::JSON;
while (true) {
const auto& kwarg = args->car.as_symbol()->name;
args = args->cdr.as_pair();
if (kwarg == ":language-id") {
new_file.language_id = args->car.as_int();
} else if (kwarg == ":text-version") {
new_file.text_version = args->car.as_string()->data;
} else if (kwarg == ":lines") {
new_file.lines_path = args->car.as_string()->data;
} else if (kwarg == ":meta") {
new_file.meta_path = args->car.as_string()->data;
} else if (kwarg == ":lines-base") {
new_file.lines_base_path = args->car.as_string()->data;
} else if (kwarg == ":meta-base") {
new_file.meta_base_path = args->car.as_string()->data;
}
if (args->cdr.is_empty_list()) {
break;
}
args = args->cdr.as_pair();
}
subtitle_files.push_back(new_file);
} else {
throw std::runtime_error(fmt::format("unknown action {} in {} project", action, kind));
}
} else {
throw std::runtime_error(fmt::format("invalid entry in {} project", kind));
}
});
}
void to_json(json& j, const SubtitleCutsceneLineMetadata& obj) {
j = json{{"frame", obj.frame},
{"offscreen", obj.offscreen},
{"speaker", obj.speaker},
{"clear", obj.clear}};
}
void from_json(const json& j, SubtitleCutsceneLineMetadata& obj) {
json_deserialize_if_exists(frame);
json_deserialize_if_exists(offscreen);
json_deserialize_if_exists(speaker);
json_deserialize_if_exists(clear);
}
void to_json(json& j, const SubtitleHintLineMetadata& obj) {
j = json{{"frame", obj.frame}, {"speaker", obj.speaker}, {"clear", obj.clear}};
}
void from_json(const json& j, SubtitleHintLineMetadata& obj) {
json_deserialize_if_exists(frame);
json_deserialize_if_exists(speaker);
json_deserialize_if_exists(clear);
}
void to_json(json& j, const SubtitleHintMetadata& obj) {
j = json{{"id", obj.id}, {"lines", obj.lines}};
}
void from_json(const json& j, SubtitleHintMetadata& obj) {
json_deserialize_if_exists(id);
json_deserialize_if_exists(lines);
}
void to_json(json& j, const SubtitleMetadataFile& obj) {
j = json{{"cutscenes", obj.cutscenes}, {"hints", obj.hints}};
}
void from_json(const json& j, SubtitleMetadataFile& obj) {
json_deserialize_if_exists(cutscenes);
json_deserialize_if_exists(hints);
}
void to_json(json& j, const SubtitleFile& obj) {
j = json{{"speakers", obj.speakers}, {"cutscenes", obj.cutscenes}, {"hints", obj.hints}};
}
void from_json(const json& j, SubtitleFile& obj) {
json_deserialize_if_exists(speakers);
json_deserialize_if_exists(cutscenes);
json_deserialize_if_exists(hints);
}
// TODO - temporary code for migration
SubtitleMetadataFile dump_bank_as_meta_json(
std::shared_ptr<GameSubtitleBank> bank,
std::unordered_map<std::string, std::string> speaker_lookup) {
auto meta_file = SubtitleMetadataFile();
auto font = get_font_bank("jak1-v2");
for (const auto& [scene_name, scene_info] : bank->m_scenes) {
if (scene_info.m_kind == SubtitleSceneKind::Movie) {
std::vector<SubtitleCutsceneLineMetadata> lines;
for (const auto& line : scene_info.m_lines) {
auto line_meta = SubtitleCutsceneLineMetadata();
line_meta.frame = line.frame;
if (line.line.empty()) {
line_meta.clear = true;
} else {
auto line_speaker = font->convert_game_to_utf8(line.speaker.c_str());
for (const auto& [speaker, speaker_localized] : speaker_lookup) {
if (line_speaker == speaker_localized) {
line_speaker = speaker;
}
}
line_meta.offscreen = line.offscreen;
line_meta.speaker = line_speaker;
}
lines.push_back(line_meta);
}
meta_file.cutscenes[scene_name] = lines;
} else if (scene_info.m_kind == SubtitleSceneKind::Hint ||
scene_info.m_kind == SubtitleSceneKind::HintNamed) {
SubtitleHintMetadata hint;
hint.id = fmt::format("{:x}", scene_info.m_id);
std::vector<SubtitleHintLineMetadata> lines;
for (const auto& line : scene_info.m_lines) {
auto line_meta = SubtitleHintLineMetadata();
line_meta.frame = line.frame;
if (line.line.empty()) {
line_meta.clear = true;
} else {
auto line_speaker = font->convert_game_to_utf8(line.speaker.c_str());
for (const auto& [speaker, speaker_localized] : speaker_lookup) {
if (line_speaker == speaker_localized) {
line_speaker = speaker;
}
}
line_meta.speaker = line_speaker;
}
lines.push_back(line_meta);
}
hint.lines = lines;
meta_file.hints[scene_name] = hint;
}
}
return meta_file;
}
// TODO - temporary code for migration
SubtitleFile dump_bank_as_json(std::shared_ptr<GameSubtitleBank> bank,
std::shared_ptr<GameSubtitleBank> base_bank,
std::unordered_map<std::string, std::string> speaker_lookup) {
SubtitleFile file;
file.speakers = speaker_lookup;
auto font = get_font_bank("jak1-v2");
// Figure out speakers
for (const auto& [scene_name, scene_info] : bank->m_scenes) {
for (const auto& line : scene_info.m_lines) {
if (line.line.empty()) {
continue;
}
auto line_speaker = font->convert_game_to_utf8(line.speaker.c_str());
bool new_speaker = true;
for (const auto& [speaker, speaker_localized] : file.speakers) {
if (line_speaker == speaker_localized) {
new_speaker = false;
break;
}
}
if (new_speaker) {
// if the speaker is in the english speaker map, append it
if (speaker_lookup.find(line_speaker) != speaker_lookup.end()) {
file.speakers[line_speaker] = line_speaker;
} else {
// otherwise, go figure it out manually, most names are the same so this isn't worth
// writing code for
file.speakers[fmt::format("unknown-{}", scene_info.m_name)] = line_speaker;
}
}
}
}
// Hints
for (const auto& [scene_name, scene_info] : bank->m_scenes) {
if (scene_info.m_kind == SubtitleSceneKind::Hint ||
scene_info.m_kind == SubtitleSceneKind::HintNamed) {
// Check if the number of hints in the translated language match that of the base language
if (base_bank->m_scenes.find(scene_name) == base_bank->m_scenes.end()) {
lg::warn("scene not found in base language - {}:{}", bank->m_lang_id, scene_name);
} else {
if (scene_info.m_lines.size() > base_bank->m_scenes.at(scene_name).m_lines.size()) {
lg::info("hint - translation has more lines than base - {}:{}", bank->m_lang_id,
scene_name);
}
file.hints[scene_name] = {};
for (const auto& scene_line : scene_info.m_lines) {
if (scene_line.line.empty()) {
continue;
}
auto line_utf8 = font->convert_game_to_utf8(scene_line.line.c_str());
file.hints[scene_name].push_back(line_utf8);
}
}
}
}
// Cutscenes
for (const auto& [scene_name, scene_info] : bank->m_scenes) {
if (scene_info.m_kind == SubtitleSceneKind::Movie) {
// Check if the number of hints in the translated language match that of the base language
if (base_bank->m_scenes.find(scene_name) == base_bank->m_scenes.end()) {
lg::warn("scene not found in base language - {}:{}", bank->m_lang_id, scene_name);
} else {
if (scene_info.m_lines.size() > base_bank->m_scenes.at(scene_name).m_lines.size()) {
lg::info("cutscene - translation has more lines than base - {}:{}", bank->m_lang_id,
scene_name);
}
file.cutscenes[scene_name] = {};
for (const auto& scene_line : scene_info.m_lines) {
if (scene_line.line.empty()) {
continue;
}
auto line_utf8 = font->convert_game_to_utf8(scene_line.line.c_str());
file.cutscenes[scene_name].push_back(line_utf8);
}
}
}
}
return file;
}
GameSubtitleDB load_subtitle_project(GameVersion game_version) {
// Load the subtitle files
GameSubtitleDB db;
@@ -564,22 +963,70 @@ GameSubtitleDB load_subtitle_project(GameVersion game_version) {
db.m_subtitle_groups->hydrate_from_asset_file();
try {
goos::Reader reader;
std::vector<GameTextDefinitionFile> files;
std::vector<GameSubtitleDefinitionFile> files;
std::string subtitle_project = (file_util::get_jak_project_dir() / "game" / "assets" /
version_to_game_name(game_version) / "game_subtitle.gp")
.string();
open_text_project("subtitle", subtitle_project, files);
open_subtitle_project("subtitle", subtitle_project, files);
for (auto& file : files) {
if (file.format != GameTextDefinitionFile::Format::GOAL) {
continue; // non-GOAL formats are not supported for subtitles
if (file.format == GameSubtitleDefinitionFile::Format::GOAL) {
auto code = reader.read_from_file({file.lines_path});
parse_subtitle(code, db, file.lines_path);
} else if (file.format == GameSubtitleDefinitionFile::Format::JSON) {
parse_subtitle_json(db, file);
}
auto code = reader.read_from_file({file.file_path});
parse_subtitle(code, db, file.file_path);
}
} catch (std::runtime_error& e) {
lg::error("error loading subtitle project: {}", e.what());
}
// Dump new JSON format (uncomment if you need it)
// TODO -- TEMPORARY CODE FOR MIGRATION -- REMOVE LATER
// auto speaker_json = parse_commented_json(
// file_util::read_text_file((file_util::get_jak_project_dir() / "game" / "assets" /
// version_to_game_name(game_version) / "subtitle" /
// "_speaker_lookup.jsonc")),
// "_speaker_lookup.jsonc");
// auto speaker_lookup =
// speaker_json
// .get<std::unordered_map<std::string, std::unordered_map<std::string, std::string>>>();
// std::vector<std::string> locale_lookup = {"en-US", "fr-FR", "de-DE", "es-ES", "it-IT",
// "jp-JP", "en-GB", "pt-PT", "fi-FI", "sv-SE",
// "da-DK", "no-NO", "nl-NL", "pt-BR", "hu-HU", "ca-ES",
// "is-IS"};
// for (const auto& [language_id, bank] : db.m_banks) {
// auto meta_file =
// dump_bank_as_meta_json(bank, speaker_lookup.at(fmt::format("{}", language_id)));
// std::string dump_path =
// (file_util::get_jak_project_dir() / "game" / "assets" /
// version_to_game_name(game_version) /
// "subtitle" / fmt::format("subtitle_meta_{}.json", locale_lookup.at(language_id)))
// .string();
// json data = meta_file;
// try {
// std::string str = data.dump(2);
// file_util::write_text_file(dump_path, str);
// } catch (std::exception& ex) {
// lg::error(ex.what());
// }
// // Now dump the actual subtitles
// auto subtitle_file = dump_bank_as_json(bank, db.m_banks.at(0),
// speaker_lookup.at(fmt::format("{}", language_id)));
// dump_path =
// (file_util::get_jak_project_dir() / "game" / "assets" /
// version_to_game_name(game_version) /
// "subtitle" / fmt::format("subtitle_lines_{}.json", locale_lookup.at(language_id)))
// .string();
// data = subtitle_file;
// try {
// std::string str = data.dump(2);
// file_util::write_text_file(dump_path, str);
// } catch (std::exception& ex) {
// lg::error(ex.what());
// }
// }
return db;
}
// TODO - write a deserializer, the compiler still can do the compiling!
+68 -3
View File
@@ -15,15 +15,69 @@
#include "common/util/json_util.h"
#include "common/versions/versions.h"
struct SubtitleCutsceneLineMetadata {
// Always required
int frame;
// Actual lines
bool offscreen;
std::string speaker;
// Clear entries
bool clear;
};
void to_json(json& j, const SubtitleCutsceneLineMetadata& obj);
void from_json(const json& j, SubtitleCutsceneLineMetadata& obj);
struct SubtitleHintLineMetadata {
int frame;
std::string speaker;
// Clear entries
bool clear;
};
void to_json(json& j, const SubtitleHintLineMetadata& obj);
void from_json(const json& j, SubtitleHintLineMetadata& obj);
struct SubtitleHintMetadata {
std::string id; // hex
std::vector<SubtitleHintLineMetadata> lines;
};
void to_json(json& j, const SubtitleHintMetadata& obj);
void from_json(const json& j, SubtitleHintMetadata& obj);
struct SubtitleMetadataFile {
std::unordered_map<std::string, std::vector<SubtitleCutsceneLineMetadata>> cutscenes;
std::unordered_map<std::string, SubtitleHintMetadata> hints;
};
void to_json(json& j, const SubtitleMetadataFile& obj);
void from_json(const json& j, SubtitleMetadataFile& obj);
struct SubtitleFile {
std::unordered_map<std::string, std::string> speakers;
std::unordered_map<std::string, std::vector<std::string>> cutscenes;
std::unordered_map<std::string, std::vector<std::string>> hints;
};
void to_json(json& j, const SubtitleFile& obj);
void from_json(const json& j, SubtitleFile& obj);
struct GameTextDefinitionFile {
enum class Format { GOAL, JSON };
Format format;
std::string file_path = "";
int language_id = -1;
std::string text_version = "";
std::string text_version = "jak1-v2";
std::optional<std::string> group_name = std::nullopt;
};
struct GameSubtitleDefinitionFile {
enum class Format { GOAL, JSON };
Format format;
int language_id = -1;
std::string text_version = "jak1-v2";
std::string lines_path = "";
std::optional<std::string> lines_base_path = std::nullopt;
std::string meta_path = "";
std::optional<std::string> meta_base_path = std::nullopt;
};
/*!
* The text bank contains all lines (accessed with an ID) for a language.
*/
@@ -117,6 +171,13 @@ class GameSubtitleSceneInfo {
void add_line(int frame, std::string line, std::string speaker, bool offscreen) {
m_lines.emplace_back(SubtitleLine(frame, line, speaker, offscreen));
// TODO - sorting after every insertion is slow, sort on the add scene instead
std::sort(m_lines.begin(), m_lines.end());
}
void add_clear_entry(int frame) {
m_lines.emplace_back(SubtitleLine(frame, "", "", false));
// TODO - sorting after every insertion is slow, sort on the add scene instead
std::sort(m_lines.begin(), m_lines.end());
}
@@ -146,8 +207,8 @@ class GameSubtitleBank {
}
int m_lang_id;
std::string file_path;
std::string m_text_version;
std::string m_file_path;
std::map<std::string, GameSubtitleSceneInfo> m_scenes;
};
@@ -199,6 +260,7 @@ void parse_text_json(const nlohmann::json& json,
GameTextDB& db,
const GameTextDefinitionFile& file_info);
void parse_subtitle(const goos::Object& data, GameSubtitleDB& db, const std::string& file_path);
void parse_subtitle_json(GameSubtitleDB& db, const GameSubtitleDefinitionFile& file_info);
GameTextVersion parse_text_only_version(const std::string& filename);
GameTextVersion parse_text_only_version(const goos::Object& data);
@@ -206,4 +268,7 @@ GameTextVersion parse_text_only_version(const goos::Object& data);
void open_text_project(const std::string& kind,
const std::string& filename,
std::vector<GameTextDefinitionFile>& inputs);
void open_subtitle_project(const std::string& kind,
const std::string& filename,
std::vector<GameSubtitleDefinitionFile>& inputs);
GameSubtitleDB load_subtitle_project(GameVersion game_version);
+7
View File
@@ -6,6 +6,13 @@
#include "third-party/json.hpp"
using json = nlohmann::json;
std::string strip_cpp_style_comments(const std::string& input);
nlohmann::json parse_commented_json(const std::string& input, const std::string& source_name);
Range<int> parse_json_optional_integer_range(const nlohmann::json& json);
#define json_deserialize_if_exists(field_name) \
if (j.contains(#field_name)) { \
j.at(#field_name).get_to(obj.field_name); \
}
+9
View File
@@ -1,3 +1,12 @@
files:
- source: /game/assets/jak1/text/game_custom_text_en-US.json
translation: /game/assets/jak1/text/game_custom_text_%locale%.json
- source: /game/assets/jak1/subtitle/subtitle_lines_en-US.json
translation: /game/assets/jak1/subtitle/subtitle_lines_%locale%.json
excluded_target_languages:
- "fr"
- "de"
- "es-ES"
- "it"
- "ja"
- "en-GB"
+1
View File
@@ -1294,6 +1294,7 @@ class DerefElement : public FormElement {
private:
ConstantTokenElement* try_as_art_const(const Env& env, FormPool& pool);
GenericElement* try_as_curtime(FormPool& pool);
Form* m_base = nullptr;
bool m_is_addr_of = false;
+20
View File
@@ -3876,6 +3876,19 @@ ConstantTokenElement* DerefElement::try_as_art_const(const Env& env, FormPool& p
return nullptr;
}
GenericElement* DerefElement::try_as_curtime(FormPool& pool) {
auto mr = match(Matcher::deref(Matcher::s6(), false,
{DerefTokenMatcher::string("clock"),
DerefTokenMatcher::string("frame-counter")}),
this);
if (mr.matched) {
return pool.alloc_element<GenericElement>(
GenericOperator::make_function(pool.form<ConstantTokenElement>("current-time")));
}
return nullptr;
}
void DerefElement::update_from_stack(const Env& env,
FormPool& pool,
FormStack& stack,
@@ -3911,6 +3924,13 @@ void DerefElement::update_from_stack(const Env& env,
env.dts->ts.try_enum_lookup("game-task-node"), pool, env, m_tokens.at(1).int_constant()));
}
// current-time macro
auto as_curtime = try_as_curtime(pool);
if (as_curtime) {
result->push_back(as_curtime);
return;
}
result->push_back(this);
}
+18 -17
View File
@@ -7205,6 +7205,7 @@
(scene-nest-boss-intro #x306)
(scene-intro #x307)
(scene-outro #x308)
(scene-subtitles-hint #x30c)
(scene-subtitles-enabled #x30d)
(scene-subtitles-disabled #x30e)
(board-name #x30f)
@@ -13463,7 +13464,7 @@
(channel gui-channel :offset-assert 4)
(flags uint8 :offset-assert 5)
(speech uint16 :offset-assert 6)
(text-message uint32 :offset-assert 8)
(text-message text-id :offset-assert 8)
(text-duration uint16 :offset-assert 12)
(delay uint16 :offset-assert 14)
(pos uint16 :offset-assert 16)
@@ -15683,7 +15684,7 @@
(pre-cut-frame basic :offset-assert 288)
(preload-continue string :offset-assert 292)
(dma-max uint32 :offset-assert 296)
(gui-id uint32 :offset-assert 300)
(gui-id sound-id :offset-assert 300)
(aborted? symbol :offset-assert 304)
(scene-start-time time-frame :offset-assert 312)
(targ-speed float :offset-assert 320)
@@ -30617,8 +30618,8 @@
(deftype fail-mission-params (structure)
((message fail-mission-message :offset-assert 0)
(flags fail-mission-flags :offset-assert 1)
(retry-continue basic :offset-assert 4)
(fail-continue basic :offset-assert 8)
(retry-continue string :offset-assert 4)
(fail-continue string :offset-assert 8)
(reset-delay uint32 :offset-assert 12)
(task game-task :offset-assert 16)
(fail-message text-id :offset-assert 20)
@@ -30647,15 +30648,15 @@
(deftype fail-mission (process)
((message fail-mission-message :offset-assert 128)
(flags fail-mission-flags :offset-assert 129)
(retry-continue basic :offset-assert 132)
(fail-continue basic :offset-assert 136)
(retry-continue string :offset-assert 132)
(fail-continue string :offset-assert 136)
(reset-delay uint32 :offset-assert 140)
(grabbed-time time-frame :offset-assert 144)
(retry symbol :offset-assert 152)
(task game-task :offset-assert 156)
(message-id uint32 :offset-assert 160)
(fail-message uint32 :offset-assert 164)
(stinger uint32 :offset-assert 168)
(message-id sound-id :offset-assert 160)
(fail-message text-id :offset-assert 164)
(stinger sound-id :offset-assert 168)
)
:method-count-assert 17
:size-assert #xac
@@ -40256,7 +40257,7 @@
(gameplay-pass int32 :offset-assert 724)
(hud-handle handle :offset-assert 728)
(channel uint8 :offset-assert 736)
(id uint32 :offset-assert 740)
(id sound-id :offset-assert 740)
(play-clone-wave-speech symbol :offset-assert 744)
(last-damage-time time-frame :offset-assert 752)
(spawn-charge symbol :offset-assert 760)
@@ -41982,8 +41983,8 @@
(
(anim-frame float :offset-assert 200)
(transition float :offset-assert 204)
(gui-id-1 uint32 :offset-assert 208)
(gui-id-2 uint32 :offset-assert 212)
(gui-id-1 sound-id :offset-assert 208)
(gui-id-2 sound-id :offset-assert 212)
)
:method-count-assert 25
:size-assert #xd8 ;; 216
@@ -43468,7 +43469,7 @@
(draw int32 :offset-assert 316)
(active symbol :offset-assert 320)
(spark-time time-frame :offset-assert 328)
(gui-id uint32 :offset-assert 336)
(gui-id sound-id :offset-assert 336)
)
:method-count-assert 15
:size-assert #x154
@@ -44188,7 +44189,7 @@
(pillar (pointer tomb-boulder-pillar) 4 :offset-assert 236)
(mode uint32 :offset-assert 252)
(sub-mode uint32 :offset-assert 256)
(gui-id uint32 :offset-assert 260)
(gui-id sound-id :offset-assert 260)
(target-pause symbol :offset-assert 264)
(current-pause symbol :offset-assert 268)
(previous-y-vel float :offset-assert 272)
@@ -44789,7 +44790,7 @@
(draw-name basic :offset-assert 328)
(active symbol :offset-assert 332)
(spark-time time-frame :offset-assert 336)
(gui-id uint32 :offset-assert 344)
(gui-id sound-id :offset-assert 344)
)
:method-count-assert 18
:size-assert #x15c
@@ -50473,7 +50474,7 @@
((race-state race-state :offset-assert 128)
(state-time time-frame :offset-assert 136)
(player-on-track-time time-frame :offset-assert 144)
(message-id uint32 :offset-assert 152)
(message-id sound-id :offset-assert 152)
(finish-sound-id sound-id :offset-assert 156)
)
:method-count-assert 28
@@ -51577,7 +51578,7 @@
(task-node uint16 :offset-assert 1068)
(end-pos vector :inline :offset-assert 1072)
(index uint32 :offset-assert 1088)
(gui-id uint32 :offset-assert 1092)
(gui-id sound-id :offset-assert 1092)
)
:method-count-assert 219
:size-assert #x448
+117 -11
View File
@@ -1,17 +1,123 @@
;; "project file" for subtitles make tool.
;; it's very simple... a list of (action args...)
;; There is one supported action:
;; - file (A path to a GOAL data file)
;; - the same arguments are provided within the file itself
(subtitle
(file "game/assets/jak1/subtitle/game_subtitle_en.gd")
(file "game/assets/jak1/subtitle/game_subtitle_fr.gd")
(file "game/assets/jak1/subtitle/game_subtitle_en-uk.gd")
(file "game/assets/jak1/subtitle/game_subtitle_de.gd")
(file "game/assets/jak1/subtitle/game_subtitle_es.gd")
(file "game/assets/jak1/subtitle/game_subtitle_ptbr.gd")
(file "game/assets/jak1/subtitle/game_subtitle_it.gd")
(file-json
:language-id 0
:text-version "jak1-v2"
:lines "game/assets/jak1/subtitle/subtitle_lines_en-US.json"
:meta "game/assets/jak1/subtitle/subtitle_meta_en-US.json")
(file-json
:language-id 1
:text-version "jak1-v2"
:lines "game/assets/jak1/subtitle/subtitle_lines_fr-FR.json"
:lines-base "game/assets/jak1/subtitle/subtitle_lines_en-US.json"
:meta "game/assets/jak1/subtitle/subtitle_meta_fr-FR.json"
:meta-base "game/assets/jak1/subtitle/subtitle_meta_en-US.json")
(file-json
:language-id 2
:text-version "jak1-v2"
:lines "game/assets/jak1/subtitle/subtitle_lines_de-DE.json"
:lines-base "game/assets/jak1/subtitle/subtitle_lines_en-US.json"
:meta "game/assets/jak1/subtitle/subtitle_meta_de-DE.json"
:meta-base "game/assets/jak1/subtitle/subtitle_meta_en-US.json")
(file-json
:language-id 3
:text-version "jak1-v2"
:lines "game/assets/jak1/subtitle/subtitle_lines_es-ES.json"
:lines-base "game/assets/jak1/subtitle/subtitle_lines_en-US.json"
:meta "game/assets/jak1/subtitle/subtitle_meta_es-ES.json"
:meta-base "game/assets/jak1/subtitle/subtitle_meta_en-US.json")
(file-json
:language-id 4
:text-version "jak1-v2"
:lines "game/assets/jak1/subtitle/subtitle_lines_it-IT.json"
:lines-base "game/assets/jak1/subtitle/subtitle_lines_en-US.json"
:meta "game/assets/jak1/subtitle/subtitle_meta_it-IT.json"
:meta-base "game/assets/jak1/subtitle/subtitle_meta_en-US.json")
(file-json
:language-id 5
:text-version "jak1-v2"
:lines "game/assets/jak1/subtitle/subtitle_lines_jp-JP.json"
:lines-base "game/assets/jak1/subtitle/subtitle_lines_en-US.json"
:meta "game/assets/jak1/subtitle/subtitle_meta_jp-JP.json"
:meta-base "game/assets/jak1/subtitle/subtitle_meta_en-US.json")
(file-json
:language-id 6
:text-version "jak1-v2"
:lines "game/assets/jak1/subtitle/subtitle_lines_en-GB.json"
:lines-base "game/assets/jak1/subtitle/subtitle_lines_en-US.json"
:meta "game/assets/jak1/subtitle/subtitle_meta_en-GB.json"
:meta-base "game/assets/jak1/subtitle/subtitle_meta_en-US.json")
(file-json
:language-id 7
:text-version "jak1-v2"
:lines "game/assets/jak1/subtitle/subtitle_lines_pt-PT.json"
:lines-base "game/assets/jak1/subtitle/subtitle_lines_en-US.json"
:meta "game/assets/jak1/subtitle/subtitle_meta_pt-PT.json"
:meta-base "game/assets/jak1/subtitle/subtitle_meta_en-US.json")
(file-json
:language-id 8
:text-version "jak1-v2"
:lines "game/assets/jak1/subtitle/subtitle_lines_fi-FI.json"
:lines-base "game/assets/jak1/subtitle/subtitle_lines_en-US.json"
:meta "game/assets/jak1/subtitle/subtitle_meta_fi-FI.json"
:meta-base "game/assets/jak1/subtitle/subtitle_meta_en-US.json")
(file-json
:language-id 9
:text-version "jak1-v2"
:lines "game/assets/jak1/subtitle/subtitle_lines_sv-SE.json"
:lines-base "game/assets/jak1/subtitle/subtitle_lines_en-US.json"
:meta "game/assets/jak1/subtitle/subtitle_meta_sv-SE.json"
:meta-base "game/assets/jak1/subtitle/subtitle_meta_en-US.json")
(file-json
:language-id 10
:text-version "jak1-v2"
:lines "game/assets/jak1/subtitle/subtitle_lines_da-DK.json"
:lines-base "game/assets/jak1/subtitle/subtitle_lines_en-US.json"
:meta "game/assets/jak1/subtitle/subtitle_meta_da-DK.json"
:meta-base "game/assets/jak1/subtitle/subtitle_meta_en-US.json")
(file-json
:language-id 11
:text-version "jak1-v2"
:lines "game/assets/jak1/subtitle/subtitle_lines_no-NO.json"
:lines-base "game/assets/jak1/subtitle/subtitle_lines_en-US.json"
:meta "game/assets/jak1/subtitle/subtitle_meta_no-NO.json"
:meta-base "game/assets/jak1/subtitle/subtitle_meta_en-US.json")
(file-json
:language-id 12
:text-version "jak1-v2"
:lines "game/assets/jak1/subtitle/subtitle_lines_nl-NL.json"
:lines-base "game/assets/jak1/subtitle/subtitle_lines_en-US.json"
:meta "game/assets/jak1/subtitle/subtitle_meta_nl-NL.json"
:meta-base "game/assets/jak1/subtitle/subtitle_meta_en-US.json")
(file-json
:language-id 13
:text-version "jak1-v2"
:lines "game/assets/jak1/subtitle/subtitle_lines_pt-BR.json"
:lines-base "game/assets/jak1/subtitle/subtitle_lines_en-US.json"
:meta "game/assets/jak1/subtitle/subtitle_meta_pt-BR.json"
:meta-base "game/assets/jak1/subtitle/subtitle_meta_en-US.json")
(file-json
:language-id 14
:text-version "jak1-v2"
:lines "game/assets/jak1/subtitle/subtitle_lines_hu-HU.json"
:lines-base "game/assets/jak1/subtitle/subtitle_lines_en-US.json"
:meta "game/assets/jak1/subtitle/subtitle_meta_hu-HU.json"
:meta-base "game/assets/jak1/subtitle/subtitle_meta_en-US.json")
(file-json
:language-id 15
:text-version "jak1-v2"
:lines "game/assets/jak1/subtitle/subtitle_lines_ca-ES.json"
:lines-base "game/assets/jak1/subtitle/subtitle_lines_en-US.json"
:meta "game/assets/jak1/subtitle/subtitle_meta_ca-ES.json"
:meta-base "game/assets/jak1/subtitle/subtitle_meta_en-US.json")
(file-json
:language-id 16
:text-version "jak1-v2"
:lines "game/assets/jak1/subtitle/subtitle_lines_is-IS.json"
:lines-base "game/assets/jak1/subtitle/subtitle_lines_en-US.json"
:meta "game/assets/jak1/subtitle/subtitle_meta_is-IS.json"
:meta-base "game/assets/jak1/subtitle/subtitle_meta_en-US.json")
)
@@ -0,0 +1,205 @@
// This file is just here to aid in the translating of the old format to the new
// once we are done needing that, this can be deleted
{
"0": {
"???": "???",
"BILLY": "BILLY",
"BIRDWATCHER": "BIRDWATCHER",
"BLUE SAGE": "BLUE SAGE",
"DAXTER": "DAXTER",
"FARMER": "FARMER",
"FISHERMAN": "FISHERMAN",
"FLUT-FLUT": "FLUT-FLUT",
"GAMBLER": "GAMBLER",
"GEOLOGIST": "GEOLOGIST",
"GOL": "GOL",
"GORDY": "GORDY",
"JAK'S UNCLE": "JAK'S UNCLE",
"KEIRA": "KEIRA",
"MAIA": "MAIA",
"MAYOR": "MAYOR",
"OLD MAN": "OLD MAN",
"ORACLE": "ORACLE",
"RED SAGE": "RED SAGE",
"SAMOS": "SAMOS",
"SCULPTOR": "SCULPTOR",
"WARRIOR": "WARRIOR",
"WILLARD": "WILLARD",
"WOMAN": "WOMAN",
"YELLOW SAGE": "YELLOW SAGE",
"MINER": "MINER",
"JAK": "JAK"
},
"1": {
"???": "???",
"BILLY": "BILLY",
"BIRDWATCHER": "ORNITHOLOGUE",
"BLUE SAGE": "SAGE BLEU",
"DAXTER": "DAXTER",
"FARMER": "FERMIER",
"FISHERMAN": "PÊCHEUR",
"FLUT-FLUT": "FLUT-FLUT",
"GAMBLER": "PARIEUR",
"GEOLOGIST": "GÉOLOGUE",
"GOL": "GOL",
"GORDY": "GORDY",
"JAK'S UNCLE": "ONCLE DE JAK",
"KEIRA": "KEIRA",
"MAIA": "MAIA",
"MAYOR": "MAIRE",
"OLD MAN": "VIEIL HOMME",
"ORACLE": "ORACLE",
"RED SAGE": "SAGE ROUGE",
"SAMOS": "SAMOS",
"SCULPTOR": "SCULPTEUR",
"WARRIOR": "GUERRIER",
"WILLARD": "WILLARD",
"WOMAN": "FEMME",
"YELLOW SAGE": "SAGE JAUNE",
"MINER": "MINER"
},
"2": {
"???": "???",
"BILLY": "BILLY",
"BIRDWATCHER": "VOGEL-BEOBACHTERIN",
"BLUE SAGE": "BLAUER WEISE",
"DAXTER": "DAXTER",
"FARMER": "FARMER",
"FISHERMAN": "FISCHER",
"FLUT-FLUT": "FLUT-FLUT",
"GAMBLER": "GLÜCKSSPIELER",
"GEOLOGIST": "GEOLOGIN",
"GOL": "GOL",
"GORDY": "GORDY",
"JAK'S UNCLE": "JAKS ONKEL",
"KEIRA": "KEIRA",
"MAIA": "MAIA",
"MAYOR": "BÜRGERMEISTER",
"OLD MAN": "FRAU",
"ORACLE": "ORAKEL",
"RED SAGE": "ROTER WEISE",
"SAMOS": "SAMOS",
"SCULPTOR": "BILDHAUER",
"WARRIOR": "KRIEGER",
"WILLARD": "WILLARD",
"WOMAN": "ALTER MANN",
"YELLOW SAGE": "GELBER WEISE",
"MINER": "MINER",
"JAK": "JAK"
},
"3": {
"???": "???",
"BILLY": "BILLY",
"BIRDWATCHER": "MUJER PÁJARO",
"BLUE SAGE": "SABIO AZUL",
"DAXTER": "DAXTER",
"FARMER": "GRANJERO",
"FISHERMAN": "PESCADOR",
"FLUT-FLUT": "FLUT-FLUT",
"GAMBLER": "JUGADOR",
"GEOLOGIST": "GEÓLOGA",
"GOL": "GOL",
"GORDY": "GORDY",
"JAK'S UNCLE": "EXPLORADOR",
"KEIRA": "KEIRA",
"MAIA": "MAIA",
"MAYOR": "ALCALDE",
"OLD MAN": "MUJER",
"ORACLE": "ORÁCULO",
"RED SAGE": "SABIO ROJO",
"SAMOS": "SAMOS",
"SCULPTOR": "ESCULTOR",
"WARRIOR": "GUERRERO",
"WILLARD": "WILLARD",
"WOMAN": "ANCIANO",
"YELLOW SAGE": "SABIO AMARILLO",
"MINER": "MINER",
"JAK": "JAK"
},
"4": {
"???": "???",
"BILLY": "BILLY",
"BIRDWATCHER": "ORNITOLOGA",
"BLUE SAGE": "SAGGIO BLU",
"DAXTER": "DAXTER",
"FARMER": "CONTADINO",
"FISHERMAN": "PESCATORE",
"FLUT-FLUT": "FLUT-FLUT",
"GAMBLER": "GIOCATORE D'AZZARDO",
"GEOLOGIST": "GEOLOGA",
"GOL": "GOL",
"GORDY": "GORDY",
"JAK'S UNCLE": "ZIO",
"KEIRA": "KEIRA",
"MAIA": "MAIA",
"MAYOR": "SINDACO",
"OLD MAN": "VOCE MASCHILE",
"ORACLE": "ORACOLO",
"RED SAGE": "SAGGIO ROSSO",
"SAMOS": "SAMOS",
"SCULPTOR": "SCULTORE",
"WARRIOR": "SOLDATO",
"WILLARD": "WILLARD",
"WOMAN": "VOCE FEMMINILE",
"YELLOW SAGE": "SAGGIO GIALLO",
"JAK": "JAK",
"MINER": "MINER"
},
"6": {
"???": "???",
"BILLY": "BILLY",
"BIRDWATCHER": "BIRDWATCHER",
"BLUE SAGE": "BLUE SAGE",
"DAXTER": "DAXTER",
"FARMER": "FARMER",
"FISHERMAN": "FISHERMAN",
"FLUT-FLUT": "FLUT-FLUT",
"GAMBLER": "GAMBLER",
"GEOLOGIST": "GEOLOGIST",
"GOL": "GOL",
"GORDY": "GORDY",
"JAK'S UNCLE": "JAK'S UNCLE",
"KEIRA": "KEIRA",
"MAIA": "MAIA",
"MAYOR": "MAYOR",
"OLD MAN": "OLD MAN",
"ORACLE": "ORACLE",
"RED SAGE": "RED SAGE",
"SAMOS": "SAMOS",
"SCULPTOR": "SCULPTOR",
"WARRIOR": "WARRIOR",
"WILLARD": "WILLARD",
"WOMAN": "WOMAN",
"YELLOW SAGE": "YELLOW SAGE",
"MINER": "MINER",
"JAK": "JAK"
},
"13": {
"???": "???",
"BILLY": "BILLY",
"BIRDWATCHER": "SRA.PÁSSARO",
"BLUE SAGE": "SÁBIO AZUL",
"DAXTER": "DAXTER",
"FARMER": "FAZENDEIRO",
"FISHERMAN": "PESCADOR",
"FLUT-FLUT": "FLUT-FLUT",
"GAMBLER": "APOSTADOR",
"GEOLOGIST": "GEOLOGISTA",
"GOL": "GOL",
"GORDY": "GORDY",
"JAK'S UNCLE": "TIO DO JAK",
"KEIRA": "KEIRA",
"MAIA": "MAIA",
"MAYOR": "PREFEITO",
"OLD MAN": "VELHO",
"ORACLE": "ORÁCULO",
"RED SAGE": "SÁBIO VERMELHO",
"SAMOS": "SAMOS",
"SCULPTOR": "ESCULTOR",
"WARRIOR": "GUERREIRO",
"WILLARD": "WILLARD",
"WOMAN": "MULHER",
"YELLOW SAGE": "SÁBIO AMARELO",
"MINER": "MINER"
}
}
@@ -0,0 +1,200 @@
# Simple script that cleans up and de-duplicates the subtitle files
# Most of the duplication happens in the metadata files, as most cutscenes share the same timing
# for some languages though (ie. en-US and en-GB) the actual translation files are heavily duplicated.
# Also this is a nice place to cleanup anything that C++ did not
# This file can also die once any active (but not commited) translation efforts actually committed
import os
import json
import shutil
def clean_lines(lines):
new_lines = []
for line in lines:
new_lines.append(line.replace('\\"', '"'))
return new_lines
# For the purposes of this script, it's assumed the base files are en-US
english_meta = None
english_lines = None
with open("./subtitle_meta_en-US.json", "r", encoding="utf-8") as f:
english_meta = json.load(f)
with open("./subtitle_lines_en-US.json", "r", encoding="utf-8") as f:
english_lines = json.load(f)
for name, info in english_lines["cutscenes"].items():
english_lines["cutscenes"][name] = clean_lines(info)
for name, info in english_lines["hints"].items():
english_lines["hints"][name] = clean_lines(info)
with open("./subtitle_lines_en-US.json", "w", encoding="utf-8") as line_file:
json.dump(english_lines, line_file, indent=2, ensure_ascii=False)
# I'm lazy, uncomment this to make the other language base files
locales = ["jp-JP", "hu-HU", "da-DK", "fi-FI", "nl-NL", "no-NO", "pt-PT", "sv-SE", "ca-ES", "is-IS"]
for locale in locales:
# duplicate the english files with the locale
shutil.copy("./subtitle_meta_en-US.json", "./subtitle_meta_" + locale + ".json")
# Now, let's iterate through all the other files and remove any near-top level duplication.
# this is a very similar strategy to the cast file cleanup effort.
for f in os.listdir("./"):
if not f.endswith(".json") or f.endswith("en-US.json"):
continue
# Check if it's a meta file, or a line file
if "meta" in f:
new_meta = {
"cutscenes": {},
"hints": {}
}
with open(f, "r", encoding="utf-8") as meta_file:
print(f)
meta = json.load(meta_file)
# Iterate through every thing, if its the same as the base file, it can be removed from this file
# otherwise, leave it!
for name, info in meta["cutscenes"].items():
if name not in english_meta["cutscenes"]:
print(f"{name} not in english_meta['cutscenes']")
new_meta["cutscenes"][name] = info
continue
# easy equality check since order matters and the files are machine generated, this should be good enough
if json.dumps(info) != json.dumps(english_meta["cutscenes"][name]):
new_meta["cutscenes"][name] = info
for name, info in meta["hints"].items():
if name not in english_meta["hints"]:
print(f"{name} not in english_meta['hints']")
new_meta["hints"][name] = info
continue
# easy equality check since order matters and the files are machine generated, this should be good enough
if json.dumps(info) != json.dumps(english_meta["hints"][name]):
new_meta["hints"][name] = info
# write out the new file
with open(f, "w", encoding="utf-8") as meta_file:
json.dump(new_meta, meta_file, indent=2, ensure_ascii=False)
if "lines" in f:
new_lines = {
"cutscenes": {},
"hints": {},
"speakers": {}
}
# now lines files
with open(f, "r", encoding="utf-8") as line_file:
print(f)
lines = json.load(line_file)
new_lines["speakers"] = lines["speakers"]
# Iterate through every thing, if its the same as the base file, it can be removed from this file
# otherwise, leave it!
for name, info in lines["cutscenes"].items():
if name not in english_lines["cutscenes"]:
print(f"{name} not in english_lines['cutscenes']")
new_lines["cutscenes"][name] = clean_lines(info)
continue
# easy equality check since order matters and the files are machine generated, this should be good enough
if json.dumps(info) != json.dumps(english_lines["cutscenes"][name]):
new_lines["cutscenes"][name] = clean_lines(info)
for name, info in lines["hints"].items():
if name not in english_lines["hints"]:
print(f"{name} not in english_lines['hints']")
new_lines["hints"][name] = clean_lines(info)
continue
# easy equality check since order matters and the files are machine generated, this should be good enough
if json.dumps(info) != json.dumps(english_lines["hints"][name]):
new_lines["hints"][name] = clean_lines(info)
# write out the new file
with open(f, "w", encoding="utf-8") as line_file:
json.dump(new_lines, line_file, indent=2, ensure_ascii=False)
# Lines get copied after because we actually don't want duplication to be removed (it needs to be translated!)
for locale in locales:
shutil.copy("./subtitle_lines_en-US.json", "./subtitle_lines_" + locale + ".json")
# Special case for portuguese brazilian
# it was done based off the spanish timings, but there is no portuguese audio
# so manually find the cutscenes that don't match so they can be adjusted...manually...
with open("./subtitle_lines_pt-BR.json", "r", encoding="utf-8") as f:
port_lines = json.load(f)
for cutscene_name, cutscene_lines in port_lines["cutscenes"].items():
if len(cutscene_lines) != len(english_lines["cutscenes"][cutscene_name]):
print(cutscene_name)
for hint_name, hint_lines in port_lines["hints"].items():
if len(hint_lines) != len(english_lines["hints"][hint_name]):
print(hint_name)
# assistant-lavatube-end-resolution
# assistant-reminder-1-generic
# billy-accept
# billy-introduction
# billy-reject
# billy-resolution
# bird-lady-beach-resolution
# bird-lady-introduction
# bird-lady-reminder-2
# bluesage-resolution
# explorer-introduction
# explorer-resolution
# farmer-introduction
# farmer-reminder-1
# fisher-accept
# fisher-introduction
# fisher-reject
# fisher-resolution
# green-sagecage-daxter-sacrifice
# green-sagecage-introduction
# green-sagecage-outro-beat-boss-b
# green-sagecage-outro-preboss
# green-sagecage-resolution
# oracle-intro-1
# oracle-intro-2
# oracle-intro-3
# oracle-reminder-1
# oracle-reminder-2
# oracle-reminder-3
# redsage-resolution
# sage-intro-sequence-a
# sage-intro-sequence-d1
# sage-intro-sequence-d2
# sage-intro-sequence-e
# sage-village3-introduction
# sage-village3-introduction-dark-eco
# yellowsage-resolution
# ASSTLP24
# ASSTLP36
# CHI-AM03
# CHI-AM04
# EXP-AM01
# EXP-AM05
# FAR-AM01
# FIS-AM01
# FIS-AM02
# MSH-AM12
# SAGELP05
# asstv100
# asstv101
# asstva73
# asstvb02
# asstvb04
# asstvb08
# asstvb21
# asstvb23
# asstvb24
# asstvb25
# asstvb45
# asstvb47
# sagevb01
# sagevb02
# sagevb03
# sagevb23
# sagevb24
# sagevb25
# sksp0013
# sksp0017
# sksp0059
# sksp0060
# sksp0067
# sksp0116
# sksp0145
# sksp0b42
File diff suppressed because it is too large Load Diff
@@ -1,370 +0,0 @@
(language-id 6)
(text-version jak1-v2)
;; -----------------
;; intro
;; -----------------
("sidekick-human-intro-sequence-b"
(547 "OLD MAN" "CONTINUE YOUR SEARCH FOR ARTEFACTS AND ECO.")
(664)
(674 "OLD MAN" "IF THE LOCALS POSSESS PRECURSOR ITEMS, YOU KNOW WHAT TO DO.")
(819)
(839 "WOMAN" "DEAL HARSHLY WITH ANYBODY WHO STRAYS FROM THE VILLAGE.")
(937 "WOMAN" "WE WILL ATTACK IT IN DUE TIME.")
(1027)
)
;; -----------------
;; sidekick
;; -----------------
("sksp009c" :hint #x28f (0 "DAXTER" "DO ME A FAVOUR AND KEEP AWAY FROM THOSE DARK ECO BOXES!"))
;; -----------------
;; oracle
;; -----------------
;; -----------------
;; training
;; -----------------
("asstvb42" :hint #x902
(0 "KEIRA" "THIS IS A POWER CELL, THE MOST IMPORTANT PRECURSOR ARTEFACT YOU CAN FIND!")
(327)
(333 "KEIRA" "YOU NEED TO COLLECT 20 OF THESE SO I CAN POWER THE HEAT SHIELD")
(507 "KEIRA" "FOR YOUR A-GRAV ZOOMER.")
)
("sagevb22" :hint #x909
(0 "SAGE" "THAT'S BLUE ECO, WHICH CONTAINS THE ENERGY OF MOTION.")
(291 "SAGE" "BLUE ECO ALLOWS YOU TO RUN FAST, BREAK BOXES, AND EVEN ACTIVATE SOME PRECURSOR")
(640 "SAGE" "ARTEFACTS WHEN YOU GET NEAR THEM.")
)
("sagevb25" :hint #x90c
(3 "SAGE" "GOOD WORK, THE BLUE ECO CAUSED THE DOOR TO OPEN.")
(250 "SAGE" "WITH BLUE ECO, YOU CAN BREATHE ENERGY INTO ALL KINDS")
(476 "SAGE" "OF PRECURSOR ARTEFACTS THAT HAVE LAIN DORMANT FOR YEARS.")
)
;; -----------------
;; village1
;; -----------------
;; -----------------
;; beach
;; -----------------
("bird-lady-beach-resolution"
(30 "BIRDWATCHER" "OH MY, I HOPE THE POOR DEAR'S OKAY.")
(148)
(157 "BIRDWATCHER" "HERE'S A POWER CELL FOR YOUR VALOUR.")
(237)
(306 "FLUT FLUT" "MAMA!")
(351)
(406 "FLUT FLUT" "MAMA!")
(430 "DAXTER" "OH NO! NO, NO, NO, NO!")
(533)
(535 "BIRDWATCHER" "LOOK... ISN'T THAT CUTE? IT THINKS YOU'RE ITS MAMA.")
(696)
(699 "DAXTER" "EH? I'M NOT YOUR MOM! YOU SEE ANY FEATHERS HERE?")
(803)
(807 "BIRDWATCHER" "OH, LOVE AT FIRST SIGHT! AH...")
(936)
(939 "BIRDWATCHER" "LISTEN, BOYS, I'LL TAKE THIS LITTLE CHICK BACK TO THE VILLAGE WITH ME")
(1054 "BIRDWATCHER" "AND WORK WITH THE SAGE TO TAKE CARE OF HER.")
)
("bird-lady-introduction"
(125 "BIRDWATCHER" "OH MY, WHAT A HORRIBLY SICK LITTLE BIRD.")
(245)
(251 "DAXTER" "HUH! YOU DON'T LOOK SO GOOD YOURSELF, LADY!")
(328)
(331 "BIRDWATCHER" "OH, SORRY. I THOUGHT YOU WERE A SPOTTED")
(408 "BIRDWATCHER" "ORANGE-BELLIED RAIN FRAY.")
(454)
(457 "BIRDWATCHER" "YOU KNOW, YESTERDAY I SAW SOME")
(536 "BIRDWATCHER" "TERRIBLY VICIOUS CREATURES CAPTURE")
(590 "BIRDWATCHER" "A MOTHER FLUT FLUT NEAR THE BEACH.")
(648)
(654 :offscreen "BIRDWATCHER" "NOW THERE'S THIS POOR LITTLE ORPHAN EGG")
(730 :offscreen "BIRDWATCHER" "SITTING IN A NEST AT THE TOP OF THE CLIFF")
(794 :offscreen "BIRDWATCHER" "AND I CAN'T GET TO IT.")
(854 :offscreen "BIRDWATCHER" "IF YOU COULD CLIMB UP THERE AND PUSH IT OFF, I'VE PILED")
(946 :offscreen "BIRDWATCHER" "SOME HAY DOWN AT THE BASE TO CATCH IT SAFELY.")
(1041)
(1044 "BIRDWATCHER" "DO AN OLD LADY A FAVOUR, AND I'LL GIVE YOU A POWER CELL.")
(1198)
)
;; -----------------
;; jungle
;; -----------------
;; -----------------
;; misty
;; -----------------
;; -----------------
;; firecanyon
;; -----------------
;; -----------------
;; village2
;; -----------------
("sage-bluehut-introduction-prec-arm"
(0 "SAGE" "WELL, I HOPE YOU'VE PACKED A LUNCH. 'CAUSE WE'RE JUST GETTING STARTED.")
(130)
(140 "SAGE" "ACCORDING TO THE BLUE SAGE'S NOTES,")
(208 "SAGE" "LURKERS HAVE INFESTED THE SWAMP ACROSS THE BAY.")
(300)
(304 :offscreen "SAGE" "APPARENTLY, THEY'RE PLANNING TO USE A DIRIGIBLE")
(417 :offscreen "SAGE" "TO LIFT AN IMPORTANT PRECURSOR ARTEFACT FROM THE MUCK.")
(531)
(549 :offscreen "SAGE" "YOU'RE GOING TO HAVE TO GET OVER THERE TO DISLODGE THEIR TETHERS.")
(675)
(685 "SAGE" "WHO KNOWS WHAT THEY MIGHT WANT WITH THE ARTEFACT,")
(764 "SAGE" "BUT LIKE ORANGE STUFF HERE'S BREATH, IT JUST CAN'T BE GOOD.")
)
("warrior-introduction"
(24 "WARRIOR" "OHH... MY ACHING HEAD.")
(128)
(137 "DAXTER" "I DOUBT THAT'S ONE OF YOUR VITAL ORGANS!")
(212 "DAXTER" "WALK IT OFF, TOUGH GUY!")
(264 "WARRIOR" "OH, SURE, I WAS TOUGH ONCE.")
(337 "WARRIOR" "MAYBE EVEN THE TOUGHEST OF THEM ALL.")
(402 "WARRIOR" "I SINGLE-HANDEDLY DEFENDED THIS VILLAGE FROM THOSE HORRID CREATURES FOR ALMOST A YEAR!")
(594 :offscreen "WARRIOR" "THEN THAT HORRIBLE MONSTER ARRIVED AND COMMENCED THE BOULDER BOMBARDMENT.")
(760 :offscreen "WARRIOR" "SO, FULL OF VALOUR, ARMOR SHINING IN THE SUN...")
(928 "WARRIOR" "I CLIMBED THE HILL TO TAKE HIM ON...!")
(1033)
(1044 "WARRIOR" "BUT HE POUNDED ME LIKE ONE TENDERIZES A YAKOW STEAK.")
(1172)
(1178 "DAXTER" "HAVE YOU TRIED ATTACKING HIM WITH YOUR MELODRAMA?")
(1255 "DAXTER" "'CAUSE IT'S KILLIN' ME!")
(1303)
(1310 :offscreen "WARRIOR" "AFTER MY LAST STUNNING FAILURE,")
(1395 :offscreen "WARRIOR" "HE SEALED THE PASSAGEWAY TO HIS ROOST WITH A 30-TON BOULDER,")
(1515 :offscreen "WARRIOR" "LEAVING NO WAY FOR ANYONE TO CHALLENGE HIM AGAIN.")
(1640)
(1669 "WARRIOR" "SO, OUR SAGE, A MASTER OF BLUE ECO AND A MECHANICAL GENIUS, DEVISED A MACHINE")
(1905 "WARRIOR" "CAPABLE OF LIFTING THE BOULDER OUT OF THE WAY...!")
(2030)
(2040 "WARRIOR" "BUT ALAS, HE DISAPPEARED BEFORE WE HAD A CHANCE TO TURN IT ON.")
(2200)
(2222 "WARRIOR" "AND HE TOOK ALL OF HIS POWER CELLS WITH HIM.")
(2330)
(2360 :offscreen "WARRIOR" "AT LEAST I WAS ABLE TO PULL ENOUGH PONTOONS OUT OF OUR BRIDGE TO PREVENT")
(2465 :offscreen "WARRIOR" "THAT MONSTER FROM COMING DOWN HERE TO DO ME HARM.")
(2561)
(2566 "DAXTER" "YEAH, GOOD, GOOD JOB, TOUGH GUY. BUT, UM...")
(2659 "DAXTER" "WE'RE GONNA NEED YOU TO, UH... PUT 'EM BACK, AND STUFF.")
(2766)
(2770 "WARRIOR" "OH, SURE! AND SEAL MY DOOM?")
(2880 "WARRIOR" "(SIGHS)")
(2943)
(2949 "WARRIOR" "ALRIGHT. FINE.")
(3036 "WARRIOR" "BRING ME 90 PRECURSOR ORBS AND I'LL LET THE PONTOONS LOOSE.")
(3173)
(3197 "WARRIOR" "BUT I'M NOT GOING TO FIGHT THAT MONSTER AGAIN!")
)
;; -----------------
;; swamp
;; -----------------
("billy-introduction"
(6 "BILLY" "HOWDY, FRIENDS! ENJOYIN' MY BEAUTIFUL SWAMP?")
(123 "BILLY" "I OWN THESE HERE PARTS. EVERYTHING THAT DOESN'T SINK INTO THE MUD, THAT IS! HA HA HA...")
(349)
(369 "DAXTER" "JUDGING BY THE SMELL, I'D WAGER YOUR BATHTUB SANK IN THE MUD LONG AGO.")
(497)
(519 "BILLY" "WHAT'S A BATHTUB? ANYWAY I GOT BIGGER PROBLEMS NOW...")
(680)
(691 "BILLY" "SEEMS SOME NASTY LURKER VARMINTS ARE GROUSIN' ABOUTS,")
(798 "BILLY" "SNATCHIN' EVERYTHING THEY CAN GET THEIR GRUBBY LITTLE PAWS ON.")
(910 "BILLY" "AND SCARIN' AWAY MY PET HIPHOG, FARTHY.")
(1017)
(1021 "BILLY" "HE'S BEEN MISSIN' FOR NIGH ON TO A COON'S AGE.")
(1133)
(1136 :offscreen "BILLY" "I'VE BEEN PUTTIN' OUT HIS FAVOURITE SNACK, BUT THOSE ORNERY SWAMP RATS KEEP STEALIN' EM!")
(1318 :offscreen "BILLY" "IF YOU COULD KEEP THOSE PESKY CRITTERS AWAY LONG ENOUGH,")
(1408 :offscreen "BILLY" "I JUST KNOW FARTHY WOULD SMELL THEM VITTLES AND COME BACK!")
(1519)
(1530 "BILLY" "WILL YA HELP ME OUT?")
)
("sksp0153" :hint #x361
(0 "DAXTER" "HEY, THAT MUST BE THE PRECURSOR ARTEFACT THE LURKERS ARE AFTER!")
(175 "DAXTER" "IT LOOKS LIKE A GIANT ROBOT ARM!")
)
;; -----------------
;; rolling
;; -----------------
;; -----------------
;; sunken
;; -----------------
("sksp0135" :hint #x34f (0 "DAXTER" "THAT WATER LOOKS DANGEROUS WHEN IT CHANGES COLOUR!"))
("sksp0136" :hint #x350 (0 "DAXTER" "YOU GOTTA GET OUT OF THE WATER BEFORE IT CHANGES COLOUR!"))
;; -----------------
;; ogre
;; -----------------
;; -----------------
;; village3
;; -----------------
("minershort-introduction-gnawers"
(5 "GORDY" "WHY DON'T YOU TWO MAKE YOURSELVES USEFUL?")
(89 "GORDY" "LURKERS HAVE BEEN EXCAVATIN' THE DARK CAVES OVER THERE.")
(191 :offscreen "GORDY" "SEEMS THEY'RE LOOKIN' FOR PRECURSOR ARTEFACTS.")
(265)
(271 :offscreen "GORDY" "THEY CAN HAVE THE ARTEFACTS, FOR ALL I CARE.")
(357)
(360 :offscreen "WILLARD" "FOR ALL WE CARE!")
(441)
(444 "GORDY" "WILLARD, FEED YOUR BIRD.")
(490)
(496 "GORDY" "ALL I CARE ABOUT ARE GEMS!")
(566 "GORDY" "BUT I AIN'T GONNA BE ABLE TO GET THE CAVE'S GEMS")
(625 "GORDY" "BECAUSE WHEN THEY'RE THROUGH, THEY'RE GONNA COLLAPSE THE PLACE!")
(715)
(721 "GORDY" "IF YOU TAKE OUT THE LURKERS CHEWIN' AT THE SUPPORT BEAMS,")
(827 "GORDY" "YOU COULD SAVE THE CAVE FOR ME.")
(875)
(884 "GORDY" "NOW BEAT IT!")
)
("sage-village3-introduction"
(6 "SAGE" "OW! I ALWAYS WONDER IF I'M LOSING BODY PARTS IN THOSE THINGS!")
(153)
(183 "SAGE" "HOLY YAKOW! THE RED SAGE'S LAB LOOKS WORSE THAN THE BLUE'S!")
(321)
(321 "KEIRA" "WELL, IT DEFINITELY LOOKS AS THOUGH THERE'S BEEN A STRUGGLE HERE.")
(418)
(441 "OLD MAN" "HA HA HA HA HA!")
(500)
(528 "OLD MAN" "I'D HARDLY CALL IT \"STRUGGLE.\"")
(618 "OLD MAN" "WOULD YOU, DEAR SISTER?")
(672 "WOMAN" "CERTAINLY NOT. THE RED SAGE GAVE UP WITH SO LITTLE EFFORT.")
(800)
(805 "WOMAN" "NO FUN AT ALL.")
(860)
(884 "SAGE" "GOL? IS THAT YOU?")
(965)
(969 "SAGE" "YOU'VE FINALLY GONE OFF THE DEEP END, EH?")
(1060 "SAGE" "AND, MAIA! I TOLD YOU THE DARK ECO WOULD AFFECT YOU BOTH!")
(1180 "SAGE" "HNG, NOBODY EVER LISTENS TO OLD SAMOS...")
(1265)
(1282 "SAGE" "WHAT HAVE YOU TWO DONE WITH THE BLUE AND RED SAGES?")
(1372 "GOL" "DON'T WORRY ABOUT YOUR COLOURFUL FRIENDS, YOU OLD FOOL.")
(1516 "GOL" "THEY'RE PERFECTLY SAFE IN OUR CITADEL. OUR SPECIAL GUESTS.")
(1680 "MAIA" "THEY HAVE GRACIOUSLY AGREED TO HELP US ON A LITTLE PROJECT.")
(1813)
(1828 "GOL" "YOU WERE WRONG, SAMOS. DARK ECO CAN BE CONTROLLED!")
(1990)
(1996 "GOL" "WE'VE LEARNED ITS SECRETS, AND NOW WE CAN RESHAPE THE WORLD TO OUR LIKING.")
(2212)
(2223 "SAGE" "YOU CAN'T CONTROL DARK ECO BY ITSELF! EVEN THE PRECURSORS COULDN'T-")
(2357 "MAIA" "UNTIL NOW, WE'VE HAD TO SCRAPE BY WITH WHAT LITTLE DARK ECO")
(2452 "MAIA" "WE COULD FIND NEAR THE SURFACE.")
(2508)
(2520 "MAIA" "BUT SOON, WE WILL HAVE ACCESS TO THE VAST STORES")
(2611 "MAIA" "OF DARK ECO HIDDEN DEEP UNDERGROUND.")
(2715 "SAGE" "NOT THE SILOS!")
(2758)
(2768 "GOL" "YES, THE SILOS!")
(2841 "GOL" "THEY WILL BE OPENED, AND ALL THE DARK ECO IN THE WORLD WILL BE OURS!")
(3028)
(3034 "SAGE" "BUT THAT'S IMPOSSIBLE! ONLY A PRECURSOR ROBOT-")
(3128 "MAIA" "OH, DON'T LOOK SO UPSET, SAMOS.")
(3210 "MAIA" "WE'VE GOT BIG PLANS FOR YOU.")
(3300)
(3303 :offscreen "MAIA" "AH HA HA HA HA HA HA! AHH...")
(3460)
(3495 "DAXTER" "WAIT A MINUTE!")
(3538)
(3541 "DAXTER" "THAT WAS GOL?")
(3586)
(3595 "DAXTER" "THE SAME GOL WHO'S SUPPOSED TO CHANGE ME BACK?")
(3690 "DAXTER" "GOL IS THE GUY TRYING TO KILL US?!")
(3772)
(3785 "DAXTER" "I'M DOOMED.")
(3822)
(3828 "SAGE" "WE MAY ALL BE DOOMED.")
(3897)
(3903 "SAGE" "IF THEY OPEN THE SILOS, THE DARK ECO WILL")
(3995 "SAGE" "TWIST AND DESTROY EVERYTHING IT TOUCHES!")
(4080 "SAGE" "WE SIMPLY MUST GET TO THEIR CITADEL, TO STOP THEM!")
(4189)
(4192 "KEIRA" "THE FASTEST WAY THERE IS THROUGH THE LAVA TUBE")
(4276 "KEIRA" "AT THE BOTTOM OF THIS CRATER.")
(4316)
(4324 "KEIRA" "A FEW MORE POWER CELLS, AND YOUR ZOOMER'S HEAT SHIELD")
(4398 "KEIRA" "SHOULD GET YOU ACROSS THE LAVA SAFELY.")
(4460)
(4464 "SAGE" "ALL RIGHT, MY BOY. YOU KNOW WHAT TO DO.")
(4545 "SAGE" "TAKE THE FLEABAG AND GO ROUND UP MORE POWER CELLS.")
(4664)
)
("asstv103" :hint #x452
(0 "KEIRA" "DON'T FORGET TO TURN ON THE TELEPORT GATE TO LET US THROUGH.")
(160 "KEIRA" "YOU'VE GOT TO GO INTO THE RED SAGE'S LAB")
(280 "KEIRA" "IN THE CENTRE OF THE VOLCANIC CRATER TO TURN IT ON.")
(450 "KEIRA" "WE CAN'T COME THROUGH UNTIL IT'S BACK ONLINE.")
)
;; -----------------
;; snowy
;; -----------------
;; -----------------
;; spidercave
;; -----------------
;; -----------------
;; lavatube
;; -----------------
;; -----------------
;; citadel
;; -----------------
("green-sagecage-introduction"
(128 "SAGE" "IT'S ABOUT TIME YOU TWO DECIDED TO SHOW UP!")
(207 "DAXTER" "NICE TO SEE YOU TOO!")
(269)
(275 "DAXTER" "DO THEY HAVE YOU MOPPING THE FLOORS NOW?")
(343 "SAGE" "THERE'S NO TIME FOR JOKES, DAXTER. GOL AND MAIA KIDNAPPED US")
(477 "SAGE" "TO SAP OUR ENERGIES TO POWER THEIR ABOMINABLE MACHINE.")
(574)
(583 :offscreen "SAGE" "IT APPEARS THEY HAVE COMBINED THE FUNCTIONAL REMAINS OF A PRECURSOR ROBOT")
(709 :offscreen "SAGE" "WITH SCAVENGED ARTEFACTS FROM ACROSS THE LAND.")
(800)
(816 :offscreen "SAGE" "THEN THEY ADDED A FEW DIABOLICAL ADDITIONS OF THEIR OWN,")
(926 :offscreen "SAGE" "CREATING THE ONE THING CAPABLE OF OPENING THE DARK ECO SILOS.")
(1060 "SAGE" "IF YOU CAN FREE THE FOUR OF US, WE CAN USE OUR COMBINED POWERS")
(1180 "SAGE" "TO BREAK THE FORCE SHIELD SURROUNDING THE ROBOT")
(1265 "SAGE" "BEFORE THEY USE IT TO DESTROY THE WORLD.")
)
;; -----------------
;; finalboss
;; -----------------
;; -----------------
;; title
;; -----------------
;; -----------------
;; uncategorized
;; -----------------
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
@@ -295,7 +295,8 @@
"sksp0072",
"sksp0073",
"sksp0435",
"fishermans-boat-ride-to-village1-alt"
"fishermans-boat-ride-to-village1-alt",
"evilbro-misty-end"
],
"ogre": [
"asstvb23",
@@ -539,9 +540,6 @@
"sagevb38",
"sagevb39"
],
"uncategorized": [
"evilbro-misty-end"
],
"village1": [
"ASSTLP01",
"ASSTLP02",
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,217 @@
{
"cutscenes": {
"bird-lady-beach-resolution": [
"OH MY, I HOPE THE POOR DEAR'S OKAY.",
"HERE'S A POWER CELL FOR YOUR VALOUR.",
"MAMA!",
"MAMA!",
"OH NO! NO, NO, NO, NO!",
"LOOK... ISN'T THAT CUTE? IT THINKS YOU'RE ITS MAMA.",
"EH? I'M NOT YOUR MOM! YOU SEE ANY FEATHERS HERE?",
"OH, LOVE AT FIRST SIGHT! AH...",
"LISTEN, BOYS, I'LL TAKE THIS LITTLE CHICK BACK TO THE VILLAGE WITH ME",
"AND WORK WITH THE SAGE TO TAKE CARE OF HER."
],
"bird-lady-introduction": [
"OH MY, WHAT A HORRIBLY SICK LITTLE BIRD.",
"HUH! YOU DON'T LOOK SO GOOD YOURSELF, LADY!",
"OH, SORRY. I THOUGHT YOU WERE A SPOTTED",
"ORANGE-BELLIED RAIN FRAY.",
"YOU KNOW, YESTERDAY I SAW SOME",
"TERRIBLY VICIOUS CREATURES CAPTURE",
"A MOTHER FLUT-FLUT NEAR THE BEACH.",
"NOW THERE'S THIS POOR LITTLE ORPHAN EGG",
"SITTING IN A NEST AT THE TOP OF THE CLIFF",
"AND I CAN'T GET TO IT.",
"IF YOU COULD CLIMB UP THERE AND PUSH IT OFF, I'VE PILED",
"SOME HAY DOWN AT THE BASE TO CATCH IT SAFELY.",
"DO AN OLD LADY A FAVOUR, AND I'LL GIVE YOU A POWER CELL."
],
"green-sagecage-introduction": [
"IT'S ABOUT TIME YOU TWO DECIDED TO SHOW UP!",
"NICE TO SEE YOU TOO!",
"DO THEY HAVE YOU MOPPING THE FLOORS NOW?",
"THERE'S NO TIME FOR JOKES, DAXTER. GOL AND MAIA KIDNAPPED US",
"TO SAP OUR ENERGIES TO POWER THEIR ABOMINABLE MACHINE.",
"IT APPEARS THEY HAVE COMBINED THE FUNCTIONAL REMAINS OF A PRECURSOR ROBOT",
"WITH SCAVENGED ARTEFACTS FROM ACROSS THE LAND.",
"THEN THEY ADDED A FEW DIABOLICAL ADDITIONS OF THEIR OWN,",
"CREATING THE ONE THING CAPABLE OF OPENING THE DARK ECO SILOS.",
"IF YOU CAN FREE THE FOUR OF US, WE CAN USE OUR COMBINED POWERS",
"TO BREAK THE FORCE SHIELD SURROUNDING THE ROBOT",
"BEFORE THEY USE IT TO DESTROY THE WORLD."
],
"minershort-introduction-gnawers": [
"WHY DON'T YOU TWO MAKE YOURSELVES USEFUL?",
"LURKERS HAVE BEEN EXCAVATIN' THE DARK CAVES OVER THERE.",
"SEEMS THEY'RE LOOKIN' FOR PRECURSOR ARTEFACTS.",
"THEY CAN HAVE THE ARTEFACTS, FOR ALL I CARE.",
"FOR ALL WE CARE!",
"WILLARD, FEED YOUR BIRD.",
"ALL I CARE ABOUT ARE GEMS!",
"BUT I AIN'T GONNA BE ABLE TO GET THE CAVE'S GEMS",
"BECAUSE WHEN THEY'RE THROUGH, THEY'RE GONNA COLLAPSE THE PLACE!",
"IF YOU TAKE OUT THE LURKERS CHEWIN' AT THE SUPPORT BEAMS,",
"YOU COULD SAVE THE CAVE FOR ME.",
"NOW BEAT IT!"
],
"sage-bluehut-introduction-prec-arm": [
"WELL, I HOPE YOU'VE PACKED A LUNCH. 'CAUSE WE'RE JUST GETTING STARTED.",
"ACCORDING TO THE BLUE SAGE'S NOTES,",
"LURKERS HAVE INFESTED THE SWAMP ACROSS THE BAY.",
"APPARENTLY, THEY'RE PLANNING TO USE A DIRIGIBLE",
"TO LIFT AN IMPORTANT PRECURSOR ARTEFACT FROM THE MUCK.",
"YOU'RE GOING TO HAVE TO GET OVER THERE TO DISLODGE THEIR TETHERS.",
"WHO KNOWS WHAT THEY MIGHT WANT WITH THE ARTEFACT,",
"BUT LIKE ORANGE STUFF HERE'S BREATH, IT JUST CAN'T BE GOOD."
],
"sage-village3-introduction": [
"OW! I ALWAYS WONDER IF I'M LOSING BODY PARTS IN THOSE THINGS!",
"HOLY YAKOW! THE RED SAGE'S LAB LOOKS WORSE THAN THE BLUE'S!",
"WELL, IT DEFINITELY LOOKS AS THOUGH THERE'S BEEN A STRUGGLE HERE.",
"HA HA HA HA HA!",
"I'D HARDLY CALL IT \"STRUGGLE.\"",
"WOULD YOU, DEAR SISTER?",
"CERTAINLY NOT. THE RED SAGE GAVE UP WITH SO LITTLE EFFORT.",
"NO FUN AT ALL.",
"GOL? IS THAT YOU?",
"YOU'VE FINALLY GONE OFF THE DEEP END, EH?",
"AND, MAIA! I TOLD YOU THE DARK ECO WOULD AFFECT YOU BOTH!",
"HNG, NOBODY EVER LISTENS TO OLD SAMOS...",
"WHAT HAVE YOU TWO DONE WITH THE BLUE AND RED SAGES?",
"DON'T WORRY ABOUT YOUR COLOURFUL FRIENDS, YOU OLD FOOL.",
"THEY'RE PERFECTLY SAFE IN OUR CITADEL. OUR SPECIAL GUESTS.",
"THEY HAVE GRACIOUSLY AGREED TO HELP US ON A LITTLE PROJECT.",
"YOU WERE WRONG, SAMOS. DARK ECO CAN BE CONTROLLED!",
"WE'VE LEARNED ITS SECRETS, AND NOW WE CAN RESHAPE THE WORLD TO OUR LIKING.",
"YOU CAN'T CONTROL DARK ECO BY ITSELF! EVEN THE PRECURSORS COULDN'T-",
"UNTIL NOW, WE'VE HAD TO SCRAPE BY WITH WHAT LITTLE DARK ECO",
"WE COULD FIND NEAR THE SURFACE.",
"BUT SOON, WE WILL HAVE ACCESS TO THE VAST STORES",
"OF DARK ECO HIDDEN DEEP UNDERGROUND.",
"NOT THE SILOS!",
"YES, THE SILOS!",
"THEY WILL BE OPENED, AND ALL THE DARK ECO IN THE WORLD WILL BE OURS!",
"BUT THAT'S IMPOSSIBLE! ONLY A PRECURSOR ROBOT-",
"OH, DON'T LOOK SO UPSET, SAMOS.",
"WE'VE GOT BIG PLANS FOR YOU.",
"AH HA HA HA HA HA HA! AHH...",
"WAIT A MINUTE!",
"THAT WAS GOL?",
"THE SAME GOL WHO'S SUPPOSED TO CHANGE ME BACK?",
"GOL IS THE GUY TRYING TO KILL US?!",
"I'M DOOMED.",
"WE MAY ALL BE DOOMED.",
"IF THEY OPEN THE SILOS, THE DARK ECO WILL",
"TWIST AND DESTROY EVERYTHING IT TOUCHES!",
"WE SIMPLY MUST GET TO THEIR CITADEL, TO STOP THEM!",
"THE FASTEST WAY THERE IS THROUGH THE LAVA TUBE",
"AT THE BOTTOM OF THIS CRATER.",
"A FEW MORE POWER CELLS, AND YOUR ZOOMER'S HEAT SHIELD",
"SHOULD GET YOU ACROSS THE LAVA SAFELY.",
"ALL RIGHT, MY BOY. YOU KNOW WHAT TO DO.",
"TAKE THE FLEABAG AND GO ROUND UP MORE POWER CELLS."
],
"sidekick-human-intro-sequence-b": [
"CONTINUE YOUR SEARCH FOR ARTEFACTS AND ECO.",
"IF THE LOCALS POSSESS PRECURSOR ITEMS, YOU KNOW WHAT TO DO.",
"DEAL HARSHLY WITH ANYBODY WHO STRAYS FROM THE VILLAGE.",
"WE WILL ATTACK IT IN DUE TIME."
],
"warrior-introduction": [
"OHH... MY ACHING HEAD.",
"I DOUBT THAT'S ONE OF YOUR VITAL ORGANS!",
"WALK IT OFF, TOUGH GUY!",
"OH, SURE, I WAS TOUGH ONCE.",
"MAYBE EVEN THE TOUGHEST OF THEM ALL.",
"I SINGLE-HANDEDLY DEFENDED THIS VILLAGE FROM THOSE HORRID CREATURES FOR ALMOST A YEAR!",
"THEN THAT HORRIBLE MONSTER ARRIVED AND COMMENCED THE BOULDER BOMBARDMENT.",
"SO, FULL OF VALOUR, ARMOR SHINING IN THE SUN...",
"I CLIMBED THE HILL TO TAKE HIM ON...!",
"BUT HE POUNDED ME LIKE ONE TENDERIZES A YAKOW STEAK.",
"HAVE YOU TRIED ATTACKING HIM WITH YOUR MELODRAMA?",
"'CAUSE IT'S KILLIN' ME!",
"AFTER MY LAST STUNNING FAILURE,",
"HE SEALED THE PASSAGEWAY TO HIS ROOST WITH A 30-TON BOULDER,",
"LEAVING NO WAY FOR ANYONE TO CHALLENGE HIM AGAIN.",
"SO, OUR SAGE, A MASTER OF BLUE ECO AND A MECHANICAL GENIUS, DEVISED A MACHINE",
"CAPABLE OF LIFTING THE BOULDER OUT OF THE WAY...!",
"BUT ALAS, HE DISAPPEARED BEFORE WE HAD A CHANCE TO TURN IT ON.",
"AND HE TOOK ALL OF HIS POWER CELLS WITH HIM.",
"AT LEAST I WAS ABLE TO PULL ENOUGH PONTOONS OUT OF OUR BRIDGE TO PREVENT",
"THAT MONSTER FROM COMING DOWN HERE TO DO ME HARM.",
"YEAH, GOOD, GOOD JOB, TOUGH GUY. BUT, UM...",
"WE'RE GONNA NEED YOU TO, UH... PUT 'EM BACK, AND STUFF.",
"OH, SURE! AND SEAL MY DOOM?",
"(SIGHS)",
"ALRIGHT. FINE.",
"BRING ME 90 PRECURSOR ORBS AND I'LL LET THE PONTOONS LOOSE.",
"BUT I'M NOT GOING TO FIGHT THAT MONSTER AGAIN!"
]
},
"hints": {
"asstv103": [
"DON'T FORGET TO TURN ON THE TELEPORT GATE TO LET US THROUGH.",
"YOU'VE GOT TO GO INTO THE RED SAGE'S LAB",
"IN THE CENTRE OF THE VOLCANIC CRATER TO TURN IT ON.",
"WE CAN'T COME THROUGH UNTIL IT'S BACK ONLINE."
],
"asstvb42": [
"THIS IS A POWER CELL, THE MOST IMPORTANT PRECURSOR ARTEFACT YOU CAN FIND!",
"YOU NEED TO COLLECT 20 OF THESE SO I CAN POWER THE HEAT SHIELD",
"FOR YOUR A-GRAV ZOOMER."
],
"sagevb22": [
"THAT'S BLUE ECO, WHICH CONTAINS THE ENERGY OF MOTION.",
"BLUE ECO ALLOWS YOU TO RUN FAST, BREAK BOXES, AND EVEN ACTIVATE SOME PRECURSOR",
"ARTEFACTS WHEN YOU GET NEAR THEM."
],
"sagevb25": [
"GOOD WORK, THE BLUE ECO CAUSED THE DOOR TO OPEN.",
"WITH BLUE ECO, YOU CAN BREATHE ENERGY INTO ALL KINDS",
"OF PRECURSOR ARTEFACTS THAT HAVE LAIN DORMANT FOR YEARS."
],
"sksp009c": [
"DO ME A FAVOUR AND KEEP AWAY FROM THOSE DARK ECO BOXES!"
],
"sksp0135": [
"THAT WATER LOOKS DANGEROUS WHEN IT CHANGES COLOUR!"
],
"sksp0136": [
"YOU GOTTA GET OUT OF THE WATER BEFORE IT CHANGES COLOUR!"
],
"sksp0153": [
"HEY, THAT MUST BE THE PRECURSOR ARTEFACT THE LURKERS ARE AFTER!",
"IT LOOKS LIKE A GIANT ROBOT ARM!"
]
},
"speakers": {
"???": "???",
"BILLY": "BILLY",
"BIRDWATCHER": "BIRDWATCHER",
"BLUE SAGE": "BLUE SAGE",
"DAXTER": "DAXTER",
"FARMER": "FARMER",
"FISHERMAN": "FISHERMAN",
"FLUT-FLUT": "FLUT-FLUT",
"GAMBLER": "GAMBLER",
"GEOLOGIST": "GEOLOGIST",
"GOL": "GOL",
"GORDY": "GORDY",
"JAK": "JAK",
"JAK'S UNCLE": "JAK'S UNCLE",
"KEIRA": "KEIRA",
"MAIA": "MAIA",
"MAYOR": "MAYOR",
"MINER": "MINER",
"OLD MAN": "OLD MAN",
"ORACLE": "ORACLE",
"RED SAGE": "RED SAGE",
"SAMOS": "SAMOS",
"SCULPTOR": "SCULPTOR",
"WARRIOR": "WARRIOR",
"WILLARD": "WILLARD",
"WOMAN": "WOMAN",
"YELLOW SAGE": "YELLOW SAGE"
}
}
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,4 @@
{
"cutscenes": {},
"hints": {}
}
@@ -0,0 +1,4 @@
{
"cutscenes": {},
"hints": {}
}
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,4 @@
{
"cutscenes": {},
"hints": {}
}
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,4 @@
{
"cutscenes": {},
"hints": {}
}
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,4 @@
{
"cutscenes": {},
"hints": {}
}
@@ -0,0 +1,4 @@
{
"cutscenes": {},
"hints": {}
}
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,4 @@
{
"cutscenes": {},
"hints": {}
}
@@ -0,0 +1,4 @@
{
"cutscenes": {},
"hints": {}
}
@@ -0,0 +1,4 @@
{
"cutscenes": {},
"hints": {}
}
@@ -0,0 +1,4 @@
{
"cutscenes": {},
"hints": {}
}
@@ -0,0 +1,4 @@
{
"cutscenes": {},
"hints": {}
}
@@ -0,0 +1,4 @@
{
"cutscenes": {},
"hints": {}
}
@@ -42,7 +42,6 @@
"0135": "HA NEM FORMÁZOD MEG, AKKOR NEM FOGOD TUDNI ELMENTENI A JÁTÉKOT",
"0136": "ADATOK MENTÉSE",
"0137": "ADATOK BETÖLTÉSE",
"0138": "NE TÁVOLÍTSD EL A MEMORY_CARD_SLOT_~D-BEN LÉVŐ MEMORY_CARD_(PS2)-T, ÉS NE KAPCSOLD KI A RENDSZERT",
"0139": "BIZTOSAN FELÜL AKAROD ÍRNI?",
"013a": "MEGFORMÁZOD?",
"013c": "IGEN",
@@ -75,7 +74,6 @@
"015e": "OKÉ",
"015f": "KILÉPÉS A DEMÓBÓL",
"0160": "AMIKOR A KÖVETKEZŐ IKON MEGJELENIK, AKKOR A HALADÁSOD MENTÉS ALATT VAN",
"0161": "AMÉG EZ AZ IKON A KÉPEN VAN, NE TÁVOLÍTSD EL A MEMORY_CARD_(PS2)-T, ÉS NE KAPCSOLD KI A RENDSZERT",
"0162": "FELADAT TELJESÍTVE",
"0163": "ELLENŐRIZD A MEMORY_CARD_SLOT_~D-BEN LÉVŐ MEMORY_CARD_(PS2)-T ÉS PRÓBÁLD ÚJRA",
"0164": "A KÉPERNYŐ MOST 60HZ-RE FOG VÁLTANI",
@@ -2,18 +2,18 @@
"1000": "OPTIONS DE CAMÉRA",
"1001": "NORMALE",
"1002": "INVERSÉE",
"1003": "CAMÉRA HORIZONTALE EN 1ÈRE-PERSONNE ",
"1004": "CAMÉRA VERTICALE EN 1ÈRE-PERSONNE ",
"1005": "CAMÉRA HORIZONTALE EN 3ÈME-PERSONNE",
"1006": "CAMÉRA VERTICALE EN 3ÈME-PERSONNE",
"1003": "CAMÉRA HORIZONTALE EN 1RE PERSONNE ",
"1004": "CAMÉRA VERTICALE EN 1RE PERSONNE ",
"1005": "CAMÉRA HORIZONTALE EN 3E PERSONNE",
"1006": "CAMÉRA VERTICALE EN 3E PERSONNE",
"1007": "VALEURS PAR DÉFAUT",
"1010": "ACCESSIBILITÉ",
"1011": "LUMINOSITÉ DE L'ORBE PRÉCURSEUR",
"1011": "ORBES BRILLANTS",
"1020": "OPTIONS DE PS2",
"1021": "VITESSE DE CHARGEMENT DE PS2",
"1022": "ÉLIMINER LES PARTICULES",
"1023": "FONDU DE MUSIQUE",
"1024": "FONDU ENCHAÎNÉ DE MUSIQUE",
"1022": "MASQUAGE DE PARTICULES",
"1023": "FONDU EN FIN DE MUSIQUE",
"1024": "FONDU EN DÉBUT DE MUSIQUE",
"1025": "SUPPRESSION DE L'ACTEUR",
"1026": "SUPPRESSION DE L'ARRIÈRE-PLAN",
"1027": "FORCER LA CARTOGRAPHIE DE L'ENVIRONNEMENT",
@@ -24,9 +24,9 @@
"1034": "PLEIN ÉCRAN",
"1035": "RÉSOLUTION",
"1036": "~D X ~D",
"1037": "RATIO D'ASPECT DE PS2",
"1038": "LORSQUE LE RATIO D'ASPECT PS2 EST ACTIVÉ, SEULS LES RATIOS D'ASPECT 4X3 ET 16X9 PEUVENT ÊTRE SÉLECTIONNÉS. CONTINUER ?",
"1039": "RATIO D'ASPECT (PS2)",
"1037": "FORMAT D'IMAGE PS2",
"1038": "QUAND LE FORMAT D'IMAGE PS2 EST ACTIVÉ, SEULES LES RÉSOLUTIONS 4:3 ET 16:9 PEUVENT ÊTRE SÉLECTIONNÉES. CONTINUER ?",
"1039": "FORMAT D'IMAGE (PS2)",
"1040": "SOUS-TITRES ACTIVÉS",
"1041": "SOUS-TITRES DÉSACTIVÉS",
"1042": "LANGUE DU TEXTE",
@@ -38,12 +38,12 @@
"1053": "4X",
"1054": "8X",
"1055": "16X",
"1060": "IPS (EXPÉRIMENTAL)",
"1060": "FRÉQUENCE D'IMAGES (EXPÉRIMENTAL)",
"1061": "60",
"1062": "100",
"1063": "150",
"1070": "NIVEAU DE DÉTAILS (ARRIÈRE-PLAN)",
"1071": "NIVEAU DE DÉTAILS (PREMIER PLAN)",
"1070": "NIVEAU DE DÉTAIL (ARRIÈRE-PLAN)",
"1071": "NIVEAU DE DÉTAIL (PREMIER PLAN)",
"1072": "MAXIMUM",
"1073": "HAUT",
"1074": "MOYEN",
@@ -57,7 +57,7 @@
"1082": "SELECTION DU MORCEAU",
"1083": "SELECTION DE LA VARIANTE",
"1084": "BOSS FINAL",
"1085": "CRÉDITS",
"1085": "GÉNÉRIQUE",
"1086": "?????",
"1087": "KLAWW",
"1088": "MINI-JEU DE PÊCHE",
@@ -57,7 +57,7 @@
"1082": "ZENESZÁMSZÁM KIVÁLASZTÁSA",
"1083": "VÁLTOZAT KIVÁLASZTÁSA",
"1084": "VÉGSŐ HARC",
"1085": "KÉSZÍTŐK",
"1085": "STÁBLISTA",
"1086": "?????",
"1087": "KLAWW",
"1088": "HALÁSZ MINIJÁTÉK",
@@ -70,7 +70,7 @@
"1095": "SÉRTHETETLENSÉG",
"1096": "ÖSSZES ZENEI VÁLTOZAT EGYSZERRE",
"1097": "VALÓS NAPSZAK",
"1098": "ÉRJ EL 100%-OS TELJESÍTÉST",
"1098": "100%-RA TELJESÍTSD A JÁTÉKOT",
"1099": "VIDD VÉGIG A JÁTÉKOT",
"1100": "SÁRGA BÖLCS",
"1101": "PIROS BÖLCS",
@@ -92,8 +92,8 @@
"1119": "CATALÀ",
"111a": "ÍSLANDSKA",
"1500": "SPEEDRUNNER-MÓD",
"138": "NE HELYEZZ BE VAGY TÁVOLÍTS EL SEMMILYEN PERIFÉRIÁT, NE ÁLLÍTSD LE A RENDSZER, ÉS NE ZÁRD BE A JÁTÉKOT",
"161": "AMÉG EZ AZ IKON A KÉPEN VAN, NE HELYEZZ BE VAGY TÁVOLÍTS EL SEMMILYEN PERIFÉRIÁT, NE ÁLLÍTSD LE A RENDSZER, ÉS NE ZÁRD BE A JÁTÉKOT",
"138": "NE HELYEZZ BE VAGY TÁVOLÍTS EL SEMMILYEN PERIFÉRIÁT, NE ÁLLÍTSD LE A RENDSZERT, ÉS NE ZÁRD BE A JÁTÉKOT",
"161": "AMÉG EZ AZ IKON A KÉPEN VAN, NE HELYEZZ BE VAGY TÁVOLÍTS EL SEMMILYEN PERIFÉRIÁT, NE ÁLLÍTSD LE A RENDSZERT, ÉS NE ZÁRD BE A JÁTÉKOT",
"100c": "AUTOMATIKUS MENTÉS KIKAPCSOLVA",
"100d": "BIZTOSAN KI AKAROD KAPCSOLNI AZ AUTOMATIKUS MENTÉST?",
"100e": "AUTOMATIKUS MENTÉS KIKAPCSOLÁSA",
@@ -119,7 +119,7 @@
"10a0": "HATALMASFEJŰ JAK",
"10c0": "ZENELEJÁTSZÓ",
"10c1": "JELENETLEJÁTSZÓ",
"10c2": "KÉSZÍTŐK MUTATÁSA",
"10c2": "STÁBLISTA LEJÁTSZÁSA",
"10c3": "KÉPESKÖNYV",
"10d0": "ALAPÉRTELMEZETT",
"10d1": "HASZNÁLATLAN",
@@ -169,33 +169,33 @@
"10fd": "HÓGOLYÓK",
"10fe": "A CSŐ KÖZEPE",
"10ff": "A CSŐ VÉGE",
"1501": "ELNYOMHATÓ JELENETEK",
"1502": "CHECKPOINT SELECT",
"1503": "SPEEDRUN OPTIONS",
"1504": "CAUTION: THESE OPTIONS WILL AUTO SAVE IN YOUR FIRST SAVE SLOT!",
"1505": "RESET CURRENT SPEEDRUN",
"1506": "NEW FULL GAME RUN",
"150e": "NEW INDIVIDUAL LEVEL RUN",
"150f": "GEYSER ROCK IL",
"1510": "SANDOVER VILLAGE IL",
"1511": "SENTINEL BEACH IL",
"1512": "FORBIDDEN JUNGLE IL",
"1513": "MISTY ISLAND IL",
"1514": "FIRE CANYON IL",
"1515": "ROCK VILLAGE IL",
"1516": "LOST PRECURSOR CITY IL",
"1517": "BOGGY SWAMP IL",
"1518": "PRECURSOR BASIN IL",
"1519": "MOUNTAIN PASS IL",
"151a": "VOLCANIC CRATER IL",
"151b": "SNOWY MOUNTAIN IL",
"151c": "SPIDER CAVE IL",
"151d": "LAVA TUBE IL",
"151e": "GOL AND MAIA'S CITADEL IL",
"151f": "NEW CATEGORY EXTENSION RUN",
"1501": "ÁTUGORHATÓ JELENETEK",
"1502": "ELLENŐRZŐPONT-VÁLASZTÁS",
"1503": "SPEEDRUN BEÁLLÍTÁSOK",
"1504": "VIGYÁZAT: EZEK A BEÁLLÍTÁSOK AUTOMATIKUSAN ELMENTŐDNEK AZ ELSŐ MENTÉSI HELYRE!",
"1505": "JELENLEGI SPEEDRUN VISSZAÁLLÍTÁSA",
"1506": "ÚJ TELJES JÁTÉK SPEEDRUN",
"150e": "ÚJ KÜLÖNÁLLÓ PÁLYA SPEEDRUN",
"150f": "GEJZÍR SZIKLA IL",
"1510": "HOMOKVÉGFALU IL",
"1511": "ŐRSZEM-PART IL",
"1512": "TILTOTT DZSUNGEL IL",
"1513": "KÖDÖS SZIGET IL",
"1514": "TŰZSZURDOK IL",
"1515": "SZIKLAFALU IL",
"1516": "ELVESZETT PREKURZORVÁROS IL",
"1517": "LÁPOS MOCSÁR IL",
"1518": "PREKURZOR-VÖLGY IL",
"1519": "HEGYSZOROS IL",
"151a": "VULKÁNI KRÁTER IL",
"151b": "HAVAS-HEGY IL",
"151c": "PÓKBARLANG IL",
"151d": "LÁVACSŐ IL",
"151e": "GOL ÉS MAIA FELLEGVÁRA IL",
"151f": "ÚJ KATEGÓRIAKITERJESZTÉS SPEEDRUN",
"1520": "NG+",
"1521": "HUB 1 100%",
"1522": "HUB 2 100%",
"1523": "HUB 3 100%",
"1524": "ALL CUTSCENES"
"1524": "ÖSSZES JELENET"
}
+24
View File
@@ -31,6 +31,7 @@
#include "game/kernel/jak2/kmalloc.h"
#include "game/kernel/jak2/kscheme.h"
#include "game/kernel/jak2/ksound.h"
#include "game/overlord/jak2/iso.h"
#include "game/sce/libdma.h"
#include "game/sce/libgraph.h"
#include "game/sce/sif_ee.h"
@@ -621,6 +622,28 @@ void init_autosplit_struct() {
(u64)g_ee_main_mem + (u64)intern_from_c("*autosplit-info-jak2*")->value();
}
u32 alloc_vagdir_names(u32 heap_sym) {
auto alloced_heap = (Ptr<u64>)alloc_heap_memory(heap_sym, gVagDir.count * 8 + 8);
if (alloced_heap.offset) {
*alloced_heap = gVagDir.count;
// use entry -1 to get the amount
alloced_heap = alloced_heap + 8;
for (int i = 0; i < gVagDir.count; ++i) {
char vagname_temp[9];
memcpy(vagname_temp, gVagDir.vag[i].name, 8);
for (int j = 0; j < 8; ++j) {
vagname_temp[j] = tolower(vagname_temp[j]);
}
vagname_temp[8] = 0;
u64 vagname_val;
memcpy(&vagname_val, vagname_temp, 8);
*(alloced_heap + i * 8) = vagname_val;
}
return alloced_heap.offset;
}
return s7.offset;
}
void InitMachine_PCPort() {
// PC Port added functions
@@ -684,6 +707,7 @@ void InitMachine_PCPort() {
// debugging tools
make_function_symbol_from_c("pc-filter-debug-string?", (void*)pc_filter_debug_string);
make_function_symbol_from_c("alloc-vagdir-names", (void*)alloc_vagdir_names);
// other
make_function_symbol_from_c("pc-rand", (void*)pc_rand);
+3 -3
View File
@@ -80,9 +80,9 @@ u64 alloc_from_heap(u32 heap_symbol, u32 type, s32 size, u32 pp) {
auto heap_ptr = Ptr<Symbol4<Ptr<kheapinfo>>>(heap_symbol)->value();
s32 aligned_size = ((size + 0xf) / 0x10) * 0x10;
if ((((heap_symbol == s7.offset + FIX_SYM_GLOBAL_HEAP) ||
(heap_symbol == s7.offset + FIX_SYM_DEBUG)) ||
(heap_symbol == s7.offset + FIX_SYM_LOADING_LEVEL)) ||
if ((heap_symbol == s7.offset + FIX_SYM_GLOBAL_HEAP) ||
(heap_symbol == s7.offset + FIX_SYM_DEBUG) ||
(heap_symbol == s7.offset + FIX_SYM_LOADING_LEVEL) ||
(heap_symbol == s7.offset + FIX_SYM_PROCESS_LEVEL_HEAP)) {
if (!type) { // no type given, just call it a global-object
return kmalloc(heap_ptr, size, KMALLOC_MEMSET, "global-object").offset;
+1
View File
@@ -58,6 +58,7 @@ u64 loado(u32 file_name_in, u32 heap_in);
u64 unload(u32 name);
u64 call_method_of_type(u32 arg, Ptr<Type> type, u32 method_id);
u64 call_goal_function_by_name(const char* name);
u64 alloc_heap_memory(u32 heap, u32 size);
u64 alloc_heap_object(u32 heap, u32 type, u32 size, u32 pp);
u32 u32_in_fixed_sym(u32 offset);
} // namespace jak2
+2 -4
View File
@@ -192,7 +192,6 @@ u32 InitISOFS() {
}
void IsoQueueVagStream(VagCmd* cmd, int param_2) {
int iVar1;
VagCmd* new_cmd;
LoadStackEntry* pLVar5;
VagCmd* pVVar7;
@@ -212,7 +211,7 @@ void IsoQueueVagStream(VagCmd* cmd, int param_2) {
// allocate/find a vag cmd to hold this stream command. We don't own the incoming command.
if ((cmd->id == 0) ||
(((cmd->vag_dir_entry && cmd->vag_dir_entry->flag & 1U) != 0 && // added null check
(iVar1 = HowManyBelowThisPriority(cmd->priority, 0), iVar1 < 2))))
(HowManyBelowThisPriority(cmd->priority, 0) < 2))))
goto LAB_000049dc;
new_cmd = FindThisVagStream(cmd->name, cmd->id);
if (!new_cmd) {
@@ -300,8 +299,7 @@ void IsoQueueVagStream(VagCmd* cmd, int param_2) {
goto LAB_000049dc;
// queue the command.
iVar1 = QueueMessage(&new_cmd->header, 3, "QueueVAGStream", 0);
if (iVar1 == 0) {
if (QueueMessage(&new_cmd->header, 3, "QueueVAGStream", 0) == 0) {
// queue failed, give up.
new_cmd->sb_scanned = false;
RemoveVagCmd(new_cmd, 0);
+16 -15
View File
@@ -132,7 +132,8 @@ void SubtitleEditor::draw_window() {
}
if (ImGui::Button("Save Changes")) {
m_files_saved_successfully = std::make_optional(write_subtitle_db_to_files(m_subtitle_db));
m_files_saved_successfully =
std::make_optional(write_subtitle_db_to_files(m_subtitle_db, g_game_version));
repl_rebuild_text();
}
if (m_files_saved_successfully.has_value()) {
@@ -196,7 +197,7 @@ void SubtitleEditor::draw_window() {
if (ImGui::Button("Add Scene")) {
GameSubtitleSceneInfo newScene(SubtitleSceneKind::Movie);
newScene.m_name = m_new_scene_name;
newScene.m_id = 0; // TODO - id is always zero, bug in subtitles.cpp?
newScene.m_id = 0; // id's are only used for non-named hints
newScene.m_sorting_group = m_new_scene_group;
m_subtitle_db.m_banks.at(m_current_language)->add_scene(newScene);
m_subtitle_db.m_subtitle_groups->add_scene(newScene.m_sorting_group, newScene.m_name);
@@ -314,11 +315,11 @@ void SubtitleEditor::draw_edit_options() {
if (ImGui::BeginCombo(
"Editing Language ID",
fmt::format("[{}] {}", m_subtitle_db.m_banks[m_current_language]->m_lang_id,
m_subtitle_db.m_banks[m_current_language]->file_path)
m_subtitle_db.m_banks[m_current_language]->m_file_path)
.c_str())) {
for (const auto& [key, value] : m_subtitle_db.m_banks) {
const bool isSelected = m_current_language == key;
if (ImGui::Selectable(fmt::format("[{}] {}", value->m_lang_id, value->file_path).c_str(),
if (ImGui::Selectable(fmt::format("[{}] {}", value->m_lang_id, value->m_file_path).c_str(),
isSelected)) {
m_current_language = key;
}
@@ -330,11 +331,11 @@ void SubtitleEditor::draw_edit_options() {
}
if (ImGui::BeginCombo("Base Language ID",
fmt::format("[{}] {}", m_subtitle_db.m_banks[m_base_language]->m_lang_id,
m_subtitle_db.m_banks[m_base_language]->file_path)
m_subtitle_db.m_banks[m_base_language]->m_file_path)
.c_str())) {
for (const auto& [key, value] : m_subtitle_db.m_banks) {
const bool isSelected = m_base_language == key;
if (ImGui::Selectable(fmt::format("[{}] {}", value->m_lang_id, value->file_path).c_str(),
if (ImGui::Selectable(fmt::format("[{}] {}", value->m_lang_id, value->m_file_path).c_str(),
isSelected)) {
m_base_language = key;
}
@@ -610,21 +611,20 @@ void SubtitleEditor::draw_subtitle_options(GameSubtitleSceneInfo& scene, bool cu
if (current_scene) {
draw_new_cutscene_line_form();
}
auto font =
get_font_bank(parse_text_only_version(m_subtitle_db.m_banks[m_current_language]->file_path));
auto font = get_font_bank(m_subtitle_db.m_banks[m_current_language]->m_text_version);
int i = 0;
for (auto subtitleLine = scene.m_lines.begin(); subtitleLine != scene.m_lines.end();) {
auto linetext = font->convert_game_to_utf8(subtitleLine->line.c_str());
auto linespkr = font->convert_game_to_utf8(subtitleLine->speaker.c_str());
auto line_speaker = font->convert_game_to_utf8(subtitleLine->speaker.c_str());
std::string summary;
if (linetext.empty()) {
summary = fmt::format("[{}] Clear Screen", subtitleLine->frame);
} else if (linetext.length() >= 30) {
summary =
fmt::format("[{}] {} - '{}...'", subtitleLine->frame, linespkr, linetext.substr(0, 30));
summary = fmt::format("[{}] {} - '{}...'", subtitleLine->frame, line_speaker,
linetext.substr(0, 30));
} else {
summary =
fmt::format("[{}] {} - '{}'", subtitleLine->frame, linespkr, linetext.substr(0, 30));
fmt::format("[{}] {} - '{}'", subtitleLine->frame, line_speaker, linetext.substr(0, 30));
}
if (linetext.empty()) {
ImGui::PushStyleColor(ImGuiCol_Text, m_disabled_text_color);
@@ -637,7 +637,8 @@ void SubtitleEditor::draw_subtitle_options(GameSubtitleSceneInfo& scene, bool cu
}
ImGui::InputInt("Starting Frame", &subtitleLine->frame,
ImGuiInputTextFlags_::ImGuiInputTextFlags_CharsDecimal);
ImGui::InputText("Speaker", &linespkr);
// TODO - speaker dropdown instead
ImGui::InputText("Speaker", &line_speaker);
ImGui::InputText("Text", &linetext);
ImGui::Checkbox("Offscreen?", &subtitleLine->offscreen);
if (scene.m_lines.size() > 1) { // prevent creating an empty scene
@@ -655,7 +656,7 @@ void SubtitleEditor::draw_subtitle_options(GameSubtitleSceneInfo& scene, bool cu
ImGui::PopStyleColor();
}
auto newtext = font->convert_utf8_to_game(linetext, true);
auto newspkr = font->convert_utf8_to_game(linespkr, true);
auto newspkr = font->convert_utf8_to_game(line_speaker, true);
subtitleLine->line = newtext;
subtitleLine->speaker = newspkr;
i++;
@@ -679,7 +680,7 @@ void SubtitleEditor::draw_new_cutscene_line_form() {
rendered_text_entry_btn = true;
if (ImGui::Button("Add Text Entry")) {
auto font = get_font_bank(
parse_text_only_version(m_subtitle_db.m_banks[m_current_language]->file_path));
parse_text_only_version(m_subtitle_db.m_banks[m_current_language]->m_file_path));
m_current_scene->add_line(
m_current_scene_frame, font->convert_utf8_to_game(m_current_scene_text, true),
font->convert_utf8_to_game(m_current_scene_speaker, true), m_current_scene_offscreen);
+5
View File
@@ -574,6 +574,11 @@
(defmacro false! (var)
`(set! ,var #f))
(defmacro max! (val maxval)
`(set! ,val (max ,val ,maxval)))
(defmacro min! (val minval)
`(set! ,val (min ,val ,minval)))
(defmacro minmax (val minval maxval)
`(max (min ,val ,maxval) ,minval)
)
+1 -1
View File
@@ -423,7 +423,7 @@
(define *text-languages* (static-text-list-array
english uk-english french german spanish italian japanese portuguese br-portuguese swedish finnish danish norwegian dutch hungarian))
(define *subtitle-languages* (static-text-list-array
english french german spanish italian br-portuguese))
english uk-english french german spanish italian br-portuguese))
+17 -23
View File
@@ -11,7 +11,7 @@
:virtual #t
:event (the-as (function process int symbol event-message-block object :behavior ashelin) enemy-event-handler)
:enter (behavior ()
(set! (-> self state-time) (-> self clock frame-counter))
(set! (-> self state-time) (current-time))
(let ((v1-2 self))
(set! (-> v1-2 enemy-flags) (the-as enemy-flag (logclear (-> v1-2 enemy-flags) (enemy-flag enemy-flag36))))
(set! (-> v1-2 nav callback-info) *nav-enemy-null-callback-info*)
@@ -109,7 +109,7 @@
:virtual #t
:event (the-as (function process int symbol event-message-block object :behavior ashelin) enemy-event-handler)
:enter (behavior ()
(set! (-> self state-time) (-> self clock frame-counter))
(set! (-> self state-time) (current-time))
(let ((v1-2 self))
(set! (-> v1-2 enemy-flags) (the-as enemy-flag (logclear (-> v1-2 enemy-flags) (enemy-flag enemy-flag36))))
(set! (-> v1-2 nav callback-info) *nav-enemy-null-callback-info*)
@@ -169,9 +169,7 @@
(ashelin-method-240 self a1-6)
)
(else
(if (and (>= (- (-> self clock frame-counter) (-> self state-time)) (-> self reaction-time))
(ashelin-method-247 self)
)
(if (and (>= (- (current-time) (-> self state-time)) (-> self reaction-time)) (ashelin-method-247 self))
(go-virtual chase)
)
)
@@ -189,7 +187,7 @@
)
)
(else
(if (>= (- (-> self clock frame-counter) (-> self state-time)) (-> self reaction-time))
(if (>= (- (current-time) (-> self state-time)) (-> self reaction-time))
(ashelin-method-239 self)
)
)
@@ -259,7 +257,7 @@
:virtual #t
:event (the-as (function process int symbol event-message-block object :behavior ashelin) enemy-event-handler)
:enter (behavior ()
(set! (-> self state-time) (-> self clock frame-counter))
(set! (-> self state-time) (current-time))
(let ((v1-2 self))
(set! (-> v1-2 enemy-flags) (the-as enemy-flag (logclear (-> v1-2 enemy-flags) (enemy-flag enemy-flag36))))
(set! (-> v1-2 nav callback-info) *nav-enemy-null-callback-info*)
@@ -349,7 +347,7 @@
:virtual #t
:event (the-as (function process int symbol event-message-block object :behavior ashelin) enemy-event-handler)
:enter (behavior ()
(set! (-> self state-time) (-> self clock frame-counter))
(set! (-> self state-time) (current-time))
(let ((v1-2 self))
(if (not (logtest? (enemy-flag enemy-flag36) (-> v1-2 enemy-flags)))
(set! (-> v1-2 enemy-flags) (the-as enemy-flag (logior (enemy-flag enemy-flag38) (-> v1-2 enemy-flags))))
@@ -379,12 +377,10 @@
((outside-spot-radius? self (the-as bot-spot #f) (the-as vector #f) #t)
(ashelin-method-239 self)
)
((and (>= (- (-> self clock frame-counter) (-> self state-time)) (seconds 0.5)) (bot-method-208 self))
((and (>= (- (current-time) (-> self state-time)) (seconds 0.5)) (bot-method-208 self))
(go-virtual traveling-blocked)
)
((and (nav-enemy-method-163 self)
(>= (- (-> self clock frame-counter) (-> self state-time)) (-> self reaction-time))
)
((and (nav-enemy-method-163 self) (>= (- (current-time) (-> self state-time)) (-> self reaction-time)))
(go-stare2 self)
)
)
@@ -417,7 +413,7 @@
:virtual #t
:event (the-as (function process int symbol event-message-block object :behavior ashelin) enemy-event-handler)
:enter (behavior ()
(set! (-> self state-time) (-> self clock frame-counter))
(set! (-> self state-time) (current-time))
(let ((v1-2 self))
(set! (-> v1-2 enemy-flags) (the-as enemy-flag (logclear (-> v1-2 enemy-flags) (enemy-flag enemy-flag36))))
(set! (-> v1-2 nav callback-info) *nav-enemy-null-callback-info*)
@@ -438,7 +434,7 @@
((bot-method-214 self)
(go-hostile self)
)
((and (>= (- (-> self clock frame-counter) (-> self state-time)) (seconds 1)) (not (bot-method-208 self)))
((and (>= (- (current-time) (-> self state-time)) (seconds 1)) (not (bot-method-208 self)))
(go-virtual traveling)
)
)
@@ -465,7 +461,7 @@
)
:trans (behavior ()
(bot-method-223 self #f)
(when (>= (- (-> self clock frame-counter) (-> self state-time)) (seconds 0.1))
(when (>= (- (current-time) (-> self state-time)) (seconds 0.1))
(when (bot-method-214 self)
(if (ashelin-method-238 self #t #f)
(go-virtual standing-idle)
@@ -553,16 +549,14 @@
:trans (behavior ()
(bot-method-223 self #t)
(cond
((and (nav-enemy-method-163 self)
(>= (- (-> self clock frame-counter) (-> self state-time)) (-> self reaction-time))
)
((and (nav-enemy-method-163 self) (>= (- (current-time) (-> self state-time)) (-> self reaction-time)))
(go-stare2 self)
)
((not (bot-method-214 self))
(go-virtual traveling)
)
)
(when (>= (- (-> self clock frame-counter) (-> self state-time)) (-> self reaction-time))
(when (>= (- (current-time) (-> self state-time)) (-> self reaction-time))
(if (or (ashelin-method-238 self #t #f) (ashelin-method-248 self))
(go-virtual standing-idle)
)
@@ -606,7 +600,7 @@
:virtual #t
:event (the-as (function process int symbol event-message-block object :behavior ashelin) enemy-event-handler)
:enter (behavior ()
(set! (-> self state-time) (-> self clock frame-counter))
(set! (-> self state-time) (current-time))
(let ((v1-2 self))
(set! (-> v1-2 enemy-flags) (the-as enemy-flag (logclear (-> v1-2 enemy-flags) (enemy-flag enemy-flag36))))
(set! (-> v1-2 nav callback-info) *nav-enemy-null-callback-info*)
@@ -748,7 +742,7 @@
:virtual #t
:event (the-as (function process int symbol event-message-block object :behavior ashelin) enemy-event-handler)
:enter (behavior ()
(set! (-> self state-time) (-> self clock frame-counter))
(set! (-> self state-time) (current-time))
(let ((v1-2 self))
(set! (-> v1-2 enemy-flags) (the-as enemy-flag (logclear (-> v1-2 enemy-flags) (enemy-flag enemy-flag36))))
(set! (-> v1-2 nav callback-info) *nav-enemy-null-callback-info*)
@@ -883,7 +877,7 @@
:virtual #t
:event (the-as (function process int symbol event-message-block object :behavior ashelin) enemy-event-handler)
:enter (behavior ()
(set! (-> self state-time) (-> self clock frame-counter))
(set! (-> self state-time) (current-time))
(let ((v1-2 self))
(set! (-> v1-2 enemy-flags) (the-as enemy-flag (logclear (-> v1-2 enemy-flags) (enemy-flag enemy-flag36))))
(set! (-> v1-2 nav callback-info) *nav-enemy-null-callback-info*)
@@ -1083,7 +1077,7 @@
(t9-0)
)
)
(when (and (logtest? (bot-flags bf23) (-> self bot-flags)) (!= (-> self state-time) (-> self clock frame-counter)))
(when (and (logtest? (bot-flags bf23) (-> self bot-flags)) (!= (-> self state-time) (current-time)))
(logclear! (-> self bot-flags) (bot-flags bf23))
(ashelin-method-244 self)
)
+124 -138
View File
@@ -269,101 +269,99 @@
)
(defmethod enemy-method-97 ashelin ((obj ashelin))
(with-pp
(let* ((s5-0 (handle->process (-> obj attacker-handle)))
(v1-3 (if (type? s5-0 process-focusable)
s5-0
)
)
(let* ((s5-0 (handle->process (-> obj attacker-handle)))
(v1-3 (if (type? s5-0 process-focusable)
s5-0
)
)
)
(when v1-3
(cond
((= (-> v1-3 type) target)
(when (or (not (logtest? (-> obj bot-flags) (bot-flags attacked)))
(>= (- (current-time) (-> obj attacker-time)) (seconds 5))
)
(if (logtest? (-> obj bot-flags) (bot-flags attacked))
(reset-attacker! obj)
)
(set! v1-3 (the-as process #f))
(set! (-> obj attacker-handle) (the-as handle #f))
)
(when v1-3
(cond
((= (-> v1-3 type) target)
(when (or (not (logtest? (-> obj bot-flags) (bot-flags attacked)))
(>= (- (-> pp clock frame-counter) (-> obj attacker-time)) (seconds 5))
)
(if (logtest? (-> obj bot-flags) (bot-flags attacked))
(reset-attacker! obj)
)
(set! v1-3 (the-as process #f))
(set! (-> obj attacker-handle) (the-as handle #f))
)
)
(else
(when (>= (- (-> pp clock frame-counter) (-> obj attacker-time)) (seconds 2.5))
(set! v1-3 (the-as process #f))
(set! (-> obj attacker-handle) (the-as handle #f))
)
)
(else
(when (>= (- (current-time) (-> obj attacker-time)) (seconds 2.5))
(set! v1-3 (the-as process #f))
(set! (-> obj attacker-handle) (the-as handle #f))
)
)
)
(let ((a0-21 (-> obj focus-mode))
(s5-1 (the-as process #f))
)
(cond
((zero? a0-21)
(cond
(v1-3
(set! s5-1 v1-3)
)
((begin (set! s5-1 (select-focus! obj)) s5-1)
(empty)
)
(else
(let ((s4-0 (handle->process (-> obj poi-handle))))
(set! s5-1 (if (type? s4-0 process-focusable)
s4-0
)
)
)
(if s5-1
(empty)
(set! s5-1 *target*)
)
)
)
)
((= a0-21 1)
(cond
(v1-3
(set! s5-1 v1-3)
)
(else
(let ((s4-1 (handle->process (-> obj poi-handle))))
(set! s5-1 (if (type? s4-1 process-focusable)
s4-1
)
)
)
(cond
(s5-1
(empty)
)
((begin (set! s5-1 (select-focus! obj)) s5-1)
(empty)
)
(else
(set! s5-1 *target*)
)
)
)
)
)
)
(let ((a0-21 (-> obj focus-mode))
(s5-1 (the-as process #f))
)
(cond
(s5-1
(try-update-focus (-> obj focus) (the-as process-focusable s5-1) obj)
(if (and (logtest? (-> obj bot-flags) (bot-flags attacked)) (!= (-> s5-1 type) target))
(logclear! (-> obj bot-flags) (bot-flags attacked))
(cond
((zero? a0-21)
(cond
(v1-3
(set! s5-1 v1-3)
)
((begin (set! s5-1 (select-focus! obj)) s5-1)
(empty)
)
(else
(let ((s4-0 (handle->process (-> obj poi-handle))))
(set! s5-1 (if (type? s4-0 process-focusable)
s4-0
)
)
)
(if s5-1
(empty)
(set! s5-1 *target*)
)
)
)
)
((= a0-21 1)
(cond
(v1-3
(set! s5-1 v1-3)
)
(else
(let ((s4-1 (handle->process (-> obj poi-handle))))
(set! s5-1 (if (type? s4-1 process-focusable)
s4-1
)
)
)
(cond
(s5-1
(empty)
)
((begin (set! s5-1 (select-focus! obj)) s5-1)
(empty)
)
)
(else
(clear-focused (-> obj focus))
(logclear! (-> obj bot-flags) (bot-flags attacked))
)
)
s5-1
(else
(set! s5-1 *target*)
)
)
)
)
)
)
(cond
(s5-1
(try-update-focus (-> obj focus) (the-as process-focusable s5-1) obj)
(if (and (logtest? (-> obj bot-flags) (bot-flags attacked)) (!= (-> s5-1 type) target))
(logclear! (-> obj bot-flags) (bot-flags attacked))
)
)
(else
(clear-focused (-> obj focus))
(logclear! (-> obj bot-flags) (bot-flags attacked))
)
)
s5-1
)
)
)
@@ -490,11 +488,9 @@
)
(defmethod ashelin-method-235 ashelin ((obj ashelin) (arg0 symbol))
(with-pp
(and (>= (- (-> pp clock frame-counter) (-> obj last-fire-time)) (seconds 1))
(and (>= 8556.089 (fabs (-> obj focus-info ry-diff))) (ashelin-method-238 obj arg0 #t))
)
)
(and (>= (- (current-time) (-> obj last-fire-time)) (seconds 1))
(and (>= 8556.089 (fabs (-> obj focus-info ry-diff))) (ashelin-method-238 obj arg0 #t))
)
)
(defmethod ashelin-method-243 ashelin ((obj ashelin) (arg0 float))
@@ -735,31 +731,29 @@
;; WARN: Return type mismatch (pointer process) vs none.
(defmethod fire-projectile ashelin ((obj ashelin) (arg0 vector))
(with-pp
(set! (-> obj last-fire-time) (-> pp clock frame-counter))
(+! (-> obj fired-gun-count) 1)
(let ((s4-0 (new 'stack-no-clear 'projectile-init-by-other-params)))
(set! (-> s4-0 ent) (-> obj entity))
(set! (-> s4-0 charge) 1.0)
(set! (-> s4-0 options) (projectile-options account-for-target-velocity proj-options-8000))
(set! (-> s4-0 notify-handle) (process->handle obj))
(set! (-> s4-0 owner-handle) (the-as handle #f))
(set! (-> s4-0 ignore-handle) (process->handle obj))
(let* ((v1-13 *game-info*)
(a0-10 (+ (-> v1-13 attack-id) 1))
)
(set! (-> v1-13 attack-id) a0-10)
(set! (-> s4-0 attack-id) a0-10)
)
(set! (-> s4-0 timeout) (seconds 4))
(vector<-cspace! (-> s4-0 pos) (-> obj node-list data 22))
(set! (-> s4-0 vel quad) (-> arg0 quad))
(vector-! (-> s4-0 vel) (-> s4-0 vel) (-> s4-0 pos))
(vector-normalize! (-> s4-0 vel) 307200.0)
(spawn-projectile ashelin-shot s4-0 obj *default-dead-pool*)
(set! (-> obj last-fire-time) (current-time))
(+! (-> obj fired-gun-count) 1)
(let ((s4-0 (new 'stack-no-clear 'projectile-init-by-other-params)))
(set! (-> s4-0 ent) (-> obj entity))
(set! (-> s4-0 charge) 1.0)
(set! (-> s4-0 options) (projectile-options account-for-target-velocity proj-options-8000))
(set! (-> s4-0 notify-handle) (process->handle obj))
(set! (-> s4-0 owner-handle) (the-as handle #f))
(set! (-> s4-0 ignore-handle) (process->handle obj))
(let* ((v1-13 *game-info*)
(a0-10 (+ (-> v1-13 attack-id) 1))
)
(set! (-> v1-13 attack-id) a0-10)
(set! (-> s4-0 attack-id) a0-10)
)
(none)
(set! (-> s4-0 timeout) (seconds 4))
(vector<-cspace! (-> s4-0 pos) (-> obj node-list data 22))
(set! (-> s4-0 vel quad) (-> arg0 quad))
(vector-! (-> s4-0 vel) (-> s4-0 vel) (-> s4-0 pos))
(vector-normalize! (-> s4-0 vel) 307200.0)
(spawn-projectile ashelin-shot s4-0 obj *default-dead-pool*)
)
(none)
)
(defmethod ashelin-method-249 ashelin ((obj ashelin))
@@ -1343,37 +1337,29 @@
)
(defmethod ashelin-method-245 ashelin ((obj ashelin))
(with-pp
(when (and (not (channel-active? obj (the-as uint 0)))
(>= (-> pp clock frame-counter) (-> obj victory-speech-time))
)
(let ((s5-0 (bot-speech-list-method-9
(-> obj ash-course victory-speeches)
obj
(-> obj ash-course speeches)
(speech-flags)
)
(when (and (not (channel-active? obj (the-as uint 0))) (>= (current-time) (-> obj victory-speech-time)))
(let ((s5-0 (bot-speech-list-method-9
(-> obj ash-course victory-speeches)
obj
(-> obj ash-course speeches)
(speech-flags)
)
)
(when (>= s5-0 0)
(set! (-> obj victory-speech-time)
(the-as time-frame (+ (get-rand-int-range obj 1200 2100) (-> pp clock frame-counter)))
)
(play-speech obj s5-0)
)
(when (>= s5-0 0)
(set! (-> obj victory-speech-time) (the-as time-frame (+ (get-rand-int-range obj 1200 2100) (current-time))))
(play-speech obj s5-0)
)
)
(none)
)
(none)
)
(defmethod enemy-method-136 ashelin ((obj ashelin))
(with-pp
(when (>= (- (-> pp clock frame-counter) (-> obj hit-focus-time)) (seconds 2))
(let ((v0-0 (logclear (-> obj enemy-flags) (enemy-flag look-at-focus))))
(set! (-> obj enemy-flags) v0-0)
v0-0
)
(when (>= (- (current-time) (-> obj hit-focus-time)) (seconds 2))
(let ((v0-0 (logclear (-> obj enemy-flags) (enemy-flag look-at-focus))))
(set! (-> obj enemy-flags) v0-0)
v0-0
)
)
)
+37 -41
View File
@@ -11,7 +11,7 @@
:virtual #t
:event (the-as (function process int symbol event-message-block object :behavior sig) enemy-event-handler)
:enter (behavior ()
(set! (-> self state-time) (-> self clock frame-counter))
(set! (-> self state-time) (current-time))
(let ((v1-2 self))
(set! (-> v1-2 enemy-flags) (the-as enemy-flag (logclear (-> v1-2 enemy-flags) (enemy-flag enemy-flag36))))
(set! (-> v1-2 nav callback-info) *nav-enemy-null-callback-info*)
@@ -71,7 +71,7 @@
:virtual #t
:event (the-as (function process int symbol event-message-block object :behavior sig) enemy-event-handler)
:enter (behavior ()
(set! (-> self state-time) (-> self clock frame-counter))
(set! (-> self state-time) (current-time))
(let ((v1-2 self))
(set! (-> v1-2 enemy-flags) (the-as enemy-flag (logclear (-> v1-2 enemy-flags) (enemy-flag enemy-flag36))))
(set! (-> v1-2 nav callback-info) *nav-enemy-null-callback-info*)
@@ -174,7 +174,7 @@
:virtual #t
:event (the-as (function process int symbol event-message-block object :behavior sig) enemy-event-handler)
:enter (behavior ()
(set! (-> self state-time) (-> self clock frame-counter))
(set! (-> self state-time) (current-time))
(let ((v1-2 self))
(set! (-> v1-2 enemy-flags) (the-as enemy-flag (logclear (-> v1-2 enemy-flags) (enemy-flag enemy-flag36))))
(set! (-> v1-2 nav callback-info) *nav-enemy-null-callback-info*)
@@ -217,7 +217,7 @@
)
)
)
(if (and (>= (- (-> self clock frame-counter) (-> self state-time)) (seconds 1))
(if (and (>= (- (current-time) (-> self state-time)) (seconds 1))
(or (not (-> self focus-info fproc)) (>= (-> self focus-info bullseye-xz-dist) 102400.0))
)
(go-virtual waiting-far)
@@ -305,7 +305,7 @@
:virtual #t
:event (the-as (function process int symbol event-message-block object :behavior sig) enemy-event-handler)
:enter (behavior ()
(set! (-> self state-time) (-> self clock frame-counter))
(set! (-> self state-time) (current-time))
(let ((v1-2 self))
(set! (-> v1-2 enemy-flags) (the-as enemy-flag (logclear (-> v1-2 enemy-flags) (enemy-flag enemy-flag36))))
(set! (-> v1-2 nav callback-info) *nav-enemy-null-callback-info*)
@@ -496,7 +496,7 @@
:virtual #t
:event (the-as (function process int symbol event-message-block object :behavior sig) enemy-event-handler)
:enter (behavior ()
(set! (-> self state-time) (-> self clock frame-counter))
(set! (-> self state-time) (current-time))
(let ((v1-2 self))
(set! (-> v1-2 enemy-flags) (the-as enemy-flag (logclear (-> v1-2 enemy-flags) (enemy-flag enemy-flag36))))
(set! (-> v1-2 nav callback-info) *nav-enemy-null-callback-info*)
@@ -648,7 +648,7 @@
:virtual #t
:event (the-as (function process int symbol event-message-block object :behavior sig) enemy-event-handler)
:enter (behavior ()
(set! (-> self state-time) (-> self clock frame-counter))
(set! (-> self state-time) (current-time))
(let ((v1-2 self))
(set! (-> v1-2 enemy-flags) (the-as enemy-flag (logclear (-> v1-2 enemy-flags) (enemy-flag enemy-flag36))))
(set! (-> v1-2 nav callback-info) *nav-enemy-null-callback-info*)
@@ -680,7 +680,7 @@
)
)
(when (and (logtest? (bot-flags bf21) (-> self bot-flags)) (zero? (-> self played-unjam-time)))
(set! (-> self played-unjam-time) (-> self clock frame-counter))
(set! (-> self played-unjam-time) (current-time))
(sound-play "sig-gun-unjam")
)
(none)
@@ -707,7 +707,7 @@
(ja :num! (seek!))
)
(when (and (logtest? (bot-flags bf21) (-> self bot-flags))
(>= (- (-> self clock frame-counter) (-> self played-unjam-time)) (seconds 0.35))
(>= (- (current-time) (-> self played-unjam-time)) (seconds 0.35))
)
(logclear! (-> self bot-flags) (bot-flags bf19 bf21))
(go-virtual waiting-close)
@@ -723,7 +723,7 @@
(ja :num! (seek!))
)
(when (and (logtest? (bot-flags bf21) (-> self bot-flags))
(>= (- (-> self clock frame-counter) (-> self played-unjam-time)) (seconds 0.35))
(>= (- (current-time) (-> self played-unjam-time)) (seconds 0.35))
)
(logclear! (-> self bot-flags) (bot-flags bf19 bf21))
(go-virtual waiting-close)
@@ -738,7 +738,7 @@
(ja :num! (seek!))
)
(when (and (logtest? (bot-flags bf21) (-> self bot-flags))
(>= (- (-> self clock frame-counter) (-> self played-unjam-time)) (seconds 0.35))
(>= (- (current-time) (-> self played-unjam-time)) (seconds 0.35))
)
(logclear! (-> self bot-flags) (bot-flags bf19 bf21))
(go-virtual waiting-close)
@@ -753,7 +753,7 @@
(ja :num! (seek!))
)
(when (and (logtest? (bot-flags bf21) (-> self bot-flags))
(>= (- (-> self clock frame-counter) (-> self played-unjam-time)) (seconds 0.35))
(>= (- (current-time) (-> self played-unjam-time)) (seconds 0.35))
)
(logclear! (-> self bot-flags) (bot-flags bf19 bf21))
(go-virtual waiting-close)
@@ -768,7 +768,7 @@
(ja :num! (seek!))
)
(when (and (logtest? (bot-flags bf21) (-> self bot-flags))
(>= (- (-> self clock frame-counter) (-> self played-unjam-time)) (seconds 0.35))
(>= (- (current-time) (-> self played-unjam-time)) (seconds 0.35))
)
(logclear! (-> self bot-flags) (bot-flags bf19 bf21))
(go-virtual waiting-close)
@@ -783,7 +783,7 @@
(ja :num! (seek!))
)
(when (and (logtest? (bot-flags bf21) (-> self bot-flags))
(>= (- (-> self clock frame-counter) (-> self played-unjam-time)) (seconds 0.35))
(>= (- (current-time) (-> self played-unjam-time)) (seconds 0.35))
)
(logclear! (-> self bot-flags) (bot-flags bf19 bf21))
(go-virtual waiting-close)
@@ -799,7 +799,7 @@
(ja :num! (seek!))
)
(when (and (logtest? (bot-flags bf21) (-> self bot-flags))
(>= (- (-> self clock frame-counter) (-> self played-unjam-time)) (seconds 0.35))
(>= (- (current-time) (-> self played-unjam-time)) (seconds 0.35))
)
(logclear! (-> self bot-flags) (bot-flags bf19 bf21))
(go-virtual waiting-close)
@@ -815,7 +815,7 @@
(ja :num! (seek!))
)
(when (and (logtest? (bot-flags bf21) (-> self bot-flags))
(>= (- (-> self clock frame-counter) (-> self played-unjam-time)) (seconds 0.35))
(>= (- (current-time) (-> self played-unjam-time)) (seconds 0.35))
)
(logclear! (-> self bot-flags) (bot-flags bf19 bf21))
(go-virtual waiting-close)
@@ -831,7 +831,7 @@
:virtual #t
:event (the-as (function process int symbol event-message-block object :behavior sig) enemy-event-handler)
:enter (behavior ()
(set! (-> self state-time) (-> self clock frame-counter))
(set! (-> self state-time) (current-time))
(let ((v1-2 self))
(set! (-> v1-2 enemy-flags) (the-as enemy-flag (logclear (-> v1-2 enemy-flags) (enemy-flag enemy-flag36))))
(set! (-> v1-2 nav callback-info) *nav-enemy-null-callback-info*)
@@ -939,7 +939,7 @@
:virtual #t
:event (the-as (function process int symbol event-message-block object :behavior sig) enemy-event-handler)
:enter (behavior ()
(set! (-> self state-time) (-> self clock frame-counter))
(set! (-> self state-time) (current-time))
(let ((v1-2 self))
(if (not (logtest? (enemy-flag enemy-flag36) (-> v1-2 enemy-flags)))
(set! (-> v1-2 enemy-flags) (the-as enemy-flag (logior (enemy-flag enemy-flag38) (-> v1-2 enemy-flags))))
@@ -973,12 +973,10 @@
((outside-spot-radius? self (the-as bot-spot #f) (the-as vector #f) #t)
(go-virtual waiting-close)
)
((and (>= (- (-> self clock frame-counter) (-> self state-time)) (seconds 0.5)) (bot-method-208 self))
((and (>= (- (current-time) (-> self state-time)) (seconds 0.5)) (bot-method-208 self))
(go-virtual traveling-blocked)
)
((and (nav-enemy-method-163 self)
(>= (- (-> self clock frame-counter) (-> self state-time)) (-> self reaction-time))
)
((and (nav-enemy-method-163 self) (>= (- (current-time) (-> self state-time)) (-> self reaction-time)))
(go-stare2 self)
)
)
@@ -1011,7 +1009,7 @@
:virtual #t
:event (the-as (function process int symbol event-message-block object :behavior sig) enemy-event-handler)
:enter (behavior ()
(set! (-> self state-time) (-> self clock frame-counter))
(set! (-> self state-time) (current-time))
(let ((v1-2 self))
(set! (-> v1-2 enemy-flags) (the-as enemy-flag (logclear (-> v1-2 enemy-flags) (enemy-flag enemy-flag36))))
(set! (-> v1-2 nav callback-info) *nav-enemy-null-callback-info*)
@@ -1039,7 +1037,7 @@
((sig-method-255 self)
(go-virtual repair-gun)
)
((and (>= (- (-> self clock frame-counter) (-> self state-time)) (seconds 1)) (not (bot-method-208 self)))
((and (>= (- (current-time) (-> self state-time)) (seconds 1)) (not (bot-method-208 self)))
(go-virtual traveling)
)
)
@@ -1081,7 +1079,7 @@
)
:trans (behavior ()
(bot-method-223 self #f)
(when (>= (- (-> self clock frame-counter) (-> self state-time)) (seconds 0.1))
(when (>= (- (current-time) (-> self state-time)) (seconds 0.1))
(when (bot-method-214 self)
(cond
((sig-method-246 self)
@@ -1322,7 +1320,7 @@
(seconds 0.05)
)
(bot-method-223 self #t)
(if (and (>= (- (-> self clock frame-counter) (-> self state-time)) (seconds 0.1))
(if (and (>= (- (current-time) (-> self state-time)) (seconds 0.1))
(or (not (bot-method-214 self)) (not (sig-method-245 self)))
)
(react-to-focus self)
@@ -1365,9 +1363,7 @@
:trans (behavior ()
(bot-method-223 self #t)
(cond
((and (nav-enemy-method-163 self)
(>= (- (-> self clock frame-counter) (-> self state-time)) (-> self reaction-time))
)
((and (nav-enemy-method-163 self) (>= (- (current-time) (-> self state-time)) (-> self reaction-time)))
(go-stare2 self)
)
((not (bot-method-214 self))
@@ -1439,7 +1435,7 @@
0.0
#f
)
(until (>= (- (-> self clock frame-counter) (-> self state-time)) (seconds 0.167))
(until (>= (- (current-time) (-> self state-time)) (seconds 0.167))
(sig-method-258 self)
(suspend)
)
@@ -1469,7 +1465,7 @@
)
)
)
(until (>= (- (-> self clock frame-counter) (-> self state-time)) (seconds 0.8))
(until (>= (- (current-time) (-> self state-time)) (seconds 0.8))
(sig-method-258 self)
(suspend)
)
@@ -1616,7 +1612,7 @@
(ja :num! (seek!))
)
(ja-channel-push! 1 (seconds 0.2))
(set! (-> self state-time) (-> self clock frame-counter))
(set! (-> self state-time) (current-time))
(until #f
(ja-no-eval :group! (-> self draw art-group data 4)
:num! (seek! (the float (+ (-> (the-as art-joint-anim (-> self draw art-group data 4)) frames num-frames) -1)))
@@ -1624,7 +1620,7 @@
)
(until (ja-done? 0)
(if (and (logtest? (-> self bot-flags) (bot-flags failed))
(>= (- (-> self clock frame-counter) (-> self state-time)) (seconds 0.5))
(>= (- (current-time) (-> self state-time)) (seconds 0.5))
(reset? *fail-mission-control*)
)
(reset! *fail-mission-control*)
@@ -1642,7 +1638,7 @@
:virtual #t
:event (the-as (function process int symbol event-message-block object :behavior sig) enemy-event-handler)
:enter (behavior ()
(set! (-> self state-time) (-> self clock frame-counter))
(set! (-> self state-time) (current-time))
(let ((v1-2 self))
(set! (-> v1-2 enemy-flags) (the-as enemy-flag (logclear (-> v1-2 enemy-flags) (enemy-flag enemy-flag36))))
(set! (-> v1-2 nav callback-info) *nav-enemy-null-callback-info*)
@@ -1704,7 +1700,7 @@
:virtual #t
:event (the-as (function process int symbol event-message-block object :behavior sig) enemy-event-handler)
:enter (behavior ()
(set! (-> self state-time) (-> self clock frame-counter))
(set! (-> self state-time) (current-time))
(let ((v1-2 self))
(set! (-> v1-2 enemy-flags) (the-as enemy-flag (logclear (-> v1-2 enemy-flags) (enemy-flag enemy-flag36))))
(set! (-> v1-2 nav callback-info) *nav-enemy-null-callback-info*)
@@ -1734,7 +1730,7 @@
(if (logtest? s5-0 2)
(go-virtual sig-path-shoot-jump)
)
(if (and (>= (- (-> self clock frame-counter) (-> self state-time)) (seconds 0.05)) (not (logtest? s5-0 4)))
(if (and (>= (- (current-time) (-> self state-time)) (seconds 0.05)) (not (logtest? s5-0 4)))
(go-virtual sig-path-jump-land)
)
)
@@ -1776,7 +1772,7 @@
:virtual #t
:event (the-as (function process int symbol event-message-block object :behavior sig) enemy-event-handler)
:enter (behavior ()
(set! (-> self state-time) (-> self clock frame-counter))
(set! (-> self state-time) (current-time))
(let ((v1-2 self))
(set! (-> v1-2 enemy-flags) (the-as enemy-flag (logclear (-> v1-2 enemy-flags) (enemy-flag enemy-flag36))))
(set! (-> v1-2 nav callback-info) *nav-enemy-null-callback-info*)
@@ -1845,7 +1841,7 @@
:virtual #t
:event (the-as (function process int symbol event-message-block object :behavior sig) enemy-event-handler)
:enter (behavior ()
(set! (-> self state-time) (-> self clock frame-counter))
(set! (-> self state-time) (current-time))
(let ((v1-2 self))
(set! (-> v1-2 enemy-flags) (the-as enemy-flag (logclear (-> v1-2 enemy-flags) (enemy-flag enemy-flag36))))
(set! (-> v1-2 nav callback-info) *nav-enemy-null-callback-info*)
@@ -1876,7 +1872,7 @@
(if (and (logtest? s5-0 1) (logtest? (bot-flags bf25) (-> self bot-flags)))
(go-virtual sig-path-jump)
)
(if (and (>= (- (-> self clock frame-counter) (-> self state-time)) (seconds 0.05)) (not (logtest? s5-0 4)))
(if (and (>= (- (current-time) (-> self state-time)) (seconds 0.05)) (not (logtest? s5-0 4)))
(go-virtual sig-path-shoot-jump-land)
)
)
@@ -1923,7 +1919,7 @@
:virtual #t
:event (the-as (function process int symbol event-message-block object :behavior sig) enemy-event-handler)
:enter (behavior ()
(set! (-> self state-time) (-> self clock frame-counter))
(set! (-> self state-time) (current-time))
(let ((v1-2 self))
(set! (-> v1-2 enemy-flags) (the-as enemy-flag (logclear (-> v1-2 enemy-flags) (enemy-flag enemy-flag36))))
(set! (-> v1-2 nav callback-info) *nav-enemy-null-callback-info*)
@@ -1992,7 +1988,7 @@
:virtual #t
:event (the-as (function process int symbol event-message-block object :behavior sig) enemy-event-handler)
:enter (behavior ()
(set! (-> self state-time) (-> self clock frame-counter))
(set! (-> self state-time) (current-time))
(let ((v1-2 self))
(set! (-> v1-2 enemy-flags) (the-as enemy-flag (logclear (-> v1-2 enemy-flags) (enemy-flag enemy-flag36))))
(set! (-> v1-2 nav callback-info) *nav-enemy-null-callback-info*)
+2 -2
View File
@@ -173,7 +173,7 @@
(set! (-> a1-3 message) 'sync)
(let ((v1-19
(- ((method-of-type sync-info get-timeframe-offset!) (the-as sync-info (send-event-function s5-1 a1-3)) 0)
(-> pp clock frame-counter)
(current-time)
)
)
)
@@ -268,7 +268,7 @@
(set! (-> a1-6 message) 'sync)
(let ((v1-16
(- ((method-of-type sync-info get-timeframe-offset!) (the-as sync-info (send-event-function a0-4 a1-6)) 0)
(-> pp clock frame-counter)
(current-time)
)
)
)
+157 -163
View File
@@ -235,122 +235,120 @@
)
(defmethod enemy-method-97 sig ((obj sig))
(with-pp
(let* ((s5-0 (handle->process (-> obj attacker-handle)))
(s4-0 (if (type? s5-0 process-focusable)
s5-0
)
)
(let* ((s5-0 (handle->process (-> obj attacker-handle)))
(s4-0 (if (type? s5-0 process-focusable)
s5-0
)
)
)
(when s4-0
(cond
((= (-> s4-0 type) target)
(when (or (not (logtest? (-> obj bot-flags) (bot-flags attacked)))
(>= (- (current-time) (-> obj attacker-time)) (seconds 1.5))
)
(if (logtest? (-> obj bot-flags) (bot-flags attacked))
(reset-attacker! obj)
)
(set! s4-0 (the-as process #f))
(set! (-> obj attacker-handle) (the-as handle #f))
)
(when s4-0
(cond
((= (-> s4-0 type) target)
(when (or (not (logtest? (-> obj bot-flags) (bot-flags attacked)))
(>= (- (-> pp clock frame-counter) (-> obj attacker-time)) (seconds 1.5))
)
(else
(when (>= (- (current-time) (-> obj attacker-time)) (seconds 6))
(set! s4-0 (the-as process #f))
(set! (-> obj attacker-handle) (the-as handle #f))
)
)
)
)
(let ((v1-23 (-> obj focus-mode))
(s5-1 (the-as process #f))
)
(cond
((zero? v1-23)
(cond
(s4-0
(if (or (not (logtest? (bot-flags bf19) (-> obj bot-flags)))
(>= 16384.0
(vector-vector-xz-distance (-> obj root-override2 trans) (get-trans (the-as process-focusable s4-0) 3))
)
)
(if (logtest? (-> obj bot-flags) (bot-flags attacked))
(reset-attacker! obj)
(set! s5-1 s4-0)
)
(set! s4-0 (the-as process #f))
(set! (-> obj attacker-handle) (the-as handle #f))
)
(else
(when (not (logtest? (bot-flags bf19) (-> obj bot-flags)))
(set! s5-1 (select-focus! obj))
(cond
(s5-1
(empty)
)
(else
(let ((s4-1 (handle->process (-> obj poi-handle))))
(set! s5-1 (if (type? s4-1 process-focusable)
s4-1
)
)
)
(if s5-1
(empty)
(set! s5-1 *target*)
)
)
)
)
)
)
(else
(when (>= (- (-> pp clock frame-counter) (-> obj attacker-time)) (seconds 6))
(set! s4-0 (the-as process #f))
(set! (-> obj attacker-handle) (the-as handle #f))
)
((= v1-23 1)
(cond
(s4-0
(if (or (not (logtest? (bot-flags bf19) (-> obj bot-flags)))
(>= 16384.0
(vector-vector-xz-distance (-> obj root-override2 trans) (get-trans (the-as process-focusable s4-0) 3))
)
)
(set! s5-1 s4-0)
)
)
(else
(when (not (logtest? (bot-flags bf19) (-> obj bot-flags)))
(let ((s4-2 (handle->process (-> obj poi-handle))))
(set! s5-1 (if (type? s4-2 process-focusable)
s4-2
)
)
)
(cond
(s5-1
(empty)
)
((begin (set! s5-1 (select-focus! obj)) s5-1)
(empty)
)
(else
(set! s5-1 *target*)
)
)
)
)
)
)
)
(cond
(s5-1
(try-update-focus (-> obj focus) (the-as process-focusable s5-1) obj)
(if (and (logtest? (-> obj bot-flags) (bot-flags attacked)) (!= (-> (the-as process-focusable s5-1) type) target))
(logclear! (-> obj bot-flags) (bot-flags attacked))
)
)
)
(else
(clear-focused (-> obj focus))
(logclear! (-> obj bot-flags) (bot-flags attacked))
)
)
(let ((v1-23 (-> obj focus-mode))
(s5-1 (the-as process #f))
)
(cond
((zero? v1-23)
(cond
(s4-0
(if (or (not (logtest? (bot-flags bf19) (-> obj bot-flags)))
(>= 16384.0
(vector-vector-xz-distance (-> obj root-override2 trans) (get-trans (the-as process-focusable s4-0) 3))
)
)
(set! s5-1 s4-0)
)
)
(else
(when (not (logtest? (bot-flags bf19) (-> obj bot-flags)))
(set! s5-1 (select-focus! obj))
(cond
(s5-1
(empty)
)
(else
(let ((s4-1 (handle->process (-> obj poi-handle))))
(set! s5-1 (if (type? s4-1 process-focusable)
s4-1
)
)
)
(if s5-1
(empty)
(set! s5-1 *target*)
)
)
)
)
)
)
)
((= v1-23 1)
(cond
(s4-0
(if (or (not (logtest? (bot-flags bf19) (-> obj bot-flags)))
(>= 16384.0
(vector-vector-xz-distance (-> obj root-override2 trans) (get-trans (the-as process-focusable s4-0) 3))
)
)
(set! s5-1 s4-0)
)
)
(else
(when (not (logtest? (bot-flags bf19) (-> obj bot-flags)))
(let ((s4-2 (handle->process (-> obj poi-handle))))
(set! s5-1 (if (type? s4-2 process-focusable)
s4-2
)
)
)
(cond
(s5-1
(empty)
)
((begin (set! s5-1 (select-focus! obj)) s5-1)
(empty)
)
(else
(set! s5-1 *target*)
)
)
)
)
)
)
)
(cond
(s5-1
(try-update-focus (-> obj focus) (the-as process-focusable s5-1) obj)
(if (and (logtest? (-> obj bot-flags) (bot-flags attacked)) (!= (-> (the-as process-focusable s5-1) type) target))
(logclear! (-> obj bot-flags) (bot-flags attacked))
)
)
(else
(clear-focused (-> obj focus))
(logclear! (-> obj bot-flags) (bot-flags attacked))
)
)
s5-1
)
s5-1
)
)
)
@@ -389,68 +387,64 @@
- tracks when the enemy was last drawn
- looks at the target and handles attacking
@TODO Not extremely well understood yet"
(with-pp
(let ((v1-2 (-> obj skel top-anim frame-group)))
(cond
((>= (- (-> pp clock frame-counter) (-> obj danger-time)) (seconds 2))
(cond
((not v1-2)
(set! (-> obj skel top-anim base-anim) (-> obj draw art-group data 42))
(let ((v1-2 (-> obj skel top-anim frame-group)))
(cond
((>= (- (current-time) (-> obj danger-time)) (seconds 2))
(cond
((not v1-2)
(set! (-> obj skel top-anim base-anim) (-> obj draw art-group data 42))
)
((= v1-2 (-> obj draw art-group data 44))
(push-anim-to-targ
(-> obj skel top-anim)
(the-as art-joint-anim (-> obj draw art-group data 46))
0.0
0
0
1.0
0.0
#f
)
((= v1-2 (-> obj draw art-group data 44))
(push-anim-to-targ
(-> obj skel top-anim)
(the-as art-joint-anim (-> obj draw art-group data 46))
0.0
0
0
1.0
0.0
#f
)
(set! (-> obj skel top-anim base-anim) (-> obj draw art-group data 42))
)
)
(set! (-> obj skel top-anim base-anim) (-> obj draw art-group data 42))
)
)
(else
(cond
((not v1-2)
(set! (-> obj skel top-anim base-anim) (-> obj draw art-group data 44))
)
(else
(cond
((not v1-2)
(set! (-> obj skel top-anim base-anim) (-> obj draw art-group data 44))
)
((= v1-2 (-> obj draw art-group data 42))
(push-anim-to-targ
(-> obj skel top-anim)
(the-as art-joint-anim (-> obj draw art-group data 43))
0.0
0
0
1.0
0.0
#f
)
((= v1-2 (-> obj draw art-group data 42))
(push-anim-to-targ
(-> obj skel top-anim)
(the-as art-joint-anim (-> obj draw art-group data 43))
0.0
0
0
1.0
0.0
#f
)
(set! (-> obj skel top-anim base-anim) (-> obj draw art-group data 44))
)
)
(set! (-> obj skel top-anim base-anim) (-> obj draw art-group data 44))
)
)
)
)
(let ((t9-2 (method-of-type bot track-target!)))
(t9-2 obj)
)
(when (logtest? (-> obj bot-flags) (bot-flags too-far-fail))
(let ((f0-0 (vector-vector-distance (-> obj root-override2 trans) (target-pos 0))))
(when (or (>= f0-0 491520.0)
(and (>= f0-0 102400.0) (>= (- (-> pp clock frame-counter) (-> obj last-draw-time)) (seconds 10)))
)
(process-entity-status! obj (entity-perm-status no-kill) #f)
(cleanup-for-death obj)
(go (method-of-object obj die-fast))
)
)
)
(sig-plasma-method-14 (-> obj plasma) obj)
(none)
)
(let ((t9-2 (method-of-type bot track-target!)))
(t9-2 obj)
)
(when (logtest? (-> obj bot-flags) (bot-flags too-far-fail))
(let ((f0-0 (vector-vector-distance (-> obj root-override2 trans) (target-pos 0))))
(when (or (>= f0-0 491520.0) (and (>= f0-0 102400.0) (>= (- (current-time) (-> obj last-draw-time)) (seconds 10))))
(process-entity-status! obj (entity-perm-status no-kill) #f)
(cleanup-for-death obj)
(go (method-of-object obj die-fast))
)
)
)
(sig-plasma-method-14 (-> obj plasma) obj)
(none)
)
(defmethod go-to-waypoint! sig ((obj sig) (arg0 int) (arg1 symbol))
@@ -252,7 +252,7 @@
(task-node uint16 :offset-assert 1068)
(end-pos vector :inline :offset-assert 1072)
(index uint32 :offset-assert 1088)
(gui-id uint32 :offset-assert 1092)
(gui-id sound-id :offset-assert 1092)
)
:heap-base #x3d0
:method-count-assert 219
@@ -406,7 +406,7 @@
(set! (-> self gnd-height) (-> self root-override2 gspot-pos y))
(logior! (-> self flags) (citizen-flag persistent))
(set! (-> self focus-status) (logior (focus-status pilot-riding pilot) (-> self focus-status)))
(set! (-> self state-time) (-> self clock frame-counter))
(set! (-> self state-time) (current-time))
(let ((v1-31 (-> self root-override2 root-prim)))
(set! (-> v1-31 prim-core collide-as) (collide-spec))
(set! (-> v1-31 prim-core collide-with) (collide-spec))
@@ -438,7 +438,7 @@
(let ((gp-0 (new 'stack-no-clear 'vector))
(s5-0 (new 'stack-no-clear 'quaternion))
)
(set! (-> self state-time) (-> self clock frame-counter))
(set! (-> self state-time) (current-time))
(while (not (civilian-method-217 self gp-0))
(let ((s4-0 (handle->process (-> self vehicle)))
(s3-0 (new 'stack-no-clear 'quaternion))
@@ -447,7 +447,7 @@
(compute-seat-position (the-as vehicle s4-0) (-> self root-override2 trans) (-> self seat))
(quaternion-copy! (-> self root-override2 quat) s3-0)
)
(when (>= (- (-> self clock frame-counter) (-> self state-time)) (seconds 2))
(when (>= (- (current-time) (-> self state-time)) (seconds 2))
(put-rider-in-seat (the-as vehicle (handle->process (-> self vehicle))) (-> self seat) self)
(go-virtual ride)
)
@@ -685,28 +685,28 @@
(set-action!
*gui-control*
(gui-action stop)
(the-as sound-id (-> obj gui-id))
(-> obj gui-id)
(gui-channel none)
(gui-action none)
(the-as string #f)
(the-as (function gui-connection symbol) #f)
(the-as process #f)
)
(set! (-> obj gui-id) (the-as uint 0))
(set! (-> obj gui-id) (new 'static 'sound-id))
0
)
((method-of-type civilian general-event-handler) obj arg0 arg1 arg2 arg3)
)
(('play-speech)
(let ((s5-1 (-> arg3 param 0)))
(when (= (get-status *gui-control* (the-as sound-id (-> obj gui-id))) (gui-status unknown))
(when (= (get-status *gui-control* (-> obj gui-id)) (gui-status unknown))
(let ((v0-1 (the-as
object
(add-process *gui-control* obj (gui-channel citizen) (gui-action play) (the-as string s5-1) -99.0 0)
)
)
)
(set! (-> obj gui-id) (the-as uint v0-1))
(set! (-> obj gui-id) (the-as sound-id v0-1))
v0-1
)
)
@@ -1076,246 +1076,244 @@
;; WARN: Return type mismatch object vs none.
(defun shuttle-update ((arg0 task-manager) (arg1 (array city-shuttle-info)) (arg2 uint))
(local-vars (v1-263 float) (v1-377 float) (sv-336 quaternion))
(with-pp
(rlet ((acc :class vf)
(vf0 :class vf)
(vf1 :class vf)
(vf2 :class vf)
)
(init-vf0-vector)
(cond
((nonzero? (-> arg0 data-int32 9))
(check-time arg0)
(rlet ((acc :class vf)
(vf0 :class vf)
(vf1 :class vf)
(vf2 :class vf)
)
(else
(set! (-> arg0 start-time) (-> pp clock frame-counter))
(when (< (vector-vector-xz-distance (target-pos 0) (-> arg0 begin-pos)) 102400.0)
(set-setting! 'airlock #f 0.0 0)
(set! (-> arg0 data-int32 9) 1)
)
(init-vf0-vector)
(cond
((nonzero? (-> arg0 data-int32 9))
(check-time arg0)
)
(else
(set! (-> arg0 start-time) (current-time))
(when (< (vector-vector-xz-distance (target-pos 0) (-> arg0 begin-pos)) 102400.0)
(set-setting! 'airlock #f 0.0 0)
(set! (-> arg0 data-int32 9) 1)
)
)
(when (= (-> arg0 data-int32 10) (+ (-> arg0 sub-state) -1))
(let ((s3-1 (handle->process (-> arg0 slave (logand -2 (-> arg0 data-int32 10))))))
(when s3-1
(let ((v1-20 (-> arg0 data-int32 10)))
(cond
((zero? v1-20)
(let ((v0-4 (rand-vu-int-count 3)))
(cond
((zero? v0-4)
(send-event s3-1 'play-speech "agnt038")
)
((= v0-4 1)
(send-event s3-1 'play-speech "agnt039")
)
((= v0-4 2)
(send-event s3-1 'play-speech "agnt040")
)
)
)
(when (= (-> arg0 data-int32 10) (+ (-> arg0 sub-state) -1))
(let ((s3-1 (handle->process (-> arg0 slave (logand -2 (-> arg0 data-int32 10))))))
(when s3-1
(let ((v1-20 (-> arg0 data-int32 10)))
(cond
((zero? v1-20)
(let ((v0-4 (rand-vu-int-count 3)))
(cond
((zero? v0-4)
(send-event s3-1 'play-speech "agnt038")
)
((= v0-4 1)
(send-event s3-1 'play-speech "agnt039")
)
((= v0-4 2)
(send-event s3-1 'play-speech "agnt040")
)
)
)
((= v1-20 1)
(let ((v0-8 (rand-vu-int-count 4)))
(cond
((zero? v0-8)
(send-event s3-1 'play-speech "agnt045")
)
((= v0-8 1)
(send-event s3-1 'play-speech "agnt046")
)
((= v0-8 2)
(send-event s3-1 'play-speech "agnt047")
)
((= v0-8 3)
(send-event s3-1 'play-speech "agnt048")
)
)
)
((= v1-20 1)
(let ((v0-8 (rand-vu-int-count 4)))
(cond
((zero? v0-8)
(send-event s3-1 'play-speech "agnt045")
)
((= v0-8 1)
(send-event s3-1 'play-speech "agnt046")
)
((= v0-8 2)
(send-event s3-1 'play-speech "agnt047")
)
((= v0-8 3)
(send-event s3-1 'play-speech "agnt048")
)
)
)
((= v1-20 2)
(let ((v0-13 (rand-vu-int-count 4)))
(cond
((zero? v0-13)
(send-event s3-1 'play-speech "agnt092")
)
((= v0-13 1)
(send-event s3-1 'play-speech "agnt093")
)
((= v0-13 2)
(send-event s3-1 'play-speech "agnt094")
)
((= v0-13 3)
(send-event s3-1 'play-speech "agnt095")
)
)
)
((= v1-20 2)
(let ((v0-13 (rand-vu-int-count 4)))
(cond
((zero? v0-13)
(send-event s3-1 'play-speech "agnt092")
)
((= v0-13 1)
(send-event s3-1 'play-speech "agnt093")
)
((= v0-13 2)
(send-event s3-1 'play-speech "agnt094")
)
((= v0-13 3)
(send-event s3-1 'play-speech "agnt095")
)
)
)
((= v1-20 3)
(let ((v0-18 (rand-vu-int-count 3)))
(cond
((zero? v0-18)
(send-event s3-1 'play-speech "agnt100")
)
((= v0-18 1)
(send-event s3-1 'play-speech "agnt101")
)
((= v0-18 2)
(send-event s3-1 'play-speech "agnt102")
)
)
)
((= v1-20 3)
(let ((v0-18 (rand-vu-int-count 3)))
(cond
((zero? v0-18)
(send-event s3-1 'play-speech "agnt100")
)
((= v0-18 1)
(send-event s3-1 'play-speech "agnt101")
)
((= v0-18 2)
(send-event s3-1 'play-speech "agnt102")
)
)
)
((= v1-20 4)
(let ((v0-22 (rand-vu-int-count 3)))
(cond
((zero? v0-22)
(send-event s3-1 'play-speech "agnt115")
)
((= v0-22 1)
(send-event s3-1 'play-speech "agnt121")
)
((= v0-22 2)
(send-event s3-1 'play-speech "agnt122")
)
)
)
((= v1-20 4)
(let ((v0-22 (rand-vu-int-count 3)))
(cond
((zero? v0-22)
(send-event s3-1 'play-speech "agnt115")
)
((= v0-22 1)
(send-event s3-1 'play-speech "agnt121")
)
((= v0-22 2)
(send-event s3-1 'play-speech "agnt122")
)
)
)
((= v1-20 5)
(let ((v0-26 (rand-vu-int-count 3)))
(cond
((zero? v0-26)
(send-event s3-1 'play-speech "agnt119")
)
((= v0-26 1)
(send-event s3-1 'play-speech "agnt120")
)
((= v0-26 2)
(send-event s3-1 'play-speech "agnt125")
)
)
)
((= v1-20 5)
(let ((v0-26 (rand-vu-int-count 3)))
(cond
((zero? v0-26)
(send-event s3-1 'play-speech "agnt119")
)
((= v0-26 1)
(send-event s3-1 'play-speech "agnt120")
)
((= v0-26 2)
(send-event s3-1 'play-speech "agnt125")
)
)
)
((= v1-20 6)
(let ((v0-30 (rand-vu-int-count 5)))
(cond
((zero? v0-30)
(send-event s3-1 'play-speech "agnt131")
)
((= v0-30 1)
(send-event s3-1 'play-speech "agnt132")
)
((= v0-30 2)
(send-event s3-1 'play-speech "agnt133")
)
((= v0-30 3)
(send-event s3-1 'play-speech "agnt126")
)
((= v0-30 4)
(send-event s3-1 'play-speech "agnt127")
)
)
)
((= v1-20 6)
(let ((v0-30 (rand-vu-int-count 5)))
(cond
((zero? v0-30)
(send-event s3-1 'play-speech "agnt131")
)
((= v0-30 1)
(send-event s3-1 'play-speech "agnt132")
)
((= v0-30 2)
(send-event s3-1 'play-speech "agnt133")
)
((= v0-30 3)
(send-event s3-1 'play-speech "agnt126")
)
((= v0-30 4)
(send-event s3-1 'play-speech "agnt127")
)
)
)
((= v1-20 7)
(let ((v0-36 (rand-vu-int-count 2)))
(cond
((zero? v0-36)
(send-event s3-1 'play-speech "agnt135")
)
((= v0-36 1)
(send-event s3-1 'play-speech "agnt130")
)
)
)
((= v1-20 7)
(let ((v0-36 (rand-vu-int-count 2)))
(cond
((zero? v0-36)
(send-event s3-1 'play-speech "agnt135")
)
((= v0-36 1)
(send-event s3-1 'play-speech "agnt130")
)
)
)
)
)
)
(+! (-> arg0 data-int32 10) 1)
)
(+! (-> arg0 data-int32 10) 1)
)
)
(let ((s3-2 (-> arg0 sub-state)))
(cond
((>= s3-2 (the-as uint (-> arg0 count)))
(go (method-of-object arg0 complete))
)
((not (logtest? s3-2 1))
(let ((s2-0 (handle->process (-> arg0 slave s3-2))))
(cond
(s2-0
(let* ((s1-0 (entity-nav-mesh-by-aid (-> (the-as citizen-rebel s2-0) nav-mesh-aid)))
(s4-1 (if (type? s1-0 entity-nav-mesh)
s1-0
)
)
)
(cond
(s4-1
(when (focus-test? (the-as citizen-rebel s2-0) inactive)
(let ((s1-1 (new 'stack 'traffic-object-spawn-params)))
(set! (-> s1-1 object-type) (traffic-type tt5))
(set! (-> s1-1 behavior) (the-as uint 7))
(set! (-> s1-1 id) (the-as uint 0))
(set! (-> s1-1 nav-mesh) #f)
(set! (-> s1-1 nav-branch) #f)
(set! (-> s1-1 proc) #f)
(set! (-> s1-1 handle) (-> arg0 slave s3-2))
(set! (-> s1-1 user-data) (the-as uint 0))
(set! (-> s1-1 flags) (traffic-spawn-flags))
(set! (-> s1-1 guard-type) (the-as uint 7))
(vector-reset! (-> s1-1 velocity))
(set! (-> s1-1 position quad) (-> (the-as citizen-rebel s2-0) root-override2 trans quad))
(quaternion-copy! (-> s1-1 rotation) (-> (the-as citizen-rebel s2-0) root-override2 quat))
(set! (-> s1-1 nav-mesh) (-> s4-1 nav-mesh))
(activate-by-handle *traffic-engine* s1-1)
)
)
(let ((s3-2 (-> arg0 sub-state)))
(cond
((>= s3-2 (the-as uint (-> arg0 count)))
(go (method-of-object arg0 complete))
)
((not (logtest? s3-2 1))
(let ((s2-0 (handle->process (-> arg0 slave s3-2))))
(cond
(s2-0
(let* ((s1-0 (entity-nav-mesh-by-aid (-> (the-as citizen-rebel s2-0) nav-mesh-aid)))
(s4-1 (if (type? s1-0 entity-nav-mesh)
s1-0
)
)
)
(cond
(s4-1
(when (focus-test? (the-as citizen-rebel s2-0) inactive)
(let ((s1-1 (new 'stack 'traffic-object-spawn-params)))
(set! (-> s1-1 object-type) (traffic-type tt5))
(set! (-> s1-1 behavior) (the-as uint 7))
(set! (-> s1-1 id) (the-as uint 0))
(set! (-> s1-1 nav-mesh) #f)
(set! (-> s1-1 nav-branch) #f)
(set! (-> s1-1 proc) #f)
(set! (-> s1-1 handle) (-> arg0 slave s3-2))
(set! (-> s1-1 user-data) (the-as uint 0))
(set! (-> s1-1 flags) (traffic-spawn-flags))
(set! (-> s1-1 guard-type) (the-as uint 7))
(vector-reset! (-> s1-1 velocity))
(set! (-> s1-1 position quad) (-> (the-as citizen-rebel s2-0) root-override2 trans quad))
(quaternion-copy! (-> s1-1 rotation) (-> (the-as citizen-rebel s2-0) root-override2 quat))
(set! (-> s1-1 nav-mesh) (-> s4-1 nav-mesh))
(activate-by-handle *traffic-engine* s1-1)
)
(let ((v1-230 *target*))
(when (and v1-230 (focus-test? v1-230 pilot))
(let ((s4-2 (handle->process (-> v1-230 pilot vehicle))))
(when s4-2
(cond
((and (focus-test? (the-as citizen-rebel s2-0) pilot)
(handle->process (-> (the-as citizen-rebel s2-0) vehicle))
)
(send-event (handle->process (-> arg0 arrow)) 'set-position (-> arg1 (+ s3-2 1) pos))
(+! (-> arg0 sub-state) 1)
(set! (-> arg0 time-limit) (+ (-> arg1 s3-2 time) (-> arg1 (+ s3-2 1) time)))
)
(else
(let ((v1-260 (get-best-seat-for-vehicle
(the-as vehicle s4-2)
(-> (the-as vehicle s4-2) root-override-2 trans)
(the-as int (-> (the-as citizen-rebel s2-0) info seat-flag))
1
)
)
(let ((v1-230 *target*))
(when (and v1-230 (focus-test? v1-230 pilot))
(let ((s4-2 (handle->process (-> v1-230 pilot vehicle))))
(when s4-2
(cond
((and (focus-test? (the-as citizen-rebel s2-0) pilot)
(handle->process (-> (the-as citizen-rebel s2-0) vehicle))
)
(send-event (handle->process (-> arg0 arrow)) 'set-position (-> arg1 (+ s3-2 1) pos))
(+! (-> arg0 sub-state) 1)
(set! (-> arg0 time-limit) (+ (-> arg1 s3-2 time) (-> arg1 (+ s3-2 1) time)))
)
(else
(let ((v1-260 (get-best-seat-for-vehicle
(the-as vehicle s4-2)
(-> (the-as vehicle s4-2) root-override-2 trans)
(the-as int (-> (the-as citizen-rebel s2-0) info seat-flag))
1
)
)
(when (!= v1-260 -1)
(.lvf vf1 (&-> (-> (the-as vehicle s4-2) root-override-2 transv) quad))
(.add.w.vf vf2 vf0 vf0 :mask #b1)
(.mul.vf vf1 vf1 vf1)
(.mul.x.vf acc vf2 vf1 :mask #b1)
(.add.mul.y.vf acc vf2 vf1 acc :mask #b1)
(.add.mul.z.vf vf1 vf2 vf1 acc :mask #b1)
(.mov v1-263 vf1)
(let ((f0-1 v1-263)
(f1-1 32768.0)
)
(if (and (< f0-1 (* f1-1 f1-1)) (let ((f0-2 (vector-vector-distance-squared
(-> (the-as vehicle s4-2) root-override-2 trans)
(-> (the-as citizen-rebel s2-0) root-override2 trans)
)
)
)
(when (!= v1-260 -1)
(.lvf vf1 (&-> (-> (the-as vehicle s4-2) root-override-2 transv) quad))
(.add.w.vf vf2 vf0 vf0 :mask #b1)
(.mul.vf vf1 vf1 vf1)
(.mul.x.vf acc vf2 vf1 :mask #b1)
(.add.mul.y.vf acc vf2 vf1 acc :mask #b1)
(.add.mul.z.vf vf1 vf2 vf1 acc :mask #b1)
(.mov v1-263 vf1)
(let ((f0-1 v1-263)
(f1-1 32768.0)
)
(if (and (< f0-1 (* f1-1 f1-1)) (let ((f0-2 (vector-vector-distance-squared
(-> (the-as vehicle s4-2) root-override-2 trans)
(-> (the-as citizen-rebel s2-0) root-override2 trans)
)
(f1-4 65536.0)
)
(< f0-2 (* f1-4 f1-4))
)
)
(send-event s2-0 'board-vehicle s4-2)
)
)
)
(f1-4 65536.0)
)
(< f0-2 (* f1-4 f1-4))
)
)
(send-event s2-0 'board-vehicle s4-2)
)
)
)
)
@@ -1325,66 +1323,66 @@
)
)
)
(else
(if (not (focus-test? (the-as citizen-rebel s2-0) inactive))
(send-event s2-0 'traffic-off-force)
)
)
)
)
(if (and (-> s2-0 next-state) (= (-> s2-0 next-state name) 'wait-for-ride))
(send-event
(handle->process (-> arg0 arrow))
'set-position
(-> (the-as citizen-rebel s2-0) root-override2 trans)
)
)
)
(else
(when (zero? (-> arg0 data-int32 s3-2))
(send-event (handle->process (-> arg0 arrow)) 'set-position (-> arg1 s3-2 pos))
(set! (-> arg0 time-limit) (-> arg1 s3-2 time))
(set! (-> arg0 start-time) (-> pp clock frame-counter))
(set! (-> arg0 data-int32 s3-2) 1)
)
(let ((s1-2 (find-nearest-nav-mesh (-> arg1 s3-2 pos) (the-as float #x7f800000))))
(when (and s1-2 (nonzero? s1-2))
(let ((s2-1 (new 'stack 'traffic-object-spawn-params)))
(set! (-> s2-1 object-type) (traffic-type tt5))
(set! (-> s2-1 behavior) (the-as uint 7))
(set! (-> s2-1 id) (the-as uint 0))
(set! (-> s2-1 nav-mesh) #f)
(set! (-> s2-1 nav-branch) #f)
(set! (-> s2-1 proc) #f)
(set! (-> s2-1 handle) (the-as handle #f))
(set! (-> s2-1 user-data) (the-as uint 0))
(set! (-> s2-1 flags) (traffic-spawn-flags))
(set! (-> s2-1 guard-type) (the-as uint 7))
(vector-reset! (-> s2-1 velocity))
(set! (-> s2-1 position quad) (-> arg1 s3-2 pos quad))
(let ((s0-0 quaternion-copy!))
(set! sv-336 (-> s2-1 rotation))
(let ((a1-50 (quaternion-vector-angle! (new 'stack-no-clear 'quaternion) *up-vector* 0.0)))
(s0-0 sv-336 a1-50)
)
(else
(if (not (focus-test? (the-as citizen-rebel s2-0) inactive))
(send-event s2-0 'traffic-off-force)
)
(logior! (-> s2-1 flags) (traffic-spawn-flags trsflags-00))
(set! (-> s2-1 id) (the-as uint 122))
(set! (-> s2-1 proc) #f)
(let ((v0-58 (citizen-spawn arg0 citizen-rebel s2-1)))
(cond
(v0-58
(set! (-> (the-as citizen-rebel v0-58) end-pos quad) (-> arg1 (+ s3-2 1) pos quad))
(set! (-> arg0 slave s3-2) (process->handle (the-as citizen-rebel v0-58)))
(logior! (-> (the-as citizen-rebel v0-58) flags) (citizen-flag persistent))
(set! (-> (the-as citizen-rebel v0-58) task-node) arg2)
(set! (-> (the-as citizen-rebel v0-58) nav-mesh-aid) (the-as actor-id (-> s1-2 entity aid)))
(set! (-> (the-as citizen-rebel v0-58) done?) #f)
(set! (-> (the-as citizen-rebel v0-58) index) s3-2)
(send-event *traffic-manager* 'add-object (-> s2-1 object-type) (the-as citizen-rebel v0-58))
)
(else
)
)
)
)
(if (and (-> s2-0 next-state) (= (-> s2-0 next-state name) 'wait-for-ride))
(send-event
(handle->process (-> arg0 arrow))
'set-position
(-> (the-as citizen-rebel s2-0) root-override2 trans)
)
)
)
(else
(when (zero? (-> arg0 data-int32 s3-2))
(send-event (handle->process (-> arg0 arrow)) 'set-position (-> arg1 s3-2 pos))
(set! (-> arg0 time-limit) (-> arg1 s3-2 time))
(set! (-> arg0 start-time) (current-time))
(set! (-> arg0 data-int32 s3-2) 1)
)
(let ((s1-2 (find-nearest-nav-mesh (-> arg1 s3-2 pos) (the-as float #x7f800000))))
(when (and s1-2 (nonzero? s1-2))
(let ((s2-1 (new 'stack 'traffic-object-spawn-params)))
(set! (-> s2-1 object-type) (traffic-type tt5))
(set! (-> s2-1 behavior) (the-as uint 7))
(set! (-> s2-1 id) (the-as uint 0))
(set! (-> s2-1 nav-mesh) #f)
(set! (-> s2-1 nav-branch) #f)
(set! (-> s2-1 proc) #f)
(set! (-> s2-1 handle) (the-as handle #f))
(set! (-> s2-1 user-data) (the-as uint 0))
(set! (-> s2-1 flags) (traffic-spawn-flags))
(set! (-> s2-1 guard-type) (the-as uint 7))
(vector-reset! (-> s2-1 velocity))
(set! (-> s2-1 position quad) (-> arg1 s3-2 pos quad))
(let ((s0-0 quaternion-copy!))
(set! sv-336 (-> s2-1 rotation))
(let ((a1-50 (quaternion-vector-angle! (new 'stack-no-clear 'quaternion) *up-vector* 0.0)))
(s0-0 sv-336 a1-50)
)
)
(logior! (-> s2-1 flags) (traffic-spawn-flags trsflags-00))
(set! (-> s2-1 id) (the-as uint 122))
(set! (-> s2-1 proc) #f)
(let ((v0-58 (citizen-spawn arg0 citizen-rebel s2-1)))
(cond
(v0-58
(set! (-> (the-as citizen-rebel v0-58) end-pos quad) (-> arg1 (+ s3-2 1) pos quad))
(set! (-> arg0 slave s3-2) (process->handle (the-as citizen-rebel v0-58)))
(logior! (-> (the-as citizen-rebel v0-58) flags) (citizen-flag persistent))
(set! (-> (the-as citizen-rebel v0-58) task-node) arg2)
(set! (-> (the-as citizen-rebel v0-58) nav-mesh-aid) (the-as actor-id (-> s1-2 entity aid)))
(set! (-> (the-as citizen-rebel v0-58) done?) #f)
(set! (-> (the-as citizen-rebel v0-58) index) s3-2)
(send-event *traffic-manager* 'add-object (-> s2-1 object-type) (the-as citizen-rebel v0-58))
)
(else
)
)
)
@@ -1394,57 +1392,57 @@
)
)
)
(else
(let ((s4-3 (handle->process (-> arg0 slave (+ s3-2 -1)))))
(if (not s4-3)
(go (method-of-object arg0 fail))
)
(if (or (not *target*) (not (logtest? (focus-status pilot) (-> *target* focus-status))))
(send-event s4-3 'exit-vehicle (-> (the-as process-drawable s4-3) root trans))
)
(when (-> *target* pilot)
(let ((s5-1 (-> arg1 s3-2 pos))
(s2-2 (handle->process (-> *target* pilot vehicle)))
)
(cond
((focus-test? (the-as process-focusable s4-3) pilot)
(if (and s2-2
(let ((f0-3 (vector-vector-distance-squared s5-1 (-> (the-as process-drawable s2-2) root trans)))
(f1-7 65536.0)
)
(< f0-3 (* f1-7 f1-7))
)
(begin
(.lvf vf1 (&-> (-> (the-as process-drawable s2-2) root transv) quad))
(.add.w.vf vf2 vf0 vf0 :mask #b1)
(.mul.vf vf1 vf1 vf1)
(.mul.x.vf acc vf2 vf1 :mask #b1)
(.add.mul.y.vf acc vf2 vf1 acc :mask #b1)
(.add.mul.z.vf vf1 vf2 vf1 acc :mask #b1)
(.mov v1-377 vf1)
(let ((f0-4 v1-377)
(f1-10 12288.0)
)
(< f0-4 (* f1-10 f1-10))
)
(else
(let ((s4-3 (handle->process (-> arg0 slave (+ s3-2 -1)))))
(if (not s4-3)
(go (method-of-object arg0 fail))
)
(if (or (not *target*) (not (logtest? (focus-status pilot) (-> *target* focus-status))))
(send-event s4-3 'exit-vehicle (-> (the-as process-drawable s4-3) root trans))
)
(when (-> *target* pilot)
(let ((s5-1 (-> arg1 s3-2 pos))
(s2-2 (handle->process (-> *target* pilot vehicle)))
)
(cond
((focus-test? (the-as process-focusable s4-3) pilot)
(if (and s2-2
(let ((f0-3 (vector-vector-distance-squared s5-1 (-> (the-as process-drawable s2-2) root trans)))
(f1-7 65536.0)
)
(< f0-3 (* f1-7 f1-7))
)
(begin
(.lvf vf1 (&-> (-> (the-as process-drawable s2-2) root transv) quad))
(.add.w.vf vf2 vf0 vf0 :mask #b1)
(.mul.vf vf1 vf1 vf1)
(.mul.x.vf acc vf2 vf1 :mask #b1)
(.add.mul.y.vf acc vf2 vf1 acc :mask #b1)
(.add.mul.z.vf vf1 vf2 vf1 acc :mask #b1)
(.mov v1-377 vf1)
(let ((f0-4 v1-377)
(f1-10 12288.0)
)
(< f0-4 (* f1-10 f1-10))
)
)
(send-event s4-3 'exit-vehicle s5-1)
)
)
((not (-> (the-as citizen-rebel s4-3) done?))
(set! (-> arg0 data-int32 s3-2) 0)
(+! (-> arg0 sub-state) -1)
)
)
)
(send-event s4-3 'exit-vehicle s5-1)
)
)
((not (-> (the-as citizen-rebel s4-3) done?))
(set! (-> arg0 data-int32 s3-2) 0)
(+! (-> arg0 sub-state) -1)
)
)
)
)
)
)
)
(none)
)
(none)
)
)
@@ -1574,8 +1572,8 @@
(while (zero? (-> self sub-state))
(suspend)
)
(set! (-> self state-time) (-> self clock frame-counter))
(while (< (- (-> self clock frame-counter) (-> self state-time)) (seconds 5))
(set! (-> self state-time) (current-time))
(while (< (- (current-time) (-> self state-time)) (seconds 5))
(suspend)
)
(send-event *traffic-manager* 'set-alert-level 2)
@@ -1597,9 +1595,9 @@
TASK_MANAGER_COMPLETE_HOOK
(lambda :behavior task-manager
()
(set! (-> self state-time) (-> self clock frame-counter))
(set! (-> self state-time) (current-time))
(talker-spawn-func (-> *talker-speech* 97) *entity-pool* (target-pos 0) (the-as region #f))
(let ((gp-1 (-> self clock frame-counter)))
(let ((gp-1 (current-time)))
(until #f
(let ((v1-4 0))
(dotimes (a0-2 4)
@@ -1609,7 +1607,7 @@
)
)
)
(if (or (>= v1-4 4) (>= (- (-> self clock frame-counter) gp-1) (seconds 10)))
(if (or (>= v1-4 4) (>= (- (current-time) gp-1) (seconds 10)))
(goto cfg-23)
)
)
@@ -1750,8 +1748,8 @@
(while (zero? (-> self sub-state))
(suspend)
)
(set! (-> self state-time) (-> self clock frame-counter))
(while (< (- (-> self clock frame-counter) (-> self state-time)) (seconds 5))
(set! (-> self state-time) (current-time))
(while (< (- (current-time) (-> self state-time)) (seconds 5))
(suspend)
)
(send-event *traffic-manager* 'set-alert-level 2)
@@ -1773,7 +1771,7 @@
TASK_MANAGER_COMPLETE_HOOK
(lambda :behavior task-manager
()
(set! (-> self state-time) (-> self clock frame-counter))
(set! (-> self state-time) (current-time))
(until #f
(let ((v1-2 0))
(dotimes (a0-0 4)
File diff suppressed because it is too large Load Diff
+64 -64
View File
@@ -25,7 +25,7 @@
(channel gui-channel :offset-assert 4)
(flags uint8 :offset-assert 5)
(speech uint16 :offset-assert 6)
(text-message uint32 :offset-assert 8)
(text-message text-id :offset-assert 8)
(text-duration uint16 :offset-assert 12)
(delay uint16 :offset-assert 14)
(pos uint16 :offset-assert 16)
@@ -97,7 +97,7 @@
:channel (gui-channel daxter)
:flags #x3
:speech #x3
:text-message #x224
:text-message (text-id tutorial-jump)
:text-duration #x5dc
:neg #x1
:on-close #f
@@ -107,7 +107,7 @@
:channel (gui-channel daxter)
:flags #x3
:speech #x4
:text-message #x226
:text-message (text-id tutorial-double-jump)
:text-duration #x5dc
:neg #x1
:on-close #f
@@ -117,7 +117,7 @@
:channel (gui-channel daxter)
:flags #x3
:speech #x5
:text-message #x227
:text-message (text-id tutorial-basic-attack)
:text-duration #x5dc
:neg #x1
:on-close #f
@@ -135,7 +135,7 @@
:channel (gui-channel daxter)
:flags #x3
:speech #x7
:text-message #x227
:text-message (text-id tutorial-basic-attack)
:text-duration #x5dc
:neg #x1
:on-close #f
@@ -153,7 +153,7 @@
:channel (gui-channel daxter)
:flags #x3
:speech #x9
:text-message #x229
:text-message (text-id tutorial-ground-pound)
:text-duration #x5dc
:neg #x1
:on-close #f
@@ -171,7 +171,7 @@
:channel (gui-channel daxter)
:flags #x3
:speech #xb
:text-message #x225
:text-message (text-id tutorial-roll)
:text-duration #x5dc
:neg #x1
:on-close #f
@@ -181,7 +181,7 @@
:channel (gui-channel daxter)
:flags #x11
:speech #xc
:text-message #x228
:text-message (text-id tutorial-rolljump)
:text-duration #x12c
:neg #x1
:on-close #f
@@ -191,7 +191,7 @@
:channel (gui-channel message)
:flags #x10
:speech #xd
:text-message #x228
:text-message (text-id tutorial-rolljump)
:text-duration #x12c
:neg #x1
:on-close #f
@@ -201,7 +201,7 @@
:channel (gui-channel daxter)
:flags #x11
:speech #xe
:text-message #x22a
:text-message (text-id tutorial-high-jump)
:text-duration #x12c
:neg #x1
:on-close #f
@@ -211,7 +211,7 @@
:channel (gui-channel message)
:flags #x10
:speech #xf
:text-message #x22a
:text-message (text-id tutorial-high-jump)
:text-duration #x12c
:neg #x1
:on-close #f
@@ -375,7 +375,7 @@
:name "cityv069"
:channel (gui-channel alert)
:speech #x24
:text-message #x246
:text-message (text-id tutorial-hover-zones)
:text-duration #x5dc
:neg #x1
:on-close #f
@@ -487,7 +487,7 @@
:channel (gui-channel message)
:flags #x7
:speech #x33
:text-message #x245
:text-message (text-id mission-complete-return-to-krew)
:text-duration #x5dc
:neg #x1
:on-close #f
@@ -514,7 +514,7 @@
:channel (gui-channel message)
:flags #x3
:speech #x36
:text-message #x247
:text-message (text-id tutorial-dive)
:text-duration #x5dc
:neg #x1
:on-close #f
@@ -523,7 +523,7 @@
:name "mess006"
:channel (gui-channel message)
:speech #x37
:text-message #x226
:text-message (text-id tutorial-double-jump)
:text-duration #x5dc
:pos #x8
:neg #x1
@@ -698,7 +698,7 @@
:channel (gui-channel message)
:flags #x3
:speech #x4c
:text-message #x23d
:text-message (text-id board-tutorial-grind)
:text-duration #xbb8
:neg #x1
:on-close #f
@@ -708,7 +708,7 @@
:channel (gui-channel message)
:flags #x3
:speech #x4d
:text-message #x22b
:text-message (text-id gungame-tutorial-fire-button)
:text-duration #x5dc
:neg #x1
:on-close #f
@@ -718,7 +718,7 @@
:channel (gui-channel message)
:flags #x3
:speech #x4e
:text-message #x252
:text-message (text-id tutorial-board-get-on)
:text-duration #x960
:neg #x1
:on-close #f
@@ -728,7 +728,7 @@
:channel (gui-channel message)
:flags #x3
:speech #x4f
:text-message #x253
:text-message (text-id tutorial-dark)
:text-duration #x960
:neg #x1
:on-close #f
@@ -738,7 +738,7 @@
:channel (gui-channel message)
:flags #x3
:speech #x50
:text-message #x226
:text-message (text-id tutorial-double-jump)
:text-duration #x960
:neg #x1
:on-close #f
@@ -757,7 +757,7 @@
:channel (gui-channel voicebox)
:flags #x3
:speech #x52
:text-message #x241
:text-message (text-id board-score-grind-and-trick)
:text-duration #x5dc
:neg #x1
:on-close #f
@@ -832,7 +832,7 @@
:channel (gui-channel daxter)
:flags #x7
:speech #x5b
:text-message #x239
:text-message (text-id board-tutorial-get-on-board)
:text-duration #x5dc
:neg #x1
:on-close #f
@@ -944,7 +944,7 @@
:name "whack01"
:channel (gui-channel message)
:speech #x68
:text-message #x24e
:text-message (text-id tutorial-unknown)
:text-duration #xbb8
:neg #x1
:on-close #f
@@ -1003,7 +1003,7 @@
:name "test001"
:channel (gui-channel message)
:speech #x6f
:text-message #x23d
:text-message (text-id board-tutorial-grind)
:text-duration #x2328
:neg #x1
:on-close #f
@@ -1030,7 +1030,7 @@
:channel (gui-channel message)
:flags #x3
:speech #x72
:text-message #x239
:text-message (text-id board-tutorial-get-on-board)
:text-duration #x960
:neg #x1
:on-close #f
@@ -1039,7 +1039,7 @@
:name "str002"
:channel (gui-channel message)
:speech #x73
:text-message #x239
:text-message (text-id board-tutorial-get-on-board)
:text-duration #x960
:neg #x1
:on-close #f
@@ -1048,7 +1048,7 @@
:name "note001"
:channel (gui-channel notice)
:speech #x74
:text-message #x239
:text-message (text-id board-tutorial-get-on-board)
:text-duration #x960
:neg #x1
:on-close #f
@@ -1066,7 +1066,7 @@
:channel (gui-channel notice)
:flags #x20
:speech #x76
:text-message #x254
:text-message (text-id scea-splash)
:text-duration #x384
:neg #x1
:on-close #f
@@ -1076,7 +1076,7 @@
:channel (gui-channel notice)
:flags #x20
:speech #x77
:text-message #x255
:text-message (text-id scee-splash)
:text-duration #x384
:neg #x1
:on-close #f
@@ -1086,7 +1086,7 @@
:channel (gui-channel notice)
:flags #x20
:speech #x78
:text-message #x257
:text-message (text-id scei-splash)
:text-duration #x384
:neg #x1
:on-close #f
@@ -1096,7 +1096,7 @@
:channel (gui-channel notice)
:flags #x20
:speech #x79
:text-message #x256
:text-message (text-id scek-splash)
:text-duration #x384
:neg #x1
:on-close #f
@@ -1106,7 +1106,7 @@
:channel (gui-channel notice)
:flags #xa0
:speech #x7a
:text-message #x258
:text-message (text-id a-game-by)
:text-duration #x384
:neg #x1
:on-close #f
@@ -1115,7 +1115,7 @@
:name "intro03"
:channel (gui-channel notice-low)
:speech #x7b
:text-message #x30c
:text-message (text-id scene-subtitles-hint)
:text-duration #x5dc
:neg #x1
:on-close #f
@@ -1125,7 +1125,7 @@
:channel (gui-channel notice)
:flags #x20
:speech #x7c
:text-message #x25a
:text-message (text-id two-years-later)
:text-duration #x384
:neg #x1
:on-close #f
@@ -1135,7 +1135,7 @@
:channel (gui-channel alert)
:flags #x40
:speech #x7d
:text-message #x25c
:text-message (text-id gun-upgrade-acquired)
:text-duration #x5dc
:delay #x384
:neg #x1
@@ -1146,7 +1146,7 @@
:channel (gui-channel alert)
:flags #x40
:speech #x7e
:text-message #x261
:text-message (text-id gun-upgrade-speed)
:delay #x384
:neg #x1
:on-close #f
@@ -1156,7 +1156,7 @@
:channel (gui-channel alert)
:flags #x40
:speech #x7f
:text-message #x262
:text-message (text-id gun-upgrade-ammo)
:text-duration #x5dc
:delay #x384
:neg #x1
@@ -1167,7 +1167,7 @@
:channel (gui-channel alert)
:flags #x40
:speech #x80
:text-message #x263
:text-message (text-id gun-upgrade-damage)
:text-duration #x5dc
:delay #x384
:neg #x1
@@ -1178,7 +1178,7 @@
:channel (gui-channel alert)
:flags #x40
:speech #x81
:text-message #x264
:text-message (text-id mission-complete)
:text-duration #x5dc
:delay #x384
:neg #x1
@@ -1189,7 +1189,7 @@
:channel (gui-channel alert)
:flags #x40
:speech #x82
:text-message #x265
:text-message (text-id pass-red-acquired)
:delay #x384
:neg #x1
:on-close #f
@@ -1199,7 +1199,7 @@
:channel (gui-channel alert)
:flags #x40
:speech #x83
:text-message #x266
:text-message (text-id pass-green-acquired)
:text-duration #x5dc
:delay #x384
:neg #x1
@@ -1210,7 +1210,7 @@
:channel (gui-channel alert)
:flags #x40
:speech #x84
:text-message #x267
:text-message (text-id pass-yellow-acquired)
:text-duration #x5dc
:delay #x384
:neg #x1
@@ -1221,7 +1221,7 @@
:channel (gui-channel alert)
:flags #x40
:speech #x85
:text-message #x268
:text-message (text-id pass-palace-acquired)
:text-duration #x5dc
:delay #xbb8
:neg #x1
@@ -1232,7 +1232,7 @@
:channel (gui-channel alert)
:flags #x40
:speech #x86
:text-message #x269
:text-message (text-id pass-black-acquired)
:text-duration #x5dc
:delay #x384
:neg #x1
@@ -1243,7 +1243,7 @@
:channel (gui-channel alert)
:flags #x40
:speech #x87
:text-message #x25d
:text-message (text-id red-gun-acquired)
:text-duration #x5dc
:delay #x384
:neg #x1
@@ -1254,7 +1254,7 @@
:channel (gui-channel alert)
:flags #x40
:speech #x88
:text-message #x25e
:text-message (text-id yellow-gun-acquired)
:text-duration #x5dc
:delay #x384
:neg #x1
@@ -1265,7 +1265,7 @@
:channel (gui-channel alert)
:flags #x40
:speech #x89
:text-message #x25f
:text-message (text-id blue-gun-acquired)
:text-duration #x5dc
:delay #x384
:neg #x1
@@ -1276,7 +1276,7 @@
:channel (gui-channel alert)
:flags #x40
:speech #x8a
:text-message #x260
:text-message (text-id dark-gun-acquired)
:text-duration #x5dc
:delay #x384
:neg #x1
@@ -1525,7 +1525,7 @@
:name "ora006"
:channel (gui-channel alert)
:speech #xaa
:text-message #x26e
:text-message (text-id oracle-gem-grind-200)
:text-duration #x5dc
:delay #x258
:neg #x1
@@ -1535,7 +1535,7 @@
:name "ora007"
:channel (gui-channel alert)
:speech #xab
:text-message #x26e
:text-message (text-id oracle-gem-grind-200)
:text-duration #x5dc
:delay #x258
:neg #x1
@@ -1545,7 +1545,7 @@
:name "ora008"
:channel (gui-channel alert)
:speech #xac
:text-message #x26e
:text-message (text-id oracle-gem-grind-200)
:text-duration #x5dc
:delay #x258
:neg #x1
@@ -1555,7 +1555,7 @@
:name "ora009"
:channel (gui-channel alert)
:speech #xad
:text-message #x26f
:text-message (text-id oracle-gem-grind1-25)
:text-duration #x5dc
:neg #x1
:on-close #f
@@ -1564,7 +1564,7 @@
:name "ora010"
:channel (gui-channel alert)
:speech #xae
:text-message #x270
:text-message (text-id oracle-gem-grind1-200)
:text-duration #x5dc
:neg #x1
:on-close #f
@@ -1573,7 +1573,7 @@
:name "ora015"
:channel (gui-channel alert)
:speech #xaf
:text-message #x271
:text-message (text-id oracle-gem-grind2-200)
:text-duration #x5dc
:neg #x1
:on-close #f
@@ -1582,7 +1582,7 @@
:name "ora016"
:channel (gui-channel alert)
:speech #xb0
:text-message #x272
:text-message (text-id oracle-gem-grind-100)
:text-duration #x5dc
:neg #x1
:on-close #f
@@ -1695,7 +1695,7 @@
:name "palmes01"
:channel (gui-channel message)
:speech #xbe
:text-message #x24d
:text-message (text-id tutorial-grind)
:text-duration #x5dc
:pos #x3
:neg #x1
@@ -1714,7 +1714,7 @@
:channel (gui-channel daxter)
:flags #x2
:speech #xc0
:text-message #x24d
:text-message (text-id tutorial-grind)
:text-duration #x5dc
:neg #x1
:on-close #f
@@ -1723,7 +1723,7 @@
:name "digmes01"
:channel (gui-channel message)
:speech #xc1
:text-message #x24d
:text-message (text-id tutorial-grind)
:text-duration #x5dc
:neg #x1
:on-close #f
@@ -1733,7 +1733,7 @@
:channel (gui-channel daxter)
:flags #x3
:speech #xc2
:text-message #x24c
:text-message (text-id tutorial-ramp)
:text-duration #x5dc
:pos #x3
:neg #x1
@@ -2871,7 +2871,7 @@
:name "racehint"
:channel (gui-channel message)
:speech #x179
:text-message #x248
:text-message (text-id tutorial-turbo-or-jump)
:text-duration #x4b0
:neg #x1
:on-close #f
@@ -3444,7 +3444,7 @@
:name "ds112"
:channel (gui-channel daxter)
:speech #x1c5
:text-message #x249
:text-message (text-id tutorial-mech-punch)
:neg #x1
:on-close #f
)
@@ -3475,7 +3475,7 @@
:name "ruimech1"
:channel (gui-channel message)
:speech #x1c9
:text-message #x249
:text-message (text-id tutorial-mech-punch)
:text-duration #x5dc
:neg #x1
:on-close #f
@@ -3484,7 +3484,7 @@
:name "ruimech2"
:channel (gui-channel message)
:speech #x1ca
:text-message #x24a
:text-message (text-id tutorial-mech-carry)
:text-duration #x5dc
:neg #x1
:on-close #f
@@ -3493,7 +3493,7 @@
:name "ruimech3"
:channel (gui-channel message)
:speech #x1cb
:text-message #x24b
:text-message (text-id tutorial-mech-throw)
:text-duration #x5dc
:neg #x1
:on-close #f
+11 -11
View File
@@ -242,7 +242,7 @@
(set! (-> self region) arg2)
(set! (-> self total-time) 0)
(set! (-> self total-off-time) 0)
(set! (-> self start-time) (-> self clock frame-counter))
(set! (-> self start-time) (current-time))
(set! (-> self voicebox) (the-as handle #f))
(set! (-> self save?) #f)
(if (logtest? (-> self message flags) 96)
@@ -319,7 +319,7 @@
)
)
(let ((s4-1 print-game-text)
(a0-11 (lookup-text! *common-text* (the-as text-id (-> obj message text-message)) #f))
(a0-11 (lookup-text! *common-text* (-> obj message text-message) #f))
(a2-3 #f)
(a3-2 44)
(v1-31 (-> obj message channel))
@@ -343,8 +343,8 @@
(defstate idle (talker)
:virtual #t
:code (behavior ()
(let ((gp-0 (-> self clock frame-counter)))
(until (>= (- (-> self clock frame-counter) gp-0) (the-as time-frame (-> self message delay)))
(let ((gp-0 (current-time)))
(until (>= (- (current-time) gp-0) (the-as time-frame (-> self message delay)))
(suspend)
)
)
@@ -355,7 +355,7 @@
)
)
)
(while (< (- (-> self clock frame-counter) (-> self start-time)) (the-as time-frame (+ (-> self message delay) 300)))
(while (< (- (current-time) (-> self start-time)) (the-as time-frame (+ (-> self message delay) 300)))
(if (and (or (zero? (-> self voice-id)) (= (get-status *gui-control* (-> self voice-id)) (gui-status ready)))
(or (zero? (-> self message-id)) (= (get-status *gui-control* (-> self message-id)) (gui-status active)))
)
@@ -371,7 +371,7 @@
(defstate active (talker)
:virtual #t
:enter (behavior ()
(set! (-> self state-time) (-> self clock frame-counter))
(set! (-> self state-time) (current-time))
(if (logtest? (-> self message flags) 1)
(play-communicator-speech! (-> self message))
)
@@ -471,16 +471,16 @@
)
(set! v1-43 #t)
(label cfg-39)
(and v1-43 (< (- (-> self clock frame-counter) (-> self state-time)) (seconds 120)))
(and v1-43 (< (- (current-time) (-> self state-time)) (seconds 120)))
)
)
(and (nonzero? (-> self message-id))
(= (get-status *gui-control* (-> self message-id)) (gui-status active))
(or (< (- (-> self clock frame-counter) (-> self state-time)) (the-as time-frame (-> self message text-duration)))
(or (< (- (current-time) (-> self state-time)) (the-as time-frame (-> self message text-duration)))
(and (logtest? (-> self message flags) 16) (-> self region) (region-method-9 (-> self region) (target-pos 0)))
)
)
(< (- (-> self clock frame-counter) (-> self state-time)) (seconds 0.05))
(< (- (current-time) (-> self state-time)) (seconds 0.05))
)
(when (and (nonzero? (-> self voice-id)) (not gp-1) (zero? (get-status *gui-control* (-> self voice-id))))
(remove-setting! 'music-volume)
@@ -512,8 +512,8 @@
)
)
(when (and (logtest? (-> self message flags) 8) (not (-> self save?)))
(let ((gp-2 (-> self clock frame-counter)))
(until (>= (- (-> self clock frame-counter) gp-2) (seconds 1))
(let ((gp-2 (current-time)))
(until (>= (- (current-time) gp-2) (seconds 1))
(suspend)
)
)
+3 -2
View File
@@ -77,7 +77,7 @@
)
)
:enter (behavior ()
(set! (-> self state-time) (-> self clock frame-counter))
(set! (-> self state-time) (current-time))
(set! (-> self first-time?) #f)
(if (logtest? (-> self mode) (fma-sphere-mode kill-once))
(send-event *traffic-manager* 'kill-traffic-sphere (-> self sphere))
@@ -92,7 +92,7 @@
)
(init-vf0-vector)
(let ((v1-0 (-> self duration)))
(if (and (nonzero? v1-0) (>= (- (-> self clock frame-counter) (-> self state-time)) v1-0))
(if (and (nonzero? v1-0) (>= (- (current-time) (-> self state-time)) v1-0))
(go empty-state)
)
)
@@ -154,6 +154,7 @@
:code (the-as (function none :behavior fma-sphere) sleep-code)
)
;; WARN: Return type mismatch object vs none.
(defbehavior fma-sphere-init-by-other fma-sphere ((arg0 fma-sphere-mode) (arg1 process-drawable) (arg2 int) (arg3 time-frame) (arg4 vector) (arg5 vector))
(set! (-> self mode) arg0)
(set! (-> self first-time?) #t)
+4 -4
View File
@@ -538,11 +538,11 @@
(defstate joint-exploder-shatter (joint-exploder)
:enter (behavior ()
(set! (-> self state-time) (-> self clock frame-counter))
(set! (-> self state-time) (current-time))
(none)
)
:trans (behavior ()
(let* ((f0-1 (the float (- (-> self clock frame-counter) (-> self state-time))))
(let* ((f0-1 (the float (- (current-time) (-> self state-time))))
(f1-1 (- 1.0 (/ f0-1 (the float (-> self tuning duration)))))
(f0-3 (- 1.0 (/ f0-1 (* 0.75 (the float (-> self tuning duration))))))
)
@@ -590,8 +590,8 @@
(none)
)
:code (behavior ()
(set! (-> self state-time) (-> self clock frame-counter))
(until (>= (- (-> self clock frame-counter) (-> self state-time)) (-> self tuning duration))
(set! (-> self state-time) (current-time))
(until (>= (- (current-time) (-> self state-time)) (-> self tuning duration))
(suspend)
(ja :num! (loop!))
)
+1 -1
View File
@@ -768,7 +768,7 @@
)
(when s2-1
(when (< (vector-vector-distance (-> obj process root trans) (-> s1-0 root trans)) (-> s2-1 cam-notice-dist))
(set! (-> obj notice-time) (-> self clock frame-counter))
(set! (-> obj notice-time) (current-time))
(set! (-> last-try-to-look-at-data who) (process->handle arg2))
(if (< (-> last-try-to-look-at-data vert) (-> s2-1 cam-vert))
(set! (-> last-try-to-look-at-data vert) (-> s2-1 cam-vert))
+108 -92
View File
@@ -35,14 +35,17 @@
(-> obj length)
)
;; WARN: Return type mismatch uint vs int.
(defmethod asize-of joint-anim-matrix ((obj joint-anim-matrix))
(the-as int (+ (-> joint-anim-matrix size) (* (-> obj length) 64)))
)
;; WARN: Return type mismatch uint vs int.
(defmethod asize-of joint-anim-transformq ((obj joint-anim-transformq))
(the-as int (+ (-> joint-anim-transformq size) (* 48 (-> obj length))))
)
;; WARN: Return type mismatch uint vs int.
(defmethod asize-of joint-anim-drawable ((obj joint-anim-drawable))
(the-as int (+ (-> joint-anim-drawable size) (* (-> obj length) 4)))
)
@@ -149,6 +152,7 @@
obj
)
;; WARN: Return type mismatch uint vs int.
(defmethod asize-of joint-control ((obj joint-control))
(the-as int (+ (-> obj type size) (* (-> obj allocated-length) 64)))
)
@@ -264,6 +268,7 @@
#f
)
;; WARN: Return type mismatch symbol vs basic.
(defmethod get-art-by-name-method art ((obj art) (arg0 string) (arg1 type))
(the-as basic #f)
)
@@ -273,6 +278,7 @@
`(the-as ,type (get-art-by-name-method ,obj ,name ,type))
)
;; WARN: Return type mismatch symbol vs int.
(defmethod get-art-idx-by-name-method art ((obj art) (arg0 string) (arg1 type))
(the-as int #f)
)
@@ -334,6 +340,7 @@
obj
)
;; WARN: Return type mismatch uint vs int.
(defmethod asize-of art-joint-anim ((obj art-joint-anim))
(the-as int (+ (-> art size) (* (-> obj length) 4)))
)
@@ -361,6 +368,7 @@
)
)
;; WARN: Return type mismatch art-element vs basic.
(defmethod get-art-by-name-method art-group ((obj art-group) (arg0 string) (arg1 type))
(cond
(arg1
@@ -441,6 +449,7 @@
obj
)
;; WARN: Return type mismatch art-group vs none.
(defmethod relocate art-group ((obj art-group) (arg0 kheap) (arg1 (pointer uint8)))
(let ((s4-0 (clear *temp-string*)))
(string<-charp s4-0 arg1)
@@ -506,6 +515,7 @@
(none)
)
;; WARN: Return type mismatch uint vs int.
(defmethod asize-of art-mesh-geo ((obj art-mesh-geo))
(the-as int (+ (-> art size) (* (-> obj length) 4)))
)
@@ -547,10 +557,12 @@
obj
)
;; WARN: Return type mismatch uint vs int.
(defmethod asize-of art-joint-geo ((obj art-joint-geo))
(the-as int (+ (-> art size) (* (-> obj length) 4)))
)
;; WARN: Return type mismatch joint vs basic.
(defmethod get-art-by-name-method art-joint-geo ((obj art-joint-geo) (arg0 string) (arg1 type))
(cond
(arg1
@@ -612,7 +624,7 @@
(defbehavior joint-control-channel-eval process ((arg0 joint-control-channel))
(let ((f0-3 ((-> arg0 num-func) arg0 (-> arg0 param 0) (-> arg0 param 1) (-> arg0 param 2))))
(set! (-> arg0 eval-time) (the-as uint (-> self clock frame-counter)))
(set! (-> arg0 eval-time) (the-as uint (current-time)))
f0-3
)
)
@@ -620,7 +632,7 @@
(defbehavior joint-control-channel-eval! process ((arg0 joint-control-channel) (arg1 (function joint-control-channel float float float float)))
(set! (-> arg0 num-func) arg1)
(let ((f0-3 (arg1 arg0 (-> arg0 param 0) (-> arg0 param 1) (-> arg0 param 2))))
(set! (-> arg0 eval-time) (the-as uint (-> self clock frame-counter)))
(set! (-> arg0 eval-time) (the-as uint (current-time)))
f0-3
)
)
@@ -629,21 +641,19 @@
(arg1 art-joint-anim)
(arg2 (function joint-control-channel float float float float))
)
(with-pp
(set! (-> arg0 num-func) arg2)
(cond
((= (-> arg0 command) (joint-control-command stack))
)
(else
(if arg1
(set! (-> arg0 frame-group) arg1)
)
(arg2 arg0 (-> arg0 param 0) (-> arg0 param 1) (-> arg0 param 2))
(set! (-> arg0 eval-time) (the-as uint (-> pp clock frame-counter)))
)
(set! (-> arg0 num-func) arg2)
(cond
((= (-> arg0 command) (joint-control-command stack))
)
(else
(if arg1
(set! (-> arg0 frame-group) arg1)
)
(arg2 arg0 (-> arg0 param 0) (-> arg0 param 1) (-> arg0 param 2))
(set! (-> arg0 eval-time) (the-as uint (current-time)))
)
0
)
0
)
(defun joint-control-channel-group! ((arg0 joint-control-channel)
@@ -683,6 +693,8 @@
arg0
)
;; WARN: Return type mismatch symbol vs object.
;; WARN: Using new Jak 2 rtype-of
(defun joint-control-remap! ((arg0 joint-control) (arg1 art-group) (arg2 art-group) (arg3 pair) (arg4 int) (arg5 string))
(local-vars
(sv-16 int)
@@ -762,6 +774,7 @@
(the-as object sv-24)
)
;; ERROR: Failed load: (set! vf2 (l.vf (the-as int a2-1))) at op 46
(defun flatten-joint-control-to-spr ((arg0 joint-control))
(rlet ((vf1 :class vf)
(vf10 :class vf)
@@ -938,12 +951,13 @@
)
)
;; WARN: Return type mismatch object vs matrix.
(defun matrix-from-joint-anim-frame ((arg0 joint-anim-compressed-control) (arg1 int) (arg2 int))
(let ((v1-1 (the-as object (-> arg0 fixed data)))
(v0-0 (the-as object (-> arg0 data arg2 data)))
)
(cond
((zero? (logand (-> arg0 fixed hdr matrix-bits) 1))
((not (logtest? (-> arg0 fixed hdr matrix-bits) 1))
(set! v1-1 (cond
((zero? arg1)
(return (the-as matrix v1-1))
@@ -962,7 +976,7 @@
(set! v0-0 (-> (the-as (inline-array vector) v0-0) 4))
)
)
(if (zero? (logand (-> arg0 fixed hdr matrix-bits) 2))
(if (not (logtest? (-> arg0 fixed hdr matrix-bits) 2))
(return (the-as matrix v1-1))
)
(the-as matrix v0-0)
@@ -982,14 +996,14 @@
(cond
((= (the float (the int f0-1)) f0-1)
(let* ((a2-3 (matrix-from-joint-anim-frame (-> s4-0 frames) s5-0 (the int f30-0)))
(v1-7 (-> a2-3 vector 0 quad))
(a0-3 (-> a2-3 vector 1 quad))
(a1-3 (-> a2-3 vector 2 quad))
(v1-7 (-> a2-3 quad 0))
(a0-3 (-> a2-3 quad 1))
(a1-3 (-> a2-3 quad 2))
(a2-4 (-> a2-3 trans quad))
)
(set! (-> arg0 vector 0 quad) v1-7)
(set! (-> arg0 vector 1 quad) a0-3)
(set! (-> arg0 vector 2 quad) a1-3)
(set! (-> arg0 quad 0) v1-7)
(set! (-> arg0 quad 1) a0-3)
(set! (-> arg0 quad 2) a1-3)
(set! (-> arg0 trans quad) a2-4)
)
arg0
@@ -1029,6 +1043,7 @@
)
)
;; WARN: Return type mismatch (inline-array matrix) vs matrix.
(defun matrix-from-control! ((arg0 matrix-stack) (arg1 joint) (arg2 joint-control) (arg3 symbol))
(set! (-> arg0 top) (the-as matrix (-> arg0 data)))
(dotimes (s2-0 (the-as int (+ (-> arg2 active-channels) (-> arg2 float-channels))))
@@ -1048,14 +1063,14 @@
(set! (-> arg0 top) (the-as matrix (&- (the-as pointer (-> arg0 top)) (the-as uint s1-0))))
(let* ((v1-9 (the-as object (&- (the-as pointer (-> arg0 top)) (the-as uint s1-0))))
(a3-1 (-> arg0 top))
(a0-8 (-> a3-1 vector 0 quad))
(a1-6 (-> a3-1 vector 1 quad))
(a2-2 (-> a3-1 vector 2 quad))
(a0-8 (-> a3-1 quad 0))
(a1-6 (-> a3-1 quad 1))
(a2-2 (-> a3-1 quad 2))
(a3-2 (-> a3-1 trans quad))
)
(set! (-> (the-as matrix v1-9) vector 0 quad) a0-8)
(set! (-> (the-as matrix v1-9) vector 1 quad) a1-6)
(set! (-> (the-as matrix v1-9) vector 2 quad) a2-2)
(set! (-> (the-as matrix v1-9) quad 0) a0-8)
(set! (-> (the-as matrix v1-9) quad 1) a1-6)
(set! (-> (the-as matrix v1-9) quad 2) a2-2)
(set! (-> (the-as matrix v1-9) trans quad) a3-2)
)
)
@@ -1088,11 +1103,10 @@
(the-as matrix (-> arg0 data))
)
(defmethod reset-and-assign-geo! cspace ((obj cspace) (arg0 drawable))
(set! (-> obj parent) #f)
(set! (-> obj joint) #f)
(set! (-> obj geo) (the-as drawable arg0))
(set! (-> obj geo) arg0)
(set! (-> obj param0) #f)
(set! (-> obj param1) #f)
(set! (-> obj param2) #f)
@@ -1111,14 +1125,14 @@
(defun cspace<-cspace! ((arg0 cspace) (arg1 cspace))
(let ((v0-0 (-> arg0 bone transform)))
(let* ((a2-0 (-> arg1 bone transform))
(v1-2 (-> a2-0 vector 0 quad))
(a0-1 (-> a2-0 vector 1 quad))
(a1-1 (-> a2-0 vector 2 quad))
(v1-2 (-> a2-0 quad 0))
(a0-1 (-> a2-0 quad 1))
(a1-1 (-> a2-0 quad 2))
(a2-1 (-> a2-0 trans quad))
)
(set! (-> v0-0 vector 0 quad) v1-2)
(set! (-> v0-0 vector 1 quad) a0-1)
(set! (-> v0-0 vector 2 quad) a1-1)
(set! (-> v0-0 quad 0) v1-2)
(set! (-> v0-0 quad 1) a0-1)
(set! (-> v0-0 quad 2) a1-1)
(set! (-> v0-0 trans quad) a2-1)
)
v0-0
@@ -1128,14 +1142,14 @@
(defun cspace<-cspace-normalized! ((arg0 cspace) (arg1 cspace))
(let ((gp-0 (-> arg0 bone transform)))
(let* ((a2-0 (-> arg1 bone transform))
(v1-2 (-> a2-0 vector 0 quad))
(a0-1 (-> a2-0 vector 1 quad))
(a1-1 (-> a2-0 vector 2 quad))
(v1-2 (-> a2-0 quad 0))
(a0-1 (-> a2-0 quad 1))
(a1-1 (-> a2-0 quad 2))
(a2-1 (-> a2-0 trans quad))
)
(set! (-> gp-0 vector 0 quad) v1-2)
(set! (-> gp-0 vector 1 quad) a0-1)
(set! (-> gp-0 vector 2 quad) a1-1)
(set! (-> gp-0 quad 0) v1-2)
(set! (-> gp-0 quad 1) a0-1)
(set! (-> gp-0 quad 2) a1-1)
(set! (-> gp-0 trans quad) a2-1)
)
(vector-normalize! (the-as vector (-> gp-0 vector)) 1.0)
@@ -1148,14 +1162,14 @@
(defun cspace<-parent-joint! ((arg0 cspace) (arg1 (pointer process-drawable)) (arg2 int))
(let ((v0-0 (-> arg0 bone transform)))
(let* ((a2-1 (-> arg1 0 node-list data arg2 bone transform))
(v1-5 (-> a2-1 vector 0 quad))
(a0-2 (-> a2-1 vector 1 quad))
(a1-1 (-> a2-1 vector 2 quad))
(v1-5 (-> a2-1 quad 0))
(a0-2 (-> a2-1 quad 1))
(a1-1 (-> a2-1 quad 2))
(a2-2 (-> a2-1 trans quad))
)
(set! (-> v0-0 vector 0 quad) v1-5)
(set! (-> v0-0 vector 1 quad) a0-2)
(set! (-> v0-0 vector 2 quad) a1-1)
(set! (-> v0-0 quad 0) v1-5)
(set! (-> v0-0 quad 1) a0-2)
(set! (-> v0-0 quad 2) a1-1)
(set! (-> v0-0 trans quad) a2-2)
)
v0-0
@@ -1206,14 +1220,14 @@
(let ((v1-2 (matrix-from-control! (scratchpad-object matrix-stack :offset 64) (-> arg0 joint) arg1 'no-push))
(v0-1 (-> arg0 bone transform))
)
(let ((a0-4 (-> v1-2 vector 0 quad))
(a1-2 (-> v1-2 vector 1 quad))
(a2-1 (-> v1-2 vector 2 quad))
(let ((a0-4 (-> v1-2 quad 0))
(a1-2 (-> v1-2 quad 1))
(a2-1 (-> v1-2 quad 2))
(v1-3 (-> v1-2 trans quad))
)
(set! (-> v0-1 vector 0 quad) a0-4)
(set! (-> v0-1 vector 1 quad) a1-2)
(set! (-> v0-1 vector 2 quad) a2-1)
(set! (-> v0-1 quad 0) a0-4)
(set! (-> v0-1 quad 1) a1-2)
(set! (-> v0-1 quad 2) a2-1)
(set! (-> v0-1 trans quad) v1-3)
)
v0-1
@@ -1223,14 +1237,14 @@
(defun cspace<-matrix-joint! ((arg0 cspace) (arg1 matrix))
(let ((v0-0 (-> arg0 bone transform)))
(let* ((a2-0 arg1)
(v1-1 (-> a2-0 vector 0 quad))
(a0-1 (-> a2-0 vector 1 quad))
(a1-1 (-> a2-0 vector 2 quad))
(v1-1 (-> a2-0 quad 0))
(a0-1 (-> a2-0 quad 1))
(a1-1 (-> a2-0 quad 2))
(a2-1 (-> a2-0 trans quad))
)
(set! (-> v0-0 vector 0 quad) v1-1)
(set! (-> v0-0 vector 1 quad) a0-1)
(set! (-> v0-0 vector 2 quad) a1-1)
(set! (-> v0-0 quad 0) v1-1)
(set! (-> v0-0 quad 1) a0-1)
(set! (-> v0-0 quad 2) a1-1)
(set! (-> v0-0 trans quad) a2-1)
)
v0-0
@@ -1255,14 +1269,14 @@
(let ((v0-0 (-> arg0 bone transform)))
(let ((v1-1 arg1))
(let ((a0-3 (-> arg0 parent bone transform)))
(.lvf vf10 (&-> v1-1 vector 0 quad))
(.lvf vf14 (&-> a0-3 vector 0 quad))
(.lvf vf15 (&-> a0-3 vector 1 quad))
(.lvf vf16 (&-> a0-3 vector 2 quad))
(.lvf vf10 (&-> v1-1 quad 0))
(.lvf vf14 (&-> a0-3 quad 0))
(.lvf vf15 (&-> a0-3 quad 1))
(.lvf vf16 (&-> a0-3 quad 2))
(.lvf vf17 (&-> a0-3 trans quad))
)
(.lvf vf11 (&-> v1-1 vector 1 quad))
(.lvf vf12 (&-> v1-1 vector 2 quad))
(.lvf vf11 (&-> v1-1 quad 1))
(.lvf vf12 (&-> v1-1 quad 2))
(.lvf vf13 (&-> v1-1 trans quad))
)
(.mul.x.vf acc vf14 vf10)
@@ -1281,9 +1295,9 @@
(.add.mul.y.vf acc vf15 vf13 acc)
(.add.mul.z.vf acc vf16 vf13 acc)
(.add.mul.w.vf vf21 vf17 vf13 acc)
(.svf (&-> v0-0 vector 0 quad) vf18)
(.svf (&-> v0-0 vector 1 quad) vf19)
(.svf (&-> v0-0 vector 2 quad) vf20)
(.svf (&-> v0-0 quad 0) vf18)
(.svf (&-> v0-0 quad 1) vf19)
(.svf (&-> v0-0 quad 2) vf20)
(.svf (&-> v0-0 trans quad) vf21)
v0-0
)
@@ -1324,14 +1338,14 @@
(let ((v0-0 (-> arg0 bone transform)))
(let ((v1-1 arg1))
(let ((a0-3 (-> arg0 parent bone transform)))
(.lvf vf10 (&-> v1-1 vector 0 quad))
(.lvf vf14 (&-> a0-3 vector 0 quad))
(.lvf vf15 (&-> a0-3 vector 1 quad))
(.lvf vf16 (&-> a0-3 vector 2 quad))
(.lvf vf10 (&-> v1-1 quad 0))
(.lvf vf14 (&-> a0-3 quad 0))
(.lvf vf15 (&-> a0-3 quad 1))
(.lvf vf16 (&-> a0-3 quad 2))
(.lvf vf17 (&-> a0-3 trans quad))
)
(.lvf vf11 (&-> v1-1 vector 1 quad))
(.lvf vf12 (&-> v1-1 vector 2 quad))
(.lvf vf11 (&-> v1-1 quad 1))
(.lvf vf12 (&-> v1-1 quad 2))
(.lvf vf13 (&-> v1-1 trans quad))
)
(.sub.vf vf31 vf0 vf0)
@@ -1352,9 +1366,9 @@
(.add.mul.y.vf acc vf15 vf13 acc)
(.add.mul.z.vf acc vf16 vf13 acc)
(.add.mul.w.vf vf21 vf17 vf13 acc)
(.svf (&-> v0-0 vector 0 quad) vf18)
(.svf (&-> v0-0 vector 1 quad) vf19)
(.svf (&-> v0-0 vector 2 quad) vf20)
(.svf (&-> v0-0 quad 0) vf18)
(.svf (&-> v0-0 quad 1) vf19)
(.svf (&-> v0-0 quad 2) vf20)
(.svf (&-> v0-0 trans quad) vf21)
v0-0
)
@@ -1370,9 +1384,9 @@
(init-vf0-vector)
(let ((v1-1 (-> arg0 bone transform)))
(.sub.vf vf31 vf0 vf0)
(.lvf vf30 (&-> v1-1 vector 0 quad))
(.lvf vf30 (&-> v1-1 quad 0))
(.sub.vf vf30 vf31 vf30)
(.svf (&-> v1-1 vector 0 quad) vf30)
(.svf (&-> v1-1 quad 0) vf30)
)
(.mov v1-2 vf30)
0
@@ -1557,14 +1571,14 @@
(when (logtest? a0-8 1)
(let* ((a2-7 (-> arg0 matrices a1-5))
(t2-0 (-> v1-9 matrices a1-5))
(a3-3 (-> t2-0 vector 0 quad))
(t0-0 (-> t2-0 vector 1 quad))
(t1-0 (-> t2-0 vector 2 quad))
(a3-3 (-> t2-0 quad 0))
(t0-0 (-> t2-0 quad 1))
(t1-0 (-> t2-0 quad 2))
(t2-1 (-> t2-0 trans quad))
)
(set! (-> a2-7 vector 0 quad) a3-3)
(set! (-> a2-7 vector 1 quad) t0-0)
(set! (-> a2-7 vector 2 quad) t1-0)
(set! (-> a2-7 quad 0) a3-3)
(set! (-> a2-7 quad 1) t0-0)
(set! (-> a2-7 quad 2) t1-0)
(set! (-> a2-7 trans quad) t2-1)
)
)
@@ -1576,11 +1590,11 @@
(let* ((a3-9 (-> arg0 data a2-9))
(t2-2 (-> v1-9 data a2-9))
(t0-4 (-> t2-2 trans quad))
(t1-1 (-> t2-2 quat vec quad))
(t1-1 (-> t2-2 quat quad))
(t2-3 (-> t2-2 scale quad))
)
(set! (-> a3-9 trans quad) t0-4)
(set! (-> a3-9 quat vec quad) t1-1)
(set! (-> a3-9 quat quad) t1-1)
(set! (-> a3-9 scale quad) t2-3)
)
)
@@ -1596,11 +1610,11 @@
(let* ((a3-15 (-> arg0 data (+ a2-10 62)))
(t2-4 (-> v1-9 data (+ a2-10 62)))
(t0-9 (-> t2-4 trans quad))
(t1-3 (-> t2-4 quat vec quad))
(t1-3 (-> t2-4 quat quad))
(t2-5 (-> t2-4 scale quad))
)
(set! (-> a3-15 trans quad) t0-9)
(set! (-> a3-15 quat vec quad) t1-3)
(set! (-> a3-15 quat quad) t1-3)
(set! (-> a3-15 scale quad) t2-5)
)
)
@@ -1757,7 +1771,7 @@
(set! (-> v1-15 comp-data) (the-as uint (-> s5-0 fixed)))
)
(let ((s4-1 (kmalloc (-> obj kheap) (the-as int s3-0) (kmalloc-flags) "malloc")))
(unpack-comp-lzo (the (pointer uint8) s4-1) (the (pointer uint8) (-> s5-0 fixed)))
(unpack-comp-lzo (the-as (pointer uint8) s4-1) (the-as (pointer uint8) (-> s5-0 fixed)))
(set! (-> s5-0 flags) (logand -2 (-> s5-0 flags)))
(logior! (-> s5-0 flags) 2)
(set! (-> s5-0 fixed) (the-as joint-anim-compressed-fixed s4-1))
@@ -1792,5 +1806,7 @@
)
(kmemopen global "anim-manager")
(define *anim-manager* (new 'global 'art-joint-anim-manager #x30000))
(kmemclose)
+30 -32
View File
@@ -1331,41 +1331,39 @@
(define *cam-collision-record* (new 'debug 'cam-collision-record-array 600))
(defun cam-collision-record-save ((arg0 vector) (arg1 vector) (arg2 int) (arg3 symbol) (arg4 camera-slave))
(with-pp
(when *record-cam-collide-history*
(let ((v1-5 (the-as
cam-collision-record
(+ (+ (* 176 *cam-collision-record-last*) 12) (the-as int *cam-collision-record*))
)
(when *record-cam-collide-history*
(let ((v1-5 (the-as
cam-collision-record
(+ (+ (* 176 *cam-collision-record-last*) 12) (the-as int *cam-collision-record*))
)
)
(set! (-> v1-5 pos quad) (-> arg0 quad))
(set! (-> v1-5 vel quad) (-> arg1 quad))
(set! (-> v1-5 view-flat quad) (-> arg4 view-flat quad))
(set! (-> v1-5 desired-pos quad) (-> arg4 desired-pos quad))
(set! (-> v1-5 cam-tpos-cur quad) (-> *camera* tpos-curr-adj quad))
(set! (-> v1-5 cam-tpos-old quad) (-> *camera* tpos-old-adj quad))
(set! (-> v1-5 string-min-val quad) (-> arg4 string-min-val quad))
(set! (-> v1-5 string-max-val quad) (-> arg4 string-max-val quad))
(set! (-> v1-5 view-off quad) (-> arg4 view-off quad))
(set! (-> v1-5 frame) (the-as int (-> pp clock frame-counter)))
(set! (-> v1-5 iteration) arg2)
(set! (-> v1-5 move-type) arg3)
(set! (-> v1-5 min-z-override) (-> arg4 min-z-override))
(set! (-> v1-5 string-push-z) (-> *camera* string-push-z))
(set! (-> v1-5 view-off-param) (-> arg4 view-off-param))
)
(set! *cam-collision-record-show* *cam-collision-record-last*)
(set! *cam-collision-record-last* (+ *cam-collision-record-last* 1))
(set! *cam-collision-record-last* (mod *cam-collision-record-last* 600))
(when (= *cam-collision-record-last* *cam-collision-record-first*)
(set! *cam-collision-record-first* (+ *cam-collision-record-first* 1))
(set! *cam-collision-record-first* (mod *cam-collision-record-first* 600))
)
)
)
(set! (-> v1-5 pos quad) (-> arg0 quad))
(set! (-> v1-5 vel quad) (-> arg1 quad))
(set! (-> v1-5 view-flat quad) (-> arg4 view-flat quad))
(set! (-> v1-5 desired-pos quad) (-> arg4 desired-pos quad))
(set! (-> v1-5 cam-tpos-cur quad) (-> *camera* tpos-curr-adj quad))
(set! (-> v1-5 cam-tpos-old quad) (-> *camera* tpos-old-adj quad))
(set! (-> v1-5 string-min-val quad) (-> arg4 string-min-val quad))
(set! (-> v1-5 string-max-val quad) (-> arg4 string-max-val quad))
(set! (-> v1-5 view-off quad) (-> arg4 view-off quad))
(set! (-> v1-5 frame) (the-as int (current-time)))
(set! (-> v1-5 iteration) arg2)
(set! (-> v1-5 move-type) arg3)
(set! (-> v1-5 min-z-override) (-> arg4 min-z-override))
(set! (-> v1-5 string-push-z) (-> *camera* string-push-z))
(set! (-> v1-5 view-off-param) (-> arg4 view-off-param))
)
(set! *cam-collision-record-show* *cam-collision-record-last*)
(set! *cam-collision-record-last* (+ *cam-collision-record-last* 1))
(set! *cam-collision-record-last* (mod *cam-collision-record-last* 600))
(when (= *cam-collision-record-last* *cam-collision-record-first*)
(set! *cam-collision-record-first* (+ *cam-collision-record-first* 1))
(set! *cam-collision-record-first* (mod *cam-collision-record-first* 600))
)
0
(none)
)
0
(none)
)
(defun cam-collision-record-step ((arg0 int))
+5 -9
View File
@@ -61,13 +61,11 @@
(set! (-> self string-max target z) (-> self settings string-max-length))
(set! (-> self string-push-z) (fmax (-> self string-min value z) (-> *CAMERA-bank* default-string-push-z)))
(cond
((>= (- (-> self clock frame-counter) (get-notice-time (the-as process-focusable gp-0)))
(-> *CAMERA-bank* attack-timeout)
)
((>= (- (current-time) (get-notice-time (the-as process-focusable gp-0))) (-> *CAMERA-bank* attack-timeout))
(set! (-> self being-attacked) #f)
)
(else
(set! (-> self attack-start) (-> self clock frame-counter))
(set! (-> self attack-start) (current-time))
(set! (-> self being-attacked) #t)
(when (or (!= (-> last-try-to-look-at-data horz) 0.0) (!= (-> last-try-to-look-at-data vert) 0.0))
(set! (-> self string-max target y) (fmax (-> self string-max target y) (-> last-try-to-look-at-data vert)))
@@ -117,14 +115,12 @@
(gp-0
(logior! (-> self master-options) (cam-master-options-u32 HAVE_TARGET))
(cond
((>= (- (-> self clock frame-counter) (get-notice-time (the-as target gp-0)))
(-> *CAMERA-bank* attack-timeout)
)
((>= (- (current-time) (get-notice-time (the-as target gp-0))) (-> *CAMERA-bank* attack-timeout))
(set! (-> self being-attacked) #f)
)
(else
(if (not (-> self being-attacked))
(set! (-> self attack-start) (-> self clock frame-counter))
(set! (-> self attack-start) (current-time))
)
(set! (-> self being-attacked) #t)
(when (or (!= (-> last-try-to-look-at-data horz) 0.0) (!= (-> last-try-to-look-at-data vert) 0.0))
@@ -927,7 +923,7 @@
)
)
((= v1-0 'part-water-drip)
(set! (-> self water-drip-time) (-> self clock frame-counter))
(set! (-> self water-drip-time) (current-time))
(set! (-> self water-drip-mult) (the-as float (-> event param 0)))
(set! (-> self water-drip-speed) (the-as float (-> event param 1)))
)
+8 -10
View File
@@ -522,7 +522,7 @@
(none)
)
:code (behavior ()
(let ((gp-0 (-> self clock frame-counter)))
(let ((gp-0 (current-time)))
(until #f
(when (not (paused?))
(let ((s4-0 (vector-reset! (new-stack-vector0)))
@@ -568,10 +568,10 @@
)
(cond
((and (= (-> s4-0 x) 0.0) (= (-> s4-0 y) 0.0))
(set! gp-0 (-> self clock frame-counter))
(set! gp-0 (current-time))
)
(else
(let ((v1-39 (min 10 (max 1 (- (-> self clock frame-counter) gp-0)))))
(let ((v1-39 (min 10 (max 1 (- (current-time) gp-0)))))
(vector-float*! s4-0 s4-0 (* 0.1 (the float v1-39)))
)
)
@@ -2104,8 +2104,8 @@
)
(set! (-> self los-last-pos quad) (-> self good-point quad))
(when *display-cam-los-debug*
(format 0 "going because u(~f) > 0 frame ~D~%" f30-2 (-> self clock frame-counter))
(format *stdcon* " going because u(~f) > 0 frame ~D~%" f30-2 (-> self clock frame-counter))
(format 0 "going because u(~f) > 0 frame ~D~%" f30-2 (current-time))
(format *stdcon* " going because u(~f) > 0 frame ~D~%" f30-2 (current-time))
)
(logior! (-> self options) (cam-slave-options-u32 GOTO_GOOD_POINT))
)
@@ -2352,9 +2352,7 @@
(if (-> self have-phony-joystick)
(set! f28-0 (* 0.05 (-> self phony-joystick-y)))
)
(if (and (-> *camera* being-attacked)
(< (- (-> self clock frame-counter) (-> *camera* attack-start)) (seconds 0.25))
)
(if (and (-> *camera* being-attacked) (< (- (current-time) (-> *camera* attack-start)) (seconds 0.25)))
(set! f28-0 0.05)
)
(when (logtest? (cam-slave-options-u32 GUN_CAM) (-> self options))
@@ -2598,7 +2596,7 @@
)
(vector-flatten! s5-3 s5-3 (-> *camera* local-down))
)
((< (- (-> self clock frame-counter) (the-as int (-> self butt-timer))) 0)
((< (- (current-time) (the-as int (-> self butt-timer))) 0)
(vector-flatten! s5-3 (-> self butt-vector) (-> *camera* local-down))
)
(else
@@ -2968,7 +2966,7 @@
object
(cond
((= v1-0 'get-behind)
(set! (-> self butt-timer) (the-as uint (+ (-> self clock frame-counter) (seconds 0.25))))
(set! (-> self butt-timer) (the-as uint (+ (current-time) (seconds 0.25))))
(set! (-> self butt-seek) (the-as basic #t))
(set! v0-0 (-> self butt-vector))
(set! (-> (the-as vector v0-0) quad) (-> (the-as vector (-> event param 0)) quad))
+111 -113
View File
@@ -172,124 +172,122 @@
)
(defmethod col-rend-method-9 col-rend ((obj col-rend))
(with-pp
(let ((s5-0 (new 'stack-no-clear 'collide-query)))
(let ((f30-0 (-> obj bbox-radius)))
(let ((v1-0 (-> obj track)))
(cond
((zero? v1-0)
(set! (-> obj bbox-center quad) (-> (target-pos 0) quad))
(+! (-> obj bbox-center y) (* 0.7 f30-0))
)
((= v1-0 1)
(position-in-front-of-camera! (-> obj bbox-center) (+ (-> obj camera-to-bbox-dist) (-> obj bbox-radius)) 0.0)
)
)
)
(set! (-> s5-0 bbox min quad) (-> obj bbox-center quad))
(set! (-> s5-0 bbox min x) (- (-> s5-0 bbox min x) f30-0))
(set! (-> s5-0 bbox min y) (- (-> s5-0 bbox min y) f30-0))
(set! (-> s5-0 bbox min z) (- (-> s5-0 bbox min z) f30-0))
(set! (-> s5-0 bbox max quad) (-> obj bbox-center quad))
(+! (-> s5-0 bbox max x) f30-0)
(+! (-> s5-0 bbox max y) f30-0)
(+! (-> s5-0 bbox max z) f30-0)
)
(let ((v1-9 -1))
(let ((a0-9 (-> obj cspec)))
(if (not (logtest? a0-9 (collide-spec crate)))
(set! v1-9 (logxor v1-9 1))
)
(if (not (logtest? a0-9 (collide-spec civilian)))
(set! v1-9 (logxor v1-9 64))
)
(if (not (logtest? a0-9 (collide-spec enemy)))
(set! v1-9 (logxor #x80000 v1-9))
)
(if (not (logtest? a0-9 (collide-spec obstacle)))
(set! v1-9 (logxor v1-9 2))
)
(if (not (logtest? a0-9 (collide-spec vehicle-sphere)))
(set! v1-9 (logand #x80743 v1-9))
)
)
(set! (-> s5-0 collide-with) (the-as collide-spec v1-9))
)
(set! (-> s5-0 ignore-pat) (new 'static 'pat-surface))
(set! (-> s5-0 ignore-process0) #f)
(set! (-> s5-0 ignore-process1) #f)
(add-debug-box
#t
(bucket-id debug2)
(the-as vector (-> s5-0 bbox))
(-> s5-0 bbox max)
(if (logtest? (-> pp clock frame-counter) 128)
(new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x20)
(new 'static 'rgba :a #x20)
)
)
(fill-using-bounding-box *collide-cache* s5-0)
)
(let ((s5-1 (-> obj show-only))
(a1-17 (new 'stack 'col-rend-filter))
)
(when (nonzero? s5-1)
(let ((s5-0 (new 'stack-no-clear 'collide-query)))
(let ((f30-0 (-> obj bbox-radius)))
(let ((v1-0 (-> obj track)))
(cond
((logtest? s5-1 8)
(set! (-> a1-17 show-pat-clear) (new 'static 'pat-surface :noboard #x1))
((zero? v1-0)
(set! (-> obj bbox-center quad) (-> (target-pos 0) quad))
(+! (-> obj bbox-center y) (* 0.7 f30-0))
)
((logtest? s5-1 16)
(set! (-> a1-17 show-pat-clear) (new 'static 'pat-surface :nogrind #x1))
((= v1-0 1)
(position-in-front-of-camera! (-> obj bbox-center) (+ (-> obj camera-to-bbox-dist) (-> obj bbox-radius)) 0.0)
)
((logtest? s5-1 32)
(set! (-> a1-17 show-pat-clear) (new 'static 'pat-surface :nogrind #x1))
(set! (-> a1-17 show-pat-set) (new 'static 'pat-surface :nojak #x1))
)
(else
(if (logtest? s5-1 8192)
(set! (-> a1-17 show-pat-set) (logior (new 'static 'pat-surface :nolineofsight #x1) (-> a1-17 show-pat-set)))
)
(if (logtest? s5-1 1024)
(set! (-> a1-17 show-pat-set noentity) 1)
)
(if (logtest? s5-1 64)
(set! (-> a1-17 show-pat-set noboard) 1)
)
(if (logtest? s5-1 2048)
(set! (-> a1-17 show-pat-set nogrind) 1)
)
(if (logtest? s5-1 128)
(set! (-> a1-17 show-pat-set nocamera) 1)
)
(if (logtest? s5-1 4096)
(set! (-> a1-17 show-pat-set nojak) 1)
)
(if (logtest? s5-1 256)
(set! (-> a1-17 show-pat-set noedge) 1)
)
(if (logtest? s5-1 #x8000)
(set! (-> a1-17 show-pat-set nopilot) 1)
)
(if (logtest? s5-1 512)
(set! (-> a1-17 show-pat-set) (logior (new 'static 'pat-surface :noendlessfall #x1) (-> a1-17 show-pat-set)))
)
(if (logtest? s5-1 #x4000)
(set! (-> a1-17 show-pat-set) (logior (new 'static 'pat-surface :nomech #x1) (-> a1-17 show-pat-set)))
)
(if (logtest? #x10000 s5-1)
(set! (-> a1-17 show-pat-set) (logior (new 'static 'pat-surface :noproj #x1) (-> a1-17 show-pat-set)))
)
(if (logtest? #x40000 s5-1)
(set! (-> a1-17 show-pat-set) (logior (new 'static 'pat-surface :probe #x1) (-> a1-17 show-pat-set)))
)
(if (logtest? #x20000 s5-1)
(logior! (-> a1-17 event-mask) 64)
)
)
)
)
(col-rend-draw obj a1-17)
(set! (-> s5-0 bbox min quad) (-> obj bbox-center quad))
(set! (-> s5-0 bbox min x) (- (-> s5-0 bbox min x) f30-0))
(set! (-> s5-0 bbox min y) (- (-> s5-0 bbox min y) f30-0))
(set! (-> s5-0 bbox min z) (- (-> s5-0 bbox min z) f30-0))
(set! (-> s5-0 bbox max quad) (-> obj bbox-center quad))
(+! (-> s5-0 bbox max x) f30-0)
(+! (-> s5-0 bbox max y) f30-0)
(+! (-> s5-0 bbox max z) f30-0)
)
(none)
(let ((v1-9 -1))
(let ((a0-9 (-> obj cspec)))
(if (not (logtest? a0-9 (collide-spec crate)))
(set! v1-9 (logxor v1-9 1))
)
(if (not (logtest? a0-9 (collide-spec civilian)))
(set! v1-9 (logxor v1-9 64))
)
(if (not (logtest? a0-9 (collide-spec enemy)))
(set! v1-9 (logxor #x80000 v1-9))
)
(if (not (logtest? a0-9 (collide-spec obstacle)))
(set! v1-9 (logxor v1-9 2))
)
(if (not (logtest? a0-9 (collide-spec vehicle-sphere)))
(set! v1-9 (logand #x80743 v1-9))
)
)
(set! (-> s5-0 collide-with) (the-as collide-spec v1-9))
)
(set! (-> s5-0 ignore-pat) (new 'static 'pat-surface))
(set! (-> s5-0 ignore-process0) #f)
(set! (-> s5-0 ignore-process1) #f)
(add-debug-box
#t
(bucket-id debug2)
(the-as vector (-> s5-0 bbox))
(-> s5-0 bbox max)
(if (logtest? (current-time) 128)
(new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x20)
(new 'static 'rgba :a #x20)
)
)
(fill-using-bounding-box *collide-cache* s5-0)
)
(let ((s5-1 (-> obj show-only))
(a1-17 (new 'stack 'col-rend-filter))
)
(when (nonzero? s5-1)
(cond
((logtest? s5-1 8)
(set! (-> a1-17 show-pat-clear) (new 'static 'pat-surface :noboard #x1))
)
((logtest? s5-1 16)
(set! (-> a1-17 show-pat-clear) (new 'static 'pat-surface :nogrind #x1))
)
((logtest? s5-1 32)
(set! (-> a1-17 show-pat-clear) (new 'static 'pat-surface :nogrind #x1))
(set! (-> a1-17 show-pat-set) (new 'static 'pat-surface :nojak #x1))
)
(else
(if (logtest? s5-1 8192)
(set! (-> a1-17 show-pat-set) (logior (new 'static 'pat-surface :nolineofsight #x1) (-> a1-17 show-pat-set)))
)
(if (logtest? s5-1 1024)
(set! (-> a1-17 show-pat-set noentity) 1)
)
(if (logtest? s5-1 64)
(set! (-> a1-17 show-pat-set noboard) 1)
)
(if (logtest? s5-1 2048)
(set! (-> a1-17 show-pat-set nogrind) 1)
)
(if (logtest? s5-1 128)
(set! (-> a1-17 show-pat-set nocamera) 1)
)
(if (logtest? s5-1 4096)
(set! (-> a1-17 show-pat-set nojak) 1)
)
(if (logtest? s5-1 256)
(set! (-> a1-17 show-pat-set noedge) 1)
)
(if (logtest? s5-1 #x8000)
(set! (-> a1-17 show-pat-set nopilot) 1)
)
(if (logtest? s5-1 512)
(set! (-> a1-17 show-pat-set) (logior (new 'static 'pat-surface :noendlessfall #x1) (-> a1-17 show-pat-set)))
)
(if (logtest? s5-1 #x4000)
(set! (-> a1-17 show-pat-set) (logior (new 'static 'pat-surface :nomech #x1) (-> a1-17 show-pat-set)))
)
(if (logtest? #x10000 s5-1)
(set! (-> a1-17 show-pat-set) (logior (new 'static 'pat-surface :noproj #x1) (-> a1-17 show-pat-set)))
)
(if (logtest? #x40000 s5-1)
(set! (-> a1-17 show-pat-set) (logior (new 'static 'pat-surface :probe #x1) (-> a1-17 show-pat-set)))
)
(if (logtest? #x20000 s5-1)
(logior! (-> a1-17 event-mask) 64)
)
)
)
)
(col-rend-draw obj a1-17)
)
(none)
)
+8 -8
View File
@@ -11,7 +11,7 @@
;; WARN: Return type mismatch time-frame vs none.
(defmethod los-control-method-9 los-control ((obj los-control) (process process-focusable) (trans-vec vector) (radius float))
(when (and (>= (- (-> self clock frame-counter) (-> obj last-check-time)) (-> obj check-interval))
(when (and (>= (- (current-time) (-> obj last-check-time)) (-> obj check-interval))
(-> obj src-proc)
(or process (-> obj dst-proc))
)
@@ -53,13 +53,13 @@
(let ((f30-0 (probe-using-line-sphere *collide-cache* cquery)))
(quad-copy! (the-as pointer (-> obj last-collide-result)) (the-as pointer (-> cquery best-other-tri)) 6)
(if (>= 0.0 f30-0)
(set! (-> obj have-no-los) (-> self clock frame-counter))
(set! (-> obj have-los) (-> self clock frame-counter))
(set! (-> obj have-no-los) (current-time))
(set! (-> obj have-los) (current-time))
)
)
)
)
(set! (-> obj last-check-time) (-> self clock frame-counter))
(set! (-> obj last-check-time) (current-time))
)
)
)
@@ -68,14 +68,14 @@
)
(defmethod check-los? los-control ((obj los-control) (arg0 time-frame))
(and (>= (- (-> self clock frame-counter) (-> obj have-los)) (+ (-> obj check-interval) arg0))
(< (- (-> self clock frame-counter) (-> obj have-no-los)) (-> obj check-interval))
(and (>= (- (current-time) (-> obj have-los)) (+ (-> obj check-interval) arg0))
(< (- (current-time) (-> obj have-no-los)) (-> obj check-interval))
)
)
(defmethod skip-check-los? los-control ((obj los-control) (arg0 int))
(and (>= (- (-> self clock frame-counter) (-> obj have-no-los)) (+ (-> obj check-interval) arg0))
(< (- (-> self clock frame-counter) (-> obj have-los)) (-> obj check-interval))
(and (>= (- (current-time) (-> obj have-no-los)) (+ (-> obj check-interval) arg0))
(< (- (current-time) (-> obj have-los)) (-> obj check-interval))
)
)
@@ -64,7 +64,7 @@ For example for an elevator pre-compute the distance between the first and last
and translate the platform via the `smush`
@see [[smush-control]]"
(activate! (-> obj smush) -1.0 60 150 1.0 1.0 (-> self clock))
(set! (-> obj bounce-time) (-> self clock frame-counter))
(set! (-> obj bounce-time) (current-time))
(set! (-> obj bouncing) #t)
(sound-play "plat-bounce" :position (-> obj root-override trans))
(logclear! (-> obj mask) (process-mask sleep))
@@ -276,7 +276,7 @@ eco-door-event-handler
:virtual #t
:event eco-door-event-handler
:code (behavior ()
(set! (-> self state-time) (-> self clock frame-counter))
(set! (-> self state-time) (current-time))
(process-entity-status! self (entity-perm-status subtask-complete) #t)
(let ((prim (-> self root-override root-prim)))
(set! (-> prim prim-core collide-as) (collide-spec))
@@ -203,7 +203,7 @@
)
:enter (behavior ()
(press! self #t)
(set! (-> self state-time) (-> self clock frame-counter))
(set! (-> self state-time) (current-time))
(none)
)
:trans (behavior ()
@@ -218,7 +218,7 @@
(sleep-code)
)
(else
(until (>= (- (-> self clock frame-counter) (-> self state-time)) (the int (* 300.0 (-> self timeout))))
(until (>= (- (current-time) (-> self state-time)) (the int (* 300.0 (-> self timeout))))
(suspend)
)
(send-event! self (-> self event-going-up))
+112 -133
View File
@@ -126,75 +126,73 @@
)
(defmethod initialize-options collectable ((obj collectable) (arg0 int) (arg1 float) (arg2 fact-info))
(with-pp
(logclear! (-> obj mask) (process-mask crate enemy platform ambient))
(set! (-> obj mask) (logior (process-mask bit18) (-> obj mask)))
(set! (-> obj flags) (collectable-flag pickup no-eco-blue))
(set! (-> obj bob-amount) arg1)
(set! (-> obj bob-offset) (the-as seconds (+ (the-as int (-> obj root-override2 trans x))
(the-as int (-> obj root-override2 trans y))
(the-as int (-> obj root-override2 trans z))
)
)
)
(cond
((or (= (vector-length (-> obj root-override2 transv)) 0.0)
(logtest? (-> obj fact options) (actor-option auto-pickup))
)
(vector-reset! (-> obj root-override2 transv))
)
(else
(logior! (-> obj flags) (collectable-flag bounce))
(logclear! (-> obj flags) (collectable-flag pickup))
(logclear! (-> obj mask) (process-mask actor-pause))
(set! (-> obj bob-amount) 0.0)
(logclear! (-> obj mask) (process-mask crate enemy platform ambient))
(set! (-> obj mask) (logior (process-mask bit18) (-> obj mask)))
(set! (-> obj flags) (collectable-flag pickup no-eco-blue))
(set! (-> obj bob-amount) arg1)
(set! (-> obj bob-offset) (the-as seconds (+ (the-as int (-> obj root-override2 trans x))
(the-as int (-> obj root-override2 trans y))
(the-as int (-> obj root-override2 trans z))
)
)
)
(cond
((or (= (vector-length (-> obj root-override2 transv)) 0.0)
(logtest? (-> obj fact options) (actor-option auto-pickup))
)
(vector-reset! (-> obj root-override2 transv))
)
(else
(logior! (-> obj flags) (collectable-flag bounce))
(logclear! (-> obj flags) (collectable-flag pickup))
(logclear! (-> obj mask) (process-mask actor-pause))
(set! (-> obj bob-amount) 0.0)
)
(when (> arg0 0)
(logior! (-> obj flags) (collectable-flag fadeout))
(set! (-> obj fadeout-timeout) (the-as seconds arg0))
(if (logtest? (actor-option no-distance-check-fadeout) (-> arg2 options))
(logior! (-> obj flags) (collectable-flag no-distance-check-fadeout))
)
)
(set! (-> obj collect-timeout) (the-as seconds 99))
(set! (-> obj birth-time) (-> pp clock frame-counter))
(set! (-> obj base quad) (-> obj root-override2 trans quad))
(set! (-> obj old-base quad) (-> obj root-override2 trans quad))
(set! (-> obj pickup-handle) (the-as handle #f))
(case (-> obj fact pickup-type)
(((pickup-type eco-pill-green)
(pickup-type eco-pill-dark)
(pickup-type eco-green)
(pickup-type money)
(pickup-type gem)
(pickup-type skill)
(pickup-type eco-blue)
(pickup-type health)
(pickup-type trick-point)
)
(logclear! (-> obj flags) (collectable-flag no-eco-blue))
)
)
(if (logtest? (-> obj fact options) (actor-option big-collision))
(set! (-> obj root-override2 root-prim local-sphere w)
(* 2.5 (-> obj root-override2 root-prim local-sphere w))
)
)
(when (and arg2 (nonzero? (-> obj draw)))
(let* ((s5-0 (-> arg2 process))
(v1-56 (if (type? s5-0 process-drawable)
s5-0
)
)
)
(if v1-56
(set! (-> obj draw light-index) (-> (the-as process-drawable v1-56) draw light-index))
)
)
)
obj
)
(when (> arg0 0)
(logior! (-> obj flags) (collectable-flag fadeout))
(set! (-> obj fadeout-timeout) (the-as seconds arg0))
(if (logtest? (actor-option no-distance-check-fadeout) (-> arg2 options))
(logior! (-> obj flags) (collectable-flag no-distance-check-fadeout))
)
)
(set! (-> obj collect-timeout) (the-as seconds 99))
(set! (-> obj birth-time) (current-time))
(set! (-> obj base quad) (-> obj root-override2 trans quad))
(set! (-> obj old-base quad) (-> obj root-override2 trans quad))
(set! (-> obj pickup-handle) (the-as handle #f))
(case (-> obj fact pickup-type)
(((pickup-type eco-pill-green)
(pickup-type eco-pill-dark)
(pickup-type eco-green)
(pickup-type money)
(pickup-type gem)
(pickup-type skill)
(pickup-type eco-blue)
(pickup-type health)
(pickup-type trick-point)
)
(logclear! (-> obj flags) (collectable-flag no-eco-blue))
)
)
(if (logtest? (-> obj fact options) (actor-option big-collision))
(set! (-> obj root-override2 root-prim local-sphere w)
(* 2.5 (-> obj root-override2 root-prim local-sphere w))
)
)
(when (and arg2 (nonzero? (-> obj draw)))
(let* ((s5-0 (-> arg2 process))
(v1-56 (if (type? s5-0 process-drawable)
s5-0
)
)
)
(if v1-56
(set! (-> obj draw light-index) (-> (the-as process-drawable v1-56) draw light-index))
)
)
)
obj
)
(defmethod initialize-allocations collectable ((obj collectable))
@@ -488,26 +486,24 @@
(a3-12 0)
(t0-9
(lambda ((arg0 part-tracker))
(with-pp
(let ((v1-1 (handle->process (-> arg0 userdata))))
(when (the-as process v1-1)
(let* ((s5-0 (handle->process (-> (the-as collectable v1-1) pickup-handle)))
(a0-9 (if (type? s5-0 process-focusable)
s5-0
)
)
(a2-0 (if (not a0-9)
(-> arg0 root trans)
(get-trans (the-as process-focusable a0-9) 3)
)
)
)
(vector-lerp!
(-> arg0 root trans)
(-> arg0 offset)
a2-0
(/ (the float (- (-> pp clock frame-counter) (-> arg0 start-time))) (the float (-> arg0 part group duration)))
)
(let ((v1-1 (handle->process (-> arg0 userdata))))
(when (the-as process v1-1)
(let* ((s5-0 (handle->process (-> (the-as collectable v1-1) pickup-handle)))
(a0-9 (if (type? s5-0 process-focusable)
s5-0
)
)
(a2-0 (if (not a0-9)
(-> arg0 root trans)
(get-trans (the-as process-focusable a0-9) 3)
)
)
)
(vector-lerp!
(-> arg0 root trans)
(-> arg0 offset)
a2-0
(/ (the float (- (current-time) (-> arg0 start-time))) (the float (-> arg0 part group duration)))
)
)
)
@@ -615,13 +611,13 @@
)
(logior! (-> self flags) (collectable-flag suck-in))
(when (= (-> self speed w) 0.0)
(set! (-> self suck-time) (-> self clock frame-counter))
(set! (-> self suck-time) (current-time))
(set! (-> self speed x) (rand-vu-float-range 327680.0 819200.0))
)
(+! (-> self speed w) (* (lerp-scale
40960.0
(-> self speed x)
(the float (- (-> self clock frame-counter) (the-as int (-> self suck-time))))
(the float (- (current-time) (the-as int (-> self suck-time))))
45.0
60.0
)
@@ -639,9 +635,7 @@
(vector-rotate-y! s5-2 s5-2 (* (-> self speed y) (-> self speed z) (-> self clock seconds-per-frame)))
)
(set! (-> self suck-y-offset)
(* 2048.0
(sin (* 873.81335 (the float (mod (- (-> self clock frame-counter) (the-as int (-> self suck-time))) 75))))
)
(* 2048.0 (sin (* 873.81335 (the float (mod (- (current-time) (the-as int (-> self suck-time))) 75)))))
)
(vector+! (-> self base) gp-1 s5-2)
)
@@ -679,9 +673,7 @@
(local-vars (v0-4 none))
(when (and (or (= arg2 'touch) (= arg2 'attack))
(and (logtest? (-> self flags) (collectable-flag pickup))
(>= (- (-> self clock frame-counter) (the-as int (-> self birth-time)))
(the-as time-frame (-> self collect-timeout))
)
(>= (- (current-time) (the-as int (-> self birth-time))) (the-as time-frame (-> self collect-timeout)))
(not (and (-> self next-state) (= (-> self next-state name) 'pickup)))
(send-event arg0 'get-pickup (-> self fact pickup-type) (-> self fact pickup-amount))
)
@@ -748,7 +740,7 @@
((= arg2 'fade)
(logior! (-> self flags) (collectable-flag fadeout))
(set! (-> self fadeout-timeout) (the-as seconds 30))
(set! v0-4 (the-as none (-> self clock frame-counter)))
(set! v0-4 (the-as none (current-time)))
(set! (-> self birth-time) (the-as time-frame v0-4))
v0-4
)
@@ -841,9 +833,9 @@
(let ((gp-0 (new 'stack 'trajectory)))
(set! (-> self base y) (-> self jump-pos y))
(setup-from-to-duration! gp-0 (-> self root-override2 trans) (-> self jump-pos) 300.0 -2.2755556)
(set! (-> self state-time) (-> self clock frame-counter))
(until (>= (- (-> self clock frame-counter) (-> self state-time)) (seconds 1))
(let ((f0-2 (the float (- (-> self clock frame-counter) (-> self state-time)))))
(set! (-> self state-time) (current-time))
(until (>= (- (current-time) (-> self state-time)) (seconds 1))
(let ((f0-2 (the float (- (current-time) (-> self state-time)))))
(compute-trans-at-time gp-0 f0-2 (-> self root-override2 trans))
)
(transform-post)
@@ -872,7 +864,7 @@
:virtual #t
:event collectable-standard-event-handler
:enter (behavior ()
(set! (-> self state-time) (-> self clock frame-counter))
(set! (-> self state-time) (current-time))
(case (-> self pickup-type)
(((pickup-type gem))
(sound-play "gem-spawn")
@@ -987,9 +979,7 @@
(go-virtual suck (process->handle proc))
)
(logtest? (-> self flags) (collectable-flag pickup))
(>= (- (-> self clock frame-counter) (the-as int (-> self birth-time)))
(the-as time-frame (-> self collect-timeout))
)
(>= (- (current-time) (the-as int (-> self birth-time))) (the-as time-frame (-> self collect-timeout)))
)
)
(logclear! (-> self mask) (process-mask actor-pause))
@@ -1017,11 +1007,9 @@
(if (and (logtest? (-> self flags) (collectable-flag fadeout))
(begin
(if (movie?)
(set! (-> self birth-time) (-> self clock frame-counter))
)
(>= (- (-> self clock frame-counter) (the-as int (-> self birth-time)))
(the-as time-frame (-> self fadeout-timeout))
(set! (-> self birth-time) (current-time))
)
(>= (- (current-time) (the-as int (-> self birth-time))) (the-as time-frame (-> self fadeout-timeout)))
)
(or (or (not *target*)
(or (< 204800.0 (vector-vector-distance (-> self root-override2 trans) (-> *target* control trans)))
@@ -1049,9 +1037,9 @@
(set! (-> self actor-pause) #f)
(logior! (-> self flags) (collectable-flag do-fadeout))
(logior! (-> self state-flags) (state-flags sf0))
(let ((gp-0 (-> self clock frame-counter)))
(let ((gp-0 (current-time)))
(until #f
(let ((f0-1 (- 300.0 (the float (- (-> self clock frame-counter) gp-0)))))
(let ((f0-1 (- 300.0 (the float (- (current-time) gp-0)))))
(cond
((< f0-1 0.0)
(process-entity-status! self (entity-perm-status dead) #t)
@@ -1083,9 +1071,7 @@
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
(when (and (or (= event-type 'touch) (= event-type 'attack))
(and (logtest? (-> self flags) (collectable-flag pickup))
(>= (- (-> self clock frame-counter) (the-as int (-> self birth-time)))
(the-as time-frame (-> self collect-timeout))
)
(>= (- (current-time) (the-as int (-> self birth-time))) (the-as time-frame (-> self collect-timeout)))
(not (and (-> self next-state) (= (-> self next-state name) 'pickup)))
(send-event proc 'get-pickup (-> self fact pickup-type) (-> self fact pickup-amount))
)
@@ -1254,8 +1240,8 @@
)
(cond
((nonzero? (-> self respan-delay))
(let ((gp-0 (-> self clock frame-counter)))
(while (< (- (-> self clock frame-counter) gp-0) (the-as time-frame (-> self respan-delay)))
(let ((gp-0 (current-time)))
(while (< (- (current-time) gp-0) (the-as time-frame (-> self respan-delay)))
(suspend)
)
)
@@ -1539,10 +1525,7 @@ This commonly includes things such as:
(sin
(* 109.22667
(the float
(mod
(+ (- (-> pp clock frame-counter) (the-as int (-> obj birth-time))) (the-as time-frame (-> obj bob-offset)))
600
)
(mod (+ (- (current-time) (the-as int (-> obj birth-time))) (the-as time-frame (-> obj bob-offset))) 600)
)
)
)
@@ -1574,15 +1557,13 @@ This commonly includes things such as:
(+ (-> self base y)
(-> self suck-y-offset)
(* f30-0
(sin (* 109.22667 (the float (mod
(+ (- (-> self clock frame-counter) (the-as int (-> self birth-time)))
(the-as time-frame (-> self bob-offset))
)
600
)
)
)
(sin
(* 109.22667
(the float
(mod (+ (- (current-time) (the-as int (-> self birth-time))) (the-as time-frame (-> self bob-offset))) 600)
)
)
)
)
)
)
@@ -1885,12 +1866,12 @@ This commonly includes things such as:
)
)
(if (or (and (logtest? s5-2 (collide-status on-surface)) (< (vector-length (-> gp-1 transv)) 1228.8))
(>= (- (-> self clock frame-counter) (-> self state-time)) (seconds 10))
(>= (- (current-time) (-> self state-time)) (seconds 10))
)
(go-virtual wait)
)
(when (>= (- (-> self clock frame-counter) (the-as int (-> self bounce-time))) (seconds 0.1))
(set! (-> self bounce-time) (-> self clock frame-counter))
(when (>= (- (current-time) (the-as int (-> self bounce-time))) (seconds 0.1))
(set! (-> self bounce-time) (current-time))
(sound-play-by-name
(static-sound-name "gem-bounce")
(new-sound-id)
@@ -1902,7 +1883,7 @@ This commonly includes things such as:
)
)
)
((>= (- (-> self clock frame-counter) (-> self state-time)) (seconds 15))
((>= (- (current-time) (-> self state-time)) (seconds 15))
(go-virtual wait)
)
)
@@ -1998,11 +1979,9 @@ This commonly includes things such as:
(if (and (logtest? (-> self flags) (collectable-flag fadeout))
(begin
(if (movie?)
(set! (-> self birth-time) (-> self clock frame-counter))
)
(>= (- (-> self clock frame-counter) (the-as int (-> self birth-time)))
(the-as time-frame (-> self fadeout-timeout))
(set! (-> self birth-time) (current-time))
)
(>= (- (current-time) (the-as int (-> self birth-time))) (the-as time-frame (-> self fadeout-timeout)))
)
)
(go-virtual fade)
+6 -6
View File
@@ -919,8 +919,8 @@
)
)
(when (not arg0)
(let ((s5-1 (-> self clock frame-counter)))
(until (>= (- (-> self clock frame-counter) s5-1) (seconds 0.04))
(let ((s5-1 (current-time)))
(until (>= (- (current-time) s5-1) (seconds 0.04))
(suspend)
)
)
@@ -1077,14 +1077,14 @@
(drop-pickup (-> self fact) #t *entity-pool* (the-as fact-info #f) arg1)
(process-entity-status! self (entity-perm-status dead) #t)
(process-entity-status! self (entity-perm-status subtask-complete) #t)
(let ((gp-1 (-> self clock frame-counter)))
(until (>= (- (-> self clock frame-counter) gp-1) (seconds 5))
(let ((gp-1 (current-time)))
(until (>= (- (current-time) gp-1) (seconds 5))
(suspend)
)
)
(when (logtest? (actor-option cond-respawn) (-> self fact options))
(let ((gp-2 (-> self clock frame-counter)))
(until (>= (- (-> self clock frame-counter) gp-2) (seconds 15))
(let ((gp-2 (current-time)))
(until (>= (- (current-time) gp-2) (seconds 15))
(suspend)
)
)
@@ -299,7 +299,7 @@
)
)
(let* ((gp-0 (-> self draw ripple))
(f0-1 (the float (logand (-> self clock frame-counter) #xffff)))
(f0-1 (the float (logand (current-time) #xffff)))
(f0-6 (cos (the float (sar (shl (the int (* 5.0 f0-1)) 48) 48))))
(f0-7 (* f0-6 f0-6))
(f0-9 (fmax -1.0 (fmin 1.0 f0-7)))
+9 -9
View File
@@ -294,7 +294,7 @@ which is obviously useful for an elevator."
((= evt-type 'ridden)
(let ((proc-focus (handle->process (-> (the-as focus (-> event param 0)) handle))))
(if (= (-> proc-focus type) target)
(set! (-> self sticky-player-last-ride-time) (-> self clock frame-counter))
(set! (-> self sticky-player-last-ride-time) (current-time))
)
)
#t
@@ -394,7 +394,7 @@ which is obviously useful for an elevator."
(+ (-> self move-pos 0) (* (-> self path-pos) (- (-> self move-pos 1) (-> self move-pos 0))))
)
(('player-standing-on?)
(= (-> self sticky-player-last-ride-time) (-> self clock frame-counter))
(= (-> self sticky-player-last-ride-time) (current-time))
)
(('point-inside-shaft?)
(move-between-points self (the-as vector (-> event param 1)) (-> self bottom-top 1) (-> self bottom-top 0))
@@ -558,7 +558,7 @@ do so.
)
)
:enter (behavior ()
(set! (-> self ride-timer) (-> self clock frame-counter))
(set! (-> self ride-timer) (current-time))
(logclear! (-> self elevator-status) (elevator-status waiting-to-descend moving))
(logior! (-> self mask) (process-mask actor-pause))
(if (nonzero? (-> self sound))
@@ -569,7 +569,7 @@ do so.
:trans (behavior ()
(plat-trans)
(when (not (logtest? (-> self elevator-status) (elevator-status waiting-to-descend)))
(set! (-> self ride-timer) (-> self clock frame-counter))
(set! (-> self ride-timer) (current-time))
(-> self params)
(if (and (logtest? (-> self params flags) (elevator-flags elevator-flags-0))
(not (logtest? (-> self params flags) (elevator-flags elevator-flags-3)))
@@ -578,7 +578,7 @@ do so.
)
)
(when (and (not (logtest? (-> self params flags) (elevator-flags elevator-flags-3)))
(>= (- (-> self clock frame-counter) (-> self ride-timer)) (seconds 1))
(>= (- (current-time) (-> self ride-timer)) (seconds 1))
)
(set! (-> self move-pos 0) (-> self move-pos 1))
(set! (-> self move-pos 1) (-> self path-seq data (the int (-> self move-pos 1)) next-pos))
@@ -711,7 +711,7 @@ do so.
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
(case event-type
(('ridden)
(set! (-> self ride-timer) (-> self clock frame-counter))
(set! (-> self ride-timer) (current-time))
(elevator-event proc arg1 event-type event)
)
(else
@@ -720,7 +720,7 @@ do so.
)
)
:enter (behavior ()
(set! (-> self ride-timer) (-> self clock frame-counter))
(set! (-> self ride-timer) (current-time))
(if (not (-> *setting-control* user-current jump))
(remove-setting! 'jump)
)
@@ -736,10 +736,10 @@ do so.
(begin *target* *target*)
(focus-test? *target* in-air)
)
(set! (-> self ride-timer) (-> self clock frame-counter))
(set! (-> self ride-timer) (current-time))
)
(when (or (logtest? (-> self elevator-status) (elevator-status moving))
(>= (- (-> self clock frame-counter) (-> self ride-timer)) (seconds 0.5))
(>= (- (current-time) (-> self ride-timer)) (seconds 0.5))
)
(cond
((and (logtest? (-> self params flags) (elevator-flags elevator-flags-1))
+49 -52
View File
@@ -233,8 +233,8 @@
(move-along-path self)
(suspend)
)
(let ((gp-1 (-> self clock frame-counter)))
(until (>= (- (-> self clock frame-counter) gp-1) (seconds 0.5))
(let ((gp-1 (current-time)))
(until (>= (- (current-time) gp-1) (seconds 0.5))
(move-along-path self)
(suspend)
)
@@ -1083,9 +1083,9 @@ This commonly includes things such as:
)
)
:code (behavior ()
(set! (-> self start-time) (-> self clock frame-counter))
(set! (-> self start-time) (current-time))
(while (or (zero? (-> self duration))
(< (- (-> self clock frame-counter) (-> self start-time)) (the-as time-frame (-> self duration)))
(< (- (current-time) (-> self start-time)) (the-as time-frame (-> self duration)))
)
(if (-> self callback)
((-> self callback) self)
@@ -1114,8 +1114,8 @@ This commonly includes things such as:
)
(suspend)
)
(let ((gp-1 (-> self clock frame-counter)))
(until (>= (- (-> self clock frame-counter) gp-1) (the-as time-frame (-> self linger-duration)))
(let ((gp-1 (current-time)))
(until (>= (- (current-time) gp-1) (the-as time-frame (-> self linger-duration)))
(if (-> self linger-callback)
((-> self linger-callback) self)
)
@@ -1236,20 +1236,18 @@ This commonly includes things such as:
)
(defun part-tracker-move-to-target ((arg0 part-tracker))
(with-pp
(let* ((a0-1 *target*)
(a2-0 (if (not a0-1)
(-> arg0 root trans)
(get-trans a0-1 3)
)
)
)
(vector-lerp!
(-> arg0 root trans)
(-> arg0 offset)
a2-0
(* 0.006666667 (the float (- (-> pp clock frame-counter) (-> arg0 start-time))))
)
(let* ((a0-1 *target*)
(a2-0 (if (not a0-1)
(-> arg0 root trans)
(get-trans a0-1 3)
)
)
)
(vector-lerp!
(-> arg0 root trans)
(-> arg0 offset)
a2-0
(* 0.006666667 (the float (- (current-time) (-> arg0 start-time))))
)
)
)
@@ -1421,7 +1419,7 @@ This commonly includes things such as:
:code (behavior ()
(set! (-> self sound) (the-as uint 0))
(when (!= (+ (-> self lightning spec delay) (-> self lightning spec delay-rand)) 0.0)
(let ((gp-0 (-> self clock frame-counter))
(let ((gp-0 (current-time))
(s5-0 (the int (rand-vu-float-range
(-> self lightning spec delay)
(+ (-> self lightning spec delay) (-> self lightning spec delay-rand))
@@ -1429,7 +1427,7 @@ This commonly includes things such as:
)
)
)
(while (< (- (-> self clock frame-counter) gp-0) s5-0)
(while (< (- (current-time) gp-0) s5-0)
(suspend)
)
)
@@ -1478,9 +1476,9 @@ This commonly includes things such as:
)
(set! (-> v1-33 state mode) (the-as lightning-mode a0-10))
)
(set! (-> self start-time) (-> self clock frame-counter))
(set! (-> self start-time) (current-time))
(while (or (zero? (-> self duration))
(< (- (-> self clock frame-counter) (-> self start-time)) (the-as time-frame (-> self duration)))
(< (- (current-time) (-> self start-time)) (the-as time-frame (-> self duration)))
)
(update self)
(suspend)
@@ -1505,8 +1503,8 @@ This commonly includes things such as:
)
(set! (-> v1-47 state mode) (the-as lightning-mode a0-14))
)
(set! (-> self start-time) (-> self clock frame-counter))
(while (< (- (-> self clock frame-counter) (-> self start-time)) (the int f30-0))
(set! (-> self start-time) (current-time))
(while (< (- (current-time) (-> self start-time)) (the int f30-0))
(suspend)
)
)
@@ -2227,12 +2225,12 @@ This commonly includes things such as:
(none)
)
:code (behavior ()
(let ((gp-0 (-> self clock frame-counter)))
(let ((gp-0 (current-time)))
(until #f
(when (not (paused?))
(vector--float*! (-> self trans) (-> *camera* tpos-curr) (-> *camera* local-down) 28672.0)
(send-event *camera* 'teleport)
(if (and (-> *camera* on-ground) (>= (- (-> self clock frame-counter) gp-0) (seconds 1)))
(if (and (-> *camera* on-ground) (>= (- (current-time) gp-0) (seconds 1)))
(send-event *camera* 'change-state cam-string (seconds 0.5))
)
)
@@ -2291,7 +2289,7 @@ This commonly includes things such as:
(none)
)
:code (behavior ()
(let ((gp-0 (-> self clock frame-counter)))
(let ((gp-0 (current-time)))
(until #f
(when (not (paused?))
(let ((s4-0 (new 'stack-no-clear 'vector))
@@ -2333,7 +2331,7 @@ This commonly includes things such as:
(set! (-> self trans x) (-> *camera* tpos-curr x))
(set! (-> self trans z) (-> *camera* tpos-curr z))
(vector+! (-> self trans) (-> self trans) (-> self view-flat))
(if (and (-> *camera* on-ground) (>= (- (-> self clock frame-counter) gp-0) (seconds 1)))
(if (and (-> *camera* on-ground) (>= (- (current-time) gp-0) (seconds 1)))
(send-event *camera* 'change-state cam-string (seconds 0.5))
)
)
@@ -2406,7 +2404,7 @@ This commonly includes things such as:
:virtual #t
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
(when (or (= event-type 'touch) (= event-type 'attack))
(set! (-> self state-time) (-> self clock frame-counter))
(set! (-> self state-time) (current-time))
(send-event proc 'launch (-> self spring-height) (-> self camera) (-> self dest) (-> self seek-time))
)
(the-as object (cond
@@ -2451,7 +2449,7 @@ This commonly includes things such as:
(not (logtest? (focus-status teleporting) (-> *target* focus-status)))
)
)
(< (- (-> self clock frame-counter) (-> self state-time)) (seconds 0.5))
(< (- (current-time) (-> self state-time)) (seconds 0.5))
)
(send-event *target* 'launch (-> self spring-height) (-> self camera) (-> self dest) (-> self seek-time))
)
@@ -2680,7 +2678,7 @@ This commonly includes things such as:
)
)
:code (behavior ()
(set! (-> self state-time) (-> self clock frame-counter))
(set! (-> self state-time) (current-time))
(while ((-> self run-function))
(let* ((gp-0 (handle->process (-> self target)))
(a0-4 (if (type? gp-0 process-drawable)
@@ -2736,17 +2734,18 @@ This commonly includes things such as:
)
(let ((v1-6 (new 'process 'collide-shape-prim-sphere s4-0 (the-as uint 0))))
(set! (-> v1-6 prim-core collide-as) (collide-spec jak enemy))
(set! (-> v1-6 prim-core collide-with) (collide-spec
crate
civilian
enemy
obstacle
vehicle-sphere
hit-by-player-list
hit-by-others-list
collectable
pusher
)
(set! (-> v1-6 prim-core collide-with)
(collide-spec
crate
civilian
enemy
obstacle
vehicle-sphere
hit-by-player-list
hit-by-others-list
collectable
pusher
)
)
(set-vector! (-> v1-6 local-sphere) 0.0 0.0 0.0 arg1)
(set! (-> s4-0 total-prims) (the-as uint 1))
@@ -2765,10 +2764,8 @@ This commonly includes things such as:
(set! (-> self target) (the-as handle #f))
(set! (-> self event) #f)
(set! (-> self callback) #f)
(set! (-> self run-function) (lambda :behavior touch-tracker
()
(< (- (-> self clock frame-counter) (-> self state-time)) (-> self duration))
)
(set! (-> self run-function)
(lambda :behavior touch-tracker () (< (- (current-time) (-> self state-time)) (-> self duration)))
)
(set! (-> self event-hook) (-> (method-of-object self active) event))
(go-virtual active)
@@ -2905,7 +2902,7 @@ This commonly includes things such as:
)
)
:code (behavior ()
(set! (-> self start-time) (-> self clock frame-counter))
(set! (-> self start-time) (current-time))
(update-transforms (-> self root-override))
(let ((a1-0 (new 'stack-no-clear 'overlaps-others-params)))
(set! (-> a1-0 options) (overlaps-others-options))
@@ -2918,14 +2915,14 @@ This commonly includes things such as:
(set! (-> v1-9 prim-core collide-with) (collide-spec))
)
0
(while (< (- (-> self clock frame-counter) (-> self start-time)) (the-as time-frame (-> self duration)))
(while (< (- (current-time) (-> self start-time)) (the-as time-frame (-> self duration)))
(let ((a1-1 (-> self root-override trans)))
(spawn (-> self part) a1-1)
)
(suspend)
)
(set! (-> self start-time) (-> self clock frame-counter))
(while (< (- (-> self clock frame-counter) (-> self start-time)) (the-as time-frame (-> self linger-duration)))
(set! (-> self start-time) (current-time))
(while (< (- (current-time) (-> self start-time)) (the-as time-frame (-> self linger-duration)))
(suspend)
)
(none)
+4 -4
View File
@@ -257,10 +257,10 @@ This commonly includes things such as:
)
(cond
((and proc-focus (focus-test? proc-focus edge-grab))
(set! (-> self safe-time) (+ (-> self clock frame-counter) (seconds 0.2)))
(set! (-> self safe-time) (+ (current-time) (seconds 0.2)))
(return (the-as object #f))
)
((< (- (-> self clock frame-counter) (-> self safe-time)) (seconds 0.05))
((< (- (current-time) (-> self safe-time)) (seconds 0.05))
(return (the-as object #f))
)
)
@@ -303,7 +303,7 @@ This commonly includes things such as:
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
(case event-type
(('edge-grabbed)
(if (>= (- (-> self clock frame-counter) (-> self state-time)) (seconds 0.5))
(if (>= (- (current-time) (-> self state-time)) (seconds 0.5))
(send-event proc 'end-mode)
)
)
@@ -313,7 +313,7 @@ This commonly includes things such as:
)
)
:enter (behavior ((arg0 symbol))
(set! (-> self state-time) (-> self clock frame-counter))
(set! (-> self state-time) (current-time))
(none)
)
:exit (behavior ()
+20 -30
View File
@@ -20,19 +20,14 @@
(let ((s1-1 (process->handle arg0))
(s2-1 (process->handle arg1))
)
(let ((s0-0 (-> self clock frame-counter)))
(until (>= (- (-> self clock frame-counter) s0-0) (+ arg3 arg4))
(let ((s0-0 (current-time)))
(until (>= (- (current-time) s0-0) (+ arg3 arg4))
(let ((v1-8 (or (not (handle->process s1-1)) (not (handle->process s2-1)))))
(if v1-8
(deactivate self)
)
)
(let* ((f0-1
(fmax
0.0
(fmin 1.0 (/ (- (the float (- (-> self clock frame-counter) s0-0)) (the float arg3)) (the float arg4)))
)
)
(let* ((f0-1 (fmax 0.0 (fmin 1.0 (/ (- (the float (- (current-time) s0-0)) (the float arg3)) (the float arg4)))))
(a0-18 (process-drawable-pair-random-point!
(the-as process-drawable (-> s1-1 process 0))
(the-as process-drawable (-> s2-1 process 0))
@@ -54,8 +49,8 @@
#f
)
(else
(let ((s4-1 (-> self clock frame-counter)))
(until (>= (- (-> self clock frame-counter) s4-1) arg5)
(let ((s4-1 (current-time)))
(until (>= (- (current-time) s4-1) arg5)
(let ((a0-21 (process-drawable-random-point! (the-as process-drawable (-> s2-1 process 0)) (new-stack-vector0))))
(arg2 a0-21)
)
@@ -743,9 +738,8 @@
)
(defbehavior target-color-effect-process target ()
(when (and (-> self color-effect) (>= (- (-> self clock frame-counter) (-> self color-effect-start-time))
(the-as time-frame (-> self color-effect-duration))
)
(when (and (-> self color-effect)
(>= (- (current-time) (-> self color-effect-start-time)) (the-as time-frame (-> self color-effect-duration)))
)
(set! (-> self color-effect) #f)
(set-vector! (-> self draw color-mult) 1.0 1.0 1.0 1.0)
@@ -761,7 +755,7 @@
(let ((f30-0 (lerp-scale
1.0
0.0
(the float (- (-> self clock frame-counter) (-> self color-effect-start-time)))
(the float (- (current-time) (-> self color-effect-start-time)))
(* 0.25 (the float (-> self color-effect-duration)))
(the float (-> self color-effect-duration))
)
@@ -775,7 +769,7 @@
(let ((f30-1 (lerp-scale
1.0
0.0
(the float (- (-> self clock frame-counter) (-> self color-effect-start-time)))
(the float (- (current-time) (-> self color-effect-start-time)))
(* 0.25 (the float (-> self color-effect-duration)))
(the float (-> self color-effect-duration))
)
@@ -789,7 +783,7 @@
(let ((f30-2 (lerp-scale
1.0
0.0
(the float (- (-> self clock frame-counter) (-> self color-effect-start-time)))
(the float (- (current-time) (-> self color-effect-start-time)))
(* 0.25 (the float (-> self color-effect-duration)))
(the float (-> self color-effect-duration))
)
@@ -803,7 +797,7 @@
(let ((f30-3 (lerp-scale
1.0
0.0
(the float (- (-> self clock frame-counter) (-> self color-effect-start-time)))
(the float (- (current-time) (-> self color-effect-start-time)))
(* 0.25 (the float (-> self color-effect-duration)))
(the float (-> self color-effect-duration))
)
@@ -817,7 +811,7 @@
(let ((f30-4 (lerp-scale
1.0
0.0
(the float (- (-> self clock frame-counter) (-> self color-effect-start-time)))
(the float (- (current-time) (-> self color-effect-start-time)))
(* 0.25 (the float (-> self color-effect-duration)))
(the float (-> self color-effect-duration))
)
@@ -831,7 +825,7 @@
(let ((f30-5 (lerp-scale
1.0
0.0
(the float (- (-> self clock frame-counter) (-> self color-effect-start-time)))
(the float (- (current-time) (-> self color-effect-start-time)))
(* 0.25 (the float (-> self color-effect-duration)))
(the float (-> self color-effect-duration))
)
@@ -859,13 +853,13 @@
(if (and (logtest? (-> self water flags) (water-flags under-water))
(not (logtest? (-> self water flags) (water-flags swim-ground)))
)
(set! (-> self control unknown-time-frame26) (-> self clock frame-counter))
(set! (-> self control unknown-time-frame27) (-> self clock frame-counter))
(set! (-> self control unknown-time-frame26) (current-time))
(set! (-> self control unknown-time-frame27) (current-time))
)
(cond
((and (= (-> self control ground-pat material) (pat-material ice))
(and (>= (-> self control ctrl-xz-vel) 204.8)
(< (- (-> self clock frame-counter) (-> self control last-time-on-surface)) (seconds 0.05))
(< (- (current-time) (-> self control last-time-on-surface)) (seconds 0.05))
)
)
(let ((gp-0 (vector<-cspace! (new 'stack-no-clear 'vector) (-> self node-list data 38))))
@@ -967,7 +961,7 @@
(cond
((logtest? (-> self game features) (game-feature unk-game-feature-01))
(cond
((< (-> self clock frame-counter) (-> (the-as fact-info-target (-> self fact-override)) stop-time-timeout))
((< (current-time) (-> (the-as fact-info-target (-> self fact-override)) stop-time-timeout))
(set-setting! 'bg-a 'abs 0.3 0)
(set-setting! 'bg-r 'abs 1.0 0)
(update-rates! (-> *display* entity-clock) 0.0)
@@ -983,9 +977,7 @@
0
)
((cpad-pressed? (-> self control cpad number) r1)
(set! (-> (the-as fact-info-target (-> self fact-override)) stop-time-timeout)
(+ (-> self clock frame-counter) (seconds 5))
)
(set! (-> (the-as fact-info-target (-> self fact-override)) stop-time-timeout) (+ (current-time) (seconds 5)))
)
)
)
@@ -1100,9 +1092,7 @@
((or (and (logtest? (-> self control mod-surface flags) (surface-flag air))
(not (logtest? (-> self control status) (collide-status on-surface)))
)
(and (focus-test? self board)
(< (- (-> self clock frame-counter) (-> self board unknown-time-frame00)) (seconds 0.1))
)
(and (focus-test? self board) (< (- (current-time) (-> self board unknown-time-frame00)) (seconds 0.1)))
)
(logior! (-> self focus-status) (focus-status in-air))
(if (logtest? (surface-flag super) (-> self control current-surface flags))
@@ -1137,7 +1127,7 @@
(set! (-> self focus-status) (logior (focus-status ice) (-> self focus-status)))
(logclear! (-> self focus-status) (focus-status ice))
)
(if (< (- (-> self clock frame-counter) (-> self gun fire-time)) (seconds 0.1))
(if (< (- (current-time) (-> self gun fire-time)) (seconds 0.1))
(set! (-> self focus-status) (logior (focus-status shooting) (-> self focus-status)))
(logclear! (-> self focus-status) (focus-status shooting))
)
@@ -290,7 +290,7 @@ If we've met or exceeded the projectiles maximum allowed hits, switch to the [[p
(none)
)
:trans (behavior ()
(if (>= (- (-> self clock frame-counter) (-> self spawn-time)) (-> self timeout))
(if (>= (- (current-time) (-> self spawn-time)) (-> self timeout))
(go-virtual dissipate)
)
(let ((t9-1 (-> self pick-target)))
@@ -469,7 +469,7 @@ If we've met or exceeded the projectiles maximum allowed hits, switch to the [[p
(set! (-> self last-target) (the-as handle #f))
(set! (-> self timeout) (-> arg0 timeout))
(set! (-> self max-hits) 1)
(set! (-> self spawn-time) (-> self clock frame-counter))
(set! (-> self spawn-time) (current-time))
(set! (-> self update-velocity) #f)
(set! (-> self move) projectile-move-fill-line-sphere)
(set! (-> self pick-target) #f)
@@ -551,7 +551,7 @@ If we've met or exceeded the projectiles maximum allowed hits, switch to the [[p
)
:trans (behavior ()
(noop self)
(if (>= (- (-> self clock frame-counter) (-> self spawn-time)) (-> self timeout))
(if (>= (- (current-time) (-> self spawn-time)) (-> self timeout))
(go-virtual impact)
)
(none)
@@ -614,9 +614,9 @@ If we've met or exceeded the projectiles maximum allowed hits, switch to the [[p
(vector-float*! (-> a2-0 transv) (-> a2-0 transv) 0.6)
)
(when (and (logtest? v1-0 (collide-status impact-surface))
(>= (- (-> self clock frame-counter) (-> obj played-bounce-time)) (seconds 0.3))
(>= (- (current-time) (-> obj played-bounce-time)) (seconds 0.3))
)
(set! (-> obj played-bounce-time) (-> self clock frame-counter))
(set! (-> obj played-bounce-time) (current-time))
(sound-play "dark-shot-bounc")
)
)
@@ -286,10 +286,10 @@
)
)
(('bonk)
(when (>= (- (-> self clock frame-counter) (the-as int (-> obj player-bonk-timeout)))
(when (>= (- (current-time) (the-as int (-> obj player-bonk-timeout)))
(the-as time-frame (-> obj info-override player-force-timeout))
)
(set! (-> obj player-bonk-timeout) (the-as uint (-> self clock frame-counter)))
(set! (-> obj player-bonk-timeout) (the-as uint (current-time)))
(let* ((s4-0 arg0)
(v1-31 (if (type? s4-0 process-drawable)
s4-0
@@ -346,31 +346,29 @@
)
(defmethod alloc-and-init-rigid-body-control rigid-body-platform ((obj rigid-body-platform) (arg0 rigid-body-object-constants))
(with-pp
(set! (-> obj info-override) (the-as rigid-body-platform-constants arg0))
(set! (-> obj rbody) (new 'process 'rigid-body-control obj))
(set! (-> obj control-point-array)
(new 'process 'rigid-body-control-point-inline-array (-> obj info-override control-point-count))
)
(update-transforms (-> obj root-override-2))
(let ((v1-5 (-> obj rbody))
(a1-3 (-> obj info-override info))
(a2-2 (-> obj root-override-2 trans))
(a3-0 (-> obj root-override-2 quat))
(t0-0 (method-of-object obj rigid-body-object-method-29))
)
(rigid-body-method-25 (-> v1-5 state) a1-3 a2-2 a3-0 t0-0)
)
(set! (-> obj player-bonk-timeout) (the-as uint (-> pp clock frame-counter)))
(set! (-> obj player-force quad) (-> *null-vector* quad))
(set! (-> obj player-velocity quad) (-> *null-vector* quad))
(set! (-> obj player-velocity-prev quad) (-> *null-vector* quad))
(set! (-> obj root-override-2 max-iteration-count) (the-as uint 4))
(set! (-> obj max-time-step) (-> arg0 extra max-time-step))
(set! (-> obj water-anim) (the-as water-anim (entity-actor-lookup (-> obj entity) 'water-actor 0)))
0
(none)
(set! (-> obj info-override) (the-as rigid-body-platform-constants arg0))
(set! (-> obj rbody) (new 'process 'rigid-body-control obj))
(set! (-> obj control-point-array)
(new 'process 'rigid-body-control-point-inline-array (-> obj info-override control-point-count))
)
(update-transforms (-> obj root-override-2))
(let ((v1-5 (-> obj rbody))
(a1-3 (-> obj info-override info))
(a2-2 (-> obj root-override-2 trans))
(a3-0 (-> obj root-override-2 quat))
(t0-0 (method-of-object obj rigid-body-object-method-29))
)
(rigid-body-method-25 (-> v1-5 state) a1-3 a2-2 a3-0 t0-0)
)
(set! (-> obj player-bonk-timeout) (the-as uint (current-time)))
(set! (-> obj player-force quad) (-> *null-vector* quad))
(set! (-> obj player-velocity quad) (-> *null-vector* quad))
(set! (-> obj player-velocity-prev quad) (-> *null-vector* quad))
(set! (-> obj root-override-2 max-iteration-count) (the-as uint 4))
(set! (-> obj max-time-step) (-> arg0 extra max-time-step))
(set! (-> obj water-anim) (the-as water-anim (entity-actor-lookup (-> obj entity) 'water-actor 0)))
0
(none)
)
(defmethod allocate-and-init-cshape rigid-body-platform ((obj rigid-body-platform))
+7 -10
View File
@@ -165,9 +165,7 @@
(set! (-> a1-2 quad) (-> self parent-override 0 trans quad))
(vector-lerp! (-> self root trans) a1-2 s5-0 (-> self blend))
)
(+! (-> self root trans y)
(* 1638.4 (sin (* 54.613335 (the float (mod (-> self clock frame-counter) 1200)))))
)
(+! (-> self root trans y) (* 1638.4 (sin (* 54.613335 (the float (mod (current-time) 1200))))))
(let ((s5-1 (new 'stack-no-clear 'quaternion)))
(forward-up->quaternion
s5-1
@@ -364,14 +362,13 @@
:virtual #t
:code (behavior ()
(remove-setting! 'sound-flava)
(set! (-> self state-time) (-> self clock frame-counter))
(set! (-> self state-time) (current-time))
(set! (-> self seeker target) 1.0)
(while (and (< (-> self blend) 0.9999)
(not (and (not (handle->process (-> self hint)))
(>= (- (-> self clock frame-counter) (-> self state-time)) (seconds 0.05))
(-> *setting-control* user-current hint)
)
)
(while (and (< (-> self blend) 0.9999) (not (and (not (handle->process (-> self hint)))
(>= (- (current-time) (-> self state-time)) (seconds 0.05))
(-> *setting-control* user-current hint)
)
)
)
(update! (-> self seeker) 0.0)
(set! (-> self blend) (-> self seeker value))
+38 -44
View File
@@ -754,7 +754,7 @@
(and (>= (-> obj height) (-> obj bottom 0 y)) (logtest? (water-flags touch-water) (-> s5-0 flags)))
)
(if (logtest? (-> (the-as collide-shape-moving (-> obj process control)) status) (collide-status on-water))
(set! (-> obj on-water-time) (-> pp clock frame-counter))
(set! (-> obj on-water-time) (current-time))
)
(when (not (logtest? (-> obj flags) (water-flags dark-eco lava)))
(set! (-> obj drip-wetness) 1.0)
@@ -776,9 +776,7 @@
)
(set! (-> obj flags) (logior (water-flags break-surface) (-> obj flags)))
(set! (-> s3-0 y) (+ 40.96 (-> obj surface-height)))
(when (and (not (handle->process (-> obj ripple)))
(>= (+ (-> pp clock frame-counter) (seconds -1.5)) (-> obj enter-water-time))
)
(when (and (not (handle->process (-> obj ripple))) (>= (+ (current-time) (seconds -1.5)) (-> obj enter-water-time)))
(let* ((s1-0 (get-process *default-dead-pool* manipy #x4000))
(s2-0
(when s1-0
@@ -907,7 +905,7 @@
)
(when (< (-> s3-1 y) (-> obj surface-height))
(set! (-> *part-id-table* 502 init-specs 16 initial-valuef) (-> obj surface-height))
(let ((f0-72 (lerp-scale 12.0 0.4 (the float (- (-> pp clock frame-counter) (-> obj enter-water-time))) 0.0 600.0))
(let ((f0-72 (lerp-scale 12.0 0.4 (the float (- (current-time) (-> obj enter-water-time))) 0.0 600.0))
(f1-26 0.00012207031)
(v1-222 (-> obj process control transv))
)
@@ -947,7 +945,7 @@
s3-2
)
)
(v1-237 (and v1-236 (< (- (-> pp clock frame-counter) (-> v1-236 last-time-on-surface)) (seconds 0.5))))
(v1-237 (and v1-236 (< (- (current-time) (-> v1-236 last-time-on-surface)) (seconds 0.5))))
)
(if (and (logtest? (-> obj flags) (water-flags swim-ground))
(and v1-237
@@ -973,7 +971,7 @@
)
(< f0-84 (sqrtf (+ (* (-> a0-112 x) (-> a0-112 x)) (* (-> a0-112 z) (-> a0-112 z)))))
)
(< (+ (-> pp clock frame-counter) (seconds -0.2)) (-> obj enter-water-time))
(< (+ (current-time) (seconds -0.2)) (-> obj enter-water-time))
(or (>= (+ (- 204.8 (fmin 6144.0 (+ (-> obj ocean-offset) (-> obj bob-offset) (-> obj align-offset)))) f30-1)
(-> obj bottom 0 y)
)
@@ -981,11 +979,11 @@
)
)
)
(set! (-> obj swim-time) (-> pp clock frame-counter))
(set! (-> obj swim-time) (current-time))
(send-event (-> obj process) 'swim)
(set! (-> obj flags) (logior (water-flags swimming) (-> obj flags)))
(if (not (logtest? (water-flags swimming) s4-0))
(set! (-> obj enter-swim-time) (-> pp clock frame-counter))
(set! (-> obj enter-swim-time) (current-time))
)
(cond
((and (logtest? (-> obj flags) (water-flags swim-ground))
@@ -1019,13 +1017,13 @@
((begin
(set! v1-237
(and (logtest? (-> obj flags) (water-flags can-wade))
(or (not (!= (-> obj bob amp) 0.0)) (>= (- (-> pp clock frame-counter) (-> obj swim-time)) (seconds 0.05)))
(or (not (!= (-> obj bob amp) 0.0)) (>= (- (current-time) (-> obj swim-time)) (seconds 0.05)))
(and (>= (- (-> obj height) (-> obj wade-height)) (-> obj bottom 0 y)) v1-237)
)
)
v1-237
)
(set! (-> obj wade-time) (-> pp clock frame-counter))
(set! (-> obj wade-time) (current-time))
(send-event (-> obj process) 'wade)
(set! (-> obj flags) (logior (water-flags wading) (-> obj flags)))
)
@@ -1158,7 +1156,7 @@
(t9-35 a0-208 a1-61 a2-22 (the-as sparticle-launch-state #f) (the-as sparticle-launch-control #f) 1.0)
)
)
(set! (-> obj drip-time) (-> pp clock frame-counter))
(set! (-> obj drip-time) (current-time))
(logclear! (-> obj flags) (water-flags spawn-drip))
(seek! (-> obj drip-wetness) 0.0 (* 0.001 (-> obj drip-speed)))
(set! (-> obj drip-speed) (* 1.05 (-> obj drip-speed)))
@@ -1166,9 +1164,7 @@
(set! (-> obj drip-height) 0.0)
)
)
((>= (- (-> pp clock frame-counter)
(the-as time-frame (the int (/ (the float (-> obj drip-time)) (-> obj drip-mult))))
)
((>= (- (current-time) (the-as time-frame (the int (/ (the float (-> obj drip-time)) (-> obj drip-mult)))))
(the int (-> obj drip-speed))
)
(let* ((s5-1 (rand-vu-int-range 3 (+ (-> obj process node-list length) -1)))
@@ -1286,7 +1282,7 @@
(with-pp
(set! (-> obj flags) (logior (water-flags touch-water) (-> obj flags)))
(logclear! (-> obj flags) (water-flags jump-out))
(set! (-> obj enter-water-time) (-> pp clock frame-counter))
(set! (-> obj enter-water-time) (current-time))
(set-vector! (-> obj enter-water-pos) (-> obj bottom 0 x) (-> obj surface-height) (-> obj bottom 0 z) 1.0)
(when (and (logtest? (water-flags part-splash) (-> obj flags)) (logtest? (water-flags part-water) (-> obj flags)))
(let ((a1-1 (new 'stack-no-clear 'event-message-block)))
@@ -1413,41 +1409,39 @@
)
(defmethod spawn-ripples water-control ((obj water-control) (arg0 float) (arg1 vector) (arg2 int) (arg3 vector) (arg4 symbol))
(with-pp
(when (and (logtest? (water-flags part-splash) (-> obj flags)) (logtest? (water-flags part-water) (-> obj flags)))
(let ((s4-1 (vector+float*! (new 'stack-no-clear 'vector) arg1 arg3 0.05)))
(set! (-> s4-1 y) (+ 40.96 (-> obj surface-height)))
(if (>= (- (-> pp clock frame-counter) (-> obj distort-time)) (seconds 0.1))
(splash-spawn arg0 s4-1 arg2)
)
(when (and arg4 (>= (- (-> pp clock frame-counter) (-> obj distort-time)) (seconds 0.3)))
(set! (-> obj distort-time) (-> pp clock frame-counter))
(let ((s3-1 (process-spawn
manipy
:init manipy-init
s4-1
(-> obj process entity)
(art-group-get-by-name *level* "skel-generic-ripples" (the-as (pointer uint32) #f))
#f
0
:to (-> obj process)
)
(when (and (logtest? (water-flags part-splash) (-> obj flags)) (logtest? (water-flags part-water) (-> obj flags)))
(let ((s4-1 (vector+float*! (new 'stack-no-clear 'vector) arg1 arg3 0.05)))
(set! (-> s4-1 y) (+ 40.96 (-> obj surface-height)))
(if (>= (- (current-time) (-> obj distort-time)) (seconds 0.1))
(splash-spawn arg0 s4-1 arg2)
)
(when (and arg4 (>= (- (current-time) (-> obj distort-time)) (seconds 0.3)))
(set! (-> obj distort-time) (current-time))
(let ((s3-1 (process-spawn
manipy
:init manipy-init
s4-1
(-> obj process entity)
(art-group-get-by-name *level* "skel-generic-ripples" (the-as (pointer uint32) #f))
#f
0
:to (-> obj process)
)
)
(when s3-1
(send-event (ppointer->process s3-1) 'anim-mode 'play1)
(send-event (ppointer->process s3-1) 'anim "idle")
(let ((f0-4 (fmax 0.6 (fmin 1.0 (* 2.0 arg0)))))
(set-vector! (-> (the-as process-drawable (-> s3-1 0)) root scale) f0-4 0.5 f0-4 1.0)
)
)
)
(when s3-1
(send-event (ppointer->process s3-1) 'anim-mode 'play1)
(send-event (ppointer->process s3-1) 'anim "idle")
(let ((f0-4 (fmax 0.6 (fmin 1.0 (* 2.0 arg0)))))
(set-vector! (-> (the-as process-drawable (-> s3-1 0)) root scale) f0-4 0.5 f0-4 1.0)
)
)
)
)
)
0
(none)
)
0
(none)
)
(defun water-info<-region ((arg0 water-info) (arg1 drawable-region-prim) (arg2 collide-shape) (arg3 collide-action))
+24 -28
View File
@@ -4280,34 +4280,30 @@
"Clear map"
#f
,(lambda ()
(let ((v1-1
(process-spawn-function
process
(lambda () (with-pp
(set-master-mode 'game)
(let ((gp-0 (-> pp clock frame-counter)))
(until (>= (- (-> pp clock frame-counter) gp-0) (seconds 0.3))
(suspend)
)
)
(until #f
(format *stdcon* "press x clear map, press circle cancel~%")
(cond
((cpad-pressed? 0 x)
(initialize *bigmap*)
(return #f)
)
((cpad-pressed? 0 circle)
(return #f)
)
)
(suspend)
)
#f
)
)
)
)
(let ((v1-1 (process-spawn-function process (lambda ()
(set-master-mode 'game)
(let ((gp-0 (current-time)))
(until (>= (- (current-time) gp-0) (seconds 0.3))
(suspend)
)
)
(until #f
(format *stdcon* "press x clear map, press circle cancel~%")
(cond
((cpad-pressed? 0 x)
(initialize *bigmap*)
(return #f)
)
((cpad-pressed? 0 circle)
(return #f)
)
)
(suspend)
)
#f
)
)
)
)
(when v1-1
(let ((v0-3 (logclear (-> v1-1 0 mask) (process-mask menu))))
+16 -20
View File
@@ -1370,21 +1370,20 @@
(editable-array-method-9 obj (editable-command update-game) (the-as editable-array #f))
)
((= arg0 (editable-command update-game))
;; TODO - waiting for lights/light-hash to be done
;; (reset-light-hash *light-hash*)
;; (let* ((s5-19 (-> obj length))
;; (s4-23 0)
;; (a0-76 (-> obj data s4-23))
;; )
;; (while (< s4-23 s5-19)
;; (if a0-76
;; (editable-method-23 a0-76)
;; )
;; (+! s4-23 1)
;; (set! a0-76 (-> obj data s4-23))
;; )
;; )
;; (update-light-hash *light-hash*)
(reset-light-hash *light-hash*)
(let* ((s5-19 (-> obj length))
(s4-23 0)
(a0-76 (-> obj data s4-23))
)
(while (< s4-23 s5-19)
(if a0-76
(editable-method-23 a0-76)
)
(+! s4-23 1)
(set! a0-76 (-> obj data s4-23))
)
)
(update-light-hash *light-hash*)
)
((or (= arg0 (editable-command exit)) (= arg0 (editable-command kill)))
(deactivate self)
@@ -1614,7 +1613,7 @@
(the-as object (deactivate self))
)
(('menu)
(set! v0-0 (+ (-> self clock frame-counter) (the-as time-frame (-> event param 0))))
(set! v0-0 (+ (current-time) (the-as time-frame (-> event param 0))))
(set! (-> self close-menu-time) (the-as time-frame v0-0))
v0-0
)
@@ -1850,10 +1849,7 @@
(logclear! (-> *cpad-list* cpads 1 button0-rel 0) (pad-buttons start))
)
)
(when (or (and (= *master-mode* 'menu)
(> (-> self close-menu-time) 0)
(>= (-> self clock frame-counter) (-> self close-menu-time))
)
(when (or (and (= *master-mode* 'menu) (> (-> self close-menu-time) 0) (>= (current-time) (-> self close-menu-time)))
(cpad-pressed? 1 start)
)
(debug-menu-context-send-msg *editable-menu-context* (debug-menu-msg deactivate) (debug-menu-dest activation))
+338 -340
View File
@@ -1204,117 +1204,115 @@
(sv-112 pointer)
(sv-128 int)
)
(with-pp
(let ((s4-0 *debug-actor-info*))
(set! (-> s4-0 process) #f)
(if (zero? (-> s4-0 handle pid))
(set! (-> s4-0 handle)
(logior (logand (-> s4-0 handle) (shl (the-as uint #xffffffff) 32)) (shr (shl (the-as int #f) 32) 32))
)
)
(let ((v0-0 (handle->process (-> s4-0 handle))))
(when (not v0-0)
(if (-> s4-0 name)
(set! v0-0 (process-by-name (the-as string (-> s4-0 name)) *active-pool*))
(let ((s4-0 *debug-actor-info*))
(set! (-> s4-0 process) #f)
(if (zero? (-> s4-0 handle pid))
(set! (-> s4-0 handle)
(logior (logand (-> s4-0 handle) (shl (the-as uint #xffffffff) 32)) (shr (shl (the-as int #f) 32) 32))
)
)
(set! (-> s4-0 process) v0-0)
)
(set! *debug-actor* (-> s4-0 process))
)
(set! sv-16 arg0)
(when (and sv-16 (not (or (= *master-mode* 'menu) (= *master-mode* 'progress))))
(cond
((= sv-16 'process)
(let ((s5-1 draw-actor-marks))
(iterate-process-tree *pusher-pool* (the-as (function object object) s5-1) *null-kernel-context*)
(iterate-process-tree *entity-pool* (the-as (function object object) s5-1) *null-kernel-context*)
)
)
(else
(dotimes (s5-2 (-> obj length))
(let ((v1-25 (-> obj level s5-2)))
(when (= (-> v1-25 status) 'active)
(let ((s4-1 (-> v1-25 bsp level entity)))
(dotimes (s3-0 (-> s4-1 length))
(let ((s2-0 (-> s4-1 data s3-0 entity)))
(set! sv-20 (-> s2-0 extra trans))
(when (or (= sv-16 'full) (-> s2-0 extra process))
(add-debug-x #t (bucket-id debug-no-zbuf1) sv-20 (if (-> s2-0 extra process)
(new 'static 'rgba :r #x80 :g #xff :b #x80 :a #x80)
(new 'static 'rgba :r #xff :a #x80)
)
)
(let ((s1-0 add-debug-text-3d)
(s0-0 #t)
)
(set! sv-32 (the-as int (bucket-id debug-no-zbuf1)))
(let ((a2-4 (res-lump-struct s2-0 'name structure))
(a3-2 sv-20)
(t0-1 (if (logtest? (-> s2-0 extra perm status) (entity-perm-status bit-0 bit-1))
1
5
)
)
(t1-1 (new 'static 'vector2h :data (new 'static 'array int16 2 0 8)))
)
(s1-0 s0-0 (the-as bucket-id sv-32) (the-as string a2-4) a3-2 (the-as font-color t0-1) t1-1)
)
)
)
)
)
)
)
)
(let ((v0-0 (handle->process (-> s4-0 handle))))
(when (not v0-0)
(if (-> s4-0 name)
(set! v0-0 (process-by-name (the-as string (-> s4-0 name)) *active-pool*))
)
)
)
(set! (-> s4-0 process) v0-0)
)
(when (and *display-actor-vis* (not *debug-actor*))
(let ((s5-3 *display-actor-vis*))
(dotimes (s4-2 (-> obj length))
(let ((s3-1 (-> obj level s4-2)))
(when (= (-> s3-1 status) 'active)
(let ((s2-1 (-> s3-1 bsp level entity)))
(dotimes (s1-1 (-> s2-1 length))
(let ((s0-1 (-> s2-1 data s1-1 entity)))
(let ((v0-6 (res-lump-data s0-1 'visvol pointer))
(a1-10 (-> s0-1 extra vis-id))
)
(when (and v0-6 (or (= s5-3 #t) (= s5-3 'box)))
(set! sv-48 add-debug-box)
(set! sv-64 #t)
(set! sv-80 (the-as int (bucket-id debug-no-zbuf1)))
(set! sv-96 (&+ v0-6 0))
(set! sv-112 (&+ v0-6 16))
(let ((t0-3 (if (is-object-visible? s3-1 a1-10)
(the-as uint #x80808000)
(the-as uint #x80800080)
(set! *debug-actor* (-> s4-0 process))
)
(set! sv-16 arg0)
(when (and sv-16 (not (or (= *master-mode* 'menu) (= *master-mode* 'progress))))
(cond
((= sv-16 'process)
(let ((s5-1 draw-actor-marks))
(iterate-process-tree *pusher-pool* (the-as (function object object) s5-1) *null-kernel-context*)
(iterate-process-tree *entity-pool* (the-as (function object object) s5-1) *null-kernel-context*)
)
)
(else
(dotimes (s5-2 (-> obj length))
(let ((v1-25 (-> obj level s5-2)))
(when (= (-> v1-25 status) 'active)
(let ((s4-1 (-> v1-25 bsp level entity)))
(dotimes (s3-0 (-> s4-1 length))
(let ((s2-0 (-> s4-1 data s3-0 entity)))
(set! sv-20 (-> s2-0 extra trans))
(when (or (= sv-16 'full) (-> s2-0 extra process))
(add-debug-x #t (bucket-id debug-no-zbuf1) sv-20 (if (-> s2-0 extra process)
(new 'static 'rgba :r #x80 :g #xff :b #x80 :a #x80)
(new 'static 'rgba :r #xff :a #x80)
)
)
(let ((s1-0 add-debug-text-3d)
(s0-0 #t)
)
(set! sv-32 (the-as int (bucket-id debug-no-zbuf1)))
(let ((a2-4 (res-lump-struct s2-0 'name structure))
(a3-2 sv-20)
(t0-1 (if (logtest? (-> s2-0 extra perm status) (entity-perm-status bit-0 bit-1))
1
5
)
)
(t1-1 (new 'static 'vector2h :data (new 'static 'array int16 2 0 8)))
)
(sv-48 sv-64 (the-as bucket-id sv-80) (the-as vector sv-96) (the-as vector sv-112) (the-as rgba t0-3))
(s1-0 s0-0 (the-as bucket-id sv-32) (the-as string a2-4) a3-2 (the-as font-color t0-1) t1-1)
)
)
)
(when (or (= s5-3 #t) (= s5-3 'sphere))
(let ((s0-2 (-> s0-1 extra process)))
(when s0-2
(when (and (type? s0-2 process-drawable) (nonzero? (-> (the-as process-drawable s0-2) draw)))
(add-debug-x
#t
(bucket-id debug-no-zbuf1)
(-> (the-as process-drawable s0-2) root trans)
(new 'static 'rgba :r #xff :g #xff :b #xff :a #x80)
)
(add-debug-sphere
#t
(bucket-id debug2)
(-> (the-as process-drawable s0-2) draw origin)
(-> (the-as process-drawable s0-2) draw bounds w)
(new 'static 'rgba :r #x80 :a #x80)
)
)
)
)
)
)
)
)
)
)
(when (and *display-actor-vis* (not *debug-actor*))
(let ((s5-3 *display-actor-vis*))
(dotimes (s4-2 (-> obj length))
(let ((s3-1 (-> obj level s4-2)))
(when (= (-> s3-1 status) 'active)
(let ((s2-1 (-> s3-1 bsp level entity)))
(dotimes (s1-1 (-> s2-1 length))
(let ((s0-1 (-> s2-1 data s1-1 entity)))
(let ((v0-6 (res-lump-data s0-1 'visvol pointer))
(a1-10 (-> s0-1 extra vis-id))
)
(when (and v0-6 (or (= s5-3 #t) (= s5-3 'box)))
(set! sv-48 add-debug-box)
(set! sv-64 #t)
(set! sv-80 (the-as int (bucket-id debug-no-zbuf1)))
(set! sv-96 (&+ v0-6 0))
(set! sv-112 (&+ v0-6 16))
(let ((t0-3 (if (is-object-visible? s3-1 a1-10)
(the-as uint #x80808000)
(the-as uint #x80800080)
)
)
)
(sv-48 sv-64 (the-as bucket-id sv-80) (the-as vector sv-96) (the-as vector sv-112) (the-as rgba t0-3))
)
)
)
(when (or (= s5-3 #t) (= s5-3 'sphere))
(let ((s0-2 (-> s0-1 extra process)))
(when s0-2
(when (and (type? s0-2 process-drawable) (nonzero? (-> (the-as process-drawable s0-2) draw)))
(add-debug-x
#t
(bucket-id debug-no-zbuf1)
(-> (the-as process-drawable s0-2) root trans)
(new 'static 'rgba :r #xff :g #xff :b #xff :a #x80)
)
(add-debug-sphere
#t
(bucket-id debug2)
(-> (the-as process-drawable s0-2) draw origin)
(-> (the-as process-drawable s0-2) draw bounds w)
(new 'static 'rgba :r #x80 :a #x80)
)
)
)
@@ -1327,247 +1325,247 @@
)
)
)
(if *generate-actor-vis*
(update-vis-volumes obj)
)
(cond
(*debug-actor*
(let* ((s4-3 *debug-actor*)
(s5-4 (if (type? s4-3 process-drawable)
s4-3
)
)
)
(when s5-4
(if (nonzero? (-> (the-as process-drawable s5-4) skel))
(debug-print-channels (-> (the-as process-drawable s5-4) skel) (the-as symbol *stdcon*))
)
(when (and (nonzero? (-> (the-as process-drawable s5-4) nav))
(-> (the-as process-drawable s5-4) nav)
*display-nav-marks*
)
(let ((s4-4 (-> (the-as process-drawable s5-4) nav state flags)))
(if (= (logand s4-4 (nav-state-flag in-target-poly)) (nav-state-flag in-target-poly))
(format *stdcon* "in-target-poly ")
)
(if (= (logand s4-4 (nav-state-flag directional-mode)) (nav-state-flag directional-mode))
(format *stdcon* "directional-mode ")
)
(if (= (logand s4-4 (nav-state-flag initialized)) (nav-state-flag initialized))
(format *stdcon* "initialized ")
)
(if (= (logand s4-4 (nav-state-flag display-marks)) (nav-state-flag display-marks))
(format *stdcon* "display-marks ")
)
(if (= (logand s4-4 (nav-state-flag recovery-mode)) (nav-state-flag recovery-mode))
(format *stdcon* "recovery-mode ")
)
(if (= (logand s4-4 (nav-state-flag touching-sphere)) (nav-state-flag touching-sphere))
(format *stdcon* "touching-sphere ")
)
(if (= (logand s4-4 (nav-state-flag trapped-by-sphere)) (nav-state-flag trapped-by-sphere))
(format *stdcon* "trapped-by-sphere ")
)
(if (= (logand s4-4 (nav-state-flag blocked)) (nav-state-flag blocked))
(format *stdcon* "blocked ")
)
(if (= (logand s4-4 (nav-state-flag avoiding-sphere)) (nav-state-flag avoiding-sphere))
(format *stdcon* "avoiding-sphere ")
)
(if (= (logand s4-4 (nav-state-flag target-inside)) (nav-state-flag target-inside))
(format *stdcon* "target-inside ")
)
(if (= (logand s4-4 (nav-state-flag debug)) (nav-state-flag debug))
(format *stdcon* "debug ")
)
(if (= (logand s4-4 (nav-state-flag at-gap)) (nav-state-flag at-gap))
(format *stdcon* "at-gap ")
)
(if (= (logand s4-4 (nav-state-flag in-mesh)) (nav-state-flag in-mesh))
(format *stdcon* "in-mesh ")
)
(if (= (logand s4-4 (nav-state-flag at-target)) (nav-state-flag at-target))
(format *stdcon* "at-target ")
)
(if (= (logand s4-4 (nav-state-flag target-poly-dirty)) (nav-state-flag target-poly-dirty))
(format *stdcon* "target-poly-dirty ")
)
)
(format *stdcon* "~%")
)
(when *display-joint-axes*
(if (and (type? (the-as process-drawable s5-4) process-drawable)
(nonzero? (-> (the-as process-drawable s5-4) draw))
)
(draw-joint-axes (the-as process-drawable s5-4))
)
)
(draw-actor-marks (the-as process-drawable s5-4))
)
)
)
(*display-nav-mesh*
(dotimes (s5-5 (-> obj length))
(let ((v1-145 (-> obj level s5-5)))
(when (= (-> v1-145 status) 'active)
(let ((s4-5 (-> v1-145 bsp nav-meshes)))
(when (nonzero? s4-5)
(dotimes (s3-2 (-> s4-5 length))
(let ((s2-2 (-> s4-5 s3-2)))
(if (name= *display-nav-mesh* (res-lump-struct s2-2 'name structure))
(debug-draw s2-2)
)
)
)
)
)
)
)
)
)
(else
(when *display-nav-marks*
(dotimes (s5-6 (-> obj length))
(let ((v1-163 (-> obj level s5-6)))
(when (= (-> v1-163 status) 'active)
(let ((s4-6 (-> v1-163 bsp nav-meshes)))
(when (nonzero? s4-6)
(dotimes (s3-3 (-> s4-6 length))
(debug-draw (-> s4-6 s3-3))
)
)
)
)
)
)
)
(if (or *display-path-marks* *display-vol-marks*)
(iterate-process-tree
*active-pool*
(the-as (function object object) (lambda ((arg0 process-drawable))
(when (type? arg0 process-drawable)
(if (nonzero? (-> arg0 path))
(debug-draw (-> arg0 path))
)
(if (nonzero? (-> arg0 vol))
(debug-draw (-> arg0 vol))
)
)
(none)
)
)
*null-kernel-context*
)
)
)
)
(when (and *display-actor-graph* (not (or (= *master-mode* 'menu) (= *master-mode* 'progress))))
(if (not (paused?))
(float-save-timeplot (if (< (the int (the float (mod (-> pp clock frame-counter) 600))) 300)
1.0
0.0
)
)
)
(camera-plot-float-func
0.0
399.0
-81920.0
81920.0
float-lookup-redline
(new 'static 'vector4w :x #xff :w #x80)
)
(camera-plot-float-func
0.0
399.0
-81920.0
81920.0
float-lookup-blueline
(new 'static 'vector4w :z #xff :w #x80)
)
(camera-plot-float-func
0.0
399.0
-81920.0
81920.0
float-lookup-greenline
(new 'static 'vector4w :y #xff :w #x80)
)
(camera-plot-float-func
0.0
399.0
0.0
409600.0
float-lookup-yellowline
(new 'static 'vector4w :x #xff :y #xff :w #x80)
)
(camera-plot-float-func
0.0
399.0
0.0
1.0
float-lookup-timeplot
(new 'static 'vector4w :x #x80 :y #x80 :z #x80 :w #x80)
)
)
(when *display-split-boxes*
(dotimes (s5-7 (-> obj length))
(let ((v1-193 (-> obj level s5-7)))
(when (= (-> v1-193 status) 'active)
(let ((s4-7 (-> v1-193 bsp region-tree)))
(when (nonzero? s4-7)
(let* ((s3-4 (-> s4-7 data2 (+ (-> s4-7 length) -1) length))
(s2-3 0)
(a0-102 (-> (the-as drawable-inline-array-region-prim (-> s4-7 data2 (+ (-> s4-7 length) -1))) data s2-3))
)
(while (< s2-3 s3-4)
(debug-draw-region a0-102 0)
(+! s2-3 1)
(set! a0-102
(-> (the-as drawable-inline-array-region-prim (-> s4-7 data2 (+ (-> s4-7 length) -1))) data s2-3)
)
)
)
)
)
)
)
)
)
(when *display-region-marks*
(dotimes (s5-8 (-> obj length))
(let ((s4-8 (-> obj level s5-8)))
(when (= (-> s4-8 status) 'active)
(when (nonzero? (-> s4-8 bsp region-trees))
(let* ((s3-5 (-> s4-8 bsp region-trees length))
(s2-4 0)
(s1-3 (-> s4-8 bsp region-trees s2-4))
)
(while (< s2-4 s3-5)
(let ((s0-4 (-> s1-3 data2 (+ (-> s1-3 length) -1) length)))
(set! sv-128 0)
(let ((a0-117 (-> (the-as drawable-inline-array-region-prim (-> s1-3 data2 (+ (-> s1-3 length) -1))) data sv-128)))
(while (< sv-128 s0-4)
(debug-draw-region a0-117 0)
(set! sv-128 (+ sv-128 1))
(set! a0-117
(-> (the-as drawable-inline-array-region-prim (-> s1-3 data2 (+ (-> s1-3 length) -1))) data sv-128)
)
)
)
)
(+! s2-4 1)
(set! s1-3 (-> s4-8 bsp region-trees s2-4))
)
)
)
)
)
)
)
0
(none)
)
(if *generate-actor-vis*
(update-vis-volumes obj)
)
(cond
(*debug-actor*
(let* ((s4-3 *debug-actor*)
(s5-4 (if (type? s4-3 process-drawable)
s4-3
)
)
)
(when s5-4
(if (nonzero? (-> (the-as process-drawable s5-4) skel))
(debug-print-channels (-> (the-as process-drawable s5-4) skel) (the-as symbol *stdcon*))
)
(when (and (nonzero? (-> (the-as process-drawable s5-4) nav))
(-> (the-as process-drawable s5-4) nav)
*display-nav-marks*
)
(let ((s4-4 (-> (the-as process-drawable s5-4) nav state flags)))
(if (= (logand s4-4 (nav-state-flag in-target-poly)) (nav-state-flag in-target-poly))
(format *stdcon* "in-target-poly ")
)
(if (= (logand s4-4 (nav-state-flag directional-mode)) (nav-state-flag directional-mode))
(format *stdcon* "directional-mode ")
)
(if (= (logand s4-4 (nav-state-flag initialized)) (nav-state-flag initialized))
(format *stdcon* "initialized ")
)
(if (= (logand s4-4 (nav-state-flag display-marks)) (nav-state-flag display-marks))
(format *stdcon* "display-marks ")
)
(if (= (logand s4-4 (nav-state-flag recovery-mode)) (nav-state-flag recovery-mode))
(format *stdcon* "recovery-mode ")
)
(if (= (logand s4-4 (nav-state-flag touching-sphere)) (nav-state-flag touching-sphere))
(format *stdcon* "touching-sphere ")
)
(if (= (logand s4-4 (nav-state-flag trapped-by-sphere)) (nav-state-flag trapped-by-sphere))
(format *stdcon* "trapped-by-sphere ")
)
(if (= (logand s4-4 (nav-state-flag blocked)) (nav-state-flag blocked))
(format *stdcon* "blocked ")
)
(if (= (logand s4-4 (nav-state-flag avoiding-sphere)) (nav-state-flag avoiding-sphere))
(format *stdcon* "avoiding-sphere ")
)
(if (= (logand s4-4 (nav-state-flag target-inside)) (nav-state-flag target-inside))
(format *stdcon* "target-inside ")
)
(if (= (logand s4-4 (nav-state-flag debug)) (nav-state-flag debug))
(format *stdcon* "debug ")
)
(if (= (logand s4-4 (nav-state-flag at-gap)) (nav-state-flag at-gap))
(format *stdcon* "at-gap ")
)
(if (= (logand s4-4 (nav-state-flag in-mesh)) (nav-state-flag in-mesh))
(format *stdcon* "in-mesh ")
)
(if (= (logand s4-4 (nav-state-flag at-target)) (nav-state-flag at-target))
(format *stdcon* "at-target ")
)
(if (= (logand s4-4 (nav-state-flag target-poly-dirty)) (nav-state-flag target-poly-dirty))
(format *stdcon* "target-poly-dirty ")
)
)
(format *stdcon* "~%")
)
(when *display-joint-axes*
(if (and (type? (the-as process-drawable s5-4) process-drawable)
(nonzero? (-> (the-as process-drawable s5-4) draw))
)
(draw-joint-axes (the-as process-drawable s5-4))
)
)
(draw-actor-marks (the-as process-drawable s5-4))
)
)
)
(*display-nav-mesh*
(dotimes (s5-5 (-> obj length))
(let ((v1-145 (-> obj level s5-5)))
(when (= (-> v1-145 status) 'active)
(let ((s4-5 (-> v1-145 bsp nav-meshes)))
(when (nonzero? s4-5)
(dotimes (s3-2 (-> s4-5 length))
(let ((s2-2 (-> s4-5 s3-2)))
(if (name= *display-nav-mesh* (res-lump-struct s2-2 'name structure))
(debug-draw s2-2)
)
)
)
)
)
)
)
)
)
(else
(when *display-nav-marks*
(dotimes (s5-6 (-> obj length))
(let ((v1-163 (-> obj level s5-6)))
(when (= (-> v1-163 status) 'active)
(let ((s4-6 (-> v1-163 bsp nav-meshes)))
(when (nonzero? s4-6)
(dotimes (s3-3 (-> s4-6 length))
(debug-draw (-> s4-6 s3-3))
)
)
)
)
)
)
)
(if (or *display-path-marks* *display-vol-marks*)
(iterate-process-tree
*active-pool*
(the-as (function object object) (lambda ((arg0 process-drawable))
(when (type? arg0 process-drawable)
(if (nonzero? (-> arg0 path))
(debug-draw (-> arg0 path))
)
(if (nonzero? (-> arg0 vol))
(debug-draw (-> arg0 vol))
)
)
(none)
)
)
*null-kernel-context*
)
)
)
)
(when (and *display-actor-graph* (not (or (= *master-mode* 'menu) (= *master-mode* 'progress))))
(if (not (paused?))
(float-save-timeplot (if (< (the int (the float (mod (current-time) 600))) 300)
1.0
0.0
)
)
)
(camera-plot-float-func
0.0
399.0
-81920.0
81920.0
float-lookup-redline
(new 'static 'vector4w :x #xff :w #x80)
)
(camera-plot-float-func
0.0
399.0
-81920.0
81920.0
float-lookup-blueline
(new 'static 'vector4w :z #xff :w #x80)
)
(camera-plot-float-func
0.0
399.0
-81920.0
81920.0
float-lookup-greenline
(new 'static 'vector4w :y #xff :w #x80)
)
(camera-plot-float-func
0.0
399.0
0.0
409600.0
float-lookup-yellowline
(new 'static 'vector4w :x #xff :y #xff :w #x80)
)
(camera-plot-float-func
0.0
399.0
0.0
1.0
float-lookup-timeplot
(new 'static 'vector4w :x #x80 :y #x80 :z #x80 :w #x80)
)
)
(when *display-split-boxes*
(dotimes (s5-7 (-> obj length))
(let ((v1-193 (-> obj level s5-7)))
(when (= (-> v1-193 status) 'active)
(let ((s4-7 (-> v1-193 bsp region-tree)))
(when (nonzero? s4-7)
(let* ((s3-4 (-> s4-7 data2 (+ (-> s4-7 length) -1) length))
(s2-3 0)
(a0-102 (-> (the-as drawable-inline-array-region-prim (-> s4-7 data2 (+ (-> s4-7 length) -1))) data s2-3))
)
(while (< s2-3 s3-4)
(debug-draw-region a0-102 0)
(+! s2-3 1)
(set! a0-102
(-> (the-as drawable-inline-array-region-prim (-> s4-7 data2 (+ (-> s4-7 length) -1))) data s2-3)
)
)
)
)
)
)
)
)
)
(when *display-region-marks*
(dotimes (s5-8 (-> obj length))
(let ((s4-8 (-> obj level s5-8)))
(when (= (-> s4-8 status) 'active)
(when (nonzero? (-> s4-8 bsp region-trees))
(let* ((s3-5 (-> s4-8 bsp region-trees length))
(s2-4 0)
(s1-3 (-> s4-8 bsp region-trees s2-4))
)
(while (< s2-4 s3-5)
(let ((s0-4 (-> s1-3 data2 (+ (-> s1-3 length) -1) length)))
(set! sv-128 0)
(let ((a0-117 (-> (the-as drawable-inline-array-region-prim (-> s1-3 data2 (+ (-> s1-3 length) -1))) data sv-128)))
(while (< sv-128 s0-4)
(debug-draw-region a0-117 0)
(set! sv-128 (+ sv-128 1))
(set! a0-117
(-> (the-as drawable-inline-array-region-prim (-> s1-3 data2 (+ (-> s1-3 length) -1))) data sv-128)
)
)
)
)
(+! s2-4 1)
(set! s1-3 (-> s4-8 bsp region-trees s2-4))
)
)
)
)
)
)
)
0
(none)
)
(defmethod birth! entity-camera ((obj entity-camera))
+335 -363
View File
@@ -302,327 +302,301 @@
(sv-496 matrix)
(sv-512 res-lump)
)
(with-pp
(cond
((logtest? (-> obj flags) (effect-control-flag ecf2))
(return #f)
)
((= arg0 'script)
(let ((gp-1 (get-property-struct
(-> obj res)
'effect-script
'exact
arg1
(the-as structure #f)
(the-as (pointer res-tag) #f)
*res-static-buf*
)
)
)
(script-eval (the-as pair gp-1))
)
(return #f)
)
)
(let ((s3-0 (-> arg0 value))
(s5-0 (cond
((< arg2 0)
(let ((v0-5 (get-property-value
(-> obj res)
'effect-joint
'exact
arg1
(the-as uint128 0)
(the-as (pointer res-tag) #f)
*res-static-buf*
)
)
)
(if (zero? v0-5)
0
(the-as int (+ v0-5 1))
)
)
)
(else
(empty)
arg2
)
)
)
)
(when (logtest? (-> obj flags) (effect-control-flag ecf0))
(if (send-event (-> obj process) 'effect-control arg0 arg1 s5-0)
(return 0)
)
)
(let ((v1-23 (symbol->string arg0)))
(cond
((and (= (-> v1-23 data 0) 101)
(= (-> v1-23 data 1) 102)
(= (-> v1-23 data 2) 102)
(= (-> v1-23 data 3) 101)
(= (-> v1-23 data 4) 99)
(= (-> v1-23 data 5) 116)
(= (-> v1-23 data 6) 45)
)
(let* ((s3-1 (-> obj process root))
(v1-27 (if (type? s3-1 collide-shape-moving)
s3-1
)
)
(t1-2 (if v1-27
(-> (the-as collide-shape-moving v1-27) ground-pat)
*footstep-surface*
)
)
)
(do-effect-for-surface obj arg0 arg1 s5-0 (-> obj res) t1-2)
)
)
((let ((v1-31 (symbol->string arg0)))
(and (= (-> v1-31 data 0) 103)
(= (-> v1-31 data 1) 114)
(= (-> v1-31 data 2) 111)
(= (-> v1-31 data 3) 117)
(= (-> v1-31 data 4) 112)
(= (-> v1-31 data 5) 45)
)
)
(set! s3-0 (cond
((zero? s3-0)
(let ((v0-10 (lookup-part-group-pointer-by-name (symbol->string arg0))))
(when v0-10
(set! (-> arg0 value) v0-10)
(set! s3-0 (-> v0-10 0))
)
)
s3-0
)
(else
(-> (the-as (pointer object) s3-0) 0)
)
)
)
(when (and (nonzero? s3-0) (= (-> (the-as basic s3-0) type) sparticle-launch-group))
(if *debug-effect-control*
(format
#t
"(~5D) effect group ~A ~A frame ~F joint ~D~%"
(-> pp clock frame-counter)
(-> obj process name)
arg0
(cond
((logtest? (-> obj flags) (effect-control-flag ecf2))
(return #f)
)
((= arg0 'script)
(let ((gp-1 (get-property-struct
(-> obj res)
'effect-script
'exact
arg1
s5-0
(the-as structure #f)
(the-as (pointer res-tag) #f)
*res-static-buf*
)
)
(let ((s4-1 (get-process *default-dead-pool* part-tracker #x4000)))
(when s4-1
(let ((t9-10 (method-of-type part-tracker activate)))
(t9-10
(the-as part-tracker s4-1)
(-> obj process)
(symbol->string (-> part-tracker symbol))
(the-as pointer #x70004000)
)
)
(let ((s2-1 run-function-in-process)
(s1-0 s4-1)
(s0-0 part-tracker-init)
)
(script-eval (the-as pair gp-1))
)
(return #f)
)
)
(let ((s3-0 (-> arg0 value))
(s5-0 (cond
((< arg2 0)
(let ((v0-5 (get-property-value
(-> obj res)
'effect-joint
'exact
arg1
(the-as uint128 0)
(the-as (pointer res-tag) #f)
*res-static-buf*
)
)
)
(if (zero? v0-5)
0
(the-as int (+ v0-5 1))
)
(set! sv-320 0)
(set! sv-336 (the-as symbol #f))
(set! sv-352 (the-as symbol #f))
(set! sv-368 (the-as symbol #f))
(set! sv-400 *launch-matrix*)
(set! sv-384 (-> sv-400 trans))
(let ((v1-55 (-> (vector<-cspace! (new 'stack-no-clear 'vector) (-> obj process node-list data s5-0)) quad)))
(set! (-> sv-384 quad) v1-55)
)
((the-as (function object object object object object object object object none) s2-1)
s1-0
s0-0
s3-0
sv-320
sv-336
sv-352
sv-368
sv-400
)
)
(-> s4-1 ppointer)
)
)
)
)
((let ((v1-58 (symbol->string arg0)))
(and (= (-> v1-58 data 0) 101)
(= (-> v1-58 data 1) 118)
(= (-> v1-58 data 2) 101)
(= (-> v1-58 data 3) 110)
(= (-> v1-58 data 4) 116)
(= (-> v1-58 data 5) 45)
(else
(empty)
arg2
)
)
(send-event (-> obj process) arg0 arg1 s5-0)
)
)
)
(when (logtest? (-> obj flags) (effect-control-flag ecf0))
(if (send-event (-> obj process) 'effect-control arg0 arg1 s5-0)
(return 0)
)
)
(let ((v1-23 (symbol->string arg0)))
(cond
((and (= (-> v1-23 data 0) 101)
(= (-> v1-23 data 1) 102)
(= (-> v1-23 data 2) 102)
(= (-> v1-23 data 3) 101)
(= (-> v1-23 data 4) 99)
(= (-> v1-23 data 5) 116)
(= (-> v1-23 data 6) 45)
)
(let* ((s3-1 (-> obj process root))
(v1-27 (if (type? s3-1 collide-shape-moving)
s3-1
)
)
(t1-2 (if v1-27
(-> (the-as collide-shape-moving v1-27) ground-pat)
*footstep-surface*
)
)
)
(do-effect-for-surface obj arg0 arg1 s5-0 (-> obj res) t1-2)
)
((= arg0 'camera-shake)
(activate! *camera-smush-control* 819.2 15 75 1.0 0.9 (-> *display* camera-clock))
)
((let ((v1-31 (symbol->string arg0)))
(and (= (-> v1-31 data 0) 103)
(= (-> v1-31 data 1) 114)
(= (-> v1-31 data 2) 111)
(= (-> v1-31 data 3) 117)
(= (-> v1-31 data 4) 112)
(= (-> v1-31 data 5) 45)
)
)
((zero? s3-0)
(play-effect-sound obj arg0 arg1 s5-0 (-> obj res) (string->sound-name (symbol->string arg0)))
)
((= (-> (the-as basic s3-0) type) sparticle-launcher)
(set! s3-0 (cond
((zero? s3-0)
(let ((v0-10 (lookup-part-group-pointer-by-name (symbol->string arg0))))
(when v0-10
(set! (-> arg0 value) v0-10)
(set! s3-0 (-> v0-10 0))
)
)
s3-0
)
(else
(-> (the-as (pointer object) s3-0) 0)
)
)
)
(when (and (nonzero? s3-0) (= (-> (the-as basic s3-0) type) sparticle-launch-group))
(if *debug-effect-control*
(format
#t
"(~5D) effect part ~A ~A frame ~F joint ~D~%"
(-> pp clock frame-counter)
(-> obj process name)
arg0
arg1
s5-0
)
(format #t "(~5D) effect group ~A ~A frame ~F joint ~D~%" (current-time) (-> obj process name) arg0 arg1 s5-0)
)
(format
#t
"-----> (~5D) effect part ~A ~A frame ~F joint ~D~%"
(-> pp clock frame-counter)
(-> obj process name)
arg0
arg1
s5-0
)
(let ((s4-2 sp-launch-particles-var)
(s2-2 *sp-particle-system-2d*)
(s0-2 *launch-matrix*)
)
(set! (-> s0-2 trans quad)
(-> (vector<-cspace! (new 'stack-no-clear 'vector) (-> obj process node-list data s5-0)) quad)
)
(s4-2
s2-2
(the-as sparticle-launcher s3-0)
s0-2
(the-as sparticle-launch-state #f)
(the-as sparticle-launch-control #f)
1.0
)
)
)
((= (-> (the-as basic s3-0) type) sparticle-launch-group)
(if *debug-effect-control*
(format
#t
"(~5D) effect group ~A ~A frame ~F joint ~D~%"
(-> pp clock frame-counter)
(-> obj process name)
arg0
arg1
s5-0
)
)
(let ((s4-3 (get-process *default-dead-pool* part-tracker #x4000)))
(when s4-3
(let ((t9-23 (method-of-type part-tracker activate)))
(t9-23
(the-as part-tracker s4-3)
(let ((s4-1 (get-process *default-dead-pool* part-tracker #x4000)))
(when s4-1
(let ((t9-10 (method-of-type part-tracker activate)))
(t9-10
(the-as part-tracker s4-1)
(-> obj process)
(symbol->string (-> part-tracker symbol))
(the-as pointer #x70004000)
)
)
(let ((s2-3 run-function-in-process)
(s1-3 s4-3)
(s0-3 part-tracker-init)
(let ((s2-1 run-function-in-process)
(s1-0 s4-1)
(s0-0 part-tracker-init)
)
(set! sv-416 0)
(set! sv-432 (the-as symbol #f))
(set! sv-448 (the-as symbol #f))
(set! sv-464 (the-as symbol #f))
(set! sv-496 *launch-matrix*)
(set! sv-480 (-> sv-496 trans))
(let ((v1-95 (-> (vector<-cspace! (new 'stack-no-clear 'vector) (-> obj process node-list data s5-0)) quad)))
(set! (-> sv-480 quad) v1-95)
(set! sv-320 0)
(set! sv-336 (the-as symbol #f))
(set! sv-352 (the-as symbol #f))
(set! sv-368 (the-as symbol #f))
(set! sv-400 *launch-matrix*)
(set! sv-384 (-> sv-400 trans))
(let ((v1-55 (-> (vector<-cspace! (new 'stack-no-clear 'vector) (-> obj process node-list data s5-0)) quad)))
(set! (-> sv-384 quad) v1-55)
)
((the-as (function object object object object object object object object none) s2-3)
s1-3
s0-3
((the-as (function object object object object object object object object none) s2-1)
s1-0
s0-0
s3-0
sv-416
sv-432
sv-448
sv-464
sv-496
sv-320
sv-336
sv-352
sv-368
sv-400
)
)
(-> s4-3 ppointer)
(-> s4-1 ppointer)
)
)
)
((= (-> (the-as basic s3-0) type) sound-spec)
(sound-play-by-spec
(the-as sound-spec s3-0)
(new-sound-id)
(vector<-cspace! (new 'stack-no-clear 'vector) (-> obj process node-list data s5-0))
)
)
((let ((v1-58 (symbol->string arg0)))
(and (= (-> v1-58 data 0) 101)
(= (-> v1-58 data 1) 118)
(= (-> v1-58 data 2) 101)
(= (-> v1-58 data 3) 110)
(= (-> v1-58 data 4) 116)
(= (-> v1-58 data 5) 45)
)
)
((= (-> (the-as basic s3-0) type) death-info)
(when (and (logtest? (-> obj flags) (effect-control-flag ecf1)) (zero? (-> obj process draw death-timer)))
(let ((v1-106 (-> obj process draw)))
(let ((a1-51 (-> (the-as death-info s3-0) vertex-skip))
(a0-77
(max
2
(the-as int (/ (-> (the-as death-info s3-0) timer) (the-as uint (the int (-> *display* time-factor)))))
)
)
)
(when (= (-> *setting-control* user-current video-mode) 'pal)
(if (< (the-as uint 1) a1-51)
(set! a1-51 (/ (the-as uint (* (the-as uint 50) a1-51)) (the-as uint 60)))
)
)
(let ((a2-37 (-> *display* frames (-> *display* last-screen) run-time)))
(cond
((< 9000 a2-37)
(set! a1-51 (* a1-51 4))
)
((< 7000 a2-37)
(set! a1-51 (* a1-51 2))
)
)
)
(set! (-> v1-106 death-vertex-skip) a1-51)
(set! (-> v1-106 death-effect) (-> (the-as death-info s3-0) effect))
(set! (-> v1-106 death-timer) (the-as uint (+ a0-77 1)))
(send-event (-> obj process) arg0 arg1 s5-0)
)
((= arg0 'camera-shake)
(activate! *camera-smush-control* 819.2 15 75 1.0 0.9 (-> *display* camera-clock))
)
((zero? s3-0)
(play-effect-sound obj arg0 arg1 s5-0 (-> obj res) (string->sound-name (symbol->string arg0)))
)
((= (-> (the-as basic s3-0) type) sparticle-launcher)
(if *debug-effect-control*
(format #t "(~5D) effect part ~A ~A frame ~F joint ~D~%" (current-time) (-> obj process name) arg0 arg1 s5-0)
)
(format
#t
"-----> (~5D) effect part ~A ~A frame ~F joint ~D~%"
(current-time)
(-> obj process name)
arg0
arg1
s5-0
)
(let ((s4-2 sp-launch-particles-var)
(s2-2 *sp-particle-system-2d*)
(s0-2 *launch-matrix*)
)
(set! (-> s0-2 trans quad)
(-> (vector<-cspace! (new 'stack-no-clear 'vector) (-> obj process node-list data s5-0)) quad)
)
(set! (-> v1-106 death-timer-org) (-> v1-106 death-timer))
(set! (-> v1-106 death-draw-overlap) (-> (the-as death-info s3-0) overlap))
)
(when (-> (the-as death-info s3-0) sound)
(let* ((s2-5 obj)
(s1-4 (method-of-object s2-5 play-effect-sound))
(s0-4 (-> (the-as death-info s3-0) sound))
)
(set! sv-512 (-> obj res))
(let ((t1-12 (string->sound-name (symbol->string (-> (the-as death-info s3-0) sound)))))
(s1-4 s2-5 s0-4 arg1 s5-0 sv-512 t1-12)
)
(s4-2
s2-2
(the-as sparticle-launcher s3-0)
s0-2
(the-as sparticle-launch-state #f)
(the-as sparticle-launch-control #f)
1.0
)
)
)
((= (-> (the-as basic s3-0) type) sparticle-launch-group)
(if *debug-effect-control*
(format #t "(~5D) effect group ~A ~A frame ~F joint ~D~%" (current-time) (-> obj process name) arg0 arg1 s5-0)
)
(let ((s4-3 (get-process *default-dead-pool* part-tracker #x4000)))
(when s4-3
(let ((t9-23 (method-of-type part-tracker activate)))
(t9-23
(the-as part-tracker s4-3)
(-> obj process)
(symbol->string (-> part-tracker symbol))
(the-as pointer #x70004000)
)
)
(send-event (-> obj process) 'death-start (the-as death-info s3-0))
(let ((s2-3 run-function-in-process)
(s1-3 s4-3)
(s0-3 part-tracker-init)
)
(set! sv-416 0)
(set! sv-432 (the-as symbol #f))
(set! sv-448 (the-as symbol #f))
(set! sv-464 (the-as symbol #f))
(set! sv-496 *launch-matrix*)
(set! sv-480 (-> sv-496 trans))
(let ((v1-95 (-> (vector<-cspace! (new 'stack-no-clear 'vector) (-> obj process node-list data s5-0)) quad)))
(set! (-> sv-480 quad) v1-95)
)
((the-as (function object object object object object object object object none) s2-3)
s1-3
s0-3
s3-0
sv-416
sv-432
sv-448
sv-464
sv-496
)
)
(-> s4-3 ppointer)
)
)
(else
(play-effect-sound obj arg0 arg1 s5-0 (-> obj res) (string->sound-name (symbol->string arg0)))
)
)
((= (-> (the-as basic s3-0) type) sound-spec)
(sound-play-by-spec
(the-as sound-spec s3-0)
(new-sound-id)
(vector<-cspace! (new 'stack-no-clear 'vector) (-> obj process node-list data s5-0))
)
)
((= (-> (the-as basic s3-0) type) death-info)
(when (and (logtest? (-> obj flags) (effect-control-flag ecf1)) (zero? (-> obj process draw death-timer)))
(let ((v1-106 (-> obj process draw)))
(let ((a1-51 (-> (the-as death-info s3-0) vertex-skip))
(a0-77
(max
2
(the-as int (/ (-> (the-as death-info s3-0) timer) (the-as uint (the int (-> *display* time-factor)))))
)
)
)
(when (= (-> *setting-control* user-current video-mode) 'pal)
(if (< (the-as uint 1) a1-51)
(set! a1-51 (/ (the-as uint (* (the-as uint 50) a1-51)) (the-as uint 60)))
)
)
(let ((a2-37 (-> *display* frames (-> *display* last-screen) run-time)))
(cond
((< 9000 a2-37)
(set! a1-51 (* a1-51 4))
)
((< 7000 a2-37)
(set! a1-51 (* a1-51 2))
)
)
)
(set! (-> v1-106 death-vertex-skip) a1-51)
(set! (-> v1-106 death-effect) (-> (the-as death-info s3-0) effect))
(set! (-> v1-106 death-timer) (the-as uint (+ a0-77 1)))
)
(set! (-> v1-106 death-timer-org) (-> v1-106 death-timer))
(set! (-> v1-106 death-draw-overlap) (-> (the-as death-info s3-0) overlap))
)
(when (-> (the-as death-info s3-0) sound)
(let* ((s2-5 obj)
(s1-4 (method-of-object s2-5 play-effect-sound))
(s0-4 (-> (the-as death-info s3-0) sound))
)
(set! sv-512 (-> obj res))
(let ((t1-12 (string->sound-name (symbol->string (-> (the-as death-info s3-0) sound)))))
(s1-4 s2-5 s0-4 arg1 s5-0 sv-512 t1-12)
)
)
)
(send-event (-> obj process) 'death-start (the-as death-info s3-0))
)
)
(else
(play-effect-sound obj arg0 arg1 s5-0 (-> obj res) (string->sound-name (symbol->string arg0)))
)
)
)
0
(none)
)
0
(none)
)
(defmethod do-effect-for-surface effect-control ((obj effect-control) (arg0 symbol) (arg1 float) (arg2 int) (arg3 basic) (arg4 pat-surface))
@@ -1058,90 +1032,88 @@
(defmethod play-effect-sound effect-control ((obj effect-control) (arg0 symbol) (arg1 float) (arg2 int) (arg3 basic) (arg4 sound-name))
(local-vars (sv-112 res-tag) (sv-128 sound-name) (sv-144 basic) (sv-160 (function vector vector float)))
(with-pp
(set! sv-144 arg3)
(let ((s0-0 arg4)
(gp-0 (the-as object (new 'stack 'sound-spec)))
(s5-0 (if (< arg2 0)
(the-as vector #f)
(vector<-cspace! (new 'stack-no-clear 'vector) (-> obj process node-list data arg2))
)
(set! sv-144 arg3)
(let ((s0-0 arg4)
(gp-0 (the-as object (new 'stack 'sound-spec)))
(s5-0 (if (< arg2 0)
(the-as vector #f)
(vector<-cspace! (new 'stack-no-clear 'vector) (-> obj process node-list data arg2))
)
)
)
(set! (-> (the-as sound-spec gp-0) sound-name) s0-0)
(logior! (-> (the-as sound-spec gp-0) mask) (sound-mask volume))
(set! (-> (the-as sound-spec gp-0) pitch-mod) 0)
(set! (-> (the-as sound-spec gp-0) volume) 1024)
(set! sv-112 (new 'static 'res-tag))
(let* ((t9-2 (method-of-type res-lump get-property-data))
(a1-5 'effect-param)
(a2-1 'exact)
(a3-1 arg1)
(t0-1 #f)
(t1-1 (the-as (pointer res-tag) (& sv-112)))
(t2-0 *res-static-buf*)
(a1-6 (t9-2 (the-as res-lump sv-144) a1-5 a2-1 a3-1 (the-as pointer t0-1) t1-1 t2-0))
)
(when a1-6
(effect-param->sound-spec
(the-as sound-spec gp-0)
(the-as (pointer float) a1-6)
(the-as int (-> sv-112 elt-count))
(the-as process-focusable (-> obj process))
)
(if (logtest? (-> (the-as sound-spec gp-0) mask) (sound-mask unk))
(return 0)
)
)
)
(let ((f0-0 (-> *setting-control* user-current under-water-pitch-mod)))
(when (!= f0-0 0.0)
(logior! (-> (the-as sound-spec gp-0) mask) (sound-mask pitch))
(let ((f0-1 (* 2.0 f0-0)))
(set! (-> (the-as sound-spec gp-0) pitch-mod)
(- (-> (the-as sound-spec gp-0) pitch-mod) (the int (* 1524.0 f0-1)))
)
)
(set! (-> (the-as sound-spec gp-0) sound-name) s0-0)
(logior! (-> (the-as sound-spec gp-0) mask) (sound-mask volume))
(set! (-> (the-as sound-spec gp-0) pitch-mod) 0)
(set! (-> (the-as sound-spec gp-0) volume) 1024)
(set! sv-112 (new 'static 'res-tag))
(let* ((t9-2 (method-of-type res-lump get-property-data))
(a1-5 'effect-param)
(a2-1 'exact)
(a3-1 arg1)
(t0-1 #f)
(t1-1 (the-as (pointer res-tag) (& sv-112)))
(t2-0 *res-static-buf*)
(a1-6 (t9-2 (the-as res-lump sv-144) a1-5 a2-1 a3-1 (the-as pointer t0-1) t1-1 t2-0))
)
(when a1-6
(effect-param->sound-spec
(the-as sound-spec gp-0)
(the-as (pointer float) a1-6)
(the-as int (-> sv-112 elt-count))
(the-as process-focusable (-> obj process))
)
(if (logtest? (-> (the-as sound-spec gp-0) mask) (sound-mask unk))
(return 0)
)
)
)
(let ((f0-0 (-> *setting-control* user-current under-water-pitch-mod)))
(when (!= f0-0 0.0)
(logior! (-> (the-as sound-spec gp-0) mask) (sound-mask pitch))
(let ((f0-1 (* 2.0 f0-0)))
(set! (-> (the-as sound-spec gp-0) pitch-mod)
(- (-> (the-as sound-spec gp-0) pitch-mod) (the int (* 1524.0 f0-1)))
)
)
)
)
(if (or (and (nonzero? (-> (the-as sound-spec gp-0) fo-max))
(let ((f30-0 (* 4096.0 (the float (-> (the-as sound-spec gp-0) fo-max)))))
(set! sv-160 vector-vector-distance)
(let ((a0-8 (ear-trans 0))
(a1-7 s5-0)
)
(< f30-0 (sv-160 a0-8 a1-7))
)
)
(if (or (and (nonzero? (-> (the-as sound-spec gp-0) fo-max))
(let ((f30-0 (* 4096.0 (the float (-> (the-as sound-spec gp-0) fo-max)))))
(set! sv-160 vector-vector-distance)
(let ((a0-8 (ear-trans 0))
(a1-7 s5-0)
)
(< f30-0 (sv-160 a0-8 a1-7))
)
)
(= (-> (the-as (pointer int8) gp-0) 9) 126)
)
(return 0)
)
(when *debug-effect-control*
(set! sv-128 s0-0)
(string<-charp (clear *temp-string*) (the-as (pointer uint8) (& sv-128)))
(format
#t
"(~5D) effect sound ~A ~A (~S) frame ~F joint ~D "
(-> pp clock frame-counter)
(-> obj process name)
arg0
*temp-string*
arg1
arg2
)
(format
#t
"volume: ~f pitch-mod: ~f~%"
(* 0.09765625 (the float (-> (the-as sound-spec gp-0) volume)))
(* 0.000656168 (the float (-> (the-as sound-spec gp-0) pitch-mod)))
)
)
(= (-> (the-as (pointer int8) gp-0) 9) 126)
)
(return 0)
)
(when *debug-effect-control*
(set! sv-128 s0-0)
(string<-charp (clear *temp-string*) (the-as (pointer uint8) (& sv-128)))
(format
#t
"(~5D) effect sound ~A ~A (~S) frame ~F joint ~D "
(current-time)
(-> obj process name)
arg0
*temp-string*
arg1
arg2
)
(format
#t
"volume: ~f pitch-mod: ~f~%"
(* 0.09765625 (the float (-> (the-as sound-spec gp-0) volume)))
(* 0.000656168 (the float (-> (the-as sound-spec gp-0) pitch-mod)))
)
(sound-play-by-spec (the-as sound-spec gp-0) (new-sound-id) s5-0)
)
0
(sound-play-by-spec (the-as sound-spec gp-0) (new-sound-id) s5-0)
)
0
)
(defbehavior target-land-effect target ()
+7 -7
View File
@@ -902,8 +902,8 @@
(set! (-> v1-9 origin z) (the float (/ (-> s3-0 z) 16)))
)
(set! (-> s5-0 flags) (font-flags shadow kerning large))
(let ((s3-1 (-> self clock frame-counter)))
(until (>= (- (-> self clock frame-counter) s3-1) (+ arg2 -75))
(let ((s3-1 (current-time)))
(until (>= (- (current-time) s3-1) (+ arg2 -75))
(+! (-> s5-0 origin y) (* -120.0 (-> self clock seconds-per-frame)))
(let ((s2-0 print-game-text))
(format (clear *temp-string*) "~4,,0f" arg1)
@@ -912,9 +912,9 @@
(suspend)
)
)
(let ((s4-1 (-> self clock frame-counter)))
(until (>= (- (-> self clock frame-counter) s4-1) (seconds 0.25))
(set! (-> s5-0 alpha) (lerp-scale 1.0 0.0 (the float (- (-> self clock frame-counter) s4-1)) 0.0 150.0))
(let ((s4-1 (current-time)))
(until (>= (- (current-time) s4-1) (seconds 0.25))
(set! (-> s5-0 alpha) (lerp-scale 1.0 0.0 (the float (- (current-time) s4-1)) 0.0 150.0))
(+! (-> s5-0 origin y) (* -120.0 (-> self clock seconds-per-frame)))
(let ((s3-2 print-game-text))
(format (clear *temp-string*) "~4,,0f" arg1)
@@ -1339,8 +1339,8 @@
process
(lambda :behavior process
((arg0 string))
(let ((s5-0 (-> self clock frame-counter)))
(until (>= (- (-> self clock frame-counter) s5-0) (seconds 10))
(let ((s5-0 (current-time)))
(until (>= (- (current-time) s5-0) (seconds 10))
(format *stdcon* "~S~%" arg0)
(suspend)
)

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