mirror of
https://github.com/open-goal/jak-project.git
synced 2024-11-27 00:10:31 +00:00
[game] pc port progress menu (#1281)
* fix typo * more typo * shorten discord rpc text * allow expanding enums after the fact (untested) * make `game_text` work similar to subtitles * update progress decomp * update some types + `do-not-decompile` in bitfield * fixes and fall back to original progress code * update `progress` decomp with new enums * update config files * fix enums and debug menu * always allocate (but not use) a lot of particles * small rework to display mode options * revert resolution/aspect-ratio symbol mess * begin the override stuff * make `progress-draw` more readable * more fixes * codacy good boy points * first step overriding code * finish progress overrides, game options menu fully functional! * minor fixes * Update game.gp * Update sparticle-launcher.gc * clang * change camera controls text * oops * some cleanup * derp * nice job * implement menu scrolling lol * make scrollable menus less cramped, fix arrows * make some carousell things i guess * add msaa carousell to test * oops * Update progress-pc.gc * make `pc-get-screen-size` (untested) * resolution menu * input fixes * return when selecting resolution * scroll fixes * Update progress-pc.gc * add "fit to screen" button * bug * complete resolutions menu * aspect ratio menu * subtitles language * subtitle speaker * final adjustments * ref test * fix tests * fix ref! * reduce redundancy a bit * fix mem leaks? * save settings on progress exit * fix init reorder * remove unused code * rename goal project-like files to the project extension * sha display toggle * aspect ratio settings fixes * dont store text db's in compiler * properly save+load native aspect stuff
This commit is contained in:
parent
b408c78698
commit
a7eee4fdc9
@ -38,9 +38,7 @@ ThreadID::ThreadID(pid_t _id) : id(_id) {}
|
||||
/*!
|
||||
* In Linux, the string representation of a ThreadID is just the number printed in base 10
|
||||
*/
|
||||
ThreadID::ThreadID(const std::string& str) {
|
||||
id = std::stoi(str);
|
||||
}
|
||||
ThreadID::ThreadID(const std::string& str) : id(std::stoi(str)) {}
|
||||
|
||||
std::string ThreadID::to_string() const {
|
||||
return std::to_string(id);
|
||||
|
@ -17,15 +17,10 @@ namespace v2 {
|
||||
struct Node {
|
||||
Node() = default;
|
||||
|
||||
Node(const std::string& str) {
|
||||
kind = Kind::ATOM;
|
||||
atom_str = str;
|
||||
}
|
||||
Node(const std::string& str) : kind(Kind::ATOM), atom_str(str) {}
|
||||
|
||||
Node(std::vector<Node>&& list, bool is_list) {
|
||||
kind = is_list ? Kind::LIST : Kind::IMPROPER_LIST;
|
||||
child_nodes = std::move(list);
|
||||
}
|
||||
Node(std::vector<Node>&& list, bool is_list)
|
||||
: kind(is_list ? Kind::LIST : Kind::IMPROPER_LIST), child_nodes(std::move(list)) {}
|
||||
enum class Kind : u8 { ATOM, LIST, IMPROPER_LIST, INVALID } kind = Kind::INVALID;
|
||||
|
||||
std::vector<Node> child_nodes;
|
||||
|
@ -936,12 +936,16 @@ std::string BasicType::diff_impl(const Type& other_) const {
|
||||
// Bitfield
|
||||
/////////////////
|
||||
|
||||
BitField::BitField(TypeSpec type, std::string name, int offset, int size)
|
||||
: m_type(std::move(type)), m_name(std::move(name)), m_offset(offset), m_size(size) {}
|
||||
BitField::BitField(TypeSpec type, std::string name, int offset, int size, bool skip_in_decomp)
|
||||
: m_type(std::move(type)),
|
||||
m_name(std::move(name)),
|
||||
m_offset(offset),
|
||||
m_size(size),
|
||||
m_skip_in_static_decomp(skip_in_decomp) {}
|
||||
|
||||
bool BitField::operator==(const BitField& other) const {
|
||||
return m_type == other.m_type && m_name == other.m_name && m_offset == other.m_offset &&
|
||||
other.m_size == m_size;
|
||||
m_size == other.m_size;
|
||||
}
|
||||
|
||||
std::string BitField::diff(const BitField& other) const {
|
||||
@ -963,6 +967,11 @@ std::string BitField::diff(const BitField& other) const {
|
||||
result += fmt::format("size: {} vs. {}\n", m_size, other.m_size);
|
||||
}
|
||||
|
||||
if (m_skip_in_static_decomp != other.m_skip_in_static_decomp) {
|
||||
result += fmt::format("skip_in_static_decomp: {} vs. {}\n", m_skip_in_static_decomp,
|
||||
other.m_skip_in_static_decomp);
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@ -325,11 +325,12 @@ class BasicType : public StructureType {
|
||||
class BitField {
|
||||
public:
|
||||
BitField() = default;
|
||||
BitField(TypeSpec type, std::string name, int offset, int size);
|
||||
BitField(TypeSpec type, std::string name, int offset, int size, bool skip_in_decomp);
|
||||
const std::string name() const { return m_name; }
|
||||
int offset() const { return m_offset; }
|
||||
int size() const { return m_size; }
|
||||
const TypeSpec& type() const { return m_type; }
|
||||
bool skip_in_decomp() const { return m_skip_in_static_decomp; }
|
||||
bool operator==(const BitField& other) const;
|
||||
bool operator!=(const BitField& other) const { return !((*this) == other); }
|
||||
std::string diff(const BitField& other) const;
|
||||
@ -340,6 +341,7 @@ class BitField {
|
||||
std::string m_name;
|
||||
int m_offset = -1; // in bits
|
||||
int m_size = -1; // in bits.
|
||||
bool m_skip_in_static_decomp = false;
|
||||
};
|
||||
|
||||
class BitFieldType : public ValueType {
|
||||
|
@ -1588,7 +1588,8 @@ void TypeSystem::add_field_to_bitfield(BitFieldType* type,
|
||||
const std::string& field_name,
|
||||
const TypeSpec& field_type,
|
||||
int offset,
|
||||
int field_size) {
|
||||
int field_size,
|
||||
bool skip_in_decomp) {
|
||||
// in bits
|
||||
auto load_size = lookup_type(field_type)->get_load_size() * 8;
|
||||
if (field_size == -1) {
|
||||
@ -1616,7 +1617,7 @@ void TypeSystem::add_field_to_bitfield(BitFieldType* type,
|
||||
type->get_name(), field_name, offset, offset + field_size);
|
||||
}
|
||||
|
||||
BitField field(field_type, field_name, offset, field_size);
|
||||
BitField field(field_type, field_name, offset, field_size, skip_in_decomp);
|
||||
type->m_fields.push_back(field);
|
||||
}
|
||||
|
||||
|
@ -222,7 +222,8 @@ class TypeSystem {
|
||||
const std::string& field_name,
|
||||
const TypeSpec& field_type,
|
||||
int offset,
|
||||
int field_size);
|
||||
int field_size,
|
||||
bool skip_in_decomp);
|
||||
|
||||
bool should_use_virtual_methods(const Type* type, int method_id) const;
|
||||
bool should_use_virtual_methods(const TypeSpec& type, int method_id) const;
|
||||
|
@ -60,7 +60,7 @@ EnumType* parse_defenum(const goos::Object& defenum, TypeSystem* ts) {
|
||||
while (current.is_symbol() && symbol_string(current).at(0) == ':') {
|
||||
auto option_name = symbol_string(current);
|
||||
iter = cdr(iter);
|
||||
auto option_value = car(iter);
|
||||
auto& option_value = car(iter);
|
||||
iter = cdr(iter);
|
||||
|
||||
if (option_name == ":type") {
|
||||
@ -82,7 +82,7 @@ EnumType* parse_defenum(const goos::Object& defenum, TypeSystem* ts) {
|
||||
}
|
||||
for (auto& e : other_info->entries()) {
|
||||
if (entries.find(e.first) != entries.end()) {
|
||||
throw std::runtime_error(fmt::format("Entry {} appears multiple times.", e.first));
|
||||
throw std::runtime_error(fmt::format("Entry {} appears multiple times", e.first));
|
||||
}
|
||||
entries[e.first] = e.second;
|
||||
}
|
||||
|
@ -163,6 +163,7 @@ void add_bitfield(BitFieldType* bitfield_type, TypeSystem* ts, const goos::Objec
|
||||
|
||||
int offset_override = -1;
|
||||
int size_override = -1;
|
||||
bool skip_in_decomp = false;
|
||||
|
||||
if (!rest->is_empty_list()) {
|
||||
while (!rest->is_empty_list()) {
|
||||
@ -175,6 +176,8 @@ void add_bitfield(BitFieldType* bitfield_type, TypeSystem* ts, const goos::Objec
|
||||
} else if (opt_name == ":size") {
|
||||
size_override = get_int(car(rest));
|
||||
rest = cdr(rest);
|
||||
} else if (opt_name == ":do-not-decompile") {
|
||||
skip_in_decomp = true;
|
||||
} else {
|
||||
throw std::runtime_error("Invalid option in field specification: " + opt_name);
|
||||
}
|
||||
@ -186,7 +189,8 @@ void add_bitfield(BitFieldType* bitfield_type, TypeSystem* ts, const goos::Objec
|
||||
}
|
||||
|
||||
// it's fine if the size is -1, that means it'll just use the type's size.
|
||||
ts->add_field_to_bitfield(bitfield_type, name, type, offset_override, size_override);
|
||||
ts->add_field_to_bitfield(bitfield_type, name, type, offset_override, size_override,
|
||||
skip_in_decomp);
|
||||
}
|
||||
|
||||
void declare_method(Type* type, TypeSystem* type_system, const goos::Object& def) {
|
||||
|
@ -524,8 +524,8 @@ FormElement* make_label_load(int label_idx,
|
||||
if (as_bitfield && load_kind != LoadVarOp::Kind::FLOAT && load_size == 8) {
|
||||
// get the data
|
||||
ASSERT((label.offset % 8) == 0);
|
||||
auto word0 = env.file->words_by_seg.at(label.target_segment).at(label.offset / 4);
|
||||
auto word1 = env.file->words_by_seg.at(label.target_segment).at(1 + (label.offset / 4));
|
||||
auto& word0 = env.file->words_by_seg.at(label.target_segment).at(label.offset / 4);
|
||||
auto& word1 = env.file->words_by_seg.at(label.target_segment).at(1 + (label.offset / 4));
|
||||
ASSERT(word0.kind() == LinkedWord::PLAIN_DATA);
|
||||
ASSERT(word1.kind() == LinkedWord::PLAIN_DATA);
|
||||
u64 value;
|
||||
|
@ -224,18 +224,6 @@ Config read_config_file(const std::string& path_to_config_file,
|
||||
config.levels_to_extract = inputs_json.at("levels_to_extract").get<std::vector<std::string>>();
|
||||
config.levels_extract = cfg.at("levels_extract").get<bool>();
|
||||
|
||||
// get new strings
|
||||
if (!cfg.contains("new_strings_file")) {
|
||||
return config;
|
||||
}
|
||||
|
||||
auto new_strings_json = read_json_file_from_config(cfg, "new_strings_file");
|
||||
config.new_strings_same_across_langs = new_strings_json.at("same_across_languages")
|
||||
.get<std::unordered_map<std::string, std::string>>();
|
||||
config.new_strings_different_across_langs =
|
||||
new_strings_json.at("different_across_languages")
|
||||
.get<std::unordered_map<std::string, std::vector<std::string>>>();
|
||||
|
||||
return config;
|
||||
}
|
||||
|
||||
|
@ -130,9 +130,6 @@ struct Config {
|
||||
std::unordered_map<std::string, std::vector<StackStructureHint>>
|
||||
stack_structure_hints_by_function;
|
||||
|
||||
std::unordered_map<std::string, std::string> new_strings_same_across_langs;
|
||||
std::unordered_map<std::string, std::vector<std::string>> new_strings_different_across_langs;
|
||||
|
||||
std::unordered_map<std::string, int> bad_format_strings;
|
||||
|
||||
std::vector<std::string> levels_to_extract;
|
||||
|
@ -703,24 +703,24 @@
|
||||
:bitfield #t
|
||||
:type uint32
|
||||
(display-marks 0)
|
||||
(bit1 1) ;; TODO - nav-control::9
|
||||
(bit2 2) ;; TODO - nav-control::9
|
||||
(bit3 3) ;; TODO - nav-enemy::45 | nav-control::9
|
||||
(bit4 4) ;; TODO - nav-control::9
|
||||
(bit5 5) ;; TODO - nav-enemy::45 | ;; TODO - nav-control::9
|
||||
(bit6 6) ;; TODO - nav-enemy::45 | ;; TODO - nav-control::9
|
||||
(bit7 7) ;; TODO - nav-enemy::45 | ;; TODO - nav-control::9
|
||||
(bit8 8)
|
||||
(bit9 9) ;; TODO - nav-control::14 | 11
|
||||
(bit10 10) ;; TODO - nav-enemy::nav-enemy-patrol-post
|
||||
(bit11 11) ;; TODO - nav-control::28
|
||||
(bit12 12) ;; TODO - rolling-lightning-mole::(enter nav-enemy-chase fleeing-nav-enemy)
|
||||
(bit13 13)
|
||||
(bit17 17) ;; TODO - nav-control::11
|
||||
(bit18 18) ;; TODO - nav-control::11
|
||||
(bit19 19) ;; TODO - nav-control::11 | 17
|
||||
(bit20 20) ;; TODO - nav-mesh::28
|
||||
(bit21 21) ;; TODO - nav-control::19
|
||||
(navcf1 1) ;; TODO - nav-control::9
|
||||
(navcf2 2) ;; TODO - nav-control::9
|
||||
(navcf3 3) ;; TODO - nav-enemy::45 | nav-control::9
|
||||
(navcf4 4) ;; TODO - nav-control::9
|
||||
(navcf5 5) ;; TODO - nav-enemy::45 | ;; TODO - nav-control::9
|
||||
(navcf6 6) ;; TODO - nav-enemy::45 | ;; TODO - nav-control::9
|
||||
(navcf7 7) ;; TODO - nav-enemy::45 | ;; TODO - nav-control::9
|
||||
(navcf8 8)
|
||||
(navcf9 9) ;; TODO - nav-control::14 | 11
|
||||
(navcf10 10) ;; TODO - nav-enemy::nav-enemy-patrol-post
|
||||
(navcf11 11) ;; TODO - nav-control::28
|
||||
(navcf12 12) ;; TODO - rolling-lightning-mole::(enter nav-enemy-chase fleeing-nav-enemy)
|
||||
(navcf13 13)
|
||||
(navcf17 17) ;; TODO - nav-control::11
|
||||
(navcf18 18) ;; TODO - nav-control::11
|
||||
(navcf19 19) ;; TODO - nav-control::11 | 17
|
||||
(navcf20 20) ;; TODO - nav-mesh::28
|
||||
(navcf21 21) ;; TODO - nav-control::19
|
||||
)
|
||||
|
||||
(defenum task-status
|
||||
@ -1300,6 +1300,68 @@
|
||||
|
||||
(inc #xf10)
|
||||
(europe #xf11)
|
||||
|
||||
;; extra IDs for pc port
|
||||
(camera-options #x1000)
|
||||
(normal #x1001)
|
||||
(inverted #x1002)
|
||||
(camera-controls-horz #x1003)
|
||||
(camera-controls-vert #x1004)
|
||||
(misc-options #x100f)
|
||||
(accessibility-options #x1010)
|
||||
(money-starburst #x1011)
|
||||
(ps2-options #x1020)
|
||||
(ps2-load-speed #x1021)
|
||||
(ps2-parts #x1022)
|
||||
(discord-rpc #x1030)
|
||||
(display-mode #x1031)
|
||||
(windowed #x1032)
|
||||
(borderless #x1033)
|
||||
(fullscreen #x1034)
|
||||
(game-resolution #x1035)
|
||||
(resolution-fmt #x1036)
|
||||
(ps2-aspect-ratio #x1037)
|
||||
(ps2-aspect-ratio-msg #x1038)
|
||||
(aspect-ratio-ps2 #x1039)
|
||||
(fit-to-screen #x103a)
|
||||
(msaa #x1050)
|
||||
(x-times-fmt #x1051)
|
||||
(2-times #x1052)
|
||||
(4-times #x1053)
|
||||
(8-times #x1054)
|
||||
(16-times #x1055)
|
||||
(frame-rate #x1060)
|
||||
(lod-bg #x1070)
|
||||
(lod-fg #x1071)
|
||||
(lod-highest #x1072)
|
||||
(lod-high #x1073)
|
||||
(lod-mid #x1074)
|
||||
(lod-low #x1075)
|
||||
(lod-lowest #x1076)
|
||||
(lod-ps2 #x1077)
|
||||
(subtitles #x1078)
|
||||
(hinttitles #x1079)
|
||||
(subtitles-language #x107a)
|
||||
(subtitles-speaker #x107b)
|
||||
(speaker-always #x107c)
|
||||
(speaker-never #x107d)
|
||||
(speaker-auto #x107e)
|
||||
(hint-log #x107f)
|
||||
(cheats #x1080)
|
||||
(cheat-eco-blue #x1090)
|
||||
(cheat-eco-red #x1091)
|
||||
(cheat-eco-green #x1092)
|
||||
(cheat-eco-yellow #x1093)
|
||||
(cheat-sidekick-alt #x1094)
|
||||
(cheat-invinc #x1095)
|
||||
(music-player #x10c0)
|
||||
(scene-player #x10c1)
|
||||
(play-credits #x10c2)
|
||||
(scrapbook #x10c3)
|
||||
(scene-0 #x1100)
|
||||
(scene-255 #x11ff)
|
||||
(hint-0 #x1200)
|
||||
(hint-511 #x13ff)
|
||||
;; GAME-TEXT-ID ENUM ENDS
|
||||
)
|
||||
|
||||
@ -10111,7 +10173,7 @@
|
||||
;; - Types
|
||||
|
||||
(deftype pat-surface (uint32)
|
||||
((skip uint8 :offset 0 :size 3)
|
||||
((skip uint8 :offset 0 :size 3 :do-not-decompile)
|
||||
(mode pat-mode :offset 3 :size 3)
|
||||
(material pat-material :offset 6 :size 6)
|
||||
(camera uint8 :offset 12 :size 2)
|
||||
@ -11478,13 +11540,26 @@
|
||||
)
|
||||
)
|
||||
|
||||
(defenum nav-flags
|
||||
:bitfield #t
|
||||
:type uint8
|
||||
(navf0 0)
|
||||
(navf1 1)
|
||||
(navf2 2)
|
||||
(navf3 3)
|
||||
(navf4 4)
|
||||
(navf5 5)
|
||||
(navf6 6)
|
||||
(navf7 7)
|
||||
)
|
||||
|
||||
(declare-type collide-edge-hold-list structure)
|
||||
(declare-type collide-work structure)
|
||||
(declare-type touching-shapes-entry structure)
|
||||
(deftype collide-shape (trsqv)
|
||||
((process process-drawable :offset-assert 140)
|
||||
((process process-drawable :offset-assert 140)
|
||||
(max-iteration-count uint8 :offset-assert 144)
|
||||
(nav-flags uint8 :offset-assert 145)
|
||||
(nav-flags nav-flags :offset-assert 145)
|
||||
(pad-byte uint8 2 :offset-assert 146)
|
||||
(pat-ignore-mask pat-surface :offset-assert 148)
|
||||
(event-self basic :offset-assert 152)
|
||||
@ -12722,15 +12797,15 @@
|
||||
(debug-draw (_type_) none 9)
|
||||
(fill-and-probe-using-line-sphere (_type_ vector vector float collide-kind process collide-tri-result int) float 10)
|
||||
(fill-and-probe-using-spheres (_type_ collide-using-spheres-params) symbol 11)
|
||||
(fill-and-probe-using-y-probe (_type_ vector float collide-kind process collide-tri-result uint) float 12)
|
||||
(fill-and-probe-using-y-probe (_type_ vector float collide-kind process-drawable collide-tri-result pat-surface) float 12)
|
||||
(fill-using-bounding-box (_type_ bounding-box collide-kind process-drawable pat-surface) none 13)
|
||||
(fill-using-line-sphere (_type_ vector vector float collide-kind process-drawable int) none 14)
|
||||
(fill-using-spheres (_type_ collide-using-spheres-params) none 15)
|
||||
(fill-using-y-probe (_type_ vector float collide-kind process-drawable uint) none 16)
|
||||
(fill-using-y-probe (_type_ vector float collide-kind process-drawable pat-surface) none 16)
|
||||
(initialize (_type_) none 17)
|
||||
(probe-using-line-sphere (_type_ vector vector float collide-kind collide-tri-result int) float 18)
|
||||
(probe-using-spheres (_type_ collide-using-spheres-params) symbol 19)
|
||||
(probe-using-y-probe (_type_ vector float collide-kind collide-tri-result uint) float 20)
|
||||
(probe-using-y-probe (_type_ vector float collide-kind collide-tri-result pat-surface) float 20)
|
||||
(fill-from-background (_type_ (function bsp-header int collide-list none) (function collide-cache object none)) none 21) ;; second functiom is method 28
|
||||
(fill-from-foreground-using-box (_type_) none 22)
|
||||
(fill-from-foreground-using-line-sphere (_type_) none 23)
|
||||
@ -15133,20 +15208,6 @@
|
||||
:flag-assert #x900000034
|
||||
)
|
||||
|
||||
(deftype game-option (basic)
|
||||
((option-type uint64 :offset-assert 8)
|
||||
(name game-text-id :offset-assert 16)
|
||||
(scale basic :offset-assert 20)
|
||||
(param1 float :offset-assert 24)
|
||||
(param2 float :offset-assert 28)
|
||||
(param3 int32 :offset-assert 32)
|
||||
(value-to-modify pointer :offset-assert 36) ;; pointer to - symbol | ?
|
||||
)
|
||||
:method-count-assert 9
|
||||
:size-assert #x28
|
||||
:flag-assert #x900000028
|
||||
)
|
||||
|
||||
(defenum progress-screen
|
||||
:type int64
|
||||
(invalid -1)
|
||||
@ -15185,6 +15246,70 @@
|
||||
(no-disc 32)
|
||||
(bad-disc 33)
|
||||
(quit 34)
|
||||
|
||||
;; extra screens for pc port
|
||||
(camera-options)
|
||||
(accessibility-options)
|
||||
(game-ps2-options)
|
||||
(misc-options)
|
||||
(resolution)
|
||||
(aspect-msg)
|
||||
(aspect-ratio)
|
||||
(gfx-ps2-options)
|
||||
(secrets)
|
||||
(hint-log)
|
||||
(cheats)
|
||||
(scrapbook)
|
||||
(music-player)
|
||||
(scene-player)
|
||||
(credits)
|
||||
|
||||
;; the last one!
|
||||
(max)
|
||||
)
|
||||
|
||||
(defenum game-option-type
|
||||
:type uint64
|
||||
(slider 0)
|
||||
(language 1)
|
||||
(on-off 2)
|
||||
(center-screen 3)
|
||||
(aspect-ratio 4)
|
||||
(video-mode 5)
|
||||
(menu 6)
|
||||
(yes-no 7)
|
||||
(button 8)
|
||||
|
||||
;; extra types for pc port
|
||||
(normal-inverted)
|
||||
(display-mode)
|
||||
(msaa)
|
||||
(frame-rate)
|
||||
(lod-bg)
|
||||
(lod-fg)
|
||||
(resolution)
|
||||
(aspect-new)
|
||||
(language-subtitles)
|
||||
(speaker)
|
||||
(aspect-native)
|
||||
)
|
||||
|
||||
(defenum game-option-menu
|
||||
:type int32
|
||||
:copy-entries progress-screen)
|
||||
|
||||
(deftype game-option (basic)
|
||||
((option-type game-option-type :offset-assert 8)
|
||||
(name game-text-id :offset-assert 16)
|
||||
(scale symbol :offset-assert 20)
|
||||
(param1 float :offset-assert 24)
|
||||
(param2 float :offset-assert 28)
|
||||
(param3 game-option-menu :offset-assert 32)
|
||||
(value-to-modify pointer :offset-assert 36)
|
||||
)
|
||||
:method-count-assert 9
|
||||
:size-assert #x28
|
||||
:flag-assert #x900000028
|
||||
)
|
||||
|
||||
(deftype progress (process)
|
||||
@ -15206,8 +15331,8 @@
|
||||
(force-transition basic :offset-assert 180)
|
||||
(stat-transition basic :offset-assert 184)
|
||||
(level-transition int32 :offset-assert 188)
|
||||
(language-selection uint64 :offset-assert 192)
|
||||
(language-direction basic :offset-assert 200)
|
||||
(language-selection language-enum :offset-assert 192)
|
||||
(language-direction symbol :offset-assert 200)
|
||||
(language-transition basic :offset-assert 204)
|
||||
(language-x-offset int32 :offset-assert 208)
|
||||
(sides-x-scale float :offset-assert 212)
|
||||
@ -15231,8 +15356,8 @@
|
||||
(total-nb-of-orbs int32 :offset-assert 284)
|
||||
(total-nb-of-buzzers int32 :offset-assert 288)
|
||||
(card-info mc-slot-info :offset-assert 292)
|
||||
(last-option-index-change time-frame :offset-assert 296)
|
||||
(video-mode-timeout time-frame :offset-assert 304)
|
||||
(last-option-index-change time-frame :offset-assert 296)
|
||||
(video-mode-timeout time-frame :offset-assert 304)
|
||||
(display-state-stack progress-screen 5 :offset-assert 312)
|
||||
(option-index-stack int32 5 :offset-assert 352)
|
||||
(display-state-pos int32 :offset-assert 372)
|
||||
@ -15248,12 +15373,12 @@
|
||||
:heap-base #x270
|
||||
:flag-assert #x3b027002dc
|
||||
(:methods
|
||||
(dummy-14 (_type_) none 14)
|
||||
(dummy-15 (_type_) none 15)
|
||||
(dummy-16 (_type_) none 16)
|
||||
(progress-dummy-14 (_type_) none 14) ;; unused
|
||||
(progress-dummy-15 (_type_) none 15) ;; unused
|
||||
(progress-dummy-16 (_type_) none 16) ;; unused
|
||||
(draw-progress (_type_) none 17)
|
||||
(dummy-18 () none 18)
|
||||
(dummy-19 (_type_) symbol 19)
|
||||
(progress-dummy-18 () none 18) ;; unused
|
||||
(visible? (_type_) symbol 19)
|
||||
(hidden? (_type_) symbol 20)
|
||||
(adjust-sprites (_type_) none 21)
|
||||
(adjust-icons (_type_) none 22)
|
||||
@ -15263,10 +15388,10 @@
|
||||
(draw-buzzer-screen (_type_ int) none 26)
|
||||
(draw-notice-screen (_type_) none 27)
|
||||
(draw-options (_type_ int int float) none 28)
|
||||
(dummy-29 (_type_) none 29)
|
||||
(respond-common (_type_) none 29)
|
||||
(respond-progress (_type_) none 30)
|
||||
(dummy-31 (_type_) none 31)
|
||||
(dummy-32 (_type_) symbol 32)
|
||||
(respond-memcard (_type_) none 31)
|
||||
(can-go-back? (_type_) symbol 32)
|
||||
(initialize-icons (_type_) none 33)
|
||||
(initialize-particles (_type_) none 34)
|
||||
(draw-memcard-storage-error (_type_ font-context) none 35)
|
||||
@ -15278,16 +15403,16 @@
|
||||
(draw-memcard-auto-save-error (_type_ font-context) none 41)
|
||||
(draw-memcard-removed (_type_ font-context) none 42)
|
||||
(draw-memcard-error (_type_ font-context) none 43)
|
||||
(dummy-44 (_type_) none 44)
|
||||
(progress-dummy-44 (_type_) none 44) ;; unused
|
||||
(push! (_type_) none 45)
|
||||
(pop! (_type_) none 46)
|
||||
(dummy-47 (_type_) none 47)
|
||||
(progress-dummy-47 (_type_) none 47) ;; unused
|
||||
(enter! (_type_ progress-screen int) none 48)
|
||||
(draw-memcard-format (_type_ font-context) none 49)
|
||||
(draw-auto-save (_type_ font-context) none 50)
|
||||
(set-transition-progress! (_type_ int) none 51)
|
||||
(set-transition-speed! (_type_) none 52)
|
||||
(dummy-53 (_type_ progress-screen) progress-screen 53)
|
||||
(set-memcard-screen (_type_ progress-screen) progress-screen 53)
|
||||
(draw-pal-change-to-60hz (_type_ font-context) none 54)
|
||||
(draw-pal-now-60hz (_type_ font-context) none 55)
|
||||
(draw-no-disc (_type_ font-context) none 56)
|
||||
@ -17669,7 +17794,7 @@
|
||||
(life 201)
|
||||
(money 202)
|
||||
(money-total 203)
|
||||
(moeny-per-level 204)
|
||||
(money-per-level 204)
|
||||
(buzzer-total 205)
|
||||
(fuel-cell 206)
|
||||
(death-movie-tick 207)
|
||||
@ -21631,7 +21756,7 @@
|
||||
(starting-state progress-screen :offset-assert 24)
|
||||
(last-slot-saved int32 :offset-assert 32)
|
||||
(slider-backup float :offset-assert 36)
|
||||
(language-backup int64 :offset-assert 40)
|
||||
(language-backup language-enum :offset-assert 40)
|
||||
(on-off-backup symbol :offset-assert 48)
|
||||
(center-x-backup int32 :offset-assert 52)
|
||||
(center-y-backup int32 :offset-assert 56)
|
||||
@ -21710,7 +21835,7 @@
|
||||
(define-extern projectile-collision-reaction (function collide-shape-moving collide-shape-intersect vector vector uint))
|
||||
(define-extern projectile-update-velocity-space-wars (function projectile none))
|
||||
(define-extern find-nearest-attackable (function vector float uint uint vector float projectile)) ;; Whatever te search returns (match from search-info)
|
||||
(define-extern find-ground-and-draw-shadow (function vector vector float collide-kind process float float none))
|
||||
(define-extern find-ground-and-draw-shadow (function vector vector float collide-kind process-drawable float float none))
|
||||
(define-extern spawn-projectile-blue (function target none))
|
||||
|
||||
;; - Unknowns
|
||||
@ -22676,7 +22801,7 @@
|
||||
(use-proximity-notice symbol :offset-assert 204)
|
||||
(use-jump-blocked symbol :offset-assert 208)
|
||||
(use-jump-patrol symbol :offset-assert 212)
|
||||
(gnd-collide-with uint64 :offset-assert 216)
|
||||
(gnd-collide-with collide-kind :offset-assert 216)
|
||||
(debug-draw-neck symbol :offset-assert 224)
|
||||
(debug-draw-jump symbol :offset-assert 228)
|
||||
)
|
||||
@ -22685,6 +22810,43 @@
|
||||
:flag-assert #x9000000e8
|
||||
)
|
||||
|
||||
(defenum nav-enemy-flags
|
||||
:bitfield #t
|
||||
:type uint32
|
||||
(navenmf0 0)
|
||||
(navenmf1 1)
|
||||
(navenmf2 2)
|
||||
(enable-rotate 3)
|
||||
(enable-travel 4)
|
||||
(navenmf5 5)
|
||||
(navenmf6 6)
|
||||
(navenmf7 7)
|
||||
(navenmf8 8)
|
||||
(standing-jump 9)
|
||||
(drop-jump 10)
|
||||
(navenmf11 11)
|
||||
(navenmf12 12)
|
||||
(navenmf13 13)
|
||||
(navenmf14 14)
|
||||
(navenmf15 15)
|
||||
(navenmf16 16)
|
||||
(navenmf17 17)
|
||||
(navenmf18 18)
|
||||
(navenmf19 19)
|
||||
(navenmf20 20)
|
||||
(navenmf21 21)
|
||||
(navenmf22 22)
|
||||
(navenmf23 23)
|
||||
(navenmf24 24)
|
||||
(navenmf25 25)
|
||||
(navenmf26 26)
|
||||
(navenmf27 27)
|
||||
(navenmf28 28)
|
||||
(navenmf29 29)
|
||||
(navenmf30 30)
|
||||
(navenmf31 31)
|
||||
)
|
||||
|
||||
(deftype nav-enemy (process-drawable)
|
||||
((collide-info collide-shape-moving :score 100 :offset 112)
|
||||
(enemy-info fact-info-enemy :score 100 :offset 144)
|
||||
@ -22693,22 +22855,22 @@
|
||||
(frustration-point vector :inline :offset-assert 208)
|
||||
(jump-dest vector :inline :offset-assert 224)
|
||||
(jump-trajectory trajectory :inline :offset-assert 240)
|
||||
(jump-time time-frame :offset-assert 280)
|
||||
(jump-time time-frame :offset-assert 280)
|
||||
(nav-info nav-enemy-info :offset-assert 288)
|
||||
(target-speed float :offset-assert 292)
|
||||
(momentum-speed float :offset-assert 296)
|
||||
(acceleration float :offset-assert 300)
|
||||
(rotate-speed float :offset-assert 304)
|
||||
(turn-time time-frame :offset-assert 312)
|
||||
(frustration-time time-frame :offset-assert 320)
|
||||
(turn-time time-frame :offset-assert 312)
|
||||
(frustration-time time-frame :offset-assert 320)
|
||||
(speed-scale float :offset-assert 328)
|
||||
(neck joint-mod :offset-assert 332)
|
||||
(reaction-time time-frame :offset-assert 336)
|
||||
(notice-time time-frame :offset-assert 344)
|
||||
(state-timeout time-frame :offset-assert 352)
|
||||
(free-time time-frame :offset-assert 360)
|
||||
(touch-time time-frame :offset-assert 368)
|
||||
(nav-enemy-flags uint32 :offset-assert 376)
|
||||
(reaction-time time-frame :offset-assert 336)
|
||||
(notice-time time-frame :offset-assert 344)
|
||||
(state-timeout time-frame :offset-assert 352)
|
||||
(free-time time-frame :offset-assert 360)
|
||||
(touch-time time-frame :offset-assert 368)
|
||||
(nav-enemy-flags nav-enemy-flags :offset-assert 376)
|
||||
(incomming-attack-id handle :offset-assert 384)
|
||||
(jump-return-state (state process) :offset-assert 392)
|
||||
(rand-gen random-generator :offset-assert 396)
|
||||
|
@ -74,7 +74,6 @@
|
||||
"stack_structures_file": "decompiler/config/jak1_ntsc_black_label/stack_structures.jsonc",
|
||||
"hacks_file": "decompiler/config/jak1_ntsc_black_label/hacks.jsonc",
|
||||
"inputs_file": "decompiler/config/jak1_ntsc_black_label/inputs.jsonc",
|
||||
"new_strings_file": "decompiler/config/jak1_ntsc_black_label/new_strings.jsonc",
|
||||
|
||||
// optional: a predetermined object file name map from a file.
|
||||
// this will make decompilation naming consistent even if you only run on some objects.
|
||||
|
@ -18,7 +18,8 @@
|
||||
"cond_with_else_max_lengths": [
|
||||
["(method 20 res-lump)", "b0", 2],
|
||||
["(method 11 res-lump)", "b0", 1],
|
||||
["(method 12 res-lump)", "b0", 1]
|
||||
["(method 12 res-lump)", "b0", 1],
|
||||
["(method 31 progress)", "b35", 1]
|
||||
],
|
||||
|
||||
// if a cond with an else case is being used a value in a place where it looks wrong
|
||||
|
@ -262,7 +262,14 @@
|
||||
//"audio_dir_file_name": "jak1/VAG",
|
||||
"audio_dir_file_name": "",
|
||||
|
||||
"streamed_audio_file_names": ["VAGWAD.ENG", "VAGWAD.JAP"],
|
||||
"streamed_audio_file_names": [
|
||||
"VAGWAD.ENG",
|
||||
"VAGWAD.FRE",
|
||||
"VAGWAD.SPA",
|
||||
"VAGWAD.GER",
|
||||
"VAGWAD.ITA",
|
||||
"VAGWAD.JAP"
|
||||
],
|
||||
|
||||
"levels_to_extract": [
|
||||
"BEA.DGO",
|
||||
|
@ -244,7 +244,29 @@
|
||||
["L231", "(pointer uint64)", 1]
|
||||
],
|
||||
|
||||
"progress-static": [["L121", "(array game-text-id)"]],
|
||||
"progress-static": [
|
||||
["L121", "(array game-text-id)"],
|
||||
["L195", "(array game-option)"],
|
||||
["L190", "(array game-option)"],
|
||||
["L185", "(array game-option)"],
|
||||
["L180", "(array game-option)"],
|
||||
["L174", "(array game-option)"],
|
||||
["L169", "(array game-option)"],
|
||||
["L165", "(array game-option)"],
|
||||
["L161", "(array game-option)"],
|
||||
["L157", "(array game-option)"],
|
||||
["L152", "(array game-option)"],
|
||||
["L147", "(array game-option)"],
|
||||
["L145", "(array game-option)"],
|
||||
["L143", "(array game-option)"],
|
||||
["L137", "(array game-option)"],
|
||||
["L131", "(array game-option)"],
|
||||
["L124", "(array game-option)"],
|
||||
["L123", "(array (array game-option))"],
|
||||
["L122", "(array int32)"],
|
||||
["L3", "(array level-tasks-info)"],
|
||||
["L2", "(array int32)"]
|
||||
],
|
||||
|
||||
"rigid-body": [["L89", "rigid-body-platform-constants"]],
|
||||
|
||||
|
@ -1,57 +0,0 @@
|
||||
{
|
||||
"same_across_languages": {
|
||||
"1008": "UK ENGLISH",
|
||||
"1009": "PORTUGUÊS",
|
||||
"1010": "SUOMALAINEN",
|
||||
"1011": "SVENSKA",
|
||||
"1012": "DANSK",
|
||||
"1013": "NORSK",
|
||||
"1014": "KOREAN",
|
||||
"1015": "RUSSIAN",
|
||||
"1022": "4:3",
|
||||
"1023": "5:4",
|
||||
"1024": "16:9",
|
||||
"1025": "21:9",
|
||||
"1026": "32:9",
|
||||
"1027": "640X480",
|
||||
"1028": "800X600",
|
||||
"1029": "1024X768",
|
||||
"1030": "1280X960",
|
||||
"1031": "1600X1200",
|
||||
"1032": "960X768",
|
||||
"1033": "1280X1024",
|
||||
"1034": "1500X1200",
|
||||
"1035": "854X480",
|
||||
"1036": "1280X720",
|
||||
"1037": "1920X1080",
|
||||
"1038": "2560X1440",
|
||||
"1039": "2880X1620",
|
||||
"1040": "3840X2160",
|
||||
"1041": "5120X2880",
|
||||
"1042": "2560X1080",
|
||||
"1043": "3120X1440",
|
||||
"1044": "3200X1440",
|
||||
"1045": "3440X1440",
|
||||
"1046": "3840X1600",
|
||||
"1047": "5120X2160",
|
||||
"1048": "5120X1440"
|
||||
},
|
||||
// will pad the rest of the array with 'TODO' placeholder
|
||||
"different_across_languages": {
|
||||
"1000": ["RESOLUTION"],
|
||||
"1001": ["DISPLAY MODE"],
|
||||
"1002": ["LETTERBOX"],
|
||||
"1003": ["SUBTITLES"],
|
||||
"1004": ["SUBTITLE SPEAKER"],
|
||||
"1005": ["DISCORD RPC"],
|
||||
"1006": ["LANGUAGE OPTIONS"],
|
||||
"1007": ["SUBTITLE LANGUAGE"],
|
||||
"1016": ["ON"],
|
||||
"1017": ["OFF"],
|
||||
"1018": ["AUTO"],
|
||||
"1019": ["BORDERLESS"],
|
||||
"1020": ["FULLSCREEN"],
|
||||
"1021": ["WINDOWED"],
|
||||
"1049": ["USE ORIGINAL ASPECT"]
|
||||
}
|
||||
}
|
@ -7024,6 +7024,7 @@
|
||||
[608, "a1", "(pointer symbol)"],
|
||||
[617, "v1", "(pointer symbol)"],
|
||||
[626, "a1", "(pointer symbol)"],
|
||||
[883, "a0", "(pointer language-enum)"],
|
||||
[894, "a0", "(pointer symbol)"],
|
||||
[921, "a0", "(pointer symbol)"]
|
||||
],
|
||||
|
@ -153,8 +153,12 @@ std::string write_game_text(
|
||||
|
||||
// write!
|
||||
std::string result; // = "\xEF\xBB\xBF"; // UTF-8 encode (don't need this anymore)
|
||||
result += fmt::format("(language-count {})\n", languages.size());
|
||||
result += "(group-name \"common\")\n";
|
||||
result += "(language-id";
|
||||
for (auto lang : languages) {
|
||||
result += fmt::format(" {}", lang);
|
||||
}
|
||||
result += ")\n";
|
||||
for (auto& x : text_by_id) {
|
||||
result += fmt::format("(#x{:04x}\n ", x.first);
|
||||
for (auto& y : x.second) {
|
||||
@ -163,28 +167,6 @@ std::string write_game_text(
|
||||
result += ")\n\n";
|
||||
}
|
||||
|
||||
// add our own custom text additions from new_strings.jsonc
|
||||
// - first add the strings that are the same across all languages
|
||||
for (auto const& [key, val] : cfg.new_strings_same_across_langs) {
|
||||
result += fmt::format("(#x{}\n ", key);
|
||||
for (u32 i = 0; i < languages.size(); i++) {
|
||||
result += fmt::format("\"{}\"\n ", val);
|
||||
}
|
||||
result += ")\n\n";
|
||||
}
|
||||
// - now add the ones that are different, if they do not have all languages defined, pad with
|
||||
// placeholders
|
||||
for (auto const& [key, val] : cfg.new_strings_different_across_langs) {
|
||||
result += fmt::format("(#x{}\n ", key);
|
||||
for (auto const& str : val) {
|
||||
result += fmt::format("\"{}\"\n ", str);
|
||||
}
|
||||
for (u32 i = 0; i < languages.size() - val.size(); i++) {
|
||||
result += fmt::format("\"{}\"\n ", "TODO");
|
||||
}
|
||||
result += ")\n\n";
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
} // namespace decompiler
|
||||
|
@ -1475,7 +1475,8 @@ std::optional<std::vector<BitFieldConstantDef>> try_decompile_bitfield_from_int(
|
||||
int end_bit = 64 + start_bit;
|
||||
|
||||
for (auto& field : type_info->fields()) {
|
||||
if (field.offset() < start_bit || (field.offset() + field.size()) > end_bit) {
|
||||
if (field.skip_in_decomp() || field.offset() < start_bit ||
|
||||
(field.offset() + field.size()) > end_bit) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -4,8 +4,8 @@
|
||||
;; you can find the game-text-version parsing in .cpp and an enum in goal-lib.gc
|
||||
|
||||
(subtitle
|
||||
(jak1-v1 "game/assets/subtitle/jak1/game_subtitle_en.txt")
|
||||
(jak1-v1 "game/assets/subtitle/jak1/game_subtitle_es.txt")
|
||||
(jak1-v1 "game/assets/jak1/subtitle/game_subtitle_en.txt")
|
||||
(jak1-v1 "game/assets/jak1/subtitle/game_subtitle_es.txt")
|
||||
)
|
||||
|
||||
|
11
game/assets/game_text.gp
Normal file
11
game/assets/game_text.gp
Normal file
@ -0,0 +1,11 @@
|
||||
;; "project file" for text make tool.
|
||||
;; it's very simple... a list of (version file)
|
||||
;; eventually should also include output filename
|
||||
;; you can find the game-text-version parsing in .cpp and an enum in goal-lib.gc
|
||||
|
||||
(text
|
||||
(jak1-v1 "assets/game_text.txt")
|
||||
(jak1-v1 "game/assets/jak1/text/game_text_en.txt")
|
||||
)
|
||||
|
||||
|
143
game/assets/jak1/text/game_text_en.txt
Normal file
143
game/assets/jak1/text/game_text_en.txt
Normal file
@ -0,0 +1,143 @@
|
||||
(group-name "common")
|
||||
(language-id 0 6)
|
||||
|
||||
;; -----------------
|
||||
;; progress menu (insanity)
|
||||
|
||||
(#x1000 "CAMERA OPTIONS"
|
||||
"CAMERA OPTIONS")
|
||||
(#x1001 "NORMAL"
|
||||
"NORMAL")
|
||||
(#x1002 "INVERTED"
|
||||
"INVERTED")
|
||||
(#x1003 "HORIZONTAL CAMERA CONTROL"
|
||||
"HORIZONTAL CAMERA CONTROL")
|
||||
(#x1004 "VERTICAL CAMERA CONTROL"
|
||||
"VERTICAL CAMERA CONTROL")
|
||||
|
||||
(#x100f "MISCELLANEOUS"
|
||||
"MISCELLANEOUS")
|
||||
|
||||
(#x1010 "ACCESSIBILITY"
|
||||
"ACCESSIBILITY")
|
||||
(#x1011 "PRECURSOR ORB GLOW"
|
||||
"PRECURSOR ORB GLOW")
|
||||
|
||||
(#x1020 "PS2 OPTIONS"
|
||||
"PS2 OPTIONS")
|
||||
(#x1021 "PS2 LOAD SPEED"
|
||||
"PS2 LOAD SPEED")
|
||||
(#x1022 "PARTICLE CULLING"
|
||||
"PARTICLE CULLING")
|
||||
|
||||
(#x1030 "DISCORD RICH-PRESENCE"
|
||||
"DISCORD RICH-PRESENCE")
|
||||
|
||||
(#x1031 "DISPLAY MODE"
|
||||
"DISPLAY MODE")
|
||||
(#x1032 "WINDOWED"
|
||||
"WINDOWED")
|
||||
(#x1033 "BORDERLESS"
|
||||
"BORDERLESS")
|
||||
(#x1034 "FULLSCREEN"
|
||||
"FULLSCREEN")
|
||||
|
||||
(#x1035 "GAME RESOLUTION"
|
||||
"GAME RESOLUTION")
|
||||
(#x1036 "~D X ~D"
|
||||
"~D X ~D")
|
||||
|
||||
(#x1037 "PS2 ASPECT RATIO"
|
||||
"PS2 ASPECT RATIO")
|
||||
(#x1038 "WHEN PS2 ASPECT RATIO IS ENABLED, ONLY 4X3 AND 16X9 ASPECT RATIO CAN BE SELECTED. CONTINUE?"
|
||||
"WHEN PS2 ASPECT RATIO IS ENABLED, ONLY 4X3 AND 16X9 ASPECT RATIO CAN BE SELECTED. CONTINUE?")
|
||||
(#x1039 "ASPECT RATIO (PS2)"
|
||||
"ASPECT RATIO (PS2)")
|
||||
(#x103a "FIT TO SCREEN"
|
||||
"FIT TO SCREEN")
|
||||
|
||||
(#x1050 "MSAA"
|
||||
"MSAA")
|
||||
(#x1051 "~DX"
|
||||
"~DX")
|
||||
(#x1052 "2X"
|
||||
"2X")
|
||||
(#x1053 "4X"
|
||||
"4X")
|
||||
(#x1054 "8X"
|
||||
"8X")
|
||||
(#x1055 "16X"
|
||||
"16X")
|
||||
|
||||
(#x1060 "FRAME RATE"
|
||||
"FRAME RATE")
|
||||
|
||||
(#x1070 "LEVEL OF DETAIL (BACKGROUND)"
|
||||
"LEVEL OF DETAIL (BACKGROUND)")
|
||||
(#x1071 "LEVEL OF DETAIL (FOREGROUND)"
|
||||
"LEVEL OF DETAIL (FOREGROUND)")
|
||||
(#x1072 "HIGHEST"
|
||||
"HIGHEST")
|
||||
(#x1073 "HIGH"
|
||||
"HIGH")
|
||||
(#x1074 "MID"
|
||||
"MID")
|
||||
(#x1075 "LOW"
|
||||
"LOW")
|
||||
(#x1076 "LOWEST"
|
||||
"LOWEST")
|
||||
(#x1077 "PS2"
|
||||
"PS2")
|
||||
|
||||
(#x1078 "SUBTITLES"
|
||||
"SUBTITLES")
|
||||
(#x1079 "HINT SUBTITLES"
|
||||
"HINT SUBTITLES")
|
||||
(#x107a "SUBTITLES LANGUAGE"
|
||||
"SUBTITLES LANGUAGE")
|
||||
(#x107b "SUBTITLES SPEAKER"
|
||||
"SUBTITLES SPEAKER")
|
||||
(#x107c "ALWAYS"
|
||||
"ALWAYS")
|
||||
(#x107d "NEVER"
|
||||
"NEVER")
|
||||
(#x107e "OFF-SCREEN"
|
||||
"OFF-SCREEN")
|
||||
|
||||
(#x107f "HINT LOG"
|
||||
"HINT LOG")
|
||||
|
||||
(#x1080 "CHEATS"
|
||||
"CHEATS")
|
||||
(#x1090 "INFINITE BLUE ECO"
|
||||
"INFINITE BLUE ECO")
|
||||
(#x1091 "INFINITE RED ECO"
|
||||
"INFINITE RED ECO")
|
||||
(#x1092 "INFINITE GREEN ECO"
|
||||
"INFINITE GREEN ECO")
|
||||
(#x1093 "INFINITE YELLOW ECO"
|
||||
"INFINITE YELLOW ECO")
|
||||
(#x1094 "ALTERNATE DAXTER"
|
||||
"ALTERNATE DAXTER")
|
||||
(#x1095 "INVINCIBILITY"
|
||||
"INVINCIBILITY")
|
||||
|
||||
(#x10c0 "MUSIC PLAYER"
|
||||
"MUSIC PLAYER")
|
||||
(#x10c1 "SCENE PLAYER"
|
||||
"SCENE PLAYER")
|
||||
(#x10c2 "PLAY CREDITS"
|
||||
"PLAY CREDITS")
|
||||
(#x10c3 "SCRAPBOOK"
|
||||
"SCRAPBOOK")
|
||||
|
||||
|
||||
;; -----------------
|
||||
;; test
|
||||
|
||||
(#x7fff
|
||||
"ARMOR"
|
||||
"ARMOUR"
|
||||
)
|
||||
|
||||
|
@ -95,7 +95,7 @@ int GfxDisplay::height() {
|
||||
int h;
|
||||
m_renderer->display_size(this, NULL, &h);
|
||||
#ifdef _WIN32
|
||||
if (fullscreen_mode() == 2) {
|
||||
if (fullscreen_mode() == Gfx::DisplayMode::Borderless) {
|
||||
// windows borderless hack
|
||||
h--;
|
||||
}
|
||||
@ -103,14 +103,6 @@ int GfxDisplay::height() {
|
||||
return h;
|
||||
}
|
||||
|
||||
void GfxDisplay::set_size(int w, int h) {
|
||||
m_renderer->display_set_size(this, w, h);
|
||||
}
|
||||
|
||||
void GfxDisplay::get_scale(float* x, float* y) {
|
||||
m_renderer->display_scale(this, x, y);
|
||||
}
|
||||
|
||||
void GfxDisplay::backup_params() {
|
||||
m_renderer->display_size(this, &m_width, &m_height);
|
||||
m_renderer->display_position(this, &m_xpos, &m_ypos);
|
||||
|
@ -25,9 +25,9 @@ class GfxDisplay {
|
||||
int m_xpos;
|
||||
int m_ypos;
|
||||
|
||||
int m_fullscreen_mode = 0;
|
||||
Gfx::DisplayMode m_fullscreen_mode = Gfx::DisplayMode::Windowed;
|
||||
Gfx::DisplayMode m_fullscreen_target_mode = Gfx::DisplayMode::Windowed;
|
||||
int m_fullscreen_screen;
|
||||
int m_fullscreen_target_mode = 0;
|
||||
int m_fullscreen_target_screen;
|
||||
|
||||
public:
|
||||
@ -45,22 +45,26 @@ class GfxDisplay {
|
||||
void set_renderer(GfxPipeline pipeline);
|
||||
void set_window(GLFWwindow* window);
|
||||
void set_title(const char* title);
|
||||
void set_size(int w, int h);
|
||||
void get_scale(float* w, float* h);
|
||||
void set_size(int w, int h) { m_renderer->display_set_size(this, w, h); }
|
||||
void get_scale(float* x, float* y) { m_renderer->display_scale(this, x, y); }
|
||||
void get_screen_size(s64 vmode_idx, s32* w, s32* h, s32* c) {
|
||||
m_renderer->screen_size(this, vmode_idx, 0, w, h, c);
|
||||
}
|
||||
const char* title() const { return m_title; }
|
||||
|
||||
bool fullscreen_pending() { return m_fullscreen_mode != m_fullscreen_target_mode; }
|
||||
bool fullscreen_pending() const { return m_fullscreen_mode != m_fullscreen_target_mode; }
|
||||
void fullscreen_flush() {
|
||||
m_renderer->set_fullscreen(this, m_fullscreen_target_mode, m_fullscreen_target_screen);
|
||||
m_fullscreen_mode = m_fullscreen_target_mode;
|
||||
m_fullscreen_screen = m_fullscreen_target_screen;
|
||||
}
|
||||
void set_fullscreen(int mode, int screen) {
|
||||
void set_fullscreen(Gfx::DisplayMode mode, int screen) {
|
||||
m_fullscreen_target_mode = mode;
|
||||
m_fullscreen_target_screen = screen;
|
||||
}
|
||||
int fullscreen_mode() { return m_fullscreen_mode; }
|
||||
int fullscreen_screen() { return m_fullscreen_screen; }
|
||||
int fullscreen_mode() const { return m_fullscreen_mode; }
|
||||
int fullscreen_screen() const { return m_fullscreen_screen; }
|
||||
bool windowed() const { return m_fullscreen_mode == Gfx::DisplayMode::Windowed; }
|
||||
void backup_params();
|
||||
int width_backup() { return m_width; }
|
||||
int height_backup() { return m_height; }
|
||||
|
@ -215,12 +215,26 @@ void get_window_scale(float* x, float* y) {
|
||||
}
|
||||
}
|
||||
|
||||
int get_fullscreen() {
|
||||
if (Display::GetMainDisplay()) {
|
||||
return Display::GetMainDisplay()->fullscreen_mode();
|
||||
} else {
|
||||
return DisplayMode::Windowed;
|
||||
}
|
||||
}
|
||||
|
||||
void get_screen_size(s64 vmode_idx, s32* w, s32* h, s32* c) {
|
||||
if (Display::GetMainDisplay()) {
|
||||
Display::GetMainDisplay()->get_screen_size(vmode_idx, w, h, c);
|
||||
}
|
||||
}
|
||||
|
||||
void set_letterbox(int w, int h) {
|
||||
g_global_settings.lbox_w = w;
|
||||
g_global_settings.lbox_h = h;
|
||||
}
|
||||
|
||||
void set_fullscreen(int mode, int screen) {
|
||||
void set_fullscreen(DisplayMode mode, int screen) {
|
||||
if (Display::GetMainDisplay()) {
|
||||
Display::GetMainDisplay()->set_fullscreen(mode, screen);
|
||||
}
|
||||
|
@ -31,6 +31,7 @@ struct GfxRendererModule {
|
||||
std::function<void(GfxDisplay*, int, int)> display_set_size;
|
||||
std::function<void(GfxDisplay*, float*, float*)> display_scale;
|
||||
std::function<void(GfxDisplay*, int, int)> set_fullscreen;
|
||||
std::function<void(GfxDisplay*, int, int, s32*, s32*, s32*)> screen_size;
|
||||
std::function<void()> exit;
|
||||
std::function<u32()> vsync;
|
||||
std::function<u32()> sync_path;
|
||||
@ -87,6 +88,8 @@ extern GfxSettings g_settings;
|
||||
const GfxRendererModule* GetRenderer(GfxPipeline pipeline);
|
||||
const GfxRendererModule* GetCurrentRenderer();
|
||||
|
||||
enum DisplayMode { Windowed = 0, Fullscreen = 1, Borderless = 2 };
|
||||
|
||||
u32 Init();
|
||||
void Loop(std::function<bool()> f);
|
||||
u32 Exit();
|
||||
@ -102,8 +105,10 @@ u64 get_window_width();
|
||||
u64 get_window_height();
|
||||
void set_window_size(u64 w, u64 h);
|
||||
void get_window_scale(float* x, float* y);
|
||||
int get_fullscreen();
|
||||
void get_screen_size(s64 vmode_idx, s32* w, s32* h, s32* c);
|
||||
void set_letterbox(int w, int h);
|
||||
void set_fullscreen(int mode, int screen);
|
||||
void set_fullscreen(DisplayMode mode, int screen);
|
||||
void input_mode_set(u32 enable);
|
||||
void input_mode_save();
|
||||
s64 get_mapped_button(s64 pad, s64 button);
|
||||
|
@ -185,7 +185,7 @@ void FramePlot::draw(float max) {
|
||||
auto* me = (FramePlot*)data;
|
||||
return me->m_buffer[(me->m_idx + idx) % SIZE];
|
||||
},
|
||||
(void*)this, SIZE, 0, nullptr, 0, max, ImVec2(300, 40));
|
||||
(void*)this, SIZE, 0, nullptr, 0, max, ImVec2(300, 20));
|
||||
}
|
||||
|
||||
void SmallProfiler::draw(const std::string& status, const SmallProfilerStats& stats) {
|
||||
@ -219,4 +219,4 @@ void SmallProfiler::draw(const std::string& status, const SmallProfilerStats& st
|
||||
}
|
||||
}
|
||||
ImGui::End();
|
||||
}
|
||||
}
|
||||
|
@ -126,7 +126,7 @@ static int gl_init(GfxSettings& settings) {
|
||||
glfwWindowHint(GLFW_OPENGL_DEBUG_CONTEXT, GLFW_FALSE);
|
||||
}
|
||||
glfwWindowHint(GLFW_DOUBLEBUFFER, GLFW_TRUE);
|
||||
glfwWindowHint(GLFW_SAMPLES, 4);
|
||||
glfwWindowHint(GLFW_SAMPLES, 1);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@ -285,7 +285,7 @@ static void gl_set_fullscreen(GfxDisplay* display, int mode, int /*screen*/) {
|
||||
GLFWmonitor* monitor = glfwGetPrimaryMonitor(); // todo
|
||||
auto window = display->window_glfw;
|
||||
switch (mode) {
|
||||
case 0: {
|
||||
case Gfx::DisplayMode::Windowed: {
|
||||
// windowed
|
||||
glfwSetWindowAttrib(window, GLFW_DECORATED, GLFW_TRUE);
|
||||
glfwSetWindowFocusCallback(window, NULL);
|
||||
@ -293,18 +293,18 @@ static void gl_set_fullscreen(GfxDisplay* display, int mode, int /*screen*/) {
|
||||
glfwSetWindowMonitor(window, NULL, display->xpos_backup(), display->ypos_backup(),
|
||||
display->width_backup(), display->height_backup(), GLFW_DONT_CARE);
|
||||
} break;
|
||||
case 1: {
|
||||
case Gfx::DisplayMode::Fullscreen: {
|
||||
// fullscreen
|
||||
if (display->fullscreen_mode() == 0) {
|
||||
if (display->windowed()) {
|
||||
display->backup_params();
|
||||
}
|
||||
const GLFWvidmode* vmode = glfwGetVideoMode(monitor);
|
||||
glfwSetWindowMonitor(window, monitor, 0, 0, vmode->width, vmode->height, 60);
|
||||
glfwSetWindowFocusCallback(window, FocusCallback);
|
||||
} break;
|
||||
case 2: {
|
||||
case Gfx::DisplayMode::Borderless: {
|
||||
// borderless fullscreen
|
||||
if (display->fullscreen_mode() == 0) {
|
||||
if (display->windowed()) {
|
||||
display->backup_params();
|
||||
}
|
||||
int x, y;
|
||||
@ -322,6 +322,35 @@ static void gl_set_fullscreen(GfxDisplay* display, int mode, int /*screen*/) {
|
||||
}
|
||||
}
|
||||
|
||||
static void gl_screen_size(GfxDisplay* display,
|
||||
int vmode_idx,
|
||||
int /*screen*/,
|
||||
s32* w_out,
|
||||
s32* h_out,
|
||||
s32* count_out) {
|
||||
int count = 0;
|
||||
auto vmode = glfwGetVideoMode(glfwGetPrimaryMonitor());
|
||||
auto vmodes = glfwGetVideoModes(glfwGetPrimaryMonitor(), &count);
|
||||
if (vmode_idx >= 0) {
|
||||
vmode = &vmodes[vmode_idx];
|
||||
} else {
|
||||
for (int i = 0; i < count; ++i) {
|
||||
if (!vmode || vmode->height < vmodes[i].height) {
|
||||
vmode = &vmodes[i];
|
||||
}
|
||||
}
|
||||
}
|
||||
if (count_out) {
|
||||
*count_out = count;
|
||||
}
|
||||
if (w_out) {
|
||||
*w_out = vmode->width;
|
||||
}
|
||||
if (h_out) {
|
||||
*h_out = vmode->height;
|
||||
}
|
||||
}
|
||||
|
||||
static void gl_render_display(GfxDisplay* display) {
|
||||
GLFWwindow* window = display->window_glfw;
|
||||
|
||||
@ -504,6 +533,7 @@ const GfxRendererModule moduleOpenGL = {
|
||||
gl_display_set_size, // display_set_size
|
||||
gl_display_scale, // display_scale
|
||||
gl_set_fullscreen, // set_fullscreen
|
||||
gl_screen_size, // screen_size
|
||||
gl_exit, // exit
|
||||
gl_vsync, // vsync
|
||||
gl_sync_path, // sync_path
|
||||
|
@ -737,7 +737,10 @@ void PutDisplayEnv(u32 ptr) {
|
||||
}
|
||||
|
||||
/*!
|
||||
* PC Port function to get a 300MHz timer value.
|
||||
* PC PORT FUNCTIONS BEGIN
|
||||
*/
|
||||
/*!
|
||||
* Get a 300MHz timer value.
|
||||
*/
|
||||
u64 read_ee_timer() {
|
||||
u64 ns = ee_clock_timer.getNs();
|
||||
@ -745,14 +748,14 @@ u64 read_ee_timer() {
|
||||
}
|
||||
|
||||
/*!
|
||||
* PC Port function to do a fast memory copy.
|
||||
* Do a fast memory copy.
|
||||
*/
|
||||
void c_memmove(u32 dst, u32 src, u32 size) {
|
||||
memmove(Ptr<u8>(dst).c(), Ptr<u8>(src).c(), size);
|
||||
}
|
||||
|
||||
/*!
|
||||
* PC Port function to return the current OS as a symbol.
|
||||
* Return the current OS as a symbol. Actually returns what it was compiled for!
|
||||
*/
|
||||
u64 get_os() {
|
||||
#ifdef _WIN32
|
||||
@ -765,7 +768,7 @@ u64 get_os() {
|
||||
}
|
||||
|
||||
/*!
|
||||
* PC Port function
|
||||
* Returns size of window.
|
||||
*/
|
||||
void get_window_size(u32 w_ptr, u32 h_ptr) {
|
||||
if (w_ptr) {
|
||||
@ -779,7 +782,7 @@ void get_window_size(u32 w_ptr, u32 h_ptr) {
|
||||
}
|
||||
|
||||
/*!
|
||||
* PC Port function
|
||||
* Returns scale of window. This is for DPI stuff.
|
||||
*/
|
||||
void get_window_scale(u32 x_ptr, u32 y_ptr) {
|
||||
float* x = x_ptr ? Ptr<float>(x_ptr).c() : NULL;
|
||||
@ -787,6 +790,23 @@ void get_window_scale(u32 x_ptr, u32 y_ptr) {
|
||||
Gfx::get_window_scale(x, y);
|
||||
}
|
||||
|
||||
/*!
|
||||
* Returns resolution of the monitor.
|
||||
*/
|
||||
void get_screen_size(s64 vmode_idx, u32 w_ptr, u32 h_ptr, u32 c_ptr) {
|
||||
s32 *w_out = 0, *h_out = 0, *c_out = 0;
|
||||
if (w_ptr) {
|
||||
w_out = Ptr<s32>(w_ptr).c();
|
||||
}
|
||||
if (h_ptr) {
|
||||
h_out = Ptr<s32>(h_ptr).c();
|
||||
}
|
||||
if (c_ptr) {
|
||||
c_out = Ptr<s32>(c_ptr).c();
|
||||
}
|
||||
Gfx::get_screen_size(vmode_idx, w_out, h_out, c_out);
|
||||
}
|
||||
|
||||
void update_discord_rpc(u32 discord_info) {
|
||||
if (gDiscordRpcEnabled) {
|
||||
DiscordRichPresence rpc;
|
||||
@ -814,7 +834,7 @@ void update_discord_rpc(u32 discord_info) {
|
||||
strcat(state, std::to_string(cells).c_str());
|
||||
strcat(state, " | Orbs: ");
|
||||
strcat(state, std::to_string(orbs).c_str());
|
||||
strcat(state, " | Scout flies: ");
|
||||
strcat(state, " | Flies: ");
|
||||
strcat(state, std::to_string(scout_flies).c_str());
|
||||
}
|
||||
rpc.state = state;
|
||||
@ -846,6 +866,28 @@ void mkdir_path(u32 filepath) {
|
||||
file_util::create_dir_if_needed_for_file(filepath_str);
|
||||
}
|
||||
|
||||
u32 get_fullscreen() {
|
||||
switch (Gfx::get_fullscreen()) {
|
||||
default:
|
||||
case Gfx::DisplayMode::Windowed:
|
||||
return intern_from_c("windowed").offset;
|
||||
case Gfx::DisplayMode::Borderless:
|
||||
return intern_from_c("borderless").offset;
|
||||
case Gfx::DisplayMode::Fullscreen:
|
||||
return intern_from_c("fullscreen").offset;
|
||||
}
|
||||
}
|
||||
|
||||
void set_fullscreen(u32 symptr, s64 screen) {
|
||||
if (symptr == intern_from_c("windowed").offset || symptr == s7.offset) {
|
||||
Gfx::set_fullscreen(Gfx::DisplayMode::Windowed, screen);
|
||||
} else if (symptr == intern_from_c("borderless").offset) {
|
||||
Gfx::set_fullscreen(Gfx::DisplayMode::Borderless, screen);
|
||||
} else if (symptr == intern_from_c("fullscreen").offset) {
|
||||
Gfx::set_fullscreen(Gfx::DisplayMode::Fullscreen, screen);
|
||||
}
|
||||
}
|
||||
|
||||
void InitMachine_PCPort() {
|
||||
// PC Port added functions
|
||||
make_function_symbol_from_c("__read-ee-timer", (void*)read_ee_timer);
|
||||
@ -869,9 +911,11 @@ void InitMachine_PCPort() {
|
||||
make_function_symbol_from_c("pc-get-os", (void*)get_os);
|
||||
make_function_symbol_from_c("pc-get-window-size", (void*)get_window_size);
|
||||
make_function_symbol_from_c("pc-get-window-scale", (void*)get_window_scale);
|
||||
make_function_symbol_from_c("pc-get-fullscreen", (void*)get_fullscreen);
|
||||
make_function_symbol_from_c("pc-get-screen-size", (void*)get_screen_size);
|
||||
make_function_symbol_from_c("pc-set-window-size", (void*)Gfx::set_window_size);
|
||||
make_function_symbol_from_c("pc-set-letterbox", (void*)Gfx::set_letterbox);
|
||||
make_function_symbol_from_c("pc-set-fullscreen", (void*)Gfx::set_fullscreen);
|
||||
make_function_symbol_from_c("pc-set-fullscreen", (void*)set_fullscreen);
|
||||
make_function_symbol_from_c("pc-renderer-tree-set-lod", (void*)Gfx::SetLod);
|
||||
|
||||
// file related functions
|
||||
@ -897,6 +941,9 @@ void InitMachine_PCPort() {
|
||||
intern_from_c("*pc-settings-folder*")->value = make_string_from_c(settings_path.string().c_str());
|
||||
intern_from_c("*pc-settings-built-sha*")->value = make_string_from_c(GIT_SHORT_SHA);
|
||||
}
|
||||
/*!
|
||||
* PC PORT FUNCTIONS END
|
||||
*/
|
||||
|
||||
void vif_interrupt_callback() {
|
||||
// added for the PC port for faking VIF interrupts from the graphics system.
|
||||
|
@ -25,9 +25,9 @@
|
||||
#include "Deci2Server.h"
|
||||
#include "common/util/Assert.h"
|
||||
|
||||
Deci2Server::Deci2Server(std::function<bool()> shutdown_callback) {
|
||||
Deci2Server::Deci2Server(std::function<bool()> shutdown_callback)
|
||||
: want_exit(std::move(shutdown_callback)) {
|
||||
buffer = new char[BUFFER_SIZE];
|
||||
want_exit = std::move(shutdown_callback);
|
||||
}
|
||||
|
||||
Deci2Server::~Deci2Server() {
|
||||
|
@ -279,6 +279,7 @@
|
||||
("progress-part.o" "progress-part")
|
||||
("progress-draw.o" "progress-draw")
|
||||
("progress.o" "progress")
|
||||
("progress-pc.o" "progress-pc") ;; added
|
||||
("credits.o" "credits")
|
||||
("projectiles.o" "projectiles")
|
||||
("ocean.o" "ocean")
|
||||
|
@ -275,6 +275,7 @@
|
||||
("progress-part.o" "progress-part")
|
||||
("progress-draw.o" "progress-draw")
|
||||
("progress.o" "progress")
|
||||
("progress-pc.o" "progress-pc") ;; added
|
||||
("credits.o" "credits")
|
||||
("projectiles.o" "projectiles")
|
||||
("ocean.o" "ocean")
|
||||
|
@ -133,15 +133,15 @@
|
||||
(debug-draw (_type_) none 9)
|
||||
(fill-and-probe-using-line-sphere (_type_ vector vector float collide-kind process collide-tri-result int) float 10)
|
||||
(fill-and-probe-using-spheres (_type_ collide-using-spheres-params) symbol 11)
|
||||
(fill-and-probe-using-y-probe (_type_ vector float collide-kind process collide-tri-result uint) float 12)
|
||||
(fill-and-probe-using-y-probe (_type_ vector float collide-kind process-drawable collide-tri-result pat-surface) float 12)
|
||||
(fill-using-bounding-box (_type_ bounding-box collide-kind process-drawable pat-surface) none 13)
|
||||
(fill-using-line-sphere (_type_ vector vector float collide-kind process-drawable int) none 14)
|
||||
(fill-using-spheres (_type_ collide-using-spheres-params) none 15)
|
||||
(fill-using-y-probe (_type_ vector float collide-kind process-drawable uint) none 16)
|
||||
(fill-using-y-probe (_type_ vector float collide-kind process-drawable pat-surface) none 16)
|
||||
(initialize (_type_) none 17)
|
||||
(probe-using-line-sphere (_type_ vector vector float collide-kind collide-tri-result int) float 18)
|
||||
(probe-using-spheres (_type_ collide-using-spheres-params) symbol 19)
|
||||
(probe-using-y-probe (_type_ vector float collide-kind collide-tri-result uint) float 20)
|
||||
(probe-using-y-probe (_type_ vector float collide-kind collide-tri-result pat-surface) float 20)
|
||||
(fill-from-background (_type_ (function bsp-header int collide-list none) (function collide-cache object none)) none 21) ;; second functiom is method 28
|
||||
(fill-from-foreground-using-box (_type_) none 22)
|
||||
(fill-from-foreground-using-line-sphere (_type_) none 23)
|
||||
|
@ -427,7 +427,7 @@
|
||||
;; Y PROBE
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
(defmethod fill-using-y-probe collide-cache ((obj collide-cache) (arg0 vector) (arg1 float) (arg2 collide-kind) (arg3 process-drawable) (arg4 uint))
|
||||
(defmethod fill-using-y-probe collide-cache ((obj collide-cache) (arg0 vector) (arg1 float) (arg2 collide-kind) (arg3 process-drawable) (arg4 pat-surface))
|
||||
(rlet ((vf1 :class vf)
|
||||
(vf2 :class vf)
|
||||
(vf3 :class vf)
|
||||
@ -2214,15 +2214,15 @@
|
||||
(arg0 vector)
|
||||
(arg1 float)
|
||||
(arg2 collide-kind)
|
||||
(arg3 process)
|
||||
(arg3 process-drawable)
|
||||
(arg4 collide-tri-result)
|
||||
(arg5 uint)
|
||||
(arg5 pat-surface)
|
||||
)
|
||||
(fill-using-y-probe obj arg0 arg1 arg2 (the-as process-drawable arg3) arg5)
|
||||
(fill-using-y-probe obj arg0 arg1 arg2 arg3 arg5)
|
||||
(probe-using-y-probe obj arg0 arg1 arg2 arg4 arg5)
|
||||
)
|
||||
|
||||
(defmethod probe-using-y-probe collide-cache ((obj collide-cache) (arg0 vector) (arg1 float) (arg2 collide-kind) (arg3 collide-tri-result) (arg4 uint))
|
||||
(defmethod probe-using-y-probe collide-cache ((obj collide-cache) (arg0 vector) (arg1 float) (arg2 collide-kind) (arg3 collide-tri-result) (arg4 pat-surface))
|
||||
(rlet ((vf0 :class vf)
|
||||
(vf1 :class vf)
|
||||
(vf3 :class vf)
|
||||
@ -2232,7 +2232,7 @@
|
||||
(.mov vf3 arg1)
|
||||
(.lvf vf1 (&-> arg0 quad))
|
||||
(set! (-> gp-0 best-u) 2.0)
|
||||
(set! (-> gp-0 ignore-pat) (the-as pat-surface arg4))
|
||||
(set! (-> gp-0 ignore-pat) arg4)
|
||||
(set! (-> gp-0 tri-out) arg3)
|
||||
(.sub.x.vf vf3 vf0 vf3 :mask #b10)
|
||||
(.svf (&-> gp-0 start-pos quad) vf1)
|
||||
@ -2248,10 +2248,7 @@
|
||||
(puyp-mesh obj gp-0 (the-as collide-cache-prim s2-0))
|
||||
)
|
||||
(else
|
||||
(if (zero? (logand (the-as pat-surface arg4)
|
||||
(-> (the-as collide-shape-prim-sphere (-> (the-as collide-cache-prim s2-0) prim)) pat)
|
||||
)
|
||||
)
|
||||
(if (zero? (logand arg4 (-> (the-as collide-shape-prim-sphere (-> (the-as collide-cache-prim s2-0) prim)) pat)))
|
||||
(puyp-sphere obj gp-0 (the-as collide-cache-prim s2-0))
|
||||
)
|
||||
)
|
||||
|
@ -476,11 +476,24 @@
|
||||
(declare-type collide-work structure)
|
||||
(declare-type touching-shapes-entry structure)
|
||||
|
||||
(defenum nav-flags
|
||||
:bitfield #t
|
||||
:type uint8
|
||||
(navf0 0)
|
||||
(navf1 1)
|
||||
(navf2 2)
|
||||
(navf3 3)
|
||||
(navf4 4)
|
||||
(navf5 5)
|
||||
(navf6 6)
|
||||
(navf7 7)
|
||||
)
|
||||
|
||||
;; we're a child of trsqv, so we store a full transform + derivative.
|
||||
(deftype collide-shape (trsqv)
|
||||
((process process-drawable :offset-assert 140)
|
||||
(max-iteration-count uint8 :offset-assert 144)
|
||||
(nav-flags uint8 :offset-assert 145)
|
||||
(nav-flags nav-flags :offset-assert 145)
|
||||
(pad-byte uint8 2 :offset-assert 146)
|
||||
(pat-ignore-mask pat-surface :offset-assert 148)
|
||||
(event-self basic :offset-assert 152)
|
||||
@ -647,7 +660,7 @@
|
||||
(let ((obj (object-new allocation type-to-make (the int (-> type-to-make size)))))
|
||||
(set! (-> obj process) proc)
|
||||
(set! (-> obj max-iteration-count) 1)
|
||||
(set! (-> obj nav-flags) #x1)
|
||||
(set! (-> obj nav-flags) (nav-flags navf0))
|
||||
(set! (-> obj event-self) #f)
|
||||
(set! (-> obj event-other) #f)
|
||||
(set! (-> obj riders) #f)
|
||||
|
@ -1641,7 +1641,7 @@
|
||||
(+! (-> s4-0 y) arg0)
|
||||
0.0
|
||||
;; find the ground
|
||||
(let ((f0-4 (fill-and-probe-using-y-probe *collide-cache* s4-0 f30-0 arg3 (-> obj process) s3-0 (the-as uint 1))))
|
||||
(let ((f0-4 (fill-and-probe-using-y-probe *collide-cache* s4-0 f30-0 arg3 (-> obj process) s3-0 (new 'static 'pat-surface :noentity #x1))))
|
||||
(when (< f0-4 0.0)
|
||||
(if arg2
|
||||
(format 0 "WARNING: move-to-ground: (~f ~f) failed to locate ground [~S type ~S]~%"
|
||||
|
@ -4433,9 +4433,10 @@
|
||||
;(flag "Alt load boundaries" #f ,(dm-lambda-boolean-flag (-> *pc-settings* new-lb?)))
|
||||
(flag "All actors" #f ,(dm-lambda-boolean-flag (-> *pc-settings* force-actors?)))
|
||||
(flag "Display actor counts" #f ,(dm-lambda-boolean-flag (-> *pc-settings* display-actor-counts)))
|
||||
(flag "Display git commit" #f ,(dm-lambda-boolean-flag (-> *pc-settings* display-sha)))
|
||||
(function "Reset" #f (lambda () (reset *pc-settings*)))
|
||||
(function "Save" #f (lambda () (write-to-file *pc-settings* PC_SETTINGS_FILE_NAME)))
|
||||
(function "Load" #f (lambda () (read-from-file *pc-settings* PC_SETTINGS_FILE_NAME)))
|
||||
(function "Save" #f (lambda () (commit-to-file *pc-settings*)))
|
||||
(function "Load" #f (lambda () (load-settings *pc-settings*)))
|
||||
)
|
||||
)
|
||||
)
|
||||
@ -4452,6 +4453,7 @@
|
||||
(float-var "Actor birth dist" #f ,(dm-lambda-meters-var (-> *ACTOR-bank* birth-dist)) 20 1 #t 0 10000 1)
|
||||
(float-var "Actor pause dist" #f ,(dm-lambda-meters-var (-> *ACTOR-bank* pause-dist)) 20 1 #t 0 10000 1)
|
||||
(flag "Heap status" #f ,(dm-lambda-boolean-flag (-> *pc-settings* display-heap-status)))
|
||||
(flag "Text boxes" #f ,(dm-lambda-boolean-flag (-> *pc-settings* display-text-box)))
|
||||
(flag "Bug report" #f ,(dm-lambda-boolean-flag (-> *pc-settings* display-bug-report)))
|
||||
(menu "Mood override"
|
||||
(function "-- SIMPLE OVERRIDE" #f nothing)
|
||||
|
@ -1544,7 +1544,7 @@
|
||||
)
|
||||
(toggle-pause)
|
||||
)
|
||||
(when (or (not *progress-process*) (dummy-32 (-> *progress-process* 0)))
|
||||
(when (or (not *progress-process*) (can-go-back? (-> *progress-process* 0)))
|
||||
(if (or (logtest? (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons select r3 start)) ;; push pause
|
||||
(and ;; controller lost
|
||||
(logtest? (-> *cpad-list* cpads 0 valid) 128)
|
||||
|
@ -2828,9 +2828,9 @@
|
||||
s2-1
|
||||
(the-as float 81920.0)
|
||||
(collide-kind background)
|
||||
(the-as process #f)
|
||||
(the-as process-drawable #f)
|
||||
s1-1
|
||||
(the-as uint 1)
|
||||
(new 'static 'pat-surface :noentity #x1)
|
||||
)
|
||||
0.0
|
||||
)
|
||||
@ -2841,7 +2841,7 @@
|
||||
(if (= (the-as int s3-0) 6)
|
||||
(set! (-> s2-1 y) (+ 6144.0 (-> s2-1 y)))
|
||||
)
|
||||
(birth-pickup-at-point s2-1 (the-as pickup-type s3-0) f30-0 arg0 (the-as process-drawable arg1) obj)
|
||||
(birth-pickup-at-point s2-1 (the-as pickup-type s3-0) f30-0 arg0 arg1 obj)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
@ -57,7 +57,7 @@
|
||||
(life 201)
|
||||
(money 202)
|
||||
(money-total 203)
|
||||
(moeny-per-level 204)
|
||||
(money-per-level 204)
|
||||
(buzzer-total 205)
|
||||
(fuel-cell 206)
|
||||
(death-movie-tick 207)
|
||||
@ -227,7 +227,7 @@
|
||||
(when detail
|
||||
(let ((v1-4 (-> tag elt-type)))
|
||||
(cond
|
||||
((or (= v1-4 (game-save-elt moeny-per-level)) (= v1-4 (game-save-elt deaths-per-level)))
|
||||
((or (= v1-4 (game-save-elt money-per-level)) (= v1-4 (game-save-elt deaths-per-level)))
|
||||
;; per level u8's
|
||||
(dotimes (prog-lev-idx (-> tag elt-count))
|
||||
(let ((lev-name (progress-level-index->string prog-lev-idx)))
|
||||
@ -421,7 +421,7 @@
|
||||
)
|
||||
(let ((v1-56 (&+ v1-55 16)))
|
||||
(let ((a0-30 (the-as game-save-tag (&+ v1-56 0))))
|
||||
(set! (-> a0-30 elt-type) (game-save-elt moeny-per-level))
|
||||
(set! (-> a0-30 elt-type) (game-save-elt money-per-level))
|
||||
(set! (-> a0-30 elt-count) 32)
|
||||
(set! (-> a0-30 elt-size) (the-as uint 1))
|
||||
)
|
||||
@ -861,7 +861,7 @@
|
||||
(((game-save-elt money-total))
|
||||
(set! (-> obj money-total) (-> data user-float0))
|
||||
)
|
||||
(((game-save-elt moeny-per-level))
|
||||
(((game-save-elt money-per-level))
|
||||
(let ((v1-34 (min 32 (-> data elt-count))))
|
||||
(dotimes (a0-76 v1-34)
|
||||
(set! (-> obj money-per-level a0-76) (-> (the-as (pointer uint8) (&+ (the-as pointer data) 16)) a0-76))
|
||||
|
@ -356,7 +356,7 @@
|
||||
;; cheat mode
|
||||
(check-cheat-code (-> *cheat-temp* 0) 0
|
||||
(up up down down left right left right x x square circle square circle)
|
||||
(cpad-clear-buttons! 0 r1)
|
||||
(cpad-clear! 0 r1)
|
||||
;; toggle!
|
||||
(not! *cheat-mode*)
|
||||
(cheats-sound-play *cheat-mode*)
|
||||
@ -366,7 +366,7 @@
|
||||
(when *cheat-mode*
|
||||
(check-cheat-code (-> *cheat-temp* 1) 0
|
||||
(circle square circle square x x right left right left down down up up)
|
||||
(cpad-clear-buttons! 0 r1)
|
||||
(cpad-clear! 0 r1)
|
||||
;; toggle between #t and debug.
|
||||
(set! *cheat-mode* (if (= *cheat-mode* 'debug)
|
||||
#t
|
||||
@ -382,7 +382,7 @@
|
||||
((GAME_TERRITORY_SCEI)
|
||||
(check-cheat-code (-> *cheat-temp* 2) 0
|
||||
(l1 r1 l1 r1 triangle circle x square)
|
||||
(cpad-clear-buttons! 0 r1)
|
||||
(cpad-clear! 0 r1)
|
||||
(set! *progress-cheat* (if *progress-cheat*
|
||||
#f
|
||||
'language
|
||||
@ -397,7 +397,7 @@
|
||||
(when *debug-segment*
|
||||
(check-cheat-code (-> *cheat-temp* 3) 0
|
||||
(x square triangle circle x square triangle circle)
|
||||
(cpad-clear-buttons! 0 r1)
|
||||
(cpad-clear! 0 r1)
|
||||
(set! *progress-cheat* (if *progress-cheat*
|
||||
#f
|
||||
'pal
|
||||
@ -408,7 +408,7 @@
|
||||
;; added in PAL
|
||||
(check-cheat-code (-> *cheat-temp* 4) 0 ;; they erroneously used (-> *cheat-temp* 5) here!
|
||||
(triangle x circle square triangle x circle square)
|
||||
(cpad-clear-buttons! 0 r1)
|
||||
(cpad-clear! 0 r1)
|
||||
(set! *cheat-mode* (if (= *cheat-mode* 'camera)
|
||||
#f
|
||||
'camera
|
||||
@ -665,8 +665,9 @@
|
||||
(*draw-hook*)
|
||||
(add-ee-profile-frame 'draw :g #x80)
|
||||
|
||||
(#when PC_PORT
|
||||
(draw-build-revision))
|
||||
(with-pc
|
||||
(if (-> *pc-settings* display-sha)
|
||||
(draw-build-revision)))
|
||||
|
||||
(*menu-hook*)
|
||||
(add-ee-profile-frame 'draw :g #x40)
|
||||
|
@ -1033,7 +1033,7 @@
|
||||
(-> obj root-override shadow-pos)
|
||||
8192.0
|
||||
(collide-kind background)
|
||||
(the-as process #f)
|
||||
(the-as process-drawable #f)
|
||||
12288.0
|
||||
81920.0
|
||||
)
|
||||
|
@ -5,10 +5,7 @@
|
||||
;; name in dgo: shadow-h
|
||||
;; dgos: GAME, ENGINE
|
||||
|
||||
;; forward def - projectiles
|
||||
(define-extern find-ground-and-draw-shadow (function vector vector float collide-kind process float float none))
|
||||
|
||||
;; definition of type fake-shadow
|
||||
(deftype fake-shadow (structure)
|
||||
((px float :offset-assert 0)
|
||||
(py float :offset-assert 4)
|
||||
@ -25,7 +22,6 @@
|
||||
:flag-assert #x900000020
|
||||
)
|
||||
|
||||
;; definition of type fake-shadow-buffer
|
||||
(deftype fake-shadow-buffer (basic)
|
||||
((num-shadows int32 :offset-assert 4)
|
||||
(data fake-shadow 32 :inline :offset-assert 8)
|
||||
@ -35,13 +31,10 @@
|
||||
:flag-assert #x900000408
|
||||
)
|
||||
|
||||
;; definition for symbol *fake-shadow-buffer-1*, type fake-shadow-buffer
|
||||
(define *fake-shadow-buffer-1* (new 'global 'fake-shadow-buffer))
|
||||
|
||||
;; definition for symbol *fake-shadow-buffer-2*, type fake-shadow-buffer
|
||||
(define *fake-shadow-buffer-2* (new 'global 'fake-shadow-buffer))
|
||||
|
||||
;; definition for symbol *fake-shadow-buffer*, type fake-shadow-buffer
|
||||
(define *fake-shadow-buffer* *fake-shadow-buffer-1*)
|
||||
|
||||
(define-extern swap-fake-shadow-buffers (function none))
|
||||
(define-extern swap-fake-shadow-buffers (function none))
|
||||
|
||||
(define-extern find-ground-and-draw-shadow (function vector vector float collide-kind process-drawable float float none))
|
@ -109,14 +109,31 @@
|
||||
)
|
||||
)
|
||||
|
||||
(defun find-ground-and-draw-shadow ((arg0 vector) (arg1 vector) (arg2 float) (arg3 collide-kind) (arg4 process) (arg5 float) (arg6 float))
|
||||
(defun find-ground-and-draw-shadow ((arg0 vector)
|
||||
(arg1 vector)
|
||||
(arg2 float)
|
||||
(arg3 collide-kind)
|
||||
(arg4 process-drawable)
|
||||
(arg5 float)
|
||||
(arg6 float)
|
||||
)
|
||||
(let ((s2-0 (new 'stack-no-clear 'vector)))
|
||||
(set! (-> s2-0 quad) (-> arg0 quad))
|
||||
(new 'stack-no-clear 'vector)
|
||||
(+! (-> s2-0 y) arg5)
|
||||
(let ((s4-0 (new 'stack-no-clear 'collide-tri-result)))
|
||||
(cond
|
||||
((>= (fill-and-probe-using-y-probe *collide-cache* s2-0 arg6 arg3 arg4 s4-0 (the-as uint 1)) 0.0)
|
||||
((>= (fill-and-probe-using-y-probe
|
||||
*collide-cache*
|
||||
s2-0
|
||||
arg6
|
||||
arg3
|
||||
arg4
|
||||
s4-0
|
||||
(new 'static 'pat-surface :noentity #x1)
|
||||
)
|
||||
0.0
|
||||
)
|
||||
(if (!= arg2 0.0)
|
||||
(compute-and-draw-shadow s2-0 (-> s4-0 intersect) (-> s4-0 normal) (the-as vector arg2) arg6 (the-as float 0))
|
||||
)
|
||||
|
@ -394,10 +394,8 @@
|
||||
(defmethod new sprite-array-2d ((allocation symbol) (type-to-make type) (group-0-size int) (group-1-size int))
|
||||
"Allocate a sprite-array for 2d sprites. There are two groups, each can contain the given number."
|
||||
(#when PC_BIG_MEMORY
|
||||
(when (not (-> *pc-settings* ps2-parts?))
|
||||
(*! group-0-size 16) ;; 16x more particles!
|
||||
(*! group-1-size 16) ;; 16x more particles!
|
||||
)
|
||||
(*! group-0-size 16) ;; 16x more particles!
|
||||
(*! group-1-size 16) ;; 16x more particles!
|
||||
)
|
||||
(let* ((sprite-count (+ group-0-size group-1-size))
|
||||
(vec-data-size (* 3 sprite-count)) ;; 3 quadwords of vec-data per sprite
|
||||
@ -423,10 +421,8 @@
|
||||
"Allocate a sprite-array for 3d sprites. There are two groups, each can contain the given number of sprites.
|
||||
Group 1 size is zero in practice for 3d."
|
||||
(#when PC_BIG_MEMORY
|
||||
(when (and *pc-settings* (not (-> *pc-settings* ps2-parts?)))
|
||||
(*! group-0-size 16) ;; 16x more particles!
|
||||
(*! group-1-size 16) ;; 16x more particles!
|
||||
)
|
||||
(*! group-0-size 16) ;; 16x more particles!
|
||||
(*! group-1-size 16) ;; 16x more particles!
|
||||
)
|
||||
(let* ((sprite-count (+ group-0-size group-1-size))
|
||||
(vec-data-size (* 3 sprite-count))
|
||||
|
@ -13,24 +13,24 @@
|
||||
:bitfield #t
|
||||
:type uint32
|
||||
(display-marks 0)
|
||||
(bit1 1) ;; TODO - nav-control::9
|
||||
(bit2 2) ;; TODO - nav-control::9
|
||||
(bit3 3) ;; TODO - nav-enemy::45 | nav-control::9
|
||||
(bit4 4) ;; TODO - nav-control::9
|
||||
(bit5 5) ;; TODO - nav-enemy::45 | ;; TODO - nav-control::9
|
||||
(bit6 6) ;; TODO - nav-enemy::45 | ;; TODO - nav-control::9
|
||||
(bit7 7) ;; TODO - nav-enemy::45 | ;; TODO - nav-control::9
|
||||
(bit8 8)
|
||||
(bit9 9) ;; TODO - nav-control::14 | 11
|
||||
(bit10 10) ;; TODO - nav-enemy::nav-enemy-patrol-post
|
||||
(bit11 11) ;; TODO - nav-control::28
|
||||
(bit12 12) ;; TODO - rolling-lightning-mole::(enter nav-enemy-chase fleeing-nav-enemy)
|
||||
(bit13 13)
|
||||
(bit17 17) ;; TODO - nav-control::11
|
||||
(bit18 18) ;; TODO - nav-control::11
|
||||
(bit19 19) ;; TODO - nav-control::11 | 17
|
||||
(bit20 20) ;; TODO - nav-mesh::28
|
||||
(bit21 21) ;; TODO - nav-control::19
|
||||
(navcf1 1) ;; TODO - nav-control::9
|
||||
(navcf2 2) ;; TODO - nav-control::9
|
||||
(navcf3 3) ;; TODO - nav-enemy::45 | nav-control::9
|
||||
(navcf4 4) ;; TODO - nav-control::9
|
||||
(navcf5 5) ;; TODO - nav-enemy::45 | ;; TODO - nav-control::9
|
||||
(navcf6 6) ;; TODO - nav-enemy::45 | ;; TODO - nav-control::9
|
||||
(navcf7 7) ;; TODO - nav-enemy::45 | ;; TODO - nav-control::9
|
||||
(navcf8 8)
|
||||
(navcf9 9) ;; TODO - nav-control::14 | 11
|
||||
(navcf10 10) ;; TODO - nav-enemy::nav-enemy-patrol-post
|
||||
(navcf11 11) ;; TODO - nav-control::28
|
||||
(navcf12 12) ;; TODO - rolling-lightning-mole::(enter nav-enemy-chase fleeing-nav-enemy)
|
||||
(navcf13 13)
|
||||
(navcf17 17) ;; TODO - nav-control::11
|
||||
(navcf18 18) ;; TODO - nav-control::11
|
||||
(navcf19 19) ;; TODO - nav-control::11 | 17
|
||||
(navcf20 20) ;; TODO - nav-mesh::28
|
||||
(navcf21 21) ;; TODO - nav-control::19
|
||||
)
|
||||
|
||||
(deftype nav-poly (structure)
|
||||
@ -371,7 +371,7 @@
|
||||
(goto cfg-4)
|
||||
)
|
||||
(set! (-> obj max-spheres) sphere-count)
|
||||
(set! (-> obj flags) (nav-control-flags bit8 bit13))
|
||||
(set! (-> obj flags) (nav-control-flags navcf8 navcf13))
|
||||
(set! (-> obj mesh) (nav-mesh-connect (-> shape process) shape obj))
|
||||
(let ((ent (-> shape process entity)))
|
||||
(set! (-> obj nearest-y-threshold)
|
||||
|
@ -1177,14 +1177,14 @@
|
||||
(let ((v1-1 (find-poly-fast obj arg0 arg1)))
|
||||
(when v1-1
|
||||
(if arg2
|
||||
(set! (-> arg2 0) (logior (nav-control-flags bit20) (-> arg2 0)))
|
||||
(set! (-> arg2 0) (logior (nav-control-flags navcf20) (-> arg2 0)))
|
||||
)
|
||||
(set! s3-1 v1-1)
|
||||
(goto cfg-14)
|
||||
)
|
||||
)
|
||||
(if arg2
|
||||
(logclear! (-> arg2 0) (nav-control-flags bit20))
|
||||
(logclear! (-> arg2 0) (nav-control-flags navcf20))
|
||||
)
|
||||
(let ((s2-0 (new 'stack-no-clear 'inline-array 'nav-vertex 3)))
|
||||
(set! s3-1 (the-as nav-poly #f))
|
||||
@ -1632,7 +1632,7 @@
|
||||
(when #t
|
||||
(set! (-> s5-0 debug-time) (the-as uint (-> *display* actual-frame-counter)))
|
||||
(add-debug-sphere
|
||||
(logtest? (-> obj flags) (nav-control-flags bit1))
|
||||
(logtest? (-> obj flags) (nav-control-flags navcf1))
|
||||
(bucket-id debug-draw0)
|
||||
(-> s5-0 bounds)
|
||||
(-> s5-0 bounds w)
|
||||
@ -1640,7 +1640,7 @@
|
||||
)
|
||||
(add-debug-vector #t (bucket-id debug-draw1) (-> s5-0 origin) *x-vector* (meters 1.0) *color-red*)
|
||||
(add-debug-vector #t (bucket-id debug-draw1) (-> s5-0 origin) *z-vector* (meters 1.0) *color-blue*)
|
||||
(when (logtest? (-> obj flags) (nav-control-flags bit2))
|
||||
(when (logtest? (-> obj flags) (nav-control-flags navcf2))
|
||||
(dotimes (s3-0 (-> s5-0 vertex-count))
|
||||
(add-debug-x
|
||||
#t
|
||||
@ -1695,7 +1695,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(when (logtest? (-> obj flags) (nav-control-flags bit3))
|
||||
(when (logtest? (-> obj flags) (nav-control-flags navcf3))
|
||||
(dotimes (s3-2 (-> s5-0 poly-count))
|
||||
(let ((s2-1 (-> s5-0 poly s3-2)))
|
||||
(debug-draw-poly s5-0 s2-1 (the-as rgba (cond
|
||||
@ -1720,7 +1720,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(when (logtest? (-> obj flags) (nav-control-flags bit4))
|
||||
(when (logtest? (-> obj flags) (nav-control-flags navcf4))
|
||||
(let ((s1-1 add-debug-text-3d)
|
||||
(s0-1 #t)
|
||||
)
|
||||
@ -1744,7 +1744,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(when (logtest? (-> obj flags) (nav-control-flags bit5))
|
||||
(when (logtest? (-> obj flags) (nav-control-flags navcf5))
|
||||
(if (-> obj next-poly)
|
||||
(debug-draw-poly s5-0 (-> obj next-poly) *color-cyan*)
|
||||
)
|
||||
@ -1755,7 +1755,7 @@
|
||||
(debug-draw-poly s5-0 (-> obj current-poly) *color-red*)
|
||||
)
|
||||
)
|
||||
(when (logtest? (-> obj flags) (nav-control-flags bit7))
|
||||
(when (logtest? (-> obj flags) (nav-control-flags navcf7))
|
||||
(dotimes (s3-3 (the-as int (-> s5-0 static-sphere-count)))
|
||||
(let ((s2-2 (-> s5-0 static-sphere s3-3)))
|
||||
(add-debug-sphere #t (bucket-id debug-draw0) (the-as vector s2-2) (-> s2-2 trans w) *color-blue*)
|
||||
@ -1788,7 +1788,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(when (logtest? (-> obj flags) (nav-control-flags bit6))
|
||||
(when (logtest? (-> obj flags) (nav-control-flags navcf6))
|
||||
(when (and (-> obj portal 0) (-> obj portal 1))
|
||||
(let ((v1-80 (-> s5-0 origin))
|
||||
(a2-22 (new 'stack-no-clear 'vector))
|
||||
@ -1828,7 +1828,7 @@
|
||||
(new 'static 'rgba :r #xff :g #xff :b #xff :a #x80)
|
||||
)
|
||||
)
|
||||
(when (logtest? (-> obj flags) (nav-control-flags bit7))
|
||||
(when (logtest? (-> obj flags) (nav-control-flags navcf7))
|
||||
(add-debug-sphere
|
||||
#t
|
||||
(bucket-id debug-draw1)
|
||||
@ -1890,7 +1890,7 @@
|
||||
|
||||
(defmethod set-current-poly! nav-control ((obj nav-control) (arg0 nav-poly))
|
||||
(set! (-> obj current-poly) arg0)
|
||||
(logior! (-> obj flags) (nav-control-flags bit9))
|
||||
(logior! (-> obj flags) (nav-control-flags navcf9))
|
||||
0
|
||||
(none)
|
||||
)
|
||||
@ -1937,7 +1937,7 @@
|
||||
)
|
||||
|
||||
(defun add-collide-shape-spheres ((arg0 nav-control) (arg1 collide-shape) (arg2 vector))
|
||||
(when (logtest? (-> arg1 nav-flags) 1)
|
||||
(when (logtest? (-> arg1 nav-flags) (nav-flags navf0))
|
||||
(set! (-> arg2 quad) (-> arg1 root-prim prim-core world-sphere quad))
|
||||
(set! (-> arg2 w) (-> arg1 nav-radius))
|
||||
(let ((s4-0 arg0)
|
||||
@ -1959,7 +1959,7 @@
|
||||
)
|
||||
0
|
||||
)
|
||||
(when (logtest? (-> arg1 nav-flags) 2)
|
||||
(when (logtest? (-> arg1 nav-flags) (nav-flags navf1))
|
||||
(let ((s5-1 (-> arg1 process nav extra-nav-sphere)))
|
||||
(when (< (-> arg0 num-spheres) (-> arg0 max-spheres))
|
||||
(let* ((s4-1 (-> arg0 sphere (-> arg0 num-spheres)))
|
||||
@ -1995,13 +1995,13 @@
|
||||
(s3-0 (new 'stack-no-clear 'vector))
|
||||
)
|
||||
(when (and *target*
|
||||
(or (logtest? (-> obj flags) (nav-control-flags bit11)) (logtest? (-> *target* state-flags) #x80f8))
|
||||
(or (logtest? (-> obj flags) (nav-control-flags navcf11)) (logtest? (-> *target* state-flags) #x80f8))
|
||||
)
|
||||
(let ((s2-0 obj)
|
||||
(s1-0 (-> *target* control))
|
||||
)
|
||||
(let ((s0-0 s3-0))
|
||||
(when (logtest? (-> s1-0 nav-flags) 1)
|
||||
(when (logtest? (-> s1-0 nav-flags) (nav-flags navf0))
|
||||
(set! (-> s0-0 quad) (-> s1-0 root-prim prim-core world-sphere quad))
|
||||
(set! (-> s0-0 w) (-> s1-0 nav-radius))
|
||||
(set! sv-32 s2-0)
|
||||
@ -2021,7 +2021,7 @@
|
||||
0
|
||||
)
|
||||
)
|
||||
(when (logtest? (-> s1-0 nav-flags) 2)
|
||||
(when (logtest? (-> s1-0 nav-flags) (nav-flags navf1))
|
||||
(let ((s1-1 (-> s1-0 process nav extra-nav-sphere)))
|
||||
(when (< (-> s2-0 num-spheres) (-> s2-0 max-spheres))
|
||||
(let* ((s0-1 (-> s2-0 sphere (-> s2-0 num-spheres)))
|
||||
@ -2041,7 +2041,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(when (logtest? (-> obj flags) (nav-control-flags bit13))
|
||||
(when (logtest? (-> obj flags) (nav-control-flags navcf13))
|
||||
(countdown (s2-1 (-> obj mesh static-sphere-count))
|
||||
(let ((s1-2 obj)
|
||||
(s0-2 (-> obj mesh static-sphere s2-1))
|
||||
@ -2071,7 +2071,7 @@
|
||||
(when (not (or (= s0-3 (-> obj shape)) (zero? (logand arg0 (-> s0-3 root-prim prim-core collide-as)))))
|
||||
(let ((s1-3 obj))
|
||||
(set! sv-112 s3-0)
|
||||
(when (logtest? (-> s0-3 nav-flags) 1)
|
||||
(when (logtest? (-> s0-3 nav-flags) (nav-flags navf0))
|
||||
(set! (-> sv-112 quad) (-> s0-3 root-prim prim-core world-sphere quad))
|
||||
(set! (-> sv-112 w) (-> s0-3 nav-radius))
|
||||
(set! sv-80 s1-3)
|
||||
@ -2094,7 +2094,7 @@
|
||||
)
|
||||
0
|
||||
)
|
||||
(when (logtest? (-> s0-3 nav-flags) 2)
|
||||
(when (logtest? (-> s0-3 nav-flags) (nav-flags navf1))
|
||||
(let ((s0-4 (-> s0-3 process nav extra-nav-sphere)))
|
||||
(when (< (-> s1-3 num-spheres) (-> s1-3 max-spheres))
|
||||
(set! sv-128 (-> s1-3 sphere (-> s1-3 num-spheres)))
|
||||
@ -2466,7 +2466,7 @@
|
||||
(set! (-> obj blocked-travel quad) (-> obj travel quad))
|
||||
(let ((f0-0 (vector-xz-length (-> obj travel))))
|
||||
(when (and (>= f30-0 f0-0) (< f0-0 204.8))
|
||||
(set! (-> obj flags) (logior (nav-control-flags bit17) (-> obj flags)))
|
||||
(set! (-> obj flags) (logior (nav-control-flags navcf17) (-> obj flags)))
|
||||
(set! (-> obj block-time) (-> *display* base-frame-counter))
|
||||
(set! (-> obj block-count) (+ 1.0 (-> obj block-count)))
|
||||
(if (-> obj block-event)
|
||||
@ -2504,21 +2504,21 @@
|
||||
)
|
||||
(cond
|
||||
((or (vector= arg2 (-> obj target-pos)) (< (fabs f28-0) 364.0889))
|
||||
(set! (-> obj flags) (logior (nav-control-flags bit21) (-> obj flags)))
|
||||
(set! (-> obj flags) (logior (nav-control-flags navcf21) (-> obj flags)))
|
||||
(set! (-> arg0 quad) (-> arg2 quad))
|
||||
)
|
||||
(else
|
||||
(let ((s2-1 (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> arg1 quat))))
|
||||
(vector-rotate-y! s2-1 s2-1 (fmax (fmin f28-0 f30-0) (- f30-0)))
|
||||
(vector-normalize! s2-1 819.2)
|
||||
(logclear! (-> obj flags) (nav-control-flags bit21))
|
||||
(logclear! (-> obj flags) (nav-control-flags navcf21))
|
||||
(vector+! arg0 (-> arg1 trans) s2-1)
|
||||
)
|
||||
(when (or (not (dummy-16 obj arg0))
|
||||
(logtest? (nav-control-flags bit17) (-> obj flags))
|
||||
(zero? (logand (-> obj flags) (nav-control-flags bit10)))
|
||||
(logtest? (nav-control-flags navcf17) (-> obj flags))
|
||||
(zero? (logand (-> obj flags) (nav-control-flags navcf10)))
|
||||
)
|
||||
(set! (-> obj flags) (logior (nav-control-flags bit21) (-> obj flags)))
|
||||
(set! (-> obj flags) (logior (nav-control-flags navcf21) (-> obj flags)))
|
||||
(vector-! (-> obj travel) arg2 (-> arg1 trans))
|
||||
(set! (-> arg0 quad) (-> arg2 quad))
|
||||
)
|
||||
@ -2718,7 +2718,7 @@
|
||||
v1-0
|
||||
(-> obj current-poly)
|
||||
(-> obj travel)
|
||||
(zero? (logand (-> obj flags) (nav-control-flags bit12)))
|
||||
(zero? (logand (-> obj flags) (nav-control-flags navcf12)))
|
||||
arg0
|
||||
arg1
|
||||
)
|
||||
@ -2925,7 +2925,7 @@
|
||||
sv-84
|
||||
sv-88
|
||||
(-> obj travel)
|
||||
(zero? (logand (-> obj flags) (nav-control-flags bit12)))
|
||||
(zero? (logand (-> obj flags) (nav-control-flags navcf12)))
|
||||
204.8
|
||||
s5-1
|
||||
)
|
||||
@ -2966,9 +2966,9 @@
|
||||
(set! (-> obj old-travel quad) (-> obj travel quad))
|
||||
(-> obj block-count)
|
||||
(set! (-> obj block-count) (seek (-> obj block-count) 0.0 0.016666668))
|
||||
(logclear! (-> obj flags) (nav-control-flags bit9 bit17 bit18 bit19))
|
||||
(logclear! (-> obj flags) (nav-control-flags navcf9 navcf17 navcf18 navcf19))
|
||||
(TODO-RENAME-27 obj)
|
||||
(if (logtest? (-> obj flags) (nav-control-flags bit8))
|
||||
(if (logtest? (-> obj flags) (nav-control-flags navcf8))
|
||||
(TODO-RENAME-28 obj (collide-kind
|
||||
background
|
||||
cak-1
|
||||
@ -3043,7 +3043,7 @@
|
||||
(let ((s5-1 (new 'stack-no-clear 'nav-gap-info)))
|
||||
(when (< (vector-xz-length (-> obj travel)) 204.8)
|
||||
(cond
|
||||
((logtest? (nav-control-flags bit17) (-> obj flags))
|
||||
((logtest? (nav-control-flags navcf17) (-> obj flags))
|
||||
)
|
||||
((-> obj next-poly)
|
||||
(cond
|
||||
@ -3061,7 +3061,7 @@
|
||||
)
|
||||
)
|
||||
(else
|
||||
(set! (-> obj flags) (logior (nav-control-flags bit19) (-> obj flags)))
|
||||
(set! (-> obj flags) (logior (nav-control-flags navcf19) (-> obj flags)))
|
||||
)
|
||||
)
|
||||
)
|
||||
|
@ -359,7 +359,7 @@
|
||||
`(logtest? (cpad-hold ,pad-idx) (pad-buttons ,@buttons))
|
||||
)
|
||||
|
||||
(defmacro cpad-clear-buttons! (pad-idx &rest buttons)
|
||||
(defmacro cpad-clear! (pad-idx &rest buttons)
|
||||
`(begin
|
||||
(logclear! (cpad-pressed ,pad-idx) (pad-buttons ,@buttons))
|
||||
(logclear! (cpad-hold ,pad-idx) (pad-buttons ,@buttons))
|
||||
|
@ -935,10 +935,10 @@
|
||||
;; can we see it?
|
||||
(#if (not PC_PORT)
|
||||
(sphere-in-view-frustum? (the-as sphere gp-1))
|
||||
(if (and (not (-> *pc-settings* ps2-parts?)) (not (-> *pc-settings* use-vis?)) (> (-> *sprite-array-2d* num-sprites 0) 1920))
|
||||
;; pc port : launchers have larger bsphere if you have pc rendering on and ps2 parts off
|
||||
(sphere-in-view-frustum? (the-as sphere (let ((bsph (new-stack-vector0))) (vector-copy! bsph gp-1) (*! (-> bsph w) 4.0) bsph)))
|
||||
(sphere-in-view-frustum? (the-as sphere gp-1)))
|
||||
(if (-> *pc-settings* ps2-parts?)
|
||||
;; pc port : launchers have larger bsphere if you have ps2 parts off
|
||||
(sphere-in-view-frustum? (the-as sphere gp-1))
|
||||
(sphere-in-view-frustum? (the-as sphere (let ((bsph (new-stack-vector0))) (vector-copy! bsph gp-1) (*! (-> bsph w) 4.0) bsph))))
|
||||
)
|
||||
)
|
||||
)
|
||||
@ -992,7 +992,7 @@
|
||||
|
||||
;; pc hack for more particles.
|
||||
(with-pc
|
||||
(if (and (> (-> *sprite-array-2d* num-sprites 0) 1920) (not (-> *pc-settings* ps2-parts?)))
|
||||
(if (not (-> *pc-settings* ps2-parts?))
|
||||
(/! f30-0 256.0)))
|
||||
|
||||
;; loop over particles in the group.
|
||||
|
@ -63,10 +63,8 @@
|
||||
arg3: pointer to sprite allocations
|
||||
arg4: pointer to adgif allocation"
|
||||
(#when PC_BIG_MEMORY
|
||||
(when (not (-> *pc-settings* ps2-parts?))
|
||||
(*! arg0 16) ;; 16x more particles!
|
||||
(*! arg1 16) ;; 16x more particles!
|
||||
)
|
||||
(*! arg0 16) ;; 16x more particles!
|
||||
(*! arg1 16) ;; 16x more particles!
|
||||
)
|
||||
(let ((gp-0 (object-new allocation type-to-make (the-as int (-> type-to-make size)))))
|
||||
(let* ((v1-3 (/ (+ arg0 63) 64)) ;; num blocks
|
||||
|
@ -1202,7 +1202,7 @@
|
||||
(clear-pending-settings-from-process *setting-control* self 'process-mask)
|
||||
(clear-pending-settings-from-process *setting-control* self 'allow-progress)
|
||||
(restore-collide-with-as (-> self control))
|
||||
(set! (-> self control pat-ignore-mask) (new 'static 'pat-surface :skip #x1 :noentity #x1))
|
||||
(set! (-> self control pat-ignore-mask) (new 'static 'pat-surface :noentity #x1))
|
||||
(set! (-> self control dynam gravity-max) (-> self control unknown-dynamics00 gravity-max))
|
||||
(set! (-> self control dynam gravity-length) (-> self control unknown-dynamics00 gravity-length))
|
||||
(none)
|
||||
|
@ -43,7 +43,7 @@
|
||||
(collide-kind background cak-1 cak-2 cak-3 water powerup crate enemy wall-object ground-object mother-spider)
|
||||
s5-0
|
||||
s3-0
|
||||
(the-as uint 1)
|
||||
(new 'static 'pat-surface :noentity #x1)
|
||||
)
|
||||
0.0
|
||||
)
|
||||
|
@ -5,68 +5,163 @@
|
||||
;; name in dgo: progress-h
|
||||
;; dgos: GAME, ENGINE
|
||||
|
||||
;; PC port adds new menus and option types
|
||||
(#cond
|
||||
((not PC_PORT)
|
||||
(defenum progress-screen
|
||||
:type int64
|
||||
(invalid -1)
|
||||
(fuel-cell 0)
|
||||
(money 1)
|
||||
(buzzer 2)
|
||||
(settings 3)
|
||||
(game-settings 4)
|
||||
(graphic-settings 5)
|
||||
(sound-settings 6)
|
||||
(memcard-no-space 7)
|
||||
(memcard-not-inserted 8)
|
||||
(memcard-not-formatted 9)
|
||||
(memcard-format 10)
|
||||
(memcard-data-exists 11)
|
||||
(memcard-loading 12)
|
||||
(memcard-saving 13)
|
||||
(memcard-formatting 14)
|
||||
(memcard-creating 15)
|
||||
(load-game 16)
|
||||
(save-game 17)
|
||||
(save-game-title 18)
|
||||
(memcard-insert 19)
|
||||
(memcard-error-loading 20)
|
||||
(memcard-error-saving 21)
|
||||
(memcard-removed 22)
|
||||
(memcard-no-data 23)
|
||||
(memcard-error-formatting 24)
|
||||
(memcard-error-creating 25)
|
||||
(memcard-auto-save-error 26)
|
||||
(title 27)
|
||||
(settings-title 28)
|
||||
(auto-save 29)
|
||||
(pal-change-to-60hz 30)
|
||||
(pal-now-60hz 31)
|
||||
(no-disc 32)
|
||||
(bad-disc 33)
|
||||
(quit 34)
|
||||
(max 35)
|
||||
)
|
||||
|
||||
(defenum progress-screen
|
||||
:type int64
|
||||
(invalid -1)
|
||||
(fuel-cell 0)
|
||||
(money 1)
|
||||
(buzzer 2)
|
||||
(settings 3)
|
||||
(game-settings 4)
|
||||
(graphic-settings 5)
|
||||
(sound-settings 6)
|
||||
(memcard-no-space 7)
|
||||
(memcard-not-inserted 8)
|
||||
(memcard-not-formatted 9)
|
||||
(memcard-format 10)
|
||||
(memcard-data-exists 11)
|
||||
(memcard-loading 12)
|
||||
(memcard-saving 13)
|
||||
(memcard-formatting 14)
|
||||
(memcard-creating 15)
|
||||
(load-game 16)
|
||||
(save-game 17)
|
||||
(save-game-title 18)
|
||||
(memcard-insert 19)
|
||||
(memcard-error-loading 20)
|
||||
(memcard-error-saving 21)
|
||||
(memcard-removed 22)
|
||||
(memcard-no-data 23)
|
||||
(memcard-error-formatting 24)
|
||||
(memcard-error-creating 25)
|
||||
(memcard-auto-save-error 26)
|
||||
(title 27)
|
||||
(settings-title 28)
|
||||
(auto-save 29)
|
||||
(pal-change-to-60hz 30)
|
||||
(pal-now-60hz 31)
|
||||
(no-disc 32)
|
||||
(bad-disc 33)
|
||||
(quit 34)
|
||||
(defenum game-option-type
|
||||
:type uint64
|
||||
(slider 0)
|
||||
(language 1)
|
||||
(on-off 2)
|
||||
(center-screen 3)
|
||||
(aspect-ratio 4)
|
||||
(video-mode 5)
|
||||
(menu 6)
|
||||
(yes-no 7)
|
||||
(button 8)
|
||||
)
|
||||
)
|
||||
(#t
|
||||
(defenum progress-screen
|
||||
:type int64
|
||||
(invalid -1)
|
||||
(fuel-cell 0)
|
||||
(money 1)
|
||||
(buzzer 2)
|
||||
(settings 3)
|
||||
(game-settings 4)
|
||||
(graphic-settings 5)
|
||||
(sound-settings 6)
|
||||
(memcard-no-space 7)
|
||||
(memcard-not-inserted 8)
|
||||
(memcard-not-formatted 9)
|
||||
(memcard-format 10)
|
||||
(memcard-data-exists 11)
|
||||
(memcard-loading 12)
|
||||
(memcard-saving 13)
|
||||
(memcard-formatting 14)
|
||||
(memcard-creating 15)
|
||||
(load-game 16)
|
||||
(save-game 17)
|
||||
(save-game-title 18)
|
||||
(memcard-insert 19)
|
||||
(memcard-error-loading 20)
|
||||
(memcard-error-saving 21)
|
||||
(memcard-removed 22)
|
||||
(memcard-no-data 23)
|
||||
(memcard-error-formatting 24)
|
||||
(memcard-error-creating 25)
|
||||
(memcard-auto-save-error 26)
|
||||
(title 27)
|
||||
(settings-title 28)
|
||||
(auto-save 29)
|
||||
(pal-change-to-60hz 30)
|
||||
(pal-now-60hz 31)
|
||||
(no-disc 32)
|
||||
(bad-disc 33)
|
||||
(quit 34)
|
||||
|
||||
;; extra screens for pc port
|
||||
(camera-options)
|
||||
(accessibility-options)
|
||||
(game-ps2-options)
|
||||
(misc-options)
|
||||
(resolution)
|
||||
(aspect-msg)
|
||||
(aspect-ratio)
|
||||
(gfx-ps2-options)
|
||||
(secrets)
|
||||
(hint-log)
|
||||
(cheats)
|
||||
(scrapbook)
|
||||
(music-player)
|
||||
(scene-player)
|
||||
(credits)
|
||||
|
||||
;; the last one!
|
||||
(max)
|
||||
)
|
||||
|
||||
(defenum game-option-type
|
||||
:type uint64
|
||||
(slider 0)
|
||||
(language 1)
|
||||
(on-off 2)
|
||||
(center-screen 3)
|
||||
(aspect-ratio 4)
|
||||
(video-mode 5)
|
||||
(menu 6)
|
||||
(yes-no 7)
|
||||
(button 8)
|
||||
|
||||
;; extra types for pc port
|
||||
(normal-inverted)
|
||||
(display-mode)
|
||||
(msaa)
|
||||
(frame-rate)
|
||||
(lod-bg)
|
||||
(lod-fg)
|
||||
(resolution)
|
||||
(aspect-new)
|
||||
(language-subtitles)
|
||||
(speaker)
|
||||
(aspect-native)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(defenum game-option-menu
|
||||
:type int32
|
||||
:copy-entries progress-screen)
|
||||
|
||||
(defun-extern activate-progress process progress-screen none)
|
||||
(defun-extern hide-progress-screen none)
|
||||
(defun-extern hide-progress-icons none)
|
||||
|
||||
(declare-type level-tasks-info basic)
|
||||
|
||||
(define-extern *level-task-data* (array level-tasks-info))
|
||||
(define-extern *level-task-data-remap* (array int32))
|
||||
|
||||
(declare-type count-info structure)
|
||||
|
||||
(defun-extern get-game-count int count-info)
|
||||
(defun-extern progress-allowed? symbol)
|
||||
(defun-extern pause-allowed? symbol)
|
||||
|
||||
(declare-type progress process)
|
||||
|
||||
(defun-extern deactivate-progress none)
|
||||
(defun-extern calculate-completion progress float)
|
||||
(defun-extern make-current-level-available-to-progress none)
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(deftype count-info (structure)
|
||||
@ -115,13 +210,13 @@
|
||||
|
||||
|
||||
(deftype game-option (basic)
|
||||
((option-type uint64 :offset-assert 8)
|
||||
(name game-text-id :offset-assert 16)
|
||||
(scale basic :offset-assert 20)
|
||||
(param1 float :offset-assert 24)
|
||||
(param2 float :offset-assert 28)
|
||||
(param3 int32 :offset-assert 32)
|
||||
(value-to-modify pointer :offset-assert 36)
|
||||
((option-type game-option-type :offset-assert 8)
|
||||
(name game-text-id :offset-assert 16)
|
||||
(scale symbol :offset-assert 20)
|
||||
(param1 float :offset-assert 24)
|
||||
(param2 float :offset-assert 28)
|
||||
(param3 game-option-menu :offset-assert 32)
|
||||
(value-to-modify pointer :offset-assert 36)
|
||||
)
|
||||
:method-count-assert 9
|
||||
:size-assert #x28
|
||||
@ -148,8 +243,8 @@
|
||||
(force-transition basic :offset-assert 180)
|
||||
(stat-transition basic :offset-assert 184)
|
||||
(level-transition int32 :offset-assert 188)
|
||||
(language-selection uint64 :offset-assert 192)
|
||||
(language-direction basic :offset-assert 200)
|
||||
(language-selection language-enum :offset-assert 192)
|
||||
(language-direction symbol :offset-assert 200)
|
||||
(language-transition basic :offset-assert 204)
|
||||
(language-x-offset int32 :offset-assert 208)
|
||||
(sides-x-scale float :offset-assert 212)
|
||||
@ -190,12 +285,12 @@
|
||||
:size-assert #x2dc
|
||||
:flag-assert #x3b027002dc
|
||||
(:methods
|
||||
(dummy-14 (_type_) none 14)
|
||||
(dummy-15 (_type_) none 15)
|
||||
(dummy-16 (_type_) none 16)
|
||||
(progress-dummy-14 (_type_) none 14) ;; unused
|
||||
(progress-dummy-15 (_type_) none 15) ;; unused
|
||||
(progress-dummy-16 (_type_) none 16) ;; unused
|
||||
(draw-progress (_type_) none 17)
|
||||
(dummy-18 () none 18)
|
||||
(dummy-19 (_type_) symbol 19)
|
||||
(progress-dummy-18 () none 18) ;; unused
|
||||
(visible? (_type_) symbol 19)
|
||||
(hidden? (_type_) symbol 20)
|
||||
(adjust-sprites (_type_) none 21)
|
||||
(adjust-icons (_type_) none 22)
|
||||
@ -205,10 +300,10 @@
|
||||
(draw-buzzer-screen (_type_ int) none 26)
|
||||
(draw-notice-screen (_type_) none 27)
|
||||
(draw-options (_type_ int int float) none 28)
|
||||
(dummy-29 (_type_) none 29)
|
||||
(respond-common (_type_) none 29)
|
||||
(respond-progress (_type_) none 30)
|
||||
(dummy-31 (_type_) none 31)
|
||||
(dummy-32 (_type_) symbol 32)
|
||||
(respond-memcard (_type_) none 31)
|
||||
(can-go-back? (_type_) symbol 32)
|
||||
(initialize-icons (_type_) none 33)
|
||||
(initialize-particles (_type_) none 34)
|
||||
(draw-memcard-storage-error (_type_ font-context) none 35)
|
||||
@ -220,16 +315,16 @@
|
||||
(draw-memcard-auto-save-error (_type_ font-context) none 41)
|
||||
(draw-memcard-removed (_type_ font-context) none 42)
|
||||
(draw-memcard-error (_type_ font-context) none 43)
|
||||
(dummy-44 (_type_) none 44)
|
||||
(progress-dummy-44 (_type_) none 44) ;; unused
|
||||
(push! (_type_) none 45)
|
||||
(pop! (_type_) none 46)
|
||||
(dummy-47 (_type_) none 47)
|
||||
(progress-dummy-47 (_type_) none 47) ;; unused
|
||||
(enter! (_type_ progress-screen int) none 48)
|
||||
(draw-memcard-format (_type_ font-context) none 49)
|
||||
(draw-auto-save (_type_ font-context) none 50)
|
||||
(set-transition-progress! (_type_ int) none 51)
|
||||
(set-transition-speed! (_type_) none 52)
|
||||
(dummy-53 (_type_ progress-screen) progress-screen 53)
|
||||
(set-memcard-screen (_type_ progress-screen) progress-screen 53)
|
||||
(draw-pal-change-to-60hz (_type_ font-context) none 54)
|
||||
(draw-pal-now-60hz (_type_ font-context) none 55)
|
||||
(draw-no-disc (_type_ font-context) none 56)
|
||||
@ -251,7 +346,15 @@
|
||||
|
||||
(define *progress-last-task-index* 0)
|
||||
|
||||
0
|
||||
|
||||
(defun-extern get-game-count int count-info)
|
||||
|
||||
(define-extern *level-task-data* (array level-tasks-info))
|
||||
(define-extern *level-task-data-remap* (array int32))
|
||||
|
||||
(defun-extern deactivate-progress none)
|
||||
(defun-extern calculate-completion progress float)
|
||||
(defun-extern make-current-level-available-to-progress none)
|
||||
|
||||
|
||||
|
||||
|
@ -1510,432 +1510,207 @@
|
||||
)
|
||||
|
||||
(defmethod draw-options progress ((obj progress) (arg0 int) (arg1 int) (arg2 float))
|
||||
(local-vars
|
||||
(sv-112 font-context)
|
||||
(sv-128 int)
|
||||
(sv-144 int)
|
||||
(sv-160 (function _varargs_ object))
|
||||
(sv-176 string)
|
||||
(sv-192 string)
|
||||
(sv-208 string)
|
||||
(sv-224 (function _varargs_ object))
|
||||
(sv-240 string)
|
||||
(sv-256 string)
|
||||
(sv-272 string)
|
||||
(sv-288 (function string font-context symbol int int float))
|
||||
(sv-304 (function _varargs_ object))
|
||||
(sv-320 (function _varargs_ object))
|
||||
(sv-336 string)
|
||||
(sv-352 string)
|
||||
(sv-368 string)
|
||||
(sv-384 (function _varargs_ object))
|
||||
(sv-400 string)
|
||||
(sv-416 string)
|
||||
(sv-432 string)
|
||||
(sv-448 uint)
|
||||
(sv-464 int)
|
||||
(sv-480 int)
|
||||
(sv-496 int)
|
||||
(sv-512 uint)
|
||||
(sv-528 (function _varargs_ object))
|
||||
(sv-544 string)
|
||||
(sv-560 string)
|
||||
(sv-576 string)
|
||||
(sv-592 (function _varargs_ object))
|
||||
(sv-608 string)
|
||||
(sv-624 string)
|
||||
(sv-640 string)
|
||||
(sv-656 (function _varargs_ object))
|
||||
(sv-672 string)
|
||||
(sv-688 string)
|
||||
(sv-704 string)
|
||||
(sv-720 (function _varargs_ object))
|
||||
(sv-736 string)
|
||||
(sv-752 string)
|
||||
(sv-768 string)
|
||||
(sv-784 (function _varargs_ object))
|
||||
(sv-800 string)
|
||||
(sv-816 string)
|
||||
(sv-832 string)
|
||||
(sv-848 (function _varargs_ object))
|
||||
(sv-864 string)
|
||||
(sv-880 string)
|
||||
(sv-896 string)
|
||||
(sv-912 string)
|
||||
)
|
||||
(let ((s3-0 (-> *options-remap* (-> obj display-state))))
|
||||
(when s3-0
|
||||
(let ((s2-1 (- arg0 (/ (* arg1 (length s3-0)) 2)))
|
||||
(s1-0 0)
|
||||
(unkx 27)
|
||||
(unk2 0)
|
||||
(font (new 'stack 'font-context *font-default-matrix* 0 0 0.0 (font-color default) (font-flags shadow kerning)))
|
||||
)
|
||||
27
|
||||
0
|
||||
(set! sv-112
|
||||
(new 'stack 'font-context *font-default-matrix* 0 0 0.0 (font-color default) (font-flags shadow kerning))
|
||||
)
|
||||
(let ((v1-11 sv-112))
|
||||
(set! (-> v1-11 width) (the float 350))
|
||||
)
|
||||
(let ((v1-12 sv-112))
|
||||
(set! (-> v1-12 height) (the float 25))
|
||||
)
|
||||
(set! (-> sv-112 flags) (font-flags shadow kerning middle left large))
|
||||
(set-width! font 350)
|
||||
(set-height! font 25)
|
||||
(set! (-> font flags) (font-flags shadow kerning middle left large))
|
||||
(dotimes (s0-0 (length s3-0))
|
||||
(set! sv-912 (the-as string #f))
|
||||
(set! sv-128 27)
|
||||
(set! sv-144 s2-1)
|
||||
(let ((option-str (the string #f))
|
||||
(x-off 27)
|
||||
(y-off s2-1)
|
||||
)
|
||||
(let ((v1-18 (-> s3-0 s0-0 option-type)))
|
||||
(cond
|
||||
((= v1-18 7)
|
||||
(cond
|
||||
((-> (the-as (pointer uint32) (-> s3-0 s0-0 value-to-modify)))
|
||||
(set! sv-160 format)
|
||||
(set! sv-176 (clear *temp-string*))
|
||||
(set! sv-192 "~30L~S~0L ~S")
|
||||
(set! sv-208 (lookup-text! *common-text* (game-text-id yes) #f))
|
||||
(let ((a3-2 (lookup-text! *common-text* (game-text-id no) #f)))
|
||||
(sv-160 sv-176 sv-192 sv-208 a3-2)
|
||||
)
|
||||
(set! sv-912 *temp-string*)
|
||||
sv-912
|
||||
)
|
||||
(else
|
||||
(set! sv-224 format)
|
||||
(set! sv-240 (clear *temp-string*))
|
||||
(set! sv-256 "~0L~S ~30L~S~1L")
|
||||
(set! sv-272 (lookup-text! *common-text* (game-text-id yes) #f))
|
||||
(let ((a3-3 (lookup-text! *common-text* (game-text-id no) #f)))
|
||||
(sv-224 sv-240 sv-256 sv-272 a3-3)
|
||||
)
|
||||
(set! sv-912 *temp-string*)
|
||||
sv-912
|
||||
((= v1-18 (game-option-type yes-no))
|
||||
(if (-> (the-as (pointer uint32) (-> s3-0 s0-0 value-to-modify)))
|
||||
(set! option-str (string-format "~30L~S~0L ~S" (lookup-text! *common-text* (game-text-id yes) #f) (lookup-text! *common-text* (game-text-id no) #f)))
|
||||
(set! option-str (string-format "~0L~S ~30L~S~1L" (lookup-text! *common-text* (game-text-id yes) #f) (lookup-text! *common-text* (game-text-id no) #f)))
|
||||
)
|
||||
)
|
||||
)
|
||||
((or (= v1-18 6) (= v1-18 8))
|
||||
((or (= v1-18 (game-option-type menu)) (= v1-18 (game-option-type button)))
|
||||
(cond
|
||||
((nonzero? (-> s3-0 s0-0 name))
|
||||
(set! sv-912 (lookup-text! *common-text* (-> s3-0 s0-0 name) #f))
|
||||
sv-912
|
||||
(set! option-str (lookup-text! *common-text* (-> s3-0 s0-0 name) #f))
|
||||
)
|
||||
(else
|
||||
(set! sv-912 (the-as string #f))
|
||||
(the-as symbol sv-912)
|
||||
(set! option-str (the-as string #f))
|
||||
)
|
||||
)
|
||||
)
|
||||
((and (-> obj selected-option) (= (-> obj option-index) s0-0))
|
||||
(let ((a0-19 sv-112))
|
||||
(set! (-> a0-19 color) (font-color default))
|
||||
)
|
||||
(set! (-> sv-112 origin x) (the float (- sv-128 (-> obj left-x-offset))))
|
||||
(set-color! font (font-color default))
|
||||
(set! (-> font origin x) (the float (- x-off (-> obj left-x-offset))))
|
||||
(case (-> s3-0 s0-0 option-type)
|
||||
((3)
|
||||
(set! (-> sv-112 origin y) (the float (+ s2-1 -20)))
|
||||
(((game-option-type center-screen))
|
||||
(set! (-> font origin y) (the float (+ s2-1 -20)))
|
||||
)
|
||||
(else
|
||||
(set! (-> sv-112 origin y) (the float (+ s2-1 -8)))
|
||||
(set! (-> font origin y) (the float (+ s2-1 -8)))
|
||||
)
|
||||
)
|
||||
(let ((v1-64 sv-112))
|
||||
(set! (-> v1-64 scale) 0.6)
|
||||
)
|
||||
(set! sv-288 print-game-text)
|
||||
(let ((a0-23 (lookup-text! *common-text* (-> s3-0 s0-0 name) #f))
|
||||
(a1-11 sv-112)
|
||||
(a2-10 #f)
|
||||
(a3-4 128)
|
||||
(t0-1 22)
|
||||
)
|
||||
(sv-288 a0-23 a1-11 a2-10 a3-4 t0-1)
|
||||
)
|
||||
(set-scale! font 0.6)
|
||||
(print-game-text (lookup-text! *common-text* (-> s3-0 s0-0 name) #f) font #f 128 22)
|
||||
(case (-> s3-0 s0-0 option-type)
|
||||
((3)
|
||||
(set! sv-144 (+ s2-1 3))
|
||||
sv-144
|
||||
(((game-option-type center-screen))
|
||||
(set! y-off (+ s2-1 3))
|
||||
)
|
||||
(else
|
||||
(set! sv-144 (+ s2-1 7))
|
||||
sv-144
|
||||
(set! y-off (+ s2-1 7))
|
||||
)
|
||||
)
|
||||
(let ((v1-81 (-> s3-0 s0-0 option-type)))
|
||||
(cond
|
||||
((zero? v1-81)
|
||||
(let* ((v1-82 (the-as uint #x8000ffff))
|
||||
(f0-12 (* 0.01 (-> (the-as (pointer float) (-> s3-0 s0-0 value-to-modify)))))
|
||||
(a0-34 (logior (logand v1-82 -256) (shr (shl (the int (+ 64.0 (* 191.0 f0-12))) 56) 56)))
|
||||
(a3-5 (logior (logand a0-34 -65281) (shr (shl (shr (shl a0-34 56) 56) 56) 48)))
|
||||
)
|
||||
(draw-percent-bar (- 75 (-> obj left-x-offset)) (+ s2-1 8) f0-12 (the-as int a3-5))
|
||||
)
|
||||
(set! sv-304 format)
|
||||
(let ((a0-42 (clear *temp-string*))
|
||||
(a1-13 "~D")
|
||||
(a2-12 (the int (-> (the-as (pointer float) (-> s3-0 s0-0 value-to-modify)))))
|
||||
)
|
||||
(sv-304 a0-42 a1-13 a2-12)
|
||||
)
|
||||
(set! sv-912 *temp-string*)
|
||||
(set! sv-128 (+ (the int (* 2.5 (-> (the-as (pointer float) (-> s3-0 s0-0 value-to-modify))))) -100))
|
||||
sv-128
|
||||
)
|
||||
((= v1-81 2)
|
||||
(cond
|
||||
((-> (the-as (pointer uint32) (-> s3-0 s0-0 value-to-modify)))
|
||||
(set! sv-320 format)
|
||||
(set! sv-336 (clear *temp-string*))
|
||||
(set! sv-352 "~30L~S~0L ~S")
|
||||
(set! sv-368 (lookup-text! *common-text* (game-text-id on) #f))
|
||||
(let ((a3-6 (lookup-text! *common-text* (game-text-id off) #f)))
|
||||
(sv-320 sv-336 sv-352 sv-368 a3-6)
|
||||
(case (-> s3-0 s0-0 option-type)
|
||||
(((game-option-type slider))
|
||||
(let* ((v1-82 (the-as uint #x8000ffff))
|
||||
(f0-12 (* 0.01 (-> (the-as (pointer float) (-> s3-0 s0-0 value-to-modify)))))
|
||||
(a0-34 (logior (logand v1-82 -256) (shr (shl (the int (+ 64.0 (* 191.0 f0-12))) 56) 56)))
|
||||
(a3-5 (logior (logand a0-34 -65281) (shr (shl (shr (shl a0-34 56) 56) 56) 48)))
|
||||
)
|
||||
(set! sv-912 *temp-string*)
|
||||
sv-912
|
||||
)
|
||||
(else
|
||||
(set! sv-384 format)
|
||||
(set! sv-400 (clear *temp-string*))
|
||||
(set! sv-416 "~0L~S ~30L~S~1L")
|
||||
(set! sv-432 (lookup-text! *common-text* (game-text-id on) #f))
|
||||
(let ((a3-7 (lookup-text! *common-text* (game-text-id off) #f)))
|
||||
(sv-384 sv-400 sv-416 sv-432 a3-7)
|
||||
)
|
||||
(set! sv-912 *temp-string*)
|
||||
sv-912
|
||||
)
|
||||
)
|
||||
(draw-percent-bar (- 75 (-> obj left-x-offset)) (+ s2-1 8) f0-12 (the-as int a3-5))
|
||||
)
|
||||
((= v1-81 1)
|
||||
(set! sv-512 (-> obj language-selection))
|
||||
(set! sv-448 (-> (the-as (pointer uint64) (-> s3-0 s0-0 value-to-modify))))
|
||||
(if (and (zero? (scf-get-territory))
|
||||
(not (and (= *progress-cheat* 'language) (cpad-hold? 0 l2) (cpad-hold? 0 r2)))
|
||||
)
|
||||
(set! sv-464 5)
|
||||
(set! sv-464 6)
|
||||
)
|
||||
(if (-> obj language-transition)
|
||||
(set! (-> obj language-x-offset)
|
||||
(seekl (-> obj language-x-offset) 200 (the int (* 10.0 (-> *display* time-adjust-ratio))))
|
||||
)
|
||||
)
|
||||
(when (>= (-> obj language-x-offset) 100)
|
||||
(set! (-> obj language-selection) sv-448)
|
||||
(set! sv-512 sv-448)
|
||||
(set! (-> obj language-transition) #f)
|
||||
(set! (-> obj language-x-offset) 0)
|
||||
0
|
||||
(set! option-str (string-format "~D" (the int (-> (the-as (pointer float) (-> s3-0 s0-0 value-to-modify))))))
|
||||
(set! x-off (+ (the int (* 2.5 (-> (the-as (pointer float) (-> s3-0 s0-0 value-to-modify))))) -100))
|
||||
x-off
|
||||
)
|
||||
(((game-option-type on-off))
|
||||
(if (-> (the-as (pointer uint32) (-> s3-0 s0-0 value-to-modify)))
|
||||
(set! option-str (string-format "~30L~S~0L ~S" (lookup-text! *common-text* (game-text-id on) #f) (lookup-text! *common-text* (game-text-id off) #f)))
|
||||
(set! option-str (string-format "~0L~S ~30L~S~1L" (lookup-text! *common-text* (game-text-id on) #f) (lookup-text! *common-text* (game-text-id off) #f)))
|
||||
)
|
||||
(set! (-> sv-112 origin y) (the float (+ s2-1 3)))
|
||||
(let ((a0-62 sv-112))
|
||||
(set! (-> a0-62 color) (font-color lighter-lighter-blue))
|
||||
)
|
||||
0
|
||||
(set! sv-480 (mod (the-as int (+ sv-512 1)) sv-464))
|
||||
(let ((a0-66 (mod (+ sv-464 -1 sv-512) sv-464))
|
||||
(v1-153 (mod (the-as int (+ sv-512 2)) sv-464))
|
||||
)
|
||||
(set! sv-496 (mod (+ sv-464 -2 sv-512) sv-464))
|
||||
(cond
|
||||
((-> obj language-direction)
|
||||
(let ((a2-22 (- 200 (+ (-> obj language-x-offset) 100))))
|
||||
(print-language-name a0-66 sv-112 a2-22 #f)
|
||||
)
|
||||
(let ((a2-23 (+ (-> obj language-x-offset) 100)))
|
||||
(cond
|
||||
((< a2-23 150)
|
||||
(let ((t9-27 print-language-name)
|
||||
(a1-30 sv-112)
|
||||
(a3-9 #t)
|
||||
)
|
||||
(t9-27 sv-480 a1-30 a2-23 a3-9)
|
||||
)
|
||||
)
|
||||
(else
|
||||
(let ((a2-24 (- 200 (-> obj language-x-offset)))
|
||||
(t9-28 print-language-name)
|
||||
(a1-31 sv-112)
|
||||
(a3-10 #f)
|
||||
)
|
||||
(t9-28 sv-496 a1-31 a2-24 a3-10)
|
||||
)
|
||||
)
|
||||
(((game-option-type language))
|
||||
(let ((old-lang (-> obj language-selection))
|
||||
(new-lang (-> (the-as (pointer language-enum) (-> s3-0 s0-0 value-to-modify))))
|
||||
(max-lang (if (and (= (scf-get-territory) GAME_TERRITORY_SCEA)
|
||||
(not (and (= *progress-cheat* 'language) (cpad-hold? 0 l2) (cpad-hold? 0 r2))))
|
||||
5
|
||||
6
|
||||
))
|
||||
)
|
||||
(if (-> obj language-transition)
|
||||
(set! (-> obj language-x-offset)
|
||||
(seekl (-> obj language-x-offset) 200 (the int (* 10.0 (-> *display* time-adjust-ratio))))))
|
||||
(when (>= (-> obj language-x-offset) 100)
|
||||
(set! (-> obj language-selection) new-lang)
|
||||
(set! old-lang new-lang)
|
||||
(set! (-> obj language-transition) #f)
|
||||
(set! (-> obj language-x-offset) 0)
|
||||
)
|
||||
(set! (-> font origin y) (the float (+ s2-1 3)))
|
||||
(set-color! font (font-color lighter-lighter-blue))
|
||||
0
|
||||
(let ((next-lang (mod (+ old-lang 1) max-lang))
|
||||
(a0-66 (mod (+ max-lang -1 old-lang) max-lang))
|
||||
(v1-153 (mod (+ old-lang 2) max-lang))
|
||||
(prev-lang (mod (+ max-lang -2 old-lang) max-lang))
|
||||
)
|
||||
(cond
|
||||
((-> obj language-direction)
|
||||
(let ((a2-22 (- 200 (+ (-> obj language-x-offset) 100))))
|
||||
(print-language-name a0-66 font a2-22 #f)
|
||||
)
|
||||
(let ((a2-23 (+ (-> obj language-x-offset) 100)))
|
||||
(cond
|
||||
((< a2-23 150)
|
||||
(print-language-name (the int next-lang) font a2-23 #t)
|
||||
)
|
||||
(else
|
||||
(let ((a2-24 (- 200 (-> obj language-x-offset))))
|
||||
(print-language-name prev-lang font a2-24 #f)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(else
|
||||
(let ((a2-25 (+ (-> obj language-x-offset) 100)))
|
||||
(cond
|
||||
((< a2-25 150)
|
||||
(print-language-name a0-66 sv-112 a2-25 #f)
|
||||
)
|
||||
(else
|
||||
(let ((a2-26 (- 200 (-> obj language-x-offset))))
|
||||
(print-language-name v1-153 sv-112 a2-26 #t)
|
||||
)
|
||||
)
|
||||
(else
|
||||
(let ((a2-25 (+ (-> obj language-x-offset) 100)))
|
||||
(cond
|
||||
((< a2-25 150)
|
||||
(print-language-name a0-66 font a2-25 #f)
|
||||
)
|
||||
(else
|
||||
(let ((a2-26 (- 200 (-> obj language-x-offset))))
|
||||
(print-language-name (the int v1-153) font a2-26 #t)
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((a2-27 (- 200 (+ (-> obj language-x-offset) 100))))
|
||||
(print-language-name sv-480 sv-112 a2-27 #t)
|
||||
)
|
||||
)
|
||||
(let ((a2-27 (- 200 (+ (-> obj language-x-offset) 100))))
|
||||
(print-language-name (the int next-lang) font a2-27 #t)
|
||||
)
|
||||
)
|
||||
)
|
||||
(when (not (-> obj language-transition))
|
||||
(let ((a0-75 sv-112))
|
||||
(set! (-> a0-75 color) (font-color yellow-green-2))
|
||||
)
|
||||
)
|
||||
(let ((t9-32 print-language-name)
|
||||
(a1-37 sv-112)
|
||||
(a2-28 (-> obj language-x-offset))
|
||||
(a3-14 (-> obj language-direction))
|
||||
)
|
||||
(t9-32 (the-as int sv-512) a1-37 a2-28 (the-as symbol a3-14))
|
||||
)
|
||||
)
|
||||
((= v1-81 3)
|
||||
(set! sv-912 (lookup-text! *common-text* (game-text-id move-dpad) #f))
|
||||
sv-912
|
||||
)
|
||||
((= v1-81 4)
|
||||
(cond
|
||||
((= (-> (the-as (pointer uint32) (-> s3-0 s0-0 value-to-modify))) 'aspect4x3)
|
||||
(set! sv-528 format)
|
||||
(set! sv-544 (clear *temp-string*))
|
||||
(set! sv-560 "~30L~S~0L ~S")
|
||||
(set! sv-576 (lookup-text! *common-text* (game-text-id 4x3) #f))
|
||||
(let ((a3-15 (lookup-text! *common-text* (game-text-id 16x9) #f)))
|
||||
(sv-528 sv-544 sv-560 sv-576 a3-15)
|
||||
)
|
||||
(set! sv-912 *temp-string*)
|
||||
sv-912
|
||||
)
|
||||
(else
|
||||
(set! sv-592 format)
|
||||
(set! sv-608 (clear *temp-string*))
|
||||
(set! sv-624 "~0L~S ~30L~S~1L")
|
||||
(set! sv-640 (lookup-text! *common-text* (game-text-id 4x3) #f))
|
||||
(let ((a3-16 (lookup-text! *common-text* (game-text-id 16x9) #f)))
|
||||
(sv-592 sv-608 sv-624 sv-640 a3-16)
|
||||
)
|
||||
(set! sv-912 *temp-string*)
|
||||
sv-912
|
||||
)
|
||||
(if (not (-> obj language-transition))
|
||||
(set-color! font (font-color yellow-green-2)))
|
||||
(print-language-name (the-as int old-lang) font (-> obj language-x-offset) (-> obj language-direction))
|
||||
))
|
||||
(((game-option-type center-screen))
|
||||
(set! option-str (lookup-text! *common-text* (game-text-id move-dpad) #f))
|
||||
)
|
||||
(((game-option-type aspect-ratio))
|
||||
(if (= (-> (the-as (pointer uint32) (-> s3-0 s0-0 value-to-modify))) 'aspect4x3)
|
||||
(set! option-str (string-format "~30L~S~0L ~S" (lookup-text! *common-text* (game-text-id 4x3) #f) (lookup-text! *common-text* (game-text-id 16x9) #f)))
|
||||
(set! option-str (string-format "~0L~S ~30L~S~1L" (lookup-text! *common-text* (game-text-id 4x3) #f) (lookup-text! *common-text* (game-text-id 16x9) #f)))
|
||||
)
|
||||
)
|
||||
((= v1-81 5)
|
||||
(cond
|
||||
((= (-> (the-as (pointer uint32) (-> s3-0 s0-0 value-to-modify))) 'ntsc)
|
||||
(set! sv-656 format)
|
||||
(set! sv-672 (clear *temp-string*))
|
||||
(set! sv-688 "~0L~S ~30L~S~1L")
|
||||
(set! sv-704 (lookup-text! *common-text* (game-text-id 50hz) #f))
|
||||
(let ((a3-17 (lookup-text! *common-text* (game-text-id 60hz) #f)))
|
||||
(sv-656 sv-672 sv-688 sv-704 a3-17)
|
||||
)
|
||||
(set! sv-912 *temp-string*)
|
||||
sv-912
|
||||
)
|
||||
(else
|
||||
(set! sv-720 format)
|
||||
(set! sv-736 (clear *temp-string*))
|
||||
(set! sv-752 "~30L~S~0L ~S")
|
||||
(set! sv-768 (lookup-text! *common-text* (game-text-id 50hz) #f))
|
||||
(let ((a3-18 (lookup-text! *common-text* (game-text-id 60hz) #f)))
|
||||
(sv-720 sv-736 sv-752 sv-768 a3-18)
|
||||
)
|
||||
(set! sv-912 *temp-string*)
|
||||
sv-912
|
||||
)
|
||||
)
|
||||
(((game-option-type video-mode))
|
||||
(if (= (-> (the-as (pointer uint32) (-> s3-0 s0-0 value-to-modify))) 'ntsc)
|
||||
(set! option-str (string-format "~0L~S ~30L~S~1L" (lookup-text! *common-text* (game-text-id 50hz) #f) (lookup-text! *common-text* (game-text-id 60hz) #f)))
|
||||
(set! option-str (string-format "~30L~S~0L ~S" (lookup-text! *common-text* (game-text-id 50hz) #f) (lookup-text! *common-text* (game-text-id 60hz) #f)))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(else
|
||||
(let ((v1-195 (-> s3-0 s0-0 option-type)))
|
||||
(cond
|
||||
((or (zero? v1-195) (= v1-195 3) (= v1-195 4) (= v1-195 5))
|
||||
(set! sv-912 (lookup-text! *common-text* (-> s3-0 s0-0 name) #f))
|
||||
sv-912
|
||||
)
|
||||
((= v1-195 2)
|
||||
(set! sv-784 format)
|
||||
(set! sv-800 (clear *temp-string*))
|
||||
(set! sv-816 "~S: ~S")
|
||||
(set! sv-832 (lookup-text! *common-text* (-> s3-0 s0-0 name) #f))
|
||||
(let ((a3-19 (if (-> (the-as (pointer uint32) (-> s3-0 s0-0 value-to-modify)))
|
||||
(lookup-text! *common-text* (game-text-id on) #f)
|
||||
(lookup-text! *common-text* (game-text-id off) #f)
|
||||
)
|
||||
)
|
||||
)
|
||||
(sv-784 sv-800 sv-816 sv-832 a3-19)
|
||||
)
|
||||
(set! sv-912 *temp-string*)
|
||||
sv-912
|
||||
)
|
||||
((= v1-195 1)
|
||||
(set! sv-848 format)
|
||||
(set! sv-864 (clear *temp-string*))
|
||||
(set! sv-880 "~S: ~S")
|
||||
(set! sv-896 (lookup-text! *common-text* (-> s3-0 s0-0 name) #f))
|
||||
(let ((a3-20 (lookup-text!
|
||||
*common-text*
|
||||
(-> *language-name-remap* (-> (the-as (pointer uint64) (-> s3-0 s0-0 value-to-modify))))
|
||||
#f
|
||||
)
|
||||
)
|
||||
)
|
||||
(sv-848 sv-864 sv-880 sv-896 a3-20)
|
||||
)
|
||||
(set! sv-912 *temp-string*)
|
||||
sv-912
|
||||
)
|
||||
(case (-> s3-0 s0-0 option-type)
|
||||
(((game-option-type slider)
|
||||
(game-option-type center-screen)
|
||||
(game-option-type aspect-ratio)
|
||||
(game-option-type video-mode)
|
||||
)
|
||||
(set! option-str (lookup-text! *common-text* (-> s3-0 s0-0 name) #f))
|
||||
)
|
||||
(((game-option-type on-off))
|
||||
(set! option-str (string-format "~S: ~S" (lookup-text! *common-text* (-> s3-0 s0-0 name) #f)
|
||||
(if (-> (the-as (pointer uint32) (-> s3-0 s0-0 value-to-modify)))
|
||||
(lookup-text! *common-text* (game-text-id on) #f)
|
||||
(lookup-text! *common-text* (game-text-id off) #f)
|
||||
)))
|
||||
)
|
||||
(((game-option-type language))
|
||||
(set! option-str (string-format "~S: ~S" (lookup-text! *common-text* (-> s3-0 s0-0 name) #f)
|
||||
(lookup-text! *common-text* (-> *language-name-remap* (-> (the-as (pointer uint64) (-> s3-0 s0-0 value-to-modify)))) #f)))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(when sv-912
|
||||
(when option-str
|
||||
(let ((f0-23 (-> obj transition-percentage-invert)))
|
||||
(let ((v1-235 sv-112))
|
||||
(set! (-> v1-235 color)
|
||||
(the-as font-color (if (and (= s0-0 (-> obj option-index)) (not (-> obj in-transition)))
|
||||
30
|
||||
0
|
||||
)
|
||||
)
|
||||
(set-color! font (if (and (= s0-0 (-> obj option-index)) (not (-> obj in-transition)))
|
||||
(font-color yellow-green-2)
|
||||
(font-color default)
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> sv-112 origin x) (the float (- sv-128 (-> obj left-x-offset))))
|
||||
(set! (-> sv-112 origin y) (the float (the int (* (the float sv-144) (if (-> s3-0 s0-0 scale)
|
||||
(set! (-> font origin x) (the float (- x-off (-> obj left-x-offset))))
|
||||
(set! (-> font origin y) (the float (the int (* (the float y-off) (if (-> s3-0 s0-0 scale)
|
||||
f0-23
|
||||
1.0
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((v1-246 sv-112))
|
||||
(set! (-> v1-246 scale) (* arg2 f0-23))
|
||||
)
|
||||
(let ((t9-60 print-game-text)
|
||||
(a1-64 sv-112)
|
||||
(a2-50 #f)
|
||||
(a3-21 (the int (* 128.0 f0-23)))
|
||||
(t0-2 22)
|
||||
)
|
||||
(t9-60 sv-912 a1-64 a2-50 a3-21 t0-2)
|
||||
)
|
||||
)))))
|
||||
(set-scale! font (* arg2 f0-23))
|
||||
(print-game-text option-str font #f (the int (* 128.0 f0-23)) 22)
|
||||
)
|
||||
)
|
||||
(+! s2-1 arg1)
|
||||
(+! s1-0 1)
|
||||
)
|
||||
))
|
||||
)
|
||||
)
|
||||
)
|
||||
@ -2156,3 +1931,4 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -993,8 +993,8 @@
|
||||
(progress-new-particle :part 90 :x 256.0 :y 224.0 :z 16.0) ;; tint
|
||||
(progress-new-particle :part 88 :x -42.0 :y (#if PC_PORT 256.0 254.0) :z 5.0) ;; left
|
||||
(progress-new-particle :part 89 :x 610.0 :y (#if PC_PORT 256.0 254.0) :z 5.0) ;; right
|
||||
(progress-new-particle :part 85 :x -320.0 :y 40.0 :z 14.0)
|
||||
(progress-new-particle :part 86 :x -320.0 :y 400.0 :z 14.0)
|
||||
(progress-new-particle :part 85 :x -320.0 :y 40.0 :z 14.0) ;; prev
|
||||
(progress-new-particle :part 86 :x -320.0 :y 400.0 :z 14.0) ;; next
|
||||
(progress-new-particle :part 87 :x -320.0 :y 194.0 :z 15.0)
|
||||
(progress-new-particle :part 97 :x -320.0 :y 194.0 :z 14.0)
|
||||
(progress-new-particle :part 97 :x -320.0 :y 194.0 :z 14.0)
|
||||
@ -1022,6 +1022,10 @@
|
||||
(progress-new-particle :part 572 :x -320.0 :y 338.0 :z 4.0)
|
||||
(progress-new-particle :part 573 :x -320.0 :y 338.0 :z 4.0)
|
||||
(progress-new-particle :part 615 :x -320.0 :y 180.0 :z 4.0)
|
||||
(#when PC_PORT
|
||||
(progress-new-particle :part 85 :x -320.0 :y 32.0 :z 14.0) ;; prev
|
||||
(progress-new-particle :part 86 :x -320.0 :y 412.0 :z 14.0) ;; next
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
@ -9,154 +9,152 @@
|
||||
|
||||
;; options in the start menu options
|
||||
(define *main-options*
|
||||
(new 'static 'boxed-array :type game-option :length 7 :allocated-length 7
|
||||
(new 'static 'game-option :option-type #x6 :name (game-text-id game-options) :scale #t :param3 4)
|
||||
(new 'static 'game-option :option-type #x6 :name (game-text-id graphic-options) :scale #t :param3 5)
|
||||
(new 'static 'game-option :option-type #x6 :name (game-text-id sound-options) :scale #t :param3 6)
|
||||
(new 'static 'game-option :option-type #x6 :name (game-text-id load-game) :scale #t :param3 16)
|
||||
(new 'static 'game-option :option-type #x6 :name (game-text-id save-game) :scale #t :param3 17)
|
||||
(new 'static 'game-option :option-type #x6 :name (game-text-id quit-game) :scale #t :param3 34)
|
||||
(new 'static 'game-option :option-type #x8 :name (game-text-id back) :scale #t)
|
||||
)
|
||||
(new 'static 'boxed-array :type game-option :length 7 :allocated-length 7
|
||||
(new 'static 'game-option :option-type (game-option-type menu) :name (game-text-id game-options) :scale #t :param3 (game-option-menu game-settings))
|
||||
(new 'static 'game-option :option-type (game-option-type menu) :name (game-text-id graphic-options) :scale #t :param3 (game-option-menu graphic-settings))
|
||||
(new 'static 'game-option :option-type (game-option-type menu) :name (game-text-id sound-options) :scale #t :param3 (game-option-menu sound-settings))
|
||||
(new 'static 'game-option :option-type (game-option-type menu) :name (game-text-id load-game) :scale #t :param3 (game-option-menu load-game))
|
||||
(new 'static 'game-option :option-type (game-option-type menu) :name (game-text-id save-game) :scale #t :param3 (game-option-menu save-game))
|
||||
(new 'static 'game-option :option-type (game-option-type menu) :name (game-text-id quit-game) :scale #t :param3 (game-option-menu quit))
|
||||
(new 'static 'game-option :option-type (game-option-type button) :name (game-text-id back) :scale #t)
|
||||
)
|
||||
)
|
||||
|
||||
(define *title*
|
||||
(new 'static 'boxed-array :type game-option :length 4 :allocated-length 4
|
||||
(new 'static 'game-option :option-type #x6 :name (game-text-id new-game) :scale #t :param3 18)
|
||||
(new 'static 'game-option :option-type #x6 :name (game-text-id load-game) :scale #t :param3 16)
|
||||
(new 'static 'game-option :option-type #x6 :name (game-text-id options) :scale #t :param3 28)
|
||||
(new 'static 'game-option :option-type #x8 :name (game-text-id back) :scale #t)
|
||||
)
|
||||
(new 'static 'boxed-array :type game-option :length 4 :allocated-length 4
|
||||
(new 'static 'game-option :option-type (game-option-type menu) :name (game-text-id new-game) :scale #t :param3 (game-option-menu save-game-title))
|
||||
(new 'static 'game-option :option-type (game-option-type menu) :name (game-text-id load-game) :scale #t :param3 (game-option-menu load-game))
|
||||
(new 'static 'game-option :option-type (game-option-type menu) :name (game-text-id options) :scale #t :param3 (game-option-menu settings-title))
|
||||
(new 'static 'game-option :option-type (game-option-type button) :name (game-text-id back) :scale #t)
|
||||
)
|
||||
)
|
||||
|
||||
(define *options*
|
||||
(new 'static 'boxed-array :type game-option :length 4 :allocated-length 4
|
||||
(new 'static 'game-option :option-type #x6 :name (game-text-id game-options) :scale #t :param3 4)
|
||||
(new 'static 'game-option :option-type #x6 :name (game-text-id graphic-options) :scale #t :param3 5)
|
||||
(new 'static 'game-option :option-type #x6 :name (game-text-id sound-options) :scale #t :param3 6)
|
||||
(new 'static 'game-option :option-type #x8 :name (game-text-id back) :scale #t)
|
||||
)
|
||||
(new 'static 'boxed-array :type game-option :length 4 :allocated-length 4
|
||||
(new 'static 'game-option :option-type (game-option-type menu) :name (game-text-id game-options) :scale #t :param3 (game-option-menu game-settings))
|
||||
(new 'static 'game-option :option-type (game-option-type menu) :name (game-text-id graphic-options) :scale #t :param3 (game-option-menu graphic-settings))
|
||||
(new 'static 'game-option :option-type (game-option-type menu) :name (game-text-id sound-options) :scale #t :param3 (game-option-menu sound-settings))
|
||||
(new 'static 'game-option :option-type (game-option-type button) :name (game-text-id back) :scale #t)
|
||||
)
|
||||
)
|
||||
|
||||
(define *main-options-demo*
|
||||
(new 'static 'boxed-array :type game-option :length 4 :allocated-length 4
|
||||
(new 'static 'game-option :option-type #x6 :name (game-text-id game-options) :scale #t :param3 4)
|
||||
(new 'static 'game-option :option-type #x6 :name (game-text-id graphic-options) :scale #t :param3 5)
|
||||
(new 'static 'game-option :option-type #x6 :name (game-text-id sound-options) :scale #t :param3 6)
|
||||
(new 'static 'game-option :option-type #x8 :name (game-text-id back) :scale #t)
|
||||
)
|
||||
(new 'static 'boxed-array :type game-option :length 4 :allocated-length 4
|
||||
(new 'static 'game-option :option-type (game-option-type menu) :name (game-text-id game-options) :scale #t :param3 (game-option-menu game-settings))
|
||||
(new 'static 'game-option :option-type (game-option-type menu) :name (game-text-id graphic-options) :scale #t :param3 (game-option-menu graphic-settings))
|
||||
(new 'static 'game-option :option-type (game-option-type menu) :name (game-text-id sound-options) :scale #t :param3 (game-option-menu sound-settings))
|
||||
(new 'static 'game-option :option-type (game-option-type button) :name (game-text-id back) :scale #t)
|
||||
)
|
||||
)
|
||||
|
||||
(define *main-options-demo-shared*
|
||||
(new 'static 'boxed-array :type game-option :length 5 :allocated-length 5
|
||||
(new 'static 'game-option :option-type #x6 :name (game-text-id game-options) :scale #t :param3 4)
|
||||
(new 'static 'game-option :option-type #x6 :name (game-text-id graphic-options) :scale #t :param3 5)
|
||||
(new 'static 'game-option :option-type #x6 :name (game-text-id sound-options) :scale #t :param3 6)
|
||||
(new 'static 'game-option :option-type #x8 :name (game-text-id exit-demo) :scale #t)
|
||||
(new 'static 'game-option :option-type #x8 :name (game-text-id back) :scale #t)
|
||||
)
|
||||
(new 'static 'boxed-array :type game-option :length 5 :allocated-length 5
|
||||
(new 'static 'game-option :option-type (game-option-type menu) :name (game-text-id game-options) :scale #t :param3 (game-option-menu game-settings))
|
||||
(new 'static 'game-option :option-type (game-option-type menu) :name (game-text-id graphic-options) :scale #t :param3 (game-option-menu graphic-settings))
|
||||
(new 'static 'game-option :option-type (game-option-type menu) :name (game-text-id sound-options) :scale #t :param3 (game-option-menu sound-settings))
|
||||
(new 'static 'game-option :option-type (game-option-type button) :name (game-text-id exit-demo) :scale #t)
|
||||
(new 'static 'game-option :option-type (game-option-type button) :name (game-text-id back) :scale #t)
|
||||
)
|
||||
)
|
||||
|
||||
(define *game-options*
|
||||
(new 'static 'boxed-array :type game-option :length 4 :allocated-length 4
|
||||
(new 'static 'game-option :option-type #x2 :name (game-text-id vibrations) :scale #t)
|
||||
(new 'static 'game-option :option-type #x2 :name (game-text-id play-hints) :scale #t)
|
||||
(new 'static 'game-option :option-type #x1 :name (game-text-id language) :scale #t)
|
||||
(new 'static 'game-option :option-type #x8 :name (game-text-id back) :scale #t)
|
||||
)
|
||||
(new 'static 'boxed-array :type game-option :length 4 :allocated-length 4
|
||||
(new 'static 'game-option :option-type (game-option-type on-off) :name (game-text-id vibrations) :scale #t)
|
||||
(new 'static 'game-option :option-type (game-option-type on-off) :name (game-text-id play-hints) :scale #t)
|
||||
(new 'static 'game-option :option-type (game-option-type language) :name (game-text-id language) :scale #t)
|
||||
(new 'static 'game-option :option-type (game-option-type button) :name (game-text-id back) :scale #t)
|
||||
)
|
||||
)
|
||||
|
||||
(define *game-options-japan*
|
||||
(new 'static 'boxed-array :type game-option :length 3 :allocated-length 3
|
||||
(new 'static 'game-option :option-type #x2 :name (game-text-id vibrations) :scale #t)
|
||||
(new 'static 'game-option :option-type #x2 :name (game-text-id play-hints) :scale #t)
|
||||
(new 'static 'game-option :option-type #x8 :name (game-text-id back) :scale #t)
|
||||
)
|
||||
(new 'static 'boxed-array :type game-option :length 3 :allocated-length 3
|
||||
(new 'static 'game-option :option-type (game-option-type on-off) :name (game-text-id vibrations) :scale #t)
|
||||
(new 'static 'game-option :option-type (game-option-type on-off) :name (game-text-id play-hints) :scale #t)
|
||||
(new 'static 'game-option :option-type (game-option-type button) :name (game-text-id back) :scale #t)
|
||||
)
|
||||
)
|
||||
|
||||
(define *game-options-demo*
|
||||
(new 'static 'boxed-array :type game-option :length 3 :allocated-length 3
|
||||
(new 'static 'game-option :option-type #x2 :name (game-text-id vibrations) :scale #t)
|
||||
(new 'static 'game-option :option-type #x2 :name (game-text-id play-hints) :scale #t)
|
||||
(new 'static 'game-option :option-type #x8 :name (game-text-id back) :scale #t)
|
||||
)
|
||||
(new 'static 'boxed-array :type game-option :length 3 :allocated-length 3
|
||||
(new 'static 'game-option :option-type (game-option-type on-off) :name (game-text-id vibrations) :scale #t)
|
||||
(new 'static 'game-option :option-type (game-option-type on-off) :name (game-text-id play-hints) :scale #t)
|
||||
(new 'static 'game-option :option-type (game-option-type button) :name (game-text-id back) :scale #t)
|
||||
)
|
||||
)
|
||||
|
||||
(define *graphic-options*
|
||||
(new 'static 'boxed-array :type game-option :length 3 :allocated-length 3
|
||||
(new 'static 'game-option :option-type #x3 :name (game-text-id center-screen) :scale #t)
|
||||
(new 'static 'game-option :option-type #x4 :name (game-text-id aspect-ratio) :scale #t)
|
||||
(new 'static 'game-option :option-type #x8 :name (game-text-id back) :scale #t)
|
||||
)
|
||||
(new 'static 'boxed-array :type game-option :length 3 :allocated-length 3
|
||||
(new 'static 'game-option :option-type (game-option-type center-screen) :name (game-text-id center-screen) :scale #t)
|
||||
(new 'static 'game-option :option-type (game-option-type aspect-ratio) :name (game-text-id aspect-ratio) :scale #t)
|
||||
(new 'static 'game-option :option-type (game-option-type button) :name (game-text-id back) :scale #t)
|
||||
)
|
||||
)
|
||||
|
||||
(define *graphic-title-options-pal*
|
||||
(new 'static 'boxed-array :type game-option :length 4 :allocated-length 4
|
||||
(new 'static 'game-option :option-type #x3 :name (game-text-id center-screen) :scale #t)
|
||||
(new 'static 'game-option :option-type #x5 :name (game-text-id video-mode) :scale #t)
|
||||
(new 'static 'game-option :option-type #x4 :name (game-text-id aspect-ratio) :scale #t)
|
||||
(new 'static 'game-option :option-type #x8 :name (game-text-id back) :scale #t)
|
||||
)
|
||||
(new 'static 'boxed-array :type game-option :length 4 :allocated-length 4
|
||||
(new 'static 'game-option :option-type (game-option-type center-screen) :name (game-text-id center-screen) :scale #t)
|
||||
(new 'static 'game-option :option-type (game-option-type video-mode) :name (game-text-id video-mode) :scale #t)
|
||||
(new 'static 'game-option :option-type (game-option-type aspect-ratio) :name (game-text-id aspect-ratio) :scale #t)
|
||||
(new 'static 'game-option :option-type (game-option-type button) :name (game-text-id back) :scale #t)
|
||||
)
|
||||
)
|
||||
|
||||
(define *sound-options*
|
||||
(new 'static 'boxed-array :type game-option :length 4 :allocated-length 4
|
||||
(new 'static 'game-option :name (game-text-id sfx-volume) :scale #t :param2 100.0)
|
||||
(new 'static 'game-option :name (game-text-id music-volume) :scale #t :param2 100.0)
|
||||
(new 'static 'game-option :name (game-text-id speech-volume) :scale #t :param2 100.0)
|
||||
(new 'static 'game-option :option-type #x8 :name (game-text-id back) :scale #t)
|
||||
)
|
||||
(new 'static 'boxed-array :type game-option :length 4 :allocated-length 4
|
||||
(new 'static 'game-option :name (game-text-id sfx-volume) :scale #t :param2 100.0)
|
||||
(new 'static 'game-option :name (game-text-id music-volume) :scale #t :param2 100.0)
|
||||
(new 'static 'game-option :name (game-text-id speech-volume) :scale #t :param2 100.0)
|
||||
(new 'static 'game-option :option-type (game-option-type button) :name (game-text-id back) :scale #t)
|
||||
)
|
||||
)
|
||||
|
||||
(define *yes-no-options*
|
||||
(new 'static 'boxed-array :type game-option :length 1 :allocated-length 1
|
||||
(new 'static 'game-option :option-type #x7 :scale #f)
|
||||
)
|
||||
)
|
||||
(define *yes-no-options* (new 'static 'boxed-array :type game-option :length 1 :allocated-length 1
|
||||
(new 'static 'game-option :option-type (game-option-type yes-no) :scale #f)
|
||||
)
|
||||
)
|
||||
|
||||
(define *ok-options*
|
||||
(new 'static 'boxed-array :type game-option :length 1 :allocated-length 1
|
||||
(new 'static 'game-option :option-type #x8 :name (game-text-id ok) :scale #f)
|
||||
)
|
||||
(new 'static 'boxed-array :type game-option :length 1 :allocated-length 1
|
||||
(new 'static 'game-option :option-type (game-option-type button) :name (game-text-id ok) :scale #f)
|
||||
)
|
||||
)
|
||||
|
||||
(define *load-options*
|
||||
(new 'static 'boxed-array
|
||||
:type game-option :length 5 :allocated-length 5
|
||||
(new 'static 'game-option :option-type #x8 :scale #f)
|
||||
(new 'static 'game-option :option-type #x8 :scale #f)
|
||||
(new 'static 'game-option :option-type #x8 :scale #f)
|
||||
(new 'static 'game-option :option-type #x8 :scale #f)
|
||||
(new 'static 'game-option :option-type #x8 :name (game-text-id back) :scale #f)
|
||||
)
|
||||
(new 'static 'boxed-array :type game-option :length 5 :allocated-length 5
|
||||
(new 'static 'game-option :option-type (game-option-type button) :scale #f)
|
||||
(new 'static 'game-option :option-type (game-option-type button) :scale #f)
|
||||
(new 'static 'game-option :option-type (game-option-type button) :scale #f)
|
||||
(new 'static 'game-option :option-type (game-option-type button) :scale #f)
|
||||
(new 'static 'game-option :option-type (game-option-type button) :name (game-text-id back) :scale #f)
|
||||
)
|
||||
)
|
||||
|
||||
(define *save-options*
|
||||
(new 'static 'boxed-array :type game-option :length 5 :allocated-length 5
|
||||
(new 'static 'game-option :option-type #x8 :scale #f)
|
||||
(new 'static 'game-option :option-type #x8 :scale #f)
|
||||
(new 'static 'game-option :option-type #x8 :scale #f)
|
||||
(new 'static 'game-option :option-type #x8 :scale #f)
|
||||
(new 'static 'game-option :option-type #x8 :name (game-text-id back) :scale #f)
|
||||
)
|
||||
(new 'static 'boxed-array :type game-option :length 5 :allocated-length 5
|
||||
(new 'static 'game-option :option-type (game-option-type button) :scale #f)
|
||||
(new 'static 'game-option :option-type (game-option-type button) :scale #f)
|
||||
(new 'static 'game-option :option-type (game-option-type button) :scale #f)
|
||||
(new 'static 'game-option :option-type (game-option-type button) :scale #f)
|
||||
(new 'static 'game-option :option-type (game-option-type button) :name (game-text-id back) :scale #f)
|
||||
)
|
||||
)
|
||||
|
||||
(define *save-options-title*
|
||||
(new 'static 'boxed-array
|
||||
:type game-option :length 6 :allocated-length 6
|
||||
(new 'static 'game-option :option-type #x8 :scale #f)
|
||||
(new 'static 'game-option :option-type #x8 :scale #f)
|
||||
(new 'static 'game-option :option-type #x8 :scale #f)
|
||||
(new 'static 'game-option :option-type #x8 :scale #f)
|
||||
(new 'static 'game-option :option-type #x8 :name (game-text-id continue-without-saving) :scale #f)
|
||||
(new 'static 'game-option :option-type #x8 :name (game-text-id back) :scale #f)
|
||||
)
|
||||
(new 'static 'boxed-array :type game-option :length 6 :allocated-length 6
|
||||
(new 'static 'game-option :option-type (game-option-type button) :scale #f)
|
||||
(new 'static 'game-option :option-type (game-option-type button) :scale #f)
|
||||
(new 'static 'game-option :option-type (game-option-type button) :scale #f)
|
||||
(new 'static 'game-option :option-type (game-option-type button) :scale #f)
|
||||
(new 'static 'game-option :option-type (game-option-type button) :name (game-text-id continue-without-saving) :scale #f)
|
||||
(new 'static 'game-option :option-type (game-option-type button) :name (game-text-id back) :scale #f)
|
||||
)
|
||||
)
|
||||
|
||||
;; maps options to a progress screen
|
||||
(define *options-remap*
|
||||
(new 'static 'boxed-array :type (array game-option) :length 0 :allocated-length 35)
|
||||
)
|
||||
(#if (not PC_PORT)
|
||||
(define *options-remap* (new 'static 'boxed-array :type (array game-option) :length 0 :allocated-length 35))
|
||||
(define *options-remap* (new 'static 'boxed-array :type (array game-option) :length 0 :allocated-length 50))
|
||||
)
|
||||
|
||||
;; TODO probably an enum.
|
||||
;; maps "levels" to the appropriate offset in *level-task-data*
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -455,11 +455,73 @@
|
||||
|
||||
(inc #xf10)
|
||||
(europe #xf11)
|
||||
|
||||
;; extra IDs for pc port
|
||||
(camera-options #x1000)
|
||||
(normal #x1001)
|
||||
(inverted #x1002)
|
||||
(camera-controls-horz #x1003)
|
||||
(camera-controls-vert #x1004)
|
||||
(misc-options #x100f)
|
||||
(accessibility-options #x1010)
|
||||
(money-starburst #x1011)
|
||||
(ps2-options #x1020)
|
||||
(ps2-load-speed #x1021)
|
||||
(ps2-parts #x1022)
|
||||
(discord-rpc #x1030)
|
||||
(display-mode #x1031)
|
||||
(windowed #x1032)
|
||||
(borderless #x1033)
|
||||
(fullscreen #x1034)
|
||||
(game-resolution #x1035)
|
||||
(resolution-fmt #x1036)
|
||||
(ps2-aspect-ratio #x1037)
|
||||
(ps2-aspect-ratio-msg #x1038)
|
||||
(aspect-ratio-ps2 #x1039)
|
||||
(fit-to-screen #x103a)
|
||||
(msaa #x1050)
|
||||
(x-times-fmt #x1051)
|
||||
(2-times #x1052)
|
||||
(4-times #x1053)
|
||||
(8-times #x1054)
|
||||
(16-times #x1055)
|
||||
(frame-rate #x1060)
|
||||
(lod-bg #x1070)
|
||||
(lod-fg #x1071)
|
||||
(lod-highest #x1072)
|
||||
(lod-high #x1073)
|
||||
(lod-mid #x1074)
|
||||
(lod-low #x1075)
|
||||
(lod-lowest #x1076)
|
||||
(lod-ps2 #x1077)
|
||||
(subtitles #x1078)
|
||||
(hinttitles #x1079)
|
||||
(subtitles-language #x107a)
|
||||
(subtitles-speaker #x107b)
|
||||
(speaker-always #x107c)
|
||||
(speaker-never #x107d)
|
||||
(speaker-auto #x107e)
|
||||
(hint-log #x107f)
|
||||
(cheats #x1080)
|
||||
(cheat-eco-blue #x1090)
|
||||
(cheat-eco-red #x1091)
|
||||
(cheat-eco-green #x1092)
|
||||
(cheat-eco-yellow #x1093)
|
||||
(cheat-sidekick-alt #x1094)
|
||||
(cheat-invinc #x1095)
|
||||
(music-player #x10c0)
|
||||
(scene-player #x10c1)
|
||||
(play-credits #x10c2)
|
||||
(scrapbook #x10c3)
|
||||
(scene-0 #x1100)
|
||||
(scene-255 #x11ff)
|
||||
(hint-0 #x1200)
|
||||
(hint-511 #x13ff)
|
||||
;; GAME-TEXT-ID ENUM ENDS
|
||||
)
|
||||
|
||||
|
||||
;; an individual string.
|
||||
;; an individual string.
|
||||
(deftype game-text (structure)
|
||||
((id game-text-id :offset-assert 0)
|
||||
(text string :offset-assert 4)
|
||||
|
@ -647,6 +647,9 @@
|
||||
(set! (-> *video-parms* relative-y-scale) sv-124)
|
||||
(set! (-> *video-parms* relative-x-scale-reciprical) sv-128)
|
||||
(set! (-> *video-parms* relative-y-scale-reciprical) sv-132)
|
||||
(with-pc
|
||||
(if (and *debug-segment* (-> *pc-settings* display-text-box))
|
||||
(draw-debug-text-box font-ctxt)))
|
||||
(if (> sv-168 0)
|
||||
(* sv-164 (the float sv-168))
|
||||
0.0
|
||||
|
@ -324,7 +324,7 @@
|
||||
;; Text
|
||||
;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
(defstep :in "assets/game_text.txt"
|
||||
(defstep :in "game/assets/game_text.gp"
|
||||
:tool 'text
|
||||
:out '("out/iso/0COMMON.TXT"
|
||||
"out/iso/1COMMON.TXT"
|
||||
@ -335,7 +335,7 @@
|
||||
"out/iso/6COMMON.TXT")
|
||||
)
|
||||
|
||||
(defstep :in "game/assets/game_subtitle.txt"
|
||||
(defstep :in "game/assets/game_subtitle.gp"
|
||||
:tool 'subtitle
|
||||
:out '("out/iso/0SUBTIT.TXT"
|
||||
"out/iso/3SUBTIT.TXT"
|
||||
@ -1632,6 +1632,7 @@
|
||||
"gfx/decomp-h.gc"
|
||||
"gfx/hw/display.gc"
|
||||
"engine/connect.gc"
|
||||
"ui/text-h.gc"
|
||||
"game/settings-h.gc"
|
||||
"gfx/capture.gc"
|
||||
"debug/memory-usage-h.gc"
|
||||
@ -1721,6 +1722,7 @@
|
||||
"camera/cam-update-h.gc"
|
||||
"debug/assert-h.gc"
|
||||
"ui/hud-h.gc"
|
||||
"ui/progress-h.gc"
|
||||
"ps2/rpc-h.gc"
|
||||
"nav/path-h.gc"
|
||||
"nav/navigate-h.gc"
|
||||
@ -1854,7 +1856,10 @@
|
||||
"game/crates.gc"
|
||||
"ui/hud.gc"
|
||||
"ui/hud-classes.gc"
|
||||
"ui/progress/progress-static.gc"
|
||||
"ui/progress/progress-part.gc"
|
||||
"ui/progress/progress-draw.gc"
|
||||
"ui/progress/progress.gc"
|
||||
"ui/credits.gc"
|
||||
"game/projectiles.gc"
|
||||
"gfx/ocean/ocean.gc"
|
||||
@ -1931,10 +1936,6 @@
|
||||
(goal-src "pc/pckernel-h.gc" "dma-disasm")
|
||||
(goal-src "pc/pckernel.gc" "settings")
|
||||
(goal-src "pc/subtitle.gc" "text")
|
||||
(goal-src "pc/progress-pc.gc" "progress" "pckernel")
|
||||
|
||||
(goal-src "pc/engine/ui/text-h.gc" "connect")
|
||||
(goal-src "pc/engine/ui/progress-h.gc" "hud-h")
|
||||
(goal-src "pc/engine/ui/progress/progress-static.gc" "hud-classes")
|
||||
(goal-src "pc/engine/ui/progress/progress-draw.gc" "progress-part")
|
||||
(goal-src "pc/engine/ui/progress/progress.gc" "progress-draw")
|
||||
|
||||
|
@ -535,7 +535,7 @@
|
||||
)
|
||||
|
||||
(defmacro 1-! (place)
|
||||
`(set! ,place (- 1 ,place))
|
||||
`(set! ,place (+ -1 ,place))
|
||||
)
|
||||
|
||||
(defmacro *! (place amount)
|
||||
|
@ -377,7 +377,7 @@
|
||||
(desfun enum-max (enum)
|
||||
"get the highest value in an enum"
|
||||
|
||||
(let ((max-val -999999999))
|
||||
(let ((max-val -999999999999))
|
||||
(doenum (name val enum)
|
||||
(when (> val max-val)
|
||||
(set! max-val val))
|
||||
|
@ -326,12 +326,14 @@
|
||||
(define-extern pc-pad-input-index-get (function int))
|
||||
(define-extern pc-pad-input-map-save! (function none))
|
||||
(define-extern pc-pad-get-mapped-button (function int int int))
|
||||
(define-extern pc-get-fullscreen (function symbol))
|
||||
(define-extern pc-get-screen-size (function int (pointer int32) (pointer int32) (pointer int32) none))
|
||||
(define-extern pc-get-os (function symbol))
|
||||
(define-extern pc-get-window-size (function (pointer int32) (pointer int32) none))
|
||||
(define-extern pc-get-window-scale (function (pointer float) (pointer float) none))
|
||||
(define-extern pc-set-window-size (function int int none))
|
||||
(define-extern pc-set-letterbox (function int int none))
|
||||
(define-extern pc-set-fullscreen (function int int none))
|
||||
(define-extern pc-set-fullscreen (function symbol int none))
|
||||
(define-extern pc-renderer-tree-set-lod (function pc-renderer-tree-type int none))
|
||||
(define-extern pc-discord-rpc-update (function discord-info none))
|
||||
(define-extern pc-discord-rpc-set (function int none))
|
||||
|
@ -80,7 +80,7 @@
|
||||
)
|
||||
|
||||
(defmethod dummy-44 lurkercrab ((obj lurkercrab) (arg0 process) (arg1 event-message-block))
|
||||
(if (and (logtest? (-> obj nav-enemy-flags) 64)
|
||||
(if (and (logtest? (-> obj nav-enemy-flags) (nav-enemy-flags navenmf6))
|
||||
((method-of-type touching-shapes-entry prims-touching?)
|
||||
(the-as touching-shapes-entry (-> arg1 param 0))
|
||||
(-> obj collide-info)
|
||||
@ -97,7 +97,7 @@
|
||||
6144.0
|
||||
16384.0
|
||||
)
|
||||
(the-as object (if (zero? (logand (-> obj nav-enemy-flags) 256))
|
||||
(the-as object (if (zero? (logand (-> obj nav-enemy-flags) (nav-enemy-flags navenmf8)))
|
||||
(do-push-aways! (-> obj collide-info))
|
||||
)
|
||||
)
|
||||
@ -114,7 +114,7 @@
|
||||
)
|
||||
((= v1-1 'punch)
|
||||
(cond
|
||||
((logtest? (-> obj nav-enemy-flags) 32)
|
||||
((logtest? (-> obj nav-enemy-flags) (nav-enemy-flags navenmf5))
|
||||
(logclear! (-> obj mask) (process-mask actor-pause))
|
||||
(go (method-of-object obj nav-enemy-die))
|
||||
)
|
||||
@ -136,7 +136,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
((logtest? (-> obj nav-enemy-flags) 32)
|
||||
((logtest? (-> obj nav-enemy-flags) (nav-enemy-flags navenmf5))
|
||||
(logclear! (-> obj mask) (process-mask actor-pause))
|
||||
(go (method-of-object obj nav-enemy-die))
|
||||
)
|
||||
@ -164,7 +164,7 @@ nav-enemy-default-event-handler
|
||||
|
||||
(defmethod TODO-RENAME-37 lurkercrab ((obj lurkercrab))
|
||||
(when (-> obj orient)
|
||||
(if (logtest? (nav-control-flags bit19) (-> obj nav flags))
|
||||
(if (logtest? (nav-control-flags navcf19) (-> obj nav flags))
|
||||
(seek-to-point-toward-point!
|
||||
(-> obj collide-info)
|
||||
(-> obj nav target-pos)
|
||||
@ -275,7 +275,7 @@ nav-enemy-default-event-handler
|
||||
)
|
||||
|
||||
(defbehavior lurkercrab-invulnerable lurkercrab ()
|
||||
(set! (-> self nav-enemy-flags) (logand -33 (-> self nav-enemy-flags)))
|
||||
(logclear! (-> self nav-enemy-flags) (nav-enemy-flags navenmf5))
|
||||
(let ((v1-3 (find-prim-by-id (-> self collide-info) (the-as uint 2))))
|
||||
(when v1-3
|
||||
(let ((v0-1 4))
|
||||
@ -287,7 +287,7 @@ nav-enemy-default-event-handler
|
||||
)
|
||||
|
||||
(defbehavior lurkercrab-vulnerable lurkercrab ()
|
||||
(logior! (-> self nav-enemy-flags) 32)
|
||||
(logior! (-> self nav-enemy-flags) (nav-enemy-flags navenmf5))
|
||||
(let ((v1-3 (find-prim-by-id (-> self collide-info) (the-as uint 2))))
|
||||
(when v1-3
|
||||
(let ((v0-1 1))
|
||||
@ -308,8 +308,8 @@ nav-enemy-default-event-handler
|
||||
:exit
|
||||
(behavior ()
|
||||
(lurkercrab-invulnerable)
|
||||
(set! (-> self nav-enemy-flags) (logand -65 (-> self nav-enemy-flags)))
|
||||
(logior! (-> self nav-enemy-flags) 8)
|
||||
(logclear! (-> self nav-enemy-flags) (nav-enemy-flags navenmf6))
|
||||
(logior! (-> self nav-enemy-flags) (nav-enemy-flags enable-rotate))
|
||||
(none)
|
||||
)
|
||||
:code
|
||||
@ -364,7 +364,7 @@ nav-enemy-default-event-handler
|
||||
(joint-control-channel-group! a0-12 (the-as art-joint-anim #f) num-func-loop!)
|
||||
)
|
||||
(ja-channel-push! 1 180)
|
||||
(set! (-> self nav-enemy-flags) (logand -9 (-> self nav-enemy-flags)))
|
||||
(logclear! (-> self nav-enemy-flags) (nav-enemy-flags enable-rotate))
|
||||
(nav-enemy-rnd-int-range 2 6)
|
||||
(until (not (nav-enemy-rnd-go-idle? 0.2))
|
||||
(let ((gp-1 (-> self skel root-channel 0)))
|
||||
@ -381,7 +381,7 @@ nav-enemy-default-event-handler
|
||||
)
|
||||
)
|
||||
)
|
||||
(logior! (-> self nav-enemy-flags) 8)
|
||||
(logior! (-> self nav-enemy-flags) (nav-enemy-flags enable-rotate))
|
||||
(let ((a0-19 (-> self skel root-channel 0)))
|
||||
(set! (-> a0-19 frame-group) (the-as art-joint-anim (-> self draw art-group data 5)))
|
||||
(set! (-> a0-19 param 0)
|
||||
@ -416,7 +416,7 @@ nav-enemy-default-event-handler
|
||||
)
|
||||
)
|
||||
(lurkercrab-vulnerable)
|
||||
(logior! (-> self nav-enemy-flags) 64)
|
||||
(logior! (-> self nav-enemy-flags) (nav-enemy-flags navenmf6))
|
||||
(dotimes (gp-5 2)
|
||||
(let ((s5-0 (-> self skel root-channel 0)))
|
||||
(set! (-> s5-0 frame-group) (the-as art-joint-anim (-> self draw art-group data 7)))
|
||||
@ -435,7 +435,7 @@ nav-enemy-default-event-handler
|
||||
)
|
||||
)
|
||||
(lurkercrab-invulnerable)
|
||||
(set! (-> self nav-enemy-flags) (logand -65 (-> self nav-enemy-flags)))
|
||||
(logclear! (-> self nav-enemy-flags) (nav-enemy-flags navenmf6))
|
||||
(let ((gp-6 (-> self skel root-channel 0)))
|
||||
(set! (-> gp-6 frame-group) (the-as art-joint-anim (-> self draw art-group data 8)))
|
||||
(set! (-> gp-6 param 0) (ja-aframe 90.0 0))
|
||||
@ -480,7 +480,7 @@ nav-enemy-default-event-handler
|
||||
:exit
|
||||
(behavior ()
|
||||
(lurkercrab-invulnerable)
|
||||
(set! (-> self nav-enemy-flags) (logand -65 (-> self nav-enemy-flags)))
|
||||
(logclear! (-> self nav-enemy-flags) (nav-enemy-flags navenmf6))
|
||||
(none)
|
||||
)
|
||||
:trans
|
||||
@ -495,7 +495,7 @@ nav-enemy-default-event-handler
|
||||
)
|
||||
:code
|
||||
(behavior ()
|
||||
(logior! (-> self nav-enemy-flags) 8)
|
||||
(logior! (-> self nav-enemy-flags) (nav-enemy-flags enable-rotate))
|
||||
(ja-channel-push! 1 22)
|
||||
(while #t
|
||||
(let ((a0-1 (-> self skel root-channel 0)))
|
||||
@ -516,7 +516,7 @@ nav-enemy-default-event-handler
|
||||
)
|
||||
)
|
||||
(lurkercrab-vulnerable)
|
||||
(logior! (-> self nav-enemy-flags) 64)
|
||||
(logior! (-> self nav-enemy-flags) (nav-enemy-flags navenmf6))
|
||||
(let ((gp-0 (-> self skel root-channel 0)))
|
||||
(set! (-> gp-0 frame-group) (the-as art-joint-anim (-> self draw art-group data 7)))
|
||||
(set! (-> gp-0 param 0) (ja-aframe 30.0 0))
|
||||
@ -578,7 +578,7 @@ nav-enemy-default-event-handler
|
||||
)
|
||||
)
|
||||
(lurkercrab-invulnerable)
|
||||
(set! (-> self nav-enemy-flags) (logand -65 (-> self nav-enemy-flags)))
|
||||
(logclear! (-> self nav-enemy-flags) (nav-enemy-flags navenmf6))
|
||||
(let ((gp-8 (-> self skel root-channel 0)))
|
||||
(set! (-> gp-8 frame-group) (the-as art-joint-anim (-> self draw art-group data 8)))
|
||||
(set! (-> gp-8 param 0) (ja-aframe 90.0 0))
|
||||
@ -792,7 +792,7 @@ nav-enemy-default-event-handler
|
||||
:use-proximity-notice #f
|
||||
:use-jump-blocked #f
|
||||
:use-jump-patrol #f
|
||||
:gnd-collide-with #x1
|
||||
:gnd-collide-with (collide-kind background)
|
||||
:debug-draw-neck #f
|
||||
:debug-draw-jump #f
|
||||
)
|
||||
@ -845,7 +845,7 @@ nav-enemy-default-event-handler
|
||||
(TODO-RENAME-45 obj *lurkercrab-nav-enemy-info*)
|
||||
(set! (-> obj part) (create-launch-control (-> *part-group-id-table* 159) obj))
|
||||
(set! (-> obj orient) #t)
|
||||
(set! (-> obj nav-enemy-flags) (logand -97 (-> obj nav-enemy-flags)))
|
||||
(logclear! (-> obj nav-enemy-flags) (nav-enemy-flags navenmf5 navenmf6))
|
||||
(set! (-> obj target-speed) 0.0)
|
||||
(set! (-> obj momentum-speed) 0.0)
|
||||
(set! (-> obj draw force-lod) 2)
|
||||
|
@ -117,7 +117,7 @@ nav-enemy-default-event-handler
|
||||
(joint-control-channel-group! a0-14 (the-as art-joint-anim (-> self draw art-group data 7)) num-func-seek!)
|
||||
)
|
||||
(until (ja-done? 0)
|
||||
(if (logtest? (-> self nav-enemy-flags) 256)
|
||||
(if (logtest? (-> self nav-enemy-flags) (nav-enemy-flags navenmf8))
|
||||
(go-virtual nav-enemy-attack)
|
||||
)
|
||||
(suspend)
|
||||
@ -144,10 +144,10 @@ nav-enemy-default-event-handler
|
||||
(behavior ()
|
||||
(set! (-> self rotate-speed) 1456355.5)
|
||||
(set! (-> self turn-time) (seconds 0.1))
|
||||
(set! (-> self nav-enemy-flags) (logand -17 (-> self nav-enemy-flags)))
|
||||
(logclear! (-> self nav-enemy-flags) (nav-enemy-flags enable-travel))
|
||||
(let ((f30-0 (rand-vu-float-range 0.8 1.2)))
|
||||
(while #t
|
||||
(logior! (-> self nav-enemy-flags) 16)
|
||||
(logior! (-> self nav-enemy-flags) (nav-enemy-flags enable-travel))
|
||||
(ja-channel-push! 1 30)
|
||||
(let ((gp-0 (-> self skel root-channel 0)))
|
||||
(set! (-> gp-0 frame-group) (the-as art-joint-anim (-> self draw art-group data 8)))
|
||||
@ -158,9 +158,9 @@ nav-enemy-default-event-handler
|
||||
)
|
||||
(until (ja-done? 0)
|
||||
(let ((f0-3 (ja-aframe-num 0)))
|
||||
(set! (-> self nav-enemy-flags) (logand -17 (-> self nav-enemy-flags)))
|
||||
(logclear! (-> self nav-enemy-flags) (nav-enemy-flags enable-travel))
|
||||
(if (and (>= f0-3 2.5) (>= 7.5 f0-3))
|
||||
(logior! (-> self nav-enemy-flags) 16)
|
||||
(logior! (-> self nav-enemy-flags) (nav-enemy-flags enable-travel))
|
||||
)
|
||||
)
|
||||
(suspend)
|
||||
@ -170,7 +170,7 @@ nav-enemy-default-event-handler
|
||||
(joint-control-channel-group-eval! gp-1 (the-as art-joint-anim #f) num-func-seek!)
|
||||
)
|
||||
)
|
||||
(set! (-> self nav-enemy-flags) (logand -17 (-> self nav-enemy-flags)))
|
||||
(logclear! (-> self nav-enemy-flags) (nav-enemy-flags enable-travel))
|
||||
(let ((a0-11 (-> self skel root-channel 0)))
|
||||
(set! (-> a0-11 param 0) 1.0)
|
||||
(joint-control-channel-group! a0-11 (the-as art-joint-anim #f) num-func-loop!)
|
||||
@ -230,7 +230,7 @@ nav-enemy-default-event-handler
|
||||
(joint-control-channel-group-eval! a0-2 (the-as art-joint-anim #f) num-func-seek!)
|
||||
)
|
||||
)
|
||||
(logclear! (-> self nav flags) (nav-control-flags bit17 bit19))
|
||||
(logclear! (-> self nav flags) (nav-control-flags navcf17 navcf19))
|
||||
(nav-enemy-get-new-patrol-point)
|
||||
(let ((a0-7 (-> self skel root-channel 0)))
|
||||
(set! (-> a0-7 frame-group) (the-as art-joint-anim (-> self draw art-group data 5)))
|
||||
@ -284,12 +284,12 @@ nav-enemy-default-event-handler
|
||||
)
|
||||
:exit
|
||||
(behavior ()
|
||||
(logior! (-> self nav-enemy-flags) 16)
|
||||
(logior! (-> self nav-enemy-flags) (nav-enemy-flags enable-travel))
|
||||
(none)
|
||||
)
|
||||
:code
|
||||
(behavior ()
|
||||
(set! (-> self nav-enemy-flags) (logand -17 (-> self nav-enemy-flags)))
|
||||
(logclear! (-> self nav-enemy-flags) (nav-enemy-flags enable-travel))
|
||||
(ja-channel-push! 1 22)
|
||||
(dotimes (gp-0 4)
|
||||
(let ((a0-2 (-> self skel root-channel 0)))
|
||||
@ -303,9 +303,9 @@ nav-enemy-default-event-handler
|
||||
)
|
||||
(until (ja-done? 0)
|
||||
(let ((f0-4 (ja-aframe-num 0)))
|
||||
(set! (-> self nav-enemy-flags) (logand -17 (-> self nav-enemy-flags)))
|
||||
(logclear! (-> self nav-enemy-flags) (nav-enemy-flags enable-travel))
|
||||
(if (and (>= f0-4 2.5) (>= 7.5 f0-4))
|
||||
(logior! (-> self nav-enemy-flags) 16)
|
||||
(logior! (-> self nav-enemy-flags) (nav-enemy-flags enable-travel))
|
||||
)
|
||||
)
|
||||
(suspend)
|
||||
@ -371,7 +371,7 @@ nav-enemy-default-event-handler
|
||||
:use-proximity-notice #f
|
||||
:use-jump-blocked #f
|
||||
:use-jump-patrol #f
|
||||
:gnd-collide-with #x1
|
||||
:gnd-collide-with (collide-kind background)
|
||||
:debug-draw-neck #f
|
||||
:debug-draw-jump #f
|
||||
)
|
||||
|
@ -75,7 +75,7 @@
|
||||
:use-proximity-notice #f
|
||||
:use-jump-blocked #f
|
||||
:use-jump-patrol #f
|
||||
:gnd-collide-with #x1
|
||||
:gnd-collide-with (collide-kind background)
|
||||
:debug-draw-neck #f
|
||||
:debug-draw-jump #f
|
||||
)
|
||||
|
@ -139,7 +139,7 @@
|
||||
(behavior ()
|
||||
(set! (-> self turn-time) (seconds 0.2))
|
||||
(let ((f30-0 (nav-enemy-rnd-float-range 0.8 1.2)))
|
||||
(when (or (logtest? (-> self nav-enemy-flags) 256)
|
||||
(when (or (logtest? (-> self nav-enemy-flags) (nav-enemy-flags navenmf8))
|
||||
(and (nav-enemy-player-vulnerable?) (nav-enemy-rnd-percent? 0.5))
|
||||
)
|
||||
(ja-channel-push! 1 30)
|
||||
@ -161,7 +161,7 @@
|
||||
)
|
||||
(while #t
|
||||
(when (not (nav-enemy-facing-player? 2730.6667))
|
||||
(logior! (-> self nav-enemy-flags) 16)
|
||||
(logior! (-> self nav-enemy-flags) (nav-enemy-flags enable-travel))
|
||||
(let ((a0-9 (-> self skel root-channel 0)))
|
||||
(set! (-> a0-9 param 0) 1.0)
|
||||
(joint-control-channel-group! a0-9 (the-as art-joint-anim #f) num-func-loop!)
|
||||
@ -182,7 +182,7 @@
|
||||
(joint-control-channel-group-eval! a0-15 (the-as art-joint-anim #f) num-func-loop!)
|
||||
)
|
||||
)
|
||||
(set! (-> self nav-enemy-flags) (logand -17 (-> self nav-enemy-flags)))
|
||||
(logclear! (-> self nav-enemy-flags) (nav-enemy-flags enable-travel))
|
||||
)
|
||||
(if (not (= (if (> (-> self skel active-channels) 0)
|
||||
(-> self skel root-channel 0 frame-group)
|
||||
@ -267,7 +267,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(logclear! (-> self nav flags) (nav-control-flags bit17 bit19))
|
||||
(logclear! (-> self nav flags) (nav-control-flags navcf17 navcf19))
|
||||
(nav-enemy-get-new-patrol-point)
|
||||
(let ((a0-12 (-> self skel root-channel 0)))
|
||||
(set! (-> a0-12 frame-group) (the-as art-joint-anim (-> self draw art-group data 10)))
|
||||
@ -383,7 +383,7 @@
|
||||
:use-proximity-notice #t
|
||||
:use-jump-blocked #t
|
||||
:use-jump-patrol #f
|
||||
:gnd-collide-with #x1
|
||||
:gnd-collide-with (collide-kind background)
|
||||
:debug-draw-neck #f
|
||||
:debug-draw-jump #f
|
||||
)
|
||||
|
@ -150,7 +150,7 @@ battlecontroller-default-event-handler
|
||||
(let* ((s5-0 (-> self spawner-array gp-0))
|
||||
(s4-0 (handle->process (-> s5-0 creature)))
|
||||
)
|
||||
(when (and s4-0 (logtest? (-> (the-as nav-enemy s4-0) nav-enemy-flags) 2048))
|
||||
(when (and s4-0 (logtest? (-> (the-as nav-enemy s4-0) nav-enemy-flags) (nav-enemy-flags navenmf11)))
|
||||
(cond
|
||||
((< (-> s5-0 state) (-> s5-0 path curve num-cverts))
|
||||
(when (or (-> self noticed-player) (= (-> s5-0 state) 1))
|
||||
@ -158,7 +158,7 @@ battlecontroller-default-event-handler
|
||||
(eval-path-curve-div! (-> s5-0 path) s3-0 (the float (-> s5-0 state)) 'interp)
|
||||
(send-event s4-0 'cue-jump-to-point s3-0)
|
||||
)
|
||||
(if (zero? (logand (-> (the-as nav-enemy s4-0) nav-enemy-flags) 2048))
|
||||
(if (zero? (logand (-> (the-as nav-enemy s4-0) nav-enemy-flags) (nav-enemy-flags navenmf11)))
|
||||
(+! (-> s5-0 state) 1)
|
||||
)
|
||||
)
|
||||
@ -206,7 +206,7 @@ battlecontroller-default-event-handler
|
||||
(when (the-as (pointer nav-enemy) gp-0)
|
||||
(logclear! (-> (the-as (pointer nav-enemy) gp-0) 0 mask) (process-mask actor-pause))
|
||||
(if (-> self misty-ambush-collision-hack)
|
||||
(logior! (-> (the-as (pointer nav-enemy) gp-0) 0 nav-enemy-flags) #x8000)
|
||||
(logior! (-> (the-as (pointer nav-enemy) gp-0) 0 nav-enemy-flags) (nav-enemy-flags navenmf15))
|
||||
)
|
||||
(+! (-> self spawn-count) 1)
|
||||
(-> self fact pickup-type)
|
||||
|
@ -412,7 +412,7 @@
|
||||
(-> arg0 bbox)
|
||||
(collide-kind background)
|
||||
obj
|
||||
(new 'static 'pat-surface :skip #x1 :noentity #x1)
|
||||
(new 'static 'pat-surface :noentity #x1)
|
||||
)
|
||||
(let ((gp-1 (-> obj joints))
|
||||
(v1-2 (-> arg0 head))
|
||||
|
@ -11,60 +11,97 @@
|
||||
(define-extern nav-enemy-get-new-patrol-point (function int :behavior nav-enemy))
|
||||
(define-extern nav-enemy-test-point-near-nav-mesh? (function vector symbol :behavior nav-enemy))
|
||||
|
||||
(defenum nav-enemy-flags
|
||||
:bitfield #t
|
||||
:type uint32
|
||||
(navenmf0 0)
|
||||
(navenmf1 1)
|
||||
(navenmf2 2)
|
||||
(enable-rotate 3)
|
||||
(enable-travel 4)
|
||||
(navenmf5 5)
|
||||
(navenmf6 6)
|
||||
(navenmf7 7)
|
||||
(navenmf8 8)
|
||||
(standing-jump 9)
|
||||
(drop-jump 10)
|
||||
(navenmf11 11)
|
||||
(navenmf12 12)
|
||||
(navenmf13 13)
|
||||
(navenmf14 14)
|
||||
(navenmf15 15)
|
||||
(navenmf16 16)
|
||||
(navenmf17 17)
|
||||
(navenmf18 18)
|
||||
(navenmf19 19)
|
||||
(navenmf20 20)
|
||||
(navenmf21 21)
|
||||
(navenmf22 22)
|
||||
(navenmf23 23)
|
||||
(navenmf24 24)
|
||||
(navenmf25 25)
|
||||
(navenmf26 26)
|
||||
(navenmf27 27)
|
||||
(navenmf28 28)
|
||||
(navenmf29 29)
|
||||
(navenmf30 30)
|
||||
(navenmf31 31)
|
||||
)
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(deftype nav-enemy-info (basic)
|
||||
((idle-anim int32 :offset-assert 4)
|
||||
(walk-anim int32 :offset-assert 8)
|
||||
(turn-anim int32 :offset-assert 12)
|
||||
(notice-anim int32 :offset-assert 16)
|
||||
(run-anim int32 :offset-assert 20)
|
||||
(jump-anim int32 :offset-assert 24)
|
||||
(jump-land-anim int32 :offset-assert 28)
|
||||
(victory-anim int32 :offset-assert 32)
|
||||
(taunt-anim int32 :offset-assert 36)
|
||||
(die-anim int32 :offset-assert 40)
|
||||
(neck-joint int32 :offset-assert 44)
|
||||
(player-look-at-joint int32 :offset-assert 48)
|
||||
(run-travel-speed meters :offset-assert 52)
|
||||
(run-rotate-speed degrees :offset-assert 56)
|
||||
(run-acceleration meters :offset-assert 60)
|
||||
(run-turn-time seconds :offset-assert 64)
|
||||
(walk-travel-speed meters :offset-assert 72)
|
||||
(walk-rotate-speed degrees :offset-assert 76)
|
||||
(walk-acceleration meters :offset-assert 80)
|
||||
(walk-turn-time seconds :offset-assert 88)
|
||||
(attack-shove-back meters :offset-assert 96)
|
||||
(attack-shove-up meters :offset-assert 100)
|
||||
(shadow-size meters :offset-assert 104)
|
||||
(notice-nav-radius meters :offset-assert 108)
|
||||
(nav-nearest-y-threshold meters :offset-assert 112)
|
||||
(notice-distance meters :offset-assert 116)
|
||||
(proximity-notice-distance meters :offset-assert 120)
|
||||
(stop-chase-distance meters :offset-assert 124)
|
||||
(frustration-distance meters :offset-assert 128)
|
||||
(frustration-time time-frame :offset-assert 136)
|
||||
(die-anim-hold-frame float :offset-assert 144)
|
||||
(jump-anim-start-frame float :offset-assert 148)
|
||||
(jump-land-anim-end-frame float :offset-assert 152)
|
||||
(jump-height-min meters :offset-assert 156)
|
||||
(jump-height-factor float :offset-assert 160)
|
||||
(jump-start-anim-speed float :offset-assert 164)
|
||||
(shadow-max-y meters :offset-assert 168)
|
||||
(shadow-min-y meters :offset-assert 172)
|
||||
(shadow-locus-dist meters :offset-assert 176)
|
||||
(use-align symbol :offset-assert 180)
|
||||
(draw-shadow symbol :offset-assert 184)
|
||||
(move-to-ground symbol :offset-assert 188)
|
||||
(hover-if-no-ground symbol :offset-assert 192)
|
||||
(use-momentum symbol :offset-assert 196)
|
||||
(use-flee symbol :offset-assert 200)
|
||||
(use-proximity-notice symbol :offset-assert 204)
|
||||
(use-jump-blocked symbol :offset-assert 208)
|
||||
(use-jump-patrol symbol :offset-assert 212)
|
||||
(gnd-collide-with uint64 :offset-assert 216)
|
||||
(debug-draw-neck symbol :offset-assert 224)
|
||||
(debug-draw-jump symbol :offset-assert 228)
|
||||
((idle-anim int32 :offset-assert 4)
|
||||
(walk-anim int32 :offset-assert 8)
|
||||
(turn-anim int32 :offset-assert 12)
|
||||
(notice-anim int32 :offset-assert 16)
|
||||
(run-anim int32 :offset-assert 20)
|
||||
(jump-anim int32 :offset-assert 24)
|
||||
(jump-land-anim int32 :offset-assert 28)
|
||||
(victory-anim int32 :offset-assert 32)
|
||||
(taunt-anim int32 :offset-assert 36)
|
||||
(die-anim int32 :offset-assert 40)
|
||||
(neck-joint int32 :offset-assert 44)
|
||||
(player-look-at-joint int32 :offset-assert 48)
|
||||
(run-travel-speed meters :offset-assert 52)
|
||||
(run-rotate-speed degrees :offset-assert 56)
|
||||
(run-acceleration meters :offset-assert 60)
|
||||
(run-turn-time seconds :offset-assert 64)
|
||||
(walk-travel-speed meters :offset-assert 72)
|
||||
(walk-rotate-speed degrees :offset-assert 76)
|
||||
(walk-acceleration meters :offset-assert 80)
|
||||
(walk-turn-time seconds :offset-assert 88)
|
||||
(attack-shove-back meters :offset-assert 96)
|
||||
(attack-shove-up meters :offset-assert 100)
|
||||
(shadow-size meters :offset-assert 104)
|
||||
(notice-nav-radius meters :offset-assert 108)
|
||||
(nav-nearest-y-threshold meters :offset-assert 112)
|
||||
(notice-distance meters :offset-assert 116)
|
||||
(proximity-notice-distance meters :offset-assert 120)
|
||||
(stop-chase-distance meters :offset-assert 124)
|
||||
(frustration-distance meters :offset-assert 128)
|
||||
(frustration-time time-frame :offset-assert 136)
|
||||
(die-anim-hold-frame float :offset-assert 144)
|
||||
(jump-anim-start-frame float :offset-assert 148)
|
||||
(jump-land-anim-end-frame float :offset-assert 152)
|
||||
(jump-height-min meters :offset-assert 156)
|
||||
(jump-height-factor float :offset-assert 160)
|
||||
(jump-start-anim-speed float :offset-assert 164)
|
||||
(shadow-max-y meters :offset-assert 168)
|
||||
(shadow-min-y meters :offset-assert 172)
|
||||
(shadow-locus-dist meters :offset-assert 176)
|
||||
(use-align symbol :offset-assert 180)
|
||||
(draw-shadow symbol :offset-assert 184)
|
||||
(move-to-ground symbol :offset-assert 188)
|
||||
(hover-if-no-ground symbol :offset-assert 192)
|
||||
(use-momentum symbol :offset-assert 196)
|
||||
(use-flee symbol :offset-assert 200)
|
||||
(use-proximity-notice symbol :offset-assert 204)
|
||||
(use-jump-blocked symbol :offset-assert 208)
|
||||
(use-jump-patrol symbol :offset-assert 212)
|
||||
(gnd-collide-with collide-kind :offset-assert 216)
|
||||
(debug-draw-neck symbol :offset-assert 224)
|
||||
(debug-draw-jump symbol :offset-assert 228)
|
||||
)
|
||||
:method-count-assert 9
|
||||
:size-assert #xe8
|
||||
@ -95,7 +132,7 @@
|
||||
(state-timeout time-frame :offset-assert 352)
|
||||
(free-time time-frame :offset-assert 360)
|
||||
(touch-time time-frame :offset-assert 368)
|
||||
(nav-enemy-flags uint32 :offset-assert 376)
|
||||
(nav-enemy-flags nav-enemy-flags :offset-assert 376)
|
||||
(incomming-attack-id handle :offset-assert 384)
|
||||
(jump-return-state (state process) :offset-assert 392)
|
||||
(rand-gen random-generator :offset-assert 396)
|
||||
|
@ -74,14 +74,14 @@
|
||||
)
|
||||
|
||||
(defmethod common-post nav-enemy ((obj nav-enemy))
|
||||
(when (and (logtest? (-> obj nav-enemy-flags) 256)
|
||||
(when (and (logtest? (-> obj nav-enemy-flags) (nav-enemy-flags navenmf8))
|
||||
(or (not *target*) (and (zero? (logand (-> *target* state-flags) #x80f8))
|
||||
(>= (- (-> *display* base-frame-counter) (-> obj touch-time)) (seconds 0.05))
|
||||
)
|
||||
)
|
||||
)
|
||||
(set-collide-offense (-> obj collide-info) 2 (collide-offense touch))
|
||||
(set! (-> obj nav-enemy-flags) (logand -257 (-> obj nav-enemy-flags)))
|
||||
(logclear! (-> obj nav-enemy-flags) (nav-enemy-flags navenmf8))
|
||||
)
|
||||
(update-direction-from-time-of-day (-> obj draw shadow-ctrl))
|
||||
(when *target*
|
||||
@ -89,13 +89,13 @@
|
||||
(look-at-enemy!
|
||||
(-> *target* neck)
|
||||
(the-as vector (-> obj collide-info root-prim prim-core))
|
||||
(if (logtest? (-> obj nav-enemy-flags) 4)
|
||||
(if (logtest? (-> obj nav-enemy-flags) (nav-enemy-flags navenmf2))
|
||||
'attacking
|
||||
)
|
||||
obj
|
||||
)
|
||||
)
|
||||
(if (and (nonzero? (-> obj neck)) (logtest? (-> obj nav-enemy-flags) #x4000))
|
||||
(if (and (nonzero? (-> obj neck)) (logtest? (-> obj nav-enemy-flags) (nav-enemy-flags navenmf14)))
|
||||
(set-target! (-> obj neck) (target-pos (-> obj nav-info player-look-at-joint)))
|
||||
)
|
||||
)
|
||||
@ -110,22 +110,24 @@
|
||||
)
|
||||
|
||||
(defmethod dummy-44 nav-enemy ((obj nav-enemy) (arg0 process) (arg1 event-message-block))
|
||||
(if (and (logtest? (-> obj nav-enemy-flags) 64) ((method-of-type touching-shapes-entry prims-touching?)
|
||||
(the-as touching-shapes-entry (-> arg1 param 0))
|
||||
(-> obj collide-info)
|
||||
(the-as uint 1)
|
||||
)
|
||||
(if (and (logtest? (-> obj nav-enemy-flags) (nav-enemy-flags navenmf6))
|
||||
((method-of-type touching-shapes-entry prims-touching?)
|
||||
(the-as touching-shapes-entry (-> arg1 param 0))
|
||||
(-> obj collide-info)
|
||||
(the-as uint 1)
|
||||
)
|
||||
)
|
||||
(nav-enemy-send-attack arg0 (the-as touching-shapes-entry (-> arg1 param 0)) 'generic)
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod nav-enemy-touch-handler nav-enemy ((obj nav-enemy) (arg0 process) (arg1 event-message-block))
|
||||
(if (and (logtest? (-> obj nav-enemy-flags) 64) ((method-of-type touching-shapes-entry prims-touching?)
|
||||
(the-as touching-shapes-entry (-> arg1 param 0))
|
||||
(-> obj collide-info)
|
||||
(the-as uint 1)
|
||||
)
|
||||
(if (and (logtest? (-> obj nav-enemy-flags) (nav-enemy-flags navenmf6))
|
||||
((method-of-type touching-shapes-entry prims-touching?)
|
||||
(the-as touching-shapes-entry (-> arg1 param 0))
|
||||
(-> obj collide-info)
|
||||
(the-as uint 1)
|
||||
)
|
||||
)
|
||||
(nav-enemy-send-attack arg0 (the-as touching-shapes-entry (-> arg1 param 0)) 'generic)
|
||||
)
|
||||
@ -140,7 +142,7 @@
|
||||
|
||||
(defmethod dummy-43 nav-enemy ((obj nav-enemy) (arg0 process) (arg1 event-message-block))
|
||||
(cond
|
||||
((logtest? (-> obj nav-enemy-flags) 32)
|
||||
((logtest? (-> obj nav-enemy-flags) (nav-enemy-flags navenmf5))
|
||||
(send-event arg0 'get-attack-count 1)
|
||||
(logclear! (-> obj mask) (process-mask actor-pause attackable))
|
||||
(go (method-of-object obj nav-enemy-die))
|
||||
@ -165,7 +167,7 @@
|
||||
)
|
||||
(the-as object (when (send-event-function arg0 v1-0)
|
||||
(set-collide-offense (-> self collide-info) 2 (collide-offense no-offense))
|
||||
(logior! (-> self nav-enemy-flags) 256)
|
||||
(logior! (-> self nav-enemy-flags) (nav-enemy-flags navenmf8))
|
||||
#t
|
||||
)
|
||||
)
|
||||
@ -200,9 +202,9 @@
|
||||
)
|
||||
)
|
||||
(('cue-jump-to-point)
|
||||
(when (logtest? (-> self nav-enemy-flags) 2048)
|
||||
(when (logtest? (-> self nav-enemy-flags) (nav-enemy-flags navenmf11))
|
||||
(set! (-> self event-param-point quad) (-> (the-as vector (-> arg3 param 0)) quad))
|
||||
(set! (-> self nav-enemy-flags) (logand -2049 (-> self nav-enemy-flags)))
|
||||
(logclear! (-> self nav-enemy-flags) (nav-enemy-flags navenmf11))
|
||||
)
|
||||
)
|
||||
(('cue-chase)
|
||||
@ -315,8 +317,10 @@ nav-enemy-default-event-handler
|
||||
)
|
||||
|
||||
(defmethod TODO-RENAME-37 nav-enemy ((obj nav-enemy))
|
||||
(when (logtest? (-> obj nav-enemy-flags) 16)
|
||||
(if (or (logtest? (-> obj nav-enemy-flags) 128) (logtest? (nav-control-flags bit19) (-> obj nav flags)))
|
||||
(when (logtest? (-> obj nav-enemy-flags) (nav-enemy-flags enable-travel))
|
||||
(if (or (logtest? (-> obj nav-enemy-flags) (nav-enemy-flags navenmf7))
|
||||
(logtest? (nav-control-flags navcf19) (-> obj nav flags))
|
||||
)
|
||||
(seek-to-point-toward-point!
|
||||
(-> obj collide-info)
|
||||
(-> obj nav target-pos)
|
||||
@ -335,11 +339,11 @@ nav-enemy-default-event-handler
|
||||
(integrate-for-enemy-with-move-to-ground!
|
||||
(-> obj collide-info)
|
||||
(-> obj collide-info transv)
|
||||
(the-as collide-kind (-> obj nav-info gnd-collide-with))
|
||||
(-> obj nav-info gnd-collide-with)
|
||||
8192.0
|
||||
#f
|
||||
(-> obj nav-info hover-if-no-ground)
|
||||
(logtest? (-> obj nav-enemy-flags) #x8000)
|
||||
(logtest? (-> obj nav-enemy-flags) (nav-enemy-flags navenmf15))
|
||||
)
|
||||
(dummy-58 (-> obj collide-info) (-> obj collide-info transv))
|
||||
)
|
||||
@ -349,7 +353,7 @@ nav-enemy-default-event-handler
|
||||
|
||||
(defbehavior nav-enemy-travel-post nav-enemy ()
|
||||
(cond
|
||||
((logtest? (-> self nav-enemy-flags) 8)
|
||||
((logtest? (-> self nav-enemy-flags) (nav-enemy-flags enable-rotate))
|
||||
(TODO-RENAME-9 (-> self align))
|
||||
(dummy-40 self)
|
||||
(dummy-41 self)
|
||||
@ -380,9 +384,9 @@ nav-enemy-default-event-handler
|
||||
)
|
||||
|
||||
(defbehavior nav-enemy-patrol-post nav-enemy ()
|
||||
(when (or (logtest? (nav-control-flags bit19) (-> self nav flags)) (< 2.0 (-> self nav block-count)))
|
||||
(when (or (logtest? (nav-control-flags navcf19) (-> self nav flags)) (< 2.0 (-> self nav block-count)))
|
||||
(set! (-> self nav block-count) 2.0)
|
||||
(logior! (-> self nav flags) (nav-control-flags bit10))
|
||||
(logior! (-> self nav flags) (nav-control-flags navcf10))
|
||||
(nav-enemy-get-new-patrol-point)
|
||||
)
|
||||
(dummy-19
|
||||
@ -392,8 +396,8 @@ nav-enemy-default-event-handler
|
||||
(-> self nav destination-pos)
|
||||
(-> self rotate-speed)
|
||||
)
|
||||
(if (logtest? (nav-control-flags bit21) (-> self nav flags))
|
||||
(logclear! (-> self nav flags) (nav-control-flags bit10))
|
||||
(if (logtest? (nav-control-flags navcf21) (-> self nav flags))
|
||||
(logclear! (-> self nav flags) (nav-control-flags navcf10))
|
||||
)
|
||||
(nav-enemy-travel-post)
|
||||
0
|
||||
@ -424,7 +428,7 @@ nav-enemy-default-event-handler
|
||||
)
|
||||
|
||||
(defbehavior nav-enemy-face-player-post nav-enemy ()
|
||||
(if (and *target* (logtest? (-> self nav-enemy-flags) 16))
|
||||
(if (and *target* (logtest? (-> self nav-enemy-flags) (nav-enemy-flags enable-travel)))
|
||||
(seek-to-point-toward-point! (-> self collide-info) (target-pos 0) (-> self rotate-speed) (-> self turn-time))
|
||||
)
|
||||
(nav-enemy-simple-post)
|
||||
@ -459,7 +463,7 @@ nav-enemy-default-event-handler
|
||||
)
|
||||
|
||||
(defbehavior nav-enemy-neck-control-look-at nav-enemy ()
|
||||
(logior! (-> self nav-enemy-flags) #x4000)
|
||||
(logior! (-> self nav-enemy-flags) (nav-enemy-flags navenmf14))
|
||||
(if (nonzero? (-> self neck))
|
||||
(set-mode! (-> self neck) (joint-mod-handler-mode look-at))
|
||||
)
|
||||
@ -468,8 +472,8 @@ nav-enemy-default-event-handler
|
||||
)
|
||||
|
||||
(defbehavior nav-enemy-neck-control-inactive nav-enemy ()
|
||||
(when (and (nonzero? (-> self neck)) (logtest? (-> self nav-enemy-flags) #x4000))
|
||||
(set! (-> self nav-enemy-flags) (logand -16385 (-> self nav-enemy-flags)))
|
||||
(when (and (nonzero? (-> self neck)) (logtest? (-> self nav-enemy-flags) (nav-enemy-flags navenmf14)))
|
||||
(logclear! (-> self nav-enemy-flags) (nav-enemy-flags navenmf14))
|
||||
(shut-down! (-> self neck))
|
||||
)
|
||||
0
|
||||
@ -483,7 +487,7 @@ nav-enemy-default-event-handler
|
||||
(defmethod TODO-RENAME-46 nav-enemy ((obj nav-enemy) (arg0 float))
|
||||
(and *target*
|
||||
(zero? (logand (-> *target* state-flags) #x80f8))
|
||||
(and (or (zero? (logand (-> obj nav-enemy-flags) 4096))
|
||||
(and (or (zero? (logand (-> obj nav-enemy-flags) (nav-enemy-flags navenmf12)))
|
||||
(< (vector-vector-distance (target-pos 0) (-> obj collide-info trans)) arg0)
|
||||
)
|
||||
(nav-enemy-test-point-near-nav-mesh? (-> *target* control shadow-pos))
|
||||
@ -494,10 +498,10 @@ nav-enemy-default-event-handler
|
||||
(defbehavior nav-enemy-notice-player? nav-enemy ()
|
||||
(let ((gp-0 #f))
|
||||
(cond
|
||||
((logtest? (-> self nav-enemy-flags) 1)
|
||||
((logtest? (-> self nav-enemy-flags) (nav-enemy-flags navenmf0))
|
||||
(when (>= (- (-> *display* base-frame-counter) (-> self notice-time)) (-> self reaction-time))
|
||||
(set! gp-0 #t)
|
||||
(set! (-> self nav-enemy-flags) (logand -2 (-> self nav-enemy-flags)))
|
||||
(logclear! (-> self nav-enemy-flags) (nav-enemy-flags navenmf0))
|
||||
)
|
||||
)
|
||||
(else
|
||||
@ -509,7 +513,7 @@ nav-enemy-default-event-handler
|
||||
)
|
||||
)
|
||||
)
|
||||
(logior! (-> self nav-enemy-flags) 1)
|
||||
(logior! (-> self nav-enemy-flags) (nav-enemy-flags navenmf0))
|
||||
(set! (-> self notice-time) (-> *display* base-frame-counter))
|
||||
)
|
||||
)
|
||||
@ -750,15 +754,9 @@ nav-enemy-default-event-handler
|
||||
(nav-enemy-neck-control-inactive)
|
||||
(set! (-> self state-time) (-> *display* base-frame-counter))
|
||||
(if (-> self nav-info move-to-ground)
|
||||
(move-to-ground
|
||||
(-> self collide-info)
|
||||
40960.0
|
||||
40960.0
|
||||
#t
|
||||
(the-as collide-kind (-> self nav-info gnd-collide-with))
|
||||
)
|
||||
(move-to-ground (-> self collide-info) 40960.0 40960.0 #t (-> self nav-info gnd-collide-with))
|
||||
)
|
||||
(set! (-> self nav-enemy-flags) (logand -7 (-> self nav-enemy-flags)))
|
||||
(logclear! (-> self nav-enemy-flags) (nav-enemy-flags navenmf1 navenmf2))
|
||||
(set! (-> self state-timeout) (seconds 1))
|
||||
(none)
|
||||
)
|
||||
@ -814,10 +812,10 @@ nav-enemy-default-event-handler
|
||||
(behavior ()
|
||||
(set! (-> self state-time) (-> *display* base-frame-counter))
|
||||
(set! (-> self nav flags)
|
||||
(the-as nav-control-flags (the-as int (logior (nav-control-flags bit19) (-> self nav flags))))
|
||||
(the-as nav-control-flags (the-as int (logior (nav-control-flags navcf19) (-> self nav flags))))
|
||||
)
|
||||
(set! (-> self nav-enemy-flags) (logand -5 (-> self nav-enemy-flags)))
|
||||
(logior! (-> self nav-enemy-flags) 8)
|
||||
(logclear! (-> self nav-enemy-flags) (nav-enemy-flags navenmf2))
|
||||
(logior! (-> self nav-enemy-flags) (nav-enemy-flags enable-rotate))
|
||||
(set! (-> self state-timeout) (seconds 1))
|
||||
(set! (-> self target-speed) (-> self nav-info walk-travel-speed))
|
||||
(set! (-> self acceleration) (-> self nav-info walk-acceleration))
|
||||
@ -827,7 +825,7 @@ nav-enemy-default-event-handler
|
||||
)
|
||||
:exit
|
||||
(behavior ()
|
||||
(logior! (-> self nav-enemy-flags) 8)
|
||||
(logior! (-> self nav-enemy-flags) (nav-enemy-flags enable-rotate))
|
||||
(none)
|
||||
)
|
||||
:trans
|
||||
@ -905,7 +903,7 @@ nav-enemy-default-event-handler
|
||||
(joint-control-channel-group! a0-5 (the-as art-joint-anim #f) num-func-loop!)
|
||||
)
|
||||
(ja-channel-push! 1 180)
|
||||
(set! (-> self nav-enemy-flags) (logand -9 (-> self nav-enemy-flags)))
|
||||
(logclear! (-> self nav-enemy-flags) (nav-enemy-flags enable-rotate))
|
||||
(let ((a0-8 (-> self skel root-channel 0)))
|
||||
(set! (-> a0-8 frame-group)
|
||||
(the-as art-joint-anim (-> self draw art-group data (-> self nav-info idle-anim)))
|
||||
@ -959,7 +957,7 @@ nav-enemy-default-event-handler
|
||||
)
|
||||
)
|
||||
)
|
||||
(logior! (-> self nav-enemy-flags) 8)
|
||||
(logior! (-> self nav-enemy-flags) (nav-enemy-flags enable-rotate))
|
||||
(let ((a0-15 (-> self skel root-channel 0)))
|
||||
(set! (-> a0-15 param 0) 1.0)
|
||||
(joint-control-channel-group! a0-15 (the-as art-joint-anim #f) num-func-loop!)
|
||||
@ -1009,12 +1007,12 @@ nav-enemy-default-event-handler
|
||||
)
|
||||
:enter
|
||||
(behavior ()
|
||||
(logior! (-> self nav-enemy-flags) 4)
|
||||
(logior! (-> self nav-enemy-flags) (nav-enemy-flags navenmf2))
|
||||
(nav-enemy-neck-control-look-at)
|
||||
(if (logtest? (-> self nav-enemy-flags) 2)
|
||||
(if (logtest? (-> self nav-enemy-flags) (nav-enemy-flags navenmf1))
|
||||
(go-virtual nav-enemy-chase)
|
||||
)
|
||||
(logior! (-> self nav-enemy-flags) 2)
|
||||
(logior! (-> self nav-enemy-flags) (nav-enemy-flags navenmf1))
|
||||
(let ((gp-0 (-> self nav))
|
||||
(v1-10 (target-pos 0))
|
||||
)
|
||||
@ -1175,7 +1173,7 @@ nav-enemy-default-event-handler
|
||||
)
|
||||
|
||||
(defbehavior nav-enemy-reset-frustration nav-enemy ()
|
||||
(set! (-> self nav-enemy-flags) (logand -8193 (-> self nav-enemy-flags)))
|
||||
(logclear! (-> self nav-enemy-flags) (nav-enemy-flags navenmf13))
|
||||
(if *target*
|
||||
(set! (-> self frustration-point quad) (-> *target* control shadow-pos quad))
|
||||
)
|
||||
@ -1191,7 +1189,9 @@ nav-enemy-default-event-handler
|
||||
)
|
||||
|
||||
(defbehavior nav-enemy-frustrated? nav-enemy ()
|
||||
(and (logtest? (-> self nav-enemy-flags) 8192) (nav-enemy-player-at-frustration-point?))
|
||||
(and (logtest? (-> self nav-enemy-flags) (nav-enemy-flags navenmf13))
|
||||
(nav-enemy-player-at-frustration-point?)
|
||||
)
|
||||
)
|
||||
|
||||
(defstate nav-enemy-chase (nav-enemy)
|
||||
@ -1206,7 +1206,7 @@ nav-enemy-default-event-handler
|
||||
(nav-enemy-neck-control-look-at)
|
||||
(set! (-> self state-time) (-> *display* base-frame-counter))
|
||||
(set! (-> self free-time) (-> *display* base-frame-counter))
|
||||
(logior! (-> self nav-enemy-flags) 4)
|
||||
(logior! (-> self nav-enemy-flags) (nav-enemy-flags navenmf2))
|
||||
(set! (-> self target-speed) (-> self nav-info run-travel-speed))
|
||||
(set! (-> self acceleration) (-> self nav-info run-acceleration))
|
||||
(set! (-> self rotate-speed) (-> self nav-info run-rotate-speed))
|
||||
@ -1219,7 +1219,7 @@ nav-enemy-default-event-handler
|
||||
(if (logtest? (-> *target* state-flags) 128)
|
||||
(go-virtual nav-enemy-patrol)
|
||||
)
|
||||
(if (logtest? (-> self nav-enemy-flags) 256)
|
||||
(if (logtest? (-> self nav-enemy-flags) (nav-enemy-flags navenmf8))
|
||||
(go-virtual nav-enemy-victory)
|
||||
)
|
||||
(if (or (not (nav-enemy-player-at-frustration-point?))
|
||||
@ -1233,15 +1233,15 @@ nav-enemy-default-event-handler
|
||||
(if (>= (- (-> *display* base-frame-counter) (-> self frustration-time))
|
||||
(+ (-> self reaction-time) (-> self nav-info frustration-time))
|
||||
)
|
||||
(logior! (-> self nav-enemy-flags) 8192)
|
||||
(logior! (-> self nav-enemy-flags) (nav-enemy-flags navenmf13))
|
||||
)
|
||||
(if (or (not (TODO-RENAME-46 self (-> self nav-info stop-chase-distance)))
|
||||
(logtest? (-> self nav-enemy-flags) 8192)
|
||||
(logtest? (-> self nav-enemy-flags) (nav-enemy-flags navenmf13))
|
||||
)
|
||||
(go-virtual nav-enemy-stop-chase)
|
||||
)
|
||||
(cond
|
||||
((logtest? (nav-control-flags bit17) (-> self nav flags))
|
||||
((logtest? (nav-control-flags navcf17) (-> self nav flags))
|
||||
(if (>= (- (-> *display* base-frame-counter) (-> self free-time)) (seconds 1))
|
||||
(go-virtual nav-enemy-patrol)
|
||||
)
|
||||
@ -1315,7 +1315,7 @@ nav-enemy-default-event-handler
|
||||
(vector-vector-distance (-> self collide-info trans) (-> *target* control trans))
|
||||
)
|
||||
)
|
||||
(logtest? (nav-control-flags bit17) (-> self nav flags))
|
||||
(logtest? (nav-control-flags navcf17) (-> self nav flags))
|
||||
(>= (- (-> *display* base-frame-counter) (-> self state-time)) (-> self state-timeout))
|
||||
)
|
||||
(go-virtual nav-enemy-stare)
|
||||
@ -1360,7 +1360,7 @@ nav-enemy-default-event-handler
|
||||
:enter
|
||||
(behavior ()
|
||||
(set! (-> self state-time) (-> *display* base-frame-counter))
|
||||
(set! (-> self nav-enemy-flags) (logand -17 (-> self nav-enemy-flags)))
|
||||
(logclear! (-> self nav-enemy-flags) (nav-enemy-flags enable-travel))
|
||||
(let ((f0-0 (vector-vector-distance (-> self collide-info trans) (target-pos 0))))
|
||||
(set! (-> self state-timeout)
|
||||
(the-as
|
||||
@ -1376,7 +1376,7 @@ nav-enemy-default-event-handler
|
||||
)
|
||||
:exit
|
||||
(behavior ()
|
||||
(logior! (-> self nav-enemy-flags) 16)
|
||||
(logior! (-> self nav-enemy-flags) (nav-enemy-flags enable-travel))
|
||||
(none)
|
||||
)
|
||||
:trans
|
||||
@ -1407,7 +1407,7 @@ nav-enemy-default-event-handler
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> self nav-enemy-flags) (logand -5 (-> self nav-enemy-flags)))
|
||||
(logclear! (-> self nav-enemy-flags) (nav-enemy-flags navenmf2))
|
||||
(if (>= (- (-> *display* base-frame-counter) (-> self state-time)) (-> self state-timeout))
|
||||
(go-virtual nav-enemy-give-up)
|
||||
)
|
||||
@ -1416,7 +1416,7 @@ nav-enemy-default-event-handler
|
||||
(vector-vector-distance (-> self collide-info trans) (-> *target* control trans))
|
||||
)
|
||||
)
|
||||
(logtest? (nav-control-flags bit17) (-> self nav flags))
|
||||
(logtest? (nav-control-flags navcf17) (-> self nav flags))
|
||||
)
|
||||
(go-virtual nav-enemy-give-up)
|
||||
)
|
||||
@ -1443,7 +1443,7 @@ nav-enemy-default-event-handler
|
||||
(behavior ()
|
||||
(set! (-> self state-time) (-> *display* base-frame-counter))
|
||||
(nav-enemy-neck-control-inactive)
|
||||
(set! (-> self nav-enemy-flags) (logand -5 (-> self nav-enemy-flags)))
|
||||
(logclear! (-> self nav-enemy-flags) (nav-enemy-flags navenmf2))
|
||||
(none)
|
||||
)
|
||||
:trans
|
||||
@ -1605,7 +1605,7 @@ nav-enemy-default-event-handler
|
||||
)
|
||||
|
||||
(defbehavior nav-enemy-jump-post nav-enemy ()
|
||||
(if (logtest? (-> self nav-enemy-flags) 16)
|
||||
(if (logtest? (-> self nav-enemy-flags) (nav-enemy-flags enable-travel))
|
||||
(seek-to-point-toward-point!
|
||||
(-> self collide-info)
|
||||
(-> self jump-dest)
|
||||
@ -1613,7 +1613,7 @@ nav-enemy-default-event-handler
|
||||
(-> self turn-time)
|
||||
)
|
||||
)
|
||||
(when (logtest? (-> self nav-enemy-flags) 8)
|
||||
(when (logtest? (-> self nav-enemy-flags) (nav-enemy-flags enable-rotate))
|
||||
(let ((f30-0 (the float (- (-> *display* base-frame-counter) (-> self jump-time)))))
|
||||
(let ((v1-12 (eval-position! (-> self jump-trajectory) f30-0 (new 'stack-no-clear 'vector))))
|
||||
(set! (-> self collide-info trans quad) (-> v1-12 quad))
|
||||
@ -1641,24 +1641,24 @@ nav-enemy-default-event-handler
|
||||
(set! (-> s2-2 y) 0.0)
|
||||
(vector-xz-normalize! s1-1 1.0)
|
||||
(vector-xz-normalize! s2-2 1.0)
|
||||
(set! (-> self nav-enemy-flags) (logand -1537 (-> self nav-enemy-flags)))
|
||||
(logclear! (-> self nav-enemy-flags) (nav-enemy-flags standing-jump drop-jump))
|
||||
(if (or (>= (* 0.5 (-> self nav-info run-travel-speed)) f24-0) (>= (cos 3640.889) (vector-dot s1-1 s2-2)))
|
||||
(logior! (-> self nav-enemy-flags) 512)
|
||||
(logior! (-> self nav-enemy-flags) (nav-enemy-flags standing-jump))
|
||||
)
|
||||
)
|
||||
(if (or (and (< f26-0 0.0) (< f28-0 (fabs f26-0))) (and (< (fabs f26-0) 12288.0) (< f28-0 20480.0)))
|
||||
(logior! (-> self nav-enemy-flags) 1024)
|
||||
(logior! (-> self nav-enemy-flags) (nav-enemy-flags drop-jump))
|
||||
)
|
||||
)
|
||||
(when (and arg1 (logtest? (-> self nav-enemy-flags) 1024))
|
||||
(set! (-> self nav-enemy-flags) (logand -513 (-> self nav-enemy-flags)))
|
||||
(when (and arg1 (logtest? (-> self nav-enemy-flags) (nav-enemy-flags drop-jump)))
|
||||
(logclear! (-> self nav-enemy-flags) (nav-enemy-flags standing-jump))
|
||||
(set! f30-0 2048.0)
|
||||
)
|
||||
(setup-from-to-height! (-> self jump-trajectory) s4-0 arg0 f30-0 (* 0.000011111111 arg4))
|
||||
)
|
||||
(set! (-> self nav extra-nav-sphere quad) (-> arg0 quad))
|
||||
(set! (-> self nav extra-nav-sphere w) (-> self collide-info nav-radius))
|
||||
(logior! (-> self collide-info nav-flags) 2)
|
||||
(logior! (-> self collide-info nav-flags) (nav-flags navf1))
|
||||
0
|
||||
(none)
|
||||
)
|
||||
@ -1676,13 +1676,13 @@ nav-enemy-default-event-handler
|
||||
)
|
||||
|
||||
(defbehavior nav-enemy-execute-custom-jump nav-enemy ((arg0 int) (arg1 float) (arg2 float))
|
||||
(when (logtest? (-> self nav-enemy-flags) 512)
|
||||
(when (logtest? (-> self nav-enemy-flags) (nav-enemy-flags standing-jump))
|
||||
(let ((a0-1 (-> self skel root-channel 0)))
|
||||
(set! (-> a0-1 param 0) 1.0)
|
||||
(joint-control-channel-group! a0-1 (the-as art-joint-anim #f) num-func-loop!)
|
||||
)
|
||||
(ja-channel-push! 1 30)
|
||||
(set! (-> self nav-enemy-flags) (logand -9 (-> self nav-enemy-flags)))
|
||||
(logclear! (-> self nav-enemy-flags) (nav-enemy-flags enable-rotate))
|
||||
(let ((s3-0 (-> self skel root-channel 0)))
|
||||
(set! (-> s3-0 frame-group) (the-as art-joint-anim (-> self draw art-group data arg0)))
|
||||
(set! (-> s3-0 param 0) (ja-aframe arg1 0))
|
||||
@ -1702,9 +1702,9 @@ nav-enemy-default-event-handler
|
||||
)
|
||||
(set! (-> self collide-info status) (logand -8 (-> self collide-info status)))
|
||||
(set! (-> self jump-time) (-> *display* base-frame-counter))
|
||||
(logior! (-> self nav-enemy-flags) 8)
|
||||
(logior! (-> self nav-enemy-flags) (nav-enemy-flags enable-rotate))
|
||||
(cond
|
||||
((logtest? (-> self nav-enemy-flags) 1024)
|
||||
((logtest? (-> self nav-enemy-flags) (nav-enemy-flags drop-jump))
|
||||
(cond
|
||||
((= (if (> (-> self skel active-channels) 0)
|
||||
(-> self skel root-channel 0 frame-group)
|
||||
@ -1756,7 +1756,7 @@ nav-enemy-default-event-handler
|
||||
)
|
||||
(set! (-> self collide-info trans quad) (-> self jump-dest quad))
|
||||
(set! (-> self collide-info transv y) 0.0)
|
||||
(set! (-> self collide-info nav-flags) (logand -3 (-> self collide-info nav-flags)))
|
||||
(logclear! (-> self collide-info nav-flags) (nav-flags navf1))
|
||||
0
|
||||
(none)
|
||||
)
|
||||
@ -1825,7 +1825,7 @@ nav-enemy-default-event-handler
|
||||
)
|
||||
:exit
|
||||
(behavior ()
|
||||
(logior! (-> self nav-enemy-flags) 24)
|
||||
(logior! (-> self nav-enemy-flags) (nav-enemy-flags enable-rotate enable-travel))
|
||||
(none)
|
||||
)
|
||||
:code
|
||||
@ -1862,7 +1862,9 @@ nav-enemy-default-event-handler
|
||||
(set! (-> self collide-info transv x) (-> v1-9 x))
|
||||
(set! (-> self collide-info transv z) (-> v1-9 z))
|
||||
)
|
||||
(if (or (logtest? (-> self nav-enemy-flags) 128) (logtest? (nav-control-flags bit19) (-> self nav flags)))
|
||||
(if (or (logtest? (-> self nav-enemy-flags) (nav-enemy-flags navenmf7))
|
||||
(logtest? (nav-control-flags navcf19) (-> self nav flags))
|
||||
)
|
||||
(seek-to-point-toward-point!
|
||||
(-> self collide-info)
|
||||
(-> self nav target-pos)
|
||||
@ -1883,7 +1885,7 @@ nav-enemy-default-event-handler
|
||||
(integrate-for-enemy-with-move-to-ground!
|
||||
(-> self collide-info)
|
||||
(-> self collide-info transv)
|
||||
(the-as collide-kind (-> self nav-info gnd-collide-with))
|
||||
(-> self nav-info gnd-collide-with)
|
||||
8192.0
|
||||
#f
|
||||
(-> self nav-info hover-if-no-ground)
|
||||
@ -1903,7 +1905,7 @@ nav-enemy-default-event-handler
|
||||
:enter
|
||||
(behavior ()
|
||||
(set! (-> self state-time) (-> *display* base-frame-counter))
|
||||
(logclear! (-> self nav flags) (nav-control-flags bit19))
|
||||
(logclear! (-> self nav flags) (nav-control-flags navcf19))
|
||||
(let ((gp-0 (new 'stack-no-clear 'vector)))
|
||||
(set! (-> gp-0 quad) (-> self collide-info transv quad))
|
||||
(set! (-> gp-0 y) 0.0)
|
||||
@ -1917,7 +1919,7 @@ nav-enemy-default-event-handler
|
||||
:trans
|
||||
(behavior ()
|
||||
(if (or (>= (- (-> *display* base-frame-counter) (-> self state-time)) (seconds 0.5))
|
||||
(logtest? (nav-control-flags bit19) (-> self nav flags))
|
||||
(logtest? (nav-control-flags navcf19) (-> self nav flags))
|
||||
)
|
||||
(go-virtual nav-enemy-chase)
|
||||
)
|
||||
@ -2007,7 +2009,7 @@ nav-enemy-default-event-handler
|
||||
:code
|
||||
(behavior ()
|
||||
(set! (-> self state-time) (-> *display* base-frame-counter))
|
||||
(logior! (-> self nav-enemy-flags) 2048)
|
||||
(logior! (-> self nav-enemy-flags) (nav-enemy-flags navenmf11))
|
||||
(ja-channel-push! 1 30)
|
||||
(let ((f30-0 (nav-enemy-rnd-float-range 0.8 1.2)))
|
||||
(let ((v1-6 (-> self skel root-channel 0)))
|
||||
@ -2019,7 +2021,7 @@ nav-enemy-default-event-handler
|
||||
(set! (-> v1-9 num-func) num-func-identity)
|
||||
(set! (-> v1-9 frame-num) 0.0)
|
||||
)
|
||||
(while (logtest? (-> self nav-enemy-flags) 2048)
|
||||
(while (logtest? (-> self nav-enemy-flags) (nav-enemy-flags navenmf11))
|
||||
(suspend)
|
||||
(let ((a0-8 (-> self skel root-channel 0)))
|
||||
(set! (-> a0-8 param 0) f30-0)
|
||||
@ -2053,7 +2055,7 @@ nav-enemy-default-event-handler
|
||||
nav-enemy-jump-event-handler
|
||||
:exit
|
||||
(behavior ()
|
||||
(logior! (-> self nav-enemy-flags) 24)
|
||||
(logior! (-> self nav-enemy-flags) (nav-enemy-flags enable-rotate enable-travel))
|
||||
(none)
|
||||
)
|
||||
:trans
|
||||
@ -2066,15 +2068,15 @@ nav-enemy-default-event-handler
|
||||
(set! (-> self state-time) (-> *display* base-frame-counter))
|
||||
(nav-enemy-initialize-jump (-> self event-param-point))
|
||||
(nav-enemy-neck-control-look-at)
|
||||
(logior! (-> self nav-enemy-flags) 16)
|
||||
(set! (-> self nav-enemy-flags) (logand -9 (-> self nav-enemy-flags)))
|
||||
(logior! (-> self nav-enemy-flags) (nav-enemy-flags enable-travel))
|
||||
(logclear! (-> self nav-enemy-flags) (nav-enemy-flags enable-rotate))
|
||||
(when (not (nav-enemy-facing-point? (-> self jump-dest) 5461.3335))
|
||||
(ja-channel-push! 1 60)
|
||||
(nav-enemy-turn-to-face-point (-> self jump-dest) 1820.4445)
|
||||
)
|
||||
(set! (-> self nav-enemy-flags) (logand -17 (-> self nav-enemy-flags)))
|
||||
(logclear! (-> self nav-enemy-flags) (nav-enemy-flags enable-travel))
|
||||
(nav-enemy-execute-jump)
|
||||
(set! (-> self nav-enemy-flags) (logand -9 (-> self nav-enemy-flags)))
|
||||
(logclear! (-> self nav-enemy-flags) (nav-enemy-flags enable-rotate))
|
||||
(nav-enemy-jump-land-anim)
|
||||
(go-virtual nav-enemy-wait-for-cue)
|
||||
(none)
|
||||
@ -2117,7 +2119,7 @@ nav-enemy-default-event-handler
|
||||
)
|
||||
(set! (-> obj align) (new 'process 'align-control obj))
|
||||
(set! (-> obj nav) (new 'process 'nav-control (-> obj collide-info) 16 (-> arg0 nav-nearest-y-threshold)))
|
||||
(logior! (-> obj nav flags) (nav-control-flags display-marks bit3 bit5 bit6 bit7))
|
||||
(logior! (-> obj nav flags) (nav-control-flags display-marks navcf3 navcf5 navcf6 navcf7))
|
||||
(set! (-> obj nav gap-event) 'jump)
|
||||
(TODO-RENAME-26 (-> obj nav))
|
||||
(set! (-> obj path) (new 'process 'path-control obj 'path 0.0))
|
||||
@ -2127,7 +2129,7 @@ nav-enemy-default-event-handler
|
||||
)
|
||||
(set! (-> obj reaction-time) (nav-enemy-rnd-int-range (seconds 0.1) (seconds 0.8)))
|
||||
(set! (-> obj speed-scale) 1.0)
|
||||
(logior! (-> obj nav-enemy-flags) 4216)
|
||||
(logior! (-> obj nav-enemy-flags) (nav-enemy-flags enable-rotate enable-travel navenmf5 navenmf6 navenmf12))
|
||||
0
|
||||
(none)
|
||||
)
|
||||
@ -2165,8 +2167,8 @@ nav-enemy-default-event-handler
|
||||
(vector-identity! (-> self collide-info scale))
|
||||
(set! (-> self entity) (-> arg0 entity))
|
||||
(TODO-RENAME-48 self)
|
||||
(set! (-> self nav-enemy-flags) (logand -4097 (-> self nav-enemy-flags)))
|
||||
(logior! (-> self nav-enemy-flags) 2)
|
||||
(logclear! (-> self nav-enemy-flags) (nav-enemy-flags navenmf12))
|
||||
(logior! (-> self nav-enemy-flags) (nav-enemy-flags navenmf1))
|
||||
(go-virtual nav-enemy-wait-for-cue)
|
||||
(none)
|
||||
)
|
||||
|
@ -229,7 +229,7 @@ nav-enemy-default-event-handler
|
||||
:enter
|
||||
(behavior ()
|
||||
(set! (-> self state-time) (-> *display* base-frame-counter))
|
||||
(set! (-> self nav-enemy-flags) (logand -2 (-> self nav-enemy-flags)))
|
||||
(logclear! (-> self nav-enemy-flags) (nav-enemy-flags navenmf0))
|
||||
(none)
|
||||
)
|
||||
:exit
|
||||
@ -251,8 +251,8 @@ nav-enemy-default-event-handler
|
||||
)
|
||||
)
|
||||
((sharkey-notice-player?)
|
||||
(when (zero? (logand (-> self nav-enemy-flags) 1))
|
||||
(logior! (-> self nav-enemy-flags) 1)
|
||||
(when (zero? (logand (-> self nav-enemy-flags) (nav-enemy-flags navenmf0)))
|
||||
(logior! (-> self nav-enemy-flags) (nav-enemy-flags navenmf0))
|
||||
(set! (-> self notice-time) (-> *display* base-frame-counter))
|
||||
)
|
||||
(let ((a0-4 (dummy-16 (-> self nav) (-> *target* control trans))))
|
||||
@ -269,7 +269,7 @@ nav-enemy-default-event-handler
|
||||
)
|
||||
(else
|
||||
(if (>= (- (-> *display* base-frame-counter) (-> self notice-time)) (seconds 10))
|
||||
(set! (-> self nav-enemy-flags) (logand -2 (-> self nav-enemy-flags)))
|
||||
(logclear! (-> self nav-enemy-flags) (nav-enemy-flags navenmf0))
|
||||
)
|
||||
)
|
||||
)
|
||||
@ -810,7 +810,7 @@ nav-enemy-default-event-handler
|
||||
:use-proximity-notice #f
|
||||
:use-jump-blocked #f
|
||||
:use-jump-patrol #f
|
||||
:gnd-collide-with #x1
|
||||
:gnd-collide-with (collide-kind background)
|
||||
:debug-draw-neck #f
|
||||
:debug-draw-jump #f
|
||||
)
|
||||
|
@ -101,7 +101,8 @@
|
||||
:use-proximity-notice #f
|
||||
:use-jump-blocked #t
|
||||
:use-jump-patrol #f
|
||||
:gnd-collide-with #x805
|
||||
:gnd-collide-with
|
||||
(collide-kind background cak-2 ground-object)
|
||||
:debug-draw-neck #f
|
||||
:debug-draw-jump #f
|
||||
)
|
||||
@ -336,11 +337,12 @@
|
||||
)
|
||||
|
||||
(defmethod dummy-44 green-eco-lurker ((obj green-eco-lurker) (arg0 process) (arg1 event-message-block))
|
||||
(when (and (logtest? (-> obj nav-enemy-flags) 64) ((method-of-type touching-shapes-entry prims-touching?)
|
||||
(the-as touching-shapes-entry (-> arg1 param 0))
|
||||
(-> obj collide-info)
|
||||
(the-as uint 1)
|
||||
)
|
||||
(when (and (logtest? (-> obj nav-enemy-flags) (nav-enemy-flags navenmf6))
|
||||
((method-of-type touching-shapes-entry prims-touching?)
|
||||
(the-as touching-shapes-entry (-> arg1 param 0))
|
||||
(-> obj collide-info)
|
||||
(the-as uint 1)
|
||||
)
|
||||
)
|
||||
(if (nav-enemy-send-attack arg0 (the-as touching-shapes-entry (-> arg1 param 0)) 'generic)
|
||||
(send-event (ppointer->process (-> obj parent)) 'blob-hit-jak)
|
||||
@ -349,11 +351,12 @@
|
||||
)
|
||||
|
||||
(defmethod nav-enemy-touch-handler green-eco-lurker ((obj green-eco-lurker) (arg0 process) (arg1 event-message-block))
|
||||
(when (and (logtest? (-> obj nav-enemy-flags) 64) ((method-of-type touching-shapes-entry prims-touching?)
|
||||
(the-as touching-shapes-entry (-> arg1 param 0))
|
||||
(-> obj collide-info)
|
||||
(the-as uint 1)
|
||||
)
|
||||
(when (and (logtest? (-> obj nav-enemy-flags) (nav-enemy-flags navenmf6))
|
||||
((method-of-type touching-shapes-entry prims-touching?)
|
||||
(the-as touching-shapes-entry (-> arg1 param 0))
|
||||
(-> obj collide-info)
|
||||
(the-as uint 1)
|
||||
)
|
||||
)
|
||||
(if (nav-enemy-send-attack arg0 (the-as touching-shapes-entry (-> arg1 param 0)) 'generic)
|
||||
(send-event (ppointer->process (-> obj parent)) 'blob-hit-jak)
|
||||
@ -440,33 +443,34 @@
|
||||
)
|
||||
|
||||
(defmethod dummy-53 green-eco-lurker ((obj green-eco-lurker))
|
||||
(the-as
|
||||
symbol
|
||||
(cond
|
||||
((and (-> obj draw shadow) (zero? (-> obj draw cur-lod)) (logtest? (-> obj draw status) (draw-status was-drawn)))
|
||||
(let ((f0-0 (-> obj appear-dest y))
|
||||
(v1-7 (-> obj draw shadow-ctrl))
|
||||
)
|
||||
(let ((a0-1 v1-7))
|
||||
(set! (-> a0-1 settings flags) (logand -33 (-> a0-1 settings flags)))
|
||||
)
|
||||
0
|
||||
(let ((a0-3 v1-7))
|
||||
(set! (-> a0-3 settings bot-plane w) (- (+ -6144.0 f0-0)))
|
||||
)
|
||||
0
|
||||
(set! (-> v1-7 settings top-plane w) (- (+ 6144.0 f0-0)))
|
||||
)
|
||||
0
|
||||
)
|
||||
(else
|
||||
(let ((v1-9 (-> obj draw shadow-ctrl)))
|
||||
(logior! (-> v1-9 settings flags) 32)
|
||||
(the-as symbol (cond
|
||||
((and (-> obj draw shadow)
|
||||
(zero? (-> obj draw cur-lod))
|
||||
(logtest? (-> obj draw status) (draw-status was-drawn))
|
||||
)
|
||||
(let ((f0-0 (-> obj appear-dest y))
|
||||
(v1-7 (-> obj draw shadow-ctrl))
|
||||
)
|
||||
(let ((a0-1 v1-7))
|
||||
(set! (-> a0-1 settings flags) (logand -33 (-> a0-1 settings flags)))
|
||||
)
|
||||
0
|
||||
(let ((a0-3 v1-7))
|
||||
(set! (-> a0-3 settings bot-plane w) (- (+ -6144.0 f0-0)))
|
||||
)
|
||||
0
|
||||
(set! (-> v1-7 settings top-plane w) (- (+ 6144.0 f0-0)))
|
||||
)
|
||||
0
|
||||
)
|
||||
(else
|
||||
(let ((v1-9 (-> obj draw shadow-ctrl)))
|
||||
(logior! (-> v1-9 settings flags) 32)
|
||||
)
|
||||
0
|
||||
)
|
||||
)
|
||||
)
|
||||
0
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(defstate green-eco-lurker-appear (green-eco-lurker)
|
||||
@ -480,7 +484,7 @@
|
||||
(+ (-> (the-as green-eco-lurker-gen (-> self parent 0)) root trans x) (fmax -32768.0 (fmin 32768.0 f0-1)))
|
||||
)
|
||||
)
|
||||
(logior! (-> self collide-info nav-flags) 2)
|
||||
(logior! (-> self collide-info nav-flags) (nav-flags navf1))
|
||||
(set! (-> self nav extra-nav-sphere quad) (-> self appear-dest quad))
|
||||
(set! (-> self nav extra-nav-sphere w) 8192.0)
|
||||
(setup-from-to-duration! (-> self traj) (-> self collide-info trans) (-> self appear-dest) 225.0 -9.102222)
|
||||
@ -510,8 +514,8 @@
|
||||
(let ((f30-0 (fmin (the float (- (-> *display* base-frame-counter) (-> self state-time))) (-> self traj time))))
|
||||
(eval-position! (-> self traj) f30-0 (-> self collide-info trans))
|
||||
(when (= f30-0 (-> self traj time))
|
||||
(logior! (-> self collide-info nav-flags) 1)
|
||||
(set! (-> self collide-info nav-flags) (logand -3 (-> self collide-info nav-flags)))
|
||||
(logior! (-> self collide-info nav-flags) (nav-flags navf0))
|
||||
(logclear! (-> self collide-info nav-flags) (nav-flags navf1))
|
||||
(go green-eco-lurker-appear-land)
|
||||
)
|
||||
)
|
||||
@ -645,7 +649,7 @@
|
||||
(joint-control-channel-group-eval! a0-16 (the-as art-joint-anim #f) num-func-seek!)
|
||||
)
|
||||
)
|
||||
(logior! (-> self nav-enemy-flags) 2)
|
||||
(logior! (-> self nav-enemy-flags) (nav-enemy-flags navenmf1))
|
||||
(go-virtual nav-enemy-chase)
|
||||
(none)
|
||||
)
|
||||
@ -892,7 +896,7 @@
|
||||
(defmethod TODO-RENAME-48 green-eco-lurker ((obj green-eco-lurker))
|
||||
(initialize-skeleton obj *green-eco-lurker-sg* '())
|
||||
(set! (-> obj draw origin-joint-index) (the-as uint 3))
|
||||
(set! (-> obj collide-info nav-flags) (logand -2 (-> obj collide-info nav-flags)))
|
||||
(logclear! (-> obj collide-info nav-flags) (nav-flags navf0))
|
||||
(TODO-RENAME-45 obj *green-eco-lurker-nav-enemy-info*)
|
||||
(logior! (-> obj draw shadow-ctrl settings flags) 4)
|
||||
(set! (-> obj neck up) (the-as uint 0))
|
||||
|
@ -4501,8 +4501,8 @@
|
||||
(initialize-skeleton obj *robotboss-sg* '())
|
||||
(aybabtu 2)
|
||||
(set! (-> obj nav) (new 'process 'nav-control (-> obj root-override) 16 (the-as float 40960.0)))
|
||||
(logior! (-> obj nav flags) (nav-control-flags display-marks bit3 bit5 bit6 bit7))
|
||||
(set! (-> obj root-override nav-flags) (logand -2 (-> obj root-override nav-flags)))
|
||||
(logior! (-> obj nav flags) (nav-control-flags display-marks navcf3 navcf5 navcf6 navcf7))
|
||||
(logclear! (-> obj root-override nav-flags) (nav-flags navf0))
|
||||
(set! (-> obj path) (new 'process 'path-control obj 'path (the-as float 0.0)))
|
||||
(logior! (-> obj path flags) (path-control-flag display draw-line draw-point draw-text))
|
||||
(logclear! (-> obj mask) (process-mask actor-pause))
|
||||
|
@ -27,7 +27,7 @@
|
||||
:shadow 4
|
||||
)
|
||||
|
||||
(defstatehandler hopper :event nav-enemy-default-event-handler)
|
||||
nav-enemy-default-event-handler
|
||||
|
||||
(defmethod common-post hopper ((obj hopper))
|
||||
(let ((v1-1 (-> obj draw shadow-ctrl)))
|
||||
@ -46,9 +46,16 @@
|
||||
)
|
||||
(set! (-> s5-0 quad) (-> arg0 quad))
|
||||
(set! (-> s5-0 y) (+ 20480.0 (-> s5-0 y)))
|
||||
(let ((f0-2
|
||||
(fill-and-probe-using-y-probe *collide-cache* s5-0 f30-0 (collide-kind background) self t1-0 (the-as uint 1))
|
||||
)
|
||||
(let ((f0-2 (fill-and-probe-using-y-probe
|
||||
*collide-cache*
|
||||
s5-0
|
||||
f30-0
|
||||
(collide-kind background)
|
||||
self
|
||||
t1-0
|
||||
(new 'static 'pat-surface :noentity #x1)
|
||||
)
|
||||
)
|
||||
)
|
||||
(if (< f0-2 0.0)
|
||||
(return (the-as object #f))
|
||||
@ -74,18 +81,18 @@
|
||||
(-> self nav-info jump-height-factor)
|
||||
-409600.0
|
||||
)
|
||||
(set! (-> self nav-enemy-flags) (logand -513 (-> self nav-enemy-flags)))
|
||||
(set! (-> self nav-enemy-flags) (logand -1025 (-> self nav-enemy-flags)))
|
||||
(logior! (-> self nav-enemy-flags) 16)
|
||||
(set! (-> self nav-enemy-flags) (logand -9 (-> self nav-enemy-flags)))
|
||||
(logclear! (-> self nav-enemy-flags) (nav-enemy-flags standing-jump))
|
||||
(logclear! (-> self nav-enemy-flags) (nav-enemy-flags drop-jump))
|
||||
(logior! (-> self nav-enemy-flags) (nav-enemy-flags enable-travel))
|
||||
(logclear! (-> self nav-enemy-flags) (nav-enemy-flags enable-rotate))
|
||||
(when (not (nav-enemy-facing-point? (-> self jump-dest) 5461.3335))
|
||||
(ja-channel-push! 1 60)
|
||||
(nav-enemy-turn-to-face-point (-> self jump-dest) 1820.4445)
|
||||
)
|
||||
(set! (-> self nav-enemy-flags) (logand -17 (-> self nav-enemy-flags)))
|
||||
(logclear! (-> self nav-enemy-flags) (nav-enemy-flags enable-travel))
|
||||
(nav-enemy-execute-jump)
|
||||
(set! (-> self shadow-min-y) (+ (-> self collide-info trans y) (-> self nav-info shadow-min-y)))
|
||||
(set! (-> self nav-enemy-flags) (logand -9 (-> self nav-enemy-flags)))
|
||||
(logclear! (-> self nav-enemy-flags) (nav-enemy-flags enable-rotate))
|
||||
(nav-enemy-jump-land-anim)
|
||||
0
|
||||
(none)
|
||||
@ -163,7 +170,7 @@
|
||||
)
|
||||
:trans
|
||||
(behavior ()
|
||||
(if (zero? (logand (-> self nav-enemy-flags) 8))
|
||||
(if (zero? (logand (-> self nav-enemy-flags) (nav-enemy-flags enable-rotate)))
|
||||
((-> (method-of-type nav-enemy nav-enemy-patrol) trans))
|
||||
)
|
||||
(none)
|
||||
@ -172,7 +179,7 @@
|
||||
(behavior ()
|
||||
(vector-reset! (-> self collide-info transv))
|
||||
(set! (-> self jump-length) 16384.0)
|
||||
(set! (-> self nav-enemy-flags) (logand -9 (-> self nav-enemy-flags)))
|
||||
(logclear! (-> self nav-enemy-flags) (nav-enemy-flags enable-rotate))
|
||||
(while #t
|
||||
(cond
|
||||
((= (if (> (-> self skel active-channels) 0)
|
||||
@ -245,9 +252,9 @@
|
||||
(joint-control-channel-group-eval! a0-21 (the-as art-joint-anim #f) num-func-loop!)
|
||||
)
|
||||
)
|
||||
(when (or (logtest? (nav-control-flags bit19) (-> self nav flags)) (< 2.0 (-> self nav block-count)))
|
||||
(when (or (logtest? (nav-control-flags navcf19) (-> self nav flags)) (< 2.0 (-> self nav block-count)))
|
||||
(set! (-> self nav block-count) 0.0)
|
||||
(logior! (-> self nav flags) (nav-control-flags bit10))
|
||||
(logior! (-> self nav flags) (nav-control-flags navcf10))
|
||||
(nav-enemy-get-new-patrol-point)
|
||||
(set! (-> self nav target-pos quad) (-> self nav destination-pos quad))
|
||||
)
|
||||
@ -282,7 +289,7 @@
|
||||
)
|
||||
:trans
|
||||
(behavior ()
|
||||
(if (zero? (logand (-> self nav-enemy-flags) 8))
|
||||
(if (zero? (logand (-> self nav-enemy-flags) (nav-enemy-flags enable-rotate)))
|
||||
((-> (method-of-type nav-enemy nav-enemy-chase) trans))
|
||||
)
|
||||
(none)
|
||||
@ -291,7 +298,7 @@
|
||||
(behavior ()
|
||||
(vector-reset! (-> self collide-info transv))
|
||||
(set! (-> self jump-length) 32768.0)
|
||||
(set! (-> self nav-enemy-flags) (logand -9 (-> self nav-enemy-flags)))
|
||||
(logclear! (-> self nav-enemy-flags) (nav-enemy-flags enable-rotate))
|
||||
(while #t
|
||||
(cond
|
||||
((= (if (> (-> self skel active-channels) 0)
|
||||
@ -435,7 +442,7 @@
|
||||
:use-proximity-notice #f
|
||||
:use-jump-blocked #f
|
||||
:use-jump-patrol #f
|
||||
:gnd-collide-with #x1
|
||||
:gnd-collide-with (collide-kind background)
|
||||
:debug-draw-neck #f
|
||||
:debug-draw-jump #t
|
||||
)
|
||||
|
@ -377,7 +377,7 @@ nav-enemy-default-event-handler
|
||||
:use-proximity-notice #f
|
||||
:use-jump-blocked #f
|
||||
:use-jump-patrol #f
|
||||
:gnd-collide-with #x1
|
||||
:gnd-collide-with (collide-kind background)
|
||||
:debug-draw-neck #f
|
||||
:debug-draw-jump #f
|
||||
)
|
||||
|
@ -27,20 +27,22 @@
|
||||
)
|
||||
|
||||
(defbehavior aphid-invulnerable aphid ()
|
||||
(set! (-> self nav-enemy-flags) (logand -33 (-> self nav-enemy-flags)))
|
||||
(logclear! (-> self nav-enemy-flags) (nav-enemy-flags navenmf5))
|
||||
(set-collide-offense (-> self collide-info) 2 (collide-offense indestructible))
|
||||
(none)
|
||||
)
|
||||
|
||||
(defbehavior aphid-vulnerable aphid ()
|
||||
(logior! (-> self nav-enemy-flags) 32)
|
||||
(logior! (-> self nav-enemy-flags) (nav-enemy-flags navenmf5))
|
||||
(set-collide-offense (-> self collide-info) 2 (collide-offense touch))
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod dummy-43 aphid ((obj aphid) (arg0 process) (arg1 event-message-block))
|
||||
(cond
|
||||
((or (logtest? (-> obj nav-enemy-flags) 32) (= arg0 (ppointer->process (-> obj parent))))
|
||||
((or (logtest? (-> obj nav-enemy-flags) (nav-enemy-flags navenmf5))
|
||||
(= arg0 (ppointer->process (-> obj parent)))
|
||||
)
|
||||
(send-event arg0 'get-attack-count 1)
|
||||
(logclear! (-> obj mask) (process-mask actor-pause attackable))
|
||||
(go (method-of-object obj nav-enemy-die))
|
||||
@ -168,7 +170,7 @@
|
||||
(behavior ()
|
||||
(set! (-> self turn-time) (seconds 0.2))
|
||||
(let ((f30-0 (nav-enemy-rnd-float-range 0.8 1.2)))
|
||||
(when (or (logtest? (-> self nav-enemy-flags) 256)
|
||||
(when (or (logtest? (-> self nav-enemy-flags) (nav-enemy-flags navenmf8))
|
||||
(and (nav-enemy-player-vulnerable?) (nav-enemy-rnd-percent? 0.5))
|
||||
)
|
||||
(ja-channel-push! 1 30)
|
||||
@ -192,7 +194,7 @@
|
||||
)
|
||||
(while #t
|
||||
(when (not (nav-enemy-facing-player? 2730.6667))
|
||||
(logior! (-> self nav-enemy-flags) 16)
|
||||
(logior! (-> self nav-enemy-flags) (nav-enemy-flags enable-travel))
|
||||
(let ((a0-7 (-> self skel root-channel 0)))
|
||||
(set! (-> a0-7 param 0) 1.0)
|
||||
(joint-control-channel-group! a0-7 (the-as art-joint-anim #f) num-func-loop!)
|
||||
@ -213,7 +215,7 @@
|
||||
(joint-control-channel-group-eval! a0-13 (the-as art-joint-anim #f) num-func-loop!)
|
||||
)
|
||||
)
|
||||
(set! (-> self nav-enemy-flags) (logand -17 (-> self nav-enemy-flags)))
|
||||
(logclear! (-> self nav-enemy-flags) (nav-enemy-flags enable-travel))
|
||||
)
|
||||
(when (nav-enemy-rnd-percent? 0.3)
|
||||
(if (not (= (if (> (-> self skel active-channels) 0)
|
||||
@ -282,7 +284,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(logclear! (-> self nav flags) (nav-control-flags bit17 bit19))
|
||||
(logclear! (-> self nav flags) (nav-control-flags navcf17 navcf19))
|
||||
(nav-enemy-get-new-patrol-point)
|
||||
(let ((a0-12 (-> self skel root-channel 0)))
|
||||
(set! (-> a0-12 frame-group) (the-as art-joint-anim (-> self draw art-group data 8)))
|
||||
@ -360,7 +362,7 @@
|
||||
:use-proximity-notice #f
|
||||
:use-jump-blocked #f
|
||||
:use-jump-patrol #f
|
||||
:gnd-collide-with #x1
|
||||
:gnd-collide-with (collide-kind background)
|
||||
:debug-draw-neck #f
|
||||
:debug-draw-jump #f
|
||||
)
|
||||
@ -413,7 +415,7 @@
|
||||
(vector-identity! (-> self collide-info scale))
|
||||
(set! (-> self entity) (-> arg0 entity))
|
||||
(TODO-RENAME-48 self)
|
||||
(set! (-> self nav-enemy-flags) (logand -4097 (-> self nav-enemy-flags)))
|
||||
(logclear! (-> self nav-enemy-flags) (nav-enemy-flags navenmf12))
|
||||
(let ((a1-3 (new 'stack-no-clear 'event-message-block)))
|
||||
(set! (-> a1-3 from) self)
|
||||
(set! (-> a1-3 num-params) 0)
|
||||
|
@ -115,7 +115,7 @@
|
||||
:use-proximity-notice #f
|
||||
:use-jump-blocked #f
|
||||
:use-jump-patrol #f
|
||||
:gnd-collide-with #x1
|
||||
:gnd-collide-with (collide-kind background)
|
||||
:debug-draw-neck #f
|
||||
:debug-draw-jump #f
|
||||
)
|
||||
@ -168,7 +168,7 @@
|
||||
:use-proximity-notice #f
|
||||
:use-jump-blocked #f
|
||||
:use-jump-patrol #f
|
||||
:gnd-collide-with #x1
|
||||
:gnd-collide-with (collide-kind background)
|
||||
:debug-draw-neck #f
|
||||
:debug-draw-jump #f
|
||||
)
|
||||
@ -599,7 +599,7 @@ baby-spider-default-event-handler
|
||||
(set! (-> self turn-time) (seconds 0.07333333))
|
||||
(let ((f30-0 (rand-vu-float-range 0.8 1.2)))
|
||||
(while #t
|
||||
(logior! (-> self nav-enemy-flags) 16)
|
||||
(logior! (-> self nav-enemy-flags) (nav-enemy-flags enable-travel))
|
||||
(ja-channel-push! 1 30)
|
||||
(let ((a0-2 (-> self skel root-channel 0)))
|
||||
(set! (-> a0-2 frame-group) (the-as art-joint-anim (-> self draw art-group data 12)))
|
||||
@ -622,7 +622,7 @@ baby-spider-default-event-handler
|
||||
(set! (-> a0-5 param 0) 1.0)
|
||||
(joint-control-channel-group! a0-5 (the-as art-joint-anim #f) num-func-loop!)
|
||||
)
|
||||
(set! (-> self nav-enemy-flags) (logand -17 (-> self nav-enemy-flags)))
|
||||
(logclear! (-> self nav-enemy-flags) (nav-enemy-flags enable-travel))
|
||||
(let ((gp-0 (rand-vu-int-range 300 600))
|
||||
(s5-0 (-> *display* base-frame-counter))
|
||||
)
|
||||
@ -678,7 +678,7 @@ baby-spider-default-event-handler
|
||||
(joint-control-channel-group-eval! a0-2 (the-as art-joint-anim #f) num-func-seek!)
|
||||
)
|
||||
)
|
||||
(logclear! (-> self nav flags) (nav-control-flags bit17 bit19))
|
||||
(logclear! (-> self nav flags) (nav-control-flags navcf17 navcf19))
|
||||
(nav-enemy-get-new-patrol-point)
|
||||
(let ((a0-7 (-> self skel root-channel 0)))
|
||||
(set! (-> a0-7 frame-group) (the-as art-joint-anim (-> self draw art-group data 6)))
|
||||
@ -904,7 +904,7 @@ baby-spider-default-event-handler
|
||||
(set! (-> obj mask) (logior (process-mask enemy) (-> obj mask)))
|
||||
(logior! (-> obj mask) (process-mask actor-pause))
|
||||
(set! (-> obj nav) (new 'process 'nav-control (-> obj collide-info) 24 40960.0))
|
||||
(logior! (-> obj nav flags) (nav-control-flags display-marks bit3 bit5 bit6 bit7))
|
||||
(logior! (-> obj nav flags) (nav-control-flags display-marks navcf3 navcf5 navcf6 navcf7))
|
||||
(set! (-> obj path) (new 'process 'path-control obj 'path 0.0))
|
||||
(logior! (-> obj path flags) (path-control-flag display draw-line draw-point draw-text))
|
||||
(create-connection!
|
||||
|
@ -173,7 +173,10 @@
|
||||
|
||||
(defmethod draw-egg-shadow mother-spider-egg ((obj mother-spider-egg) (arg0 vector) (arg1 symbol))
|
||||
(cond
|
||||
((and (-> obj draw shadow) (zero? (-> obj draw cur-lod)) (logtest? (-> obj draw status) (draw-status was-drawn)))
|
||||
((and (-> obj draw shadow)
|
||||
(zero? (-> obj draw cur-lod))
|
||||
(logtest? (-> obj draw status) (draw-status was-drawn))
|
||||
)
|
||||
(let ((s5-0 (new 'stack-no-clear 'collide-tri-result))
|
||||
(a1-1 (new 'stack-no-clear 'vector))
|
||||
(a2-1 (new 'stack-no-clear 'vector))
|
||||
@ -581,8 +584,8 @@
|
||||
(logior! (-> v1-8 settings flags) 32)
|
||||
)
|
||||
0
|
||||
(set! (-> self root-override nav-flags) (logand -2 (-> self root-override nav-flags)))
|
||||
(set! (-> self root-override nav-flags) (logand -3 (-> self root-override nav-flags)))
|
||||
(logclear! (-> self root-override nav-flags) (nav-flags navf0))
|
||||
(logclear! (-> self root-override nav-flags) (nav-flags navf1))
|
||||
(clear-collide-with-as (-> self root-override))
|
||||
(until (not (-> self child))
|
||||
(suspend)
|
||||
@ -625,9 +628,9 @@
|
||||
(setup-lods! (-> self broken-look) *mother-spider-egg-broken-sg* (-> self draw art-group) (-> self entity))
|
||||
(set! (-> self draw shadow-ctrl) (new 'process 'shadow-control 0.0 0.0 614400.0 (the-as float 60) 245760.0))
|
||||
(set! (-> self nav) (new 'process 'nav-control (-> self root-override) 16 40960.0))
|
||||
(logior! (-> self nav flags) (nav-control-flags display-marks bit3 bit5 bit6 bit7))
|
||||
(set! (-> self root-override nav-flags) (logand -2 (-> self root-override nav-flags)))
|
||||
(logior! (-> self root-override nav-flags) 2)
|
||||
(logior! (-> self nav flags) (nav-control-flags display-marks navcf3 navcf5 navcf6 navcf7))
|
||||
(logclear! (-> self root-override nav-flags) (nav-flags navf0))
|
||||
(logior! (-> self root-override nav-flags) (nav-flags navf1))
|
||||
(set! (-> self nav extra-nav-sphere quad) (-> self fall-dest quad))
|
||||
(set! (-> self nav extra-nav-sphere w) 4096.0)
|
||||
(setup-from-to-height! (-> self traj) (-> self root-override trans) arg2 4096.0 -4.551111)
|
||||
|
@ -261,7 +261,7 @@
|
||||
(the-as vector #f)
|
||||
f0-5
|
||||
(collide-kind background)
|
||||
(the-as process #f)
|
||||
(the-as process-drawable #f)
|
||||
0.0
|
||||
81920.0
|
||||
)
|
||||
|
@ -2104,10 +2104,10 @@
|
||||
(process-drawable-from-entity! obj arg0)
|
||||
(initialize-skeleton obj *mother-spider-sg* '())
|
||||
(set! (-> obj nav) (new 'process 'nav-control (-> obj root-override) 16 40960.0))
|
||||
(logior! (-> obj nav flags) (nav-control-flags display-marks bit3 bit5 bit6 bit7))
|
||||
(logior! (-> obj nav flags) (nav-control-flags display-marks navcf3 navcf5 navcf6 navcf7))
|
||||
(set! (-> obj nav nearest-y-threshold) 409600.0)
|
||||
(set! (-> obj root-override nav-flags) (logand -2 (-> obj root-override nav-flags)))
|
||||
(set! (-> obj root-override nav-flags) (logand -3 (-> obj root-override nav-flags)))
|
||||
(logclear! (-> obj root-override nav-flags) (nav-flags navf0))
|
||||
(logclear! (-> obj root-override nav-flags) (nav-flags navf1))
|
||||
(set! (-> obj path) (new 'process 'path-control obj 'path 0.0))
|
||||
(logior! (-> obj path flags) (path-control-flag display draw-line draw-point draw-text))
|
||||
(set! (-> obj fact)
|
||||
|
@ -139,7 +139,7 @@ nav-enemy-default-event-handler
|
||||
(if (nav-enemy-notice-player?)
|
||||
(go-virtual nav-enemy-chase)
|
||||
)
|
||||
(if (logtest? (nav-control-flags bit19) (-> self nav flags))
|
||||
(if (logtest? (nav-control-flags navcf19) (-> self nav flags))
|
||||
(go babak-with-cannon-jump-onto-cannon)
|
||||
)
|
||||
(none)
|
||||
@ -230,7 +230,7 @@ nav-enemy-default-event-handler
|
||||
)
|
||||
:exit
|
||||
(behavior ()
|
||||
(logior! (-> self nav-enemy-flags) 24)
|
||||
(logior! (-> self nav-enemy-flags) (nav-enemy-flags enable-rotate enable-travel))
|
||||
(none)
|
||||
)
|
||||
:code
|
||||
@ -238,7 +238,7 @@ nav-enemy-default-event-handler
|
||||
(set! (-> self state-time) (-> *display* base-frame-counter))
|
||||
(set! (-> self rotate-speed) (-> self nav-info run-rotate-speed))
|
||||
(set! (-> self turn-time) (-> self nav-info run-turn-time))
|
||||
(set! (-> self nav-enemy-flags) (logand -25 (-> self nav-enemy-flags)))
|
||||
(logclear! (-> self nav-enemy-flags) (nav-enemy-flags enable-rotate enable-travel))
|
||||
(nav-enemy-neck-control-inactive)
|
||||
(let* ((v1-7 (-> self cannon-ent))
|
||||
(gp-0 (if v1-7
|
||||
@ -264,9 +264,9 @@ nav-enemy-default-event-handler
|
||||
(ja-channel-push! 1 60)
|
||||
(nav-enemy-turn-to-face-point (-> self jump-dest) 1820.4445)
|
||||
)
|
||||
(logior! (-> self nav-enemy-flags) 16)
|
||||
(logior! (-> self nav-enemy-flags) (nav-enemy-flags enable-travel))
|
||||
(nav-enemy-execute-jump)
|
||||
(set! (-> self nav-enemy-flags) (logand -25 (-> self nav-enemy-flags)))
|
||||
(logclear! (-> self nav-enemy-flags) (nav-enemy-flags enable-rotate enable-travel))
|
||||
(let* ((v1-20 (-> self cannon-ent))
|
||||
(gp-1 (if v1-20
|
||||
(-> v1-20 extra process)
|
||||
@ -320,7 +320,7 @@ nav-enemy-default-event-handler
|
||||
)
|
||||
:exit
|
||||
(behavior ()
|
||||
(logior! (-> self nav-enemy-flags) 24)
|
||||
(logior! (-> self nav-enemy-flags) (nav-enemy-flags enable-rotate enable-travel))
|
||||
(none)
|
||||
)
|
||||
:code
|
||||
@ -328,7 +328,7 @@ nav-enemy-default-event-handler
|
||||
(set! (-> self state-time) (-> *display* base-frame-counter))
|
||||
(nav-enemy-initialize-jump (-> self entity extra trans))
|
||||
(nav-enemy-neck-control-look-at)
|
||||
(set! (-> self nav-enemy-flags) (logand -25 (-> self nav-enemy-flags)))
|
||||
(logclear! (-> self nav-enemy-flags) (nav-enemy-flags enable-rotate enable-travel))
|
||||
(let ((a0-2 (-> self skel root-channel 0)))
|
||||
(set! (-> a0-2 frame-group) (the-as art-joint-anim (-> self draw art-group data 17)))
|
||||
(set! (-> a0-2 param 0) 0.0)
|
||||
@ -350,7 +350,7 @@ nav-enemy-default-event-handler
|
||||
(ja-channel-push! 1 60)
|
||||
(nav-enemy-turn-to-face-point (-> self jump-dest) 1820.4445)
|
||||
)
|
||||
(logior! (-> self nav-enemy-flags) 16)
|
||||
(logior! (-> self nav-enemy-flags) (nav-enemy-flags enable-travel))
|
||||
(nav-enemy-execute-jump)
|
||||
(let ((a1-6 (dummy-16 (-> self nav) (-> self jump-dest))))
|
||||
(set-current-poly! (-> self nav) a1-6)
|
||||
|
@ -44,20 +44,19 @@
|
||||
)
|
||||
|
||||
(defmethod dummy-44 bonelurker ((obj bonelurker) (arg0 process) (arg1 event-message-block))
|
||||
(the-as
|
||||
object
|
||||
(when (and (logtest? (-> obj nav-enemy-flags) 64) ((method-of-type touching-shapes-entry prims-touching?)
|
||||
(the-as touching-shapes-entry (-> arg1 param 0))
|
||||
(-> obj collide-info)
|
||||
(the-as uint 1)
|
||||
)
|
||||
)
|
||||
(when (nav-enemy-send-attack arg0 (the-as touching-shapes-entry (-> arg1 param 0)) 'generic)
|
||||
(set! (-> obj speed-scale) 0.5)
|
||||
#t
|
||||
)
|
||||
)
|
||||
)
|
||||
(the-as object (when (and (logtest? (-> obj nav-enemy-flags) (nav-enemy-flags navenmf6))
|
||||
((method-of-type touching-shapes-entry prims-touching?)
|
||||
(the-as touching-shapes-entry (-> arg1 param 0))
|
||||
(-> obj collide-info)
|
||||
(the-as uint 1)
|
||||
)
|
||||
)
|
||||
(when (nav-enemy-send-attack arg0 (the-as touching-shapes-entry (-> arg1 param 0)) 'generic)
|
||||
(set! (-> obj speed-scale) 0.5)
|
||||
#t
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod dummy-43 bonelurker ((obj bonelurker) (arg0 process) (arg1 event-message-block))
|
||||
@ -124,7 +123,7 @@
|
||||
(send-event-function arg0 a1-6)
|
||||
)
|
||||
(set! (-> obj bump-player-time) (-> *display* base-frame-counter))
|
||||
(set! (-> obj nav-enemy-flags) (logand -65 (-> obj nav-enemy-flags)))
|
||||
(logclear! (-> obj nav-enemy-flags) (nav-enemy-flags navenmf6))
|
||||
'push
|
||||
)
|
||||
)
|
||||
@ -237,10 +236,10 @@ nav-enemy-default-event-handler
|
||||
:trans
|
||||
(behavior ()
|
||||
((-> (method-of-type nav-enemy nav-enemy-chase) trans))
|
||||
(if (and (zero? (logand (-> self nav-enemy-flags) 64))
|
||||
(if (and (zero? (logand (-> self nav-enemy-flags) (nav-enemy-flags navenmf6)))
|
||||
(>= (- (-> *display* base-frame-counter) (-> self bump-player-time)) (seconds 0.5))
|
||||
)
|
||||
(logior! (-> self nav-enemy-flags) 64)
|
||||
(logior! (-> self nav-enemy-flags) (nav-enemy-flags navenmf6))
|
||||
)
|
||||
(none)
|
||||
)
|
||||
@ -344,7 +343,7 @@ nav-enemy-default-event-handler
|
||||
(joint-control-channel-group-eval! a0-23 (the-as art-joint-anim #f) num-func-seek!)
|
||||
)
|
||||
)
|
||||
(if (logtest? (-> self nav-enemy-flags) 256)
|
||||
(if (logtest? (-> self nav-enemy-flags) (nav-enemy-flags navenmf8))
|
||||
(go-virtual nav-enemy-victory)
|
||||
)
|
||||
(let ((a0-25 (-> self skel root-channel 0)))
|
||||
@ -364,7 +363,7 @@ nav-enemy-default-event-handler
|
||||
(joint-control-channel-group-eval! a0-26 (the-as art-joint-anim #f) num-func-seek!)
|
||||
)
|
||||
)
|
||||
(if (logtest? (-> self nav-enemy-flags) 256)
|
||||
(if (logtest? (-> self nav-enemy-flags) (nav-enemy-flags navenmf8))
|
||||
(go-virtual nav-enemy-victory)
|
||||
)
|
||||
(let ((a0-28 (-> self skel root-channel 0)))
|
||||
@ -435,7 +434,7 @@ nav-enemy-default-event-handler
|
||||
)
|
||||
(while #t
|
||||
(when (not (nav-enemy-facing-player? 2730.6667))
|
||||
(logior! (-> self nav-enemy-flags) 16)
|
||||
(logior! (-> self nav-enemy-flags) (nav-enemy-flags enable-travel))
|
||||
(ja-channel-push! 1 60)
|
||||
(let ((v1-20 (-> self skel root-channel 0)))
|
||||
(set! (-> v1-20 frame-group) (the-as art-joint-anim (-> self draw art-group data 16)))
|
||||
@ -452,7 +451,7 @@ nav-enemy-default-event-handler
|
||||
(joint-control-channel-group-eval! a0-14 (the-as art-joint-anim #f) num-func-loop!)
|
||||
)
|
||||
)
|
||||
(set! (-> self nav-enemy-flags) (logand -17 (-> self nav-enemy-flags)))
|
||||
(logclear! (-> self nav-enemy-flags) (nav-enemy-flags enable-travel))
|
||||
)
|
||||
(ja-channel-push! 1 75)
|
||||
(let ((a0-18 (-> self skel root-channel 0)))
|
||||
@ -573,7 +572,7 @@ nav-enemy-default-event-handler
|
||||
)
|
||||
)
|
||||
)
|
||||
(logclear! (-> self nav flags) (nav-control-flags bit17 bit19))
|
||||
(logclear! (-> self nav flags) (nav-control-flags navcf17 navcf19))
|
||||
(nav-enemy-get-new-patrol-point)
|
||||
(let ((a0-18 (-> self skel root-channel 0)))
|
||||
(set! (-> a0-18 frame-group) (the-as art-joint-anim (-> self draw art-group data 5)))
|
||||
@ -707,7 +706,7 @@ nav-enemy-default-event-handler
|
||||
:use-proximity-notice #f
|
||||
:use-jump-blocked #t
|
||||
:use-jump-patrol #f
|
||||
:gnd-collide-with #x1
|
||||
:gnd-collide-with (collide-kind background)
|
||||
:debug-draw-neck #f
|
||||
:debug-draw-jump #f
|
||||
)
|
||||
|
@ -860,7 +860,7 @@
|
||||
(-> self root-override shadow-pos)
|
||||
8192.0
|
||||
(collide-kind background)
|
||||
(the-as process #f)
|
||||
(the-as process-drawable #f)
|
||||
0.0
|
||||
81920.0
|
||||
)
|
||||
|
@ -368,8 +368,8 @@ nav-enemy-default-event-handler
|
||||
(-> self nav destination-pos)
|
||||
546133.3
|
||||
)
|
||||
(if (logtest? (nav-control-flags bit21) (-> self nav flags))
|
||||
(logclear! (-> self nav flags) (nav-control-flags bit10))
|
||||
(if (logtest? (nav-control-flags navcf21) (-> self nav flags))
|
||||
(logclear! (-> self nav flags) (nav-control-flags navcf10))
|
||||
)
|
||||
(nav-enemy-travel-post)
|
||||
(none)
|
||||
@ -386,7 +386,7 @@ nav-enemy-default-event-handler
|
||||
:enter
|
||||
(behavior ()
|
||||
((-> (method-of-type nav-enemy nav-enemy-jump) enter))
|
||||
(set! (-> self nav-enemy-flags) (logand -513 (-> self nav-enemy-flags)))
|
||||
(logclear! (-> self nav-enemy-flags) (nav-enemy-flags standing-jump))
|
||||
(none)
|
||||
)
|
||||
:code
|
||||
@ -596,7 +596,7 @@ nav-enemy-default-event-handler
|
||||
:use-proximity-notice #f
|
||||
:use-jump-blocked #f
|
||||
:use-jump-patrol #f
|
||||
:gnd-collide-with #x1
|
||||
:gnd-collide-with (collide-kind background)
|
||||
:debug-draw-neck #f
|
||||
:debug-draw-jump #f
|
||||
)
|
||||
|
@ -380,7 +380,7 @@
|
||||
(the-as vector #f)
|
||||
8192.0
|
||||
(collide-kind background)
|
||||
(the-as process #f)
|
||||
(the-as process-drawable #f)
|
||||
0.0
|
||||
81920.0
|
||||
)
|
||||
@ -1173,7 +1173,7 @@
|
||||
(set-yaw-angle-clear-roll-pitch! (-> obj root-override) (rand-vu-float-range 0.0 65536.0))
|
||||
(initialize-skeleton obj *quicksandlurker-sg* '())
|
||||
(set! (-> obj nav) (new 'process 'nav-control (-> obj root-override) 16 40960.0))
|
||||
(logior! (-> obj nav flags) (nav-control-flags display-marks bit3 bit5 bit6 bit7))
|
||||
(logior! (-> obj nav flags) (nav-control-flags display-marks navcf3 navcf5 navcf6 navcf7))
|
||||
(set! (-> obj fact)
|
||||
(new 'process 'fact-info-enemy obj (pickup-type eco-pill-random) (-> *FACT-bank* default-pill-inc))
|
||||
)
|
||||
|
@ -407,7 +407,7 @@
|
||||
(-> self pickup-type)
|
||||
(-> *FACT-bank* eco-single-inc)
|
||||
#t
|
||||
(the-as process-drawable *entity-pool*)
|
||||
*entity-pool*
|
||||
t1-0
|
||||
)
|
||||
)
|
||||
@ -1135,7 +1135,7 @@
|
||||
(the-as vector #f)
|
||||
(the-as float 49152.0)
|
||||
(collide-kind background)
|
||||
(the-as process #f)
|
||||
(the-as process-drawable #f)
|
||||
(-> (new 'static 'array float 1 0.0) 0)
|
||||
(the-as float 409600.0)
|
||||
)
|
||||
|
@ -1070,7 +1070,7 @@
|
||||
(send-event (ppointer->process (-> self manipy)) 'draw #t)
|
||||
(send-event (ppointer->process (-> self manipy)) 'anim-mode 'clone-anim)
|
||||
(target-timed-invulnerable-off self)
|
||||
(set! (-> self control pat-ignore-mask) (new 'static 'pat-surface :skip #x1 :noentity #x1))
|
||||
(set! (-> self control pat-ignore-mask) (new 'static 'pat-surface :noentity #x1))
|
||||
(restore-collide-with-as (-> self control))
|
||||
((-> target-racing-start exit))
|
||||
(target-exit)
|
||||
|
@ -356,9 +356,9 @@
|
||||
)
|
||||
(process-drawable-from-entity! obj arg0)
|
||||
(set! (-> obj nav) (new 'process 'nav-control (-> obj root-override) 16 40960.0))
|
||||
(logior! (-> obj nav flags) (nav-control-flags display-marks bit3 bit5 bit6 bit7))
|
||||
(logior! (-> obj nav flags) (nav-control-flags display-marks navcf3 navcf5 navcf6 navcf7))
|
||||
(set! (-> obj nav nearest-y-threshold) 409600.0)
|
||||
(set! (-> obj root-override nav-flags) (logand -2 (-> obj root-override nav-flags)))
|
||||
(logclear! (-> obj root-override nav-flags) (nav-flags navf0))
|
||||
(set! (-> obj path) (new 'process 'path-control obj 'path 0.0))
|
||||
(logior! (-> obj path flags) (path-control-flag display draw-line draw-point draw-text))
|
||||
(let ((s4-1 (entity-actor-count arg0 'alt-actor)))
|
||||
|
@ -456,13 +456,13 @@
|
||||
:virtual #t
|
||||
:enter
|
||||
(behavior ()
|
||||
(logior! (-> self nav flags) (nav-control-flags bit12))
|
||||
(logior! (-> self nav flags) (nav-control-flags navcf12))
|
||||
((-> (method-of-type nav-enemy nav-enemy-chase) enter))
|
||||
(none)
|
||||
)
|
||||
:exit
|
||||
(behavior ()
|
||||
(logclear! (-> self nav flags) (nav-control-flags bit12))
|
||||
(logclear! (-> self nav flags) (nav-control-flags navcf12))
|
||||
(none)
|
||||
)
|
||||
:trans
|
||||
@ -1063,7 +1063,7 @@
|
||||
:use-proximity-notice #f
|
||||
:use-jump-blocked #f
|
||||
:use-jump-patrol #f
|
||||
:gnd-collide-with #x1
|
||||
:gnd-collide-with (collide-kind background)
|
||||
:debug-draw-neck #f
|
||||
:debug-draw-jump #f
|
||||
)
|
||||
@ -1091,7 +1091,7 @@
|
||||
(process-drawable-from-entity! obj arg0)
|
||||
(initialize-skeleton obj *lightning-mole-sg* '())
|
||||
(TODO-RENAME-45 obj *lightning-mole-nav-enemy-info*)
|
||||
(logclear! (-> obj nav flags) (nav-control-flags bit5 bit6 bit7))
|
||||
(logclear! (-> obj nav flags) (nav-control-flags navcf5 navcf6 navcf7))
|
||||
(set! (-> obj draw origin-joint-index) (the-as uint 3))
|
||||
(set! (-> obj reaction-time) (seconds 0.05))
|
||||
(set! (-> obj last-reflection-time) 0)
|
||||
|
@ -114,7 +114,7 @@
|
||||
:use-proximity-notice #f
|
||||
:use-jump-blocked #f
|
||||
:use-jump-patrol #f
|
||||
:gnd-collide-with #x1
|
||||
:gnd-collide-with (collide-kind background)
|
||||
:debug-draw-neck #f
|
||||
:debug-draw-jump #f
|
||||
)
|
||||
@ -427,7 +427,7 @@
|
||||
(= (-> arg0 type) target)
|
||||
)
|
||||
(set-collide-offense (-> self collide-info) 2 (collide-offense no-offense))
|
||||
(logior! (-> self nav-enemy-flags) 256)
|
||||
(logior! (-> self nav-enemy-flags) (nav-enemy-flags navenmf8))
|
||||
(level-hint-spawn (game-text-id ice-cube-hint) "sksp0350" (the-as entity #f) *entity-pool* (game-task none))
|
||||
)
|
||||
)
|
||||
@ -462,7 +462,7 @@
|
||||
)
|
||||
(set-collide-offense (-> self collide-info) 2 (collide-offense no-offense))
|
||||
;; NOTE fixed decompiler bug
|
||||
(set! (-> self nav-enemy-flags) (logior (-> self nav-enemy-flags) 256))
|
||||
(logior! (-> self nav-enemy-flags) (nav-enemy-flags navenmf8))
|
||||
)
|
||||
)
|
||||
((= v1-0 'touched)
|
||||
@ -689,7 +689,7 @@
|
||||
(collide-kind background)
|
||||
(-> obj collide-info process)
|
||||
s4-0
|
||||
(the-as uint 1)
|
||||
(new 'static 'pat-surface :noentity #x1)
|
||||
)
|
||||
)
|
||||
)
|
||||
@ -973,7 +973,7 @@
|
||||
:code
|
||||
(behavior ()
|
||||
(dummy-57 self)
|
||||
(set! (-> self nav-enemy-flags) (logand -3 (-> self nav-enemy-flags)))
|
||||
(logclear! (-> self nav-enemy-flags) (nav-enemy-flags navenmf1))
|
||||
(logclear! (-> self mask) (process-mask actor-pause))
|
||||
(go ice-cube-face-player)
|
||||
(none)
|
||||
@ -988,7 +988,7 @@
|
||||
:enter
|
||||
(behavior ()
|
||||
(set! (-> self state-time) (-> *display* base-frame-counter))
|
||||
(logior! (-> self nav-enemy-flags) 4)
|
||||
(logior! (-> self nav-enemy-flags) (nav-enemy-flags navenmf2))
|
||||
(dummy-57 self)
|
||||
(logclear! (-> self mask) (process-mask actor-pause))
|
||||
(if (or (not *target*)
|
||||
@ -1163,7 +1163,7 @@
|
||||
:enter
|
||||
(behavior ()
|
||||
(set! (-> self state-time) (-> *display* base-frame-counter))
|
||||
(logior! (-> self nav-enemy-flags) 4)
|
||||
(logior! (-> self nav-enemy-flags) (nav-enemy-flags navenmf2))
|
||||
(dummy-58 self)
|
||||
(if (or (not *target*)
|
||||
(logtest? (-> *target* state-flags) #x80f8)
|
||||
@ -1276,7 +1276,7 @@
|
||||
(behavior ()
|
||||
(set! (-> self state-time) (-> *display* base-frame-counter))
|
||||
(dummy-58 self)
|
||||
(logior! (-> self nav-enemy-flags) 4)
|
||||
(logior! (-> self nav-enemy-flags) (nav-enemy-flags navenmf2))
|
||||
(set! (-> self next-skid-sound-time) (-> *display* base-frame-counter))
|
||||
(if (or (not *target*)
|
||||
(logtest? (-> *target* state-flags) #x80f8)
|
||||
@ -1288,7 +1288,7 @@
|
||||
(set! (-> self acceleration) (-> self nav-info run-acceleration))
|
||||
(set! (-> self rotate-speed) (-> self nav-info run-rotate-speed))
|
||||
(set! (-> self turn-time) (-> self nav-info run-turn-time))
|
||||
(logclear! (-> self nav flags) (nav-control-flags bit8))
|
||||
(logclear! (-> self nav flags) (nav-control-flags navcf8))
|
||||
(set-root-prim-collide-with! (-> self collide-info) (collide-kind cak-2 cak-3 target crate enemy))
|
||||
(set! (-> self track-target?) #t)
|
||||
(set! (-> self slow-down?) #f)
|
||||
@ -1302,7 +1302,7 @@
|
||||
)
|
||||
:exit
|
||||
(behavior ()
|
||||
(logior! (-> self nav flags) (nav-control-flags bit8))
|
||||
(logior! (-> self nav flags) (nav-control-flags navcf8))
|
||||
(set-root-prim-collide-with! (-> self collide-info) (collide-kind target))
|
||||
(none)
|
||||
)
|
||||
|
@ -100,7 +100,7 @@
|
||||
:use-proximity-notice #f
|
||||
:use-jump-blocked #f
|
||||
:use-jump-patrol #f
|
||||
:gnd-collide-with #x1
|
||||
:gnd-collide-with (collide-kind background)
|
||||
:debug-draw-neck #f
|
||||
:debug-draw-jump #f
|
||||
)
|
||||
@ -122,7 +122,7 @@
|
||||
(when (send-event-function arg0 a1-5)
|
||||
(set! (-> self touch-time) (-> *display* base-frame-counter))
|
||||
(set-collide-offense (-> self collide-info) 2 (collide-offense no-offense))
|
||||
(logior! (-> self nav-enemy-flags) 256)
|
||||
(logior! (-> self nav-enemy-flags) (nav-enemy-flags navenmf8))
|
||||
(go-virtual snow-bunny-attack)
|
||||
)
|
||||
)
|
||||
@ -254,8 +254,8 @@
|
||||
|
||||
(defbehavior snow-bunny-initialize-jump snow-bunny ((arg0 vector))
|
||||
(nav-enemy-initialize-custom-jump arg0 #f (-> self jump-height-min) (-> self jump-height-factor) -307200.0)
|
||||
(set! (-> self nav-enemy-flags) (logand -1025 (-> self nav-enemy-flags)))
|
||||
(logior! (-> self nav-enemy-flags) 512)
|
||||
(logclear! (-> self nav-enemy-flags) (nav-enemy-flags drop-jump))
|
||||
(logior! (-> self nav-enemy-flags) (nav-enemy-flags standing-jump))
|
||||
0
|
||||
(none)
|
||||
)
|
||||
@ -431,9 +431,9 @@
|
||||
(behavior ()
|
||||
(set! (-> self state-time) (-> *display* base-frame-counter))
|
||||
(dummy-76 self #f)
|
||||
(set! (-> self nav flags) (logior (nav-control-flags bit19) (-> self nav flags)))
|
||||
(set! (-> self nav-enemy-flags) (logand -5 (-> self nav-enemy-flags)))
|
||||
(logior! (-> self nav-enemy-flags) 8)
|
||||
(set! (-> self nav flags) (logior (nav-control-flags navcf19) (-> self nav flags)))
|
||||
(logclear! (-> self nav-enemy-flags) (nav-enemy-flags navenmf2))
|
||||
(logior! (-> self nav-enemy-flags) (nav-enemy-flags enable-rotate))
|
||||
(set! (-> self state-timeout) (seconds 0.1))
|
||||
(none)
|
||||
)
|
||||
@ -533,7 +533,7 @@
|
||||
(collide-kind background)
|
||||
(-> obj collide-info process)
|
||||
s4-0
|
||||
(the-as uint 1)
|
||||
(new 'static 'pat-surface :noentity #x1)
|
||||
)
|
||||
)
|
||||
)
|
||||
@ -664,8 +664,8 @@
|
||||
)
|
||||
:exit
|
||||
(behavior ()
|
||||
(logior! (-> self nav-enemy-flags) 24)
|
||||
(set! (-> self collide-info nav-flags) (logand -3 (-> self collide-info nav-flags)))
|
||||
(logior! (-> self nav-enemy-flags) (nav-enemy-flags enable-rotate enable-travel))
|
||||
(logclear! (-> self collide-info nav-flags) (nav-flags navf1))
|
||||
(none)
|
||||
)
|
||||
:trans
|
||||
@ -697,12 +697,12 @@
|
||||
snow-bunny-default-event-handler
|
||||
:enter
|
||||
(behavior ()
|
||||
(logior! (-> self nav-enemy-flags) 4)
|
||||
(logior! (-> self nav-enemy-flags) (nav-enemy-flags navenmf2))
|
||||
(nav-enemy-neck-control-look-at)
|
||||
(if (logtest? (-> self nav-enemy-flags) 2)
|
||||
(if (logtest? (-> self nav-enemy-flags) (nav-enemy-flags navenmf1))
|
||||
(go-virtual nav-enemy-chase)
|
||||
)
|
||||
(logior! (-> self nav-enemy-flags) 2)
|
||||
(logior! (-> self nav-enemy-flags) (nav-enemy-flags navenmf1))
|
||||
(dummy-76 self #t)
|
||||
(set-vector! (-> self collide-info transv) 0.0 (nav-enemy-rnd-float-range 102400.0 131072.0) 0.0 1.0)
|
||||
(none)
|
||||
@ -898,7 +898,7 @@
|
||||
(go-virtual snow-bunny-defend)
|
||||
)
|
||||
(when (not (dummy-52 self))
|
||||
(set! (-> self nav-enemy-flags) (logand -3 (-> self nav-enemy-flags)))
|
||||
(logclear! (-> self nav-enemy-flags) (nav-enemy-flags navenmf1))
|
||||
(go-virtual nav-enemy-notice)
|
||||
)
|
||||
(set-jump-height-factor! self 1)
|
||||
@ -910,8 +910,8 @@
|
||||
)
|
||||
:exit
|
||||
(behavior ()
|
||||
(logior! (-> self nav-enemy-flags) 24)
|
||||
(set! (-> self collide-info nav-flags) (logand -3 (-> self collide-info nav-flags)))
|
||||
(logior! (-> self nav-enemy-flags) (nav-enemy-flags enable-rotate enable-travel))
|
||||
(logclear! (-> self collide-info nav-flags) (nav-flags navf1))
|
||||
(none)
|
||||
)
|
||||
:trans
|
||||
@ -1193,8 +1193,8 @@
|
||||
)
|
||||
:exit
|
||||
(behavior ()
|
||||
(logior! (-> self nav-enemy-flags) 24)
|
||||
(set! (-> self collide-info nav-flags) (logand -3 (-> self collide-info nav-flags)))
|
||||
(logior! (-> self nav-enemy-flags) (nav-enemy-flags enable-rotate enable-travel))
|
||||
(logclear! (-> self collide-info nav-flags) (nav-flags navf1))
|
||||
(none)
|
||||
)
|
||||
:trans
|
||||
|
@ -127,7 +127,7 @@
|
||||
:use-proximity-notice #f
|
||||
:use-jump-blocked #f
|
||||
:use-jump-patrol #f
|
||||
:gnd-collide-with #x1
|
||||
:gnd-collide-with (collide-kind background)
|
||||
:debug-draw-neck #f
|
||||
:debug-draw-jump #f
|
||||
)
|
||||
@ -180,7 +180,7 @@
|
||||
:use-proximity-notice #f
|
||||
:use-jump-blocked #f
|
||||
:use-jump-patrol #f
|
||||
:gnd-collide-with #x1
|
||||
:gnd-collide-with (collide-kind background)
|
||||
:debug-draw-neck #f
|
||||
:debug-draw-jump #f
|
||||
)
|
||||
@ -490,7 +490,7 @@
|
||||
(the-as vector #f)
|
||||
f0-9
|
||||
(collide-kind background)
|
||||
(the-as process #f)
|
||||
(the-as process-drawable #f)
|
||||
0.0
|
||||
81920.0
|
||||
)
|
||||
@ -926,7 +926,7 @@
|
||||
v0-4
|
||||
)
|
||||
((begin
|
||||
(if (zero? (logand (-> self nav-enemy-flags) 256))
|
||||
(if (zero? (logand (-> self nav-enemy-flags) (nav-enemy-flags navenmf8)))
|
||||
(do-push-aways! (-> self collide-info))
|
||||
)
|
||||
(level-hint-spawn
|
||||
@ -983,7 +983,7 @@
|
||||
)
|
||||
)
|
||||
(('touch)
|
||||
(if (zero? (logand (-> self nav-enemy-flags) 256))
|
||||
(if (zero? (logand (-> self nav-enemy-flags) (nav-enemy-flags navenmf8)))
|
||||
(do-push-aways! (-> self collide-info))
|
||||
)
|
||||
(cond
|
||||
@ -1233,7 +1233,7 @@
|
||||
)
|
||||
(else
|
||||
(ja-post)
|
||||
(logior! (-> self nav-enemy-flags) 2)
|
||||
(logior! (-> self nav-enemy-flags) (nav-enemy-flags navenmf1))
|
||||
(go ram-boss-idle)
|
||||
)
|
||||
)
|
||||
@ -1375,7 +1375,7 @@
|
||||
)
|
||||
:code
|
||||
(behavior ()
|
||||
(logior! (-> self nav-enemy-flags) 4)
|
||||
(logior! (-> self nav-enemy-flags) (nav-enemy-flags navenmf2))
|
||||
(while #t
|
||||
(clone-anim-once
|
||||
(ppointer->handle (-> self parent-override))
|
||||
@ -1415,7 +1415,7 @@
|
||||
:enter
|
||||
(behavior ((arg0 basic))
|
||||
(dummy-52 self)
|
||||
(logior! (-> self nav-enemy-flags) 4)
|
||||
(logior! (-> self nav-enemy-flags) (nav-enemy-flags navenmf2))
|
||||
(let ((s5-0 (new 'stack-no-clear 'vector))
|
||||
(gp-0 (-> self node-list data 0 bone transform))
|
||||
)
|
||||
@ -1497,7 +1497,7 @@
|
||||
(-> ram-boss-jump-down event)
|
||||
:code
|
||||
(behavior ()
|
||||
(logior! (-> self nav-enemy-flags) 4)
|
||||
(logior! (-> self nav-enemy-flags) (nav-enemy-flags navenmf2))
|
||||
(activate! *camera-smush-control* 409.6 37 150 1.0 0.99)
|
||||
(let ((a0-1 (-> self skel root-channel 0)))
|
||||
(set! (-> a0-1 frame-group) (the-as art-joint-anim (-> self draw art-group data 17)))
|
||||
@ -1516,7 +1516,7 @@
|
||||
(joint-control-channel-group-eval! a0-2 (the-as art-joint-anim #f) num-func-seek!)
|
||||
)
|
||||
)
|
||||
(logior! (-> self nav-enemy-flags) 2)
|
||||
(logior! (-> self nav-enemy-flags) (nav-enemy-flags navenmf1))
|
||||
(go ram-boss-nav-start)
|
||||
(none)
|
||||
)
|
||||
@ -1527,7 +1527,7 @@
|
||||
(defstate ram-boss-already-down (ram-boss)
|
||||
:code
|
||||
(behavior ((arg0 basic))
|
||||
(logior! (-> self nav-enemy-flags) 4)
|
||||
(logior! (-> self nav-enemy-flags) (nav-enemy-flags navenmf2))
|
||||
(dummy-52 self)
|
||||
(let ((a1-0 (new 'stack-no-clear 'vector))
|
||||
(a2-0 (-> self parent-override 0 node-list data 0 bone transform))
|
||||
@ -1646,7 +1646,7 @@
|
||||
)
|
||||
)
|
||||
(cond
|
||||
((logtest? (nav-control-flags bit17) (-> self nav flags))
|
||||
((logtest? (nav-control-flags navcf17) (-> self nav flags))
|
||||
(if (>= (- (-> *display* base-frame-counter) (-> self free-time)) (seconds 1))
|
||||
(go-virtual nav-enemy-patrol)
|
||||
)
|
||||
@ -1705,7 +1705,7 @@
|
||||
(behavior ()
|
||||
(set! (-> self state-time) (-> *display* base-frame-counter))
|
||||
(set! (-> self facing-y) (quaternion-y-angle (-> self collide-info quat)))
|
||||
(logior! (-> self nav-enemy-flags) 4)
|
||||
(logior! (-> self nav-enemy-flags) (nav-enemy-flags navenmf2))
|
||||
(none)
|
||||
)
|
||||
:trans
|
||||
@ -1908,7 +1908,7 @@
|
||||
:enter
|
||||
(behavior ()
|
||||
(set! (-> self frustration) 0)
|
||||
(logior! (-> self nav-enemy-flags) 4)
|
||||
(logior! (-> self nav-enemy-flags) (nav-enemy-flags navenmf2))
|
||||
(none)
|
||||
)
|
||||
:trans
|
||||
@ -1948,7 +1948,7 @@
|
||||
:enter
|
||||
(behavior ()
|
||||
(set! (-> self frustration) 0)
|
||||
(logior! (-> self nav-enemy-flags) 4)
|
||||
(logior! (-> self nav-enemy-flags) (nav-enemy-flags navenmf2))
|
||||
(none)
|
||||
)
|
||||
:trans
|
||||
@ -2059,7 +2059,7 @@
|
||||
ram-boss-on-ground-event-handler
|
||||
:enter
|
||||
(behavior ()
|
||||
(logior! (-> self nav-enemy-flags) 4)
|
||||
(logior! (-> self nav-enemy-flags) (nav-enemy-flags navenmf2))
|
||||
(let ((gp-0 (-> self child)))
|
||||
(while gp-0
|
||||
(send-event (ppointer->process gp-0) 'launch)
|
||||
@ -2128,7 +2128,7 @@
|
||||
(defstate ram-boss-lose-shield (ram-boss)
|
||||
:enter
|
||||
(behavior ()
|
||||
(logior! (-> self nav-enemy-flags) 4)
|
||||
(logior! (-> self nav-enemy-flags) (nav-enemy-flags navenmf2))
|
||||
(nav-enemy-neck-control-inactive)
|
||||
(dummy-53 self)
|
||||
(TODO-RENAME-49 self *ram-boss-nav-enemy-info-no-shield*)
|
||||
|
@ -107,7 +107,7 @@
|
||||
:use-proximity-notice #f
|
||||
:use-jump-blocked #f
|
||||
:use-jump-patrol #f
|
||||
:gnd-collide-with #x1
|
||||
:gnd-collide-with (collide-kind background)
|
||||
:debug-draw-neck #f
|
||||
:debug-draw-jump #f
|
||||
)
|
||||
@ -229,7 +229,7 @@
|
||||
(if (-> self nav-info move-to-ground)
|
||||
(move-to-ground (-> self collide-info) 40960.0 40960.0 #t (collide-kind background))
|
||||
)
|
||||
(set! (-> self nav-enemy-flags) (logand -7 (-> self nav-enemy-flags)))
|
||||
(logclear! (-> self nav-enemy-flags) (nav-enemy-flags navenmf1 navenmf2))
|
||||
(set! (-> self state-timeout) (seconds 1))
|
||||
(set! (-> self ground-y) (-> self collide-info trans y))
|
||||
(spawn (-> self part) (-> self collide-info trans))
|
||||
@ -388,7 +388,7 @@
|
||||
(joint-control-channel-group! a0-14 (the-as art-joint-anim #f) num-func-loop!)
|
||||
)
|
||||
(ja-channel-push! 1 180)
|
||||
(set! (-> self nav-enemy-flags) (logand -9 (-> self nav-enemy-flags)))
|
||||
(logclear! (-> self nav-enemy-flags) (nav-enemy-flags enable-rotate))
|
||||
(let ((gp-1 (nav-enemy-rnd-int-range 2 6)))
|
||||
(dotimes (s5-0 gp-1)
|
||||
(let ((a0-18 (-> self skel root-channel 0)))
|
||||
@ -411,7 +411,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(logior! (-> self nav-enemy-flags) 8)
|
||||
(logior! (-> self nav-enemy-flags) (nav-enemy-flags enable-rotate))
|
||||
(let ((a0-21 (-> self skel root-channel 0)))
|
||||
(set! (-> a0-21 param 0) 1.0)
|
||||
(joint-control-channel-group! a0-21 (the-as art-joint-anim #f) num-func-loop!)
|
||||
@ -514,7 +514,7 @@
|
||||
(behavior ()
|
||||
(set! (-> self turn-time) (seconds 0.2))
|
||||
(let ((f30-0 (nav-enemy-rnd-float-range 0.8 1.2)))
|
||||
(when (or (logtest? (-> self nav-enemy-flags) 256)
|
||||
(when (or (logtest? (-> self nav-enemy-flags) (nav-enemy-flags navenmf8))
|
||||
(and (nav-enemy-player-vulnerable?) (nav-enemy-rnd-percent? 0.5))
|
||||
)
|
||||
(ja-channel-push! 1 30)
|
||||
@ -536,7 +536,7 @@
|
||||
)
|
||||
(while #t
|
||||
(when (not (nav-enemy-facing-player? 2730.6667))
|
||||
(logior! (-> self nav-enemy-flags) 16)
|
||||
(logior! (-> self nav-enemy-flags) (nav-enemy-flags enable-travel))
|
||||
(let ((a0-9 (-> self skel root-channel 0)))
|
||||
(set! (-> a0-9 param 0) 1.0)
|
||||
(joint-control-channel-group! a0-9 (the-as art-joint-anim #f) num-func-loop!)
|
||||
@ -557,7 +557,7 @@
|
||||
(joint-control-channel-group-eval! a0-15 (the-as art-joint-anim #f) num-func-loop!)
|
||||
)
|
||||
)
|
||||
(set! (-> self nav-enemy-flags) (logand -17 (-> self nav-enemy-flags)))
|
||||
(logclear! (-> self nav-enemy-flags) (nav-enemy-flags enable-travel))
|
||||
)
|
||||
(if (not (= (if (> (-> self skel active-channels) 0)
|
||||
(-> self skel root-channel 0 frame-group)
|
||||
@ -642,7 +642,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(logclear! (-> self nav flags) (nav-control-flags bit17 bit19))
|
||||
(logclear! (-> self nav flags) (nav-control-flags navcf17 navcf19))
|
||||
(nav-enemy-get-new-patrol-point)
|
||||
(let ((a0-12 (-> self skel root-channel 0)))
|
||||
(set! (-> a0-12 frame-group) (the-as art-joint-anim (-> self draw art-group data 7)))
|
||||
|
@ -1056,7 +1056,7 @@
|
||||
(initialize-skeleton obj *bully-sg* '())
|
||||
(set! (-> obj draw shadow-ctrl) *bully-shadow-control*)
|
||||
(set! (-> obj nav) (new 'process 'nav-control (-> obj root-override) 16 40960.0))
|
||||
(logior! (-> obj nav flags) (nav-control-flags display-marks bit3 bit5 bit6 bit7))
|
||||
(logior! (-> obj nav flags) (nav-control-flags display-marks navcf3 navcf5 navcf6 navcf7))
|
||||
(set! (-> obj part) (create-launch-control (-> *part-group-id-table* 454) obj))
|
||||
(set! (-> obj fact-override)
|
||||
(new 'process 'fact-info-enemy obj (pickup-type eco-pill-random) (-> *FACT-bank* default-pill-inc))
|
||||
|
@ -119,7 +119,7 @@
|
||||
:use-proximity-notice #f
|
||||
:use-jump-blocked #f
|
||||
:use-jump-patrol #f
|
||||
:gnd-collide-with #x1
|
||||
:gnd-collide-with (collide-kind background)
|
||||
:debug-draw-neck #f
|
||||
:debug-draw-jump #f
|
||||
)
|
||||
@ -173,7 +173,7 @@
|
||||
:use-proximity-notice #f
|
||||
:use-jump-blocked #f
|
||||
:use-jump-patrol #f
|
||||
:gnd-collide-with #x1
|
||||
:gnd-collide-with (collide-kind background)
|
||||
:debug-draw-neck #f
|
||||
:debug-draw-jump #f
|
||||
)
|
||||
@ -227,7 +227,7 @@
|
||||
:use-proximity-notice #f
|
||||
:use-jump-blocked #f
|
||||
:use-jump-patrol #f
|
||||
:gnd-collide-with #x1
|
||||
:gnd-collide-with (collide-kind background)
|
||||
:debug-draw-neck #f
|
||||
:debug-draw-jump #f
|
||||
)
|
||||
@ -330,8 +330,8 @@
|
||||
(set! (-> v1-3 settings flags) (logand -33 (-> v1-3 settings flags)))
|
||||
)
|
||||
0
|
||||
(set! (-> self collide-info nav-flags) (logand -2 (-> self collide-info nav-flags)))
|
||||
(logior! (-> self collide-info nav-flags) 2)
|
||||
(logclear! (-> self collide-info nav-flags) (nav-flags navf0))
|
||||
(logior! (-> self collide-info nav-flags) (nav-flags navf1))
|
||||
(set! (-> self nav extra-nav-sphere quad) (-> self fall-dest quad))
|
||||
(set! (-> self nav extra-nav-sphere w) 9011.2)
|
||||
(let ((gp-0 (new 'stack-no-clear 'vector)))
|
||||
@ -361,8 +361,8 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(logior! (-> self collide-info nav-flags) 1)
|
||||
(set! (-> self collide-info nav-flags) (logand -3 (-> self collide-info nav-flags)))
|
||||
(logior! (-> self collide-info nav-flags) (nav-flags navf0))
|
||||
(logclear! (-> self collide-info nav-flags) (nav-flags navf1))
|
||||
(TODO-RENAME-27 (-> self nav))
|
||||
(go double-lurker-top-resume)
|
||||
(none)
|
||||
@ -440,7 +440,7 @@
|
||||
|
||||
(defmethod dummy-51 double-lurker-top ((obj double-lurker-top))
|
||||
(restore-collide-with-as (-> obj collide-info))
|
||||
(logior! (-> obj collide-info nav-flags) 1)
|
||||
(logior! (-> obj collide-info nav-flags) (nav-flags navf0))
|
||||
(TODO-RENAME-27 (-> obj nav))
|
||||
(none)
|
||||
)
|
||||
@ -524,7 +524,7 @@
|
||||
(set-vector! (-> obj collide-info scale) 1.0 1.0 1.0 1.0)
|
||||
(quaternion-copy! (-> obj collide-info quat) (-> v1-5 0 collide-info quat))
|
||||
)
|
||||
(set! (-> obj collide-info nav-flags) (logand -2 (-> obj collide-info nav-flags)))
|
||||
(logclear! (-> obj collide-info nav-flags) (nav-flags navf0))
|
||||
(none)
|
||||
)
|
||||
|
||||
|
@ -553,7 +553,7 @@
|
||||
|
||||
(defun get-nav-point! ((arg0 vector) (arg1 orbit-plat) (arg2 vector) (arg3 float))
|
||||
(set! (-> arg1 nav target-pos quad) (-> arg2 quad))
|
||||
(logclear! (-> arg1 nav flags) (nav-control-flags bit19))
|
||||
(logclear! (-> arg1 nav flags) (nav-control-flags navcf19))
|
||||
(dummy-11 (-> arg1 nav) (-> arg1 nav target-pos))
|
||||
(let ((f0-0 (vector-length (-> arg1 nav travel))))
|
||||
(if (< arg3 f0-0)
|
||||
@ -717,7 +717,7 @@
|
||||
)
|
||||
)
|
||||
(when (>= 614.4 (vector-vector-xz-distance (-> obj basetrans) (-> obj reset-trans)))
|
||||
(set! v0-11 (logior (nav-control-flags bit19) (-> obj nav flags)))
|
||||
(set! v0-11 (logior (nav-control-flags navcf19) (-> obj nav flags)))
|
||||
(set! (-> obj nav flags) (the-as nav-control-flags v0-11))
|
||||
v0-11
|
||||
)
|
||||
@ -744,7 +744,7 @@
|
||||
(vector-normalize! s5-2 (-> obj reset-length))
|
||||
(vector+! s5-2 s5-2 s4-1)
|
||||
(when (not (dummy-16 (-> obj nav) s5-2))
|
||||
(logclear! (-> obj nav flags) (nav-control-flags bit19))
|
||||
(logclear! (-> obj nav flags) (nav-control-flags navcf19))
|
||||
(get-rotate-point! s5-2 s4-1 (-> obj basetrans) (the-as vector (-> obj reset-length)) 0.0 40960.0)
|
||||
(when (not (dummy-16 (-> obj nav) s5-2))
|
||||
(get-rotate-point!
|
||||
@ -812,13 +812,13 @@
|
||||
:code
|
||||
(behavior ()
|
||||
(set! (-> self plat-status) (the-as uint 3))
|
||||
(logclear! (-> self nav flags) (nav-control-flags bit19))
|
||||
(logclear! (-> self nav flags) (nav-control-flags navcf19))
|
||||
(let ((a0-3 (-> self skel root-channel 0)))
|
||||
(set! (-> a0-3 param 0) 0.0)
|
||||
(set! (-> a0-3 param 1) 1.0)
|
||||
(joint-control-channel-group! a0-3 (the-as art-joint-anim #f) num-func-seek!)
|
||||
)
|
||||
(while (zero? (logand (nav-control-flags bit19) (-> self nav flags)))
|
||||
(while (zero? (logand (nav-control-flags navcf19) (-> self nav flags)))
|
||||
(dummy-27 self)
|
||||
(when (nonzero? (-> self root-override riders num-riders))
|
||||
(let ((a1-1 (new 'stack-no-clear 'event-message-block)))
|
||||
@ -927,7 +927,7 @@
|
||||
(update-transforms! (-> obj root-override))
|
||||
(dummy-21 obj)
|
||||
(set! (-> obj nav) (new 'process 'nav-control (-> obj root-override) 16 40960.0))
|
||||
(logior! (-> obj nav flags) (nav-control-flags display-marks bit3 bit5 bit6 bit7))
|
||||
(logior! (-> obj nav flags) (nav-control-flags display-marks navcf3 navcf5 navcf6 navcf7))
|
||||
(set! (-> obj nav gap-event) 'blocked)
|
||||
(set! (-> obj other) (entity-actor-lookup arg0 'alt-actor 0))
|
||||
(let ((f0-7 (res-lump-float arg0 'scale :default 1.0)))
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user